builder.io 1.11.48 → 1.11.49
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 +33 -34
- 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 -1
- package/server/index.cjs +3 -3
- package/server/index.mjs +3 -3
- package/types/tsconfig.tsbuildinfo +1 -1
package/cli/index.cjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var ij=Object.create;var cd=Object.defineProperty;var sj=Object.getOwnPropertyDescriptor;var oj=Object.getOwnPropertyNames;var aj=Object.getPrototypeOf,cj=Object.prototype.hasOwnProperty;var uj=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mS=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})},hS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oj(t))!cj.call(e,i)&&i!==r&&cd(e,i,{get:()=>t[i],enumerable:!(n=sj(t,i))||n.enumerable});return e};var G=(e,t,r)=>(r=e!=null?ij(aj(e)):{},hS(t||!e||!e.__esModule?cd(r,"default",{value:e,enumerable:!0}):r,e)),lj=e=>hS(cd({},"__esModule",{value:!0}),e);var f=uj(()=>{{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"b978a7efc7d8d850b18bad161b29e4a6c1558321"}}});var yS=w((axe,gS)=>{f();function Rg(e){return e==null?[]:Array.isArray(e)?e:[e]}function pj(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]}gS.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=Rg(t.string),t.boolean=Rg(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Rg(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);pj(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 pd=w((fxe,DS)=>{"use strict";f();var Ug="\x1B",Pt=`${Ug}[`,mj="\x07",jg={to(e,t){return t?`${Pt}${t+1};${e+1}H`:`${Pt}${e+1}G`},move(e,t){let r="";return e<0?r+=`${Pt}${-e}D`:e>0&&(r+=`${Pt}${e}C`),t<0?r+=`${Pt}${-t}A`:t>0&&(r+=`${Pt}${t}B`),r},up:(e=1)=>`${Pt}${e}A`,down:(e=1)=>`${Pt}${e}B`,forward:(e=1)=>`${Pt}${e}C`,backward:(e=1)=>`${Pt}${e}D`,nextLine:(e=1)=>`${Pt}E`.repeat(e),prevLine:(e=1)=>`${Pt}F`.repeat(e),left:`${Pt}G`,hide:`${Pt}?25l`,show:`${Pt}?25h`,save:`${Ug}7`,restore:`${Ug}8`},hj={up:(e=1)=>`${Pt}S`.repeat(e),down:(e=1)=>`${Pt}T`.repeat(e)},gj={screen:`${Pt}2J`,up:(e=1)=>`${Pt}1J`.repeat(e),down:(e=1)=>`${Pt}J`.repeat(e),line:`${Pt}2K`,lineEnd:`${Pt}K`,lineStart:`${Pt}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?jg.up():"");return e&&(t+=jg.left),t}};DS.exports={cursor:jg,scroll:hj,erase:gj,beep:mj}});var _t=w((hxe,qg)=>{f();var fd=process||{},CS=fd.argv||[],dd=fd.env||{},yj=!(dd.NO_COLOR||CS.includes("--no-color"))&&(!!dd.FORCE_COLOR||CS.includes("--color")||fd.platform==="win32"||(fd.stdout||{}).isTTY&&dd.TERM!=="dumb"||!!dd.CI),bj=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+xj(i,t,r,s)+t:e+i+t},xj=(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)},ES=(e=yj)=>{let t=e?bj:()=>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")}};qg.exports=ES();qg.exports.createColors=ES});var JS=w((Oxe,YS)=>{"use strict";f();YS.exports=function(){if(process.env.npm_config_user_agent)return Jj(process.env.npm_config_user_agent)};function Jj(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 ET=w((bwe,Bd)=>{f();Bd.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Bd.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]/;Bd.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 Ey=w((vwe,wT)=>{f();var Cy=ET();wT.exports={isSpaceSeparator(e){return typeof e=="string"&&Cy.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Cy.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"||Cy.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 FT=w((Cwe,PT)=>{f();var Wt=Ey(),Sy,Tr,ts,Ld,Ns,Yn,Yt,Py,Mu;PT.exports=function(t,r){Sy=String(t),Tr="start",ts=[],Ld=0,Ns=1,Yn=0,Yt=void 0,Py=void 0,Mu=void 0;do Yt=gz(),xz[Tr]();while(Yt.type!=="eof");return typeof r=="function"?Ty({"":Mu},"",r):Mu};function Ty(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=Ty(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=Ty(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 Pe,Se,Bu,es,Oe;function gz(){for(Pe="default",Se="",Bu=!1,es=1;;){Oe=rs();let e=TT[Pe]();if(e)return e}}function rs(){if(Sy[Ld])return String.fromCodePoint(Sy.codePointAt(Ld))}function W(){let e=rs();return e===`
|
|
1
|
+
var ij=Object.create;var cd=Object.defineProperty;var sj=Object.getOwnPropertyDescriptor;var oj=Object.getOwnPropertyNames;var aj=Object.getPrototypeOf,cj=Object.prototype.hasOwnProperty;var uj=(e,t)=>()=>(e&&(t=e(e=0)),t);var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),mS=(e,t)=>{for(var r in t)cd(e,r,{get:t[r],enumerable:!0})},hS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of oj(t))!cj.call(e,i)&&i!==r&&cd(e,i,{get:()=>t[i],enumerable:!(n=sj(t,i))||n.enumerable});return e};var G=(e,t,r)=>(r=e!=null?ij(aj(e)):{},hS(t||!e||!e.__esModule?cd(r,"default",{value:e,enumerable:!0}):r,e)),lj=e=>hS(cd({},"__esModule",{value:!0}),e);var f=uj(()=>{{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"1de86a751e823393eaf350c9ea965c7d491df3fe"}}});var yS=w((axe,gS)=>{f();function Rg(e){return e==null?[]:Array.isArray(e)?e:[e]}function pj(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]}gS.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=Rg(t.string),t.boolean=Rg(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=Rg(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);pj(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 pd=w((fxe,DS)=>{"use strict";f();var Ug="\x1B",Pt=`${Ug}[`,mj="\x07",jg={to(e,t){return t?`${Pt}${t+1};${e+1}H`:`${Pt}${e+1}G`},move(e,t){let r="";return e<0?r+=`${Pt}${-e}D`:e>0&&(r+=`${Pt}${e}C`),t<0?r+=`${Pt}${-t}A`:t>0&&(r+=`${Pt}${t}B`),r},up:(e=1)=>`${Pt}${e}A`,down:(e=1)=>`${Pt}${e}B`,forward:(e=1)=>`${Pt}${e}C`,backward:(e=1)=>`${Pt}${e}D`,nextLine:(e=1)=>`${Pt}E`.repeat(e),prevLine:(e=1)=>`${Pt}F`.repeat(e),left:`${Pt}G`,hide:`${Pt}?25l`,show:`${Pt}?25h`,save:`${Ug}7`,restore:`${Ug}8`},hj={up:(e=1)=>`${Pt}S`.repeat(e),down:(e=1)=>`${Pt}T`.repeat(e)},gj={screen:`${Pt}2J`,up:(e=1)=>`${Pt}1J`.repeat(e),down:(e=1)=>`${Pt}J`.repeat(e),line:`${Pt}2K`,lineEnd:`${Pt}K`,lineStart:`${Pt}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?jg.up():"");return e&&(t+=jg.left),t}};DS.exports={cursor:jg,scroll:hj,erase:gj,beep:mj}});var _t=w((hxe,qg)=>{f();var fd=process||{},CS=fd.argv||[],dd=fd.env||{},yj=!(dd.NO_COLOR||CS.includes("--no-color"))&&(!!dd.FORCE_COLOR||CS.includes("--color")||fd.platform==="win32"||(fd.stdout||{}).isTTY&&dd.TERM!=="dumb"||!!dd.CI),bj=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+xj(i,t,r,s)+t:e+i+t},xj=(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)},ES=(e=yj)=>{let t=e?bj:()=>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")}};qg.exports=ES();qg.exports.createColors=ES});var JS=w((Oxe,YS)=>{"use strict";f();YS.exports=function(){if(process.env.npm_config_user_agent)return Jj(process.env.npm_config_user_agent)};function Jj(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 ET=w((bwe,Bd)=>{f();Bd.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Bd.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]/;Bd.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 Ey=w((vwe,wT)=>{f();var Cy=ET();wT.exports={isSpaceSeparator(e){return typeof e=="string"&&Cy.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Cy.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"||Cy.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 FT=w((Cwe,PT)=>{f();var Wt=Ey(),Sy,Sr,ts,Ld,Ns,Yn,Yt,Py,Mu;PT.exports=function(t,r){Sy=String(t),Sr="start",ts=[],Ld=0,Ns=1,Yn=0,Yt=void 0,Py=void 0,Mu=void 0;do Yt=gz(),xz[Sr]();while(Yt.type!=="eof");return typeof r=="function"?Ty({"":Mu},"",r):Mu};function Ty(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=Ty(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=Ty(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 Pe,Se,Bu,es,Oe;function gz(){for(Pe="default",Se="",Bu=!1,es=1;;){Oe=rs();let e=TT[Pe]();if(e)return e}}function rs(){if(Sy[Ld])return String.fromCodePoint(Sy.codePointAt(Ld))}function W(){let e=rs();return e===`
|
|
2
2
|
`?(Ns++,Yn=0):e?Yn+=e.length:Yn++,e&&(Ld+=e.length),e}var TT={default(){switch(Oe){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
3
|
-
`:case"\r":case"\u2028":case"\u2029":W();return;case"/":W(),Pe="comment";return;case void 0:return W(),yt("eof")}if(Wt.isSpaceSeparator(Oe)){W();return}return TT[
|
|
3
|
+
`:case"\r":case"\u2028":case"\u2029":W();return;case"/":W(),Pe="comment";return;case void 0:return W(),yt("eof")}if(Wt.isSpaceSeparator(Oe)){W();return}return TT[Sr]()},comment(){switch(Oe){case"*":W(),Pe="multiLineComment";return;case"/":W(),Pe="singleLineComment";return}throw bt(W())},multiLineComment(){switch(Oe){case"*":W(),Pe="multiLineCommentAsterisk";return;case void 0:throw bt(W())}W()},multiLineCommentAsterisk(){switch(Oe){case"*":W();return;case"/":W(),Pe="default";return;case void 0:throw bt(W())}W(),Pe="multiLineComment"},singleLineComment(){switch(Oe){case`
|
|
4
4
|
`:case"\r":case"\u2028":case"\u2029":W(),Pe="default";return;case void 0:return W(),yt("eof")}W()},value(){switch(Oe){case"{":case"[":return yt("punctuator",W());case"n":return W(),Ao("ull"),yt("null",null);case"t":return W(),Ao("rue"),yt("boolean",!0);case"f":return W(),Ao("alse"),yt("boolean",!1);case"-":case"+":W()==="-"&&(es=-1),Pe="sign";return;case".":Se=W(),Pe="decimalPointLeading";return;case"0":Se=W(),Pe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Se=W(),Pe="decimalInteger";return;case"I":return W(),Ao("nfinity"),yt("numeric",1/0);case"N":return W(),Ao("aN"),yt("numeric",NaN);case'"':case"'":Bu=W()==='"',Se="",Pe="string";return}throw bt(W())},identifierNameStartEscape(){if(Oe!=="u")throw bt(W());W();let e=Ay();switch(e){case"$":case"_":break;default:if(!Wt.isIdStartChar(e))throw ST();break}Se+=e,Pe="identifierName"},identifierName(){switch(Oe){case"$":case"_":case"\u200C":case"\u200D":Se+=W();return;case"\\":W(),Pe="identifierNameEscape";return}if(Wt.isIdContinueChar(Oe)){Se+=W();return}return yt("identifier",Se)},identifierNameEscape(){if(Oe!=="u")throw bt(W());W();let e=Ay();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Wt.isIdContinueChar(e))throw ST();break}Se+=e,Pe="identifierName"},sign(){switch(Oe){case".":Se=W(),Pe="decimalPointLeading";return;case"0":Se=W(),Pe="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":Se=W(),Pe="decimalInteger";return;case"I":return W(),Ao("nfinity"),yt("numeric",es*(1/0));case"N":return W(),Ao("aN"),yt("numeric",NaN)}throw bt(W())},zero(){switch(Oe){case".":Se+=W(),Pe="decimalPoint";return;case"e":case"E":Se+=W(),Pe="decimalExponent";return;case"x":case"X":Se+=W(),Pe="hexadecimal";return}return yt("numeric",es*0)},decimalInteger(){switch(Oe){case".":Se+=W(),Pe="decimalPoint";return;case"e":case"E":Se+=W(),Pe="decimalExponent";return}if(Wt.isDigit(Oe)){Se+=W();return}return yt("numeric",es*Number(Se))},decimalPointLeading(){if(Wt.isDigit(Oe)){Se+=W(),Pe="decimalFraction";return}throw bt(W())},decimalPoint(){switch(Oe){case"e":case"E":Se+=W(),Pe="decimalExponent";return}if(Wt.isDigit(Oe)){Se+=W(),Pe="decimalFraction";return}return yt("numeric",es*Number(Se))},decimalFraction(){switch(Oe){case"e":case"E":Se+=W(),Pe="decimalExponent";return}if(Wt.isDigit(Oe)){Se+=W();return}return yt("numeric",es*Number(Se))},decimalExponent(){switch(Oe){case"+":case"-":Se+=W(),Pe="decimalExponentSign";return}if(Wt.isDigit(Oe)){Se+=W(),Pe="decimalExponentInteger";return}throw bt(W())},decimalExponentSign(){if(Wt.isDigit(Oe)){Se+=W(),Pe="decimalExponentInteger";return}throw bt(W())},decimalExponentInteger(){if(Wt.isDigit(Oe)){Se+=W();return}return yt("numeric",es*Number(Se))},hexadecimal(){if(Wt.isHexDigit(Oe)){Se+=W(),Pe="hexadecimalInteger";return}throw bt(W())},hexadecimalInteger(){if(Wt.isHexDigit(Oe)){Se+=W();return}return yt("numeric",es*Number(Se))},string(){switch(Oe){case"\\":W(),Se+=yz();return;case'"':if(Bu)return W(),yt("string",Se);Se+=W();return;case"'":if(!Bu)return W(),yt("string",Se);Se+=W();return;case`
|
|
5
5
|
`:case"\r":throw bt(W());case"\u2028":case"\u2029":vz(Oe);break;case void 0:throw bt(W())}Se+=W()},start(){switch(Oe){case"{":case"[":return yt("punctuator",W())}Pe="value"},beforePropertyName(){switch(Oe){case"$":case"_":Se=W(),Pe="identifierName";return;case"\\":W(),Pe="identifierNameStartEscape";return;case"}":return yt("punctuator",W());case'"':case"'":Bu=W()==='"',Pe="string";return}if(Wt.isIdStartChar(Oe)){Se+=W(),Pe="identifierName";return}throw bt(W())},afterPropertyName(){if(Oe===":")return yt("punctuator",W());throw bt(W())},beforePropertyValue(){Pe="value"},afterPropertyValue(){switch(Oe){case",":case"}":return yt("punctuator",W())}throw bt(W())},beforeArrayValue(){if(Oe==="]")return yt("punctuator",W());Pe="value"},afterArrayValue(){switch(Oe){case",":case"]":return yt("punctuator",W())}throw bt(W())},end(){throw bt(W())}};function yt(e,t){return{type:e,value:t,line:Ns,column:Yn}}function Ao(e){for(let t of e){if(rs()!==t)throw bt(W());W()}}function yz(){switch(rs()){case"b":return W(),"\b";case"f":return W(),"\f";case"n":return W(),`
|
|
6
6
|
`;case"r":return W(),"\r";case"t":return W()," ";case"v":return W(),"\v";case"0":if(W(),Wt.isDigit(rs()))throw bt(W());return"\0";case"x":return W(),bz();case"u":return W(),Ay();case`
|
|
7
7
|
`:case"\u2028":case"\u2029":return W(),"";case"\r":return W(),rs()===`
|
|
8
|
-
`&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw bt(W());case void 0:throw bt(W())}return W()}function bz(){let e="",t=rs();if(!Wt.isHexDigit(t)||(e+=W(),t=rs(),!Wt.isHexDigit(t)))throw bt(W());return e+=W(),String.fromCodePoint(parseInt(e,16))}function Ay(){let e="",t=4;for(;t-- >0;){let r=rs();if(!Wt.isHexDigit(r))throw bt(W());e+=W()}return String.fromCodePoint(parseInt(e,16))}var xz={start(){if(Yt.type==="eof")throw Po();wy()},beforePropertyName(){switch(Yt.type){case"identifier":case"string":Py=Yt.value,
|
|
8
|
+
`&&W(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw bt(W());case void 0:throw bt(W())}return W()}function bz(){let e="",t=rs();if(!Wt.isHexDigit(t)||(e+=W(),t=rs(),!Wt.isHexDigit(t)))throw bt(W());return e+=W(),String.fromCodePoint(parseInt(e,16))}function Ay(){let e="",t=4;for(;t-- >0;){let r=rs();if(!Wt.isHexDigit(r))throw bt(W());e+=W()}return String.fromCodePoint(parseInt(e,16))}var xz={start(){if(Yt.type==="eof")throw Po();wy()},beforePropertyName(){switch(Yt.type){case"identifier":case"string":Py=Yt.value,Sr="afterPropertyName";return;case"punctuator":Md();return;case"eof":throw Po()}},afterPropertyName(){if(Yt.type==="eof")throw Po();Sr="beforePropertyValue"},beforePropertyValue(){if(Yt.type==="eof")throw Po();wy()},beforeArrayValue(){if(Yt.type==="eof")throw Po();if(Yt.type==="punctuator"&&Yt.value==="]"){Md();return}wy()},afterPropertyValue(){if(Yt.type==="eof")throw Po();switch(Yt.value){case",":Sr="beforePropertyName";return;case"}":Md()}},afterArrayValue(){if(Yt.type==="eof")throw Po();switch(Yt.value){case",":Sr="beforeArrayValue";return;case"]":Md()}},end(){}};function wy(){let e;switch(Yt.type){case"punctuator":switch(Yt.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Yt.value;break}if(Mu===void 0)Mu=e;else{let t=ts[ts.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,Py,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")ts.push(e),Array.isArray(e)?Sr="beforeArrayValue":Sr="beforePropertyName";else{let t=ts[ts.length-1];t==null?Sr="end":Array.isArray(t)?Sr="afterArrayValue":Sr="afterPropertyValue"}}function Md(){ts.pop();let e=ts[ts.length-1];e==null?Sr="end":Array.isArray(e)?Sr="afterArrayValue":Sr="afterPropertyValue"}function bt(e){return $d(e===void 0?`JSON5: invalid end of input at ${Ns}:${Yn}`:`JSON5: invalid character '${AT(e)}' at ${Ns}:${Yn}`)}function Po(){return $d(`JSON5: invalid end of input at ${Ns}:${Yn}`)}function ST(){return Yn-=5,$d(`JSON5: invalid identifier character at ${Ns}:${Yn}`)}function vz(e){console.warn(`JSON5: '${AT(e)}' in strings is not valid ECMAScript; consider escaping`)}function AT(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function $d(e){let t=new SyntaxError(e);return t.lineNumber=Ns,t.columnNumber=Yn,t}});var IT=w((wwe,_T)=>{f();var Fy=Ey();_T.exports=function(t,r,n){let i=[],s="",o,a,c="",u;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,u=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){o=[];for(let g of r){let y;typeof g=="string"?y=g:(typeof g=="number"||g instanceof String||g instanceof Number)&&(y=String(g)),y!==void 0&&o.indexOf(y)<0&&o.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),c=" ".substr(0,n)):typeof n=="string"&&(c=n.substr(0,10)),l("",{"":t});function l(g,y){let b=y[g];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(g):typeof b.toJSON=="function"&&(b=b.toJSON(g))),a&&(b=a.call(y,g,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return p(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?m(b):d(b)}function p(g){let y={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},v="";for(let x=0;x<g.length;x++){let D=g[x];switch(D){case"'":case'"':y[D]++,v+=D;continue;case"\0":if(Fy.isDigit(g[x+1])){v+="\\x00";continue}}if(b[D]){v+=b[D];continue}if(D<" "){let E=D.charCodeAt(0).toString(16);v+="\\x"+("00"+E).substring(E.length);continue}v+=D}let C=u||Object.keys(y).reduce((x,D)=>y[x]<y[D]?x:D);return v=v.replace(new RegExp(C,"g"),b[C]),C+v+C}function d(g){if(i.indexOf(g)>=0)throw TypeError("Converting circular structure to JSON5");i.push(g);let y=s;s=s+c;let b=o||Object.keys(g),v=[];for(let x of b){let D=l(x,g);if(D!==void 0){let E=h(x)+":";c!==""&&(E+=" "),E+=D,v.push(E)}}let C;if(v.length===0)C="{}";else{let x;if(c==="")x=v.join(","),C="{"+x+"}";else{let D=`,
|
|
9
9
|
`+s;x=v.join(D),C=`{
|
|
10
10
|
`+s+x+`,
|
|
11
11
|
`+y+"}"}}return i.pop(),s=y,C}function h(g){if(g.length===0)return p(g,!0);let y=String.fromCodePoint(g.codePointAt(0));if(!Fy.isIdStartChar(y))return p(g,!0);for(let b=y.length;b<g.length;b++)if(!Fy.isIdContinueChar(String.fromCodePoint(g.codePointAt(b))))return p(g,!0);return g}function m(g){if(i.indexOf(g)>=0)throw TypeError("Converting circular structure to JSON5");i.push(g);let y=s;s=s+c;let b=[];for(let C=0;C<g.length;C++){let x=l(String(C),g);b.push(x!==void 0?x:"null")}let v;if(b.length===0)v="[]";else if(c==="")v="["+b.join(",")+"]";else{let C=`,
|
|
12
12
|
`+s,x=b.join(C);v=`[
|
|
13
13
|
`+s+x+`,
|
|
14
14
|
`+y+"]"}return i.pop(),s=y,v}}});var NT=w((Twe,kT)=>{f();var Dz=FT(),Cz=IT(),Ez={parse:Dz,stringify:Cz};kT.exports=Ez});var Ny=w(Rs=>{"use strict";f();Object.defineProperty(Rs,"__esModule",{value:!0});Rs.throwUnsupportedData=Rs.throwUnknownDataType=Rs.getType=void 0;function YT(e){return Object.prototype.toString.call(e)}Rs.getType=YT;function Yz(e){throw new TypeError("unsupported data type: "+YT(e))}Rs.throwUnknownDataType=Yz;function Jz(e){throw new TypeError("unsupported data type: "+e)}Rs.throwUnsupportedData=Jz});var Ly=w(hr=>{"use strict";f();Object.defineProperty(hr,"__esModule",{value:!0});hr.s_to_num=hr.int_str_to_s=hr.num_to_s=hr.big_int_to_s=hr.int_to_s=hr.s_to_big_int=hr.s_to_int=void 0;var ns="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);ns+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);ns+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);ns+=t}var La=ns.length,Oy={};for(let e=0;e<La;e++){let t=ns[e];Oy[t]=e}function By(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let i=e[n],s=Oy[i];s*=r,t+=s,r*=La}return t}hr.s_to_int=By;function JT(e){let t=BigInt(0),r=BigInt(1),n=BigInt(La);for(let i=e.length-1;i>=0;i--){let s=e[i],o=BigInt(Oy[s]);o*=r,t+=o,r*=n}return t}hr.s_to_big_int=JT;function My(e){if(e===0)return ns[0];let t=[];for(;e!==0;){let r=e%La,n=ns[r];t.push(n),e-=r,e/=La}return t.reverse().join("")}hr.int_to_s=My;function XT(e){let t=BigInt(0),r=BigInt(La);if(e===t)return ns[0];let n=[];for(;e!==t;){let i=e%r,s=ns[Number(i)];n.push(s),e/=r}return n.reverse().join("")}hr.big_int_to_s=XT;function QT(e){return e.split("").reverse().join("")}function ZT(e){if(e<0)return"-"+ZT(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,o]=t.split("e");t=s,r="0e"+o}else return My(e);let n;r&&([r,n]=r.split("e")),t=jd(t),r=QT(r),r=jd(r);let i=t+"."+r;if(n){switch(i+=".",n[0]){case"+":n=n.slice(1);break;case"-":i+="-",n=n.slice(1);break}n=jd(n),i+=n}return i}hr.num_to_s=ZT;function jd(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?My(t):":"+XT(BigInt(e))}hr.int_str_to_s=jd;function Ry(e){return e[0]===":"?JT(e.substring(1)).toString():By(e).toString()}function eA(e){if(e[0]==="-")return-eA(e.substr(1));let[t,r,n]=e.split(".");if(!r)return By(t);t=Ry(t),r=Ry(r),r=QT(r);let i=t+"."+r;if(n){i+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=Ry(n),i+=s?-n:+n}return+i}hr.s_to_num=eA});var Uy=w(gr=>{"use strict";f();Object.defineProperty(gr,"__esModule",{value:!0});gr.decodeStr=gr.encodeStr=gr.decodeBool=gr.encodeBool=gr.decodeKey=gr.decodeNum=gr.encodeNum=void 0;var $y=Ly();function Xz(e){return"n|"+(0,$y.num_to_s)(e)}gr.encodeNum=Xz;function Qz(e){return e=e.replace("n|",""),(0,$y.s_to_num)(e)}gr.decodeNum=Qz;function Zz(e){return typeof e=="number"?e:(0,$y.s_to_int)(e)}gr.decodeKey=Zz;function eH(e){return e?"b|T":"b|F"}gr.encodeBool=eH;function tH(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}gr.decodeBool=tH;function rH(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}gr.encodeStr=rH;function nH(e){return e[0]+e[1]==="s|"?e.substr(2):e}gr.decodeStr=nH});var jy=w(qd=>{"use strict";f();Object.defineProperty(qd,"__esModule",{value:!0});qd.config=void 0;qd.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var Hy=w(En=>{"use strict";f();Object.defineProperty(En,"__esModule",{value:!0});En.addValue=En.makeInMemoryMemory=En.makeInMemoryCache=En.makeInMemoryStore=En.memToValues=void 0;var zy=jy(),qy=Ny(),Gy=Uy(),iH=Ly();function sH(e){return e.store.toArray()}En.memToValues=sH;function tA(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}En.makeInMemoryStore=tA;function rA(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,i]of Object.entries(e))if(r(n,i)==="break")return},forEachSchema(r){for(let[n,i]of Object.entries(t))if(r(n,i)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}En.makeInMemoryCache=rA;function oH(){return{store:tA(),cache:rA(),keyCount:0}}En.makeInMemoryMemory=oH;function _o(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,iH.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function aH(e,t){zy.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=$u(e,t,void 0);return e.cache.setSchema(r,n),n}function $u(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return $u(e,null,r);break;case"object":if(t===null)return _o(e,null);if(Array.isArray(t)){let n="a";for(let i=0;i<t.length;i++){let s=t[i],o=s===null?"_":$u(e,s,t);n+="|"+o}return n==="a"&&(n="a|"),_o(e,n)}else{let n=Object.keys(t);if(n.length===0)return _o(e,"o|");let i="o",s=aH(e,n);i+="|"+s;for(let o of n){let a=t[o],c=$u(e,a,t);i+="|"+c}return _o(e,i)}case"boolean":return _o(e,(0,Gy.encodeBool)(t));case"number":return Number.isNaN(t)?(zy.config.error_on_nan&&(0,qy.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(zy.config.error_on_infinite&&(0,qy.throwUnsupportedData)("[number Infinity]"),""):_o(e,(0,Gy.encodeNum)(t));case"string":return _o(e,(0,Gy.encodeStr)(t))}return(0,qy.throwUnknownDataType)(t)}En.addValue=$u});var Vy=w(Os=>{"use strict";f();Object.defineProperty(Os,"__esModule",{value:!0});Os.decompress=Os.decode=Os.compress=void 0;var cH=Ny(),Gd=Uy(),Ky=Hy();function uH(e){let t=(0,Ky.makeInMemoryMemory)(),r=(0,Ky.addValue)(t,e,void 0);return[(0,Ky.memToValues)(t),r]}Os.compress=uH;function lH(e,t){if(t==="o|")return{};let r={},n=t.split("|"),i=n[1],s=Uu(e,i),o=n.length;o-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<o;a++){let c=s[a-2],u=n[a];u=Uu(e,u),r[c]=u}return r}function pH(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,i=new Array(n);for(let s=0;s<n;s++){let o=r[s+1];o=Uu(e,o),i[s]=o}return i}function Uu(e,t){if(t===""||t==="_")return null;let r=(0,Gd.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,Gd.decodeBool)(n);case"o|":return lH(e,n);case"n|":return(0,Gd.decodeNum)(n);case"a|":return pH(e,n);default:return(0,Gd.decodeStr)(n)}}return(0,cH.throwUnknownDataType)(n)}Os.decode=Uu;function dH(e){let[t,r]=e;return Uu(t,r)}Os.decompress=dH});var iA=w($a=>{"use strict";f();Object.defineProperty($a,"__esModule",{value:!0});$a.trimUndefinedRecursively=$a.trimUndefined=void 0;function fH(e){for(let t in e)e[t]===void 0&&delete e[t]}$a.trimUndefined=fH;function mH(e){nA(e,new Set)}$a.trimUndefinedRecursively=mH;function nA(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&nA(n,t)}}});var aA=w(yr=>{"use strict";f();Object.defineProperty(yr,"__esModule",{value:!0});yr.config=yr.trimUndefinedRecursively=yr.trimUndefined=yr.addValue=yr.decode=yr.decompress=yr.compress=void 0;var sA=Vy();Object.defineProperty(yr,"compress",{enumerable:!0,get:function(){return sA.compress}});Object.defineProperty(yr,"decompress",{enumerable:!0,get:function(){return sA.decompress}});var hH=Vy();Object.defineProperty(yr,"decode",{enumerable:!0,get:function(){return hH.decode}});var gH=Hy();Object.defineProperty(yr,"addValue",{enumerable:!0,get:function(){return gH.addValue}});var oA=iA();Object.defineProperty(yr,"trimUndefined",{enumerable:!0,get:function(){return oA.trimUndefined}});Object.defineProperty(yr,"trimUndefinedRecursively",{enumerable:!0,get:function(){return oA.trimUndefinedRecursively}});var yH=jy();Object.defineProperty(yr,"config",{enumerable:!0,get:function(){return yH.config}})});var OP=w((UPe,RP)=>{f();function CP(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],n=typeof r;(n==="object"||n==="function")&&!Object.isFrozen(r)&&CP(r)}),e}var Zd=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function EP(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ms(e,...t){let r=Object.create(null);for(let n in e)r[n]=e[n];return t.forEach(function(n){for(let i in n)r[i]=n[i]}),r}var XH="</span>",gP=e=>!!e.scope,QH=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let r=e.split(".");return[`${t}${r.shift()}`,...r.map((n,i)=>`${n}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`},Zy=class{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=EP(t)}openNode(t){if(!gP(t))return;let r=QH(t.scope,{prefix:this.classPrefix});this.span(r)}closeNode(t){gP(t)&&(this.buffer+=XH)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},yP=(e={})=>{let t={children:[]};return Object.assign(t,e),t},eb=class e{constructor(){this.rootNode=yP(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let r=yP({scope:t});this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(n=>this._walk(t,n)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{e._collapse(r)}))}},tb=class extends eb{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,r){let n=t.root;r&&(n.scope=`language:${r}`),this.add(n)}toHTML(){return new Zy(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function qu(e){return e?typeof e=="string"?e:e.source:null}function wP(e){return ko("(?=",e,")")}function ZH(e){return ko("(?:",e,")*")}function eK(e){return ko("(?:",e,")?")}function ko(...e){return e.map(r=>qu(r)).join("")}function tK(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function nb(...e){return"("+(tK(e).capture?"":"?:")+e.map(n=>qu(n)).join("|")+")"}function SP(e){return new RegExp(e.toString()+"|").exec("").length-1}function rK(e,t){let r=e&&e.exec(t);return r&&r.index===0}var nK=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function ib(e,{joinWith:t}){let r=0;return e.map(n=>{r+=1;let i=r,s=qu(n),o="";for(;s.length>0;){let a=nK.exec(s);if(!a){o+=s;break}o+=s.substring(0,a.index),s=s.substring(a.index+a[0].length),a[0][0]==="\\"&&a[1]?o+="\\"+String(Number(a[1])+i):(o+=a[0],a[0]==="("&&r++)}return o}).map(n=>`(${n})`).join(t)}var iK=/\b\B/,TP="[a-zA-Z]\\w*",sb="[a-zA-Z_]\\w*",AP="\\b\\d+(\\.\\d+)?",PP="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",FP="\\b(0b[01]+)",sK="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",oK=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=ko(t,/.*\b/,e.binary,/\b.*/)),Ms({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,n)=>{r.index!==0&&n.ignoreMatch()}},e)},Gu={begin:"\\\\[\\s\\S]",relevance:0},aK={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Gu]},cK={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Gu]},uK={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},tf=function(e,t,r={}){let n=Ms({scope:"comment",begin:e,end:t,contains:[]},r);n.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=nb("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return n.contains.push({begin:ko(/[ ]+/,"(",i,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},lK=tf("//","$"),pK=tf("/\\*","\\*/"),dK=tf("#","$"),fK={scope:"number",begin:AP,relevance:0},mK={scope:"number",begin:PP,relevance:0},hK={scope:"number",begin:FP,relevance:0},gK={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Gu,{begin:/\[/,end:/\]/,relevance:0,contains:[Gu]}]},yK={scope:"title",begin:TP,relevance:0},bK={scope:"title",begin:sb,relevance:0},xK={begin:"\\.\\s*"+sb,relevance:0},vK=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})},Qd=Object.freeze({__proto__:null,APOS_STRING_MODE:aK,BACKSLASH_ESCAPE:Gu,BINARY_NUMBER_MODE:hK,BINARY_NUMBER_RE:FP,COMMENT:tf,C_BLOCK_COMMENT_MODE:pK,C_LINE_COMMENT_MODE:lK,C_NUMBER_MODE:mK,C_NUMBER_RE:PP,END_SAME_AS_BEGIN:vK,HASH_COMMENT_MODE:dK,IDENT_RE:TP,MATCH_NOTHING_RE:iK,METHOD_GUARD:xK,NUMBER_MODE:fK,NUMBER_RE:AP,PHRASAL_WORDS_MODE:uK,QUOTE_STRING_MODE:cK,REGEXP_MODE:gK,RE_STARTERS_RE:sK,SHEBANG:oK,TITLE_MODE:yK,UNDERSCORE_IDENT_RE:sb,UNDERSCORE_TITLE_MODE:bK});function DK(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function CK(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function EK(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=DK,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function wK(e,t){Array.isArray(e.illegal)&&(e.illegal=nb(...e.illegal))}function SK(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function TK(e,t){e.relevance===void 0&&(e.relevance=1)}var AK=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let r=Object.assign({},e);Object.keys(e).forEach(n=>{delete e[n]}),e.keywords=r.keywords,e.begin=ko(r.beforeMatch,wP(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},PK=["of","and","for","in","not","or","if","then","parent","list","value"],FK="keyword";function _P(e,t,r=FK){let n=Object.create(null);return typeof e=="string"?i(r,e.split(" ")):Array.isArray(e)?i(r,e):Object.keys(e).forEach(function(s){Object.assign(n,_P(e[s],t,s))}),n;function i(s,o){t&&(o=o.map(a=>a.toLowerCase())),o.forEach(function(a){let c=a.split("|");n[c[0]]=[s,_K(c[0],c[1])]})}}function _K(e,t){return t?Number(t):IK(e)?0:1}function IK(e){return PK.includes(e.toLowerCase())}var bP={},Io=e=>{console.error(e)},xP=(e,...t)=>{console.log(`WARN: ${e}`,...t)},Ga=(e,t)=>{bP[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),bP[`${e}/${t}`]=!0)},ef=new Error;function IP(e,t,{key:r}){let n=0,i=e[r],s={},o={};for(let a=1;a<=t.length;a++)o[a+n]=i[a],s[a+n]=!0,n+=SP(t[a-1]);e[r]=o,e[r]._emit=s,e[r]._multi=!0}function kK(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Io("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ef;if(typeof e.beginScope!="object"||e.beginScope===null)throw Io("beginScope must be object"),ef;IP(e,e.begin,{key:"beginScope"}),e.begin=ib(e.begin,{joinWith:""})}}function NK(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Io("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ef;if(typeof e.endScope!="object"||e.endScope===null)throw Io("endScope must be object"),ef;IP(e,e.end,{key:"endScope"}),e.end=ib(e.end,{joinWith:""})}}function RK(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function OK(e){RK(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),kK(e),NK(e)}function BK(e){function t(o,a){return new RegExp(qu(o),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(a?"g":""))}class r{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(a,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,a]),this.matchAt+=SP(a)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let a=this.regexes.map(c=>c[1]);this.matcherRe=t(ib(a,{joinWith:"|"}),!0),this.lastIndex=0}exec(a){this.matcherRe.lastIndex=this.lastIndex;let c=this.matcherRe.exec(a);if(!c)return null;let u=c.findIndex((p,d)=>d>0&&p!==void 0),l=this.matchIndexes[u];return c.splice(0,u),Object.assign(c,l)}}class n{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(a){if(this.multiRegexes[a])return this.multiRegexes[a];let c=new r;return this.rules.slice(a).forEach(([u,l])=>c.addRule(u,l)),c.compile(),this.multiRegexes[a]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(a,c){this.rules.push([a,c]),c.type==="begin"&&this.count++}exec(a){let c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let u=c.exec(a);if(this.resumingScanAtSamePosition()&&!(u&&u.index===this.lastIndex)){let l=this.getMatcher(0);l.lastIndex=this.lastIndex+1,u=l.exec(a)}return u&&(this.regexIndex+=u.position+1,this.regexIndex===this.count&&this.considerAll()),u}}function i(o){let a=new n;return o.contains.forEach(c=>a.addRule(c.begin,{rule:c,type:"begin"})),o.terminatorEnd&&a.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&a.addRule(o.illegal,{type:"illegal"}),a}function s(o,a){let c=o;if(o.isCompiled)return c;[CK,SK,OK,AK].forEach(l=>l(o,a)),e.compilerExtensions.forEach(l=>l(o,a)),o.__beforeBegin=null,[EK,wK,TK].forEach(l=>l(o,a)),o.isCompiled=!0;let u=null;return typeof o.keywords=="object"&&o.keywords.$pattern&&(o.keywords=Object.assign({},o.keywords),u=o.keywords.$pattern,delete o.keywords.$pattern),u=u||/\w+/,o.keywords&&(o.keywords=_P(o.keywords,e.case_insensitive)),c.keywordPatternRe=t(u,!0),a&&(o.begin||(o.begin=/\B|\b/),c.beginRe=t(c.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(c.endRe=t(c.end)),c.terminatorEnd=qu(c.end)||"",o.endsWithParent&&a.terminatorEnd&&(c.terminatorEnd+=(o.end?"|":"")+a.terminatorEnd)),o.illegal&&(c.illegalRe=t(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(l){return MK(l==="self"?o:l)})),o.contains.forEach(function(l){s(l,c)}),o.starts&&s(o.starts,a),c.matcher=i(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ms(e.classNameAliases||{}),s(e)}function kP(e){return e?e.endsWithParent||kP(e.starts):!1}function MK(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ms(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:kP(e)?Ms(e,{starts:e.starts?Ms(e.starts):null}):Object.isFrozen(e)?Ms(e):e}var LK="11.9.0",rb=class extends Error{constructor(t,r){super(t),this.name="HTMLInjectionError",this.html=r}},Qy=EP,vP=Ms,DP=Symbol("nomatch"),$K=7,NP=function(e){let t=Object.create(null),r=Object.create(null),n=[],i=!0,s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]},a={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:tb};function c(B){return a.noHighlightRe.test(B)}function u(B){let M=B.className+" ";M+=B.parentNode?B.parentNode.className:"";let X=a.languageDetectRe.exec(M);if(X){let L=F(X[1]);return L||(xP(s.replace("{}",X[1])),xP("Falling back to no-highlight mode for this block.",B)),L?X[1]:"no-highlight"}return M.split(/\s+/).find(L=>c(L)||F(L))}function l(B,M,X){let L="",$="";typeof M=="object"?(L=B,X=M.ignoreIllegals,$=M.language):(Ga("10.7.0","highlight(lang, code, ...args) has been deprecated."),Ga("10.7.0",`Please use highlight(code, options) instead.
|
|
15
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),$=B,L=M),X===void 0&&(X=!0);let H={code:L,language:$};I("before:highlight",H);let re=H.result?H.result:p(H.language,H.code,X);return re.code=H.code,I("after:highlight",re),re}function p(B,M,X,L){let $=Object.create(null);function H(te,fe){return te.keywords[fe]}function re(){if(!we.keywords){or.addText(gt);return}let te=0;we.keywordPatternRe.lastIndex=0;let fe=we.keywordPatternRe.exec(gt),_e="";for(;fe;){_e+=gt.substring(te,fe.index);let et=Fe.case_insensitive?fe[0].toLowerCase():fe[0],pr=H(we,et);if(pr){let[Xi,rj]=pr;if(or.addText(_e),_e="",$[et]=($[et]||0)+1,$[et]<=$K&&(ad+=rj),Xi.startsWith("_"))_e+=fe[0];else{let nj=Fe.classNameAliases[Xi]||Xi;O(fe[0],nj)}}else _e+=fe[0];te=we.keywordPatternRe.lastIndex,fe=we.keywordPatternRe.exec(gt)}_e+=gt.substring(te),or.addText(_e)}function ve(){if(gt==="")return;let te=null;if(typeof we.subLanguage=="string"){if(!t[we.subLanguage]){or.addText(gt);return}te=p(we.subLanguage,gt,!0,fS[we.subLanguage]),fS[we.subLanguage]=te._top}else te=h(gt,we.subLanguage.length?we.subLanguage:null);we.relevance>0&&(ad+=te.relevance),or.__addSublanguage(te._emitter,te.language)}function Q(){we.subLanguage!=null?ve():re(),gt=""}function O(te,fe){te!==""&&(or.startScope(fe),or.addText(te),or.endScope())}function ee(te,fe){let _e=1,et=fe.length-1;for(;_e<=et;){if(!te._emit[_e]){_e++;continue}let pr=Fe.classNameAliases[te[_e]]||te[_e],Xi=fe[_e];pr?O(Xi,pr):(gt=Xi,re(),gt=""),_e++}}function pe(te,fe){return te.scope&&typeof te.scope=="string"&&or.openNode(Fe.classNameAliases[te.scope]||te.scope),te.beginScope&&(te.beginScope._wrap?(O(gt,Fe.classNameAliases[te.beginScope._wrap]||te.beginScope._wrap),gt=""):te.beginScope._multi&&(ee(te.beginScope,fe),gt="")),we=Object.create(te,{parent:{value:we}}),we}function K(te,fe,_e){let et=rK(te.endRe,_e);if(et){if(te["on:end"]){let pr=new Zd(te);te["on:end"](fe,pr),pr.isMatchIgnored&&(et=!1)}if(et){for(;te.endsParent&&te.parent;)te=te.parent;return te}}if(te.endsWithParent)return K(te.parent,fe,_e)}function oe(te){return we.matcher.regexIndex===0?(gt+=te[0],1):(Ng=!0,0)}function z(te){let fe=te[0],_e=te.rule,et=new Zd(_e),pr=[_e.__beforeBegin,_e["on:begin"]];for(let Xi of pr)if(Xi&&(Xi(te,et),et.isMatchIgnored))return oe(fe);return _e.skip?gt+=fe:(_e.excludeBegin&&(gt+=fe),Q(),!_e.returnBegin&&!_e.excludeBegin&&(gt=fe)),pe(_e,te),_e.returnBegin?0:fe.length}function ne(te){let fe=te[0],_e=M.substring(te.index),et=K(we,te,_e);if(!et)return DP;let pr=we;we.endScope&&we.endScope._wrap?(Q(),O(fe,we.endScope._wrap)):we.endScope&&we.endScope._multi?(Q(),ee(we.endScope,te)):pr.skip?gt+=fe:(pr.returnEnd||pr.excludeEnd||(gt+=fe),Q(),pr.excludeEnd&&(gt=fe));do we.scope&&or.closeNode(),!we.skip&&!we.subLanguage&&(ad+=we.relevance),we=we.parent;while(we!==et.parent);return et.starts&&pe(et.starts,te),pr.returnEnd?0:fe.length}function ie(){let te=[];for(let fe=we;fe!==Fe;fe=fe.parent)fe.scope&&te.unshift(fe.scope);te.forEach(fe=>or.openNode(fe))}let ae={};function le(te,fe){let _e=fe&&fe[0];if(gt+=te,_e==null)return Q(),0;if(ae.type==="begin"&&fe.type==="end"&&ae.index===fe.index&&_e===""){if(gt+=M.slice(fe.index,fe.index+1),!i){let et=new Error(`0 width match regex (${B})`);throw et.languageName=B,et.badRule=ae.rule,et}return 1}if(ae=fe,fe.type==="begin")return z(fe);if(fe.type==="illegal"&&!X){let et=new Error('Illegal lexeme "'+_e+'" for mode "'+(we.scope||"<unnamed>")+'"');throw et.mode=we,et}else if(fe.type==="end"){let et=ne(fe);if(et!==DP)return et}if(fe.type==="illegal"&&_e==="")return 1;if(kg>1e5&&kg>fe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return gt+=_e,_e.length}let Fe=F(B);if(!Fe)throw Io(s.replace("{}",B)),new Error('Unknown language: "'+B+'"');let As=BK(Fe),Ig="",we=L||As,fS={},or=new a.__emitter(a);ie();let gt="",ad=0,bo=0,kg=0,Ng=!1;try{if(Fe.__emitTokens)Fe.__emitTokens(M,or);else{for(we.matcher.considerAll();;){kg++,Ng?Ng=!1:we.matcher.considerAll(),we.matcher.lastIndex=bo;let te=we.matcher.exec(M);if(!te)break;let fe=M.substring(bo,te.index),_e=le(fe,te);bo=te.index+_e}le(M.substring(bo))}return or.finalize(),Ig=or.toHTML(),{language:B,value:Ig,relevance:ad,illegal:!1,_emitter:or,_top:we}}catch(te){if(te.message&&te.message.includes("Illegal"))return{language:B,value:Qy(M),illegal:!0,relevance:0,_illegalBy:{message:te.message,index:bo,context:M.slice(bo-100,bo+100),mode:te.mode,resultSoFar:Ig},_emitter:or};if(i)return{language:B,value:Qy(M),illegal:!1,relevance:0,errorRaised:te,_emitter:or,_top:we};throw te}}function d(B){let M={value:Qy(B),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return M._emitter.addText(B),M}function h(B,M){M=M||a.languages||Object.keys(t);let X=d(B),L=M.filter(F).filter(P).map(Q=>p(Q,B,!1));L.unshift(X);let $=L.sort((Q,O)=>{if(Q.relevance!==O.relevance)return O.relevance-Q.relevance;if(Q.language&&O.language){if(F(Q.language).supersetOf===O.language)return 1;if(F(O.language).supersetOf===Q.language)return-1}return 0}),[H,re]=$,ve=H;return ve.secondBest=re,ve}function m(B,M,X){let L=M&&r[M]||X;B.classList.add("hljs"),B.classList.add(`language-${L}`)}function g(B){let M=null,X=u(B);if(c(X))return;if(I("before:highlightElement",{el:B,language:X}),B.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",B);return}if(B.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(B)),a.throwUnescapedHTML))throw new rb("One of your code blocks includes unescaped HTML.",B.innerHTML);M=B;let L=M.textContent,$=X?l(L,{language:X,ignoreIllegals:!0}):h(L);B.innerHTML=$.value,B.dataset.highlighted="yes",m(B,X,$.language),B.result={language:$.language,re:$.relevance,relevance:$.relevance},$.secondBest&&(B.secondBest={language:$.secondBest.language,relevance:$.secondBest.relevance}),I("after:highlightElement",{el:B,result:$,text:L})}function y(B){a=vP(a,B)}let b=()=>{x(),Ga("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){x(),Ga("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let C=!1;function x(){if(document.readyState==="loading"){C=!0;return}document.querySelectorAll(a.cssSelector).forEach(g)}function D(){C&&x()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",D,!1);function E(B,M){let X=null;try{X=M(e)}catch(L){if(Io("Language definition for '{}' could not be registered.".replace("{}",B)),i)Io(L);else throw L;X=o}X.name||(X.name=B),t[B]=X,X.rawDefinition=M.bind(null,e),X.aliases&&A(X.aliases,{languageName:B})}function S(B){delete t[B];for(let M of Object.keys(r))r[M]===B&&delete r[M]}function T(){return Object.keys(t)}function F(B){return B=(B||"").toLowerCase(),t[B]||t[r[B]]}function A(B,{languageName:M}){typeof B=="string"&&(B=[B]),B.forEach(X=>{r[X.toLowerCase()]=M})}function P(B){let M=F(B);return M&&!M.disableAutodetect}function j(B){B["before:highlightBlock"]&&!B["before:highlightElement"]&&(B["before:highlightElement"]=M=>{B["before:highlightBlock"](Object.assign({block:M.el},M))}),B["after:highlightBlock"]&&!B["after:highlightElement"]&&(B["after:highlightElement"]=M=>{B["after:highlightBlock"](Object.assign({block:M.el},M))})}function Y(B){j(B),n.push(B)}function J(B){let M=n.indexOf(B);M!==-1&&n.splice(M,1)}function I(B,M){let X=B;n.forEach(function(L){L[X]&&L[X](M)})}function k(B){return Ga("10.7.0","highlightBlock will be removed entirely in v12.0"),Ga("10.7.0","Please use highlightElement now."),g(B)}Object.assign(e,{highlight:l,highlightAuto:h,highlightAll:x,highlightElement:g,highlightBlock:k,configure:y,initHighlighting:b,initHighlightingOnLoad:v,registerLanguage:E,unregisterLanguage:S,listLanguages:T,getLanguage:F,registerAliases:A,autoDetection:P,inherit:vP,addPlugin:Y,removePlugin:J}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=LK,e.regex={concat:ko,lookahead:wP,either:nb,optional:eK,anyNumberOfTimes:ZH};for(let B in Qd)typeof Qd[B]=="object"&&CP(Qd[B]);return Object.assign(e,Qd),e},za=NP({});za.newInstance=()=>NP({});RP.exports=za;za.HighlightJS=za;za.default=za});var rF=w(fb=>{f();var tF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");fb.encode=function(e){if(0<=e&&e<tF.length)return tF[e];throw new TypeError("Must be between 0 and 63: "+e)};fb.decode=function(e){var t=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+u:s<=e&&e<=o?e-s+l:e==a?62:e==c?63:-1}});var gb=w(hb=>{f();var nF=rF(),mb=5,iF=1<<mb,sF=iF-1,oF=iF;function tV(e){return e<0?(-e<<1)+1:(e<<1)+0}function rV(e){var t=(e&1)===1,r=e>>1;return t?-r:r}hb.encode=function(t){var r="",n,i=tV(t);do n=i&sF,i>>>=mb,i>0&&(n|=oF),r+=nF.encode(n);while(i>0);return r};hb.decode=function(t,r,n){var i=t.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=nF.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&oF),c&=sF,s=s+(c<<o),o+=mb}while(a);n.value=rV(s),n.rest=r}});var Wa=w(Jt=>{f();function nV(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Jt.getArg=nV;var aF=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,iV=/^data:.+\,.+$/;function Vu(e){var t=e.match(aF);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Jt.urlParse=Vu;function Va(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Jt.urlGenerate=Va;var sV=32;function oV(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var i=t[0];return t[0]=t[n],t[n]=i,t[0].result}var s=e(r);return t.unshift({input:r,result:s}),t.length>sV&&t.pop(),s}}var yb=oV(function(t){var r=t,n=Vu(t);if(n){if(!n.path)return t;r=n.path}for(var i=Jt.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Va(n)):r});Jt.normalize=yb;function cF(e,t){e===""&&(e="."),t===""&&(t=".");var r=Vu(t),n=Vu(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Va(r);if(r||t.match(iV))return t;if(n&&!n.host&&!n.path)return n.host=t,Va(n);var i=t.charAt(0)==="/"?t:yb(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,Va(n)):i}Jt.join=cF;Jt.isAbsolute=function(e){return e.charAt(0)==="/"||aF.test(e)};function aV(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Jt.relative=aV;var uF=function(){var e=Object.create(null);return!("__proto__"in e)}();function lF(e){return e}function cV(e){return pF(e)?"$"+e:e}Jt.toSetString=uF?lF:cV;function uV(e){return pF(e)?e.slice(1):e}Jt.fromSetString=uF?lF:uV;function pF(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function lV(e,t,r){var n=ss(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:ss(e.name,t.name)}Jt.compareByOriginalPositions=lV;function pV(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:ss(e.name,t.name)}Jt.compareByOriginalPositionsNoSource=pV;function dV(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=ss(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:ss(e.name,t.name)}Jt.compareByGeneratedPositionsDeflated=dV;function fV(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=ss(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:ss(e.name,t.name)}Jt.compareByGeneratedPositionsDeflatedNoLine=fV;function ss(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function mV(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=ss(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:ss(e.name,t.name)}Jt.compareByGeneratedPositionsInflated=mV;function hV(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Jt.parseSourceMapInput=hV;function gV(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Vu(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=cF(Va(n),t)}return yb(t)}Jt.computeSourceURL=gV});var vb=w(dF=>{f();var bb=Wa(),xb=Object.prototype.hasOwnProperty,No=typeof Map<"u";function os(){this._array=[],this._set=No?new Map:Object.create(null)}os.fromArray=function(t,r){for(var n=new os,i=0,s=t.length;i<s;i++)n.add(t[i],r);return n};os.prototype.size=function(){return No?this._set.size:Object.getOwnPropertyNames(this._set).length};os.prototype.add=function(t,r){var n=No?t:bb.toSetString(t),i=No?this.has(t):xb.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(t),i||(No?this._set.set(t,s):this._set[n]=s)};os.prototype.has=function(t){if(No)return this._set.has(t);var r=bb.toSetString(t);return xb.call(this._set,r)};os.prototype.indexOf=function(t){if(No){var r=this._set.get(t);if(r>=0)return r}else{var n=bb.toSetString(t);if(xb.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};os.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};os.prototype.toArray=function(){return this._array.slice()};dF.ArraySet=os});var hF=w(mF=>{f();var fF=Wa();function yV(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return n>r||n==r&&s>=i||fF.compareByGeneratedPositionsInflated(e,t)<=0}function af(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}af.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};af.prototype.add=function(t){yV(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};af.prototype.toArray=function(){return this._sorted||(this._array.sort(fF.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};mF.MappingList=af});var Db=w(gF=>{f();var Wu=gb(),Bt=Wa(),cf=vb().ArraySet,bV=hF().MappingList;function Sn(e){e||(e={}),this._file=Bt.getArg(e,"file",null),this._sourceRoot=Bt.getArg(e,"sourceRoot",null),this._skipValidation=Bt.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=Bt.getArg(e,"ignoreInvalidMapping",!1),this._sources=new cf,this._names=new cf,this._mappings=new bV,this._sourcesContents=null}Sn.prototype._version=3;Sn.fromSourceMap=function(t,r){var n=t.sourceRoot,i=new Sn(Object.assign(r||{},{file:t.file,sourceRoot:n}));return t.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=Bt.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),t.sources.forEach(function(s){var o=s;n!==null&&(o=Bt.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=t.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};Sn.prototype.addMapping=function(t){var r=Bt.getArg(t,"generated"),n=Bt.getArg(t,"original",null),i=Bt.getArg(t,"source",null),s=Bt.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Sn.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Bt.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Bt.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Bt.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Sn.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var s=this._sourceRoot;s!=null&&(i=Bt.relative(s,i));var o=new cf,a=new cf;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Bt.join(n,c.source)),s!=null&&(c.source=Bt.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=Bt.join(n,c)),s!=null&&(c=Bt.relative(s,c)),this.setSourceContent(c,u))},this)};Sn.prototype._validateMapping=function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Sn.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),h=0,m=d.length;h<m;h++){if(u=d[h],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!Bt.compareByGeneratedPositionsInflated(u,d[h-1]))continue;c+=","}c+=Wu.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=Wu.encode(p-o),o=p,c+=Wu.encode(u.originalLine-1-i),i=u.originalLine-1,c+=Wu.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=Wu.encode(l-s),s=l)),a+=c}return a};Sn.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Bt.relative(r,n));var i=Bt.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Sn.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Sn.prototype.toString=function(){return JSON.stringify(this.toJSON())};gF.SourceMapGenerator=Sn});var yF=w(Ro=>{f();Ro.GREATEST_LOWER_BOUND=1;Ro.LEAST_UPPER_BOUND=2;function Cb(e,t,r,n,i,s){var o=Math.floor((t-e)/2)+e,a=i(r,n[o],!0);return a===0?o:a>0?t-o>1?Cb(o,t,r,n,i,s):s==Ro.LEAST_UPPER_BOUND?t<n.length?t:-1:o:o-e>1?Cb(e,o,r,n,i,s):s==Ro.LEAST_UPPER_BOUND?o:e<0?-1:e}Ro.search=function(t,r,n,i){if(r.length===0)return-1;var s=Cb(-1,r.length,t,r,n,i||Ro.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var vF=w(xF=>{f();function xV(e){function t(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;t(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,t(i,u,p));t(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function vV(e){let t=xV.toString();return new Function(`return ${t}`)()(e)}var bF=new WeakMap;xF.quickSort=function(e,t,r=0){let n=bF.get(t);n===void 0&&(n=vV(t),bF.set(t,n)),n(e,t,r,e.length-1)}});var EF=w(uf=>{f();var ue=Wa(),wb=yF(),Ya=vb().ArraySet,DV=gb(),Yu=vF().quickSort;function xt(e,t){var r=e;return typeof e=="string"&&(r=ue.parseSourceMapInput(e)),r.sections!=null?new Xn(r,t):new cr(r,t)}xt.fromSourceMap=function(e,t){return cr.fromSourceMap(e,t)};xt.prototype._version=3;xt.prototype.__generatedMappings=null;Object.defineProperty(xt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});xt.prototype.__originalMappings=null;Object.defineProperty(xt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});xt.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};xt.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};xt.GENERATED_ORDER=1;xt.ORIGINAL_ORDER=2;xt.GREATEST_LOWER_BOUND=1;xt.LEAST_UPPER_BOUND=2;xt.prototype.eachMapping=function(t,r,n){var i=r||null,s=n||xt.GENERATED_ORDER,o;switch(s){case xt.GENERATED_ORDER:o=this._generatedMappings;break;case xt.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=t.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,h=o.length;d<h;d++){var m=o[d],g=m.source===null?null:l.at(m.source);g!==null&&(g=ue.computeSourceURL(a,g,p)),c({source:g,generatedLine:m.generatedLine,generatedColumn:m.generatedColumn,originalLine:m.originalLine,originalColumn:m.originalColumn,name:m.name===null?null:u.at(m.name)})}};xt.prototype.allGeneratedPositionsFor=function(t){var r=ue.getArg(t,"line"),n={source:ue.getArg(t,"source"),originalLine:r,originalColumn:ue.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ue.compareByOriginalPositions,wb.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(t.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:ue.getArg(o,"generatedLine",null),column:ue.getArg(o,"generatedColumn",null),lastColumn:ue.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:ue.getArg(o,"generatedLine",null),column:ue.getArg(o,"generatedColumn",null),lastColumn:ue.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};uf.SourceMapConsumer=xt;function cr(e,t){var r=e;typeof e=="string"&&(r=ue.parseSourceMapInput(e));var n=ue.getArg(r,"version"),i=ue.getArg(r,"sources"),s=ue.getArg(r,"names",[]),o=ue.getArg(r,"sourceRoot",null),a=ue.getArg(r,"sourcesContent",null),c=ue.getArg(r,"mappings"),u=ue.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=ue.normalize(o)),i=i.map(String).map(ue.normalize).map(function(l){return o&&ue.isAbsolute(o)&&ue.isAbsolute(l)?ue.relative(o,l):l}),this._names=Ya.fromArray(s.map(String),!0),this._sources=Ya.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return ue.computeSourceURL(o,l,t)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}cr.prototype=Object.create(xt.prototype);cr.prototype.consumer=xt;cr.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=ue.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};cr.fromSourceMap=function(t,r){var n=Object.create(cr.prototype),i=n._names=Ya.fromArray(t._names.toArray(),!0),s=n._sources=Ya.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return ue.computeSourceURL(n.sourceRoot,h,r)});for(var o=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new CF;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return Yu(n.__originalMappings,ue.compareByOriginalPositions),n};cr.prototype._version=3;Object.defineProperty(cr.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function CF(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Eb=ue.compareByGeneratedPositionsDeflatedNoLine;function DF(e,t){let r=e.length,n=e.length-t;if(!(n<=1))if(n==2){let i=e[t],s=e[t+1];Eb(i,s)>0&&(e[t]=s,e[t+1]=i)}else if(n<20)for(let i=t;i<r;i++)for(let s=i;s>t;s--){let o=e[s-1],a=e[s];if(Eb(o,a)<=0)break;e[s-1]=a,e[s]=o}else Yu(e,Eb,t)}cr.prototype._parseMappings=function(t,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=t.length,l=0,p={},d={},h=[],m=[],g,y,b,v,C;let x=0;for(;l<u;)if(t.charAt(l)===";")n++,l++,i=0,DF(m,x),x=m.length;else if(t.charAt(l)===",")l++;else{for(g=new CF,g.generatedLine=n,v=l;v<u&&!this._charIsMappingSeparator(t,v);v++);for(y=t.slice(l,v),b=[];l<v;)DV.decode(t,l,d),C=d.value,l=d.rest,b.push(C);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=s+b[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+b[3],o=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),m.push(g),typeof g.originalLine=="number"){let E=g.source;for(;h.length<=E;)h.push(null);h[E]===null&&(h[E]=[]),h[E].push(g)}}DF(m,x),this.__generatedMappings=m;for(var D=0;D<h.length;D++)h[D]!=null&&Yu(h[D],ue.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...h)};cr.prototype._findMapping=function(t,r,n,i,s,o){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return wb.search(t,r,s,o)};cr.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};cr.prototype.originalPositionFor=function(t){var r={generatedLine:ue.getArg(t,"line"),generatedColumn:ue.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",ue.compareByGeneratedPositionsDeflated,ue.getArg(t,"bias",xt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=ue.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=ue.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=ue.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:ue.getArg(i,"originalLine",null),column:ue.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};cr.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};cr.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=ue.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=ue.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};cr.prototype.generatedPositionFor=function(t){var r=ue.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:ue.getArg(t,"line"),originalColumn:ue.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ue.compareByOriginalPositions,ue.getArg(t,"bias",xt.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:ue.getArg(s,"generatedLine",null),column:ue.getArg(s,"generatedColumn",null),lastColumn:ue.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};uf.BasicSourceMapConsumer=cr;function Xn(e,t){var r=e;typeof e=="string"&&(r=ue.parseSourceMapInput(e));var n=ue.getArg(r,"version"),i=ue.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Ya,this._names=new Ya;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=ue.getArg(o,"offset"),c=ue.getArg(a,"line"),u=ue.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new xt(ue.getArg(o,"map"),t)}})}Xn.prototype=Object.create(xt.prototype);Xn.prototype.constructor=xt;Xn.prototype._version=3;Object.defineProperty(Xn.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});Xn.prototype.originalPositionFor=function(t){var r={generatedLine:ue.getArg(t,"line"),generatedColumn:ue.getArg(t,"column")},n=wb.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};Xn.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};Xn.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(t,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};Xn.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(ue.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Xn.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=ue.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}Yu(this.__generatedMappings,ue.compareByGeneratedPositionsDeflated),Yu(this.__originalMappings,ue.compareByOriginalPositions)};uf.IndexedSourceMapConsumer=Xn});var SF=w(wF=>{f();var CV=Db().SourceMapGenerator,lf=Wa(),EV=/(\r?\n)/,wV=10,Ja="$$$isSourceNode$$$";function cn(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[Ja]=!0,n!=null&&this.add(n)}cn.fromStringWithSourceMap=function(t,r,n){var i=new cn,s=t.split(EV),o=0,a=function(){var d=m(),h=m()||"";return d+h;function m(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var h=s[o]||"",m=h.substr(0,d.generatedColumn-u);s[o]=h.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,m),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var h=s[o]||"";i.add(h.substr(0,d.generatedColumn)),s[o]=h.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var h=r.sourceContentFor(d);h!=null&&(n!=null&&(d=lf.join(n,d)),i.setSourceContent(d,h))}),i;function p(d,h){if(d===null||d.source===void 0)i.add(h);else{var m=n?lf.join(n,d.source):d.source;i.add(new cn(d.originalLine,d.originalColumn,m,h,d.name))}}};cn.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Ja]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};cn.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Ja]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};cn.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Ja]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};cn.prototype.join=function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};cn.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Ja]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};cn.prototype.setSourceContent=function(t,r){this.sourceContents[lf.toSetString(t)]=r};cn.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Ja]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(lf.fromSetString(i[r]),this.sourceContents[i[r]])};cn.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};cn.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new CV(t),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===wV?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};wF.SourceNode=cn});var TF=w(pf=>{f();pf.SourceMapGenerator=Db().SourceMapGenerator;pf.SourceMapConsumer=EF().SourceMapConsumer;pf.SourceNode=SF().SourceNode});var n_=w(sl=>{"use strict";f();Object.defineProperty(sl,"__esModule",{value:!0});function SV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}var Pi=class{constructor(t,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=r,this.index=n}},tc=class{constructor(t,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=r}};function Pr(e,t){let{line:r,column:n,index:i}=e;return new Pi(r,n+t,i+t)}var AF="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",TV={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:AF},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:AF}},PF={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},mf=e=>e.type==="UpdateExpression"?PF.UpdateExpression[`${e.prefix}`]:PF[e.type],AV={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:e})=>`'import.${e}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
15
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),$=B,L=M),X===void 0&&(X=!0);let H={code:L,language:$};I("before:highlight",H);let re=H.result?H.result:p(H.language,H.code,X);return re.code=H.code,I("after:highlight",re),re}function p(B,M,X,L){let $=Object.create(null);function H(te,fe){return te.keywords[fe]}function re(){if(!we.keywords){or.addText(gt);return}let te=0;we.keywordPatternRe.lastIndex=0;let fe=we.keywordPatternRe.exec(gt),_e="";for(;fe;){_e+=gt.substring(te,fe.index);let et=Fe.case_insensitive?fe[0].toLowerCase():fe[0],pr=H(we,et);if(pr){let[Xi,rj]=pr;if(or.addText(_e),_e="",$[et]=($[et]||0)+1,$[et]<=$K&&(ad+=rj),Xi.startsWith("_"))_e+=fe[0];else{let nj=Fe.classNameAliases[Xi]||Xi;O(fe[0],nj)}}else _e+=fe[0];te=we.keywordPatternRe.lastIndex,fe=we.keywordPatternRe.exec(gt)}_e+=gt.substring(te),or.addText(_e)}function ve(){if(gt==="")return;let te=null;if(typeof we.subLanguage=="string"){if(!t[we.subLanguage]){or.addText(gt);return}te=p(we.subLanguage,gt,!0,fS[we.subLanguage]),fS[we.subLanguage]=te._top}else te=h(gt,we.subLanguage.length?we.subLanguage:null);we.relevance>0&&(ad+=te.relevance),or.__addSublanguage(te._emitter,te.language)}function Q(){we.subLanguage!=null?ve():re(),gt=""}function O(te,fe){te!==""&&(or.startScope(fe),or.addText(te),or.endScope())}function ee(te,fe){let _e=1,et=fe.length-1;for(;_e<=et;){if(!te._emit[_e]){_e++;continue}let pr=Fe.classNameAliases[te[_e]]||te[_e],Xi=fe[_e];pr?O(Xi,pr):(gt=Xi,re(),gt=""),_e++}}function pe(te,fe){return te.scope&&typeof te.scope=="string"&&or.openNode(Fe.classNameAliases[te.scope]||te.scope),te.beginScope&&(te.beginScope._wrap?(O(gt,Fe.classNameAliases[te.beginScope._wrap]||te.beginScope._wrap),gt=""):te.beginScope._multi&&(ee(te.beginScope,fe),gt="")),we=Object.create(te,{parent:{value:we}}),we}function K(te,fe,_e){let et=rK(te.endRe,_e);if(et){if(te["on:end"]){let pr=new Zd(te);te["on:end"](fe,pr),pr.isMatchIgnored&&(et=!1)}if(et){for(;te.endsParent&&te.parent;)te=te.parent;return te}}if(te.endsWithParent)return K(te.parent,fe,_e)}function oe(te){return we.matcher.regexIndex===0?(gt+=te[0],1):(Ng=!0,0)}function z(te){let fe=te[0],_e=te.rule,et=new Zd(_e),pr=[_e.__beforeBegin,_e["on:begin"]];for(let Xi of pr)if(Xi&&(Xi(te,et),et.isMatchIgnored))return oe(fe);return _e.skip?gt+=fe:(_e.excludeBegin&&(gt+=fe),Q(),!_e.returnBegin&&!_e.excludeBegin&&(gt=fe)),pe(_e,te),_e.returnBegin?0:fe.length}function ne(te){let fe=te[0],_e=M.substring(te.index),et=K(we,te,_e);if(!et)return DP;let pr=we;we.endScope&&we.endScope._wrap?(Q(),O(fe,we.endScope._wrap)):we.endScope&&we.endScope._multi?(Q(),ee(we.endScope,te)):pr.skip?gt+=fe:(pr.returnEnd||pr.excludeEnd||(gt+=fe),Q(),pr.excludeEnd&&(gt=fe));do we.scope&&or.closeNode(),!we.skip&&!we.subLanguage&&(ad+=we.relevance),we=we.parent;while(we!==et.parent);return et.starts&&pe(et.starts,te),pr.returnEnd?0:fe.length}function ie(){let te=[];for(let fe=we;fe!==Fe;fe=fe.parent)fe.scope&&te.unshift(fe.scope);te.forEach(fe=>or.openNode(fe))}let ae={};function le(te,fe){let _e=fe&&fe[0];if(gt+=te,_e==null)return Q(),0;if(ae.type==="begin"&&fe.type==="end"&&ae.index===fe.index&&_e===""){if(gt+=M.slice(fe.index,fe.index+1),!i){let et=new Error(`0 width match regex (${B})`);throw et.languageName=B,et.badRule=ae.rule,et}return 1}if(ae=fe,fe.type==="begin")return z(fe);if(fe.type==="illegal"&&!X){let et=new Error('Illegal lexeme "'+_e+'" for mode "'+(we.scope||"<unnamed>")+'"');throw et.mode=we,et}else if(fe.type==="end"){let et=ne(fe);if(et!==DP)return et}if(fe.type==="illegal"&&_e==="")return 1;if(kg>1e5&&kg>fe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return gt+=_e,_e.length}let Fe=F(B);if(!Fe)throw Io(s.replace("{}",B)),new Error('Unknown language: "'+B+'"');let As=BK(Fe),Ig="",we=L||As,fS={},or=new a.__emitter(a);ie();let gt="",ad=0,bo=0,kg=0,Ng=!1;try{if(Fe.__emitTokens)Fe.__emitTokens(M,or);else{for(we.matcher.considerAll();;){kg++,Ng?Ng=!1:we.matcher.considerAll(),we.matcher.lastIndex=bo;let te=we.matcher.exec(M);if(!te)break;let fe=M.substring(bo,te.index),_e=le(fe,te);bo=te.index+_e}le(M.substring(bo))}return or.finalize(),Ig=or.toHTML(),{language:B,value:Ig,relevance:ad,illegal:!1,_emitter:or,_top:we}}catch(te){if(te.message&&te.message.includes("Illegal"))return{language:B,value:Qy(M),illegal:!0,relevance:0,_illegalBy:{message:te.message,index:bo,context:M.slice(bo-100,bo+100),mode:te.mode,resultSoFar:Ig},_emitter:or};if(i)return{language:B,value:Qy(M),illegal:!1,relevance:0,errorRaised:te,_emitter:or,_top:we};throw te}}function d(B){let M={value:Qy(B),illegal:!1,relevance:0,_top:o,_emitter:new a.__emitter(a)};return M._emitter.addText(B),M}function h(B,M){M=M||a.languages||Object.keys(t);let X=d(B),L=M.filter(F).filter(P).map(Q=>p(Q,B,!1));L.unshift(X);let $=L.sort((Q,O)=>{if(Q.relevance!==O.relevance)return O.relevance-Q.relevance;if(Q.language&&O.language){if(F(Q.language).supersetOf===O.language)return 1;if(F(O.language).supersetOf===Q.language)return-1}return 0}),[H,re]=$,ve=H;return ve.secondBest=re,ve}function m(B,M,X){let L=M&&r[M]||X;B.classList.add("hljs"),B.classList.add(`language-${L}`)}function g(B){let M=null,X=u(B);if(c(X))return;if(I("before:highlightElement",{el:B,language:X}),B.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",B);return}if(B.children.length>0&&(a.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(B)),a.throwUnescapedHTML))throw new rb("One of your code blocks includes unescaped HTML.",B.innerHTML);M=B;let L=M.textContent,$=X?l(L,{language:X,ignoreIllegals:!0}):h(L);B.innerHTML=$.value,B.dataset.highlighted="yes",m(B,X,$.language),B.result={language:$.language,re:$.relevance,relevance:$.relevance},$.secondBest&&(B.secondBest={language:$.secondBest.language,relevance:$.secondBest.relevance}),I("after:highlightElement",{el:B,result:$,text:L})}function y(B){a=vP(a,B)}let b=()=>{x(),Ga("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function v(){x(),Ga("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let C=!1;function x(){if(document.readyState==="loading"){C=!0;return}document.querySelectorAll(a.cssSelector).forEach(g)}function D(){C&&x()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",D,!1);function E(B,M){let X=null;try{X=M(e)}catch(L){if(Io("Language definition for '{}' could not be registered.".replace("{}",B)),i)Io(L);else throw L;X=o}X.name||(X.name=B),t[B]=X,X.rawDefinition=M.bind(null,e),X.aliases&&A(X.aliases,{languageName:B})}function S(B){delete t[B];for(let M of Object.keys(r))r[M]===B&&delete r[M]}function T(){return Object.keys(t)}function F(B){return B=(B||"").toLowerCase(),t[B]||t[r[B]]}function A(B,{languageName:M}){typeof B=="string"&&(B=[B]),B.forEach(X=>{r[X.toLowerCase()]=M})}function P(B){let M=F(B);return M&&!M.disableAutodetect}function j(B){B["before:highlightBlock"]&&!B["before:highlightElement"]&&(B["before:highlightElement"]=M=>{B["before:highlightBlock"](Object.assign({block:M.el},M))}),B["after:highlightBlock"]&&!B["after:highlightElement"]&&(B["after:highlightElement"]=M=>{B["after:highlightBlock"](Object.assign({block:M.el},M))})}function Y(B){j(B),n.push(B)}function J(B){let M=n.indexOf(B);M!==-1&&n.splice(M,1)}function I(B,M){let X=B;n.forEach(function(L){L[X]&&L[X](M)})}function k(B){return Ga("10.7.0","highlightBlock will be removed entirely in v12.0"),Ga("10.7.0","Please use highlightElement now."),g(B)}Object.assign(e,{highlight:l,highlightAuto:h,highlightAll:x,highlightElement:g,highlightBlock:k,configure:y,initHighlighting:b,initHighlightingOnLoad:v,registerLanguage:E,unregisterLanguage:S,listLanguages:T,getLanguage:F,registerAliases:A,autoDetection:P,inherit:vP,addPlugin:Y,removePlugin:J}),e.debugMode=function(){i=!1},e.safeMode=function(){i=!0},e.versionString=LK,e.regex={concat:ko,lookahead:wP,either:nb,optional:eK,anyNumberOfTimes:ZH};for(let B in Qd)typeof Qd[B]=="object"&&CP(Qd[B]);return Object.assign(e,Qd),e},za=NP({});za.newInstance=()=>NP({});RP.exports=za;za.HighlightJS=za;za.default=za});var rF=w(fb=>{f();var tF="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");fb.encode=function(e){if(0<=e&&e<tF.length)return tF[e];throw new TypeError("Must be between 0 and 63: "+e)};fb.decode=function(e){var t=65,r=90,n=97,i=122,s=48,o=57,a=43,c=47,u=26,l=52;return t<=e&&e<=r?e-t:n<=e&&e<=i?e-n+u:s<=e&&e<=o?e-s+l:e==a?62:e==c?63:-1}});var gb=w(hb=>{f();var nF=rF(),mb=5,iF=1<<mb,sF=iF-1,oF=iF;function tV(e){return e<0?(-e<<1)+1:(e<<1)+0}function rV(e){var t=(e&1)===1,r=e>>1;return t?-r:r}hb.encode=function(t){var r="",n,i=tV(t);do n=i&sF,i>>>=mb,i>0&&(n|=oF),r+=nF.encode(n);while(i>0);return r};hb.decode=function(t,r,n){var i=t.length,s=0,o=0,a,c;do{if(r>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(c=nF.decode(t.charCodeAt(r++)),c===-1)throw new Error("Invalid base64 digit: "+t.charAt(r-1));a=!!(c&oF),c&=sF,s=s+(c<<o),o+=mb}while(a);n.value=rV(s),n.rest=r}});var Wa=w(Jt=>{f();function nV(e,t,r){if(t in e)return e[t];if(arguments.length===3)return r;throw new Error('"'+t+'" is a required argument.')}Jt.getArg=nV;var aF=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,iV=/^data:.+\,.+$/;function Vu(e){var t=e.match(aF);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}Jt.urlParse=Vu;function Va(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}Jt.urlGenerate=Va;var sV=32;function oV(e){var t=[];return function(r){for(var n=0;n<t.length;n++)if(t[n].input===r){var i=t[0];return t[0]=t[n],t[n]=i,t[0].result}var s=e(r);return t.unshift({input:r,result:s}),t.length>sV&&t.pop(),s}}var yb=oV(function(t){var r=t,n=Vu(t);if(n){if(!n.path)return t;r=n.path}for(var i=Jt.isAbsolute(r),s=[],o=0,a=0;;)if(o=a,a=r.indexOf("/",o),a===-1){s.push(r.slice(o));break}else for(s.push(r.slice(o,a));a<r.length&&r[a]==="/";)a++;for(var c,u=0,a=s.length-1;a>=0;a--)c=s[a],c==="."?s.splice(a,1):c===".."?u++:u>0&&(c===""?(s.splice(a+1,u),u=0):(s.splice(a,2),u--));return r=s.join("/"),r===""&&(r=i?"/":"."),n?(n.path=r,Va(n)):r});Jt.normalize=yb;function cF(e,t){e===""&&(e="."),t===""&&(t=".");var r=Vu(t),n=Vu(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),Va(r);if(r||t.match(iV))return t;if(n&&!n.host&&!n.path)return n.host=t,Va(n);var i=t.charAt(0)==="/"?t:yb(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=i,Va(n)):i}Jt.join=cF;Jt.isAbsolute=function(e){return e.charAt(0)==="/"||aF.test(e)};function aV(e,t){e===""&&(e="."),e=e.replace(/\/$/,"");for(var r=0;t.indexOf(e+"/")!==0;){var n=e.lastIndexOf("/");if(n<0||(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/)))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}Jt.relative=aV;var uF=function(){var e=Object.create(null);return!("__proto__"in e)}();function lF(e){return e}function cV(e){return pF(e)?"$"+e:e}Jt.toSetString=uF?lF:cV;function uV(e){return pF(e)?e.slice(1):e}Jt.fromSetString=uF?lF:uV;function pF(e){if(!e)return!1;var t=e.length;if(t<9||e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95)return!1;for(var r=t-10;r>=0;r--)if(e.charCodeAt(r)!==36)return!1;return!0}function lV(e,t,r){var n=ss(e.source,t.source);return n!==0||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:ss(e.name,t.name)}Jt.compareByOriginalPositions=lV;function pV(e,t,r){var n;return n=e.originalLine-t.originalLine,n!==0||(n=e.originalColumn-t.originalColumn,n!==0||r)||(n=e.generatedColumn-t.generatedColumn,n!==0)||(n=e.generatedLine-t.generatedLine,n!==0)?n:ss(e.name,t.name)}Jt.compareByOriginalPositionsNoSource=pV;function dV(e,t,r){var n=e.generatedLine-t.generatedLine;return n!==0||(n=e.generatedColumn-t.generatedColumn,n!==0||r)||(n=ss(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:ss(e.name,t.name)}Jt.compareByGeneratedPositionsDeflated=dV;function fV(e,t,r){var n=e.generatedColumn-t.generatedColumn;return n!==0||r||(n=ss(e.source,t.source),n!==0)||(n=e.originalLine-t.originalLine,n!==0)||(n=e.originalColumn-t.originalColumn,n!==0)?n:ss(e.name,t.name)}Jt.compareByGeneratedPositionsDeflatedNoLine=fV;function ss(e,t){return e===t?0:e===null?1:t===null?-1:e>t?1:-1}function mV(e,t){var r=e.generatedLine-t.generatedLine;return r!==0||(r=e.generatedColumn-t.generatedColumn,r!==0)||(r=ss(e.source,t.source),r!==0)||(r=e.originalLine-t.originalLine,r!==0)||(r=e.originalColumn-t.originalColumn,r!==0)?r:ss(e.name,t.name)}Jt.compareByGeneratedPositionsInflated=mV;function hV(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}Jt.parseSourceMapInput=hV;function gV(e,t,r){if(t=t||"",e&&(e[e.length-1]!=="/"&&t[0]!=="/"&&(e+="/"),t=e+t),r){var n=Vu(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}t=cF(Va(n),t)}return yb(t)}Jt.computeSourceURL=gV});var vb=w(dF=>{f();var bb=Wa(),xb=Object.prototype.hasOwnProperty,No=typeof Map<"u";function os(){this._array=[],this._set=No?new Map:Object.create(null)}os.fromArray=function(t,r){for(var n=new os,i=0,s=t.length;i<s;i++)n.add(t[i],r);return n};os.prototype.size=function(){return No?this._set.size:Object.getOwnPropertyNames(this._set).length};os.prototype.add=function(t,r){var n=No?t:bb.toSetString(t),i=No?this.has(t):xb.call(this._set,n),s=this._array.length;(!i||r)&&this._array.push(t),i||(No?this._set.set(t,s):this._set[n]=s)};os.prototype.has=function(t){if(No)return this._set.has(t);var r=bb.toSetString(t);return xb.call(this._set,r)};os.prototype.indexOf=function(t){if(No){var r=this._set.get(t);if(r>=0)return r}else{var n=bb.toSetString(t);if(xb.call(this._set,n))return this._set[n]}throw new Error('"'+t+'" is not in the set.')};os.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)};os.prototype.toArray=function(){return this._array.slice()};dF.ArraySet=os});var hF=w(mF=>{f();var fF=Wa();function yV(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,s=t.generatedColumn;return n>r||n==r&&s>=i||fF.compareByGeneratedPositionsInflated(e,t)<=0}function af(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}af.prototype.unsortedForEach=function(t,r){this._array.forEach(t,r)};af.prototype.add=function(t){yV(this._last,t)?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))};af.prototype.toArray=function(){return this._sorted||(this._array.sort(fF.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};mF.MappingList=af});var Db=w(gF=>{f();var Wu=gb(),Bt=Wa(),cf=vb().ArraySet,bV=hF().MappingList;function Sn(e){e||(e={}),this._file=Bt.getArg(e,"file",null),this._sourceRoot=Bt.getArg(e,"sourceRoot",null),this._skipValidation=Bt.getArg(e,"skipValidation",!1),this._ignoreInvalidMapping=Bt.getArg(e,"ignoreInvalidMapping",!1),this._sources=new cf,this._names=new cf,this._mappings=new bV,this._sourcesContents=null}Sn.prototype._version=3;Sn.fromSourceMap=function(t,r){var n=t.sourceRoot,i=new Sn(Object.assign(r||{},{file:t.file,sourceRoot:n}));return t.eachMapping(function(s){var o={generated:{line:s.generatedLine,column:s.generatedColumn}};s.source!=null&&(o.source=s.source,n!=null&&(o.source=Bt.relative(n,o.source)),o.original={line:s.originalLine,column:s.originalColumn},s.name!=null&&(o.name=s.name)),i.addMapping(o)}),t.sources.forEach(function(s){var o=s;n!==null&&(o=Bt.relative(n,s)),i._sources.has(o)||i._sources.add(o);var a=t.sourceContentFor(s);a!=null&&i.setSourceContent(s,a)}),i};Sn.prototype.addMapping=function(t){var r=Bt.getArg(t,"generated"),n=Bt.getArg(t,"original",null),i=Bt.getArg(t,"source",null),s=Bt.getArg(t,"name",null);!this._skipValidation&&this._validateMapping(r,n,i,s)===!1||(i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),s!=null&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:s}))};Sn.prototype.setSourceContent=function(t,r){var n=t;this._sourceRoot!=null&&(n=Bt.relative(this._sourceRoot,n)),r!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[Bt.toSetString(n)]=r):this._sourcesContents&&(delete this._sourcesContents[Bt.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Sn.prototype.applySourceMap=function(t,r,n){var i=r;if(r==null){if(t.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=t.file}var s=this._sourceRoot;s!=null&&(i=Bt.relative(s,i));var o=new cf,a=new cf;this._mappings.unsortedForEach(function(c){if(c.source===i&&c.originalLine!=null){var u=t.originalPositionFor({line:c.originalLine,column:c.originalColumn});u.source!=null&&(c.source=u.source,n!=null&&(c.source=Bt.join(n,c.source)),s!=null&&(c.source=Bt.relative(s,c.source)),c.originalLine=u.line,c.originalColumn=u.column,u.name!=null&&(c.name=u.name))}var l=c.source;l!=null&&!o.has(l)&&o.add(l);var p=c.name;p!=null&&!a.has(p)&&a.add(p)},this),this._sources=o,this._names=a,t.sources.forEach(function(c){var u=t.sourceContentFor(c);u!=null&&(n!=null&&(c=Bt.join(n,c)),s!=null&&(c=Bt.relative(s,c)),this.setSourceContent(c,u))},this)};Sn.prototype._validateMapping=function(t,r,n,i){if(r&&typeof r.line!="number"&&typeof r.column!="number"){var s="original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.";if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}if(!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0&&!r&&!n&&!i)){if(t&&"line"in t&&"column"in t&&r&&"line"in r&&"column"in r&&t.line>0&&t.column>=0&&r.line>0&&r.column>=0&&n)return;var s="Invalid mapping: "+JSON.stringify({generated:t,source:n,original:r,name:i});if(this._ignoreInvalidMapping)return typeof console<"u"&&console.warn&&console.warn(s),!1;throw new Error(s)}};Sn.prototype._serializeMappings=function(){for(var t=0,r=1,n=0,i=0,s=0,o=0,a="",c,u,l,p,d=this._mappings.toArray(),h=0,m=d.length;h<m;h++){if(u=d[h],c="",u.generatedLine!==r)for(t=0;u.generatedLine!==r;)c+=";",r++;else if(h>0){if(!Bt.compareByGeneratedPositionsInflated(u,d[h-1]))continue;c+=","}c+=Wu.encode(u.generatedColumn-t),t=u.generatedColumn,u.source!=null&&(p=this._sources.indexOf(u.source),c+=Wu.encode(p-o),o=p,c+=Wu.encode(u.originalLine-1-i),i=u.originalLine-1,c+=Wu.encode(u.originalColumn-n),n=u.originalColumn,u.name!=null&&(l=this._names.indexOf(u.name),c+=Wu.encode(l-s),s=l)),a+=c}return a};Sn.prototype._generateSourcesContent=function(t,r){return t.map(function(n){if(!this._sourcesContents)return null;r!=null&&(n=Bt.relative(r,n));var i=Bt.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Sn.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(t.file=this._file),this._sourceRoot!=null&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t};Sn.prototype.toString=function(){return JSON.stringify(this.toJSON())};gF.SourceMapGenerator=Sn});var yF=w(Ro=>{f();Ro.GREATEST_LOWER_BOUND=1;Ro.LEAST_UPPER_BOUND=2;function Cb(e,t,r,n,i,s){var o=Math.floor((t-e)/2)+e,a=i(r,n[o],!0);return a===0?o:a>0?t-o>1?Cb(o,t,r,n,i,s):s==Ro.LEAST_UPPER_BOUND?t<n.length?t:-1:o:o-e>1?Cb(e,o,r,n,i,s):s==Ro.LEAST_UPPER_BOUND?o:e<0?-1:e}Ro.search=function(t,r,n,i){if(r.length===0)return-1;var s=Cb(-1,r.length,t,r,n,i||Ro.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&n(r[s],r[s-1],!0)===0;)--s;return s}});var vF=w(xF=>{f();function xV(e){function t(i,s,o){var a=i[s];i[s]=i[o],i[o]=a}function r(i,s){return Math.round(i+Math.random()*(s-i))}function n(i,s,o,a){if(o<a){var c=r(o,a),u=o-1;t(i,c,a);for(var l=i[a],p=o;p<a;p++)s(i[p],l,!1)<=0&&(u+=1,t(i,u,p));t(i,u+1,p);var d=u+1;n(i,s,o,d-1),n(i,s,d+1,a)}}return n}function vV(e){let t=xV.toString();return new Function(`return ${t}`)()(e)}var bF=new WeakMap;xF.quickSort=function(e,t,r=0){let n=bF.get(t);n===void 0&&(n=vV(t),bF.set(t,n)),n(e,t,r,e.length-1)}});var EF=w(uf=>{f();var ue=Wa(),wb=yF(),Ya=vb().ArraySet,DV=gb(),Yu=vF().quickSort;function xt(e,t){var r=e;return typeof e=="string"&&(r=ue.parseSourceMapInput(e)),r.sections!=null?new Xn(r,t):new cr(r,t)}xt.fromSourceMap=function(e,t){return cr.fromSourceMap(e,t)};xt.prototype._version=3;xt.prototype.__generatedMappings=null;Object.defineProperty(xt.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});xt.prototype.__originalMappings=null;Object.defineProperty(xt.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});xt.prototype._charIsMappingSeparator=function(t,r){var n=t.charAt(r);return n===";"||n===","};xt.prototype._parseMappings=function(t,r){throw new Error("Subclasses must implement _parseMappings")};xt.GENERATED_ORDER=1;xt.ORIGINAL_ORDER=2;xt.GREATEST_LOWER_BOUND=1;xt.LEAST_UPPER_BOUND=2;xt.prototype.eachMapping=function(t,r,n){var i=r||null,s=n||xt.GENERATED_ORDER,o;switch(s){case xt.GENERATED_ORDER:o=this._generatedMappings;break;case xt.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}for(var a=this.sourceRoot,c=t.bind(i),u=this._names,l=this._sources,p=this._sourceMapURL,d=0,h=o.length;d<h;d++){var m=o[d],g=m.source===null?null:l.at(m.source);g!==null&&(g=ue.computeSourceURL(a,g,p)),c({source:g,generatedLine:m.generatedLine,generatedColumn:m.generatedColumn,originalLine:m.originalLine,originalColumn:m.originalColumn,name:m.name===null?null:u.at(m.name)})}};xt.prototype.allGeneratedPositionsFor=function(t){var r=ue.getArg(t,"line"),n={source:ue.getArg(t,"source"),originalLine:r,originalColumn:ue.getArg(t,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var i=[],s=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ue.compareByOriginalPositions,wb.LEAST_UPPER_BOUND);if(s>=0){var o=this._originalMappings[s];if(t.column===void 0)for(var a=o.originalLine;o&&o.originalLine===a;)i.push({line:ue.getArg(o,"generatedLine",null),column:ue.getArg(o,"generatedColumn",null),lastColumn:ue.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s];else for(var c=o.originalColumn;o&&o.originalLine===r&&o.originalColumn==c;)i.push({line:ue.getArg(o,"generatedLine",null),column:ue.getArg(o,"generatedColumn",null),lastColumn:ue.getArg(o,"lastGeneratedColumn",null)}),o=this._originalMappings[++s]}return i};uf.SourceMapConsumer=xt;function cr(e,t){var r=e;typeof e=="string"&&(r=ue.parseSourceMapInput(e));var n=ue.getArg(r,"version"),i=ue.getArg(r,"sources"),s=ue.getArg(r,"names",[]),o=ue.getArg(r,"sourceRoot",null),a=ue.getArg(r,"sourcesContent",null),c=ue.getArg(r,"mappings"),u=ue.getArg(r,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o&&(o=ue.normalize(o)),i=i.map(String).map(ue.normalize).map(function(l){return o&&ue.isAbsolute(o)&&ue.isAbsolute(l)?ue.relative(o,l):l}),this._names=Ya.fromArray(s.map(String),!0),this._sources=Ya.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map(function(l){return ue.computeSourceURL(o,l,t)}),this.sourceRoot=o,this.sourcesContent=a,this._mappings=c,this._sourceMapURL=t,this.file=u}cr.prototype=Object.create(xt.prototype);cr.prototype.consumer=xt;cr.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null&&(t=ue.relative(this.sourceRoot,t)),this._sources.has(t))return this._sources.indexOf(t);var r;for(r=0;r<this._absoluteSources.length;++r)if(this._absoluteSources[r]==e)return r;return-1};cr.fromSourceMap=function(t,r){var n=Object.create(cr.prototype),i=n._names=Ya.fromArray(t._names.toArray(),!0),s=n._sources=Ya.fromArray(t._sources.toArray(),!0);n.sourceRoot=t._sourceRoot,n.sourcesContent=t._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=t._file,n._sourceMapURL=r,n._absoluteSources=n._sources.toArray().map(function(h){return ue.computeSourceURL(n.sourceRoot,h,r)});for(var o=t._mappings.toArray().slice(),a=n.__generatedMappings=[],c=n.__originalMappings=[],u=0,l=o.length;u<l;u++){var p=o[u],d=new CF;d.generatedLine=p.generatedLine,d.generatedColumn=p.generatedColumn,p.source&&(d.source=s.indexOf(p.source),d.originalLine=p.originalLine,d.originalColumn=p.originalColumn,p.name&&(d.name=i.indexOf(p.name)),c.push(d)),a.push(d)}return Yu(n.__originalMappings,ue.compareByOriginalPositions),n};cr.prototype._version=3;Object.defineProperty(cr.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function CF(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}var Eb=ue.compareByGeneratedPositionsDeflatedNoLine;function DF(e,t){let r=e.length,n=e.length-t;if(!(n<=1))if(n==2){let i=e[t],s=e[t+1];Eb(i,s)>0&&(e[t]=s,e[t+1]=i)}else if(n<20)for(let i=t;i<r;i++)for(let s=i;s>t;s--){let o=e[s-1],a=e[s];if(Eb(o,a)<=0)break;e[s-1]=a,e[s]=o}else Yu(e,Eb,t)}cr.prototype._parseMappings=function(t,r){var n=1,i=0,s=0,o=0,a=0,c=0,u=t.length,l=0,p={},d={},h=[],m=[],g,y,b,v,C;let x=0;for(;l<u;)if(t.charAt(l)===";")n++,l++,i=0,DF(m,x),x=m.length;else if(t.charAt(l)===",")l++;else{for(g=new CF,g.generatedLine=n,v=l;v<u&&!this._charIsMappingSeparator(t,v);v++);for(y=t.slice(l,v),b=[];l<v;)DV.decode(t,l,d),C=d.value,l=d.rest,b.push(C);if(b.length===2)throw new Error("Found a source, but no line and column");if(b.length===3)throw new Error("Found a source and line, but no column");if(g.generatedColumn=i+b[0],i=g.generatedColumn,b.length>1&&(g.source=a+b[1],a+=b[1],g.originalLine=s+b[2],s=g.originalLine,g.originalLine+=1,g.originalColumn=o+b[3],o=g.originalColumn,b.length>4&&(g.name=c+b[4],c+=b[4])),m.push(g),typeof g.originalLine=="number"){let E=g.source;for(;h.length<=E;)h.push(null);h[E]===null&&(h[E]=[]),h[E].push(g)}}DF(m,x),this.__generatedMappings=m;for(var D=0;D<h.length;D++)h[D]!=null&&Yu(h[D],ue.compareByOriginalPositionsNoSource);this.__originalMappings=[].concat(...h)};cr.prototype._findMapping=function(t,r,n,i,s,o){if(t[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[n]);if(t[i]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[i]);return wb.search(t,r,s,o)};cr.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var r=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var n=this._generatedMappings[t+1];if(r.generatedLine===n.generatedLine){r.lastGeneratedColumn=n.generatedColumn-1;continue}}r.lastGeneratedColumn=1/0}};cr.prototype.originalPositionFor=function(t){var r={generatedLine:ue.getArg(t,"line"),generatedColumn:ue.getArg(t,"column")},n=this._findMapping(r,this._generatedMappings,"generatedLine","generatedColumn",ue.compareByGeneratedPositionsDeflated,ue.getArg(t,"bias",xt.GREATEST_LOWER_BOUND));if(n>=0){var i=this._generatedMappings[n];if(i.generatedLine===r.generatedLine){var s=ue.getArg(i,"source",null);s!==null&&(s=this._sources.at(s),s=ue.computeSourceURL(this.sourceRoot,s,this._sourceMapURL));var o=ue.getArg(i,"name",null);return o!==null&&(o=this._names.at(o)),{source:s,line:ue.getArg(i,"originalLine",null),column:ue.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}};cr.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(t){return t==null}):!1};cr.prototype.sourceContentFor=function(t,r){if(!this.sourcesContent)return null;var n=this._findSourceIndex(t);if(n>=0)return this.sourcesContent[n];var i=t;this.sourceRoot!=null&&(i=ue.relative(this.sourceRoot,i));var s;if(this.sourceRoot!=null&&(s=ue.urlParse(this.sourceRoot))){var o=i.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!s.path||s.path=="/")&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(r)return null;throw new Error('"'+i+'" is not in the SourceMap.')};cr.prototype.generatedPositionFor=function(t){var r=ue.getArg(t,"source");if(r=this._findSourceIndex(r),r<0)return{line:null,column:null,lastColumn:null};var n={source:r,originalLine:ue.getArg(t,"line"),originalColumn:ue.getArg(t,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",ue.compareByOriginalPositions,ue.getArg(t,"bias",xt.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:ue.getArg(s,"generatedLine",null),column:ue.getArg(s,"generatedColumn",null),lastColumn:ue.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}};uf.BasicSourceMapConsumer=cr;function Xn(e,t){var r=e;typeof e=="string"&&(r=ue.parseSourceMapInput(e));var n=ue.getArg(r,"version"),i=ue.getArg(r,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new Ya,this._names=new Ya;var s={line:-1,column:0};this._sections=i.map(function(o){if(o.url)throw new Error("Support for url field in sections not implemented.");var a=ue.getArg(o,"offset"),c=ue.getArg(a,"line"),u=ue.getArg(a,"column");if(c<s.line||c===s.line&&u<s.column)throw new Error("Section offsets must be ordered and non-overlapping.");return s=a,{generatedOffset:{generatedLine:c+1,generatedColumn:u+1},consumer:new xt(ue.getArg(o,"map"),t)}})}Xn.prototype=Object.create(xt.prototype);Xn.prototype.constructor=xt;Xn.prototype._version=3;Object.defineProperty(Xn.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var r=0;r<this._sections[t].consumer.sources.length;r++)e.push(this._sections[t].consumer.sources[r]);return e}});Xn.prototype.originalPositionFor=function(t){var r={generatedLine:ue.getArg(t,"line"),generatedColumn:ue.getArg(t,"column")},n=wb.search(r,this._sections,function(s,o){var a=s.generatedLine-o.generatedOffset.generatedLine;return a||s.generatedColumn-o.generatedOffset.generatedColumn}),i=this._sections[n];return i?i.consumer.originalPositionFor({line:r.generatedLine-(i.generatedOffset.generatedLine-1),column:r.generatedColumn-(i.generatedOffset.generatedLine===r.generatedLine?i.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}};Xn.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(t){return t.consumer.hasContentsOfAllSources()})};Xn.prototype.sourceContentFor=function(t,r){for(var n=0;n<this._sections.length;n++){var i=this._sections[n],s=i.consumer.sourceContentFor(t,!0);if(s||s==="")return s}if(r)return null;throw new Error('"'+t+'" is not in the SourceMap.')};Xn.prototype.generatedPositionFor=function(t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];if(n.consumer._findSourceIndex(ue.getArg(t,"source"))!==-1){var i=n.consumer.generatedPositionFor(t);if(i){var s={line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)};return s}}}return{line:null,column:null}};Xn.prototype._parseMappings=function(t,r){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],s=i.consumer._generatedMappings,o=0;o<s.length;o++){var a=s[o],c=i.consumer._sources.at(a.source);c!==null&&(c=ue.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL)),this._sources.add(c),c=this._sources.indexOf(c);var u=null;a.name&&(u=i.consumer._names.at(a.name),this._names.add(u),u=this._names.indexOf(u));var l={source:c,generatedLine:a.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:a.generatedColumn+(i.generatedOffset.generatedLine===a.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:a.originalLine,originalColumn:a.originalColumn,name:u};this.__generatedMappings.push(l),typeof l.originalLine=="number"&&this.__originalMappings.push(l)}Yu(this.__generatedMappings,ue.compareByGeneratedPositionsDeflated),Yu(this.__originalMappings,ue.compareByOriginalPositions)};uf.IndexedSourceMapConsumer=Xn});var SF=w(wF=>{f();var CV=Db().SourceMapGenerator,lf=Wa(),EV=/(\r?\n)/,wV=10,Ja="$$$isSourceNode$$$";function cn(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=e??null,this.column=t??null,this.source=r??null,this.name=i??null,this[Ja]=!0,n!=null&&this.add(n)}cn.fromStringWithSourceMap=function(t,r,n){var i=new cn,s=t.split(EV),o=0,a=function(){var d=m(),h=m()||"";return d+h;function m(){return o<s.length?s[o++]:void 0}},c=1,u=0,l=null;return r.eachMapping(function(d){if(l!==null)if(c<d.generatedLine)p(l,a()),c++,u=0;else{var h=s[o]||"",m=h.substr(0,d.generatedColumn-u);s[o]=h.substr(d.generatedColumn-u),u=d.generatedColumn,p(l,m),l=d;return}for(;c<d.generatedLine;)i.add(a()),c++;if(u<d.generatedColumn){var h=s[o]||"";i.add(h.substr(0,d.generatedColumn)),s[o]=h.substr(d.generatedColumn),u=d.generatedColumn}l=d},this),o<s.length&&(l&&p(l,a()),i.add(s.splice(o).join(""))),r.sources.forEach(function(d){var h=r.sourceContentFor(d);h!=null&&(n!=null&&(d=lf.join(n,d)),i.setSourceContent(d,h))}),i;function p(d,h){if(d===null||d.source===void 0)i.add(h);else{var m=n?lf.join(n,d.source):d.source;i.add(new cn(d.originalLine,d.originalColumn,m,h,d.name))}}};cn.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[Ja]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};cn.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[Ja]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this};cn.prototype.walk=function(t){for(var r,n=0,i=this.children.length;n<i;n++)r=this.children[n],r[Ja]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})};cn.prototype.join=function(t){var r,n,i=this.children.length;if(i>0){for(r=[],n=0;n<i-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this};cn.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[Ja]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this};cn.prototype.setSourceContent=function(t,r){this.sourceContents[lf.toSetString(t)]=r};cn.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][Ja]&&this.children[r].walkSourceContents(t);for(var i=Object.keys(this.sourceContents),r=0,n=i.length;r<n;r++)t(lf.fromSetString(i[r]),this.sourceContents[i[r]])};cn.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t};cn.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new CV(t),i=!1,s=null,o=null,a=null,c=null;return this.walk(function(u,l){r.code+=u,l.source!==null&&l.line!==null&&l.column!==null?((s!==l.source||o!==l.line||a!==l.column||c!==l.name)&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name}),s=l.source,o=l.line,a=l.column,c=l.name,i=!0):i&&(n.addMapping({generated:{line:r.line,column:r.column}}),s=null,i=!1);for(var p=0,d=u.length;p<d;p++)u.charCodeAt(p)===wV?(r.line++,r.column=0,p+1===d?(s=null,i=!1):i&&n.addMapping({source:l.source,original:{line:l.line,column:l.column},generated:{line:r.line,column:r.column},name:l.name})):r.column++}),this.walkSourceContents(function(u,l){n.setSourceContent(u,l)}),{code:r.code,map:n}};wF.SourceNode=cn});var TF=w(pf=>{f();pf.SourceMapGenerator=Db().SourceMapGenerator;pf.SourceMapConsumer=EF().SourceMapConsumer;pf.SourceNode=SF().SourceNode});var n_=w(sl=>{"use strict";f();Object.defineProperty(sl,"__esModule",{value:!0});function SV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}var Pi=class{constructor(t,r,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=r,this.index=n}},tc=class{constructor(t,r){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=r}};function Ar(e,t){let{line:r,column:n,index:i}=e;return new Pi(r,n+t,i+t)}var AF="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",TV={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:AF},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:AF}},PF={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},mf=e=>e.type==="UpdateExpression"?PF.UpdateExpression[`${e.prefix}`]:PF[e.type],AV={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:e})=>`'import.${e}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
|
|
16
16
|
- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${e==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:e})=>`Unsyntactic ${e==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.
|
|
17
|
-
- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${e===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${mf(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${mf(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${mf(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},PV={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},FV=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),_V={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${mf({type:e})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},IV=["message"];function FF(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function kV({toMessage:e,code:t,reasonCode:r,syntaxPlugin:n}){let i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let s={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};s[r]&&(r=s[r])}return function s(o,a){let c=new SyntaxError;return c.code=t,c.reasonCode=r,c.loc=o,c.pos=o.index,c.syntaxPlugin=n,i&&(c.missingPlugin=a.missingPlugin),FF(c,"clone",function(l={}){var p;let{line:d,column:h,index:m}=(p=l.loc)!=null?p:o;return s(new Pi(d,h,m),Object.assign({},a,l.details))}),FF(c,"details",a),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${e(a)} (${o.line}:${o.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function ls(e,t){if(Array.isArray(e))return n=>ls(n,e[0]);let r={};for(let n of Object.keys(e)){let i=e[n],s=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:o}=s,a=SV(s,IV),c=typeof o=="string"?()=>o:o;r[n]=kV(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:c},t?{syntaxPlugin:t}:{},a))}return r}var _=Object.assign({},ls(TV),ls(AV),ls(PV),ls`pipelineOperator`(_V)),{defineProperty:NV}=Object,_F=(e,t)=>{e&&NV(e,t,{enumerable:!1,value:e[t]})};function Ju(e){return _F(e.loc.start,"index"),_F(e.loc.end,"index"),e}var RV=e=>class extends e{parse(){let r=Ju(super.parse());return this.options.tokens&&(r.tokens=r.tokens.map(Ju)),r}parseRegExpLiteral({pattern:r,flags:n}){let i=null;try{i=new RegExp(r,n)}catch{}let s=this.estreeParseLiteral(i);return s.regex={pattern:r,flags:n},s}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let i=this.estreeParseLiteral(n);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){let n=r.value;delete r.value,n.type="Literal",n.raw=n.extra.raw,n.value=n.extra.expressionValue;let i=r;return i.type="ExpressionStatement",i.expression=n,i.directive=n.extra.rawValue,delete n.extra,i}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,i,s,o){super.parseBlockBody(r,n,i,s,o);let a=r.directives.map(c=>this.directiveToStmt(c));r.body=a.concat(r.body),delete r.directives}pushClassMethod(r,n,i,s,o,a){this.parseMethod(n,i,s,o,a,"ClassMethod",!0),n.typeParameters&&(n.value.typeParameters=n.typeParameters,delete n.typeParameters),r.body.push(n)}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=n,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let i=super.parseLiteral(r,n);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,n,i=!1){super.parseFunctionBody(r,n,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,i,s,o,a,c=!1){let u=this.startNode();return u.kind=r.kind,u=super.parseMethod(u,n,i,s,o,a,c),u.type="FunctionExpression",delete u.kind,r.value=u,a==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition",n.computed=!1),n}parseObjectMethod(r,n,i,s,o){let a=super.parseObjectMethod(r,n,i,s,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(r,n,i,s){let o=super.parseObjectProperty(r,n,i,s);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(r,n,i){return r==="Property"?"value":super.isValidLVal(r,n,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:i,value:s}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(s,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(_.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(_.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,i)}finishCallExpression(r,n){let i=super.finishCallExpression(r,n);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var s,o;i.options=(s=i.arguments[1])!=null?s:null,i.attributes=(o=i.arguments[1])!=null?o:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let i=this.state.lastTokStartLoc,s=super.parseExport(r,n);switch(s.type){case"ExportAllDeclaration":s.exported=null;break;case"ExportNamedDeclaration":s.specifiers.length===1&&s.specifiers[0].type==="ExportNamespaceSpecifier"&&(s.type="ExportAllDeclaration",s.exported=s.specifiers[0].exported,delete s.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=s;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===s.start&&this.resetStartLocation(s,i)}break}return s}parseSubscript(r,n,i,s){let o=super.parseSubscript(r,n,i,s);if(s.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),s.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,n,i){return Ju(super.finishNodeAt(r,n,i))}resetStartLocation(r,n){super.resetStartLocation(r,n),Ju(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),Ju(r)}},Bo=class{constructor(t,r){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!r}},rt={brace:new Bo("{"),j_oTag:new Bo("<tag"),j_cTag:new Bo("</tag"),j_expr:new Bo("<tag>...</tag>",!0)};rt.template=new Bo("`",!0);var ke=!0,Z=!0,Sb=!0,Xu=!0,Ls=!0,OV=!0,yf=class{constructor(t,r={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},Xb=new Map;function Le(e,t={}){t.keyword=e;let r=de(e,t);return Xb.set(e,r),r}function Ar(e,t){return de(e,{beforeExpr:ke,binop:t})}var tl=-1,cs=[],Qb=[],Zb=[],ex=[],tx=[],rx=[];function de(e,t={}){var r,n,i,s;return++tl,Qb.push(e),Zb.push((r=t.binop)!=null?r:-1),ex.push((n=t.beforeExpr)!=null?n:!1),tx.push((i=t.startsExpr)!=null?i:!1),rx.push((s=t.prefix)!=null?s:!1),cs.push(new yf(e,t)),tl}function Ie(e,t={}){var r,n,i,s;return++tl,Xb.set(e,tl),Qb.push(e),Zb.push((r=t.binop)!=null?r:-1),ex.push((n=t.beforeExpr)!=null?n:!1),tx.push((i=t.startsExpr)!=null?i:!1),rx.push((s=t.prefix)!=null?s:!1),cs.push(new yf("name",t)),tl}var BV={bracketL:de("[",{beforeExpr:ke,startsExpr:Z}),bracketHashL:de("#[",{beforeExpr:ke,startsExpr:Z}),bracketBarL:de("[|",{beforeExpr:ke,startsExpr:Z}),bracketR:de("]"),bracketBarR:de("|]"),braceL:de("{",{beforeExpr:ke,startsExpr:Z}),braceBarL:de("{|",{beforeExpr:ke,startsExpr:Z}),braceHashL:de("#{",{beforeExpr:ke,startsExpr:Z}),braceR:de("}"),braceBarR:de("|}"),parenL:de("(",{beforeExpr:ke,startsExpr:Z}),parenR:de(")"),comma:de(",",{beforeExpr:ke}),semi:de(";",{beforeExpr:ke}),colon:de(":",{beforeExpr:ke}),doubleColon:de("::",{beforeExpr:ke}),dot:de("."),question:de("?",{beforeExpr:ke}),questionDot:de("?."),arrow:de("=>",{beforeExpr:ke}),template:de("template"),ellipsis:de("...",{beforeExpr:ke}),backQuote:de("`",{startsExpr:Z}),dollarBraceL:de("${",{beforeExpr:ke,startsExpr:Z}),templateTail:de("...`",{startsExpr:Z}),templateNonTail:de("...${",{beforeExpr:ke,startsExpr:Z}),at:de("@"),hash:de("#",{startsExpr:Z}),interpreterDirective:de("#!..."),eq:de("=",{beforeExpr:ke,isAssign:Xu}),assign:de("_=",{beforeExpr:ke,isAssign:Xu}),slashAssign:de("_=",{beforeExpr:ke,isAssign:Xu}),xorAssign:de("_=",{beforeExpr:ke,isAssign:Xu}),moduloAssign:de("_=",{beforeExpr:ke,isAssign:Xu}),incDec:de("++/--",{prefix:Ls,postfix:OV,startsExpr:Z}),bang:de("!",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),tilde:de("~",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),doubleCaret:de("^^",{startsExpr:Z}),doubleAt:de("@@",{startsExpr:Z}),pipeline:Ar("|>",0),nullishCoalescing:Ar("??",1),logicalOR:Ar("||",1),logicalAND:Ar("&&",2),bitwiseOR:Ar("|",3),bitwiseXOR:Ar("^",4),bitwiseAND:Ar("&",5),equality:Ar("==/!=/===/!==",6),lt:Ar("</>/<=/>=",7),gt:Ar("</>/<=/>=",7),relational:Ar("</>/<=/>=",7),bitShift:Ar("<</>>/>>>",8),bitShiftL:Ar("<</>>/>>>",8),bitShiftR:Ar("<</>>/>>>",8),plusMin:de("+/-",{beforeExpr:ke,binop:9,prefix:Ls,startsExpr:Z}),modulo:de("%",{binop:10,startsExpr:Z}),star:de("*",{binop:10}),slash:Ar("/",10),exponent:de("**",{beforeExpr:ke,binop:11,rightAssociative:!0}),_in:Le("in",{beforeExpr:ke,binop:7}),_instanceof:Le("instanceof",{beforeExpr:ke,binop:7}),_break:Le("break"),_case:Le("case",{beforeExpr:ke}),_catch:Le("catch"),_continue:Le("continue"),_debugger:Le("debugger"),_default:Le("default",{beforeExpr:ke}),_else:Le("else",{beforeExpr:ke}),_finally:Le("finally"),_function:Le("function",{startsExpr:Z}),_if:Le("if"),_return:Le("return",{beforeExpr:ke}),_switch:Le("switch"),_throw:Le("throw",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_try:Le("try"),_var:Le("var"),_const:Le("const"),_with:Le("with"),_new:Le("new",{beforeExpr:ke,startsExpr:Z}),_this:Le("this",{startsExpr:Z}),_super:Le("super",{startsExpr:Z}),_class:Le("class",{startsExpr:Z}),_extends:Le("extends",{beforeExpr:ke}),_export:Le("export"),_import:Le("import",{startsExpr:Z}),_null:Le("null",{startsExpr:Z}),_true:Le("true",{startsExpr:Z}),_false:Le("false",{startsExpr:Z}),_typeof:Le("typeof",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_void:Le("void",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_delete:Le("delete",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_do:Le("do",{isLoop:Sb,beforeExpr:ke}),_for:Le("for",{isLoop:Sb}),_while:Le("while",{isLoop:Sb}),_as:Ie("as",{startsExpr:Z}),_assert:Ie("assert",{startsExpr:Z}),_async:Ie("async",{startsExpr:Z}),_await:Ie("await",{startsExpr:Z}),_defer:Ie("defer",{startsExpr:Z}),_from:Ie("from",{startsExpr:Z}),_get:Ie("get",{startsExpr:Z}),_let:Ie("let",{startsExpr:Z}),_meta:Ie("meta",{startsExpr:Z}),_of:Ie("of",{startsExpr:Z}),_sent:Ie("sent",{startsExpr:Z}),_set:Ie("set",{startsExpr:Z}),_source:Ie("source",{startsExpr:Z}),_static:Ie("static",{startsExpr:Z}),_using:Ie("using",{startsExpr:Z}),_yield:Ie("yield",{startsExpr:Z}),_asserts:Ie("asserts",{startsExpr:Z}),_checks:Ie("checks",{startsExpr:Z}),_exports:Ie("exports",{startsExpr:Z}),_global:Ie("global",{startsExpr:Z}),_implements:Ie("implements",{startsExpr:Z}),_intrinsic:Ie("intrinsic",{startsExpr:Z}),_infer:Ie("infer",{startsExpr:Z}),_is:Ie("is",{startsExpr:Z}),_mixins:Ie("mixins",{startsExpr:Z}),_proto:Ie("proto",{startsExpr:Z}),_require:Ie("require",{startsExpr:Z}),_satisfies:Ie("satisfies",{startsExpr:Z}),_keyof:Ie("keyof",{startsExpr:Z}),_readonly:Ie("readonly",{startsExpr:Z}),_unique:Ie("unique",{startsExpr:Z}),_abstract:Ie("abstract",{startsExpr:Z}),_declare:Ie("declare",{startsExpr:Z}),_enum:Ie("enum",{startsExpr:Z}),_module:Ie("module",{startsExpr:Z}),_namespace:Ie("namespace",{startsExpr:Z}),_interface:Ie("interface",{startsExpr:Z}),_type:Ie("type",{startsExpr:Z}),_opaque:Ie("opaque",{startsExpr:Z}),name:de("name",{startsExpr:Z}),string:de("string",{startsExpr:Z}),num:de("num",{startsExpr:Z}),bigint:de("bigint",{startsExpr:Z}),decimal:de("decimal",{startsExpr:Z}),regexp:de("regexp",{startsExpr:Z}),privateName:de("#name",{startsExpr:Z}),eof:de("eof"),jsxName:de("jsxName"),jsxText:de("jsxText",{beforeExpr:!0}),jsxTagStart:de("jsxTagStart",{startsExpr:!0}),jsxTagEnd:de("jsxTagEnd"),placeholder:de("%%",{startsExpr:!0})};function ze(e){return e>=93&&e<=132}function MV(e){return e<=92}function Qn(e){return e>=58&&e<=132}function qF(e){return e>=58&&e<=136}function LV(e){return ex[e]}function Ib(e){return tx[e]}function $V(e){return e>=29&&e<=33}function IF(e){return e>=129&&e<=131}function UV(e){return e>=90&&e<=92}function nx(e){return e>=58&&e<=92}function jV(e){return e>=39&&e<=59}function qV(e){return e===34}function GV(e){return rx[e]}function zV(e){return e>=121&&e<=123}function HV(e){return e>=124&&e<=130}function Us(e){return Qb[e]}function hf(e){return Zb[e]}function KV(e){return e===57}function bf(e){return e>=24&&e<=25}function as(e){return cs[e]}cs[8].updateContext=e=>{e.pop()},cs[5].updateContext=cs[7].updateContext=cs[23].updateContext=e=>{e.push(rt.brace)},cs[22].updateContext=e=>{e[e.length-1]===rt.template?e.pop():e.push(rt.template)},cs[142].updateContext=e=>{e.push(rt.j_expr,rt.j_oTag)};var ix="\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\u0560-\u0588\u05D0-\u05EA\u05EF-\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\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\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\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-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\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-\uAB69\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",GF="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",VV=new RegExp("["+ix+"]"),WV=new RegExp("["+ix+GF+"]");ix=GF=null;var zF=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],YV=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function kb(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function us(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&VV.test(String.fromCharCode(e)):kb(e,zF)}function Qa(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&WV.test(String.fromCharCode(e)):kb(e,zF)||kb(e,YV)}var sx={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},JV=new Set(sx.keyword),XV=new Set(sx.strict),QV=new Set(sx.strictBind);function HF(e,t){return t&&e==="await"||e==="enum"}function KF(e,t){return HF(e,t)||XV.has(e)}function VF(e){return QV.has(e)}function WF(e,t){return KF(e,t)||VF(e)}function ZV(e){return JV.has(e)}function eW(e,t,r){return e===64&&t===64&&us(r)}var tW=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function rW(e){return tW.has(e)}var rl=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},nl=class{constructor(t,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new rl(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,r,n){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,t,r,n);let s=i.names.get(t)||0;r&16?s=s|4:(i.firstLexicalName||(i.firstLexicalName=t),s=s|2),i.names.set(t,s),r&8&&this.maybeExportDefined(i,t)}else if(r&4)for(let s=this.scopeStack.length-1;s>=0&&(i=this.scopeStack[s],this.checkRedeclarationInScope(i,t,r,n),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&387));--s);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,r){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(t,r,n,i){this.isRedeclaredInScope(t,r,n)&&this.parser.raise(_.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(t,r,n){if(!(n&1))return!1;if(n&8)return t.names.has(r);let i=t.names.get(r);return n&16?(i&2)>0||!this.treatFunctionsAsVarInScope(t)&&(i&1)>0:(i&2)>0&&!(t.flags&8&&t.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(t)&&(i&4)>0}checkLocalExport(t){let{name:r}=t;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&387)return r}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&451&&!(r&4))return r}}},Nb=class extends rl{constructor(...t){super(...t),this.declareFunctions=new Set}},Rb=class extends nl{createScope(t){return new Nb(t)}declareName(t,r,n){let i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,t,r,n),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,r,n)}isRedeclaredInScope(t,r,n){if(super.isRedeclaredInScope(t,r,n))return!0;if(n&2048&&!t.declareFunctions.has(r)){let i=t.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Ob=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[r,n]=t;if(!this.hasPlugin(r))return!1;let i=this.plugins.get(r);for(let s of Object.keys(n))if(i?.[s]!==n[s])return!1;return!0}}getPluginOption(t,r){var n;return(n=this.plugins.get(t))==null?void 0:n[r]}};function YF(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function nW(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function il(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function Qu(e,t,r){let n=null,i=t.length;for(;n===null&&i>0;)n=t[--i];n===null||n.start>r.start?il(e,r.comments):YF(n,r.comments)}var Bb=class extends Ob{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let i=n-1,s=r[i];s.start===t.end&&(s.leadingNode=t,i--);let{start:o}=t;for(;i>=0;i--){let a=r[i],c=a.end;if(c>o)a.containingNode=t,this.finalizeComment(a),r.splice(i,1);else{c===o&&(a.trailingNode=t);break}}}finalizeComment(t){let{comments:r}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&YF(t.leadingNode,r),t.trailingNode!==null&&nW(t.trailingNode,r);else{let{containingNode:n,start:i}=t;if(this.input.charCodeAt(i-1)===44)switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Qu(n,n.properties,t);break;case"CallExpression":case"OptionalCallExpression":Qu(n,n.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Qu(n,n.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Qu(n,n.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Qu(n,n.specifiers,t);break;default:il(n,r)}else il(n,r)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let r=t.length-1;r>=0;r--)this.finalizeComment(t[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let i=r[n-1];i.leadingNode===t&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:r}=this.state,{length:n}=r;n!==0&&(r[n-1].trailingNode===t?r[n-1].trailingNode=null:n>=2&&r[n-2].trailingNode===t&&(r[n-2].trailingNode=null))}takeSurroundingComments(t,r,n){let{commentStack:i}=this.state,s=i.length;if(s===0)return;let o=s-1;for(;o>=0;o--){let a=i[o],c=a.end;if(a.start===n)a.leadingNode=t;else if(c===r)a.trailingNode=t;else if(c<r)break}}},iW=/\r\n|[\r\n\u2028\u2029]/,df=new RegExp(iW.source,"g");function Za(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function kF(e,t,r){for(let n=t;n<r;n++)if(Za(e.charCodeAt(n)))return!0;return!1}var Tb=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ab=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function sW(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Mb=class e{constructor(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[rt.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:r,startLine:n,startColumn:i}){this.strict=t===!1?!1:t===!0?!0:r==="module",this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new Pi(n,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new Pi(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let t=new e;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},oW=function(t){return t>=48&&t<=57},NF={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},ff={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function RF(e,t,r,n,i,s){let o=r,a=n,c=i,u="",l=null,p=r,{length:d}=t;for(;;){if(r>=d){s.unterminated(o,a,c),u+=t.slice(p,r);break}let h=t.charCodeAt(r);if(aW(e,h,t,r)){u+=t.slice(p,r);break}if(h===92){u+=t.slice(p,r);let m=cW(t,r,n,i,e==="template",s);m.ch===null&&!l?l={pos:r,lineStart:n,curLine:i}:u+=m.ch,{pos:r,lineStart:n,curLine:i}=m,p=r}else h===8232||h===8233?(++r,++i,n=r):h===10||h===13?e==="template"?(u+=t.slice(p,r)+`
|
|
17
|
+
- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${e===1?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${mf(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${mf(e)}.`,InvalidLhsOptionalChaining:({ancestor:e})=>`Invalid optional chaining in the left-hand side of ${mf(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map(t=>JSON.stringify(t)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:e})=>`Unexpected keyword '${e}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},PV={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},FV=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),_V={PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${mf({type:e})}; please wrap it in parentheses.`,PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'},IV=["message"];function FF(e,t,r){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:r})}function kV({toMessage:e,code:t,reasonCode:r,syntaxPlugin:n}){let i=r==="MissingPlugin"||r==="MissingOneOfPlugins";{let s={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};s[r]&&(r=s[r])}return function s(o,a){let c=new SyntaxError;return c.code=t,c.reasonCode=r,c.loc=o,c.pos=o.index,c.syntaxPlugin=n,i&&(c.missingPlugin=a.missingPlugin),FF(c,"clone",function(l={}){var p;let{line:d,column:h,index:m}=(p=l.loc)!=null?p:o;return s(new Pi(d,h,m),Object.assign({},a,l.details))}),FF(c,"details",a),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${e(a)} (${o.line}:${o.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c}}function ls(e,t){if(Array.isArray(e))return n=>ls(n,e[0]);let r={};for(let n of Object.keys(e)){let i=e[n],s=typeof i=="string"?{message:()=>i}:typeof i=="function"?{message:i}:i,{message:o}=s,a=SV(s,IV),c=typeof o=="string"?()=>o:o;r[n]=kV(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:n,toMessage:c},t?{syntaxPlugin:t}:{},a))}return r}var _=Object.assign({},ls(TV),ls(AV),ls(PV),ls`pipelineOperator`(_V)),{defineProperty:NV}=Object,_F=(e,t)=>{e&&NV(e,t,{enumerable:!1,value:e[t]})};function Ju(e){return _F(e.loc.start,"index"),_F(e.loc.end,"index"),e}var RV=e=>class extends e{parse(){let r=Ju(super.parse());return this.options.tokens&&(r.tokens=r.tokens.map(Ju)),r}parseRegExpLiteral({pattern:r,flags:n}){let i=null;try{i=new RegExp(r,n)}catch{}let s=this.estreeParseLiteral(i);return s.regex={pattern:r,flags:n},s}parseBigIntLiteral(r){let n;try{n=BigInt(r)}catch{n=null}let i=this.estreeParseLiteral(n);return i.bigint=String(i.value||r),i}parseDecimalLiteral(r){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||r),i}estreeParseLiteral(r){return this.parseLiteral(r,"Literal")}parseStringLiteral(r){return this.estreeParseLiteral(r)}parseNumericLiteral(r){return this.estreeParseLiteral(r)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(r){return this.estreeParseLiteral(r)}directiveToStmt(r){let n=r.value;delete r.value,n.type="Literal",n.raw=n.extra.raw,n.value=n.extra.expressionValue;let i=r;return i.type="ExpressionStatement",i.expression=n,i.directive=n.extra.rawValue,delete n.extra,i}initFunction(r,n){super.initFunction(r,n),r.expression=!1}checkDeclaration(r){r!=null&&this.isObjectProperty(r)?this.checkDeclaration(r.value):super.checkDeclaration(r)}getObjectOrClassMethodParams(r){return r.value.params}isValidDirective(r){var n;return r.type==="ExpressionStatement"&&r.expression.type==="Literal"&&typeof r.expression.value=="string"&&!((n=r.expression.extra)!=null&&n.parenthesized)}parseBlockBody(r,n,i,s,o){super.parseBlockBody(r,n,i,s,o);let a=r.directives.map(c=>this.directiveToStmt(c));r.body=a.concat(r.body),delete r.directives}pushClassMethod(r,n,i,s,o,a){this.parseMethod(n,i,s,o,a,"ClassMethod",!0),n.typeParameters&&(n.value.typeParameters=n.typeParameters,delete n.typeParameters),r.body.push(n)}parsePrivateName(){let r=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(r):r}convertPrivateNameToPrivateIdentifier(r){let n=super.getPrivateNameSV(r);return r=r,delete r.id,r.name=n,r.type="PrivateIdentifier",r}isPrivateName(r){return this.getPluginOption("estree","classFeatures")?r.type==="PrivateIdentifier":super.isPrivateName(r)}getPrivateNameSV(r){return this.getPluginOption("estree","classFeatures")?r.name:super.getPrivateNameSV(r)}parseLiteral(r,n){let i=super.parseLiteral(r,n);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(r,n,i=!1){super.parseFunctionBody(r,n,i),r.expression=r.body.type!=="BlockStatement"}parseMethod(r,n,i,s,o,a,c=!1){let u=this.startNode();return u.kind=r.kind,u=super.parseMethod(u,n,i,s,o,a,c),u.type="FunctionExpression",delete u.kind,r.value=u,a==="ClassPrivateMethod"&&(r.computed=!1),this.finishNode(r,"MethodDefinition")}nameIsConstructor(r){return r.type==="Literal"?r.value==="constructor":super.nameIsConstructor(r)}parseClassProperty(...r){let n=super.parseClassProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition"),n}parseClassPrivateProperty(...r){let n=super.parseClassPrivateProperty(...r);return this.getPluginOption("estree","classFeatures")&&(n.type="PropertyDefinition",n.computed=!1),n}parseObjectMethod(r,n,i,s,o){let a=super.parseObjectMethod(r,n,i,s,o);return a&&(a.type="Property",a.kind==="method"&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(r,n,i,s){let o=super.parseObjectProperty(r,n,i,s);return o&&(o.kind="init",o.type="Property"),o}isValidLVal(r,n,i){return r==="Property"?"value":super.isValidLVal(r,n,i)}isAssignable(r,n){return r!=null&&this.isObjectProperty(r)?this.isAssignable(r.value,n):super.isAssignable(r,n)}toAssignable(r,n=!1){if(r!=null&&this.isObjectProperty(r)){let{key:i,value:s}=r;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(s,n)}else super.toAssignable(r,n)}toAssignableObjectExpressionProp(r,n,i){r.type==="Property"&&(r.kind==="get"||r.kind==="set")?this.raise(_.PatternHasAccessor,r.key):r.type==="Property"&&r.method?this.raise(_.PatternHasMethod,r.key):super.toAssignableObjectExpressionProp(r,n,i)}finishCallExpression(r,n){let i=super.finishCallExpression(r,n);if(i.callee.type==="Import"){if(i.type="ImportExpression",i.source=i.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")){var s,o;i.options=(s=i.arguments[1])!=null?s:null,i.attributes=(o=i.arguments[1])!=null?o:null}delete i.arguments,delete i.callee}return i}toReferencedArguments(r){r.type!=="ImportExpression"&&super.toReferencedArguments(r)}parseExport(r,n){let i=this.state.lastTokStartLoc,s=super.parseExport(r,n);switch(s.type){case"ExportAllDeclaration":s.exported=null;break;case"ExportNamedDeclaration":s.specifiers.length===1&&s.specifiers[0].type==="ExportNamespaceSpecifier"&&(s.type="ExportAllDeclaration",s.exported=s.specifiers[0].exported,delete s.specifiers);case"ExportDefaultDeclaration":{var o;let{declaration:a}=s;a?.type==="ClassDeclaration"&&((o=a.decorators)==null?void 0:o.length)>0&&a.start===s.start&&this.resetStartLocation(s,i)}break}return s}parseSubscript(r,n,i,s){let o=super.parseSubscript(r,n,i,s);if(s.optionalChainMember){if((o.type==="OptionalMemberExpression"||o.type==="OptionalCallExpression")&&(o.type=o.type.substring(8)),s.stop){let a=this.startNodeAtNode(o);return a.expression=o,this.finishNode(a,"ChainExpression")}}else(o.type==="MemberExpression"||o.type==="CallExpression")&&(o.optional=!1);return o}isOptionalMemberExpression(r){return r.type==="ChainExpression"?r.expression.type==="MemberExpression":super.isOptionalMemberExpression(r)}hasPropertyAsPrivateName(r){return r.type==="ChainExpression"&&(r=r.expression),super.hasPropertyAsPrivateName(r)}isObjectProperty(r){return r.type==="Property"&&r.kind==="init"&&!r.method}isObjectMethod(r){return r.type==="Property"&&(r.method||r.kind==="get"||r.kind==="set")}finishNodeAt(r,n,i){return Ju(super.finishNodeAt(r,n,i))}resetStartLocation(r,n){super.resetStartLocation(r,n),Ju(r)}resetEndLocation(r,n=this.state.lastTokEndLoc){super.resetEndLocation(r,n),Ju(r)}},Bo=class{constructor(t,r){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!r}},rt={brace:new Bo("{"),j_oTag:new Bo("<tag"),j_cTag:new Bo("</tag"),j_expr:new Bo("<tag>...</tag>",!0)};rt.template=new Bo("`",!0);var ke=!0,Z=!0,Sb=!0,Xu=!0,Ls=!0,OV=!0,yf=class{constructor(t,r={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop!=null?r.binop:null,this.updateContext=null}},Xb=new Map;function Le(e,t={}){t.keyword=e;let r=de(e,t);return Xb.set(e,r),r}function Tr(e,t){return de(e,{beforeExpr:ke,binop:t})}var tl=-1,cs=[],Qb=[],Zb=[],ex=[],tx=[],rx=[];function de(e,t={}){var r,n,i,s;return++tl,Qb.push(e),Zb.push((r=t.binop)!=null?r:-1),ex.push((n=t.beforeExpr)!=null?n:!1),tx.push((i=t.startsExpr)!=null?i:!1),rx.push((s=t.prefix)!=null?s:!1),cs.push(new yf(e,t)),tl}function Ie(e,t={}){var r,n,i,s;return++tl,Xb.set(e,tl),Qb.push(e),Zb.push((r=t.binop)!=null?r:-1),ex.push((n=t.beforeExpr)!=null?n:!1),tx.push((i=t.startsExpr)!=null?i:!1),rx.push((s=t.prefix)!=null?s:!1),cs.push(new yf("name",t)),tl}var BV={bracketL:de("[",{beforeExpr:ke,startsExpr:Z}),bracketHashL:de("#[",{beforeExpr:ke,startsExpr:Z}),bracketBarL:de("[|",{beforeExpr:ke,startsExpr:Z}),bracketR:de("]"),bracketBarR:de("|]"),braceL:de("{",{beforeExpr:ke,startsExpr:Z}),braceBarL:de("{|",{beforeExpr:ke,startsExpr:Z}),braceHashL:de("#{",{beforeExpr:ke,startsExpr:Z}),braceR:de("}"),braceBarR:de("|}"),parenL:de("(",{beforeExpr:ke,startsExpr:Z}),parenR:de(")"),comma:de(",",{beforeExpr:ke}),semi:de(";",{beforeExpr:ke}),colon:de(":",{beforeExpr:ke}),doubleColon:de("::",{beforeExpr:ke}),dot:de("."),question:de("?",{beforeExpr:ke}),questionDot:de("?."),arrow:de("=>",{beforeExpr:ke}),template:de("template"),ellipsis:de("...",{beforeExpr:ke}),backQuote:de("`",{startsExpr:Z}),dollarBraceL:de("${",{beforeExpr:ke,startsExpr:Z}),templateTail:de("...`",{startsExpr:Z}),templateNonTail:de("...${",{beforeExpr:ke,startsExpr:Z}),at:de("@"),hash:de("#",{startsExpr:Z}),interpreterDirective:de("#!..."),eq:de("=",{beforeExpr:ke,isAssign:Xu}),assign:de("_=",{beforeExpr:ke,isAssign:Xu}),slashAssign:de("_=",{beforeExpr:ke,isAssign:Xu}),xorAssign:de("_=",{beforeExpr:ke,isAssign:Xu}),moduloAssign:de("_=",{beforeExpr:ke,isAssign:Xu}),incDec:de("++/--",{prefix:Ls,postfix:OV,startsExpr:Z}),bang:de("!",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),tilde:de("~",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),doubleCaret:de("^^",{startsExpr:Z}),doubleAt:de("@@",{startsExpr:Z}),pipeline:Tr("|>",0),nullishCoalescing:Tr("??",1),logicalOR:Tr("||",1),logicalAND:Tr("&&",2),bitwiseOR:Tr("|",3),bitwiseXOR:Tr("^",4),bitwiseAND:Tr("&",5),equality:Tr("==/!=/===/!==",6),lt:Tr("</>/<=/>=",7),gt:Tr("</>/<=/>=",7),relational:Tr("</>/<=/>=",7),bitShift:Tr("<</>>/>>>",8),bitShiftL:Tr("<</>>/>>>",8),bitShiftR:Tr("<</>>/>>>",8),plusMin:de("+/-",{beforeExpr:ke,binop:9,prefix:Ls,startsExpr:Z}),modulo:de("%",{binop:10,startsExpr:Z}),star:de("*",{binop:10}),slash:Tr("/",10),exponent:de("**",{beforeExpr:ke,binop:11,rightAssociative:!0}),_in:Le("in",{beforeExpr:ke,binop:7}),_instanceof:Le("instanceof",{beforeExpr:ke,binop:7}),_break:Le("break"),_case:Le("case",{beforeExpr:ke}),_catch:Le("catch"),_continue:Le("continue"),_debugger:Le("debugger"),_default:Le("default",{beforeExpr:ke}),_else:Le("else",{beforeExpr:ke}),_finally:Le("finally"),_function:Le("function",{startsExpr:Z}),_if:Le("if"),_return:Le("return",{beforeExpr:ke}),_switch:Le("switch"),_throw:Le("throw",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_try:Le("try"),_var:Le("var"),_const:Le("const"),_with:Le("with"),_new:Le("new",{beforeExpr:ke,startsExpr:Z}),_this:Le("this",{startsExpr:Z}),_super:Le("super",{startsExpr:Z}),_class:Le("class",{startsExpr:Z}),_extends:Le("extends",{beforeExpr:ke}),_export:Le("export"),_import:Le("import",{startsExpr:Z}),_null:Le("null",{startsExpr:Z}),_true:Le("true",{startsExpr:Z}),_false:Le("false",{startsExpr:Z}),_typeof:Le("typeof",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_void:Le("void",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_delete:Le("delete",{beforeExpr:ke,prefix:Ls,startsExpr:Z}),_do:Le("do",{isLoop:Sb,beforeExpr:ke}),_for:Le("for",{isLoop:Sb}),_while:Le("while",{isLoop:Sb}),_as:Ie("as",{startsExpr:Z}),_assert:Ie("assert",{startsExpr:Z}),_async:Ie("async",{startsExpr:Z}),_await:Ie("await",{startsExpr:Z}),_defer:Ie("defer",{startsExpr:Z}),_from:Ie("from",{startsExpr:Z}),_get:Ie("get",{startsExpr:Z}),_let:Ie("let",{startsExpr:Z}),_meta:Ie("meta",{startsExpr:Z}),_of:Ie("of",{startsExpr:Z}),_sent:Ie("sent",{startsExpr:Z}),_set:Ie("set",{startsExpr:Z}),_source:Ie("source",{startsExpr:Z}),_static:Ie("static",{startsExpr:Z}),_using:Ie("using",{startsExpr:Z}),_yield:Ie("yield",{startsExpr:Z}),_asserts:Ie("asserts",{startsExpr:Z}),_checks:Ie("checks",{startsExpr:Z}),_exports:Ie("exports",{startsExpr:Z}),_global:Ie("global",{startsExpr:Z}),_implements:Ie("implements",{startsExpr:Z}),_intrinsic:Ie("intrinsic",{startsExpr:Z}),_infer:Ie("infer",{startsExpr:Z}),_is:Ie("is",{startsExpr:Z}),_mixins:Ie("mixins",{startsExpr:Z}),_proto:Ie("proto",{startsExpr:Z}),_require:Ie("require",{startsExpr:Z}),_satisfies:Ie("satisfies",{startsExpr:Z}),_keyof:Ie("keyof",{startsExpr:Z}),_readonly:Ie("readonly",{startsExpr:Z}),_unique:Ie("unique",{startsExpr:Z}),_abstract:Ie("abstract",{startsExpr:Z}),_declare:Ie("declare",{startsExpr:Z}),_enum:Ie("enum",{startsExpr:Z}),_module:Ie("module",{startsExpr:Z}),_namespace:Ie("namespace",{startsExpr:Z}),_interface:Ie("interface",{startsExpr:Z}),_type:Ie("type",{startsExpr:Z}),_opaque:Ie("opaque",{startsExpr:Z}),name:de("name",{startsExpr:Z}),string:de("string",{startsExpr:Z}),num:de("num",{startsExpr:Z}),bigint:de("bigint",{startsExpr:Z}),decimal:de("decimal",{startsExpr:Z}),regexp:de("regexp",{startsExpr:Z}),privateName:de("#name",{startsExpr:Z}),eof:de("eof"),jsxName:de("jsxName"),jsxText:de("jsxText",{beforeExpr:!0}),jsxTagStart:de("jsxTagStart",{startsExpr:!0}),jsxTagEnd:de("jsxTagEnd"),placeholder:de("%%",{startsExpr:!0})};function ze(e){return e>=93&&e<=132}function MV(e){return e<=92}function Qn(e){return e>=58&&e<=132}function qF(e){return e>=58&&e<=136}function LV(e){return ex[e]}function Ib(e){return tx[e]}function $V(e){return e>=29&&e<=33}function IF(e){return e>=129&&e<=131}function UV(e){return e>=90&&e<=92}function nx(e){return e>=58&&e<=92}function jV(e){return e>=39&&e<=59}function qV(e){return e===34}function GV(e){return rx[e]}function zV(e){return e>=121&&e<=123}function HV(e){return e>=124&&e<=130}function Us(e){return Qb[e]}function hf(e){return Zb[e]}function KV(e){return e===57}function bf(e){return e>=24&&e<=25}function as(e){return cs[e]}cs[8].updateContext=e=>{e.pop()},cs[5].updateContext=cs[7].updateContext=cs[23].updateContext=e=>{e.push(rt.brace)},cs[22].updateContext=e=>{e[e.length-1]===rt.template?e.pop():e.push(rt.template)},cs[142].updateContext=e=>{e.push(rt.j_expr,rt.j_oTag)};var ix="\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\u0560-\u0588\u05D0-\u05EA\u05EF-\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\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\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\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\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\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\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-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\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\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\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-\uAB69\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",GF="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",VV=new RegExp("["+ix+"]"),WV=new RegExp("["+ix+GF+"]");ix=GF=null;var zF=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],YV=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function kb(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function us(e){return e<65?e===36:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&VV.test(String.fromCharCode(e)):kb(e,zF)}function Qa(e){return e<48?e===36:e<58?!0:e<65?!1:e<=90?!0:e<97?e===95:e<=122?!0:e<=65535?e>=170&&WV.test(String.fromCharCode(e)):kb(e,zF)||kb(e,YV)}var sx={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},JV=new Set(sx.keyword),XV=new Set(sx.strict),QV=new Set(sx.strictBind);function HF(e,t){return t&&e==="await"||e==="enum"}function KF(e,t){return HF(e,t)||XV.has(e)}function VF(e){return QV.has(e)}function WF(e,t){return KF(e,t)||VF(e)}function ZV(e){return JV.has(e)}function eW(e,t,r){return e===64&&t===64&&us(r)}var tW=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function rW(e){return tW.has(e)}var rl=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},nl=class{constructor(t,r){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=r}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&128)return!0;if(r&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new rl(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,r,n){let i=this.currentScope();if(r&8||r&16){this.checkRedeclarationInScope(i,t,r,n);let s=i.names.get(t)||0;r&16?s=s|4:(i.firstLexicalName||(i.firstLexicalName=t),s=s|2),i.names.set(t,s),r&8&&this.maybeExportDefined(i,t)}else if(r&4)for(let s=this.scopeStack.length-1;s>=0&&(i=this.scopeStack[s],this.checkRedeclarationInScope(i,t,r,n),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&387));--s);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,r){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(r)}checkRedeclarationInScope(t,r,n,i){this.isRedeclaredInScope(t,r,n)&&this.parser.raise(_.VarRedeclaration,i,{identifierName:r})}isRedeclaredInScope(t,r,n){if(!(n&1))return!1;if(n&8)return t.names.has(r);let i=t.names.get(r);return n&16?(i&2)>0||!this.treatFunctionsAsVarInScope(t)&&(i&1)>0:(i&2)>0&&!(t.flags&8&&t.firstLexicalName===r)||!this.treatFunctionsAsVarInScope(t)&&(i&4)>0}checkLocalExport(t){let{name:r}=t;this.scopeStack[0].names.has(r)||this.undefinedExports.set(r,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&387)return r}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:r}=this.scopeStack[t];if(r&451&&!(r&4))return r}}},Nb=class extends rl{constructor(...t){super(...t),this.declareFunctions=new Set}},Rb=class extends nl{createScope(t){return new Nb(t)}declareName(t,r,n){let i=this.currentScope();if(r&2048){this.checkRedeclarationInScope(i,t,r,n),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,r,n)}isRedeclaredInScope(t,r,n){if(super.isRedeclaredInScope(t,r,n))return!0;if(n&2048&&!t.declareFunctions.has(r)){let i=t.names.get(r);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Ob=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[r,n]=t;if(!this.hasPlugin(r))return!1;let i=this.plugins.get(r);for(let s of Object.keys(n))if(i?.[s]!==n[s])return!1;return!0}}getPluginOption(t,r){var n;return(n=this.plugins.get(t))==null?void 0:n[r]}};function YF(e,t){e.trailingComments===void 0?e.trailingComments=t:e.trailingComments.unshift(...t)}function nW(e,t){e.leadingComments===void 0?e.leadingComments=t:e.leadingComments.unshift(...t)}function il(e,t){e.innerComments===void 0?e.innerComments=t:e.innerComments.unshift(...t)}function Qu(e,t,r){let n=null,i=t.length;for(;n===null&&i>0;)n=t[--i];n===null||n.start>r.start?il(e,r.comments):YF(n,r.comments)}var Bb=class extends Ob{addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:r}=this.state;this.comments.length!==r&&(this.comments.length=r),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:r}=this.state,n=r.length;if(n===0)return;let i=n-1,s=r[i];s.start===t.end&&(s.leadingNode=t,i--);let{start:o}=t;for(;i>=0;i--){let a=r[i],c=a.end;if(c>o)a.containingNode=t,this.finalizeComment(a),r.splice(i,1);else{c===o&&(a.trailingNode=t);break}}}finalizeComment(t){let{comments:r}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&YF(t.leadingNode,r),t.trailingNode!==null&&nW(t.trailingNode,r);else{let{containingNode:n,start:i}=t;if(this.input.charCodeAt(i-1)===44)switch(n.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Qu(n,n.properties,t);break;case"CallExpression":case"OptionalCallExpression":Qu(n,n.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Qu(n,n.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Qu(n,n.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Qu(n,n.specifiers,t);break;default:il(n,r)}else il(n,r)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let r=t.length-1;r>=0;r--)this.finalizeComment(t[r]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:r}=this.state,{length:n}=r;if(n===0)return;let i=r[n-1];i.leadingNode===t&&(i.leadingNode=null)}resetPreviousIdentifierLeadingComments(t){let{commentStack:r}=this.state,{length:n}=r;n!==0&&(r[n-1].trailingNode===t?r[n-1].trailingNode=null:n>=2&&r[n-2].trailingNode===t&&(r[n-2].trailingNode=null))}takeSurroundingComments(t,r,n){let{commentStack:i}=this.state,s=i.length;if(s===0)return;let o=s-1;for(;o>=0;o--){let a=i[o],c=a.end;if(a.start===n)a.leadingNode=t;else if(c===r)a.trailingNode=t;else if(c<r)break}}},iW=/\r\n|[\r\n\u2028\u2029]/,df=new RegExp(iW.source,"g");function Za(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function kF(e,t,r){for(let n=t;n<r;n++)if(Za(e.charCodeAt(n)))return!0;return!1}var Tb=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Ab=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function sW(e){switch(e){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}var Mb=class e{constructor(){this.flags=1024,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=139,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[rt.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:r,startLine:n,startColumn:i}){this.strict=t===!1?!1:t===!0?!0:r==="module",this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new Pi(n,i,0)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new Pi(this.curLine,this.pos-this.lineStart,this.pos)}clone(){let t=new e;return t.flags=this.flags,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},oW=function(t){return t>=48&&t<=57},NF={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},ff={bin:e=>e===48||e===49,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function RF(e,t,r,n,i,s){let o=r,a=n,c=i,u="",l=null,p=r,{length:d}=t;for(;;){if(r>=d){s.unterminated(o,a,c),u+=t.slice(p,r);break}let h=t.charCodeAt(r);if(aW(e,h,t,r)){u+=t.slice(p,r);break}if(h===92){u+=t.slice(p,r);let m=cW(t,r,n,i,e==="template",s);m.ch===null&&!l?l={pos:r,lineStart:n,curLine:i}:u+=m.ch,{pos:r,lineStart:n,curLine:i}=m,p=r}else h===8232||h===8233?(++r,++i,n=r):h===10||h===13?e==="template"?(u+=t.slice(p,r)+`
|
|
18
18
|
`,++r,h===13&&t.charCodeAt(r)===10&&++r,++i,p=n=r):s.unterminated(o,a,c):++r}return{pos:r,str:u,firstInvalidLoc:l,lineStart:n,curLine:i,containsInvalid:!!l}}function aW(e,t,r,n){return e==="template"?t===96||t===36&&r.charCodeAt(n+1)===123:t===(e==="double"?34:39)}function cW(e,t,r,n,i,s){let o=!i;t++;let a=u=>({pos:t,ch:u,lineStart:r,curLine:n}),c=e.charCodeAt(t++);switch(c){case 110:return a(`
|
|
19
|
-
`);case 114:return a("\r");case 120:{let u;return{code:u,pos:t}=Lb(e,t,r,n,2,!1,o,s),a(u===null?null:String.fromCharCode(u))}case 117:{let u;return{code:u,pos:t}=XF(e,t,r,n,o,s),a(u===null?null:String.fromCodePoint(u))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++n;case 8232:case 8233:return a("");case 56:case 57:if(i)return a(null);s.strictNumericEscape(t-1,r,n);default:if(c>=48&&c<=55){let u=t-1,p=/^[0-7]+/.exec(e.slice(u,t+2))[0],d=parseInt(p,8);d>255&&(p=p.slice(0,-1),d=parseInt(p,8)),t+=p.length-1;let h=e.charCodeAt(t);if(p!=="0"||h===56||h===57){if(i)return a(null);s.strictNumericEscape(u,r,n)}return a(String.fromCharCode(d))}return a(String.fromCharCode(c))}}function Lb(e,t,r,n,i,s,o,a){let c=t,u;return{n:u,pos:t}=JF(e,t,r,n,16,i,s,!1,a,!o),u===null&&(o?a.invalidEscapeSequence(c,r,n):t=c-1),{code:u,pos:t}}function JF(e,t,r,n,i,s,o,a,c,u){let l=t,p=i===16?NF.hex:NF.decBinOct,d=i===16?ff.hex:i===10?ff.dec:i===8?ff.oct:ff.bin,h=!1,m=0;for(let g=0,y=s??1/0;g<y;++g){let b=e.charCodeAt(t),v;if(b===95&&a!=="bail"){let C=e.charCodeAt(t-1),x=e.charCodeAt(t+1);if(a){if(Number.isNaN(x)||!d(x)||p.has(C)||p.has(x)){if(u)return{n:null,pos:t};c.unexpectedNumericSeparator(t,r,n)}}else{if(u)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,r,n)}++t;continue}if(b>=97?v=b-97+10:b>=65?v=b-65+10:oW(b)?v=b-48:v=1/0,v>=i){if(v<=9&&u)return{n:null,pos:t};if(v<=9&&c.invalidDigit(t,r,n,i))v=0;else if(o)v=0,h=!0;else break}++t,m=m*i+v}return t===l||s!=null&&t-l!==s||h?{n:null,pos:t}:{n:m,pos:t}}function XF(e,t,r,n,i,s){let o=e.charCodeAt(t),a;if(o===123){if(++t,{code:a,pos:t}=Lb(e,t,r,n,e.indexOf("}",t)-t,!0,i,s),++t,a!==null&&a>1114111)if(i)s.invalidCodePoint(t,r,n);else return{code:null,pos:t}}else({code:a,pos:t}=Lb(e,t,r,n,4,!1,i,s));return{code:a,pos:t}}function Zu(e,t,r){return new Pi(r,e-t,e)}var uW=new Set([103,109,115,105,121,117,100,118]),Ai=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new tc(t.startLoc,t.endLoc)}},$b=class extends Bb{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,i,s,o)=>this.options.errorRecovery?(this.raise(_.InvalidDigit,Zu(n,i,s),{radix:o}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(_.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(_.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(_.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(_.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,i,s)=>{this.recordStrictModeErrors(_.StrictNumericEscape,Zu(n,i,s))},unterminated:(n,i,s)=>{throw this.raise(_.UnterminatedString,Zu(n-1,i,s))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(_.StrictNumericEscape),unterminated:(n,i,s)=>{throw this.raise(_.UnterminatedTemplate,Zu(n,i,s))}}),this.state=new Mb,this.state.init(t),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ai(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=t,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Tb.lastIndex=t,Tb.test(this.input)?Tb.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ab.lastIndex=t,Ab.test(this.input)?Ab.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let r=this.input.charCodeAt(t);if((r&64512)===55296&&++t<this.input.length){let n=this.input.charCodeAt(t);(n&64512)===56320&&(r=65536+((r&1023)<<10)+(n&1023))}return r}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([r,n])=>this.raise(r,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let r;this.isLookahead||(r=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(t,n+2);if(i===-1)throw this.raise(_.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,df.lastIndex=n+2;df.test(this.input)&&df.lastIndex<=i;)++this.state.curLine,this.state.lineStart=df.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(n+2,i),start:n,end:i+t.length,loc:new tc(r,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(t){let r=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!Za(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+t,s),start:r,end:s,loc:new tc(n,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let t=this.state.pos,r=[];e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i));break}default:break e}break;default:if(sW(n))++this.state.pos;else if(n===45&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(t===0||this.state.lineStart>t)){let s=this.skipLineComment(3);s!==void 0&&(this.addComment(s),this.options.attachComment&&r.push(s))}else break e}else if(n===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let s=this.skipLineComment(4);s!==void 0&&(this.addComment(s),this.options.attachComment&&r.push(s))}else break e}else break e}}if(r.length>0){let n=this.state.pos,i={start:t,end:n,comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=t,this.state.value=r,this.isLookahead||this.updateContext(n)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,r=this.codePointAtPos(t);if(r>=48&&r<=57)throw this.raise(_.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?_.RecordExpressionHashIncorrectStartSyntaxType:_.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else us(r)?(++this.state.pos,this.finishToken(138,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!Za(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let n=this.input.slice(r+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(t){let r=t===42?55:54,n=1,i=this.input.charCodeAt(this.state.pos+1);t===42&&i===42&&(n++,i=this.input.charCodeAt(this.state.pos+2),r=57),i===61&&!this.state.inType&&(n++,r=t===37?33:30),this.finishOp(r,n)}readToken_pipe_amp(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===62){let n=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);t===63?r===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(us(t)){this.readWord(t);return}}throw this.raise(_.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,r){let n=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(t,n)}readRegexp(){let t=this.state.startLoc,r=this.state.start+1,n,i,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(_.UnterminatedRegExp,Pr(t,1));let u=this.input.charCodeAt(s);if(Za(u))throw this.raise(_.UnterminatedRegExp,Pr(t,1));if(n)n=!1;else{if(u===91)i=!0;else if(u===93&&i)i=!1;else if(u===47&&!i)break;n=u===92}}let o=this.input.slice(r,s);++s;let a="",c=()=>Pr(t,s+2-r);for(;s<this.length;){let u=this.codePointAtPos(s),l=String.fromCharCode(u);if(uW.has(u))u===118?a.includes("u")&&this.raise(_.IncompatibleRegExpUVFlags,c()):u===117&&a.includes("v")&&this.raise(_.IncompatibleRegExpUVFlags,c()),a.includes(l)&&this.raise(_.DuplicateRegExpFlags,c());else if(Qa(u)||u===92)this.raise(_.MalformedRegExpFlags,c());else break;++s,a+=l}this.state.pos=s,this.finishToken(137,{pattern:o,flags:a})}readInt(t,r,n=!1,i=!0){let{n:s,pos:o}=JF(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,r,n,i,this.errorHandlers_readInt,!1);return this.state.pos=o,s}readRadixNumber(t){let r=this.state.curPosition(),n=!1;this.state.pos+=2;let i=this.readInt(t);i==null&&this.raise(_.InvalidDigit,Pr(r,2),{radix:t});let s=this.input.charCodeAt(this.state.pos);if(s===110)++this.state.pos,n=!0;else if(s===109)throw this.raise(_.InvalidDecimal,r);if(us(this.codePointAtPos(this.state.pos)))throw this.raise(_.NumberIdentifier,this.state.curPosition());if(n){let o=this.input.slice(r.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,o);return}this.finishToken(134,i)}readNumber(t){let r=this.state.pos,n=this.state.curPosition(),i=!1,s=!1,o=!1,a=!1,c=!1;!t&&this.readInt(10)===null&&this.raise(_.InvalidNumber,this.state.curPosition());let u=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(u){let h=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(_.StrictOctalLiteral,n),!this.state.strict){let m=h.indexOf("_");m>0&&this.raise(_.ZeroDigitNumericSeparator,Pr(n,m))}c=u&&!/[89]/.test(h)}let l=this.input.charCodeAt(this.state.pos);if(l===46&&!c&&(++this.state.pos,this.readInt(10),i=!0,l=this.input.charCodeAt(this.state.pos)),(l===69||l===101)&&!c&&(l=this.input.charCodeAt(++this.state.pos),(l===43||l===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(_.InvalidOrMissingExponent,n),i=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),l===110&&((i||u)&&this.raise(_.InvalidBigIntLiteral,n),++this.state.pos,s=!0),l===109&&(this.expectPlugin("decimal",this.state.curPosition()),(a||u)&&this.raise(_.InvalidDecimal,n),++this.state.pos,o=!0),us(this.codePointAtPos(this.state.pos)))throw this.raise(_.NumberIdentifier,this.state.curPosition());let p=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(s){this.finishToken(135,p);return}if(o){this.finishToken(136,p);return}let d=c?parseInt(p,8):parseFloat(p);this.finishToken(134,d)}readCodePoint(t){let{code:r,pos:n}=XF(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=n,r}readString(t){let{str:r,pos:n,curLine:i,lineStart:s}=RF(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=s,this.state.curLine=i,this.finishToken(133,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:r,firstInvalidLoc:n,pos:i,curLine:s,lineStart:o}=RF("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new Pi(n.curLine,n.pos-n.lineStart,n.pos)),this.input.codePointAt(i)===96?this.finishToken(24,n?null:t+r+"`"):(this.state.pos++,this.finishToken(25,n?null:t+r+"${"))}recordStrictModeErrors(t,r){let n=r.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(t,r):this.state.strictErrors.set(n,[t,r])}readWord1(t){this.state.containsEsc=!1;let r="",n=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let s=this.codePointAtPos(this.state.pos);if(Qa(s))this.state.pos+=s<=65535?1:2;else if(s===92){this.state.containsEsc=!0,r+=this.input.slice(i,this.state.pos);let o=this.state.curPosition(),a=this.state.pos===n?us:Qa;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(_.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(a(c)||this.raise(_.EscapedCharNotAnIdentifier,o),r+=String.fromCodePoint(c)),i=this.state.pos}else break}return r+this.input.slice(i,this.state.pos)}readWord(t){let r=this.readWord1(t),n=Xb.get(r);n!==void 0?this.finishToken(n,Us(n)):this.finishToken(132,r)}checkKeywordEscapes(){let{type:t}=this.state;nx(t)&&this.state.containsEsc&&this.raise(_.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Us(t)})}raise(t,r,n={}){let i=r instanceof Pi?r:r.loc.start,s=t(i,n);if(!this.options.errorRecovery)throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(t,r,n={}){let i=r instanceof Pi?r:r.loc.start,s=i.index,o=this.state.errors;for(let a=o.length-1;a>=0;a--){let c=o[a];if(c.loc.index===s)return o[a]=t(i,n);if(c.loc.index<s)break}return this.raise(t,r,n)}updateContext(t){}unexpected(t,r){throw this.raise(_.UnexpectedToken,t??this.state.startLoc,{expected:r?Us(r):null})}expectPlugin(t,r){if(this.hasPlugin(t))return!0;throw this.raise(_.MissingPlugin,r??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(r=>this.hasPlugin(r)))throw this.raise(_.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(r,n,i)=>{this.raise(t,Zu(r,n,i))}}},Ub=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},jb=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ub)}exit(){let t=this.stack.pop(),r=this.current();for(let[n,i]of Array.from(t.undefinedPrivateNames))r?r.undefinedPrivateNames.has(n)||r.undefinedPrivateNames.set(n,i):this.parser.raise(_.InvalidPrivateFieldResolution,i,{identifierName:n})}declarePrivateName(t,r,n){let{privateNames:i,loneAccessors:s,undefinedPrivateNames:o}=this.current(),a=i.has(t);if(r&3){let c=a&&s.get(t);if(c){let u=c&4,l=r&4,p=c&3,d=r&3;a=p===d||u!==l,a||s.delete(t)}else a||s.set(t,r)}a&&this.parser.raise(_.PrivateNameRedeclaration,n,{identifierName:t}),i.add(t),o.delete(t)}usePrivateName(t,r){let n;for(n of this.stack)if(n.privateNames.has(t))return;n?n.undefinedPrivateNames.set(t,r):this.parser.raise(_.InvalidPrivateFieldResolution,r,{identifierName:t})}},rc=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},xf=class extends rc{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,r){let n=r.index;this.declarationErrors.set(n,[t,r])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},qb=class{constructor(t){this.parser=void 0,this.stack=[new rc],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,r){let n=r.loc.start,{stack:i}=this,s=i.length-1,o=i[s];for(;!o.isCertainlyParameterDeclaration();){if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(t,n);else return;o=i[--s]}this.parser.raise(t,n)}recordArrowParameterBindingError(t,r){let{stack:n}=this,i=n[n.length-1],s=r.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(t,s);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,s);else return}recordAsyncArrowParametersError(t){let{stack:r}=this,n=r.length-1,i=r[n];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(_.AwaitBindingIdentifier,t),i=r[--n]}validateAsPattern(){let{stack:t}=this,r=t[t.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([n,i])=>{this.parser.raise(n,i);let s=t.length-2,o=t[s];for(;o.canBeArrowParameterDeclaration();)o.clearDeclarationError(i.index),o=t[--s]})}};function lW(){return new rc(3)}function pW(){return new xf(1)}function dW(){return new xf(2)}function QF(){return new rc}var Gb=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function gf(e,t){return(e?2:0)|(t?1:0)}var zb=class extends $b{addExtra(t,r,n,i=!0){if(!t)return;let{extra:s}=t;s==null&&(s={},t.extra=s),i?s[r]=n:Object.defineProperty(s,r,{enumerable:i,value:n})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,r){let n=t+r.length;if(this.input.slice(t,n)===r){let i=this.input.charCodeAt(n);return!(Qa(i)||(i&64512)===55296)}return!1}isLookaheadContextual(t){let r=this.nextTokenStart();return this.isUnparsedContextual(r,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,r){if(!this.eatContextual(t)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return kF(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return kF(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(_.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,r){this.eat(t)||this.unexpected(r,t)}tryParse(t,r=this.state.clone()){let n={node:null};try{let i=t((s=null)=>{throw n.node=s,n});if(this.state.errors.length>r.errors.length){let s=this.state;return this.state=r,this.state.tokensLength=s.tokensLength,{node:i,error:s.errors[r.errors.length],thrown:!1,aborted:!1,failState:s}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let s=this.state;if(this.state=r,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:s};if(i===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:s};throw i}}checkExpressionErrors(t,r){if(!t)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:i,privateKeyLoc:s,optionalParametersLoc:o}=t,a=!!n||!!i||!!o||!!s;if(!r)return a;n!=null&&this.raise(_.InvalidCoverInitializedName,n),i!=null&&this.raise(_.DuplicateProto,i),s!=null&&this.raise(_.UnexpectedPrivateField,s),o!=null&&this.unexpected(o)}isLiteralPropertyName(){return qF(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let r=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let s=this.scope,o=this.getScopeHandler();this.scope=new o(this,t);let a=this.prodParam;this.prodParam=new Gb;let c=this.classScope;this.classScope=new jb(this);let u=this.expressionScope;return this.expressionScope=new qb(this),()=>{this.state.labels=r,this.exportedIdentifiers=n,this.inModule=i,this.scope=s,this.prodParam=a,this.classScope=c,this.expressionScope=u}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:r}=t;r!==null&&this.expectPlugin("destructuringPrivate",r)}},ec=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},nc=class{constructor(t,r,n){this.type="",this.start=r,this.end=0,this.loc=new tc(n),t!=null&&t.options.ranges&&(this.range=[r,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},ox=nc.prototype;ox.__clone=function(){let e=new nc(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let i=t[r];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(e[i]=this[i])}return e};function fW(e){return ps(e)}function ps(e){let{type:t,start:r,end:n,loc:i,range:s,extra:o,name:a}=e,c=Object.create(ox);return c.type=t,c.start=r,c.end=n,c.loc=i,c.range=s,c.extra=o,c.name=a,t==="Placeholder"&&(c.expectedNode=e.expectedNode),c}function mW(e){let{type:t,start:r,end:n,loc:i,range:s,extra:o}=e;if(t==="Placeholder")return fW(e);let a=Object.create(ox);return a.type=t,a.start=r,a.end=n,a.loc=i,a.range=s,e.raw!==void 0?a.raw=e.raw:a.extra=o,a.value=e.value,a}var Hb=class extends zb{startNode(){let t=this.state.startLoc;return new nc(this,t.index,t)}startNodeAt(t){return new nc(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,r){return this.finishNodeAt(t,r,this.state.lastTokEndLoc)}finishNodeAt(t,r,n){return t.type=r,t.end=n.index,t.loc.end=n,this.options.ranges&&(t.range[1]=n.index),this.options.attachComment&&this.processComment(t),t}resetStartLocation(t,r){t.start=r.index,t.loc.start=r,this.options.ranges&&(t.range[0]=r.index)}resetEndLocation(t,r=this.state.lastTokEndLoc){t.end=r.index,t.loc.end=r,this.options.ranges&&(t.range[1]=r.index)}resetStartLocationFromNode(t,r){this.resetStartLocation(t,r.loc.start)}},hW=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),me=ls`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function gW(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function OF(e){return e.importKind==="type"||e.importKind==="typeof"}var yW={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function bW(e,t){let r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?r:n).push(e[i]);return[r,n]}var xW=/\*?\s*@((?:no)?flow)\b/,vW=e=>class extends e{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return Rb}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(r,n){r!==133&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,n)}addComment(r){if(this.flowPragma===void 0){let n=xW.exec(r.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let n=this.state.inType;this.state.inType=!0,this.expect(r||14);let i=this.flowParseType();return this.state.inType=n,i}flowParsePredicate(){let r=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(me.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,i=null;return this.match(54)?(this.state.inType=r,i=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=r,this.match(54)&&(i=this.flowParsePredicate())),[n,i]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let n=r.id=this.parseIdentifier(),i=this.startNode(),s=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return i.params=o.params,i.rest=o.rest,i.this=o._this,this.expect(11),[i.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(s,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,n){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(n&&this.raise(me.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,n);this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(133)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let n=r.body=this.startNode(),i=n.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(me.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(a)):(this.expectContextual(125,me.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),i.push(a)}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let s=null,o=!1;return i.forEach(a=>{gW(a)?(s==="CommonJS"&&this.raise(me.AmbiguousDeclareModuleKind,a),s="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(me.DuplicateDeclareModuleExports,a),s==="ES"&&this.raise(me.AmbiguousDeclareModuleKind,a),s="CommonJS",o=!0)}),r.kind=s||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let i=this.state.value;throw this.raise(me.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:yW[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"&&(r.type="ExportDeclaration",r.default=!1,delete r.exportKind),r.type="Declare"+r.type,r;this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let n=this.flowParseTypeAlias(r);return n.type="DeclareTypeAlias",n}flowParseDeclareOpaqueType(r){this.next();let n=this.flowParseOpaqueType(r,!0);return n.type="DeclareOpaqueType",n}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,n){if(r.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(r.id.name,n?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(me.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,n,i){hW.has(r)&&this.raise(i?me.AssignReservedType:me.UnexpectedReservedType,n,{reservedType:r})}flowParseRestrictedIdentifier(r,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,n){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,n||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){let n=this.state.startLoc,i=this.startNode(),s=this.flowParseVariance(),o=this.flowParseTypeAnnotatableIdentifier();return i.name=o.name,i.variance=s,i.bound=o.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):r&&this.raise(me.MissingTypeParamDefault,n),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let s=this.flowParseTypeParameter(i);n.params.push(s),s.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(n,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let r=this.startNode(),n=this.state.inType;r.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let r=this.startNode(),n=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,n,i){return r.static=n,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=i,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,n){return r.static=n,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,n){let i=this.startNode();return r.static=n,r.value=this.flowParseObjectTypeMethodish(i),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:n,allowSpread:i,allowProto:s,allowInexact:o}){let a=this.state.inType;this.state.inType=!0;let c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];let u,l,p=!1;for(n&&this.match(6)?(this.expect(6),u=9,l=!0):(this.expect(5),u=8,l=!1),c.exact=l;!this.match(u);){let h=!1,m=null,g=null,y=this.startNode();if(s&&this.isContextual(118)){let v=this.lookahead();v.type!==14&&v.type!==17&&(this.next(),m=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let v=this.lookahead();v.type!==14&&v.type!==17&&(this.next(),h=!0)}let b=this.flowParseVariance();if(this.eat(0))m!=null&&this.unexpected(m),this.eat(0)?(b&&this.unexpected(b.loc.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(y,h))):c.indexers.push(this.flowParseObjectTypeIndexer(y,h,b));else if(this.match(10)||this.match(47))m!=null&&this.unexpected(m),b&&this.unexpected(b.loc.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(y,h));else{let v="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();qF(x.type)&&(v=this.state.value,this.next())}let C=this.flowParseObjectTypeProperty(y,h,m,b,v,i,o??!l);C===null?(p=!0,g=this.state.lastTokStartLoc):c.properties.push(C)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(me.UnexpectedExplicitInexactInObject,g)}this.expect(u),i&&(c.inexact=p);let d=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=a,d}flowParseObjectTypeProperty(r,n,i,s,o,a,c){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?c||this.raise(me.InexactInsideExact,this.state.lastTokStartLoc):this.raise(me.InexactInsideNonObject,this.state.lastTokStartLoc),s&&this.raise(me.InexactVariance,s),null):(a||this.raise(me.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),s&&this.raise(me.SpreadVariance,s),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=n,r.proto=i!=null,r.kind=o;let u=!1;return this.match(47)||this.match(10)?(r.method=!0,i!=null&&this.unexpected(i),s&&this.unexpected(s.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(r),!a&&r.key.name==="constructor"&&r.value.this&&this.raise(me.ThisParamBannedInConstructor,r.value.this)):(o!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(u=!0),r.value=this.flowParseTypeInitialiser(),r.variance=s),r.optional=u,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let n=r.kind==="get"?0:1,i=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?me.GetterMayNotHaveThisParam:me.SetterMayNotHaveThisParam,r.value.this),i!==n&&this.raise(r.kind==="get"?_.BadGetterArity:_.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(_.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,n){var i;(i=r)!=null||(r=this.state.startLoc);let s=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(r);o.qualification=s,o.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(o,"QualifiedTypeIdentifier")}return s}flowParseGenericType(r,n){let i=this.startNodeAt(r);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(r,n),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let n=null,i=!1,s=null,o=this.startNode(),a=this.lookahead(),c=this.state.type===78;return a.type===14||a.type===17?(c&&!r&&this.raise(me.ThisParamMustBeFirst,o),n=this.parseIdentifier(c),this.eat(17)&&(i=!0,c&&this.raise(me.ThisParamMayNotBeOptional,o)),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),o.name=n,o.optional=i,o.typeAnnotation=s,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let n=this.startNodeAt(r.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let n=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:r,rest:n,_this:i}}flowIdentToTypeAnnotation(r,n,i){switch(i.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(r,i)}}flowParsePrimaryType(){let r=this.state.startLoc,n=this.startNode(),i,s,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=a,s;case 47:{let c=this.startNode();return c.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),c.params=i.params,c.rest=i.rest,c.this=i._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),this.finishNode(c,"FunctionTypeAnnotation")}case 10:{let c=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(ze(this.state.type)||this.match(78)){let u=this.lookahead().type;o=u!==17&&u!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),s;this.eat(12)}return s?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):i=this.flowParseFunctionTypeParams(),c.params=i.params,c.rest=i.rest,c.this=i._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),c.typeParameters=null,this.finishNode(c,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(me.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(nx(this.state.type)){let c=Us(this.state.type);return this.next(),super.createIdentifier(n,c)}else if(ze(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,n=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let s=this.startNodeAt(r),o=this.eat(18);i=i||o,this.expect(0),!o&&this.match(3)?(s.elementType=n,this.next(),n=this.finishNode(s,"ArrayTypeAnnotation")):(s.objectType=n,s.indexType=this.flowParseType(),this.expect(3),i?(s.optional=o,n=this.finishNode(s,"OptionalIndexedAccessType")):n=this.finishNode(s,"IndexedAccessType"))}return n}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(r.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(r)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(r.types=[n];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?n:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(r.types=[n];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?n:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=r,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(r,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){let n=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(n)),n}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,n,i=!1){if(n){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,i));return}super.parseFunctionBody(r,!1,i)}parseFunctionBodyAndFinish(r,n,i=!1){if(this.match(14)){let s=this.startNode();[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,n,i)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(Qn(i.type)){let s=this.startNode();return this.next(),this.flowParseInterface(s)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let n=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(r,n,i){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||ze(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(ze(this.state.type)){if(n.name==="interface")return this.flowParseInterface(r);if(n.name==="type")return this.flowParseTypeAlias(r);if(n.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,n,i)}shouldParseExportDeclaration(){let{type:r}=this.state;return IF(r)||this.shouldParseEnums()&&r===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return IF(r)||this.shouldParseEnums()&&r===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,n,i){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(i),r}this.expect(17);let s=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(n),{consequent:c,failed:u}=this.tryParseConditionalConsequent(),[l,p]=this.getArrowLikeExpressions(c);if(u||p.length>0){let d=[...o];if(p.length>0){this.state=s,this.state.noArrowAt=d;for(let h=0;h<p.length;h++)d.push(p[h].start);({consequent:c,failed:u}=this.tryParseConditionalConsequent()),[l,p]=this.getArrowLikeExpressions(c)}u&&l.length>1&&this.raise(me.AmbiguousConditionalArrow,s.startLoc),u&&l.length===1&&(this.state=s,d.push(l[0].start),this.state.noArrowAt=d,{consequent:c,failed:u}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=o,this.expect(14),a.test=r,a.consequent=c,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:n}}getArrowLikeExpressions(r,n){let i=[r],s=[];for(;i.length!==0;){let o=i.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):s.push(o),i.push(o.body)):o.type==="ConditionalExpression"&&(i.push(o.consequent),i.push(o.alternate))}return n?(s.forEach(o=>this.finishArrowValidation(o)),[s,[]]):bW(s,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(r){var n;this.toAssignableList(r.params,(n=r.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,n){let i;return this.state.noArrowParamsConversionAt.includes(r.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),i=n(),this.state.noArrowParamsConversionAt.pop()):i=n(),i}parseParenItem(r,n){let i=super.parseParenItem(r,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(n);return s.expression=i,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return i}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.shouldParseEnums()&&this.isContextual(126)){r.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:n}=this.state,i=super.maybeParseExportNamespaceSpecifier(r);return i&&r.exportKind==="type"&&this.unexpected(n),i}parseClassId(r,n,i){super.parseClassId(r,n,i),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,n,i){let{startLoc:s}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,n))return;n.declare=!0}super.parseClassMember(r,n,i),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(me.DeclareClassElement,s):n.value&&this.raise(me.DeclareClassFieldInitializer,n.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),n="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(_.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(r){let n=this.input.charCodeAt(this.state.pos+1);r===123&&n===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?n===46?this.finishOp(18,2):this.finishOp(17,1):eW(r,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,n){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,n):super.isAssignable(r,n)}toAssignable(r,n=!1){!n&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,n)}toAssignableList(r,n,i){for(let s=0;s<r.length;s++){let o=r[s];o?.type==="TypeCastExpression"&&(r[s]=this.typeCastToParameter(o))}super.toAssignableList(r,n,i)}toReferencedList(r,n){for(let s=0;s<r.length;s++){var i;let o=r[s];o&&o.type==="TypeCastExpression"&&!((i=o.extra)!=null&&i.parenthesized)&&(r.length>1||!n)&&this.raise(me.TypeCastInPattern,o.typeAnnotation)}return r}parseArrayLike(r,n,i,s){let o=super.parseArrayLike(r,n,i,s);return n&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(r,n,i){return r==="TypeCastExpression"||super.isValidLVal(r,n,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,n,i,s,o,a){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,n,i,s,o,a),n.params&&o){let c=n.params;c.length>0&&this.isThisParam(c[0])&&this.raise(me.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&o&&n.value.params){let c=n.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(me.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(r,n,i,s){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,n,i,s)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&this.match(47)&&(r.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let n=r.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let n=this.getObjectOrClassMethodParams(r);if(n.length>0){let i=n[0];this.isThisParam(i)&&r.kind==="get"?this.raise(me.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(me.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,n,i,s,o,a,c){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let u;this.match(47)&&!a&&(u=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let l=super.parseObjPropValue(r,n,i,s,o,a,c);return u&&((l.value||l).typeParameters=u),l}parseAssignableListItemTypes(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(me.PatternIsOptional,r),this.isThisParam(r)&&this.raise(me.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(me.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(me.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,n){let i=super.parseMaybeDefault(r,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(me.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(me.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,n,i){n.local=OF(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(n,i))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!r&&this.isContextual(87)}applyImportPhase(r,n,i,s){if(super.applyImportPhase(r,n,i,s),n){if(!i&&this.match(65))return;r.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),r.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(r,n,i,s,o){let a=r.imported,c=null;a.type==="Identifier"&&(a.name==="type"?c="type":a.name==="typeof"&&(c="typeof"));let u=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);c!==null&&!Qn(this.state.type)?(r.imported=p,r.importKind=c,r.local=ps(p)):(r.imported=a,r.importKind=null,r.local=this.parseIdentifier())}else{if(c!==null&&Qn(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=c;else{if(n)throw this.raise(_.ImportBindingIsString,r,{importName:a.value});r.imported=a,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(u=!0,r.local=ps(r.imported))}let l=OF(r);return i&&l&&this.raise(me.ImportTypeShorthandOnlyInPureImport,r),(i||l)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),u&&!i&&!l&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,n){let i=r.kind;i!=="get"&&i!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){if(this.match(14)){let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(r,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,n){var i;let s=null,o;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(s=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(r,n),s),!o.error)return o.node;let{context:u}=this.state,l=u[u.length-1];(l===rt.j_oTag||l===rt.j_expr)&&u.pop()}if((i=o)!=null&&i.error||this.match(47)){var a,c;s=s||this.state.clone();let u,l=this.tryParse(d=>{var h;u=this.flowParseTypeParameterDeclaration();let m=this.forwardNoArrowParamsConversionAt(u,()=>{let y=super.parseMaybeAssign(r,n);return this.resetStartLocationFromNode(y,u),y});(h=m.extra)!=null&&h.parenthesized&&d();let g=this.maybeUnwrapTypeCastExpression(m);return g.type!=="ArrowFunctionExpression"&&d(),g.typeParameters=u,this.resetStartLocationFromNode(g,u),m},s),p=null;if(l.node&&this.maybeUnwrapTypeCastExpression(l.node).type==="ArrowFunctionExpression"){if(!l.error&&!l.aborted)return l.node.async&&this.raise(me.UnexpectedTypeParameterBeforeAsyncArrowFunction,u),l.node;p=l.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(p)return this.state=l.failState,p;throw(c=o)!=null&&c.thrown?o.error:l.thrown?l.error:this.raise(me.UnexpectedTokenAfterTypeParameter,u)}return super.parseMaybeAssign(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let s=this.startNode();return[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s});if(n.thrown)return null;n.error&&(this.state=n.failState),r.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,n){this.state.noArrowParamsConversionAt.includes(r.start)?r.params=n:super.setArrowFunctionParameters(r,n)}checkParams(r,n,i,s=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(r.start))){for(let o=0;o<r.params.length;o++)this.isThisParam(r.params[o])&&o>0&&this.raise(me.ThisParamMustBeFirst,r.params[o]);super.checkParams(r,n,i,s)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(r,n,i){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let s=this.startNodeAt(n);s.callee=r,s.arguments=super.parseCallExpressionArguments(11,!1),r=this.finishNode(s,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let s=this.state.clone(),o=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(n)||c(),s);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(r,n,i),s);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(r,n,i)}parseSubscript(r,n,i,s){if(this.match(18)&&this.isLookaheadToken_lt()){if(s.optionalChainMember=!0,i)return s.stop=!0,r;this.next();let o=this.startNodeAt(n);return o.callee=r,o.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),o.arguments=this.parseCallExpressionArguments(11,!1),o.optional=!0,this.finishCallExpression(o,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let o=this.startNodeAt(n);o.callee=r;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(11,!1),s.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,s.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(r,n,i,s)}parseNewCallee(r){super.parseNewCallee(r);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=n}parseAsyncArrowWithTypeParameters(r){let n=this.startNodeAt(r);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,n){let i=super.parseTopLevel(r,n);return this.state.hasFlowComment&&this.raise(me.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(me.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(r+n));)n++;let i=this.input.charCodeAt(n+r),s=this.input.charCodeAt(n+r+1);return i===58&&s===58?n+2:this.input.slice(n+r,n+r+12)==="flow-include"?n+12:i===58&&s!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(_.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:n,memberName:i}){this.raise(me.EnumBooleanMemberNotInitialized,r,{memberName:i,enumName:n})}flowEnumErrorInvalidMemberInitializer(r,n){return this.raise(n.explicitType?n.explicitType==="symbol"?me.EnumInvalidMemberInitializerSymbolType:me.EnumInvalidMemberInitializerPrimaryType:me.EnumInvalidMemberInitializerUnknownType,r,n)}flowEnumErrorNumberMemberNotInitialized(r,n){this.raise(me.EnumNumberMemberNotInitialized,r,n)}flowEnumErrorStringMemberInconsistentlyInitialized(r,n){this.raise(me.EnumStringMemberInconsistentlyInitialized,r,n)}flowEnumMemberInit(){let r=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 133:{let i=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,n=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:n,init:i}}flowEnumCheckExplicitTypeMismatch(r,n,i){let{explicitType:s}=n;s!==null&&s!==i&&this.flowEnumErrorInvalidMemberInitializer(r,n)}flowEnumMembers({enumName:r,explicitType:n}){let i=new Set,s={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:c,init:u}=this.flowEnumMemberRaw(),l=c.name;if(l==="")continue;/^[a-z]/.test(l)&&this.raise(me.EnumInvalidMemberName,c,{memberName:l,suggestion:l[0].toUpperCase()+l.slice(1),enumName:r}),i.has(l)&&this.raise(me.EnumDuplicateMemberName,c,{memberName:l,enumName:r}),i.add(l);let p={enumName:r,explicitType:n,memberName:l};switch(a.id=c,u.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"boolean"),a.init=u.value,s.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"number"),a.init=u.value,s.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"string"),a.init=u.value,s.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.loc,p);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.loc,p);break;default:s.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:s,hasUnknownMembers:o}}flowEnumStringMembers(r,n,{enumName:i}){if(r.length===0)return n;if(n.length===0)return r;if(n.length>r.length){for(let s of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return n}else{for(let s of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!ze(this.state.type))throw this.raise(me.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(me.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:n}),n}flowEnumBody(r,n){let i=n.name,s=n.loc.start,o=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:a,hasUnknownMembers:c}=this.flowEnumMembers({enumName:i,explicitType:o});switch(r.hasUnknownMembers=c,o){case"boolean":return r.explicitType=!0,r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=a.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let u=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let l=a.booleanMembers.length,p=a.numberMembers.length,d=a.stringMembers.length,h=a.defaultedMembers.length;if(!l&&!p&&!d&&!h)return u();if(!l&&!p)return r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!p&&!d&&l>=h){for(let m of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(m.loc.start,{enumName:i,memberName:m.id.name});return r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!l&&!d&&p>=h){for(let m of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(m.loc.start,{enumName:i,memberName:m.id.name});return r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(me.EnumInconsistentMemberValues,s,{enumName:i}),u()}}}flowParseEnumDeclaration(r){let n=this.parseIdentifier();return r.id=n,r.body=this.flowEnumBody(this.startNode(),n),this.finishNode(r,"EnumDeclaration")}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let n=this.input.charCodeAt(r+1);return n!==60&&n!==61}return!1}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},DW={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Oo=ls`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function $s(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function Xa(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return Xa(e.object)+"."+Xa(e.property);throw new Error("Node had unexpected type: "+e.type)}var CW=e=>class extends e{jsxReadToken(){let r="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Oo.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}r+=this.input.slice(n,this.state.pos),this.finishToken(141,r);return;case 38:r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:Za(i)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let n=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=r?`
|
|
19
|
+
`);case 114:return a("\r");case 120:{let u;return{code:u,pos:t}=Lb(e,t,r,n,2,!1,o,s),a(u===null?null:String.fromCharCode(u))}case 117:{let u;return{code:u,pos:t}=XF(e,t,r,n,o,s),a(u===null?null:String.fromCodePoint(u))}case 116:return a(" ");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:e.charCodeAt(t)===10&&++t;case 10:r=t,++n;case 8232:case 8233:return a("");case 56:case 57:if(i)return a(null);s.strictNumericEscape(t-1,r,n);default:if(c>=48&&c<=55){let u=t-1,p=/^[0-7]+/.exec(e.slice(u,t+2))[0],d=parseInt(p,8);d>255&&(p=p.slice(0,-1),d=parseInt(p,8)),t+=p.length-1;let h=e.charCodeAt(t);if(p!=="0"||h===56||h===57){if(i)return a(null);s.strictNumericEscape(u,r,n)}return a(String.fromCharCode(d))}return a(String.fromCharCode(c))}}function Lb(e,t,r,n,i,s,o,a){let c=t,u;return{n:u,pos:t}=JF(e,t,r,n,16,i,s,!1,a,!o),u===null&&(o?a.invalidEscapeSequence(c,r,n):t=c-1),{code:u,pos:t}}function JF(e,t,r,n,i,s,o,a,c,u){let l=t,p=i===16?NF.hex:NF.decBinOct,d=i===16?ff.hex:i===10?ff.dec:i===8?ff.oct:ff.bin,h=!1,m=0;for(let g=0,y=s??1/0;g<y;++g){let b=e.charCodeAt(t),v;if(b===95&&a!=="bail"){let C=e.charCodeAt(t-1),x=e.charCodeAt(t+1);if(a){if(Number.isNaN(x)||!d(x)||p.has(C)||p.has(x)){if(u)return{n:null,pos:t};c.unexpectedNumericSeparator(t,r,n)}}else{if(u)return{n:null,pos:t};c.numericSeparatorInEscapeSequence(t,r,n)}++t;continue}if(b>=97?v=b-97+10:b>=65?v=b-65+10:oW(b)?v=b-48:v=1/0,v>=i){if(v<=9&&u)return{n:null,pos:t};if(v<=9&&c.invalidDigit(t,r,n,i))v=0;else if(o)v=0,h=!0;else break}++t,m=m*i+v}return t===l||s!=null&&t-l!==s||h?{n:null,pos:t}:{n:m,pos:t}}function XF(e,t,r,n,i,s){let o=e.charCodeAt(t),a;if(o===123){if(++t,{code:a,pos:t}=Lb(e,t,r,n,e.indexOf("}",t)-t,!0,i,s),++t,a!==null&&a>1114111)if(i)s.invalidCodePoint(t,r,n);else return{code:null,pos:t}}else({code:a,pos:t}=Lb(e,t,r,n,4,!1,i,s));return{code:a,pos:t}}function Zu(e,t,r){return new Pi(r,e-t,e)}var uW=new Set([103,109,115,105,121,117,100,118]),Ai=class{constructor(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new tc(t.startLoc,t.endLoc)}},$b=class extends Bb{constructor(t,r){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(n,i,s,o)=>this.options.errorRecovery?(this.raise(_.InvalidDigit,Zu(n,i,s),{radix:o}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(_.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(_.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(_.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(_.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(n,i,s)=>{this.recordStrictModeErrors(_.StrictNumericEscape,Zu(n,i,s))},unterminated:(n,i,s)=>{throw this.raise(_.UnterminatedString,Zu(n-1,i,s))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(_.StrictNumericEscape),unterminated:(n,i,s)=>{throw this.raise(_.UnterminatedTemplate,Zu(n,i,s))}}),this.state=new Mb,this.state.init(t),this.input=r,this.length=r.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ai(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let r=this.state;return this.state=t,r}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return Tb.lastIndex=t,Tb.test(this.input)?Tb.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return Ab.lastIndex=t,Ab.test(this.input)?Ab.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let r=this.input.charCodeAt(t);if((r&64512)===55296&&++t<this.input.length){let n=this.input.charCodeAt(t);(n&64512)===56320&&(r=65536+((r&1023)<<10)+(n&1023))}return r}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([r,n])=>this.raise(r,n)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(139);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let r;this.isLookahead||(r=this.state.curPosition());let n=this.state.pos,i=this.input.indexOf(t,n+2);if(i===-1)throw this.raise(_.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,df.lastIndex=n+2;df.test(this.input)&&df.lastIndex<=i;)++this.state.curLine,this.state.lineStart=df.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(n+2,i),start:n,end:i+t.length,loc:new tc(r,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(t){let r=this.state.pos,n;this.isLookahead||(n=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!Za(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+t,s),start:r,end:s,loc:new tc(n,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let t=this.state.pos,r=[];e:for(;this.state.pos<this.length;){let n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),this.options.attachComment&&r.push(i));break}default:break e}break;default:if(sW(n))++this.state.pos;else if(n===45&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(t===0||this.state.lineStart>t)){let s=this.skipLineComment(3);s!==void 0&&(this.addComment(s),this.options.attachComment&&r.push(s))}else break e}else if(n===60&&!this.inModule&&this.options.annexB){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let s=this.skipLineComment(4);s!==void 0&&(this.addComment(s),this.options.attachComment&&r.push(s))}else break e}else break e}}if(r.length>0){let n=this.state.pos,i={start:t,end:n,comments:r,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,r){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let n=this.state.type;this.state.type=t,this.state.value=r,this.isLookahead||this.updateContext(n)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,r=this.codePointAtPos(t);if(r>=48&&r<=57)throw this.raise(_.UnexpectedDigitAfterHash,this.state.curPosition());if(r===123||r===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(r===123?_.RecordExpressionHashIncorrectStartSyntaxType:_.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,r===123?this.finishToken(7):this.finishToken(1)}else us(r)?(++this.state.pos,this.finishToken(138,this.readWord1(r))):r===92?(++this.state.pos,this.finishToken(138,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let r=this.state.pos;for(this.state.pos+=1;!Za(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let n=this.input.slice(r+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(t){let r=t===42?55:54,n=1,i=this.input.charCodeAt(this.state.pos+1);t===42&&i===42&&(n++,i=this.input.charCodeAt(this.state.pos+2),r=57),i===61&&!this.state.inType&&(n++,r=t===37?33:30),this.finishOp(r,n)}readToken_pipe_amp(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(r===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&r===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&r===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(r===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===t){this.finishOp(34,2);return}r===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(r===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,r=this.input.charCodeAt(t+1);if(r===62){let n=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+n)===61){this.finishOp(30,n+1);return}this.finishOp(52,n);return}if(r===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let r=this.input.charCodeAt(this.state.pos+1);if(r===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&r===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),r=this.input.charCodeAt(this.state.pos+2);t===63?r===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(r>=48&&r<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(_.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let r=this.input.charCodeAt(this.state.pos+1);if(r===120||r===88){this.readRadixNumber(16);return}if(r===111||r===79){this.readRadixNumber(8);return}if(r===98||r===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(us(t)){this.readWord(t);return}}throw this.raise(_.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,r){let n=this.input.slice(this.state.pos,this.state.pos+r);this.state.pos+=r,this.finishToken(t,n)}readRegexp(){let t=this.state.startLoc,r=this.state.start+1,n,i,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(_.UnterminatedRegExp,Ar(t,1));let u=this.input.charCodeAt(s);if(Za(u))throw this.raise(_.UnterminatedRegExp,Ar(t,1));if(n)n=!1;else{if(u===91)i=!0;else if(u===93&&i)i=!1;else if(u===47&&!i)break;n=u===92}}let o=this.input.slice(r,s);++s;let a="",c=()=>Ar(t,s+2-r);for(;s<this.length;){let u=this.codePointAtPos(s),l=String.fromCharCode(u);if(uW.has(u))u===118?a.includes("u")&&this.raise(_.IncompatibleRegExpUVFlags,c()):u===117&&a.includes("v")&&this.raise(_.IncompatibleRegExpUVFlags,c()),a.includes(l)&&this.raise(_.DuplicateRegExpFlags,c());else if(Qa(u)||u===92)this.raise(_.MalformedRegExpFlags,c());else break;++s,a+=l}this.state.pos=s,this.finishToken(137,{pattern:o,flags:a})}readInt(t,r,n=!1,i=!0){let{n:s,pos:o}=JF(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,r,n,i,this.errorHandlers_readInt,!1);return this.state.pos=o,s}readRadixNumber(t){let r=this.state.curPosition(),n=!1;this.state.pos+=2;let i=this.readInt(t);i==null&&this.raise(_.InvalidDigit,Ar(r,2),{radix:t});let s=this.input.charCodeAt(this.state.pos);if(s===110)++this.state.pos,n=!0;else if(s===109)throw this.raise(_.InvalidDecimal,r);if(us(this.codePointAtPos(this.state.pos)))throw this.raise(_.NumberIdentifier,this.state.curPosition());if(n){let o=this.input.slice(r.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(135,o);return}this.finishToken(134,i)}readNumber(t){let r=this.state.pos,n=this.state.curPosition(),i=!1,s=!1,o=!1,a=!1,c=!1;!t&&this.readInt(10)===null&&this.raise(_.InvalidNumber,this.state.curPosition());let u=this.state.pos-r>=2&&this.input.charCodeAt(r)===48;if(u){let h=this.input.slice(r,this.state.pos);if(this.recordStrictModeErrors(_.StrictOctalLiteral,n),!this.state.strict){let m=h.indexOf("_");m>0&&this.raise(_.ZeroDigitNumericSeparator,Ar(n,m))}c=u&&!/[89]/.test(h)}let l=this.input.charCodeAt(this.state.pos);if(l===46&&!c&&(++this.state.pos,this.readInt(10),i=!0,l=this.input.charCodeAt(this.state.pos)),(l===69||l===101)&&!c&&(l=this.input.charCodeAt(++this.state.pos),(l===43||l===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(_.InvalidOrMissingExponent,n),i=!0,a=!0,l=this.input.charCodeAt(this.state.pos)),l===110&&((i||u)&&this.raise(_.InvalidBigIntLiteral,n),++this.state.pos,s=!0),l===109&&(this.expectPlugin("decimal",this.state.curPosition()),(a||u)&&this.raise(_.InvalidDecimal,n),++this.state.pos,o=!0),us(this.codePointAtPos(this.state.pos)))throw this.raise(_.NumberIdentifier,this.state.curPosition());let p=this.input.slice(r,this.state.pos).replace(/[_mn]/g,"");if(s){this.finishToken(135,p);return}if(o){this.finishToken(136,p);return}let d=c?parseInt(p,8):parseFloat(p);this.finishToken(134,d)}readCodePoint(t){let{code:r,pos:n}=XF(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=n,r}readString(t){let{str:r,pos:n,curLine:i,lineStart:s}=RF(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=s,this.state.curLine=i,this.finishToken(133,r)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:r,firstInvalidLoc:n,pos:i,curLine:s,lineStart:o}=RF("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new Pi(n.curLine,n.pos-n.lineStart,n.pos)),this.input.codePointAt(i)===96?this.finishToken(24,n?null:t+r+"`"):(this.state.pos++,this.finishToken(25,n?null:t+r+"${"))}recordStrictModeErrors(t,r){let n=r.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(t,r):this.state.strictErrors.set(n,[t,r])}readWord1(t){this.state.containsEsc=!1;let r="",n=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let s=this.codePointAtPos(this.state.pos);if(Qa(s))this.state.pos+=s<=65535?1:2;else if(s===92){this.state.containsEsc=!0,r+=this.input.slice(i,this.state.pos);let o=this.state.curPosition(),a=this.state.pos===n?us:Qa;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(_.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let c=this.readCodePoint(!0);c!==null&&(a(c)||this.raise(_.EscapedCharNotAnIdentifier,o),r+=String.fromCodePoint(c)),i=this.state.pos}else break}return r+this.input.slice(i,this.state.pos)}readWord(t){let r=this.readWord1(t),n=Xb.get(r);n!==void 0?this.finishToken(n,Us(n)):this.finishToken(132,r)}checkKeywordEscapes(){let{type:t}=this.state;nx(t)&&this.state.containsEsc&&this.raise(_.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:Us(t)})}raise(t,r,n={}){let i=r instanceof Pi?r:r.loc.start,s=t(i,n);if(!this.options.errorRecovery)throw s;return this.isLookahead||this.state.errors.push(s),s}raiseOverwrite(t,r,n={}){let i=r instanceof Pi?r:r.loc.start,s=i.index,o=this.state.errors;for(let a=o.length-1;a>=0;a--){let c=o[a];if(c.loc.index===s)return o[a]=t(i,n);if(c.loc.index<s)break}return this.raise(t,r,n)}updateContext(t){}unexpected(t,r){throw this.raise(_.UnexpectedToken,t??this.state.startLoc,{expected:r?Us(r):null})}expectPlugin(t,r){if(this.hasPlugin(t))return!0;throw this.raise(_.MissingPlugin,r??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(r=>this.hasPlugin(r)))throw this.raise(_.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(r,n,i)=>{this.raise(t,Zu(r,n,i))}}},Ub=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},jb=class{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Ub)}exit(){let t=this.stack.pop(),r=this.current();for(let[n,i]of Array.from(t.undefinedPrivateNames))r?r.undefinedPrivateNames.has(n)||r.undefinedPrivateNames.set(n,i):this.parser.raise(_.InvalidPrivateFieldResolution,i,{identifierName:n})}declarePrivateName(t,r,n){let{privateNames:i,loneAccessors:s,undefinedPrivateNames:o}=this.current(),a=i.has(t);if(r&3){let c=a&&s.get(t);if(c){let u=c&4,l=r&4,p=c&3,d=r&3;a=p===d||u!==l,a||s.delete(t)}else a||s.set(t,r)}a&&this.parser.raise(_.PrivateNameRedeclaration,n,{identifierName:t}),i.add(t),o.delete(t)}usePrivateName(t,r){let n;for(n of this.stack)if(n.privateNames.has(t))return;n?n.undefinedPrivateNames.set(t,r):this.parser.raise(_.InvalidPrivateFieldResolution,r,{identifierName:t})}},rc=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},xf=class extends rc{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,r){let n=r.index;this.declarationErrors.set(n,[t,r])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},qb=class{constructor(t){this.parser=void 0,this.stack=[new rc],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,r){let n=r.loc.start,{stack:i}=this,s=i.length-1,o=i[s];for(;!o.isCertainlyParameterDeclaration();){if(o.canBeArrowParameterDeclaration())o.recordDeclarationError(t,n);else return;o=i[--s]}this.parser.raise(t,n)}recordArrowParameterBindingError(t,r){let{stack:n}=this,i=n[n.length-1],s=r.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(t,s);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,s);else return}recordAsyncArrowParametersError(t){let{stack:r}=this,n=r.length-1,i=r[n];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(_.AwaitBindingIdentifier,t),i=r[--n]}validateAsPattern(){let{stack:t}=this,r=t[t.length-1];r.canBeArrowParameterDeclaration()&&r.iterateErrors(([n,i])=>{this.parser.raise(n,i);let s=t.length-2,o=t[s];for(;o.canBeArrowParameterDeclaration();)o.clearDeclarationError(i.index),o=t[--s]})}};function lW(){return new rc(3)}function pW(){return new xf(1)}function dW(){return new xf(2)}function QF(){return new rc}var Gb=class{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function gf(e,t){return(e?2:0)|(t?1:0)}var zb=class extends $b{addExtra(t,r,n,i=!0){if(!t)return;let{extra:s}=t;s==null&&(s={},t.extra=s),i?s[r]=n:Object.defineProperty(s,r,{enumerable:i,value:n})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,r){let n=t+r.length;if(this.input.slice(t,n)===r){let i=this.input.charCodeAt(n);return!(Qa(i)||(i&64512)===55296)}return!1}isLookaheadContextual(t){let r=this.nextTokenStart();return this.isUnparsedContextual(r,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,r){if(!this.eatContextual(t)){if(r!=null)throw this.raise(r,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(139)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return kF(this.input,this.state.lastTokEndLoc.index,this.state.start)}hasFollowingLineBreak(){return kF(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(_.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,r){this.eat(t)||this.unexpected(r,t)}tryParse(t,r=this.state.clone()){let n={node:null};try{let i=t((s=null)=>{throw n.node=s,n});if(this.state.errors.length>r.errors.length){let s=this.state;return this.state=r,this.state.tokensLength=s.tokensLength,{node:i,error:s.errors[r.errors.length],thrown:!1,aborted:!1,failState:s}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let s=this.state;if(this.state=r,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:s};if(i===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:s};throw i}}checkExpressionErrors(t,r){if(!t)return!1;let{shorthandAssignLoc:n,doubleProtoLoc:i,privateKeyLoc:s,optionalParametersLoc:o}=t,a=!!n||!!i||!!o||!!s;if(!r)return a;n!=null&&this.raise(_.InvalidCoverInitializedName,n),i!=null&&this.raise(_.DuplicateProto,i),s!=null&&this.raise(_.UnexpectedPrivateField,s),o!=null&&this.unexpected(o)}isLiteralPropertyName(){return qF(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let r=this.state.labels;this.state.labels=[];let n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let s=this.scope,o=this.getScopeHandler();this.scope=new o(this,t);let a=this.prodParam;this.prodParam=new Gb;let c=this.classScope;this.classScope=new jb(this);let u=this.expressionScope;return this.expressionScope=new qb(this),()=>{this.state.labels=r,this.exportedIdentifiers=n,this.inModule=i,this.scope=s,this.prodParam=a,this.classScope=c,this.expressionScope=u}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:r}=t;r!==null&&this.expectPlugin("destructuringPrivate",r)}},ec=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},nc=class{constructor(t,r,n){this.type="",this.start=r,this.end=0,this.loc=new tc(n),t!=null&&t.options.ranges&&(this.range=[r,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},ox=nc.prototype;ox.__clone=function(){let e=new nc(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let i=t[r];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(e[i]=this[i])}return e};function fW(e){return ps(e)}function ps(e){let{type:t,start:r,end:n,loc:i,range:s,extra:o,name:a}=e,c=Object.create(ox);return c.type=t,c.start=r,c.end=n,c.loc=i,c.range=s,c.extra=o,c.name=a,t==="Placeholder"&&(c.expectedNode=e.expectedNode),c}function mW(e){let{type:t,start:r,end:n,loc:i,range:s,extra:o}=e;if(t==="Placeholder")return fW(e);let a=Object.create(ox);return a.type=t,a.start=r,a.end=n,a.loc=i,a.range=s,e.raw!==void 0?a.raw=e.raw:a.extra=o,a.value=e.value,a}var Hb=class extends zb{startNode(){let t=this.state.startLoc;return new nc(this,t.index,t)}startNodeAt(t){return new nc(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,r){return this.finishNodeAt(t,r,this.state.lastTokEndLoc)}finishNodeAt(t,r,n){return t.type=r,t.end=n.index,t.loc.end=n,this.options.ranges&&(t.range[1]=n.index),this.options.attachComment&&this.processComment(t),t}resetStartLocation(t,r){t.start=r.index,t.loc.start=r,this.options.ranges&&(t.range[0]=r.index)}resetEndLocation(t,r=this.state.lastTokEndLoc){t.end=r.index,t.loc.end=r,this.options.ranges&&(t.range[1]=r.index)}resetStartLocationFromNode(t,r){this.resetStartLocation(t,r.loc.start)}},hW=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),me=ls`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:e})=>`Unexpected reserved type ${e}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function gW(e){return e.type==="DeclareExportAllDeclaration"||e.type==="DeclareExportDeclaration"&&(!e.declaration||e.declaration.type!=="TypeAlias"&&e.declaration.type!=="InterfaceDeclaration")}function OF(e){return e.importKind==="type"||e.importKind==="typeof"}var yW={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function bW(e,t){let r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?r:n).push(e[i]);return[r,n]}var xW=/\*?\s*@((?:no)?flow)\b/,vW=e=>class extends e{constructor(...r){super(...r),this.flowPragma=void 0}getScopeHandler(){return Rb}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(r,n){r!==133&&r!==13&&r!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(r,n)}addComment(r){if(this.flowPragma===void 0){let n=xW.exec(r.value);if(n)if(n[1]==="flow")this.flowPragma="flow";else if(n[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(r)}flowParseTypeInitialiser(r){let n=this.state.inType;this.state.inType=!0,this.expect(r||14);let i=this.flowParseType();return this.state.inType=n,i}flowParsePredicate(){let r=this.startNode(),n=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>n.index+1&&this.raise(me.UnexpectedSpaceBetweenModuloChecks,n),this.eat(10)?(r.value=super.parseExpression(),this.expect(11),this.finishNode(r,"DeclaredPredicate")):this.finishNode(r,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let r=this.state.inType;this.state.inType=!0,this.expect(14);let n=null,i=null;return this.match(54)?(this.state.inType=r,i=this.flowParsePredicate()):(n=this.flowParseType(),this.state.inType=r,this.match(54)&&(i=this.flowParsePredicate())),[n,i]}flowParseDeclareClass(r){return this.next(),this.flowParseInterfaceish(r,!0),this.finishNode(r,"DeclareClass")}flowParseDeclareFunction(r){this.next();let n=r.id=this.parseIdentifier(),i=this.startNode(),s=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let o=this.flowParseFunctionTypeParams();return i.params=o.params,i.rest=o.rest,i.this=o._this,this.expect(11),[i.returnType,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),s.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),n.typeAnnotation=this.finishNode(s,"TypeAnnotation"),this.resetEndLocation(n),this.semicolon(),this.scope.declareName(r.id.name,2048,r.id.loc.start),this.finishNode(r,"DeclareFunction")}flowParseDeclare(r,n){if(this.match(80))return this.flowParseDeclareClass(r);if(this.match(68))return this.flowParseDeclareFunction(r);if(this.match(74))return this.flowParseDeclareVariable(r);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(r):(n&&this.raise(me.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(r));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(r);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(r);if(this.isContextual(129))return this.flowParseDeclareInterface(r);if(this.match(82))return this.flowParseDeclareExportDeclaration(r,n);this.unexpected()}flowParseDeclareVariable(r){return this.next(),r.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(r.id.name,5,r.id.loc.start),this.semicolon(),this.finishNode(r,"DeclareVariable")}flowParseDeclareModule(r){this.scope.enter(0),this.match(133)?r.id=super.parseExprAtom():r.id=this.parseIdentifier();let n=r.body=this.startNode(),i=n.body=[];for(this.expect(5);!this.match(8);){let a=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(me.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(a)):(this.expectContextual(125,me.UnsupportedStatementInDeclareModule),a=this.flowParseDeclare(a,!0)),i.push(a)}this.scope.exit(),this.expect(8),this.finishNode(n,"BlockStatement");let s=null,o=!1;return i.forEach(a=>{gW(a)?(s==="CommonJS"&&this.raise(me.AmbiguousDeclareModuleKind,a),s="ES"):a.type==="DeclareModuleExports"&&(o&&this.raise(me.DuplicateDeclareModuleExports,a),s==="ES"&&this.raise(me.AmbiguousDeclareModuleKind,a),s="CommonJS",o=!0)}),r.kind=s||"CommonJS",this.finishNode(r,"DeclareModule")}flowParseDeclareExportDeclaration(r,n){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?r.declaration=this.flowParseDeclare(this.startNode()):(r.declaration=this.flowParseType(),this.semicolon()),r.default=!0,this.finishNode(r,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!n){let i=this.state.value;throw this.raise(me.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:yW[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return r.declaration=this.flowParseDeclare(this.startNode()),r.default=!1,this.finishNode(r,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return r=this.parseExport(r,null),r.type==="ExportNamedDeclaration"&&(r.type="ExportDeclaration",r.default=!1,delete r.exportKind),r.type="Declare"+r.type,r;this.unexpected()}flowParseDeclareModuleExports(r){return this.next(),this.expectContextual(111),r.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(r,"DeclareModuleExports")}flowParseDeclareTypeAlias(r){this.next();let n=this.flowParseTypeAlias(r);return n.type="DeclareTypeAlias",n}flowParseDeclareOpaqueType(r){this.next();let n=this.flowParseOpaqueType(r,!0);return n.type="DeclareOpaqueType",n}flowParseDeclareInterface(r){return this.next(),this.flowParseInterfaceish(r,!1),this.finishNode(r,"DeclareInterface")}flowParseInterfaceish(r,n){if(r.id=this.flowParseRestrictedIdentifier(!n,!0),this.scope.declareName(r.id.name,n?17:8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(!n&&this.eat(12));if(n){if(r.implements=[],r.mixins=[],this.eatContextual(117))do r.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do r.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}r.body=this.flowParseObjectType({allowStatic:n,allowExact:!1,allowSpread:!1,allowProto:n,allowInexact:!1})}flowParseInterfaceExtends(){let r=this.startNode();return r.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?r.typeParameters=this.flowParseTypeParameterInstantiation():r.typeParameters=null,this.finishNode(r,"InterfaceExtends")}flowParseInterface(r){return this.flowParseInterfaceish(r,!1),this.finishNode(r,"InterfaceDeclaration")}checkNotUnderscore(r){r==="_"&&this.raise(me.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(r,n,i){hW.has(r)&&this.raise(i?me.AssignReservedType:me.UnexpectedReservedType,n,{reservedType:r})}flowParseRestrictedIdentifier(r,n){return this.checkReservedType(this.state.value,this.state.startLoc,n),this.parseIdentifier(r)}flowParseTypeAlias(r){return r.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(r,"TypeAlias")}flowParseOpaqueType(r,n){return this.expectContextual(130),r.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(r.id.name,8201,r.id.loc.start),this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,r.supertype=null,this.match(14)&&(r.supertype=this.flowParseTypeInitialiser(14)),r.impltype=null,n||(r.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(r,"OpaqueType")}flowParseTypeParameter(r=!1){let n=this.state.startLoc,i=this.startNode(),s=this.flowParseVariance(),o=this.flowParseTypeAnnotatableIdentifier();return i.name=o.name,i.variance=s,i.bound=o.typeAnnotation,this.match(29)?(this.eat(29),i.default=this.flowParseType()):r&&this.raise(me.MissingTypeParamDefault,n),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let r=this.state.inType,n=this.startNode();n.params=[],this.state.inType=!0,this.match(47)||this.match(142)?this.next():this.unexpected();let i=!1;do{let s=this.flowParseTypeParameter(i);n.params.push(s),s.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=r,this.finishNode(n,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let r=this.startNode(),n=this.state.inType;r.params=[],this.state.inType=!0,this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)r.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=i,this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let r=this.startNode(),n=this.state.inType;for(r.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)r.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=n,this.finishNode(r,"TypeParameterInstantiation")}flowParseInterfaceType(){let r=this.startNode();if(this.expectContextual(129),r.extends=[],this.eat(81))do r.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return r.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(r,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(134)||this.match(133)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(r,n,i){return r.static=n,this.lookahead().type===14?(r.id=this.flowParseObjectPropertyKey(),r.key=this.flowParseTypeInitialiser()):(r.id=null,r.key=this.flowParseType()),this.expect(3),r.value=this.flowParseTypeInitialiser(),r.variance=i,this.finishNode(r,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(r,n){return r.static=n,r.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(r.method=!0,r.optional=!1,r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start))):(r.method=!1,this.eat(17)&&(r.optional=!0),r.value=this.flowParseTypeInitialiser()),this.finishNode(r,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(r){for(r.params=[],r.rest=null,r.typeParameters=null,r.this=null,this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(r.this=this.flowParseFunctionTypeParam(!0),r.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(r.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),r.returnType=this.flowParseTypeInitialiser(),this.finishNode(r,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(r,n){let i=this.startNode();return r.static=n,r.value=this.flowParseObjectTypeMethodish(i),this.finishNode(r,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:r,allowExact:n,allowSpread:i,allowProto:s,allowInexact:o}){let a=this.state.inType;this.state.inType=!0;let c=this.startNode();c.callProperties=[],c.properties=[],c.indexers=[],c.internalSlots=[];let u,l,p=!1;for(n&&this.match(6)?(this.expect(6),u=9,l=!0):(this.expect(5),u=8,l=!1),c.exact=l;!this.match(u);){let h=!1,m=null,g=null,y=this.startNode();if(s&&this.isContextual(118)){let v=this.lookahead();v.type!==14&&v.type!==17&&(this.next(),m=this.state.startLoc,r=!1)}if(r&&this.isContextual(106)){let v=this.lookahead();v.type!==14&&v.type!==17&&(this.next(),h=!0)}let b=this.flowParseVariance();if(this.eat(0))m!=null&&this.unexpected(m),this.eat(0)?(b&&this.unexpected(b.loc.start),c.internalSlots.push(this.flowParseObjectTypeInternalSlot(y,h))):c.indexers.push(this.flowParseObjectTypeIndexer(y,h,b));else if(this.match(10)||this.match(47))m!=null&&this.unexpected(m),b&&this.unexpected(b.loc.start),c.callProperties.push(this.flowParseObjectTypeCallProperty(y,h));else{let v="init";if(this.isContextual(99)||this.isContextual(104)){let x=this.lookahead();qF(x.type)&&(v=this.state.value,this.next())}let C=this.flowParseObjectTypeProperty(y,h,m,b,v,i,o??!l);C===null?(p=!0,g=this.state.lastTokStartLoc):c.properties.push(C)}this.flowObjectTypeSemicolon(),g&&!this.match(8)&&!this.match(9)&&this.raise(me.UnexpectedExplicitInexactInObject,g)}this.expect(u),i&&(c.inexact=p);let d=this.finishNode(c,"ObjectTypeAnnotation");return this.state.inType=a,d}flowParseObjectTypeProperty(r,n,i,s,o,a,c){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?c||this.raise(me.InexactInsideExact,this.state.lastTokStartLoc):this.raise(me.InexactInsideNonObject,this.state.lastTokStartLoc),s&&this.raise(me.InexactVariance,s),null):(a||this.raise(me.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),s&&this.raise(me.SpreadVariance,s),r.argument=this.flowParseType(),this.finishNode(r,"ObjectTypeSpreadProperty"));{r.key=this.flowParseObjectPropertyKey(),r.static=n,r.proto=i!=null,r.kind=o;let u=!1;return this.match(47)||this.match(10)?(r.method=!0,i!=null&&this.unexpected(i),s&&this.unexpected(s.loc.start),r.value=this.flowParseObjectTypeMethodish(this.startNodeAt(r.loc.start)),(o==="get"||o==="set")&&this.flowCheckGetterSetterParams(r),!a&&r.key.name==="constructor"&&r.value.this&&this.raise(me.ThisParamBannedInConstructor,r.value.this)):(o!=="init"&&this.unexpected(),r.method=!1,this.eat(17)&&(u=!0),r.value=this.flowParseTypeInitialiser(),r.variance=s),r.optional=u,this.finishNode(r,"ObjectTypeProperty")}}flowCheckGetterSetterParams(r){let n=r.kind==="get"?0:1,i=r.value.params.length+(r.value.rest?1:0);r.value.this&&this.raise(r.kind==="get"?me.GetterMayNotHaveThisParam:me.SetterMayNotHaveThisParam,r.value.this),i!==n&&this.raise(r.kind==="get"?_.BadGetterArity:_.BadSetterArity,r),r.kind==="set"&&r.value.rest&&this.raise(_.BadSetterRestParameter,r)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(r,n){var i;(i=r)!=null||(r=this.state.startLoc);let s=n||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let o=this.startNodeAt(r);o.qualification=s,o.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(o,"QualifiedTypeIdentifier")}return s}flowParseGenericType(r,n){let i=this.startNodeAt(r);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(r,n),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let r=this.startNode();return this.expect(87),r.argument=this.flowParsePrimaryType(),this.finishNode(r,"TypeofTypeAnnotation")}flowParseTupleType(){let r=this.startNode();for(r.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(r.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(r,"TupleTypeAnnotation")}flowParseFunctionTypeParam(r){let n=null,i=!1,s=null,o=this.startNode(),a=this.lookahead(),c=this.state.type===78;return a.type===14||a.type===17?(c&&!r&&this.raise(me.ThisParamMustBeFirst,o),n=this.parseIdentifier(c),this.eat(17)&&(i=!0,c&&this.raise(me.ThisParamMayNotBeOptional,o)),s=this.flowParseTypeInitialiser()):s=this.flowParseType(),o.name=n,o.optional=i,o.typeAnnotation=s,this.finishNode(o,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(r){let n=this.startNodeAt(r.loc.start);return n.name=null,n.optional=!1,n.typeAnnotation=r,this.finishNode(n,"FunctionTypeParam")}flowParseFunctionTypeParams(r=[]){let n=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)r.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(n=this.flowParseFunctionTypeParam(!1)),{params:r,rest:n,_this:i}}flowIdentToTypeAnnotation(r,n,i){switch(i.name){case"any":return this.finishNode(n,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(n,"BooleanTypeAnnotation");case"mixed":return this.finishNode(n,"MixedTypeAnnotation");case"empty":return this.finishNode(n,"EmptyTypeAnnotation");case"number":return this.finishNode(n,"NumberTypeAnnotation");case"string":return this.finishNode(n,"StringTypeAnnotation");case"symbol":return this.finishNode(n,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(r,i)}}flowParsePrimaryType(){let r=this.state.startLoc,n=this.startNode(),i,s,o=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,s=this.flowParseTupleType(),this.state.noAnonFunctionType=a,s;case 47:{let c=this.startNode();return c.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),c.params=i.params,c.rest=i.rest,c.this=i._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),this.finishNode(c,"FunctionTypeAnnotation")}case 10:{let c=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(ze(this.state.type)||this.match(78)){let u=this.lookahead().type;o=u!==17&&u!==14}else o=!0;if(o){if(this.state.noAnonFunctionType=!1,s=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),s;this.eat(12)}return s?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(s)]):i=this.flowParseFunctionTypeParams(),c.params=i.params,c.rest=i.rest,c.this=i._this,this.expect(11),this.expect(19),c.returnType=this.flowParseType(),c.typeParameters=null,this.finishNode(c,"FunctionTypeAnnotation")}case 133:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(134))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(135))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(me.UnexpectedSubtractionOperand,this.state.startLoc)}this.unexpected();return;case 134:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 135:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(nx(this.state.type)){let c=Us(this.state.type);return this.next(),super.createIdentifier(n,c)}else if(ze(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let r=this.state.startLoc,n=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let s=this.startNodeAt(r),o=this.eat(18);i=i||o,this.expect(0),!o&&this.match(3)?(s.elementType=n,this.next(),n=this.finishNode(s,"ArrayTypeAnnotation")):(s.objectType=n,s.indexType=this.flowParseType(),this.expect(3),i?(s.optional=o,n=this.finishNode(s,"OptionalIndexedAccessType")):n=this.finishNode(s,"IndexedAccessType"))}return n}flowParsePrefixType(){let r=this.startNode();return this.eat(17)?(r.typeAnnotation=this.flowParsePrefixType(),this.finishNode(r,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let r=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let n=this.startNodeAt(r.loc.start);return n.params=[this.reinterpretTypeAsFunctionTypeParam(r)],n.rest=null,n.this=null,n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation")}return r}flowParseIntersectionType(){let r=this.startNode();this.eat(45);let n=this.flowParseAnonFunctionWithoutParens();for(r.types=[n];this.eat(45);)r.types.push(this.flowParseAnonFunctionWithoutParens());return r.types.length===1?n:this.finishNode(r,"IntersectionTypeAnnotation")}flowParseUnionType(){let r=this.startNode();this.eat(43);let n=this.flowParseIntersectionType();for(r.types=[n];this.eat(43);)r.types.push(this.flowParseIntersectionType());return r.types.length===1?n:this.finishNode(r,"UnionTypeAnnotation")}flowParseType(){let r=this.state.inType;this.state.inType=!0;let n=this.flowParseUnionType();return this.state.inType=r,n}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let r=this.state.startLoc,n=this.parseIdentifier();return this.flowParseGenericType(r,n)}else return this.flowParseType()}flowParseTypeAnnotation(){let r=this.startNode();return r.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(r,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(r){let n=r?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(n.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(n)),n}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}flowParseVariance(){let r=null;return this.match(53)?(r=this.startNode(),this.state.value==="+"?r.kind="plus":r.kind="minus",this.next(),this.finishNode(r,"Variance")):r}parseFunctionBody(r,n,i=!1){if(n){this.forwardNoArrowParamsConversionAt(r,()=>super.parseFunctionBody(r,!0,i));return}super.parseFunctionBody(r,!1,i)}parseFunctionBodyAndFinish(r,n,i=!1){if(this.match(14)){let s=this.startNode();[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.returnType=s.typeAnnotation?this.finishNode(s,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(r,n,i)}parseStatementLike(r){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(Qn(i.type)){let s=this.startNode();return this.next(),this.flowParseInterface(s)}}else if(this.shouldParseEnums()&&this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let n=super.parseStatementLike(r);return this.flowPragma===void 0&&!this.isValidDirective(n)&&(this.flowPragma=null),n}parseExpressionStatement(r,n,i){if(n.type==="Identifier"){if(n.name==="declare"){if(this.match(80)||ze(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(r)}else if(ze(this.state.type)){if(n.name==="interface")return this.flowParseInterface(r);if(n.name==="type")return this.flowParseTypeAlias(r);if(n.name==="opaque")return this.flowParseOpaqueType(r,!1)}}return super.parseExpressionStatement(r,n,i)}shouldParseExportDeclaration(){let{type:r}=this.state;return IF(r)||this.shouldParseEnums()&&r===126?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:r}=this.state;return IF(r)||this.shouldParseEnums()&&r===126?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(126)){let r=this.startNode();return this.next(),this.flowParseEnumDeclaration(r)}return super.parseExportDefaultExpression()}parseConditional(r,n,i){if(!this.match(17))return r;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(i),r}this.expect(17);let s=this.state.clone(),o=this.state.noArrowAt,a=this.startNodeAt(n),{consequent:c,failed:u}=this.tryParseConditionalConsequent(),[l,p]=this.getArrowLikeExpressions(c);if(u||p.length>0){let d=[...o];if(p.length>0){this.state=s,this.state.noArrowAt=d;for(let h=0;h<p.length;h++)d.push(p[h].start);({consequent:c,failed:u}=this.tryParseConditionalConsequent()),[l,p]=this.getArrowLikeExpressions(c)}u&&l.length>1&&this.raise(me.AmbiguousConditionalArrow,s.startLoc),u&&l.length===1&&(this.state=s,d.push(l[0].start),this.state.noArrowAt=d,{consequent:c,failed:u}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(c,!0),this.state.noArrowAt=o,this.expect(14),a.test=r,a.consequent=c,a.alternate=this.forwardNoArrowParamsConversionAt(a,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let r=this.parseMaybeAssignAllowIn(),n=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:r,failed:n}}getArrowLikeExpressions(r,n){let i=[r],s=[];for(;i.length!==0;){let o=i.pop();o.type==="ArrowFunctionExpression"&&o.body.type!=="BlockStatement"?(o.typeParameters||!o.returnType?this.finishArrowValidation(o):s.push(o),i.push(o.body)):o.type==="ConditionalExpression"&&(i.push(o.consequent),i.push(o.alternate))}return n?(s.forEach(o=>this.finishArrowValidation(o)),[s,[]]):bW(s,o=>o.params.every(a=>this.isAssignable(a,!0)))}finishArrowValidation(r){var n;this.toAssignableList(r.params,(n=r.extra)==null?void 0:n.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(r,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(r,n){let i;return this.state.noArrowParamsConversionAt.includes(r.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),i=n(),this.state.noArrowParamsConversionAt.pop()):i=n(),i}parseParenItem(r,n){let i=super.parseParenItem(r,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(n);return s.expression=i,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return i}assertModuleNodeAllowed(r){r.type==="ImportDeclaration"&&(r.importKind==="type"||r.importKind==="typeof")||r.type==="ExportNamedDeclaration"&&r.exportKind==="type"||r.type==="ExportAllDeclaration"&&r.exportKind==="type"||super.assertModuleNodeAllowed(r)}parseExportDeclaration(r){if(this.isContextual(130)){r.exportKind="type";let n=this.startNode();return this.next(),this.match(5)?(r.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(r),null):this.flowParseTypeAlias(n)}else if(this.isContextual(131)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}else if(this.isContextual(129)){r.exportKind="type";let n=this.startNode();return this.next(),this.flowParseInterface(n)}else if(this.shouldParseEnums()&&this.isContextual(126)){r.exportKind="value";let n=this.startNode();return this.next(),this.flowParseEnumDeclaration(n)}else return super.parseExportDeclaration(r)}eatExportStar(r){return super.eatExportStar(r)?!0:this.isContextual(130)&&this.lookahead().type===55?(r.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(r){let{startLoc:n}=this.state,i=super.maybeParseExportNamespaceSpecifier(r);return i&&r.exportKind==="type"&&this.unexpected(n),i}parseClassId(r,n,i){super.parseClassId(r,n,i),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(r,n,i){let{startLoc:s}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(r,n))return;n.declare=!0}super.parseClassMember(r,n,i),n.declare&&(n.type!=="ClassProperty"&&n.type!=="ClassPrivateProperty"&&n.type!=="PropertyDefinition"?this.raise(me.DeclareClassElement,s):n.value&&this.raise(me.DeclareClassFieldInitializer,n.value))}isIterator(r){return r==="iterator"||r==="asyncIterator"}readIterator(){let r=super.readWord1(),n="@@"+r;(!this.isIterator(r)||!this.state.inType)&&this.raise(_.InvalidIdentifier,this.state.curPosition(),{identifierName:n}),this.finishToken(132,n)}getTokenFromCode(r){let n=this.input.charCodeAt(this.state.pos+1);r===123&&n===124?this.finishOp(6,2):this.state.inType&&(r===62||r===60)?this.finishOp(r===62?48:47,1):this.state.inType&&r===63?n===46?this.finishOp(18,2):this.finishOp(17,1):eW(r,n,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(r)}isAssignable(r,n){return r.type==="TypeCastExpression"?this.isAssignable(r.expression,n):super.isAssignable(r,n)}toAssignable(r,n=!1){!n&&r.type==="AssignmentExpression"&&r.left.type==="TypeCastExpression"&&(r.left=this.typeCastToParameter(r.left)),super.toAssignable(r,n)}toAssignableList(r,n,i){for(let s=0;s<r.length;s++){let o=r[s];o?.type==="TypeCastExpression"&&(r[s]=this.typeCastToParameter(o))}super.toAssignableList(r,n,i)}toReferencedList(r,n){for(let s=0;s<r.length;s++){var i;let o=r[s];o&&o.type==="TypeCastExpression"&&!((i=o.extra)!=null&&i.parenthesized)&&(r.length>1||!n)&&this.raise(me.TypeCastInPattern,o.typeAnnotation)}return r}parseArrayLike(r,n,i,s){let o=super.parseArrayLike(r,n,i,s);return n&&!this.state.maybeInArrowParameters&&this.toReferencedList(o.elements),o}isValidLVal(r,n,i){return r==="TypeCastExpression"||super.isValidLVal(r,n,i)}parseClassProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(r)}parseClassPrivateProperty(r){return this.match(14)&&(r.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(r){return!this.match(14)&&super.isNonstaticConstructor(r)}pushClassMethod(r,n,i,s,o,a){if(n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(r,n,i,s,o,a),n.params&&o){let c=n.params;c.length>0&&this.isThisParam(c[0])&&this.raise(me.ThisParamBannedInConstructor,n)}else if(n.type==="MethodDefinition"&&o&&n.value.params){let c=n.value.params;c.length>0&&this.isThisParam(c[0])&&this.raise(me.ThisParamBannedInConstructor,n)}}pushClassPrivateMethod(r,n,i,s){n.variance&&this.unexpected(n.variance.loc.start),delete n.variance,this.match(47)&&(n.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(r,n,i,s)}parseClassSuper(r){if(super.parseClassSuper(r),r.superClass&&this.match(47)&&(r.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(113)){this.next();let n=r.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,n.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(r){super.checkGetterSetterParams(r);let n=this.getObjectOrClassMethodParams(r);if(n.length>0){let i=n[0];this.isThisParam(i)&&r.kind==="get"?this.raise(me.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(me.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(r){r.variance=this.flowParseVariance()}parseObjPropValue(r,n,i,s,o,a,c){r.variance&&this.unexpected(r.variance.loc.start),delete r.variance;let u;this.match(47)&&!a&&(u=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let l=super.parseObjPropValue(r,n,i,s,o,a,c);return u&&((l.value||l).typeParameters=u),l}parseAssignableListItemTypes(r){return this.eat(17)&&(r.type!=="Identifier"&&this.raise(me.PatternIsOptional,r),this.isThisParam(r)&&this.raise(me.ThisParamMayNotBeOptional,r),r.optional=!0),this.match(14)?r.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(r)&&this.raise(me.ThisParamAnnotationRequired,r),this.match(29)&&this.isThisParam(r)&&this.raise(me.ThisParamNoDefault,r),this.resetEndLocation(r),r}parseMaybeDefault(r,n){let i=super.parseMaybeDefault(r,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(me.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(me.ImportReflectionHasImportType,r.specifiers[0].loc.start)}parseImportSpecifierLocal(r,n,i){n.local=OF(r)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),r.specifiers.push(this.finishImportSpecifier(n,i))}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){if(!r)return!0;let n=this.lookaheadCharCode();return n===123||n===42}return!r&&this.isContextual(87)}applyImportPhase(r,n,i,s){if(super.applyImportPhase(r,n,i,s),n){if(!i&&this.match(65))return;r.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),r.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(r,n,i,s,o){let a=r.imported,c=null;a.type==="Identifier"&&(a.name==="type"?c="type":a.name==="typeof"&&(c="typeof"));let u=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let p=this.parseIdentifier(!0);c!==null&&!Qn(this.state.type)?(r.imported=p,r.importKind=c,r.local=ps(p)):(r.imported=a,r.importKind=null,r.local=this.parseIdentifier())}else{if(c!==null&&Qn(this.state.type))r.imported=this.parseIdentifier(!0),r.importKind=c;else{if(n)throw this.raise(_.ImportBindingIsString,r,{importName:a.value});r.imported=a,r.importKind=null}this.eatContextual(93)?r.local=this.parseIdentifier():(u=!0,r.local=ps(r.imported))}let l=OF(r);return i&&l&&this.raise(me.ImportTypeShorthandOnlyInPureImport,r),(i||l)&&this.checkReservedType(r.local.name,r.local.loc.start,!0),u&&!i&&!l&&this.checkReservedWord(r.local.name,r.loc.start,!0,!0),this.finishImportSpecifier(r,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(r,n){let i=r.kind;i!=="get"&&i!=="set"&&this.match(47)&&(r.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),this.match(14)&&(r.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){if(this.match(14)){let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,r.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(r,n)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(r,n){var i;let s=null,o;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(s=this.state.clone(),o=this.tryParse(()=>super.parseMaybeAssign(r,n),s),!o.error)return o.node;let{context:u}=this.state,l=u[u.length-1];(l===rt.j_oTag||l===rt.j_expr)&&u.pop()}if((i=o)!=null&&i.error||this.match(47)){var a,c;s=s||this.state.clone();let u,l=this.tryParse(d=>{var h;u=this.flowParseTypeParameterDeclaration();let m=this.forwardNoArrowParamsConversionAt(u,()=>{let y=super.parseMaybeAssign(r,n);return this.resetStartLocationFromNode(y,u),y});(h=m.extra)!=null&&h.parenthesized&&d();let g=this.maybeUnwrapTypeCastExpression(m);return g.type!=="ArrowFunctionExpression"&&d(),g.typeParameters=u,this.resetStartLocationFromNode(g,u),m},s),p=null;if(l.node&&this.maybeUnwrapTypeCastExpression(l.node).type==="ArrowFunctionExpression"){if(!l.error&&!l.aborted)return l.node.async&&this.raise(me.UnexpectedTypeParameterBeforeAsyncArrowFunction,u),l.node;p=l.node}if((a=o)!=null&&a.node)return this.state=o.failState,o.node;if(p)return this.state=l.failState,p;throw(c=o)!=null&&c.thrown?o.error:l.thrown?l.error:this.raise(me.UnexpectedTokenAfterTypeParameter,u)}return super.parseMaybeAssign(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let s=this.startNode();return[s.typeAnnotation,r.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s});if(n.thrown)return null;n.error&&(this.state=n.failState),r.returnType=n.node.typeAnnotation?this.finishNode(n.node,"TypeAnnotation"):null}return super.parseArrow(r)}shouldParseArrow(r){return this.match(14)||super.shouldParseArrow(r)}setArrowFunctionParameters(r,n){this.state.noArrowParamsConversionAt.includes(r.start)?r.params=n:super.setArrowFunctionParameters(r,n)}checkParams(r,n,i,s=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(r.start))){for(let o=0;o<r.params.length;o++)this.isThisParam(r.params[o])&&o>0&&this.raise(me.ThisParamMustBeFirst,r.params[o]);super.checkParams(r,n,i,s)}}parseParenAndDistinguishExpression(r){return super.parseParenAndDistinguishExpression(r&&!this.state.noArrowAt.includes(this.state.start))}parseSubscripts(r,n,i){if(r.type==="Identifier"&&r.name==="async"&&this.state.noArrowAt.includes(n.index)){this.next();let s=this.startNodeAt(n);s.callee=r,s.arguments=super.parseCallExpressionArguments(11,!1),r=this.finishNode(s,"CallExpression")}else if(r.type==="Identifier"&&r.name==="async"&&this.match(47)){let s=this.state.clone(),o=this.tryParse(c=>this.parseAsyncArrowWithTypeParameters(n)||c(),s);if(!o.error&&!o.aborted)return o.node;let a=this.tryParse(()=>super.parseSubscripts(r,n,i),s);if(a.node&&!a.error)return a.node;if(o.node)return this.state=o.failState,o.node;if(a.node)return this.state=a.failState,a.node;throw o.error||a.error}return super.parseSubscripts(r,n,i)}parseSubscript(r,n,i,s){if(this.match(18)&&this.isLookaheadToken_lt()){if(s.optionalChainMember=!0,i)return s.stop=!0,r;this.next();let o=this.startNodeAt(n);return o.callee=r,o.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),o.arguments=this.parseCallExpressionArguments(11,!1),o.optional=!0,this.finishCallExpression(o,!0)}else if(!i&&this.shouldParseTypes()&&this.match(47)){let o=this.startNodeAt(n);o.callee=r;let a=this.tryParse(()=>(o.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),o.arguments=super.parseCallExpressionArguments(11,!1),s.optionalChainMember&&(o.optional=!1),this.finishCallExpression(o,s.optionalChainMember)));if(a.node)return a.error&&(this.state=a.failState),a.node}return super.parseSubscript(r,n,i,s)}parseNewCallee(r){super.parseNewCallee(r);let n=null;this.shouldParseTypes()&&this.match(47)&&(n=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),r.typeArguments=n}parseAsyncArrowWithTypeParameters(r){let n=this.startNodeAt(r);if(this.parseFunctionParams(n,!1),!!this.parseArrow(n))return super.parseArrowExpression(n,void 0,!0)}readToken_mult_modulo(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===42&&n===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(r)}readToken_pipe_amp(r){let n=this.input.charCodeAt(this.state.pos+1);if(r===124&&n===125){this.finishOp(9,2);return}super.readToken_pipe_amp(r)}parseTopLevel(r,n){let i=super.parseTopLevel(r,n);return this.state.hasFlowComment&&this.raise(me.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(me.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let r=this.skipFlowComment();r&&(this.state.pos+=r,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:r}=this.state,n=2;for(;[32,9].includes(this.input.charCodeAt(r+n));)n++;let i=this.input.charCodeAt(n+r),s=this.input.charCodeAt(n+r+1);return i===58&&s===58?n+2:this.input.slice(n+r,n+r+12)==="flow-include"?n+12:i===58&&s!==58?n:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(_.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(r,{enumName:n,memberName:i}){this.raise(me.EnumBooleanMemberNotInitialized,r,{memberName:i,enumName:n})}flowEnumErrorInvalidMemberInitializer(r,n){return this.raise(n.explicitType?n.explicitType==="symbol"?me.EnumInvalidMemberInitializerSymbolType:me.EnumInvalidMemberInitializerPrimaryType:me.EnumInvalidMemberInitializerUnknownType,r,n)}flowEnumErrorNumberMemberNotInitialized(r,n){this.raise(me.EnumNumberMemberNotInitialized,r,n)}flowEnumErrorStringMemberInconsistentlyInitialized(r,n){this.raise(me.EnumStringMemberInconsistentlyInitialized,r,n)}flowEnumMemberInit(){let r=this.state.startLoc,n=()=>this.match(12)||this.match(8);switch(this.state.type){case 134:{let i=this.parseNumericLiteral(this.state.value);return n()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 133:{let i=this.parseStringLiteral(this.state.value);return n()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return n()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:r}}default:return{type:"invalid",loc:r}}}flowEnumMemberRaw(){let r=this.state.startLoc,n=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:r};return{id:n,init:i}}flowEnumCheckExplicitTypeMismatch(r,n,i){let{explicitType:s}=n;s!==null&&s!==i&&this.flowEnumErrorInvalidMemberInitializer(r,n)}flowEnumMembers({enumName:r,explicitType:n}){let i=new Set,s={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},o=!1;for(;!this.match(8);){if(this.eat(21)){o=!0;break}let a=this.startNode(),{id:c,init:u}=this.flowEnumMemberRaw(),l=c.name;if(l==="")continue;/^[a-z]/.test(l)&&this.raise(me.EnumInvalidMemberName,c,{memberName:l,suggestion:l[0].toUpperCase()+l.slice(1),enumName:r}),i.has(l)&&this.raise(me.EnumDuplicateMemberName,c,{memberName:l,enumName:r}),i.add(l);let p={enumName:r,explicitType:n,memberName:l};switch(a.id=c,u.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"boolean"),a.init=u.value,s.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"number"),a.init=u.value,s.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(u.loc,p,"string"),a.init=u.value,s.stringMembers.push(this.finishNode(a,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(u.loc,p);case"none":switch(n){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(u.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(u.loc,p);break;default:s.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:s,hasUnknownMembers:o}}flowEnumStringMembers(r,n,{enumName:i}){if(r.length===0)return n;if(n.length===0)return r;if(n.length>r.length){for(let s of r)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return n}else{for(let s of n)this.flowEnumErrorStringMemberInconsistentlyInitialized(s,{enumName:i});return r}}flowEnumParseExplicitType({enumName:r}){if(!this.eatContextual(102))return null;if(!ze(this.state.type))throw this.raise(me.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:r});let{value:n}=this.state;return this.next(),n!=="boolean"&&n!=="number"&&n!=="string"&&n!=="symbol"&&this.raise(me.EnumInvalidExplicitType,this.state.startLoc,{enumName:r,invalidEnumType:n}),n}flowEnumBody(r,n){let i=n.name,s=n.loc.start,o=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:a,hasUnknownMembers:c}=this.flowEnumMembers({enumName:i,explicitType:o});switch(r.hasUnknownMembers=c,o){case"boolean":return r.explicitType=!0,r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody");case"number":return r.explicitType=!0,r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody");case"string":return r.explicitType=!0,r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");case"symbol":return r.members=a.defaultedMembers,this.expect(8),this.finishNode(r,"EnumSymbolBody");default:{let u=()=>(r.members=[],this.expect(8),this.finishNode(r,"EnumStringBody"));r.explicitType=!1;let l=a.booleanMembers.length,p=a.numberMembers.length,d=a.stringMembers.length,h=a.defaultedMembers.length;if(!l&&!p&&!d&&!h)return u();if(!l&&!p)return r.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(r,"EnumStringBody");if(!p&&!d&&l>=h){for(let m of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(m.loc.start,{enumName:i,memberName:m.id.name});return r.members=a.booleanMembers,this.expect(8),this.finishNode(r,"EnumBooleanBody")}else if(!l&&!d&&p>=h){for(let m of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(m.loc.start,{enumName:i,memberName:m.id.name});return r.members=a.numberMembers,this.expect(8),this.finishNode(r,"EnumNumberBody")}else return this.raise(me.EnumInconsistentMemberValues,s,{enumName:i}),u()}}}flowParseEnumDeclaration(r){let n=this.parseIdentifier();return r.id=n,r.body=this.flowEnumBody(this.startNode(),n),this.finishNode(r,"EnumDeclaration")}isLookaheadToken_lt(){let r=this.nextTokenStart();if(this.input.charCodeAt(r)===60){let n=this.input.charCodeAt(r+1);return n!==60&&n!==61}return!1}maybeUnwrapTypeCastExpression(r){return r.type==="TypeCastExpression"?r.expression:r}},DW={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},Oo=ls`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function $s(e){return e?e.type==="JSXOpeningFragment"||e.type==="JSXClosingFragment":!1}function Xa(e){if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return Xa(e.object)+"."+Xa(e.property);throw new Error("Node had unexpected type: "+e.type)}var CW=e=>class extends e{jsxReadToken(){let r="",n=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Oo.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(142)):super.getTokenFromCode(i);return}r+=this.input.slice(n,this.state.pos),this.finishToken(141,r);return;case 38:r+=this.input.slice(n,this.state.pos),r+=this.jsxReadEntity(),n=this.state.pos;break;case 62:case 125:default:Za(i)?(r+=this.input.slice(n,this.state.pos),r+=this.jsxReadNewLine(!0),n=this.state.pos):++this.state.pos}}}jsxReadNewLine(r){let n=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,n===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=r?`
|
|
20
20
|
`:`\r
|
|
21
|
-
`):i=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(r){let n="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(_.UnterminatedString,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);if(s===r)break;s===38?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadEntity(),i=this.state.pos):Za(s)?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}n+=this.input.slice(i,this.state.pos++),this.finishToken(133,n)}jsxReadEntity(){let r=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let i=this.readInt(n,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let n=0,i=!1;for(;n++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let s=this.input.slice(r,this.state.pos),o=DW[s];if(++this.state.pos,o)return o}}return this.state.pos=r,"&"}jsxReadWord(){let r,n=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(Qa(r)||r===45);this.finishToken(140,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let r=this.startNode();return this.match(140)?r.name=this.state.value:nx(this.state.type)?r.name=Us(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){let r=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let i=this.startNodeAt(r);return i.namespace=n,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let r=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let i=this.startNodeAt(r);i.object=n,i.property=this.jsxParseIdentifier(),n=this.finishNode(i,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(rt.brace),this.next(),r=this.jsxParseExpressionContainer(r,rt.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(Oo.AttributeIsEmpty,r),r;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Oo.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(rt.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,n){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();r.expression=i}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){let r=this.startNode();return this.match(5)?(this.setContext(rt.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(rt.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){let n=this.startNodeAt(r);return this.eat(143)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(r){let n=[];for(;!this.match(56)&&!this.match(143);)n.push(this.jsxParseAttribute());return r.attributes=n,r.selfClosing=this.eat(56),this.expect(143),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){let n=this.startNodeAt(r);return this.eat(143)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(143),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(r){let n=this.startNodeAt(r),i=[],s=this.jsxParseOpeningElementAt(r),o=null;if(!s.selfClosing){e:for(;;)switch(this.state.type){case 142:if(r=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(r);break e}i.push(this.jsxParseElementAt(r));break;case 141:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(rt.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(a)):i.push(this.jsxParseExpressionContainer(a,rt.j_expr));break}default:this.unexpected()}$s(s)&&!$s(o)&&o!==null?this.raise(Oo.MissingClosingTagFragment,o):!$s(s)&&$s(o)?this.raise(Oo.MissingClosingTagElement,o,{openingTagName:Xa(s.name)}):!$s(s)&&!$s(o)&&Xa(o.name)!==Xa(s.name)&&this.raise(Oo.MissingClosingTagElement,o,{openingTagName:Xa(s.name)})}if($s(s)?(n.openingFragment=s,n.closingFragment=o):(n.openingElement=s,n.closingElement=o),n.children=i,this.match(47))throw this.raise(Oo.UnwrappedAdjacentJSXElements,this.state.startLoc);return $s(s)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){let{context:n}=this.state;n[n.length-1]=r}parseExprAtom(r){return this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){let n=this.curContext();if(n===rt.j_expr){this.jsxReadToken();return}if(n===rt.j_oTag||n===rt.j_cTag){if(us(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(143);return}if((r===34||r===39)&&n===rt.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(r)}updateContext(r){let{context:n,type:i}=this.state;if(i===56&&r===142)n.splice(-2,2,rt.j_cTag),this.state.canStartJSXElement=!1;else if(i===142)n.push(rt.j_oTag);else if(i===143){let s=n[n.length-1];s===rt.j_oTag&&r===56||s===rt.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===rt.j_expr):(this.setContext(rt.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=LV(i)}},Kb=class extends rl{constructor(...t){super(...t),this.tsNames=new Map}},Vb=class extends nl{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new Kb(t)}enter(t){t===256&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===256&&this.importsStack.pop(),t}hasImport(t,r){let n=this.importsStack.length;if(this.importsStack[n-1].has(t))return!0;if(!r&&n>1){for(let i=0;i<n-1;i++)if(this.importsStack[i].has(t))return!0}return!1}declareName(t,r,n){if(r&4096){this.hasImport(t,!0)&&this.parser.raise(_.VarRedeclaration,n,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let i=this.currentScope(),s=i.tsNames.get(t)||0;if(r&1024){this.maybeExportDefined(i,t),i.tsNames.set(t,s|16);return}super.declareName(t,r,n),r&2&&(r&1||(this.checkRedeclarationInScope(i,t,r,n),this.maybeExportDefined(i,t)),s=s|1),r&256&&(s=s|2),r&512&&(s=s|4),r&128&&(s=s|8),s&&i.tsNames.set(t,s)}isRedeclaredInScope(t,r,n){let i=t.tsNames.get(r);if((i&2)>0){if(n&256){let s=!!(n&512),o=(i&4)>0;return s!==o}return!0}return n&128&&(i&8)>0?t.names.get(r)&2?!!(n&1):!1:n&2&&(i&1)>0?!0:super.isRedeclaredInScope(t,r,n)}checkLocalExport(t){let{name:r}=t;if(this.hasImport(r))return;let n=this.scopeStack.length;for(let i=n-1;i>=0;i--){let o=this.scopeStack[i].tsNames.get(r);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(t)}},ZF=e=>e.type==="ParenthesizedExpression"?ZF(e.expression):e,Wb=class extends Hb{toAssignable(t,r=!1){var n,i;let s;switch((t.type==="ParenthesizedExpression"||(n=t.extra)!=null&&n.parenthesized)&&(s=ZF(t),r?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(_.InvalidParenthesizedAssignment,t):s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(_.InvalidParenthesizedAssignment,t):this.raise(_.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let a=0,c=t.properties.length,u=c-1;a<c;a++){var o;let l=t.properties[a],p=a===u;this.toAssignableObjectExpressionProp(l,p,r),p&&l.type==="RestElement"&&(o=t.extra)!=null&&o.trailingCommaLoc&&this.raise(_.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:a,value:c}=t;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(c,r);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,(i=t.extra)==null?void 0:i.trailingCommaLoc,r);break;case"AssignmentExpression":t.operator!=="="&&this.raise(_.MissingEqInAssignment,t.left.loc.end),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,r);break;case"ParenthesizedExpression":this.toAssignable(s,r);break}}toAssignableObjectExpressionProp(t,r,n){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?_.PatternHasAccessor:_.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){t.type="RestElement";let i=t.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,n),r||this.raise(_.RestTrailingComma,t)}else this.toAssignable(t,n)}toAssignableList(t,r,n){let i=t.length-1;for(let s=0;s<=i;s++){let o=t[s];if(o){if(o.type==="SpreadElement"){o.type="RestElement";let a=o.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,n)}else this.toAssignable(o,n);o.type==="RestElement"&&(s<i?this.raise(_.RestTrailingComma,o):r&&this.raise(_.RestTrailingComma,r))}}}isAssignable(t,r){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let n=t.properties.length-1;return t.properties.every((i,s)=>i.type!=="ObjectMethod"&&(s===n||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(t,r){return t}toReferencedListDeep(t,r){this.toReferencedList(t,r);for(let n of t)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(t){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,r,n){let i=n&1,s=[],o=!0;for(;!this.eat(t);)if(o?o=!1:this.expect(12),i&&this.match(12))s.push(null);else{if(this.eat(t))break;if(this.match(21)){if(s.push(this.parseAssignableListItemTypes(this.parseRestBinding(),n)),!this.checkCommaAfterRest(r)){this.expect(t);break}}else{let a=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(_.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());s.push(this.parseAssignableListItem(n,a))}}return s}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let{type:t,startLoc:r}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return t===138?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,r,!1,!1,!0,!1)}parseAssignableListItem(t,r){let n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n,t);let i=this.parseMaybeDefault(n.loc.start,n);return r.length&&(n.decorators=r),i}parseAssignableListItemTypes(t,r){return t}parseMaybeDefault(t,r){var n,i;if((n=t)!=null||(t=this.state.startLoc),r=(i=r)!=null?i:this.parseBindingAtom(),!this.eat(29))return r;let s=this.startNodeAt(t);return s.left=r,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(t,r,n){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,r,n=64,i=!1,s=!1,o=!1){var a;let c=t.type;if(this.isObjectMethod(t))return;let u=this.isOptionalMemberExpression(t);if(u||c==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),r.type!=="AssignmentExpression"&&this.raise(_.InvalidLhsOptionalChaining,t,{ancestor:r})),n!==64&&this.raise(_.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,n,s);let{name:g}=t;i&&(i.has(g)?this.raise(_.ParamDupe,t):i.add(g));return}let l=this.isValidLVal(c,!(o||(a=t.extra)!=null&&a.parenthesized)&&r.type==="AssignmentExpression",n);if(l===!0)return;if(l===!1){let g=n===64?_.InvalidLhs:_.InvalidLhsBinding;this.raise(g,t,{ancestor:r});return}let p,d;typeof l=="string"?(p=l,d=c==="ParenthesizedExpression"):[p,d]=l;let h=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:r,m=t[p];if(Array.isArray(m))for(let g of m)g&&this.checkLVal(g,h,n,i,s,d);else m&&this.checkLVal(m,h,n,i,s,d)}checkIdentifier(t,r,n=!1){this.state.strict&&(n?WF(t.name,this.inModule):VF(t.name))&&(r===64?this.raise(_.StrictEvalArguments,t,{referenceName:t.name}):this.raise(_.StrictEvalArgumentsBinding,t,{bindingName:t.name})),r&8192&&t.name==="let"&&this.raise(_.LetInLexicalBinding,t),r&64||this.declareNameFromIdentifier(t,r)}declareNameFromIdentifier(t,r){this.scope.declareName(t.name,r,t.loc.start)}checkToRestConversion(t,r){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(_.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?_.RestTrailingComma:_.ElementAfterRest,this.state.startLoc),!0):!1}};function EW(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function BF(e){if(!e)throw new Error("Assert fail")}var ce=ls`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function wW(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function MF(e){return e==="private"||e==="public"||e==="protected"}function SW(e){return e==="in"||e==="out"}var TW=e=>class extends e{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ce.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ce.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ce.InvalidModifierOnTypeParameter})}getScopeHandler(){return Vb}tsIsIdentifier(){return ze(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,n){if(!ze(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(r.includes(i)){if(n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:n,stopOnStartOfClassStaticBlock:i,errorTemplate:s=ce.InvalidModifierOnTypeMember},o){let a=(u,l,p,d)=>{l===p&&o[d]&&this.raise(ce.InvalidModifiersOrder,u,{orderedModifiers:[p,d]})},c=(u,l,p,d)=>{(o[p]&&l===d||o[d]&&l===p)&&this.raise(ce.IncompatibleModifiers,u,{modifiers:[p,d]})};for(;;){let{startLoc:u}=this.state,l=this.tsParseModifier(r.concat(n??[]),i);if(!l)break;MF(l)?o.accessibility?this.raise(ce.DuplicateAccessibilityModifier,u,{modifier:l}):(a(u,l,l,"override"),a(u,l,l,"static"),a(u,l,l,"readonly"),o.accessibility=l):SW(l)?(o[l]&&this.raise(ce.DuplicateModifier,u,{modifier:l}),o[l]=!0,a(u,l,"in","out")):(hasOwnProperty.call(o,l)?this.raise(ce.DuplicateModifier,u,{modifier:l}):(a(u,l,"static","readonly"),a(u,l,"static","override"),a(u,l,"override","readonly"),a(u,l,"abstract","override"),c(u,l,"declare","override"),c(u,l,"static","abstract")),o[l]=!0),n!=null&&n.includes(l)&&this.raise(s,u,{modifier:l})}}tsIsListTerminator(r){switch(r){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(r,n){let i=[];for(;!this.tsIsListTerminator(r);)i.push(n());return i}tsParseDelimitedList(r,n,i){return EW(this.tsParseDelimitedListWorker(r,n,!0,i))}tsParseDelimitedListWorker(r,n,i,s){let o=[],a=-1;for(;!this.tsIsListTerminator(r);){a=-1;let c=n();if(c==null)return;if(o.push(c),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;i&&this.expect(12);return}return s&&(s.value=a),o}tsParseBracketedList(r,n,i,s,o){s||(i?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(r,n,o);return i?this.expect(3):this.expect(48),a}tsParseImportType(){let r=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ce.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(r.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(r.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName()),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseEntityName(r=!0){let n=this.parseIdentifier(r);for(;this.eat(16);){let i=this.startNodeAtNode(n);i.left=n,i.right=this.parseIdentifier(r),n=this.finishNode(i,"TSQualifiedName")}return n}tsParseTypeReference(){let r=this.startNode();return r.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();let n=this.startNodeAtNode(r);return n.parameterName=r,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){let r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){let n=this.startNode();return r(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){let n=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,i),n.params.length===0&&this.raise(ce.EmptyTypeParameters,n),i.value!==-1&&this.addExtra(n,"trailingComma",i.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(r,n){let i=r===19,s="parameters",o="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[s]=this.tsParseBindingListForSignature(),i?n[o]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(n[o]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){let r=super.parseBindingList(11,41,2);for(let n of r){let{type:i}=n;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(ce.UnsupportedSignatureParameterKind,n,{type:i})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),ze(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),r.parameters=[n];let i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,n){this.eat(17)&&(r.optional=!0);let i=r;if(this.match(10)||this.match(47)){n&&this.raise(ce.ReadonlyForMethodSignature,r);let s=i;s.kind&&this.match(47)&&this.raise(ce.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();let o="parameters",a="typeAnnotation";if(s.kind==="get")s[o].length>0&&(this.raise(_.BadGetterArity,this.state.curPosition()),this.isThisParam(s[o][0])&&this.raise(ce.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[o].length!==1)this.raise(_.BadSetterArity,this.state.curPosition());else{let c=s[o][0];this.isThisParam(c)&&this.raise(ce.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(ce.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(ce.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[a]&&this.raise(ce.SetAccessorCannotHaveReturnType,s[a])}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}else{let s=i;n&&(s.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){let r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);let n=this.tsTryParseIndexSignature(r);return n||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){let r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{let n=this.startNode();n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(n,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){let r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return r.elementTypes.forEach(i=>{let{type:s}=i;n&&s!=="TSRestType"&&s!=="TSOptionalType"&&!(s==="TSNamedTupleMember"&&i.optional)&&this.raise(ce.OptionalTypeBeforeRequired,i),n||(n=s==="TSNamedTupleMember"&&i.optional||s==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){let{startLoc:r}=this.state,n=this.eat(21),i,s,o,a,u=Qn(this.state.type)?this.lookaheadCharCode():null;if(u===58)i=!0,o=!1,s=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(u===63){o=!0;let l=this.state.startLoc,p=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(l),p),this.expect(17),this.expect(14),a=this.tsParseType()):(i=!1,a=d,this.expect(17))}else a=this.tsParseType(),o=this.eat(17),i=this.eat(14);if(i){let l;s?(l=this.startNodeAtNode(s),l.optional=o,l.label=s,l.elementType=a,this.eat(17)&&(l.optional=!0,this.raise(ce.TupleOptionalAfterType,this.state.lastTokStartLoc))):(l=this.startNodeAtNode(a),l.optional=o,this.raise(ce.InvalidTupleMemberLabel,a),l.label=a,l.elementType=this.tsParseType()),a=this.finishNode(l,"TSNamedTupleMember")}else if(o){let l=this.startNodeAtNode(a);l.typeAnnotation=a,a=this.finishNode(l,"TSOptionalType")}if(n){let l=this.startNodeAt(r);l.typeAnnotation=a,a=this.finishNode(l,"TSRestType")}return a}tsParseParenthesizedType(){let r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,n){let i=this.startNode();return r==="TSConstructorType"&&(i.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,r)}tsParseLiteralTypeNode(){let r=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){let r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let r=this.startNode(),n=this.lookahead();return n.type!==134&&n.type!==135&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:r}=this.state;if(ze(r)||r===88||r===84){let n=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":wW(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,n)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let r=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAtNode(r);n.elementType=r,this.expect(3),r=this.finishNode(n,"TSArrayType")}else{let n=this.startNodeAtNode(r);n.objectType=r,n.indexType=this.tsParseType(),this.expect(3),r=this.finishNode(n,"TSIndexedAccessType")}return r}tsParseTypeOperator(){let r=this.startNode(),n=this.state.value;return this.next(),r.operator=n,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ce.UnexpectedReadonly,r)}}tsParseInferType(){let r=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return zV(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,n,i){let s=this.startNode(),o=this.eat(i),a=[];do a.push(n());while(this.eat(i));return a.length===1&&!o?a[0]:(s.types=a,this.finishNode(s,r))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(ze(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:r}=this.state,n=r.length;try{return this.parseObjectLike(8,!0),r.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:r}=this.state,n=r.length;try{return super.parseBindingList(3,93,1),r.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(r){return this.tsInType(()=>{let n=this.startNode();this.expect(r);let i=this.startNode(),s=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(78)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(i.parameterName=c,i.asserts=!0,i.typeAnnotation=null,c=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(c,i),c.asserts=!0),n.typeAnnotation=c,this.finishNode(n,"TSTypeAnnotation")}let o=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!o)return s?(i.parameterName=this.parseIdentifier(),i.asserts=s,i.typeAnnotation=null,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let a=this.tsParseTypeAnnotation(!1);return i.parameterName=o,i.typeAnnotation=a,i.asserts=s,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let r=this.state.containsEsc;return this.next(),!ze(this.state.type)&&!this.match(78)?!1:(r&&this.raise(_.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,n=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){BF(this.state.inType);let r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;let n=this.startNodeAtNode(r);return n.checkType=r,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ce.ReservedTypeAssertion,this.state.startLoc);let r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){let n=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let s=this.startNode();return s.expression=this.tsParseEntityName(),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSExpressionWithTypeArguments")});return i.length||this.raise(ce.EmptyHeritageClauseType,n,{token:r}),i}tsParseInterfaceDeclaration(r,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(r.declare=!0),ze(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(ce.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInNoContext(r){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}tsInType(r){let n=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let r=this.startNode();return r.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,n={}){return n.const&&(r.const=!0),n.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseModuleBlock(){let r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,n=!1){if(r.id=this.parseIdentifier(),n||this.checkIdentifier(r.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),r.body=i}else this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.global=!0,r.id=this.parseIdentifier()):this.match(133)?r.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,n,i){r.isExport=i||!1,r.id=n||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);let s=this.tsParseModuleReference();return r.importKind==="type"&&s.type!=="TSExternalModuleReference"&&this.raise(ce.ImportAliasHasImportType,s),r.moduleReference=s,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){let n=this.state.clone(),i=r();return this.state=n,i}tsTryParseAndCatch(r){let n=this.tryParse(i=>r()||i());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(r){let n=this.state.clone(),i=r();if(i!==void 0&&i!==!1)return i;this.state=n}tsTryParseDeclare(r){if(this.isLineTerminator())return;let n=this.state.type,i;return this.isContextual(100)&&(n=74,i="let"),this.tsInAmbientContext(()=>{switch(n){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 129:{let s=this.tsParseInterfaceDeclaration(r,{declare:!0});if(s)return s}default:if(ze(n))return this.tsParseDeclaration(r,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(r,n,i){switch(n.name){case"declare":{let s=this.tsTryParseDeclare(r);return s&&(s.declare=!0),s}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let s=r;return s.global=!0,s.id=n,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(r,n.name,!1,i)}}tsParseDeclaration(r,n,i,s){switch(n){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||ze(this.state.type)))return this.tsParseAbstractDeclaration(r,s);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(r);if(ze(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&ze(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r);break;case"type":if(this.tsCheckLineTerminator(i)&&ze(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let s=this.startNodeAt(r);return s.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),s});if(this.state.maybeInArrowParameters=n,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let r=this.startNode();return r.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(ce.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===rt.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return HV(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(r,n){let i=this.state.startLoc,s={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},s);let o=s.accessibility,a=s.override,c=s.readonly;!(r&4)&&(o||c||a)&&this.raise(ce.UnexpectedParameterModifier,i);let u=this.parseMaybeDefault();this.parseAssignableListItemTypes(u,r);let l=this.parseMaybeDefault(u.loc.start,u);if(o||c||a){let p=this.startNodeAt(i);return n.length&&(p.decorators=n),o&&(p.accessibility=o),c&&(p.readonly=c),a&&(p.override=a),l.type!=="Identifier"&&l.type!=="AssignmentPattern"&&this.raise(ce.UnsupportedParameterPropertyKind,p),p.parameter=l,this.finishNode(p,"TSParameterProperty")}return n.length&&(u.decorators=n),l}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(let n of r.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(ce.PatternIsOptional,n)}setArrowFunctionParameters(r,n,i){super.setArrowFunctionParameters(r,n,i),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,n,i=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let s=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return s&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,s):s==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ce.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,s,i):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,n,i))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(ce.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(r,n){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,n,i,s){let o=super.parseArrayLike(r,n,i,s);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(r,n,i,s){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(n);return a.expression=r,this.finishNode(a,"TSNonNullExpression")}let o=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return s.stop=!0,r;s.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){let a,c=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(r)){let d=this.tsTryParseGenericAsyncArrowFunction(n);if(d)return d}let u=this.tsParseTypeArgumentsInExpression();if(!u)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(bf(this.state.type)){let d=super.parseTaggedTemplateExpression(r,n,s);return d.typeParameters=u,d}if(!i&&this.eat(10)){let d=this.startNodeAt(n);return d.callee=r,d.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=u,s.optionalChainMember&&(d.optional=o),this.finishCallExpression(d,s.optionalChainMember)}let l=this.state.type;if(l===48||l===52||l!==10&&Ib(l)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(n);return p.expression=r,p.typeParameters=u,this.finishNode(p,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),c)return c.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ce.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),c}return super.parseSubscript(r,n,i,s)}parseNewCallee(r){var n;super.parseNewCallee(r);let{callee:i}=r;i.type==="TSInstantiationExpression"&&!((n=i.extra)!=null&&n.parenthesized)&&(r.typeParameters=i.typeParameters,r.callee=i.expression)}parseExprOp(r,n,i){let s;if(hf(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(s=this.isContextual(120)))){let o=this.startNodeAt(n);return o.expression=r,o.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(s&&this.raise(_.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(o,s?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(o,n,i)}return super.parseExprOp(r,n,i)}checkReservedWord(r,n,i,s){this.state.isAmbientContext||super.checkReservedWord(r,n,i,s)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(ce.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return r?n===123||n===42:n!==61}return!r&&this.isContextual(87)}applyImportPhase(r,n,i,s){super.applyImportPhase(r,n,i,s),n?r.exportKind=i==="type"?"type":"value":r.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(r){if(this.match(133))return r.importKind="value",super.parseImport(r);let n;if(ze(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,i);n=super.parseImportSpecifiersAndAfter(r,i)}else n=super.parseImport(r);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ce.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(r,n){if(this.match(83)){this.next();let i=r,s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,s,!0)}else if(this.eat(29)){let i=r;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=r;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(r,n)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,n,i=!1){let{isAmbientContext:s}=this.state,o=super.parseVarStatement(r,n,i||s);if(!s)return o;for(let{id:a,init:c}of o.declarations)c&&(n!=="const"||a.typeAnnotation?this.raise(ce.InitializerNotAllowedInAmbientContext,c):PW(c,this.hasPlugin("estree"))||this.raise(ce.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,c));return o}parseStatementContent(r,n){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(r,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,n){return n.some(i=>MF(i)?r.accessibility===i:!!r[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,n,i){let s=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:s,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ce.InvalidModifierOnTypeParameterPositions},n);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,s)&&this.raise(ce.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,n)):this.parseClassMemberWithIsStatic(r,n,i,!!n.static)};n.declare?this.tsInAmbientContext(o):o()}parseClassMemberWithIsStatic(r,n,i,s){let o=this.tsTryParseIndexSignature(n);if(o){r.body.push(o),n.abstract&&this.raise(ce.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(ce.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(ce.IndexSignatureHasDeclare,n),n.override&&this.raise(ce.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(ce.NonAbstractClassHasAbstractMethod,n),n.override&&(i.hadSuperClass||this.raise(ce.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(r,n,i,s)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(ce.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(ce.ClassMethodHasDeclare,r)}parseExpressionStatement(r,n,i){return(n.type==="Identifier"?this.tsParseExpressionStatement(r,n,i):void 0)||super.parseExpressionStatement(r,n,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,n,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(r,n,i);let s=this.tryParse(()=>super.parseConditional(r,n));return s.node?(s.error&&(this.state=s.failState),s.node):(s.error&&super.setOptionalParametersError(i,s.error),r)}parseParenItem(r,n){let i=super.parseParenItem(r,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(n);return s.expression=r,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));let n=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ce.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=ze(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||i)&&(r.exportKind="type"),i&&(this.resetStartLocation(o,n),o.declare=!0),o):null}parseClassId(r,n,i,s){if((!n||i)&&this.isContextual(113))return;super.parseClassId(r,n,i,r.declare?1024:8331);let o=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);o&&(r.typeParameters=o)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(r.typeAnnotation=n)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(ce.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){let{key:n}=r;this.raise(ce.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!r.computed?n.name:`[${this.input.slice(n.start,n.end)}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(ce.PrivateElementHasAbstract,r),r.accessibility&&this.raise(ce.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(ce.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,n,i,s,o,a){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&o&&this.raise(ce.ConstructorHasTypeParameters,c);let{declare:u=!1,kind:l}=n;u&&(l==="get"||l==="set")&&this.raise(ce.DeclareAccessor,n,{kind:l}),c&&(n.typeParameters=c),super.pushClassMethod(r,n,i,s,o,a)}pushClassPrivateMethod(r,n,i,s){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(n.typeParameters=o),super.pushClassPrivateMethod(r,n,i,s)}declareClassPrivateMethodInScope(r,n){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&!hasOwnProperty.call(r.value,"body")||super.declareClassPrivateMethodInScope(r,n))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,n,i,s,o,a,c){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);return u&&(r.typeParameters=u),super.parseObjPropValue(r,n,i,s,o,a,c)}parseFunctionParams(r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(r.typeParameters=i),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(r.id.typeAnnotation=i,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,n)}parseMaybeAssign(r,n){var i,s,o,a,c;let u,l,p;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(u=this.state.clone(),l=this.tryParse(()=>super.parseMaybeAssign(r,n),u),!l.error)return l.node;let{context:m}=this.state,g=m[m.length-1];(g===rt.j_oTag||g===rt.j_expr)&&m.pop()}if(!((i=l)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(r,n);(!u||u===this.state)&&(u=this.state.clone());let d,h=this.tryParse(m=>{var g,y;d=this.tsParseTypeParameters(this.tsParseConstModifier);let b=super.parseMaybeAssign(r,n);return(b.type!=="ArrowFunctionExpression"||(g=b.extra)!=null&&g.parenthesized)&&m(),((y=d)==null?void 0:y.params.length)!==0&&this.resetStartLocationFromNode(b,d),b.typeParameters=d,b},u);if(!h.error&&!h.aborted)return d&&this.reportReservedArrowTypeParam(d),h.node;if(!l&&(BF(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(r,n),u),!p.error))return p.node;if((s=l)!=null&&s.node)return this.state=l.failState,l.node;if(h.node)return this.state=h.failState,d&&this.reportReservedArrowTypeParam(d),h.node;if((o=p)!=null&&o.node)return this.state=p.failState,p.node;throw((a=l)==null?void 0:a.error)||h.error||((c=p)==null?void 0:c.error)}reportReservedArrowTypeParam(r){var n;r.params.length===1&&!r.params[0].constraint&&!((n=r.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ce.ReservedArrowTypeParam,r)}parseMaybeUnary(r,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(i=>{let s=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),s});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),r.returnType=n.node)}return super.parseArrow(r)}parseAssignableListItemTypes(r,n){if(!(n&2))return r;this.eat(17)&&(r.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.resetEndLocation(r),r}isAssignable(r,n){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(r,n)}}toAssignable(r,n=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(ce.UnexpectedTypeCastInParameter,r):this.raise(ce.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,n);break;case"AssignmentExpression":!n&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,n)}}toAssignableParenthesizedExpression(r,n){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,n);break;default:super.toAssignable(r,n)}}checkToRestConversion(r,n){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,n)}}isValidLVal(r,n,i){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!n)&&["expression",!0];default:return super.isValidLVal(r,n,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(r);return i.typeParameters=n,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,n){let i=super.parseMaybeDefault(r,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(ce.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableList(r,n,i){for(let s=0;s<r.length;s++){let o=r[s];o?.type==="TSTypeCastExpression"&&(r[s]=this.typeCastToParameter(o))}super.toAssignableList(r,n,i)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(r.typeParameters=n)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){let n=super.getGetterSetterExpectedParamCount(r),s=this.getObjectOrClassMethodParams(r)[0];return s&&this.isThisParam(s)?n+1:n}parseCatchClauseParam(){let r=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n,this.resetEndLocation(r)),r}tsInAmbientContext(r){let{isAmbientContext:n,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=n,this.state.strict=i}}parseClass(r,n,i){let s=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,n,i)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(r,n){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(r,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return r.abstract=!0,this.raise(ce.NonClassMethodPropertyHasAbstractModifer,r),this.tsParseInterfaceDeclaration(r)}else this.unexpected(null,80)}parseMethod(r,n,i,s,o,a,c){let u=super.parseMethod(r,n,i,s,o,a,c);if(u.abstract&&(this.hasPlugin("estree")?!!u.value.body:!!u.body)){let{key:p}=u;this.raise(ce.AbstractMethodHasImplementation,u,{methodName:p.type==="Identifier"&&!u.computed?p.name:`[${this.input.slice(p.start,p.end)}]`})}return u}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(r,n,i,s){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(r,!1,i),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,n,i,s))}parseImportSpecifier(r,n,i,s,o){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(r,!0,i),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,n,i,s,i?4098:4096))}parseTypeOnlyImportExportSpecifier(r,n,i){let s=n?"imported":"local",o=n?"local":"exported",a=r[s],c,u=!1,l=!0,p=a.loc.start;if(this.isContextual(93)){let h=this.parseIdentifier();if(this.isContextual(93)){let m=this.parseIdentifier();Qn(this.state.type)?(u=!0,a=h,c=n?this.parseIdentifier():this.parseModuleExportName(),l=!1):(c=m,l=!1)}else Qn(this.state.type)?(l=!1,c=n?this.parseIdentifier():this.parseModuleExportName()):(u=!0,a=h)}else Qn(this.state.type)&&(u=!0,n?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());u&&i&&this.raise(n?ce.TypeModifierIsUsedInTypeImports:ce.TypeModifierIsUsedInTypeExports,p),r[s]=a,r[o]=c;let d=n?"importKind":"exportKind";r[d]=u?"type":"value",l&&this.eatContextual(93)&&(r[o]=n?this.parseIdentifier():this.parseModuleExportName()),r[o]||(r[o]=ps(r[s])),n&&this.checkIdentifier(r[o],u?4098:4096)}};function AW(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;return t&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:t_(e.object)}function PW(e,t){var r;let{type:n}=e;if((r=e.extra)!=null&&r.parenthesized)return!1;if(t){if(n==="Literal"){let{value:i}=e;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(e_(e,t)||FW(e,t)||n==="TemplateLiteral"&&e.expressions.length===0||AW(e))}function e_(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function FW(e,t){if(e.type==="UnaryExpression"){let{operator:r,argument:n}=e;if(r==="-"&&e_(n,t))return!0}return!1}function t_(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:t_(e.object)}var LF=ls`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),_W=e=>class extends e{parsePlaceholder(r){if(this.match(144)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(n,r)}}finishPlaceholder(r,n){let i=r;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=n,i}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,n,i,s){r!==void 0&&super.checkReservedWord(r,n,i,s)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,n,i){return r==="Placeholder"||super.isValidLVal(r,n,i)}toAssignable(r,n){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,n)}chStartsBindingIdentifier(r,n){return!!(super.chStartsBindingIdentifier(r,n)||this.lookahead().type===144)}verifyBreakContinue(r,n){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,n)}parseExpressionStatement(r,n){var i;if(n.type!=="Placeholder"||(i=n.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(r,n);if(this.match(14)){let o=r;return o.label=this.finishPlaceholder(n,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let s=r;return s.name=n.name,this.finishPlaceholder(s,"Statement")}parseBlock(r,n,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,n,i)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,n,i){let s=n?"ClassDeclaration":"ClassExpression";this.next();let o=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(144)||this.match(5))r.id=a;else{if(i||!n)return r.id=null,r.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(r,s);throw this.raise(LF.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,n,i);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,o),this.finishNode(r,s)}parseExport(r,n){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(r,n);let s=r;if(!this.isContextual(98)&&!this.match(12))return s.specifiers=[],s.source=null,s.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(s,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=i,s.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],super.parseExport(s,n)}isExportDefaultSpecifier(){if(this.match(65)){let r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(Us(144),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,n){var i;return(i=r.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(r,n)}checkExport(r){let{specifiers:n}=r;n!=null&&n.length&&(r.specifiers=n.filter(i=>i.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=n}parseImport(r){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");let i=this.startNodeAtNode(n);return i.local=n,r.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(LF.UnexpectedSpace,this.state.lastTokEndLoc)}},IW=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let r=this.state.startLoc,n=this.startNode();if(this.next(),ze(this.state.type)){let i=this.parseIdentifierName(),s=this.createIdentifier(n,i);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}},$F=["minimal","fsharp","hack","smart"],UF=["^^","@@","^","%","#"];function kW(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let r=e.get("decorators").decoratorsBeforeExport;if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let n=e.get("decorators").allowCallParenthesized;if(n!=null&&typeof n!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;let r=e.get("pipelineOperator").proposal;if(!$F.includes(r)){let i=$F.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}let n=((t=e.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash";if(r==="hack"){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let i=e.get("pipelineOperator").topicToken;if(!UF.includes(i)){let s=UF.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}if(i==="#"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}else if(r==="smart"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("importAttributes")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(e.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAttributes")&&e.has("importAssertions"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(e.has("recordAndTuple")){let r=e.get("recordAndTuple").syntaxType;if(r!=null){let n=["hash","bar"];if(!n.includes(r))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+n.map(i=>`'${i}'`).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){let r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}if(e.has("optionalChainingAssign")&&e.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var r_={estree:RV,jsx:CW,flow:vW,typescript:TW,v8intrinsic:IW,placeholders:_W},NW=Object.keys(r_),Pb={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function RW(e){if(e==null)return Object.assign({},Pb);if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let n of Object.keys(Pb)){var r;t[n]=(r=e[n])!=null?r:Pb[n]}return t}var Yb=class extends Wb{checkProto(t,r,n,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let s=t.key;if((s.type==="Identifier"?s.name:s.value)==="__proto__"){if(r){this.raise(_.RecordNoProto,s);return}n.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=s.loc.start):this.raise(_.DuplicateProto,s)),n.used=!0}}shouldExitDescending(t,r){return t.type==="ArrowFunctionExpression"&&t.start===r}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,r){return t?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(t){let r=this.state.startLoc,n=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(r);for(i.expressions=[n];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(t,r){return this.disallowInAnd(()=>this.parseMaybeAssign(t,r))}parseMaybeAssignAllowIn(t,r){return this.allowInAnd(()=>this.parseMaybeAssign(t,r))}setOptionalParametersError(t,r){var n;t.optionalParametersLoc=(n=r?.loc)!=null?n:this.state.startLoc}parseMaybeAssign(t,r){let n=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let a=this.parseYield();return r&&(a=r.call(this,a,n)),a}let i;t?i=!1:(t=new ec,i=!0);let{type:s}=this.state;(s===10||ze(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(r&&(o=r.call(this,o,n)),$V(this.state.type)){let a=this.startNodeAt(n),c=this.state.value;if(a.operator=c,this.match(29)){this.toAssignable(o,!0),a.left=o;let u=n.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else a.left=o;return this.next(),a.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(a,"AssignmentExpression")),a}else i&&this.checkExpressionErrors(t,!0);return o}parseMaybeConditional(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,n)?i:this.parseConditional(i,r,t)}parseConditional(t,r,n){if(this.eat(17)){let i=this.startNodeAt(r);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,n)?i:this.parseExprOp(i,r,-1)}parseExprOp(t,r,n){if(this.isPrivateName(t)){let s=this.getPrivateNameSV(t);(n>=hf(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(_.PrivateInExpectedIn,t,{identifierName:s}),this.classScope.usePrivateName(s,t.loc.start)}let i=this.state.type;if(jV(i)&&(this.prodParam.hasIn||!this.match(58))){let s=hf(i);if(s>n){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,r)}let o=this.startNodeAt(r);o.left=t,o.operator=this.state.value;let a=i===41||i===42,c=i===40;if(c&&(s=hf(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(_.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(i,s);let u=this.finishNode(o,a||c?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(c&&(l===41||l===42)||a&&l===40)throw this.raise(_.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,r,n)}}return t}parseExprOpRightExpr(t,r){let n=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(_.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,r),n)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}default:return this.parseExprOpBaseRightExpr(t,r)}}parseExprOpBaseRightExpr(t,r){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,KV(t)?r-1:r)}parseHackPipeBody(){var t;let{startLoc:r}=this.state,n=this.parseMaybeAssign();return FV.has(n.type)&&!((t=n.extra)!=null&&t.parenthesized)&&this.raise(_.PipeUnparenthesizedBody,r,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(_.PipeTopicUnused,r),n}checkExponentialAfterUnary(t){this.match(57)&&this.raise(_.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,r){let n=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(n);return r||this.checkExponentialAfterUnary(c),c}let s=this.match(34),o=this.startNode();if(GV(this.state.type)){o.operator=this.state.value,o.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let c=this.match(89);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&c){let u=o.argument;u.type==="Identifier"?this.raise(_.StrictDelete,o):this.hasPropertyAsPrivateName(u)&&this.raise(_.DeletePrivateField,o)}if(!s)return r||this.checkExponentialAfterUnary(o),this.finishNode(o,"UnaryExpression")}let a=this.parseUpdate(o,s,t);if(i){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?Ib(c):Ib(c)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(_.AwaitNotInAsyncContext,n),this.parseAwait(n)}return a}parseUpdate(t,r,n){if(r){let o=t;return this.checkLVal(o.argument,this.finishNode(o,"UpdateExpression")),t}let i=this.state.startLoc,s=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return s;for(;qV(this.state.type)&&!this.canInsertSemicolon();){let o=this.startNodeAt(i);o.operator=this.state.value,o.prefix=!1,o.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(o,"UpdateExpression"))}return s}parseExprSubscripts(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,n)?i:this.parseSubscripts(i,r)}parseSubscripts(t,r,n){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,r,n,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,r,n,i){let{type:s}=this.state;if(!n&&s===15)return this.parseBind(t,r,n,i);if(bf(s))return this.parseTaggedTemplateExpression(t,r,i);let o=!1;if(s===18){if(n&&(this.raise(_.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=o=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,r,i,o);{let a=this.eat(0);return a||o||this.eat(16)?this.parseMember(t,r,i,a,o):(i.stop=!0,t)}}parseMember(t,r,n,i,s){let o=this.startNodeAt(r);return o.object=t,o.computed=i,i?(o.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(_.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),n.optionalChainMember?(o.optional=s,this.finishNode(o,"OptionalMemberExpression")):this.finishNode(o,"MemberExpression")}parseBind(t,r,n,i){let s=this.startNodeAt(r);return s.object=t,this.next(),s.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),r,n)}parseCoverCallAndAsyncArrowHead(t,r,n,i){let s=this.state.maybeInArrowParameters,o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(r);a.callee=t;let{maybeAsyncArrow:c,optionalChainMember:u}=n;c&&(this.expressionScope.enter(dW()),o=new ec),u&&(a.optional=i),i?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",a,o);let l=this.finishCallExpression(a,u);return c&&this.shouldParseAsyncArrow()&&!i?(n.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),l)):(c&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=s,l}toReferencedArguments(t,r){this.toReferencedListDeep(t.arguments,r)}parseTaggedTemplateExpression(t,r,n){let i=this.startNodeAt(r);return i.tag=t,i.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(_.OptionalChainingNoTemplate,r),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,r){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(_.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let n of t.arguments)n.type==="SpreadElement"&&this.raise(_.ImportCallSpreadArgument,n);return this.finishNode(t,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,r,n,i,s){let o=[],a=!0,c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){r&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(_.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),i&&this.addTrailingCommaExtraToNode(i),this.next();break}o.push(this.parseExprListItem(!1,s,n))}return this.state.inFSharpPipelineDirectBody=c,o}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,r){var n;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(t,r.arguments,!0,(n=r.extra)==null?void 0:n.trailingCommaLoc),r.innerComments&&il(t,r.innerComments),r.callee.trailingComments&&il(t,r.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let r,n=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(r):this.match(10)?this.options.createImportExpressions?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(_.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let s=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(s)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let s=r.callee=this.parseNoCallExpr();if(s.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(_.UnsupportedBind,s)}case 138:return this.raise(_.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.parseTopicReference(s);this.unexpected();break}case 47:{let s=this.input.codePointAt(this.nextTokenStart());us(s)||s===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(ze(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let s=this.state.potentialArrowAt===this.state.start,o=this.state.containsEsc,a=this.parseIdentifier();if(!o&&a.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(ze(c))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(c===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return s&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,r){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=t,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=Pr(this.state.endLoc,-1),this.parseTopicReference(n);this.unexpected()}parseTopicReference(t){let r=this.startNode(),n=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(r,n,t,i)}finishTopicReference(t,r,n,i){if(this.testTopicReferenceConfiguration(n,r,i)){let s=n==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(n==="smart"?_.PrimaryTopicNotAllowed:_.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(t,s)}else throw this.raise(_.PipeTopicUnconfiguredToken,r,{token:Us(i)})}testTopicReferenceConfiguration(t,r,n){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Us(n)}]);case"smart":return n===27;default:throw this.raise(_.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(gf(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(_.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,r,!0)}parseDo(t,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),t.async=r,this.next();let n=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=n,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(_.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(_.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(_.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),r=this.startNodeAt(Pr(this.state.startLoc,1)),n=this.state.value;return this.next(),t.id=this.createIdentifier(r,n),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,r,"sent")}return this.parseFunction(t)}parseMetaProperty(t,r,n){t.meta=r;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==n||i)&&this.raise(_.UnsupportedMetaProperty,t.property,{target:r.name,onlyValidPropertyName:n}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let r=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(_.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let n=this.isContextual(105);if(n||this.unexpected(),this.expectPlugin(n?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(_.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=n?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,r,"meta")}parseLiteralAtNode(t,r,n){return this.addExtra(n,"rawValue",t),this.addExtra(n,"raw",this.input.slice(n.start,this.state.end)),n.value=t,this.next(),this.finishNode(n,r)}parseLiteral(t,r){let n=this.startNode();return this.parseLiteralAtNode(t,r,n)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let r=this.startNode();return this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.pattern=t.pattern,r.flags=t.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(t){let r=this.startNode();return r.value=t,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let r=this.state.startLoc,n;this.next(),this.expressionScope.enter(pW());let i=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let o=this.state.startLoc,a=[],c=new ec,u=!0,l,p;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){let m=this.state.startLoc;if(l=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=s;let h=this.startNodeAt(r);return t&&this.shouldParseArrow(a)&&(h=this.parseArrow(h))?(this.checkDestructuringPrivate(c),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(h,a,!1),h):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),l&&this.unexpected(l),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(a,!0),a.length>1?(n=this.startNodeAt(o),n.expressions=a,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,d)):n=a[0],this.wrapParenthesis(r,n))}wrapParenthesis(t,r){if(!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t.index),this.takeSurroundingComments(r,t.index,this.state.lastTokEndLoc.index),r;let n=this.startNodeAt(t);return n.expression=r,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,r){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let n=this.parseMetaProperty(t,r,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(_.UnexpectedNewTarget,n),n}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),t.arguments=r}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let r=this.match(83),n=this.parseNoCallExpr();t.callee=n,r&&(n.type==="Import"||n.type==="ImportExpression")&&this.raise(_.ImportCallNotNewExpression,n)}parseTemplateElement(t){let{start:r,startLoc:n,end:i,value:s}=this.state,o=r+1,a=this.startNodeAt(Pr(n,1));s===null&&(t||this.raise(_.InvalidEscapeSequenceTemplate,Pr(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),u=c?-1:-2,l=i+u;a.value={raw:this.input.slice(o,l).replace(/\r\n?/g,`
|
|
22
|
-
`),cooked:s===null?null:s.slice(1,u)},a.tail=c,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,Pr(this.state.lastTokEndLoc,u)),p}parseTemplate(t){let r=this.startNode(),n=this.parseTemplateElement(t),i=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(n=this.parseTemplateElement(t));return r.expressions=s,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(c);break}let l;r?l=this.parseBindingProperty():(l=this.parsePropertyDefinition(i),this.checkProto(l,n,o,i)),n&&!this.isObjectProperty(l)&&l.type!=="SpreadElement"&&this.raise(_.InvalidRecordProperty,l),l.shorthand&&this.addExtra(l,"shorthand",!0),c.properties.push(l)}this.next(),this.state.inFSharpPipelineDirectBody=s;let u="ObjectExpression";return r?u="ObjectPattern":n&&(u="RecordExpression"),this.finishNode(c,u)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(_.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let n=this.startNode(),i=!1,s=!1,o;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(n.decorators=r,r=[]),n.method=!1,t&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let c=this.state.containsEsc;if(this.parsePropertyName(n,t),!a&&!c&&this.maybeAsyncOrAccessorProp(n)){let{key:u}=n,l=u.name;l==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),(l==="get"||l==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=l,this.match(55)&&(a=!0,this.raise(_.AccessorIsGenerator,this.state.curPosition(),{kind:l}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,o,a,i,!1,s,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let n=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==n&&this.raise(t.kind==="get"?_.BadGetterArity:_.BadSetterArity,t),t.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(_.BadSetterRestParameter,t)}parseObjectMethod(t,r,n,i,s){if(s){let o=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(n||r||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,n,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,n,i){if(t.shorthand=!1,this.eat(14))return t.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),n)t.value=this.parseMaybeDefault(r,ps(t.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(_.InvalidCoverInitializedName,s),t.value=this.parseMaybeDefault(r,ps(t.key))}else t.value=ps(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,r,n,i,s,o,a){let c=this.parseObjectMethod(t,n,i,s,o)||this.parseObjectProperty(t,r,s,a);return c||this.unexpected(),c}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:i}=this.state,s;if(Qn(n))s=this.parseIdentifier(!0);else switch(n){case 134:s=this.parseNumericLiteral(i);break;case 133:s=this.parseStringLiteral(i);break;case 135:s=this.parseBigIntLiteral(i);break;case 136:s=this.parseDecimalLiteral(i);break;case 138:{let o=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=o):this.raise(_.UnexpectedPrivateField,o),s=this.parsePrivateName();break}default:this.unexpected()}t.key=s,n!==138&&(t.computed=!1)}}initFunction(t,r){t.id=null,t.generator=!1,t.async=r}parseMethod(t,r,n,i,s,o,a=!1){this.initFunction(t,n),t.generator=r,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(gf(n,t.generator)),this.parseFunctionParams(t,i);let c=this.parseFunctionBodyAndFinish(t,o,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(t,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(t,!n,i,o),this.state.inFSharpPipelineDirectBody=s,this.finishNode(o,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,r,n,i){this.scope.enter(6);let s=gf(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(t,n);let o=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,r,n){this.toAssignableList(r,n,!1),t.params=r}parseFunctionBodyAndFinish(t,r,n=!1){return this.parseFunctionBody(t,!1,n),this.finishNode(t,r)}parseFunctionBody(t,r,n=!1){let i=r&&!this.match(5);if(this.expressionScope.enter(QF()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,r,!1);else{let s=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,a=>{let c=!this.isSimpleParamList(t.params);a&&c&&this.raise(_.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let u=!s&&this.state.strict;this.checkParams(t,!this.state.strict&&!r&&!n&&!c,r,u),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,u)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let r=0,n=t.length;r<n;r++)if(!this.isSimpleParameter(t[r]))return!1;return!0}checkParams(t,r,n,i=!0){let s=!r&&new Set,o={type:"FormalParameters"};for(let a of t.params)this.checkLVal(a,o,5,s,i)}parseExprList(t,r,n,i){let s=[],o=!0;for(;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}s.push(this.parseExprListItem(r,n))}return s}parseExprListItem(t,r,n){let i;if(this.match(12))t||this.raise(_.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(_.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return i}parseIdentifier(t){let r=this.startNode(),n=this.parseIdentifierName(t);return this.createIdentifier(r,n)}createIdentifier(t,r){return t.name=r,t.loc.identifierName=r,this.finishNode(t,"Identifier")}parseIdentifierName(t){let r,{startLoc:n,type:i}=this.state;Qn(i)?r=this.state.value:this.unexpected();let s=MV(i);return t?s&&this.replaceToken(132):this.checkReservedWord(r,n,s,!1),this.next(),r}checkReservedWord(t,r,n,i){if(t.length>10||!rW(t))return;if(n&&ZV(t)){this.raise(_.UnexpectedKeyword,r,{keyword:t});return}if((this.state.strict?i?WF:KF:HF)(t,this.inModule)){this.raise(_.UnexpectedReservedWord,r,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(_.YieldBindingIdentifier,r);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(_.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(_.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(_.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let r=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(_.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(_.ObsoleteAwaitStar,r),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||bf(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(_.YieldInParameter,t),this.next();let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return t.delegate=r,t.argument=n,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(_.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(t,r){if(this.isSimpleReference(t)){let n=this.startNodeAt(r);return n.callee=t,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),n.expression=t,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(_.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(_.PipelineTopicUnused,t)}withTopicBindingContext(t){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}else return t()}withSoloAwaitPermittingContext(t){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=r}}allowInAnd(t){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,t);return this.state.inFSharpPipelineDirectBody=n,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(r,8,"module")}finally{n()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},Fb={kind:1},OW={kind:2},BW=/[\uD800-\uDFFF]/u,_b=/in(?:stanceof)?/y;function MW(e,t){for(let r=0;r<e.length;r++){let n=e[r],{type:i}=n;if(typeof i=="number"){{if(i===138){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Pr(s.start,1);e.splice(r,1,new Ai({type:as(27),value:"#",start:o,end:u,startLoc:s.start,endLoc:l}),new Ai({type:as(132),value:a,start:u,end:c,startLoc:l,endLoc:s.end})),r++;continue}if(bf(i)){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Pr(s.start,1),p;t.charCodeAt(o)===96?p=new Ai({type:as(22),value:"`",start:o,end:u,startLoc:s.start,endLoc:l}):p=new Ai({type:as(8),value:"}",start:o,end:u,startLoc:s.start,endLoc:l});let d,h,m,g;i===24?(h=c-1,m=Pr(s.end,-1),d=a===null?null:a.slice(1,-1),g=new Ai({type:as(22),value:"`",start:h,end:c,startLoc:m,endLoc:s.end})):(h=c-2,m=Pr(s.end,-2),d=a===null?null:a.slice(1,-2),g=new Ai({type:as(23),value:"${",start:h,end:c,startLoc:m,endLoc:s.end})),e.splice(r,1,p,new Ai({type:as(20),value:d,start:u,end:h,startLoc:l,endLoc:m}),g),r+=2;continue}}n.type=as(i)}}return e}var Jb=class extends Yb{parseTopLevel(t,r){return t.program=this.parseProgram(r),t.comments=this.comments,this.options.tokens&&(t.tokens=MW(this.tokens,this.input)),this.finishNode(t,"File")}parseProgram(t,r=139,n=this.options.sourceType){if(t.sourceType=n,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,r),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[s,o]of Array.from(this.scope.undefinedExports))this.raise(_.ModuleExportUndefined,o,{localName:s});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===139?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",Pr(this.state.startLoc,-1)),i}stmtToDirective(t){let r=t;r.type="Directive",r.value=r.expression,delete r.expression;let n=r.value,i=n.value,s=this.input.slice(n.start,n.end),o=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",o),this.addExtra(n,"expressionValue",i),n.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,r){if(us(t)){if(_b.lastIndex=r,_b.test(this.input)){let n=this.codePointAtPos(_b.lastIndex);if(!Qa(n)&&n!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),r=this.codePointAtPos(t);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,t)}hasInLineFollowingBindingIdentifierOrBrace(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return r===123||this.chStartsBindingIdentifier(r,t)}startsUsingForOf(){let{type:t,containsEsc:r}=this.lookahead();if(t===102&&!r)return!1;if(ze(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let r=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(r,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,t&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(t,r)}parseStatementContent(t,r){let n=this.state.type,i=this.startNode(),s=!!(t&2),o=!!(t&4),a=t&1;switch(n){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?_.StrictFunction:this.options.annexB?_.SloppyFunctionAnnexB:_.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!s&&o);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?s||this.raise(_.UnexpectedLexicalDeclaration,i):this.raise(_.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(_.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(_.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let l=this.nextTokenStart(),p=this.codePointAtPos(l);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,l)&&p!==123))break}case 75:s||this.raise(_.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let l=this.state.value;return this.parseVarStatement(i,l)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let l=this.lookaheadCharCode();if(l===40||l===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(_.UnexpectedImportExport,this.state.startLoc),this.next();let l;return n===83?(l=this.parseImport(i),l.type==="ImportDeclaration"&&(!l.importKind||l.importKind==="value")&&(this.sawUnambiguousESM=!0)):(l=this.parseExport(i,r),(l.type==="ExportNamedDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportAllDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(l),l}default:if(this.isAsyncFunction())return s||this.raise(_.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let c=this.state.value,u=this.parseExpression();return ze(n)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,c,u,t):this.parseExpressionStatement(i,u,r)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(_.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,r,n){return t&&(r.decorators&&r.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(_.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...t)):r.decorators=t,this.resetStartLocationFromNode(r,t[0]),n&&this.resetStartLocationFromNode(n,r)),r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(_.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(_.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,n;if(this.match(10)){let i=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(i,n);let s=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(n),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==n&&this.raise(_.DecoratorArgumentsOutsideParentheses,s)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(r);i.object=n,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,n=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(n)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let r=this.startNodeAtNode(t);return r.callee=t,r.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return t}parseBreakContinueStatement(t,r){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,r),this.finishNode(t,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,r){let n;for(n=0;n<this.state.labels.length;++n){let i=this.state.labels[n];if((t.label==null||i.name===t.label.name)&&(i.kind!=null&&(r||i.kind===1)||t.label&&r))break}if(n===this.state.labels.length){let i=r?"BreakStatement":"ContinueStatement";this.raise(_.IllegalBreakContinue,t,{type:i})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(Fb),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Fb);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(t,null);let n=this.isContextual(100);{let c=this.isContextual(96)&&this.startsAwaitUsing(),u=c||this.isContextual(107)&&this.startsUsingForOf(),l=n&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||l){let p=this.startNode(),d;c?(d="await using",this.recordAwaitIfAllowed()||this.raise(_.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(p,!0,d);let h=this.finishNode(p,"VariableDeclaration"),m=this.match(58);return m&&u&&this.raise(_.ForInUsing,h),(m||this.isContextual(102))&&h.declarations.length===1?this.parseForIn(t,h,r):(r!==null&&this.unexpected(r),this.parseFor(t,h))}}let i=this.isContextual(95),s=new ec,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(_.ForOfLet,o),r===null&&i&&o.type==="Identifier"&&this.raise(_.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(o,!0);let c=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:c}),this.parseForIn(t,o,r)}else this.checkExpressionErrors(s,!0);return r!==null&&this.unexpected(r),this.parseFor(t,o)}parseFunctionStatement(t,r,n){return this.next(),this.parseFunction(t,1|(n?2:0)|(r?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(_.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let r=t.cases=[];this.expect(5),this.state.labels.push(OW),this.scope.enter(0);let n;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);n&&this.finishNode(n,"SwitchCase"),r.push(n=this.startNode()),n.consequent=[],this.next(),s?n.test=this.parseExpression():(i&&this.raise(_.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(_.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(r,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(_.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,r,n=!1){return this.next(),this.parseVar(t,!1,r,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Fb),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(_.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,r,n,i){for(let o of this.state.labels)o.name===r&&this.raise(_.LabelRedeclaration,n,{labelName:r});let s=UV(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===t.start)a.statementStart=this.state.start,a.kind=s;else break}return this.state.labels.push({name:r,kind:s,statementStart:this.state.start}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,r,n){return t.expression=r,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,r=!0,n){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,n),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,r,n,i,s){let o=t.body=[],a=t.directives=[];this.parseBlockOrModuleBlockBody(o,r?a:void 0,n,i,s)}parseBlockOrModuleBlockBody(t,r,n,i,s){let o=this.state.strict,a=!1,c=!1;for(;!this.match(i);){let u=n?this.parseModuleItem():this.parseStatementListItem();if(r&&!c){if(this.isValidDirective(u)){let l=this.stmtToDirective(u);r.push(l),!a&&l.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}t.push(u)}s?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(t,r){return t.init=r,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,r,n){let i=this.match(58);return this.next(),i?n!==null&&this.unexpected(n):t.await=n!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(_.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(_.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),t.left=r,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,r,n,i=!1){let s=t.declarations=[];for(t.kind=n;;){let o=this.startNode();if(this.parseVarId(o,n),o.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!i&&(o.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(_.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(_.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),s.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,r){let n=this.parseBindingAtom();(r==="using"||r==="await using")&&(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(_.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},r==="var"?5:8201),t.id=n}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,r=0){let n=r&2,i=!!(r&1),s=i&&!(r&4),o=!!(r&8);this.initFunction(t,o),this.match(55)&&(n&&this.raise(_.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(s));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(gf(o,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!n&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=a,t}parseFunctionId(t){return t||ze(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,r){this.expect(10),this.expressionScope.enter(lW()),t.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,r,n){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,r,n),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,r){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:t},i=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(_.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let o=this.startNode();i.length&&(o.decorators=i,this.resetStartLocationFromNode(o,i[0]),i=[]),this.parseClassMember(s,o,n),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(_.DecoratorConstructor,o)}}),this.state.strict=r,this.next(),i.length)throw this.raise(_.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(t,r){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let i=r;return i.kind="method",i.computed=!1,i.key=n,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=r;return i.computed=!1,i.key=n,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(t,r,n){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,r))return;if(this.eat(5)){this.parseClassStaticBlock(t,r);return}}this.parseClassMemberWithIsStatic(t,r,n,i)}parseClassMemberWithIsStatic(t,r,n,i){let s=r,o=r,a=r,c=r,u=r,l=s,p=s;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){l.kind="method";let b=this.match(138);if(this.parseClassElementName(l),b){this.pushClassPrivateMethod(t,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(_.ConstructorIsGenerator,s.key),this.pushClassMethod(t,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&ze(this.state.type),h=this.parseClassElementName(r),m=d?h.name:null,g=this.isPrivateName(h),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(l.kind="method",g){this.pushClassPrivateMethod(t,o,!1,!1);return}let b=this.isNonstaticConstructor(s),v=!1;b&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(_.DuplicateConstructor,h),b&&this.hasPlugin("typescript")&&r.override&&this.raise(_.OverrideOnConstructor,h),n.hadConstructor=!0,v=n.hadSuperClass),this.pushClassMethod(t,s,!1,!1,b,v)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,a);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);let b=this.eat(55);p.optional&&this.unexpected(y),l.kind="method";let v=this.match(138);this.parseClassElementName(l),this.parsePostMemberNameModifiers(p),v?this.pushClassPrivateMethod(t,o,b,!0):(this.isNonstaticConstructor(s)&&this.raise(_.ConstructorIsAsync,s.key),this.pushClassMethod(t,s,b,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(h),l.kind=m;let b=this.match(138);this.parseClassElementName(s),b?this.pushClassPrivateMethod(t,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(_.ConstructorIsAccessor,s.key),this.pushClassMethod(t,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);let b=this.match(138);this.parseClassElementName(a),this.pushClassAccessorProperty(t,u,b)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,a):this.unexpected()}parseClassElementName(t){let{type:r,value:n}=this.state;if((r===132||r===133)&&t.static&&n==="prototype"&&this.raise(_.StaticPrototype,this.state.startLoc),r===138){n==="constructor"&&this.raise(_.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,r){var n;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=r.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(r,"StaticBlock")),(n=r.decorators)!=null&&n.length&&this.raise(_.DecoratorStaticBlock,r)}pushClassProperty(t,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(_.ConstructorClassField,r.key),t.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(t,r){let n=this.parseClassPrivateProperty(r);t.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(t,r,n){!n&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(_.ConstructorClassField,r.key);let i=this.parseClassAccessorProperty(r);t.body.push(i),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,r,n,i,s,o){t.body.push(this.parseMethod(r,n,i,s,o,"ClassMethod",!0))}pushClassPrivateMethod(t,r,n,i){let s=this.parseMethod(r,n,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(s);let o=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,o)}declareClassPrivateMethodInScope(t,r){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),r,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(QF()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,r,n,i=8331){if(ze(this.state.type))t.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(t.id,i);else if(n||!r)t.id=null;else throw this.raise(_.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,r){let n=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,n),s=!i||this.eat(12),o=s&&this.eatExportStar(t),a=o&&this.maybeParseExportNamespaceSpecifier(t),c=s&&(!a||this.eat(12)),u=i||o;if(o&&!a){if(i&&this.unexpected(),r)throw this.raise(_.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let l=this.maybeParseExportNamedSpecifiers(t);i&&s&&!o&&!l&&this.unexpected(null,5),a&&c&&this.unexpected(null,98);let p;if(u||l){if(p=!1,r)throw this.raise(_.UnsupportedDecoratorExport,t);this.parseExportFrom(t,u)}else p=this.maybeParseExportDeclaration(t);if(u||l||p){var d;let h=t;if(this.checkExport(h,!0,!1,!!h.source),((d=h.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(r,h.declaration,h);else if(r)throw this.raise(_.UnsupportedDecoratorExport,t);return this.finishNode(h,"ExportNamedDeclaration")}if(this.eat(65)){let h=t,m=this.parseExportDefaultExpression();if(h.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(r,m,h);else if(r)throw this.raise(_.UnsupportedDecoratorExport,t);return this.checkExport(h,!0,!0),this.finishNode(h,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let n=r||this.parseIdentifier(!0),i=this.startNodeAtNode(n);return i.exported=n,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var r,n;(n=(r=t).specifiers)!=null||(r.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){let r=t;r.specifiers||(r.specifiers=[]);let n=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(n)),r.source=null,r.declaration=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(_.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(_.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(ze(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(ze(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),n=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||ze(this.state.type)&&n)return!0;if(this.match(65)&&n){let i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(t,r){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(_.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(_.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(_.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,r,n,i){if(r){var s;if(n){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=t.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(_.ExportDefaultFromAsIdentifier,a)}}else if((s=t.specifiers)!=null&&s.length)for(let a of t.specifiers){let{exported:c}=a,u=c.type==="Identifier"?c.name:c.value;if(this.checkDuplicateExports(a,u),!i&&a.local){let{local:l}=a;l.type!=="Identifier"?this.raise(_.ExportBindingIsString,a,{localName:l.value,exportName:u}):(this.checkReservedWord(l.name,l.loc.start,!0,!1),this.scope.checkLocalExport(l))}}else if(t.declaration){let a=t.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:c}=a;if(!c)throw new Error("Assertion failure");this.checkDuplicateExports(t,c.name)}else if(a.type==="VariableDeclaration")for(let c of a.declarations)this.checkDeclaration(c.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let r of t.properties)this.checkDeclaration(r);else if(t.type==="ArrayPattern")for(let r of t.elements)r&&this.checkDeclaration(r);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(_.DuplicateDefaultExport,t):this.raise(_.DuplicateExport,t,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(t){let r=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),s=this.match(133),o=this.startNode();o.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(o,s,t,i))}return r}parseExportSpecifier(t,r,n,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():r?t.exported=mW(t.local):t.exported||(t.exported=ps(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),r=BW.exec(t.value);return r&&this.raise(_.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:r[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:r,value:n})=>n.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(t){let{specifiers:r}=t,n=r.length===1?r[0].type:null;if(t.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(_.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(t.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(_.DeferImportRequiresNamespace,r[0].loc.start);else if(t.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(_.ImportReflectionNotBinding,r[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(_.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:r}=t;if(r!=null){let n=r.find(i=>{let s;if(i.type==="ExportSpecifier"?s=i.local:i.type==="ImportSpecifier"&&(s=i.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});n!==void 0&&this.raise(_.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,r,n,i){r||(n==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(t,r,null),null;let n=this.parseIdentifier(!0),{type:i}=this.state;return(Qn(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(n),this.applyImportPhase(t,r,n.name,n.loc.start),null):(this.applyImportPhase(t,r,null),n)}isPrecedingIdImportPhase(t){let{type:r}=this.state;return ze(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,r){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,r)||this.eat(12),s=i&&this.maybeParseStarImportSpecifier(t);return i&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var r;return(r=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,r,n){r.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(r,n))}finishImportSpecifier(t,r,n=8201){return this.checkLVal(t.local,{type:r},n),this.finishNode(t,r)}parseImportAttributes(){this.expect(5);let t=[],r=new Set;do{if(this.match(8))break;let n=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(_.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(133)?n.key=this.parseStringLiteral(i):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(_.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],r=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(_.ModuleAttributeDifferentFromType,n.key),r.has(n.key.name)&&this.raise(_.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),r.add(n.key.name),this.expect(14),!this.match(133))throw this.raise(_.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let r,n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?r=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),r=this.parseImportAttributes()),n=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(_.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),r=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r=[];else if(this.hasPlugin("moduleAttributes"))r=[];else return;!n&&this.hasPlugin("importAssertions")?t.assertions=r:t.attributes=r}maybeParseDefaultImportSpecifier(t,r){if(r){let n=this.startNodeAtNode(r);return n.local=r,t.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(Qn(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(_.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),i=this.match(133),s=this.isContextual(130);n.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(n,i,t.importKind==="type"||t.importKind==="typeof",s,void 0);t.specifiers.push(o)}}parseImportSpecifier(t,r,n,i,s){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:o}=t;if(r)throw this.raise(_.ImportBindingIsString,t,{importName:o.value});this.checkReservedWord(o.name,t.loc.start,!0,!0),t.local||(t.local=ps(o))}return this.finishImportSpecifier(t,"ImportSpecifier",s)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},vf=class extends Jb{constructor(t,r,n){t=RW(t),super(t,r),this.options=t,this.initializeScopes(),this.plugins=n,this.filename=t.sourceFilename}getScopeHandler(){return nl}parse(){this.enterInitialScopes();let t=this.startNode(),r=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,r),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}};function LW(e,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let n=el(t,e),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return t.sourceType="script",el(t,e).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return t.sourceType="script",el(t,e).parse()}catch{}throw n}}else return el(t,e).parse()}function $W(e,t){let r=el(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function UW(e){let t={};for(let r of Object.keys(e))t[r]=as(e[r]);return t}var jW=UW(BV);function el(e,t){let r=vf,n=new Map;if(e!=null&&e.plugins){for(let i of e.plugins){let s,o;typeof i=="string"?s=i:[s,o]=i,n.has(s)||n.set(s,o||{})}kW(n),r=qW(n)}return new r(e,t,n)}var jF=new Map;function qW(e){let t=[];for(let i of NW)e.has(i)&&t.push(i);let r=t.join("|"),n=jF.get(r);if(!n){n=vf;for(let i of t)n=r_[i](n);jF.set(r,n)}return n}sl.parse=LW;sl.parseExpression=$W;sl.tokTypes=jW});var LI=w(fc=>{"use strict";f();Object.defineProperty(fc,"__esModule",{value:!0});fc.splitWhen=fc.flatten=void 0;function VJ(e){return e.reduce((t,r)=>[].concat(t,r),[])}fc.flatten=VJ;function WJ(e,t){let r=[[]],n=0;for(let i of e)t(i)?(n++,r[n]=[]):r[n].push(i);return r}fc.splitWhen=WJ});var $I=w(Wf=>{"use strict";f();Object.defineProperty(Wf,"__esModule",{value:!0});Wf.isEnoentCodeError=void 0;function YJ(e){return e.code==="ENOENT"}Wf.isEnoentCodeError=YJ});var UI=w(Yf=>{"use strict";f();Object.defineProperty(Yf,"__esModule",{value:!0});Yf.createDirentFromStats=void 0;var Gx=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function JJ(e,t){return new Gx(e,t)}Yf.createDirentFromStats=JJ});var zI=w(qt=>{"use strict";f();Object.defineProperty(qt,"__esModule",{value:!0});qt.convertPosixPathToPattern=qt.convertWindowsPathToPattern=qt.convertPathToPattern=qt.escapePosixPath=qt.escapeWindowsPath=qt.escape=qt.removeLeadingDotSegment=qt.makeAbsolute=qt.unixify=void 0;var XJ=require("os"),QJ=require("path"),jI=XJ.platform()==="win32",ZJ=2,eX=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,tX=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,rX=/^\\\\([.?])/,nX=/\\(?![!()+@[\]{}])/g;function iX(e){return e.replace(/\\/g,"/")}qt.unixify=iX;function sX(e,t){return QJ.resolve(e,t)}qt.makeAbsolute=sX;function oX(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(ZJ)}return e}qt.removeLeadingDotSegment=oX;qt.escape=jI?zx:Hx;function zx(e){return e.replace(tX,"\\$2")}qt.escapeWindowsPath=zx;function Hx(e){return e.replace(eX,"\\$2")}qt.escapePosixPath=Hx;qt.convertPathToPattern=jI?qI:GI;function qI(e){return zx(e).replace(rX,"//$1").replace(nX,"/")}qt.convertWindowsPathToPattern=qI;function GI(e){return Hx(e)}qt.convertPosixPathToPattern=GI});var KI=w((gIe,HI)=>{f();HI.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var YI=w((bIe,WI)=>{f();var aX=KI(),VI={"{":"}","(":")","[":"]"},cX=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,i=-2,s=-2,o=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(o===-1||o>n||(o=e.indexOf("\\",t),o===-1||o>n)))||i!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(i=e.indexOf("}",t),i>t&&(o=e.indexOf("\\",t),o===-1||o>i))||s!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(s=e.indexOf(")",t),s>t&&(o=e.indexOf("\\",t),o===-1||o>s))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(s=e.indexOf(")",r),s>r&&(o=e.indexOf("\\",r),o===-1||o>s))))return!0;if(e[t]==="\\"){var a=e[t+1];t+=2;var c=VI[a];if(c){var u=e.indexOf(c,t);u!==-1&&(t=u+1)}if(e[t]==="!")return!0}else t++}return!1},uX=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=VI[r];if(n){var i=e.indexOf(n,t);i!==-1&&(t=i+1)}if(e[t]==="!")return!0}else t++}return!1};WI.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(aX(t))return!0;var n=cX;return r&&r.strict===!1&&(n=uX),n(t)}});var XI=w((vIe,JI)=>{"use strict";f();var lX=YI(),pX=require("path").posix.dirname,dX=require("os").platform()==="win32",Kx="/",fX=/\\/g,mX=/[\{\[].*[\}\]]$/,hX=/(^|[^\\])([\{\[]|\([^\)]+$)/,gX=/\\([\!\*\?\|\[\]\(\)\{\}])/g;JI.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&dX&&t.indexOf(Kx)<0&&(t=t.replace(fX,Kx)),mX.test(t)&&(t+=Kx),t+="a";do t=pX(t);while(lX(t)||hX.test(t));return t.replace(gX,"$1")}});var Jf=w(Pn=>{"use strict";f();Pn.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Pn.find=(e,t)=>e.nodes.find(r=>r.type===t);Pn.exceedsLimit=(e,t,r=1,n)=>n===!1||!Pn.isInteger(e)||!Pn.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;Pn.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Pn.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);Pn.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Pn.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Pn.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Pn.flatten=(...e)=>{let t=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var Xf=w((wIe,ZI)=>{"use strict";f();var QI=Jf();ZI.exports=(e,t={})=>{let r=(n,i={})=>{let s=t.escapeInvalid&&QI.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||o)&&QI.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(e)}});var tk=w((TIe,ek)=>{"use strict";f();ek.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var lk=w((PIe,uk)=>{"use strict";f();var rk=tk(),qo=(e,t,r)=>{if(rk(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(rk(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=e+":"+t+"="+i+s+o+a;if(qo.cache.hasOwnProperty(c))return qo.cache[c].result;let u=Math.min(e,t),l=Math.max(e,t);if(Math.abs(u-l)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=ck(e)||ck(t),d={min:e,max:t,a:u,b:l},h=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;m=nk(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(h=nk(u,l,d,n)),d.negatives=m,d.positives=h,d.result=yX(m,h,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&h.length+m.length>1&&(d.result=`(?:${d.result})`),qo.cache[c]=d,d.result};function yX(e,t,r){let n=Vx(e,t,"-",!1,r)||[],i=Vx(t,e,"",!1,r)||[],s=Vx(e,t,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function bX(e,t){let r=1,n=1,i=sk(e,r),s=new Set([t]);for(;e<=i&&i<=t;)s.add(i),r+=1,i=sk(e,r);for(i=ok(t+1,n)-1;e<i&&i<=t;)s.add(i),n+=1,i=ok(t+1,n)-1;return s=[...s],s.sort(DX),s}function xX(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=vX(e,t),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=CX(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function nk(e,t,r,n){let i=bX(e,t),s=[],o=e,a;for(let c=0;c<i.length;c++){let u=i[c],l=xX(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+ak(a.count),o=u+1;continue}r.isPadded&&(p=EX(u,r,n)),l.string=p+l.pattern+ak(l.count),s.push(l),o=u+1,a=l}return s}function Vx(e,t,r,n,i){let s=[];for(let o of e){let{string:a}=o;!n&&!ik(t,"string",a)&&s.push(r+a),n&&ik(t,"string",a)&&s.push(r+a)}return s}function vX(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function DX(e,t){return e>t?1:t>e?-1:0}function ik(e,t,r){return e.some(n=>n[t]===r)}function sk(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function ok(e,t){return e-e%Math.pow(10,t)}function ak(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function CX(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function ck(e){return/^-?(0+)\d/.test(e)}function EX(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}qo.cache={};qo.clearCache=()=>qo.cache={};uk.exports=qo});var Jx=w((_Ie,yk)=>{"use strict";f();var wX=require("util"),dk=lk(),pk=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),SX=e=>t=>e===!0?Number(t):String(t),Wx=e=>typeof e=="number"||typeof e=="string"&&e!=="",El=e=>Number.isInteger(+e),Yx=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},TX=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,AX=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Zf=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},PX=(e,t,r)=>{e.negatives.sort((a,c)=>a<c?-1:a>c?1:0),e.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=t.capture?"":"?:",i="",s="",o;return e.positives.length&&(i=e.positives.map(a=>Zf(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Zf(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,t.wrap?`(${n}${o})`:o},fk=(e,t,r,n)=>{if(r)return dk(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);if(e===t)return i;let s=String.fromCharCode(t);return`[${i}-${s}]`},mk=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${e.join("|")})`:e.join("|")}return dk(e,t,r)},hk=(...e)=>new RangeError("Invalid range arguments: "+wX.inspect(...e)),gk=(e,t,r)=>{if(r.strictRanges===!0)throw hk([e,t]);return[]},FX=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},_X=(e,t,r=1,n={})=>{let i=Number(e),s=Number(t);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw hk([e,t]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(e),c=String(t),u=String(r);r=Math.max(Math.abs(r),1);let l=Yx(a)||Yx(c)||Yx(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&TX(e,t,n)===!1,h=n.transform||SX(d);if(n.toRegex&&r===1)return fk(Zf(e,p),Zf(t,p),!0,n);let m={negatives:[],positives:[]},g=v=>m[v<0?"negatives":"positives"].push(Math.abs(v)),y=[],b=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(AX(h(i,b),p,d)),i=o?i-r:i+r,b++;return n.toRegex===!0?r>1?PX(m,n,p):mk(y,null,{wrap:!1,...n}):y},IX=(e,t,r=1,n={})=>{if(!El(e)&&e.length>1||!El(t)&&t.length>1)return gk(e,t,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return fk(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?mk(l,null,{wrap:!1,options:n}):l},Qf=(e,t,r,n={})=>{if(t==null&&Wx(e))return[e];if(!Wx(e)||!Wx(t))return gk(e,t,n);if(typeof r=="function")return Qf(e,t,1,{transform:r});if(pk(r))return Qf(e,t,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,El(r)?El(e)&&El(t)?_X(e,t,r,i):IX(e,t,Math.max(Math.abs(r),1),i):r!=null&&!pk(r)?FX(r,i):Qf(e,t,1,r)};yk.exports=Qf});var vk=w((kIe,xk)=>{"use strict";f();var kX=Jx(),bk=Jf(),NX=(e,t={})=>{let r=(n,i={})=>{let s=bk.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||o===!0,c=t.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=bk.reduce(n.nodes),p=kX(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(e)};xk.exports=NX});var Ek=w((RIe,Ck)=>{"use strict";f();var RX=Jx(),Dk=Xf(),mc=Jf(),Go=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?mc.flatten(t).map(i=>`{${i}}`):t;for(let i of e)if(Array.isArray(i))for(let s of i)n.push(Go(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?Go(i,s,r):i+s);return mc.flatten(n)},OX=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Go(a.pop(),Dk(i,t)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Go(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=mc.reduce(i.nodes);if(mc.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=RX(...p,t);d.length===0&&(d=Dk(i,t)),a.push(Go(a.pop(),d)),i.nodes=[];return}let c=mc.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(Go(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(Go(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return mc.flatten(n(e))};Ck.exports=OX});var Sk=w((BIe,wk)=>{"use strict";f();wk.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
23
|
-
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var _k=w((LIe,Fk)=>{"use strict";f();var BX=Xf(),{MAX_LENGTH:Tk,CHAR_BACKSLASH:Xx,CHAR_BACKTICK:MX,CHAR_COMMA:LX,CHAR_DOT:$X,CHAR_LEFT_PARENTHESES:UX,CHAR_RIGHT_PARENTHESES:jX,CHAR_LEFT_CURLY_BRACE:qX,CHAR_RIGHT_CURLY_BRACE:GX,CHAR_LEFT_SQUARE_BRACKET:Ak,CHAR_RIGHT_SQUARE_BRACKET:Pk,CHAR_DOUBLE_QUOTE:zX,CHAR_SINGLE_QUOTE:HX,CHAR_NO_BREAK_SPACE:KX,CHAR_ZERO_WIDTH_NOBREAK_SPACE:VX}=Sk(),WX=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Tk,r.maxLength):Tk;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let i={type:"root",input:e,nodes:[]},s=[i],o=i,a=i,c=0,u=e.length,l=0,p=0,d,h=()=>e[l++],m=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(m({type:"bos"});l<u;)if(o=s[s.length-1],d=h(),!(d===VX||d===KX)){if(d===Xx){m({type:"text",value:(t.keepEscaping?d:"")+h()});continue}if(d===Pk){m({type:"text",value:"\\"+d});continue}if(d===Ak){c++;let g;for(;l<u&&(g=h());){if(d+=g,g===Ak){c++;continue}if(g===Xx){d+=h();continue}if(g===Pk&&(c--,c===0))break}m({type:"text",value:d});continue}if(d===UX){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===jX){if(o.type!=="paren"){m({type:"text",value:d});continue}o=s.pop(),m({type:"text",value:d}),o=s[s.length-1];continue}if(d===zX||d===HX||d===MX){let g=d,y;for(t.keepQuotes!==!0&&(d="");l<u&&(y=h());){if(y===Xx){d+=y+h();continue}if(y===g){t.keepQuotes===!0&&(d+=y);break}d+=y}m({type:"text",value:d});continue}if(d===qX){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=m(y),s.push(o),m({type:"open",value:d});continue}if(d===GX){if(o.type!=="brace"){m({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,m({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===LX&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:BX(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===$X&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){m({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}m({type:"dot",value:d});continue}m({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),i};Fk.exports=WX});var Nk=w((UIe,kk)=>{"use strict";f();var Ik=Xf(),YX=vk(),JX=Ek(),XX=_k(),pn=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=pn.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(pn.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};pn.parse=(e,t={})=>XX(e,t);pn.stringify=(e,t={})=>Ik(typeof e=="string"?pn.parse(e,t):e,t);pn.compile=(e,t={})=>(typeof e=="string"&&(e=pn.parse(e,t)),YX(e,t));pn.expand=(e,t={})=>{typeof e=="string"&&(e=pn.parse(e,t));let r=JX(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};pn.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?pn.compile(e,t):pn.expand(e,t);kk.exports=pn});var wl=w((qIe,Lk)=>{"use strict";f();var QX=require("path"),Ni="\\\\/",Rk=`[^${Ni}]`,fs="\\.",ZX="\\+",eQ="\\?",em="\\/",tQ="(?=.)",Ok="[^/]",Qx=`(?:${em}|$)`,Bk=`(?:^|${em})`,Zx=`${fs}{1,2}${Qx}`,rQ=`(?!${fs})`,nQ=`(?!${Bk}${Zx})`,iQ=`(?!${fs}{0,1}${Qx})`,sQ=`(?!${Zx})`,oQ=`[^.${em}]`,aQ=`${Ok}*?`,Mk={DOT_LITERAL:fs,PLUS_LITERAL:ZX,QMARK_LITERAL:eQ,SLASH_LITERAL:em,ONE_CHAR:tQ,QMARK:Ok,END_ANCHOR:Qx,DOTS_SLASH:Zx,NO_DOT:rQ,NO_DOTS:nQ,NO_DOT_SLASH:iQ,NO_DOTS_SLASH:sQ,QMARK_NO_DOT:oQ,STAR:aQ,START_ANCHOR:Bk},cQ={...Mk,SLASH_LITERAL:`[${Ni}]`,QMARK:Rk,STAR:`${Rk}*?`,DOTS_SLASH:`${fs}{1,2}(?:[${Ni}]|$)`,NO_DOT:`(?!${fs})`,NO_DOTS:`(?!(?:^|[${Ni}])${fs}{1,2}(?:[${Ni}]|$))`,NO_DOT_SLASH:`(?!${fs}{0,1}(?:[${Ni}]|$))`,NO_DOTS_SLASH:`(?!${fs}{1,2}(?:[${Ni}]|$))`,QMARK_NO_DOT:`[^.${Ni}]`,START_ANCHOR:`(?:^|[${Ni}])`,END_ANCHOR:`(?:[${Ni}]|$)`},uQ={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Lk.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:uQ,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:QX.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?cQ:Mk}}});var Sl=w(Kr=>{"use strict";f();var lQ=require("path"),pQ=process.platform==="win32",{REGEX_BACKSLASH:dQ,REGEX_REMOVE_BACKSLASH:fQ,REGEX_SPECIAL_CHARS:mQ,REGEX_SPECIAL_CHARS_GLOBAL:hQ}=wl();Kr.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Kr.hasRegexChars=e=>mQ.test(e);Kr.isRegexChar=e=>e.length===1&&Kr.hasRegexChars(e);Kr.escapeRegex=e=>e.replace(hQ,"\\$1");Kr.toPosixSlashes=e=>e.replace(dQ,"/");Kr.removeBackslashes=e=>e.replace(fQ,t=>t==="\\"?"":t);Kr.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Kr.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:pQ===!0||lQ.sep==="\\";Kr.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Kr.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Kr.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Kr.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Kk=w((KIe,Hk)=>{"use strict";f();var $k=Sl(),{CHAR_ASTERISK:ev,CHAR_AT:gQ,CHAR_BACKWARD_SLASH:Tl,CHAR_COMMA:yQ,CHAR_DOT:tv,CHAR_EXCLAMATION_MARK:rv,CHAR_FORWARD_SLASH:zk,CHAR_LEFT_CURLY_BRACE:nv,CHAR_LEFT_PARENTHESES:iv,CHAR_LEFT_SQUARE_BRACKET:bQ,CHAR_PLUS:xQ,CHAR_QUESTION_MARK:Uk,CHAR_RIGHT_CURLY_BRACE:vQ,CHAR_RIGHT_PARENTHESES:jk,CHAR_RIGHT_SQUARE_BRACKET:DQ}=wl(),qk=e=>e===zk||e===Tl,Gk=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},CQ=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=e,u=-1,l=0,p=0,d=!1,h=!1,m=!1,g=!1,y=!1,b=!1,v=!1,C=!1,x=!1,D=!1,E=0,S,T,F={value:"",depth:0,isGlob:!1},A=()=>u>=n,P=()=>c.charCodeAt(u+1),j=()=>(S=T,c.charCodeAt(++u));for(;u<n;){T=j();let B;if(T===Tl){v=F.backslashes=!0,T=j(),T===nv&&(b=!0);continue}if(b===!0||T===nv){for(E++;A()!==!0&&(T=j());){if(T===Tl){v=F.backslashes=!0,j();continue}if(T===nv){E++;continue}if(b!==!0&&T===tv&&(T=j())===tv){if(d=F.isBrace=!0,m=F.isGlob=!0,D=!0,i===!0)continue;break}if(b!==!0&&T===yQ){if(d=F.isBrace=!0,m=F.isGlob=!0,D=!0,i===!0)continue;break}if(T===vQ&&(E--,E===0)){b=!1,d=F.isBrace=!0,D=!0;break}}if(i===!0)continue;break}if(T===zk){if(s.push(u),o.push(F),F={value:"",depth:0,isGlob:!1},D===!0)continue;if(S===tv&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(T===xQ||T===gQ||T===ev||T===Uk||T===rv)===!0&&P()===iv){if(m=F.isGlob=!0,g=F.isExtglob=!0,D=!0,T===rv&&u===l&&(x=!0),i===!0){for(;A()!==!0&&(T=j());){if(T===Tl){v=F.backslashes=!0,T=j();continue}if(T===jk){m=F.isGlob=!0,D=!0;break}}continue}break}if(T===ev){if(S===ev&&(y=F.isGlobstar=!0),m=F.isGlob=!0,D=!0,i===!0)continue;break}if(T===Uk){if(m=F.isGlob=!0,D=!0,i===!0)continue;break}if(T===bQ){for(;A()!==!0&&(B=j());){if(B===Tl){v=F.backslashes=!0,j();continue}if(B===DQ){h=F.isBracket=!0,m=F.isGlob=!0,D=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&T===rv&&u===l){C=F.negated=!0,l++;continue}if(r.noparen!==!0&&T===iv){if(m=F.isGlob=!0,i===!0){for(;A()!==!0&&(T=j());){if(T===iv){v=F.backslashes=!0,T=j();continue}if(T===jk){D=!0;break}}continue}break}if(m===!0){if(D=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,m=!1);let Y=c,J="",I="";l>0&&(J=c.slice(0,l),c=c.slice(l),p-=l),Y&&m===!0&&p>0?(Y=c.slice(0,p),I=c.slice(p)):m===!0?(Y="",I=c):Y=c,Y&&Y!==""&&Y!=="/"&&Y!==c&&qk(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),r.unescape===!0&&(I&&(I=$k.removeBackslashes(I)),Y&&v===!0&&(Y=$k.removeBackslashes(Y)));let k={prefix:J,input:e,start:l,base:Y,glob:I,isBrace:d,isBracket:h,isGlob:m,isExtglob:g,isGlobstar:y,negated:C,negatedExtglob:x};if(r.tokens===!0&&(k.maxDepth=0,qk(T)||o.push(F),k.tokens=o),r.parts===!0||r.tokens===!0){let B;for(let M=0;M<s.length;M++){let X=B?B+1:l,L=s[M],$=e.slice(X,L);r.tokens&&(M===0&&l!==0?(o[M].isPrefix=!0,o[M].value=J):o[M].value=$,Gk(o[M]),k.maxDepth+=o[M].depth),(M!==0||$!=="")&&a.push($),B=L}if(B&&B+1<e.length){let M=e.slice(B+1);a.push(M),r.tokens&&(o[o.length-1].value=M,Gk(o[o.length-1]),k.maxDepth+=o[o.length-1].depth)}k.slashes=s,k.parts=a}return k};Hk.exports=CQ});var Yk=w((WIe,Wk)=>{"use strict";f();var tm=wl(),dn=Sl(),{MAX_LENGTH:rm,POSIX_REGEX_SOURCE:EQ,REGEX_NON_SPECIAL_CHARS:wQ,REGEX_SPECIAL_CHARS_BACKREF:SQ,REPLACEMENTS:Vk}=tm,TQ=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(i=>dn.escapeRegex(i)).join("..")}return r},hc=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,sv=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Vk[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(rm,r.maxLength):rm,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=dn.isWindows(t),u=tm.globChars(c),l=tm.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:v,QMARK:C,QMARK_NO_DOT:x,STAR:D,START_ANCHOR:E}=u,S=K=>`(${a}(?:(?!${E}${K.dot?g:p}).)*?)`,T=r.dot?"":y,F=r.dot?C:x,A=r.bash===!0?S(r):D;r.capture&&(A=`(${A})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let P={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=dn.removePrefix(e,P),i=e.length;let j=[],Y=[],J=[],I=s,k,B=()=>P.index===i-1,M=P.peek=(K=1)=>e[P.index+K],X=P.advance=()=>e[++P.index]||"",L=()=>e.slice(P.index+1),$=(K="",oe=0)=>{P.consumed+=K,P.index+=oe},H=K=>{P.output+=K.output!=null?K.output:K.value,$(K.value)},re=()=>{let K=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)X(),P.start++,K++;return K%2===0?!1:(P.negated=!0,P.start++,!0)},ve=K=>{P[K]++,J.push(K)},Q=K=>{P[K]--,J.pop()},O=K=>{if(I.type==="globstar"){let oe=P.braces>0&&(K.type==="comma"||K.type==="brace"),z=K.extglob===!0||j.length&&(K.type==="pipe"||K.type==="paren");K.type!=="slash"&&K.type!=="paren"&&!oe&&!z&&(P.output=P.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=A,P.output+=I.output)}if(j.length&&K.type!=="paren"&&(j[j.length-1].inner+=K.value),(K.value||K.output)&&H(K),I&&I.type==="text"&&K.type==="text"){I.value+=K.value,I.output=(I.output||"")+K.value;return}K.prev=I,o.push(K),I=K},ee=(K,oe)=>{let z={...l[oe],conditions:1,inner:""};z.prev=I,z.parens=P.parens,z.output=P.output;let ne=(r.capture?"(":"")+z.open;ve("parens"),O({type:K,value:oe,output:P.output?"":m}),O({type:"paren",extglob:!0,value:X(),output:ne}),j.push(z)},pe=K=>{let oe=K.close+(r.capture?")":""),z;if(K.type==="negate"){let ne=A;if(K.inner&&K.inner.length>1&&K.inner.includes("/")&&(ne=S(r)),(ne!==A||B()||/^\)+$/.test(L()))&&(oe=K.close=`)$))${ne}`),K.inner.includes("*")&&(z=L())&&/^\.[^\\/.]+$/.test(z)){let ie=sv(z,{...t,fastpaths:!1}).output;oe=K.close=`)${ie})${ne})`}K.prev.type==="bos"&&(P.negatedExtglob=!0)}O({type:"paren",extglob:!0,value:k,output:oe}),Q("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let K=!1,oe=e.replace(SQ,(z,ne,ie,ae,le,Fe)=>ae==="\\"?(K=!0,z):ae==="?"?ne?ne+ae+(le?C.repeat(le.length):""):Fe===0?F+(le?C.repeat(le.length):""):C.repeat(ie.length):ae==="."?p.repeat(ie.length):ae==="*"?ne?ne+ae+(le?A:""):A:ne?z:`\\${z}`);return K===!0&&(r.unescape===!0?oe=oe.replace(/\\/g,""):oe=oe.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),oe===e&&r.contains===!0?(P.output=e,P):(P.output=dn.wrapOutput(oe,P,t),P)}for(;!B();){if(k=X(),k==="\0")continue;if(k==="\\"){let z=M();if(z==="/"&&r.bash!==!0||z==="."||z===";")continue;if(!z){k+="\\",O({type:"text",value:k});continue}let ne=/^\\+/.exec(L()),ie=0;if(ne&&ne[0].length>2&&(ie=ne[0].length,P.index+=ie,ie%2!==0&&(k+="\\")),r.unescape===!0?k=X():k+=X(),P.brackets===0){O({type:"text",value:k});continue}}if(P.brackets>0&&(k!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==!1&&k===":"){let z=I.value.slice(1);if(z.includes("[")&&(I.posix=!0,z.includes(":"))){let ne=I.value.lastIndexOf("["),ie=I.value.slice(0,ne),ae=I.value.slice(ne+2),le=EQ[ae];if(le){I.value=ie+le,P.backtrack=!0,X(),!s.output&&o.indexOf(I)===1&&(s.output=m);continue}}}(k==="["&&M()!==":"||k==="-"&&M()==="]")&&(k=`\\${k}`),k==="]"&&(I.value==="["||I.value==="[^")&&(k=`\\${k}`),r.posix===!0&&k==="!"&&I.value==="["&&(k="^"),I.value+=k,H({value:k});continue}if(P.quotes===1&&k!=='"'){k=dn.escapeRegex(k),I.value+=k,H({value:k});continue}if(k==='"'){P.quotes=P.quotes===1?0:1,r.keepQuotes===!0&&O({type:"text",value:k});continue}if(k==="("){ve("parens"),O({type:"paren",value:k});continue}if(k===")"){if(P.parens===0&&r.strictBrackets===!0)throw new SyntaxError(hc("opening","("));let z=j[j.length-1];if(z&&P.parens===z.parens+1){pe(j.pop());continue}O({type:"paren",value:k,output:P.parens?")":"\\)"}),Q("parens");continue}if(k==="["){if(r.nobracket===!0||!L().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(hc("closing","]"));k=`\\${k}`}else ve("brackets");O({type:"bracket",value:k});continue}if(k==="]"){if(r.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){O({type:"text",value:k,output:`\\${k}`});continue}if(P.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(hc("opening","["));O({type:"text",value:k,output:`\\${k}`});continue}Q("brackets");let z=I.value.slice(1);if(I.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(k=`/${k}`),I.value+=k,H({value:k}),r.literalBrackets===!1||dn.hasRegexChars(z))continue;let ne=dn.escapeRegex(I.value);if(P.output=P.output.slice(0,-I.value.length),r.literalBrackets===!0){P.output+=ne,I.value=ne;continue}I.value=`(${a}${ne}|${I.value})`,P.output+=I.value;continue}if(k==="{"&&r.nobrace!==!0){ve("braces");let z={type:"brace",value:k,output:"(",outputIndex:P.output.length,tokensIndex:P.tokens.length};Y.push(z),O(z);continue}if(k==="}"){let z=Y[Y.length-1];if(r.nobrace===!0||!z){O({type:"text",value:k,output:k});continue}let ne=")";if(z.dots===!0){let ie=o.slice(),ae=[];for(let le=ie.length-1;le>=0&&(o.pop(),ie[le].type!=="brace");le--)ie[le].type!=="dots"&&ae.unshift(ie[le].value);ne=TQ(ae,r),P.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let ie=P.output.slice(0,z.outputIndex),ae=P.tokens.slice(z.tokensIndex);z.value=z.output="\\{",k=ne="\\}",P.output=ie;for(let le of ae)P.output+=le.output||le.value}O({type:"brace",value:k,output:ne}),Q("braces"),Y.pop();continue}if(k==="|"){j.length>0&&j[j.length-1].conditions++,O({type:"text",value:k});continue}if(k===","){let z=k,ne=Y[Y.length-1];ne&&J[J.length-1]==="braces"&&(ne.comma=!0,z="|"),O({type:"comma",value:k,output:z});continue}if(k==="/"){if(I.type==="dot"&&P.index===P.start+1){P.start=P.index+1,P.consumed="",P.output="",o.pop(),I=s;continue}O({type:"slash",value:k,output:h});continue}if(k==="."){if(P.braces>0&&I.type==="dot"){I.value==="."&&(I.output=p);let z=Y[Y.length-1];I.type="dots",I.output+=k,I.value+=k,z.dots=!0;continue}if(P.braces+P.parens===0&&I.type!=="bos"&&I.type!=="slash"){O({type:"text",value:k,output:p});continue}O({type:"dot",value:k,output:p});continue}if(k==="?"){if(!(I&&I.value==="(")&&r.noextglob!==!0&&M()==="("&&M(2)!=="?"){ee("qmark",k);continue}if(I&&I.type==="paren"){let ne=M(),ie=k;if(ne==="<"&&!dn.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(I.value==="("&&!/[!=<:]/.test(ne)||ne==="<"&&!/<([!=]|\w+>)/.test(L()))&&(ie=`\\${k}`),O({type:"text",value:k,output:ie});continue}if(r.dot!==!0&&(I.type==="slash"||I.type==="bos")){O({type:"qmark",value:k,output:x});continue}O({type:"qmark",value:k,output:C});continue}if(k==="!"){if(r.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){ee("negate",k);continue}if(r.nonegate!==!0&&P.index===0){re();continue}}if(k==="+"){if(r.noextglob!==!0&&M()==="("&&M(2)!=="?"){ee("plus",k);continue}if(I&&I.value==="("||r.regex===!1){O({type:"plus",value:k,output:d});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||P.parens>0){O({type:"plus",value:k});continue}O({type:"plus",value:d});continue}if(k==="@"){if(r.noextglob!==!0&&M()==="("&&M(2)!=="?"){O({type:"at",extglob:!0,value:k,output:""});continue}O({type:"text",value:k});continue}if(k!=="*"){(k==="$"||k==="^")&&(k=`\\${k}`);let z=wQ.exec(L());z&&(k+=z[0],P.index+=z[0].length),O({type:"text",value:k});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=k,I.output=A,P.backtrack=!0,P.globstar=!0,$(k);continue}let K=L();if(r.noextglob!==!0&&/^\([^?]/.test(K)){ee("star",k);continue}if(I.type==="star"){if(r.noglobstar===!0){$(k);continue}let z=I.prev,ne=z.prev,ie=z.type==="slash"||z.type==="bos",ae=ne&&(ne.type==="star"||ne.type==="globstar");if(r.bash===!0&&(!ie||K[0]&&K[0]!=="/")){O({type:"star",value:k,output:""});continue}let le=P.braces>0&&(z.type==="comma"||z.type==="brace"),Fe=j.length&&(z.type==="pipe"||z.type==="paren");if(!ie&&z.type!=="paren"&&!le&&!Fe){O({type:"star",value:k,output:""});continue}for(;K.slice(0,3)==="/**";){let As=e[P.index+4];if(As&&As!=="/")break;K=K.slice(3),$("/**",3)}if(z.type==="bos"&&B()){I.type="globstar",I.value+=k,I.output=S(r),P.output=I.output,P.globstar=!0,$(k);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!ae&&B()){P.output=P.output.slice(0,-(z.output+I.output).length),z.output=`(?:${z.output}`,I.type="globstar",I.output=S(r)+(r.strictSlashes?")":"|$)"),I.value+=k,P.globstar=!0,P.output+=z.output+I.output,$(k);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&K[0]==="/"){let As=K[1]!==void 0?"|$":"";P.output=P.output.slice(0,-(z.output+I.output).length),z.output=`(?:${z.output}`,I.type="globstar",I.output=`${S(r)}${h}|${h}${As})`,I.value+=k,P.output+=z.output+I.output,P.globstar=!0,$(k+X()),O({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&K[0]==="/"){I.type="globstar",I.value+=k,I.output=`(?:^|${h}|${S(r)}${h})`,P.output=I.output,P.globstar=!0,$(k+X()),O({type:"slash",value:"/",output:""});continue}P.output=P.output.slice(0,-I.output.length),I.type="globstar",I.output=S(r),I.value+=k,P.output+=I.output,P.globstar=!0,$(k);continue}let oe={type:"star",value:k,output:A};if(r.bash===!0){oe.output=".*?",(I.type==="bos"||I.type==="slash")&&(oe.output=T+oe.output),O(oe);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===!0){oe.output=k,O(oe);continue}(P.index===P.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(P.output+=b,I.output+=b):r.dot===!0?(P.output+=v,I.output+=v):(P.output+=T,I.output+=T),M()!=="*"&&(P.output+=m,I.output+=m)),O(oe)}for(;P.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(hc("closing","]"));P.output=dn.escapeLast(P.output,"["),Q("brackets")}for(;P.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(hc("closing",")"));P.output=dn.escapeLast(P.output,"("),Q("parens")}for(;P.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(hc("closing","}"));P.output=dn.escapeLast(P.output,"{"),Q("braces")}if(r.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&O({type:"maybe_slash",value:"",output:`${h}?`}),P.backtrack===!0){P.output="";for(let K of P.tokens)P.output+=K.output!=null?K.output:K.value,K.suffix&&(P.output+=K.suffix)}return P};sv.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(rm,r.maxLength):rm,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=Vk[e]||e;let s=dn.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=tm.globChars(s),g=r.dot?p:l,y=r.dot?d:l,b=r.capture?"":"?:",v={negated:!1,prefix:""},C=r.bash===!0?".*?":h;r.capture&&(C=`(${C})`);let x=T=>T.noglobstar===!0?C:`(${b}(?:(?!${m}${T.dot?u:o}).)*?)`,D=T=>{switch(T){case"*":return`${g}${c}${C}`;case".*":return`${o}${c}${C}`;case"*.*":return`${g}${C}${o}${c}${C}`;case"*/*":return`${g}${C}${a}${c}${y}${C}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${C}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${C}${o}${c}${C}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${C}`;default:{let F=/^(.*?)\.(\w+)$/.exec(T);if(!F)return;let A=D(F[1]);return A?A+o+F[2]:void 0}}},E=dn.removePrefix(e,v),S=D(E);return S&&r.strictSlashes!==!0&&(S+=`${a}?`),S};Wk.exports=sv});var Xk=w((JIe,Jk)=>{"use strict";f();var AQ=require("path"),PQ=Kk(),ov=Yk(),av=Sl(),FQ=wl(),_Q=e=>e&&typeof e=="object"&&!Array.isArray(e),Lt=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>Lt(d,t,r));return d=>{for(let h of l){let m=h(d);if(m)return m}return!1}}let n=_Q(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=av.isWindows(t),o=n?Lt.compileRe(e,t):Lt.makeRe(e,t,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};c=Lt(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:h,output:m}=Lt.test(l,o,t,{glob:e,posix:s}),g={glob:e,state:a,regex:o,posix:s,input:l,output:m,match:h,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Lt.test=(e,t,r,{glob:n,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?av.toPosixSlashes:null),a=e===n,c=a&&o?o(e):e;return a===!1&&(c=o?o(e):e,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Lt.matchBase(e,t,r,i):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};Lt.matchBase=(e,t,r,n=av.isWindows(r))=>(t instanceof RegExp?t:Lt.makeRe(t,r)).test(AQ.basename(e));Lt.isMatch=(e,t,r)=>Lt(t,r)(e);Lt.parse=(e,t)=>Array.isArray(e)?e.map(r=>Lt.parse(r,t)):ov(e,{...t,fastpaths:!1});Lt.scan=(e,t)=>PQ(e,t);Lt.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let c=Lt.toRegex(a,t);return n===!0&&(c.state=e),c};Lt.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=ov.fastpaths(e,t)),i.output||(i=ov(e,t)),Lt.compileRe(i,t,r,n)};Lt.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};Lt.constants=FQ;Jk.exports=Lt});var Zk=w((QIe,Qk)=>{"use strict";f();Qk.exports=Xk()});var nm=w((eke,i2)=>{"use strict";f();var t2=require("util"),r2=Nk(),Ri=Zk(),cv=Sl(),e2=e=>e===""||e==="./",n2=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},Ct=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=Ri(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let h of e){let m=p(h,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),i.add(m.output)))}}let u=(o===t.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return u};Ct.match=Ct;Ct.matcher=(e,t)=>Ri(e,t);Ct.isMatch=(e,t,r)=>Ri(t,r)(e);Ct.any=Ct.isMatch;Ct.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(Ct(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};Ct.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${t2.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>Ct.contains(e,n,r));if(typeof t=="string"){if(e2(e)||e2(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return Ct.isMatch(e,t,{...r,contains:!0})};Ct.matchKeys=(e,t,r)=>{if(!cv.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=Ct(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};Ct.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ri(String(i),r);if(n.some(o=>s(o)))return!0}return!1};Ct.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ri(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};Ct.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${t2.inspect(e)}"`);return[].concat(t).every(n=>Ri(n,r)(e))};Ct.capture=(e,t,r)=>{let n=cv.isWindows(r),s=Ri.makeRe(String(e),{...r,capture:!0}).exec(n?cv.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Ct.makeRe=(...e)=>Ri.makeRe(...e);Ct.scan=(...e)=>Ri.scan(...e);Ct.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of r2(String(n),t))r.push(Ri.parse(i,t));return r};Ct.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!n2(e)?[e]:r2(e,t)};Ct.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return Ct.braces(e,{...t,expand:!0})};Ct.hasBraces=n2;i2.exports=Ct});var m2=w(be=>{"use strict";f();Object.defineProperty(be,"__esModule",{value:!0});be.isAbsolute=be.partitionAbsoluteAndRelative=be.removeDuplicateSlashes=be.matchAny=be.convertPatternsToRe=be.makeRe=be.getPatternParts=be.expandBraceExpansion=be.expandPatternsWithBraceExpansion=be.isAffectDepthOfReadingPattern=be.endsWithSlashGlobStar=be.hasGlobStar=be.getBaseDirectory=be.isPatternRelatedToParentDirectory=be.getPatternsOutsideCurrentDirectory=be.getPatternsInsideCurrentDirectory=be.getPositivePatterns=be.getNegativePatterns=be.isPositivePattern=be.isNegativePattern=be.convertToNegativePattern=be.convertToPositivePattern=be.isDynamicPattern=be.isStaticPattern=void 0;var s2=require("path"),IQ=XI(),uv=nm(),o2="**",kQ="\\",NQ=/[*?]|^!/,RQ=/\[[^[]*]/,OQ=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,BQ=/[!*+?@]\([^(]*\)/,MQ=/,|\.\./,LQ=/(?!^)\/{2,}/g;function a2(e,t={}){return!c2(e,t)}be.isStaticPattern=a2;function c2(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(kQ)||NQ.test(e)||RQ.test(e)||OQ.test(e)||t.extglob!==!1&&BQ.test(e)||t.braceExpansion!==!1&&$Q(e))}be.isDynamicPattern=c2;function $Q(e){let t=e.indexOf("{");if(t===-1)return!1;let r=e.indexOf("}",t+1);if(r===-1)return!1;let n=e.slice(t,r);return MQ.test(n)}function UQ(e){return im(e)?e.slice(1):e}be.convertToPositivePattern=UQ;function jQ(e){return"!"+e}be.convertToNegativePattern=jQ;function im(e){return e.startsWith("!")&&e[1]!=="("}be.isNegativePattern=im;function u2(e){return!im(e)}be.isPositivePattern=u2;function qQ(e){return e.filter(im)}be.getNegativePatterns=qQ;function GQ(e){return e.filter(u2)}be.getPositivePatterns=GQ;function zQ(e){return e.filter(t=>!lv(t))}be.getPatternsInsideCurrentDirectory=zQ;function HQ(e){return e.filter(lv)}be.getPatternsOutsideCurrentDirectory=HQ;function lv(e){return e.startsWith("..")||e.startsWith("./..")}be.isPatternRelatedToParentDirectory=lv;function KQ(e){return IQ(e,{flipBackslashes:!1})}be.getBaseDirectory=KQ;function VQ(e){return e.includes(o2)}be.hasGlobStar=VQ;function l2(e){return e.endsWith("/"+o2)}be.endsWithSlashGlobStar=l2;function WQ(e){let t=s2.basename(e);return l2(e)||a2(t)}be.isAffectDepthOfReadingPattern=WQ;function YQ(e){return e.reduce((t,r)=>t.concat(p2(r)),[])}be.expandPatternsWithBraceExpansion=YQ;function p2(e){let t=uv.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}be.expandBraceExpansion=p2;function JQ(e,t){let{parts:r}=uv.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return r.length===0&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}be.getPatternParts=JQ;function d2(e,t){return uv.makeRe(e,t)}be.makeRe=d2;function XQ(e,t){return e.map(r=>d2(r,t))}be.convertPatternsToRe=XQ;function QQ(e,t){return t.some(r=>r.test(e))}be.matchAny=QQ;function ZQ(e){return e.replace(LQ,"/")}be.removeDuplicateSlashes=ZQ;function eZ(e){let t=[],r=[];for(let n of e)f2(n)?t.push(n):r.push(n);return[t,r]}be.partitionAbsoluteAndRelative=eZ;function f2(e){return s2.isAbsolute(e)}be.isAbsolute=f2});var b2=w((ike,y2)=>{"use strict";f();var tZ=require("stream"),h2=tZ.PassThrough,rZ=Array.prototype.slice;y2.exports=nZ;function nZ(){let e=[],t=rZ.call(arguments),r=!1,n=t[t.length-1];n&&!Array.isArray(n)&&n.pipe==null?t.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=h2(n);function a(){for(let l=0,p=arguments.length;l<p;l++)e.push(g2(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=e.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function h(m){function g(){m.removeListener("merge2UnpipeEnd",g),m.removeListener("end",g),s&&m.removeListener("error",y),d()}function y(b){o.emit("error",b)}if(m._readableState.endEmitted)return d();m.on("merge2UnpipeEnd",g),m.on("end",g),s&&m.on("error",y),m.pipe(o,{end:!1}),m.resume()}for(let m=0;m<l.length;m++)h(l[m]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),o}function g2(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=g2(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(h2(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var v2=w(sm=>{"use strict";f();Object.defineProperty(sm,"__esModule",{value:!0});sm.merge=void 0;var iZ=b2();function sZ(e){let t=iZ(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>x2(e)),t.once("end",()=>x2(e)),t}sm.merge=sZ;function x2(e){e.forEach(t=>t.emit("close"))}});var D2=w(gc=>{"use strict";f();Object.defineProperty(gc,"__esModule",{value:!0});gc.isEmpty=gc.isString=void 0;function oZ(e){return typeof e=="string"}gc.isString=oZ;function aZ(e){return e===""}gc.isEmpty=aZ});var ms=w(Dr=>{"use strict";f();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.string=Dr.stream=Dr.pattern=Dr.path=Dr.fs=Dr.errno=Dr.array=void 0;var cZ=LI();Dr.array=cZ;var uZ=$I();Dr.errno=uZ;var lZ=UI();Dr.fs=lZ;var pZ=zI();Dr.path=pZ;var dZ=m2();Dr.pattern=dZ;var fZ=v2();Dr.stream=fZ;var mZ=D2();Dr.string=mZ});var S2=w(Cr=>{"use strict";f();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.convertPatternGroupToTask=Cr.convertPatternGroupsToTasks=Cr.groupPatternsByBaseDirectory=Cr.getNegativePatternsAsPositive=Cr.getPositivePatterns=Cr.convertPatternsToTasks=Cr.generate=void 0;var ii=ms();function hZ(e,t){let r=C2(e,t),n=C2(t.ignore,t),i=E2(r),s=w2(r,n),o=i.filter(l=>ii.pattern.isStaticPattern(l,t)),a=i.filter(l=>ii.pattern.isDynamicPattern(l,t)),c=pv(o,s,!1),u=pv(a,s,!0);return c.concat(u)}Cr.generate=hZ;function C2(e,t){let r=e;return t.braceExpansion&&(r=ii.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>ii.pattern.removeDuplicateSlashes(n))}function pv(e,t,r){let n=[],i=ii.pattern.getPatternsOutsideCurrentDirectory(e),s=ii.pattern.getPatternsInsideCurrentDirectory(e),o=dv(i),a=dv(s);return n.push(...fv(o,t,r)),"."in a?n.push(mv(".",s,t,r)):n.push(...fv(a,t,r)),n}Cr.convertPatternsToTasks=pv;function E2(e){return ii.pattern.getPositivePatterns(e)}Cr.getPositivePatterns=E2;function w2(e,t){return ii.pattern.getNegativePatterns(e).concat(t).map(ii.pattern.convertToPositivePattern)}Cr.getNegativePatternsAsPositive=w2;function dv(e){let t={};return e.reduce((r,n)=>{let i=ii.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},t)}Cr.groupPatternsByBaseDirectory=dv;function fv(e,t,r){return Object.keys(e).map(n=>mv(n,e[n],t,r))}Cr.convertPatternGroupsToTasks=fv;function mv(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(ii.pattern.convertToNegativePattern))}}Cr.convertPatternGroupToTask=mv});var A2=w(om=>{"use strict";f();Object.defineProperty(om,"__esModule",{value:!0});om.read=void 0;function gZ(e,t,r){t.fs.lstat(e,(n,i)=>{if(n!==null){T2(r,n);return}if(!i.isSymbolicLink()||!t.followSymbolicLink){hv(r,i);return}t.fs.stat(e,(s,o)=>{if(s!==null){if(t.throwErrorOnBrokenSymbolicLink){T2(r,s);return}hv(r,i);return}t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),hv(r,o)})})}om.read=gZ;function T2(e,t){e(t)}function hv(e,t){e(null,t)}});var P2=w(am=>{"use strict";f();Object.defineProperty(am,"__esModule",{value:!0});am.read=void 0;function yZ(e,t){let r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw n}}am.read=yZ});var F2=w(Gs=>{"use strict";f();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.createFileSystemAdapter=Gs.FILE_SYSTEM_ADAPTER=void 0;var cm=require("fs");Gs.FILE_SYSTEM_ADAPTER={lstat:cm.lstat,stat:cm.stat,lstatSync:cm.lstatSync,statSync:cm.statSync};function bZ(e){return e===void 0?Gs.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Gs.FILE_SYSTEM_ADAPTER),e)}Gs.createFileSystemAdapter=bZ});var _2=w(yv=>{"use strict";f();Object.defineProperty(yv,"__esModule",{value:!0});var xZ=F2(),gv=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=xZ.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,r){return t??r}};yv.default=gv});var zo=w(zs=>{"use strict";f();Object.defineProperty(zs,"__esModule",{value:!0});zs.statSync=zs.stat=zs.Settings=void 0;var I2=A2(),vZ=P2(),bv=_2();zs.Settings=bv.default;function DZ(e,t,r){if(typeof t=="function"){I2.read(e,xv(),t);return}I2.read(e,xv(t),r)}zs.stat=DZ;function CZ(e,t){let r=xv(t);return vZ.read(e,r)}zs.statSync=CZ;function xv(e={}){return e instanceof bv.default?e:new bv.default(e)}});var R2=w((wke,N2)=>{f();var k2;N2.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(k2||(k2=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var B2=w((Tke,O2)=>{f();O2.exports=wZ;var EZ=R2();function wZ(e,t){let r,n,i,s=!0;Array.isArray(e)?(r=[],n=e.length):(i=Object.keys(e),r={},n=i.length);function o(c){function u(){t&&t(c,r),t=null}s?EZ(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){e[c](function(u,l){a(c,u,l)})}):e.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var vv=w(lm=>{"use strict";f();Object.defineProperty(lm,"__esModule",{value:!0});lm.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var um=process.versions.node.split(".");if(um[0]===void 0||um[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var M2=Number.parseInt(um[0],10),SZ=Number.parseInt(um[1],10),L2=10,TZ=10,AZ=M2>L2,PZ=M2===L2&&SZ>=TZ;lm.IS_SUPPORT_READDIR_WITH_FILE_TYPES=AZ||PZ});var $2=w(pm=>{"use strict";f();Object.defineProperty(pm,"__esModule",{value:!0});pm.createDirentFromStats=void 0;var Dv=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function FZ(e,t){return new Dv(e,t)}pm.createDirentFromStats=FZ});var Cv=w(dm=>{"use strict";f();Object.defineProperty(dm,"__esModule",{value:!0});dm.fs=void 0;var _Z=$2();dm.fs=_Z});var Ev=w(fm=>{"use strict";f();Object.defineProperty(fm,"__esModule",{value:!0});fm.joinPathSegments=void 0;function IZ(e,t,r){return e.endsWith(r)?e+t:e+r+t}fm.joinPathSegments=IZ});var H2=w(Hs=>{"use strict";f();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.readdir=Hs.readdirWithFileTypes=Hs.read=void 0;var kZ=zo(),U2=B2(),NZ=vv(),j2=Cv(),q2=Ev();function RZ(e,t,r){if(!t.stats&&NZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES){G2(e,t,r);return}z2(e,t,r)}Hs.read=RZ;function G2(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,i)=>{if(n!==null){mm(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:q2.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){wv(r,s);return}let o=s.map(a=>OZ(a,t));U2(o,(a,c)=>{if(a!==null){mm(r,a);return}wv(r,c)})})}Hs.readdirWithFileTypes=G2;function OZ(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,(n,i)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,e);return}e.dirent=j2.fs.createDirentFromStats(e.name,i),r(null,e)})}}function z2(e,t,r){t.fs.readdir(e,(n,i)=>{if(n!==null){mm(r,n);return}let s=i.map(o=>{let a=q2.joinPathSegments(e,o,t.pathSegmentSeparator);return c=>{kZ.stat(a,t.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:j2.fs.createDirentFromStats(o,l)};t.stats&&(p.stats=l),c(null,p)})}});U2(s,(o,a)=>{if(o!==null){mm(r,o);return}wv(r,a)})})}Hs.readdir=z2;function mm(e,t){e(t)}function wv(e,t){e(null,t)}});var J2=w(Ks=>{"use strict";f();Object.defineProperty(Ks,"__esModule",{value:!0});Ks.readdir=Ks.readdirWithFileTypes=Ks.read=void 0;var BZ=zo(),MZ=vv(),K2=Cv(),V2=Ev();function LZ(e,t){return!t.stats&&MZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES?W2(e,t):Y2(e,t)}Ks.read=LZ;function W2(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:V2.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let s=t.fs.statSync(i.path);i.dirent=K2.fs.createDirentFromStats(i.name,s)}catch(s){if(t.throwErrorOnBrokenSymbolicLink)throw s}return i})}Ks.readdirWithFileTypes=W2;function Y2(e,t){return t.fs.readdirSync(e).map(n=>{let i=V2.joinPathSegments(e,n,t.pathSegmentSeparator),s=BZ.statSync(i,t.fsStatSettings),o={name:n,path:i,dirent:K2.fs.createDirentFromStats(n,s)};return t.stats&&(o.stats=s),o})}Ks.readdir=Y2});var X2=w(Vs=>{"use strict";f();Object.defineProperty(Vs,"__esModule",{value:!0});Vs.createFileSystemAdapter=Vs.FILE_SYSTEM_ADAPTER=void 0;var yc=require("fs");Vs.FILE_SYSTEM_ADAPTER={lstat:yc.lstat,stat:yc.stat,lstatSync:yc.lstatSync,statSync:yc.statSync,readdir:yc.readdir,readdirSync:yc.readdirSync};function $Z(e){return e===void 0?Vs.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Vs.FILE_SYSTEM_ADAPTER),e)}Vs.createFileSystemAdapter=$Z});var Q2=w(Tv=>{"use strict";f();Object.defineProperty(Tv,"__esModule",{value:!0});var UZ=require("path"),jZ=zo(),qZ=X2(),Sv=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=qZ.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,UZ.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new jZ.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Tv.default=Sv});var hm=w(Ws=>{"use strict";f();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Settings=Ws.scandirSync=Ws.scandir=void 0;var Z2=H2(),GZ=J2(),Av=Q2();Ws.Settings=Av.default;function zZ(e,t,r){if(typeof t=="function"){Z2.read(e,Pv(),t);return}Z2.read(e,Pv(t),r)}Ws.scandir=zZ;function HZ(e,t){let r=Pv(t);return GZ.read(e,r)}Ws.scandirSync=HZ;function Pv(e={}){return e instanceof Av.default?e:new Av.default(e)}});var tN=w((Kke,eN)=>{"use strict";f();function KZ(e){var t=new e,r=t;function n(){var s=t;return s.next?t=s.next:(t=new e,r=t),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}eN.exports=KZ});var nN=w((Wke,Fv)=>{"use strict";f();var VZ=tN();function rN(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=VZ(WZ),i=null,s=null,o=0,a=null,c={push:g,drain:Fn,saturated:Fn,pause:l,paused:!1,get concurrency(){return r},set concurrency(D){if(!(D>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=D,!c.paused)for(;i&&o<r;)o++,b()},running:u,resume:h,idle:m,length:p,getQueue:d,unshift:y,empty:Fn,kill:v,killAndDrain:C,error:x};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var D=i,E=0;D;)D=D.next,E++;return E}function d(){for(var D=i,E=[];D;)E.push(D.value),D=D.next;return E}function h(){if(c.paused){if(c.paused=!1,i===null){o++,b();return}for(;i&&o<r;)o++,b()}}function m(){return o===0&&c.length()===0}function g(D,E){var S=n.get();S.context=e,S.release=b,S.value=D,S.callback=E||Fn,S.errorHandler=a,o>=r||c.paused?s?(s.next=S,s=S):(i=S,s=S,c.saturated()):(o++,t.call(e,S.value,S.worked))}function y(D,E){var S=n.get();S.context=e,S.release=b,S.value=D,S.callback=E||Fn,S.errorHandler=a,o>=r||c.paused?i?(S.next=i,i=S):(i=S,s=S,c.saturated()):(o++,t.call(e,S.value,S.worked))}function b(D){D&&n.release(D);var E=i;E&&o<=r?c.paused?o--:(s===i&&(s=null),i=E.next,E.next=null,t.call(e,E.value,E.worked),s===null&&c.empty()):--o===0&&c.drain()}function v(){i=null,s=null,c.drain=Fn}function C(){i=null,s=null,c.drain(),c.drain=Fn}function x(D){a=D}}function Fn(){}function WZ(){this.value=null,this.callback=Fn,this.next=null,this.release=Fn,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,n){var i=e.callback,s=e.errorHandler,o=e.value;e.value=null,e.callback=Fn,e.errorHandler&&s(r,o),i.call(e.context,r,n),e.release(e)}}function YZ(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(l,p){t.call(this,l).then(function(d){p(null,d)},p)}var i=rN(e,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,h){s(l,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Fn),p}function c(l){var p=new Promise(function(d,h){o(l,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Fn),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}Fv.exports=rN;Fv.exports.promise=YZ});var gm=w(Oi=>{"use strict";f();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.joinPathSegments=Oi.replacePathSegmentSeparator=Oi.isAppliedFilter=Oi.isFatalError=void 0;function JZ(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Oi.isFatalError=JZ;function XZ(e,t){return e===null||e(t)}Oi.isAppliedFilter=XZ;function QZ(e,t){return e.split(/[/\\]/).join(t)}Oi.replacePathSegmentSeparator=QZ;function ZZ(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Oi.joinPathSegments=ZZ});var kv=w(Iv=>{"use strict";f();Object.defineProperty(Iv,"__esModule",{value:!0});var eee=gm(),_v=class{constructor(t,r){this._root=t,this._settings=r,this._root=eee.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Iv.default=_v});var Ov=w(Rv=>{"use strict";f();Object.defineProperty(Rv,"__esModule",{value:!0});var tee=require("events"),ree=hm(),nee=nN(),ym=gm(),iee=kv(),Nv=class extends iee.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=ree.scandir,this._emitter=new tee.EventEmitter,this._queue=nee(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){let n={directory:t,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,t.base);r(null,void 0)})}_handleError(t){this._isDestroyed||!ym.isFatalError(this._settings,t)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError)return;let n=t.path;r!==void 0&&(t.path=ym.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),ym.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&ym.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Rv.default=Nv});var iN=w(Mv=>{"use strict";f();Object.defineProperty(Mv,"__esModule",{value:!0});var see=Ov(),Bv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new see.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{oee(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{aee(t,this._storage)}),this._reader.read()}};Mv.default=Bv;function oee(e,t){e(t)}function aee(e,t){e(null,t)}});var sN=w($v=>{"use strict";f();Object.defineProperty($v,"__esModule",{value:!0});var cee=require("stream"),uee=Ov(),Lv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new uee.default(this._root,this._settings),this._stream=new cee.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};$v.default=Lv});var oN=w(jv=>{"use strict";f();Object.defineProperty(jv,"__esModule",{value:!0});var lee=hm(),bm=gm(),pee=kv(),Uv=class extends pee.default{constructor(){super(...arguments),this._scandir=lee.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(let t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,r){try{let n=this._scandir(t,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(t){if(bm.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=bm.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),bm.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&bm.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};jv.default=Uv});var aN=w(Gv=>{"use strict";f();Object.defineProperty(Gv,"__esModule",{value:!0});var dee=oN(),qv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new dee.default(this._root,this._settings)}read(){return this._reader.read()}};Gv.default=qv});var cN=w(Hv=>{"use strict";f();Object.defineProperty(Hv,"__esModule",{value:!0});var fee=require("path"),mee=hm(),zv=class{constructor(t={}){this._options=t,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,fee.sep),this.fsScandirSettings=new mee.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Hv.default=zv});var vm=w(Bi=>{"use strict";f();Object.defineProperty(Bi,"__esModule",{value:!0});Bi.Settings=Bi.walkStream=Bi.walkSync=Bi.walk=void 0;var uN=iN(),hee=sN(),gee=aN(),Kv=cN();Bi.Settings=Kv.default;function yee(e,t,r){if(typeof t=="function"){new uN.default(e,xm()).read(t);return}new uN.default(e,xm(t)).read(r)}Bi.walk=yee;function bee(e,t){let r=xm(t);return new gee.default(e,r).read()}Bi.walkSync=bee;function xee(e,t){let r=xm(t);return new hee.default(e,r).read()}Bi.walkStream=xee;function xm(e={}){return e instanceof Kv.default?e:new Kv.default(e)}});var Dm=w(Wv=>{"use strict";f();Object.defineProperty(Wv,"__esModule",{value:!0});var vee=require("path"),Dee=zo(),lN=ms(),Vv=class{constructor(t){this._settings=t,this._fsStatSettings=new Dee.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return vee.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:lN.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!lN.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};Wv.default=Vv});var Xv=w(Jv=>{"use strict";f();Object.defineProperty(Jv,"__esModule",{value:!0});var Cee=require("stream"),Eee=zo(),wee=vm(),See=Dm(),Yv=class extends See.default{constructor(){super(...arguments),this._walkStream=wee.walkStream,this._stat=Eee.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),i=new Cee.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],t[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(t,r,n){return this._getStat(t).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(t){return new Promise((r,n)=>{this._stat(t,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};Jv.default=Yv});var pN=w(Zv=>{"use strict";f();Object.defineProperty(Zv,"__esModule",{value:!0});var Tee=vm(),Aee=Dm(),Pee=Xv(),Qv=class extends Aee.default{constructor(){super(...arguments),this._walkAsync=Tee.walk,this._readerStream=new Pee.default(this._settings)}dynamic(t,r){return new Promise((n,i)=>{this._walkAsync(t,r,(s,o)=>{s===null?n(o):i(s)})})}async static(t,r){let n=[],i=this._readerStream.static(t,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};Zv.default=Qv});var dN=w(tD=>{"use strict";f();Object.defineProperty(tD,"__esModule",{value:!0});var Al=ms(),eD=class{constructor(t,r,n){this._patterns=t,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let t of this._patterns){let r=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:t,segments:r,sections:n})}}_getPatternSegments(t){return Al.pattern.getPatternParts(t,this._micromatchOptions).map(n=>Al.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Al.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return Al.array.splitWhen(t,r=>r.dynamic&&Al.pattern.hasGlobStar(r.pattern))}};tD.default=eD});var fN=w(nD=>{"use strict";f();Object.defineProperty(nD,"__esModule",{value:!0});var Fee=dN(),rD=class extends Fee.default{match(t){let r=t.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};nD.default=rD});var mN=w(sD=>{"use strict";f();Object.defineProperty(sD,"__esModule",{value:!0});var Cm=ms(),_ee=fN(),iD=class{constructor(t,r){this._settings=t,this._micromatchOptions=r}getFilter(t,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(t,o,i,s)}_getMatcher(t){return new _ee.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Cm.pattern.isAffectDepthOfReadingPattern);return Cm.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,i){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=Cm.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(t,r){return this._settings.deep===1/0?!1:this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){let n=r.split("/").length;if(t==="")return n;let i=t.split("/").length;return n-i}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!Cm.pattern.matchAny(t,r)}};sD.default=iD});var hN=w(aD=>{"use strict";f();Object.defineProperty(aD,"__esModule",{value:!0});var Ys=ms(),oD=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let[n,i]=Ys.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:Ys.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:Ys.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:Ys.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(t,r){let n=Ys.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;let i=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isMatchToPatternsSet(t,r,n){return!(!this._isMatchToPatterns(t,r.positive.all,n)||this._isMatchToPatterns(t,r.negative.relative,n)||this._isMatchToAbsoluteNegative(t,r.negative.absolute,n))}_isMatchToAbsoluteNegative(t,r,n){if(r.length===0)return!1;let i=Ys.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(t,r,n){if(r.length===0)return!1;let i=Ys.pattern.matchAny(t,r);return!i&&n?Ys.pattern.matchAny(t+"/",r):i}};aD.default=oD});var gN=w(uD=>{"use strict";f();Object.defineProperty(uD,"__esModule",{value:!0});var Iee=ms(),cD=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return Iee.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};uD.default=cD});var bN=w(pD=>{"use strict";f();Object.defineProperty(pD,"__esModule",{value:!0});var yN=ms(),lD=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=yN.path.makeAbsolute(this._settings.cwd,r),r=yN.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};pD.default=lD});var Em=w(fD=>{"use strict";f();Object.defineProperty(fD,"__esModule",{value:!0});var kee=require("path"),Nee=mN(),Ree=hN(),Oee=gN(),Bee=bN(),dD=class{constructor(t){this._settings=t,this.errorFilter=new Oee.default(this._settings),this.entryFilter=new Ree.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Nee.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Bee.default(this._settings)}_getRootDirectory(t){return kee.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){let r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};fD.default=dD});var xN=w(hD=>{"use strict";f();Object.defineProperty(hD,"__esModule",{value:!0});var Mee=pN(),Lee=Em(),mD=class extends Lee.default{constructor(){super(...arguments),this._reader=new Mee.default(this._settings)}async read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(r,t,n)).map(s=>n.transform(s))}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};hD.default=mD});var vN=w(yD=>{"use strict";f();Object.defineProperty(yD,"__esModule",{value:!0});var $ee=require("stream"),Uee=Xv(),jee=Em(),gD=class extends jee.default{constructor(){super(...arguments),this._reader=new Uee.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),i=this.api(r,t,n),s=new $ee.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};yD.default=gD});var DN=w(xD=>{"use strict";f();Object.defineProperty(xD,"__esModule",{value:!0});var qee=zo(),Gee=vm(),zee=Dm(),bD=class extends zee.default{constructor(){super(...arguments),this._walkSync=Gee.walkSync,this._statSync=qee.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){let n=[];for(let i of t){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(t,r,n){try{let i=this._getStat(t);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(t){return this._statSync(t,this._fsStatSettings)}};xD.default=bD});var CN=w(DD=>{"use strict";f();Object.defineProperty(DD,"__esModule",{value:!0});var Hee=DN(),Kee=Em(),vD=class extends Kee.default{constructor(){super(...arguments),this._reader=new Hee.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(r,t,n).map(n.transform)}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};DD.default=vD});var EN=w(xc=>{"use strict";f();Object.defineProperty(xc,"__esModule",{value:!0});xc.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var bc=require("fs"),Vee=require("os"),Wee=Math.max(Vee.cpus().length,1);xc.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:bc.lstat,lstatSync:bc.lstatSync,stat:bc.stat,statSync:bc.statSync,readdir:bc.readdir,readdirSync:bc.readdirSync};var CD=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Wee),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===void 0?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},xc.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};xc.default=CD});var TD=w((z2e,SN)=>{"use strict";f();var wN=S2(),Yee=xN(),Jee=vN(),Xee=CN(),ED=EN(),_n=ms();async function wD(e,t){si(e);let r=SD(e,Yee.default,t),n=await Promise.all(r);return _n.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(u,l){si(u);let p=SD(u,Xee.default,l);return _n.array.flatten(p)}e.sync=t;function r(u,l){si(u);let p=SD(u,Jee.default,l);return _n.stream.merge(p)}e.stream=r;function n(u,l){si(u);let p=[].concat(u),d=new ED.default(l);return wN.generate(p,d)}e.generateTasks=n;function i(u,l){si(u);let p=new ED.default(l);return _n.pattern.isDynamicPattern(u,p)}e.isDynamicPattern=i;function s(u){return si(u),_n.path.escape(u)}e.escapePath=s;function o(u){return si(u),_n.path.convertPathToPattern(u)}e.convertPathToPattern=o;let a;(function(u){function l(d){return si(d),_n.path.escapePosixPath(d)}u.escapePath=l;function p(d){return si(d),_n.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=e.posix||(e.posix={}));let c;(function(u){function l(d){return si(d),_n.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return si(d),_n.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=e.win32||(e.win32={}))})(wD||(wD={}));function SD(e,t,r){let n=[].concat(e),i=new ED.default(r),s=wN.generate(n,i),o=new t(i);return s.map(o.read,o)}function si(e){if(![].concat(e).every(n=>_n.string.isString(n)&&!_n.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}SN.exports=wD});var XR=w((zOe,JR)=>{"use strict";f();var YR=require("child_process"),KR=YR.spawn,Ute=YR.exec;JR.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":Ute("taskkill /pid "+e+" /T /F",r);break;case"darwin":e0(e,n,i,function(s){return KR("pgrep",["-P",s])},function(){VR(n,t,r)});break;default:e0(e,n,i,function(s){return KR("ps",["-o","pid","--no-headers","--ppid",s])},function(){VR(n,t,r)});break}};function VR(e,t,r){var n={};try{Object.keys(e).forEach(function(i){e[i].forEach(function(s){n[s]||(WR(s,t),n[s]=1)}),n[i]||(WR(i,t),n[i]=1)})}catch(i){if(r)return r(i);throw i}if(r)return r()}function WR(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function e0(e,t,r,n,i){var s=n(e),o="";s.stdout.on("data",function(u){var u=u.toString("ascii");o+=u});var a=function(c){if(delete r[e],c!=0){Object.keys(r).length==0&&i();return}o.match(/\d+/g).forEach(function(u){u=parseInt(u,10),t[e].push(u),t[u]=[],r[u]=1,e0(u,t,r,n,i)})};s.on("close",a)}});var Bl=w(fn=>{"use strict";f();Object.defineProperty(fn,"__esModule",{value:!0});fn.isSSL=void 0;fn.setupOutgoing=zte;fn.setupSocket=Hte;fn.getPort=Kte;fn.hasEncryptedConnection=ZR;fn.urlJoin=eO;fn.rewriteCookieProperty=tO;fn.toURL=rO;var jte=require("tls"),qte=/(^|,)\s*upgrade\s*($|,)/i;fn.isSSL=/^https|wss/;var Gte="trailer";function zte(e,t,r,n){let i=t[n||"target"];e.port=+(i.port??(i.protocol!==void 0&&fn.isSSL.test(i.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=i[a];e.method=t.method||r.method,e.headers={...r.headers},t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(Gte==a.toLowerCase()){delete e.headers[a];break}t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),i.protocol!==void 0&&fn.isSSL.test(i.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!qte.test(e.headers.connection))&&(e.headers.connection="close"));let s=i&&t.prependPath!==!1&&"pathname"in i?QR(`${i.pathname}${i.search??""}`):"/",o=t.toProxy?r.url:QR(r.url);return o=t.ignorePath?"":o,e.path=eO(s,o??""),t.changeOrigin&&(e.headers.host=i.protocol!==void 0&&Wte(e.port,i.protocol)&&!Vte(e.host)?e.host+":"+e.port:e.host),e}function Hte(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function Kte(e){let t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:ZR(e)?"443":"80"}function ZR(e){let t=e.connection;return t instanceof jte.TLSSocket&&t.encrypted||!!t.pair}function eO(...e){let t=[],r="";e.forEach((i,s)=>{let o=i.indexOf("?");o!==-1&&(t.push(i.substring(o+1)),e[s]=i.substring(0,o))}),r=t.filter(Boolean).join("&");let n="";for(let i of e)i&&(n.endsWith("/")?i.startsWith("/")?n+=i.slice(1):n+=i:i.startsWith("/")?n+=i:n+="/"+i);return r?n+"?"+r:n}function tO(e,t,r){return Array.isArray(e)?e.map(n=>tO(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,i,s)=>{let o;if(s in t)o=t[s];else if("*"in t)o=t["*"];else return n;return o?i+o:""})}function Vte(e){return!!~e.indexOf(":")}function QR(e){if(e===""||e?.startsWith("?"))return e;let t=rO(e);return`${t.pathname??""}${t.search??""}`}function rO(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://dummy.org${e}`),new URL(e,"http://dummy.org"))}function Wte(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var cO=w(kr=>{"use strict";f();var Yte=kr&&kr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Jte=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Xte=kr&&kr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Yte(r,t,n[i]);return Jte(r,t),r}}();Object.defineProperty(kr,"__esModule",{value:!0});kr.OUTGOING_PASSES=void 0;kr.removeChunked=nO;kr.setConnection=iO;kr.setRedirectHostRewrite=sO;kr.writeHeaders=oO;kr.writeStatusCode=aO;var Nm=Xte(Bl()),Qte=/^201|30(1|2|7|8)$/;function nO(e,t,r){e.httpVersion==="1.0"&&delete r.headers["transfer-encoding"]}function iO(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function sO(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&Qte.test(`${r.statusCode}`)){let i=Nm.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let o=Nm.toURL(s);if(i.host!=o.host)return;n.hostRewrite?o.host=n.hostRewrite:n.autoRewrite&&(o.host=e.headers.host??""),n.protocolRewrite&&(o.protocol=n.protocolRewrite),r.headers.location=o.toString()}}function oO(e,t,r,n){let i=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,o=n.preserveHeaderKeyCase,a=(u,l)=>{l!=null&&(i&&u.toLowerCase()==="set-cookie"&&(l=Nm.rewriteCookieProperty(l,i,"domain")),s&&u.toLowerCase()==="set-cookie"&&(l=Nm.rewriteCookieProperty(l,s,"path")),t.setHeader(String(u).trim(),l))},c;if(o&&r.rawHeaders!=null){c={};for(let u=0;u<r.rawHeaders.length;u+=2){let l=r.rawHeaders[u];c[l.toLowerCase()]=l}}for(let u in r.headers){let l=u,p=r.headers[l];o&&c&&(l=c[l]??l),a(l,p)}}function aO(e,t,r){r.statusMessage?(t.statusCode=r.statusCode,t.statusMessage=r.statusMessage):t.statusCode=r.statusCode}kr.OUTGOING_PASSES={removeChunked:nO,setConnection:iO,setRedirectHostRewrite:sO,writeHeaders:oO,writeStatusCode:aO}});var t0=w((QOe,uO)=>{f();var Pc=1e3,Fc=Pc*60,_c=Fc*60,Yo=_c*24,Zte=Yo*7,ere=Yo*365.25;uO.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return tre(e);if(r==="number"&&isFinite(e))return t.long?nre(e):rre(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function tre(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ere;case"weeks":case"week":case"w":return r*Zte;case"days":case"day":case"d":return r*Yo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_c;case"minutes":case"minute":case"mins":case"min":case"m":return r*Fc;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function rre(e){var t=Math.abs(e);return t>=Yo?Math.round(e/Yo)+"d":t>=_c?Math.round(e/_c)+"h":t>=Fc?Math.round(e/Fc)+"m":t>=Pc?Math.round(e/Pc)+"s":e+"ms"}function nre(e){var t=Math.abs(e);return t>=Yo?Rm(e,t,Yo,"day"):t>=_c?Rm(e,t,_c,"hour"):t>=Fc?Rm(e,t,Fc,"minute"):t>=Pc?Rm(e,t,Pc,"second"):e+" ms"}function Rm(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var r0=w((e8e,lO)=>{f();function ire(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=t0(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,h,m;function g(...y){if(!g.enabled)return;let b=g,v=Number(new Date),C=v-(p||v);b.diff=C,b.prev=p,b.curr=v,p=v,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let x=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(E,S)=>{if(E==="%%")return"%";x++;let T=r.formatters[S];if(typeof T=="function"){let F=y[x];E=T.call(b,F),y.splice(x,1),x--}return E}),r.formatArgs.call(b,y),(b.log||r.log).apply(b,y)}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,m=r.enabled(l)),m),set:y=>{d=y}}),typeof r.init=="function"&&r.init(g),g}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,h=0,m=-1,g=0;for(;d<l.length;)if(h<p.length&&(p[h]===l[d]||p[h]==="*"))p[h]==="*"?(m=h,g=d,h++):(d++,h++);else if(m!==-1)h=m+1,g++,d=g;else return!1;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function o(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}lO.exports=ire});var pO=w((mn,Om)=>{f();mn.formatArgs=ore;mn.save=are;mn.load=cre;mn.useColors=sre;mn.storage=ure();mn.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();mn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function sre(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ore(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Om.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}mn.log=console.debug||console.log||(()=>{});function are(e){try{e?mn.storage.setItem("debug",e):mn.storage.removeItem("debug")}catch{}}function cre(){let e;try{e=mn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ure(){try{return localStorage}catch{}}Om.exports=r0()(mn);var{formatters:lre}=Om.exports;lre.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var fO=w((n8e,dO)=>{"use strict";f();dO.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var gO=w((s8e,hO)=>{"use strict";f();var pre=require("os"),mO=require("tty"),Nn=fO(),{env:Qt}=process,Zs;Nn("no-color")||Nn("no-colors")||Nn("color=false")||Nn("color=never")?Zs=0:(Nn("color")||Nn("colors")||Nn("color=true")||Nn("color=always"))&&(Zs=1);"FORCE_COLOR"in Qt&&(Qt.FORCE_COLOR==="true"?Zs=1:Qt.FORCE_COLOR==="false"?Zs=0:Zs=Qt.FORCE_COLOR.length===0?1:Math.min(parseInt(Qt.FORCE_COLOR,10),3));function n0(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i0(e,t){if(Zs===0)return 0;if(Nn("color=16m")||Nn("color=full")||Nn("color=truecolor"))return 3;if(Nn("color=256"))return 2;if(e&&!t&&Zs===void 0)return 0;let r=Zs||0;if(Qt.TERM==="dumb")return r;if(process.platform==="win32"){let n=pre.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Qt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Qt)||Qt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Qt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Qt.TEAMCITY_VERSION)?1:0;if(Qt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Qt){let n=parseInt((Qt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Qt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Qt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Qt.TERM)||"COLORTERM"in Qt?1:r}function dre(e){let t=i0(e,e&&e.isTTY);return n0(t)}hO.exports={supportsColor:dre,stdout:n0(i0(!0,mO.isatty(1))),stderr:n0(i0(!0,mO.isatty(2)))}});var bO=w((Zt,Mm)=>{f();var fre=require("tty"),Bm=require("util");Zt.init=vre;Zt.log=yre;Zt.formatArgs=hre;Zt.save=bre;Zt.load=xre;Zt.useColors=mre;Zt.destroy=Bm.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Zt.colors=[6,2,3,4,5,1];try{let e=gO();e&&(e.stderr||e).level>=2&&(Zt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Zt.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function mre(){return"colors"in Zt.inspectOpts?!!Zt.inspectOpts.colors:fre.isatty(process.stderr.fd)}function hre(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
21
|
+
`):i=String.fromCharCode(n),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(r){let n="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(_.UnterminatedString,this.state.startLoc);let s=this.input.charCodeAt(this.state.pos);if(s===r)break;s===38?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadEntity(),i=this.state.pos):Za(s)?(n+=this.input.slice(i,this.state.pos),n+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}n+=this.input.slice(i,this.state.pos++),this.finishToken(133,n)}jsxReadEntity(){let r=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let n=10;this.codePointAtPos(this.state.pos)===120&&(n=16,++this.state.pos);let i=this.readInt(n,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let n=0,i=!1;for(;n++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let s=this.input.slice(r,this.state.pos),o=DW[s];if(++this.state.pos,o)return o}}return this.state.pos=r,"&"}jsxReadWord(){let r,n=this.state.pos;do r=this.input.charCodeAt(++this.state.pos);while(Qa(r)||r===45);this.finishToken(140,this.input.slice(n,this.state.pos))}jsxParseIdentifier(){let r=this.startNode();return this.match(140)?r.name=this.state.value:nx(this.state.type)?r.name=Us(this.state.type):this.unexpected(),this.next(),this.finishNode(r,"JSXIdentifier")}jsxParseNamespacedName(){let r=this.state.startLoc,n=this.jsxParseIdentifier();if(!this.eat(14))return n;let i=this.startNodeAt(r);return i.namespace=n,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let r=this.state.startLoc,n=this.jsxParseNamespacedName();if(n.type==="JSXNamespacedName")return n;for(;this.eat(16);){let i=this.startNodeAt(r);i.object=n,i.property=this.jsxParseIdentifier(),n=this.finishNode(i,"JSXMemberExpression")}return n}jsxParseAttributeValue(){let r;switch(this.state.type){case 5:return r=this.startNode(),this.setContext(rt.brace),this.next(),r=this.jsxParseExpressionContainer(r,rt.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(Oo.AttributeIsEmpty,r),r;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Oo.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let r=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(r,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(r){return this.next(),r.expression=this.parseExpression(),this.setContext(rt.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadChild")}jsxParseExpressionContainer(r,n){if(this.match(8))r.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();r.expression=i}return this.setContext(n),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXExpressionContainer")}jsxParseAttribute(){let r=this.startNode();return this.match(5)?(this.setContext(rt.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(rt.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(r,"JSXSpreadAttribute")):(r.name=this.jsxParseNamespacedName(),r.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(r,"JSXAttribute"))}jsxParseOpeningElementAt(r){let n=this.startNodeAt(r);return this.eat(143)?this.finishNode(n,"JSXOpeningFragment"):(n.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(n))}jsxParseOpeningElementAfterName(r){let n=[];for(;!this.match(56)&&!this.match(143);)n.push(this.jsxParseAttribute());return r.attributes=n,r.selfClosing=this.eat(56),this.expect(143),this.finishNode(r,"JSXOpeningElement")}jsxParseClosingElementAt(r){let n=this.startNodeAt(r);return this.eat(143)?this.finishNode(n,"JSXClosingFragment"):(n.name=this.jsxParseElementName(),this.expect(143),this.finishNode(n,"JSXClosingElement"))}jsxParseElementAt(r){let n=this.startNodeAt(r),i=[],s=this.jsxParseOpeningElementAt(r),o=null;if(!s.selfClosing){e:for(;;)switch(this.state.type){case 142:if(r=this.state.startLoc,this.next(),this.eat(56)){o=this.jsxParseClosingElementAt(r);break e}i.push(this.jsxParseElementAt(r));break;case 141:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let a=this.startNode();this.setContext(rt.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(a)):i.push(this.jsxParseExpressionContainer(a,rt.j_expr));break}default:this.unexpected()}$s(s)&&!$s(o)&&o!==null?this.raise(Oo.MissingClosingTagFragment,o):!$s(s)&&$s(o)?this.raise(Oo.MissingClosingTagElement,o,{openingTagName:Xa(s.name)}):!$s(s)&&!$s(o)&&Xa(o.name)!==Xa(s.name)&&this.raise(Oo.MissingClosingTagElement,o,{openingTagName:Xa(s.name)})}if($s(s)?(n.openingFragment=s,n.closingFragment=o):(n.openingElement=s,n.closingElement=o),n.children=i,this.match(47))throw this.raise(Oo.UnwrappedAdjacentJSXElements,this.state.startLoc);return $s(s)?this.finishNode(n,"JSXFragment"):this.finishNode(n,"JSXElement")}jsxParseElement(){let r=this.state.startLoc;return this.next(),this.jsxParseElementAt(r)}setContext(r){let{context:n}=this.state;n[n.length-1]=r}parseExprAtom(r){return this.match(142)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(142),this.jsxParseElement()):super.parseExprAtom(r)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(r){let n=this.curContext();if(n===rt.j_expr){this.jsxReadToken();return}if(n===rt.j_oTag||n===rt.j_cTag){if(us(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(143);return}if((r===34||r===39)&&n===rt.j_oTag){this.jsxReadString(r);return}}if(r===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(142);return}super.getTokenFromCode(r)}updateContext(r){let{context:n,type:i}=this.state;if(i===56&&r===142)n.splice(-2,2,rt.j_cTag),this.state.canStartJSXElement=!1;else if(i===142)n.push(rt.j_oTag);else if(i===143){let s=n[n.length-1];s===rt.j_oTag&&r===56||s===rt.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===rt.j_expr):(this.setContext(rt.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=LV(i)}},Kb=class extends rl{constructor(...t){super(...t),this.tsNames=new Map}},Vb=class extends nl{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new Kb(t)}enter(t){t===256&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===256&&this.importsStack.pop(),t}hasImport(t,r){let n=this.importsStack.length;if(this.importsStack[n-1].has(t))return!0;if(!r&&n>1){for(let i=0;i<n-1;i++)if(this.importsStack[i].has(t))return!0}return!1}declareName(t,r,n){if(r&4096){this.hasImport(t,!0)&&this.parser.raise(_.VarRedeclaration,n,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let i=this.currentScope(),s=i.tsNames.get(t)||0;if(r&1024){this.maybeExportDefined(i,t),i.tsNames.set(t,s|16);return}super.declareName(t,r,n),r&2&&(r&1||(this.checkRedeclarationInScope(i,t,r,n),this.maybeExportDefined(i,t)),s=s|1),r&256&&(s=s|2),r&512&&(s=s|4),r&128&&(s=s|8),s&&i.tsNames.set(t,s)}isRedeclaredInScope(t,r,n){let i=t.tsNames.get(r);if((i&2)>0){if(n&256){let s=!!(n&512),o=(i&4)>0;return s!==o}return!0}return n&128&&(i&8)>0?t.names.get(r)&2?!!(n&1):!1:n&2&&(i&1)>0?!0:super.isRedeclaredInScope(t,r,n)}checkLocalExport(t){let{name:r}=t;if(this.hasImport(r))return;let n=this.scopeStack.length;for(let i=n-1;i>=0;i--){let o=this.scopeStack[i].tsNames.get(r);if((o&1)>0||(o&16)>0)return}super.checkLocalExport(t)}},ZF=e=>e.type==="ParenthesizedExpression"?ZF(e.expression):e,Wb=class extends Hb{toAssignable(t,r=!1){var n,i;let s;switch((t.type==="ParenthesizedExpression"||(n=t.extra)!=null&&n.parenthesized)&&(s=ZF(t),r?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(_.InvalidParenthesizedAssignment,t):s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(_.InvalidParenthesizedAssignment,t):this.raise(_.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let a=0,c=t.properties.length,u=c-1;a<c;a++){var o;let l=t.properties[a],p=a===u;this.toAssignableObjectExpressionProp(l,p,r),p&&l.type==="RestElement"&&(o=t.extra)!=null&&o.trailingCommaLoc&&this.raise(_.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:a,value:c}=t;this.isPrivateName(a)&&this.classScope.usePrivateName(this.getPrivateNameSV(a),a.loc.start),this.toAssignable(c,r);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":t.type="ArrayPattern",this.toAssignableList(t.elements,(i=t.extra)==null?void 0:i.trailingCommaLoc,r);break;case"AssignmentExpression":t.operator!=="="&&this.raise(_.MissingEqInAssignment,t.left.loc.end),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,r);break;case"ParenthesizedExpression":this.toAssignable(s,r);break}}toAssignableObjectExpressionProp(t,r,n){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?_.PatternHasAccessor:_.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){t.type="RestElement";let i=t.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,n),r||this.raise(_.RestTrailingComma,t)}else this.toAssignable(t,n)}toAssignableList(t,r,n){let i=t.length-1;for(let s=0;s<=i;s++){let o=t[s];if(o){if(o.type==="SpreadElement"){o.type="RestElement";let a=o.argument;this.checkToRestConversion(a,!0),this.toAssignable(a,n)}else this.toAssignable(o,n);o.type==="RestElement"&&(s<i?this.raise(_.RestTrailingComma,o):r&&this.raise(_.RestTrailingComma,r))}}}isAssignable(t,r){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let n=t.properties.length-1;return t.properties.every((i,s)=>i.type!=="ObjectMethod"&&(s===n||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(n=>n===null||this.isAssignable(n));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!r;default:return!1}}toReferencedList(t,r){return t}toReferencedListDeep(t,r){this.toReferencedList(t,r);for(let n of t)n?.type==="ArrayExpression"&&this.toReferencedListDeep(n.elements)}parseSpread(t){let r=this.startNode();return this.next(),r.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(r,"SpreadElement")}parseRestBinding(){let t=this.startNode();return this.next(),t.argument=this.parseBindingAtom(),this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(t,r,n){let i=n&1,s=[],o=!0;for(;!this.eat(t);)if(o?o=!1:this.expect(12),i&&this.match(12))s.push(null);else{if(this.eat(t))break;if(this.match(21)){if(s.push(this.parseAssignableListItemTypes(this.parseRestBinding(),n)),!this.checkCommaAfterRest(r)){this.expect(t);break}}else{let a=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(_.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)a.push(this.parseDecorator());s.push(this.parseAssignableListItem(n,a))}}return s}parseBindingRestProperty(t){return this.next(),t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let{type:t,startLoc:r}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());let n=this.startNode();return t===138?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,r,!1,!1,!0,!1)}parseAssignableListItem(t,r){let n=this.parseMaybeDefault();this.parseAssignableListItemTypes(n,t);let i=this.parseMaybeDefault(n.loc.start,n);return r.length&&(n.decorators=r),i}parseAssignableListItemTypes(t,r){return t}parseMaybeDefault(t,r){var n,i;if((n=t)!=null||(t=this.state.startLoc),r=(i=r)!=null?i:this.parseBindingAtom(),!this.eat(29))return r;let s=this.startNodeAt(t);return s.left=r,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(t,r,n){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties"}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,r,n=64,i=!1,s=!1,o=!1){var a;let c=t.type;if(this.isObjectMethod(t))return;let u=this.isOptionalMemberExpression(t);if(u||c==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),r.type!=="AssignmentExpression"&&this.raise(_.InvalidLhsOptionalChaining,t,{ancestor:r})),n!==64&&this.raise(_.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,n,s);let{name:g}=t;i&&(i.has(g)?this.raise(_.ParamDupe,t):i.add(g));return}let l=this.isValidLVal(c,!(o||(a=t.extra)!=null&&a.parenthesized)&&r.type==="AssignmentExpression",n);if(l===!0)return;if(l===!1){let g=n===64?_.InvalidLhs:_.InvalidLhsBinding;this.raise(g,t,{ancestor:r});return}let p,d;typeof l=="string"?(p=l,d=c==="ParenthesizedExpression"):[p,d]=l;let h=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:r,m=t[p];if(Array.isArray(m))for(let g of m)g&&this.checkLVal(g,h,n,i,s,d);else m&&this.checkLVal(m,h,n,i,s,d)}checkIdentifier(t,r,n=!1){this.state.strict&&(n?WF(t.name,this.inModule):VF(t.name))&&(r===64?this.raise(_.StrictEvalArguments,t,{referenceName:t.name}):this.raise(_.StrictEvalArgumentsBinding,t,{bindingName:t.name})),r&8192&&t.name==="let"&&this.raise(_.LetInLexicalBinding,t),r&64||this.declareNameFromIdentifier(t,r)}declareNameFromIdentifier(t,r){this.scope.declareName(t.name,r,t.loc.start)}checkToRestConversion(t,r){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,r);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(r)break;default:this.raise(_.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?_.RestTrailingComma:_.ElementAfterRest,this.state.startLoc),!0):!1}};function EW(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function BF(e){if(!e)throw new Error("Assert fail")}var ce=ls`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function wW(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function MF(e){return e==="private"||e==="public"||e==="protected"}function SW(e){return e==="in"||e==="out"}var TW=e=>class extends e{constructor(...r){super(...r),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:ce.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:ce.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:ce.InvalidModifierOnTypeParameter})}getScopeHandler(){return Vb}tsIsIdentifier(){return ze(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(138)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(r,n){if(!ze(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(r.includes(i)){if(n&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:r,disallowedModifiers:n,stopOnStartOfClassStaticBlock:i,errorTemplate:s=ce.InvalidModifierOnTypeMember},o){let a=(u,l,p,d)=>{l===p&&o[d]&&this.raise(ce.InvalidModifiersOrder,u,{orderedModifiers:[p,d]})},c=(u,l,p,d)=>{(o[p]&&l===d||o[d]&&l===p)&&this.raise(ce.IncompatibleModifiers,u,{modifiers:[p,d]})};for(;;){let{startLoc:u}=this.state,l=this.tsParseModifier(r.concat(n??[]),i);if(!l)break;MF(l)?o.accessibility?this.raise(ce.DuplicateAccessibilityModifier,u,{modifier:l}):(a(u,l,l,"override"),a(u,l,l,"static"),a(u,l,l,"readonly"),o.accessibility=l):SW(l)?(o[l]&&this.raise(ce.DuplicateModifier,u,{modifier:l}),o[l]=!0,a(u,l,"in","out")):(hasOwnProperty.call(o,l)?this.raise(ce.DuplicateModifier,u,{modifier:l}):(a(u,l,"static","readonly"),a(u,l,"static","override"),a(u,l,"override","readonly"),a(u,l,"abstract","override"),c(u,l,"declare","override"),c(u,l,"static","abstract")),o[l]=!0),n!=null&&n.includes(l)&&this.raise(s,u,{modifier:l})}}tsIsListTerminator(r){switch(r){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(r,n){let i=[];for(;!this.tsIsListTerminator(r);)i.push(n());return i}tsParseDelimitedList(r,n,i){return EW(this.tsParseDelimitedListWorker(r,n,!0,i))}tsParseDelimitedListWorker(r,n,i,s){let o=[],a=-1;for(;!this.tsIsListTerminator(r);){a=-1;let c=n();if(c==null)return;if(o.push(c),this.eat(12)){a=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(r))break;i&&this.expect(12);return}return s&&(s.value=a),o}tsParseBracketedList(r,n,i,s,o){s||(i?this.expect(0):this.expect(47));let a=this.tsParseDelimitedList(r,n,o);return i?this.expect(3):this.expect(48),a}tsParseImportType(){let r=this.startNode();return this.expect(83),this.expect(10),this.match(133)||this.raise(ce.UnsupportedImportTypeArgument,this.state.startLoc),r.argument=super.parseExprAtom(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(r.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(r.options=super.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.eat(16)&&(r.qualifier=this.tsParseEntityName()),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSImportType")}tsParseEntityName(r=!0){let n=this.parseIdentifier(r);for(;this.eat(16);){let i=this.startNodeAtNode(n);i.left=n,i.right=this.parseIdentifier(r),n=this.finishNode(i,"TSQualifiedName")}return n}tsParseTypeReference(){let r=this.startNode();return r.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeReference")}tsParseThisTypePredicate(r){this.next();let n=this.startNodeAtNode(r);return n.parameterName=r,n.typeAnnotation=this.tsParseTypeAnnotation(!1),n.asserts=!1,this.finishNode(n,"TSTypePredicate")}tsParseThisTypeNode(){let r=this.startNode();return this.next(),this.finishNode(r,"TSThisType")}tsParseTypeQuery(){let r=this.startNode();return this.expect(87),this.match(83)?r.exprName=this.tsParseImportType():r.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSTypeQuery")}tsParseTypeParameter(r){let n=this.startNode();return r(n),n.name=this.tsParseTypeParameterName(),n.constraint=this.tsEatThenParseType(81),n.default=this.tsEatThenParseType(29),this.finishNode(n,"TSTypeParameter")}tsTryParseTypeParameters(r){if(this.match(47))return this.tsParseTypeParameters(r)}tsParseTypeParameters(r){let n=this.startNode();this.match(47)||this.match(142)?this.next():this.unexpected();let i={value:-1};return n.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,r),!1,!0,i),n.params.length===0&&this.raise(ce.EmptyTypeParameters,n),i.value!==-1&&this.addExtra(n,"trailingComma",i.value),this.finishNode(n,"TSTypeParameterDeclaration")}tsFillSignature(r,n){let i=r===19,s="parameters",o="typeAnnotation";n.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),n[s]=this.tsParseBindingListForSignature(),i?n[o]=this.tsParseTypeOrTypePredicateAnnotation(r):this.match(r)&&(n[o]=this.tsParseTypeOrTypePredicateAnnotation(r))}tsParseBindingListForSignature(){let r=super.parseBindingList(11,41,2);for(let n of r){let{type:i}=n;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(ce.UnsupportedSignatureParameterKind,n,{type:i})}return r}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(r,n){return this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon(),this.finishNode(n,r)}tsIsUnambiguouslyIndexSignature(){return this.next(),ze(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(r){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let n=this.parseIdentifier();n.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(n),this.expect(3),r.parameters=[n];let i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"TSIndexSignature")}tsParsePropertyOrMethodSignature(r,n){this.eat(17)&&(r.optional=!0);let i=r;if(this.match(10)||this.match(47)){n&&this.raise(ce.ReadonlyForMethodSignature,r);let s=i;s.kind&&this.match(47)&&this.raise(ce.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon();let o="parameters",a="typeAnnotation";if(s.kind==="get")s[o].length>0&&(this.raise(_.BadGetterArity,this.state.curPosition()),this.isThisParam(s[o][0])&&this.raise(ce.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[o].length!==1)this.raise(_.BadSetterArity,this.state.curPosition());else{let c=s[o][0];this.isThisParam(c)&&this.raise(ce.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(ce.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(ce.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[a]&&this.raise(ce.SetAccessorCannotHaveReturnType,s[a])}else s.kind="method";return this.finishNode(s,"TSMethodSignature")}else{let s=i;n&&(s.readonly=!0);let o=this.tsTryParseTypeAnnotation();return o&&(s.typeAnnotation=o),this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSPropertySignature")}}tsParseTypeMember(){let r=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",r);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",r):(r.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(r,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},r);let n=this.tsTryParseIndexSignature(r);return n||(super.parsePropertyName(r),!r.computed&&r.key.type==="Identifier"&&(r.key.name==="get"||r.key.name==="set")&&this.tsTokenCanFollowModifier()&&(r.kind=r.key.name,super.parsePropertyName(r)),this.tsParsePropertyOrMethodSignature(r,!!r.readonly))}tsParseTypeLiteral(){let r=this.startNode();return r.members=this.tsParseObjectTypeMembers(),this.finishNode(r,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let r=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),r}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let r=this.startNode();this.expect(5),this.match(53)?(r.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(r.readonly=!0),this.expect(0);{let n=this.startNode();n.name=this.tsParseTypeParameterName(),n.constraint=this.tsExpectThenParseType(58),r.typeParameter=this.finishNode(n,"TSTypeParameter")}return r.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(r.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(r.optional=!0),r.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(r,"TSMappedType")}tsParseTupleType(){let r=this.startNode();r.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let n=!1;return r.elementTypes.forEach(i=>{let{type:s}=i;n&&s!=="TSRestType"&&s!=="TSOptionalType"&&!(s==="TSNamedTupleMember"&&i.optional)&&this.raise(ce.OptionalTypeBeforeRequired,i),n||(n=s==="TSNamedTupleMember"&&i.optional||s==="TSOptionalType")}),this.finishNode(r,"TSTupleType")}tsParseTupleElementType(){let{startLoc:r}=this.state,n=this.eat(21),i,s,o,a,u=Qn(this.state.type)?this.lookaheadCharCode():null;if(u===58)i=!0,o=!1,s=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(u===63){o=!0;let l=this.state.startLoc,p=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(l),p),this.expect(17),this.expect(14),a=this.tsParseType()):(i=!1,a=d,this.expect(17))}else a=this.tsParseType(),o=this.eat(17),i=this.eat(14);if(i){let l;s?(l=this.startNodeAtNode(s),l.optional=o,l.label=s,l.elementType=a,this.eat(17)&&(l.optional=!0,this.raise(ce.TupleOptionalAfterType,this.state.lastTokStartLoc))):(l=this.startNodeAtNode(a),l.optional=o,this.raise(ce.InvalidTupleMemberLabel,a),l.label=a,l.elementType=this.tsParseType()),a=this.finishNode(l,"TSNamedTupleMember")}else if(o){let l=this.startNodeAtNode(a);l.typeAnnotation=a,a=this.finishNode(l,"TSOptionalType")}if(n){let l=this.startNodeAt(r);l.typeAnnotation=a,a=this.finishNode(l,"TSRestType")}return a}tsParseParenthesizedType(){let r=this.startNode();return this.expect(10),r.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(r,"TSParenthesizedType")}tsParseFunctionOrConstructorType(r,n){let i=this.startNode();return r==="TSConstructorType"&&(i.abstract=!!n,n&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,r)}tsParseLiteralTypeNode(){let r=this.startNode();switch(this.state.type){case 134:case 135:case 133:case 85:case 86:r.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(r,"TSLiteralType")}tsParseTemplateLiteralType(){let r=this.startNode();return r.literal=super.parseTemplate(!1),this.finishNode(r,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let r=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(r):r}tsParseNonArrayType(){switch(this.state.type){case 133:case 134:case 135:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let r=this.startNode(),n=this.lookahead();return n.type!==134&&n.type!==135&&this.unexpected(),r.literal=this.parseMaybeUnary(),this.finishNode(r,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:r}=this.state;if(ze(r)||r===88||r===84){let n=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":wW(this.state.value);if(n!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,n)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let r=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let n=this.startNodeAtNode(r);n.elementType=r,this.expect(3),r=this.finishNode(n,"TSArrayType")}else{let n=this.startNodeAtNode(r);n.objectType=r,n.indexType=this.tsParseType(),this.expect(3),r=this.finishNode(n,"TSIndexedAccessType")}return r}tsParseTypeOperator(){let r=this.startNode(),n=this.state.value;return this.next(),r.operator=n,r.typeAnnotation=this.tsParseTypeOperatorOrHigher(),n==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(r),this.finishNode(r,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(r){switch(r.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(ce.UnexpectedReadonly,r)}}tsParseInferType(){let r=this.startNode();this.expectContextual(115);let n=this.startNode();return n.name=this.tsParseTypeParameterName(),n.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),r.typeParameter=this.finishNode(n,"TSTypeParameter"),this.finishNode(r,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let r=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return r}}tsParseTypeOperatorOrHigher(){return zV(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(r,n,i){let s=this.startNode(),o=this.eat(i),a=[];do a.push(n());while(this.eat(i));return a.length===1&&!o?a[0]:(s.types=a,this.finishNode(s,r))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(ze(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:r}=this.state,n=r.length;try{return this.parseObjectLike(8,!0),r.length===n}catch{return!1}}if(this.match(0)){this.next();let{errors:r}=this.state,n=r.length;try{return super.parseBindingList(3,93,1),r.length===n}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(r){return this.tsInType(()=>{let n=this.startNode();this.expect(r);let i=this.startNode(),s=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(s&&this.match(78)){let c=this.tsParseThisTypeOrThisTypePredicate();return c.type==="TSThisType"?(i.parameterName=c,i.asserts=!0,i.typeAnnotation=null,c=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(c,i),c.asserts=!0),n.typeAnnotation=c,this.finishNode(n,"TSTypeAnnotation")}let o=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!o)return s?(i.parameterName=this.parseIdentifier(),i.asserts=s,i.typeAnnotation=null,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,n);let a=this.tsParseTypeAnnotation(!1);return i.parameterName=o,i.typeAnnotation=a,i.asserts=s,n.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(n,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let r=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),r}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let r=this.state.containsEsc;return this.next(),!ze(this.state.type)&&!this.match(78)?!1:(r&&this.raise(_.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(r=!0,n=this.startNode()){return this.tsInType(()=>{r&&this.expect(14),n.typeAnnotation=this.tsParseType()}),this.finishNode(n,"TSTypeAnnotation")}tsParseType(){BF(this.state.inType);let r=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return r;let n=this.startNodeAtNode(r);return n.checkType=r,n.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),n.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),n.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(n,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.lookahead().type===77}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ce.ReservedTypeAssertion,this.state.startLoc);let r=this.startNode();return r.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),r.expression=this.parseMaybeUnary(),this.finishNode(r,"TSTypeAssertion")}tsParseHeritageClause(r){let n=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let s=this.startNode();return s.expression=this.tsParseEntityName(),this.match(47)&&(s.typeParameters=this.tsParseTypeArguments()),this.finishNode(s,"TSExpressionWithTypeArguments")});return i.length||this.raise(ce.EmptyHeritageClauseType,n,{token:r}),i}tsParseInterfaceDeclaration(r,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(r.declare=!0),ze(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(ce.MissingInterfaceName,this.state.startLoc)),r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(r.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),r.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(r,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(r){return r.id=this.parseIdentifier(),this.checkIdentifier(r.id,2),r.typeAnnotation=this.tsInType(()=>{if(r.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookahead().type!==16){let n=this.startNode();return this.next(),this.finishNode(n,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(r,"TSTypeAliasDeclaration")}tsInNoContext(r){let n=this.state.context;this.state.context=[n[0]];try{return r()}finally{this.state.context=n}}tsInType(r){let n=this.state.inType;this.state.inType=!0;try{return r()}finally{this.state.inType=n}}tsInDisallowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsInAllowConditionalTypesContext(r){let n=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return r()}finally{this.state.inDisallowConditionalTypesContext=n}}tsEatThenParseType(r){if(this.match(r))return this.tsNextThenParseType()}tsExpectThenParseType(r){return this.tsInType(()=>(this.expect(r),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let r=this.startNode();return r.id=this.match(133)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(r.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(r,"TSEnumMember")}tsParseEnumDeclaration(r,n={}){return n.const&&(r.const=!0),n.declare&&(r.declare=!0),this.expectContextual(126),r.id=this.parseIdentifier(),this.checkIdentifier(r.id,r.const?8971:8459),this.expect(5),r.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(r,"TSEnumDeclaration")}tsParseModuleBlock(){let r=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(r.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(r,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(r,n=!1){if(r.id=this.parseIdentifier(),n||this.checkIdentifier(r.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),r.body=i}else this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(r,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(r){return this.isContextual(112)?(r.global=!0,r.id=this.parseIdentifier()):this.match(133)?r.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(256),this.prodParam.enter(0),r.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(r,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(r,n,i){r.isExport=i||!1,r.id=n||this.parseIdentifier(),this.checkIdentifier(r.id,4096),this.expect(29);let s=this.tsParseModuleReference();return r.importKind==="type"&&s.type!=="TSExternalModuleReference"&&this.raise(ce.ImportAliasHasImportType,s),r.moduleReference=s,this.semicolon(),this.finishNode(r,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let r=this.startNode();return this.expectContextual(119),this.expect(10),this.match(133)||this.unexpected(),r.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(r,"TSExternalModuleReference")}tsLookAhead(r){let n=this.state.clone(),i=r();return this.state=n,i}tsTryParseAndCatch(r){let n=this.tryParse(i=>r()||i());if(!(n.aborted||!n.node))return n.error&&(this.state=n.failState),n.node}tsTryParse(r){let n=this.state.clone(),i=r();if(i!==void 0&&i!==!1)return i;this.state=n}tsTryParseDeclare(r){if(this.isLineTerminator())return;let n=this.state.type,i;return this.isContextual(100)&&(n=74,i="let"),this.tsInAmbientContext(()=>{switch(n){case 68:return r.declare=!0,super.parseFunctionStatement(r,!1,!1);case 80:return r.declare=!0,this.parseClass(r,!0,!1);case 126:return this.tsParseEnumDeclaration(r,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(r);case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(r.declare=!0,this.parseVarStatement(r,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(r,{const:!0,declare:!0}));case 129:{let s=this.tsParseInterfaceDeclaration(r,{declare:!0});if(s)return s}default:if(ze(n))return this.tsParseDeclaration(r,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(r,n,i){switch(n.name){case"declare":{let s=this.tsTryParseDeclare(r);return s&&(s.declare=!0),s}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let s=r;return s.global=!0,s.id=n,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(r,n.name,!1,i)}}tsParseDeclaration(r,n,i,s){switch(n){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||ze(this.state.type)))return this.tsParseAbstractDeclaration(r,s);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(r);if(ze(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&ze(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r);break;case"type":if(this.tsCheckLineTerminator(i)&&ze(this.state.type))return this.tsParseTypeAliasDeclaration(r);break}}tsCheckLineTerminator(r){return r?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(r){if(!this.match(47))return;let n=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let s=this.startNodeAt(r);return s.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(s),s.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),s});if(this.state.maybeInArrowParameters=n,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let r=this.startNode();return r.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),r.params.length===0?this.raise(ce.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===rt.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return HV(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(r,n){let i=this.state.startLoc,s={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},s);let o=s.accessibility,a=s.override,c=s.readonly;!(r&4)&&(o||c||a)&&this.raise(ce.UnexpectedParameterModifier,i);let u=this.parseMaybeDefault();this.parseAssignableListItemTypes(u,r);let l=this.parseMaybeDefault(u.loc.start,u);if(o||c||a){let p=this.startNodeAt(i);return n.length&&(p.decorators=n),o&&(p.accessibility=o),c&&(p.readonly=c),a&&(p.override=a),l.type!=="Identifier"&&l.type!=="AssignmentPattern"&&this.raise(ce.UnsupportedParameterPropertyKind,p),p.parameter=l,this.finishNode(p,"TSParameterProperty")}return n.length&&(u.decorators=n),l}isSimpleParameter(r){return r.type==="TSParameterProperty"&&super.isSimpleParameter(r.parameter)||super.isSimpleParameter(r)}tsDisallowOptionalPattern(r){for(let n of r.params)n.type!=="Identifier"&&n.optional&&!this.state.isAmbientContext&&this.raise(ce.PatternIsOptional,n)}setArrowFunctionParameters(r,n,i){super.setArrowFunctionParameters(r,n,i),this.tsDisallowOptionalPattern(r)}parseFunctionBodyAndFinish(r,n,i=!1){this.match(14)&&(r.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let s=n==="FunctionDeclaration"?"TSDeclareFunction":n==="ClassMethod"||n==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return s&&!this.match(5)&&this.isLineTerminator()?this.finishNode(r,s):s==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(ce.DeclareFunctionHasImplementation,r),r.declare)?super.parseFunctionBodyAndFinish(r,s,i):(this.tsDisallowOptionalPattern(r),super.parseFunctionBodyAndFinish(r,n,i))}registerFunctionStatementId(r){!r.body&&r.id?this.checkIdentifier(r.id,1024):super.registerFunctionStatementId(r)}tsCheckForInvalidTypeCasts(r){r.forEach(n=>{n?.type==="TSTypeCastExpression"&&this.raise(ce.UnexpectedTypeAnnotation,n.typeAnnotation)})}toReferencedList(r,n){return this.tsCheckForInvalidTypeCasts(r),r}parseArrayLike(r,n,i,s){let o=super.parseArrayLike(r,n,i,s);return o.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(o.elements),o}parseSubscript(r,n,i,s){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let a=this.startNodeAt(n);return a.expression=r,this.finishNode(a,"TSNonNullExpression")}let o=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return s.stop=!0,r;s.optionalChainMember=o=!0,this.next()}if(this.match(47)||this.match(51)){let a,c=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(r)){let d=this.tsTryParseGenericAsyncArrowFunction(n);if(d)return d}let u=this.tsParseTypeArgumentsInExpression();if(!u)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(bf(this.state.type)){let d=super.parseTaggedTemplateExpression(r,n,s);return d.typeParameters=u,d}if(!i&&this.eat(10)){let d=this.startNodeAt(n);return d.callee=r,d.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=u,s.optionalChainMember&&(d.optional=o),this.finishCallExpression(d,s.optionalChainMember)}let l=this.state.type;if(l===48||l===52||l!==10&&Ib(l)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(n);return p.expression=r,p.typeParameters=u,this.finishNode(p,"TSInstantiationExpression")});if(a&&this.unexpected(a,10),c)return c.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(ce.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),c}return super.parseSubscript(r,n,i,s)}parseNewCallee(r){var n;super.parseNewCallee(r);let{callee:i}=r;i.type==="TSInstantiationExpression"&&!((n=i.extra)!=null&&n.parenthesized)&&(r.typeParameters=i.typeParameters,r.callee=i.expression)}parseExprOp(r,n,i){let s;if(hf(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(s=this.isContextual(120)))){let o=this.startNodeAt(n);return o.expression=r,o.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(s&&this.raise(_.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(o,s?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(o,n,i)}return super.parseExprOp(r,n,i)}checkReservedWord(r,n,i,s){this.state.isAmbientContext||super.checkReservedWord(r,n,i,s)}checkImportReflection(r){super.checkImportReflection(r),r.module&&r.importKind!=="value"&&this.raise(ce.ImportReflectionHasImportType,r.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(r){if(super.isPotentialImportPhase(r))return!0;if(this.isContextual(130)){let n=this.lookaheadCharCode();return r?n===123||n===42:n!==61}return!r&&this.isContextual(87)}applyImportPhase(r,n,i,s){super.applyImportPhase(r,n,i,s),n?r.exportKind=i==="type"?"type":"value":r.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(r){if(this.match(133))return r.importKind="value",super.parseImport(r);let n;if(ze(this.state.type)&&this.lookaheadCharCode()===61)return r.importKind="value",this.tsParseImportEqualsDeclaration(r);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(r,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(r,i);n=super.parseImportSpecifiersAndAfter(r,i)}else n=super.parseImport(r);return n.importKind==="type"&&n.specifiers.length>1&&n.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(ce.TypeImportCannotSpecifyDefaultAndNamed,n),n}parseExport(r,n){if(this.match(83)){this.next();let i=r,s=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?s=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,s,!0)}else if(this.eat(29)){let i=r;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=r;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(r,n)}isAbstractClass(){return this.isContextual(124)&&this.lookahead().type===80}parseExportDefaultExpression(){if(this.isAbstractClass()){let r=this.startNode();return this.next(),r.abstract=!0,this.parseClass(r,!0,!0)}if(this.match(129)){let r=this.tsParseInterfaceDeclaration(this.startNode());if(r)return r}return super.parseExportDefaultExpression()}parseVarStatement(r,n,i=!1){let{isAmbientContext:s}=this.state,o=super.parseVarStatement(r,n,i||s);if(!s)return o;for(let{id:a,init:c}of o.declarations)c&&(n!=="const"||a.typeAnnotation?this.raise(ce.InitializerNotAllowedInAmbientContext,c):PW(c,this.hasPlugin("estree"))||this.raise(ce.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,c));return o}parseStatementContent(r,n){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(r,n)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(r,n){return n.some(i=>MF(i)?r.accessibility===i:!!r[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(r,n,i){let s=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:s,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:ce.InvalidModifierOnTypeParameterPositions},n);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,s)&&this.raise(ce.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(r,n)):this.parseClassMemberWithIsStatic(r,n,i,!!n.static)};n.declare?this.tsInAmbientContext(o):o()}parseClassMemberWithIsStatic(r,n,i,s){let o=this.tsTryParseIndexSignature(n);if(o){r.body.push(o),n.abstract&&this.raise(ce.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(ce.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(ce.IndexSignatureHasDeclare,n),n.override&&this.raise(ce.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(ce.NonAbstractClassHasAbstractMethod,n),n.override&&(i.hadSuperClass||this.raise(ce.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(r,n,i,s)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(ce.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(ce.ClassMethodHasDeclare,r)}parseExpressionStatement(r,n,i){return(n.type==="Identifier"?this.tsParseExpressionStatement(r,n,i):void 0)||super.parseExpressionStatement(r,n,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(r,n,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(r,n,i);let s=this.tryParse(()=>super.parseConditional(r,n));return s.node?(s.error&&(this.state=s.failState),s.node):(s.error&&super.setOptionalParametersError(i,s.error),r)}parseParenItem(r,n){let i=super.parseParenItem(r,n);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(r)),this.match(14)){let s=this.startNodeAt(n);return s.expression=r,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return r}parseExportDeclaration(r){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(r));let n=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(ce.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=ze(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(r);return o?((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration"||i)&&(r.exportKind="type"),i&&(this.resetStartLocation(o,n),o.declare=!0),o):null}parseClassId(r,n,i,s){if((!n||i)&&this.isContextual(113))return;super.parseClassId(r,n,i,r.declare?1024:8331);let o=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);o&&(r.typeParameters=o)}parseClassPropertyAnnotation(r){r.optional||(this.eat(35)?r.definite=!0:this.eat(17)&&(r.optional=!0));let n=this.tsTryParseTypeAnnotation();n&&(r.typeAnnotation=n)}parseClassProperty(r){if(this.parseClassPropertyAnnotation(r),this.state.isAmbientContext&&!(r.readonly&&!r.typeAnnotation)&&this.match(29)&&this.raise(ce.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){let{key:n}=r;this.raise(ce.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:n.type==="Identifier"&&!r.computed?n.name:`[${this.input.slice(n.start,n.end)}]`})}return super.parseClassProperty(r)}parseClassPrivateProperty(r){return r.abstract&&this.raise(ce.PrivateElementHasAbstract,r),r.accessibility&&this.raise(ce.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(ce.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,n,i,s,o,a){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&o&&this.raise(ce.ConstructorHasTypeParameters,c);let{declare:u=!1,kind:l}=n;u&&(l==="get"||l==="set")&&this.raise(ce.DeclareAccessor,n,{kind:l}),c&&(n.typeParameters=c),super.pushClassMethod(r,n,i,s,o,a)}pushClassPrivateMethod(r,n,i,s){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&(n.typeParameters=o),super.pushClassPrivateMethod(r,n,i,s)}declareClassPrivateMethodInScope(r,n){r.type!=="TSDeclareMethod"&&(r.type==="MethodDefinition"&&!hasOwnProperty.call(r.value,"body")||super.declareClassPrivateMethodInScope(r,n))}parseClassSuper(r){super.parseClassSuper(r),r.superClass&&(this.match(47)||this.match(51))&&(r.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(r.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(r,n,i,s,o,a,c){let u=this.tsTryParseTypeParameters(this.tsParseConstModifier);return u&&(r.typeParameters=u),super.parseObjPropValue(r,n,i,s,o,a,c)}parseFunctionParams(r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(r.typeParameters=i),super.parseFunctionParams(r,n)}parseVarId(r,n){super.parseVarId(r,n),r.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(r.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(r.id.typeAnnotation=i,this.resetEndLocation(r.id))}parseAsyncArrowFromCallExpression(r,n){return this.match(14)&&(r.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(r,n)}parseMaybeAssign(r,n){var i,s,o,a,c;let u,l,p;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(u=this.state.clone(),l=this.tryParse(()=>super.parseMaybeAssign(r,n),u),!l.error)return l.node;let{context:m}=this.state,g=m[m.length-1];(g===rt.j_oTag||g===rt.j_expr)&&m.pop()}if(!((i=l)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(r,n);(!u||u===this.state)&&(u=this.state.clone());let d,h=this.tryParse(m=>{var g,y;d=this.tsParseTypeParameters(this.tsParseConstModifier);let b=super.parseMaybeAssign(r,n);return(b.type!=="ArrowFunctionExpression"||(g=b.extra)!=null&&g.parenthesized)&&m(),((y=d)==null?void 0:y.params.length)!==0&&this.resetStartLocationFromNode(b,d),b.typeParameters=d,b},u);if(!h.error&&!h.aborted)return d&&this.reportReservedArrowTypeParam(d),h.node;if(!l&&(BF(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(r,n),u),!p.error))return p.node;if((s=l)!=null&&s.node)return this.state=l.failState,l.node;if(h.node)return this.state=h.failState,d&&this.reportReservedArrowTypeParam(d),h.node;if((o=p)!=null&&o.node)return this.state=p.failState,p.node;throw((a=l)==null?void 0:a.error)||h.error||((c=p)==null?void 0:c.error)}reportReservedArrowTypeParam(r){var n;r.params.length===1&&!r.params[0].constraint&&!((n=r.extra)!=null&&n.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(ce.ReservedArrowTypeParam,r)}parseMaybeUnary(r,n){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(r,n)}parseArrow(r){if(this.match(14)){let n=this.tryParse(i=>{let s=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),s});if(n.aborted)return;n.thrown||(n.error&&(this.state=n.failState),r.returnType=n.node)}return super.parseArrow(r)}parseAssignableListItemTypes(r,n){if(!(n&2))return r;this.eat(17)&&(r.optional=!0);let i=this.tsTryParseTypeAnnotation();return i&&(r.typeAnnotation=i),this.resetEndLocation(r),r}isAssignable(r,n){switch(r.type){case"TSTypeCastExpression":return this.isAssignable(r.expression,n);case"TSParameterProperty":return!0;default:return super.isAssignable(r,n)}}toAssignable(r,n=!1){switch(r.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(r,n);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":n?this.expressionScope.recordArrowParameterBindingError(ce.UnexpectedTypeCastInParameter,r):this.raise(ce.UnexpectedTypeCastInParameter,r),this.toAssignable(r.expression,n);break;case"AssignmentExpression":!n&&r.left.type==="TSTypeCastExpression"&&(r.left=this.typeCastToParameter(r.left));default:super.toAssignable(r,n)}}toAssignableParenthesizedExpression(r,n){switch(r.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(r.expression,n);break;default:super.toAssignable(r,n)}}checkToRestConversion(r,n){switch(r.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(r.expression,!1);break;default:super.checkToRestConversion(r,n)}}isValidLVal(r,n,i){switch(r){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!n)&&["expression",!0];default:return super.isValidLVal(r,n,i)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(r){if(this.match(47)||this.match(51)){let n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let i=super.parseMaybeDecoratorArguments(r);return i.typeParameters=n,i}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(r)}checkCommaAfterRest(r){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===r?(this.next(),!1):super.checkCommaAfterRest(r)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(r,n){let i=super.parseMaybeDefault(r,n);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(ce.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(r){if(this.state.inType){if(r===62){this.finishOp(48,1);return}if(r===60){this.finishOp(47,1);return}}super.getTokenFromCode(r)}reScan_lt_gt(){let{type:r}=this.state;r===47?(this.state.pos-=1,this.readToken_lt()):r===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:r}=this.state;return r===51?(this.state.pos-=2,this.finishOp(47,1),47):r}toAssignableList(r,n,i){for(let s=0;s<r.length;s++){let o=r[s];o?.type==="TSTypeCastExpression"&&(r[s]=this.typeCastToParameter(o))}super.toAssignableList(r,n,i)}typeCastToParameter(r){return r.expression.typeAnnotation=r.typeAnnotation,this.resetEndLocation(r.expression,r.typeAnnotation.loc.end),r.expression}shouldParseArrow(r){return this.match(14)?r.every(n=>this.isAssignable(n,!0)):super.shouldParseArrow(r)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(r){if(this.match(47)||this.match(51)){let n=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());n&&(r.typeParameters=n)}return super.jsxParseOpeningElementAfterName(r)}getGetterSetterExpectedParamCount(r){let n=super.getGetterSetterExpectedParamCount(r),s=this.getObjectOrClassMethodParams(r)[0];return s&&this.isThisParam(s)?n+1:n}parseCatchClauseParam(){let r=super.parseCatchClauseParam(),n=this.tsTryParseTypeAnnotation();return n&&(r.typeAnnotation=n,this.resetEndLocation(r)),r}tsInAmbientContext(r){let{isAmbientContext:n,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return r()}finally{this.state.isAmbientContext=n,this.state.strict=i}}parseClass(r,n,i){let s=this.state.inAbstractClass;this.state.inAbstractClass=!!r.abstract;try{return super.parseClass(r,n,i)}finally{this.state.inAbstractClass=s}}tsParseAbstractDeclaration(r,n){if(this.match(80))return r.abstract=!0,this.maybeTakeDecorators(n,this.parseClass(r,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return r.abstract=!0,this.raise(ce.NonClassMethodPropertyHasAbstractModifer,r),this.tsParseInterfaceDeclaration(r)}else this.unexpected(null,80)}parseMethod(r,n,i,s,o,a,c){let u=super.parseMethod(r,n,i,s,o,a,c);if(u.abstract&&(this.hasPlugin("estree")?!!u.value.body:!!u.body)){let{key:p}=u;this.raise(ce.AbstractMethodHasImplementation,u,{methodName:p.type==="Identifier"&&!u.computed?p.name:`[${this.input.slice(p.start,p.end)}]`})}return u}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(r,n,i,s){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(r,!1,i),this.finishNode(r,"ExportSpecifier")):(r.exportKind="value",super.parseExportSpecifier(r,n,i,s))}parseImportSpecifier(r,n,i,s,o){return!n&&s?(this.parseTypeOnlyImportExportSpecifier(r,!0,i),this.finishNode(r,"ImportSpecifier")):(r.importKind="value",super.parseImportSpecifier(r,n,i,s,i?4098:4096))}parseTypeOnlyImportExportSpecifier(r,n,i){let s=n?"imported":"local",o=n?"local":"exported",a=r[s],c,u=!1,l=!0,p=a.loc.start;if(this.isContextual(93)){let h=this.parseIdentifier();if(this.isContextual(93)){let m=this.parseIdentifier();Qn(this.state.type)?(u=!0,a=h,c=n?this.parseIdentifier():this.parseModuleExportName(),l=!1):(c=m,l=!1)}else Qn(this.state.type)?(l=!1,c=n?this.parseIdentifier():this.parseModuleExportName()):(u=!0,a=h)}else Qn(this.state.type)&&(u=!0,n?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());u&&i&&this.raise(n?ce.TypeModifierIsUsedInTypeImports:ce.TypeModifierIsUsedInTypeExports,p),r[s]=a,r[o]=c;let d=n?"importKind":"exportKind";r[d]=u?"type":"value",l&&this.eatContextual(93)&&(r[o]=n?this.parseIdentifier():this.parseModuleExportName()),r[o]||(r[o]=ps(r[s])),n&&this.checkIdentifier(r[o],u?4098:4096)}};function AW(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;return t&&r.type!=="StringLiteral"&&(r.type!=="TemplateLiteral"||r.expressions.length>0)?!1:t_(e.object)}function PW(e,t){var r;let{type:n}=e;if((r=e.extra)!=null&&r.parenthesized)return!1;if(t){if(n==="Literal"){let{value:i}=e;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(n==="StringLiteral"||n==="BooleanLiteral")return!0;return!!(e_(e,t)||FW(e,t)||n==="TemplateLiteral"&&e.expressions.length===0||AW(e))}function e_(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function FW(e,t){if(e.type==="UnaryExpression"){let{operator:r,argument:n}=e;if(r==="-"&&e_(n,t))return!0}return!1}function t_(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:t_(e.object)}var LF=ls`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),_W=e=>class extends e{parsePlaceholder(r){if(this.match(144)){let n=this.startNode();return this.next(),this.assertNoSpace(),n.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(144),this.finishPlaceholder(n,r)}}finishPlaceholder(r,n){let i=r;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=n,i}getTokenFromCode(r){r===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(144,2):super.getTokenFromCode(r)}parseExprAtom(r){return this.parsePlaceholder("Expression")||super.parseExprAtom(r)}parseIdentifier(r){return this.parsePlaceholder("Identifier")||super.parseIdentifier(r)}checkReservedWord(r,n,i,s){r!==void 0&&super.checkReservedWord(r,n,i,s)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(r,n,i){return r==="Placeholder"||super.isValidLVal(r,n,i)}toAssignable(r,n){r&&r.type==="Placeholder"&&r.expectedNode==="Expression"?r.expectedNode="Pattern":super.toAssignable(r,n)}chStartsBindingIdentifier(r,n){return!!(super.chStartsBindingIdentifier(r,n)||this.lookahead().type===144)}verifyBreakContinue(r,n){r.label&&r.label.type==="Placeholder"||super.verifyBreakContinue(r,n)}parseExpressionStatement(r,n){var i;if(n.type!=="Placeholder"||(i=n.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(r,n);if(this.match(14)){let o=r;return o.label=this.finishPlaceholder(n,"Identifier"),this.next(),o.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(o,"LabeledStatement")}this.semicolon();let s=r;return s.name=n.name,this.finishPlaceholder(s,"Statement")}parseBlock(r,n,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(r,n,i)}parseFunctionId(r){return this.parsePlaceholder("Identifier")||super.parseFunctionId(r)}parseClass(r,n,i){let s=n?"ClassDeclaration":"ClassExpression";this.next();let o=this.state.strict,a=this.parsePlaceholder("Identifier");if(a)if(this.match(81)||this.match(144)||this.match(5))r.id=a;else{if(i||!n)return r.id=null,r.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(r,s);throw this.raise(LF.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(r,n,i);return super.parseClassSuper(r),r.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!r.superClass,o),this.finishNode(r,s)}parseExport(r,n){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(r,n);let s=r;if(!this.isContextual(98)&&!this.match(12))return s.specifiers=[],s.source=null,s.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(s,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let o=this.startNode();return o.exported=i,s.specifiers=[this.finishNode(o,"ExportDefaultSpecifier")],super.parseExport(s,n)}isExportDefaultSpecifier(){if(this.match(65)){let r=this.nextTokenStart();if(this.isUnparsedContextual(r,"from")&&this.input.startsWith(Us(144),this.nextTokenStartSince(r+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(r,n){var i;return(i=r.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(r,n)}checkExport(r){let{specifiers:n}=r;n!=null&&n.length&&(r.specifiers=n.filter(i=>i.exported.type==="Placeholder")),super.checkExport(r),r.specifiers=n}parseImport(r){let n=this.parsePlaceholder("Identifier");if(!n)return super.parseImport(r);if(r.specifiers=[],!this.isContextual(98)&&!this.match(12))return r.source=this.finishPlaceholder(n,"StringLiteral"),this.semicolon(),this.finishNode(r,"ImportDeclaration");let i=this.startNodeAtNode(n);return i.local=n,r.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(r)||this.parseNamedImportSpecifiers(r)),this.expectContextual(98),r.source=this.parseImportSource(),this.semicolon(),this.finishNode(r,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(LF.UnexpectedSpace,this.state.lastTokEndLoc)}},IW=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let r=this.state.startLoc,n=this.startNode();if(this.next(),ze(this.state.type)){let i=this.parseIdentifierName(),s=this.createIdentifier(n,i);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(r)}}parseExprAtom(r){return this.parseV8Intrinsic()||super.parseExprAtom(r)}},$F=["minimal","fsharp","hack","smart"],UF=["^^","@@","^","%","#"];function kW(e){if(e.has("decorators")){if(e.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let r=e.get("decorators").decoratorsBeforeExport;if(r!=null&&typeof r!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let n=e.get("decorators").allowCallParenthesized;if(n!=null&&typeof n!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(e.has("flow")&&e.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(e.has("placeholders")&&e.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(e.has("pipelineOperator")){var t;let r=e.get("pipelineOperator").proposal;if(!$F.includes(r)){let i=$F.map(s=>`"${s}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}let n=((t=e.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash";if(r==="hack"){if(e.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(e.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let i=e.get("pipelineOperator").topicToken;if(!UF.includes(i)){let s=UF.map(o=>`"${o}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${s}.`)}if(i==="#"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}else if(r==="smart"&&n)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",e.get("recordAndTuple")])}\`.`)}if(e.has("moduleAttributes")){if(e.has("importAttributes")||e.has("importAssertions"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if(e.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(e.has("importAttributes")&&e.has("importAssertions"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(e.has("recordAndTuple")){let r=e.get("recordAndTuple").syntaxType;if(r!=null){let n=["hash","bar"];if(!n.includes(r))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+n.map(i=>`'${i}'`).join(", "))}}if(e.has("asyncDoExpressions")&&!e.has("doExpressions")){let r=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw r.missingPlugins="doExpressions",r}if(e.has("optionalChainingAssign")&&e.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.")}var r_={estree:RV,jsx:CW,flow:vW,typescript:TW,v8intrinsic:IW,placeholders:_W},NW=Object.keys(r_),Pb={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};function RW(e){if(e==null)return Object.assign({},Pb);if(e.annexB!=null&&e.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let n of Object.keys(Pb)){var r;t[n]=(r=e[n])!=null?r:Pb[n]}return t}var Yb=class extends Wb{checkProto(t,r,n,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let s=t.key;if((s.type==="Identifier"?s.name:s.value)==="__proto__"){if(r){this.raise(_.RecordNoProto,s);return}n.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=s.loc.start):this.raise(_.DuplicateProto,s)),n.used=!0}}shouldExitDescending(t,r){return t.type==="ArrowFunctionExpression"&&t.start===r}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(139)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.options.tokens&&(t.tokens=this.tokens),t}parseExpression(t,r){return t?this.disallowInAnd(()=>this.parseExpressionBase(r)):this.allowInAnd(()=>this.parseExpressionBase(r))}parseExpressionBase(t){let r=this.state.startLoc,n=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(r);for(i.expressions=[n];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(t,r){return this.disallowInAnd(()=>this.parseMaybeAssign(t,r))}parseMaybeAssignAllowIn(t,r){return this.allowInAnd(()=>this.parseMaybeAssign(t,r))}setOptionalParametersError(t,r){var n;t.optionalParametersLoc=(n=r?.loc)!=null?n:this.state.startLoc}parseMaybeAssign(t,r){let n=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let a=this.parseYield();return r&&(a=r.call(this,a,n)),a}let i;t?i=!1:(t=new ec,i=!0);let{type:s}=this.state;(s===10||ze(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(r&&(o=r.call(this,o,n)),$V(this.state.type)){let a=this.startNodeAt(n),c=this.state.value;if(a.operator=c,this.match(29)){this.toAssignable(o,!0),a.left=o;let u=n.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else a.left=o;return this.next(),a.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(a,"AssignmentExpression")),a}else i&&this.checkExpressionErrors(t,!0);return o}parseMaybeConditional(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,n)?i:this.parseConditional(i,r,t)}parseConditional(t,r,n){if(this.eat(17)){let i=this.startNodeAt(r);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(138)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,n)?i:this.parseExprOp(i,r,-1)}parseExprOp(t,r,n){if(this.isPrivateName(t)){let s=this.getPrivateNameSV(t);(n>=hf(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(_.PrivateInExpectedIn,t,{identifierName:s}),this.classScope.usePrivateName(s,t.loc.start)}let i=this.state.type;if(jV(i)&&(this.prodParam.hasIn||!this.match(58))){let s=hf(i);if(s>n){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,r)}let o=this.startNodeAt(r);o.left=t,o.operator=this.state.value;let a=i===41||i===42,c=i===40;if(c&&(s=hf(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(_.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(i,s);let u=this.finishNode(o,a||c?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(c&&(l===41||l===42)||a&&l===40)throw this.raise(_.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(u,r,n)}}return t}parseExprOpRightExpr(t,r){let n=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"smart":return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(_.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,r),n)});case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(r))}default:return this.parseExprOpBaseRightExpr(t,r)}}parseExprOpBaseRightExpr(t,r){let n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,KV(t)?r-1:r)}parseHackPipeBody(){var t;let{startLoc:r}=this.state,n=this.parseMaybeAssign();return FV.has(n.type)&&!((t=n.extra)!=null&&t.parenthesized)&&this.raise(_.PipeUnparenthesizedBody,r,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(_.PipeTopicUnused,r),n}checkExponentialAfterUnary(t){this.match(57)&&this.raise(_.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,r){let n=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let c=this.parseAwait(n);return r||this.checkExponentialAfterUnary(c),c}let s=this.match(34),o=this.startNode();if(GV(this.state.type)){o.operator=this.state.value,o.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let c=this.match(89);if(this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&c){let u=o.argument;u.type==="Identifier"?this.raise(_.StrictDelete,o):this.hasPropertyAsPrivateName(u)&&this.raise(_.DeletePrivateField,o)}if(!s)return r||this.checkExponentialAfterUnary(o),this.finishNode(o,"UnaryExpression")}let a=this.parseUpdate(o,s,t);if(i){let{type:c}=this.state;if((this.hasPlugin("v8intrinsic")?Ib(c):Ib(c)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(_.AwaitNotInAsyncContext,n),this.parseAwait(n)}return a}parseUpdate(t,r,n){if(r){let o=t;return this.checkLVal(o.argument,this.finishNode(o,"UpdateExpression")),t}let i=this.state.startLoc,s=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return s;for(;qV(this.state.type)&&!this.canInsertSemicolon();){let o=this.startNodeAt(i);o.operator=this.state.value,o.prefix=!1,o.argument=s,this.next(),this.checkLVal(s,s=this.finishNode(o,"UpdateExpression"))}return s}parseExprSubscripts(t){let r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,n)?i:this.parseSubscripts(i,r)}parseSubscripts(t,r,n){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,r,n,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,r,n,i){let{type:s}=this.state;if(!n&&s===15)return this.parseBind(t,r,n,i);if(bf(s))return this.parseTaggedTemplateExpression(t,r,i);let o=!1;if(s===18){if(n&&(this.raise(_.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=o=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,r,i,o);{let a=this.eat(0);return a||o||this.eat(16)?this.parseMember(t,r,i,a,o):(i.stop=!0,t)}}parseMember(t,r,n,i,s){let o=this.startNodeAt(r);return o.object=t,o.computed=i,i?(o.property=this.parseExpression(),this.expect(3)):this.match(138)?(t.type==="Super"&&this.raise(_.SuperPrivateField,r),this.classScope.usePrivateName(this.state.value,this.state.startLoc),o.property=this.parsePrivateName()):o.property=this.parseIdentifier(!0),n.optionalChainMember?(o.optional=s,this.finishNode(o,"OptionalMemberExpression")):this.finishNode(o,"MemberExpression")}parseBind(t,r,n,i){let s=this.startNodeAt(r);return s.object=t,this.next(),s.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(s,"BindExpression"),r,n)}parseCoverCallAndAsyncArrowHead(t,r,n,i){let s=this.state.maybeInArrowParameters,o=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(r);a.callee=t;let{maybeAsyncArrow:c,optionalChainMember:u}=n;c&&(this.expressionScope.enter(dW()),o=new ec),u&&(a.optional=i),i?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",a,o);let l=this.finishCallExpression(a,u);return c&&this.shouldParseAsyncArrow()&&!i?(n.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),l)):(c&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=s,l}toReferencedArguments(t,r){this.toReferencedListDeep(t.arguments,r)}parseTaggedTemplateExpression(t,r,n){let i=this.startNodeAt(r);return i.tag=t,i.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(_.OptionalChainingNoTemplate,r),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&t.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(t,r){if(t.callee.type==="Import")if(t.arguments.length===2&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),t.arguments.length===0||t.arguments.length>2)this.raise(_.ImportCallArity,t,{maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let n of t.arguments)n.type==="SpreadElement"&&this.raise(_.ImportCallSpreadArgument,n);return this.finishNode(t,r?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,r,n,i,s){let o=[],a=!0,c=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){r&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(_.ImportCallArgumentTrailingComma,this.state.lastTokStartLoc),i&&this.addTrailingCommaExtraToNode(i),this.next();break}o.push(this.parseExprListItem(!1,s,n))}return this.state.inFSharpPipelineDirectBody=c,o}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,r){var n;return this.resetPreviousNodeTrailingComments(r),this.expect(19),this.parseArrowExpression(t,r.arguments,!0,(n=r.extra)==null?void 0:n.trailingCommaLoc),r.innerComments&&il(t,r.innerComments),r.callee.trailingComments&&il(t,r.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let r,n=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return r=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(r):this.match(10)?this.options.createImportExpressions?this.parseImportCall(r):this.finishNode(r,"Import"):(this.raise(_.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(r,"Import"));case 78:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 134:return this.parseNumericLiteral(this.state.value);case 135:return this.parseBigIntLiteral(this.state.value);case 136:return this.parseDecimalLiteral(this.state.value);case 133:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let s=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(s)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{r=this.startNode(),this.next(),r.object=null;let s=r.callee=this.parseNoCallExpr();if(s.type==="MemberExpression")return this.finishNode(r,"BindExpression");throw this.raise(_.UnsupportedBind,s)}case 138:return this.raise(_.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.parseTopicReference(s);this.unexpected();break}case 47:{let s=this.input.codePointAt(this.nextTokenStart());us(s)||s===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(ze(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let s=this.state.potentialArrowAt===this.state.start,o=this.state.containsEsc,a=this.parseIdentifier();if(!o&&a.name==="async"&&!this.canInsertSemicolon()){let{type:c}=this.state;if(c===68)return this.resetPreviousNodeTrailingComments(a),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(a));if(ze(c))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(a)):a;if(c===90)return this.resetPreviousNodeTrailingComments(a),this.parseDo(this.startNodeAtNode(a),!0)}return s&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(a),[a],!1)):a}else this.unexpected()}}parseTopicReferenceThenEqualsSign(t,r){let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=t,this.state.value=r,this.state.pos--,this.state.end--,this.state.endLoc=Ar(this.state.endLoc,-1),this.parseTopicReference(n);this.unexpected()}parseTopicReference(t){let r=this.startNode(),n=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(r,n,t,i)}finishTopicReference(t,r,n,i){if(this.testTopicReferenceConfiguration(n,r,i)){let s=n==="smart"?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise(n==="smart"?_.PrimaryTopicNotAllowed:_.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(t,s)}else throw this.raise(_.PipeTopicUnconfiguredToken,r,{token:Us(i)})}testTopicReferenceConfiguration(t,r,n){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Us(n)}]);case"smart":return n===27;default:throw this.raise(_.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(gf(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(_.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,r,!0)}parseDo(t,r){this.expectPlugin("doExpressions"),r&&this.expectPlugin("asyncDoExpressions"),t.async=r,this.next();let n=this.state.labels;return this.state.labels=[],r?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=n,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper&&!this.options.allowSuperOutsideMethod?this.raise(_.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(_.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(_.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),r=this.startNodeAt(Ar(this.state.startLoc,1)),n=this.state.value;return this.next(),t.id=this.createIdentifier(r,n),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,r,"sent")}return this.parseFunction(t)}parseMetaProperty(t,r,n){t.meta=r;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==n||i)&&this.raise(_.UnsupportedMetaProperty,t.property,{target:r.name,onlyValidPropertyName:n}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let r=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(_.ImportMetaOutsideModule,r),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let n=this.isContextual(105);if(n||this.unexpected(),this.expectPlugin(n?"sourcePhaseImports":"deferredImportEvaluation"),!this.options.createImportExpressions)throw this.raise(_.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=n?"source":"defer",this.parseImportCall(t)}return this.parseMetaProperty(t,r,"meta")}parseLiteralAtNode(t,r,n){return this.addExtra(n,"rawValue",t),this.addExtra(n,"raw",this.input.slice(n.start,this.state.end)),n.value=t,this.next(),this.finishNode(n,r)}parseLiteral(t,r){let n=this.startNode();return this.parseLiteralAtNode(t,r,n)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let r=this.startNode();return this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.pattern=t.pattern,r.flags=t.flags,this.next(),this.finishNode(r,"RegExpLiteral")}parseBooleanLiteral(t){let r=this.startNode();return r.value=t,this.next(),this.finishNode(r,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let r=this.state.startLoc,n;this.next(),this.expressionScope.enter(pW());let i=this.state.maybeInArrowParameters,s=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let o=this.state.startLoc,a=[],c=new ec,u=!0,l,p;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,c.optionalParametersLoc===null?null:c.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){let m=this.state.startLoc;if(l=this.state.startLoc,a.push(this.parseParenItem(this.parseRestBinding(),m)),!this.checkCommaAfterRest(41))break}else a.push(this.parseMaybeAssignAllowIn(c,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=s;let h=this.startNodeAt(r);return t&&this.shouldParseArrow(a)&&(h=this.parseArrow(h))?(this.checkDestructuringPrivate(c),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(h,a,!1),h):(this.expressionScope.exit(),a.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),l&&this.unexpected(l),this.checkExpressionErrors(c,!0),this.toReferencedListDeep(a,!0),a.length>1?(n=this.startNodeAt(o),n.expressions=a,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,d)):n=a[0],this.wrapParenthesis(r,n))}wrapParenthesis(t,r){if(!this.options.createParenthesizedExpressions)return this.addExtra(r,"parenthesized",!0),this.addExtra(r,"parenStart",t.index),this.takeSurroundingComments(r,t.index,this.state.lastTokEndLoc.index),r;let n=this.startNodeAt(t);return n.expression=r,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,r){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let r=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let n=this.parseMetaProperty(t,r,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(_.UnexpectedNewTarget,n),n}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let r=this.parseExprList(11);this.toReferencedList(r),t.arguments=r}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let r=this.match(83),n=this.parseNoCallExpr();t.callee=n,r&&(n.type==="Import"||n.type==="ImportExpression")&&this.raise(_.ImportCallNotNewExpression,n)}parseTemplateElement(t){let{start:r,startLoc:n,end:i,value:s}=this.state,o=r+1,a=this.startNodeAt(Ar(n,1));s===null&&(t||this.raise(_.InvalidEscapeSequenceTemplate,Ar(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),u=c?-1:-2,l=i+u;a.value={raw:this.input.slice(o,l).replace(/\r\n?/g,`
|
|
22
|
+
`),cooked:s===null?null:s.slice(1,u)},a.tail=c,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,Ar(this.state.lastTokEndLoc,u)),p}parseTemplate(t){let r=this.startNode(),n=this.parseTemplateElement(t),i=[n],s=[];for(;!n.tail;)s.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(n=this.parseTemplateElement(t));return r.expressions=s,r.quasis=i,this.finishNode(r,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=Object.create(null),a=!0,c=this.startNode();for(c.properties=[],this.next();!this.match(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(c);break}let l;r?l=this.parseBindingProperty():(l=this.parsePropertyDefinition(i),this.checkProto(l,n,o,i)),n&&!this.isObjectProperty(l)&&l.type!=="SpreadElement"&&this.raise(_.InvalidRecordProperty,l),l.shorthand&&this.addExtra(l,"shorthand",!0),c.properties.push(l)}this.next(),this.state.inFSharpPipelineDirectBody=s;let u="ObjectExpression";return r?u="ObjectPattern":n&&(u="RecordExpression"),this.finishNode(c,u)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let r=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(_.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)r.push(this.parseDecorator());let n=this.startNode(),i=!1,s=!1,o;if(this.match(21))return r.length&&this.unexpected(),this.parseSpread();r.length&&(n.decorators=r,r=[]),n.method=!1,t&&(o=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let c=this.state.containsEsc;if(this.parsePropertyName(n,t),!a&&!c&&this.maybeAsyncOrAccessorProp(n)){let{key:u}=n,l=u.name;l==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),(l==="get"||l==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=l,this.match(55)&&(a=!0,this.raise(_.AccessorIsGenerator,this.state.curPosition(),{kind:l}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,o,a,i,!1,s,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var r;let n=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==n&&this.raise(t.kind==="get"?_.BadGetterArity:_.BadSetterArity,t),t.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(_.BadSetterRestParameter,t)}parseObjectMethod(t,r,n,i,s){if(s){let o=this.parseMethod(t,r,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(o),o}if(n||r||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,r,n,!1,!1,"ObjectMethod")}parseObjectProperty(t,r,n,i){if(t.shorthand=!1,this.eat(14))return t.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),n)t.value=this.parseMaybeDefault(r,ps(t.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(_.InvalidCoverInitializedName,s),t.value=this.parseMaybeDefault(r,ps(t.key))}else t.value=ps(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,r,n,i,s,o,a){let c=this.parseObjectMethod(t,n,i,s,o)||this.parseObjectProperty(t,r,s,a);return c||this.unexpected(),c}parsePropertyName(t,r){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:n,value:i}=this.state,s;if(Qn(n))s=this.parseIdentifier(!0);else switch(n){case 134:s=this.parseNumericLiteral(i);break;case 133:s=this.parseStringLiteral(i);break;case 135:s=this.parseBigIntLiteral(i);break;case 136:s=this.parseDecimalLiteral(i);break;case 138:{let o=this.state.startLoc;r!=null?r.privateKeyLoc===null&&(r.privateKeyLoc=o):this.raise(_.UnexpectedPrivateField,o),s=this.parsePrivateName();break}default:this.unexpected()}t.key=s,n!==138&&(t.computed=!1)}}initFunction(t,r){t.id=null,t.generator=!1,t.async=r}parseMethod(t,r,n,i,s,o,a=!1){this.initFunction(t,n),t.generator=r,this.scope.enter(18|(a?64:0)|(s?32:0)),this.prodParam.enter(gf(n,t.generator)),this.parseFunctionParams(t,i);let c=this.parseFunctionBodyAndFinish(t,o,!0);return this.prodParam.exit(),this.scope.exit(),c}parseArrayLike(t,r,n,i){n&&this.expectPlugin("recordAndTuple");let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let o=this.startNode();return this.next(),o.elements=this.parseExprList(t,!n,i,o),this.state.inFSharpPipelineDirectBody=s,this.finishNode(o,n?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,r,n,i){this.scope.enter(6);let s=gf(n,!1);!this.match(5)&&this.prodParam.hasIn&&(s|=8),this.prodParam.enter(s),this.initFunction(t,n);let o=this.state.maybeInArrowParameters;return r&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,r,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=o,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,r,n){this.toAssignableList(r,n,!1),t.params=r}parseFunctionBodyAndFinish(t,r,n=!1){return this.parseFunctionBody(t,!1,n),this.finishNode(t,r)}parseFunctionBody(t,r,n=!1){let i=r&&!this.match(5);if(this.expressionScope.enter(QF()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,r,!1);else{let s=this.state.strict,o=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,a=>{let c=!this.isSimpleParamList(t.params);a&&c&&this.raise(_.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let u=!s&&this.state.strict;this.checkParams(t,!this.state.strict&&!r&&!n&&!c,r,u),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,u)}),this.prodParam.exit(),this.state.labels=o}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let r=0,n=t.length;r<n;r++)if(!this.isSimpleParameter(t[r]))return!1;return!0}checkParams(t,r,n,i=!0){let s=!r&&new Set,o={type:"FormalParameters"};for(let a of t.params)this.checkLVal(a,o,5,s,i)}parseExprList(t,r,n,i){let s=[],o=!0;for(;!this.eat(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}s.push(this.parseExprListItem(r,n))}return s}parseExprListItem(t,r,n){let i;if(this.match(12))t||this.raise(_.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let s=this.state.startLoc;i=this.parseParenItem(this.parseSpread(r),s)}else if(this.match(17)){this.expectPlugin("partialApplication"),n||this.raise(_.UnexpectedArgumentPlaceholder,this.state.startLoc);let s=this.startNode();this.next(),i=this.finishNode(s,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(r,this.parseParenItem);return i}parseIdentifier(t){let r=this.startNode(),n=this.parseIdentifierName(t);return this.createIdentifier(r,n)}createIdentifier(t,r){return t.name=r,t.loc.identifierName=r,this.finishNode(t,"Identifier")}parseIdentifierName(t){let r,{startLoc:n,type:i}=this.state;Qn(i)?r=this.state.value:this.unexpected();let s=MV(i);return t?s&&this.replaceToken(132):this.checkReservedWord(r,n,s,!1),this.next(),r}checkReservedWord(t,r,n,i){if(t.length>10||!rW(t))return;if(n&&ZV(t)){this.raise(_.UnexpectedKeyword,r,{keyword:t});return}if((this.state.strict?i?WF:KF:HF)(t,this.inModule)){this.raise(_.UnexpectedReservedWord,r,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(_.YieldBindingIdentifier,r);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(_.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(_.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(_.ArgumentsInClass,r);return}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let r=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(_.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(_.ObsoleteAwaitStar,r),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(r.argument=this.parseMaybeUnary(null,!0)),this.finishNode(r,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||bf(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(_.YieldInParameter,t),this.next();let r=!1,n=null;if(!this.hasPrecedingLineBreak())switch(r=this.eat(55),this.state.type){case 13:case 139:case 8:case 11:case 3:case 9:case 14:case 12:if(!r)break;default:n=this.parseMaybeAssign()}return t.delegate=r,t.argument=n,this.finishNode(t,"YieldExpression")}parseImportCall(t){return this.next(),t.source=this.parseMaybeAssignAllowIn(),(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))&&(t.options=null),this.eat(12)&&(this.expectImportAttributesPlugin(),this.match(11)||(t.options=this.parseMaybeAssignAllowIn(),this.eat(12))),this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,r){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(_.PipelineHeadSequenceExpression,r)}parseSmartPipelineBodyInStyle(t,r){if(this.isSimpleReference(t)){let n=this.startNodeAt(r);return n.callee=t,this.finishNode(n,"PipelineBareFunction")}else{let n=this.startNodeAt(r);return this.checkSmartPipeTopicBodyEarlyErrors(r),n.expression=t,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(_.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(_.PipelineTopicUnused,t)}withTopicBindingContext(t){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let r=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=r}}else return t()}withSoloAwaitPermittingContext(t){let r=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=r}}allowInAnd(t){let r=this.prodParam.currentFlags();if(8&~r){this.prodParam.enter(r|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let r=this.prodParam.currentFlags();if(8&r){this.prodParam.enter(r&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let r=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,t);return this.state.inFSharpPipelineDirectBody=n,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let r=this.startNodeAt(this.state.endLoc);this.next();let n=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(r,8,"module")}finally{n()}return this.finishNode(t,"ModuleExpression")}parsePropertyNamePrefixOperator(t){}},Fb={kind:1},OW={kind:2},BW=/[\uD800-\uDFFF]/u,_b=/in(?:stanceof)?/y;function MW(e,t){for(let r=0;r<e.length;r++){let n=e[r],{type:i}=n;if(typeof i=="number"){{if(i===138){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Ar(s.start,1);e.splice(r,1,new Ai({type:as(27),value:"#",start:o,end:u,startLoc:s.start,endLoc:l}),new Ai({type:as(132),value:a,start:u,end:c,startLoc:l,endLoc:s.end})),r++;continue}if(bf(i)){let{loc:s,start:o,value:a,end:c}=n,u=o+1,l=Ar(s.start,1),p;t.charCodeAt(o)===96?p=new Ai({type:as(22),value:"`",start:o,end:u,startLoc:s.start,endLoc:l}):p=new Ai({type:as(8),value:"}",start:o,end:u,startLoc:s.start,endLoc:l});let d,h,m,g;i===24?(h=c-1,m=Ar(s.end,-1),d=a===null?null:a.slice(1,-1),g=new Ai({type:as(22),value:"`",start:h,end:c,startLoc:m,endLoc:s.end})):(h=c-2,m=Ar(s.end,-2),d=a===null?null:a.slice(1,-2),g=new Ai({type:as(23),value:"${",start:h,end:c,startLoc:m,endLoc:s.end})),e.splice(r,1,p,new Ai({type:as(20),value:d,start:u,end:h,startLoc:l,endLoc:m}),g),r+=2;continue}}n.type=as(i)}}return e}var Jb=class extends Yb{parseTopLevel(t,r){return t.program=this.parseProgram(r),t.comments=this.comments,this.options.tokens&&(t.tokens=MW(this.tokens,this.input)),this.finishNode(t,"File")}parseProgram(t,r=139,n=this.options.sourceType){if(t.sourceType=n,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,r),this.inModule){if(!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[s,o]of Array.from(this.scope.undefinedExports))this.raise(_.ModuleExportUndefined,o,{localName:s});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return r===139?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",Ar(this.state.startLoc,-1)),i}stmtToDirective(t){let r=t;r.type="Directive",r.value=r.expression,delete r.expression;let n=r.value,i=n.value,s=this.input.slice(n.start,n.end),o=n.value=s.slice(1,-1);return this.addExtra(n,"raw",s),this.addExtra(n,"rawValue",o),this.addExtra(n,"expressionValue",i),n.type="DirectiveLiteral",r}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}chStartsBindingIdentifier(t,r){if(us(t)){if(_b.lastIndex=r,_b.test(this.input)){let n=this.codePointAtPos(_b.lastIndex);if(!Qa(n)&&n!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),r=this.codePointAtPos(t);return this.chStartsBindingPattern(r)||this.chStartsBindingIdentifier(r,t)}hasInLineFollowingBindingIdentifierOrBrace(){let t=this.nextTokenInLineStart(),r=this.codePointAtPos(t);return r===123||this.chStartsBindingIdentifier(r,t)}startsUsingForOf(){let{type:t,containsEsc:r}=this.lookahead();if(t===102&&!r)return!1;if(ze(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let r=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(r,t))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let r=0;return this.options.annexB&&!this.state.strict&&(r|=4,t&&(r|=8)),this.parseStatementLike(r)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let r=null;return this.match(26)&&(r=this.parseDecorators(!0)),this.parseStatementContent(t,r)}parseStatementContent(t,r){let n=this.state.type,i=this.startNode(),s=!!(t&2),o=!!(t&4),a=t&1;switch(n){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return o||this.raise(this.state.strict?_.StrictFunction:this.options.annexB?_.SloppyFunctionAnnexB:_.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!s&&o);case 80:return s||this.unexpected(),this.parseClass(this.maybeTakeDecorators(r,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?s||this.raise(_.UnexpectedLexicalDeclaration,i):this.raise(_.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(_.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(_.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let l=this.nextTokenStart(),p=this.codePointAtPos(l);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,l)&&p!==123))break}case 75:s||this.raise(_.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let l=this.state.value;return this.parseVarStatement(i,l)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let l=this.lookaheadCharCode();if(l===40||l===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(_.UnexpectedImportExport,this.state.startLoc),this.next();let l;return n===83?(l=this.parseImport(i),l.type==="ImportDeclaration"&&(!l.importKind||l.importKind==="value")&&(this.sawUnambiguousESM=!0)):(l=this.parseExport(i,r),(l.type==="ExportNamedDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportAllDeclaration"&&(!l.exportKind||l.exportKind==="value")||l.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(l),l}default:if(this.isAsyncFunction())return s||this.raise(_.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let c=this.state.value,u=this.parseExpression();return ze(n)&&u.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,c,u,t):this.parseExpressionStatement(i,u,r)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(_.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,r,n){return t&&(r.decorators&&r.decorators.length>0?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(_.DecoratorsBeforeAfterExport,r.decorators[0]),r.decorators.unshift(...t)):r.decorators=t,this.resetStartLocationFromNode(r,t[0]),n&&this.resetStartLocationFromNode(n,r)),r}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let r=[];do r.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(_.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(_.UnexpectedLeadingDecorator,this.state.startLoc);return r}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let r=this.state.startLoc,n;if(this.match(10)){let i=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(i,n);let s=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(n),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==n&&this.raise(_.DecoratorArgumentsOutsideParentheses,s)}else{for(n=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(r);i.object=n,this.match(138)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,n=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(n)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t){if(this.eat(10)){let r=this.startNodeAtNode(t);return r.callee=t,r.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(r.arguments),this.finishNode(r,"CallExpression")}return t}parseBreakContinueStatement(t,r){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,r),this.finishNode(t,r?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,r){let n;for(n=0;n<this.state.labels.length;++n){let i=this.state.labels[n];if((t.label==null||i.name===t.label.name)&&(i.kind!=null&&(r||i.kind===1)||t.label&&r))break}if(n===this.state.labels.length){let i=r?"BreakStatement":"ContinueStatement";this.raise(_.IllegalBreakContinue,t,{type:i})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(Fb),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Fb);let r=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(r=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return r!==null&&this.unexpected(r),this.parseFor(t,null);let n=this.isContextual(100);{let c=this.isContextual(96)&&this.startsAwaitUsing(),u=c||this.isContextual(107)&&this.startsUsingForOf(),l=n&&this.hasFollowingBindingAtom()||u;if(this.match(74)||this.match(75)||l){let p=this.startNode(),d;c?(d="await using",this.recordAwaitIfAllowed()||this.raise(_.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(p,!0,d);let h=this.finishNode(p,"VariableDeclaration"),m=this.match(58);return m&&u&&this.raise(_.ForInUsing,h),(m||this.isContextual(102))&&h.declarations.length===1?this.parseForIn(t,h,r):(r!==null&&this.unexpected(r),this.parseFor(t,h))}}let i=this.isContextual(95),s=new ec,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(_.ForOfLet,o),r===null&&i&&o.type==="Identifier"&&this.raise(_.ForOfAsync,o)),a||this.match(58)){this.checkDestructuringPrivate(s),this.toAssignable(o,!0);let c=a?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{type:c}),this.parseForIn(t,o,r)}else this.checkExpressionErrors(s,!0);return r!==null&&this.unexpected(r),this.parseFor(t,o)}parseFunctionStatement(t,r,n){return this.next(),this.parseFunction(t,1|(n?2:0)|(r?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(_.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let r=t.cases=[];this.expect(5),this.state.labels.push(OW),this.scope.enter(0);let n;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let s=this.match(61);n&&this.finishNode(n,"SwitchCase"),r.push(n=this.startNode()),n.consequent=[],this.next(),s?n.test=this.parseExpression():(i&&this.raise(_.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(_.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let r=this.startNode();this.next(),this.match(10)?(this.expect(10),r.param=this.parseCatchClauseParam(),this.expect(11)):(r.param=null,this.scope.enter(0)),r.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(r,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(_.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,r,n=!1){return this.next(),this.parseVar(t,!1,r,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Fb),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(_.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,r,n,i){for(let o of this.state.labels)o.name===r&&this.raise(_.LabelRedeclaration,n,{labelName:r});let s=UV(this.state.type)?1:this.match(71)?2:null;for(let o=this.state.labels.length-1;o>=0;o--){let a=this.state.labels[o];if(a.statementStart===t.start)a.statementStart=this.state.start,a.kind=s;else break}return this.state.labels.push({name:r,kind:s,statementStart:this.state.start}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,r,n){return t.expression=r,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,r=!0,n){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),r&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,n),r&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,r,n,i,s){let o=t.body=[],a=t.directives=[];this.parseBlockOrModuleBlockBody(o,r?a:void 0,n,i,s)}parseBlockOrModuleBlockBody(t,r,n,i,s){let o=this.state.strict,a=!1,c=!1;for(;!this.match(i);){let u=n?this.parseModuleItem():this.parseStatementListItem();if(r&&!c){if(this.isValidDirective(u)){let l=this.stmtToDirective(u);r.push(l),!a&&l.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}t.push(u)}s?.call(this,a),o||this.setStrict(!1),this.next()}parseFor(t,r){return t.init=r,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,r,n){let i=this.match(58);return this.next(),i?n!==null&&this.unexpected(n):t.await=n!==null,r.type==="VariableDeclaration"&&r.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||r.kind!=="var"||r.declarations[0].id.type!=="Identifier")&&this.raise(_.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(_.InvalidLhs,r,{ancestor:{type:"ForStatement"}}),t.left=r,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,r,n,i=!1){let s=t.declarations=[];for(t.kind=n;;){let o=this.startNode();if(this.parseVarId(o,n),o.init=this.eat(29)?r?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,o.init===null&&!i&&(o.id.type!=="Identifier"&&!(r&&(this.match(58)||this.isContextual(102)))?this.raise(_.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(_.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n})),s.push(this.finishNode(o,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,r){let n=this.parseBindingAtom();(r==="using"||r==="await using")&&(n.type==="ArrayPattern"||n.type==="ObjectPattern")&&this.raise(_.UsingDeclarationHasBindingPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},r==="var"?5:8201),t.id=n}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,r=0){let n=r&2,i=!!(r&1),s=i&&!(r&4),o=!!(r&8);this.initFunction(t,o),this.match(55)&&(n&&this.raise(_.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(s));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(gf(o,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!n&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=a,t}parseFunctionId(t){return t||ze(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,r){this.expect(10),this.expressionScope.enter(lW()),t.params=this.parseBindingList(11,41,2|(r?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,r,n){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,r,n),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,r?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,r){this.classScope.enter();let n={hadConstructor:!1,hadSuperClass:t},i=[],s=this.startNode();if(s.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(_.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let o=this.startNode();i.length&&(o.decorators=i,this.resetStartLocationFromNode(o,i[0]),i=[]),this.parseClassMember(s,o,n),o.kind==="constructor"&&o.decorators&&o.decorators.length>0&&this.raise(_.DecoratorConstructor,o)}}),this.state.strict=r,this.next(),i.length)throw this.raise(_.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(s,"ClassBody")}parseClassMemberFromModifier(t,r){let n=this.parseIdentifier(!0);if(this.isClassMethod()){let i=r;return i.kind="method",i.computed=!1,i.key=n,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=r;return i.computed=!1,i.key=n,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(t,r,n){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,r))return;if(this.eat(5)){this.parseClassStaticBlock(t,r);return}}this.parseClassMemberWithIsStatic(t,r,n,i)}parseClassMemberWithIsStatic(t,r,n,i){let s=r,o=r,a=r,c=r,u=r,l=s,p=s;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){l.kind="method";let b=this.match(138);if(this.parseClassElementName(l),b){this.pushClassPrivateMethod(t,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(_.ConstructorIsGenerator,s.key),this.pushClassMethod(t,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&ze(this.state.type),h=this.parseClassElementName(r),m=d?h.name:null,g=this.isPrivateName(h),y=this.state.startLoc;if(this.parsePostMemberNameModifiers(p),this.isClassMethod()){if(l.kind="method",g){this.pushClassPrivateMethod(t,o,!1,!1);return}let b=this.isNonstaticConstructor(s),v=!1;b&&(s.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(_.DuplicateConstructor,h),b&&this.hasPlugin("typescript")&&r.override&&this.raise(_.OverrideOnConstructor,h),n.hadConstructor=!0,v=n.hadSuperClass),this.pushClassMethod(t,s,!1,!1,b,v)}else if(this.isClassProperty())g?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,a);else if(m==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);let b=this.eat(55);p.optional&&this.unexpected(y),l.kind="method";let v=this.match(138);this.parseClassElementName(l),this.parsePostMemberNameModifiers(p),v?this.pushClassPrivateMethod(t,o,b,!0):(this.isNonstaticConstructor(s)&&this.raise(_.ConstructorIsAsync,s.key),this.pushClassMethod(t,s,b,!0,!1,!1))}else if((m==="get"||m==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(h),l.kind=m;let b=this.match(138);this.parseClassElementName(s),b?this.pushClassPrivateMethod(t,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(_.ConstructorIsAccessor,s.key),this.pushClassMethod(t,s,!1,!1,!1,!1)),this.checkGetterSetterParams(s)}else if(m==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);let b=this.match(138);this.parseClassElementName(a),this.pushClassAccessorProperty(t,u,b)}else this.isLineTerminator()?g?this.pushClassPrivateProperty(t,c):this.pushClassProperty(t,a):this.unexpected()}parseClassElementName(t){let{type:r,value:n}=this.state;if((r===132||r===133)&&t.static&&n==="prototype"&&this.raise(_.StaticPrototype,this.state.startLoc),r===138){n==="constructor"&&this.raise(_.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,r){var n;this.scope.enter(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let s=r.body=[];this.parseBlockOrModuleBlockBody(s,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(r,"StaticBlock")),(n=r.decorators)!=null&&n.length&&this.raise(_.DecoratorStaticBlock,r)}pushClassProperty(t,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(_.ConstructorClassField,r.key),t.body.push(this.parseClassProperty(r))}pushClassPrivateProperty(t,r){let n=this.parseClassPrivateProperty(r);t.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(t,r,n){!n&&!r.computed&&this.nameIsConstructor(r.key)&&this.raise(_.ConstructorClassField,r.key);let i=this.parseClassAccessorProperty(r);t.body.push(i),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,r,n,i,s,o){t.body.push(this.parseMethod(r,n,i,s,o,"ClassMethod",!0))}pushClassPrivateMethod(t,r,n,i){let s=this.parseMethod(r,n,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(s);let o=s.kind==="get"?s.static?6:2:s.kind==="set"?s.static?5:1:0;this.declareClassPrivateMethodInScope(s,o)}declareClassPrivateMethodInScope(t,r){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),r,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(80),this.expressionScope.enter(QF()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,r,n,i=8331){if(ze(this.state.type))t.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(t.id,i);else if(n||!r)t.id=null;else throw this.raise(_.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,r){let n=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,n),s=!i||this.eat(12),o=s&&this.eatExportStar(t),a=o&&this.maybeParseExportNamespaceSpecifier(t),c=s&&(!a||this.eat(12)),u=i||o;if(o&&!a){if(i&&this.unexpected(),r)throw this.raise(_.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let l=this.maybeParseExportNamedSpecifiers(t);i&&s&&!o&&!l&&this.unexpected(null,5),a&&c&&this.unexpected(null,98);let p;if(u||l){if(p=!1,r)throw this.raise(_.UnsupportedDecoratorExport,t);this.parseExportFrom(t,u)}else p=this.maybeParseExportDeclaration(t);if(u||l||p){var d;let h=t;if(this.checkExport(h,!0,!1,!!h.source),((d=h.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(r,h.declaration,h);else if(r)throw this.raise(_.UnsupportedDecoratorExport,t);return this.finishNode(h,"ExportNamedDeclaration")}if(this.eat(65)){let h=t,m=this.parseExportDefaultExpression();if(h.declaration=m,m.type==="ClassDeclaration")this.maybeTakeDecorators(r,m,h);else if(r)throw this.raise(_.UnsupportedDecoratorExport,t);return this.checkExport(h,!0,!0),this.finishNode(h,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,r){if(r||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",r?.loc.start);let n=r||this.parseIdentifier(!0),i=this.startNodeAtNode(n);return i.exported=n,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var r,n;(n=(r=t).specifiers)!=null||(r.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){let r=t;r.specifiers||(r.specifiers=[]);let n=r.exportKind==="type";return r.specifiers.push(...this.parseExportSpecifiers(n)),r.source=null,r.declaration=null,this.hasPlugin("importAssertions")&&(r.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(_.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(_.UnsupportedDefaultExport,this.state.startLoc);let r=this.parseMaybeAssignAllowIn();return this.semicolon(),r}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(ze(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(ze(i)&&i!==98||i===5)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let r=this.nextTokenStart(),n=this.isUnparsedContextual(r,"from");if(this.input.charCodeAt(r)===44||ze(this.state.type)&&n)return!0;if(this.match(65)&&n){let i=this.input.charCodeAt(this.nextTokenStartSince(r+4));return i===34||i===39}return!1}parseExportFrom(t,r){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):r&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(_.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(_.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(_.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,r,n,i){if(r){var s;if(n){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var o;let a=t.declaration;a.type==="Identifier"&&a.name==="from"&&a.end-a.start===4&&!((o=a.extra)!=null&&o.parenthesized)&&this.raise(_.ExportDefaultFromAsIdentifier,a)}}else if((s=t.specifiers)!=null&&s.length)for(let a of t.specifiers){let{exported:c}=a,u=c.type==="Identifier"?c.name:c.value;if(this.checkDuplicateExports(a,u),!i&&a.local){let{local:l}=a;l.type!=="Identifier"?this.raise(_.ExportBindingIsString,a,{localName:l.value,exportName:u}):(this.checkReservedWord(l.name,l.loc.start,!0,!1),this.scope.checkLocalExport(l))}}else if(t.declaration){let a=t.declaration;if(a.type==="FunctionDeclaration"||a.type==="ClassDeclaration"){let{id:c}=a;if(!c)throw new Error("Assertion failure");this.checkDuplicateExports(t,c.name)}else if(a.type==="VariableDeclaration")for(let c of a.declarations)this.checkDeclaration(c.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let r of t.properties)this.checkDeclaration(r);else if(t.type==="ArrayPattern")for(let r of t.elements)r&&this.checkDeclaration(r);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,r){this.exportedIdentifiers.has(r)&&(r==="default"?this.raise(_.DuplicateDefaultExport,t):this.raise(_.DuplicateExport,t,{exportName:r})),this.exportedIdentifiers.add(r)}parseExportSpecifiers(t){let r=[],n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),s=this.match(133),o=this.startNode();o.local=this.parseModuleExportName(),r.push(this.parseExportSpecifier(o,s,t,i))}return r}parseExportSpecifier(t,r,n,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():r?t.exported=mW(t.local):t.exported||(t.exported=ps(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),r=BW.exec(t.value);return r&&this.raise(_.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:r[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:r,value:n})=>n.value==="json"&&(r.type==="Identifier"?r.name==="type":r.value==="type")):!1}checkImportReflection(t){let{specifiers:r}=t,n=r.length===1?r[0].type:null;if(t.phase==="source")n!=="ImportDefaultSpecifier"&&this.raise(_.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(t.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(_.DeferImportRequiresNamespace,r[0].loc.start);else if(t.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(_.ImportReflectionNotBinding,r[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(_.ImportReflectionHasAssertion,r[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:r}=t;if(r!=null){let n=r.find(i=>{let s;if(i.type==="ExportSpecifier"?s=i.local:i.type==="ImportSpecifier"&&(s=i.imported),s!==void 0)return s.type==="Identifier"?s.name!=="default":s.value!=="default"});n!==void 0&&this.raise(_.ImportJSONBindingNotDefault,n.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,r,n,i){r||(n==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),n==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):n==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,r){if(!this.isPotentialImportPhase(r))return this.applyImportPhase(t,r,null),null;let n=this.parseIdentifier(!0),{type:i}=this.state;return(Qn(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(n),this.applyImportPhase(t,r,n.name,n.loc.start),null):(this.applyImportPhase(t,r,null),n)}isPrecedingIdImportPhase(t){let{type:r}=this.state;return ze(r)?r!==98||this.lookaheadCharCode()===102:r!==12}parseImport(t){return this.match(133)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,r){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,r)||this.eat(12),s=i&&this.maybeParseStarImportSpecifier(t);return i&&!s&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var r;return(r=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(133)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,r,n){r.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(r,n))}finishImportSpecifier(t,r,n=8201){return this.checkLVal(t.local,{type:r},n),this.finishNode(t,r)}parseImportAttributes(){this.expect(5);let t=[],r=new Set;do{if(this.match(8))break;let n=this.startNode(),i=this.state.value;if(r.has(i)&&this.raise(_.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),r.add(i),this.match(133)?n.key=this.parseStringLiteral(i):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(133))throw this.raise(_.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],r=new Set;do{let n=this.startNode();if(n.key=this.parseIdentifier(!0),n.key.name!=="type"&&this.raise(_.ModuleAttributeDifferentFromType,n.key),r.has(n.key.name)&&this.raise(_.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),r.add(n.key.name),this.expect(14),!this.match(133))throw this.raise(_.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let r,n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?r=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),r=this.parseImportAttributes()),n=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(this.getPluginOption("importAttributes","deprecatedAssertSyntax")!==!0&&this.raise(_.ImportAttributesUseAssert,this.state.startLoc),this.addExtra(t,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),r=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r=[];else if(this.hasPlugin("moduleAttributes"))r=[];else return;!n&&this.hasPlugin("importAssertions")?t.assertions=r:t.attributes=r}maybeParseDefaultImportSpecifier(t,r){if(r){let n=this.startNodeAtNode(r);return n.local=r,t.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}else if(Qn(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let r=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,r,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else{if(this.eat(14))throw this.raise(_.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let n=this.startNode(),i=this.match(133),s=this.isContextual(130);n.imported=this.parseModuleExportName();let o=this.parseImportSpecifier(n,i,t.importKind==="type"||t.importKind==="typeof",s,void 0);t.specifiers.push(o)}}parseImportSpecifier(t,r,n,i,s){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:o}=t;if(r)throw this.raise(_.ImportBindingIsString,t,{importName:o.value});this.checkReservedWord(o.name,t.loc.start,!0,!0),t.local||(t.local=ps(o))}return this.finishImportSpecifier(t,"ImportSpecifier",s)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},vf=class extends Jb{constructor(t,r,n){t=RW(t),super(t,r),this.options=t,this.initializeScopes(),this.plugins=n,this.filename=t.sourceFilename}getScopeHandler(){return nl}parse(){this.enterInitialScopes();let t=this.startNode(),r=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,r),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}};function LW(e,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let n=el(t,e),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return t.sourceType="script",el(t,e).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return t.sourceType="script",el(t,e).parse()}catch{}throw n}}else return el(t,e).parse()}function $W(e,t){let r=el(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function UW(e){let t={};for(let r of Object.keys(e))t[r]=as(e[r]);return t}var jW=UW(BV);function el(e,t){let r=vf,n=new Map;if(e!=null&&e.plugins){for(let i of e.plugins){let s,o;typeof i=="string"?s=i:[s,o]=i,n.has(s)||n.set(s,o||{})}kW(n),r=qW(n)}return new r(e,t,n)}var jF=new Map;function qW(e){let t=[];for(let i of NW)e.has(i)&&t.push(i);let r=t.join("|"),n=jF.get(r);if(!n){n=vf;for(let i of t)n=r_[i](n);jF.set(r,n)}return n}sl.parse=LW;sl.parseExpression=$W;sl.tokTypes=jW});var LI=w(fc=>{"use strict";f();Object.defineProperty(fc,"__esModule",{value:!0});fc.splitWhen=fc.flatten=void 0;function VJ(e){return e.reduce((t,r)=>[].concat(t,r),[])}fc.flatten=VJ;function WJ(e,t){let r=[[]],n=0;for(let i of e)t(i)?(n++,r[n]=[]):r[n].push(i);return r}fc.splitWhen=WJ});var $I=w(Wf=>{"use strict";f();Object.defineProperty(Wf,"__esModule",{value:!0});Wf.isEnoentCodeError=void 0;function YJ(e){return e.code==="ENOENT"}Wf.isEnoentCodeError=YJ});var UI=w(Yf=>{"use strict";f();Object.defineProperty(Yf,"__esModule",{value:!0});Yf.createDirentFromStats=void 0;var Gx=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function JJ(e,t){return new Gx(e,t)}Yf.createDirentFromStats=JJ});var zI=w(qt=>{"use strict";f();Object.defineProperty(qt,"__esModule",{value:!0});qt.convertPosixPathToPattern=qt.convertWindowsPathToPattern=qt.convertPathToPattern=qt.escapePosixPath=qt.escapeWindowsPath=qt.escape=qt.removeLeadingDotSegment=qt.makeAbsolute=qt.unixify=void 0;var XJ=require("os"),QJ=require("path"),jI=XJ.platform()==="win32",ZJ=2,eX=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,tX=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,rX=/^\\\\([.?])/,nX=/\\(?![!()+@[\]{}])/g;function iX(e){return e.replace(/\\/g,"/")}qt.unixify=iX;function sX(e,t){return QJ.resolve(e,t)}qt.makeAbsolute=sX;function oX(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(ZJ)}return e}qt.removeLeadingDotSegment=oX;qt.escape=jI?zx:Hx;function zx(e){return e.replace(tX,"\\$2")}qt.escapeWindowsPath=zx;function Hx(e){return e.replace(eX,"\\$2")}qt.escapePosixPath=Hx;qt.convertPathToPattern=jI?qI:GI;function qI(e){return zx(e).replace(rX,"//$1").replace(nX,"/")}qt.convertWindowsPathToPattern=qI;function GI(e){return Hx(e)}qt.convertPosixPathToPattern=GI});var KI=w((gIe,HI)=>{f();HI.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var YI=w((bIe,WI)=>{f();var aX=KI(),VI={"{":"}","(":")","[":"]"},cX=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,i=-2,s=-2,o=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(o===-1||o>n||(o=e.indexOf("\\",t),o===-1||o>n)))||i!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(i=e.indexOf("}",t),i>t&&(o=e.indexOf("\\",t),o===-1||o>i))||s!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(s=e.indexOf(")",t),s>t&&(o=e.indexOf("\\",t),o===-1||o>s))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(s=e.indexOf(")",r),s>r&&(o=e.indexOf("\\",r),o===-1||o>s))))return!0;if(e[t]==="\\"){var a=e[t+1];t+=2;var c=VI[a];if(c){var u=e.indexOf(c,t);u!==-1&&(t=u+1)}if(e[t]==="!")return!0}else t++}return!1},uX=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=VI[r];if(n){var i=e.indexOf(n,t);i!==-1&&(t=i+1)}if(e[t]==="!")return!0}else t++}return!1};WI.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(aX(t))return!0;var n=cX;return r&&r.strict===!1&&(n=uX),n(t)}});var XI=w((vIe,JI)=>{"use strict";f();var lX=YI(),pX=require("path").posix.dirname,dX=require("os").platform()==="win32",Kx="/",fX=/\\/g,mX=/[\{\[].*[\}\]]$/,hX=/(^|[^\\])([\{\[]|\([^\)]+$)/,gX=/\\([\!\*\?\|\[\]\(\)\{\}])/g;JI.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&dX&&t.indexOf(Kx)<0&&(t=t.replace(fX,Kx)),mX.test(t)&&(t+=Kx),t+="a";do t=pX(t);while(lX(t)||hX.test(t));return t.replace(gX,"$1")}});var Jf=w(Pn=>{"use strict";f();Pn.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Pn.find=(e,t)=>e.nodes.find(r=>r.type===t);Pn.exceedsLimit=(e,t,r=1,n)=>n===!1||!Pn.isInteger(e)||!Pn.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;Pn.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};Pn.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);Pn.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;Pn.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Pn.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Pn.flatten=(...e)=>{let t=[],r=n=>{for(let i=0;i<n.length;i++){let s=n[i];if(Array.isArray(s)){r(s);continue}s!==void 0&&t.push(s)}return t};return r(e),t}});var Xf=w((wIe,ZI)=>{"use strict";f();var QI=Jf();ZI.exports=(e,t={})=>{let r=(n,i={})=>{let s=t.escapeInvalid&&QI.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||o)&&QI.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(e)}});var tk=w((TIe,ek)=>{"use strict";f();ek.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var lk=w((PIe,uk)=>{"use strict";f();var rk=tk(),qo=(e,t,r)=>{if(rk(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(rk(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let i=String(n.relaxZeros),s=String(n.shorthand),o=String(n.capture),a=String(n.wrap),c=e+":"+t+"="+i+s+o+a;if(qo.cache.hasOwnProperty(c))return qo.cache[c].result;let u=Math.min(e,t),l=Math.max(e,t);if(Math.abs(u-l)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=ck(e)||ck(t),d={min:e,max:t,a:u,b:l},h=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),u<0){let g=l<0?Math.abs(l):1;m=nk(g,Math.abs(u),d,n),u=d.a=0}return l>=0&&(h=nk(u,l,d,n)),d.negatives=m,d.positives=h,d.result=yX(m,h,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&h.length+m.length>1&&(d.result=`(?:${d.result})`),qo.cache[c]=d,d.result};function yX(e,t,r){let n=Vx(e,t,"-",!1,r)||[],i=Vx(t,e,"",!1,r)||[],s=Vx(e,t,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function bX(e,t){let r=1,n=1,i=sk(e,r),s=new Set([t]);for(;e<=i&&i<=t;)s.add(i),r+=1,i=sk(e,r);for(i=ok(t+1,n)-1;e<i&&i<=t;)s.add(i),n+=1,i=ok(t+1,n)-1;return s=[...s],s.sort(DX),s}function xX(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=vX(e,t),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,u]=n[a];c===u?s+=c:c!=="0"||u!=="9"?s+=CX(c,u,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function nk(e,t,r,n){let i=bX(e,t),s=[],o=e,a;for(let c=0;c<i.length;c++){let u=i[c],l=xX(String(o),String(u),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+ak(a.count),o=u+1;continue}r.isPadded&&(p=EX(u,r,n)),l.string=p+l.pattern+ak(l.count),s.push(l),o=u+1,a=l}return s}function Vx(e,t,r,n,i){let s=[];for(let o of e){let{string:a}=o;!n&&!ik(t,"string",a)&&s.push(r+a),n&&ik(t,"string",a)&&s.push(r+a)}return s}function vX(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function DX(e,t){return e>t?1:t>e?-1:0}function ik(e,t,r){return e.some(n=>n[t]===r)}function sk(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function ok(e,t){return e-e%Math.pow(10,t)}function ak(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function CX(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function ck(e){return/^-?(0+)\d/.test(e)}function EX(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),i=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:return i?`0{0,${n}}`:`0{${n}}`}}qo.cache={};qo.clearCache=()=>qo.cache={};uk.exports=qo});var Jx=w((_Ie,yk)=>{"use strict";f();var wX=require("util"),dk=lk(),pk=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),SX=e=>t=>e===!0?Number(t):String(t),Wx=e=>typeof e=="number"||typeof e=="string"&&e!=="",El=e=>Number.isInteger(+e),Yx=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},TX=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,AX=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Zf=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},PX=(e,t,r)=>{e.negatives.sort((a,c)=>a<c?-1:a>c?1:0),e.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=t.capture?"":"?:",i="",s="",o;return e.positives.length&&(i=e.positives.map(a=>Zf(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Zf(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,t.wrap?`(${n}${o})`:o},fk=(e,t,r,n)=>{if(r)return dk(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);if(e===t)return i;let s=String.fromCharCode(t);return`[${i}-${s}]`},mk=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${e.join("|")})`:e.join("|")}return dk(e,t,r)},hk=(...e)=>new RangeError("Invalid range arguments: "+wX.inspect(...e)),gk=(e,t,r)=>{if(r.strictRanges===!0)throw hk([e,t]);return[]},FX=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},_X=(e,t,r=1,n={})=>{let i=Number(e),s=Number(t);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw hk([e,t]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(e),c=String(t),u=String(r);r=Math.max(Math.abs(r),1);let l=Yx(a)||Yx(c)||Yx(u),p=l?Math.max(a.length,c.length,u.length):0,d=l===!1&&TX(e,t,n)===!1,h=n.transform||SX(d);if(n.toRegex&&r===1)return fk(Zf(e,p),Zf(t,p),!0,n);let m={negatives:[],positives:[]},g=v=>m[v<0?"negatives":"positives"].push(Math.abs(v)),y=[],b=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?g(i):y.push(AX(h(i,b),p,d)),i=o?i-r:i+r,b++;return n.toRegex===!0?r>1?PX(m,n,p):mk(y,null,{wrap:!1,...n}):y},IX=(e,t,r=1,n={})=>{if(!El(e)&&e.length>1||!El(t)&&t.length>1)return gk(e,t,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),a=s>o,c=Math.min(s,o),u=Math.max(s,o);if(n.toRegex&&r===1)return fk(c,u,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?mk(l,null,{wrap:!1,options:n}):l},Qf=(e,t,r,n={})=>{if(t==null&&Wx(e))return[e];if(!Wx(e)||!Wx(t))return gk(e,t,n);if(typeof r=="function")return Qf(e,t,1,{transform:r});if(pk(r))return Qf(e,t,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,El(r)?El(e)&&El(t)?_X(e,t,r,i):IX(e,t,Math.max(Math.abs(r),1),i):r!=null&&!pk(r)?FX(r,i):Qf(e,t,1,r)};yk.exports=Qf});var vk=w((kIe,xk)=>{"use strict";f();var kX=Jx(),bk=Jf(),NX=(e,t={})=>{let r=(n,i={})=>{let s=bk.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||o===!0,c=t.escapeInvalid===!0?"\\":"",u="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=bk.reduce(n.nodes),p=kX(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)u+=r(l,n);return u};return r(e)};xk.exports=NX});var Ek=w((RIe,Ck)=>{"use strict";f();var RX=Jx(),Dk=Xf(),mc=Jf(),Go=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?mc.flatten(t).map(i=>`{${i}}`):t;for(let i of e)if(Array.isArray(i))for(let s of i)n.push(Go(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?Go(i,s,r):i+s);return mc.flatten(n)},OX=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(i,s={})=>{i.queue=[];let o=s,a=s.queue;for(;o.type!=="brace"&&o.type!=="root"&&o.parent;)o=o.parent,a=o.queue;if(i.invalid||i.dollar){a.push(Go(a.pop(),Dk(i,t)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Go(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=mc.reduce(i.nodes);if(mc.exceedsLimit(...p,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let d=RX(...p,t);d.length===0&&(d=Dk(i,t)),a.push(Go(a.pop(),d)),i.nodes=[];return}let c=mc.encloseBrace(i),u=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,u=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&u.push(""),u.push("");continue}if(d.type==="close"){a.push(Go(a.pop(),u,c));continue}if(d.value&&d.type!=="open"){u.push(Go(u.pop(),d.value));continue}d.nodes&&n(d,i)}return u};return mc.flatten(n(e))};Ck.exports=OX});var Sk=w((BIe,wk)=>{"use strict";f();wk.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
|
23
|
+
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var _k=w((LIe,Fk)=>{"use strict";f();var BX=Xf(),{MAX_LENGTH:Tk,CHAR_BACKSLASH:Xx,CHAR_BACKTICK:MX,CHAR_COMMA:LX,CHAR_DOT:$X,CHAR_LEFT_PARENTHESES:UX,CHAR_RIGHT_PARENTHESES:jX,CHAR_LEFT_CURLY_BRACE:qX,CHAR_RIGHT_CURLY_BRACE:GX,CHAR_LEFT_SQUARE_BRACKET:Ak,CHAR_RIGHT_SQUARE_BRACKET:Pk,CHAR_DOUBLE_QUOTE:zX,CHAR_SINGLE_QUOTE:HX,CHAR_NO_BREAK_SPACE:KX,CHAR_ZERO_WIDTH_NOBREAK_SPACE:VX}=Sk(),WX=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Tk,r.maxLength):Tk;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let i={type:"root",input:e,nodes:[]},s=[i],o=i,a=i,c=0,u=e.length,l=0,p=0,d,h=()=>e[l++],m=g=>{if(g.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&g.type==="text"){a.value+=g.value;return}return o.nodes.push(g),g.parent=o,g.prev=a,a=g,g};for(m({type:"bos"});l<u;)if(o=s[s.length-1],d=h(),!(d===VX||d===KX)){if(d===Xx){m({type:"text",value:(t.keepEscaping?d:"")+h()});continue}if(d===Pk){m({type:"text",value:"\\"+d});continue}if(d===Ak){c++;let g;for(;l<u&&(g=h());){if(d+=g,g===Ak){c++;continue}if(g===Xx){d+=h();continue}if(g===Pk&&(c--,c===0))break}m({type:"text",value:d});continue}if(d===UX){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===jX){if(o.type!=="paren"){m({type:"text",value:d});continue}o=s.pop(),m({type:"text",value:d}),o=s[s.length-1];continue}if(d===zX||d===HX||d===MX){let g=d,y;for(t.keepQuotes!==!0&&(d="");l<u&&(y=h());){if(y===Xx){d+=y+h();continue}if(y===g){t.keepQuotes===!0&&(d+=y);break}d+=y}m({type:"text",value:d});continue}if(d===qX){p++;let y={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||o.dollar===!0,depth:p,commas:0,ranges:0,nodes:[]};o=m(y),s.push(o),m({type:"open",value:d});continue}if(d===GX){if(o.type!=="brace"){m({type:"text",value:d});continue}let g="close";o=s.pop(),o.close=!0,m({type:g,value:d}),p--,o=s[s.length-1];continue}if(d===LX&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:BX(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===$X&&p>0&&o.commas===0){let g=o.nodes;if(p===0||g.length===0){m({type:"text",value:d});continue}if(a.type==="dot"){if(o.range=[],a.value+=d,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){g.pop();let y=g[g.length-1];y.value+=a.value+d,a=y,o.ranges--;continue}m({type:"dot",value:d});continue}m({type:"text",value:d})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(b=>{b.nodes||(b.type==="open"&&(b.isOpen=!0),b.type==="close"&&(b.isClose=!0),b.nodes||(b.type="text"),b.invalid=!0)});let g=s[s.length-1],y=g.nodes.indexOf(o);g.nodes.splice(y,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),i};Fk.exports=WX});var Nk=w((UIe,kk)=>{"use strict";f();var Ik=Xf(),YX=vk(),JX=Ek(),XX=_k(),pn=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=pn.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(pn.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};pn.parse=(e,t={})=>XX(e,t);pn.stringify=(e,t={})=>Ik(typeof e=="string"?pn.parse(e,t):e,t);pn.compile=(e,t={})=>(typeof e=="string"&&(e=pn.parse(e,t)),YX(e,t));pn.expand=(e,t={})=>{typeof e=="string"&&(e=pn.parse(e,t));let r=JX(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};pn.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?pn.compile(e,t):pn.expand(e,t);kk.exports=pn});var wl=w((qIe,Lk)=>{"use strict";f();var QX=require("path"),Ni="\\\\/",Rk=`[^${Ni}]`,fs="\\.",ZX="\\+",eQ="\\?",em="\\/",tQ="(?=.)",Ok="[^/]",Qx=`(?:${em}|$)`,Bk=`(?:^|${em})`,Zx=`${fs}{1,2}${Qx}`,rQ=`(?!${fs})`,nQ=`(?!${Bk}${Zx})`,iQ=`(?!${fs}{0,1}${Qx})`,sQ=`(?!${Zx})`,oQ=`[^.${em}]`,aQ=`${Ok}*?`,Mk={DOT_LITERAL:fs,PLUS_LITERAL:ZX,QMARK_LITERAL:eQ,SLASH_LITERAL:em,ONE_CHAR:tQ,QMARK:Ok,END_ANCHOR:Qx,DOTS_SLASH:Zx,NO_DOT:rQ,NO_DOTS:nQ,NO_DOT_SLASH:iQ,NO_DOTS_SLASH:sQ,QMARK_NO_DOT:oQ,STAR:aQ,START_ANCHOR:Bk},cQ={...Mk,SLASH_LITERAL:`[${Ni}]`,QMARK:Rk,STAR:`${Rk}*?`,DOTS_SLASH:`${fs}{1,2}(?:[${Ni}]|$)`,NO_DOT:`(?!${fs})`,NO_DOTS:`(?!(?:^|[${Ni}])${fs}{1,2}(?:[${Ni}]|$))`,NO_DOT_SLASH:`(?!${fs}{0,1}(?:[${Ni}]|$))`,NO_DOTS_SLASH:`(?!${fs}{1,2}(?:[${Ni}]|$))`,QMARK_NO_DOT:`[^.${Ni}]`,START_ANCHOR:`(?:^|[${Ni}])`,END_ANCHOR:`(?:[${Ni}]|$)`},uQ={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};Lk.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:uQ,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:QX.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?cQ:Mk}}});var Sl=w(Kr=>{"use strict";f();var lQ=require("path"),pQ=process.platform==="win32",{REGEX_BACKSLASH:dQ,REGEX_REMOVE_BACKSLASH:fQ,REGEX_SPECIAL_CHARS:mQ,REGEX_SPECIAL_CHARS_GLOBAL:hQ}=wl();Kr.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Kr.hasRegexChars=e=>mQ.test(e);Kr.isRegexChar=e=>e.length===1&&Kr.hasRegexChars(e);Kr.escapeRegex=e=>e.replace(hQ,"\\$1");Kr.toPosixSlashes=e=>e.replace(dQ,"/");Kr.removeBackslashes=e=>e.replace(fQ,t=>t==="\\"?"":t);Kr.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Kr.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:pQ===!0||lQ.sep==="\\";Kr.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Kr.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Kr.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Kr.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Kk=w((KIe,Hk)=>{"use strict";f();var $k=Sl(),{CHAR_ASTERISK:ev,CHAR_AT:gQ,CHAR_BACKWARD_SLASH:Tl,CHAR_COMMA:yQ,CHAR_DOT:tv,CHAR_EXCLAMATION_MARK:rv,CHAR_FORWARD_SLASH:zk,CHAR_LEFT_CURLY_BRACE:nv,CHAR_LEFT_PARENTHESES:iv,CHAR_LEFT_SQUARE_BRACKET:bQ,CHAR_PLUS:xQ,CHAR_QUESTION_MARK:Uk,CHAR_RIGHT_CURLY_BRACE:vQ,CHAR_RIGHT_PARENTHESES:jk,CHAR_RIGHT_SQUARE_BRACKET:DQ}=wl(),qk=e=>e===zk||e===Tl,Gk=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},CQ=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=e,u=-1,l=0,p=0,d=!1,h=!1,m=!1,g=!1,y=!1,b=!1,v=!1,C=!1,x=!1,D=!1,E=0,S,T,F={value:"",depth:0,isGlob:!1},A=()=>u>=n,P=()=>c.charCodeAt(u+1),j=()=>(S=T,c.charCodeAt(++u));for(;u<n;){T=j();let B;if(T===Tl){v=F.backslashes=!0,T=j(),T===nv&&(b=!0);continue}if(b===!0||T===nv){for(E++;A()!==!0&&(T=j());){if(T===Tl){v=F.backslashes=!0,j();continue}if(T===nv){E++;continue}if(b!==!0&&T===tv&&(T=j())===tv){if(d=F.isBrace=!0,m=F.isGlob=!0,D=!0,i===!0)continue;break}if(b!==!0&&T===yQ){if(d=F.isBrace=!0,m=F.isGlob=!0,D=!0,i===!0)continue;break}if(T===vQ&&(E--,E===0)){b=!1,d=F.isBrace=!0,D=!0;break}}if(i===!0)continue;break}if(T===zk){if(s.push(u),o.push(F),F={value:"",depth:0,isGlob:!1},D===!0)continue;if(S===tv&&u===l+1){l+=2;continue}p=u+1;continue}if(r.noext!==!0&&(T===xQ||T===gQ||T===ev||T===Uk||T===rv)===!0&&P()===iv){if(m=F.isGlob=!0,g=F.isExtglob=!0,D=!0,T===rv&&u===l&&(x=!0),i===!0){for(;A()!==!0&&(T=j());){if(T===Tl){v=F.backslashes=!0,T=j();continue}if(T===jk){m=F.isGlob=!0,D=!0;break}}continue}break}if(T===ev){if(S===ev&&(y=F.isGlobstar=!0),m=F.isGlob=!0,D=!0,i===!0)continue;break}if(T===Uk){if(m=F.isGlob=!0,D=!0,i===!0)continue;break}if(T===bQ){for(;A()!==!0&&(B=j());){if(B===Tl){v=F.backslashes=!0,j();continue}if(B===DQ){h=F.isBracket=!0,m=F.isGlob=!0,D=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&T===rv&&u===l){C=F.negated=!0,l++;continue}if(r.noparen!==!0&&T===iv){if(m=F.isGlob=!0,i===!0){for(;A()!==!0&&(T=j());){if(T===iv){v=F.backslashes=!0,T=j();continue}if(T===jk){D=!0;break}}continue}break}if(m===!0){if(D=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,m=!1);let Y=c,J="",I="";l>0&&(J=c.slice(0,l),c=c.slice(l),p-=l),Y&&m===!0&&p>0?(Y=c.slice(0,p),I=c.slice(p)):m===!0?(Y="",I=c):Y=c,Y&&Y!==""&&Y!=="/"&&Y!==c&&qk(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),r.unescape===!0&&(I&&(I=$k.removeBackslashes(I)),Y&&v===!0&&(Y=$k.removeBackslashes(Y)));let k={prefix:J,input:e,start:l,base:Y,glob:I,isBrace:d,isBracket:h,isGlob:m,isExtglob:g,isGlobstar:y,negated:C,negatedExtglob:x};if(r.tokens===!0&&(k.maxDepth=0,qk(T)||o.push(F),k.tokens=o),r.parts===!0||r.tokens===!0){let B;for(let M=0;M<s.length;M++){let X=B?B+1:l,L=s[M],$=e.slice(X,L);r.tokens&&(M===0&&l!==0?(o[M].isPrefix=!0,o[M].value=J):o[M].value=$,Gk(o[M]),k.maxDepth+=o[M].depth),(M!==0||$!=="")&&a.push($),B=L}if(B&&B+1<e.length){let M=e.slice(B+1);a.push(M),r.tokens&&(o[o.length-1].value=M,Gk(o[o.length-1]),k.maxDepth+=o[o.length-1].depth)}k.slashes=s,k.parts=a}return k};Hk.exports=CQ});var Yk=w((WIe,Wk)=>{"use strict";f();var tm=wl(),dn=Sl(),{MAX_LENGTH:rm,POSIX_REGEX_SOURCE:EQ,REGEX_NON_SPECIAL_CHARS:wQ,REGEX_SPECIAL_CHARS_BACKREF:SQ,REPLACEMENTS:Vk}=tm,TQ=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(i=>dn.escapeRegex(i)).join("..")}return r},hc=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,sv=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Vk[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(rm,r.maxLength):rm,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",c=dn.isWindows(t),u=tm.globChars(c),l=tm.extglobChars(u),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:h,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:v,QMARK:C,QMARK_NO_DOT:x,STAR:D,START_ANCHOR:E}=u,S=K=>`(${a}(?:(?!${E}${K.dot?g:p}).)*?)`,T=r.dot?"":y,F=r.dot?C:x,A=r.bash===!0?S(r):D;r.capture&&(A=`(${A})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let P={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};e=dn.removePrefix(e,P),i=e.length;let j=[],Y=[],J=[],I=s,k,B=()=>P.index===i-1,M=P.peek=(K=1)=>e[P.index+K],X=P.advance=()=>e[++P.index]||"",L=()=>e.slice(P.index+1),$=(K="",oe=0)=>{P.consumed+=K,P.index+=oe},H=K=>{P.output+=K.output!=null?K.output:K.value,$(K.value)},re=()=>{let K=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)X(),P.start++,K++;return K%2===0?!1:(P.negated=!0,P.start++,!0)},ve=K=>{P[K]++,J.push(K)},Q=K=>{P[K]--,J.pop()},O=K=>{if(I.type==="globstar"){let oe=P.braces>0&&(K.type==="comma"||K.type==="brace"),z=K.extglob===!0||j.length&&(K.type==="pipe"||K.type==="paren");K.type!=="slash"&&K.type!=="paren"&&!oe&&!z&&(P.output=P.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=A,P.output+=I.output)}if(j.length&&K.type!=="paren"&&(j[j.length-1].inner+=K.value),(K.value||K.output)&&H(K),I&&I.type==="text"&&K.type==="text"){I.value+=K.value,I.output=(I.output||"")+K.value;return}K.prev=I,o.push(K),I=K},ee=(K,oe)=>{let z={...l[oe],conditions:1,inner:""};z.prev=I,z.parens=P.parens,z.output=P.output;let ne=(r.capture?"(":"")+z.open;ve("parens"),O({type:K,value:oe,output:P.output?"":m}),O({type:"paren",extglob:!0,value:X(),output:ne}),j.push(z)},pe=K=>{let oe=K.close+(r.capture?")":""),z;if(K.type==="negate"){let ne=A;if(K.inner&&K.inner.length>1&&K.inner.includes("/")&&(ne=S(r)),(ne!==A||B()||/^\)+$/.test(L()))&&(oe=K.close=`)$))${ne}`),K.inner.includes("*")&&(z=L())&&/^\.[^\\/.]+$/.test(z)){let ie=sv(z,{...t,fastpaths:!1}).output;oe=K.close=`)${ie})${ne})`}K.prev.type==="bos"&&(P.negatedExtglob=!0)}O({type:"paren",extglob:!0,value:k,output:oe}),Q("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let K=!1,oe=e.replace(SQ,(z,ne,ie,ae,le,Fe)=>ae==="\\"?(K=!0,z):ae==="?"?ne?ne+ae+(le?C.repeat(le.length):""):Fe===0?F+(le?C.repeat(le.length):""):C.repeat(ie.length):ae==="."?p.repeat(ie.length):ae==="*"?ne?ne+ae+(le?A:""):A:ne?z:`\\${z}`);return K===!0&&(r.unescape===!0?oe=oe.replace(/\\/g,""):oe=oe.replace(/\\+/g,z=>z.length%2===0?"\\\\":z?"\\":"")),oe===e&&r.contains===!0?(P.output=e,P):(P.output=dn.wrapOutput(oe,P,t),P)}for(;!B();){if(k=X(),k==="\0")continue;if(k==="\\"){let z=M();if(z==="/"&&r.bash!==!0||z==="."||z===";")continue;if(!z){k+="\\",O({type:"text",value:k});continue}let ne=/^\\+/.exec(L()),ie=0;if(ne&&ne[0].length>2&&(ie=ne[0].length,P.index+=ie,ie%2!==0&&(k+="\\")),r.unescape===!0?k=X():k+=X(),P.brackets===0){O({type:"text",value:k});continue}}if(P.brackets>0&&(k!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==!1&&k===":"){let z=I.value.slice(1);if(z.includes("[")&&(I.posix=!0,z.includes(":"))){let ne=I.value.lastIndexOf("["),ie=I.value.slice(0,ne),ae=I.value.slice(ne+2),le=EQ[ae];if(le){I.value=ie+le,P.backtrack=!0,X(),!s.output&&o.indexOf(I)===1&&(s.output=m);continue}}}(k==="["&&M()!==":"||k==="-"&&M()==="]")&&(k=`\\${k}`),k==="]"&&(I.value==="["||I.value==="[^")&&(k=`\\${k}`),r.posix===!0&&k==="!"&&I.value==="["&&(k="^"),I.value+=k,H({value:k});continue}if(P.quotes===1&&k!=='"'){k=dn.escapeRegex(k),I.value+=k,H({value:k});continue}if(k==='"'){P.quotes=P.quotes===1?0:1,r.keepQuotes===!0&&O({type:"text",value:k});continue}if(k==="("){ve("parens"),O({type:"paren",value:k});continue}if(k===")"){if(P.parens===0&&r.strictBrackets===!0)throw new SyntaxError(hc("opening","("));let z=j[j.length-1];if(z&&P.parens===z.parens+1){pe(j.pop());continue}O({type:"paren",value:k,output:P.parens?")":"\\)"}),Q("parens");continue}if(k==="["){if(r.nobracket===!0||!L().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(hc("closing","]"));k=`\\${k}`}else ve("brackets");O({type:"bracket",value:k});continue}if(k==="]"){if(r.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){O({type:"text",value:k,output:`\\${k}`});continue}if(P.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(hc("opening","["));O({type:"text",value:k,output:`\\${k}`});continue}Q("brackets");let z=I.value.slice(1);if(I.posix!==!0&&z[0]==="^"&&!z.includes("/")&&(k=`/${k}`),I.value+=k,H({value:k}),r.literalBrackets===!1||dn.hasRegexChars(z))continue;let ne=dn.escapeRegex(I.value);if(P.output=P.output.slice(0,-I.value.length),r.literalBrackets===!0){P.output+=ne,I.value=ne;continue}I.value=`(${a}${ne}|${I.value})`,P.output+=I.value;continue}if(k==="{"&&r.nobrace!==!0){ve("braces");let z={type:"brace",value:k,output:"(",outputIndex:P.output.length,tokensIndex:P.tokens.length};Y.push(z),O(z);continue}if(k==="}"){let z=Y[Y.length-1];if(r.nobrace===!0||!z){O({type:"text",value:k,output:k});continue}let ne=")";if(z.dots===!0){let ie=o.slice(),ae=[];for(let le=ie.length-1;le>=0&&(o.pop(),ie[le].type!=="brace");le--)ie[le].type!=="dots"&&ae.unshift(ie[le].value);ne=TQ(ae,r),P.backtrack=!0}if(z.comma!==!0&&z.dots!==!0){let ie=P.output.slice(0,z.outputIndex),ae=P.tokens.slice(z.tokensIndex);z.value=z.output="\\{",k=ne="\\}",P.output=ie;for(let le of ae)P.output+=le.output||le.value}O({type:"brace",value:k,output:ne}),Q("braces"),Y.pop();continue}if(k==="|"){j.length>0&&j[j.length-1].conditions++,O({type:"text",value:k});continue}if(k===","){let z=k,ne=Y[Y.length-1];ne&&J[J.length-1]==="braces"&&(ne.comma=!0,z="|"),O({type:"comma",value:k,output:z});continue}if(k==="/"){if(I.type==="dot"&&P.index===P.start+1){P.start=P.index+1,P.consumed="",P.output="",o.pop(),I=s;continue}O({type:"slash",value:k,output:h});continue}if(k==="."){if(P.braces>0&&I.type==="dot"){I.value==="."&&(I.output=p);let z=Y[Y.length-1];I.type="dots",I.output+=k,I.value+=k,z.dots=!0;continue}if(P.braces+P.parens===0&&I.type!=="bos"&&I.type!=="slash"){O({type:"text",value:k,output:p});continue}O({type:"dot",value:k,output:p});continue}if(k==="?"){if(!(I&&I.value==="(")&&r.noextglob!==!0&&M()==="("&&M(2)!=="?"){ee("qmark",k);continue}if(I&&I.type==="paren"){let ne=M(),ie=k;if(ne==="<"&&!dn.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(I.value==="("&&!/[!=<:]/.test(ne)||ne==="<"&&!/<([!=]|\w+>)/.test(L()))&&(ie=`\\${k}`),O({type:"text",value:k,output:ie});continue}if(r.dot!==!0&&(I.type==="slash"||I.type==="bos")){O({type:"qmark",value:k,output:x});continue}O({type:"qmark",value:k,output:C});continue}if(k==="!"){if(r.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){ee("negate",k);continue}if(r.nonegate!==!0&&P.index===0){re();continue}}if(k==="+"){if(r.noextglob!==!0&&M()==="("&&M(2)!=="?"){ee("plus",k);continue}if(I&&I.value==="("||r.regex===!1){O({type:"plus",value:k,output:d});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||P.parens>0){O({type:"plus",value:k});continue}O({type:"plus",value:d});continue}if(k==="@"){if(r.noextglob!==!0&&M()==="("&&M(2)!=="?"){O({type:"at",extglob:!0,value:k,output:""});continue}O({type:"text",value:k});continue}if(k!=="*"){(k==="$"||k==="^")&&(k=`\\${k}`);let z=wQ.exec(L());z&&(k+=z[0],P.index+=z[0].length),O({type:"text",value:k});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=k,I.output=A,P.backtrack=!0,P.globstar=!0,$(k);continue}let K=L();if(r.noextglob!==!0&&/^\([^?]/.test(K)){ee("star",k);continue}if(I.type==="star"){if(r.noglobstar===!0){$(k);continue}let z=I.prev,ne=z.prev,ie=z.type==="slash"||z.type==="bos",ae=ne&&(ne.type==="star"||ne.type==="globstar");if(r.bash===!0&&(!ie||K[0]&&K[0]!=="/")){O({type:"star",value:k,output:""});continue}let le=P.braces>0&&(z.type==="comma"||z.type==="brace"),Fe=j.length&&(z.type==="pipe"||z.type==="paren");if(!ie&&z.type!=="paren"&&!le&&!Fe){O({type:"star",value:k,output:""});continue}for(;K.slice(0,3)==="/**";){let As=e[P.index+4];if(As&&As!=="/")break;K=K.slice(3),$("/**",3)}if(z.type==="bos"&&B()){I.type="globstar",I.value+=k,I.output=S(r),P.output=I.output,P.globstar=!0,$(k);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&!ae&&B()){P.output=P.output.slice(0,-(z.output+I.output).length),z.output=`(?:${z.output}`,I.type="globstar",I.output=S(r)+(r.strictSlashes?")":"|$)"),I.value+=k,P.globstar=!0,P.output+=z.output+I.output,$(k);continue}if(z.type==="slash"&&z.prev.type!=="bos"&&K[0]==="/"){let As=K[1]!==void 0?"|$":"";P.output=P.output.slice(0,-(z.output+I.output).length),z.output=`(?:${z.output}`,I.type="globstar",I.output=`${S(r)}${h}|${h}${As})`,I.value+=k,P.output+=z.output+I.output,P.globstar=!0,$(k+X()),O({type:"slash",value:"/",output:""});continue}if(z.type==="bos"&&K[0]==="/"){I.type="globstar",I.value+=k,I.output=`(?:^|${h}|${S(r)}${h})`,P.output=I.output,P.globstar=!0,$(k+X()),O({type:"slash",value:"/",output:""});continue}P.output=P.output.slice(0,-I.output.length),I.type="globstar",I.output=S(r),I.value+=k,P.output+=I.output,P.globstar=!0,$(k);continue}let oe={type:"star",value:k,output:A};if(r.bash===!0){oe.output=".*?",(I.type==="bos"||I.type==="slash")&&(oe.output=T+oe.output),O(oe);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===!0){oe.output=k,O(oe);continue}(P.index===P.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(P.output+=b,I.output+=b):r.dot===!0?(P.output+=v,I.output+=v):(P.output+=T,I.output+=T),M()!=="*"&&(P.output+=m,I.output+=m)),O(oe)}for(;P.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(hc("closing","]"));P.output=dn.escapeLast(P.output,"["),Q("brackets")}for(;P.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(hc("closing",")"));P.output=dn.escapeLast(P.output,"("),Q("parens")}for(;P.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(hc("closing","}"));P.output=dn.escapeLast(P.output,"{"),Q("braces")}if(r.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&O({type:"maybe_slash",value:"",output:`${h}?`}),P.backtrack===!0){P.output="";for(let K of P.tokens)P.output+=K.output!=null?K.output:K.value,K.suffix&&(P.output+=K.suffix)}return P};sv.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(rm,r.maxLength):rm,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=Vk[e]||e;let s=dn.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=tm.globChars(s),g=r.dot?p:l,y=r.dot?d:l,b=r.capture?"":"?:",v={negated:!1,prefix:""},C=r.bash===!0?".*?":h;r.capture&&(C=`(${C})`);let x=T=>T.noglobstar===!0?C:`(${b}(?:(?!${m}${T.dot?u:o}).)*?)`,D=T=>{switch(T){case"*":return`${g}${c}${C}`;case".*":return`${o}${c}${C}`;case"*.*":return`${g}${C}${o}${c}${C}`;case"*/*":return`${g}${C}${a}${c}${y}${C}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${C}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${C}${o}${c}${C}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${C}`;default:{let F=/^(.*?)\.(\w+)$/.exec(T);if(!F)return;let A=D(F[1]);return A?A+o+F[2]:void 0}}},E=dn.removePrefix(e,v),S=D(E);return S&&r.strictSlashes!==!0&&(S+=`${a}?`),S};Wk.exports=sv});var Xk=w((JIe,Jk)=>{"use strict";f();var AQ=require("path"),PQ=Kk(),ov=Yk(),av=Sl(),FQ=wl(),_Q=e=>e&&typeof e=="object"&&!Array.isArray(e),Lt=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>Lt(d,t,r));return d=>{for(let h of l){let m=h(d);if(m)return m}return!1}}let n=_Q(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=t||{},s=av.isWindows(t),o=n?Lt.compileRe(e,t):Lt.makeRe(e,t,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};c=Lt(i.ignore,l,r)}let u=(l,p=!1)=>{let{isMatch:d,match:h,output:m}=Lt.test(l,o,t,{glob:e,posix:s}),g={glob:e,state:a,regex:o,posix:s,input:l,output:m,match:h,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(l)?(typeof i.onIgnore=="function"&&i.onIgnore(g),g.isMatch=!1,p?g:!1):(typeof i.onMatch=="function"&&i.onMatch(g),p?g:!0)};return r&&(u.state=a),u};Lt.test=(e,t,r,{glob:n,posix:i}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?av.toPosixSlashes:null),a=e===n,c=a&&o?o(e):e;return a===!1&&(c=o?o(e):e,a=c===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Lt.matchBase(e,t,r,i):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};Lt.matchBase=(e,t,r,n=av.isWindows(r))=>(t instanceof RegExp?t:Lt.makeRe(t,r)).test(AQ.basename(e));Lt.isMatch=(e,t,r)=>Lt(t,r)(e);Lt.parse=(e,t)=>Array.isArray(e)?e.map(r=>Lt.parse(r,t)):ov(e,{...t,fastpaths:!1});Lt.scan=(e,t)=>PQ(e,t);Lt.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let i=t||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${e.output})${o}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let c=Lt.toRegex(a,t);return n===!0&&(c.state=e),c};Lt.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(i.output=ov.fastpaths(e,t)),i.output||(i=ov(e,t)),Lt.compileRe(i,t,r,n)};Lt.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};Lt.constants=FQ;Jk.exports=Lt});var Zk=w((QIe,Qk)=>{"use strict";f();Qk.exports=Xk()});var nm=w((eke,i2)=>{"use strict";f();var t2=require("util"),r2=Nk(),Ri=Zk(),cv=Sl(),e2=e=>e===""||e==="./",n2=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},Ct=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=Ri(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let h of e){let m=p(h,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),i.add(m.output)))}}let u=(o===t.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&u.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return u};Ct.match=Ct;Ct.matcher=(e,t)=>Ri(e,t);Ct.isMatch=(e,t,r)=>Ri(t,r)(e);Ct.any=Ct.isMatch;Ct.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=new Set(Ct(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};Ct.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${t2.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>Ct.contains(e,n,r));if(typeof t=="string"){if(e2(e)||e2(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return Ct.isMatch(e,t,{...r,contains:!0})};Ct.matchKeys=(e,t,r)=>{if(!cv.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=Ct(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};Ct.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ri(String(i),r);if(n.some(o=>s(o)))return!0}return!1};Ct.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ri(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};Ct.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${t2.inspect(e)}"`);return[].concat(t).every(n=>Ri(n,r)(e))};Ct.capture=(e,t,r)=>{let n=cv.isWindows(r),s=Ri.makeRe(String(e),{...r,capture:!0}).exec(n?cv.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};Ct.makeRe=(...e)=>Ri.makeRe(...e);Ct.scan=(...e)=>Ri.scan(...e);Ct.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of r2(String(n),t))r.push(Ri.parse(i,t));return r};Ct.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!n2(e)?[e]:r2(e,t)};Ct.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return Ct.braces(e,{...t,expand:!0})};Ct.hasBraces=n2;i2.exports=Ct});var m2=w(be=>{"use strict";f();Object.defineProperty(be,"__esModule",{value:!0});be.isAbsolute=be.partitionAbsoluteAndRelative=be.removeDuplicateSlashes=be.matchAny=be.convertPatternsToRe=be.makeRe=be.getPatternParts=be.expandBraceExpansion=be.expandPatternsWithBraceExpansion=be.isAffectDepthOfReadingPattern=be.endsWithSlashGlobStar=be.hasGlobStar=be.getBaseDirectory=be.isPatternRelatedToParentDirectory=be.getPatternsOutsideCurrentDirectory=be.getPatternsInsideCurrentDirectory=be.getPositivePatterns=be.getNegativePatterns=be.isPositivePattern=be.isNegativePattern=be.convertToNegativePattern=be.convertToPositivePattern=be.isDynamicPattern=be.isStaticPattern=void 0;var s2=require("path"),IQ=XI(),uv=nm(),o2="**",kQ="\\",NQ=/[*?]|^!/,RQ=/\[[^[]*]/,OQ=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,BQ=/[!*+?@]\([^(]*\)/,MQ=/,|\.\./,LQ=/(?!^)\/{2,}/g;function a2(e,t={}){return!c2(e,t)}be.isStaticPattern=a2;function c2(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(kQ)||NQ.test(e)||RQ.test(e)||OQ.test(e)||t.extglob!==!1&&BQ.test(e)||t.braceExpansion!==!1&&$Q(e))}be.isDynamicPattern=c2;function $Q(e){let t=e.indexOf("{");if(t===-1)return!1;let r=e.indexOf("}",t+1);if(r===-1)return!1;let n=e.slice(t,r);return MQ.test(n)}function UQ(e){return im(e)?e.slice(1):e}be.convertToPositivePattern=UQ;function jQ(e){return"!"+e}be.convertToNegativePattern=jQ;function im(e){return e.startsWith("!")&&e[1]!=="("}be.isNegativePattern=im;function u2(e){return!im(e)}be.isPositivePattern=u2;function qQ(e){return e.filter(im)}be.getNegativePatterns=qQ;function GQ(e){return e.filter(u2)}be.getPositivePatterns=GQ;function zQ(e){return e.filter(t=>!lv(t))}be.getPatternsInsideCurrentDirectory=zQ;function HQ(e){return e.filter(lv)}be.getPatternsOutsideCurrentDirectory=HQ;function lv(e){return e.startsWith("..")||e.startsWith("./..")}be.isPatternRelatedToParentDirectory=lv;function KQ(e){return IQ(e,{flipBackslashes:!1})}be.getBaseDirectory=KQ;function VQ(e){return e.includes(o2)}be.hasGlobStar=VQ;function l2(e){return e.endsWith("/"+o2)}be.endsWithSlashGlobStar=l2;function WQ(e){let t=s2.basename(e);return l2(e)||a2(t)}be.isAffectDepthOfReadingPattern=WQ;function YQ(e){return e.reduce((t,r)=>t.concat(p2(r)),[])}be.expandPatternsWithBraceExpansion=YQ;function p2(e){let t=uv.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}be.expandBraceExpansion=p2;function JQ(e,t){let{parts:r}=uv.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return r.length===0&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}be.getPatternParts=JQ;function d2(e,t){return uv.makeRe(e,t)}be.makeRe=d2;function XQ(e,t){return e.map(r=>d2(r,t))}be.convertPatternsToRe=XQ;function QQ(e,t){return t.some(r=>r.test(e))}be.matchAny=QQ;function ZQ(e){return e.replace(LQ,"/")}be.removeDuplicateSlashes=ZQ;function eZ(e){let t=[],r=[];for(let n of e)f2(n)?t.push(n):r.push(n);return[t,r]}be.partitionAbsoluteAndRelative=eZ;function f2(e){return s2.isAbsolute(e)}be.isAbsolute=f2});var b2=w((ike,y2)=>{"use strict";f();var tZ=require("stream"),h2=tZ.PassThrough,rZ=Array.prototype.slice;y2.exports=nZ;function nZ(){let e=[],t=rZ.call(arguments),r=!1,n=t[t.length-1];n&&!Array.isArray(n)&&n.pipe==null?t.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=h2(n);function a(){for(let l=0,p=arguments.length;l<p;l++)e.push(g2(arguments[l],n));return c(),this}function c(){if(r)return;r=!0;let l=e.shift();if(!l){process.nextTick(u);return}Array.isArray(l)||(l=[l]);let p=l.length+1;function d(){--p>0||(r=!1,c())}function h(m){function g(){m.removeListener("merge2UnpipeEnd",g),m.removeListener("end",g),s&&m.removeListener("error",y),d()}function y(b){o.emit("error",b)}if(m._readableState.endEmitted)return d();m.on("merge2UnpipeEnd",g),m.on("end",g),s&&m.on("error",y),m.pipe(o,{end:!1}),m.resume()}for(let m=0;m<l.length;m++)h(l[m]);d()}function u(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(l){l.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),o}function g2(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=g2(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(h2(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var v2=w(sm=>{"use strict";f();Object.defineProperty(sm,"__esModule",{value:!0});sm.merge=void 0;var iZ=b2();function sZ(e){let t=iZ(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>x2(e)),t.once("end",()=>x2(e)),t}sm.merge=sZ;function x2(e){e.forEach(t=>t.emit("close"))}});var D2=w(gc=>{"use strict";f();Object.defineProperty(gc,"__esModule",{value:!0});gc.isEmpty=gc.isString=void 0;function oZ(e){return typeof e=="string"}gc.isString=oZ;function aZ(e){return e===""}gc.isEmpty=aZ});var ms=w(vr=>{"use strict";f();Object.defineProperty(vr,"__esModule",{value:!0});vr.string=vr.stream=vr.pattern=vr.path=vr.fs=vr.errno=vr.array=void 0;var cZ=LI();vr.array=cZ;var uZ=$I();vr.errno=uZ;var lZ=UI();vr.fs=lZ;var pZ=zI();vr.path=pZ;var dZ=m2();vr.pattern=dZ;var fZ=v2();vr.stream=fZ;var mZ=D2();vr.string=mZ});var S2=w(Dr=>{"use strict";f();Object.defineProperty(Dr,"__esModule",{value:!0});Dr.convertPatternGroupToTask=Dr.convertPatternGroupsToTasks=Dr.groupPatternsByBaseDirectory=Dr.getNegativePatternsAsPositive=Dr.getPositivePatterns=Dr.convertPatternsToTasks=Dr.generate=void 0;var ii=ms();function hZ(e,t){let r=C2(e,t),n=C2(t.ignore,t),i=E2(r),s=w2(r,n),o=i.filter(l=>ii.pattern.isStaticPattern(l,t)),a=i.filter(l=>ii.pattern.isDynamicPattern(l,t)),c=pv(o,s,!1),u=pv(a,s,!0);return c.concat(u)}Dr.generate=hZ;function C2(e,t){let r=e;return t.braceExpansion&&(r=ii.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>ii.pattern.removeDuplicateSlashes(n))}function pv(e,t,r){let n=[],i=ii.pattern.getPatternsOutsideCurrentDirectory(e),s=ii.pattern.getPatternsInsideCurrentDirectory(e),o=dv(i),a=dv(s);return n.push(...fv(o,t,r)),"."in a?n.push(mv(".",s,t,r)):n.push(...fv(a,t,r)),n}Dr.convertPatternsToTasks=pv;function E2(e){return ii.pattern.getPositivePatterns(e)}Dr.getPositivePatterns=E2;function w2(e,t){return ii.pattern.getNegativePatterns(e).concat(t).map(ii.pattern.convertToPositivePattern)}Dr.getNegativePatternsAsPositive=w2;function dv(e){let t={};return e.reduce((r,n)=>{let i=ii.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},t)}Dr.groupPatternsByBaseDirectory=dv;function fv(e,t,r){return Object.keys(e).map(n=>mv(n,e[n],t,r))}Dr.convertPatternGroupsToTasks=fv;function mv(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(ii.pattern.convertToNegativePattern))}}Dr.convertPatternGroupToTask=mv});var A2=w(om=>{"use strict";f();Object.defineProperty(om,"__esModule",{value:!0});om.read=void 0;function gZ(e,t,r){t.fs.lstat(e,(n,i)=>{if(n!==null){T2(r,n);return}if(!i.isSymbolicLink()||!t.followSymbolicLink){hv(r,i);return}t.fs.stat(e,(s,o)=>{if(s!==null){if(t.throwErrorOnBrokenSymbolicLink){T2(r,s);return}hv(r,i);return}t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),hv(r,o)})})}om.read=gZ;function T2(e,t){e(t)}function hv(e,t){e(null,t)}});var P2=w(am=>{"use strict";f();Object.defineProperty(am,"__esModule",{value:!0});am.read=void 0;function yZ(e,t){let r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw n}}am.read=yZ});var F2=w(Gs=>{"use strict";f();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.createFileSystemAdapter=Gs.FILE_SYSTEM_ADAPTER=void 0;var cm=require("fs");Gs.FILE_SYSTEM_ADAPTER={lstat:cm.lstat,stat:cm.stat,lstatSync:cm.lstatSync,statSync:cm.statSync};function bZ(e){return e===void 0?Gs.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Gs.FILE_SYSTEM_ADAPTER),e)}Gs.createFileSystemAdapter=bZ});var _2=w(yv=>{"use strict";f();Object.defineProperty(yv,"__esModule",{value:!0});var xZ=F2(),gv=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=xZ.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,r){return t??r}};yv.default=gv});var zo=w(zs=>{"use strict";f();Object.defineProperty(zs,"__esModule",{value:!0});zs.statSync=zs.stat=zs.Settings=void 0;var I2=A2(),vZ=P2(),bv=_2();zs.Settings=bv.default;function DZ(e,t,r){if(typeof t=="function"){I2.read(e,xv(),t);return}I2.read(e,xv(t),r)}zs.stat=DZ;function CZ(e,t){let r=xv(t);return vZ.read(e,r)}zs.statSync=CZ;function xv(e={}){return e instanceof bv.default?e:new bv.default(e)}});var R2=w((wke,N2)=>{f();var k2;N2.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(k2||(k2=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var B2=w((Tke,O2)=>{f();O2.exports=wZ;var EZ=R2();function wZ(e,t){let r,n,i,s=!0;Array.isArray(e)?(r=[],n=e.length):(i=Object.keys(e),r={},n=i.length);function o(c){function u(){t&&t(c,r),t=null}s?EZ(u):u()}function a(c,u,l){r[c]=l,(--n===0||u)&&o(u)}n?i?i.forEach(function(c){e[c](function(u,l){a(c,u,l)})}):e.forEach(function(c,u){c(function(l,p){a(u,l,p)})}):o(null),s=!1}});var vv=w(lm=>{"use strict";f();Object.defineProperty(lm,"__esModule",{value:!0});lm.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var um=process.versions.node.split(".");if(um[0]===void 0||um[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var M2=Number.parseInt(um[0],10),SZ=Number.parseInt(um[1],10),L2=10,TZ=10,AZ=M2>L2,PZ=M2===L2&&SZ>=TZ;lm.IS_SUPPORT_READDIR_WITH_FILE_TYPES=AZ||PZ});var $2=w(pm=>{"use strict";f();Object.defineProperty(pm,"__esModule",{value:!0});pm.createDirentFromStats=void 0;var Dv=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function FZ(e,t){return new Dv(e,t)}pm.createDirentFromStats=FZ});var Cv=w(dm=>{"use strict";f();Object.defineProperty(dm,"__esModule",{value:!0});dm.fs=void 0;var _Z=$2();dm.fs=_Z});var Ev=w(fm=>{"use strict";f();Object.defineProperty(fm,"__esModule",{value:!0});fm.joinPathSegments=void 0;function IZ(e,t,r){return e.endsWith(r)?e+t:e+r+t}fm.joinPathSegments=IZ});var H2=w(Hs=>{"use strict";f();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.readdir=Hs.readdirWithFileTypes=Hs.read=void 0;var kZ=zo(),U2=B2(),NZ=vv(),j2=Cv(),q2=Ev();function RZ(e,t,r){if(!t.stats&&NZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES){G2(e,t,r);return}z2(e,t,r)}Hs.read=RZ;function G2(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,i)=>{if(n!==null){mm(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:q2.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){wv(r,s);return}let o=s.map(a=>OZ(a,t));U2(o,(a,c)=>{if(a!==null){mm(r,a);return}wv(r,c)})})}Hs.readdirWithFileTypes=G2;function OZ(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,(n,i)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,e);return}e.dirent=j2.fs.createDirentFromStats(e.name,i),r(null,e)})}}function z2(e,t,r){t.fs.readdir(e,(n,i)=>{if(n!==null){mm(r,n);return}let s=i.map(o=>{let a=q2.joinPathSegments(e,o,t.pathSegmentSeparator);return c=>{kZ.stat(a,t.fsStatSettings,(u,l)=>{if(u!==null){c(u);return}let p={name:o,path:a,dirent:j2.fs.createDirentFromStats(o,l)};t.stats&&(p.stats=l),c(null,p)})}});U2(s,(o,a)=>{if(o!==null){mm(r,o);return}wv(r,a)})})}Hs.readdir=z2;function mm(e,t){e(t)}function wv(e,t){e(null,t)}});var J2=w(Ks=>{"use strict";f();Object.defineProperty(Ks,"__esModule",{value:!0});Ks.readdir=Ks.readdirWithFileTypes=Ks.read=void 0;var BZ=zo(),MZ=vv(),K2=Cv(),V2=Ev();function LZ(e,t){return!t.stats&&MZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES?W2(e,t):Y2(e,t)}Ks.read=LZ;function W2(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:V2.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let s=t.fs.statSync(i.path);i.dirent=K2.fs.createDirentFromStats(i.name,s)}catch(s){if(t.throwErrorOnBrokenSymbolicLink)throw s}return i})}Ks.readdirWithFileTypes=W2;function Y2(e,t){return t.fs.readdirSync(e).map(n=>{let i=V2.joinPathSegments(e,n,t.pathSegmentSeparator),s=BZ.statSync(i,t.fsStatSettings),o={name:n,path:i,dirent:K2.fs.createDirentFromStats(n,s)};return t.stats&&(o.stats=s),o})}Ks.readdir=Y2});var X2=w(Vs=>{"use strict";f();Object.defineProperty(Vs,"__esModule",{value:!0});Vs.createFileSystemAdapter=Vs.FILE_SYSTEM_ADAPTER=void 0;var yc=require("fs");Vs.FILE_SYSTEM_ADAPTER={lstat:yc.lstat,stat:yc.stat,lstatSync:yc.lstatSync,statSync:yc.statSync,readdir:yc.readdir,readdirSync:yc.readdirSync};function $Z(e){return e===void 0?Vs.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Vs.FILE_SYSTEM_ADAPTER),e)}Vs.createFileSystemAdapter=$Z});var Q2=w(Tv=>{"use strict";f();Object.defineProperty(Tv,"__esModule",{value:!0});var UZ=require("path"),jZ=zo(),qZ=X2(),Sv=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=qZ.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,UZ.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new jZ.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Tv.default=Sv});var hm=w(Ws=>{"use strict";f();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.Settings=Ws.scandirSync=Ws.scandir=void 0;var Z2=H2(),GZ=J2(),Av=Q2();Ws.Settings=Av.default;function zZ(e,t,r){if(typeof t=="function"){Z2.read(e,Pv(),t);return}Z2.read(e,Pv(t),r)}Ws.scandir=zZ;function HZ(e,t){let r=Pv(t);return GZ.read(e,r)}Ws.scandirSync=HZ;function Pv(e={}){return e instanceof Av.default?e:new Av.default(e)}});var tN=w((Kke,eN)=>{"use strict";f();function KZ(e){var t=new e,r=t;function n(){var s=t;return s.next?t=s.next:(t=new e,r=t),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}eN.exports=KZ});var nN=w((Wke,Fv)=>{"use strict";f();var VZ=tN();function rN(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=VZ(WZ),i=null,s=null,o=0,a=null,c={push:g,drain:Fn,saturated:Fn,pause:l,paused:!1,get concurrency(){return r},set concurrency(D){if(!(D>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=D,!c.paused)for(;i&&o<r;)o++,b()},running:u,resume:h,idle:m,length:p,getQueue:d,unshift:y,empty:Fn,kill:v,killAndDrain:C,error:x};return c;function u(){return o}function l(){c.paused=!0}function p(){for(var D=i,E=0;D;)D=D.next,E++;return E}function d(){for(var D=i,E=[];D;)E.push(D.value),D=D.next;return E}function h(){if(c.paused){if(c.paused=!1,i===null){o++,b();return}for(;i&&o<r;)o++,b()}}function m(){return o===0&&c.length()===0}function g(D,E){var S=n.get();S.context=e,S.release=b,S.value=D,S.callback=E||Fn,S.errorHandler=a,o>=r||c.paused?s?(s.next=S,s=S):(i=S,s=S,c.saturated()):(o++,t.call(e,S.value,S.worked))}function y(D,E){var S=n.get();S.context=e,S.release=b,S.value=D,S.callback=E||Fn,S.errorHandler=a,o>=r||c.paused?i?(S.next=i,i=S):(i=S,s=S,c.saturated()):(o++,t.call(e,S.value,S.worked))}function b(D){D&&n.release(D);var E=i;E&&o<=r?c.paused?o--:(s===i&&(s=null),i=E.next,E.next=null,t.call(e,E.value,E.worked),s===null&&c.empty()):--o===0&&c.drain()}function v(){i=null,s=null,c.drain=Fn}function C(){i=null,s=null,c.drain(),c.drain=Fn}function x(D){a=D}}function Fn(){}function WZ(){this.value=null,this.callback=Fn,this.next=null,this.release=Fn,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,n){var i=e.callback,s=e.errorHandler,o=e.value;e.value=null,e.callback=Fn,e.errorHandler&&s(r,o),i.call(e.context,r,n),e.release(e)}}function YZ(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(l,p){t.call(this,l).then(function(d){p(null,d)},p)}var i=rN(e,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=u,i;function a(l){var p=new Promise(function(d,h){s(l,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Fn),p}function c(l){var p=new Promise(function(d,h){o(l,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Fn),p}function u(){var l=new Promise(function(p){process.nextTick(function(){if(i.idle())p();else{var d=i.drain;i.drain=function(){typeof d=="function"&&d(),p(),i.drain=d}}})});return l}}Fv.exports=rN;Fv.exports.promise=YZ});var gm=w(Oi=>{"use strict";f();Object.defineProperty(Oi,"__esModule",{value:!0});Oi.joinPathSegments=Oi.replacePathSegmentSeparator=Oi.isAppliedFilter=Oi.isFatalError=void 0;function JZ(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Oi.isFatalError=JZ;function XZ(e,t){return e===null||e(t)}Oi.isAppliedFilter=XZ;function QZ(e,t){return e.split(/[/\\]/).join(t)}Oi.replacePathSegmentSeparator=QZ;function ZZ(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Oi.joinPathSegments=ZZ});var kv=w(Iv=>{"use strict";f();Object.defineProperty(Iv,"__esModule",{value:!0});var eee=gm(),_v=class{constructor(t,r){this._root=t,this._settings=r,this._root=eee.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Iv.default=_v});var Ov=w(Rv=>{"use strict";f();Object.defineProperty(Rv,"__esModule",{value:!0});var tee=require("events"),ree=hm(),nee=nN(),ym=gm(),iee=kv(),Nv=class extends iee.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=ree.scandir,this._emitter=new tee.EventEmitter,this._queue=nee(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){let n={directory:t,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,t.base);r(null,void 0)})}_handleError(t){this._isDestroyed||!ym.isFatalError(this._settings,t)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError)return;let n=t.path;r!==void 0&&(t.path=ym.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),ym.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&ym.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Rv.default=Nv});var iN=w(Mv=>{"use strict";f();Object.defineProperty(Mv,"__esModule",{value:!0});var see=Ov(),Bv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new see.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{oee(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{aee(t,this._storage)}),this._reader.read()}};Mv.default=Bv;function oee(e,t){e(t)}function aee(e,t){e(null,t)}});var sN=w($v=>{"use strict";f();Object.defineProperty($v,"__esModule",{value:!0});var cee=require("stream"),uee=Ov(),Lv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new uee.default(this._root,this._settings),this._stream=new cee.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};$v.default=Lv});var oN=w(jv=>{"use strict";f();Object.defineProperty(jv,"__esModule",{value:!0});var lee=hm(),bm=gm(),pee=kv(),Uv=class extends pee.default{constructor(){super(...arguments),this._scandir=lee.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(let t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,r){try{let n=this._scandir(t,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(t){if(bm.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=bm.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),bm.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&bm.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};jv.default=Uv});var aN=w(Gv=>{"use strict";f();Object.defineProperty(Gv,"__esModule",{value:!0});var dee=oN(),qv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new dee.default(this._root,this._settings)}read(){return this._reader.read()}};Gv.default=qv});var cN=w(Hv=>{"use strict";f();Object.defineProperty(Hv,"__esModule",{value:!0});var fee=require("path"),mee=hm(),zv=class{constructor(t={}){this._options=t,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,fee.sep),this.fsScandirSettings=new mee.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Hv.default=zv});var vm=w(Bi=>{"use strict";f();Object.defineProperty(Bi,"__esModule",{value:!0});Bi.Settings=Bi.walkStream=Bi.walkSync=Bi.walk=void 0;var uN=iN(),hee=sN(),gee=aN(),Kv=cN();Bi.Settings=Kv.default;function yee(e,t,r){if(typeof t=="function"){new uN.default(e,xm()).read(t);return}new uN.default(e,xm(t)).read(r)}Bi.walk=yee;function bee(e,t){let r=xm(t);return new gee.default(e,r).read()}Bi.walkSync=bee;function xee(e,t){let r=xm(t);return new hee.default(e,r).read()}Bi.walkStream=xee;function xm(e={}){return e instanceof Kv.default?e:new Kv.default(e)}});var Dm=w(Wv=>{"use strict";f();Object.defineProperty(Wv,"__esModule",{value:!0});var vee=require("path"),Dee=zo(),lN=ms(),Vv=class{constructor(t){this._settings=t,this._fsStatSettings=new Dee.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return vee.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:lN.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!lN.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};Wv.default=Vv});var Xv=w(Jv=>{"use strict";f();Object.defineProperty(Jv,"__esModule",{value:!0});var Cee=require("stream"),Eee=zo(),wee=vm(),See=Dm(),Yv=class extends See.default{constructor(){super(...arguments),this._walkStream=wee.walkStream,this._stat=Eee.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),i=new Cee.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],t[s],r).then(c=>{c!==null&&r.entryFilter(c)&&i.push(c),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(t,r,n){return this._getStat(t).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(t){return new Promise((r,n)=>{this._stat(t,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};Jv.default=Yv});var pN=w(Zv=>{"use strict";f();Object.defineProperty(Zv,"__esModule",{value:!0});var Tee=vm(),Aee=Dm(),Pee=Xv(),Qv=class extends Aee.default{constructor(){super(...arguments),this._walkAsync=Tee.walk,this._readerStream=new Pee.default(this._settings)}dynamic(t,r){return new Promise((n,i)=>{this._walkAsync(t,r,(s,o)=>{s===null?n(o):i(s)})})}async static(t,r){let n=[],i=this._readerStream.static(t,r);return new Promise((s,o)=>{i.once("error",o),i.on("data",a=>n.push(a)),i.once("end",()=>s(n))})}};Zv.default=Qv});var dN=w(tD=>{"use strict";f();Object.defineProperty(tD,"__esModule",{value:!0});var Al=ms(),eD=class{constructor(t,r,n){this._patterns=t,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let t of this._patterns){let r=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:t,segments:r,sections:n})}}_getPatternSegments(t){return Al.pattern.getPatternParts(t,this._micromatchOptions).map(n=>Al.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Al.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return Al.array.splitWhen(t,r=>r.dynamic&&Al.pattern.hasGlobStar(r.pattern))}};tD.default=eD});var fN=w(nD=>{"use strict";f();Object.defineProperty(nD,"__esModule",{value:!0});var Fee=dN(),rD=class extends Fee.default{match(t){let r=t.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((c,u)=>{let l=s.segments[u];return!!(l.dynamic&&l.patternRe.test(c)||!l.dynamic&&l.pattern===c)}))return!0}return!1}};nD.default=rD});var mN=w(sD=>{"use strict";f();Object.defineProperty(sD,"__esModule",{value:!0});var Cm=ms(),_ee=fN(),iD=class{constructor(t,r){this._settings=t,this._micromatchOptions=r}getFilter(t,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(t,o,i,s)}_getMatcher(t){return new _ee.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Cm.pattern.isAffectDepthOfReadingPattern);return Cm.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,i){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=Cm.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(t,r){return this._settings.deep===1/0?!1:this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){let n=r.split("/").length;if(t==="")return n;let i=t.split("/").length;return n-i}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!Cm.pattern.matchAny(t,r)}};sD.default=iD});var hN=w(aD=>{"use strict";f();Object.defineProperty(aD,"__esModule",{value:!0});var Ys=ms(),oD=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let[n,i]=Ys.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:Ys.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:Ys.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:Ys.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(t,r){let n=Ys.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(t)||this._onlyDirectoryFilter(t))return!1;let i=this._isMatchToPatternsSet(n,r,t.dirent.isDirectory());return this._settings.unique&&i&&this._createIndexRecord(n),i}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isMatchToPatternsSet(t,r,n){return!(!this._isMatchToPatterns(t,r.positive.all,n)||this._isMatchToPatterns(t,r.negative.relative,n)||this._isMatchToAbsoluteNegative(t,r.negative.absolute,n))}_isMatchToAbsoluteNegative(t,r,n){if(r.length===0)return!1;let i=Ys.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(t,r,n){if(r.length===0)return!1;let i=Ys.pattern.matchAny(t,r);return!i&&n?Ys.pattern.matchAny(t+"/",r):i}};aD.default=oD});var gN=w(uD=>{"use strict";f();Object.defineProperty(uD,"__esModule",{value:!0});var Iee=ms(),cD=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return Iee.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};uD.default=cD});var bN=w(pD=>{"use strict";f();Object.defineProperty(pD,"__esModule",{value:!0});var yN=ms(),lD=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=yN.path.makeAbsolute(this._settings.cwd,r),r=yN.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};pD.default=lD});var Em=w(fD=>{"use strict";f();Object.defineProperty(fD,"__esModule",{value:!0});var kee=require("path"),Nee=mN(),Ree=hN(),Oee=gN(),Bee=bN(),dD=class{constructor(t){this._settings=t,this.errorFilter=new Oee.default(this._settings),this.entryFilter=new Ree.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Nee.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Bee.default(this._settings)}_getRootDirectory(t){return kee.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){let r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};fD.default=dD});var xN=w(hD=>{"use strict";f();Object.defineProperty(hD,"__esModule",{value:!0});var Mee=pN(),Lee=Em(),mD=class extends Lee.default{constructor(){super(...arguments),this._reader=new Mee.default(this._settings)}async read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(r,t,n)).map(s=>n.transform(s))}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};hD.default=mD});var vN=w(yD=>{"use strict";f();Object.defineProperty(yD,"__esModule",{value:!0});var $ee=require("stream"),Uee=Xv(),jee=Em(),gD=class extends jee.default{constructor(){super(...arguments),this._reader=new Uee.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),i=this.api(r,t,n),s=new $ee.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};yD.default=gD});var DN=w(xD=>{"use strict";f();Object.defineProperty(xD,"__esModule",{value:!0});var qee=zo(),Gee=vm(),zee=Dm(),bD=class extends zee.default{constructor(){super(...arguments),this._walkSync=Gee.walkSync,this._statSync=qee.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){let n=[];for(let i of t){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(t,r,n){try{let i=this._getStat(t);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(t){return this._statSync(t,this._fsStatSettings)}};xD.default=bD});var CN=w(DD=>{"use strict";f();Object.defineProperty(DD,"__esModule",{value:!0});var Hee=DN(),Kee=Em(),vD=class extends Kee.default{constructor(){super(...arguments),this._reader=new Hee.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(r,t,n).map(n.transform)}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};DD.default=vD});var EN=w(xc=>{"use strict";f();Object.defineProperty(xc,"__esModule",{value:!0});xc.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var bc=require("fs"),Vee=require("os"),Wee=Math.max(Vee.cpus().length,1);xc.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:bc.lstat,lstatSync:bc.lstatSync,stat:bc.stat,statSync:bc.statSync,readdir:bc.readdir,readdirSync:bc.readdirSync};var CD=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Wee),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===void 0?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},xc.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};xc.default=CD});var TD=w((z2e,SN)=>{"use strict";f();var wN=S2(),Yee=xN(),Jee=vN(),Xee=CN(),ED=EN(),_n=ms();async function wD(e,t){si(e);let r=SD(e,Yee.default,t),n=await Promise.all(r);return _n.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(u,l){si(u);let p=SD(u,Xee.default,l);return _n.array.flatten(p)}e.sync=t;function r(u,l){si(u);let p=SD(u,Jee.default,l);return _n.stream.merge(p)}e.stream=r;function n(u,l){si(u);let p=[].concat(u),d=new ED.default(l);return wN.generate(p,d)}e.generateTasks=n;function i(u,l){si(u);let p=new ED.default(l);return _n.pattern.isDynamicPattern(u,p)}e.isDynamicPattern=i;function s(u){return si(u),_n.path.escape(u)}e.escapePath=s;function o(u){return si(u),_n.path.convertPathToPattern(u)}e.convertPathToPattern=o;let a;(function(u){function l(d){return si(d),_n.path.escapePosixPath(d)}u.escapePath=l;function p(d){return si(d),_n.path.convertPosixPathToPattern(d)}u.convertPathToPattern=p})(a=e.posix||(e.posix={}));let c;(function(u){function l(d){return si(d),_n.path.escapeWindowsPath(d)}u.escapePath=l;function p(d){return si(d),_n.path.convertWindowsPathToPattern(d)}u.convertPathToPattern=p})(c=e.win32||(e.win32={}))})(wD||(wD={}));function SD(e,t,r){let n=[].concat(e),i=new ED.default(r),s=wN.generate(n,i),o=new t(i);return s.map(o.read,o)}function si(e){if(![].concat(e).every(n=>_n.string.isString(n)&&!_n.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}SN.exports=wD});var XR=w((zOe,JR)=>{"use strict";f();var YR=require("child_process"),KR=YR.spawn,Ute=YR.exec;JR.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":Ute("taskkill /pid "+e+" /T /F",r);break;case"darwin":e0(e,n,i,function(s){return KR("pgrep",["-P",s])},function(){VR(n,t,r)});break;default:e0(e,n,i,function(s){return KR("ps",["-o","pid","--no-headers","--ppid",s])},function(){VR(n,t,r)});break}};function VR(e,t,r){var n={};try{Object.keys(e).forEach(function(i){e[i].forEach(function(s){n[s]||(WR(s,t),n[s]=1)}),n[i]||(WR(i,t),n[i]=1)})}catch(i){if(r)return r(i);throw i}if(r)return r()}function WR(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function e0(e,t,r,n,i){var s=n(e),o="";s.stdout.on("data",function(u){var u=u.toString("ascii");o+=u});var a=function(c){if(delete r[e],c!=0){Object.keys(r).length==0&&i();return}o.match(/\d+/g).forEach(function(u){u=parseInt(u,10),t[e].push(u),t[u]=[],r[u]=1,e0(u,t,r,n,i)})};s.on("close",a)}});var Bl=w(fn=>{"use strict";f();Object.defineProperty(fn,"__esModule",{value:!0});fn.isSSL=void 0;fn.setupOutgoing=zte;fn.setupSocket=Hte;fn.getPort=Kte;fn.hasEncryptedConnection=ZR;fn.urlJoin=eO;fn.rewriteCookieProperty=tO;fn.toURL=rO;var jte=require("tls"),qte=/(^|,)\s*upgrade\s*($|,)/i;fn.isSSL=/^https|wss/;var Gte="trailer";function zte(e,t,r,n){let i=t[n||"target"];e.port=+(i.port??(i.protocol!==void 0&&fn.isSSL.test(i.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=i[a];e.method=t.method||r.method,e.headers={...r.headers},t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(Gte==a.toLowerCase()){delete e.headers[a];break}t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),i.protocol!==void 0&&fn.isSSL.test(i.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!qte.test(e.headers.connection))&&(e.headers.connection="close"));let s=i&&t.prependPath!==!1&&"pathname"in i?QR(`${i.pathname}${i.search??""}`):"/",o=t.toProxy?r.url:QR(r.url);return o=t.ignorePath?"":o,e.path=eO(s,o??""),t.changeOrigin&&(e.headers.host=i.protocol!==void 0&&Wte(e.port,i.protocol)&&!Vte(e.host)?e.host+":"+e.port:e.host),e}function Hte(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function Kte(e){let t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:ZR(e)?"443":"80"}function ZR(e){let t=e.connection;return t instanceof jte.TLSSocket&&t.encrypted||!!t.pair}function eO(...e){let t=[],r="";e.forEach((i,s)=>{let o=i.indexOf("?");o!==-1&&(t.push(i.substring(o+1)),e[s]=i.substring(0,o))}),r=t.filter(Boolean).join("&");let n="";for(let i of e)i&&(n.endsWith("/")?i.startsWith("/")?n+=i.slice(1):n+=i:i.startsWith("/")?n+=i:n+="/"+i);return r?n+"?"+r:n}function tO(e,t,r){return Array.isArray(e)?e.map(n=>tO(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,i,s)=>{let o;if(s in t)o=t[s];else if("*"in t)o=t["*"];else return n;return o?i+o:""})}function Vte(e){return!!~e.indexOf(":")}function QR(e){if(e===""||e?.startsWith("?"))return e;let t=rO(e);return`${t.pathname??""}${t.search??""}`}function rO(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://dummy.org${e}`),new URL(e,"http://dummy.org"))}function Wte(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var cO=w(kr=>{"use strict";f();var Yte=kr&&kr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Jte=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Xte=kr&&kr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Yte(r,t,n[i]);return Jte(r,t),r}}();Object.defineProperty(kr,"__esModule",{value:!0});kr.OUTGOING_PASSES=void 0;kr.removeChunked=nO;kr.setConnection=iO;kr.setRedirectHostRewrite=sO;kr.writeHeaders=oO;kr.writeStatusCode=aO;var Nm=Xte(Bl()),Qte=/^201|30(1|2|7|8)$/;function nO(e,t,r){e.httpVersion==="1.0"&&delete r.headers["transfer-encoding"]}function iO(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function sO(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&Qte.test(`${r.statusCode}`)){let i=Nm.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let o=Nm.toURL(s);if(i.host!=o.host)return;n.hostRewrite?o.host=n.hostRewrite:n.autoRewrite&&(o.host=e.headers.host??""),n.protocolRewrite&&(o.protocol=n.protocolRewrite),r.headers.location=o.toString()}}function oO(e,t,r,n){let i=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,o=n.preserveHeaderKeyCase,a=(u,l)=>{l!=null&&(i&&u.toLowerCase()==="set-cookie"&&(l=Nm.rewriteCookieProperty(l,i,"domain")),s&&u.toLowerCase()==="set-cookie"&&(l=Nm.rewriteCookieProperty(l,s,"path")),t.setHeader(String(u).trim(),l))},c;if(o&&r.rawHeaders!=null){c={};for(let u=0;u<r.rawHeaders.length;u+=2){let l=r.rawHeaders[u];c[l.toLowerCase()]=l}}for(let u in r.headers){let l=u,p=r.headers[l];o&&c&&(l=c[l]??l),a(l,p)}}function aO(e,t,r){r.statusMessage?(t.statusCode=r.statusCode,t.statusMessage=r.statusMessage):t.statusCode=r.statusCode}kr.OUTGOING_PASSES={removeChunked:nO,setConnection:iO,setRedirectHostRewrite:sO,writeHeaders:oO,writeStatusCode:aO}});var t0=w((QOe,uO)=>{f();var Pc=1e3,Fc=Pc*60,_c=Fc*60,Yo=_c*24,Zte=Yo*7,ere=Yo*365.25;uO.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return tre(e);if(r==="number"&&isFinite(e))return t.long?nre(e):rre(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function tre(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ere;case"weeks":case"week":case"w":return r*Zte;case"days":case"day":case"d":return r*Yo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*_c;case"minutes":case"minute":case"mins":case"min":case"m":return r*Fc;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function rre(e){var t=Math.abs(e);return t>=Yo?Math.round(e/Yo)+"d":t>=_c?Math.round(e/_c)+"h":t>=Fc?Math.round(e/Fc)+"m":t>=Pc?Math.round(e/Pc)+"s":e+"ms"}function nre(e){var t=Math.abs(e);return t>=Yo?Rm(e,t,Yo,"day"):t>=_c?Rm(e,t,_c,"hour"):t>=Fc?Rm(e,t,Fc,"minute"):t>=Pc?Rm(e,t,Pc,"second"):e+" ms"}function Rm(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var r0=w((e8e,lO)=>{f();function ire(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=t0(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,h,m;function g(...y){if(!g.enabled)return;let b=g,v=Number(new Date),C=v-(p||v);b.diff=C,b.prev=p,b.curr=v,p=v,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let x=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(E,S)=>{if(E==="%%")return"%";x++;let T=r.formatters[S];if(typeof T=="function"){let F=y[x];E=T.call(b,F),y.splice(x,1),x--}return E}),r.formatArgs.call(b,y),(b.log||r.log).apply(b,y)}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,m=r.enabled(l)),m),set:y=>{d=y}}),typeof r.init=="function"&&r.init(g),g}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,h=0,m=-1,g=0;for(;d<l.length;)if(h<p.length&&(p[h]===l[d]||p[h]==="*"))p[h]==="*"?(m=h,g=d,h++):(d++,h++);else if(m!==-1)h=m+1,g++,d=g;else return!1;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function o(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}lO.exports=ire});var pO=w((mn,Om)=>{f();mn.formatArgs=ore;mn.save=are;mn.load=cre;mn.useColors=sre;mn.storage=ure();mn.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();mn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function sre(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ore(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Om.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),e.splice(n,0,t)}mn.log=console.debug||console.log||(()=>{});function are(e){try{e?mn.storage.setItem("debug",e):mn.storage.removeItem("debug")}catch{}}function cre(){let e;try{e=mn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ure(){try{return localStorage}catch{}}Om.exports=r0()(mn);var{formatters:lre}=Om.exports;lre.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var fO=w((n8e,dO)=>{"use strict";f();dO.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),i=t.indexOf("--");return n!==-1&&(i===-1||n<i)}});var gO=w((s8e,hO)=>{"use strict";f();var pre=require("os"),mO=require("tty"),Nn=fO(),{env:Qt}=process,Zs;Nn("no-color")||Nn("no-colors")||Nn("color=false")||Nn("color=never")?Zs=0:(Nn("color")||Nn("colors")||Nn("color=true")||Nn("color=always"))&&(Zs=1);"FORCE_COLOR"in Qt&&(Qt.FORCE_COLOR==="true"?Zs=1:Qt.FORCE_COLOR==="false"?Zs=0:Zs=Qt.FORCE_COLOR.length===0?1:Math.min(parseInt(Qt.FORCE_COLOR,10),3));function n0(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i0(e,t){if(Zs===0)return 0;if(Nn("color=16m")||Nn("color=full")||Nn("color=truecolor"))return 3;if(Nn("color=256"))return 2;if(e&&!t&&Zs===void 0)return 0;let r=Zs||0;if(Qt.TERM==="dumb")return r;if(process.platform==="win32"){let n=pre.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Qt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Qt)||Qt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Qt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Qt.TEAMCITY_VERSION)?1:0;if(Qt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Qt){let n=parseInt((Qt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Qt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Qt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Qt.TERM)||"COLORTERM"in Qt?1:r}function dre(e){let t=i0(e,e&&e.isTTY);return n0(t)}hO.exports={supportsColor:dre,stdout:n0(i0(!0,mO.isatty(1))),stderr:n0(i0(!0,mO.isatty(2)))}});var bO=w((Zt,Mm)=>{f();var fre=require("tty"),Bm=require("util");Zt.init=vre;Zt.log=yre;Zt.formatArgs=hre;Zt.save=bre;Zt.load=xre;Zt.useColors=mre;Zt.destroy=Bm.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Zt.colors=[6,2,3,4,5,1];try{let e=gO();e&&(e.stderr||e).level>=2&&(Zt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Zt.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function mre(){return"colors"in Zt.inspectOpts?!!Zt.inspectOpts.colors:fre.isatty(process.stderr.fd)}function hre(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
24
24
|
`).join(`
|
|
25
25
|
`+s),e.push(i+"m+"+Mm.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=gre()+t+" "+e[0]}function gre(){return Zt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function yre(...e){return process.stderr.write(Bm.formatWithOptions(Zt.inspectOpts,...e)+`
|
|
26
26
|
`)}function bre(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function xre(){return process.env.DEBUG}function vre(e){e.inspectOpts={};let t=Object.keys(Zt.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Zt.inspectOpts[t[r]]}Mm.exports=r0()(Zt);var{formatters:yO}=Mm.exports;yO.o=function(e){return this.inspectOpts.colors=this.useColors,Bm.inspect(e,this.inspectOpts).split(`
|
|
27
|
-
`).map(t=>t.trim()).join(" ")};yO.O=function(e){return this.inspectOpts.colors=this.useColors,Bm.inspect(e,this.inspectOpts)}});var Lm=w((c8e,s0)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?s0.exports=pO():s0.exports=bO()});var vO=w((l8e,xO)=>{f();var Ml;xO.exports=function(){if(!Ml){try{Ml=Lm()("follow-redirects")}catch{}typeof Ml!="function"&&(Ml=function(){})}Ml.apply(null,arguments)}});var SO=w((d8e,y0)=>{f();var $l=require("url"),Ll=$l.URL,Dre=require("http"),Cre=require("https"),l0=require("stream").Writable,p0=require("assert"),DO=vO();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Xo(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var d0=!1;try{p0(new Ll(""))}catch(e){d0=e.code==="ERR_INVALID_URL"}var Ere=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],f0=["abort","aborted","connect","error","socket","timeout"],m0=Object.create(null);f0.forEach(function(e){m0[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var a0=Ul("ERR_INVALID_URL","Invalid URL",TypeError),c0=Ul("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),wre=Ul("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",c0),Sre=Ul("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Tre=Ul("ERR_STREAM_WRITE_AFTER_END","write after end"),Are=l0.prototype.destroy||EO;function Yr(e,t){l0.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof c0?i:new c0({cause:i}))}},this._performRequest()}Yr.prototype=Object.create(l0.prototype);Yr.prototype.abort=function(){g0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Yr.prototype.destroy=function(e){return g0(this._currentRequest,e),Are.call(this,e),this};Yr.prototype.write=function(e,t,r){if(this._ending)throw new Tre;if(!Jo(e)&&!_re(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Xo(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Sre),this.abort())};Yr.prototype.end=function(e,t,r){if(Xo(e)?(r=e,e=t=null):Xo(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(e,t,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Yr.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Yr.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Yr.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Yr.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Yr.prototype,e,{get:function(){return this._currentRequest[e]}})});Yr.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Yr.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of f0)n.on(i,m0[i]);if(this._currentUrl=/^\//.test(this._options.path)?$l.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function c(u){if(n===o._currentRequest)if(u)o.emit("error",u);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,c)}else o._ended&&n.end()})()}};Yr.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(g0(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new wre;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],o0(/^content-/i,this._options.headers));var o=o0(/^host$/i,this._options.headers),a=h0(this._currentUrl),c=o||a.host,u=/^\w+:/.test(r)?this._currentUrl:$l.format(Object.assign(a,{host:c})),l=Pre(r,u);if(DO("redirecting to",l.href),this._isRedirect=!0,u0(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==c&&!Fre(l.host,c))&&o0(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Xo(i)){var p={headers:e.headers,statusCode:t},d={url:u,method:s,headers:n};i(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function CO(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var i=n+":",s=r[i]=e[n],o=t[n]=Object.create(s);function a(u,l,p){return Ire(u)?u=u0(u):Jo(u)?u=u0(h0(u)):(p=l,l=wO(u),u={protocol:i}),Xo(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},u,l),l.nativeProtocols=r,!Jo(l.host)&&!Jo(l.hostname)&&(l.hostname="::1"),p0.equal(l.protocol,i,"protocol mismatch"),DO("options",l),new Yr(l,p)}function c(u,l,p){var d=o.request(u,l,p);return d.end(),d}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function EO(){}function h0(e){var t;if(d0)t=new Ll(e);else if(t=wO($l.parse(e)),!Jo(t.protocol))throw new a0({input:e});return t}function Pre(e,t){return d0?new Ll(e,t):h0($l.resolve(t,e))}function wO(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new a0({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new a0({input:e.href||e});return e}function u0(e,t){var r=t||{};for(var n of Ere)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function o0(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Ul(e,t,r){function n(i){Xo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function g0(e,t){for(var r of f0)e.removeListener(r,m0[r]);e.on("error",EO),e.destroy(t)}function Fre(e,t){p0(Jo(e)&&Jo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Jo(e){return typeof e=="string"||e instanceof String}function Xo(e){return typeof e=="function"}function _re(e){return typeof e=="object"&&"length"in e}function Ire(e){return Ll&&e instanceof Ll}y0.exports=CO({http:Dre,https:Cre});y0.exports.wrap=CO});var _O=w(Jr=>{"use strict";f();var kre=Jr&&Jr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Nre=Jr&&Jr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Um=Jr&&Jr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&kre(r,t,n[i]);return Nre(r,t),r}}();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.WEB_PASSES=void 0;Jr.deleteLength=TO;Jr.timeout=AO;Jr.XHeaders=PO;Jr.stream=FO;var Rre=Um(require("http")),Ore=Um(require("https")),Bre=cO(),$m=Um(Bl()),Mre=Um(SO()),Lre=Object.values(Bre.OUTGOING_PASSES),$re={http:Rre,https:Ore};function TO(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function AO(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function PO(e,t,r){if(!r.xfwd)return;let n=$m.hasEncryptedConnection(e),i={for:e.connection.remoteAddress||e.socket.remoteAddress,port:$m.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+i[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||""}function FO(e,t,r,n,i,s){i.emit("start",e,t,r.target||r.forward);let o=r.followRedirects?Mre:$re,a=o.http,c=o.https;if(r.forward){let m=r.forward.protocol==="https:"?c:a,g=$m.setupOutgoing(r.ssl||{},r,e,"forward"),y=m.request(g),b=h(y,r.forward);if(e.on("error",b),y.on("error",b),(r.buffer||e).pipe(y),!r.target)return t.end()}let u=r.target.protocol==="https:"?c:a,l=$m.setupOutgoing(r.ssl||{},r,e),p=u.request(l);p.on("socket",m=>{i&&!p.getHeader("expect")&&i.emit("proxyReq",p,e,t,r,m)}),r.proxyTimeout&&p.setTimeout(r.proxyTimeout,()=>{p.destroy()}),t.on("close",()=>{!t.writableFinished&&p.destroy()});let d=h(p,r.target);e.on("error",d),p.on("error",d);function h(m,g){return y=>{if(e.socket.destroyed&&y.code==="ECONNRESET"){i.emit("econnreset",y,e,t,g),m.destroy();return}s?s(y,e,t,g):i.emit("error",y,e,t,g)}}(r.buffer||e).pipe(p),p.on("response",m=>{if(i?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let g of Lre)g(e,t,m,r);t.finished?i?.emit("end",e,t,m):(m.on("end",()=>{i?.emit("end",e,t,m)}),r.selfHandleResponse||m.pipe(t))})}Jr.WEB_PASSES={deleteLength:TO,timeout:AO,XHeaders:PO,stream:FO}});var D0=w(Er=>{"use strict";f();var Ure=Er&&Er.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jre=Er&&Er.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v0=Er&&Er.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Ure(r,t,n[i]);return jre(r,t),r}}(),qre=Er&&Er.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Er,"__esModule",{value:!0});Er.WS_PASSES=void 0;Er.numOpenSockets=Kre;Er.checkMethodAndHeader=kO;Er.XHeaders=NO;Er.stream=RO;var Gre=v0(require("http")),zre=v0(require("https")),Ic=v0(Bl()),Hre=qre(Lm()),jl=(0,Hre.default)("http-proxy-3:ws-incoming");function IO(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),jl("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var b0=IO("socket"),x0=IO("proxySocket");function Kre(){return b0()+x0()}function kO(e,t){if(jl("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function NO(e,t,r){if(!r.xfwd)return;jl("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Ic.getPort(e),proto:Ic.hasEncryptedConnection(e)?"wss":"ws"};for(let i of["for","port","proto"])e.headers["x-forwarded-"+i]=(e.headers["x-forwarded-"+i]||"")+(e.headers["x-forwarded-"+i]?",":"")+n[i]}function RO(e,t,r,n,i,s){jl("websocket: new stream");let o=[];b0({add:t});let a=()=>{for(let h of o)h.end()};t.on("close",()=>{b0({rm:t}),a()}),t.on("error",a);let c=(h,m)=>Object.keys(m).reduce((g,y)=>{let b=m[y];if(!Array.isArray(b))return g.push(y+": "+b),g;for(let v=0;v<b.length;v++)g.push(y+": "+b[v]);return g},[h]).join(`\r
|
|
27
|
+
`).map(t=>t.trim()).join(" ")};yO.O=function(e){return this.inspectOpts.colors=this.useColors,Bm.inspect(e,this.inspectOpts)}});var Lm=w((c8e,s0)=>{f();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?s0.exports=pO():s0.exports=bO()});var vO=w((l8e,xO)=>{f();var Ml;xO.exports=function(){if(!Ml){try{Ml=Lm()("follow-redirects")}catch{}typeof Ml!="function"&&(Ml=function(){})}Ml.apply(null,arguments)}});var SO=w((d8e,y0)=>{f();var $l=require("url"),Ll=$l.URL,Dre=require("http"),Cre=require("https"),l0=require("stream").Writable,p0=require("assert"),DO=vO();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",n=Xo(Error.captureStackTrace);!t&&(r||!n)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var d0=!1;try{p0(new Ll(""))}catch(e){d0=e.code==="ERR_INVALID_URL"}var Ere=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],f0=["abort","aborted","connect","error","socket","timeout"],m0=Object.create(null);f0.forEach(function(e){m0[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}});var a0=Ul("ERR_INVALID_URL","Invalid URL",TypeError),c0=Ul("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),wre=Ul("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",c0),Sre=Ul("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Tre=Ul("ERR_STREAM_WRITE_AFTER_END","write after end"),Are=l0.prototype.destroy||EO;function Yr(e,t){l0.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(n){try{r._processResponse(n)}catch(i){r.emit("error",i instanceof c0?i:new c0({cause:i}))}},this._performRequest()}Yr.prototype=Object.create(l0.prototype);Yr.prototype.abort=function(){g0(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Yr.prototype.destroy=function(e){return g0(this._currentRequest,e),Are.call(this,e),this};Yr.prototype.write=function(e,t,r){if(this._ending)throw new Tre;if(!Jo(e)&&!_re(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Xo(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new Sre),this.abort())};Yr.prototype.end=function(e,t,r){if(Xo(e)?(r=e,e=t=null):Xo(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var n=this,i=this._currentRequest;this.write(e,t,function(){n._ended=!0,i.end(null,null,r)}),this._ending=!0}};Yr.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Yr.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Yr.prototype.setTimeout=function(e,t){var r=this;function n(o){o.setTimeout(e),o.removeListener("timeout",o.destroy),o.addListener("timeout",o.destroy)}function i(o){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),n(o)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",i)}return t&&this.on("timeout",t),this.socket?i(this.socket):this._currentRequest.once("socket",i),this.on("socket",n),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Yr.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Yr.prototype,e,{get:function(){return this._currentRequest[e]}})});Yr.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Yr.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);n._redirectable=this;for(var i of f0)n.on(i,m0[i]);if(this._currentUrl=/^\//.test(this._options.path)?$l.format(this._options):this._options.path,this._isRedirect){var s=0,o=this,a=this._requestBodyBuffers;(function c(u){if(n===o._currentRequest)if(u)o.emit("error",u);else if(s<a.length){var l=a[s++];n.finished||n.write(l.data,l.encoding,c)}else o._ended&&n.end()})()}};Yr.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(g0(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new wre;var n,i=this._options.beforeRedirect;i&&(n=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],o0(/^content-/i,this._options.headers));var o=o0(/^host$/i,this._options.headers),a=h0(this._currentUrl),c=o||a.host,u=/^\w+:/.test(r)?this._currentUrl:$l.format(Object.assign(a,{host:c})),l=Pre(r,u);if(DO("redirecting to",l.href),this._isRedirect=!0,u0(l,this._options),(l.protocol!==a.protocol&&l.protocol!=="https:"||l.host!==c&&!Fre(l.host,c))&&o0(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Xo(i)){var p={headers:e.headers,statusCode:t},d={url:u,method:s,headers:n};i(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function CO(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(n){var i=n+":",s=r[i]=e[n],o=t[n]=Object.create(s);function a(u,l,p){return Ire(u)?u=u0(u):Jo(u)?u=u0(h0(u)):(p=l,l=wO(u),u={protocol:i}),Xo(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},u,l),l.nativeProtocols=r,!Jo(l.host)&&!Jo(l.hostname)&&(l.hostname="::1"),p0.equal(l.protocol,i,"protocol mismatch"),DO("options",l),new Yr(l,p)}function c(u,l,p){var d=o.request(u,l,p);return d.end(),d}Object.defineProperties(o,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function EO(){}function h0(e){var t;if(d0)t=new Ll(e);else if(t=wO($l.parse(e)),!Jo(t.protocol))throw new a0({input:e});return t}function Pre(e,t){return d0?new Ll(e,t):h0($l.resolve(t,e))}function wO(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new a0({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new a0({input:e.href||e});return e}function u0(e,t){var r=t||{};for(var n of Ere)r[n]=e[n];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function o0(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Ul(e,t,r){function n(i){Xo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,i||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return n.prototype=new(r||Error),Object.defineProperties(n.prototype,{constructor:{value:n,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),n}function g0(e,t){for(var r of f0)e.removeListener(r,m0[r]);e.on("error",EO),e.destroy(t)}function Fre(e,t){p0(Jo(e)&&Jo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Jo(e){return typeof e=="string"||e instanceof String}function Xo(e){return typeof e=="function"}function _re(e){return typeof e=="object"&&"length"in e}function Ire(e){return Ll&&e instanceof Ll}y0.exports=CO({http:Dre,https:Cre});y0.exports.wrap=CO});var _O=w(Jr=>{"use strict";f();var kre=Jr&&Jr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Nre=Jr&&Jr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Um=Jr&&Jr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&kre(r,t,n[i]);return Nre(r,t),r}}();Object.defineProperty(Jr,"__esModule",{value:!0});Jr.WEB_PASSES=void 0;Jr.deleteLength=TO;Jr.timeout=AO;Jr.XHeaders=PO;Jr.stream=FO;var Rre=Um(require("http")),Ore=Um(require("https")),Bre=cO(),$m=Um(Bl()),Mre=Um(SO()),Lre=Object.values(Bre.OUTGOING_PASSES),$re={http:Rre,https:Ore};function TO(e){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])}function AO(e,t,r){r.timeout&&e.socket.setTimeout(r.timeout)}function PO(e,t,r){if(!r.xfwd)return;let n=$m.hasEncryptedConnection(e),i={for:e.connection.remoteAddress||e.socket.remoteAddress,port:$m.getPort(e),proto:n?"https":"http"};for(let s of["for","port","proto"])e.headers["x-forwarded-"+s]=(e.headers["x-forwarded-"+s]||"")+(e.headers["x-forwarded-"+s]?",":"")+i[s];e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||""}function FO(e,t,r,n,i,s){i.emit("start",e,t,r.target||r.forward);let o=r.followRedirects?Mre:$re,a=o.http,c=o.https;if(r.forward){let m=r.forward.protocol==="https:"?c:a,g=$m.setupOutgoing(r.ssl||{},r,e,"forward"),y=m.request(g),b=h(y,r.forward);if(e.on("error",b),y.on("error",b),(r.buffer||e).pipe(y),!r.target)return t.end()}let u=r.target.protocol==="https:"?c:a,l=$m.setupOutgoing(r.ssl||{},r,e),p=u.request(l);p.on("socket",m=>{i&&!p.getHeader("expect")&&i.emit("proxyReq",p,e,t,r,m)}),r.proxyTimeout&&p.setTimeout(r.proxyTimeout,()=>{p.destroy()}),t.on("close",()=>{!t.writableFinished&&p.destroy()});let d=h(p,r.target);e.on("error",d),p.on("error",d);function h(m,g){return y=>{if(e.socket.destroyed&&y.code==="ECONNRESET"){i.emit("econnreset",y,e,t,g),m.destroy();return}s?s(y,e,t,g):i.emit("error",y,e,t,g)}}(r.buffer||e).pipe(p),p.on("response",m=>{if(i?.emit("proxyRes",m,e,t),!t.headersSent&&!r.selfHandleResponse)for(let g of Lre)g(e,t,m,r);t.finished?i?.emit("end",e,t,m):(m.on("end",()=>{i?.emit("end",e,t,m)}),r.selfHandleResponse||m.pipe(t))})}Jr.WEB_PASSES={deleteLength:TO,timeout:AO,XHeaders:PO,stream:FO}});var D0=w(Cr=>{"use strict";f();var Ure=Cr&&Cr.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jre=Cr&&Cr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),v0=Cr&&Cr.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Ure(r,t,n[i]);return jre(r,t),r}}(),qre=Cr&&Cr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cr,"__esModule",{value:!0});Cr.WS_PASSES=void 0;Cr.numOpenSockets=Kre;Cr.checkMethodAndHeader=kO;Cr.XHeaders=NO;Cr.stream=RO;var Gre=v0(require("http")),zre=v0(require("https")),Ic=v0(Bl()),Hre=qre(Lm()),jl=(0,Hre.default)("http-proxy-3:ws-incoming");function IO(e){let t=new Set;return({add:r,rm:n}={})=>(r&&(r.id||(r.id=Math.random()),t.has(r.id)||t.add(r.id)),n&&(n.id||(n.id=Math.random()),t.has(n.id)&&t.delete(n.id)),jl("socket counter:",{[e]:t.size},r?"add":n?"rm":""),t.size)}var b0=IO("socket"),x0=IO("proxySocket");function Kre(){return b0()+x0()}function kO(e,t){if(jl("websocket: checkMethodAndHeader"),e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0}function NO(e,t,r){if(!r.xfwd)return;jl("websocket: XHeaders");let n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Ic.getPort(e),proto:Ic.hasEncryptedConnection(e)?"wss":"ws"};for(let i of["for","port","proto"])e.headers["x-forwarded-"+i]=(e.headers["x-forwarded-"+i]||"")+(e.headers["x-forwarded-"+i]?",":"")+n[i]}function RO(e,t,r,n,i,s){jl("websocket: new stream");let o=[];b0({add:t});let a=()=>{for(let h of o)h.end()};t.on("close",()=>{b0({rm:t}),a()}),t.on("error",a);let c=(h,m)=>Object.keys(m).reduce((g,y)=>{let b=m[y];if(!Array.isArray(b))return g.push(y+": "+b),g;for(let v=0;v<b.length;v++)g.push(y+": "+b[v]);return g},[h]).join(`\r
|
|
28
28
|
`)+`\r
|
|
29
29
|
\r
|
|
30
|
-
`;Ic.setupSocket(t),n&&n.length&&t.unshift(n);let u=Ic.isSSL.test(r.target.protocol)?zre:Gre,l=Ic.setupOutgoing(r.ssl||{},r,e),p=u.request(l);i&&i.emit("proxyReqWs",p,e,t,r,n),p.on("error",d),p.on("upgrade",(h,m,g)=>{jl("upgrade"),x0({add:m}),o.push(m),m.on("close",()=>{x0({rm:m})}),m.on("error",d),m.on("end",()=>{i.emit("close",h,m,g)}),m.on("close",()=>{t.end()}),Ic.setupSocket(m),g&&g.length&&m.unshift(g),t.write(c("HTTP/1.1 101 Switching Protocols",h.headers)),m.pipe(t).pipe(m),i.emit("open",m)});function d(h){s?s(h,e,t):i.emit("error",h,e,t),t.destroySoon()}p.end()}Er.WS_PASSES={checkMethodAndHeader:kO,XHeaders:NO,stream:RO}});var BO=w(Rn=>{"use strict";f();var Vre=Rn&&Rn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Wre=Rn&&Rn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),OO=Rn&&Rn.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Vre(r,t,n[i]);return Wre(r,t),r}}(),Yre=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ProxyServer=void 0;var Jre=OO(require("http")),Xre=OO(require("https")),Qre=_O(),Zre=D0(),ene=require("events"),tne=Yre(Lm()),rne=Bl(),jm=(0,tne.default)("http-proxy-3"),C0=class e extends ene.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(jm("createRightProxy",{type:r}),n=>(...i)=>{let s=i[0];jm("proxy: ",{type:r,path:s.url});let o=i[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&o.on("error",d=>{this.emit("error",d,s,o)});let c=i.length-1,u,l;typeof i[c]=="function"&&(l=i[c],c--);let p;!(i[c]instanceof Buffer)&&i[c]!==o?(p={...n,...i[c]},c--):p={...n},i[c]instanceof Buffer&&(u=i[c]);for(let d of["target","forward"])typeof p[d]=="string"&&(p[d]=(0,rne.toURL)(p[d]));if(!p.target&&!p.forward){this.emit("error",new Error("Must set target or forward"),s,o);return}for(let d of a)if(d(s,o,p,u,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{jm("listen",{port:r,hostname:n});let i=(s,o)=>{this.web(s,o)};return this._server=this.options.ssl?Xre.createServer(this.options.ssl,i):Jre.createServer(i),this.options.ws&&this._server.on("upgrade",(s,o,a)=>{this.ws(s,o,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,i)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,o=!1;if(s.forEach((a,c)=>{a.name===n&&(o=c)}),o===!1)throw new Error("No such pass");s.splice(o,0,i)},this.after=(r,n,i)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,o=!1;if(s.forEach((a,c)=>{a.name===n&&(o=c)}),o===!1)throw new Error("No such pass");s.splice(o++,0,i)},jm("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(Qre.WEB_PASSES),this.wsPasses=Object.values(Zre.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};Rn.ProxyServer=C0});var MO=w(Mi=>{"use strict";f();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.numOpenSockets=Mi.ProxyServer=void 0;Mi.createProxyServer=w0;Mi.createServer=w0;Mi.createProxy=w0;var E0=BO();Object.defineProperty(Mi,"ProxyServer",{enumerable:!0,get:function(){return E0.ProxyServer}});var nne=D0();Object.defineProperty(Mi,"numOpenSockets",{enumerable:!0,get:function(){return nne.numOpenSockets}});function w0(e={}){return new E0.ProxyServer(e)}Mi.default=E0.ProxyServer});var UO=w(S0=>{"use strict";f();S0.parse=lne;S0.serialize=pne;var ine=Object.prototype.toString,sne=Object.prototype.hasOwnProperty,one=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,ane=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,cne=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,une=/^[\u0020-\u003A\u003D-\u007E]*$/;function lne(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var i=t&&t.decode||dne,s=0,o=0,a=0;do{if(o=e.indexOf("=",s),o===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(o>a){s=e.lastIndexOf(";",o-1)+1;continue}var c=LO(e,s,o),u=$O(e,o,c),l=e.slice(c,u);if(!sne.call(r,l)){var p=LO(e,o+1,a),d=$O(e,a,p);e.charCodeAt(p)===34&&e.charCodeAt(d-1)===34&&(p++,d--);var h=e.slice(p,d);r[l]=mne(h,i)}s=a+1}while(s<n);return r}function LO(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function $O(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function pne(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!one.test(e))throw new TypeError("argument name is invalid");var i=n(t);if(!ane.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(!r)return s;if(r.maxAge!=null){var o=Math.floor(r.maxAge);if(!isFinite(o))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+o}if(r.domain){if(!cne.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!une.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!fne(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var c=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(c){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var u=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(u){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function dne(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function fne(e){return ine.call(e)==="[object Date]"}function mne(e,t){try{return t(e)}catch{return e}}});var T0=w(qm=>{f();var qO=require("crypto");qm.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+qO.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};qm.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=qm.sign(r,t);return jO(n)==jO(e)?r:!1};function jO(e){return qO.createHash("sha1").update(e).digest("hex")}});var KO=w((T8e,kc)=>{"use strict";f();var hne=UO(),gne=T0();kc.exports=yne;kc.exports.JSONCookie=GO;kc.exports.JSONCookies=A0;kc.exports.signedCookie=zO;kc.exports.signedCookies=HO;function yne(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(i,s,o){if(i.cookies)return o();var a=i.headers.cookie;if(i.secret=r[0],i.cookies=Object.create(null),i.signedCookies=Object.create(null),!a)return o();i.cookies=hne.parse(a,t),r.length!==0&&(i.signedCookies=HO(i.cookies,r),i.signedCookies=A0(i.signedCookies)),i.cookies=A0(i.cookies),o()}}function GO(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function A0(e){for(var t=Object.keys(e),r,n,i=0;i<t.length;i++)r=t[i],n=GO(e[r]),n&&(e[r]=n);return e}function zO(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var i=gne.unsign(e.slice(2),r[n]);if(i!==!1)return i}return!1}}function HO(e,t){for(var r=Object.keys(e),n,i,s=Object.create(null),o,a=0;a<r.length;a++)i=r[a],o=e[i],n=zO(o,t),o!==n&&(s[i]=n,delete e[i]);return s}});var c3=w(Lc=>{"use strict";f();Lc.__esModule=!0;Lc.distance=Lc.closest=void 0;var bs=new Uint32Array(65536),Uie=function(e,t){for(var r=e.length,n=t.length,i=1<<r-1,s=-1,o=0,a=r,c=r;c--;)bs[e.charCodeAt(c)]|=1<<c;for(c=0;c<n;c++){var u=bs[t.charCodeAt(c)],l=u|o;u|=(u&s)+s^s,o|=~(u|s),s&=u,o&i&&a++,s&i&&a--,o=o<<1|1,s=s<<1|~(l|o),o&=l}for(c=r;c--;)bs[e.charCodeAt(c)]=0;return a},jie=function(e,t){for(var r=t.length,n=e.length,i=[],s=[],o=Math.ceil(r/32),a=Math.ceil(n/32),c=0;c<o;c++)s[c]=-1,i[c]=0;for(var u=0;u<a-1;u++){for(var l=0,p=-1,d=u*32,h=Math.min(32,n)+d,m=d;m<h;m++)bs[e.charCodeAt(m)]|=1<<m;for(var c=0;c<r;c++){var g=bs[t.charCodeAt(c)],y=s[c/32|0]>>>c&1,b=i[c/32|0]>>>c&1,v=g|l,C=((g|b)&p)+p^p|g|b,x=l|~(C|p),D=p&C;x>>>31^y&&(s[c/32|0]^=1<<c),D>>>31^b&&(i[c/32|0]^=1<<c),x=x<<1|y,D=D<<1|b,p=D|~(v|x),l=x&v}for(var m=d;m<h;m++)bs[e.charCodeAt(m)]=0}for(var E=0,S=-1,T=u*32,F=Math.min(32,n-T)+T,m=T;m<F;m++)bs[e.charCodeAt(m)]|=1<<m;for(var A=n,c=0;c<r;c++){var g=bs[t.charCodeAt(c)],y=s[c/32|0]>>>c&1,b=i[c/32|0]>>>c&1,v=g|E,C=((g|b)&S)+S^S|g|b,x=E|~(C|S),D=S&C;A+=x>>>n-1&1,A-=D>>>n-1&1,x>>>31^y&&(s[c/32|0]^=1<<c),D>>>31^b&&(i[c/32|0]^=1<<c),x=x<<1|y,D=D<<1|b,S=D|~(v|x),E=x&v}for(var m=T;m<F;m++)bs[e.charCodeAt(m)]=0;return A},a3=function(e,t){if(e.length<t.length){var r=t;t=e,e=r}return t.length===0?e.length:e.length<=32?Uie(e,t):jie(e,t)};Lc.distance=a3;var qie=function(e,t){for(var r=1/0,n=0,i=0;i<t.length;i++){var s=a3(e,t[i]);s<r&&(r=s,n=i)}return t[n]};Lc.closest=qie});var Ui=w((LLe,D3)=>{f();var xse=require("path").relative;D3.exports=wse;var vse=process.cwd();function x3(e,t){for(var r=e.split(/[ ,]+/),n=String(t).toLowerCase(),i=0;i<r.length;i++){var s=r[i];if(s&&(s==="*"||s.toLowerCase()===n))return!0}return!1}function Dse(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t),i=n.value;return n.get=function(){return i},n.writable&&(n.set=function(o){return i=o}),delete n.value,delete n.writable,Object.defineProperty(e,t,n),n}function Cse(e){for(var t="",r=0;r<e;r++)t+=", arg"+r;return t.substr(2)}function Ese(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var r=0;r<e.length;r++)t+=`
|
|
30
|
+
`;Ic.setupSocket(t),n&&n.length&&t.unshift(n);let u=Ic.isSSL.test(r.target.protocol)?zre:Gre,l=Ic.setupOutgoing(r.ssl||{},r,e),p=u.request(l);i&&i.emit("proxyReqWs",p,e,t,r,n),p.on("error",d),p.on("upgrade",(h,m,g)=>{jl("upgrade"),x0({add:m}),o.push(m),m.on("close",()=>{x0({rm:m})}),m.on("error",d),m.on("end",()=>{i.emit("close",h,m,g)}),m.on("close",()=>{t.end()}),Ic.setupSocket(m),g&&g.length&&m.unshift(g),t.write(c("HTTP/1.1 101 Switching Protocols",h.headers)),m.pipe(t).pipe(m),i.emit("open",m)});function d(h){s?s(h,e,t):i.emit("error",h,e,t),t.destroySoon()}p.end()}Cr.WS_PASSES={checkMethodAndHeader:kO,XHeaders:NO,stream:RO}});var BO=w(Rn=>{"use strict";f();var Vre=Rn&&Rn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Wre=Rn&&Rn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),OO=Rn&&Rn.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&Vre(r,t,n[i]);return Wre(r,t),r}}(),Yre=Rn&&Rn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ProxyServer=void 0;var Jre=OO(require("http")),Xre=OO(require("https")),Qre=_O(),Zre=D0(),ene=require("events"),tne=Yre(Lm()),rne=Bl(),jm=(0,tne.default)("http-proxy-3"),C0=class e extends ene.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(jm("createRightProxy",{type:r}),n=>(...i)=>{let s=i[0];jm("proxy: ",{type:r,path:s.url});let o=i[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&o.on("error",d=>{this.emit("error",d,s,o)});let c=i.length-1,u,l;typeof i[c]=="function"&&(l=i[c],c--);let p;!(i[c]instanceof Buffer)&&i[c]!==o?(p={...n,...i[c]},c--):p={...n},i[c]instanceof Buffer&&(u=i[c]);for(let d of["target","forward"])typeof p[d]=="string"&&(p[d]=(0,rne.toURL)(p[d]));if(!p.target&&!p.forward){this.emit("error",new Error("Must set target or forward"),s,o);return}for(let d of a)if(d(s,o,p,u,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{jm("listen",{port:r,hostname:n});let i=(s,o)=>{this.web(s,o)};return this._server=this.options.ssl?Xre.createServer(this.options.ssl,i):Jre.createServer(i),this.options.ws&&this._server.on("upgrade",(s,o,a)=>{this.ws(s,o,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,i)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,o=!1;if(s.forEach((a,c)=>{a.name===n&&(o=c)}),o===!1)throw new Error("No such pass");s.splice(o,0,i)},this.after=(r,n,i)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,o=!1;if(s.forEach((a,c)=>{a.name===n&&(o=c)}),o===!1)throw new Error("No such pass");s.splice(o++,0,i)},jm("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(Qre.WEB_PASSES),this.wsPasses=Object.values(Zre.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};Rn.ProxyServer=C0});var MO=w(Mi=>{"use strict";f();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.numOpenSockets=Mi.ProxyServer=void 0;Mi.createProxyServer=w0;Mi.createServer=w0;Mi.createProxy=w0;var E0=BO();Object.defineProperty(Mi,"ProxyServer",{enumerable:!0,get:function(){return E0.ProxyServer}});var nne=D0();Object.defineProperty(Mi,"numOpenSockets",{enumerable:!0,get:function(){return nne.numOpenSockets}});function w0(e={}){return new E0.ProxyServer(e)}Mi.default=E0.ProxyServer});var UO=w(S0=>{"use strict";f();S0.parse=lne;S0.serialize=pne;var ine=Object.prototype.toString,sne=Object.prototype.hasOwnProperty,one=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,ane=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,cne=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,une=/^[\u0020-\u003A\u003D-\u007E]*$/;function lne(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var i=t&&t.decode||dne,s=0,o=0,a=0;do{if(o=e.indexOf("=",s),o===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(o>a){s=e.lastIndexOf(";",o-1)+1;continue}var c=LO(e,s,o),u=$O(e,o,c),l=e.slice(c,u);if(!sne.call(r,l)){var p=LO(e,o+1,a),d=$O(e,a,p);e.charCodeAt(p)===34&&e.charCodeAt(d-1)===34&&(p++,d--);var h=e.slice(p,d);r[l]=mne(h,i)}s=a+1}while(s<n);return r}function LO(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function $O(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function pne(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!one.test(e))throw new TypeError("argument name is invalid");var i=n(t);if(!ane.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(!r)return s;if(r.maxAge!=null){var o=Math.floor(r.maxAge);if(!isFinite(o))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+o}if(r.domain){if(!cne.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!une.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!fne(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var c=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(c){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var u=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(u){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function dne(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function fne(e){return ine.call(e)==="[object Date]"}function mne(e,t){try{return t(e)}catch{return e}}});var T0=w(qm=>{f();var qO=require("crypto");qm.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+qO.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};qm.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=qm.sign(r,t);return jO(n)==jO(e)?r:!1};function jO(e){return qO.createHash("sha1").update(e).digest("hex")}});var KO=w((T8e,kc)=>{"use strict";f();var hne=UO(),gne=T0();kc.exports=yne;kc.exports.JSONCookie=GO;kc.exports.JSONCookies=A0;kc.exports.signedCookie=zO;kc.exports.signedCookies=HO;function yne(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(i,s,o){if(i.cookies)return o();var a=i.headers.cookie;if(i.secret=r[0],i.cookies=Object.create(null),i.signedCookies=Object.create(null),!a)return o();i.cookies=hne.parse(a,t),r.length!==0&&(i.signedCookies=HO(i.cookies,r),i.signedCookies=A0(i.signedCookies)),i.cookies=A0(i.cookies),o()}}function GO(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function A0(e){for(var t=Object.keys(e),r,n,i=0;i<t.length;i++)r=t[i],n=GO(e[r]),n&&(e[r]=n);return e}function zO(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var i=gne.unsign(e.slice(2),r[n]);if(i!==!1)return i}return!1}}function HO(e,t){for(var r=Object.keys(e),n,i,s=Object.create(null),o,a=0;a<r.length;a++)i=r[a],o=e[i],n=zO(o,t),o!==n&&(s[i]=n,delete e[i]);return s}});var c3=w(Lc=>{"use strict";f();Lc.__esModule=!0;Lc.distance=Lc.closest=void 0;var bs=new Uint32Array(65536),Uie=function(e,t){for(var r=e.length,n=t.length,i=1<<r-1,s=-1,o=0,a=r,c=r;c--;)bs[e.charCodeAt(c)]|=1<<c;for(c=0;c<n;c++){var u=bs[t.charCodeAt(c)],l=u|o;u|=(u&s)+s^s,o|=~(u|s),s&=u,o&i&&a++,s&i&&a--,o=o<<1|1,s=s<<1|~(l|o),o&=l}for(c=r;c--;)bs[e.charCodeAt(c)]=0;return a},jie=function(e,t){for(var r=t.length,n=e.length,i=[],s=[],o=Math.ceil(r/32),a=Math.ceil(n/32),c=0;c<o;c++)s[c]=-1,i[c]=0;for(var u=0;u<a-1;u++){for(var l=0,p=-1,d=u*32,h=Math.min(32,n)+d,m=d;m<h;m++)bs[e.charCodeAt(m)]|=1<<m;for(var c=0;c<r;c++){var g=bs[t.charCodeAt(c)],y=s[c/32|0]>>>c&1,b=i[c/32|0]>>>c&1,v=g|l,C=((g|b)&p)+p^p|g|b,x=l|~(C|p),D=p&C;x>>>31^y&&(s[c/32|0]^=1<<c),D>>>31^b&&(i[c/32|0]^=1<<c),x=x<<1|y,D=D<<1|b,p=D|~(v|x),l=x&v}for(var m=d;m<h;m++)bs[e.charCodeAt(m)]=0}for(var E=0,S=-1,T=u*32,F=Math.min(32,n-T)+T,m=T;m<F;m++)bs[e.charCodeAt(m)]|=1<<m;for(var A=n,c=0;c<r;c++){var g=bs[t.charCodeAt(c)],y=s[c/32|0]>>>c&1,b=i[c/32|0]>>>c&1,v=g|E,C=((g|b)&S)+S^S|g|b,x=E|~(C|S),D=S&C;A+=x>>>n-1&1,A-=D>>>n-1&1,x>>>31^y&&(s[c/32|0]^=1<<c),D>>>31^b&&(i[c/32|0]^=1<<c),x=x<<1|y,D=D<<1|b,S=D|~(v|x),E=x&v}for(var m=T;m<F;m++)bs[e.charCodeAt(m)]=0;return A},a3=function(e,t){if(e.length<t.length){var r=t;t=e,e=r}return t.length===0?e.length:e.length<=32?Uie(e,t):jie(e,t)};Lc.distance=a3;var qie=function(e,t){for(var r=1/0,n=0,i=0;i<t.length;i++){var s=a3(e,t[i]);s<r&&(r=s,n=i)}return t[n]};Lc.closest=qie});var Ui=w((LLe,D3)=>{f();var xse=require("path").relative;D3.exports=wse;var vse=process.cwd();function x3(e,t){for(var r=e.split(/[ ,]+/),n=String(t).toLowerCase(),i=0;i<r.length;i++){var s=r[i];if(s&&(s==="*"||s.toLowerCase()===n))return!0}return!1}function Dse(e,t,r){var n=Object.getOwnPropertyDescriptor(e,t),i=n.value;return n.get=function(){return i},n.writable&&(n.set=function(o){return i=o}),delete n.value,delete n.writable,Object.defineProperty(e,t,n),n}function Cse(e){for(var t="",r=0;r<e;r++)t+=", arg"+r;return t.substr(2)}function Ese(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var r=0;r<e.length;r++)t+=`
|
|
31
31
|
at `+e[r].toString();return t}function wse(e){if(!e)throw new TypeError("argument namespace is required");var t=sh(),r=Uc(t[1]),n=r[0];function i(s){ih.call(i,s)}return i._file=n,i._ignored=Tse(e),i._namespace=e,i._traced=Ase(e),i._warned=Object.create(null),i.function=Ise,i.property=kse,i}function Sse(e,t){var r=typeof e.listenerCount!="function"?e.listeners(t).length:e.listenerCount(t);return r>0}function Tse(e){if(process.noDeprecation)return!0;var t=process.env.NO_DEPRECATION||"";return x3(t,e)}function Ase(e){if(process.traceDeprecation)return!0;var t=process.env.TRACE_DEPRECATION||"";return x3(t,e)}function ih(e,t){var r=Sse(process,"deprecation");if(!(!r&&this._ignored)){var n,i,s,o,a=0,c=!1,u=sh(),l=this._file;for(t?(o=t,s=Uc(u[1]),s.name=o.name,l=s[0]):(a=2,o=Uc(u[a]),s=o);a<u.length;a++)if(n=Uc(u[a]),i=n[0],i===l)c=!0;else if(i===this._file)l=this._file;else if(c)break;var p=n?o.join(":")+"__"+n.join(":"):void 0;if(!(p!==void 0&&p in this._warned)){this._warned[p]=!0;var d=e;if(d||(d=s===o||!s.name?b3(o):b3(s)),r){var h=v3(this._namespace,d,u.slice(a));process.emit("deprecation",h);return}var m=process.stderr.isTTY?Fse:Pse,g=m.call(this,d,n,u.slice(a));process.stderr.write(g+`
|
|
32
32
|
`,"utf8")}}}function Uc(e){var t=e.getFileName()||"<anonymous>",r=e.getLineNumber(),n=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var i=[t,r,n];return i.callSite=e,i.name=e.getFunctionName(),i}function b3(e){var t=e.callSite,r=e.name;r||(r="<anonymous@"+nC(e)+">");var n=t.getThis(),i=n&&t.getTypeName();return i==="Object"&&(i=void 0),i==="Function"&&(i=n.name||i),i&&t.getMethodName()?i+"."+r:r}function Pse(e,t,r){var n=new Date().toUTCString(),i=n+" "+this._namespace+" deprecated "+e;if(this._traced){for(var s=0;s<r.length;s++)i+=`
|
|
33
33
|
at `+r[s].toString();return i}return t&&(i+=" at "+nC(t)),i}function Fse(e,t,r){var n="\x1B[36;1m"+this._namespace+"\x1B[22;39m \x1B[33;1mdeprecated\x1B[22;39m \x1B[0m"+e+"\x1B[39m";if(this._traced){for(var i=0;i<r.length;i++)n+=`
|
|
@@ -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 xa(e,t,r,n,i){if(e.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,xa),e.emit("wsClientError",s,r,t)}else td(r,n,i)}});var j7=w((qUe,U7)=>{f();var Xw=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"}};U7.exports=Xw});var Zw=w((zUe,q7)=>{f();var Da=require("readline"),Qw=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&&Da.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,Da.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(Da.moveCursor(this.stream,0,-this.dy),Da.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&Da.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&Da.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&Da.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)}};q7.exports=Qw});var z7=w((KUe,G7)=>{"use strict";f();G7.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 K7=w((WUe,H7)=>{"use strict";f();var cbe=z7();H7.exports=e=>typeof e=="string"?e.replace(cbe(),""):e});var W7=w((JUe,eS)=>{"use strict";f();var V7=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);eS.exports=V7;eS.exports.default=V7});var J7=w((QUe,Y7)=>{"use strict";f();Y7.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 Q7=w((eje,tS)=>{"use strict";f();var ube=K7(),lbe=W7(),pbe=J7(),X7=e=>{if(typeof e!="string"||e.length===0||(e=ube(e),e.length===0))return 0;e=e.replace(pbe()," ");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+=lbe(n)?2:1)}return t};tS.exports=X7;tS.exports.default=X7});var rS=w((rje,Z7)=>{f();Z7.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 nS=w((ije,eU)=>{f();eU.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 iS=w((oje,tU)=>{f();tU.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 sS=w((cje,rU)=>{f();var dbe=Q7(),fbe=rS(),mbe=nS(),hbe=iS();rU.exports=function(t,r,n){let i=t.format,s=t.formatTime||hbe,o=t.formatValue||fbe,a=t.formatBar||mbe,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-dbe(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((lje,nU)=>{f();function lt(e,t){return typeof e>"u"||e===null?t:e}nU.exports={parse:function(t,r){let n={},i=Object.assign({},r,t);return n.throttleTime=1e3/lt(i.fps,10),n.stream=lt(i.stream,process.stderr),n.terminal=lt(i.terminal,null),n.clearOnComplete=lt(i.clearOnComplete,!1),n.stopOnComplete=lt(i.stopOnComplete,!1),n.barsize=lt(i.barsize,40),n.align=lt(i.align,"left"),n.hideCursor=lt(i.hideCursor,!1),n.linewrap=lt(i.linewrap,!1),n.barGlue=lt(i.barGlue,""),n.barCompleteChar=lt(i.barCompleteChar,"="),n.barIncompleteChar=lt(i.barIncompleteChar,"-"),n.format=lt(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=lt(i.formatTime,null),n.formatValue=lt(i.formatValue,null),n.formatBar=lt(i.formatBar,null),n.etaBufferLength=lt(i.etaBuffer,10),n.etaAsynchronousUpdate=lt(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=lt(i.progressCalculationRelative,!1),n.synchronousUpdate=lt(i.synchronousUpdate,!0),n.noTTYOutput=lt(i.noTTYOutput,!1),n.notTTYSchedule=lt(i.notTTYSchedule,2e3),n.emptyOnZero=lt(i.emptyOnZero,!1),n.forceRedraw=lt(i.forceRedraw,!1),n.autopadding=lt(i.autopadding,!1),n.gracefulExit=lt(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?lt(t.autopaddingChar," "):"",t}}});var oS=w((fje,sU)=>{f();var iU=j7(),gbe=Zw(),ybe=sS(),bbe=Tg(),xbe=require("events");sU.exports=class extends xbe{constructor(t){super(),this.options=bbe.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new gbe(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 iU(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:ybe}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 iU(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 aU=w((gje,oU)=>{f();var vbe=oS(),Dbe=Tg();oU.exports=class extends vbe{constructor(t,r){super(Dbe.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 uU=w((xje,cU)=>{f();var Cbe=Zw(),Ebe=oS(),wbe=Tg(),Sbe=require("events");cU.exports=class extends Sbe{constructor(t,r){super(),this.bars=[],this.options=wbe.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Cbe(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 Ebe(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 pU=w((Dje,lU)=>{f();lU.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var fU=w((Eje,dU)=>{f();dU.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var hU=w((Sje,mU)=>{f();mU.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var yU=w((Aje,gU)=>{f();gU.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var xU=w((Fje,bU)=>{f();var Tbe=pU(),Abe=fU(),Pbe=hU(),Fbe=yU();bU.exports={legacy:Tbe,shades_classic:Abe,shades_grey:Pbe,rect:Fbe}});var CU=w((Ije,DU)=>{f();var vU=aU(),_be=uU(),Ibe=xU(),kbe=sS(),Nbe=rS(),Rbe=nS(),Obe=iS();DU.exports={Bar:vU,SingleBar:vU,MultiBar:_be,Presets:Ibe,Format:{Formatter:kbe,BarFormat:Rbe,ValueFormat:Nbe,TimeFormat:Obe}}});var PU=w((zje,AU)=>{f();AU.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 ixe={};mS(ixe,{default:()=>nxe});module.exports=lj(ixe);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]="9fb157f3-874b-44fc-a0a8-f44b32a94f0c",e._sentryDebugIdIdentifier="sentry-dbid-9fb157f3-874b-44fc-a0a8-f44b32a94f0c")}catch{}f();var XU=require("../core/index.cjs"),QU=require("../node/index.cjs"),ZU=require("../server/index.cjs"),ej=G(yS(),1);f();f();var rh=require("fs/promises");f();var Og=G(require("prettier"),1),bS=require("module"),xo=G(require("path"),1),Bg=G(require("fs"),1);function dj(e){let t=[],r=xo.default.dirname(e);for(;r!==xo.default.dirname(r);){let n=xo.default.join(r,".prettierignore");Bg.default.existsSync(n)&&t.push(n);let i=xo.default.join(r,".git");if(Bg.default.existsSync(i))break;r=xo.default.dirname(r)}return t}function fj(e){if(!e)return Og.default;try{let r=(0,bS.createRequire)(e)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return Og.default}}async function rn(e,t,r,n){try{let i=xo.default.resolve(e,n??"file.tsx"),s=fj(i);if(n){let a=dj(i);if((await s.getFileInfo(i,{ignorePath:a.length>0?a:void 0})).ignored)return t}let 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 e3=require("http");f();var Mg="preview-url";var wa="framework",ud="platform",ld="node",xS="/~builder-connect",vo="/~builder-connected",Lg="/~builder-dev-tools",$g="/~builder-dev-tools.js",Do="/~builder-dev-tools-close",vS="/mappings";var t3=require("os"),hn=require("path"),Nr=require("fs");f();var vd=require("util");f();var dr=G(pd(),1),Ta=require("process"),Ps=G(require("readline"),1),Hg=G(require("readline"),1),kS=require("stream"),NS=G(_t(),1);function vj({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 Dj=vj();function RS(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Dj,"")}function OS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BS={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}})(BS);var Cj=BS.exports,Ej=OS(Cj),wj=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},Sj=OS(wj);function Du(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=RS(e),e.length===0))return 0;e=e.replace(Sj()," ");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(Ej.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Gg=10,wS=(e=0)=>t=>`\x1B[${t+e}m`,SS=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,TS=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Et={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(Et.modifier);var Tj=Object.keys(Et.color),Aj=Object.keys(Et.bgColor);[...Tj,...Aj];function Pj(){let e=new Map;for(let[t,r]of Object.entries(Et)){for(let[n,i]of Object.entries(r))Et[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Et[n],e.set(i[0],i[1]);Object.defineProperty(Et,t,{value:r,enumerable:!1})}return Object.defineProperty(Et,"codes",{value:e,enumerable:!1}),Et.color.close="\x1B[39m",Et.bgColor.close="\x1B[49m",Et.color.ansi=wS(),Et.color.ansi256=SS(),Et.color.ansi16m=TS(),Et.bgColor.ansi=wS(Gg),Et.bgColor.ansi256=SS(Gg),Et.bgColor.ansi16m=TS(Gg),Object.defineProperties(Et,{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=>Et.rgbToAnsi256(...Et.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)=>Et.ansi256ToAnsi(Et.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Et.ansi256ToAnsi(Et.hexToAnsi256(t)),enumerable:!1}}),Et}var Fj=Pj(),xd=new Set(["\x1B","\x9B"]),_j=39,Vg="\x07",MS="[",Ij="]",LS="m",Wg=`${Ij}8;;`,AS=e=>`${xd.values().next().value}${MS}${e}${LS}`,PS=e=>`${xd.values().next().value}${Wg}${e}${Vg}`,kj=e=>e.split(" ").map(t=>Du(t)),zg=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=Du(RS(e[e.length-1]));for(let[a,c]of n.entries()){let u=Du(c);if(o+u<=r?e[e.length-1]+=c:(e.push(c),o=0),xd.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(Wg)),i){s?c===Vg&&(i=!1,s=!1):c===LS&&(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())},Nj=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Du(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Rj=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=kj(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=Du(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(""),zg(a,l,t);continue}if(p+o[u]>t&&p>0&&o[u]>0){if(r.wordWrap===!1&&p<t){zg(a,l,t);continue}a.push("")}if(p+o[u]>t&&r.wordWrap===!1){zg(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Nj(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)}};q7.exports=Qw});var z7=w((KUe,G7)=>{"use strict";f();G7.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 K7=w((WUe,H7)=>{"use strict";f();var cbe=z7();H7.exports=e=>typeof e=="string"?e.replace(cbe(),""):e});var W7=w((JUe,eS)=>{"use strict";f();var V7=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);eS.exports=V7;eS.exports.default=V7});var J7=w((QUe,Y7)=>{"use strict";f();Y7.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 Q7=w((eje,tS)=>{"use strict";f();var ube=K7(),lbe=W7(),pbe=J7(),X7=e=>{if(typeof e!="string"||e.length===0||(e=ube(e),e.length===0))return 0;e=e.replace(pbe()," ");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+=lbe(n)?2:1)}return t};tS.exports=X7;tS.exports.default=X7});var rS=w((rje,Z7)=>{f();Z7.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 nS=w((ije,eU)=>{f();eU.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 iS=w((oje,tU)=>{f();tU.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 sS=w((cje,rU)=>{f();var dbe=Q7(),fbe=rS(),mbe=nS(),hbe=iS();rU.exports=function(t,r,n){let i=t.format,s=t.formatTime||hbe,o=t.formatValue||fbe,a=t.formatBar||mbe,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-dbe(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((lje,nU)=>{f();function lt(e,t){return typeof e>"u"||e===null?t:e}nU.exports={parse:function(t,r){let n={},i=Object.assign({},r,t);return n.throttleTime=1e3/lt(i.fps,10),n.stream=lt(i.stream,process.stderr),n.terminal=lt(i.terminal,null),n.clearOnComplete=lt(i.clearOnComplete,!1),n.stopOnComplete=lt(i.stopOnComplete,!1),n.barsize=lt(i.barsize,40),n.align=lt(i.align,"left"),n.hideCursor=lt(i.hideCursor,!1),n.linewrap=lt(i.linewrap,!1),n.barGlue=lt(i.barGlue,""),n.barCompleteChar=lt(i.barCompleteChar,"="),n.barIncompleteChar=lt(i.barIncompleteChar,"-"),n.format=lt(i.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),n.formatTime=lt(i.formatTime,null),n.formatValue=lt(i.formatValue,null),n.formatBar=lt(i.formatBar,null),n.etaBufferLength=lt(i.etaBuffer,10),n.etaAsynchronousUpdate=lt(i.etaAsynchronousUpdate,!1),n.progressCalculationRelative=lt(i.progressCalculationRelative,!1),n.synchronousUpdate=lt(i.synchronousUpdate,!0),n.noTTYOutput=lt(i.noTTYOutput,!1),n.notTTYSchedule=lt(i.notTTYSchedule,2e3),n.emptyOnZero=lt(i.emptyOnZero,!1),n.forceRedraw=lt(i.forceRedraw,!1),n.autopadding=lt(i.autopadding,!1),n.gracefulExit=lt(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?lt(t.autopaddingChar," "):"",t}}});var oS=w((fje,sU)=>{f();var iU=j7(),gbe=Zw(),ybe=sS(),bbe=Tg(),xbe=require("events");sU.exports=class extends xbe{constructor(t){super(),this.options=bbe.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new gbe(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 iU(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:ybe}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 iU(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 aU=w((gje,oU)=>{f();var vbe=oS(),Dbe=Tg();oU.exports=class extends vbe{constructor(t,r){super(Dbe.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 uU=w((xje,cU)=>{f();var Cbe=Zw(),Ebe=oS(),wbe=Tg(),Sbe=require("events");cU.exports=class extends Sbe{constructor(t,r){super(),this.bars=[],this.options=wbe.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new Cbe(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 Ebe(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 pU=w((Dje,lU)=>{f();lU.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var fU=w((Eje,dU)=>{f();dU.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var hU=w((Sje,mU)=>{f();mU.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var yU=w((Aje,gU)=>{f();gU.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var xU=w((Fje,bU)=>{f();var Tbe=pU(),Abe=fU(),Pbe=hU(),Fbe=yU();bU.exports={legacy:Tbe,shades_classic:Abe,shades_grey:Pbe,rect:Fbe}});var CU=w((Ije,DU)=>{f();var vU=aU(),_be=uU(),Ibe=xU(),kbe=sS(),Nbe=rS(),Rbe=nS(),Obe=iS();DU.exports={Bar:vU,SingleBar:vU,MultiBar:_be,Presets:Ibe,Format:{Formatter:kbe,BarFormat:Rbe,ValueFormat:Nbe,TimeFormat:Obe}}});var PU=w((zje,AU)=>{f();AU.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 ixe={};mS(ixe,{default:()=>nxe});module.exports=lj(ixe);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]="8f1e18c0-e751-4d06-ad57-876f3000f28a",e._sentryDebugIdIdentifier="sentry-dbid-8f1e18c0-e751-4d06-ad57-876f3000f28a")}catch{}f();var XU=require("../core/index.cjs"),QU=require("../node/index.cjs"),ZU=require("../server/index.cjs"),ej=G(yS(),1);f();f();var rh=require("fs/promises");f();var Og=G(require("prettier"),1),bS=require("module"),xo=G(require("path"),1),Bg=G(require("fs"),1);function dj(e){let t=[],r=xo.default.dirname(e);for(;r!==xo.default.dirname(r);){let n=xo.default.join(r,".prettierignore");Bg.default.existsSync(n)&&t.push(n);let i=xo.default.join(r,".git");if(Bg.default.existsSync(i))break;r=xo.default.dirname(r)}return t}function fj(e){if(!e)return Og.default;try{let r=(0,bS.createRequire)(e)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return Og.default}}async function rn(e,t,r,n){try{let i=xo.default.resolve(e,n??"file.tsx"),s=fj(i);if(n){let a=dj(i);if((await s.getFileInfo(i,{ignorePath:a.length>0?a:void 0})).ignored)return t}let 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 e3=require("http");f();var Mg="preview-url";var wa="framework",ud="platform",ld="node",xS="/~builder-connect",vo="/~builder-connected",Lg="/~builder-dev-tools",$g="/~builder-dev-tools.js",Do="/~builder-dev-tools-close",vS="/mappings";var t3=require("os"),hn=require("path"),Nr=require("fs");f();var vd=require("util");f();var dr=G(pd(),1),Ta=require("process"),Ps=G(require("readline"),1),Hg=G(require("readline"),1),kS=require("stream"),NS=G(_t(),1);function vj({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 Dj=vj();function RS(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Dj,"")}function OS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BS={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}})(BS);var Cj=BS.exports,Ej=OS(Cj),wj=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},Sj=OS(wj);function Du(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=RS(e),e.length===0))return 0;e=e.replace(Sj()," ");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(Ej.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Gg=10,wS=(e=0)=>t=>`\x1B[${t+e}m`,SS=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,TS=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,Et={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(Et.modifier);var Tj=Object.keys(Et.color),Aj=Object.keys(Et.bgColor);[...Tj,...Aj];function Pj(){let e=new Map;for(let[t,r]of Object.entries(Et)){for(let[n,i]of Object.entries(r))Et[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=Et[n],e.set(i[0],i[1]);Object.defineProperty(Et,t,{value:r,enumerable:!1})}return Object.defineProperty(Et,"codes",{value:e,enumerable:!1}),Et.color.close="\x1B[39m",Et.bgColor.close="\x1B[49m",Et.color.ansi=wS(),Et.color.ansi256=SS(),Et.color.ansi16m=TS(),Et.bgColor.ansi=wS(Gg),Et.bgColor.ansi256=SS(Gg),Et.bgColor.ansi16m=TS(Gg),Object.defineProperties(Et,{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=>Et.rgbToAnsi256(...Et.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)=>Et.ansi256ToAnsi(Et.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>Et.ansi256ToAnsi(Et.hexToAnsi256(t)),enumerable:!1}}),Et}var Fj=Pj(),xd=new Set(["\x1B","\x9B"]),_j=39,Vg="\x07",MS="[",Ij="]",LS="m",Wg=`${Ij}8;;`,AS=e=>`${xd.values().next().value}${MS}${e}${LS}`,PS=e=>`${xd.values().next().value}${Wg}${e}${Vg}`,kj=e=>e.split(" ").map(t=>Du(t)),zg=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=Du(RS(e[e.length-1]));for(let[a,c]of n.entries()){let u=Du(c);if(o+u<=r?e[e.length-1]+=c:(e.push(c),o=0),xd.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(Wg)),i){s?c===Vg&&(i=!1,s=!1):c===LS&&(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())},Nj=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(Du(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Rj=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=kj(e),a=[""];for(let[u,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=Du(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(""),zg(a,l,t);continue}if(p+o[u]>t&&p>0&&o[u]>0){if(r.wordWrap===!1&&p<t){zg(a,l,t);continue}a.push("")}if(p+o[u]>t&&r.wordWrap===!1){zg(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(u=>Nj(u)));let c=[...a.join(`
|
|
102
102
|
`)];for(let[u,l]of c.entries()){if(n+=l,xd.has(l)){let{groups:d}=new RegExp(`(?:\\${MS}(?<code>\\d+)m|\\${Wg}(?<uri>.*)${Vg})`).exec(c.slice(u).join(""))||{groups:{}};if(d.code!==void 0){let h=Number.parseFloat(d.code);i=h===_j?void 0:h}else d.uri!==void 0&&(s=d.uri.length===0?void 0:d.uri)}let p=Fj.codes.get(Number(i));c[u+1]===`
|
|
103
103
|
`?(s&&(n+=PS("")),i&&p&&(n+=AS(p))):l===`
|
|
104
104
|
`&&(i&&p&&(n+=AS(i)),s&&(n+=PS(s)))}return n};function FS(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
@@ -164,8 +164,8 @@ ${qS}${n.trimStart()}`),r=3+(0,vd.stripVTControlCharacters)(n.trimStart()).lengt
|
|
|
164
164
|
`):process.stdout.write(`${E} ${a}
|
|
165
165
|
`),m(),i()};return{start:v,stop:C,message:(x="")=>{a=y(x??a)}}};var no=G(_t(),1);f();var Te=G(require("typescript"),1);var Ee=G(_t(),1);f();f();function Ue(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Sd(e,t=""){let r=Ue(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function Vt(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
|
-
`}return""}f();var QS=G(JS(),1);function fr(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function je(e,t,r){t=Hn(t),r=Hn(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=Hn(e.normalize(i)),i.startsWith(".")||(i="./"+i),i}function Hn(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function Co(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),i=n[n.length-1];return XS(i==="index"?e.basename(e.dirname(t)):i)}function XS(e){return pt(e).replace(/ /g,"")}function xn(e,t){let r=e.extname(t),n=Hn(e.basename(t,r)).split("/").pop();return pt(n==="index"?e.basename(e.dirname(t)):n)}function dt(e,t){let r=Hn(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 Ke(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 pt(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 jr(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function at(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 ZS(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function Cu(e){return typeof e=="number"}function Aa(e){return typeof e=="boolean"}function
|
|
168
|
-
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let u=wu.get(a);if(u)return Ue(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=n1.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new Pd(u)}return a.includes("node_modules")&&(c?wu.set(a,{exists:!0,content:c}):wu.set(a,{exists:!1})),Ue(e,c)},readFile:a=>{let c=e.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return Zj(e,o,t,r)}catch(a){if(a instanceof Pd){await eq(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function Zj(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=r1.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,r1.set(s,o))}o&&(i.options=sn(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 Fa(e,t,r){r||(r=await zt(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 Pd=class{libName;constructor(t){this.libName=t}};async function eq(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Ad.has(t)||Ad.set(t,fetch(r).then(n=>n.text()).then(n=>{n1.set(t,n)})),await Ad.get(t),Ad.delete(t)}var n1=new Map,Ad=new Map,wu=new Map,r1=new Map;async function i1(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:ty(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function ty(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 tq="1.11.
|
|
167
|
+
`}return""}f();var QS=G(JS(),1);function fr(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function je(e,t,r){t=Hn(t),r=Hn(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=Hn(e.normalize(i)),i.startsWith(".")||(i="./"+i),i}function Hn(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function Co(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),i=n[n.length-1];return XS(i==="index"?e.basename(e.dirname(t)):i)}function XS(e){return pt(e).replace(/ /g,"")}function xn(e,t){let r=e.extname(t),n=Hn(e.basename(t,r)).split("/").pop();return pt(n==="index"?e.basename(e.dirname(t)):n)}function dt(e,t){let r=Hn(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 Ke(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 pt(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 jr(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function at(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 ZS(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function Cu(e){return typeof e=="number"}function Aa(e){return typeof e=="boolean"}function Er(e){return typeof e=="string"}function Pa(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function sn(e){return JSON.parse(JSON.stringify(e))}function Td(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function e1(){try{let e=(0,QS.default)();if(e?.name)return e.name}catch{}return"npm"}function Xj(){return process.platform.startsWith("win")}function mr(){return Xj()?'"@builder.io/dev-tools"':"builder.io"}function ey(e){return e.replace(/[^a-zA-Z0-9-_]/g,"_")}f();function wr(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var Qj=["node_modules","dist","build","public"];async function qr(e,t){async function r(i,s){if(s>10)return;let o=await e.readdir(i);for(let a of o){if(Qj.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 wr(e)?"ts":"js"}`;return e.join(t,s)}return n}async function Kn(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 t1(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 Eu(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 Eu(e,o,r);if(c)return c}}))).find(s=>typeof s=="string")}async function zt(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await t1(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=wu.get(a);if(!c){try{e.statSync(a).isFile()?c={exists:!0,content:e.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}wu.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=wu.get(a);if(u)return Ue(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=n1.get(u),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new Pd(u)}return a.includes("node_modules")&&(c?wu.set(a,{exists:!0,content:c}):wu.set(a,{exists:!1})),Ue(e,c)},readFile:a=>{let c=e.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return Zj(e,o,t,r)}catch(a){if(a instanceof Pd){await eq(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function Zj(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=r1.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,r1.set(s,o))}o&&(i.options=sn(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 Fa(e,t,r){r||(r=await zt(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 Pd=class{libName;constructor(t){this.libName=t}};async function eq(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Ad.has(t)||Ad.set(t,fetch(r).then(n=>n.text()).then(n=>{n1.set(t,n)})),await Ad.get(t),Ad.delete(t)}var n1=new Map,Ad=new Map,wu=new Map,r1=new Map;async function i1(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:ty(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function ty(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 tq="1.11.49",Ae=process.env.OVERRIDE_VERSION??tq;f();f();async function Eo(e){let t=[],r=await Kn(e,e.getRepoRootDir());if(r){let n=await o1(r,e);t.push(...n)}return t}async function o1(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let i of rq)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};s1.has(i)&&(s.version=await s1.get(i)(t)),r.push(s)}}return r}function ry(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var s1=new Map([["next",async e=>{if(!e.spawnSync)return;let t=e1(),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:ry(o),minor:ry(a),patch:ry(c)}}]]),rq=["@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 vn(e){let t=a1(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function Dn(e,t){t=typeof t=="object"&&t!=null?t:{};let r=a1(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function a1(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}f();f();async function mi(e,t,r){let n={envKey:r,envValue:null,file:""};for(let i of t){let s=e.join(e.getAppRootDir(),i),o=await nq(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 nq(e,t){let r=await e.readFile(t);return typeof r=="string"?c1(r):null}function c1(e){let t={},r=e.replace(/\r\n?/gm,`
|
|
169
169
|
`),n;for(;(n=iq.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 iq=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;async function hi(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
|
|
|
@@ -173,7 +173,7 @@ ${i}
|
|
|
173
173
|
${r}=${n}
|
|
174
174
|
|
|
175
175
|
`,await e.writeFile(t,s),"update";else return e.debug(`Creating new .env file with "${r}" at ${t}`),s=[i,`${r}=${n}`,""].join(`
|
|
176
|
-
`),await e.writeFile(t,s),"create"}catch(o){if(o&&String(o).includes("EACCES"))return e.debug(`Permssion denied, failed to create or modify .env file with "${r}=${n}" at ${t}`),"permission-error";e.Sentry?.captureException(o)}return null}async function Su(e){return await mi(e,[".env.local",".env.development.local",".env.production.local",".env.development",".env.production",".env"],gi)}async function u1(e,t){let r=await Su(e),n=await hi(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var gi="NEXT_PUBLIC_BUILDER_API_KEY";f();f();var xe={gen1:"Gen 1",gen2:"Gen 2"},Tu={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"};f();f();f();function _a(e,t,r,n,i=!0){let s=t.properties.filter(a=>e.ts.isPropertyAssignment(a)),o=sq(e,t,r);return o>-1?n==null&&i?e.ts.factory.updateObjectLiteralExpression(t,s.filter((a,c)=>c!==o)):(s[o]=e.ts.factory.updatePropertyAssignment(s[o],s[o].name,Au(e,n)),e.ts.factory.updateObjectLiteralExpression(t,s)):(n!=null&&s.push(e.ts.factory.createPropertyAssignment(r,Au(e,n))),e.ts.factory.updateObjectLiteralExpression(t,s))}function sq(e,t,r){return t.properties.findIndex(n=>tt(e,n)===r)}function Pu(e,t){switch(t.kind){case e.ts.SyntaxKind.ArrayLiteralExpression:return aq(e,t);case e.ts.SyntaxKind.ObjectLiteralExpression:return oq(e,t);case e.ts.SyntaxKind.StringLiteral:return t.text;case e.ts.SyntaxKind.NumericLiteral:return Number(t.text);case e.ts.SyntaxKind.NoSubstitutionTemplateLiteral:return t.text;case e.ts.SyntaxKind.TrueKeyword:return!0;case e.ts.SyntaxKind.FalseKeyword:return!1;case e.ts.SyntaxKind.Identifier:switch(t.escapedText){case"undefined":return;case"null":return null;case"String":return String;case"Number":return Number;case"Boolean":return Boolean;case"NaN":return NaN}}}function oq(e,t){let r={};if(t&&e.ts.isObjectLiteralExpression(t)){for(let n of t.properties)if(e.ts.isPropertyAssignment(n)){let i=tt(e,n);i&&(r[i]=Pu(e,n.initializer))}}return r}function aq(e,t){return t&&e.ts.isArrayLiteralExpression(t)?t.elements.map(r=>Pu(e,r)):[]}function tt(e,t){if(t&&e.ts.isPropertyAssignment(t)){let r=t.name;switch(r.kind){case e.ts.SyntaxKind.Identifier:return r.text;case e.ts.SyntaxKind.StringLiteral:case e.ts.SyntaxKind.NumericLiteral:return r.text;case e.ts.SyntaxKind.ComputedPropertyName:let n=r.expression;if(e.ts.isStringLiteral(n)||e.ts.isNumericLiteral(n))return r.expression.text}}}function Au(e,t){return ny(e,t,new WeakSet)}function ny(e,t,r){return t===void 0?e.ts.factory.createIdentifier("undefined"):t===null?e.ts.factory.createIdentifier("null"):typeof t=="string"?e.ts.factory.createStringLiteral(t):typeof t=="number"?isNaN(t)?e.ts.factory.createIdentifier("NaN"):e.ts.factory.createNumericLiteral(t):t===!0?e.ts.factory.createTrue():t===!1?e.ts.factory.createFalse():t===String?e.ts.factory.createIdentifier("String"):t===Number?e.ts.factory.createIdentifier("Number"):t===Boolean?e.ts.factory.createIdentifier("Boolean"):Array.isArray(t)?cq(e,t,r):typeof t=="object"?uq(e,t,r):e.ts.factory.createIdentifier(t)}function cq(e,t,r){let n=t.map(i=>ny(e,i,r));return e.ts.factory.createArrayLiteralExpression(n,!0)}function uq(e,t,r){if(r.has(t))return e.ts.factory.createIdentifier("undefined");r.add(t);let n=Object.keys(t).map(i=>e.ts.factory.createPropertyAssignment(i,ny(e,t[i],r)));return e.ts.factory.createObjectLiteralExpression(n,!0)}f();function wo(e,t,r){let n=[];if(!r)return n;let i=null;if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r)){let s=r.parameters;if(s.length>0){let o=s[0],a=t.getTypeAtLocation(o);a.aliasTypeArguments&&a.aliasTypeArguments.length>0&&(a=a.aliasTypeArguments[0]),!!(a.flags&e.ts.TypeFlags.Object)&&(i=a.getProperties())}}else if(e.ts.isIdentifier(r)){let s=t.getTypeAtLocation(r),o=s.symbol?.valueDeclaration;if(o&&e.ts.isClassDeclaration(o)){let c=o.heritageClauses?.find(u=>u.token===e.ts.SyntaxKind.ExtendsKeyword)?.types;if(c){for(let u of c)if(t.getSymbolAtLocation(u.expression)?.name==="Component"){if(e.ts.isExpressionWithTypeArguments(u)){let p=u.typeArguments;if(p){let d=p[0];i=t.getTypeFromTypeNode(d).getProperties()}}break}}}if(!i){let a=s.getCallSignatures();if(a.length>0){let c=a[0].getParameters();c.length>0&&(i=t.getTypeOfSymbolAtLocation(c[0],r).getProperties())}}}else if(e.ts.isExportSpecifier(r)){let s=t.getSymbolAtLocation(r.name);if(s){let a=t.getTypeOfSymbolAtLocation(s,r).getCallSignatures();if(a.length>0){let c=a[0].getParameters();c.length>0&&(i=t.getTypeOfSymbolAtLocation(c[0],r).getProperties())}}}if(i)for(let s of i){let o=lq(e,t,s);o&&n.push(o)}return n=n.filter(p1),n.length>0?n:pq(e,r)}function lq(e,t,r){let n=r.valueDeclaration,i=r.getName();if(n||(n=r.getDeclarations()?.[0]),n&&e.ts.isPropertySignature(n)){if(i!=="children"&&n.getSourceFile().fileName.includes("node_modules/@types/"))return null;let s="string",o;if(n?.type){let c=t.getTypeFromTypeNode(n.type),u=t.typeToString(c),l=iy(u);l.knownType?s=l.builderType:fq(u)||c.flags&e.ts.TypeFlags.StringLike?s="string":c.flags&e.ts.TypeFlags.NumberLike?s="number":c.flags&e.ts.TypeFlags.IndexedAccess?s="list":c.flags&e.ts.TypeFlags.Object||c.isUnion()&&c.types.every(p=>p.flags&e.ts.TypeFlags.Object)||c.isIntersection()&&c.types.some(p=>p.flags&e.ts.TypeFlags.Object)?s="object":s="string",u!==s&&(o=u)}let a={name:i,type:s,isRegistered:!1};if(o&&n.type){let c=yq(e,t,t.getTypeFromTypeNode(n.type));a.meta=a.meta||{},c&&c.length>0&&a.type==="string"&&c.every(hq)?a.enum=c.map(gq):a.meta.ts=o}return n.questionToken||(a.required=!0),a}return null}function pq(e,t){let r=[],n=e.ts.getJSDocCommentsAndTags(t);for(let i of n)if(!(!e.ts.isJSDoc(i)||!i.tags))for(let s of i.tags){if(!e.ts.isJSDocParameterTag(s)||s.tagName.text!=="param")continue;let a=s.typeExpression?.type;if(!a||!e.ts.isJSDocTypeLiteral(a))continue;let c=a.jsDocPropertyTags;if(c)for(let u of c){if(!e.ts.isJSDocPropertyLikeTag(u))continue;let l=u.name;if(!e.ts.isQualifiedName(l))continue;let p=u.typeExpression;if(!p)continue;let d="";switch(p.type.kind){case e.ts.SyntaxKind.StringKeyword:{d="string";break}case e.ts.SyntaxKind.NumberKeyword:{d="number";break}case e.ts.SyntaxKind.BooleanKeyword:{d="boolean";break}default:continue}let m={name:l.right.text,type:d,isRegistered:!1};r.push(m)}}return r.filter(p1)}var dq=["ClassicComponent","FunctionComponent","IntrinsicElements","JSX","ReactNode","ReactElement","ReactPortal"];function fq(e){return typeof e!="string"?!1:!!dq.some(t=>e.includes(t))}function iy(e){return typeof e=="string"&&(e=e.trim(),mq.some(t=>t.value===e))?{builderType:e,knownType:!0}:{builderType:"string",knownType:!1}}var mq=[{value:"boolean",text:"boolean"},{value:"color",text:"color (provides a color in hex or rgb)"},{value:"date",text:"date (same format as the Date constructor)"},{value:"email",text:"email"},{value:"file",text:"file (uploads a file and provides a url)"},{value:"list",text:"list (collection of items)"},{value:"longText",text:"longText (multiline text editor)"},{value:"number",text:"number"},{value:"object",text:"object (set of specific names and values)"},{value:"richText",text:"richText (provides value as html)"},{value:"string",text:"string"}];function hq(e){return/^['"].*['"]$/.test(e)}function gq(e){return(e.startsWith('"')||e.startsWith("'"))&&(e.endsWith('"')||e.endsWith("'"))?e.slice(1,-1):e}var yq=(e,t,r)=>{let n=new Set;l1(e,t,r,n);let i=n.delete("true"),s=n.delete("false");(i||s)&&n.add("boolean");let o=Array.from(n.keys()).sort();if(o.length>1&&(o=o.map(a=>a.indexOf("=>")>=0?`(${a})`:a)),!(o.length>20))return o},bq=(e,t,r)=>{let n=e.ts.TypeFormatFlags.InElementType|e.ts.TypeFormatFlags.NoTruncation;return t.typeToString(r,void 0,n)},l1=(e,t,r,n)=>{if(r.isUnion())r.types.forEach(i=>{l1(e,t,i,n)});else if(r.isLiteral()){let i=bq(e,t,r);n.add(i)}};function p1(e){let t=e?.name;if(typeof t!="string"||t===""||t.startsWith("aria")||t.startsWith("data-"))return!1;if(t.startsWith("on")&&t.length>2){let r=t.charAt(2);if(r.toUpperCase()===r)return!1}return!xq.has(t.toLowerCase())}var xq=new Set(["about","accessKey","accessKeyLabel","asChild","autoCapitalize","autoCorrect","autoFocus","autoSave","blur","contentEditable","contextMenu","dangerouslySetInnerHTML","datatype","defaultChecked","defaultValue","dir","draggable","enterKeyHint","focus","form","formAction","formEncType","formMethod","formNoValidate","formTarget","inlist","innerText","inputMode","is","isContentEditable","itemID","itemProp","itemRef","itemScope","itemType","lang","nonce","offsetHeight","offsetLeft","offsetTop","offsetWidth","outerText","prefix","property","radioGroup","rel","resource","results","rev","role","security","slot","spellCheck","suppressContentEditableWarning","suppressHydrationWarning","tabIndex","translate","typeof","unselectable","vocab"].map(e=>e.toLowerCase()));function Gr(e,t,r){for(let n of r.properties){if(!e.ts.isPropertyAssignment(n))continue;let i=tt(e,n);if(i==="name"&&e.ts.isStringLiteral(n.initializer)){t.name=n.initializer.text;continue}if(i==="description"&&e.ts.isStringLiteral(n.initializer)){t.description=n.initializer.text;continue}if(i==="image"&&e.ts.isStringLiteral(n.initializer)){t.image=n.initializer.text;continue}if(i==="inputs"&&e.ts.isArrayLiteralExpression(n.initializer)){let s=vq(e,n.initializer);on(t,s);continue}if(i==="meta"&&e.ts.isObjectLiteralExpression(n.initializer)){let s=Pu(e,n.initializer);s&&typeof s=="object"&&(t.meta=s);continue}}return t}function vq(e,t){let r=[];for(let n of t.elements)e.ts.isObjectLiteralExpression(n)&&r.push(Dq(e,n));return r}function Dq(e,t){let r=Pu(e,t),n=Pq(r);return n.isRegistered=!0,n}function Ht(e,t,r){let n=Eq(r);return t=_a(e,t,"name",n.name,!1),t=_a(e,t,"description",n.description),t=_a(e,t,"image",n.image),t=_a(e,t,"meta",n.meta),t=Cq(e,t,n),Fq(e,t)}function Cq(e,t,r){let n=null,i=t.properties.filter(a=>e.ts.isPropertyAssignment(a)&&e.ts.isIdentifier(a.name)),s=i.findIndex(a=>e.ts.isIdentifier(a.name)&&a.name.text==="inputs"),o=[...r.inputs??[]];if(s>-1){if(o.length===0)return _a(e,t,"inputs",null);let a=i[s];e.ts.isPropertyAssignment(a)&&e.ts.isArrayLiteralExpression(a.initializer)&&(n=a.initializer)}return o.length===0?t:(n=Sq(e,n||e.ts.factory.createArrayLiteralExpression(),o),s>-1?i[s]=e.ts.factory.updatePropertyAssignment(i[s],i[s].name,n):i.push(e.ts.factory.createPropertyAssignment("inputs",n)),e.ts.factory.updateObjectLiteralExpression(t,i))}function Eq(e){return{name:e.name,description:e.description,image:e.image,inputs:(e.inputs||[]).filter(r=>r.isRegistered).map(wq),...e.meta?{meta:{...e.meta}}:{}}}function wq(e){let t={name:e.name,type:e.type};return(wr(e.defaultValue)||Cu(e.defaultValue)||Aa(e.defaultValue))&&(t.defaultValue=e.defaultValue),wr(e.friendlyName)&&(t.friendlyName=e.friendlyName),wr(e.helperText)&&(t.helperText=e.helperText),e.required===!0&&(t.required=!0),Array.isArray(e.enum)&&(t.enum=e.enum),e.hideFromUI===!0&&(t.hideFromUI=!0),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(t.meta=e.meta),t}function Sq(e,t,r){let n=t.elements.filter(i=>{if(!e.ts.isObjectLiteralExpression(i))return!1;let s=i.properties.find(a=>tt(e,a)==="name");if(!s)return!1;let o=s.initializer;return e.ts.isStringLiteral(o)?r.some(a=>a.name===o.text):!1});for(let i of r)n=Tq(e,n,i);return n.sort((i,s)=>{let o=i.properties.find(d=>tt(e,d)==="name"),a=s.properties.find(d=>tt(e,d)==="name"),c=o?.initializer,u=a?.initializer,l=c&&e.ts.isStringLiteral(c)?c.text:"zz",p=u&&e.ts.isStringLiteral(u)?u.text:"zz";return l.toLowerCase().localeCompare(p.toLowerCase())}),e.ts.factory.updateArrayLiteralExpression(t,n)}function Tq(e,t,r){let n=t.findIndex(i=>i.properties.some(s=>{let o=tt(e,s);return e.ts.isPropertyAssignment(s)&&o==="name"&&e.ts.isStringLiteral(s.initializer)&&s.initializer.text===r.name}));if(n>-1)t[n]=d1(e,t[n],r);else{let i=d1(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("name",e.ts.factory.createStringLiteral(r.name))],!0),r);t.push(i)}return t}function d1(e,t,r){let n=t.properties.filter(s=>e.ts.isPropertyAssignment(s)),i=Object.keys(r).filter(s=>s!=="isRegistered");for(let s of i)n=Aq(e,n,r,s);return n=_q(e,n.filter(s=>{let o=tt(e,s);return i.includes(o)})),e.ts.factory.updateObjectLiteralExpression(t,n)}function Aq(e,t,r,n){let i=t.findIndex(s=>e.ts.isIdentifier(s.name)&&s.name.text===n);return i>-1?t[i]=e.ts.factory.updatePropertyAssignment(t[i],t[i].name,Au(e,r[n])):t.push(e.ts.factory.createPropertyAssignment(n,Au(e,r[n]))),t}function on(e,t){for(let r of t){let n=e.inputs.findIndex(i=>i.name===r.name);n>-1?(r.isRegistered||!e.inputs[n].isRegistered)&&(e.inputs[n]=r):e.inputs.push(r)}e.acceptsChildren=sy(e)}function Pq(e){let t=iy(e.type),r={name:e.name.trim(),type:t.builderType};return wr(e.friendlyName)&&e.friendlyName.trim()!==e.name.trim()&&(r.friendlyName=e.friendlyName),(wr(e.defaultValue)||Cu(e.defaultValue)||Aa(e.defaultValue))&&(r.defaultValue=e.defaultValue),wr(e.helperText)&&(r.helperText=e.helperText),Aa(e.required)&&(r.required=e.required),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(r.meta=e.meta),Array.isArray(e.enum)&&e.enum.length>0&&(r.enum=e.enum),e.hideFromUI===!0&&(r.hideFromUI=!0),oy(r)}function sy(e){let t=e.inputs.some(n=>n.name==="children"),r=e.inputs.some(n=>n.meta?.ts==="ReactNode");return!!(t||r||e.acceptsChildren===!0)}function oy(e){if(e.name==="children"&&(e.hideFromUI=!0,delete e.required),e.type==="object"&&e.defaultValue==null&&(e.hideFromUI=!0),e.type==="list"&&e.defaultValue==null&&(e.hideFromUI=!0),e.meta){let t=e.meta.ts;typeof t=="string"&&(t=t.trim(),t.endsWith("ReactNode")&&(t="ReactNode"),e.meta.ts=t,t==="ReactNode"&&(e.hideFromUI=!0))}return e}function Fq(e,t){let r=[...t.properties].sort((n,i)=>{let s=tt(e,n)||"zz",o=tt(e,i)||"zz";if(s==="inputs")return 1;let a=f1.indexOf(s),c=f1.indexOf(o);return a>-1?c>-1&&a>c?1:-1:c>-1?a>-1&&c<a?-1:1:s.localeCompare(o)});return e.ts.factory.updateObjectLiteralExpression(t,r)}var f1=["component","name","description"];function _q(e,t){return[...t].sort((n,i)=>{let s=tt(e,n)||"zz",o=tt(e,i)||"zz",a=m1.indexOf(s),c=m1.indexOf(o);return a>-1?c>-1&&a>c?1:-1:c>-1?a>-1&&c<a?-1:1:s.localeCompare(o)})}var m1=["name","type"];function Ia(e,t){for(let r of t.properties){if(!e.ts.isPropertyAssignment(r)||!e.ts.isIdentifier(r.name))continue;if(tt(e,r)==="canHaveChildren"){let{initializer:i}=r;return i.kind===e.ts.SyntaxKind.TrueKeyword}}return!1}function h1(e,t){let r=`Builder.registerComponent(
|
|
176
|
+
`),await e.writeFile(t,s),"create"}catch(o){if(o&&String(o).includes("EACCES"))return e.debug(`Permssion denied, failed to create or modify .env file with "${r}=${n}" at ${t}`),"permission-error";e.Sentry?.captureException(o)}return null}async function Su(e){return await mi(e,[".env.local",".env.development.local",".env.production.local",".env.development",".env.production",".env"],gi)}async function u1(e,t){let r=await Su(e),n=await hi(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var gi="NEXT_PUBLIC_BUILDER_API_KEY";f();f();var xe={gen1:"Gen 1",gen2:"Gen 2"},Tu={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"};f();f();f();function _a(e,t,r,n,i=!0){let s=t.properties.filter(a=>e.ts.isPropertyAssignment(a)),o=sq(e,t,r);return o>-1?n==null&&i?e.ts.factory.updateObjectLiteralExpression(t,s.filter((a,c)=>c!==o)):(s[o]=e.ts.factory.updatePropertyAssignment(s[o],s[o].name,Au(e,n)),e.ts.factory.updateObjectLiteralExpression(t,s)):(n!=null&&s.push(e.ts.factory.createPropertyAssignment(r,Au(e,n))),e.ts.factory.updateObjectLiteralExpression(t,s))}function sq(e,t,r){return t.properties.findIndex(n=>tt(e,n)===r)}function Pu(e,t){switch(t.kind){case e.ts.SyntaxKind.ArrayLiteralExpression:return aq(e,t);case e.ts.SyntaxKind.ObjectLiteralExpression:return oq(e,t);case e.ts.SyntaxKind.StringLiteral:return t.text;case e.ts.SyntaxKind.NumericLiteral:return Number(t.text);case e.ts.SyntaxKind.NoSubstitutionTemplateLiteral:return t.text;case e.ts.SyntaxKind.TrueKeyword:return!0;case e.ts.SyntaxKind.FalseKeyword:return!1;case e.ts.SyntaxKind.Identifier:switch(t.escapedText){case"undefined":return;case"null":return null;case"String":return String;case"Number":return Number;case"Boolean":return Boolean;case"NaN":return NaN}}}function oq(e,t){let r={};if(t&&e.ts.isObjectLiteralExpression(t)){for(let n of t.properties)if(e.ts.isPropertyAssignment(n)){let i=tt(e,n);i&&(r[i]=Pu(e,n.initializer))}}return r}function aq(e,t){return t&&e.ts.isArrayLiteralExpression(t)?t.elements.map(r=>Pu(e,r)):[]}function tt(e,t){if(t&&e.ts.isPropertyAssignment(t)){let r=t.name;switch(r.kind){case e.ts.SyntaxKind.Identifier:return r.text;case e.ts.SyntaxKind.StringLiteral:case e.ts.SyntaxKind.NumericLiteral:return r.text;case e.ts.SyntaxKind.ComputedPropertyName:let n=r.expression;if(e.ts.isStringLiteral(n)||e.ts.isNumericLiteral(n))return r.expression.text}}}function Au(e,t){return ny(e,t,new WeakSet)}function ny(e,t,r){return t===void 0?e.ts.factory.createIdentifier("undefined"):t===null?e.ts.factory.createIdentifier("null"):typeof t=="string"?e.ts.factory.createStringLiteral(t):typeof t=="number"?isNaN(t)?e.ts.factory.createIdentifier("NaN"):e.ts.factory.createNumericLiteral(t):t===!0?e.ts.factory.createTrue():t===!1?e.ts.factory.createFalse():t===String?e.ts.factory.createIdentifier("String"):t===Number?e.ts.factory.createIdentifier("Number"):t===Boolean?e.ts.factory.createIdentifier("Boolean"):Array.isArray(t)?cq(e,t,r):typeof t=="object"?uq(e,t,r):e.ts.factory.createIdentifier(t)}function cq(e,t,r){let n=t.map(i=>ny(e,i,r));return e.ts.factory.createArrayLiteralExpression(n,!0)}function uq(e,t,r){if(r.has(t))return e.ts.factory.createIdentifier("undefined");r.add(t);let n=Object.keys(t).map(i=>e.ts.factory.createPropertyAssignment(i,ny(e,t[i],r)));return e.ts.factory.createObjectLiteralExpression(n,!0)}f();function wo(e,t,r){let n=[];if(!r)return n;let i=null;if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r)||e.ts.isFunctionDeclaration(r)){let s=r.parameters;if(s.length>0){let o=s[0],a=t.getTypeAtLocation(o);a.aliasTypeArguments&&a.aliasTypeArguments.length>0&&(a=a.aliasTypeArguments[0]),!!(a.flags&e.ts.TypeFlags.Object)&&(i=a.getProperties())}}else if(e.ts.isIdentifier(r)){let s=t.getTypeAtLocation(r),o=s.symbol?.valueDeclaration;if(o&&e.ts.isClassDeclaration(o)){let c=o.heritageClauses?.find(u=>u.token===e.ts.SyntaxKind.ExtendsKeyword)?.types;if(c){for(let u of c)if(t.getSymbolAtLocation(u.expression)?.name==="Component"){if(e.ts.isExpressionWithTypeArguments(u)){let p=u.typeArguments;if(p){let d=p[0];i=t.getTypeFromTypeNode(d).getProperties()}}break}}}if(!i){let a=s.getCallSignatures();if(a.length>0){let c=a[0].getParameters();c.length>0&&(i=t.getTypeOfSymbolAtLocation(c[0],r).getProperties())}}}else if(e.ts.isExportSpecifier(r)){let s=t.getSymbolAtLocation(r.name);if(s){let a=t.getTypeOfSymbolAtLocation(s,r).getCallSignatures();if(a.length>0){let c=a[0].getParameters();c.length>0&&(i=t.getTypeOfSymbolAtLocation(c[0],r).getProperties())}}}if(i)for(let s of i){let o=lq(e,t,s);o&&n.push(o)}return n=n.filter(p1),n.length>0?n:pq(e,r)}function lq(e,t,r){let n=r.valueDeclaration,i=r.getName();if(n||(n=r.getDeclarations()?.[0]),n&&e.ts.isPropertySignature(n)){if(i!=="children"&&n.getSourceFile().fileName.includes("node_modules/@types/"))return null;let s="string",o;if(n?.type){let c=t.getTypeFromTypeNode(n.type),u=t.typeToString(c),l=iy(u);l.knownType?s=l.builderType:fq(u)||c.flags&e.ts.TypeFlags.StringLike?s="string":c.flags&e.ts.TypeFlags.NumberLike?s="number":c.flags&e.ts.TypeFlags.IndexedAccess?s="list":c.flags&e.ts.TypeFlags.Object||c.isUnion()&&c.types.every(p=>p.flags&e.ts.TypeFlags.Object)||c.isIntersection()&&c.types.some(p=>p.flags&e.ts.TypeFlags.Object)?s="object":s="string",u!==s&&(o=u)}let a={name:i,type:s,isRegistered:!1};if(o&&n.type){let c=yq(e,t,t.getTypeFromTypeNode(n.type));a.meta=a.meta||{},c&&c.length>0&&a.type==="string"&&c.every(hq)?a.enum=c.map(gq):a.meta.ts=o}return n.questionToken||(a.required=!0),a}return null}function pq(e,t){let r=[],n=e.ts.getJSDocCommentsAndTags(t);for(let i of n)if(!(!e.ts.isJSDoc(i)||!i.tags))for(let s of i.tags){if(!e.ts.isJSDocParameterTag(s)||s.tagName.text!=="param")continue;let a=s.typeExpression?.type;if(!a||!e.ts.isJSDocTypeLiteral(a))continue;let c=a.jsDocPropertyTags;if(c)for(let u of c){if(!e.ts.isJSDocPropertyLikeTag(u))continue;let l=u.name;if(!e.ts.isQualifiedName(l))continue;let p=u.typeExpression;if(!p)continue;let d="";switch(p.type.kind){case e.ts.SyntaxKind.StringKeyword:{d="string";break}case e.ts.SyntaxKind.NumberKeyword:{d="number";break}case e.ts.SyntaxKind.BooleanKeyword:{d="boolean";break}default:continue}let m={name:l.right.text,type:d,isRegistered:!1};r.push(m)}}return r.filter(p1)}var dq=["ClassicComponent","FunctionComponent","IntrinsicElements","JSX","ReactNode","ReactElement","ReactPortal"];function fq(e){return typeof e!="string"?!1:!!dq.some(t=>e.includes(t))}function iy(e){return typeof e=="string"&&(e=e.trim(),mq.some(t=>t.value===e))?{builderType:e,knownType:!0}:{builderType:"string",knownType:!1}}var mq=[{value:"boolean",text:"boolean"},{value:"color",text:"color (provides a color in hex or rgb)"},{value:"date",text:"date (same format as the Date constructor)"},{value:"email",text:"email"},{value:"file",text:"file (uploads a file and provides a url)"},{value:"list",text:"list (collection of items)"},{value:"longText",text:"longText (multiline text editor)"},{value:"number",text:"number"},{value:"object",text:"object (set of specific names and values)"},{value:"richText",text:"richText (provides value as html)"},{value:"string",text:"string"}];function hq(e){return/^['"].*['"]$/.test(e)}function gq(e){return(e.startsWith('"')||e.startsWith("'"))&&(e.endsWith('"')||e.endsWith("'"))?e.slice(1,-1):e}var yq=(e,t,r)=>{let n=new Set;l1(e,t,r,n);let i=n.delete("true"),s=n.delete("false");(i||s)&&n.add("boolean");let o=Array.from(n.keys()).sort();if(o.length>1&&(o=o.map(a=>a.indexOf("=>")>=0?`(${a})`:a)),!(o.length>20))return o},bq=(e,t,r)=>{let n=e.ts.TypeFormatFlags.InElementType|e.ts.TypeFormatFlags.NoTruncation;return t.typeToString(r,void 0,n)},l1=(e,t,r,n)=>{if(r.isUnion())r.types.forEach(i=>{l1(e,t,i,n)});else if(r.isLiteral()){let i=bq(e,t,r);n.add(i)}};function p1(e){let t=e?.name;if(typeof t!="string"||t===""||t.startsWith("aria")||t.startsWith("data-"))return!1;if(t.startsWith("on")&&t.length>2){let r=t.charAt(2);if(r.toUpperCase()===r)return!1}return!xq.has(t.toLowerCase())}var xq=new Set(["about","accessKey","accessKeyLabel","asChild","autoCapitalize","autoCorrect","autoFocus","autoSave","blur","contentEditable","contextMenu","dangerouslySetInnerHTML","datatype","defaultChecked","defaultValue","dir","draggable","enterKeyHint","focus","form","formAction","formEncType","formMethod","formNoValidate","formTarget","inlist","innerText","inputMode","is","isContentEditable","itemID","itemProp","itemRef","itemScope","itemType","lang","nonce","offsetHeight","offsetLeft","offsetTop","offsetWidth","outerText","prefix","property","radioGroup","rel","resource","results","rev","role","security","slot","spellCheck","suppressContentEditableWarning","suppressHydrationWarning","tabIndex","translate","typeof","unselectable","vocab"].map(e=>e.toLowerCase()));function Gr(e,t,r){for(let n of r.properties){if(!e.ts.isPropertyAssignment(n))continue;let i=tt(e,n);if(i==="name"&&e.ts.isStringLiteral(n.initializer)){t.name=n.initializer.text;continue}if(i==="description"&&e.ts.isStringLiteral(n.initializer)){t.description=n.initializer.text;continue}if(i==="image"&&e.ts.isStringLiteral(n.initializer)){t.image=n.initializer.text;continue}if(i==="inputs"&&e.ts.isArrayLiteralExpression(n.initializer)){let s=vq(e,n.initializer);on(t,s);continue}if(i==="meta"&&e.ts.isObjectLiteralExpression(n.initializer)){let s=Pu(e,n.initializer);s&&typeof s=="object"&&(t.meta=s);continue}}return t}function vq(e,t){let r=[];for(let n of t.elements)e.ts.isObjectLiteralExpression(n)&&r.push(Dq(e,n));return r}function Dq(e,t){let r=Pu(e,t),n=Pq(r);return n.isRegistered=!0,n}function Ht(e,t,r){let n=Eq(r);return t=_a(e,t,"name",n.name,!1),t=_a(e,t,"description",n.description),t=_a(e,t,"image",n.image),t=_a(e,t,"meta",n.meta),t=Cq(e,t,n),Fq(e,t)}function Cq(e,t,r){let n=null,i=t.properties.filter(a=>e.ts.isPropertyAssignment(a)&&e.ts.isIdentifier(a.name)),s=i.findIndex(a=>e.ts.isIdentifier(a.name)&&a.name.text==="inputs"),o=[...r.inputs??[]];if(s>-1){if(o.length===0)return _a(e,t,"inputs",null);let a=i[s];e.ts.isPropertyAssignment(a)&&e.ts.isArrayLiteralExpression(a.initializer)&&(n=a.initializer)}return o.length===0?t:(n=Sq(e,n||e.ts.factory.createArrayLiteralExpression(),o),s>-1?i[s]=e.ts.factory.updatePropertyAssignment(i[s],i[s].name,n):i.push(e.ts.factory.createPropertyAssignment("inputs",n)),e.ts.factory.updateObjectLiteralExpression(t,i))}function Eq(e){return{name:e.name,description:e.description,image:e.image,inputs:(e.inputs||[]).filter(r=>r.isRegistered).map(wq),...e.meta?{meta:{...e.meta}}:{}}}function wq(e){let t={name:e.name,type:e.type};return(Er(e.defaultValue)||Cu(e.defaultValue)||Aa(e.defaultValue))&&(t.defaultValue=e.defaultValue),Er(e.friendlyName)&&(t.friendlyName=e.friendlyName),Er(e.helperText)&&(t.helperText=e.helperText),e.required===!0&&(t.required=!0),Array.isArray(e.enum)&&(t.enum=e.enum),e.hideFromUI===!0&&(t.hideFromUI=!0),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(t.meta=e.meta),t}function Sq(e,t,r){let n=t.elements.filter(i=>{if(!e.ts.isObjectLiteralExpression(i))return!1;let s=i.properties.find(a=>tt(e,a)==="name");if(!s)return!1;let o=s.initializer;return e.ts.isStringLiteral(o)?r.some(a=>a.name===o.text):!1});for(let i of r)n=Tq(e,n,i);return n.sort((i,s)=>{let o=i.properties.find(d=>tt(e,d)==="name"),a=s.properties.find(d=>tt(e,d)==="name"),c=o?.initializer,u=a?.initializer,l=c&&e.ts.isStringLiteral(c)?c.text:"zz",p=u&&e.ts.isStringLiteral(u)?u.text:"zz";return l.toLowerCase().localeCompare(p.toLowerCase())}),e.ts.factory.updateArrayLiteralExpression(t,n)}function Tq(e,t,r){let n=t.findIndex(i=>i.properties.some(s=>{let o=tt(e,s);return e.ts.isPropertyAssignment(s)&&o==="name"&&e.ts.isStringLiteral(s.initializer)&&s.initializer.text===r.name}));if(n>-1)t[n]=d1(e,t[n],r);else{let i=d1(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("name",e.ts.factory.createStringLiteral(r.name))],!0),r);t.push(i)}return t}function d1(e,t,r){let n=t.properties.filter(s=>e.ts.isPropertyAssignment(s)),i=Object.keys(r).filter(s=>s!=="isRegistered");for(let s of i)n=Aq(e,n,r,s);return n=_q(e,n.filter(s=>{let o=tt(e,s);return i.includes(o)})),e.ts.factory.updateObjectLiteralExpression(t,n)}function Aq(e,t,r,n){let i=t.findIndex(s=>e.ts.isIdentifier(s.name)&&s.name.text===n);return i>-1?t[i]=e.ts.factory.updatePropertyAssignment(t[i],t[i].name,Au(e,r[n])):t.push(e.ts.factory.createPropertyAssignment(n,Au(e,r[n]))),t}function on(e,t){for(let r of t){let n=e.inputs.findIndex(i=>i.name===r.name);n>-1?(r.isRegistered||!e.inputs[n].isRegistered)&&(e.inputs[n]=r):e.inputs.push(r)}e.acceptsChildren=sy(e)}function Pq(e){let t=iy(e.type),r={name:e.name.trim(),type:t.builderType};return Er(e.friendlyName)&&e.friendlyName.trim()!==e.name.trim()&&(r.friendlyName=e.friendlyName),(Er(e.defaultValue)||Cu(e.defaultValue)||Aa(e.defaultValue))&&(r.defaultValue=e.defaultValue),Er(e.helperText)&&(r.helperText=e.helperText),Aa(e.required)&&(r.required=e.required),typeof e.meta=="object"&&e.meta!=null&&Object.keys(e.meta).length>0&&(r.meta=e.meta),Array.isArray(e.enum)&&e.enum.length>0&&(r.enum=e.enum),e.hideFromUI===!0&&(r.hideFromUI=!0),oy(r)}function sy(e){let t=e.inputs.some(n=>n.name==="children"),r=e.inputs.some(n=>n.meta?.ts==="ReactNode");return!!(t||r||e.acceptsChildren===!0)}function oy(e){if(e.name==="children"&&(e.hideFromUI=!0,delete e.required),e.type==="object"&&e.defaultValue==null&&(e.hideFromUI=!0),e.type==="list"&&e.defaultValue==null&&(e.hideFromUI=!0),e.meta){let t=e.meta.ts;typeof t=="string"&&(t=t.trim(),t.endsWith("ReactNode")&&(t="ReactNode"),e.meta.ts=t,t==="ReactNode"&&(e.hideFromUI=!0))}return e}function Fq(e,t){let r=[...t.properties].sort((n,i)=>{let s=tt(e,n)||"zz",o=tt(e,i)||"zz";if(s==="inputs")return 1;let a=f1.indexOf(s),c=f1.indexOf(o);return a>-1?c>-1&&a>c?1:-1:c>-1?a>-1&&c<a?-1:1:s.localeCompare(o)});return e.ts.factory.updateObjectLiteralExpression(t,r)}var f1=["component","name","description"];function _q(e,t){return[...t].sort((n,i)=>{let s=tt(e,n)||"zz",o=tt(e,i)||"zz",a=m1.indexOf(s),c=m1.indexOf(o);return a>-1?c>-1&&a>c?1:-1:c>-1?a>-1&&c<a?-1:1:s.localeCompare(o)})}var m1=["name","type"];function Ia(e,t){for(let r of t.properties){if(!e.ts.isPropertyAssignment(r)||!e.ts.isIdentifier(r.name))continue;if(tt(e,r)==="canHaveChildren"){let{initializer:i}=r;return i.kind===e.ts.SyntaxKind.TrueKeyword}}return!1}function h1(e,t){let r=`Builder.registerComponent(
|
|
177
177
|
`;if(e.appDir)t.acceptsChildren?r+=` withChildren(${t.importName}),
|
|
178
178
|
`:r+=` ${t.importName},
|
|
179
179
|
`;else{let i=t.externalImportPath?t.externalImportPath:je(e,e.registryPath,t.filePath);t.exportName==="default"?t.acceptsChildren?r+=` withChildren(dynamic(() => import(${JSON.stringify(i)}))),
|
|
@@ -193,7 +193,7 @@ ${r}=${n}
|
|
|
193
193
|
`+i)),e=i+`
|
|
194
194
|
`+e}return e.trim()+`
|
|
195
195
|
`}function uy(e,t){return t.sort((r,n)=>{let i=w1(e,r),s=w1(e,n);return i.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())})}function w1(e,t){let r=t.importClause;if(r){let n=r.namedBindings;if(n&&e.ts.isNamedImports(n)&&n.elements.length>0)return n.elements[0].name.text;if(r.name)return r.name.text}return t.moduleSpecifier&&e.ts.isStringLiteral(t.moduleSpecifier)?t.moduleSpecifier.text:""}function T1(e){return typeof e=="string"&&!e.includes("'use client'")&&!e.includes(`"use client"'`)&&(e=`"use client"
|
|
196
|
-
${e}`),e}function A1(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function xi(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let i=S1(e,r),s=S1(e,n);return i.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function S1(e,t){let r=t.properties.find(n=>tt(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}f();async function P1(e){let t=await e.readFile(e.registryPath);return t?Wq(e,t):{components:[],sourceFile:Ue(e,"")}}async function Wq(e,t){let r=Ue(e,t);return e.sdkVersion===xe.gen2?Jq(e,r):Yq(e,r)}async function Yq(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let u=s.arguments;if(u.length<2)continue;let l=u[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=u[0];if(e.ts.isCallExpression(p)){let d=e.ts.isIdentifier(p.expression)&&p.expression.text;if(d==="withChildren"){let m=dy(e,p.arguments[0]);if(e.ts.isCallExpression(m)){let g=await ly(e,n,m,l,!0);g&&r.push(g)}else{let g=m;if(e.ts.isIdentifier(g)){let y=await py(e,t,n,g,l,!0);y&&r.push(y)}}continue}if(d==="dynamic"){let m=await ly(e,n,p,l,!1);m&&r.push(m);continue}let h=dy(e,p.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let m=await ly(e,n,h,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(h)){let m=await py(e,t,n,h,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(p)){let d=await py(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:jr(r)}}function dy(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:dy(e,t.arguments[0]):t}async function ly(e,t,r,n,i){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:i,framework:"react"},o=r.arguments;if(o.length===0)return null;let a=o[0];if(!e.ts.isArrowFunction(a))return null;let c=a.body;if(e.ts.isCallExpression(c)){if(c.expression.kind!==e.ts.SyntaxKind.ImportKeyword||c.arguments.length!==1)return null;let l=c.arguments[0];if(!e.ts.isStringLiteral(l))return null;let p=l.text,d=await Ba(e,p);s.filePath=d,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(d)?s.importPath=dt(e,s.filePath):(s.externalImportPath=p,s.importPath=s.externalImportPath),s.name=xn(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(c)){let u=c.expression;if(!e.ts.isParenthesizedExpression(u))return null;let l=u.expression;if(!e.ts.isAwaitExpression(l))return null;let p=l.expression;if(!e.ts.isCallExpression(p)||p.expression.kind!==e.ts.SyntaxKind.ImportKeyword||p.arguments.length!==1)return null;let h=p.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(c.name))return null;let m=h.text,g=await Ba(e,m);s.filePath=g,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(g)?s.importPath=dt(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=pt(c.name.text),s.importName=c.name.text,s.exportName=c.name.text,s.exportType="named"}else return null;return s=Gr(e,s,n),s.displayFilePath=Ke(e,s.filePath),s.filePath&&s.exportName&&(s.id=await at(e,s.filePath,s.exportName,s.externalImportPath)),s}async function py(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(u=>e.ts.isImportDeclaration(u)),c=a.find(u=>u.importClause&&u.importClause.name?.text===n.text);if(c){let u=c.moduleSpecifier;if(!e.ts.isStringLiteral(u))return null;let l=await Ba(e,u.text);o.filePath=l,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(l)?o.importPath=dt(e,o.filePath):(o.externalImportPath=u.text,o.importPath=o.externalImportPath),o.name=xn(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let u=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!u)return null;let l=u.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await Ba(e,l.text);o.filePath=p,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=dt(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=pt(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Gr(e,o,i),o.displayFilePath=Ke(e,o.filePath),o.filePath&&o.exportName&&(o.id=await at(e,o.filePath,o.exportName,o.externalImportPath)),o}function Ba(e,t){return Fu(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function F1(e,t,r){let n=!1,i=0,s=[...t.statements];for(let u=0;u<s.length;u++){let l=s[u];if(e.ts.isImportDeclaration(l)){i=u;continue}if(!e.ts.isExpressionStatement(l))continue;let p=l.expression;if(!e.ts.isCallExpression(p))continue;let d=p.expression;if(!e.ts.isPropertyAccessExpression(d))continue;let h=d.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(d.name.text=="init"){n=!0;break}else continue}if(n)return t;let o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(gi)),a=r?e.ts.factory.createNonNullExpression(o):o,c=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(i+1,0,c),e.ts.factory.updateSourceFile(t,s)}async function Jq(e,t){let r=[],n=Ut(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await fy(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:jr(r)}}async function fy(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ia(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(tt(e,s)==="component"){let a,{initializer:c}=s;if(e.ts.isCallExpression(c)&&(e.ts.isIdentifier(c.expression)&&c.expression.text)==="dynamic"){let h=c.arguments;if(h.length===0)return null;let m=h[0];if(!e.ts.isArrowFunction(m))return null;let g=m.body;if(e.ts.isCallExpression(g)){if(g.expression.kind!==e.ts.SyntaxKind.ImportKeyword||g.arguments.length!==1)return null;let b=g.arguments[0];if(!e.ts.isStringLiteral(b))return null;let v=b.text,C=await Ba(e,v);n.filePath=C,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(C)?n.importPath=dt(e,n.filePath):(n.externalImportPath=v,n.importPath=n.externalImportPath),n.name=xn(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(g)){let y=g.expression;if(!e.ts.isParenthesizedExpression(y))return null;let b=y.expression;if(!e.ts.isAwaitExpression(b))return null;let v=b.expression;if(!e.ts.isCallExpression(v)||v.expression.kind!==e.ts.SyntaxKind.ImportKeyword||v.arguments.length!==1)return null;let x=v.arguments[0];if(!e.ts.isStringLiteral(x)||!e.ts.isIdentifier(g.name))return null;let D=x.text,E=await Ba(e,D);n.filePath=E,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(E)?n.importPath=dt(e,n.filePath):(n.externalImportPath=D,n.importPath=n.externalImportPath),n.name=pt(g.name.text),n.importName=g.name.text,n.exportName=g.name.text,n.exportType="named"}else return null;return n=Gr(e,n,r),n.displayFilePath=Ke(e,n.filePath),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(c)&&(a=c.text),!a)continue;n.name===""&&(n.name=pt(a)),n.importName=a;let u=await yi(e,e.registryPath,t,a);if(!u)continue;n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=dt(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.importPath=dt(e,u.filePath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(g=>g.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=Gr(e,n,r),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}f();function vi(e,t){let r=[...t.statements],n=!1;for(let i=t.statements.length-1;i>=0;i--){let s=t.statements[i];if(e.ts.isImportDeclaration(s)&&s.importClause){let o=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let c=[...a.elements];for(let u=c.length-1;u>=0;u--){let l=c[u];if(e.ts.isImportSpecifier(l)){let p=l.name;if(p&&e.ts.isIdentifier(p)){let d=p.text;_1(e,t,d)||c.splice(u,1)}}}if(c.length===0)o=!0;else if(a.elements.length!==c.length){let u=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(c)),l=e.ts.factory.updateImportDeclaration(s,void 0,u,s.moduleSpecifier,void 0);r[i]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let c=s.importClause.name.text;_1(e,t,c)||(o=!0)}o&&(r.splice(i,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function _1(e,t,r){let n=!1;function i(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,i)}}return e.ts.forEachChild(t,i),n}f();function Di(e,t,r,n,i,s,o){let a=null,c=null,u=null,l=-1;t=sn(t),r=sn(r);let p=t.find(h=>h.id===e),d=r.find(h=>h.id===e);if(n)d||(a={...sn(p),inputs:sn(p.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof d?.nodeIndex=="number"&&d.nodeIndex>-1){if(i)l=d.nodeIndex,c=sn(d),r=r.filter(h=>h.id!==e);else if(s!=null)Xq(d,s),l=d.nodeIndex,u=d;else if(o!=null){let h=d.inputs.find(m=>m.name===o.name);h&&(o.registerInput===!1?h.isRegistered=!1:(Qq(h,o),h.isRegistered=!0),u=d,l=d.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:c,updateRegisteredCmp:u,nodeIndex:l,components:Wn(t,r)}}function Wn(e,t){let r=jr([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(i=>i.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(oy),n.inputs.sort((o,a)=>o.name.toLowerCase().localeCompare(a.name.toLowerCase()));let i=t.find(o=>o.id===n.id);i&&(i.acceptsChildren=sy(n));let s=e.find(o=>o.id===n.id&&o.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function Xq(e,t){wr(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),wr(t.description)?e.description=t.description:t.description===null&&delete e.description,wr(t.image)?e.image=t.image:t.image===null&&delete e.image}function Qq(e,t){wr(t.type)&&(e.type=t.type),wr(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,wr(t.defaultValue)||Cu(t.defaultValue)||Aa(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,wr(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}f();async function ks(e){let t=new Set,r=async i=>{let s=await e.readdir(i);await Promise.all(s.map(async o=>{if(o.startsWith(".")||o==="node_modules")return;let a=e.join(i,o),c=e.extname(o).toLowerCase();if(c===".tsx"||c===".jsx"||c===".ts"||c===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await zt(e,[...t])}f();function Ci(e,t,r){return ka(e,t,r.variableName)?t:Zq(e,t,r)}function Zq(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,i=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,i),o=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),c=e.ts.factory.createVariableStatement([a],o),u=[...t.statements,c];return e.ts.factory.updateSourceFile(t,u)}async function Ei(e,t,r,n,i,s,o,a){let c=await ks(e),[u,l,p,d]=await Promise.all([E1(e,c),P1(e),Sr(e),Su(e)]),h=u.map(C=>C.cmpInfo),m=l.components,g={components:Wn(h,m),registryPath:e.registryPath,registryDisplayPath:Ke(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await Ra(e,g.components),g;let y=!1,b=l.sourceFile,v=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(v.length>0){let C=v.map(E=>{let S=u.find(T=>T.cmpInfo.id===E);if(!S)throw new Error(`Component ${E} not found`);return S}),x=Array.from(new Set(C.map(E=>E.cmpInfo.filePath))),D=await zt(e,x);for(let E of C){let S=g.components.find(P=>P.id===E.cmpInfo.id),T=await Oa(e,E,D,e.registryPath===E.cmpInfo.filePath||fr(E.cmpInfo.filePath));on(S,T);let F=h.findIndex(P=>P.id===E.cmpInfo.id);h[F].inputs=T;let A=Di(E.cmpInfo.id,h,m,r,n,i,s);if(e.sdkVersion===xe.gen2){let{elements:P,elmIndex:j,statementIndex:Y,statement:J,variableDeclaration:I}=await rG(e,b,E);if(A.addCmpToRegistry)P.push(tG(e,A.addCmpToRegistry)),y=!0;else if(A.removeCmpFromRegistry)P.splice(j,1),y=!0;else if(A.updateRegisteredCmp){let k=Ht(e,P[j],A.updateRegisteredCmp);P[j]=e.ts.factory.updateObjectLiteralExpression(k,[k1(e,A.updateRegisteredCmp),...k.properties.slice(1)]),y=!0}if(y&&o){let k=[...b.statements];k[Y]=e.ts.factory.updateVariableStatement(J,J.modifiers,e.ts.factory.updateVariableDeclarationList(J.declarationList,[e.ts.factory.updateVariableDeclaration(I,I.name,I.exclamationToken,I.type,e.ts.factory.createArrayLiteralExpression(xi(e,P)))])),b=e.ts.factory.updateSourceFile(b,k),b=I1(e,A,b),b=Ge(e,b,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),b=Ci(e,b,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=A.components,m=A.components.filter(B=>B.isRegistered)}}else{let P=[...b.statements];A.addCmpToRegistry?(P.push(h1(e,A.addCmpToRegistry)),y=!0):A.removeCmpFromRegistry?(P.splice(A.nodeIndex,1),y=!0):A.updateRegisteredCmp&&(P[A.nodeIndex]=ay(e,P[A.nodeIndex],A.updateRegisteredCmp),y=!0),y&&o&&(b=e.ts.factory.updateSourceFile(b,P),b=Ge(e,b,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),b=F1(e,b,p),b=I1(e,A,b),S?.acceptsChildren&&(b=Ge(e,b,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g.components=A.components,m=A.components.filter(j=>j.isRegistered))}}}if(y&&o){b=vi(e,b),b=bi(e,b),e.appDir&&(b=A1(e,b));let C=Vt(e,b);C=Vn(C),e.appDir&&(C=T1(C)),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}return g}function k1(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",nG(e,t))}function eG(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function tG(e,t){return Ht(e,e.ts.factory.createObjectLiteralExpression([k1(e,t),...t.acceptsChildren?[eG(e)]:[]],!0),t)}async function rG(e,t,r){let n=Ut(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await fy(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}function I1(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let i=n.externalImportPath?n.externalImportPath:je(e,e.registryPath,n.filePath);n.exportType==="default"?r=Ge(e,r,{defaultImport:n.importName,importPath:i}):n.exportType==="named"&&(r=Ge(e,r,{namedImports:[n.importName],importPath:i}))}}else r=Ge(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function nG(e,t){let r=t.externalImportPath?t.externalImportPath:je(e,e.registryPath,t.filePath),n=t.exportName!=="default",i;n?i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):i=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),i);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}f();async function R1(e){let t=[],r=await cG(e,t);return await $1(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await sG(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await oG(e,e.pagesDir,t)),t}async function O1(e){let t=[];return await $1(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await iG(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await aG(e,e.pagesDir,t)),t}async function iG(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"figma-imports",n);if(!await e.exists(i)){let s=await e.formatCode(i,M1({sys:e,routePath:i,modelName:"figma-imports"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,B1(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function sG(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"[...page]",n);if(!await e.exists(i)){let s=await e.formatCode(i,M1({sys:e,routePath:i,modelName:"page"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,B1(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function B1(e){let t=e.typescriptEnabled;return e.sdkVersion===xe.gen2?`
|
|
196
|
+
${e}`),e}function A1(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function xi(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let i=S1(e,r),s=S1(e,n);return i.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function S1(e,t){let r=t.properties.find(n=>tt(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}f();async function P1(e){let t=await e.readFile(e.registryPath);return t?Wq(e,t):{components:[],sourceFile:Ue(e,"")}}async function Wq(e,t){let r=Ue(e,t);return e.sdkVersion===xe.gen2?Jq(e,r):Yq(e,r)}async function Yq(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let u=s.arguments;if(u.length<2)continue;let l=u[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=u[0];if(e.ts.isCallExpression(p)){let d=e.ts.isIdentifier(p.expression)&&p.expression.text;if(d==="withChildren"){let m=dy(e,p.arguments[0]);if(e.ts.isCallExpression(m)){let g=await ly(e,n,m,l,!0);g&&r.push(g)}else{let g=m;if(e.ts.isIdentifier(g)){let y=await py(e,t,n,g,l,!0);y&&r.push(y)}}continue}if(d==="dynamic"){let m=await ly(e,n,p,l,!1);m&&r.push(m);continue}let h=dy(e,p.arguments[0]);if(e.ts.isCallExpression(h)&&e.ts.isIdentifier(h.expression)&&h.expression.text==="dynamic"){let m=await ly(e,n,h,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(h)){let m=await py(e,t,n,h,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(p)){let d=await py(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:jr(r)}}function dy(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:dy(e,t.arguments[0]):t}async function ly(e,t,r,n,i){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:i,framework:"react"},o=r.arguments;if(o.length===0)return null;let a=o[0];if(!e.ts.isArrowFunction(a))return null;let c=a.body;if(e.ts.isCallExpression(c)){if(c.expression.kind!==e.ts.SyntaxKind.ImportKeyword||c.arguments.length!==1)return null;let l=c.arguments[0];if(!e.ts.isStringLiteral(l))return null;let p=l.text,d=await Ba(e,p);s.filePath=d,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(d)?s.importPath=dt(e,s.filePath):(s.externalImportPath=p,s.importPath=s.externalImportPath),s.name=xn(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(c)){let u=c.expression;if(!e.ts.isParenthesizedExpression(u))return null;let l=u.expression;if(!e.ts.isAwaitExpression(l))return null;let p=l.expression;if(!e.ts.isCallExpression(p)||p.expression.kind!==e.ts.SyntaxKind.ImportKeyword||p.arguments.length!==1)return null;let h=p.arguments[0];if(!e.ts.isStringLiteral(h)||!e.ts.isIdentifier(c.name))return null;let m=h.text,g=await Ba(e,m);s.filePath=g,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(g)?s.importPath=dt(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=pt(c.name.text),s.importName=c.name.text,s.exportName=c.name.text,s.exportType="named"}else return null;return s=Gr(e,s,n),s.displayFilePath=Ke(e,s.filePath),s.filePath&&s.exportName&&(s.id=await at(e,s.filePath,s.exportName,s.externalImportPath)),s}async function py(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(u=>e.ts.isImportDeclaration(u)),c=a.find(u=>u.importClause&&u.importClause.name?.text===n.text);if(c){let u=c.moduleSpecifier;if(!e.ts.isStringLiteral(u))return null;let l=await Ba(e,u.text);o.filePath=l,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(l)?o.importPath=dt(e,o.filePath):(o.externalImportPath=u.text,o.importPath=o.externalImportPath),o.name=xn(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let u=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!u)return null;let l=u.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await Ba(e,l.text);o.filePath=p,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=dt(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=pt(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Gr(e,o,i),o.displayFilePath=Ke(e,o.filePath),o.filePath&&o.exportName&&(o.id=await at(e,o.filePath,o.exportName,o.externalImportPath)),o}function Ba(e,t){return Fu(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function F1(e,t,r){let n=!1,i=0,s=[...t.statements];for(let u=0;u<s.length;u++){let l=s[u];if(e.ts.isImportDeclaration(l)){i=u;continue}if(!e.ts.isExpressionStatement(l))continue;let p=l.expression;if(!e.ts.isCallExpression(p))continue;let d=p.expression;if(!e.ts.isPropertyAccessExpression(d))continue;let h=d.expression;if(!e.ts.isIdentifier(h)||h.text!=="builder")continue;if(d.name.text=="init"){n=!0;break}else continue}if(n)return t;let o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(gi)),a=r?e.ts.factory.createNonNullExpression(o):o,c=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(i+1,0,c),e.ts.factory.updateSourceFile(t,s)}async function Jq(e,t){let r=[],n=Ut(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await fy(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:jr(r)}}async function fy(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ia(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(tt(e,s)==="component"){let a,{initializer:c}=s;if(e.ts.isCallExpression(c)&&(e.ts.isIdentifier(c.expression)&&c.expression.text)==="dynamic"){let h=c.arguments;if(h.length===0)return null;let m=h[0];if(!e.ts.isArrowFunction(m))return null;let g=m.body;if(e.ts.isCallExpression(g)){if(g.expression.kind!==e.ts.SyntaxKind.ImportKeyword||g.arguments.length!==1)return null;let b=g.arguments[0];if(!e.ts.isStringLiteral(b))return null;let v=b.text,C=await Ba(e,v);n.filePath=C,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(C)?n.importPath=dt(e,n.filePath):(n.externalImportPath=v,n.importPath=n.externalImportPath),n.name=xn(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(g)){let y=g.expression;if(!e.ts.isParenthesizedExpression(y))return null;let b=y.expression;if(!e.ts.isAwaitExpression(b))return null;let v=b.expression;if(!e.ts.isCallExpression(v)||v.expression.kind!==e.ts.SyntaxKind.ImportKeyword||v.arguments.length!==1)return null;let x=v.arguments[0];if(!e.ts.isStringLiteral(x)||!e.ts.isIdentifier(g.name))return null;let D=x.text,E=await Ba(e,D);n.filePath=E,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(E)?n.importPath=dt(e,n.filePath):(n.externalImportPath=D,n.importPath=n.externalImportPath),n.name=pt(g.name.text),n.importName=g.name.text,n.exportName=g.name.text,n.exportType="named"}else return null;return n=Gr(e,n,r),n.displayFilePath=Ke(e,n.filePath),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(c)&&(a=c.text),!a)continue;n.name===""&&(n.name=pt(a)),n.importName=a;let u=await yi(e,e.registryPath,t,a);if(!u)continue;n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=dt(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.importPath=dt(e,u.filePath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(g=>g.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=Gr(e,n,r),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}f();function vi(e,t){let r=[...t.statements],n=!1;for(let i=t.statements.length-1;i>=0;i--){let s=t.statements[i];if(e.ts.isImportDeclaration(s)&&s.importClause){let o=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let c=[...a.elements];for(let u=c.length-1;u>=0;u--){let l=c[u];if(e.ts.isImportSpecifier(l)){let p=l.name;if(p&&e.ts.isIdentifier(p)){let d=p.text;_1(e,t,d)||c.splice(u,1)}}}if(c.length===0)o=!0;else if(a.elements.length!==c.length){let u=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(c)),l=e.ts.factory.updateImportDeclaration(s,void 0,u,s.moduleSpecifier,void 0);r[i]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let c=s.importClause.name.text;_1(e,t,c)||(o=!0)}o&&(r.splice(i,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function _1(e,t,r){let n=!1;function i(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,i)}}return e.ts.forEachChild(t,i),n}f();function Di(e,t,r,n,i,s,o){let a=null,c=null,u=null,l=-1;t=sn(t),r=sn(r);let p=t.find(h=>h.id===e),d=r.find(h=>h.id===e);if(n)d||(a={...sn(p),inputs:sn(p.inputs).map(h=>(h.isRegistered=!0,h))},l=r.length,r.push(a));else if(typeof d?.nodeIndex=="number"&&d.nodeIndex>-1){if(i)l=d.nodeIndex,c=sn(d),r=r.filter(h=>h.id!==e);else if(s!=null)Xq(d,s),l=d.nodeIndex,u=d;else if(o!=null){let h=d.inputs.find(m=>m.name===o.name);h&&(o.registerInput===!1?h.isRegistered=!1:(Qq(h,o),h.isRegistered=!0),u=d,l=d.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:c,updateRegisteredCmp:u,nodeIndex:l,components:Wn(t,r)}}function Wn(e,t){let r=jr([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(i=>i.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(oy),n.inputs.sort((o,a)=>o.name.toLowerCase().localeCompare(a.name.toLowerCase()));let i=t.find(o=>o.id===n.id);i&&(i.acceptsChildren=sy(n));let s=e.find(o=>o.id===n.id&&o.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function Xq(e,t){Er(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),Er(t.description)?e.description=t.description:t.description===null&&delete e.description,Er(t.image)?e.image=t.image:t.image===null&&delete e.image}function Qq(e,t){Er(t.type)&&(e.type=t.type),Er(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,Er(t.defaultValue)||Cu(t.defaultValue)||Aa(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,Er(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}f();async function ks(e){let t=new Set,r=async i=>{let s=await e.readdir(i);await Promise.all(s.map(async o=>{if(o.startsWith(".")||o==="node_modules")return;let a=e.join(i,o),c=e.extname(o).toLowerCase();if(c===".tsx"||c===".jsx"||c===".ts"||c===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await zt(e,[...t])}f();function Ci(e,t,r){return ka(e,t,r.variableName)?t:Zq(e,t,r)}function Zq(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,i=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,i),o=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),c=e.ts.factory.createVariableStatement([a],o),u=[...t.statements,c];return e.ts.factory.updateSourceFile(t,u)}async function Ei(e,t,r,n,i,s,o,a){let c=await ks(e),[u,l,p,d]=await Promise.all([E1(e,c),P1(e),wr(e),Su(e)]),h=u.map(C=>C.cmpInfo),m=l.components,g={components:Wn(h,m),registryPath:e.registryPath,registryDisplayPath:Ke(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await Ra(e,g.components),g;let y=!1,b=l.sourceFile,v=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(v.length>0){let C=v.map(E=>{let S=u.find(T=>T.cmpInfo.id===E);if(!S)throw new Error(`Component ${E} not found`);return S}),x=Array.from(new Set(C.map(E=>E.cmpInfo.filePath))),D=await zt(e,x);for(let E of C){let S=g.components.find(P=>P.id===E.cmpInfo.id),T=await Oa(e,E,D,e.registryPath===E.cmpInfo.filePath||fr(E.cmpInfo.filePath));on(S,T);let F=h.findIndex(P=>P.id===E.cmpInfo.id);h[F].inputs=T;let A=Di(E.cmpInfo.id,h,m,r,n,i,s);if(e.sdkVersion===xe.gen2){let{elements:P,elmIndex:j,statementIndex:Y,statement:J,variableDeclaration:I}=await rG(e,b,E);if(A.addCmpToRegistry)P.push(tG(e,A.addCmpToRegistry)),y=!0;else if(A.removeCmpFromRegistry)P.splice(j,1),y=!0;else if(A.updateRegisteredCmp){let k=Ht(e,P[j],A.updateRegisteredCmp);P[j]=e.ts.factory.updateObjectLiteralExpression(k,[k1(e,A.updateRegisteredCmp),...k.properties.slice(1)]),y=!0}if(y&&o){let k=[...b.statements];k[Y]=e.ts.factory.updateVariableStatement(J,J.modifiers,e.ts.factory.updateVariableDeclarationList(J.declarationList,[e.ts.factory.updateVariableDeclaration(I,I.name,I.exclamationToken,I.type,e.ts.factory.createArrayLiteralExpression(xi(e,P)))])),b=e.ts.factory.updateSourceFile(b,k),b=I1(e,A,b),b=Ge(e,b,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),b=Ci(e,b,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=A.components,m=A.components.filter(B=>B.isRegistered)}}else{let P=[...b.statements];A.addCmpToRegistry?(P.push(h1(e,A.addCmpToRegistry)),y=!0):A.removeCmpFromRegistry?(P.splice(A.nodeIndex,1),y=!0):A.updateRegisteredCmp&&(P[A.nodeIndex]=ay(e,P[A.nodeIndex],A.updateRegisteredCmp),y=!0),y&&o&&(b=e.ts.factory.updateSourceFile(b,P),b=Ge(e,b,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),b=F1(e,b,p),b=I1(e,A,b),S?.acceptsChildren&&(b=Ge(e,b,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g.components=A.components,m=A.components.filter(j=>j.isRegistered))}}}if(y&&o){b=vi(e,b),b=bi(e,b),e.appDir&&(b=A1(e,b));let C=Vt(e,b);C=Vn(C),e.appDir&&(C=T1(C)),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}return g}function k1(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",nG(e,t))}function eG(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function tG(e,t){return Ht(e,e.ts.factory.createObjectLiteralExpression([k1(e,t),...t.acceptsChildren?[eG(e)]:[]],!0),t)}async function rG(e,t,r){let n=Ut(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await fy(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}function I1(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let i=n.externalImportPath?n.externalImportPath:je(e,e.registryPath,n.filePath);n.exportType==="default"?r=Ge(e,r,{defaultImport:n.importName,importPath:i}):n.exportType==="named"&&(r=Ge(e,r,{namedImports:[n.importName],importPath:i}))}}else r=Ge(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function nG(e,t){let r=t.externalImportPath?t.externalImportPath:je(e,e.registryPath,t.filePath),n=t.exportName!=="default",i;n?i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):i=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),i);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}f();async function R1(e){let t=[],r=await cG(e,t);return await $1(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await sG(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await oG(e,e.pagesDir,t)),t}async function O1(e){let t=[];return await $1(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await iG(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await aG(e,e.pagesDir,t)),t}async function iG(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"figma-imports",n);if(!await e.exists(i)){let s=await e.formatCode(i,M1({sys:e,routePath:i,modelName:"figma-imports"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,B1(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function sG(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"[...page]",n);if(!await e.exists(i)){let s=await e.formatCode(i,M1({sys:e,routePath:i,modelName:"page"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,B1(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function B1(e){let t=e.typescriptEnabled;return e.sdkVersion===xe.gen2?`
|
|
197
197
|
"use client";
|
|
198
198
|
import { ${t?"BuilderContent, ":""} isPreviewing, Content } from "@builder.io/sdk-react";
|
|
199
199
|
import DefaultErrorPage from "next/error";
|
|
@@ -552,7 +552,7 @@ export default Counter;
|
|
|
552
552
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
553
553
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
554
554
|
];
|
|
555
|
-
`}f();async function Ma(e){let t=await Kn(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return xe.gen2;if(r.has("@builder.io/react"))return xe.gen1}return null}async function U1(e){let t=await pG(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>R1(t),ensureFigmaImportPage:()=>O1(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Ei(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Ei(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Ei(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Ei(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Ei(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Ei(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Su(t),setPublicApiKey:n=>u1(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function pG(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await dG(e),i=await
|
|
555
|
+
`}f();async function Ma(e){let t=await Kn(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return xe.gen2;if(r.has("@builder.io/react"))return xe.gen1}return null}async function U1(e){let t=await pG(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>R1(t),ensureFigmaImportPage:()=>O1(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Ei(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Ei(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Ei(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Ei(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Ei(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Ei(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Su(t),setPublicApiKey:n=>u1(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function pG(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await dG(e),i=await wr(e),s=e.getFrameworks().find(u=>u.name==="next"),o={asyncParams:s?.version?.major!==void 0&&s.version.major>=15},a={},c={...e,addExternalPackage:u=>{a[e.join(t,u,"index.ts")]=`export * from "${u}";`},readFileSync:u=>a[u]??e.readFileSync(u),existsSync:u=>!!a[u]||e.existsSync(u),readdirSync:u=>{let l=e.readdirSync(u);return u===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},readdir:async u=>{let l=await e.readdir(u);return u===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},appDir:null,pagesDir:null,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",nextConfigPath:n,typescriptEnabled:i,features:o};if(e.sdkVersion?c.sdkVersion=e.sdkVersion:c.sdkVersion=await Ma(c),await e.exists(r)){c.srcDir=r,c.componentsDir=e.join(r,"components");let u=e.join(r,"app");await e.exists(u)&&(c.appDir=u);let l=e.join(r,"pages");await e.exists(l)&&(c.pagesDir=l),c.registryPath=await qr(e,r)}else c.componentsDir=e.join(t,"components"),c.registryPath=await qr(e,t);if(c.builderComponentPath=e.join(c.componentsDir,`builder.${i?"tsx":"jsx"}`),!c.appDir){let u=e.join(t,"app");await e.exists(u)&&(c.appDir=u)}if(!c.pagesDir){let u=e.join(t,"pages");await e.exists(u)&&(c.pagesDir=u)}if(!c.appDir&&!c.pagesDir&&!e.ignoreMissingConfig)throw new Error(`Could not find Next.js "app" or "pages" directory. Searched in "${t}".`);return c}async function dG(e){let t=e.join(e.getAppRootDir(),"next.config.ts");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"next.config.mjs");if(await e.exists(r))return r;let n=e.join(e.getAppRootDir(),"next.config.js");if(await e.exists(n))return n;throw new Error(`Could not find Next.js config file. Searched for "next.config.ts", "next.config.mjs" and "next.config.js" in "${e.getAppRootDir()}".`)}f();f();async function _u(e){return await mi(e,[".env"],q1)}async function j1(e,t){fG(t);let r=await _u(e),n=await hi(e,r.file,r.envKey,t);return{...r,modifiedType:n}}function fG(e){typeof process<"u"&&(process.env[q1]=e)}var q1="PUBLIC_BUILDER_API_KEY";f();f();function G1(e,t,r){if(r.length===0)return e;let n=e.split(`
|
|
556
556
|
`),i=n.findIndex(a=>a.includes(r));if(i===-1||n.some(a=>a.includes(t[0])))return e;let o=["/**",...t.map(a=>` * ${a.trim()}`)," */"];return n.splice(i,0,...o),n.join(`
|
|
557
557
|
`)}f();async function H1(e,t){let r=[],n=t.getSourceFiles(),i=t.getTypeChecker();return await Promise.all(n.map(async s=>{let o=e.basename(s.fileName);if(o.startsWith(".")||gG.has(o))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let c=await _d(e,i,a,s);r.push(...c)})),r}async function K1(e,t){if(e.extname(t).toLowerCase()===".tsx"){let n=await e.readFile(t);if(n)return mG(e,t,n)}return null}function mG(e,t,r){let n=Ue(e,r);return _d(e,null,t,n)}async function _d(e,t,r,n){r=e.normalize(r);let i=[],s=So(e,n);return await Promise.all(s.map(async o=>{let a=await hG(e,t,r,o);a&&i.push(a)})),i}async function hG(e,t,r,n){let i=e.relative(e.getAppRootDir(),r),s=dt(e,r);if(e.ts.isVariableStatement(n.node))for(let o of n.node.declarationList.declarations){let a=z1(e,o.initializer);if(a&&e.ts.isIdentifier(o.name)){let c=o.name.text;return{cmpInfo:{id:await at(e,r,c),displayFilePath:Ke(e,r),name:pt(c),inputs:[],exportName:n.isDefaultExport?"default":c,exportType:n.isDefaultExport?"default":"named",importName:c,filePath:r,relFilePath:i,importPath:s,framework:"qwik"},node:a}}}else if(e.ts.isCallExpression(n.node)){let o=z1(e,n.node);if(o)return{cmpInfo:{id:await at(e,r,"default"),displayFilePath:Ke(e,r),name:xn(e,r),inputs:[],exportName:"default",exportType:"default",importName:Co(e,r),filePath:r,relFilePath:i,importPath:s,framework:"qwik"},node:o}}return null}function z1(e,t){if(t&&e.ts.isCallExpression(t)&&e.ts.isIdentifier(t.expression)&&t.expression.text==="component$"&&t.arguments.length>0){let r=t.arguments[0];if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))return{callExpression:t,fnNode:r}}return null}var gG=new Set(["node_modules","layout.tsx","404.tsx","router-head.tsx"]);f();async function V1(e,t){let r=t.node.fnNode;if((e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))&&r.parameters.length>0){let{sourceFile:i,typeChecker:s}=await Fa(e,t.cmpInfo.filePath,null);if(!(await _d(e,s,t.cmpInfo.filePath,i)).find(c=>c.cmpInfo.id===t.cmpInfo.id))throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return wo(e,s,r)}return[]}f();f();async function W1(e){return my(e)}async function my(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,yG),t.push({filePath:e.registryPath,modifiedType:"create"})),t}var yG=`import type { RegisteredComponent } from "@builder.io/sdk-qwik";
|
|
558
558
|
|
|
@@ -736,12 +736,12 @@ export default Counter;
|
|
|
736
736
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
737
737
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
738
738
|
];
|
|
739
|
-
`}async function sT(e){let t=await BG(e);return{builderPageOptions:async()=>{let n="/builder-demo",i=t.hasLocaleParam?`/en-us${n}`:void 0;return{templateContentId:"a5c9eef7909d4fc99554264a17de22c9",pathname:n,localePathname:i,title:"Builder + Remix Demo Page"}},ensureBuilderSetup:()=>rT(t),ensureFigmaImportPage:()=>nT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>wi(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await wi(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>wi(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>wi(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>wi(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>wi(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Iu(t),setPublicApiKey:n=>Q1(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function BG(e){let t=await LG(e),r=e.getAppRootDir(),n=await $G(e),i=e.dirname(n),s=e.join(i,"components"),o=await
|
|
739
|
+
`}async function sT(e){let t=await BG(e);return{builderPageOptions:async()=>{let n="/builder-demo",i=t.hasLocaleParam?`/en-us${n}`:void 0;return{templateContentId:"a5c9eef7909d4fc99554264a17de22c9",pathname:n,localePathname:i,title:"Builder + Remix Demo Page"}},ensureBuilderSetup:()=>rT(t),ensureFigmaImportPage:()=>nT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>wi(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await wi(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>wi(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>wi(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>wi(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>wi(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Iu(t),setPublicApiKey:n=>Q1(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function BG(e){let t=await LG(e),r=e.getAppRootDir(),n=await $G(e),i=e.dirname(n),s=e.join(i,"components"),o=await wr(e),a=await qr(e,i),c={},u={...e,registryPath:a,remixConfigPath:t,typescriptEnabled:o,appDir:i,componentsDir:s,routesDir:n,hasLocaleParam:await MG(e,n),addExternalPackage:l=>{c[e.join(r,l,"index.ts")]=`export * from "${l}";`},readFileSync:l=>c[l]??e.readFileSync(l),existsSync:l=>!!c[l]||e.existsSync(l),readdirSync:l=>{let p=e.readdirSync(l);return l===r?[...p,...Object.keys(c).map(d=>d.slice(r.length+1))]:p},readdir:async l=>{let p=await e.readdir(l);return l===r?[...p,...Object.keys(c).map(d=>d.slice(r.length+1))]:p}};return e.sdkVersion?u.sdkVersion=e.sdkVersion:u.sdkVersion=await Ma(u),u}async function MG(e,t){return(await e.readdir(t)).some(n=>n.startsWith("($locale)."))}async function LG(e){let t=["remix.config.ts","remix.config.js","vite.config.ts","vite.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Remix config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function $G(e){let t=await Eu(e,e.getAppRootDir(),"routes");if(t)return t;throw new Error(`Could not find Remix "routes" directory in "${e.getAppRootDir()}". Please ensure this command is ran from within your Remix project's directory.`)}f();f();async function Nu(e){let t=[".env"],r=e.configType==="vite"?Ru:kd;return await mi(e,t,r)}async function oT(e,t){let r=await Nu(e),n=await hi(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Ru="VITE_PUBLIC_BUILDER_KEY",kd="PUBLIC_BUILDER_KEY";f();f();function aT(e,t){let r=`Builder.registerComponent(
|
|
740
740
|
`;r+=` ${t.importName},
|
|
741
741
|
`,r+=` {
|
|
742
742
|
name: "${t.name}",
|
|
743
743
|
}
|
|
744
|
-
`,r+=");";let n=Sd(e,r);return yy(e,n,t)}function yy(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let i=[...n.arguments];if(i.length<2)return t;let s=i[1];return e.ts.isObjectLiteralExpression(s)?(i[1]=Ht(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,i))):t}f();async function cT(e){let t=await e.readFile(e.registryPath);return t?UG(e,t):{components:[],sourceFile:Ue(e,"")}}async function UG(e,t){let r=Ue(e,t);return e.sdkVersion===xe.gen2?GG(e,r):jG(e,r)}async function jG(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let u=s.arguments;if(u.length<2)continue;let l=u[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=u[0];if(e.ts.isIdentifier(p)){let d=await qG(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:jr(r)}}async function qG(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(u=>e.ts.isImportDeclaration(u)),c=a.find(u=>u.importClause&&u.importClause.name?.text===n.text);if(c){let u=c.moduleSpecifier;if(!e.ts.isStringLiteral(u))return null;o.filePath=await by(e,u.text),o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),o.importPath=dt(e,o.filePath),o.name=xn(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let u=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!u)return null;let l=u.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await by(e,l.text);o.filePath=await by(e,l.text),o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=dt(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=pt(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Gr(e,o,i),o.displayFilePath=Ke(e,o.filePath),o.filePath&&o.exportName&&(o.id=await at(e,o.filePath,o.exportName,o.externalImportPath)),o}function by(e,t){return Fu(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function GG(e,t){let r=[],n=Ut(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await xy(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:jr(r)}}async function xy(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ia(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(tt(e,s)==="component"){let a,{initializer:c}=s;if(e.ts.isIdentifier(c)&&(a=c.text),!a)continue;n.name===""&&(n.name=pt(a)),n.importName=a;let u=await yi(e,e.registryPath,t,a);if(!u)continue;n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=dt(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(g=>g.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=Gr(e,n,r),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Si(e,t,r,n,i,s,o,a){let c=await ks(e),[u,l,p,d]=await Promise.all([D1(e,c),cT(e),
|
|
744
|
+
`,r+=");";let n=Sd(e,r);return yy(e,n,t)}function yy(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let i=[...n.arguments];if(i.length<2)return t;let s=i[1];return e.ts.isObjectLiteralExpression(s)?(i[1]=Ht(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,i))):t}f();async function cT(e){let t=await e.readFile(e.registryPath);return t?UG(e,t):{components:[],sourceFile:Ue(e,"")}}async function UG(e,t){let r=Ue(e,t);return e.sdkVersion===xe.gen2?GG(e,r):jG(e,r)}async function jG(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let u=s.arguments;if(u.length<2)continue;let l=u[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=u[0];if(e.ts.isIdentifier(p)){let d=await qG(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:jr(r)}}async function qG(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(u=>e.ts.isImportDeclaration(u)),c=a.find(u=>u.importClause&&u.importClause.name?.text===n.text);if(c){let u=c.moduleSpecifier;if(!e.ts.isStringLiteral(u))return null;o.filePath=await by(e,u.text),o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),o.importPath=dt(e,o.filePath),o.name=xn(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let u=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(h=>h.name.text===n.text));if(!u)return null;let l=u.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await by(e,l.text);o.filePath=await by(e,l.text),o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=dt(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=pt(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Gr(e,o,i),o.displayFilePath=Ke(e,o.filePath),o.filePath&&o.exportName&&(o.id=await at(e,o.filePath,o.exportName,o.externalImportPath)),o}function by(e,t){return Fu(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function GG(e,t){let r=[],n=Ut(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await xy(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:jr(r)}}async function xy(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Ia(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(tt(e,s)==="component"){let a,{initializer:c}=s;if(e.ts.isIdentifier(c)&&(a=c.text),!a)continue;n.name===""&&(n.name=pt(a)),n.importName=a;let u=await yi(e,e.registryPath,t,a);if(!u)continue;n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=dt(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(g=>g.name.text===a));if(!d)return null;let h=d.moduleSpecifier;if(!e.ts.isStringLiteral(h))return null;n.exportName=a}continue}}return n=Gr(e,n,r),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Si(e,t,r,n,i,s,o,a){let c=await ks(e),[u,l,p,d]=await Promise.all([D1(e,c),cT(e),wr(e),Nu(e)]),h=u.map(C=>C.cmpInfo),m=l.components,g={components:Wn(h,m),registryPath:e.registryPath,registryDisplayPath:Ke(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(h),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return g.components=await Ra(e,g.components),g;let y=!1,b=l.sourceFile,v=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(v.length>0){let C=v.map(E=>{let S=u.find(T=>T.cmpInfo.id===E);if(!S)throw new Error(`Component ${E} not found`);return S}),x=Array.from(new Set(C.map(E=>E.cmpInfo.filePath))),D=await zt(e,x);for(let E of C){let S=g.components.find(P=>P.id===E.cmpInfo.id),T=await Oa(e,E,D,e.registryPath===E.cmpInfo.filePath||fr(E.cmpInfo.filePath));on(S,T);let F=h.findIndex(P=>P.id===E.cmpInfo.id);h[F].inputs=T;let A=Di(E.cmpInfo.id,h,m,r,n,i,s);if(e.sdkVersion===xe.gen2){let{elements:P,elmIndex:j,statementIndex:Y,statement:J,variableDeclaration:I}=await zG(e,b,E);if(A.addCmpToRegistry)P.push(HG(e,A.addCmpToRegistry)),y=!0;else if(A.removeCmpFromRegistry)P.splice(j,1),y=!0;else if(A.updateRegisteredCmp){let k=Ht(e,P[j],A.updateRegisteredCmp),B=e.ts.factory.createIdentifier(A.updateRegisteredCmp.importName);P[j]=e.ts.factory.updateObjectLiteralExpression(k,[e.ts.factory.createPropertyAssignment("component",B),...k.properties.slice(1)]),y=!0}if(y&&o){let k=[...b.statements];k[Y]=e.ts.factory.updateVariableStatement(J,J.modifiers,e.ts.factory.updateVariableDeclarationList(J.declarationList,[e.ts.factory.updateVariableDeclaration(I,I.name,I.exclamationToken,I.type,e.ts.factory.createArrayLiteralExpression(xi(e,P)))])),b=e.ts.factory.updateSourceFile(b,k),b=uT(e,A,b),b=Ge(e,b,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),b=Ci(e,b,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g.components=A.components,m=A.components.filter(B=>B.isRegistered)}}else{let P=[...b.statements];A.addCmpToRegistry?(P.push(aT(e,A.addCmpToRegistry)),y=!0):A.removeCmpFromRegistry?(P.splice(A.nodeIndex,1),y=!0):A.updateRegisteredCmp&&(P[A.nodeIndex]=yy(e,P[A.nodeIndex],A.updateRegisteredCmp),y=!0),y&&o&&(b=e.ts.factory.updateSourceFile(b,P),b=Ge(e,b,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),b=uT(e,A,b),S?.acceptsChildren&&(b=Ge(e,b,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g.components=A.components,m=A.components.filter(j=>j.isRegistered))}}}if(y&&o){b=vi(e,b),b=bi(e,b);let C=Vt(e,b);C=Vn(C),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}return g}async function zG(e,t,r){let n=Ut(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await xy(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}function HG(e,t){let r=e.ts.factory.createIdentifier(t.importName);return Ht(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",r),...t.acceptsChildren?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}function uT(e,t,r){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let i=n.externalImportPath?n.externalImportPath:je(e,e.registryPath,n.filePath);n.exportType==="default"?r=Ge(e,r,{defaultImport:n.importName,importPath:i}):n.exportType==="named"&&(r=Ge(e,r,{namedImports:[n.importName],importPath:i}))}return r}f();async function lT(e){let t=[],r=await KG(e,t);if(await fT(e,t,r),!await e.exists(e.builderComponentPath)){let n=await e.formatCode(e.builderComponentPath,dT(e,e.builderComponentPath));await e.writeFile(e.builderComponentPath,n),t.push({filePath:e.builderComponentPath,modifiedType:"create"})}return t}async function pT(e){let t=[];await fT(e,t);let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,n=e.join(e.componentsDir,r);if(!await e.exists(n)){let i=await e.formatCode(n,dT(e,n,"figma-imports"));await e.writeFile(n,i),t.push({filePath:n,modifiedType:"create"})}return t}function dT(e,t,r="page"){let n=e.typescriptEnabled;return e.sdkVersion===xe.gen2?`
|
|
745
745
|
import React from "react";
|
|
746
746
|
import {
|
|
747
747
|
Content,
|
|
@@ -919,7 +919,7 @@ export default Counter;
|
|
|
919
919
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
920
920
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
921
921
|
];
|
|
922
|
-
`}async function mT(e){let t=await YG(e);return{builderPageOptions:async()=>({templateContentId:"2e36438034894a8abf279ea9e6d3596f",pathname:"/builder-demo",title:"Builder + React Demo Page"}),ensureBuilderSetup:()=>lT(t),ensureFigmaImportPage:()=>pT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Si(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Si(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Si(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Si(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Si(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Si(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Nu(t),setPublicApiKey:n=>oT(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function YG(e){let t=await JG(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await
|
|
922
|
+
`}async function mT(e){let t=await YG(e);return{builderPageOptions:async()=>({templateContentId:"2e36438034894a8abf279ea9e6d3596f",pathname:"/builder-demo",title:"Builder + React Demo Page"}),ensureBuilderSetup:()=>lT(t),ensureFigmaImportPage:()=>pT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Si(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Si(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Si(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Si(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Si(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Si(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Nu(t),setPublicApiKey:n=>oT(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function YG(e){let t=await JG(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await wr(e),s={},o={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",reactConfigPath:t,typescriptEnabled:i,configType:"",addExternalPackage:a=>{s[e.join(r,a,"index.ts")]=`export * from "${a}";`},readFileSync:a=>s[a]??e.readFileSync(a),existsSync:a=>!!s[a]||e.existsSync(a),readdirSync:a=>{let c=e.readdirSync(a);return a===r?[...c,...Object.keys(s).map(u=>u.slice(r.length+1))]:c},readdir:async a=>{let c=await e.readdir(a);return a===r?[...c,...Object.keys(s).map(u=>u.slice(r.length+1))]:c}};return e.sdkVersion?o.sdkVersion=e.sdkVersion:o.sdkVersion=await Ma(o),t.includes("webpack.config")&&(o.configType="webpack"),t.includes("vite.config")&&(o.configType="vite"),await e.exists(n)?(o.srcDir=n,o.componentsDir=e.join(n,"components"),o.registryPath=await qr(e,n),o.builderComponentPath=e.join(o.srcDir,`builder-page.${i?"tsx":"jsx"}`)):(o.componentsDir=e.join(r,"components"),o.registryPath=await qr(e,r),o.builderComponentPath=e.join(r,`builder-page.${i?"tsx":"jsx"}`)),o}async function JG(e){let t=["vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find React config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}f();f();async function Ou(e){return await XG(e,["environment.ts"],Nd)}async function hT(e,t){let r=await Ou(e),n=await tz(e,r.file,r.envKey,t);return{...r,modifiedType:n}}async function XG(e,t,r){let n={envKey:r,envValue:null,file:""};for(let i of t){let s=e.join(e.getAppRootDir(),"src","environments",i),o=await QG(e,s);if(typeof o=="string"&&o.length>0&&o!=="YOUR_API_KEY")return n.envValue=o,n.file=s,n}return n.file=e.join(e.getAppRootDir(),"src","environments",t[t.length-1]),n}async function QG(e,t){let r=await e.readFile(t);return r?ZG(e,r):""}function ZG(e,t){let r=Ue(e,t),n="",s=ka(e,r,"environment");if(s&&s.statement.declarationList.declarations.length>0){let a=s.statement.declarationList.declarations[0].initializer;a&&e.ts.isObjectLiteralExpression(a)&&a.properties.forEach(c=>{e.ts.isPropertyAssignment(c)&&e.ts.isIdentifier(c.name)&&c.name.text===Nd&&e.ts.isStringLiteral(c.initializer)&&(n=c.initializer.text)})}return n}async function ez(e,t,r,n){let i=Ue(e,t),o=ka(e,i,"environment");if(o&&o.statement.declarationList.declarations.length>0){let a=o.statement.declarationList,c=a.declarations[0],u=c.initializer;if(u&&e.ts.isObjectLiteralExpression(u)){let l=e.ts.factory.createPropertyAssignment(e.ts.factory.createIdentifier(r),e.ts.factory.createStringLiteral(n)),p=e.ts.factory.createNodeArray([...u.properties,l]),d=e.ts.factory.updateObjectLiteralExpression(u,p),h=e.ts.factory.updateVariableDeclaration(c,c.name,c.exclamationToken,c.type,d),m=e.ts.factory.updateVariableDeclarationList(a,[h]);return e.ts.factory.updateVariableStatement(o.statement,o.statement.modifiers,m)}return null}return null}async function tz(e,t,r,n){let i=await e.readFile(t);if(i)if(i.includes(r))e.debug(`"${r}" already set in ${t}`);else{e.debug(`Add "${r}" to ${t}`);let s=await ez(e,i,r,n);if(s){let o=Vt(e,s),a=await e.formatCode(t,o);await e.writeFile(t,a)}return"update"}else{e.debug(`Creating new env file with "${r}" at ${t}`);let s=`
|
|
923
923
|
// https://www.builder.io/c/docs/using-your-api-key
|
|
924
924
|
export const environment = {
|
|
925
925
|
production: false,
|
|
@@ -1064,7 +1064,7 @@ export class Counter {
|
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
|
|
1067
|
-
`.trimStart()}async function $T(e){await Ud(e);let t=await e.readFile(e.registryPath);return t?Pz(e,t):{components:[],sourceFile:Ue(e,"")}}async function Pz(e,t){let r=Ue(e,t);return Fz(e,r)}async function Fz(e,t){let r=[],n=Ut(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await _y(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:jr(r)}}async function _y(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(tt(e,i)==="component"){let o,{initializer:a}=i;if(e.ts.isIdentifier(a))o=a.text;else if(e.ts.isCallExpression(a)){let u=a.arguments[0];e.ts.isIdentifier(u)&&(o=u.text)}if(!o)continue;n.name===""&&(n.name=pt(o)),n.importName=o;let c=await yi(e,e.registryPath,t,o);if(!c)continue;if(n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=dt(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType,n.externalImportPath)n.exportName=o;else{let u=await bT(e,c.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let l=u.find(p=>p.cmpInfo.exportName===o);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=Gr(e,n,r),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Ti(e,t,r,n,i,s,o,a){let c=await ks(e),[u,l,p]=await Promise.all([yT(e,c),$T(e),Ou(e)]),d=u.map(v=>v.cmpInfo),h=l.components,m={components:Wn(d,h),registryPath:e.registryPath,registryDisplayPath:Ke(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await xT(e,u,m.components),m;let g=!1,y=l.sourceFile,b=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(b.length>0){let v=b.map(D=>{let E=u.find(S=>S.cmpInfo.id===D);if(!E)throw new Error(`Component ${D} not found`);return E}),C=Array.from(new Set(v.map(D=>D.cmpInfo.filePath))),x=await zt(e,C);for(let D of v){let E=m.components.find(I=>I.id===D.cmpInfo.id),S=await vy(e,D,x);on(E,S);let T=d.findIndex(I=>I.id===D.cmpInfo.id);d[T].inputs=S;let F=Di(D.cmpInfo.id,d,h,r,n,i,s),{elements:A,elmIndex:P,statementIndex:j,statement:Y,variableDeclaration:J}=await Iz(e,y,D);if(F.addCmpToRegistry)A.push(_z(e,F.addCmpToRegistry)),g=!0;else if(F.removeCmpFromRegistry)A.splice(P,1),g=!0;else if(F.updateRegisteredCmp){let I=Ht(e,A[P],F.updateRegisteredCmp);A[P]=e.ts.factory.updateObjectLiteralExpression(I,[UT(e,F.updateRegisteredCmp),...I.properties.slice(1)]),g=!0}if(g&&o){let I=[...y.statements];I[j]=e.ts.factory.updateVariableStatement(Y,Y.modifiers,e.ts.factory.updateVariableDeclarationList(Y.declarationList,[e.ts.factory.updateVariableDeclaration(J,J.name,J.exclamationToken,J.type,e.ts.factory.createArrayLiteralExpression(xi(e,A)))])),y=e.ts.factory.updateSourceFile(y,I),E.exportType==="named"?y=Ge(e,y,{namedImports:[E.importName],importPath:E.externalImportPath?E.externalImportPath:je(e,e.registryPath,E.filePath)}):y=Ge(e,y,{defaultImport:E.importName,importPath:E.externalImportPath?E.externalImportPath:je(e,e.registryPath,E.filePath)}),y=Ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),y=Ci(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=F.components,h=F.components.filter(k=>k.isRegistered)}}}if(g&&o){y=vi(e,y),y=bi(e,y);let v=Vt(e,y);v=Vn(v),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}return m}function UT(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function _z(e,t){return Ht(e,e.ts.factory.createObjectLiteralExpression([UT(e,t)],!0),t)}async function Iz(e,t,r){let n=Ut(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await _y(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}async function jT(e){let t=await kz(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>BT(t),ensureFigmaImportPage:()=>MT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Ti(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Ti(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Ti(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Ti(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Ti(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Ti(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ou(t),setPublicApiKey:n=>hT(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function kz(e){let t=await Nz(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await Sr(e),s=e.join(n,"app"),o=await qr(e,s),a={},c={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:o,angularConfigPath:t,typescriptEnabled:i,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:p=>{a[e.join(r,p,"index.ts")]=`export * from "${p}";`},readFileSync:p=>a[p]??e.readFileSync(p),existsSync:p=>!!a[p]||e.existsSync(p),readdirSync:p=>{let d=e.readdirSync(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d},readdir:async p=>{let d=await e.readdir(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);c.srcDir=n,c.appDir=s,c.componentsDir=e.join(c.appDir,"components"),c.builderPageComponentPath=e.join(c.componentsDir,`builder-page.component.${i?"ts":"js"}`);let u=`app.module.${i?"ts":"js"}`,l=e.join(c.appDir,u);return await e.exists(l)&&(c.hasAppModule=!0),c}async function Nz(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}f();f();async function Lu(e){let t=e.configType==="vite"?Rz:Oz;return await mi(e,[".env"],t)}async function qT(e,t){let r=await Lu(e),n=await hi(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Rz="VITE_PUBLIC_BUILDER_KEY",Oz="PUBLIC_BUILDER_KEY";f();f();async function zT(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let i=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",o=$z(s),a=Mz(n,r),c=Bz(n);return{id:Uz(t),name:o,filePath:i,relFilePath:i,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:o,importPath:i,vueApiType:c}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function Bz(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function Mz(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let c of n){let u;for(;(u=c.exec(e))!==null;){let l=u[1];l.includes(":")?r.push(...Iy(l)):r.push(...GT(l))}}let i=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=i.exec(e))!==null;){let c=s[1];if(c.startsWith("{")){let u=c.slice(1,-1);r.push(...Iy(u))}else{let u=c.slice(1,-1);r.push(...GT(u))}}let o=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=o.exec(e))!==null;)a[1]&&r.push(...Iy(a[1]));return Lz(r)}function Iy(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,o,a]=n;t.push({name:o.trim(),type:ky(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let i=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=i.exec(e))!==null;){let[,o,a]=n,c=a.match(/type\s*:\s*(\w+)/),u=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:o.trim(),type:c?ky(c[1]):"any",required:u?u[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,o,a]=n;t.some(c=>c.name===o.trim())||t.push({name:o.trim(),type:ky(a.trim()),required:!1})}return t}function GT(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function ky(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function Lz(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function $z(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function Uz(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}async function Fo(e,t){let r=await jz(e,t.readAllInputTypes),n=await Lu(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function jz(e,t){let r=[],n=await qz(e,e.getAppRootDir());for(let i of n){let s=await zT(e,i,t);s&&r.push(s)}return r}async function qz(e,t){let r=[],n=async s=>{try{let o=await e.readdir(s);for(let a of o){let c=e.join(s,a);(await e.stat(c)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(c):a.endsWith(".vue")&&r.push(c)}}catch{}};await n(t);let i=["components","pages","layouts"];for(let s of i){let o=e.join(t,s);try{(await e.stat(o)).isDirectory()&&await n(o)}catch{}}return r}f();async function HT(e){let t={errors:[]};try{await VT(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function KT(e){let t=[];t.push(...await VT(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let i=await e.formatCode(n,Gz(e,n,"figma-imports"));await e.writeFile(n,i),t.push({filePath:n,modifiedType:"create"})}return t}async function VT(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,Hz(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function Gz(e,t,r="page"){let n=je(e,t,e.registryPath),i=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1067
|
+
`.trimStart()}async function $T(e){await Ud(e);let t=await e.readFile(e.registryPath);return t?Pz(e,t):{components:[],sourceFile:Ue(e,"")}}async function Pz(e,t){let r=Ue(e,t);return Fz(e,r)}async function Fz(e,t){let r=[],n=Ut(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await _y(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:jr(r)}}async function _y(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(tt(e,i)==="component"){let o,{initializer:a}=i;if(e.ts.isIdentifier(a))o=a.text;else if(e.ts.isCallExpression(a)){let u=a.arguments[0];e.ts.isIdentifier(u)&&(o=u.text)}if(!o)continue;n.name===""&&(n.name=pt(o)),n.importName=o;let c=await yi(e,e.registryPath,t,o);if(!c)continue;if(n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=dt(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType,n.externalImportPath)n.exportName=o;else{let u=await bT(e,c.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let l=u.find(p=>p.cmpInfo.exportName===o);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=Gr(e,n,r),n.filePath&&n.exportName&&(n.id=await at(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Ti(e,t,r,n,i,s,o,a){let c=await ks(e),[u,l,p]=await Promise.all([yT(e,c),$T(e),Ou(e)]),d=u.map(v=>v.cmpInfo),h=l.components,m={components:Wn(d,h),registryPath:e.registryPath,registryDisplayPath:Ke(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await xT(e,u,m.components),m;let g=!1,y=l.sourceFile,b=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(b.length>0){let v=b.map(D=>{let E=u.find(S=>S.cmpInfo.id===D);if(!E)throw new Error(`Component ${D} not found`);return E}),C=Array.from(new Set(v.map(D=>D.cmpInfo.filePath))),x=await zt(e,C);for(let D of v){let E=m.components.find(I=>I.id===D.cmpInfo.id),S=await vy(e,D,x);on(E,S);let T=d.findIndex(I=>I.id===D.cmpInfo.id);d[T].inputs=S;let F=Di(D.cmpInfo.id,d,h,r,n,i,s),{elements:A,elmIndex:P,statementIndex:j,statement:Y,variableDeclaration:J}=await Iz(e,y,D);if(F.addCmpToRegistry)A.push(_z(e,F.addCmpToRegistry)),g=!0;else if(F.removeCmpFromRegistry)A.splice(P,1),g=!0;else if(F.updateRegisteredCmp){let I=Ht(e,A[P],F.updateRegisteredCmp);A[P]=e.ts.factory.updateObjectLiteralExpression(I,[UT(e,F.updateRegisteredCmp),...I.properties.slice(1)]),g=!0}if(g&&o){let I=[...y.statements];I[j]=e.ts.factory.updateVariableStatement(Y,Y.modifiers,e.ts.factory.updateVariableDeclarationList(Y.declarationList,[e.ts.factory.updateVariableDeclaration(J,J.name,J.exclamationToken,J.type,e.ts.factory.createArrayLiteralExpression(xi(e,A)))])),y=e.ts.factory.updateSourceFile(y,I),E.exportType==="named"?y=Ge(e,y,{namedImports:[E.importName],importPath:E.externalImportPath?E.externalImportPath:je(e,e.registryPath,E.filePath)}):y=Ge(e,y,{defaultImport:E.importName,importPath:E.externalImportPath?E.externalImportPath:je(e,e.registryPath,E.filePath)}),y=Ge(e,y,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),y=Ci(e,y,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=F.components,h=F.components.filter(k=>k.isRegistered)}}}if(g&&o){y=vi(e,y),y=bi(e,y);let v=Vt(e,y);v=Vn(v),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}return m}function UT(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function _z(e,t){return Ht(e,e.ts.factory.createObjectLiteralExpression([UT(e,t)],!0),t)}async function Iz(e,t,r){let n=Ut(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await _y(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}async function jT(e){let t=await kz(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>BT(t),ensureFigmaImportPage:()=>MT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Ti(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Ti(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Ti(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Ti(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Ti(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Ti(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>Ou(t),setPublicApiKey:n=>hT(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function kz(e){let t=await Nz(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await wr(e),s=e.join(n,"app"),o=await qr(e,s),a={},c={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:o,angularConfigPath:t,typescriptEnabled:i,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:p=>{a[e.join(r,p,"index.ts")]=`export * from "${p}";`},readFileSync:p=>a[p]??e.readFileSync(p),existsSync:p=>!!a[p]||e.existsSync(p),readdirSync:p=>{let d=e.readdirSync(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d},readdir:async p=>{let d=await e.readdir(p);return p===r?[...d,...Object.keys(a).map(h=>h.slice(r.length+1))]:d}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);c.srcDir=n,c.appDir=s,c.componentsDir=e.join(c.appDir,"components"),c.builderPageComponentPath=e.join(c.componentsDir,`builder-page.component.${i?"ts":"js"}`);let u=`app.module.${i?"ts":"js"}`,l=e.join(c.appDir,u);return await e.exists(l)&&(c.hasAppModule=!0),c}async function Nz(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}f();f();async function Lu(e){let t=e.configType==="vite"?Rz:Oz;return await mi(e,[".env"],t)}async function qT(e,t){let r=await Lu(e),n=await hi(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Rz="VITE_PUBLIC_BUILDER_KEY",Oz="PUBLIC_BUILDER_KEY";f();f();async function zT(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let i=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",o=$z(s),a=Mz(n,r),c=Bz(n);return{id:Uz(t),name:o,filePath:i,relFilePath:i,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:o,importPath:i,vueApiType:c}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function Bz(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function Mz(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let c of n){let u;for(;(u=c.exec(e))!==null;){let l=u[1];l.includes(":")?r.push(...Iy(l)):r.push(...GT(l))}}let i=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=i.exec(e))!==null;){let c=s[1];if(c.startsWith("{")){let u=c.slice(1,-1);r.push(...Iy(u))}else{let u=c.slice(1,-1);r.push(...GT(u))}}let o=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=o.exec(e))!==null;)a[1]&&r.push(...Iy(a[1]));return Lz(r)}function Iy(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,o,a]=n;t.push({name:o.trim(),type:ky(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let i=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=i.exec(e))!==null;){let[,o,a]=n,c=a.match(/type\s*:\s*(\w+)/),u=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:o.trim(),type:c?ky(c[1]):"any",required:u?u[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,o,a]=n;t.some(c=>c.name===o.trim())||t.push({name:o.trim(),type:ky(a.trim()),required:!1})}return t}function GT(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function ky(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function Lz(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function $z(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function Uz(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}async function Fo(e,t){let r=await jz(e,t.readAllInputTypes),n=await Lu(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:Cn(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function jz(e,t){let r=[],n=await qz(e,e.getAppRootDir());for(let i of n){let s=await zT(e,i,t);s&&r.push(s)}return r}async function qz(e,t){let r=[],n=async s=>{try{let o=await e.readdir(s);for(let a of o){let c=e.join(s,a);(await e.stat(c)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(c):a.endsWith(".vue")&&r.push(c)}}catch{}};await n(t);let i=["components","pages","layouts"];for(let s of i){let o=e.join(t,s);try{(await e.stat(o)).isDirectory()&&await n(o)}catch{}}return r}f();async function HT(e){let t={errors:[]};try{await VT(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function KT(e){let t=[];t.push(...await VT(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let i=await e.formatCode(n,Gz(e,n,"figma-imports"));await e.writeFile(n,i),t.push({filePath:n,modifiedType:"create"})}return t}async function VT(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,Hz(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function Gz(e,t,r="page"){let n=je(e,t,e.registryPath),i=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1068
1068
|
<div>
|
|
1069
1069
|
<div v-if="pending">Loading...</div>
|
|
1070
1070
|
<div v-else-if="error">Error loading content</div>
|
|
@@ -1170,7 +1170,7 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
|
1170
1170
|
// ]
|
|
1171
1171
|
// }
|
|
1172
1172
|
];
|
|
1173
|
-
`}async function WT(e){let t=await Kz(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await HT(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>KT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Fo(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Fo(t,{readAllInputTypes:!1}),s=i.components.find(o=>o.id===n.cmpId);return{...i,component:s}},registerComponent:async n=>Fo(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>Fo(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>Fo(t,{readAllInputTypes:!1}),unregisterComponent:async n=>Fo(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Lu(t),setPublicApiKey:n=>qT(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function Kz(e){let t=await Vz(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await
|
|
1173
|
+
`}async function WT(e){let t=await Kz(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await HT(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>KT(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Fo(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Fo(t,{readAllInputTypes:!1}),s=i.components.find(o=>o.id===n.cmpId);return{...i,component:s}},registerComponent:async n=>Fo(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>Fo(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>Fo(t,{readAllInputTypes:!1}),unregisterComponent:async n=>Fo(t,{readAllInputTypes:!1}),getPublicApiKey:()=>Lu(t),setPublicApiKey:n=>qT(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===xe.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>vn(t),setCache:n=>Dn(t,n)}}async function Kz(e){let t=await Vz(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await wr(e),s={},o={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:i,configType:"",isNuxt:await Wz(e),addExternalPackage:u=>{s[e.join(r,u,"index.ts")]=`export * from "${u}";`},readFileSync:u=>s[u]??e.readFileSync(u),existsSync:u=>!!s[u]||e.existsSync(u),readdirSync:u=>{let l=e.readdirSync(u);return u===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l},readdir:async u=>{let l=await e.readdir(u);return u===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l}};t.includes("webpack.config")&&(o.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(o.configType="vite");let a=await e.exists(n);o.srcDir=a?n:null;let c=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let u of c)if(await e.exists(u)){o.componentsDir=u;break}return o.componentsDir||(o.componentsDir=a?e.join(n,"components"):e.join(r,"components")),o.registryPath=await qr(e,o.componentsDir),o}async function Vz(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function Wz(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),i={...n.dependencies,...n.devDependencies};return!!(i.nuxt||i["@nuxt/kit"]||i.nuxt3)}}catch{}return!1}f();var zd=G(aA(),1);async function cA(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let o={filePath:Hn(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:sn(s.inputs)};return sn(o)}),version:1};e.debug("exporting registry components:",n.components.length);let i=(0,zd.compress)(n);return btoa(JSON.stringify(i))}async function uA(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),i=JSON.parse(atob(r)),s=(0,zd.decompress)(i),o=sn(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let c=Hn(e.normalize(a.filePath)),u=n.components.find(p=>Hn(p.filePath).endsWith(c)&&p.exportName===a.exportName);if(!u){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${u.id})`,u.filePath),await t.registerComponent({cmpId:u.id});for(let p of a.inputs)e.debug(`set input (${u.id})`),await t.setRegisteredComponentInput({cmpId:u.id,name:p.name,type:p.type,required:p.required,defaultValue:p.defaultValue,friendlyName:p.friendlyName,helperText:p.helperText});e.debug(`set input (${u.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:u.id,name:a.name,image:a.image,description:a.description});o=sn(l)}return o}f();var an={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue"},s1e={[an.react]:[{version:xe.gen1,recommended:!0},{version:xe.gen2,recommended:!1}],[an.remix]:[{version:xe.gen1,recommended:!1},{version:xe.gen2,recommended:!0}],[an.angular]:[{version:xe.gen2,recommended:!0}],[an.next]:[{version:xe.gen1,recommended:!0},{version:xe.gen2,recommended:!1}],[an.qwik]:[{version:xe.gen2,recommended:!0}],[an.vue]:[{version:xe.gen1,recommended:!0},{version:xe.gen2,recommended:!1}]};f();async function lA(e,t){let r=[],n=new Set;async function i(s){let o=e.join(s,"package.json");try{if(!await e.exists(o))return null;let c=await e.readFile(o);if(c===null)throw new Error(`Failed to read package.json at ${o}`);let u=JSON.parse(c);if(typeof u.name!="string"||u.name.trim()===""||n.has(u.name))return null;n.add(u.name);let l={name:u.name,subPackages:[]},p=await e.readdir(s);for(let d of p)d!=="node_modules"&&(await e.stat(e.join(s,d))).isDirectory()&&l.subPackages.push(d);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let c=JSON.parse(a),u={...c.dependencies,...c.devDependencies};for(let l of Object.keys(u)){let p=e.join(t,"node_modules",l);await i(p)}if(Array.isArray(c.workspaces))for(let l of c.workspaces){let p=await e.readdir(e.join(t,l));for(let d of p){let h=e.join(t,l,d);await i(h)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var bH={"@builder.io/qwik-city":X1,next:U1,"@remix-run/react":sT,react:mT,"@angular/core":jT,vue:WT},xH={"@builder.io/qwik-city":an.qwik,next:an.next,"@remix-run/react":an.remix,react:an.react,"@angular/core":an.angular,vue:an.vue};async function Bs(e){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await Eo(e)),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let t of e.frameworks){let r=bH[t.name];if(r)try{let n=await r(e);return{...n,exportRegistry:()=>cA(e,n),importRegistry:s=>uA(e,n,s),framework:xH[t.name],findAllDependencies:async()=>await lA(e,e.getRepoRootDir())}}catch(n){e.Sentry?.captureException(n,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}f();f();var ju=class{connections=new Set;maxConnections=1e3;sys;constructor(t){this.sys=t}addConnection(t,r){if(this.connections.size>=this.maxConnections){let n=`Max connections (${this.maxConnections}) reached, rejecting new connection`;return console.error(`[ConnectionTracker] ${n}`),this.sys.Sentry?.captureMessage(n,{level:"error",tags:{component:"ConnectionTracker",maxConnections:this.maxConnections.toString(),currentConnections:this.connections.size.toString(),requestUrl:r?.url||"unknown",requestMethod:r?.method||"unknown",userAgent:r?.headers?.["user-agent"]||"unknown",origin:r?.headers?.origin||"unknown",referer:r?.headers?.referer||"unknown"},extra:{connectionLimit:this.maxConnections,activeConnections:this.connections.size,requestHeaders:r?.headers||{},requestUrl:r?.url}}),!1}return this.connections.add(t),t.on("close",()=>{this.removeConnection(t)}),t.on("error",()=>{this.removeConnection(t)}),!0}removeConnection(t){this.connections.delete(t)}getConnectionCount(){return this.connections.size}cleanup(){for(let t of this.connections)t.writable&&t.write(`HTTP/1.1 503 Service Unavailable\r
|
|
1174
1174
|
\r
|
|
1175
1175
|
`),t.destroy();this.connections.clear()}};f();f();f();f();f();f();f();var mTe=`
|
|
1176
1176
|
/** @type {import('next').NextConfig} */
|
|
@@ -1184,7 +1184,7 @@ module.exports = nextConfig
|
|
|
1184
1184
|
`:`
|
|
1185
1185
|
`)+r,i=n+1,n=e.indexOf(`
|
|
1186
1186
|
`,i)}while(n!==-1);return s+=e.slice(i),s}var{stdout:VP,stderr:WP}=zP,ub=Symbol("GENERATOR"),Ha=Symbol("STYLER"),zu=Symbol("IS_EMPTY"),YP=["ansi","ansi","ansi256","ansi16m"],Ka=Object.create(null),YK=(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=VP?VP.level:0;e.level=t.level===void 0?r:t.level},sf=class{constructor(t){return JP(t)}},JP=e=>{let t=(...r)=>r.join(" ");return YK(t,e),Object.setPrototypeOf(t,Hu.prototype),t};function Hu(e){return JP(e)}Object.setPrototypeOf(Hu.prototype,Function.prototype);for(let[e,t]of Object.entries(Jn))Ka[e]={get(){let r=of(this,pb(t.open,t.close,this[Ha]),this[zu]);return Object.defineProperty(this,e,{value:r}),r}};Ka.visible={get(){let e=of(this,this[Ha],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var lb=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Jn[r].ansi16m(...n):t==="ansi256"?Jn[r].ansi256(Jn.rgbToAnsi256(...n)):Jn[r].ansi(Jn.rgbToAnsi(...n)):e==="hex"?lb("rgb",t,r,...Jn.hexToRgb(...n)):Jn[r][e](...n),JK=["rgb","hex","ansi256"];for(let e of JK){Ka[e]={get(){let{level:r}=this;return function(...n){let i=pb(lb(e,YP[r],"color",...n),Jn.color.close,this[Ha]);return of(this,i,this[zu])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ka[t]={get(){let{level:r}=this;return function(...n){let i=pb(lb(e,YP[r],"bgColor",...n),Jn.bgColor.close,this[Ha]);return of(this,i,this[zu])}}}}var XK=Object.defineProperties(()=>{},{...Ka,level:{enumerable:!0,get(){return this[ub].level},set(e){this[ub].level=e}}}),pb=(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}},of=(e,t,r)=>{let n=(...i)=>QK(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,XK),n[ub]=e,n[Ha]=t,n[zu]=r,n},QK=(e,t)=>{if(e.level<=0||!t)return e[zu]?"":t;let r=e[Ha];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=HP(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
1187
|
-
`);return s!==-1&&(t=KP(t,i,n,s)),n+t+i};Object.defineProperties(Hu.prototype,Ka);var cFe=Hu(),uFe=Hu({level:WP?WP.level:0});var Me=new sf({level:2}),XP={comment:Me.gray,quote:Me.gray,keyword:Me.green,"selector-tag":Me.green,addition:Me.green,number:Me.cyan,string:Me.cyan,"meta meta-string":Me.cyan,literal:Me.cyan,doctag:Me.cyan,regexp:Me.cyan,title:Me.blue,section:Me.blue,name:Me.blue,"selector-id":Me.blue,"selector-class":Me.blue,attribute:Me.yellow,attr:Me.yellow,variable:Me.yellow,"template-variable":Me.yellow,"class title":Me.yellow,type:Me.yellow,symbol:Me.magenta,bullet:Me.magenta,subst:Me.magenta,meta:Me.magenta,"meta keyword":Me.magenta,"selector-attr":Me.magenta,"selector-pseudo":Me.magenta,link:Me.magenta,built_in:Me.red,deletion:Me.red,emphasis:Me.italic,strong:Me.bold,formula:Me.inverse};function Ku(e){let t=ab(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:db(o||XP,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:db(o||XP,c)}}}function db(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=ZK(n,t.children)),i&&(s=i(s)),s}function ZK(e,t){let r=[],n=-1;for(;++n<t.length;)r.push(db(e,t[n]));return r.join("")}f();var QP=G(require("@sentry/node"),1),ZP=G(require("@amplitude/analytics-node"),1);async function se(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([QP.flush(2e3),ZP.flush().promise])}catch(t){console.error(t)}process.exit(e)}f();var Ne=process.env.AIR_HOST||"https://api.builder.io";f();var Ii=G(require("@amplitude/analytics-node"),1),ri=G(require("@sentry/node"),1);var eF="1.11.48";f();var Xt=require("fs/promises"),tI=require("crypto"),ft=require("fs"),xl=require("os"),$e=G(require("path"),1),rI=G(require("typescript"),1),nI=G(require("launch-editor"),1);var jo=require("child_process");var Sx={};mS(Sx,{MagicastError:()=>br,builders:()=>bJ,detectCodeFormat:()=>Q_,generateCode:()=>wx,loadFile:()=>gJ,parseExpression:()=>eI,parseModule:()=>Z_,writeFile:()=>yJ});f();var _f=require("fs");var Lf=G(TF(),1),b_=G(n_(),1);function ln(e){var t=e.use(kt),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 it(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 GW=Object.defineProperty,zW=(e,t,r)=>t in e?GW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Fr=(e,t,r)=>(zW(e,typeof t!="symbol"?t+"":t,r),r),x_=Object.prototype,If=x_.toString,Tn=x_.hasOwnProperty,Uo=class{assert(t,r){if(!this.check(t,r)){var n=xx(t);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let t=this;return new ml(t)}},ml=class extends Uo{constructor(t){super(),this.elemType=t,Fr(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,r){return Array.isArray(t)&&t.every(n=>this.elemType.check(n,r))}},kf=class extends Uo{constructor(t){super(),this.value=t,Fr(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}},Nf=class extends Uo{constructor(t){super(),this.fields=t,Fr(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,r){return If.call(t)===If.call({})&&this.fields.every(n=>n.type.check(t[n.name],r))}},Rf=class extends Uo{constructor(t){super(),this.types=t,Fr(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)}},$o=class extends Uo{constructor(t,r){super(),this.name=t,this.predicate=r,Fr(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}},dl=class e{constructor(t,r){this.type=t,this.typeName=r,Fr(this,"baseNames",[]),Fr(this,"ownFields",Object.create(null)),Fr(this,"allSupertypes",Object.create(null)),Fr(this,"supertypeList",[]),Fr(this,"allFields",Object.create(null)),Fr(this,"fieldNames",[]),Fr(this,"finalized",!1),Fr(this,"buildable",!1),Fr(this,"buildParams",[])}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return Tn.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}},Of=class{constructor(t,r,n,i){this.name=t,this.type=r,this.defaultFn=n,Fr(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 xx(e){return Array.isArray(e)?"["+e.map(xx).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+" }":JSON.stringify(e)}function kt(e){let t={or(...L){return new Rf(L.map($=>t.from($)))},from(L,$){if(L instanceof ml||L instanceof kf||L instanceof Nf||L instanceof Rf||L instanceof $o)return L;if(L instanceof dl)return L.type;if(a.check(L)){if(L.length!==1)throw new Error("only one element type is permitted for typed arrays");return new ml(t.from(L[0]))}if(c.check(L))return new Nf(Object.keys(L).map(re=>new Of(re,t.from(L[re],re))));if(typeof L=="function"){var H=r.indexOf(L);if(H>=0)return n[H];if(typeof $!="string")throw new Error("missing name");return new $o($,L)}return new kf(L)},def(L){return Tn.call(b,L)?b[L]:b[L]=new C(L)},hasDef(L){return Tn.call(b,L)}};var r=[],n=[];function i(L,$){let H=If.call($),re=new $o(L,ve=>If.call(ve)===H);return $&&typeof $.constructor=="function"&&(r.push($.constructor),n.push(re)),re}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 $o("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(L){if(L&&typeof L=="object"){var $=L.type;if(typeof $=="string"&&Tn.call(b,$)){var H=b[$];if(H.finalized)return H}}return null}class C extends dl{constructor($){super(new $o($,(H,re)=>this.check(H,re)),$)}check($,H){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if($===null||typeof $!="object")return!1;var re=v($);return re?H&&re===this?this.checkAllFields($,H):this.isSupertypeOf(re)?H?re.checkAllFields($,H)&&this.checkAllFields($,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields($,H):!1}build(...$){if(this.buildParams=$,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let H=(ve,Q,O,ee)=>{if(!Tn.call(ve,Q)){var pe=this.allFields;if(!Tn.call(pe,Q))throw new Error(""+Q);var K=pe[Q],oe=K.type,z;if(ee)z=O;else if(K.defaultFn)z=K.defaultFn.call(ve);else{var ne="no value or default function given for field "+JSON.stringify(Q)+" of "+this.typeName+"("+this.buildParams.map(function(ie){return pe[ie]}).join(", ")+")";throw new Error(ne)}if(!oe.check(z))throw new Error(xx(z)+" does not match field "+K+" of type "+this.typeName);ve[Q]=z}},re=(...ve)=>{var Q=ve.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var O=Object.create(S);if(this.buildParams.forEach(function(ee,pe){pe<Q?H(O,ee,ve[pe],!0):H(O,ee,null,!1)}),Object.keys(this.allFields).forEach(function(ee){H(O,ee,null,!1)}),O.type!==this.typeName)throw new Error("");return O};return re.from=ve=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var Q=Object.create(S);if(Object.keys(this.allFields).forEach(function(O){Tn.call(ve,O)?H(Q,O,ve[O],!0):H(Q,O,null,!1)}),Q.type!==this.typeName)throw new Error("");return Q},Object.defineProperty(E,F(this.typeName),{enumerable:!0,value:re}),this}field($,H,re,ve){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify($)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[$]=new Of($,t.from(H),re,ve),this)}finalize(){if(!this.finalized){var $=this.allFields,H=this.allSupertypes;this.baseNames.forEach(ve=>{var Q=b[ve];if(Q instanceof dl)Q.finalize(),M($,Q.allFields),M(H,Q.allSupertypes);else{var O="unknown supertype name "+JSON.stringify(ve)+" for subtype "+JSON.stringify(this.typeName);throw new Error(O)}}),M($,this.ownFields),H[this.typeName]=this,this.fieldNames.length=0;for(var re in $)Tn.call($,re)&&!$[re].hidden&&this.fieldNames.push(re);Object.defineProperty(P,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,B(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&k(this.typeName)}}}function x(L){if(!Tn.call(b,L))throw new Error("");var $=b[L];if($.finalized!==!0)throw new Error("");return $.supertypeList.slice(1)}function D(L){for(var $={},H=Object.keys(b),re=H.length,ve=0;ve<re;++ve){var Q=H[ve],O=b[Q];if(O.finalized!==!0)throw new Error(""+Q);for(var ee=0;ee<O.supertypeList.length;++ee){var pe=O.supertypeList[ee];if(Tn.call(L,pe)){$[Q]=pe;break}}}return $}var E=Object.create(null),S={};function T(L,$){var H=S[L];return m.check($)?delete S[L]:(o.assert($),Object.defineProperty(S,L,{enumerable:!0,configurable:!0,value:$})),H}function F(L){return L.replace(/^[A-Z]+/,function($){var H=$.length;switch(H){case 0:return"";case 1:return $.toLowerCase();default:return $.slice(0,H-1).toLowerCase()+$.charAt(H-1)}})}function A(L){return L=F(L),L.replace(/(Expression)?$/,"Statement")}var P={};function j(L){var $=v(L);if($)return $.fieldNames.slice(0);if("type"in L)throw new Error("did not recognize object of type "+JSON.stringify(L.type));return Object.keys(L)}function Y(L,$){var H=v(L);if(H){var re=H.allFields[$];if(re)return re.getValue(L)}return L&&L[$]}function J(L,$,H){j(L).forEach(function(re){$.call(this,re,Y(L,re))},H)}function I(L,$,H){return j(L).some(function(re){return $.call(this,re,Y(L,re))},H)}function k(L){var $=A(L);if(E[$])return;var H=E[F(L)];if(!H)return;let re=function(...ve){return E.expressionStatement(H.apply(E,ve))};re.from=function(...ve){return E.expressionStatement(H.from.apply(E,ve))},E[$]=re}function B(L,$){$.length=0,$.push(L);for(var H=Object.create(null),re=0;re<$.length;++re){L=$[re];var ve=b[L];if(ve.finalized!==!0)throw new Error("");Tn.call(H,L)&&delete $[H[L]],H[L]=re,$.push.apply($,ve.baseNames)}for(var Q=0,O=Q,ee=$.length;O<ee;++O)Tn.call($,O)&&($[Q++]=$[O]);$.length=Q}function M(L,$){return Object.keys($).forEach(function(H){L[H]=$[H]}),L}function X(){Object.keys(b).forEach(function(L){b[L].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:D,builders:E,defineMethod:T,getBuilderName:F,getStatementBuilderName:A,namedTypes:P,getFieldNames:j,getFieldValue:Y,eachField:J,someField:I,finalize:X}}it(()=>module);var HW=Object.prototype,Df=HW.hasOwnProperty;function v_(e){var t=e.use(kt),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(!Df.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)Df.call(this.value,y)&&(m[y]=this.get(y));for(h=h||this,y=0;y<g;++y)Df.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(Df.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}it(()=>module);var ic=Object.prototype.hasOwnProperty;function KW(e){var t=e.use(kt),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(),ic.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),ic.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 T=x.get("typeParameters","params");o.check(T.value)&&T.each(F=>{C(F,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(T=>{y(T,D,E)}):n.Function.check(S)?(x.get("params").each(T=>{b(T,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(T,F){var A=x.get(T);if(!g(A,F))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 T=S.param.name,F=ic.call(D,T);m(x.get("body"),D,E),F||delete D[T]}}else m(x,D,E)}function b(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)?ic.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 T=S.value;n.Pattern.check(T)?b(S,D):n.Property.check(T)||n.ObjectProperty&&n.ObjectProperty.check(T)?b(S.get("value"),D):n.SpreadProperty&&n.SpreadProperty.check(T)&&b(S.get("argument"),D)}):n.ArrayPattern&&n.ArrayPattern.check(E)?x.get("elements").each(function(S){var T=S.value;n.Pattern.check(T)?b(S,D):n.SpreadElement&&n.SpreadElement.check(T)&&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)&&(ic.call(D,E.name)?D[E.name].push(x):D[E.name]=[x])}function C(x,D){var E=x.value;p.assert(E),ic.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}it(()=>module);function D_(e){var t=e.use(kt),r=t.namedTypes,n=t.builders,i=t.builtInTypes.number,s=t.builtInTypes.array,o=e.use(v_),a=e.use(KW);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,T=p[S];if(E>T)return!0;if(E===T&&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}it(()=>module);var Cf=Object.prototype.hasOwnProperty;function VW(e){var t=e.use(kt),r=e.use(D_),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=Cf.call(this._methodNameTable,"Block")||Cf.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)Cf.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];Cf.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}it(()=>module);function WW(e){var t=e.use(kt),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),T=n(g,E);if(y&&y.push(E),!p(S,T,y))return!1;if(y){var F=y.pop();if(F!==E)throw new Error(""+F)}}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}it(()=>module);function YW(e){let t=JW(),r=t.use(kt);e.forEach(t.use),r.finalize();let n=t.use(VW);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(WW),finalize:r.finalize,Path:t.use(v_),NodePath:t.use(D_),PathVisitor:n,use:t.use,visit:n.visit}}function JW(){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}it(()=>module);function C_(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}it(()=>module);function E_(e){let t=e.use(C_);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}it(()=>module);function w_(e){let t=e.use(E_);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}it(()=>module);function XW(e){let t=e.use(w_);return t.LogicalOperators.forEach(r=>{let n=r+"=";t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}it(()=>module);function QW(e){var t=e.use(kt),r=t.Type,n=r.def,i=r.or,s=e.use(ln),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:u,LogicalOperators:l}=e.use(C_);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)}it(()=>module);function ZW(e){e.use(QW);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))}it(()=>module);function eY(e){e.use(E_),e.use(ZW)}it(()=>module);function tY(e){e.use(eY);let r=e.use(kt).Type.def,n=e.use(ln).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}it(()=>module);function rY(e){e.use(tY);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))])}it(()=>module);function nY(e){e.use(rY);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}it(()=>module);function iY(e){e.use(w_),e.use(nY);let t=e.use(kt),r=t.Type.def,n=t.Type.or,s=e.use(ln).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)}it(()=>module);function sY(e){e.use(XW),e.use(iY)}it(()=>module);function oY(e){e.use(sY);let r=e.use(kt).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}it(()=>module);function bl(e){e.use(oY);let t=e.use(kt),r=t.Type,n=t.Type.def,i=r.or,o=e.use(ln).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"))}it(()=>module);function aY(e){e.use(bl);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))}it(()=>module);function S_(e){var t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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)})}it(()=>module);function T_(e){e.use(bl),e.use(S_);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))}it(()=>module);function cY(e){e.use(bl);var t=e.use(kt),r=e.use(ln).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")}it(()=>module);function A_(e){e.use(bl);let t=e.use(kt),r=e.use(ln).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()}it(()=>module);function uY(e){let r=e.use(kt).Type.def;e.use(A_),e.use(T_),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}it(()=>module);function lY(e){e.use(A_),e.use(S_);var t=e.use(kt),r=t.namedTypes,n=t.Type.def,i=t.Type.or,s=e.use(ln).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)])}it(()=>module);var ei;ei||(ei={});var{astNodesAreEquivalent:r_e,builders:pc,builtInTypes:ti,defineMethod:n_e,eachField:i_e,finalize:s_e,getBuilderName:o_e,getFieldNames:pY,getFieldValue:ds,getSupertypeNames:a_e,namedTypes:dY,NodePath:fY,Path:c_e,PathVisitor:u_e,someField:mY,Type:l_e,use:p_e,visit:d_e}=YW([bl,aY,T_,cY,uY,lY]);Object.assign(ei,dY);var Ef=ei,i_=Lf.default.SourceMapConsumer,hY=Lf.default.SourceMapGenerator,P_=Object.prototype.hasOwnProperty;function gY(){return`
|
|
1187
|
+
`);return s!==-1&&(t=KP(t,i,n,s)),n+t+i};Object.defineProperties(Hu.prototype,Ka);var cFe=Hu(),uFe=Hu({level:WP?WP.level:0});var Me=new sf({level:2}),XP={comment:Me.gray,quote:Me.gray,keyword:Me.green,"selector-tag":Me.green,addition:Me.green,number:Me.cyan,string:Me.cyan,"meta meta-string":Me.cyan,literal:Me.cyan,doctag:Me.cyan,regexp:Me.cyan,title:Me.blue,section:Me.blue,name:Me.blue,"selector-id":Me.blue,"selector-class":Me.blue,attribute:Me.yellow,attr:Me.yellow,variable:Me.yellow,"template-variable":Me.yellow,"class title":Me.yellow,type:Me.yellow,symbol:Me.magenta,bullet:Me.magenta,subst:Me.magenta,meta:Me.magenta,"meta keyword":Me.magenta,"selector-attr":Me.magenta,"selector-pseudo":Me.magenta,link:Me.magenta,built_in:Me.red,deletion:Me.red,emphasis:Me.italic,strong:Me.bold,formula:Me.inverse};function Ku(e){let t=ab(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:db(o||XP,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:db(o||XP,c)}}}function db(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=ZK(n,t.children)),i&&(s=i(s)),s}function ZK(e,t){let r=[],n=-1;for(;++n<t.length;)r.push(db(e,t[n]));return r.join("")}f();var QP=G(require("@sentry/node"),1),ZP=G(require("@amplitude/analytics-node"),1);async function se(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([QP.flush(2e3),ZP.flush().promise])}catch(t){console.error(t)}process.exit(e)}f();var Ne=process.env.AIR_HOST||"https://api.builder.io";f();var Ii=G(require("@amplitude/analytics-node"),1),ri=G(require("@sentry/node"),1);var eF="1.11.49";f();var Xt=require("fs/promises"),tI=require("crypto"),ft=require("fs"),xl=require("os"),$e=G(require("path"),1),rI=G(require("typescript"),1),nI=G(require("launch-editor"),1);var jo=require("child_process");var Sx={};mS(Sx,{MagicastError:()=>br,builders:()=>bJ,detectCodeFormat:()=>Q_,generateCode:()=>wx,loadFile:()=>gJ,parseExpression:()=>eI,parseModule:()=>Z_,writeFile:()=>yJ});f();var _f=require("fs");var Lf=G(TF(),1),b_=G(n_(),1);function ln(e){var t=e.use(kt),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 it(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 GW=Object.defineProperty,zW=(e,t,r)=>t in e?GW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Pr=(e,t,r)=>(zW(e,typeof t!="symbol"?t+"":t,r),r),x_=Object.prototype,If=x_.toString,Tn=x_.hasOwnProperty,Uo=class{assert(t,r){if(!this.check(t,r)){var n=xx(t);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let t=this;return new ml(t)}},ml=class extends Uo{constructor(t){super(),this.elemType=t,Pr(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,r){return Array.isArray(t)&&t.every(n=>this.elemType.check(n,r))}},kf=class extends Uo{constructor(t){super(),this.value=t,Pr(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}},Nf=class extends Uo{constructor(t){super(),this.fields=t,Pr(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,r){return If.call(t)===If.call({})&&this.fields.every(n=>n.type.check(t[n.name],r))}},Rf=class extends Uo{constructor(t){super(),this.types=t,Pr(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)}},$o=class extends Uo{constructor(t,r){super(),this.name=t,this.predicate=r,Pr(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}},dl=class e{constructor(t,r){this.type=t,this.typeName=r,Pr(this,"baseNames",[]),Pr(this,"ownFields",Object.create(null)),Pr(this,"allSupertypes",Object.create(null)),Pr(this,"supertypeList",[]),Pr(this,"allFields",Object.create(null)),Pr(this,"fieldNames",[]),Pr(this,"finalized",!1),Pr(this,"buildable",!1),Pr(this,"buildParams",[])}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return Tn.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}},Of=class{constructor(t,r,n,i){this.name=t,this.type=r,this.defaultFn=n,Pr(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 xx(e){return Array.isArray(e)?"["+e.map(xx).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+" }":JSON.stringify(e)}function kt(e){let t={or(...L){return new Rf(L.map($=>t.from($)))},from(L,$){if(L instanceof ml||L instanceof kf||L instanceof Nf||L instanceof Rf||L instanceof $o)return L;if(L instanceof dl)return L.type;if(a.check(L)){if(L.length!==1)throw new Error("only one element type is permitted for typed arrays");return new ml(t.from(L[0]))}if(c.check(L))return new Nf(Object.keys(L).map(re=>new Of(re,t.from(L[re],re))));if(typeof L=="function"){var H=r.indexOf(L);if(H>=0)return n[H];if(typeof $!="string")throw new Error("missing name");return new $o($,L)}return new kf(L)},def(L){return Tn.call(b,L)?b[L]:b[L]=new C(L)},hasDef(L){return Tn.call(b,L)}};var r=[],n=[];function i(L,$){let H=If.call($),re=new $o(L,ve=>If.call(ve)===H);return $&&typeof $.constructor=="function"&&(r.push($.constructor),n.push(re)),re}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 $o("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(L){if(L&&typeof L=="object"){var $=L.type;if(typeof $=="string"&&Tn.call(b,$)){var H=b[$];if(H.finalized)return H}}return null}class C extends dl{constructor($){super(new $o($,(H,re)=>this.check(H,re)),$)}check($,H){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if($===null||typeof $!="object")return!1;var re=v($);return re?H&&re===this?this.checkAllFields($,H):this.isSupertypeOf(re)?H?re.checkAllFields($,H)&&this.checkAllFields($,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields($,H):!1}build(...$){if(this.buildParams=$,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let H=(ve,Q,O,ee)=>{if(!Tn.call(ve,Q)){var pe=this.allFields;if(!Tn.call(pe,Q))throw new Error(""+Q);var K=pe[Q],oe=K.type,z;if(ee)z=O;else if(K.defaultFn)z=K.defaultFn.call(ve);else{var ne="no value or default function given for field "+JSON.stringify(Q)+" of "+this.typeName+"("+this.buildParams.map(function(ie){return pe[ie]}).join(", ")+")";throw new Error(ne)}if(!oe.check(z))throw new Error(xx(z)+" does not match field "+K+" of type "+this.typeName);ve[Q]=z}},re=(...ve)=>{var Q=ve.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var O=Object.create(S);if(this.buildParams.forEach(function(ee,pe){pe<Q?H(O,ee,ve[pe],!0):H(O,ee,null,!1)}),Object.keys(this.allFields).forEach(function(ee){H(O,ee,null,!1)}),O.type!==this.typeName)throw new Error("");return O};return re.from=ve=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var Q=Object.create(S);if(Object.keys(this.allFields).forEach(function(O){Tn.call(ve,O)?H(Q,O,ve[O],!0):H(Q,O,null,!1)}),Q.type!==this.typeName)throw new Error("");return Q},Object.defineProperty(E,F(this.typeName),{enumerable:!0,value:re}),this}field($,H,re,ve){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify($)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[$]=new Of($,t.from(H),re,ve),this)}finalize(){if(!this.finalized){var $=this.allFields,H=this.allSupertypes;this.baseNames.forEach(ve=>{var Q=b[ve];if(Q instanceof dl)Q.finalize(),M($,Q.allFields),M(H,Q.allSupertypes);else{var O="unknown supertype name "+JSON.stringify(ve)+" for subtype "+JSON.stringify(this.typeName);throw new Error(O)}}),M($,this.ownFields),H[this.typeName]=this,this.fieldNames.length=0;for(var re in $)Tn.call($,re)&&!$[re].hidden&&this.fieldNames.push(re);Object.defineProperty(P,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,B(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&k(this.typeName)}}}function x(L){if(!Tn.call(b,L))throw new Error("");var $=b[L];if($.finalized!==!0)throw new Error("");return $.supertypeList.slice(1)}function D(L){for(var $={},H=Object.keys(b),re=H.length,ve=0;ve<re;++ve){var Q=H[ve],O=b[Q];if(O.finalized!==!0)throw new Error(""+Q);for(var ee=0;ee<O.supertypeList.length;++ee){var pe=O.supertypeList[ee];if(Tn.call(L,pe)){$[Q]=pe;break}}}return $}var E=Object.create(null),S={};function T(L,$){var H=S[L];return m.check($)?delete S[L]:(o.assert($),Object.defineProperty(S,L,{enumerable:!0,configurable:!0,value:$})),H}function F(L){return L.replace(/^[A-Z]+/,function($){var H=$.length;switch(H){case 0:return"";case 1:return $.toLowerCase();default:return $.slice(0,H-1).toLowerCase()+$.charAt(H-1)}})}function A(L){return L=F(L),L.replace(/(Expression)?$/,"Statement")}var P={};function j(L){var $=v(L);if($)return $.fieldNames.slice(0);if("type"in L)throw new Error("did not recognize object of type "+JSON.stringify(L.type));return Object.keys(L)}function Y(L,$){var H=v(L);if(H){var re=H.allFields[$];if(re)return re.getValue(L)}return L&&L[$]}function J(L,$,H){j(L).forEach(function(re){$.call(this,re,Y(L,re))},H)}function I(L,$,H){return j(L).some(function(re){return $.call(this,re,Y(L,re))},H)}function k(L){var $=A(L);if(E[$])return;var H=E[F(L)];if(!H)return;let re=function(...ve){return E.expressionStatement(H.apply(E,ve))};re.from=function(...ve){return E.expressionStatement(H.from.apply(E,ve))},E[$]=re}function B(L,$){$.length=0,$.push(L);for(var H=Object.create(null),re=0;re<$.length;++re){L=$[re];var ve=b[L];if(ve.finalized!==!0)throw new Error("");Tn.call(H,L)&&delete $[H[L]],H[L]=re,$.push.apply($,ve.baseNames)}for(var Q=0,O=Q,ee=$.length;O<ee;++O)Tn.call($,O)&&($[Q++]=$[O]);$.length=Q}function M(L,$){return Object.keys($).forEach(function(H){L[H]=$[H]}),L}function X(){Object.keys(b).forEach(function(L){b[L].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:D,builders:E,defineMethod:T,getBuilderName:F,getStatementBuilderName:A,namedTypes:P,getFieldNames:j,getFieldValue:Y,eachField:J,someField:I,finalize:X}}it(()=>module);var HW=Object.prototype,Df=HW.hasOwnProperty;function v_(e){var t=e.use(kt),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(!Df.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)Df.call(this.value,y)&&(m[y]=this.get(y));for(h=h||this,y=0;y<g;++y)Df.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(Df.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}it(()=>module);var ic=Object.prototype.hasOwnProperty;function KW(e){var t=e.use(kt),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(),ic.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),ic.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 T=x.get("typeParameters","params");o.check(T.value)&&T.each(F=>{C(F,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(T=>{y(T,D,E)}):n.Function.check(S)?(x.get("params").each(T=>{b(T,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(T,F){var A=x.get(T);if(!g(A,F))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 T=S.param.name,F=ic.call(D,T);m(x.get("body"),D,E),F||delete D[T]}}else m(x,D,E)}function b(x,D){var E=x.value;n.Pattern.assert(E),n.Identifier.check(E)?ic.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 T=S.value;n.Pattern.check(T)?b(S,D):n.Property.check(T)||n.ObjectProperty&&n.ObjectProperty.check(T)?b(S.get("value"),D):n.SpreadProperty&&n.SpreadProperty.check(T)&&b(S.get("argument"),D)}):n.ArrayPattern&&n.ArrayPattern.check(E)?x.get("elements").each(function(S){var T=S.value;n.Pattern.check(T)?b(S,D):n.SpreadElement&&n.SpreadElement.check(T)&&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)&&(ic.call(D,E.name)?D[E.name].push(x):D[E.name]=[x])}function C(x,D){var E=x.value;p.assert(E),ic.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}it(()=>module);function D_(e){var t=e.use(kt),r=t.namedTypes,n=t.builders,i=t.builtInTypes.number,s=t.builtInTypes.array,o=e.use(v_),a=e.use(KW);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,T=p[S];if(E>T)return!0;if(E===T&&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}it(()=>module);var Cf=Object.prototype.hasOwnProperty;function VW(e){var t=e.use(kt),r=e.use(D_),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=Cf.call(this._methodNameTable,"Block")||Cf.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)Cf.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];Cf.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}it(()=>module);function WW(e){var t=e.use(kt),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),T=n(g,E);if(y&&y.push(E),!p(S,T,y))return!1;if(y){var F=y.pop();if(F!==E)throw new Error(""+F)}}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}it(()=>module);function YW(e){let t=JW(),r=t.use(kt);e.forEach(t.use),r.finalize();let n=t.use(VW);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(WW),finalize:r.finalize,Path:t.use(v_),NodePath:t.use(D_),PathVisitor:n,use:t.use,visit:n.visit}}function JW(){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}it(()=>module);function C_(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}it(()=>module);function E_(e){let t=e.use(C_);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}it(()=>module);function w_(e){let t=e.use(E_);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}it(()=>module);function XW(e){let t=e.use(w_);return t.LogicalOperators.forEach(r=>{let n=r+"=";t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}it(()=>module);function QW(e){var t=e.use(kt),r=t.Type,n=r.def,i=r.or,s=e.use(ln),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:u,LogicalOperators:l}=e.use(C_);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)}it(()=>module);function ZW(e){e.use(QW);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))}it(()=>module);function eY(e){e.use(E_),e.use(ZW)}it(()=>module);function tY(e){e.use(eY);let r=e.use(kt).Type.def,n=e.use(ln).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}it(()=>module);function rY(e){e.use(tY);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))])}it(()=>module);function nY(e){e.use(rY);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}it(()=>module);function iY(e){e.use(w_),e.use(nY);let t=e.use(kt),r=t.Type.def,n=t.Type.or,s=e.use(ln).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)}it(()=>module);function sY(e){e.use(XW),e.use(iY)}it(()=>module);function oY(e){e.use(sY);let r=e.use(kt).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}it(()=>module);function bl(e){e.use(oY);let t=e.use(kt),r=t.Type,n=t.Type.def,i=r.or,o=e.use(ln).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"))}it(()=>module);function aY(e){e.use(bl);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))}it(()=>module);function S_(e){var t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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)})}it(()=>module);function T_(e){e.use(bl),e.use(S_);let t=e.use(kt),r=t.Type.def,n=t.Type.or,i=e.use(ln).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"))}it(()=>module);function cY(e){e.use(bl);var t=e.use(kt),r=e.use(ln).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")}it(()=>module);function A_(e){e.use(bl);let t=e.use(kt),r=e.use(ln).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()}it(()=>module);function uY(e){let r=e.use(kt).Type.def;e.use(A_),e.use(T_),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}it(()=>module);function lY(e){e.use(A_),e.use(S_);var t=e.use(kt),r=t.namedTypes,n=t.Type.def,i=t.Type.or,s=e.use(ln).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)])}it(()=>module);var ei;ei||(ei={});var{astNodesAreEquivalent:r_e,builders:pc,builtInTypes:ti,defineMethod:n_e,eachField:i_e,finalize:s_e,getBuilderName:o_e,getFieldNames:pY,getFieldValue:ds,getSupertypeNames:a_e,namedTypes:dY,NodePath:fY,Path:c_e,PathVisitor:u_e,someField:mY,Type:l_e,use:p_e,visit:d_e}=YW([bl,aY,T_,cY,uY,lY]);Object.assign(ei,dY);var Ef=ei,i_=Lf.default.SourceMapConsumer,hY=Lf.default.SourceMapGenerator,P_=Object.prototype.hasOwnProperty;function gY(){return`
|
|
1188
1188
|
`}function s_(e,t,r){return e&&P_.call(e,t)?e[t]:r}function yY(...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 He(e,t){return e.line-t.line||e.column-t.column}function qs(e){return{line:e.line,column:e.column}}function bY(e,t){if(e){if(!t)return e}else return t||null;let r=new i_(e),n=new i_(t),i=new hY({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:qs(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let u=r.sourceContentFor(c);u&&!P_.call(s,c)&&(s[c]=u,i.setSourceContent(c,u))}),i.toJSON()}function F_(e,t){if(!e.loc)return null;let r={start:e.loc.start,end:e.loc.end};function n(i){lx(r,i.loc)}return e.declaration&&e.declaration.decorators&&$f(e)&&e.declaration.decorators.forEach(n),He(r.start,r.end)<0&&(r.start=qs(r.start),t.skipSpaces(r.start,!1,!0),He(r.start,r.end)<0&&(r.end=qs(r.end),t.skipSpaces(r.end,!0,!0))),e.comments&&e.comments.forEach(n),r}function lx(e,t){e&&t&&(He(t.start,e.start)<0&&(e.start=t.start),He(e.end,t.end)<0&&(e.end=t.end))}function vx(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()),xY(e,t),vY(e,t),r&&e.decorators)e.decorators.forEach(function(n){lx(r,n.loc)});else if(e.declaration&&$f(e)){e.declaration.loc=null;let n=e.declaration.decorators;n&&n.forEach(function(i){lx(r,i.loc)})}else if(Ef.MethodDefinition&&Ef.MethodDefinition.check(e)||Ef.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,Ef.FunctionExpression.check(e.value)&&(e.value.id=null);else if(e.type==="ObjectTypeProperty"){let n=e.loc,i=n&&n.end;i&&(i=qs(i),t.prevPos(i)&&t.charAt(i)===","&&(i=t.skipSpaces(i,!0,!0))&&(n.end=i))}}function xY(e,t){if(e.type!=="ForStatement")return;function r(n){let i=n&&n.loc,s=i&&i.start,o=i&&qs(i.end);for(;s&&o&&He(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 vY(e,t){if(e.type==="TemplateLiteral"&&e.quasis.length!==0){if(e.loc){let r=qs(e.loc.start),n=e.quasis[0];He(n.loc.start,r)<0&&(n.loc.start=r);let i=qs(e.loc.end),s=e.quasis[e.quasis.length-1];He(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];He(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];He(o.loc.start,s)<0&&(o.loc.start=s)}})}}function $f(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function __(e){let t=e.getParentNode();return e.getName()==="declaration"&&$f(t)?t:null}function fl(e,t){let r=e.trailingComma;return typeof r=="object"?!!r[t]:!!r}var px={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:gY(),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},DY=px.hasOwnProperty;function Uf(e){let t=e||px;function r(n){return DY.call(t,n)?t[n]:px[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 dx=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),CY(i,u,t,l,p)}if(He(r,o.start)<=0)if(He(o.end,n)<=0)o={start:js(o.start,r.line,r.column),end:js(o.end,r.line,r.column)};else{if(He(n,o.start)<=0)return null;s={start:s.start,end:a("end")},o={start:js(o.start,r.line,r.column),end:js(n,r.line,r.column)}}else{if(He(o.end,r)<=0)return null;He(o.end,n)<=0?(s={start:a("start"),end:s.end},o={start:{line:1,column:0},end:js(o.end,r.line,r.column)}):(s={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:js(n,r.line,r.column)})}return new e(this.sourceLines,s,o)}add(t,r){return new e(this.sourceLines,this.sourceLoc,{start:o_(this.targetLoc.start,t,r),end:o_(this.targetLoc.end,t,r)})}subtract(t,r){return new e(this.sourceLines,this.sourceLoc,{start:js(this.targetLoc.start,t,r),end:js(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 o_(e,t,r){return{line:e.line+t-1,column:e.line===1?e.column+r:e.column}}function js(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function CY(e,t,r,n,i){let s=He(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);He(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));He(i,a)<0&&r.prevPos(a,!0););}return o}var EY=Object.defineProperty,wY=(e,t,r)=>t in e?EY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ol=(e,t,r)=>(wY(e,typeof t!="symbol"?t+"":t,r),r),uc=class e{constructor(t,r=null){this.infos=t,ol(this,"length"),ol(this,"name"),ol(this,"mappings",[]),ol(this,"cachedSourceMap",null),ol(this,"cachedTabWidth"),this.length=t.length,this.name=r||null,this.name&&this.mappings.push(new dx(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 Lf.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(;He(c,a.sourceLoc.end)<0&&He(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}}),!fx.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(mx),s=i[r-1];return typeof s>"u"?"":n===s.length&&r<i.length?`
|
|
1189
1189
|
`: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?`
|
|
1190
1190
|
`: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(sc(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)fx.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 sc(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 sc(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(!sc(this.charAt(t))&&this.nextPos(t))return t;return null}else{for(;sc(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):Lo}trimRight(){let t=this.skipSpaces(this.lastPos(),!0,!0);return t?this.slice(this.firstPos(),t):Lo}trim(){let t=this.skipSpaces(this.firstPos(),!1,!0);if(t===null)return Lo;let r=this.skipSpaces(this.lastPos(),!0,!0);return r===null?Lo: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(mx).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)),q(n.join(`
|
|
@@ -1279,9 +1279,9 @@ ${" ".repeat(6+i)}^`),u));t+=`
|
|
|
1279
1279
|
|
|
1280
1280
|
${c.join(`
|
|
1281
1281
|
`)}
|
|
1282
|
-
`}this.message=t}},tJ=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Y_=new Set(["string","number","boolean","bigint","symbol","undefined"]),jt=pc;function rJ(e){return/^[$A-Z_a-z][\w$]*$/.test(e)}var Ex="__magicast_proxy";function Ir(e,t=new Set){if(e===void 0)return jt.identifier("undefined");if(e===null)return jt.literal(null);if(Y_.has(typeof e))return jt.literal(e);if(t.has(e))throw new br("Can not serialize circular reference");if(t.add(e),e[Ex])return e.$ast;if(e instanceof RegExp){let r=jt.regExpLiteral(e.source,e.flags);return delete r.extra.raw,r}return e instanceof Set?jt.newExpression(jt.identifier("Set"),[jt.arrayExpression([...e].map(r=>Ir(r,t)))]):e instanceof Date?jt.newExpression(jt.identifier("Date"),[jt.literal(e.toISOString())]):e instanceof Map?jt.newExpression(jt.identifier("Map"),[jt.arrayExpression([...e].map(([r,n])=>jt.arrayExpression([Ir(r,t),Ir(n,t)])))]):Array.isArray(e)?jt.arrayExpression(e.map(r=>Ir(r,t))):typeof e=="object"?jt.objectExpression(Object.entries(e).map(([r,n])=>jt.property("init",/^[$A-Z_a-z][\w$]*$/g.test(r)?jt.identifier(r):jt.literal(r),Ir(n,t)))):jt.literal(e)}function nJ(e,t={}){let r=t;return r[Ex]=!0,r.$ast=e,r.$type||(r.$type="object"),r}var iJ={enumerable:!0,configurable:!0};function An(e,t,r){let n=nJ(e,t);return new Proxy({},{ownKeys(){return Object.keys(n).filter(i=>i!==Ex&&!i.startsWith("$"))},getOwnPropertyDescriptor(){return iJ},has(i,s){return s in n},...r,get(i,s,o){if(s in n)return n[s];if(r.get)return r.get(i,s,o)},set(i,s,o,a){return s in n?(n[s]=o,!0):r.set?r.set(i,s,o,a):!1}})}var un=pc,cx=new WeakMap;function sJ(e,t,r){if(cx.has(t))return cx.get(t);let n=An(t,{get $declaration(){return e},get imported(){return t.type==="ImportDefaultSpecifier"?"default":t.type==="ImportNamespaceSpecifier"?"*":t.imported.type==="Identifier"?t.imported.name:t.imported.value},set imported(i){if(t.type!=="ImportSpecifier")throw new br("Changing import name is not yet implemented");t.imported.type==="Identifier"?t.imported.name=i:t.imported.value=i},get local(){return t.local.name},set local(i){t.local.name=i},get from(){return e.source.value},set from(i){if(i===e.source.value)return;e.specifiers=e.specifiers.filter(o=>o!==t),e.specifiers.length===0&&(r.body=r.body.filter(o=>o!==e));let s=r.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===i);s?s.specifiers.push(t):r.body.unshift(un.importDeclaration([t],un.stringLiteral(i)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return cx.set(t,n),n}function oJ(e,t){let r=()=>{let o=[];for(let a of e.body)if(a.type==="ImportDeclaration")for(let c of a.specifiers)o.push(sJ(a,c,e));return o},n=(o,a,c)=>{let u=r(),l=u.find(m=>m.local===o),p=a.local||o;if(l)return l.imported=a.imported,l.local=p,l.from=a.from,!0;let d=a.imported==="default"?un.importDefaultSpecifier(un.identifier(p)):a.imported==="*"?un.importNamespaceSpecifier(un.identifier(p)):un.importSpecifier(un.identifier(a.imported),un.identifier(p)),h=u.find(m=>m.from===a.from)?.$declaration;if(h)h.specifiers.push(d);else if(c==="prepend"||u.length===0)e.body.unshift(un.importDeclaration([d],un.stringLiteral(a.from)));else{let m=u.at(-1).$declaration,g=e.body.indexOf(m);e.body.splice(g+1,0,un.importDeclaration([d],un.stringLiteral(a.from)))}return!0},i=o=>{let a=r().find(l=>l.local===o);if(!a)return!1;let c=a.$declaration,u=a.$ast;return c.specifiers=c.specifiers.filter(l=>l!==u),c.specifiers.length===0&&(e.body=e.body.filter(l=>l!==c)),!0};return An(e,{$type:"imports",$add(o){n(o.local||o.imported,o,"prepend")},$prepend(o){n(o.local||o.imported,o,"prepend")},$append(o){n(o.local||o.imported,o,"append")},get $items(){return r()},toJSON(){return r().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return r().find(c=>c.local===a)},set(o,a,c){return n(a,c,"prepend")},deleteProperty(o,a){return i(a)},ownKeys(){return r().map(o=>o.local)},has(o,a){return r().some(c=>c.local===a)}})}function jf(e,t,r){let n=s=>t[s],i=(s,o)=>{t[s]=o};return An(e,{$type:"array",push(s){t.push(Ir(s))},pop(){return _r(t.pop(),r)},unshift(s){t.unshift(Ir(s))},shift(){return _r(t.shift(),r)},splice(s,o,...a){return t.splice(s,o,...a.map(u=>Ir(u))).map(u=>_r(u,r))},find(s){return t.map(o=>_r(o,r)).find(s)},findIndex(s){return t.map(o=>_r(o,r)).findIndex(s)},includes(s){return t.map(o=>_r(o,r)).includes(s)},toJSON(){return t.map(s=>_r(s,r))}},{get(s,o){if(o==="length")return t.length;if(o===Symbol.iterator)return function*(){for(let u of t)yield _r(u,r)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let c=n(a);if(c)return _r(c,r)},set(s,o,a){if(typeof o=="symbol")return!1;let c=+o;return Number.isNaN(c)?!1:(i(c,Ir(a)),!0)},deleteProperty(s,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(t[a]=Ir(void 0),!0)},ownKeys(){return["length",...t.map((s,o)=>o.toString())]}})}function aJ(e,t){if("elements"in e)return jf(e,e.elements,t)}function J_(e,t){if(e.type!=="CallExpression")throw new br("Not a function call");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new br("Not implemented")}let n=jf(e,e.arguments,t);return An(e,{$type:"function-call",$callee:r(e.callee),$args:n},{})}function cJ(e,t){if(e.type!=="ArrowFunctionExpression")throw new br("Not an arrow function expression");let r=jf(e,e.params,t);return An(e,{$type:"arrow-function-expression",$params:r,$body:_r(e.body,t)},{})}var uJ=pc;function lJ(e,t){if(!("properties"in e))return;let r=s=>{for(let o of e.properties){if("key"in o&&"name"in o.key&&o.key.name===s)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===s)return o.value.value??o.value}},n=(s,o=!1)=>{if("key"in s&&"name"in s.key)return s.key.name;if(s.type==="ObjectProperty"&&(s.key.type==="StringLiteral"||s.key.type==="NumericLiteral"||s.key.type==="BooleanLiteral"))return s.key.value.toString();if(o)throw new br(`Casting "${s.type}" is not supported`,{ast:s,code:t?.$code})},i=(s,o)=>{let a=e.properties.find(c=>n(c)===s);a?a.value=o:rJ(s)?e.properties.push({type:"Property",key:{type:"Identifier",name:s},value:o}):e.properties.push({type:"ObjectProperty",key:uJ.stringLiteral(s),value:o})};return An(e,{$type:"object",toJSON(){return e.properties.reduce((s,o)=>("key"in o&&"name"in o.key&&(s[o.key.name]=_r(o.value,t)),s),{})}},{get(s,o){let a=r(o);if(a)return _r(a,t)},set(s,o,a){return typeof o!="string"&&(o=String(o)),i(o,Ir(a)),!0},deleteProperty(s,o){typeof o!="string"&&(o=String(o));let a=e.properties.findIndex(c=>"key"in c&&"name"in c.key&&c.key.name===o);return a!==-1&&e.properties.splice(a,1),!0},ownKeys(){return e.properties.map(s=>n(s,!0)).filter(Boolean)}})}function X_(e,t){if(e.type!=="NewExpression")throw new br("Not a new expression");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new br("Not implemented")}let n=jf(e,e.arguments,t);return An(e,{$type:"new-expression",$callee:r(e.callee),$args:n},{})}function pJ(e){if(e.type!=="Identifier")throw new br("Not an identifier");return An(e,{$type:"identifier",$name:e.name},{})}function dJ(e){if(e.type!=="LogicalExpression")throw new br("Not a logical expression");return An(e,{$type:"logicalExpression"},{})}function fJ(e){if(e.type!=="MemberExpression")throw new br("Not a member expression");return An(e,{$type:"memberExpression"},{})}var ux=new WeakMap;function _r(e,t){if(Y_.has(typeof e))return e;if(tJ.has(e.type))return e.value;if(ux.has(e))return ux.get(e);let r;switch(e.type){case"ObjectExpression":{r=lJ(e,t);break}case"ArrayExpression":{r=aJ(e,t);break}case"CallExpression":{r=J_(e,t);break}case"ArrowFunctionExpression":{r=cJ(e,t);break}case"NewExpression":{r=X_(e,t);break}case"Identifier":{r=pJ(e);break}case"LogicalExpression":{r=dJ(e);break}case"MemberExpression":{r=fJ(e);break}case"TSAsExpression":case"TSSatisfiesExpression":{r=_r(e.expression,t);break}default:throw new br(`Casting "${e.type}" is not supported`,{ast:e,code:t?.$code})}return ux.set(e,r),r}var pl=pc;function mJ(e,t){let r=i=>{let s=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of e.body)if(o.type===s){if(i==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===i)return a.init}}},n=(i,s)=>{let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=Ir(s);for(let c of e.body)if(c.type===o){if(i==="default"){c.declaration=a;return}if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===i){u.init=a;return}}}e.body.push(i==="default"?pl.exportDefaultDeclaration(a):pl.exportNamedDeclaration(pl.variableDeclaration("const",[pl.variableDeclarator(pl.identifier(i),a)])))};return An(e,{$type:"exports"},{get(i,s){let o=r(s);if(o)return _r(o,t)},set(i,s,o){return n(s,o),!0},ownKeys(){return e.body.flatMap(i=>i.type==="ExportDefaultDeclaration"?["default"]:i.type==="ExportNamedDeclaration"&&i.declaration&&"declarations"in i.declaration?i.declaration.declarations.map(s=>"name"in s.id?s.id.name:""):[]).filter(Boolean)},deleteProperty(i,s){let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<e.body.length;a++){let c=e.body[a];if(c.type===o){if(s==="default")return e.body.splice(a,1),!0;if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===s)return e.body.splice(a,1),!0}}}return!1}})}function hJ(e,t){let r=e.program;if(r.type!=="Program")throw new br(`Cannot proxify ${e.type} as module`);let n={$code:t,$type:"module"},i=An(r,n,{ownKeys(){return["imports","exports","generate"]}});return n.exports=mJ(r,i),n.imports=oJ(r),n.generate=s=>wx(i,s),i}function Q_(e,t={}){let r={wrapColumn:t.wrapColumn===void 0,indent:t.tabWidth===void 0||t.useTabs===void 0,quote:t.quote===void 0,arrowParens:t.arrowParensAlways===void 0,trailingComma:t.trailingComma===void 0},n=2,i=0,s=0,o=0,a=0,c=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,u={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},l=(e||"").split(`
|
|
1283
|
-
`),p=!1;for(let d of l){let h=d.trim();if(h.length!==0){if(r.wrapColumn&&d.length>o&&(o=d.length),r.indent){let m=d.match(/^\s+/)?.[0]||"";m.length>0&&(m.length>0&&m.length<n&&(n=m.length),m[0]===" "?i++:m.length>0&&i--)}if(h.at(-1)===";"?s++:h.length>0&&s--,r.quote||r.arrowParens){let m=h.matchAll(c);for(let g of m)if(g.groups)for(let y in u)g.groups[y]&&u[y]++}r.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?a++:a--),p=h.endsWith(","))}}return{wrapColumn:o,useTabs:i>0,tabWidth:n,quote:u.singleQuote>u.doubleQuote?"single":"double",arrowParensAlways:u.singleParam>0,trailingComma:a>0||u.trailingComma>0,useSemi:s>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...t}}function Z_(e,t){let r=M_(e,{parser:t?.parser||W_(),...t});return hJ(r,e)}function eI(e,t){let r=M_("("+e+")",{parser:t?.parser||W_(),...t}),n=r.program.body[0];n.type==="ExpressionStatement"&&(n=n.expression),n.extra?.parenthesized&&(n.extra.parenthesized=!1);let i={$ast:r,$code:" "+e+" ",$type:"module"};return
|
|
1284
|
-
`).map(i=>i.trim()).includes("origin/main")?"main":t}catch(r){return _i.captureException(new Error("Error getting git default branch name:",{cause:r})),t}}function DJ(e){try{return((0,jo.spawnSync)("git",["rev-parse","--is-inside-work-tree"],{cwd:e}).stdout||"").toString().trim()==="true"}catch(t){return _i.captureException(new Error("Error getting git commit:",{cause:t})),!1}}function CJ(e){try{return((0,jo.spawnSync)("git",["rev-parse","HEAD"],{cwd:e}).stdout||"").toString().trim()}catch(t){return _i.captureException(new Error("Error getting git commit:",{cause:t})),""}}function EJ(e){try{return((0,jo.spawnSync)("git",["branch","--show-current"],{cwd:e}).stdout||"").toString().trim()}catch(t){return _i.captureException(new Error("Error getting current branch name:",{cause:t})),""}}function Fx(e){let t=$e.default.resolve("/");for(let r=0;r<20;r++){let n=$e.default.join(e,"package.json");if((0,ft.existsSync)(n))return e;if(e===t)break;e=$e.default.dirname(e)}return null}function vl(e){let t=$e.default.resolve("/");for(let r=0;r<20;r++){if((0,ft.existsSync)($e.default.join(e,"builder.config.json"))||(0,ft.existsSync)($e.default.join(e,"fusion.config.json"))||(0,ft.existsSync)($e.default.join(e,"package.json"))||(0,ft.existsSync)($e.default.join(e,"remix.config.js"))||(0,ft.existsSync)($e.default.join(e,"remix.config.mjs"))||(0,ft.existsSync)($e.default.join(e,"remix.config.ts"))||(0,ft.existsSync)($e.default.join(e,"vite.config.js"))||(0,ft.existsSync)($e.default.join(e,"vite.config.ts"))||(0,ft.existsSync)($e.default.join(e,"vite.config.mjs"))||(0,ft.existsSync)($e.default.join(e,"next.config.js"))||(0,ft.existsSync)($e.default.join(e,"next.config.ts"))||(0,ft.existsSync)($e.default.join(e,"angular.json"))||(0,ft.existsSync)($e.default.join(e,"project.json"))||(0,ft.existsSync)($e.default.join(e,"tsconfig.json")))return e;if(e===t)break;e=$e.default.dirname(e)}return null}f();f();var ur=[];for(let e=0;e<256;++e)ur.push((e+256).toString(16).slice(1));function aI(e,t=0){return(ur[e[t+0]]+ur[e[t+1]]+ur[e[t+2]]+ur[e[t+3]]+"-"+ur[e[t+4]]+ur[e[t+5]]+"-"+ur[e[t+6]]+ur[e[t+7]]+"-"+ur[e[t+8]]+ur[e[t+9]]+"-"+ur[e[t+10]]+ur[e[t+11]]+ur[e[t+12]]+ur[e[t+13]]+ur[e[t+14]]+ur[e[t+15]]).toLowerCase()}f();var cI=G(require("crypto")),Gf=new Uint8Array(256),qf=Gf.length;function _x(){return qf>Gf.length-16&&(cI.default.randomFillSync(Gf),qf=0),Gf.slice(qf,qf+=16)}f();f();var uI=G(require("crypto")),Ix={randomUUID:uI.default.randomUUID};function wJ(e,t,r){if(Ix.randomUUID&&!t&&!e)return Ix.randomUUID();e=e||{};let n=e.random||(e.rng||_x)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return aI(n)}var kx=wJ;var Ox=G(require("os"),1),lI=G(_t(),1);f();var mt=class extends Error{},ct=class extends mt{constructor({type:t,cause:r,message:n,suggestions:i=[],hostname:s,port:o,statusCode:a,errorCode:c}){super(n,{cause:r}),this.name="NetworkError",this.type=t,this.suggestions=i,this.hostname=s,this.port=o,this.statusCode=a,this.errorCode=c}type;suggestions;hostname;port;statusCode;errorCode};function Nx(e,t,r){switch(e.code){case"ECONNREFUSED":return new ct({type:"connection_refused",cause:e,message:`Connection refused to ${t}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new ct({type:"connection_timeout",cause:e,message:`Connection timed out to ${t}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new ct({type:"dns_not_found",cause:e,message:`Cannot resolve ${t}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,errorCode:"ENOTFOUND"});default:return new ct({type:"unknown",cause:e,message:`Network error connecting to ${t}: ${e.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r})}}function
|
|
1282
|
+
`}this.message=t}},tJ=new Set(["Literal","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","RegExpLiteral","BigIntLiteral"]),Y_=new Set(["string","number","boolean","bigint","symbol","undefined"]),jt=pc;function rJ(e){return/^[$A-Z_a-z][\w$]*$/.test(e)}var Ex="__magicast_proxy";function _r(e,t=new Set){if(e===void 0)return jt.identifier("undefined");if(e===null)return jt.literal(null);if(Y_.has(typeof e))return jt.literal(e);if(t.has(e))throw new br("Can not serialize circular reference");if(t.add(e),e[Ex])return e.$ast;if(e instanceof RegExp){let r=jt.regExpLiteral(e.source,e.flags);return delete r.extra.raw,r}return e instanceof Set?jt.newExpression(jt.identifier("Set"),[jt.arrayExpression([...e].map(r=>_r(r,t)))]):e instanceof Date?jt.newExpression(jt.identifier("Date"),[jt.literal(e.toISOString())]):e instanceof Map?jt.newExpression(jt.identifier("Map"),[jt.arrayExpression([...e].map(([r,n])=>jt.arrayExpression([_r(r,t),_r(n,t)])))]):Array.isArray(e)?jt.arrayExpression(e.map(r=>_r(r,t))):typeof e=="object"?jt.objectExpression(Object.entries(e).map(([r,n])=>jt.property("init",/^[$A-Z_a-z][\w$]*$/g.test(r)?jt.identifier(r):jt.literal(r),_r(n,t)))):jt.literal(e)}function nJ(e,t={}){let r=t;return r[Ex]=!0,r.$ast=e,r.$type||(r.$type="object"),r}var iJ={enumerable:!0,configurable:!0};function An(e,t,r){let n=nJ(e,t);return new Proxy({},{ownKeys(){return Object.keys(n).filter(i=>i!==Ex&&!i.startsWith("$"))},getOwnPropertyDescriptor(){return iJ},has(i,s){return s in n},...r,get(i,s,o){if(s in n)return n[s];if(r.get)return r.get(i,s,o)},set(i,s,o,a){return s in n?(n[s]=o,!0):r.set?r.set(i,s,o,a):!1}})}var un=pc,cx=new WeakMap;function sJ(e,t,r){if(cx.has(t))return cx.get(t);let n=An(t,{get $declaration(){return e},get imported(){return t.type==="ImportDefaultSpecifier"?"default":t.type==="ImportNamespaceSpecifier"?"*":t.imported.type==="Identifier"?t.imported.name:t.imported.value},set imported(i){if(t.type!=="ImportSpecifier")throw new br("Changing import name is not yet implemented");t.imported.type==="Identifier"?t.imported.name=i:t.imported.value=i},get local(){return t.local.name},set local(i){t.local.name=i},get from(){return e.source.value},set from(i){if(i===e.source.value)return;e.specifiers=e.specifiers.filter(o=>o!==t),e.specifiers.length===0&&(r.body=r.body.filter(o=>o!==e));let s=r.body.find(o=>o.type==="ImportDeclaration"&&o.source.value===i);s?s.specifiers.push(t):r.body.unshift(un.importDeclaration([t],un.stringLiteral(i)))},toJSON(){return{imported:this.imported,local:this.local,from:this.from}}},{ownKeys(){return["imported","local","from","toJSON"]}});return cx.set(t,n),n}function oJ(e,t){let r=()=>{let o=[];for(let a of e.body)if(a.type==="ImportDeclaration")for(let c of a.specifiers)o.push(sJ(a,c,e));return o},n=(o,a,c)=>{let u=r(),l=u.find(m=>m.local===o),p=a.local||o;if(l)return l.imported=a.imported,l.local=p,l.from=a.from,!0;let d=a.imported==="default"?un.importDefaultSpecifier(un.identifier(p)):a.imported==="*"?un.importNamespaceSpecifier(un.identifier(p)):un.importSpecifier(un.identifier(a.imported),un.identifier(p)),h=u.find(m=>m.from===a.from)?.$declaration;if(h)h.specifiers.push(d);else if(c==="prepend"||u.length===0)e.body.unshift(un.importDeclaration([d],un.stringLiteral(a.from)));else{let m=u.at(-1).$declaration,g=e.body.indexOf(m);e.body.splice(g+1,0,un.importDeclaration([d],un.stringLiteral(a.from)))}return!0},i=o=>{let a=r().find(l=>l.local===o);if(!a)return!1;let c=a.$declaration,u=a.$ast;return c.specifiers=c.specifiers.filter(l=>l!==u),c.specifiers.length===0&&(e.body=e.body.filter(l=>l!==c)),!0};return An(e,{$type:"imports",$add(o){n(o.local||o.imported,o,"prepend")},$prepend(o){n(o.local||o.imported,o,"prepend")},$append(o){n(o.local||o.imported,o,"append")},get $items(){return r()},toJSON(){return r().reduce((o,a)=>(o[a.local]=a,o),{})}},{get(o,a){return r().find(c=>c.local===a)},set(o,a,c){return n(a,c,"prepend")},deleteProperty(o,a){return i(a)},ownKeys(){return r().map(o=>o.local)},has(o,a){return r().some(c=>c.local===a)}})}function jf(e,t,r){let n=s=>t[s],i=(s,o)=>{t[s]=o};return An(e,{$type:"array",push(s){t.push(_r(s))},pop(){return Fr(t.pop(),r)},unshift(s){t.unshift(_r(s))},shift(){return Fr(t.shift(),r)},splice(s,o,...a){return t.splice(s,o,...a.map(u=>_r(u))).map(u=>Fr(u,r))},find(s){return t.map(o=>Fr(o,r)).find(s)},findIndex(s){return t.map(o=>Fr(o,r)).findIndex(s)},includes(s){return t.map(o=>Fr(o,r)).includes(s)},toJSON(){return t.map(s=>Fr(s,r))}},{get(s,o){if(o==="length")return t.length;if(o===Symbol.iterator)return function*(){for(let u of t)yield Fr(u,r)};if(typeof o=="symbol")return;let a=+o;if(Number.isNaN(a))return;let c=n(a);if(c)return Fr(c,r)},set(s,o,a){if(typeof o=="symbol")return!1;let c=+o;return Number.isNaN(c)?!1:(i(c,_r(a)),!0)},deleteProperty(s,o){if(typeof o=="symbol")return!1;let a=+o;return Number.isNaN(a)?!1:(t[a]=_r(void 0),!0)},ownKeys(){return["length",...t.map((s,o)=>o.toString())]}})}function aJ(e,t){if("elements"in e)return jf(e,e.elements,t)}function J_(e,t){if(e.type!=="CallExpression")throw new br("Not a function call");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new br("Not implemented")}let n=jf(e,e.arguments,t);return An(e,{$type:"function-call",$callee:r(e.callee),$args:n},{})}function cJ(e,t){if(e.type!=="ArrowFunctionExpression")throw new br("Not an arrow function expression");let r=jf(e,e.params,t);return An(e,{$type:"arrow-function-expression",$params:r,$body:Fr(e.body,t)},{})}var uJ=pc;function lJ(e,t){if(!("properties"in e))return;let r=s=>{for(let o of e.properties){if("key"in o&&"name"in o.key&&o.key.name===s)return o.value;if(o.type==="ObjectProperty"&&(o.key.type==="StringLiteral"||o.key.type==="NumericLiteral"||o.key.type==="BooleanLiteral")&&o.key.value.toString()===s)return o.value.value??o.value}},n=(s,o=!1)=>{if("key"in s&&"name"in s.key)return s.key.name;if(s.type==="ObjectProperty"&&(s.key.type==="StringLiteral"||s.key.type==="NumericLiteral"||s.key.type==="BooleanLiteral"))return s.key.value.toString();if(o)throw new br(`Casting "${s.type}" is not supported`,{ast:s,code:t?.$code})},i=(s,o)=>{let a=e.properties.find(c=>n(c)===s);a?a.value=o:rJ(s)?e.properties.push({type:"Property",key:{type:"Identifier",name:s},value:o}):e.properties.push({type:"ObjectProperty",key:uJ.stringLiteral(s),value:o})};return An(e,{$type:"object",toJSON(){return e.properties.reduce((s,o)=>("key"in o&&"name"in o.key&&(s[o.key.name]=Fr(o.value,t)),s),{})}},{get(s,o){let a=r(o);if(a)return Fr(a,t)},set(s,o,a){return typeof o!="string"&&(o=String(o)),i(o,_r(a)),!0},deleteProperty(s,o){typeof o!="string"&&(o=String(o));let a=e.properties.findIndex(c=>"key"in c&&"name"in c.key&&c.key.name===o);return a!==-1&&e.properties.splice(a,1),!0},ownKeys(){return e.properties.map(s=>n(s,!0)).filter(Boolean)}})}function X_(e,t){if(e.type!=="NewExpression")throw new br("Not a new expression");function r(i){if(i.type==="Identifier")return i.name;if(i.type==="MemberExpression")return`${r(i.object)}.${r(i.property)}`;throw new br("Not implemented")}let n=jf(e,e.arguments,t);return An(e,{$type:"new-expression",$callee:r(e.callee),$args:n},{})}function pJ(e){if(e.type!=="Identifier")throw new br("Not an identifier");return An(e,{$type:"identifier",$name:e.name},{})}function dJ(e){if(e.type!=="LogicalExpression")throw new br("Not a logical expression");return An(e,{$type:"logicalExpression"},{})}function fJ(e){if(e.type!=="MemberExpression")throw new br("Not a member expression");return An(e,{$type:"memberExpression"},{})}var ux=new WeakMap;function Fr(e,t){if(Y_.has(typeof e))return e;if(tJ.has(e.type))return e.value;if(ux.has(e))return ux.get(e);let r;switch(e.type){case"ObjectExpression":{r=lJ(e,t);break}case"ArrayExpression":{r=aJ(e,t);break}case"CallExpression":{r=J_(e,t);break}case"ArrowFunctionExpression":{r=cJ(e,t);break}case"NewExpression":{r=X_(e,t);break}case"Identifier":{r=pJ(e);break}case"LogicalExpression":{r=dJ(e);break}case"MemberExpression":{r=fJ(e);break}case"TSAsExpression":case"TSSatisfiesExpression":{r=Fr(e.expression,t);break}default:throw new br(`Casting "${e.type}" is not supported`,{ast:e,code:t?.$code})}return ux.set(e,r),r}var pl=pc;function mJ(e,t){let r=i=>{let s=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let o of e.body)if(o.type===s){if(i==="default")return o.declaration;if(o.declaration&&"declarations"in o.declaration){let a=o.declaration.declarations[0];if("name"in a.id&&a.id.name===i)return a.init}}},n=(i,s)=>{let o=i==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration",a=_r(s);for(let c of e.body)if(c.type===o){if(i==="default"){c.declaration=a;return}if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===i){u.init=a;return}}}e.body.push(i==="default"?pl.exportDefaultDeclaration(a):pl.exportNamedDeclaration(pl.variableDeclaration("const",[pl.variableDeclarator(pl.identifier(i),a)])))};return An(e,{$type:"exports"},{get(i,s){let o=r(s);if(o)return Fr(o,t)},set(i,s,o){return n(s,o),!0},ownKeys(){return e.body.flatMap(i=>i.type==="ExportDefaultDeclaration"?["default"]:i.type==="ExportNamedDeclaration"&&i.declaration&&"declarations"in i.declaration?i.declaration.declarations.map(s=>"name"in s.id?s.id.name:""):[]).filter(Boolean)},deleteProperty(i,s){let o=s==="default"?"ExportDefaultDeclaration":"ExportNamedDeclaration";for(let a=0;a<e.body.length;a++){let c=e.body[a];if(c.type===o){if(s==="default")return e.body.splice(a,1),!0;if(c.declaration&&"declarations"in c.declaration){let u=c.declaration.declarations[0];if("name"in u.id&&u.id.name===s)return e.body.splice(a,1),!0}}}return!1}})}function hJ(e,t){let r=e.program;if(r.type!=="Program")throw new br(`Cannot proxify ${e.type} as module`);let n={$code:t,$type:"module"},i=An(r,n,{ownKeys(){return["imports","exports","generate"]}});return n.exports=mJ(r,i),n.imports=oJ(r),n.generate=s=>wx(i,s),i}function Q_(e,t={}){let r={wrapColumn:t.wrapColumn===void 0,indent:t.tabWidth===void 0||t.useTabs===void 0,quote:t.quote===void 0,arrowParens:t.arrowParensAlways===void 0,trailingComma:t.trailingComma===void 0},n=2,i=0,s=0,o=0,a=0,c=/(?<doubleQuote>"[^"]+")|(?<singleQuote>'[^']+')|(?<singleParam>\([^),]+\)\s*=>)|(?<trailingComma>,\s*[\]}])/g,u={doubleQuote:0,singleQuote:0,singleParam:0,trailingComma:0},l=(e||"").split(`
|
|
1283
|
+
`),p=!1;for(let d of l){let h=d.trim();if(h.length!==0){if(r.wrapColumn&&d.length>o&&(o=d.length),r.indent){let m=d.match(/^\s+/)?.[0]||"";m.length>0&&(m.length>0&&m.length<n&&(n=m.length),m[0]===" "?i++:m.length>0&&i--)}if(h.at(-1)===";"?s++:h.length>0&&s--,r.quote||r.arrowParens){let m=h.matchAll(c);for(let g of m)if(g.groups)for(let y in u)g.groups[y]&&u[y]++}r.trailingComma&&((d.startsWith("}")||d.startsWith("]"))&&(p?a++:a--),p=h.endsWith(","))}}return{wrapColumn:o,useTabs:i>0,tabWidth:n,quote:u.singleQuote>u.doubleQuote?"single":"double",arrowParensAlways:u.singleParam>0,trailingComma:a>0||u.trailingComma>0,useSemi:s>0,arrayBracketSpacing:void 0,objectCurlySpacing:void 0,...t}}function Z_(e,t){let r=M_(e,{parser:t?.parser||W_(),...t});return hJ(r,e)}function eI(e,t){let r=M_("("+e+")",{parser:t?.parser||W_(),...t}),n=r.program.body[0];n.type==="ExpressionStatement"&&(n=n.expression),n.extra?.parenthesized&&(n.extra.parenthesized=!1);let i={$ast:r,$code:" "+e+" ",$type:"module"};return Fr(n,i)}function wx(e,t={}){let r=e.$ast||e,n=t.format===!1||!("$code"in e)?{}:Q_(e.$code,t.format),{code:i,map:s}=XY(r,{...t,...n});return{code:i,map:s}}async function gJ(e,t={}){let r=await _f.promises.readFile(e,"utf8");return t.sourceFileName=t.sourceFileName??e,Z_(r,t)}async function yJ(e,t,r){let n="$ast"in e?e.$ast:e,{code:i,map:s}=wx(n,r);await _f.promises.writeFile(t,i),s&&await _f.promises.writeFile(t+".map",s)}var Af=pc,bJ={functionCall(e,...t){let r=Af.callExpression(Af.identifier(e),t.map(n=>_r(n)));return J_(r)},newExpression(e,...t){let r=Af.newExpression(Af.identifier(e),t.map(n=>_r(n)));return X_(r)},literal(e){return _r(e)},raw(e){return eI(e)}};var _i=G(require("@sentry/node"),1);var Tx=G(require("prettier"),1);async function iI(e,t){let r=await(0,Xt.readdir)(e,{withFileTypes:!0}),n=[];for(let i of r){let s=$e.default.join(e,i.name);if(i.isDirectory()){if(!t.has(i.name))try{let o=await iI(s,t);n.push(...o)}catch(o){_i.captureException(o,{tags:{errorType:"filesystem_permission",component:"readdirRecursive"},extra:{directory:s,errorCode:o.code}})}}else n.push(s)}return n}async function sI(e){let t=new Set,r=(...u)=>{if(process.env.DEBUG){let l=new Date,p=`${String(l.getMinutes()).padStart(2,"0")}:${String(l.getSeconds()).padStart(2,"0")}.${String(l.getMilliseconds()).padStart(3,"0")}`;console.debug(p,"[builder-dev-tools]",...u)}},n=async u=>{let l=(0,tI.createHash)("md5");return l.update(u),l.digest("hex")},i=$e.default.normalize($e.default.resolve(process.cwd(),e.cwd)),s=Fx($e.default.normalize(e.cwd))??i,o=vl($e.default.normalize(e.cwd))??s,a={...$e.default,getCwdDir:()=>i,getRepoRootDir:()=>s,getAppRootDir:()=>o,cwd:()=>process.cwd(),exists:async u=>{try{return await(0,Xt.access)(u),!0}catch{return!1}},magicast:Sx,existsSync:u=>(0,ft.existsSync)(u),readdir:async(u,l)=>{let p=await(0,Xt.readdir)(u);return l?p.map(d=>$e.default.join(u,d)):p},readdirRecursive:async(u,l)=>iI(u,new Set(l)),readdirSync:u=>(0,ft.readdirSync)(u),readFile:async u=>{try{return await(0,Xt.readFile)(u,"utf-8")}catch(l){if(l.code==="ENOENT")return null;throw r(l,u),l}},readFileSync(u){try{return(0,ft.readFileSync)(u,"utf-8")}catch(l){if(l.code==="ENOENT")return null;throw r(l,u),l}},readFileSyncBuffer(u){try{return new Uint8Array((0,ft.readFileSync)(u,{encoding:null}))}catch(l){if(l.code==="ENOENT")return null;throw r(l,u),l}},spawnSync:jo.spawnSync,stat:async u=>await(0,Xt.stat)(u),statSync:u=>(0,ft.statSync)(u),unlinkSync:u=>{(0,ft.unlinkSync)(u)},unlink:async u=>{await(0,Xt.unlink)(u)},writeFile:async(u,l)=>{u=$e.default.normalize(u);let p={path:u,basename:$e.default.basename(u),dirname:$e.default.dirname(u),extname:$e.default.extname(u)};await(0,Xt.mkdir)($e.default.dirname(u),{recursive:!0}),await(0,Xt.writeFile)(u,l);for(let d of t)await d(p)},hash:n,getDeviceId:()=>n(`${(0,xl.hostname)()}:${(0,xl.homedir)()}`),formatCode:async(u,l)=>{let p=null;try{p=await Tx.default.resolveConfig(u)}catch{}try{return Tx.default.format(l,{...p,filepath:u})}catch{}return l},on:(u,l)=>{u==="change"&&t.add(l)},off:(u,l)=>{u==="change"&&t.delete(l)},debug:r,launchEditor:async u=>{try{let l=u.filePath;typeof u.line=="number"&&(l+=`:${u.line}`,typeof u.column=="number"&&(l+=`:${u.column}`)),(0,nI.default)(l,"code",(p,d)=>{_i.captureException(new Error(`Failed to launch editor for ${d}`),{extra:{pathFile:p}})})}catch(l){_i.captureException(new Error("Failed to launch editor",{cause:l}))}},platform:()=>({runtime:"node",os:process.platform}),getRepoInfo:async u=>{let l=$e.default.normalize(u??e.cwd);return{hasGit:DJ(l),remoteUrl:xJ(l),defaultBranch:vJ(l),commit:CJ(l),currentBranch:EJ(l)}},getFrameworks:()=>[],ts:rI.default,Sentry:_i,connectionTracker:null,version:Ae,sdkVersion:null,ignoreMissingConfig:e.ignoreMissingConfig,kind:null};a.connectionTracker=new ju(a);let c=await Eo(a);return a.getFrameworks=()=>c,a}function oI(){let e=(0,xl.homedir)();return $e.default.join(e,".config","builder","dev-tools.json")}function Ax(e,t){return typeof e=="object"&&e!=null&&t in e}async function dc(){let e=oI();try{let t=await(0,Xt.readFile)(e,"utf-8");if(typeof t=="string")return JSON.parse(t)}catch(t){if(t.code==="ENOENT")return null}return null}async function Px(e){let t=oI();e=typeof e=="object"&&e!=null?e:{},await(0,Xt.mkdir)($e.default.dirname(t),{recursive:!0}),await(0,Xt.writeFile)(t,JSON.stringify(e??{},null,2))}function xJ(e){try{return((0,jo.spawnSync)("git",["config","--get","remote.origin.url"],{cwd:e}).stdout||"").toString().trim()}catch(t){return _i.captureException(new Error("Error getting git remote URL:",{cause:t})),""}}function vJ(e){let t="master";try{let r=(0,jo.spawnSync)("git",["branch","-r"],{cwd:e});return r.stdout&&r.stdout.toString().trim().split(`
|
|
1284
|
+
`).map(i=>i.trim()).includes("origin/main")?"main":t}catch(r){return _i.captureException(new Error("Error getting git default branch name:",{cause:r})),t}}function DJ(e){try{return((0,jo.spawnSync)("git",["rev-parse","--is-inside-work-tree"],{cwd:e}).stdout||"").toString().trim()==="true"}catch(t){return _i.captureException(new Error("Error getting git commit:",{cause:t})),!1}}function CJ(e){try{return((0,jo.spawnSync)("git",["rev-parse","HEAD"],{cwd:e}).stdout||"").toString().trim()}catch(t){return _i.captureException(new Error("Error getting git commit:",{cause:t})),""}}function EJ(e){try{return((0,jo.spawnSync)("git",["branch","--show-current"],{cwd:e}).stdout||"").toString().trim()}catch(t){return _i.captureException(new Error("Error getting current branch name:",{cause:t})),""}}function Fx(e){let t=$e.default.resolve("/");for(let r=0;r<20;r++){let n=$e.default.join(e,"package.json");if((0,ft.existsSync)(n))return e;if(e===t)break;e=$e.default.dirname(e)}return null}function vl(e){let t=$e.default.resolve("/");for(let r=0;r<20;r++){if((0,ft.existsSync)($e.default.join(e,"builder.config.json"))||(0,ft.existsSync)($e.default.join(e,"fusion.config.json"))||(0,ft.existsSync)($e.default.join(e,"package.json"))||(0,ft.existsSync)($e.default.join(e,"remix.config.js"))||(0,ft.existsSync)($e.default.join(e,"remix.config.mjs"))||(0,ft.existsSync)($e.default.join(e,"remix.config.ts"))||(0,ft.existsSync)($e.default.join(e,"vite.config.js"))||(0,ft.existsSync)($e.default.join(e,"vite.config.ts"))||(0,ft.existsSync)($e.default.join(e,"vite.config.mjs"))||(0,ft.existsSync)($e.default.join(e,"next.config.js"))||(0,ft.existsSync)($e.default.join(e,"next.config.ts"))||(0,ft.existsSync)($e.default.join(e,"angular.json"))||(0,ft.existsSync)($e.default.join(e,"project.json"))||(0,ft.existsSync)($e.default.join(e,"tsconfig.json")))return e;if(e===t)break;e=$e.default.dirname(e)}return null}f();f();var ur=[];for(let e=0;e<256;++e)ur.push((e+256).toString(16).slice(1));function aI(e,t=0){return(ur[e[t+0]]+ur[e[t+1]]+ur[e[t+2]]+ur[e[t+3]]+"-"+ur[e[t+4]]+ur[e[t+5]]+"-"+ur[e[t+6]]+ur[e[t+7]]+"-"+ur[e[t+8]]+ur[e[t+9]]+"-"+ur[e[t+10]]+ur[e[t+11]]+ur[e[t+12]]+ur[e[t+13]]+ur[e[t+14]]+ur[e[t+15]]).toLowerCase()}f();var cI=G(require("crypto")),Gf=new Uint8Array(256),qf=Gf.length;function _x(){return qf>Gf.length-16&&(cI.default.randomFillSync(Gf),qf=0),Gf.slice(qf,qf+=16)}f();f();var uI=G(require("crypto")),Ix={randomUUID:uI.default.randomUUID};function wJ(e,t,r){if(Ix.randomUUID&&!t&&!e)return Ix.randomUUID();e=e||{};let n=e.random||(e.rng||_x)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return aI(n)}var kx=wJ;var Ox=G(require("os"),1),lI=G(_t(),1);f();var mt=class extends Error{},ct=class extends mt{constructor({type:t,cause:r,message:n,suggestions:i=[],hostname:s,port:o,statusCode:a,errorCode:c}){super(n,{cause:r}),this.name="NetworkError",this.type=t,this.suggestions=i,this.hostname=s,this.port=o,this.statusCode=a,this.errorCode=c}type;suggestions;hostname;port;statusCode;errorCode};function Nx(e,t,r){switch(e.code){case"ECONNREFUSED":return new ct({type:"connection_refused",cause:e,message:`Connection refused to ${t}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new ct({type:"connection_timeout",cause:e,message:`Connection timed out to ${t}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new ct({type:"dns_not_found",cause:e,message:`Cannot resolve ${t}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,errorCode:"ENOTFOUND"});default:return new ct({type:"unknown",cause:e,message:`Network error connecting to ${t}: ${e.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r})}}function Ir(e){N.error("\u{1F534} Network Error Details:"),N.error(e.message),e.suggestions.length>0&&(N.info("\u{1F4A1} Troubleshooting suggestions:"),e.suggestions.forEach((t,r)=>{N.info(` ${r+1}. ${t}`)})),e.hostname&&N.info(`\u{1F4CD} Target: ${e.hostname}${e.port?`:${e.port}`:""}`),e.statusCode&&N.info(`\u{1F4CA} HTTP Status: ${e.statusCode}`),e.errorCode&&N.info(`\u{1F527} Error Code: ${e.errorCode}`),console.log(`
|
|
1285
1285
|
`)}async function pI(e){let t=process.env.NODE_ENV!=="test",r=await mI(),n=await fI();Ii.init(t?"2532be1b0436a18cb938b21fc7fa9faf":"",{logLevel:Ii.Types.LogLevel.None,flushIntervalMillis:500});let i=new Ii.Identify;return await Ii.identify(i,{device_id:r,user_id:n,platform:Ox.default.type(),os_name:process.platform,os_version:Ox.default.release()}).promise,ri.init({dsn:"https://3252dddc08dbb5bf406dc33bf3c13633@o117565.ingest.us.sentry.io/4505630794448896",tracesSampleRate:0,release:eF,environment:process.env.NODE_ENV,enabled:t,registerEsmLoaderHooks:!1,normalizeDepth:5,maxValueLength:1500,integrations:[ri.nativeNodeFetchIntegration(),ri.httpIntegration(),ri.extraErrorDataIntegration()],beforeSend:(s,o)=>{let a=o.originalException??o.syntheticException;return!(a instanceof mt)&&(e||s.level!=="warning")&&console.error((0,lI.red)(`ERROR ID: ${s.event_id}`),a),s},tracePropagationTargets:[]}),ri.setUser({username:process.env.USER||process.env.USERNAME||"unknown"}),ri}async function Be(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await fI(),i=await mI();return await Ii.track(e,r,{user_id:n,device_id:i}).promise}var zf,Rx;async function dI(e){zf=e;let t=await dc();await Px({...t,userId:e})}async function fI(){if(zf)return zf;let e=await dc(),t;return Ax(e,"userId")&&(t=e.userId),zf=t,t}async function mI(){if(Rx)return Rx;let e=await dc(),t=kx();return Ax(e,"deviceId")?t=e.deviceId:await Px({...e,deviceId:t}),Rx=t,t}f();var DI=require("undici");var hI="0.0.0";var Bx=G(require("process"),1),CI=G(require("@sentry/node"),1);f();function gI(e){return e=e.replace(/\\/g,"/"),e.startsWith("/")?e.slice(1):e.startsWith("./")?e.slice(2):e}function yI(e,t,r,n){let i=e.split(`
|
|
1286
1286
|
`),s=Math.max(0,t),o=Math.min(i.length,s+r),a=i.slice(s,o);return n?a.map((l,p)=>{let d=s+p+1,h=l.length>1500?l.substring(0,1500)+"...":l;return`${d.toString().padStart(6)}:${h}`}).join(`
|
|
1287
1287
|
`):a.map(c=>c.length>1500?c.substring(0,1500)+"...":c).join(`
|
|
@@ -1322,7 +1322,7 @@ Restarting server after Builder Devtools update...
|
|
|
1322
1322
|
<h3>How's Devtools working for you?</h3>
|
|
1323
1323
|
<p>We'd love your feedback!</p>
|
|
1324
1324
|
</div>
|
|
1325
|
-
\`,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.11.48"}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)}
|
|
1325
|
+
\`,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.11.49"}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)}
|
|
1326
1326
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
1327
1327
|
<aside>
|
|
1328
1328
|
<div class="logo"></div>
|
|
@@ -1361,7 +1361,7 @@ Restarting server after Builder Devtools update...
|
|
|
1361
1361
|
</nav>
|
|
1362
1362
|
</section>
|
|
1363
1363
|
</main>
|
|
1364
|
-
\`,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.11.
|
|
1364
|
+
\`,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.11.49"),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.11.49"),mo());})();`)}async function gR(e){return yR(e,`<!doctype html>
|
|
1365
1365
|
<html lang="en" dir="ltr">
|
|
1366
1366
|
<head>
|
|
1367
1367
|
<meta charset="utf-8" />
|
|
@@ -1917,7 +1917,7 @@ ${c.userPrompt}`)}}c.userMessage=t,c.userPrompt=t.userPrompt,c.attachments=t.att
|
|
|
1917
1917
|
`).length,removedLines:0,content:a.content,oldContent:""})}}return o}#le(){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#Ne(){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(`
|
|
1918
1918
|
`).map(c=>(c=c.trim(),c?this.absolutePathToWorkspaceUrl(this.#e.join(this.#u,c)):null)).filter(c=>c!=null),s=await this.git(["--no-pager","diff","-U0","--no-color",r]).then(c=>c.trim()),o="",a=this.#i?.folders.find(c=>c.enableGit);return a&&!this.#g()&&s.length>0&&(o=`Notice that all the relative paths, are inside "${a.name}/", remember that when using Read/Write/Edit tools:
|
|
1919
1919
|
`),{files:i,diff:`${o}${s}`}}catch(t){this.#e.Sentry?.captureException(t,{tags:{operation:"codegen-git"}});return}}#Re(){return["status","--porcelain=v1","-z","--ignore-submodules=dirty"]}async isCleanWorkTree(){try{return(await this.git(this.#Re())).trim().length===0}catch{return!1}}async#Oe(t,r){let n=r.applyResults,i=[];for(let s of n)try{if(s.action==="delete"){let o=await this.deleteFile(s.filePath);o&&i.push(o)}else if(s.content){let o=await this.writeFile(s.filePath,s.content);o&&(this.#X.add(o),i.push(o))}}catch(o){t.Sentry?.captureException(o)}return i}#Be(){return this.#i?.folders?.length===1&&this.#i.folders[0].name==="."}#g(){return this.#i?.folders?.length===1||!this.#i?.folders?.length}resolveWorkspacePath(t,r){return v8({filePath:t,forceWorkspace:r,workspace:this.#i,workingDirectory:this.#s,sys:this.#e,canCollapseWorkspace:this.#g()})}#E(){try{let t=this.getSessionContext();return ys(t.turns)?.user.principals}catch{return}}absolutePathToWorkspaceUrl(t){return D8({absolutePath:t,workspace:this.#i,workingDirectory:this.#s,sys:this.#e,canCollapseWorkspace:this.#g()})}async readFile(t,r){if(!r){let n=Li(t,"read",this.#r?.accessControl,this.#E());if(!n.allowed)throw new mt(`ACL denied: ${n.message}`)}try{if(t==="AGENTS.md"&&this.#i?.agentsMD)return this.#i.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!!r);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){try{if(t==="AGENTS.md"&&this.#i?.agentsMD)return{absolutePath:t,recommendedPath:void 0,workspaceFolder:void 0,virtual:!0};let{resolvedPath:r,workspaceFolder:n}=this.resolveWorkspacePath(t,!1);return await this.#e.exists(r)?{absolutePath:r,recommendedPath:void 0,workspaceFolder:n,virtual:!1}:n?{absolutePath:void 0,recommendedPath:void 0,workspaceFolder:n,virtual:!1}:({resolvedPath:r,workspaceFolder:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(r)?{absolutePath:r,recommendedPath:r,workspaceFolder:n,virtual:!1}:{absolutePath:void 0,recommendedPath:r,workspaceFolder:n,virtual:!1})}catch(r){this.#e.Sentry?.captureException(r,{extra:{filePath:t}})}return{absolutePath:void 0,recommendedPath:void 0,workspaceFolder:void 0,virtual:!1}}readFileSync(t,r){if(!r){let n=Li(t,"read",this.#r?.accessControl,this.#E());if(!n.allowed)throw new mt(`ACL denied: ${n.message}`)}try{if(t==="AGENTS.md"&&this.#i?.agentsMD)return this.#i.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,n){if(!n){let i=Li(t,"write",this.#r?.accessControl,this.#E());if(!i.allowed)throw new mt(`ACL denied: ${i.message}`)}try{let{resolvedPath:i}=this.resolveWorkspacePath(t,!!n);return await this.#e.writeFile(i,r),i}catch(i){return this.#e.Sentry?.captureException(i,{extra:{filePath:t}}),null}}async listDir(t){let r=Li(t,"list",this.#r?.accessControl,this.#E());if(!r.allowed)throw new mt(`ACL denied: ${r.message}`);try{let{resolvedPath:n,workspaceFolder:i}=this.resolveWorkspacePath(t,!1);if(!await this.#e.exists(n))return[];let o=(await(0,k8.readdir)(n,{withFileTypes:!0})).map(a=>a.name+(a.isDirectory()?"/":""));if(this.#Be())return Hl({files:o.map(a=>this.#e.join(t,a).replace(/^\.\//,"")),policy:this.#r?.accessControl});if(i&&this.#i?.folders){let a=i.name||i.path;return Hl({files:o.map(c=>`${a}/${this.#e.join(t,c).replace(/^\.\//,"")}`),policy:this.#r?.accessControl})}return Hl({files:o,policy:this.#r?.accessControl})}catch(n){return this.#e.Sentry?.captureException(n,{extra:{dirPath:t}}),[]}}async stat(t,r){if(!r){let n=Li(t,"read",this.#r?.accessControl,this.#E());if(!n.allowed)throw new mt(`ACL denied: ${n.message}`)}try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(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,r){if(!r){let n=Li(t,"write",this.#r?.accessControl,this.#E());if(!n.allowed)throw new mt(`ACL denied: ${n.message}`)}try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!!r);return await this.#e.exists(n)?(await this.#e.unlink(n),n):null}catch(n){return this.#e.Sentry?.captureException(n,{extra:{filePath:t}}),null}}getLinesStats(){let t=this.#p?.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({numberOfContextLines:t,includeFilesOnly:r,filePaths:n}){if(!this.#t?.git)return[];try{let i=(await this.git(["branch","--show-current"])).trim();if(!i)throw new Error("Could not determine current branch");let s=!1;try{s=(await this.git(["remote"])).includes("origin")}catch(l){throw console.warn("No git remotes configured, cannot get diff from remote"),l}if(!s){console.warn("Origin remote not found, trying to get diff from main branch");try{return await this.getDiffFromParentBranch({numberOfContextLines:t,includeFilesOnly:r,filePaths:n})}catch(l){throw console.warn("Failed to get diff from main branch:",l),l}}let o=!1,a;try{let l=`origin/${i}`;if(o=(await this.git(["ls-remote","--heads","origin",i])).trim().length>0,o)a=l;else return await this.getDiffFromParentBranch({numberOfContextLines:t,includeFilesOnly:r,filePaths:n})}catch(l){throw console.warn("Failed to check remote branches:",l),l}let c=["diff",a];r?c.push("--name-status"):t!==void 0&&c.push(`-U${t}`),c.push("--"),n&&n.length>0&&c.push(...n);let u=await this.git(c);return!u||u.trim()===""?[]:L0(u,r)}catch(i){throw console.error("getDiffFromRemote error:",i),i}}async getDiff({mode:t="remote-parent-branch",numberOfContextLines:r,includeFilesOnly:n,filePaths:i}){if(!this.#t?.git)return{state:"error",error:new Error("Git not configured")};try{switch(t){case"remote-parent-branch":return{state:"success",diff:await this.getDiffFromParentBranch({numberOfContextLines:r,includeFilesOnly:n,filePaths:i})};case"remote-current-branch":return{state:"success",diff:await this.getDiffFromRemote({numberOfContextLines:r,includeFilesOnly:n,filePaths:i})};default:throw new Error(`Unknown diff mode: ${t}`)}}catch(s){return console.error(`getDiff error for mode '${t}':`,s),this.#e.Sentry?.captureException(s),{state:"error",error:s instanceof Error?s:new Error(String(s))}}}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(`
|
|
1920
|
-
`).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.")}async getDiffFromParentBranch({numberOfContextLines:t,includeFilesOnly:r,filePaths:n}){try{if(!(await this.git(["branch","--show-current"])).trim())throw new Error("Could not determine current branch");let s=await this.getDefaultBranch();if(!s)throw new Error("Could not find parent branch (main/master)");try{await this.git(["fetch",...s.split("/")])}catch(c){throw console.warn(`Failed to fetch remote ${s}:`,c),c}let o=["diff",s];r?o.push("--name-status"):t!==void 0&&o.push(`-U${t}`),o.push("--"),n&&n.length>0&&o.push(...n);let a=await this.git(o);return!a||a.trim()===""?[]:L0(a,r)}catch(i){throw console.error("getDiffFromParentBranch error:",i),i}}};function T8(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 Jne(e){for(let t=e.turns.length-1;t>=0;t--){let r=e.turns[t];if(r.user.role==="user"&&r.completionId)return r}}function Xne(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 ys(e){return e[e.length-1]}function Qne(e){for(let t=e.length-1;t>=0;t--)e[t].state!=="done"&&e.splice(t,1)}async function Zne(e,t,r,n){let i=new URL(`${Ne}/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 De(i,{method:"POST",body:JSON.stringify({sessionId:r,restoreCredits:n}),headers:s,signal:AbortSignal.timeout(3e4)})}catch(o){let a=o&&o.name==="AbortError"||typeof o?.code=="string"&&o.code==="ABORT_ERR"||typeof o?.timeout=="boolean"&&o.timeout||/timeout|abort/i.test(o?.message??"");e.Sentry?.captureException(o,{level:"warning",tags:{operation:"restore-consumed-credit",timeout:a}})}}async function*eie(e,t,r,n){if(!t.builderPrivateKey)throw new Error("Missing builder public key during completion stream");let i=new AbortController,s=JSON.stringify(r),o=new URL(`${Ne}/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=0,p=[],d;try{let h=await De(o,{method:"POST",body:s,keepalive:!1,headers:{Connection:"close","Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`},signal:Qo([n,i.signal])});if(!h.ok){let g=await h.text(),y=new Error(`Bad Status: ${h.status}: ${g}`);throw y.name=`BadStatus${h.status}`,y}let m=Nl(h.body);d=setTimeout(()=>{if(!n.aborted){let g=new Error("HTTP Stream Hang");g.name="HTTPStreamHang",i.abort(g)}},2e4);for await(let g of m)if(c=performance.now(),l+=g.length,clearTimeout(d),d=setTimeout(()=>{if(!n.aborted){let y=new Error("HTTP Stream Broke");y.name="HTTPStreamBroke",i.abort(y)}},2e4),g.length!==0){p.push(g),p=p.slice(-10);try{let y=JSON.parse(g);u=!0,yield y}catch(y){e.Sentry?.captureException(y,{extra:{value:g},tags:{operation:"codegen-stream"}})}}}catch(h){if(h instanceof Error&&h.name==="AbortError"||h instanceof Error&&h.name==="HTTPStreamBroke"||h instanceof Error&&h.name==="HTTPStreamHang"||h instanceof ni)throw h;let m=performance.now();if(h instanceof ct)throw
|
|
1920
|
+
`).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.")}async getDiffFromParentBranch({numberOfContextLines:t,includeFilesOnly:r,filePaths:n}){try{if(!(await this.git(["branch","--show-current"])).trim())throw new Error("Could not determine current branch");let s=await this.getDefaultBranch();if(!s)throw new Error("Could not find parent branch (main/master)");try{await this.git(["fetch",...s.split("/")])}catch(c){throw console.warn(`Failed to fetch remote ${s}:`,c),c}let o=["diff",s];r?o.push("--name-status"):t!==void 0&&o.push(`-U${t}`),o.push("--"),n&&n.length>0&&o.push(...n);let a=await this.git(o);return!a||a.trim()===""?[]:L0(a,r)}catch(i){throw console.error("getDiffFromParentBranch error:",i),i}}};function T8(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 Jne(e){for(let t=e.turns.length-1;t>=0;t--){let r=e.turns[t];if(r.user.role==="user"&&r.completionId)return r}}function Xne(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 ys(e){return e[e.length-1]}function Qne(e){for(let t=e.length-1;t>=0;t--)e[t].state!=="done"&&e.splice(t,1)}async function Zne(e,t,r,n){let i=new URL(`${Ne}/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 De(i,{method:"POST",body:JSON.stringify({sessionId:r,restoreCredits:n}),headers:s,signal:AbortSignal.timeout(3e4)})}catch(o){let a=o&&o.name==="AbortError"||typeof o?.code=="string"&&o.code==="ABORT_ERR"||typeof o?.timeout=="boolean"&&o.timeout||/timeout|abort/i.test(o?.message??"");e.Sentry?.captureException(o,{level:"warning",tags:{operation:"restore-consumed-credit",timeout:a}})}}async function*eie(e,t,r,n){if(!t.builderPrivateKey)throw new Error("Missing builder public key during completion stream");let i=new AbortController,s=JSON.stringify(r),o=new URL(`${Ne}/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=0,p=[],d;try{let h=await De(o,{method:"POST",body:s,keepalive:!1,headers:{Connection:"close","Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`},signal:Qo([n,i.signal])});if(!h.ok){let g=await h.text(),y=new Error(`Bad Status: ${h.status}: ${g}`);throw y.name=`BadStatus${h.status}`,y}let m=Nl(h.body);d=setTimeout(()=>{if(!n.aborted){let g=new Error("HTTP Stream Hang");g.name="HTTPStreamHang",i.abort(g)}},2e4);for await(let g of m)if(c=performance.now(),l+=g.length,clearTimeout(d),d=setTimeout(()=>{if(!n.aborted){let y=new Error("HTTP Stream Broke");y.name="HTTPStreamBroke",i.abort(y)}},2e4),g.length!==0){p.push(g),p=p.slice(-10);try{let y=JSON.parse(g);u=!0,yield y}catch(y){e.Sentry?.captureException(y,{extra:{value:g},tags:{operation:"codegen-stream"}})}}}catch(h){if(h instanceof Error&&h.name==="AbortError"||h instanceof Error&&h.name==="HTTPStreamBroke"||h instanceof Error&&h.name==="HTTPStreamHang"||h instanceof ni)throw h;let m=performance.now();if(h instanceof ct)throw h;let g=h instanceof Error?h.name:"UnknownError",y=new mt(`codegen/completion endpoint: ${g}`,{cause:h});throw e.Sentry?.captureException(y,{tags:{operation:"codegen-stream"},extra:{bodySize:s.length,responseSize:l,attachments:r.attachments?.length??0,files:r.files?.length??0,toolResults:r.toolResults?.length??0,didStream:u,lastMessageElapsed:m-c,totalElapsed:m-a,lastEvents:p}}),y}finally{clearTimeout(d)}}async function A8(e,t,r,n){let i,o=JSON.stringify(n);for(let a=0;a<3;a++){try{let c=new URL(`${Ne}${r}`);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 De(c,{method:"POST",body:o,keepalive:!0,headers:u,signal:AbortSignal.timeout(3e4)});if(l.ok)return!0;throw new Error(`Bad Status: ${l.status}`)}catch(c){c instanceof ct&&Ir(c),i=c}a<2&&await ZD(a)}return i&&e.Sentry?.captureException(i),!1}async function P8(e,t,r,n){let i,o=JSON.stringify(r);for(let a=0;a<2;a++){try{let c=new URL(`${Ne}/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 De(c,{method:"POST",body:o,keepalive:!0,headers:u,signal:AbortSignal.timeout(3e4)});if(l.ok)return!0;throw new Error(`Bad Status: ${l.status}`)}catch(c){c instanceof ct&&Ir(c),i=c}a<1&&await ZD(a)}return i&&e.Sentry?.captureException(i),!1}async function $0(e,t,r,n,i){try{let s=new URL(`${Ne}/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"};return t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`),await(await De(s,{method:"GET",headers:o,keepalive:!0,signal:AbortSignal.timeout(1e4)})).json()}catch(s){return s instanceof ct&&Ir(s),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 tie({sys:e,projectDir:t,currentDir:r,rootDir:n}){let i=[];async function s(l){let p=!1;try{p=(await e.stat(l)).isFile()}catch{p=!1}try{if(p){let d=e.relative(t,l),h=await e.readFile(l);if(h){let m=$R(h,d);i.push(m)}}}catch(d){e.Sentry?.captureException(d)}}async function o(l){let p=!1;try{p=(await e.stat(l)).isFile()}catch{p=!1}try{if(p){let d=await e.readFile(l),h=e.relative(t,l);if(d){let m="hash-"+await e.hash(d);i.push({id:m,name:h,content:d,filePath:h})}}}catch(d){e.Sentry?.captureException(d)}}let a=[".cursor/rules",".builder/rules"],c=[".cursorrules",".builderrules",".windsurfrules",".github/copilot-instructions.md"],u;do{try{for(let l of a){let p=e.resolve(r,l);if(await e.exists(p)){let d=await e.readdir(p);for(let h of d)await s(e.join(p,h))}}}catch(l){console.debug(`Error reading ${r}:`,l)}for(let l of c)await o(e.resolve(r,l));if(u=r,r=e.dirname(r),r===u)break}while(u!==n);return i}var rie=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 U0(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 N8(){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 nie(e,t){return e.split(t).length-1}function R8(e){return e.endsWith("CLAUDE.md")||e.endsWith("AGENT.md")||e.endsWith("AGENTS.md")}function iie(e){let t=nie(e,"/");return R8(e)||t<2&&e.endsWith("package.json")||e.endsWith("Podfile")||e.endsWith("Cartfile")||t<2&&e.endsWith("global.css")||t<2&&e.endsWith("tailwind.config.ts")||t<2&&e.endsWith("tailwind.config.js")||e.endsWith("libraries.toml")}function sie(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 O8(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 F8(e,t){return{...t,userPrompt:e.userPrompt+`
|
|
1921
1921
|
|
|
1922
1922
|
`+t.userPrompt,files:Array.from(new Set([...e.files??[],...t.files??[]])),includeBaseFiles:e.includeBaseFiles,skipSearch:t.skipSearch}}function oie(){let e=setInterval(()=>{},1073741824);return()=>clearInterval(e)}function aie(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}}var Rc=class extends Error{code;stdout;stderr;command;constructor(t,r,n,i,s){super(`${t} failed with code ${r}
|
|
1923
1923
|
|
|
@@ -2244,7 +2244,7 @@ https://www.builder.io/c/docs/mapping-functions`),await se(1)}let o=[],a;if(t.to
|
|
|
2244
2244
|
|
|
2245
2245
|
${o.map(([,I],k)=>b>k?I.documentName==="-"?(0,ge.dim)(` \u2756 ${I.name}`)+" "+(0,ge.yellow)("(skipped)"):(0,ge.green)(` \u2714 ${I.name} \u2192 <${I.documentName} />`):b===k?(0,ge.underline)(` \u2192 ${I.name}`):(0,ge.dim)(` \u2756 ${I.name}`)).filter(Boolean).join(`
|
|
2246
2246
|
`)}
|
|
2247
|
-
`);let x,D,E,S,F=(await s.findAllDependencies()).filter(I=>!Qie(I.name)),A=t.componentName?p.components.find(I=>I.name===t.componentName):await tC(p.components,C.name,F.length>0,!0);if(A==="external package"){let I=e.getFrameworks().some(X=>X.name==="@angular/core"),k=await Xie(F,I);s.addExternalPackage(k);let B=await s.getRegistry({readAllInputTypes:!0});B&&(p=B);let M=await tC(p?.components.filter(X=>X.importPath===k),C.name,!0,!1);M==="skip"||M==="scaffold"?x=void 0:x=M}else if(A==="skip"||A==="scaffold")x=void 0;else if(A==="manual import"){let I=await Wie();N.info("Validating manual import path...");let k=await Yie(e,s,I);if(k&&k.length>0){let B=await s.getRegistry({readAllInputTypes:!0});if(B&&(p=B),k.length===1)x=k[0];else{let M=await tC(k,C.name,!1,!1);M==="skip"||M==="scaffold"?x=void 0:x=M}}else{N.warning(`No valid components found at ${I}. Skipping mapping.`),C.documentName="-";continue}}else x=A;if(!x)if(A==="scaffold")N.info("Scaffolding mapper for "+C.name);else{C.documentName="-",N.warning("Skipping mapping for "+C.name);continue}if(!x){let I=e.getFrameworks().some(k=>k.name==="@angular/core");x={id:"",name:Hr(C.name),importName:Hr(C.name),isRegistered:!1,importPath:"",filePath:"",relFilePath:"",inputs:[],exportName:"",framework:I?"angular":"react"}}let P=await Vie(x),j,Y={registry:p,figmaNode:C,figmaUrl:v,registeredCmp:x,token:t.token,docsUrl:P,userContext:r};try{for(;;){Y.previousCompletion=E,Y.userPrompt=j;let I=Zie(a,Y,!!t.verbose);for await(let B of I)B.type==="step"&&(i&&i.stop(),i=In(),i.start(B.title)),B.type==="done"&&(D=B.code,E=B.completion,S=B.fileName);if(D)i&&i.stop("Generated mapping"),N.message(c.highlight("typescript",D).value);else return i&&i.stop("Failed to generate mapping",1),await Be("figma generate, LLM failed",{spaceId:a.builderPublicKey,componentName:C.name}),await se(1);if(t.componentName)break;let k=await Kie();if(k.trim()==="good")break;await Be("figma add follow up prompt",{spaceId:a.builderPublicKey,prompt:k}),j=k}}catch(I){return e.Sentry?.captureException(I),I instanceof ct?(
|
|
2247
|
+
`);let x,D,E,S,F=(await s.findAllDependencies()).filter(I=>!Qie(I.name)),A=t.componentName?p.components.find(I=>I.name===t.componentName):await tC(p.components,C.name,F.length>0,!0);if(A==="external package"){let I=e.getFrameworks().some(X=>X.name==="@angular/core"),k=await Xie(F,I);s.addExternalPackage(k);let B=await s.getRegistry({readAllInputTypes:!0});B&&(p=B);let M=await tC(p?.components.filter(X=>X.importPath===k),C.name,!0,!1);M==="skip"||M==="scaffold"?x=void 0:x=M}else if(A==="skip"||A==="scaffold")x=void 0;else if(A==="manual import"){let I=await Wie();N.info("Validating manual import path...");let k=await Yie(e,s,I);if(k&&k.length>0){let B=await s.getRegistry({readAllInputTypes:!0});if(B&&(p=B),k.length===1)x=k[0];else{let M=await tC(k,C.name,!1,!1);M==="skip"||M==="scaffold"?x=void 0:x=M}}else{N.warning(`No valid components found at ${I}. Skipping mapping.`),C.documentName="-";continue}}else x=A;if(!x)if(A==="scaffold")N.info("Scaffolding mapper for "+C.name);else{C.documentName="-",N.warning("Skipping mapping for "+C.name);continue}if(!x){let I=e.getFrameworks().some(k=>k.name==="@angular/core");x={id:"",name:Hr(C.name),importName:Hr(C.name),isRegistered:!1,importPath:"",filePath:"",relFilePath:"",inputs:[],exportName:"",framework:I?"angular":"react"}}let P=await Vie(x),j,Y={registry:p,figmaNode:C,figmaUrl:v,registeredCmp:x,token:t.token,docsUrl:P,userContext:r};try{for(;;){Y.previousCompletion=E,Y.userPrompt=j;let I=Zie(a,Y,!!t.verbose);for await(let B of I)B.type==="step"&&(i&&i.stop(),i=In(),i.start(B.title)),B.type==="done"&&(D=B.code,E=B.completion,S=B.fileName);if(D)i&&i.stop("Generated mapping"),N.message(c.highlight("typescript",D).value);else return i&&i.stop("Failed to generate mapping",1),await Be("figma generate, LLM failed",{spaceId:a.builderPublicKey,componentName:C.name}),await se(1);if(t.componentName)break;let k=await Kie();if(k.trim()==="good")break;await Be("figma add follow up prompt",{spaceId:a.builderPublicKey,prompt:k}),j=k}}catch(I){return e.Sentry?.captureException(I),I instanceof ct?(Ir(I),ye("LLM failed due to network error")):ye("LLM failed:"+String(I)),await se(1)}let J=S??`${Hr(C.name)}.mapper.tsx`;C.documentName=x.importName,D&&(t.mappingOutput?(l=t.mappingOutput,u=e.dirname(l),$c.default.mkdirSync(u,{recursive:!0})):u?l=e.join(u,J):(l=await zie(J),u=e.dirname(l),$c.default.mkdirSync(u,{recursive:!0})),$c.default.writeFileSync(l,await rn(e.getAppRootDir(),D,void 0,l)),y.push(l)),!x.isRegistered&&x.id&&(i&&i.stop(),i=In(),i.start("Registering builder component in registry"),await s.registerComponent({cmpId:x.id}),i.stop(`<${x.importName}> added to the builder registry`))}a.builderPublicKey&&await Yl(e,a.builderPublicKey,s,!0),u?(y.length===1?N.success(`${(0,ge.bgGreen)((0,ge.bold)((0,ge.white)(" Done! \u{1F389} ")))} New mapper file saved in: ${(0,ge.dim)(y[0])}`):N.success(`${(0,ge.bgGreen)((0,ge.bold)((0,ge.white)(" Done! \u{1F389} ")))} Created ${y.length} new mapping files:
|
|
2248
2248
|
${y.map(b=>` - ${b}`).join(`
|
|
2249
2249
|
`)}`),ar((0,ge.dim)(`Figma mappings need to be published to come into effect. You can do this by running:
|
|
2250
2250
|
|
|
@@ -4383,11 +4383,10 @@ Re-run your command and try again. If this problem persists, please contact us a
|
|
|
4383
4383
|
|
|
4384
4384
|
Learn more at https://www.builder.io/c/docs/component-indexing#generating-code.
|
|
4385
4385
|
`),o&&N.info("View your Component Index: https://builder.io/app/design-system-intelligence")},dS=async(e,t)=>{let{designSystemPackage:r,skipDetailedGrouping:n,force:i,skipHeader:s,listIndexedRepos:o}=t,{designSystemName:a}=t,c=Date.now();Ea.getCurrentScope().setTag("operation","repo-indexing"),Ea.getCurrentScope().setTag("designSystemPackage",r||"none"),s||We((0,Ji.bgCyan)((0,Ji.bold)((0,Ji.white)(" repository indexing ")))+" "+(0,Ji.dim)(Ae)+`
|
|
4386
|
-
`);let u=await Dt(e,t,{forceSpaceId:t.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),l=await LU(u);if(o){let T=await K0(u);if(T.length===0){console.log("No indexed repositories found");return}console.log("Indexed repositories:"),T.forEach((F,A)=>{console.log(`${A+1}. ${F.designSystemName}`)});return}let p=VU.default.randomUUID().slice(0,8);Ea.getCurrentScope().setTag("sessionId",p);try{let T=await exe(u,t.debug);T.isAllowed||(N.error(`Error: ${T.reason||"Access denied for repository indexing"}`),process.exit(1))}catch(T){if(T instanceof ct){
|
|
4386
|
+
`);let u=await Dt(e,t,{forceSpaceId:t.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),l=await LU(u);if(o){let T=await K0(u);if(T.length===0){console.log("No indexed repositories found");return}console.log("Indexed repositories:"),T.forEach((F,A)=>{console.log(`${A+1}. ${F.designSystemName}`)});return}let p=VU.default.randomUUID().slice(0,8);Ea.getCurrentScope().setTag("sessionId",p);try{let T=await exe(u,t.debug);T.isAllowed||(N.error(`Error: ${T.reason||"Access denied for repository indexing"}`),process.exit(1))}catch(T){if(T instanceof ct){Ir(T);return}N.error("Error: We were unable to determine if your subscription is an enterprise subscription. Contact support@builder.io for more information."),process.exit(1)}let d=await U8(e,r),h=d.version,m=d.name,g=await K0(u,{onlyEditAccess:!0}),y,b;try{if(a===void 0){let T=[...g.map(A=>({value:A.id,label:A.designSystemName+" ("+A.scope+")"}))],F="new";if(T.length>0&&(F=await fi({message:"Which design system would you like to index? You can bypass this by re-running this command with the --designSystemName flag.",options:[...T,{value:"new",label:"Create a new design system"}]}),Ce(F)))return;if(F==="new"){let A=await z0(u,l);if(!A)return;b=A;let P=await ot({message:"What is your design system name?",initialValue:m,validate(j){if(j.trim().length===0)return"A design system name is required"}});if(Ce(P))return;if(a=P,y=G8(u,a,b,g),y){if(b==="organization"&&y.spaceId!==u.builderPublicKey){N.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}let j=await $t({message:`A design system with the name "${a}" already exists in your ${b}. Would you like to proceed with this design system?`});if(Ce(j)||!j)return}}else{if(y=g.find(A=>A.id===F),b=y.scope,b==="organization"&&(y.spaceId!==u.builderPublicKey||!l?.isAdminInOrganization)){N.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}a=y.designSystemName}}else if(y=q8(a,g),y){if(b=y.scope,b==="organization"&&(y.spaceId!==u.builderPublicKey||!l?.isAdminInOrganization)){N.warn("A design system with this name already exists within your organization, but you do not have permission to re-index it.");return}}else{let T=await $t({message:`No indexed design system named "${a}" exists. Would you like to proceed with creating a new design system index?`});if(Ce(T)||!T)return;let F=await z0(u,l);if(!F)return;b=F}}catch(T){let F=new mt("Failed to select a design system",{cause:T});Ea.captureException(F,{tags:{operation:"repo-indexing",sessionId:p,designSystemPackage:r||"none"}}),console.log("Sorry, we encountered a problem when selecting a design system to index. Please try again. If the issue persists, contact support@builder.io.");return}let v=Qi(),C={folders:[{path:e.getCwdDir()}]};if(r)if((0,WU.isAbsolute)(r))C.folders.push({path:r});else{let T=e.join(e.getAppRootDir(),`node_modules/${r}`);await e.exists(T)||(N.error(`Design system package ${r} is not installed. Please install it first.`),process.exit(1))}t.includeDirectories&&t.includeDirectories.split(",").forEach(F=>{let A=F.trim();A.length>0&&C.folders.push({path:A})}),t.debug&&console.log("Workspace config",C);let x=y?.id||"";if(!y&&a&&(x=await z8(u,{designSystemName:a,designSystemVersion:h,designSystemPackage:r,status:"in-progress",scope:b})),await H8(e)){N.warn(sd(`\u26A0\uFE0F Warning: Existing ${G0} folder found.
|
|
4387
4387
|
|
|
4388
|
-
For best results, please delete the repo-indexing folder in your project before running this command. Indexed component documentation can be viewed at https://builder.io/app/design-system-intelligence after completion.`,(process.stdout.columns||80)-4));let T=await $t({message:"Continue with existing files?"});if(typeof T=="symbol"||!T){N.info("Repository indexing canceled.");return}v=Qi()}v.start("Indexing repository");let S={sessionId:p,commandString:process.argv.slice(2).join(" "),forceBoolean:t.force||!1,currentDirectory:e.getCwdDir(),skipDetailedGroupingBoolean:t.skipDetailedGrouping,designSystemPackage:r||"none",designSystemPackageName:m||"none",designSystemVersion:h||"none",designSystemId:x||"none",workspaceConfig:C,includeDirectories:t.includeDirectories||"none",debugBoolean:t.debug||!1,listIndexedReposBoolean:o||!1,userId:u.userId,spaceId:u.builderPublicKey};try{await Be("repo indexing started",S),v.message("Looking for components");let T=await Zbe(u,t.debug,x),F=T.filter(Q=>Q.name!==ro),{numComponentsFound:A,componentsToIndex:P,discoveredComponents:j}=await jU(e,u,`${p}-component-discovery`,F,{designSystemPackage:r,designSystemVersion:h,workspaceConfig:C,debug:t.debug,force:i});if(A===0&&(N.warn(sd("We were unable to index your repository because no components were found. If your components are a dependency of your project be sure to specify the package name using --designSystemPackage when re-running this command.",(process.stdout.columns||80)-4)),process.exit(1)),P.length===0){N.info(sd("Component index is up to date!",(process.stdout.columns||80)-4));return}if(n)return;let Y=T.find(Q=>Q.name===ro);if(i){let Q=T.filter(O=>O.name!==ro&&O.name!=="component-groups").length;if(v.stop(`${A} new and ${Q} existing component docs found`),Q>0){let O=await $t({message:"Using --force will remove existing component documents. Continue?"});if(typeof O=="symbol"||!O){v.stop("Canceled");return}}v.start("")}let J=0,I=[];v.stop("Started indexing component docs:");let k=new pS.default.MultiBar({clearOnComplete:!1,hideCursor:!0},pS.default.Presets.shades_grey);k.log(""),k.log(`Indexing in progress with ${od} workers...`);let B=k.create(P.length,J,{name:"Total"},{format:`${(0,Ji.cyan)("{bar}")} | {name} | {percentage}% | (Step {value}/{total})`}),M={};for(let Q=0;Q<od;Q++)M[Q]={statusBar:k.create(1,0,{name:"Starting..."},{format:"{name}"}),name:"Starting..."};let X=(Q,O)=>{O?M[Q].name=`Indexing: ${O}`:M[Q].name=Fg,B.update(J)},L=async(Q,O)=>{let ee=[],pe=[...Q],K=async ae=>{for(;pe.length>0;){let le=pe.shift();if(!le)break;X(ae,le.name);try{await lS(e,u,`${p}-${le.name}-doc`,le,{designSystemId:x,designSystemPackage:r,designSystemVersion:h,workspaceConfig:C,debug:t.debug}),v.message(`Component docs stored for ${le.name}`),I.push(le),J++}catch{ee.push(le.name)}}X(ae,"")},oe=Array.from({length:O},(ae,le)=>K(le)),z=0,ne=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],ie=setInterval(()=>{for(let ae=0;ae<od;ae++)M[ae].name!==Fg?M[ae].statusBar.update(0,{name:`${M[ae].name} ${ne[z]}`}):M[ae].statusBar.update(0,{name:Fg});z=(z+1)%ne.length},100);await Promise.all(oe),clearInterval(ie);for(let ae=0;ae<od;ae++)M[ae].statusBar.update(0,{name:Fg});return k.stop(),{failedComponents:ee}},$=j.some(Q=>!F.find(O=>O.name===Q.name)),[H,re]=await Promise.all([(async()=>{if(!Y||i||$){v.message("Summarizing component library");try{return await HU(e,u,j,{designSystemId:x,debug:t.debug}),v.message("Agent docs stored"),{success:!0}}catch(Q){throw x&&await Qm(u,{id:x,designSystemName:a,designSystemPackage:r,designSystemVersion:h,status:"failed",scope:b}),Q}}return{success:!0}})(),L(P,od)]),{failedComponents:ve}=re;await KU(u,j,T.filter(Q=>Q.name!==ro)),Qbe(j,I,c,ve,i,a,x),await Be("repo indexing completed",{sessionId:p,commandString:process.argv.slice(2).join(" "),forceBoolean:t.force,skipDetailedGroupingBoolean:t.skipDetailedGrouping,designSystemPackage:r||"none",designSystemId:x||"none",userId:u.userId,spaceId:u.builderPublicKey}),x&&await Qm(u,{id:x,designSystemName:a,designSystemPackage:r,designSystemVersion:h,status:"completed",scope:b})}catch(T){throw console.error(`
|
|
4389
|
-
|
|
4390
|
-
Stack trace:`,T instanceof Error?T.stack:""),x&&await Qm(u,{id:x,designSystemName:a,designSystemPackage:r,designSystemVersion:h,status:"failed",scope:b}),T}},Zbe=async(e,t,r)=>{let n=new URL("/mappings/get-component-docs",Ne);n.searchParams.set("apiKey",e.builderPublicKey),n.searchParams.set("userId",e.userId);let i=await De(n,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`}});if(!i.ok){let o=await i.text();return t&&console.error("API request failed:",i.status,o),[]}let s=await i.json();if(r){let o=s.filter(a=>a.designSystemId===r);return o?.length?o:s.filter(a=>!a.designSystemId)}return s},exe=async(e,t)=>{let r=new URL("/allow-feature",Ne);r.searchParams.set("feature","repo-indexing"),r.searchParams.set("apiKey",e.builderPublicKey),r.searchParams.set("userId",e.userId);let n=await De(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`}});if(!n.ok){let s=await n.text();return t&&console.error("API request failed:",n.status,s),{isAllowed:!1,reason:s||"Unable to verify permissions"}}let i=await n.json();return{isAllowed:i.isAllowed,reason:i.reason}};f();f();var _g=G(_t(),1);var YU=(e,t)=>{try{let{builderPublicKey:r,userId:n,spaceName:i}=Z0(e,t);if(r===void 0){N.message((0,_g.red)("\u2717 Not Authenticated to Builder.io")),N.message('Re-run this with the "auth" command to authenticate with Builder.io.');return}N.message((0,_g.green)("\u2713 Authenticated to Builder.io")),i!==void 0&&N.message(`Space Name: ${i}`),r!==void 0&&N.message(`Space ID: ${r}`),n!==void 0&&N.message(`User ID: ${n}`)}catch(r){e.Sentry?.captureException(new mt("Failed to read credentials",{cause:r})),N.error("Sorry, we ran into a problem while checking authentication. Please try again. If this issue persists, contact support@builder.io.")}};var zn=G(_t(),1);var JU=async(e,t,r)=>{if(t==="status"){YU(e,r);return}console.log(""),We((0,zn.bgCyan)((0,zn.bold)((0,zn.white)(" figma auth ")))+" "+(0,zn.dim)(Ae));let{builderPublicKey:n}=await Dt(e,r,{builderPrivateKey:!0,builderPublicKey:!0,force:!0});await Be("auth",{spaceId:n}),ar((0,zn.bgGreen)((0,zn.bold)((0,zn.white)(" Done! \u{1F389} "))))};async function txe(e){console.log(""),We((0,yo.bgMagenta)((0,yo.bold)((0,yo.white)(" dev-tools server ")))+" "+(0,yo.dim)(Ae)),e.debug("builder dev tools cli init");let t=await(0,XU.createDevTools)(e);await(0,ZU.createDevToolsServer)({...t,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async r=>r,...e})}F7();async function rxe(){let e=(0,ej.default)(process.argv.slice(2),{string:["figmaToken","privateKey","spaceId","cwd","prompt","mode","token","url","command","c","serverUrl","builderPublicKey","builderPrivateKey","builderUserId","repoFullName","branchName","installCommand","projectId","configJson","workspace","enabledTools","designSystemPackage","includeDirectories"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","app","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index","listIndexedRepos","disableMcp","privacyMode"],alias:{p:"port",c:"command",json:"jsonOutput"},default:{interactive:!1,fusionInit:!1}});e.cwd&&process.chdir(e.cwd);let t=await pI(!!(e.verbose||e.debug));await t.withScope(async r=>{try{let n=await(0,QU.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});n.Sentry?.setTag("cli-command",e._.join(" ")),n.Sentry?.setContext("flags-args",{...e});let{builderPublicKey:i}=await Dt(n,e,{});if(n.Sentry?.setTag("spaceId",i),e.help)return ai(e._[e._.length-1]),await se(0);let s=e._[0];if(s==="figma"){let o=e._[1];try{return await y3(n,o,e),await se(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ct&&(vr(a),ye()),await se(1)}}else if(s==="code"){let o=e._[1];try{e.index&&(e.skipDetailedGrouping=!0,e.skipHeader=!0,await dS(n,e)),await Y8(n,o,e)}catch(a){return n.Sentry?.captureException(a),a instanceof ct&&(vr(a),ye()),await se(1)}}else if(s==="index-repo")try{return await dS(n,e),await se(0)}catch(o){return n.Sentry?.captureException(o),o instanceof ct&&(vr(o),ye()),await se(1)}else if(s==="launch"||s==="fusion")try{await $7({sys:n,args:e})}catch(o){return n.Sentry?.captureException(o),o instanceof ct&&(vr(o),ye()),await se(1)}else if(s==="add"){let o=rC(n.getAppRootDir(),process.argv.slice(2));return await SR(o),await se(0)}else if(s==="sync"){let o=rC(n.getAppRootDir(),process.argv.slice(2)),a=await jD(o);await NR(n,a).then(()=>{N.success("Builder dev tools is running")}).catch(c=>(N.error("Cannot start builder dev tools"),n.Sentry?.captureException(c),se(1)))}else if(s==="auth"){let o=e._[1];try{return await JU(n,o,e),await se(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ct&&(vr(a),ye()),await se(1)}}else{if(s==="help")return ai(e._[1]),await se(0);if(s==="publish"||s==="migrate"||s==="generate")return ye("Command not found, do you mean `npx builder.io figma "+s+"`?"),await se(1);txe(n).then(()=>{N.success("Builder dev tools is running")}).catch(o=>(N.error("Cannot start builder dev tools"),t.captureException(o),se(1)))}}catch(n){return t.captureException(n),n instanceof ct&&(vr(n),ye("Cannot start builder dev tools due to network error")),await se(1)}})}rxe();var nxe=void 0;
|
|
4388
|
+
For best results, please delete the repo-indexing folder in your project before running this command. Indexed component documentation can be viewed at https://builder.io/app/design-system-intelligence after completion.`,(process.stdout.columns||80)-4));let T=await $t({message:"Continue with existing files?"});if(typeof T=="symbol"||!T){N.info("Repository indexing canceled.");return}v=Qi()}v.start("Indexing repository");let S={sessionId:p,commandString:process.argv.slice(2).join(" "),forceBoolean:t.force||!1,currentDirectory:e.getCwdDir(),skipDetailedGroupingBoolean:t.skipDetailedGrouping,designSystemPackage:r||"none",designSystemPackageName:m||"none",designSystemVersion:h||"none",designSystemId:x||"none",workspaceConfig:C,includeDirectories:t.includeDirectories||"none",debugBoolean:t.debug||!1,listIndexedReposBoolean:o||!1,userId:u.userId,spaceId:u.builderPublicKey};try{await Be("repo indexing started",S),v.message("Looking for components");let T=await Zbe(u,t.debug,x),F=T.filter(Q=>Q.name!==ro),{numComponentsFound:A,componentsToIndex:P,discoveredComponents:j}=await jU(e,u,`${p}-component-discovery`,F,{designSystemPackage:r,designSystemVersion:h,workspaceConfig:C,debug:t.debug,force:i});if(A===0&&(N.warn(sd("We were unable to index your repository because no components were found. If your components are a dependency of your project be sure to specify the package name using --designSystemPackage when re-running this command.",(process.stdout.columns||80)-4)),process.exit(1)),P.length===0){N.info(sd("Component index is up to date!",(process.stdout.columns||80)-4));return}if(n)return;let Y=T.find(Q=>Q.name===ro);if(i){let Q=T.filter(O=>O.name!==ro&&O.name!=="component-groups").length;if(v.stop(`${A} new and ${Q} existing component docs found`),Q>0){let O=await $t({message:"Using --force will remove existing component documents. Continue?"});if(typeof O=="symbol"||!O){v.stop("Canceled");return}}v.start("")}let J=0,I=[];v.stop("Started indexing component docs:");let k=new pS.default.MultiBar({clearOnComplete:!1,hideCursor:!0},pS.default.Presets.shades_grey);k.log(""),k.log(`Indexing in progress with ${od} workers...`);let B=k.create(P.length,J,{name:"Total"},{format:`${(0,Ji.cyan)("{bar}")} | {name} | {percentage}% | (Step {value}/{total})`}),M={};for(let Q=0;Q<od;Q++)M[Q]={statusBar:k.create(1,0,{name:"Starting..."},{format:"{name}"}),name:"Starting..."};let X=(Q,O)=>{O?M[Q].name=`Indexing: ${O}`:M[Q].name=Fg,B.update(J)},L=async(Q,O)=>{let ee=[],pe=[...Q],K=async ae=>{for(;pe.length>0;){let le=pe.shift();if(!le)break;X(ae,le.name);try{await lS(e,u,`${p}-${le.name}-doc`,le,{designSystemId:x,designSystemPackage:r,designSystemVersion:h,workspaceConfig:C,debug:t.debug}),v.message(`Component docs stored for ${le.name}`),I.push(le),J++}catch{ee.push(le.name)}}X(ae,"")},oe=Array.from({length:O},(ae,le)=>K(le)),z=0,ne=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],ie=setInterval(()=>{for(let ae=0;ae<od;ae++)M[ae].name!==Fg?M[ae].statusBar.update(0,{name:`${M[ae].name} ${ne[z]}`}):M[ae].statusBar.update(0,{name:Fg});z=(z+1)%ne.length},100);await Promise.all(oe),clearInterval(ie);for(let ae=0;ae<od;ae++)M[ae].statusBar.update(0,{name:Fg});return k.stop(),{failedComponents:ee}},$=j.some(Q=>!F.find(O=>O.name===Q.name)),[H,re]=await Promise.all([(async()=>{if(!Y||i||$){v.message("Summarizing component library");try{return await HU(e,u,j,{designSystemId:x,debug:t.debug}),v.message("Agent docs stored"),{success:!0}}catch(Q){throw x&&await Qm(u,{id:x,designSystemName:a,designSystemPackage:r,designSystemVersion:h,status:"failed",scope:b}),Q}}return{success:!0}})(),L(P,od)]),{failedComponents:ve}=re;await KU(u,j,T.filter(Q=>Q.name!==ro)),Qbe(j,I,c,ve,i,a,x),await Be("repo indexing completed",{sessionId:p,commandString:process.argv.slice(2).join(" "),forceBoolean:t.force,skipDetailedGroupingBoolean:t.skipDetailedGrouping,designSystemPackage:r||"none",designSystemId:x||"none",userId:u.userId,spaceId:u.builderPublicKey}),x&&await Qm(u,{id:x,designSystemName:a,designSystemPackage:r,designSystemVersion:h,status:"completed",scope:b})}catch(T){throw N.error(T instanceof Error?T.message:String(T)),Ea.captureException(T,{tags:{operation:"repo-indexing",sessionId:p,designSystemPackage:r||"none"},extra:{skipDetailedGrouping:n,force:i}}),t.debug&&console.error(`
|
|
4389
|
+
Stack trace:`,T instanceof Error?T.stack:""),x&&await Qm(u,{id:x,designSystemName:a,designSystemPackage:r,designSystemVersion:h,status:"failed",scope:b}),T}},Zbe=async(e,t,r)=>{let n=new URL("/mappings/get-component-docs",Ne);n.searchParams.set("apiKey",e.builderPublicKey),n.searchParams.set("userId",e.userId);let i=await De(n,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`}});if(!i.ok){let o=await i.text();return t&&console.error("API request failed:",i.status,o),[]}let s=await i.json();if(r){let o=s.filter(a=>a.designSystemId===r);return o?.length?o:s.filter(a=>!a.designSystemId)}return s},exe=async(e,t)=>{let r=new URL("/allow-feature",Ne);r.searchParams.set("feature","repo-indexing"),r.searchParams.set("apiKey",e.builderPublicKey),r.searchParams.set("userId",e.userId);let n=await De(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`}});if(!n.ok){let s=await n.text();return t&&console.error("API request failed:",n.status,s),{isAllowed:!1,reason:s||"Unable to verify permissions"}}let i=await n.json();return{isAllowed:i.isAllowed,reason:i.reason}};f();f();var _g=G(_t(),1);var YU=(e,t)=>{try{let{builderPublicKey:r,userId:n,spaceName:i}=Z0(e,t);if(r===void 0){N.message((0,_g.red)("\u2717 Not Authenticated to Builder.io")),N.message('Re-run this with the "auth" command to authenticate with Builder.io.');return}N.message((0,_g.green)("\u2713 Authenticated to Builder.io")),i!==void 0&&N.message(`Space Name: ${i}`),r!==void 0&&N.message(`Space ID: ${r}`),n!==void 0&&N.message(`User ID: ${n}`)}catch(r){e.Sentry?.captureException(new mt("Failed to read credentials",{cause:r})),N.error("Sorry, we ran into a problem while checking authentication. Please try again. If this issue persists, contact support@builder.io.")}};var zn=G(_t(),1);var JU=async(e,t,r)=>{if(t==="status"){YU(e,r);return}console.log(""),We((0,zn.bgCyan)((0,zn.bold)((0,zn.white)(" figma auth ")))+" "+(0,zn.dim)(Ae));let{builderPublicKey:n}=await Dt(e,r,{builderPrivateKey:!0,builderPublicKey:!0,force:!0});await Be("auth",{spaceId:n}),ar((0,zn.bgGreen)((0,zn.bold)((0,zn.white)(" Done! \u{1F389} "))))};async function txe(e){console.log(""),We((0,yo.bgMagenta)((0,yo.bold)((0,yo.white)(" dev-tools server ")))+" "+(0,yo.dim)(Ae)),e.debug("builder dev tools cli init");let t=await(0,XU.createDevTools)(e);await(0,ZU.createDevToolsServer)({...t,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async r=>r,...e})}F7();async function rxe(){let e=(0,ej.default)(process.argv.slice(2),{string:["figmaToken","privateKey","spaceId","cwd","prompt","mode","token","url","command","c","serverUrl","builderPublicKey","builderPrivateKey","builderUserId","repoFullName","branchName","installCommand","projectId","configJson","workspace","enabledTools","designSystemPackage","includeDirectories"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","app","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index","listIndexedRepos","disableMcp","privacyMode"],alias:{p:"port",c:"command",json:"jsonOutput"},default:{interactive:!1,fusionInit:!1}});e.cwd&&process.chdir(e.cwd);let t=await pI(!!(e.verbose||e.debug));await t.withScope(async r=>{try{let n=await(0,QU.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});n.Sentry?.setTag("cli-command",e._.join(" ")),n.Sentry?.setContext("flags-args",{...e});let{builderPublicKey:i}=await Dt(n,e,{});if(n.Sentry?.setTag("spaceId",i),e.help)return ai(e._[e._.length-1]),await se(0);let s=e._[0];if(s==="figma"){let o=e._[1];try{return await y3(n,o,e),await se(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ct&&(Ir(a),ye()),await se(1)}}else if(s==="code"){let o=e._[1];try{e.index&&(e.skipDetailedGrouping=!0,e.skipHeader=!0,await dS(n,e)),await Y8(n,o,e)}catch(a){return n.Sentry?.captureException(a),a instanceof ct&&(Ir(a),ye()),await se(1)}}else if(s==="index-repo")try{return await dS(n,e),await se(0)}catch(o){return n.Sentry?.captureException(o),o instanceof ct&&(Ir(o),ye()),await se(1)}else if(s==="launch"||s==="fusion")try{await $7({sys:n,args:e})}catch(o){return n.Sentry?.captureException(o),o instanceof ct&&(Ir(o),ye()),await se(1)}else if(s==="add"){let o=rC(n.getAppRootDir(),process.argv.slice(2));return await SR(o),await se(0)}else if(s==="sync"){let o=rC(n.getAppRootDir(),process.argv.slice(2)),a=await jD(o);await NR(n,a).then(()=>{N.success("Builder dev tools is running")}).catch(c=>(N.error("Cannot start builder dev tools"),n.Sentry?.captureException(c),se(1)))}else if(s==="auth"){let o=e._[1];try{return await JU(n,o,e),await se(0)}catch(a){return n.Sentry?.captureException(a),a instanceof ct&&(Ir(a),ye()),await se(1)}}else{if(s==="help")return ai(e._[1]),await se(0);if(s==="publish"||s==="migrate"||s==="generate")return ye("Command not found, do you mean `npx builder.io figma "+s+"`?"),await se(1);txe(n).then(()=>{N.success("Builder dev tools is running")}).catch(o=>(N.error("Cannot start builder dev tools"),t.captureException(o),se(1)))}}catch(n){return t.captureException(n),n instanceof ct&&(Ir(n),ye("Cannot start builder dev tools due to network error")),await se(1)}})}rxe();var nxe=void 0;
|
|
4391
4390
|
/*! Bundled license information:
|
|
4392
4391
|
|
|
4393
4392
|
is-extglob/index.js:
|