builder.io 1.6.107 → 1.6.108
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 +37 -33
- package/cli/index.cjs.map +3 -3
- 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,4 +1,4 @@
|
|
|
1
|
-
var UU=Object.create;var rd=Object.defineProperty;var jU=Object.getOwnPropertyDescriptor;var qU=Object.getOwnPropertyNames;var zU=Object.getPrototypeOf,GU=Object.prototype.hasOwnProperty;var HU=(e,t)=>()=>(e&&(t=e(e=0)),t);var C=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),TS=(e,t)=>{for(var r in t)rd(e,r,{get:t[r],enumerable:!0})},AS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qU(t))!GU.call(e,i)&&i!==r&&rd(e,i,{get:()=>t[i],enumerable:!(n=jU(t,i))||n.enumerable});return e};var j=(e,t,r)=>(r=e!=null?UU(zU(e)):{},AS(t||!e||!e.__esModule?rd(r,"default",{value:e,enumerable:!0}):r,e)),KU=e=>AS(rd({},"__esModule",{value:!0}),e);var f=HU(()=>{{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"2912c46700bd66d1ca09d4f05f291df126996723"}}});var _S=C((pbe,PS)=>{f();function jg(e){return e==null?[]:Array.isArray(e)?e:[e]}function VU(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]}PS.exports=function(e,t){e=e||[],t=t||{};var r,n,i,s,o,a={_:[]},c=0,l=0,u=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=jg(t.string),t.boolean=jg(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=jg(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]]||[],l=n.length;l-- >0;)t.boolean.push(n[l]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],l=n.length;l-- >0;)t.string.push(n[l]);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(l=0;l<i.length&&i.charCodeAt(l)===45;l++);if(l===0)a._.push(i);else if(i.substring(l,l+3)==="no-"){if(s=i.substring(l+3),h&&!~g.indexOf(s))return t.unknown(i);a[s]=!1}else{for(u=l+1;u<i.length&&i.charCodeAt(u)!==61;u++);for(s=i.substring(l,u),o=i.substring(++u)||c+1===p||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=l===2?[s]:s,u=0;u<n.length;u++){if(s=n[u],h&&!~g.indexOf(s))return t.unknown("-".repeat(l)+s);VU(a,s,u+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 sd=C((ybe,OS)=>{"use strict";f();var Kg="\x1B",Et=`${Kg}[`,JU="\x07",Vg={to(e,t){return t?`${Et}${t+1};${e+1}H`:`${Et}${e+1}G`},move(e,t){let r="";return e<0?r+=`${Et}${-e}D`:e>0&&(r+=`${Et}${e}C`),t<0?r+=`${Et}${-t}A`:t>0&&(r+=`${Et}${t}B`),r},up:(e=1)=>`${Et}${e}A`,down:(e=1)=>`${Et}${e}B`,forward:(e=1)=>`${Et}${e}C`,backward:(e=1)=>`${Et}${e}D`,nextLine:(e=1)=>`${Et}E`.repeat(e),prevLine:(e=1)=>`${Et}F`.repeat(e),left:`${Et}G`,hide:`${Et}?25l`,show:`${Et}?25h`,save:`${Kg}7`,restore:`${Kg}8`},YU={up:(e=1)=>`${Et}S`.repeat(e),down:(e=1)=>`${Et}T`.repeat(e)},XU={screen:`${Et}2J`,up:(e=1)=>`${Et}1J`.repeat(e),down:(e=1)=>`${Et}J`.repeat(e),line:`${Et}2K`,lineEnd:`${Et}K`,lineStart:`${Et}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Vg.up():"");return e&&(t+=Vg.left),t}};OS.exports={cursor:Vg,scroll:YU,erase:XU,beep:JU}});var ut=C((xbe,Wg)=>{f();var ad=process||{},RS=ad.argv||[],od=ad.env||{},QU=!(od.NO_COLOR||RS.includes("--no-color"))&&(!!od.FORCE_COLOR||RS.includes("--color")||ad.platform==="win32"||(ad.stdout||{}).isTTY&&od.TERM!=="dumb"||!!od.CI),ZU=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+ej(i,t,r,s)+t:e+i+t},ej=(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)},MS=(e=QU)=>{let t=e?ZU:()=>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")}};Wg.exports=MS();Wg.exports.createColors=MS});var uD=C(($be,lD)=>{"use strict";f();lD.exports=function(){if(process.env.npm_config_user_agent)return kj(process.env.npm_config_user_agent)};function kj(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 LT=C((E1e,Id)=>{f();Id.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Id.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]/;Id.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 _y=C((S1e,BT)=>{f();var Py=LT();BT.exports={isSpaceSeparator(e){return typeof e=="string"&&Py.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Py.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"||Py.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 zT=C((T1e,qT)=>{f();var Gt=_y(),ky,Sr,Hi,Nd,Ds,zn,Ht,Oy,Il;qT.exports=function(t,r){ky=String(t),Sr="start",Hi=[],Nd=0,Ds=1,zn=0,Ht=void 0,Oy=void 0,Il=void 0;do Ht=Xz(),eG[Sr]();while(Ht.type!=="eof");return typeof r=="function"?Ny({"":Il},"",r):Il};function Ny(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=Ny(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=Ny(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 ve,ye,_l,Gi,De;function Xz(){for(ve="default",ye="",_l=!1,Gi=1;;){De=Ki();let e=UT[ve]();if(e)return e}}function Ki(){if(ky[Nd])return String.fromCodePoint(ky.codePointAt(Nd))}function z(){let e=Ki();return e===`
|
|
1
|
+
var UU=Object.create;var rd=Object.defineProperty;var jU=Object.getOwnPropertyDescriptor;var qU=Object.getOwnPropertyNames;var zU=Object.getPrototypeOf,GU=Object.prototype.hasOwnProperty;var HU=(e,t)=>()=>(e&&(t=e(e=0)),t);var C=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),TS=(e,t)=>{for(var r in t)rd(e,r,{get:t[r],enumerable:!0})},AS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qU(t))!GU.call(e,i)&&i!==r&&rd(e,i,{get:()=>t[i],enumerable:!(n=jU(t,i))||n.enumerable});return e};var j=(e,t,r)=>(r=e!=null?UU(zU(e)):{},AS(t||!e||!e.__esModule?rd(r,"default",{value:e,enumerable:!0}):r,e)),KU=e=>AS(rd({},"__esModule",{value:!0}),e);var f=HU(()=>{{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"cf156515b3aae60bc441a5fd321edfa2021ba4ea"}}});var _S=C((pbe,PS)=>{f();function jg(e){return e==null?[]:Array.isArray(e)?e:[e]}function VU(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]}PS.exports=function(e,t){e=e||[],t=t||{};var r,n,i,s,o,a={_:[]},c=0,l=0,u=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=jg(t.string),t.boolean=jg(t.boolean),d)for(r in t.alias)for(n=t.alias[r]=jg(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]]||[],l=n.length;l-- >0;)t.boolean.push(n[l]);for(c=t.string.length;c-- >0;)for(n=t.alias[t.string[c]]||[],l=n.length;l-- >0;)t.string.push(n[l]);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(l=0;l<i.length&&i.charCodeAt(l)===45;l++);if(l===0)a._.push(i);else if(i.substring(l,l+3)==="no-"){if(s=i.substring(l+3),h&&!~g.indexOf(s))return t.unknown(i);a[s]=!1}else{for(u=l+1;u<i.length&&i.charCodeAt(u)!==61;u++);for(s=i.substring(l,u),o=i.substring(++u)||c+1===p||(""+e[c+1]).charCodeAt(0)===45||e[++c],n=l===2?[s]:s,u=0;u<n.length;u++){if(s=n[u],h&&!~g.indexOf(s))return t.unknown("-".repeat(l)+s);VU(a,s,u+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 sd=C((ybe,OS)=>{"use strict";f();var Kg="\x1B",Et=`${Kg}[`,JU="\x07",Vg={to(e,t){return t?`${Et}${t+1};${e+1}H`:`${Et}${e+1}G`},move(e,t){let r="";return e<0?r+=`${Et}${-e}D`:e>0&&(r+=`${Et}${e}C`),t<0?r+=`${Et}${-t}A`:t>0&&(r+=`${Et}${t}B`),r},up:(e=1)=>`${Et}${e}A`,down:(e=1)=>`${Et}${e}B`,forward:(e=1)=>`${Et}${e}C`,backward:(e=1)=>`${Et}${e}D`,nextLine:(e=1)=>`${Et}E`.repeat(e),prevLine:(e=1)=>`${Et}F`.repeat(e),left:`${Et}G`,hide:`${Et}?25l`,show:`${Et}?25h`,save:`${Kg}7`,restore:`${Kg}8`},YU={up:(e=1)=>`${Et}S`.repeat(e),down:(e=1)=>`${Et}T`.repeat(e)},XU={screen:`${Et}2J`,up:(e=1)=>`${Et}1J`.repeat(e),down:(e=1)=>`${Et}J`.repeat(e),line:`${Et}2K`,lineEnd:`${Et}K`,lineStart:`${Et}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Vg.up():"");return e&&(t+=Vg.left),t}};OS.exports={cursor:Vg,scroll:YU,erase:XU,beep:JU}});var ut=C((xbe,Wg)=>{f();var ad=process||{},RS=ad.argv||[],od=ad.env||{},QU=!(od.NO_COLOR||RS.includes("--no-color"))&&(!!od.FORCE_COLOR||RS.includes("--color")||ad.platform==="win32"||(ad.stdout||{}).isTTY&&od.TERM!=="dumb"||!!od.CI),ZU=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+ej(i,t,r,s)+t:e+i+t},ej=(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)},MS=(e=QU)=>{let t=e?ZU:()=>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")}};Wg.exports=MS();Wg.exports.createColors=MS});var uD=C(($be,lD)=>{"use strict";f();lD.exports=function(){if(process.env.npm_config_user_agent)return kj(process.env.npm_config_user_agent)};function kj(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 LT=C((E1e,Id)=>{f();Id.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;Id.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]/;Id.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 _y=C((S1e,BT)=>{f();var Py=LT();BT.exports={isSpaceSeparator(e){return typeof e=="string"&&Py.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Py.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"||Py.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 zT=C((T1e,qT)=>{f();var Gt=_y(),ky,Sr,Hi,Nd,Ds,zn,Ht,Oy,Il;qT.exports=function(t,r){ky=String(t),Sr="start",Hi=[],Nd=0,Ds=1,zn=0,Ht=void 0,Oy=void 0,Il=void 0;do Ht=Xz(),eG[Sr]();while(Ht.type!=="eof");return typeof r=="function"?Ny({"":Il},"",r):Il};function Ny(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=Ny(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=Ny(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 ve,ye,_l,Gi,De;function Xz(){for(ve="default",ye="",_l=!1,Gi=1;;){De=Ki();let e=UT[ve]();if(e)return e}}function Ki(){if(ky[Nd])return String.fromCodePoint(ky.codePointAt(Nd))}function z(){let e=Ki();return e===`
|
|
2
2
|
`?(Ds++,zn=0):e?zn+=e.length:zn++,e&&(Nd+=e.length),e}var UT={default(){switch(De){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
3
3
|
`:case"\r":case"\u2028":case"\u2029":z();return;case"/":z(),ve="comment";return;case void 0:return z(),dt("eof")}if(Gt.isSpaceSeparator(De)){z();return}return UT[Sr]()},comment(){switch(De){case"*":z(),ve="multiLineComment";return;case"/":z(),ve="singleLineComment";return}throw ft(z())},multiLineComment(){switch(De){case"*":z(),ve="multiLineCommentAsterisk";return;case void 0:throw ft(z())}z()},multiLineCommentAsterisk(){switch(De){case"*":z();return;case"/":z(),ve="default";return;case void 0:throw ft(z())}z(),ve="multiLineComment"},singleLineComment(){switch(De){case`
|
|
4
4
|
`:case"\r":case"\u2028":case"\u2029":z(),ve="default";return;case void 0:return z(),dt("eof")}z()},value(){switch(De){case"{":case"[":return dt("punctuator",z());case"n":return z(),xo("ull"),dt("null",null);case"t":return z(),xo("rue"),dt("boolean",!0);case"f":return z(),xo("alse"),dt("boolean",!1);case"-":case"+":z()==="-"&&(Gi=-1),ve="sign";return;case".":ye=z(),ve="decimalPointLeading";return;case"0":ye=z(),ve="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":ye=z(),ve="decimalInteger";return;case"I":return z(),xo("nfinity"),dt("numeric",1/0);case"N":return z(),xo("aN"),dt("numeric",NaN);case'"':case"'":_l=z()==='"',ye="",ve="string";return}throw ft(z())},identifierNameStartEscape(){if(De!=="u")throw ft(z());z();let e=Fy();switch(e){case"$":case"_":break;default:if(!Gt.isIdStartChar(e))throw $T();break}ye+=e,ve="identifierName"},identifierName(){switch(De){case"$":case"_":case"\u200C":case"\u200D":ye+=z();return;case"\\":z(),ve="identifierNameEscape";return}if(Gt.isIdContinueChar(De)){ye+=z();return}return dt("identifier",ye)},identifierNameEscape(){if(De!=="u")throw ft(z());z();let e=Fy();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Gt.isIdContinueChar(e))throw $T();break}ye+=e,ve="identifierName"},sign(){switch(De){case".":ye=z(),ve="decimalPointLeading";return;case"0":ye=z(),ve="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":ye=z(),ve="decimalInteger";return;case"I":return z(),xo("nfinity"),dt("numeric",Gi*(1/0));case"N":return z(),xo("aN"),dt("numeric",NaN)}throw ft(z())},zero(){switch(De){case".":ye+=z(),ve="decimalPoint";return;case"e":case"E":ye+=z(),ve="decimalExponent";return;case"x":case"X":ye+=z(),ve="hexadecimal";return}return dt("numeric",Gi*0)},decimalInteger(){switch(De){case".":ye+=z(),ve="decimalPoint";return;case"e":case"E":ye+=z(),ve="decimalExponent";return}if(Gt.isDigit(De)){ye+=z();return}return dt("numeric",Gi*Number(ye))},decimalPointLeading(){if(Gt.isDigit(De)){ye+=z(),ve="decimalFraction";return}throw ft(z())},decimalPoint(){switch(De){case"e":case"E":ye+=z(),ve="decimalExponent";return}if(Gt.isDigit(De)){ye+=z(),ve="decimalFraction";return}return dt("numeric",Gi*Number(ye))},decimalFraction(){switch(De){case"e":case"E":ye+=z(),ve="decimalExponent";return}if(Gt.isDigit(De)){ye+=z();return}return dt("numeric",Gi*Number(ye))},decimalExponent(){switch(De){case"+":case"-":ye+=z(),ve="decimalExponentSign";return}if(Gt.isDigit(De)){ye+=z(),ve="decimalExponentInteger";return}throw ft(z())},decimalExponentSign(){if(Gt.isDigit(De)){ye+=z(),ve="decimalExponentInteger";return}throw ft(z())},decimalExponentInteger(){if(Gt.isDigit(De)){ye+=z();return}return dt("numeric",Gi*Number(ye))},hexadecimal(){if(Gt.isHexDigit(De)){ye+=z(),ve="hexadecimalInteger";return}throw ft(z())},hexadecimalInteger(){if(Gt.isHexDigit(De)){ye+=z();return}return dt("numeric",Gi*Number(ye))},string(){switch(De){case"\\":z(),ye+=Qz();return;case'"':if(_l)return z(),dt("string",ye);ye+=z();return;case"'":if(!_l)return z(),dt("string",ye);ye+=z();return;case`
|
|
@@ -20,7 +20,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),M=L,R=N),G===void 0&&(
|
|
|
20
20
|
`:`\r
|
|
21
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(A.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=rW[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:lx(this.state.type)?r.name=Ns(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(Ye.brace),this.next(),r=this.jsxParseExpressionContainer(r,Ye.j_oTag),r.expression.type==="JSXEmptyExpression"&&this.raise(Ao.AttributeIsEmpty,r),r;case 142:case 133:return this.parseExprAtom();default:throw this.raise(Ao.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(Ye.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(Ye.brace),this.next(),this.expect(21),r.argument=this.parseMaybeAssignAllowIn(),this.setContext(Ye.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(Ye.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(a)):i.push(this.jsxParseExpressionContainer(a,Ye.j_expr));break}default:this.unexpected()}ks(s)&&!ks(o)&&o!==null?this.raise(Ao.MissingClosingTagFragment,o):!ks(s)&&ks(o)?this.raise(Ao.MissingClosingTagElement,o,{openingTagName:ja(s.name)}):!ks(s)&&!ks(o)&&ja(o.name)!==ja(s.name)&&this.raise(Ao.MissingClosingTagElement,o,{openingTagName:ja(s.name)})}if(ks(s)?(n.openingFragment=s,n.closingFragment=o):(n.openingElement=s,n.closingElement=o),n.children=i,this.match(47))throw this.raise(Ao.UnwrappedAdjacentJSXElements,this.state.startLoc);return ks(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===Ye.j_expr){this.jsxReadToken();return}if(n===Ye.j_oTag||n===Ye.j_cTag){if(Zi(r)){this.jsxReadWord();return}if(r===62){++this.state.pos,this.finishToken(143);return}if((r===34||r===39)&&n===Ye.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,Ye.j_cTag),this.state.canStartJSXElement=!1;else if(i===142)n.push(Ye.j_oTag);else if(i===143){let s=n[n.length-1];s===Ye.j_oTag&&r===56||s===Ye.j_cTag?(n.pop(),this.state.canStartJSXElement=n[n.length-1]===Ye.j_expr):(this.setContext(Ye.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=xV(i)}},Qb=class extends Wl{constructor(...t){super(...t),this.tsNames=new Map}},Zb=class extends Jl{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new Qb(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(A.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)}},fI=e=>e.type==="ParenthesizedExpression"?fI(e.expression):e,ex=class extends Xb{toAssignable(t,r=!1){var n,i;let s;switch((t.type==="ParenthesizedExpression"||(n=t.extra)!=null&&n.parenthesized)&&(s=fI(t),r?s.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(A.InvalidParenthesizedAssignment,t):s.type!=="MemberExpression"&&!this.isOptionalMemberExpression(s)&&this.raise(A.InvalidParenthesizedAssignment,t):this.raise(A.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,l=c-1;a<c;a++){var o;let u=t.properties[a],p=a===l;this.toAssignableObjectExpressionProp(u,p,r),p&&u.type==="RestElement"&&(o=t.extra)!=null&&o.trailingCommaLoc&&this.raise(A.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(A.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"?A.PatternHasAccessor:A.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(A.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(A.RestTrailingComma,o):r&&this.raise(A.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(A.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 l=this.isOptionalMemberExpression(t);if(l||c==="MemberExpression"){l&&(this.expectPlugin("optionalChainingAssign",t.loc.start),r.type!=="AssignmentExpression"&&this.raise(A.InvalidLhsOptionalChaining,t,{ancestor:r})),n!==64&&this.raise(A.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,n,s);let{name:g}=t;i&&(i.has(g)?this.raise(A.ParamDupe,t):i.add(g));return}let u=this.isValidLVal(c,!(o||(a=t.extra)!=null&&a.parenthesized)&&r.type==="AssignmentExpression",n);if(u===!0)return;if(u===!1){let g=n===64?A.InvalidLhs:A.InvalidLhsBinding;this.raise(g,t,{ancestor:r});return}let p,d;typeof u=="string"?(p=u,d=c==="ParenthesizedExpression"):[p,d]=u;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?cI(t.name,this.inModule):aI(t.name))&&(r===64?this.raise(A.StrictEvalArguments,t,{referenceName:t.name}):this.raise(A.StrictEvalArgumentsBinding,t,{bindingName:t.name})),r&8192&&t.name==="let"&&this.raise(A.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(A.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?A.RestTrailingComma:A.ElementAfterRest,this.state.startLoc),!0):!1}};function iW(e){if(e==null)throw new Error(`Unexpected ${e} value.`);return e}function Y_(e){if(!e)throw new Error("Assert fail")}var re=es`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 sW(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 X_(e){return e==="private"||e==="public"||e==="protected"}function oW(e){return e==="in"||e==="out"}var aW=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:re.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:re.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:re.InvalidModifierOnTypeParameter})}getScopeHandler(){return Zb}tsIsIdentifier(){return Me(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(!Me(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=re.InvalidModifierOnTypeMember},o){let a=(l,u,p,d)=>{u===p&&o[d]&&this.raise(re.InvalidModifiersOrder,l,{orderedModifiers:[p,d]})},c=(l,u,p,d)=>{(o[p]&&u===d||o[d]&&u===p)&&this.raise(re.IncompatibleModifiers,l,{modifiers:[p,d]})};for(;;){let{startLoc:l}=this.state,u=this.tsParseModifier(r.concat(n??[]),i);if(!u)break;X_(u)?o.accessibility?this.raise(re.DuplicateAccessibilityModifier,l,{modifier:u}):(a(l,u,u,"override"),a(l,u,u,"static"),a(l,u,u,"readonly"),o.accessibility=u):oW(u)?(o[u]&&this.raise(re.DuplicateModifier,l,{modifier:u}),o[u]=!0,a(l,u,"in","out")):(hasOwnProperty.call(o,u)?this.raise(re.DuplicateModifier,l,{modifier:u}):(a(l,u,"static","readonly"),a(l,u,"static","override"),a(l,u,"override","readonly"),a(l,u,"abstract","override"),c(l,u,"declare","override"),c(l,u,"static","abstract")),o[u]=!0),n!=null&&n.includes(u)&&this.raise(s,l,{modifier:u})}}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 iW(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(re.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(re.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(re.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(),Me(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(re.ReadonlyForMethodSignature,r);let s=i;s.kind&&this.match(47)&&this.raise(re.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(A.BadGetterArity,this.state.curPosition()),this.isThisParam(s[o][0])&&this.raise(re.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(s.kind==="set"){if(s[o].length!==1)this.raise(A.BadSetterArity,this.state.curPosition());else{let c=s[o][0];this.isThisParam(c)&&this.raise(re.AccessorCannotDeclareThisParameter,this.state.curPosition()),c.type==="Identifier"&&c.optional&&this.raise(re.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),c.type==="RestElement"&&this.raise(re.SetAccessorCannotHaveRestParameter,this.state.curPosition())}s[a]&&this.raise(re.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(re.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,l=Kn(this.state.type)?this.lookaheadCharCode():null;if(l===58)i=!0,o=!1,s=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(l===63){o=!0;let u=this.state.startLoc,p=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(i=!0,s=this.createIdentifier(this.startNodeAt(u),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 u;s?(u=this.startNodeAtNode(s),u.optional=o,u.label=s,u.elementType=a,this.eat(17)&&(u.optional=!0,this.raise(re.TupleOptionalAfterType,this.state.lastTokStartLoc))):(u=this.startNodeAtNode(a),u.optional=o,this.raise(re.InvalidTupleMemberLabel,a),u.label=a,u.elementType=this.tsParseType()),a=this.finishNode(u,"TSNamedTupleMember")}else if(o){let u=this.startNodeAtNode(a);u.typeAnnotation=a,a=this.finishNode(u,"TSOptionalType")}if(n){let u=this.startNodeAt(r);u.typeAnnotation=a,a=this.finishNode(u,"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(Me(r)||r===88||r===84){let n=r===88?"TSVoidKeyword":r===84?"TSNullKeyword":sW(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(re.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 DV(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(Me(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(),!Me(this.state.type)&&!this.match(78)?!1:(r&&this.raise(A.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(){Y_(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(re.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(re.EmptyHeritageClauseType,n,{token:r}),i}tsParseInterfaceDeclaration(r,n={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),n.declare&&(r.declare=!0),Me(this.state.type)?(r.id=this.parseIdentifier(),this.checkIdentifier(r.id,130)):(r.id=null,this.raise(re.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(re.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(Me(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)||Me(this.state.type)))return this.tsParseAbstractDeclaration(r,s);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(133))return this.tsParseAmbientExternalModuleDeclaration(r);if(Me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&Me(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(r);break;case"type":if(this.tsCheckLineTerminator(i)&&Me(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(re.EmptyTypeArguments,r):!this.state.inType&&this.curContext()===Ye.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(r,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return TV(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(re.UnexpectedParameterModifier,i);let l=this.parseMaybeDefault();this.parseAssignableListItemTypes(l,r);let u=this.parseMaybeDefault(l.loc.start,l);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),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(re.UnsupportedParameterPropertyKind,p),p.parameter=u,this.finishNode(p,"TSParameterProperty")}return n.length&&(l.decorators=n),u}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(re.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(re.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(re.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 l=this.tsParseTypeArgumentsInExpression();if(!l)return;if(o&&!this.match(10)){a=this.state.curPosition();return}if(df(this.state.type)){let d=super.parseTaggedTemplateExpression(r,n,s);return d.typeParameters=l,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=l,s.optionalChainMember&&(d.optional=o),this.finishCallExpression(d,s.optionalChainMember)}let u=this.state.type;if(u===48||u===52||u!==10&&Lb(u)&&!this.hasPrecedingLineBreak())return;let p=this.startNodeAt(n);return p.expression=r,p.typeParameters=l,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(re.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(lf(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(A.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(re.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(Me(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(re.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(re.InitializerNotAllowedInAmbientContext,c):lW(c,this.hasPlugin("estree"))||this.raise(re.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=>X_(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:re.InvalidModifierOnTypeParameterPositions},n);let o=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(n,s)&&this.raise(re.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(re.IndexSignatureHasAbstract,n),n.accessibility&&this.raise(re.IndexSignatureHasAccessibility,n,{modifier:n.accessibility}),n.declare&&this.raise(re.IndexSignatureHasDeclare,n),n.override&&this.raise(re.IndexSignatureHasOverride,n);return}!this.state.inAbstractClass&&n.abstract&&this.raise(re.NonAbstractClassHasAbstractMethod,n),n.override&&(i.hadSuperClass||this.raise(re.OverrideNotInSubClass,n)),super.parseClassMemberWithIsStatic(r,n,i,s)}parsePostMemberNameModifiers(r){this.eat(17)&&(r.optional=!0),r.readonly&&this.match(10)&&this.raise(re.ClassMethodHasReadonly,r),r.declare&&this.match(10)&&this.raise(re.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(re.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let o=Me(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(re.DeclareClassFieldHasInitializer,this.state.startLoc),r.abstract&&this.match(29)){let{key:n}=r;this.raise(re.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(re.PrivateElementHasAbstract,r),r.accessibility&&this.raise(re.PrivateElementHasAccessibility,r,{modifier:r.accessibility}),this.parseClassPropertyAnnotation(r),super.parseClassPrivateProperty(r)}parseClassAccessorProperty(r){return this.parseClassPropertyAnnotation(r),r.optional&&this.raise(re.AccessorCannotBeOptional,r),super.parseClassAccessorProperty(r)}pushClassMethod(r,n,i,s,o,a){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);c&&o&&this.raise(re.ConstructorHasTypeParameters,c);let{declare:l=!1,kind:u}=n;l&&(u==="get"||u==="set")&&this.raise(re.DeclareAccessor,n,{kind:u}),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 l=this.tsTryParseTypeParameters(this.tsParseConstModifier);return l&&(r.typeParameters=l),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 l,u,p;if(this.hasPlugin("jsx")&&(this.match(142)||this.match(47))){if(l=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(r,n),l),!u.error)return u.node;let{context:m}=this.state,g=m[m.length-1];(g===Ye.j_oTag||g===Ye.j_expr)&&m.pop()}if(!((i=u)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(r,n);(!l||l===this.state)&&(l=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},l);if(!h.error&&!h.aborted)return d&&this.reportReservedArrowTypeParam(d),h.node;if(!u&&(Y_(!this.hasPlugin("jsx")),p=this.tryParse(()=>super.parseMaybeAssign(r,n),l),!p.error))return p.node;if((s=u)!=null&&s.node)return this.state=u.failState,u.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=u)==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(re.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(re.UnexpectedTypeCastInParameter,r):this.raise(re.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(re.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(re.NonClassMethodPropertyHasAbstractModifer,r),this.tsParseInterfaceDeclaration(r)}else this.unexpected(null,80)}parseMethod(r,n,i,s,o,a,c){let l=super.parseMethod(r,n,i,s,o,a,c);if(l.abstract&&(this.hasPlugin("estree")?!!l.value.body:!!l.body)){let{key:p}=l;this.raise(re.AbstractMethodHasImplementation,l,{methodName:p.type==="Identifier"&&!l.computed?p.name:`[${this.input.slice(p.start,p.end)}]`})}return l}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,l=!1,u=!0,p=a.loc.start;if(this.isContextual(93)){let h=this.parseIdentifier();if(this.isContextual(93)){let m=this.parseIdentifier();Kn(this.state.type)?(l=!0,a=h,c=n?this.parseIdentifier():this.parseModuleExportName(),u=!1):(c=m,u=!1)}else Kn(this.state.type)?(u=!1,c=n?this.parseIdentifier():this.parseModuleExportName()):(l=!0,a=h)}else Kn(this.state.type)&&(l=!0,n?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());l&&i&&this.raise(n?re.TypeModifierIsUsedInTypeImports:re.TypeModifierIsUsedInTypeExports,p),r[s]=a,r[o]=c;let d=n?"importKind":"exportKind";r[d]=l?"type":"value",u&&this.eatContextual(93)&&(r[o]=n?this.parseIdentifier():this.parseModuleExportName()),r[o]||(r[o]=ts(r[s])),n&&this.checkIdentifier(r[o],l?4098:4096)}};function cW(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:hI(e.object)}function lW(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!!(mI(e,t)||uW(e,t)||n==="TemplateLiteral"&&e.expressions.length===0||cW(e))}function mI(e,t){return t?e.type==="Literal"&&(typeof e.value=="number"||"bigint"in e):e.type==="NumericLiteral"||e.type==="BigIntLiteral"}function uW(e,t){if(e.type==="UnaryExpression"){let{operator:r,argument:n}=e;if(r==="-"&&mI(n,t))return!0}return!1}function hI(e){return e.type==="Identifier"?!0:e.type!=="MemberExpression"||e.computed?!1:hI(e.object)}var Q_=es`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),pW=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(Q_.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(Ns(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(Q_.UnexpectedSpace,this.state.lastTokEndLoc)}},dW=e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let r=this.state.startLoc,n=this.startNode();if(this.next(),Me(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)}},Z_=["minimal","fsharp","hack","smart"],eI=["^^","@@","^","%","#"];function fW(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(!Z_.includes(r)){let i=Z_.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(!eI.includes(i)){let s=eI.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 gI={estree:hV,jsx:nW,flow:tW,typescript:aW,v8intrinsic:dW,placeholders:pW},mW=Object.keys(gI),Ob={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 hW(e){if(e==null)return Object.assign({},Ob);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(Ob)){var r;t[n]=(r=e[n])!=null?r:Ob[n]}return t}var tx=class extends ex{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(A.RecordNoProto,s);return}n.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=s.loc.start):this.raise(A.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 Ga,i=!0);let{type:s}=this.state;(s===10||Me(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(r&&(o=r.call(this,o,n)),vV(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 l=n.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=l&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=l&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=l&&(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>=lf(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(A.PrivateInExpectedIn,t,{identifierName:s}),this.classScope.usePrivateName(s,t.loc.start)}let i=this.state.type;if(EV(i)&&(this.prodParam.hasIn||!this.match(58))){let s=lf(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=lf(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(A.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);o.right=this.parseExprOpRightExpr(i,s);let l=this.finishNode(o,a||c?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(c&&(u===41||u===42)||a&&u===40)throw this.raise(A.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,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(A.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,AV(t)?r-1:r)}parseHackPipeBody(){var t;let{startLoc:r}=this.state,n=this.parseMaybeAssign();return uV.has(n.type)&&!((t=n.extra)!=null&&t.parenthesized)&&this.raise(A.PipeUnparenthesizedBody,r,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(A.PipeTopicUnused,r),n}checkExponentialAfterUnary(t){this.match(57)&&this.raise(A.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(SV(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 l=o.argument;l.type==="Identifier"?this.raise(A.StrictDelete,o):this.hasPropertyAsPrivateName(l)&&this.raise(A.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")?Lb(c):Lb(c)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(A.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(;CV(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(df(s))return this.parseTaggedTemplateExpression(t,r,i);let o=!1;if(s===18){if(n&&(this.raise(A.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(A.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:l}=n;c&&(this.expressionScope.enter(VV()),o=new Ga),l&&(a.optional=i),i?a.arguments=this.parseCallExpressionArguments(11):a.arguments=this.parseCallExpressionArguments(11,t.type==="Import",t.type!=="Super",a,o);let u=this.finishCallExpression(a,l);return c&&this.shouldParseAsyncArrow()&&!i?(n.stop=!0,this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(r),u)):(c&&(this.checkExpressionErrors(o,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=s,u}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(A.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(A.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(A.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(A.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&&Yl(t,r.innerComments),r.callee.trailingComments&&Yl(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(A.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(A.UnsupportedBind,s)}case 138:return this.raise(A.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());Zi(s)||s===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(Me(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(Me(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=Tr(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"?A.PrimaryTopicNotAllowed:A.PipeTopicUnbound,r),this.registerTopicReference(),this.finishNode(t,s)}else throw this.raise(A.PipeTopicUnconfiguredToken,r,{token:Ns(i)})}testTopicReferenceConfiguration(t,r,n){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:Ns(n)}]);case"smart":return n===27;default:throw this.raise(A.PipeTopicRequiresHackPipes,r)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(uf(!0,this.prodParam.hasYield));let r=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(A.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(A.SuperNotAllowed,t):!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(A.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(A.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),r=this.startNodeAt(Tr(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(A.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(A.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(A.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(KV());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 Ga,l=!0,u,p;for(;!this.match(11);){if(l)l=!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(u=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),u&&this.unexpected(u),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(A.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(A.ImportCallNotNewExpression,n)}parseTemplateElement(t){let{start:r,startLoc:n,end:i,value:s}=this.state,o=r+1,a=this.startNodeAt(Tr(n,1));s===null&&(t||this.raise(A.InvalidEscapeSequenceTemplate,Tr(this.state.firstInvalidTemplateEscapePos,1)));let c=this.match(24),l=c?-1:-2,u=i+l;a.value={raw:this.input.slice(o,u).replace(/\r\n?/g,`
|
|
22
22
|
`),cooked:s===null?null:s.slice(1,l)},a.tail=c,this.next();let p=this.finishNode(a,"TemplateElement");return this.resetEndLocation(p,Tr(this.state.lastTokEndLoc,l)),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 u;r?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(i),this.checkProto(u,n,o,i)),n&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(A.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),c.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=s;let l="ObjectExpression";return r?l="ObjectPattern":n&&(l="RecordExpression"),this.finishNode(c,l)}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(A.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:l}=n,u=l.name;u==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(l),a=this.eat(55),this.parsePropertyName(n)),(u==="get"||u==="set")&&(s=!0,this.resetPreviousNodeTrailingComments(l),n.kind=u,this.match(55)&&(a=!0,this.raise(A.AccessorIsGenerator,this.state.curPosition(),{kind:u}),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"?A.BadGetterArity:A.BadSetterArity,t),t.kind==="set"&&((r=i[i.length-1])==null?void 0:r.type)==="RestElement"&&this.raise(A.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,ts(t.key));else if(this.match(29)){let s=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=s):this.raise(A.InvalidCoverInitializedName,s),t.value=this.parseMaybeDefault(r,ts(t.key))}else t.value=ts(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(Kn(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(A.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(uf(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=uf(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(dI()),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(A.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let l=!s&&this.state.strict;this.checkParams(t,!this.state.strict&&!r&&!n&&!c,r,l),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,l)}),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(A.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(A.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;Kn(i)?r=this.state.value:this.unexpected();let s=bV(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||!LV(t))return;if(n&&OV(t)){this.raise(A.UnexpectedKeyword,r,{keyword:t});return}if((this.state.strict?i?cI:oI:sI)(t,this.inModule)){this.raise(A.UnexpectedReservedWord,r,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(A.YieldBindingIdentifier,r);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(A.AwaitBindingIdentifier,r);return}if(this.scope.inStaticBlock){this.raise(A.AwaitBindingIdentifierInStaticBlock,r);return}this.expressionScope.recordAsyncArrowParametersError(r)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(A.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(A.AwaitExpressionFormalParameter,r),this.eat(55)&&this.raise(A.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||df(t)||t===102&&!this.state.containsEsc||t===137||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(A.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(A.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(A.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(A.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){}},Rb={kind:1},gW={kind:2},yW=/[\uD800-\uDFFF]/u,Mb=/in(?:stanceof)?/y;function bW(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,l=o+1,u=Tr(s.start,1);e.splice(r,1,new vi({type:Xi(27),value:"#",start:o,end:l,startLoc:s.start,endLoc:u}),new vi({type:Xi(132),value:a,start:l,end:c,startLoc:u,endLoc:s.end})),r++;continue}if(df(i)){let{loc:s,start:o,value:a,end:c}=n,l=o+1,u=Tr(s.start,1),p;t.charCodeAt(o)===96?p=new vi({type:Xi(22),value:"`",start:o,end:l,startLoc:s.start,endLoc:u}):p=new vi({type:Xi(8),value:"}",start:o,end:l,startLoc:s.start,endLoc:u});let d,h,m,g;i===24?(h=c-1,m=Tr(s.end,-1),d=a===null?null:a.slice(1,-1),g=new vi({type:Xi(22),value:"`",start:h,end:c,startLoc:m,endLoc:s.end})):(h=c-2,m=Tr(s.end,-2),d=a===null?null:a.slice(1,-2),g=new vi({type:Xi(23),value:"${",start:h,end:c,startLoc:m,endLoc:s.end})),e.splice(r,1,p,new vi({type:Xi(20),value:d,start:l,end:h,startLoc:u,endLoc:m}),g),r+=2;continue}}n.type=Xi(i)}}return e}var rx=class extends tx{parseTopLevel(t,r){return t.program=this.parseProgram(r),t.comments=this.comments,this.options.tokens&&(t.tokens=bW(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(A.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",Tr(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(Zi(t)){if(Mb.lastIndex=r,Mb.test(this.input)){let n=this.codePointAtPos(Mb.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(Me(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?A.StrictFunction:this.options.annexB?A.SloppyFunctionAnnexB:A.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(A.UnexpectedLexicalDeclaration,i):this.raise(A.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(A.UnexpectedUsingDeclaration,this.state.startLoc):s||this.raise(A.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),p=this.codePointAtPos(u);if(p!==91&&(!s&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(p,u)&&p!==123))break}case 75:s||this.raise(A.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let u=this.state.value;return this.parseVarStatement(i,u)}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 u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!this.options.allowImportExportEverywhere&&!a&&this.raise(A.UnexpectedImportExport,this.state.startLoc),this.next();let u;return n===83?(u=this.parseImport(i),u.type==="ImportDeclaration"&&(!u.importKind||u.importKind==="value")&&(this.sawUnambiguousESM=!0)):(u=this.parseExport(i,r),(u.type==="ExportNamedDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportAllDeclaration"&&(!u.exportKind||u.exportKind==="value")||u.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return s||this.raise(A.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!s&&o)}let c=this.state.value,l=this.parseExpression();return Me(n)&&l.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,c,l,t):this.parseExpressionStatement(i,l,r)}assertModuleNodeAllowed(t){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(A.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(A.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(A.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(A.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(A.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(A.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(Rb),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(Rb);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(),l=c||this.isContextual(107)&&this.startsUsingForOf(),u=n&&this.hasFollowingBindingAtom()||l;if(this.match(74)||this.match(75)||u){let p=this.startNode(),d;c?(d="await using",this.recordAwaitIfAllowed()||this.raise(A.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&&l&&this.raise(A.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 Ga,o=this.parseExpression(!0,s),a=this.isContextual(102);if(a&&(n&&this.raise(A.ForOfLet,o),r===null&&i&&o.type==="Identifier"&&this.raise(A.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(A.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(gW),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(A.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(A.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(A.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(Rb),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(A.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(A.LabelRedeclaration,n,{labelName:r});let s=wV(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 l=n?this.parseModuleItem():this.parseStatementListItem();if(r&&!c){if(this.isValidDirective(l)){let u=this.stmtToDirective(l);r.push(u),!a&&u.value.value==="use strict"&&(a=!0,this.setStrict(!0));continue}c=!0,this.state.strictErrors.clear()}t.push(l)}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(A.ForInOfLoopInitializer,r,{type:i?"ForInStatement":"ForOfStatement"}),r.type==="AssignmentPattern"&&this.raise(A.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(A.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(n==="const"||n==="using"||n==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(A.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(A.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(A.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(uf(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||Me(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,r){this.expect(10),this.expressionScope.enter(HV()),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(A.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(A.DecoratorConstructor,o)}}),this.state.strict=r,this.next(),i.length)throw this.raise(A.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,l=r,u=s,p=s;if(r.static=i,this.parsePropertyNamePrefixOperator(r),this.eat(55)){u.kind="method";let b=this.match(138);if(this.parseClassElementName(u),b){this.pushClassPrivateMethod(t,o,!0,!1);return}this.isNonstaticConstructor(s)&&this.raise(A.ConstructorIsGenerator,s.key),this.pushClassMethod(t,s,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&Me(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(u.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(A.DuplicateConstructor,h),b&&this.hasPlugin("typescript")&&r.override&&this.raise(A.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),u.kind="method";let v=this.match(138);this.parseClassElementName(u),this.parsePostMemberNameModifiers(p),v?this.pushClassPrivateMethod(t,o,b,!0):(this.isNonstaticConstructor(s)&&this.raise(A.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),u.kind=m;let b=this.match(138);this.parseClassElementName(s),b?this.pushClassPrivateMethod(t,o,!1,!1):(this.isNonstaticConstructor(s)&&this.raise(A.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,l,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(A.StaticPrototype,this.state.startLoc),r===138){n==="constructor"&&this.raise(A.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(A.DecoratorStaticBlock,r)}pushClassProperty(t,r){!r.computed&&this.nameIsConstructor(r.key)&&this.raise(A.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(A.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(dI()),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(Me(this.state.type))t.id=this.parseIdentifier(),r&&this.declareNameFromIdentifier(t.id,i);else if(n||!r)t.id=null;else throw this.raise(A.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)),l=i||o;if(o&&!a){if(i&&this.unexpected(),r)throw this.raise(A.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(t);i&&s&&!o&&!u&&this.unexpected(null,5),a&&c&&this.unexpected(null,98);let p;if(l||u){if(p=!1,r)throw this.raise(A.UnsupportedDecoratorExport,t);this.parseExportFrom(t,l)}else p=this.maybeParseExportDeclaration(t);if(l||u||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(A.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(A.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(A.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(A.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(Me(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(Me(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||Me(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(A.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(A.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(A.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(A.ExportDefaultFromAsIdentifier,a)}}else if((s=t.specifiers)!=null&&s.length)for(let a of t.specifiers){let{exported:c}=a,l=c.type==="Identifier"?c.name:c.value;if(this.checkDuplicateExports(a,l),!i&&a.local){let{local:u}=a;u.type!=="Identifier"?this.raise(A.ExportBindingIsString,a,{localName:u.value,exportName:l}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}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(A.DuplicateDefaultExport,t):this.raise(A.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=JV(t.local):t.exported||(t.exported=ts(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(133)){let t=this.parseStringLiteral(this.state.value),r=yW.exec(t.value);return r&&this.raise(A.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(A.SourcePhaseImportRequiresDefault,r[0].loc.start);else if(t.phase==="defer")n!=="ImportNamespaceSpecifier"&&this.raise(A.DeferImportRequiresNamespace,r[0].loc.start);else if(t.module){var i;n!=="ImportDefaultSpecifier"&&this.raise(A.ImportReflectionNotBinding,r[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(A.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(A.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(Kn(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 Me(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(A.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(A.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(A.ModuleAttributeDifferentFromType,n.key),r.has(n.key.name)&&this.raise(A.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),r.add(n.key.name),this.expect(14),!this.match(133))throw this.raise(A.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(A.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(Kn(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(A.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(A.ImportBindingIsString,t,{importName:o.value});this.checkReservedWord(o.name,t.loc.start,!0,!0),t.local||(t.local=ts(o))}return this.finishImportSpecifier(t,"ImportSpecifier",s)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},mf=class extends rx{constructor(t,r,n){t=hW(t),super(t,r),this.options=t,this.initializeScopes(),this.plugins=n,this.filename=t.sourceFilename}getScopeHandler(){return Jl}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 xW(e,t){var r;if(((r=t)==null?void 0:r.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let n=Kl(t,e),i=n.parse();if(n.sawUnambiguousESM)return i;if(n.ambiguousScriptDifferentAst)try{return t.sourceType="script",Kl(t,e).parse()}catch{}else i.program.sourceType="script";return i}catch(n){try{return t.sourceType="script",Kl(t,e).parse()}catch{}throw n}}else return Kl(t,e).parse()}function vW(e,t){let r=Kl(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}function wW(e){let t={};for(let r of Object.keys(e))t[r]=Xi(e[r]);return t}var EW=wW(yV);function Kl(e,t){let r=mf,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||{})}fW(n),r=CW(n)}return new r(e,t,n)}var tI=new Map;function CW(e){let t=[];for(let i of mW)e.has(i)&&t.push(i);let r=t.join("|"),n=tI.get(r);if(!n){n=mf;for(let i of t)n=gI[i](n);tI.set(r,n)}return n}Xl.parse=xW;Xl.parseExpression=vW;Xl.tokTypes=EW});var Wk=C(ic=>{"use strict";f();Object.defineProperty(ic,"__esModule",{value:!0});ic.splitWhen=ic.flatten=void 0;function PY(e){return e.reduce((t,r)=>[].concat(t,r),[])}ic.flatten=PY;function _Y(e,t){let r=[[]],n=0;for(let i of e)t(i)?(n++,r[n]=[]):r[n].push(i);return r}ic.splitWhen=_Y});var Jk=C(qf=>{"use strict";f();Object.defineProperty(qf,"__esModule",{value:!0});qf.isEnoentCodeError=void 0;function IY(e){return e.code==="ENOENT"}qf.isEnoentCodeError=IY});var Yk=C(zf=>{"use strict";f();Object.defineProperty(zf,"__esModule",{value:!0});zf.createDirentFromStats=void 0;var Wx=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 kY(e,t){return new Wx(e,t)}zf.createDirentFromStats=kY});var e2=C(Mt=>{"use strict";f();Object.defineProperty(Mt,"__esModule",{value:!0});Mt.convertPosixPathToPattern=Mt.convertWindowsPathToPattern=Mt.convertPathToPattern=Mt.escapePosixPath=Mt.escapeWindowsPath=Mt.escape=Mt.removeLeadingDotSegment=Mt.makeAbsolute=Mt.unixify=void 0;var NY=require("os"),FY=require("path"),Xk=NY.platform()==="win32",OY=2,RY=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,MY=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,LY=/^\\\\([.?])/,BY=/\\(?![!()+@[\]{}])/g;function $Y(e){return e.replace(/\\/g,"/")}Mt.unixify=$Y;function UY(e,t){return FY.resolve(e,t)}Mt.makeAbsolute=UY;function jY(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(OY)}return e}Mt.removeLeadingDotSegment=jY;Mt.escape=Xk?Jx:Yx;function Jx(e){return e.replace(MY,"\\$2")}Mt.escapeWindowsPath=Jx;function Yx(e){return e.replace(RY,"\\$2")}Mt.escapePosixPath=Yx;Mt.convertPathToPattern=Xk?Qk:Zk;function Qk(e){return Jx(e).replace(LY,"//$1").replace(BY,"/")}Mt.convertWindowsPathToPattern=Qk;function Zk(e){return Yx(e)}Mt.convertPosixPathToPattern=Zk});var r2=C((lIe,t2)=>{f();t2.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 Xx=C((pIe,i2)=>{f();var qY=r2(),n2={"{":"}","(":")","[":"]"},zY=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=n2[a];if(c){var l=e.indexOf(c,t);l!==-1&&(t=l+1)}if(e[t]==="!")return!0}else t++}return!1},GY=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=n2[r];if(n){var i=e.indexOf(n,t);i!==-1&&(t=i+1)}if(e[t]==="!")return!0}else t++}return!1};i2.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(qY(t))return!0;var n=zY;return r&&r.strict===!1&&(n=GY),n(t)}});var o2=C((fIe,s2)=>{"use strict";f();var HY=Xx(),KY=require("path").posix.dirname,VY=require("os").platform()==="win32",Qx="/",WY=/\\/g,JY=/[\{\[].*[\}\]]$/,YY=/(^|[^\\])([\{\[]|\([^\)]+$)/,XY=/\\([\!\*\?\|\[\]\(\)\{\}])/g;s2.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&VY&&t.indexOf(Qx)<0&&(t=t.replace(WY,Qx)),JY.test(t)&&(t+=Qx),t+="a";do t=KY(t);while(HY(t)||YY.test(t));return t.replace(XY,"$1")}});var Gf=C(Dn=>{"use strict";f();Dn.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;Dn.find=(e,t)=>e.nodes.find(r=>r.type===t);Dn.exceedsLimit=(e,t,r=1,n)=>n===!1||!Dn.isInteger(e)||!Dn.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;Dn.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)};Dn.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);Dn.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;Dn.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;Dn.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);Dn.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 Hf=C((yIe,c2)=>{"use strict";f();var a2=Gf();c2.exports=(e,t={})=>{let r=(n,i={})=>{let s=t.escapeInvalid&&a2.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||o)&&a2.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 u2=C((xIe,l2)=>{"use strict";f();l2.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var x2=C((wIe,b2)=>{"use strict";f();var p2=u2(),Oo=(e,t,r)=>{if(p2(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(p2(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(Oo.cache.hasOwnProperty(c))return Oo.cache[c].result;let l=Math.min(e,t),u=Math.max(e,t);if(Math.abs(l-u)===1){let g=e+"|"+t;return n.capture?`(${g})`:n.wrap===!1?g:`(?:${g})`}let p=y2(e)||y2(t),d={min:e,max:t,a:l,b:u},h=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),l<0){let g=u<0?Math.abs(u):1;m=d2(g,Math.abs(l),d,n),l=d.a=0}return u>=0&&(h=d2(l,u,d,n)),d.negatives=m,d.positives=h,d.result=QY(m,h,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&h.length+m.length>1&&(d.result=`(?:${d.result})`),Oo.cache[c]=d,d.result};function QY(e,t,r){let n=Zx(e,t,"-",!1,r)||[],i=Zx(t,e,"",!1,r)||[],s=Zx(e,t,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function ZY(e,t){let r=1,n=1,i=m2(e,r),s=new Set([t]);for(;e<=i&&i<=t;)s.add(i),r+=1,i=m2(e,r);for(i=h2(t+1,n)-1;e<i&&i<=t;)s.add(i),n+=1,i=h2(t+1,n)-1;return s=[...s],s.sort(rX),s}function eX(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=tX(e,t),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[c,l]=n[a];c===l?s+=c:c!=="0"||l!=="9"?s+=nX(c,l,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function d2(e,t,r,n){let i=ZY(e,t),s=[],o=e,a;for(let c=0;c<i.length;c++){let l=i[c],u=eX(String(o),String(l),n),p="";if(!r.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+g2(a.count),o=l+1;continue}r.isPadded&&(p=iX(l,r,n)),u.string=p+u.pattern+g2(u.count),s.push(u),o=l+1,a=u}return s}function Zx(e,t,r,n,i){let s=[];for(let o of e){let{string:a}=o;!n&&!f2(t,"string",a)&&s.push(r+a),n&&f2(t,"string",a)&&s.push(r+a)}return s}function tX(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function rX(e,t){return e>t?1:t>e?-1:0}function f2(e,t,r){return e.some(n=>n[t]===r)}function m2(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function h2(e,t){return e-e%Math.pow(10,t)}function g2(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function nX(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function y2(e){return/^-?(0+)\d/.test(e)}function iX(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}}`}}Oo.cache={};Oo.clearCache=()=>Oo.cache={};b2.exports=Oo});var rv=C((CIe,T2)=>{"use strict";f();var sX=require("util"),w2=x2(),v2=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),oX=e=>t=>e===!0?Number(t):String(t),ev=e=>typeof e=="number"||typeof e=="string"&&e!=="",hu=e=>Number.isInteger(+e),tv=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},aX=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,cX=(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},Vf=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},lX=(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=>Vf(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Vf(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,t.wrap?`(${n}${o})`:o},E2=(e,t,r,n)=>{if(r)return w2(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);if(e===t)return i;let s=String.fromCharCode(t);return`[${i}-${s}]`},C2=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${e.join("|")})`:e.join("|")}return w2(e,t,r)},S2=(...e)=>new RangeError("Invalid range arguments: "+sX.inspect(...e)),D2=(e,t,r)=>{if(r.strictRanges===!0)throw S2([e,t]);return[]},uX=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},pX=(e,t,r=1,n={})=>{let i=Number(e),s=Number(t);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw S2([e,t]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(e),c=String(t),l=String(r);r=Math.max(Math.abs(r),1);let u=tv(a)||tv(c)||tv(l),p=u?Math.max(a.length,c.length,l.length):0,d=u===!1&&aX(e,t,n)===!1,h=n.transform||oX(d);if(n.toRegex&&r===1)return E2(Vf(e,p),Vf(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(cX(h(i,b),p,d)),i=o?i-r:i+r,b++;return n.toRegex===!0?r>1?lX(m,n,p):C2(y,null,{wrap:!1,...n}):y},dX=(e,t,r=1,n={})=>{if(!hu(e)&&e.length>1||!hu(t)&&t.length>1)return D2(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),l=Math.max(s,o);if(n.toRegex&&r===1)return E2(c,l,!1,n);let u=[],p=0;for(;a?s>=o:s<=o;)u.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?C2(u,null,{wrap:!1,options:n}):u},Kf=(e,t,r,n={})=>{if(t==null&&ev(e))return[e];if(!ev(e)||!ev(t))return D2(e,t,n);if(typeof r=="function")return Kf(e,t,1,{transform:r});if(v2(r))return Kf(e,t,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,hu(r)?hu(e)&&hu(t)?pX(e,t,r,i):dX(e,t,Math.max(Math.abs(r),1),i):r!=null&&!v2(r)?uX(r,i):Kf(e,t,1,r)};T2.exports=Kf});var _2=C((DIe,P2)=>{"use strict";f();var fX=rv(),A2=Gf(),mX=(e,t={})=>{let r=(n,i={})=>{let s=A2.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||o===!0,c=t.escapeInvalid===!0?"\\":"",l="";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 u=A2.reduce(n.nodes),p=fX(...u,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return u.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let u of n.nodes)l+=r(u,n);return l};return r(e)};P2.exports=mX});var N2=C((AIe,k2)=>{"use strict";f();var hX=rv(),I2=Hf(),sc=Gf(),Ro=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?sc.flatten(t).map(i=>`{${i}}`):t;for(let i of e)if(Array.isArray(i))for(let s of i)n.push(Ro(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?Ro(i,s,r):i+s);return sc.flatten(n)},gX=(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(Ro(a.pop(),I2(i,t)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(Ro(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=sc.reduce(i.nodes);if(sc.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=hX(...p,t);d.length===0&&(d=I2(i,t)),a.push(Ro(a.pop(),d)),i.nodes=[];return}let c=sc.encloseBrace(i),l=i.queue,u=i;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,l=u.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&l.push(""),l.push("");continue}if(d.type==="close"){a.push(Ro(a.pop(),l,c));continue}if(d.value&&d.type!=="open"){l.push(Ro(l.pop(),d.value));continue}d.nodes&&n(d,i)}return l};return sc.flatten(n(e))};k2.exports=gX});var O2=C((_Ie,F2)=>{"use strict";f();F2.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 $2=C((kIe,B2)=>{"use strict";f();var yX=Hf(),{MAX_LENGTH:R2,CHAR_BACKSLASH:nv,CHAR_BACKTICK:bX,CHAR_COMMA:xX,CHAR_DOT:vX,CHAR_LEFT_PARENTHESES:wX,CHAR_RIGHT_PARENTHESES:EX,CHAR_LEFT_CURLY_BRACE:CX,CHAR_RIGHT_CURLY_BRACE:SX,CHAR_LEFT_SQUARE_BRACKET:M2,CHAR_RIGHT_SQUARE_BRACKET:L2,CHAR_DOUBLE_QUOTE:DX,CHAR_SINGLE_QUOTE:TX,CHAR_NO_BREAK_SPACE:AX,CHAR_ZERO_WIDTH_NOBREAK_SPACE:PX}=O2(),_X=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(R2,r.maxLength):R2;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,l=e.length,u=0,p=0,d,h=()=>e[u++],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"});u<l;)if(o=s[s.length-1],d=h(),!(d===PX||d===AX)){if(d===nv){m({type:"text",value:(t.keepEscaping?d:"")+h()});continue}if(d===L2){m({type:"text",value:"\\"+d});continue}if(d===M2){c++;let g;for(;u<l&&(g=h());){if(d+=g,g===M2){c++;continue}if(g===nv){d+=h();continue}if(g===L2&&(c--,c===0))break}m({type:"text",value:d});continue}if(d===wX){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===EX){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===DX||d===TX||d===bX){let g=d,y;for(t.keepQuotes!==!0&&(d="");u<l&&(y=h());){if(y===nv){d+=y+h();continue}if(y===g){t.keepQuotes===!0&&(d+=y);break}d+=y}m({type:"text",value:d});continue}if(d===CX){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===SX){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===xX&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:yX(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===vX&&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};B2.exports=_X});var q2=C((FIe,j2)=>{"use strict";f();var U2=Hf(),IX=_2(),kX=N2(),NX=$2(),cn=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=cn.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(cn.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};cn.parse=(e,t={})=>NX(e,t);cn.stringify=(e,t={})=>U2(typeof e=="string"?cn.parse(e,t):e,t);cn.compile=(e,t={})=>(typeof e=="string"&&(e=cn.parse(e,t)),IX(e,t));cn.expand=(e,t={})=>{typeof e=="string"&&(e=cn.parse(e,t));let r=kX(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};cn.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?cn.compile(e,t):cn.expand(e,t);j2.exports=cn});var gu=C((RIe,V2)=>{"use strict";f();var FX=require("path"),Di="\\\\/",z2=`[^${Di}]`,is="\\.",OX="\\+",RX="\\?",Wf="\\/",MX="(?=.)",G2="[^/]",iv=`(?:${Wf}|$)`,H2=`(?:^|${Wf})`,sv=`${is}{1,2}${iv}`,LX=`(?!${is})`,BX=`(?!${H2}${sv})`,$X=`(?!${is}{0,1}${iv})`,UX=`(?!${sv})`,jX=`[^.${Wf}]`,qX=`${G2}*?`,K2={DOT_LITERAL:is,PLUS_LITERAL:OX,QMARK_LITERAL:RX,SLASH_LITERAL:Wf,ONE_CHAR:MX,QMARK:G2,END_ANCHOR:iv,DOTS_SLASH:sv,NO_DOT:LX,NO_DOTS:BX,NO_DOT_SLASH:$X,NO_DOTS_SLASH:UX,QMARK_NO_DOT:jX,STAR:qX,START_ANCHOR:H2},zX={...K2,SLASH_LITERAL:`[${Di}]`,QMARK:z2,STAR:`${z2}*?`,DOTS_SLASH:`${is}{1,2}(?:[${Di}]|$)`,NO_DOT:`(?!${is})`,NO_DOTS:`(?!(?:^|[${Di}])${is}{1,2}(?:[${Di}]|$))`,NO_DOT_SLASH:`(?!${is}{0,1}(?:[${Di}]|$))`,NO_DOTS_SLASH:`(?!${is}{1,2}(?:[${Di}]|$))`,QMARK_NO_DOT:`[^.${Di}]`,START_ANCHOR:`(?:^|[${Di}])`,END_ANCHOR:`(?:[${Di}]|$)`},GX={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"};V2.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:GX,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:FX.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?zX:K2}}});var yu=C(Gr=>{"use strict";f();var HX=require("path"),KX=process.platform==="win32",{REGEX_BACKSLASH:VX,REGEX_REMOVE_BACKSLASH:WX,REGEX_SPECIAL_CHARS:JX,REGEX_SPECIAL_CHARS_GLOBAL:YX}=gu();Gr.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Gr.hasRegexChars=e=>JX.test(e);Gr.isRegexChar=e=>e.length===1&&Gr.hasRegexChars(e);Gr.escapeRegex=e=>e.replace(YX,"\\$1");Gr.toPosixSlashes=e=>e.replace(VX,"/");Gr.removeBackslashes=e=>e.replace(WX,t=>t==="\\"?"":t);Gr.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Gr.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:KX===!0||HX.sep==="\\";Gr.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Gr.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Gr.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Gr.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var tN=C(($Ie,eN)=>{"use strict";f();var W2=yu(),{CHAR_ASTERISK:ov,CHAR_AT:XX,CHAR_BACKWARD_SLASH:bu,CHAR_COMMA:QX,CHAR_DOT:av,CHAR_EXCLAMATION_MARK:cv,CHAR_FORWARD_SLASH:Z2,CHAR_LEFT_CURLY_BRACE:lv,CHAR_LEFT_PARENTHESES:uv,CHAR_LEFT_SQUARE_BRACKET:ZX,CHAR_PLUS:eQ,CHAR_QUESTION_MARK:J2,CHAR_RIGHT_CURLY_BRACE:tQ,CHAR_RIGHT_PARENTHESES:Y2,CHAR_RIGHT_SQUARE_BRACKET:rQ}=gu(),X2=e=>e===Z2||e===bu,Q2=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},nQ=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=e,l=-1,u=0,p=0,d=!1,h=!1,m=!1,g=!1,y=!1,b=!1,v=!1,E=!1,x=!1,w=!1,S=0,D,_,O={value:"",depth:0,isGlob:!1},P=()=>l>=n,T=()=>c.charCodeAt(l+1),V=()=>(D=_,c.charCodeAt(++l));for(;l<n;){_=V();let L;if(_===bu){v=O.backslashes=!0,_=V(),_===lv&&(b=!0);continue}if(b===!0||_===lv){for(S++;P()!==!0&&(_=V());){if(_===bu){v=O.backslashes=!0,V();continue}if(_===lv){S++;continue}if(b!==!0&&_===av&&(_=V())===av){if(d=O.isBrace=!0,m=O.isGlob=!0,w=!0,i===!0)continue;break}if(b!==!0&&_===QX){if(d=O.isBrace=!0,m=O.isGlob=!0,w=!0,i===!0)continue;break}if(_===tQ&&(S--,S===0)){b=!1,d=O.isBrace=!0,w=!0;break}}if(i===!0)continue;break}if(_===Z2){if(s.push(l),o.push(O),O={value:"",depth:0,isGlob:!1},w===!0)continue;if(D===av&&l===u+1){u+=2;continue}p=l+1;continue}if(r.noext!==!0&&(_===eQ||_===XX||_===ov||_===J2||_===cv)===!0&&T()===uv){if(m=O.isGlob=!0,g=O.isExtglob=!0,w=!0,_===cv&&l===u&&(x=!0),i===!0){for(;P()!==!0&&(_=V());){if(_===bu){v=O.backslashes=!0,_=V();continue}if(_===Y2){m=O.isGlob=!0,w=!0;break}}continue}break}if(_===ov){if(D===ov&&(y=O.isGlobstar=!0),m=O.isGlob=!0,w=!0,i===!0)continue;break}if(_===J2){if(m=O.isGlob=!0,w=!0,i===!0)continue;break}if(_===ZX){for(;P()!==!0&&(L=V());){if(L===bu){v=O.backslashes=!0,V();continue}if(L===rQ){h=O.isBracket=!0,m=O.isGlob=!0,w=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&_===cv&&l===u){E=O.negated=!0,u++;continue}if(r.noparen!==!0&&_===uv){if(m=O.isGlob=!0,i===!0){for(;P()!==!0&&(_=V());){if(_===uv){v=O.backslashes=!0,_=V();continue}if(_===Y2){w=!0;break}}continue}break}if(m===!0){if(w=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,m=!1);let X=c,te="",I="";u>0&&(te=c.slice(0,u),c=c.slice(u),p-=u),X&&m===!0&&p>0?(X=c.slice(0,p),I=c.slice(p)):m===!0?(X="",I=c):X=c,X&&X!==""&&X!=="/"&&X!==c&&X2(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),r.unescape===!0&&(I&&(I=W2.removeBackslashes(I)),X&&v===!0&&(X=W2.removeBackslashes(X)));let F={prefix:te,input:e,start:u,base:X,glob:I,isBrace:d,isBracket:h,isGlob:m,isExtglob:g,isGlobstar:y,negated:E,negatedExtglob:x};if(r.tokens===!0&&(F.maxDepth=0,X2(_)||o.push(O),F.tokens=o),r.parts===!0||r.tokens===!0){let L;for(let N=0;N<s.length;N++){let G=L?L+1:u,R=s[N],M=e.slice(G,R);r.tokens&&(N===0&&u!==0?(o[N].isPrefix=!0,o[N].value=te):o[N].value=M,Q2(o[N]),F.maxDepth+=o[N].depth),(N!==0||M!=="")&&a.push(M),L=R}if(L&&L+1<e.length){let N=e.slice(L+1);a.push(N),r.tokens&&(o[o.length-1].value=N,Q2(o[o.length-1]),F.maxDepth+=o[o.length-1].depth)}F.slashes=s,F.parts=a}return F};eN.exports=nQ});var iN=C((jIe,nN)=>{"use strict";f();var Jf=gu(),ln=yu(),{MAX_LENGTH:Yf,POSIX_REGEX_SOURCE:iQ,REGEX_NON_SPECIAL_CHARS:sQ,REGEX_SPECIAL_CHARS_BACKREF:oQ,REPLACEMENTS:rN}=Jf,aQ=(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=>ln.escapeRegex(i)).join("..")}return r},oc=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,pv=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rN[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(Yf,r.maxLength):Yf,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=ln.isWindows(t),l=Jf.globChars(c),u=Jf.extglobChars(l),{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:E,QMARK_NO_DOT:x,STAR:w,START_ANCHOR:S}=l,D=J=>`(${a}(?:(?!${S}${J.dot?g:p}).)*?)`,_=r.dot?"":y,O=r.dot?E:x,P=r.bash===!0?D(r):w;r.capture&&(P=`(${P})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let T={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=ln.removePrefix(e,T),i=e.length;let V=[],X=[],te=[],I=s,F,L=()=>T.index===i-1,N=T.peek=(J=1)=>e[T.index+J],G=T.advance=()=>e[++T.index]||"",R=()=>e.slice(T.index+1),M=(J="",Be=0)=>{T.consumed+=J,T.index+=Be},H=J=>{T.output+=J.output!=null?J.output:J.value,M(J.value)},W=()=>{let J=1;for(;N()==="!"&&(N(2)!=="("||N(3)==="?");)G(),T.start++,J++;return J%2===0?!1:(T.negated=!0,T.start++,!0)},fe=J=>{T[J]++,te.push(J)},ce=J=>{T[J]--,te.pop()},Q=J=>{if(I.type==="globstar"){let Be=T.braces>0&&(J.type==="comma"||J.type==="brace"),K=J.extglob===!0||V.length&&(J.type==="pipe"||J.type==="paren");J.type!=="slash"&&J.type!=="paren"&&!Be&&!K&&(T.output=T.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=P,T.output+=I.output)}if(V.length&&J.type!=="paren"&&(V[V.length-1].inner+=J.value),(J.value||J.output)&&H(J),I&&I.type==="text"&&J.type==="text"){I.value+=J.value,I.output=(I.output||"")+J.value;return}J.prev=I,o.push(J),I=J},St=(J,Be)=>{let K={...u[Be],conditions:1,inner:""};K.prev=I,K.parens=T.parens,K.output=T.output;let me=(r.capture?"(":"")+K.open;fe("parens"),Q({type:J,value:Be,output:T.output?"":m}),Q({type:"paren",extglob:!0,value:G(),output:me}),V.push(K)},nr=J=>{let Be=J.close+(r.capture?")":""),K;if(J.type==="negate"){let me=P;if(J.inner&&J.inner.length>1&&J.inner.includes("/")&&(me=D(r)),(me!==P||L()||/^\)+$/.test(R()))&&(Be=J.close=`)$))${me}`),J.inner.includes("*")&&(K=R())&&/^\.[^\\/.]+$/.test(K)){let ae=pv(K,{...t,fastpaths:!1}).output;Be=J.close=`)${ae})${me})`}J.prev.type==="bos"&&(T.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:F,output:Be}),ce("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let J=!1,Be=e.replace(oQ,(K,me,ae,ct,Xe,cr)=>ct==="\\"?(J=!0,K):ct==="?"?me?me+ct+(Xe?E.repeat(Xe.length):""):cr===0?O+(Xe?E.repeat(Xe.length):""):E.repeat(ae.length):ct==="."?p.repeat(ae.length):ct==="*"?me?me+ct+(Xe?P:""):P:me?K:`\\${K}`);return J===!0&&(r.unescape===!0?Be=Be.replace(/\\/g,""):Be=Be.replace(/\\+/g,K=>K.length%2===0?"\\\\":K?"\\":"")),Be===e&&r.contains===!0?(T.output=e,T):(T.output=ln.wrapOutput(Be,T,t),T)}for(;!L();){if(F=G(),F==="\0")continue;if(F==="\\"){let K=N();if(K==="/"&&r.bash!==!0||K==="."||K===";")continue;if(!K){F+="\\",Q({type:"text",value:F});continue}let me=/^\\+/.exec(R()),ae=0;if(me&&me[0].length>2&&(ae=me[0].length,T.index+=ae,ae%2!==0&&(F+="\\")),r.unescape===!0?F=G():F+=G(),T.brackets===0){Q({type:"text",value:F});continue}}if(T.brackets>0&&(F!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==!1&&F===":"){let K=I.value.slice(1);if(K.includes("[")&&(I.posix=!0,K.includes(":"))){let me=I.value.lastIndexOf("["),ae=I.value.slice(0,me),ct=I.value.slice(me+2),Xe=iQ[ct];if(Xe){I.value=ae+Xe,T.backtrack=!0,G(),!s.output&&o.indexOf(I)===1&&(s.output=m);continue}}}(F==="["&&N()!==":"||F==="-"&&N()==="]")&&(F=`\\${F}`),F==="]"&&(I.value==="["||I.value==="[^")&&(F=`\\${F}`),r.posix===!0&&F==="!"&&I.value==="["&&(F="^"),I.value+=F,H({value:F});continue}if(T.quotes===1&&F!=='"'){F=ln.escapeRegex(F),I.value+=F,H({value:F});continue}if(F==='"'){T.quotes=T.quotes===1?0:1,r.keepQuotes===!0&&Q({type:"text",value:F});continue}if(F==="("){fe("parens"),Q({type:"paren",value:F});continue}if(F===")"){if(T.parens===0&&r.strictBrackets===!0)throw new SyntaxError(oc("opening","("));let K=V[V.length-1];if(K&&T.parens===K.parens+1){nr(V.pop());continue}Q({type:"paren",value:F,output:T.parens?")":"\\)"}),ce("parens");continue}if(F==="["){if(r.nobracket===!0||!R().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(oc("closing","]"));F=`\\${F}`}else fe("brackets");Q({type:"bracket",value:F});continue}if(F==="]"){if(r.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){Q({type:"text",value:F,output:`\\${F}`});continue}if(T.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(oc("opening","["));Q({type:"text",value:F,output:`\\${F}`});continue}ce("brackets");let K=I.value.slice(1);if(I.posix!==!0&&K[0]==="^"&&!K.includes("/")&&(F=`/${F}`),I.value+=F,H({value:F}),r.literalBrackets===!1||ln.hasRegexChars(K))continue;let me=ln.escapeRegex(I.value);if(T.output=T.output.slice(0,-I.value.length),r.literalBrackets===!0){T.output+=me,I.value=me;continue}I.value=`(${a}${me}|${I.value})`,T.output+=I.value;continue}if(F==="{"&&r.nobrace!==!0){fe("braces");let K={type:"brace",value:F,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};X.push(K),Q(K);continue}if(F==="}"){let K=X[X.length-1];if(r.nobrace===!0||!K){Q({type:"text",value:F,output:F});continue}let me=")";if(K.dots===!0){let ae=o.slice(),ct=[];for(let Xe=ae.length-1;Xe>=0&&(o.pop(),ae[Xe].type!=="brace");Xe--)ae[Xe].type!=="dots"&&ct.unshift(ae[Xe].value);me=aQ(ct,r),T.backtrack=!0}if(K.comma!==!0&&K.dots!==!0){let ae=T.output.slice(0,K.outputIndex),ct=T.tokens.slice(K.tokensIndex);K.value=K.output="\\{",F=me="\\}",T.output=ae;for(let Xe of ct)T.output+=Xe.output||Xe.value}Q({type:"brace",value:F,output:me}),ce("braces"),X.pop();continue}if(F==="|"){V.length>0&&V[V.length-1].conditions++,Q({type:"text",value:F});continue}if(F===","){let K=F,me=X[X.length-1];me&&te[te.length-1]==="braces"&&(me.comma=!0,K="|"),Q({type:"comma",value:F,output:K});continue}if(F==="/"){if(I.type==="dot"&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",o.pop(),I=s;continue}Q({type:"slash",value:F,output:h});continue}if(F==="."){if(T.braces>0&&I.type==="dot"){I.value==="."&&(I.output=p);let K=X[X.length-1];I.type="dots",I.output+=F,I.value+=F,K.dots=!0;continue}if(T.braces+T.parens===0&&I.type!=="bos"&&I.type!=="slash"){Q({type:"text",value:F,output:p});continue}Q({type:"dot",value:F,output:p});continue}if(F==="?"){if(!(I&&I.value==="(")&&r.noextglob!==!0&&N()==="("&&N(2)!=="?"){St("qmark",F);continue}if(I&&I.type==="paren"){let me=N(),ae=F;if(me==="<"&&!ln.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(I.value==="("&&!/[!=<:]/.test(me)||me==="<"&&!/<([!=]|\w+>)/.test(R()))&&(ae=`\\${F}`),Q({type:"text",value:F,output:ae});continue}if(r.dot!==!0&&(I.type==="slash"||I.type==="bos")){Q({type:"qmark",value:F,output:x});continue}Q({type:"qmark",value:F,output:E});continue}if(F==="!"){if(r.noextglob!==!0&&N()==="("&&(N(2)!=="?"||!/[!=<:]/.test(N(3)))){St("negate",F);continue}if(r.nonegate!==!0&&T.index===0){W();continue}}if(F==="+"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){St("plus",F);continue}if(I&&I.value==="("||r.regex===!1){Q({type:"plus",value:F,output:d});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||T.parens>0){Q({type:"plus",value:F});continue}Q({type:"plus",value:d});continue}if(F==="@"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){Q({type:"at",extglob:!0,value:F,output:""});continue}Q({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);let K=sQ.exec(R());K&&(F+=K[0],T.index+=K[0].length),Q({type:"text",value:F});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=F,I.output=P,T.backtrack=!0,T.globstar=!0,M(F);continue}let J=R();if(r.noextglob!==!0&&/^\([^?]/.test(J)){St("star",F);continue}if(I.type==="star"){if(r.noglobstar===!0){M(F);continue}let K=I.prev,me=K.prev,ae=K.type==="slash"||K.type==="bos",ct=me&&(me.type==="star"||me.type==="globstar");if(r.bash===!0&&(!ae||J[0]&&J[0]!=="/")){Q({type:"star",value:F,output:""});continue}let Xe=T.braces>0&&(K.type==="comma"||K.type==="brace"),cr=V.length&&(K.type==="pipe"||K.type==="paren");if(!ae&&K.type!=="paren"&&!Xe&&!cr){Q({type:"star",value:F,output:""});continue}for(;J.slice(0,3)==="/**";){let da=e[T.index+4];if(da&&da!=="/")break;J=J.slice(3),M("/**",3)}if(K.type==="bos"&&L()){I.type="globstar",I.value+=F,I.output=D(r),T.output=I.output,T.globstar=!0,M(F);continue}if(K.type==="slash"&&K.prev.type!=="bos"&&!ct&&L()){T.output=T.output.slice(0,-(K.output+I.output).length),K.output=`(?:${K.output}`,I.type="globstar",I.output=D(r)+(r.strictSlashes?")":"|$)"),I.value+=F,T.globstar=!0,T.output+=K.output+I.output,M(F);continue}if(K.type==="slash"&&K.prev.type!=="bos"&&J[0]==="/"){let da=J[1]!==void 0?"|$":"";T.output=T.output.slice(0,-(K.output+I.output).length),K.output=`(?:${K.output}`,I.type="globstar",I.output=`${D(r)}${h}|${h}${da})`,I.value+=F,T.output+=K.output+I.output,T.globstar=!0,M(F+G()),Q({type:"slash",value:"/",output:""});continue}if(K.type==="bos"&&J[0]==="/"){I.type="globstar",I.value+=F,I.output=`(?:^|${h}|${D(r)}${h})`,T.output=I.output,T.globstar=!0,M(F+G()),Q({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-I.output.length),I.type="globstar",I.output=D(r),I.value+=F,T.output+=I.output,T.globstar=!0,M(F);continue}let Be={type:"star",value:F,output:P};if(r.bash===!0){Be.output=".*?",(I.type==="bos"||I.type==="slash")&&(Be.output=_+Be.output),Q(Be);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===!0){Be.output=F,Q(Be);continue}(T.index===T.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(T.output+=b,I.output+=b):r.dot===!0?(T.output+=v,I.output+=v):(T.output+=_,I.output+=_),N()!=="*"&&(T.output+=m,I.output+=m)),Q(Be)}for(;T.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(oc("closing","]"));T.output=ln.escapeLast(T.output,"["),ce("brackets")}for(;T.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(oc("closing",")"));T.output=ln.escapeLast(T.output,"("),ce("parens")}for(;T.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(oc("closing","}"));T.output=ln.escapeLast(T.output,"{"),ce("braces")}if(r.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&Q({type:"maybe_slash",value:"",output:`${h}?`}),T.backtrack===!0){T.output="";for(let J of T.tokens)T.output+=J.output!=null?J.output:J.value,J.suffix&&(T.output+=J.suffix)}return T};pv.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(Yf,r.maxLength):Yf,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=rN[e]||e;let s=ln.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=Jf.globChars(s),g=r.dot?p:u,y=r.dot?d:u,b=r.capture?"":"?:",v={negated:!1,prefix:""},E=r.bash===!0?".*?":h;r.capture&&(E=`(${E})`);let x=_=>_.noglobstar===!0?E:`(${b}(?:(?!${m}${_.dot?l:o}).)*?)`,w=_=>{switch(_){case"*":return`${g}${c}${E}`;case".*":return`${o}${c}${E}`;case"*.*":return`${g}${E}${o}${c}${E}`;case"*/*":return`${g}${E}${a}${c}${y}${E}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${E}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${E}${o}${c}${E}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${E}`;default:{let O=/^(.*?)\.(\w+)$/.exec(_);if(!O)return;let P=w(O[1]);return P?P+o+O[2]:void 0}}},S=ln.removePrefix(e,v),D=w(S);return D&&r.strictSlashes!==!0&&(D+=`${a}?`),D};nN.exports=pv});var oN=C((zIe,sN)=>{"use strict";f();var cQ=require("path"),lQ=tN(),dv=iN(),fv=yu(),uQ=gu(),pQ=e=>e&&typeof e=="object"&&!Array.isArray(e),Ft=(e,t,r=!1)=>{if(Array.isArray(e)){let u=e.map(d=>Ft(d,t,r));return d=>{for(let h of u){let m=h(d);if(m)return m}return!1}}let n=pQ(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=fv.isWindows(t),o=n?Ft.compileRe(e,t):Ft.makeRe(e,t,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let u={...t,ignore:null,onMatch:null,onResult:null};c=Ft(i.ignore,u,r)}let l=(u,p=!1)=>{let{isMatch:d,match:h,output:m}=Ft.test(u,o,t,{glob:e,posix:s}),g={glob:e,state:a,regex:o,posix:s,input:u,output:m,match:h,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(u)?(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&&(l.state=a),l};Ft.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?fv.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=Ft.matchBase(e,t,r,i):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};Ft.matchBase=(e,t,r,n=fv.isWindows(r))=>(t instanceof RegExp?t:Ft.makeRe(t,r)).test(cQ.basename(e));Ft.isMatch=(e,t,r)=>Ft(t,r)(e);Ft.parse=(e,t)=>Array.isArray(e)?e.map(r=>Ft.parse(r,t)):dv(e,{...t,fastpaths:!1});Ft.scan=(e,t)=>lQ(e,t);Ft.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=Ft.toRegex(a,t);return n===!0&&(c.state=e),c};Ft.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=dv.fastpaths(e,t)),i.output||(i=dv(e,t)),Ft.compileRe(i,t,r,n)};Ft.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/$^/}};Ft.constants=uQ;sN.exports=Ft});var cN=C((HIe,aN)=>{"use strict";f();aN.exports=oN()});var Xf=C((VIe,fN)=>{"use strict";f();var uN=require("util"),pN=q2(),Ti=cN(),mv=yu(),lN=e=>e===""||e==="./",dN=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},gt=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=u=>{s.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<t.length;u++){let p=Ti(String(t[u]),{...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 l=(o===t.length?[...s]:[...i]).filter(u=>!n.has(u));if(r&&l.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(u=>u.replace(/\\/g,"")):t}return l};gt.match=gt;gt.matcher=(e,t)=>Ti(e,t);gt.isMatch=(e,t,r)=>Ti(t,r)(e);gt.any=gt.isMatch;gt.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(gt(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};gt.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${uN.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>gt.contains(e,n,r));if(typeof t=="string"){if(lN(e)||lN(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return gt.isMatch(e,t,{...r,contains:!0})};gt.matchKeys=(e,t,r)=>{if(!mv.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=gt(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};gt.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ti(String(i),r);if(n.some(o=>s(o)))return!0}return!1};gt.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ti(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};gt.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${uN.inspect(e)}"`);return[].concat(t).every(n=>Ti(n,r)(e))};gt.capture=(e,t,r)=>{let n=mv.isWindows(r),s=Ti.makeRe(String(e),{...r,capture:!0}).exec(n?mv.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};gt.makeRe=(...e)=>Ti.makeRe(...e);gt.scan=(...e)=>Ti.scan(...e);gt.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of pN(String(n),t))r.push(Ti.parse(i,t));return r};gt.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!dN(e)?[e]:pN(e,t)};gt.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return gt.braces(e,{...t,expand:!0})};gt.hasBraces=dN;fN.exports=gt});var CN=C(pe=>{"use strict";f();Object.defineProperty(pe,"__esModule",{value:!0});pe.isAbsolute=pe.partitionAbsoluteAndRelative=pe.removeDuplicateSlashes=pe.matchAny=pe.convertPatternsToRe=pe.makeRe=pe.getPatternParts=pe.expandBraceExpansion=pe.expandPatternsWithBraceExpansion=pe.isAffectDepthOfReadingPattern=pe.endsWithSlashGlobStar=pe.hasGlobStar=pe.getBaseDirectory=pe.isPatternRelatedToParentDirectory=pe.getPatternsOutsideCurrentDirectory=pe.getPatternsInsideCurrentDirectory=pe.getPositivePatterns=pe.getNegativePatterns=pe.isPositivePattern=pe.isNegativePattern=pe.convertToNegativePattern=pe.convertToPositivePattern=pe.isDynamicPattern=pe.isStaticPattern=void 0;var mN=require("path"),dQ=o2(),hv=Xf(),hN="**",fQ="\\",mQ=/[*?]|^!/,hQ=/\[[^[]*]/,gQ=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,yQ=/[!*+?@]\([^(]*\)/,bQ=/,|\.\./,xQ=/(?!^)\/{2,}/g;function gN(e,t={}){return!yN(e,t)}pe.isStaticPattern=gN;function yN(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(fQ)||mQ.test(e)||hQ.test(e)||gQ.test(e)||t.extglob!==!1&&yQ.test(e)||t.braceExpansion!==!1&&vQ(e))}pe.isDynamicPattern=yN;function vQ(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 bQ.test(n)}function wQ(e){return Qf(e)?e.slice(1):e}pe.convertToPositivePattern=wQ;function EQ(e){return"!"+e}pe.convertToNegativePattern=EQ;function Qf(e){return e.startsWith("!")&&e[1]!=="("}pe.isNegativePattern=Qf;function bN(e){return!Qf(e)}pe.isPositivePattern=bN;function CQ(e){return e.filter(Qf)}pe.getNegativePatterns=CQ;function SQ(e){return e.filter(bN)}pe.getPositivePatterns=SQ;function DQ(e){return e.filter(t=>!gv(t))}pe.getPatternsInsideCurrentDirectory=DQ;function TQ(e){return e.filter(gv)}pe.getPatternsOutsideCurrentDirectory=TQ;function gv(e){return e.startsWith("..")||e.startsWith("./..")}pe.isPatternRelatedToParentDirectory=gv;function AQ(e){return dQ(e,{flipBackslashes:!1})}pe.getBaseDirectory=AQ;function PQ(e){return e.includes(hN)}pe.hasGlobStar=PQ;function xN(e){return e.endsWith("/"+hN)}pe.endsWithSlashGlobStar=xN;function _Q(e){let t=mN.basename(e);return xN(e)||gN(t)}pe.isAffectDepthOfReadingPattern=_Q;function IQ(e){return e.reduce((t,r)=>t.concat(vN(r)),[])}pe.expandPatternsWithBraceExpansion=IQ;function vN(e){let t=hv.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}pe.expandBraceExpansion=vN;function kQ(e,t){let{parts:r}=hv.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}pe.getPatternParts=kQ;function wN(e,t){return hv.makeRe(e,t)}pe.makeRe=wN;function NQ(e,t){return e.map(r=>wN(r,t))}pe.convertPatternsToRe=NQ;function FQ(e,t){return t.some(r=>r.test(e))}pe.matchAny=FQ;function OQ(e){return e.replace(xQ,"/")}pe.removeDuplicateSlashes=OQ;function RQ(e){let t=[],r=[];for(let n of e)EN(n)?t.push(n):r.push(n);return[t,r]}pe.partitionAbsoluteAndRelative=RQ;function EN(e){return mN.isAbsolute(e)}pe.isAbsolute=EN});var AN=C((XIe,TN)=>{"use strict";f();var MQ=require("stream"),SN=MQ.PassThrough,LQ=Array.prototype.slice;TN.exports=BQ;function BQ(){let e=[],t=LQ.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=SN(n);function a(){for(let u=0,p=arguments.length;u<p;u++)e.push(DN(arguments[u],n));return c(),this}function c(){if(r)return;r=!0;let u=e.shift();if(!u){process.nextTick(l);return}Array.isArray(u)||(u=[u]);let p=u.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<u.length;m++)h(u[m]);d()}function l(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),o}function DN(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=DN(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(SN(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var _N=C(Zf=>{"use strict";f();Object.defineProperty(Zf,"__esModule",{value:!0});Zf.merge=void 0;var $Q=AN();function UQ(e){let t=$Q(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>PN(e)),t.once("end",()=>PN(e)),t}Zf.merge=UQ;function PN(e){e.forEach(t=>t.emit("close"))}});var IN=C(ac=>{"use strict";f();Object.defineProperty(ac,"__esModule",{value:!0});ac.isEmpty=ac.isString=void 0;function jQ(e){return typeof e=="string"}ac.isString=jQ;function qQ(e){return e===""}ac.isEmpty=qQ});var ss=C(yr=>{"use strict";f();Object.defineProperty(yr,"__esModule",{value:!0});yr.string=yr.stream=yr.pattern=yr.path=yr.fs=yr.errno=yr.array=void 0;var zQ=Wk();yr.array=zQ;var GQ=Jk();yr.errno=GQ;var HQ=Yk();yr.fs=HQ;var KQ=e2();yr.path=KQ;var VQ=CN();yr.pattern=VQ;var WQ=_N();yr.stream=WQ;var JQ=IN();yr.string=JQ});var ON=C(br=>{"use strict";f();Object.defineProperty(br,"__esModule",{value:!0});br.convertPatternGroupToTask=br.convertPatternGroupsToTasks=br.groupPatternsByBaseDirectory=br.getNegativePatternsAsPositive=br.getPositivePatterns=br.convertPatternsToTasks=br.generate=void 0;var Xn=ss();function YQ(e,t){let r=kN(e,t),n=kN(t.ignore,t),i=NN(r),s=FN(r,n),o=i.filter(u=>Xn.pattern.isStaticPattern(u,t)),a=i.filter(u=>Xn.pattern.isDynamicPattern(u,t)),c=yv(o,s,!1),l=yv(a,s,!0);return c.concat(l)}br.generate=YQ;function kN(e,t){let r=e;return t.braceExpansion&&(r=Xn.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>Xn.pattern.removeDuplicateSlashes(n))}function yv(e,t,r){let n=[],i=Xn.pattern.getPatternsOutsideCurrentDirectory(e),s=Xn.pattern.getPatternsInsideCurrentDirectory(e),o=bv(i),a=bv(s);return n.push(...xv(o,t,r)),"."in a?n.push(vv(".",s,t,r)):n.push(...xv(a,t,r)),n}br.convertPatternsToTasks=yv;function NN(e){return Xn.pattern.getPositivePatterns(e)}br.getPositivePatterns=NN;function FN(e,t){return Xn.pattern.getNegativePatterns(e).concat(t).map(Xn.pattern.convertToPositivePattern)}br.getNegativePatternsAsPositive=FN;function bv(e){let t={};return e.reduce((r,n)=>{let i=Xn.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},t)}br.groupPatternsByBaseDirectory=bv;function xv(e,t,r){return Object.keys(e).map(n=>vv(n,e[n],t,r))}br.convertPatternGroupsToTasks=xv;function vv(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(Xn.pattern.convertToNegativePattern))}}br.convertPatternGroupToTask=vv});var MN=C(em=>{"use strict";f();Object.defineProperty(em,"__esModule",{value:!0});em.read=void 0;function XQ(e,t,r){t.fs.lstat(e,(n,i)=>{if(n!==null){RN(r,n);return}if(!i.isSymbolicLink()||!t.followSymbolicLink){wv(r,i);return}t.fs.stat(e,(s,o)=>{if(s!==null){if(t.throwErrorOnBrokenSymbolicLink){RN(r,s);return}wv(r,i);return}t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),wv(r,o)})})}em.read=XQ;function RN(e,t){e(t)}function wv(e,t){e(null,t)}});var LN=C(tm=>{"use strict";f();Object.defineProperty(tm,"__esModule",{value:!0});tm.read=void 0;function QQ(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}}tm.read=QQ});var BN=C(Rs=>{"use strict";f();Object.defineProperty(Rs,"__esModule",{value:!0});Rs.createFileSystemAdapter=Rs.FILE_SYSTEM_ADAPTER=void 0;var rm=require("fs");Rs.FILE_SYSTEM_ADAPTER={lstat:rm.lstat,stat:rm.stat,lstatSync:rm.lstatSync,statSync:rm.statSync};function ZQ(e){return e===void 0?Rs.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Rs.FILE_SYSTEM_ADAPTER),e)}Rs.createFileSystemAdapter=ZQ});var $N=C(Cv=>{"use strict";f();Object.defineProperty(Cv,"__esModule",{value:!0});var eZ=BN(),Ev=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=eZ.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}};Cv.default=Ev});var Mo=C(Ms=>{"use strict";f();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.statSync=Ms.stat=Ms.Settings=void 0;var UN=MN(),tZ=LN(),Sv=$N();Ms.Settings=Sv.default;function rZ(e,t,r){if(typeof t=="function"){UN.read(e,Dv(),t);return}UN.read(e,Dv(t),r)}Ms.stat=rZ;function nZ(e,t){let r=Dv(t);return tZ.read(e,r)}Ms.statSync=nZ;function Dv(e={}){return e instanceof Sv.default?e:new Sv.default(e)}});var zN=C((yke,qN)=>{f();var jN;qN.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(jN||(jN=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var HN=C((xke,GN)=>{f();GN.exports=sZ;var iZ=zN();function sZ(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 l(){t&&t(c,r),t=null}s?iZ(l):l()}function a(c,l,u){r[c]=u,(--n===0||l)&&o(l)}n?i?i.forEach(function(c){e[c](function(l,u){a(c,l,u)})}):e.forEach(function(c,l){c(function(u,p){a(l,u,p)})}):o(null),s=!1}});var Tv=C(im=>{"use strict";f();Object.defineProperty(im,"__esModule",{value:!0});im.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var nm=process.versions.node.split(".");if(nm[0]===void 0||nm[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var KN=Number.parseInt(nm[0],10),oZ=Number.parseInt(nm[1],10),VN=10,aZ=10,cZ=KN>VN,lZ=KN===VN&&oZ>=aZ;im.IS_SUPPORT_READDIR_WITH_FILE_TYPES=cZ||lZ});var WN=C(sm=>{"use strict";f();Object.defineProperty(sm,"__esModule",{value:!0});sm.createDirentFromStats=void 0;var Av=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 uZ(e,t){return new Av(e,t)}sm.createDirentFromStats=uZ});var Pv=C(om=>{"use strict";f();Object.defineProperty(om,"__esModule",{value:!0});om.fs=void 0;var pZ=WN();om.fs=pZ});var _v=C(am=>{"use strict";f();Object.defineProperty(am,"__esModule",{value:!0});am.joinPathSegments=void 0;function dZ(e,t,r){return e.endsWith(r)?e+t:e+r+t}am.joinPathSegments=dZ});var eF=C(Ls=>{"use strict";f();Object.defineProperty(Ls,"__esModule",{value:!0});Ls.readdir=Ls.readdirWithFileTypes=Ls.read=void 0;var fZ=Mo(),JN=HN(),mZ=Tv(),YN=Pv(),XN=_v();function hZ(e,t,r){if(!t.stats&&mZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES){QN(e,t,r);return}ZN(e,t,r)}Ls.read=hZ;function QN(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,i)=>{if(n!==null){cm(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:XN.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){Iv(r,s);return}let o=s.map(a=>gZ(a,t));JN(o,(a,c)=>{if(a!==null){cm(r,a);return}Iv(r,c)})})}Ls.readdirWithFileTypes=QN;function gZ(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=YN.fs.createDirentFromStats(e.name,i),r(null,e)})}}function ZN(e,t,r){t.fs.readdir(e,(n,i)=>{if(n!==null){cm(r,n);return}let s=i.map(o=>{let a=XN.joinPathSegments(e,o,t.pathSegmentSeparator);return c=>{fZ.stat(a,t.fsStatSettings,(l,u)=>{if(l!==null){c(l);return}let p={name:o,path:a,dirent:YN.fs.createDirentFromStats(o,u)};t.stats&&(p.stats=u),c(null,p)})}});JN(s,(o,a)=>{if(o!==null){cm(r,o);return}Iv(r,a)})})}Ls.readdir=ZN;function cm(e,t){e(t)}function Iv(e,t){e(null,t)}});var sF=C(Bs=>{"use strict";f();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.readdir=Bs.readdirWithFileTypes=Bs.read=void 0;var yZ=Mo(),bZ=Tv(),tF=Pv(),rF=_v();function xZ(e,t){return!t.stats&&bZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES?nF(e,t):iF(e,t)}Bs.read=xZ;function nF(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:rF.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let s=t.fs.statSync(i.path);i.dirent=tF.fs.createDirentFromStats(i.name,s)}catch(s){if(t.throwErrorOnBrokenSymbolicLink)throw s}return i})}Bs.readdirWithFileTypes=nF;function iF(e,t){return t.fs.readdirSync(e).map(n=>{let i=rF.joinPathSegments(e,n,t.pathSegmentSeparator),s=yZ.statSync(i,t.fsStatSettings),o={name:n,path:i,dirent:tF.fs.createDirentFromStats(n,s)};return t.stats&&(o.stats=s),o})}Bs.readdir=iF});var oF=C($s=>{"use strict";f();Object.defineProperty($s,"__esModule",{value:!0});$s.createFileSystemAdapter=$s.FILE_SYSTEM_ADAPTER=void 0;var cc=require("fs");$s.FILE_SYSTEM_ADAPTER={lstat:cc.lstat,stat:cc.stat,lstatSync:cc.lstatSync,statSync:cc.statSync,readdir:cc.readdir,readdirSync:cc.readdirSync};function vZ(e){return e===void 0?$s.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},$s.FILE_SYSTEM_ADAPTER),e)}$s.createFileSystemAdapter=vZ});var aF=C(Nv=>{"use strict";f();Object.defineProperty(Nv,"__esModule",{value:!0});var wZ=require("path"),EZ=Mo(),CZ=oF(),kv=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=CZ.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,wZ.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new EZ.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Nv.default=kv});var lm=C(Us=>{"use strict";f();Object.defineProperty(Us,"__esModule",{value:!0});Us.Settings=Us.scandirSync=Us.scandir=void 0;var cF=eF(),SZ=sF(),Fv=aF();Us.Settings=Fv.default;function DZ(e,t,r){if(typeof t=="function"){cF.read(e,Ov(),t);return}cF.read(e,Ov(t),r)}Us.scandir=DZ;function TZ(e,t){let r=Ov(t);return SZ.read(e,r)}Us.scandirSync=TZ;function Ov(e={}){return e instanceof Fv.default?e:new Fv.default(e)}});var uF=C(($ke,lF)=>{"use strict";f();function AZ(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}}lF.exports=AZ});var dF=C((jke,Rv)=>{"use strict";f();var PZ=uF();function pF(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=PZ(_Z),i=null,s=null,o=0,a=null,c={push:g,drain:Tn,saturated:Tn,pause:u,paused:!1,get concurrency(){return r},set concurrency(w){if(!(w>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=w,!c.paused)for(;i&&o<r;)o++,b()},running:l,resume:h,idle:m,length:p,getQueue:d,unshift:y,empty:Tn,kill:v,killAndDrain:E,error:x};return c;function l(){return o}function u(){c.paused=!0}function p(){for(var w=i,S=0;w;)w=w.next,S++;return S}function d(){for(var w=i,S=[];w;)S.push(w.value),w=w.next;return S}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(w,S){var D=n.get();D.context=e,D.release=b,D.value=w,D.callback=S||Tn,D.errorHandler=a,o>=r||c.paused?s?(s.next=D,s=D):(i=D,s=D,c.saturated()):(o++,t.call(e,D.value,D.worked))}function y(w,S){var D=n.get();D.context=e,D.release=b,D.value=w,D.callback=S||Tn,D.errorHandler=a,o>=r||c.paused?i?(D.next=i,i=D):(i=D,s=D,c.saturated()):(o++,t.call(e,D.value,D.worked))}function b(w){w&&n.release(w);var S=i;S&&o<=r?c.paused?o--:(s===i&&(s=null),i=S.next,S.next=null,t.call(e,S.value,S.worked),s===null&&c.empty()):--o===0&&c.drain()}function v(){i=null,s=null,c.drain=Tn}function E(){i=null,s=null,c.drain(),c.drain=Tn}function x(w){a=w}}function Tn(){}function _Z(){this.value=null,this.callback=Tn,this.next=null,this.release=Tn,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=Tn,e.errorHandler&&s(r,o),i.call(e.context,r,n),e.release(e)}}function IZ(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(u,p){t.call(this,u).then(function(d){p(null,d)},p)}var i=pF(e,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=l,i;function a(u){var p=new Promise(function(d,h){s(u,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Tn),p}function c(u){var p=new Promise(function(d,h){o(u,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Tn),p}function l(){var u=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 u}}Rv.exports=pF;Rv.exports.promise=IZ});var um=C(Ai=>{"use strict";f();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.joinPathSegments=Ai.replacePathSegmentSeparator=Ai.isAppliedFilter=Ai.isFatalError=void 0;function kZ(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Ai.isFatalError=kZ;function NZ(e,t){return e===null||e(t)}Ai.isAppliedFilter=NZ;function FZ(e,t){return e.split(/[/\\]/).join(t)}Ai.replacePathSegmentSeparator=FZ;function OZ(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Ai.joinPathSegments=OZ});var Bv=C(Lv=>{"use strict";f();Object.defineProperty(Lv,"__esModule",{value:!0});var RZ=um(),Mv=class{constructor(t,r){this._root=t,this._settings=r,this._root=RZ.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Lv.default=Mv});var jv=C(Uv=>{"use strict";f();Object.defineProperty(Uv,"__esModule",{value:!0});var MZ=require("events"),LZ=lm(),BZ=dF(),pm=um(),$Z=Bv(),$v=class extends $Z.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=LZ.scandir,this._emitter=new MZ.EventEmitter,this._queue=BZ(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||!pm.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=pm.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),pm.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&pm.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Uv.default=$v});var fF=C(zv=>{"use strict";f();Object.defineProperty(zv,"__esModule",{value:!0});var UZ=jv(),qv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new UZ.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{jZ(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{qZ(t,this._storage)}),this._reader.read()}};zv.default=qv;function jZ(e,t){e(t)}function qZ(e,t){e(null,t)}});var mF=C(Hv=>{"use strict";f();Object.defineProperty(Hv,"__esModule",{value:!0});var zZ=require("stream"),GZ=jv(),Gv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new GZ.default(this._root,this._settings),this._stream=new zZ.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}};Hv.default=Gv});var hF=C(Vv=>{"use strict";f();Object.defineProperty(Vv,"__esModule",{value:!0});var HZ=lm(),dm=um(),KZ=Bv(),Kv=class extends KZ.default{constructor(){super(...arguments),this._scandir=HZ.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(dm.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=dm.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),dm.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&dm.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};Vv.default=Kv});var gF=C(Jv=>{"use strict";f();Object.defineProperty(Jv,"__esModule",{value:!0});var VZ=hF(),Wv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new VZ.default(this._root,this._settings)}read(){return this._reader.read()}};Jv.default=Wv});var yF=C(Xv=>{"use strict";f();Object.defineProperty(Xv,"__esModule",{value:!0});var WZ=require("path"),JZ=lm(),Yv=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,WZ.sep),this.fsScandirSettings=new JZ.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}};Xv.default=Yv});var mm=C(Pi=>{"use strict";f();Object.defineProperty(Pi,"__esModule",{value:!0});Pi.Settings=Pi.walkStream=Pi.walkSync=Pi.walk=void 0;var bF=fF(),YZ=mF(),XZ=gF(),Qv=yF();Pi.Settings=Qv.default;function QZ(e,t,r){if(typeof t=="function"){new bF.default(e,fm()).read(t);return}new bF.default(e,fm(t)).read(r)}Pi.walk=QZ;function ZZ(e,t){let r=fm(t);return new XZ.default(e,r).read()}Pi.walkSync=ZZ;function eee(e,t){let r=fm(t);return new YZ.default(e,r).read()}Pi.walkStream=eee;function fm(e={}){return e instanceof Qv.default?e:new Qv.default(e)}});var hm=C(e0=>{"use strict";f();Object.defineProperty(e0,"__esModule",{value:!0});var tee=require("path"),ree=Mo(),xF=ss(),Zv=class{constructor(t){this._settings=t,this._fsStatSettings=new ree.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return tee.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:xF.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!xF.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};e0.default=Zv});var n0=C(r0=>{"use strict";f();Object.defineProperty(r0,"__esModule",{value:!0});var nee=require("stream"),iee=Mo(),see=mm(),oee=hm(),t0=class extends oee.default{constructor(){super(...arguments),this._walkStream=see.walkStream,this._stat=iee.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),i=new nee.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))})}};r0.default=t0});var vF=C(s0=>{"use strict";f();Object.defineProperty(s0,"__esModule",{value:!0});var aee=mm(),cee=hm(),lee=n0(),i0=class extends cee.default{constructor(){super(...arguments),this._walkAsync=aee.walk,this._readerStream=new lee.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))})}};s0.default=i0});var wF=C(a0=>{"use strict";f();Object.defineProperty(a0,"__esModule",{value:!0});var xu=ss(),o0=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 xu.pattern.getPatternParts(t,this._micromatchOptions).map(n=>xu.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:xu.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return xu.array.splitWhen(t,r=>r.dynamic&&xu.pattern.hasGlobStar(r.pattern))}};a0.default=o0});var EF=C(l0=>{"use strict";f();Object.defineProperty(l0,"__esModule",{value:!0});var uee=wF(),c0=class extends uee.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,l)=>{let u=s.segments[l];return!!(u.dynamic&&u.patternRe.test(c)||!u.dynamic&&u.pattern===c)}))return!0}return!1}};l0.default=c0});var CF=C(p0=>{"use strict";f();Object.defineProperty(p0,"__esModule",{value:!0});var gm=ss(),pee=EF(),u0=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 pee.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(gm.pattern.isAffectDepthOfReadingPattern);return gm.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,i){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=gm.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!gm.pattern.matchAny(t,r)}};p0.default=u0});var SF=C(f0=>{"use strict";f();Object.defineProperty(f0,"__esModule",{value:!0});var js=ss(),d0=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let[n,i]=js.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:js.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:js.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:js.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(t,r){let n=js.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=js.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(t,r,n){if(r.length===0)return!1;let i=js.pattern.matchAny(t,r);return!i&&n?js.pattern.matchAny(t+"/",r):i}};f0.default=d0});var DF=C(h0=>{"use strict";f();Object.defineProperty(h0,"__esModule",{value:!0});var dee=ss(),m0=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return dee.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};h0.default=m0});var AF=C(y0=>{"use strict";f();Object.defineProperty(y0,"__esModule",{value:!0});var TF=ss(),g0=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=TF.path.makeAbsolute(this._settings.cwd,r),r=TF.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};y0.default=g0});var ym=C(x0=>{"use strict";f();Object.defineProperty(x0,"__esModule",{value:!0});var fee=require("path"),mee=CF(),hee=SF(),gee=DF(),yee=AF(),b0=class{constructor(t){this._settings=t,this.errorFilter=new gee.default(this._settings),this.entryFilter=new hee.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new mee.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new yee.default(this._settings)}_getRootDirectory(t){return fee.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}}};x0.default=b0});var PF=C(w0=>{"use strict";f();Object.defineProperty(w0,"__esModule",{value:!0});var bee=vF(),xee=ym(),v0=class extends xee.default{constructor(){super(...arguments),this._reader=new bee.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)}};w0.default=v0});var _F=C(C0=>{"use strict";f();Object.defineProperty(C0,"__esModule",{value:!0});var vee=require("stream"),wee=n0(),Eee=ym(),E0=class extends Eee.default{constructor(){super(...arguments),this._reader=new wee.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),i=this.api(r,t,n),s=new vee.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)}};C0.default=E0});var IF=C(D0=>{"use strict";f();Object.defineProperty(D0,"__esModule",{value:!0});var Cee=Mo(),See=mm(),Dee=hm(),S0=class extends Dee.default{constructor(){super(...arguments),this._walkSync=See.walkSync,this._statSync=Cee.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)}};D0.default=S0});var kF=C(A0=>{"use strict";f();Object.defineProperty(A0,"__esModule",{value:!0});var Tee=IF(),Aee=ym(),T0=class extends Aee.default{constructor(){super(...arguments),this._reader=new Tee.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)}};A0.default=T0});var NF=C(uc=>{"use strict";f();Object.defineProperty(uc,"__esModule",{value:!0});uc.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var lc=require("fs"),Pee=require("os"),_ee=Math.max(Pee.cpus().length,1);uc.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:lc.lstat,lstatSync:lc.lstatSync,stat:lc.stat,statSync:lc.statSync,readdir:lc.readdir,readdirSync:lc.readdirSync};var P0=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,_ee),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({},uc.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};uc.default=P0});var N0=C((L2e,OF)=>{"use strict";f();var FF=ON(),Iee=PF(),kee=_F(),Nee=kF(),_0=NF(),An=ss();async function I0(e,t){Qn(e);let r=k0(e,Iee.default,t),n=await Promise.all(r);return An.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(l,u){Qn(l);let p=k0(l,Nee.default,u);return An.array.flatten(p)}e.sync=t;function r(l,u){Qn(l);let p=k0(l,kee.default,u);return An.stream.merge(p)}e.stream=r;function n(l,u){Qn(l);let p=[].concat(l),d=new _0.default(u);return FF.generate(p,d)}e.generateTasks=n;function i(l,u){Qn(l);let p=new _0.default(u);return An.pattern.isDynamicPattern(l,p)}e.isDynamicPattern=i;function s(l){return Qn(l),An.path.escape(l)}e.escapePath=s;function o(l){return Qn(l),An.path.convertPathToPattern(l)}e.convertPathToPattern=o;let a;(function(l){function u(d){return Qn(d),An.path.escapePosixPath(d)}l.escapePath=u;function p(d){return Qn(d),An.path.convertPosixPathToPattern(d)}l.convertPathToPattern=p})(a=e.posix||(e.posix={}));let c;(function(l){function u(d){return Qn(d),An.path.escapeWindowsPath(d)}l.escapePath=u;function p(d){return Qn(d),An.path.convertWindowsPathToPattern(d)}l.convertPathToPattern=p})(c=e.win32||(e.win32={}))})(I0||(I0={}));function k0(e,t,r){let n=[].concat(e),i=new _0.default(r),s=FF.generate(n,i),o=new t(i);return s.map(o.read,o)}function Qn(e){if(![].concat(e).every(n=>An.string.isString(n)&&!An.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}OF.exports=I0});var nO=C(($8e,nw)=>{"use strict";f();var vte=Object.prototype.hasOwnProperty,kr="~";function _u(){}Object.create&&(_u.prototype=Object.create(null),new _u().__proto__||(kr=!1));function wte(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function rO(e,t,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new wte(r,n||e,i),o=kr?kr+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],s]:e._events[o].push(s):(e._events[o]=s,e._eventsCount++),e}function Tm(e,t){--e._eventsCount===0?e._events=new _u:delete e._events[t]}function xr(){this._events=new _u,this._eventsCount=0}xr.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)vte.call(r,n)&&t.push(kr?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};xr.prototype.listeners=function(t){var r=kr?kr+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};xr.prototype.listenerCount=function(t){var r=kr?kr+t:t,n=this._events[r];return n?n.fn?1:n.length:0};xr.prototype.emit=function(t,r,n,i,s,o){var a=kr?kr+t:t;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,u,p;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,s),!0;case 6:return c.fn.call(c.context,r,n,i,s,o),!0}for(p=1,u=new Array(l-1);p<l;p++)u[p-1]=arguments[p];c.fn.apply(c.context,u)}else{var d=c.length,h;for(p=0;p<d;p++)switch(c[p].once&&this.removeListener(t,c[p].fn,void 0,!0),l){case 1:c[p].fn.call(c[p].context);break;case 2:c[p].fn.call(c[p].context,r);break;case 3:c[p].fn.call(c[p].context,r,n);break;case 4:c[p].fn.call(c[p].context,r,n,i);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];c[p].fn.apply(c[p].context,u)}}return!0};xr.prototype.on=function(t,r,n){return rO(this,t,r,n,!1)};xr.prototype.once=function(t,r,n){return rO(this,t,r,n,!0)};xr.prototype.removeListener=function(t,r,n,i){var s=kr?kr+t:t;if(!this._events[s])return this;if(!r)return Tm(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&Tm(this,s);else{for(var a=0,c=[],l=o.length;a<l;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:Tm(this,s)}return this};xr.prototype.removeAllListeners=function(t){var r;return t?(r=kr?kr+t:t,this._events[r]&&Tm(this,r)):(this._events=new _u,this._eventsCount=0),this};xr.prototype.off=xr.prototype.removeListener;xr.prototype.addListener=xr.prototype.on;xr.prefixed=kr;xr.EventEmitter=xr;typeof nw<"u"&&(nw.exports=xr)});var sO=C((j8e,iO)=>{"use strict";f();iO.exports=function(t,r){if(r=r.split(":")[0],t=+t,!t)return!1;switch(r){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}});var Am=C(aO=>{f();var cs=aO,Ete=require("url"),oO=require("util")._extend,Cte=sO(),Ste=/(^|,)\s*upgrade\s*($|,)/i,iw=/^https|wss/;cs.isSSL=iw;cs.setupOutgoing=function(e,t,r,n){e.port=t[n||"target"].port||(iw.test(t[n||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(a){e[a]=t[n||"target"][a]}),e.method=t.method||r.method,e.headers=oO({},r.headers),t.headers&&oO(e.headers,t.headers),t.auth&&(e.auth=t.auth),t.ca&&(e.ca=t.ca),iw.test(t[n||"target"].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"||!Ste.test(e.headers.connection))&&(e.headers.connection="close"));var i=t[n||"target"],s=i&&t.prependPath!==!1&&i.path||"",o=t.toProxy?r.url:Ete.parse(r.url).path||"";return o=t.ignorePath?"":o,e.path=cs.urlJoin(s,o),t.changeOrigin&&(e.headers.host=Cte(e.port,t[n||"target"].protocol)&&!Dte(e.host)?e.host+":"+e.port:e.host),e};cs.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};cs.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:cs.hasEncryptedConnection(e)?"443":"80"};cs.hasEncryptedConnection=function(e){return!!(e.connection.encrypted||e.connection.pair)};cs.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],n=r.split("?"),i;return e[t]=n.shift(),i=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,n),i.join("?")};cs.rewriteCookieProperty=function e(t,r,n){return Array.isArray(t)?t.map(function(i){return e(i,r,n)}):t.replace(new RegExp("(;\\s*"+n+"=)([^;]+)","i"),function(i,s,o){var a;if(o in r)a=r[o];else if("*"in r)a=r["*"];else return i;return a?s+a:""})};function Dte(e){return!!~e.indexOf(":")}});var pO=C((H8e,uO)=>{f();var cO=require("url"),lO=Am(),Tte=/^201|30(1|2|7|8)$/;uO.exports={removeChunked:function(t,r,n){t.httpVersion==="1.0"&&delete n.headers["transfer-encoding"]},setConnection:function(t,r,n){t.httpVersion==="1.0"?n.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!n.headers.connection&&(n.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,n,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&n.headers.location&&Tte.test(n.statusCode)){var s=cO.parse(i.target),o=cO.parse(n.headers.location);if(s.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=t.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),n.headers.location=o.format()}},writeHeaders:function(t,r,n,i){var s=i.cookieDomainRewrite,o=i.cookiePathRewrite,a=i.preserveHeaderKeyCase,c,l=function(d,h){h!=null&&(s&&d.toLowerCase()==="set-cookie"&&(h=lO.rewriteCookieProperty(h,s,"domain")),o&&d.toLowerCase()==="set-cookie"&&(h=lO.rewriteCookieProperty(h,o,"path")),r.setHeader(String(d).trim(),h))};if(typeof s=="string"&&(s={"*":s}),typeof o=="string"&&(o={"*":o}),a&&n.rawHeaders!=null){c={};for(var u=0;u<n.rawHeaders.length;u+=2){var p=n.rawHeaders[u];c[p.toLowerCase()]=p}}Object.keys(n.headers).forEach(function(d){var h=n.headers[d];a&&c&&(d=c[d]||d),l(d,h)})},writeStatusCode:function(t,r,n){n.statusMessage?(r.statusCode=n.statusCode,r.statusMessage=n.statusMessage):r.statusCode=n.statusCode}}});var sw=C((V8e,dO)=>{f();var yc=1e3,bc=yc*60,xc=bc*60,Uo=xc*24,Ate=Uo*7,Pte=Uo*365.25;dO.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return _te(e);if(r==="number"&&isFinite(e))return t.long?kte(e):Ite(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function _te(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*Pte;case"weeks":case"week":case"w":return r*Ate;case"days":case"day":case"d":return r*Uo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*xc;case"minutes":case"minute":case"mins":case"min":case"m":return r*bc;case"seconds":case"second":case"secs":case"sec":case"s":return r*yc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ite(e){var t=Math.abs(e);return t>=Uo?Math.round(e/Uo)+"d":t>=xc?Math.round(e/xc)+"h":t>=bc?Math.round(e/bc)+"m":t>=yc?Math.round(e/yc)+"s":e+"ms"}function kte(e){var t=Math.abs(e);return t>=Uo?Pm(e,t,Uo,"day"):t>=xc?Pm(e,t,xc,"hour"):t>=bc?Pm(e,t,bc,"minute"):t>=yc?Pm(e,t,yc,"second"):e+" ms"}function Pm(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var ow=C((J8e,fO)=>{f();function Nte(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=sw(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let p=0;for(let d=0;d<u.length;d++)p=(p<<5)-p+u.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(u){let p,d=null,h,m;function g(...y){if(!g.enabled)return;let b=g,v=Number(new Date),E=v-(p||v);b.diff=E,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,(S,D)=>{if(S==="%%")return"%";x++;let _=r.formatters[D];if(typeof _=="function"){let O=y[x];S=_.call(b,O),y.splice(x,1),x--}return S}),r.formatArgs.call(b,y),(b.log||r.log).apply(b,y)}return g.namespace=u,g.useColors=r.useColors(),g.color=r.selectColor(u),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(u)),m),set:y=>{d=y}}),typeof r.init=="function"&&r.init(g),g}function n(u,p){let d=r(this.namespace+(typeof p>"u"?":":p)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p=(typeof u=="string"?u:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(u,p){let d=0,h=0,m=-1,g=0;for(;d<u.length;)if(h<p.length&&(p[h]===u[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 u=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),u}function a(u){for(let p of r.skips)if(s(u,p))return!1;for(let p of r.names)if(s(u,p))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){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}fO.exports=Nte});var mO=C((pn,_m)=>{f();pn.formatArgs=Ote;pn.save=Rte;pn.load=Mte;pn.useColors=Fte;pn.storage=Lte();pn.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`."))}})();pn.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 Fte(){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 Ote(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+_m.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)}pn.log=console.debug||console.log||(()=>{});function Rte(e){try{e?pn.storage.setItem("debug",e):pn.storage.removeItem("debug")}catch{}}function Mte(){let e;try{e=pn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Lte(){try{return localStorage}catch{}}_m.exports=ow()(pn);var{formatters:Bte}=_m.exports;Bte.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var gO=C((Q8e,hO)=>{"use strict";f();hO.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 xO=C((eOe,bO)=>{"use strict";f();var $te=require("os"),yO=require("tty"),Pn=gO(),{env:Jt}=process,Ks;Pn("no-color")||Pn("no-colors")||Pn("color=false")||Pn("color=never")?Ks=0:(Pn("color")||Pn("colors")||Pn("color=true")||Pn("color=always"))&&(Ks=1);"FORCE_COLOR"in Jt&&(Jt.FORCE_COLOR==="true"?Ks=1:Jt.FORCE_COLOR==="false"?Ks=0:Ks=Jt.FORCE_COLOR.length===0?1:Math.min(parseInt(Jt.FORCE_COLOR,10),3));function aw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cw(e,t){if(Ks===0)return 0;if(Pn("color=16m")||Pn("color=full")||Pn("color=truecolor"))return 3;if(Pn("color=256"))return 2;if(e&&!t&&Ks===void 0)return 0;let r=Ks||0;if(Jt.TERM==="dumb")return r;if(process.platform==="win32"){let n=$te.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Jt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Jt)||Jt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Jt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jt.TEAMCITY_VERSION)?1:0;if(Jt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Jt){let n=parseInt((Jt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jt.TERM)||"COLORTERM"in Jt?1:r}function Ute(e){let t=cw(e,e&&e.isTTY);return aw(t)}bO.exports={supportsColor:Ute,stdout:aw(cw(!0,yO.isatty(1))),stderr:aw(cw(!0,yO.isatty(2)))}});var wO=C((Yt,km)=>{f();var jte=require("tty"),Im=require("util");Yt.init=Wte;Yt.log=Hte;Yt.formatArgs=zte;Yt.save=Kte;Yt.load=Vte;Yt.useColors=qte;Yt.destroy=Im.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Yt.colors=[6,2,3,4,5,1];try{let e=xO();e&&(e.stderr||e).level>=2&&(Yt.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{}Yt.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 qte(){return"colors"in Yt.inspectOpts?!!Yt.inspectOpts.colors:jte.isatty(process.stderr.fd)}function zte(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(`
|
|
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 $2=C((kIe,B2)=>{"use strict";f();var yX=Hf(),{MAX_LENGTH:R2,CHAR_BACKSLASH:nv,CHAR_BACKTICK:bX,CHAR_COMMA:xX,CHAR_DOT:vX,CHAR_LEFT_PARENTHESES:wX,CHAR_RIGHT_PARENTHESES:EX,CHAR_LEFT_CURLY_BRACE:CX,CHAR_RIGHT_CURLY_BRACE:SX,CHAR_LEFT_SQUARE_BRACKET:M2,CHAR_RIGHT_SQUARE_BRACKET:L2,CHAR_DOUBLE_QUOTE:DX,CHAR_SINGLE_QUOTE:TX,CHAR_NO_BREAK_SPACE:AX,CHAR_ZERO_WIDTH_NOBREAK_SPACE:PX}=O2(),_X=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(R2,r.maxLength):R2;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,l=e.length,u=0,p=0,d,h=()=>e[u++],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"});u<l;)if(o=s[s.length-1],d=h(),!(d===PX||d===AX)){if(d===nv){m({type:"text",value:(t.keepEscaping?d:"")+h()});continue}if(d===L2){m({type:"text",value:"\\"+d});continue}if(d===M2){c++;let g;for(;u<l&&(g=h());){if(d+=g,g===M2){c++;continue}if(g===nv){d+=h();continue}if(g===L2&&(c--,c===0))break}m({type:"text",value:d});continue}if(d===wX){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===EX){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===DX||d===TX||d===bX){let g=d,y;for(t.keepQuotes!==!0&&(d="");u<l&&(y=h());){if(y===nv){d+=y+h();continue}if(y===g){t.keepQuotes===!0&&(d+=y);break}d+=y}m({type:"text",value:d});continue}if(d===CX){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===SX){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===xX&&p>0){if(o.ranges>0){o.ranges=0;let g=o.nodes.shift();o.nodes=[g,{type:"text",value:yX(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===vX&&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};B2.exports=_X});var q2=C((FIe,j2)=>{"use strict";f();var U2=Hf(),IX=_2(),kX=N2(),NX=$2(),cn=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=cn.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(cn.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};cn.parse=(e,t={})=>NX(e,t);cn.stringify=(e,t={})=>U2(typeof e=="string"?cn.parse(e,t):e,t);cn.compile=(e,t={})=>(typeof e=="string"&&(e=cn.parse(e,t)),IX(e,t));cn.expand=(e,t={})=>{typeof e=="string"&&(e=cn.parse(e,t));let r=kX(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};cn.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?cn.compile(e,t):cn.expand(e,t);j2.exports=cn});var gu=C((RIe,V2)=>{"use strict";f();var FX=require("path"),Di="\\\\/",z2=`[^${Di}]`,is="\\.",OX="\\+",RX="\\?",Wf="\\/",MX="(?=.)",G2="[^/]",iv=`(?:${Wf}|$)`,H2=`(?:^|${Wf})`,sv=`${is}{1,2}${iv}`,LX=`(?!${is})`,BX=`(?!${H2}${sv})`,$X=`(?!${is}{0,1}${iv})`,UX=`(?!${sv})`,jX=`[^.${Wf}]`,qX=`${G2}*?`,K2={DOT_LITERAL:is,PLUS_LITERAL:OX,QMARK_LITERAL:RX,SLASH_LITERAL:Wf,ONE_CHAR:MX,QMARK:G2,END_ANCHOR:iv,DOTS_SLASH:sv,NO_DOT:LX,NO_DOTS:BX,NO_DOT_SLASH:$X,NO_DOTS_SLASH:UX,QMARK_NO_DOT:jX,STAR:qX,START_ANCHOR:H2},zX={...K2,SLASH_LITERAL:`[${Di}]`,QMARK:z2,STAR:`${z2}*?`,DOTS_SLASH:`${is}{1,2}(?:[${Di}]|$)`,NO_DOT:`(?!${is})`,NO_DOTS:`(?!(?:^|[${Di}])${is}{1,2}(?:[${Di}]|$))`,NO_DOT_SLASH:`(?!${is}{0,1}(?:[${Di}]|$))`,NO_DOTS_SLASH:`(?!${is}{1,2}(?:[${Di}]|$))`,QMARK_NO_DOT:`[^.${Di}]`,START_ANCHOR:`(?:^|[${Di}])`,END_ANCHOR:`(?:[${Di}]|$)`},GX={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"};V2.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:GX,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:FX.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?zX:K2}}});var yu=C(Gr=>{"use strict";f();var HX=require("path"),KX=process.platform==="win32",{REGEX_BACKSLASH:VX,REGEX_REMOVE_BACKSLASH:WX,REGEX_SPECIAL_CHARS:JX,REGEX_SPECIAL_CHARS_GLOBAL:YX}=gu();Gr.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Gr.hasRegexChars=e=>JX.test(e);Gr.isRegexChar=e=>e.length===1&&Gr.hasRegexChars(e);Gr.escapeRegex=e=>e.replace(YX,"\\$1");Gr.toPosixSlashes=e=>e.replace(VX,"/");Gr.removeBackslashes=e=>e.replace(WX,t=>t==="\\"?"":t);Gr.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Gr.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:KX===!0||HX.sep==="\\";Gr.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?Gr.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};Gr.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};Gr.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var tN=C(($Ie,eN)=>{"use strict";f();var W2=yu(),{CHAR_ASTERISK:ov,CHAR_AT:XX,CHAR_BACKWARD_SLASH:bu,CHAR_COMMA:QX,CHAR_DOT:av,CHAR_EXCLAMATION_MARK:cv,CHAR_FORWARD_SLASH:Z2,CHAR_LEFT_CURLY_BRACE:lv,CHAR_LEFT_PARENTHESES:uv,CHAR_LEFT_SQUARE_BRACKET:ZX,CHAR_PLUS:eQ,CHAR_QUESTION_MARK:J2,CHAR_RIGHT_CURLY_BRACE:tQ,CHAR_RIGHT_PARENTHESES:Y2,CHAR_RIGHT_SQUARE_BRACKET:rQ}=gu(),X2=e=>e===Z2||e===bu,Q2=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},nQ=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],c=e,l=-1,u=0,p=0,d=!1,h=!1,m=!1,g=!1,y=!1,b=!1,v=!1,E=!1,x=!1,w=!1,S=0,D,_,O={value:"",depth:0,isGlob:!1},P=()=>l>=n,T=()=>c.charCodeAt(l+1),V=()=>(D=_,c.charCodeAt(++l));for(;l<n;){_=V();let L;if(_===bu){v=O.backslashes=!0,_=V(),_===lv&&(b=!0);continue}if(b===!0||_===lv){for(S++;P()!==!0&&(_=V());){if(_===bu){v=O.backslashes=!0,V();continue}if(_===lv){S++;continue}if(b!==!0&&_===av&&(_=V())===av){if(d=O.isBrace=!0,m=O.isGlob=!0,w=!0,i===!0)continue;break}if(b!==!0&&_===QX){if(d=O.isBrace=!0,m=O.isGlob=!0,w=!0,i===!0)continue;break}if(_===tQ&&(S--,S===0)){b=!1,d=O.isBrace=!0,w=!0;break}}if(i===!0)continue;break}if(_===Z2){if(s.push(l),o.push(O),O={value:"",depth:0,isGlob:!1},w===!0)continue;if(D===av&&l===u+1){u+=2;continue}p=l+1;continue}if(r.noext!==!0&&(_===eQ||_===XX||_===ov||_===J2||_===cv)===!0&&T()===uv){if(m=O.isGlob=!0,g=O.isExtglob=!0,w=!0,_===cv&&l===u&&(x=!0),i===!0){for(;P()!==!0&&(_=V());){if(_===bu){v=O.backslashes=!0,_=V();continue}if(_===Y2){m=O.isGlob=!0,w=!0;break}}continue}break}if(_===ov){if(D===ov&&(y=O.isGlobstar=!0),m=O.isGlob=!0,w=!0,i===!0)continue;break}if(_===J2){if(m=O.isGlob=!0,w=!0,i===!0)continue;break}if(_===ZX){for(;P()!==!0&&(L=V());){if(L===bu){v=O.backslashes=!0,V();continue}if(L===rQ){h=O.isBracket=!0,m=O.isGlob=!0,w=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&_===cv&&l===u){E=O.negated=!0,u++;continue}if(r.noparen!==!0&&_===uv){if(m=O.isGlob=!0,i===!0){for(;P()!==!0&&(_=V());){if(_===uv){v=O.backslashes=!0,_=V();continue}if(_===Y2){w=!0;break}}continue}break}if(m===!0){if(w=!0,i===!0)continue;break}}r.noext===!0&&(g=!1,m=!1);let X=c,te="",I="";u>0&&(te=c.slice(0,u),c=c.slice(u),p-=u),X&&m===!0&&p>0?(X=c.slice(0,p),I=c.slice(p)):m===!0?(X="",I=c):X=c,X&&X!==""&&X!=="/"&&X!==c&&X2(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),r.unescape===!0&&(I&&(I=W2.removeBackslashes(I)),X&&v===!0&&(X=W2.removeBackslashes(X)));let F={prefix:te,input:e,start:u,base:X,glob:I,isBrace:d,isBracket:h,isGlob:m,isExtglob:g,isGlobstar:y,negated:E,negatedExtglob:x};if(r.tokens===!0&&(F.maxDepth=0,X2(_)||o.push(O),F.tokens=o),r.parts===!0||r.tokens===!0){let L;for(let N=0;N<s.length;N++){let G=L?L+1:u,R=s[N],M=e.slice(G,R);r.tokens&&(N===0&&u!==0?(o[N].isPrefix=!0,o[N].value=te):o[N].value=M,Q2(o[N]),F.maxDepth+=o[N].depth),(N!==0||M!=="")&&a.push(M),L=R}if(L&&L+1<e.length){let N=e.slice(L+1);a.push(N),r.tokens&&(o[o.length-1].value=N,Q2(o[o.length-1]),F.maxDepth+=o[o.length-1].depth)}F.slashes=s,F.parts=a}return F};eN.exports=nQ});var iN=C((jIe,nN)=>{"use strict";f();var Jf=gu(),ln=yu(),{MAX_LENGTH:Yf,POSIX_REGEX_SOURCE:iQ,REGEX_NON_SPECIAL_CHARS:sQ,REGEX_SPECIAL_CHARS_BACKREF:oQ,REPLACEMENTS:rN}=Jf,aQ=(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=>ln.escapeRegex(i)).join("..")}return r},oc=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,pv=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rN[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(Yf,r.maxLength):Yf,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=ln.isWindows(t),l=Jf.globChars(c),u=Jf.extglobChars(l),{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:E,QMARK_NO_DOT:x,STAR:w,START_ANCHOR:S}=l,D=J=>`(${a}(?:(?!${S}${J.dot?g:p}).)*?)`,_=r.dot?"":y,O=r.dot?E:x,P=r.bash===!0?D(r):w;r.capture&&(P=`(${P})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let T={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=ln.removePrefix(e,T),i=e.length;let V=[],X=[],te=[],I=s,F,L=()=>T.index===i-1,N=T.peek=(J=1)=>e[T.index+J],G=T.advance=()=>e[++T.index]||"",R=()=>e.slice(T.index+1),M=(J="",Be=0)=>{T.consumed+=J,T.index+=Be},H=J=>{T.output+=J.output!=null?J.output:J.value,M(J.value)},W=()=>{let J=1;for(;N()==="!"&&(N(2)!=="("||N(3)==="?");)G(),T.start++,J++;return J%2===0?!1:(T.negated=!0,T.start++,!0)},fe=J=>{T[J]++,te.push(J)},ce=J=>{T[J]--,te.pop()},Q=J=>{if(I.type==="globstar"){let Be=T.braces>0&&(J.type==="comma"||J.type==="brace"),K=J.extglob===!0||V.length&&(J.type==="pipe"||J.type==="paren");J.type!=="slash"&&J.type!=="paren"&&!Be&&!K&&(T.output=T.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=P,T.output+=I.output)}if(V.length&&J.type!=="paren"&&(V[V.length-1].inner+=J.value),(J.value||J.output)&&H(J),I&&I.type==="text"&&J.type==="text"){I.value+=J.value,I.output=(I.output||"")+J.value;return}J.prev=I,o.push(J),I=J},St=(J,Be)=>{let K={...u[Be],conditions:1,inner:""};K.prev=I,K.parens=T.parens,K.output=T.output;let me=(r.capture?"(":"")+K.open;fe("parens"),Q({type:J,value:Be,output:T.output?"":m}),Q({type:"paren",extglob:!0,value:G(),output:me}),V.push(K)},nr=J=>{let Be=J.close+(r.capture?")":""),K;if(J.type==="negate"){let me=P;if(J.inner&&J.inner.length>1&&J.inner.includes("/")&&(me=D(r)),(me!==P||L()||/^\)+$/.test(R()))&&(Be=J.close=`)$))${me}`),J.inner.includes("*")&&(K=R())&&/^\.[^\\/.]+$/.test(K)){let ae=pv(K,{...t,fastpaths:!1}).output;Be=J.close=`)${ae})${me})`}J.prev.type==="bos"&&(T.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:F,output:Be}),ce("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let J=!1,Be=e.replace(oQ,(K,me,ae,ct,Xe,cr)=>ct==="\\"?(J=!0,K):ct==="?"?me?me+ct+(Xe?E.repeat(Xe.length):""):cr===0?O+(Xe?E.repeat(Xe.length):""):E.repeat(ae.length):ct==="."?p.repeat(ae.length):ct==="*"?me?me+ct+(Xe?P:""):P:me?K:`\\${K}`);return J===!0&&(r.unescape===!0?Be=Be.replace(/\\/g,""):Be=Be.replace(/\\+/g,K=>K.length%2===0?"\\\\":K?"\\":"")),Be===e&&r.contains===!0?(T.output=e,T):(T.output=ln.wrapOutput(Be,T,t),T)}for(;!L();){if(F=G(),F==="\0")continue;if(F==="\\"){let K=N();if(K==="/"&&r.bash!==!0||K==="."||K===";")continue;if(!K){F+="\\",Q({type:"text",value:F});continue}let me=/^\\+/.exec(R()),ae=0;if(me&&me[0].length>2&&(ae=me[0].length,T.index+=ae,ae%2!==0&&(F+="\\")),r.unescape===!0?F=G():F+=G(),T.brackets===0){Q({type:"text",value:F});continue}}if(T.brackets>0&&(F!=="]"||I.value==="["||I.value==="[^")){if(r.posix!==!1&&F===":"){let K=I.value.slice(1);if(K.includes("[")&&(I.posix=!0,K.includes(":"))){let me=I.value.lastIndexOf("["),ae=I.value.slice(0,me),ct=I.value.slice(me+2),Xe=iQ[ct];if(Xe){I.value=ae+Xe,T.backtrack=!0,G(),!s.output&&o.indexOf(I)===1&&(s.output=m);continue}}}(F==="["&&N()!==":"||F==="-"&&N()==="]")&&(F=`\\${F}`),F==="]"&&(I.value==="["||I.value==="[^")&&(F=`\\${F}`),r.posix===!0&&F==="!"&&I.value==="["&&(F="^"),I.value+=F,H({value:F});continue}if(T.quotes===1&&F!=='"'){F=ln.escapeRegex(F),I.value+=F,H({value:F});continue}if(F==='"'){T.quotes=T.quotes===1?0:1,r.keepQuotes===!0&&Q({type:"text",value:F});continue}if(F==="("){fe("parens"),Q({type:"paren",value:F});continue}if(F===")"){if(T.parens===0&&r.strictBrackets===!0)throw new SyntaxError(oc("opening","("));let K=V[V.length-1];if(K&&T.parens===K.parens+1){nr(V.pop());continue}Q({type:"paren",value:F,output:T.parens?")":"\\)"}),ce("parens");continue}if(F==="["){if(r.nobracket===!0||!R().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(oc("closing","]"));F=`\\${F}`}else fe("brackets");Q({type:"bracket",value:F});continue}if(F==="]"){if(r.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){Q({type:"text",value:F,output:`\\${F}`});continue}if(T.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(oc("opening","["));Q({type:"text",value:F,output:`\\${F}`});continue}ce("brackets");let K=I.value.slice(1);if(I.posix!==!0&&K[0]==="^"&&!K.includes("/")&&(F=`/${F}`),I.value+=F,H({value:F}),r.literalBrackets===!1||ln.hasRegexChars(K))continue;let me=ln.escapeRegex(I.value);if(T.output=T.output.slice(0,-I.value.length),r.literalBrackets===!0){T.output+=me,I.value=me;continue}I.value=`(${a}${me}|${I.value})`,T.output+=I.value;continue}if(F==="{"&&r.nobrace!==!0){fe("braces");let K={type:"brace",value:F,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};X.push(K),Q(K);continue}if(F==="}"){let K=X[X.length-1];if(r.nobrace===!0||!K){Q({type:"text",value:F,output:F});continue}let me=")";if(K.dots===!0){let ae=o.slice(),ct=[];for(let Xe=ae.length-1;Xe>=0&&(o.pop(),ae[Xe].type!=="brace");Xe--)ae[Xe].type!=="dots"&&ct.unshift(ae[Xe].value);me=aQ(ct,r),T.backtrack=!0}if(K.comma!==!0&&K.dots!==!0){let ae=T.output.slice(0,K.outputIndex),ct=T.tokens.slice(K.tokensIndex);K.value=K.output="\\{",F=me="\\}",T.output=ae;for(let Xe of ct)T.output+=Xe.output||Xe.value}Q({type:"brace",value:F,output:me}),ce("braces"),X.pop();continue}if(F==="|"){V.length>0&&V[V.length-1].conditions++,Q({type:"text",value:F});continue}if(F===","){let K=F,me=X[X.length-1];me&&te[te.length-1]==="braces"&&(me.comma=!0,K="|"),Q({type:"comma",value:F,output:K});continue}if(F==="/"){if(I.type==="dot"&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",o.pop(),I=s;continue}Q({type:"slash",value:F,output:h});continue}if(F==="."){if(T.braces>0&&I.type==="dot"){I.value==="."&&(I.output=p);let K=X[X.length-1];I.type="dots",I.output+=F,I.value+=F,K.dots=!0;continue}if(T.braces+T.parens===0&&I.type!=="bos"&&I.type!=="slash"){Q({type:"text",value:F,output:p});continue}Q({type:"dot",value:F,output:p});continue}if(F==="?"){if(!(I&&I.value==="(")&&r.noextglob!==!0&&N()==="("&&N(2)!=="?"){St("qmark",F);continue}if(I&&I.type==="paren"){let me=N(),ae=F;if(me==="<"&&!ln.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(I.value==="("&&!/[!=<:]/.test(me)||me==="<"&&!/<([!=]|\w+>)/.test(R()))&&(ae=`\\${F}`),Q({type:"text",value:F,output:ae});continue}if(r.dot!==!0&&(I.type==="slash"||I.type==="bos")){Q({type:"qmark",value:F,output:x});continue}Q({type:"qmark",value:F,output:E});continue}if(F==="!"){if(r.noextglob!==!0&&N()==="("&&(N(2)!=="?"||!/[!=<:]/.test(N(3)))){St("negate",F);continue}if(r.nonegate!==!0&&T.index===0){W();continue}}if(F==="+"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){St("plus",F);continue}if(I&&I.value==="("||r.regex===!1){Q({type:"plus",value:F,output:d});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||T.parens>0){Q({type:"plus",value:F});continue}Q({type:"plus",value:d});continue}if(F==="@"){if(r.noextglob!==!0&&N()==="("&&N(2)!=="?"){Q({type:"at",extglob:!0,value:F,output:""});continue}Q({type:"text",value:F});continue}if(F!=="*"){(F==="$"||F==="^")&&(F=`\\${F}`);let K=sQ.exec(R());K&&(F+=K[0],T.index+=K[0].length),Q({type:"text",value:F});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=F,I.output=P,T.backtrack=!0,T.globstar=!0,M(F);continue}let J=R();if(r.noextglob!==!0&&/^\([^?]/.test(J)){St("star",F);continue}if(I.type==="star"){if(r.noglobstar===!0){M(F);continue}let K=I.prev,me=K.prev,ae=K.type==="slash"||K.type==="bos",ct=me&&(me.type==="star"||me.type==="globstar");if(r.bash===!0&&(!ae||J[0]&&J[0]!=="/")){Q({type:"star",value:F,output:""});continue}let Xe=T.braces>0&&(K.type==="comma"||K.type==="brace"),cr=V.length&&(K.type==="pipe"||K.type==="paren");if(!ae&&K.type!=="paren"&&!Xe&&!cr){Q({type:"star",value:F,output:""});continue}for(;J.slice(0,3)==="/**";){let da=e[T.index+4];if(da&&da!=="/")break;J=J.slice(3),M("/**",3)}if(K.type==="bos"&&L()){I.type="globstar",I.value+=F,I.output=D(r),T.output=I.output,T.globstar=!0,M(F);continue}if(K.type==="slash"&&K.prev.type!=="bos"&&!ct&&L()){T.output=T.output.slice(0,-(K.output+I.output).length),K.output=`(?:${K.output}`,I.type="globstar",I.output=D(r)+(r.strictSlashes?")":"|$)"),I.value+=F,T.globstar=!0,T.output+=K.output+I.output,M(F);continue}if(K.type==="slash"&&K.prev.type!=="bos"&&J[0]==="/"){let da=J[1]!==void 0?"|$":"";T.output=T.output.slice(0,-(K.output+I.output).length),K.output=`(?:${K.output}`,I.type="globstar",I.output=`${D(r)}${h}|${h}${da})`,I.value+=F,T.output+=K.output+I.output,T.globstar=!0,M(F+G()),Q({type:"slash",value:"/",output:""});continue}if(K.type==="bos"&&J[0]==="/"){I.type="globstar",I.value+=F,I.output=`(?:^|${h}|${D(r)}${h})`,T.output=I.output,T.globstar=!0,M(F+G()),Q({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-I.output.length),I.type="globstar",I.output=D(r),I.value+=F,T.output+=I.output,T.globstar=!0,M(F);continue}let Be={type:"star",value:F,output:P};if(r.bash===!0){Be.output=".*?",(I.type==="bos"||I.type==="slash")&&(Be.output=_+Be.output),Q(Be);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&r.regex===!0){Be.output=F,Q(Be);continue}(T.index===T.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(T.output+=b,I.output+=b):r.dot===!0?(T.output+=v,I.output+=v):(T.output+=_,I.output+=_),N()!=="*"&&(T.output+=m,I.output+=m)),Q(Be)}for(;T.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(oc("closing","]"));T.output=ln.escapeLast(T.output,"["),ce("brackets")}for(;T.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(oc("closing",")"));T.output=ln.escapeLast(T.output,"("),ce("parens")}for(;T.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(oc("closing","}"));T.output=ln.escapeLast(T.output,"{"),ce("braces")}if(r.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&Q({type:"maybe_slash",value:"",output:`${h}?`}),T.backtrack===!0){T.output="";for(let J of T.tokens)T.output+=J.output!=null?J.output:J.value,J.suffix&&(T.output+=J.suffix)}return T};pv.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(Yf,r.maxLength):Yf,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=rN[e]||e;let s=ln.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:l,NO_DOT:u,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:h,START_ANCHOR:m}=Jf.globChars(s),g=r.dot?p:u,y=r.dot?d:u,b=r.capture?"":"?:",v={negated:!1,prefix:""},E=r.bash===!0?".*?":h;r.capture&&(E=`(${E})`);let x=_=>_.noglobstar===!0?E:`(${b}(?:(?!${m}${_.dot?l:o}).)*?)`,w=_=>{switch(_){case"*":return`${g}${c}${E}`;case".*":return`${o}${c}${E}`;case"*.*":return`${g}${E}${o}${c}${E}`;case"*/*":return`${g}${E}${a}${c}${y}${E}`;case"**":return g+x(r);case"**/*":return`(?:${g}${x(r)}${a})?${y}${c}${E}`;case"**/*.*":return`(?:${g}${x(r)}${a})?${y}${E}${o}${c}${E}`;case"**/.*":return`(?:${g}${x(r)}${a})?${o}${c}${E}`;default:{let O=/^(.*?)\.(\w+)$/.exec(_);if(!O)return;let P=w(O[1]);return P?P+o+O[2]:void 0}}},S=ln.removePrefix(e,v),D=w(S);return D&&r.strictSlashes!==!0&&(D+=`${a}?`),D};nN.exports=pv});var oN=C((zIe,sN)=>{"use strict";f();var cQ=require("path"),lQ=tN(),dv=iN(),fv=yu(),uQ=gu(),pQ=e=>e&&typeof e=="object"&&!Array.isArray(e),Ft=(e,t,r=!1)=>{if(Array.isArray(e)){let u=e.map(d=>Ft(d,t,r));return d=>{for(let h of u){let m=h(d);if(m)return m}return!1}}let n=pQ(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=fv.isWindows(t),o=n?Ft.compileRe(e,t):Ft.makeRe(e,t,!1,!0),a=o.state;delete o.state;let c=()=>!1;if(i.ignore){let u={...t,ignore:null,onMatch:null,onResult:null};c=Ft(i.ignore,u,r)}let l=(u,p=!1)=>{let{isMatch:d,match:h,output:m}=Ft.test(u,o,t,{glob:e,posix:s}),g={glob:e,state:a,regex:o,posix:s,input:u,output:m,match:h,isMatch:d};return typeof i.onResult=="function"&&i.onResult(g),d===!1?(g.isMatch=!1,p?g:!1):c(u)?(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&&(l.state=a),l};Ft.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?fv.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=Ft.matchBase(e,t,r,i):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};Ft.matchBase=(e,t,r,n=fv.isWindows(r))=>(t instanceof RegExp?t:Ft.makeRe(t,r)).test(cQ.basename(e));Ft.isMatch=(e,t,r)=>Ft(t,r)(e);Ft.parse=(e,t)=>Array.isArray(e)?e.map(r=>Ft.parse(r,t)):dv(e,{...t,fastpaths:!1});Ft.scan=(e,t)=>lQ(e,t);Ft.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=Ft.toRegex(a,t);return n===!0&&(c.state=e),c};Ft.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=dv.fastpaths(e,t)),i.output||(i=dv(e,t)),Ft.compileRe(i,t,r,n)};Ft.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/$^/}};Ft.constants=uQ;sN.exports=Ft});var cN=C((HIe,aN)=>{"use strict";f();aN.exports=oN()});var Xf=C((VIe,fN)=>{"use strict";f();var uN=require("util"),pN=q2(),Ti=cN(),mv=yu(),lN=e=>e===""||e==="./",dN=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},gt=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=u=>{s.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<t.length;u++){let p=Ti(String(t[u]),{...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 l=(o===t.length?[...s]:[...i]).filter(u=>!n.has(u));if(r&&l.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(u=>u.replace(/\\/g,"")):t}return l};gt.match=gt;gt.matcher=(e,t)=>Ti(e,t);gt.isMatch=(e,t,r)=>Ti(t,r)(e);gt.any=gt.isMatch;gt.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(gt(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};gt.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${uN.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>gt.contains(e,n,r));if(typeof t=="string"){if(lN(e)||lN(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return gt.isMatch(e,t,{...r,contains:!0})};gt.matchKeys=(e,t,r)=>{if(!mv.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=gt(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};gt.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ti(String(i),r);if(n.some(o=>s(o)))return!0}return!1};gt.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=Ti(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};gt.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${uN.inspect(e)}"`);return[].concat(t).every(n=>Ti(n,r)(e))};gt.capture=(e,t,r)=>{let n=mv.isWindows(r),s=Ti.makeRe(String(e),{...r,capture:!0}).exec(n?mv.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};gt.makeRe=(...e)=>Ti.makeRe(...e);gt.scan=(...e)=>Ti.scan(...e);gt.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of pN(String(n),t))r.push(Ti.parse(i,t));return r};gt.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!dN(e)?[e]:pN(e,t)};gt.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return gt.braces(e,{...t,expand:!0})};gt.hasBraces=dN;fN.exports=gt});var CN=C(pe=>{"use strict";f();Object.defineProperty(pe,"__esModule",{value:!0});pe.isAbsolute=pe.partitionAbsoluteAndRelative=pe.removeDuplicateSlashes=pe.matchAny=pe.convertPatternsToRe=pe.makeRe=pe.getPatternParts=pe.expandBraceExpansion=pe.expandPatternsWithBraceExpansion=pe.isAffectDepthOfReadingPattern=pe.endsWithSlashGlobStar=pe.hasGlobStar=pe.getBaseDirectory=pe.isPatternRelatedToParentDirectory=pe.getPatternsOutsideCurrentDirectory=pe.getPatternsInsideCurrentDirectory=pe.getPositivePatterns=pe.getNegativePatterns=pe.isPositivePattern=pe.isNegativePattern=pe.convertToNegativePattern=pe.convertToPositivePattern=pe.isDynamicPattern=pe.isStaticPattern=void 0;var mN=require("path"),dQ=o2(),hv=Xf(),hN="**",fQ="\\",mQ=/[*?]|^!/,hQ=/\[[^[]*]/,gQ=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,yQ=/[!*+?@]\([^(]*\)/,bQ=/,|\.\./,xQ=/(?!^)\/{2,}/g;function gN(e,t={}){return!yN(e,t)}pe.isStaticPattern=gN;function yN(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(fQ)||mQ.test(e)||hQ.test(e)||gQ.test(e)||t.extglob!==!1&&yQ.test(e)||t.braceExpansion!==!1&&vQ(e))}pe.isDynamicPattern=yN;function vQ(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 bQ.test(n)}function wQ(e){return Qf(e)?e.slice(1):e}pe.convertToPositivePattern=wQ;function EQ(e){return"!"+e}pe.convertToNegativePattern=EQ;function Qf(e){return e.startsWith("!")&&e[1]!=="("}pe.isNegativePattern=Qf;function bN(e){return!Qf(e)}pe.isPositivePattern=bN;function CQ(e){return e.filter(Qf)}pe.getNegativePatterns=CQ;function SQ(e){return e.filter(bN)}pe.getPositivePatterns=SQ;function DQ(e){return e.filter(t=>!gv(t))}pe.getPatternsInsideCurrentDirectory=DQ;function TQ(e){return e.filter(gv)}pe.getPatternsOutsideCurrentDirectory=TQ;function gv(e){return e.startsWith("..")||e.startsWith("./..")}pe.isPatternRelatedToParentDirectory=gv;function AQ(e){return dQ(e,{flipBackslashes:!1})}pe.getBaseDirectory=AQ;function PQ(e){return e.includes(hN)}pe.hasGlobStar=PQ;function xN(e){return e.endsWith("/"+hN)}pe.endsWithSlashGlobStar=xN;function _Q(e){let t=mN.basename(e);return xN(e)||gN(t)}pe.isAffectDepthOfReadingPattern=_Q;function IQ(e){return e.reduce((t,r)=>t.concat(vN(r)),[])}pe.expandPatternsWithBraceExpansion=IQ;function vN(e){let t=hv.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}pe.expandBraceExpansion=vN;function kQ(e,t){let{parts:r}=hv.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}pe.getPatternParts=kQ;function wN(e,t){return hv.makeRe(e,t)}pe.makeRe=wN;function NQ(e,t){return e.map(r=>wN(r,t))}pe.convertPatternsToRe=NQ;function FQ(e,t){return t.some(r=>r.test(e))}pe.matchAny=FQ;function OQ(e){return e.replace(xQ,"/")}pe.removeDuplicateSlashes=OQ;function RQ(e){let t=[],r=[];for(let n of e)EN(n)?t.push(n):r.push(n);return[t,r]}pe.partitionAbsoluteAndRelative=RQ;function EN(e){return mN.isAbsolute(e)}pe.isAbsolute=EN});var AN=C((XIe,TN)=>{"use strict";f();var MQ=require("stream"),SN=MQ.PassThrough,LQ=Array.prototype.slice;TN.exports=BQ;function BQ(){let e=[],t=LQ.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=SN(n);function a(){for(let u=0,p=arguments.length;u<p;u++)e.push(DN(arguments[u],n));return c(),this}function c(){if(r)return;r=!0;let u=e.shift();if(!u){process.nextTick(l);return}Array.isArray(u)||(u=[u]);let p=u.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<u.length;m++)h(u[m]);d()}function l(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),o}function DN(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=DN(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(SN(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var _N=C(Zf=>{"use strict";f();Object.defineProperty(Zf,"__esModule",{value:!0});Zf.merge=void 0;var $Q=AN();function UQ(e){let t=$Q(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>PN(e)),t.once("end",()=>PN(e)),t}Zf.merge=UQ;function PN(e){e.forEach(t=>t.emit("close"))}});var IN=C(ac=>{"use strict";f();Object.defineProperty(ac,"__esModule",{value:!0});ac.isEmpty=ac.isString=void 0;function jQ(e){return typeof e=="string"}ac.isString=jQ;function qQ(e){return e===""}ac.isEmpty=qQ});var ss=C(yr=>{"use strict";f();Object.defineProperty(yr,"__esModule",{value:!0});yr.string=yr.stream=yr.pattern=yr.path=yr.fs=yr.errno=yr.array=void 0;var zQ=Wk();yr.array=zQ;var GQ=Jk();yr.errno=GQ;var HQ=Yk();yr.fs=HQ;var KQ=e2();yr.path=KQ;var VQ=CN();yr.pattern=VQ;var WQ=_N();yr.stream=WQ;var JQ=IN();yr.string=JQ});var ON=C(br=>{"use strict";f();Object.defineProperty(br,"__esModule",{value:!0});br.convertPatternGroupToTask=br.convertPatternGroupsToTasks=br.groupPatternsByBaseDirectory=br.getNegativePatternsAsPositive=br.getPositivePatterns=br.convertPatternsToTasks=br.generate=void 0;var Xn=ss();function YQ(e,t){let r=kN(e,t),n=kN(t.ignore,t),i=NN(r),s=FN(r,n),o=i.filter(u=>Xn.pattern.isStaticPattern(u,t)),a=i.filter(u=>Xn.pattern.isDynamicPattern(u,t)),c=yv(o,s,!1),l=yv(a,s,!0);return c.concat(l)}br.generate=YQ;function kN(e,t){let r=e;return t.braceExpansion&&(r=Xn.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>Xn.pattern.removeDuplicateSlashes(n))}function yv(e,t,r){let n=[],i=Xn.pattern.getPatternsOutsideCurrentDirectory(e),s=Xn.pattern.getPatternsInsideCurrentDirectory(e),o=bv(i),a=bv(s);return n.push(...xv(o,t,r)),"."in a?n.push(vv(".",s,t,r)):n.push(...xv(a,t,r)),n}br.convertPatternsToTasks=yv;function NN(e){return Xn.pattern.getPositivePatterns(e)}br.getPositivePatterns=NN;function FN(e,t){return Xn.pattern.getNegativePatterns(e).concat(t).map(Xn.pattern.convertToPositivePattern)}br.getNegativePatternsAsPositive=FN;function bv(e){let t={};return e.reduce((r,n)=>{let i=Xn.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},t)}br.groupPatternsByBaseDirectory=bv;function xv(e,t,r){return Object.keys(e).map(n=>vv(n,e[n],t,r))}br.convertPatternGroupsToTasks=xv;function vv(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(Xn.pattern.convertToNegativePattern))}}br.convertPatternGroupToTask=vv});var MN=C(em=>{"use strict";f();Object.defineProperty(em,"__esModule",{value:!0});em.read=void 0;function XQ(e,t,r){t.fs.lstat(e,(n,i)=>{if(n!==null){RN(r,n);return}if(!i.isSymbolicLink()||!t.followSymbolicLink){wv(r,i);return}t.fs.stat(e,(s,o)=>{if(s!==null){if(t.throwErrorOnBrokenSymbolicLink){RN(r,s);return}wv(r,i);return}t.markSymbolicLink&&(o.isSymbolicLink=()=>!0),wv(r,o)})})}em.read=XQ;function RN(e,t){e(t)}function wv(e,t){e(null,t)}});var LN=C(tm=>{"use strict";f();Object.defineProperty(tm,"__esModule",{value:!0});tm.read=void 0;function QQ(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}}tm.read=QQ});var BN=C(Rs=>{"use strict";f();Object.defineProperty(Rs,"__esModule",{value:!0});Rs.createFileSystemAdapter=Rs.FILE_SYSTEM_ADAPTER=void 0;var rm=require("fs");Rs.FILE_SYSTEM_ADAPTER={lstat:rm.lstat,stat:rm.stat,lstatSync:rm.lstatSync,statSync:rm.statSync};function ZQ(e){return e===void 0?Rs.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Rs.FILE_SYSTEM_ADAPTER),e)}Rs.createFileSystemAdapter=ZQ});var $N=C(Cv=>{"use strict";f();Object.defineProperty(Cv,"__esModule",{value:!0});var eZ=BN(),Ev=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=eZ.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}};Cv.default=Ev});var Mo=C(Ms=>{"use strict";f();Object.defineProperty(Ms,"__esModule",{value:!0});Ms.statSync=Ms.stat=Ms.Settings=void 0;var UN=MN(),tZ=LN(),Sv=$N();Ms.Settings=Sv.default;function rZ(e,t,r){if(typeof t=="function"){UN.read(e,Dv(),t);return}UN.read(e,Dv(t),r)}Ms.stat=rZ;function nZ(e,t){let r=Dv(t);return tZ.read(e,r)}Ms.statSync=nZ;function Dv(e={}){return e instanceof Sv.default?e:new Sv.default(e)}});var zN=C((yke,qN)=>{f();var jN;qN.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(jN||(jN=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var HN=C((xke,GN)=>{f();GN.exports=sZ;var iZ=zN();function sZ(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 l(){t&&t(c,r),t=null}s?iZ(l):l()}function a(c,l,u){r[c]=u,(--n===0||l)&&o(l)}n?i?i.forEach(function(c){e[c](function(l,u){a(c,l,u)})}):e.forEach(function(c,l){c(function(u,p){a(l,u,p)})}):o(null),s=!1}});var Tv=C(im=>{"use strict";f();Object.defineProperty(im,"__esModule",{value:!0});im.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var nm=process.versions.node.split(".");if(nm[0]===void 0||nm[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var KN=Number.parseInt(nm[0],10),oZ=Number.parseInt(nm[1],10),VN=10,aZ=10,cZ=KN>VN,lZ=KN===VN&&oZ>=aZ;im.IS_SUPPORT_READDIR_WITH_FILE_TYPES=cZ||lZ});var WN=C(sm=>{"use strict";f();Object.defineProperty(sm,"__esModule",{value:!0});sm.createDirentFromStats=void 0;var Av=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 uZ(e,t){return new Av(e,t)}sm.createDirentFromStats=uZ});var Pv=C(om=>{"use strict";f();Object.defineProperty(om,"__esModule",{value:!0});om.fs=void 0;var pZ=WN();om.fs=pZ});var _v=C(am=>{"use strict";f();Object.defineProperty(am,"__esModule",{value:!0});am.joinPathSegments=void 0;function dZ(e,t,r){return e.endsWith(r)?e+t:e+r+t}am.joinPathSegments=dZ});var e8=C(Ls=>{"use strict";f();Object.defineProperty(Ls,"__esModule",{value:!0});Ls.readdir=Ls.readdirWithFileTypes=Ls.read=void 0;var fZ=Mo(),JN=HN(),mZ=Tv(),YN=Pv(),XN=_v();function hZ(e,t,r){if(!t.stats&&mZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES){QN(e,t,r);return}ZN(e,t,r)}Ls.read=hZ;function QN(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,i)=>{if(n!==null){cm(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:XN.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){Iv(r,s);return}let o=s.map(a=>gZ(a,t));JN(o,(a,c)=>{if(a!==null){cm(r,a);return}Iv(r,c)})})}Ls.readdirWithFileTypes=QN;function gZ(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=YN.fs.createDirentFromStats(e.name,i),r(null,e)})}}function ZN(e,t,r){t.fs.readdir(e,(n,i)=>{if(n!==null){cm(r,n);return}let s=i.map(o=>{let a=XN.joinPathSegments(e,o,t.pathSegmentSeparator);return c=>{fZ.stat(a,t.fsStatSettings,(l,u)=>{if(l!==null){c(l);return}let p={name:o,path:a,dirent:YN.fs.createDirentFromStats(o,u)};t.stats&&(p.stats=u),c(null,p)})}});JN(s,(o,a)=>{if(o!==null){cm(r,o);return}Iv(r,a)})})}Ls.readdir=ZN;function cm(e,t){e(t)}function Iv(e,t){e(null,t)}});var s8=C(Bs=>{"use strict";f();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.readdir=Bs.readdirWithFileTypes=Bs.read=void 0;var yZ=Mo(),bZ=Tv(),t8=Pv(),r8=_v();function xZ(e,t){return!t.stats&&bZ.IS_SUPPORT_READDIR_WITH_FILE_TYPES?n8(e,t):i8(e,t)}Bs.read=xZ;function n8(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:r8.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let s=t.fs.statSync(i.path);i.dirent=t8.fs.createDirentFromStats(i.name,s)}catch(s){if(t.throwErrorOnBrokenSymbolicLink)throw s}return i})}Bs.readdirWithFileTypes=n8;function i8(e,t){return t.fs.readdirSync(e).map(n=>{let i=r8.joinPathSegments(e,n,t.pathSegmentSeparator),s=yZ.statSync(i,t.fsStatSettings),o={name:n,path:i,dirent:t8.fs.createDirentFromStats(n,s)};return t.stats&&(o.stats=s),o})}Bs.readdir=i8});var o8=C($s=>{"use strict";f();Object.defineProperty($s,"__esModule",{value:!0});$s.createFileSystemAdapter=$s.FILE_SYSTEM_ADAPTER=void 0;var cc=require("fs");$s.FILE_SYSTEM_ADAPTER={lstat:cc.lstat,stat:cc.stat,lstatSync:cc.lstatSync,statSync:cc.statSync,readdir:cc.readdir,readdirSync:cc.readdirSync};function vZ(e){return e===void 0?$s.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},$s.FILE_SYSTEM_ADAPTER),e)}$s.createFileSystemAdapter=vZ});var a8=C(Nv=>{"use strict";f();Object.defineProperty(Nv,"__esModule",{value:!0});var wZ=require("path"),EZ=Mo(),CZ=o8(),kv=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=CZ.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,wZ.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new EZ.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Nv.default=kv});var lm=C(Us=>{"use strict";f();Object.defineProperty(Us,"__esModule",{value:!0});Us.Settings=Us.scandirSync=Us.scandir=void 0;var c8=e8(),SZ=s8(),Fv=a8();Us.Settings=Fv.default;function DZ(e,t,r){if(typeof t=="function"){c8.read(e,Ov(),t);return}c8.read(e,Ov(t),r)}Us.scandir=DZ;function TZ(e,t){let r=Ov(t);return SZ.read(e,r)}Us.scandirSync=TZ;function Ov(e={}){return e instanceof Fv.default?e:new Fv.default(e)}});var u8=C(($ke,l8)=>{"use strict";f();function AZ(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}}l8.exports=AZ});var d8=C((jke,Rv)=>{"use strict";f();var PZ=u8();function p8(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=PZ(_Z),i=null,s=null,o=0,a=null,c={push:g,drain:Tn,saturated:Tn,pause:u,paused:!1,get concurrency(){return r},set concurrency(w){if(!(w>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=w,!c.paused)for(;i&&o<r;)o++,b()},running:l,resume:h,idle:m,length:p,getQueue:d,unshift:y,empty:Tn,kill:v,killAndDrain:E,error:x};return c;function l(){return o}function u(){c.paused=!0}function p(){for(var w=i,S=0;w;)w=w.next,S++;return S}function d(){for(var w=i,S=[];w;)S.push(w.value),w=w.next;return S}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(w,S){var D=n.get();D.context=e,D.release=b,D.value=w,D.callback=S||Tn,D.errorHandler=a,o>=r||c.paused?s?(s.next=D,s=D):(i=D,s=D,c.saturated()):(o++,t.call(e,D.value,D.worked))}function y(w,S){var D=n.get();D.context=e,D.release=b,D.value=w,D.callback=S||Tn,D.errorHandler=a,o>=r||c.paused?i?(D.next=i,i=D):(i=D,s=D,c.saturated()):(o++,t.call(e,D.value,D.worked))}function b(w){w&&n.release(w);var S=i;S&&o<=r?c.paused?o--:(s===i&&(s=null),i=S.next,S.next=null,t.call(e,S.value,S.worked),s===null&&c.empty()):--o===0&&c.drain()}function v(){i=null,s=null,c.drain=Tn}function E(){i=null,s=null,c.drain(),c.drain=Tn}function x(w){a=w}}function Tn(){}function _Z(){this.value=null,this.callback=Tn,this.next=null,this.release=Tn,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=Tn,e.errorHandler&&s(r,o),i.call(e.context,r,n),e.release(e)}}function IZ(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(u,p){t.call(this,u).then(function(d){p(null,d)},p)}var i=p8(e,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=c,i.drained=l,i;function a(u){var p=new Promise(function(d,h){s(u,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Tn),p}function c(u){var p=new Promise(function(d,h){o(u,function(m,g){if(m){h(m);return}d(g)})});return p.catch(Tn),p}function l(){var u=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 u}}Rv.exports=p8;Rv.exports.promise=IZ});var um=C(Ai=>{"use strict";f();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.joinPathSegments=Ai.replacePathSegmentSeparator=Ai.isAppliedFilter=Ai.isFatalError=void 0;function kZ(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}Ai.isFatalError=kZ;function NZ(e,t){return e===null||e(t)}Ai.isAppliedFilter=NZ;function FZ(e,t){return e.split(/[/\\]/).join(t)}Ai.replacePathSegmentSeparator=FZ;function OZ(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}Ai.joinPathSegments=OZ});var Bv=C(Lv=>{"use strict";f();Object.defineProperty(Lv,"__esModule",{value:!0});var RZ=um(),Mv=class{constructor(t,r){this._root=t,this._settings=r,this._root=RZ.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Lv.default=Mv});var jv=C(Uv=>{"use strict";f();Object.defineProperty(Uv,"__esModule",{value:!0});var MZ=require("events"),LZ=lm(),BZ=d8(),pm=um(),$Z=Bv(),$v=class extends $Z.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=LZ.scandir,this._emitter=new MZ.EventEmitter,this._queue=BZ(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||!pm.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=pm.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),pm.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&pm.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Uv.default=$v});var f8=C(zv=>{"use strict";f();Object.defineProperty(zv,"__esModule",{value:!0});var UZ=jv(),qv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new UZ.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{jZ(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{qZ(t,this._storage)}),this._reader.read()}};zv.default=qv;function jZ(e,t){e(t)}function qZ(e,t){e(null,t)}});var m8=C(Hv=>{"use strict";f();Object.defineProperty(Hv,"__esModule",{value:!0});var zZ=require("stream"),GZ=jv(),Gv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new GZ.default(this._root,this._settings),this._stream=new zZ.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}};Hv.default=Gv});var h8=C(Vv=>{"use strict";f();Object.defineProperty(Vv,"__esModule",{value:!0});var HZ=lm(),dm=um(),KZ=Bv(),Kv=class extends KZ.default{constructor(){super(...arguments),this._scandir=HZ.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(dm.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=dm.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),dm.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&dm.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};Vv.default=Kv});var g8=C(Jv=>{"use strict";f();Object.defineProperty(Jv,"__esModule",{value:!0});var VZ=h8(),Wv=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new VZ.default(this._root,this._settings)}read(){return this._reader.read()}};Jv.default=Wv});var y8=C(Xv=>{"use strict";f();Object.defineProperty(Xv,"__esModule",{value:!0});var WZ=require("path"),JZ=lm(),Yv=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,WZ.sep),this.fsScandirSettings=new JZ.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}};Xv.default=Yv});var mm=C(Pi=>{"use strict";f();Object.defineProperty(Pi,"__esModule",{value:!0});Pi.Settings=Pi.walkStream=Pi.walkSync=Pi.walk=void 0;var b8=f8(),YZ=m8(),XZ=g8(),Qv=y8();Pi.Settings=Qv.default;function QZ(e,t,r){if(typeof t=="function"){new b8.default(e,fm()).read(t);return}new b8.default(e,fm(t)).read(r)}Pi.walk=QZ;function ZZ(e,t){let r=fm(t);return new XZ.default(e,r).read()}Pi.walkSync=ZZ;function eee(e,t){let r=fm(t);return new YZ.default(e,r).read()}Pi.walkStream=eee;function fm(e={}){return e instanceof Qv.default?e:new Qv.default(e)}});var hm=C(e0=>{"use strict";f();Object.defineProperty(e0,"__esModule",{value:!0});var tee=require("path"),ree=Mo(),x8=ss(),Zv=class{constructor(t){this._settings=t,this._fsStatSettings=new ree.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return tee.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:x8.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!x8.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};e0.default=Zv});var n0=C(r0=>{"use strict";f();Object.defineProperty(r0,"__esModule",{value:!0});var nee=require("stream"),iee=Mo(),see=mm(),oee=hm(),t0=class extends oee.default{constructor(){super(...arguments),this._walkStream=see.walkStream,this._stat=iee.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),i=new nee.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))})}};r0.default=t0});var v8=C(s0=>{"use strict";f();Object.defineProperty(s0,"__esModule",{value:!0});var aee=mm(),cee=hm(),lee=n0(),i0=class extends cee.default{constructor(){super(...arguments),this._walkAsync=aee.walk,this._readerStream=new lee.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))})}};s0.default=i0});var w8=C(a0=>{"use strict";f();Object.defineProperty(a0,"__esModule",{value:!0});var xu=ss(),o0=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 xu.pattern.getPatternParts(t,this._micromatchOptions).map(n=>xu.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:xu.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return xu.array.splitWhen(t,r=>r.dynamic&&xu.pattern.hasGlobStar(r.pattern))}};a0.default=o0});var E8=C(l0=>{"use strict";f();Object.defineProperty(l0,"__esModule",{value:!0});var uee=w8(),c0=class extends uee.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,l)=>{let u=s.segments[l];return!!(u.dynamic&&u.patternRe.test(c)||!u.dynamic&&u.pattern===c)}))return!0}return!1}};l0.default=c0});var C8=C(p0=>{"use strict";f();Object.defineProperty(p0,"__esModule",{value:!0});var gm=ss(),pee=E8(),u0=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 pee.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(gm.pattern.isAffectDepthOfReadingPattern);return gm.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,i){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=gm.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!gm.pattern.matchAny(t,r)}};p0.default=u0});var S8=C(f0=>{"use strict";f();Object.defineProperty(f0,"__esModule",{value:!0});var js=ss(),d0=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let[n,i]=js.pattern.partitionAbsoluteAndRelative(r),s={positive:{all:js.pattern.convertPatternsToRe(t,this._micromatchOptions)},negative:{absolute:js.pattern.convertPatternsToRe(n,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:js.pattern.convertPatternsToRe(i,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return o=>this._filter(o,s)}_filter(t,r){let n=js.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=js.path.makeAbsolute(this._settings.cwd,t);return this._isMatchToPatterns(i,r,n)}_isMatchToPatterns(t,r,n){if(r.length===0)return!1;let i=js.pattern.matchAny(t,r);return!i&&n?js.pattern.matchAny(t+"/",r):i}};f0.default=d0});var D8=C(h0=>{"use strict";f();Object.defineProperty(h0,"__esModule",{value:!0});var dee=ss(),m0=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return dee.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};h0.default=m0});var A8=C(y0=>{"use strict";f();Object.defineProperty(y0,"__esModule",{value:!0});var T8=ss(),g0=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=T8.path.makeAbsolute(this._settings.cwd,r),r=T8.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};y0.default=g0});var ym=C(x0=>{"use strict";f();Object.defineProperty(x0,"__esModule",{value:!0});var fee=require("path"),mee=C8(),hee=S8(),gee=D8(),yee=A8(),b0=class{constructor(t){this._settings=t,this.errorFilter=new gee.default(this._settings),this.entryFilter=new hee.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new mee.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new yee.default(this._settings)}_getRootDirectory(t){return fee.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}}};x0.default=b0});var P8=C(w0=>{"use strict";f();Object.defineProperty(w0,"__esModule",{value:!0});var bee=v8(),xee=ym(),v0=class extends xee.default{constructor(){super(...arguments),this._reader=new bee.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)}};w0.default=v0});var _8=C(C0=>{"use strict";f();Object.defineProperty(C0,"__esModule",{value:!0});var vee=require("stream"),wee=n0(),Eee=ym(),E0=class extends Eee.default{constructor(){super(...arguments),this._reader=new wee.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),i=this.api(r,t,n),s=new vee.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)}};C0.default=E0});var I8=C(D0=>{"use strict";f();Object.defineProperty(D0,"__esModule",{value:!0});var Cee=Mo(),See=mm(),Dee=hm(),S0=class extends Dee.default{constructor(){super(...arguments),this._walkSync=See.walkSync,this._statSync=Cee.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)}};D0.default=S0});var k8=C(A0=>{"use strict";f();Object.defineProperty(A0,"__esModule",{value:!0});var Tee=I8(),Aee=ym(),T0=class extends Aee.default{constructor(){super(...arguments),this._reader=new Tee.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)}};A0.default=T0});var N8=C(uc=>{"use strict";f();Object.defineProperty(uc,"__esModule",{value:!0});uc.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var lc=require("fs"),Pee=require("os"),_ee=Math.max(Pee.cpus().length,1);uc.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:lc.lstat,lstatSync:lc.lstatSync,stat:lc.stat,statSync:lc.statSync,readdir:lc.readdir,readdirSync:lc.readdirSync};var P0=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,_ee),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({},uc.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};uc.default=P0});var N0=C((L2e,O8)=>{"use strict";f();var F8=ON(),Iee=P8(),kee=_8(),Nee=k8(),_0=N8(),An=ss();async function I0(e,t){Qn(e);let r=k0(e,Iee.default,t),n=await Promise.all(r);return An.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(l,u){Qn(l);let p=k0(l,Nee.default,u);return An.array.flatten(p)}e.sync=t;function r(l,u){Qn(l);let p=k0(l,kee.default,u);return An.stream.merge(p)}e.stream=r;function n(l,u){Qn(l);let p=[].concat(l),d=new _0.default(u);return F8.generate(p,d)}e.generateTasks=n;function i(l,u){Qn(l);let p=new _0.default(u);return An.pattern.isDynamicPattern(l,p)}e.isDynamicPattern=i;function s(l){return Qn(l),An.path.escape(l)}e.escapePath=s;function o(l){return Qn(l),An.path.convertPathToPattern(l)}e.convertPathToPattern=o;let a;(function(l){function u(d){return Qn(d),An.path.escapePosixPath(d)}l.escapePath=u;function p(d){return Qn(d),An.path.convertPosixPathToPattern(d)}l.convertPathToPattern=p})(a=e.posix||(e.posix={}));let c;(function(l){function u(d){return Qn(d),An.path.escapeWindowsPath(d)}l.escapePath=u;function p(d){return Qn(d),An.path.convertWindowsPathToPattern(d)}l.convertPathToPattern=p})(c=e.win32||(e.win32={}))})(I0||(I0={}));function k0(e,t,r){let n=[].concat(e),i=new _0.default(r),s=F8.generate(n,i),o=new t(i);return s.map(o.read,o)}function Qn(e){if(![].concat(e).every(n=>An.string.isString(n)&&!An.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}O8.exports=I0});var nO=C(($Fe,nw)=>{"use strict";f();var vte=Object.prototype.hasOwnProperty,kr="~";function _u(){}Object.create&&(_u.prototype=Object.create(null),new _u().__proto__||(kr=!1));function wte(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function rO(e,t,r,n,i){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new wte(r,n||e,i),o=kr?kr+t:t;return e._events[o]?e._events[o].fn?e._events[o]=[e._events[o],s]:e._events[o].push(s):(e._events[o]=s,e._eventsCount++),e}function Tm(e,t){--e._eventsCount===0?e._events=new _u:delete e._events[t]}function xr(){this._events=new _u,this._eventsCount=0}xr.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)vte.call(r,n)&&t.push(kr?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};xr.prototype.listeners=function(t){var r=kr?kr+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};xr.prototype.listenerCount=function(t){var r=kr?kr+t:t,n=this._events[r];return n?n.fn?1:n.length:0};xr.prototype.emit=function(t,r,n,i,s,o){var a=kr?kr+t:t;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,u,p;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,n),!0;case 4:return c.fn.call(c.context,r,n,i),!0;case 5:return c.fn.call(c.context,r,n,i,s),!0;case 6:return c.fn.call(c.context,r,n,i,s,o),!0}for(p=1,u=new Array(l-1);p<l;p++)u[p-1]=arguments[p];c.fn.apply(c.context,u)}else{var d=c.length,h;for(p=0;p<d;p++)switch(c[p].once&&this.removeListener(t,c[p].fn,void 0,!0),l){case 1:c[p].fn.call(c[p].context);break;case 2:c[p].fn.call(c[p].context,r);break;case 3:c[p].fn.call(c[p].context,r,n);break;case 4:c[p].fn.call(c[p].context,r,n,i);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];c[p].fn.apply(c[p].context,u)}}return!0};xr.prototype.on=function(t,r,n){return rO(this,t,r,n,!1)};xr.prototype.once=function(t,r,n){return rO(this,t,r,n,!0)};xr.prototype.removeListener=function(t,r,n,i){var s=kr?kr+t:t;if(!this._events[s])return this;if(!r)return Tm(this,s),this;var o=this._events[s];if(o.fn)o.fn===r&&(!i||o.once)&&(!n||o.context===n)&&Tm(this,s);else{for(var a=0,c=[],l=o.length;a<l;a++)(o[a].fn!==r||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:Tm(this,s)}return this};xr.prototype.removeAllListeners=function(t){var r;return t?(r=kr?kr+t:t,this._events[r]&&Tm(this,r)):(this._events=new _u,this._eventsCount=0),this};xr.prototype.off=xr.prototype.removeListener;xr.prototype.addListener=xr.prototype.on;xr.prefixed=kr;xr.EventEmitter=xr;typeof nw<"u"&&(nw.exports=xr)});var sO=C((jFe,iO)=>{"use strict";f();iO.exports=function(t,r){if(r=r.split(":")[0],t=+t,!t)return!1;switch(r){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}});var Am=C(aO=>{f();var cs=aO,Ete=require("url"),oO=require("util")._extend,Cte=sO(),Ste=/(^|,)\s*upgrade\s*($|,)/i,iw=/^https|wss/;cs.isSSL=iw;cs.setupOutgoing=function(e,t,r,n){e.port=t[n||"target"].port||(iw.test(t[n||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(a){e[a]=t[n||"target"][a]}),e.method=t.method||r.method,e.headers=oO({},r.headers),t.headers&&oO(e.headers,t.headers),t.auth&&(e.auth=t.auth),t.ca&&(e.ca=t.ca),iw.test(t[n||"target"].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"||!Ste.test(e.headers.connection))&&(e.headers.connection="close"));var i=t[n||"target"],s=i&&t.prependPath!==!1&&i.path||"",o=t.toProxy?r.url:Ete.parse(r.url).path||"";return o=t.ignorePath?"":o,e.path=cs.urlJoin(s,o),t.changeOrigin&&(e.headers.host=Cte(e.port,t[n||"target"].protocol)&&!Dte(e.host)?e.host+":"+e.port:e.host),e};cs.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};cs.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:cs.hasEncryptedConnection(e)?"443":"80"};cs.hasEncryptedConnection=function(e){return!!(e.connection.encrypted||e.connection.pair)};cs.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],n=r.split("?"),i;return e[t]=n.shift(),i=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],i.push.apply(i,n),i.join("?")};cs.rewriteCookieProperty=function e(t,r,n){return Array.isArray(t)?t.map(function(i){return e(i,r,n)}):t.replace(new RegExp("(;\\s*"+n+"=)([^;]+)","i"),function(i,s,o){var a;if(o in r)a=r[o];else if("*"in r)a=r["*"];else return i;return a?s+a:""})};function Dte(e){return!!~e.indexOf(":")}});var pO=C((HFe,uO)=>{f();var cO=require("url"),lO=Am(),Tte=/^201|30(1|2|7|8)$/;uO.exports={removeChunked:function(t,r,n){t.httpVersion==="1.0"&&delete n.headers["transfer-encoding"]},setConnection:function(t,r,n){t.httpVersion==="1.0"?n.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!n.headers.connection&&(n.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,n,i){if((i.hostRewrite||i.autoRewrite||i.protocolRewrite)&&n.headers.location&&Tte.test(n.statusCode)){var s=cO.parse(i.target),o=cO.parse(n.headers.location);if(s.host!=o.host)return;i.hostRewrite?o.host=i.hostRewrite:i.autoRewrite&&(o.host=t.headers.host),i.protocolRewrite&&(o.protocol=i.protocolRewrite),n.headers.location=o.format()}},writeHeaders:function(t,r,n,i){var s=i.cookieDomainRewrite,o=i.cookiePathRewrite,a=i.preserveHeaderKeyCase,c,l=function(d,h){h!=null&&(s&&d.toLowerCase()==="set-cookie"&&(h=lO.rewriteCookieProperty(h,s,"domain")),o&&d.toLowerCase()==="set-cookie"&&(h=lO.rewriteCookieProperty(h,o,"path")),r.setHeader(String(d).trim(),h))};if(typeof s=="string"&&(s={"*":s}),typeof o=="string"&&(o={"*":o}),a&&n.rawHeaders!=null){c={};for(var u=0;u<n.rawHeaders.length;u+=2){var p=n.rawHeaders[u];c[p.toLowerCase()]=p}}Object.keys(n.headers).forEach(function(d){var h=n.headers[d];a&&c&&(d=c[d]||d),l(d,h)})},writeStatusCode:function(t,r,n){n.statusMessage?(r.statusCode=n.statusCode,r.statusMessage=n.statusMessage):r.statusCode=n.statusCode}}});var sw=C((VFe,dO)=>{f();var yc=1e3,bc=yc*60,xc=bc*60,Uo=xc*24,Ate=Uo*7,Pte=Uo*365.25;dO.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return _te(e);if(r==="number"&&isFinite(e))return t.long?kte(e):Ite(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function _te(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*Pte;case"weeks":case"week":case"w":return r*Ate;case"days":case"day":case"d":return r*Uo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*xc;case"minutes":case"minute":case"mins":case"min":case"m":return r*bc;case"seconds":case"second":case"secs":case"sec":case"s":return r*yc;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Ite(e){var t=Math.abs(e);return t>=Uo?Math.round(e/Uo)+"d":t>=xc?Math.round(e/xc)+"h":t>=bc?Math.round(e/bc)+"m":t>=yc?Math.round(e/yc)+"s":e+"ms"}function kte(e){var t=Math.abs(e);return t>=Uo?Pm(e,t,Uo,"day"):t>=xc?Pm(e,t,xc,"hour"):t>=bc?Pm(e,t,bc,"minute"):t>=yc?Pm(e,t,yc,"second"):e+" ms"}function Pm(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var ow=C((JFe,fO)=>{f();function Nte(e){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=sw(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let p=0;for(let d=0;d<u.length;d++)p=(p<<5)-p+u.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(u){let p,d=null,h,m;function g(...y){if(!g.enabled)return;let b=g,v=Number(new Date),E=v-(p||v);b.diff=E,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,(S,D)=>{if(S==="%%")return"%";x++;let _=r.formatters[D];if(typeof _=="function"){let O=y[x];S=_.call(b,O),y.splice(x,1),x--}return S}),r.formatArgs.call(b,y),(b.log||r.log).apply(b,y)}return g.namespace=u,g.useColors=r.useColors(),g.color=r.selectColor(u),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(u)),m),set:y=>{d=y}}),typeof r.init=="function"&&r.init(g),g}function n(u,p){let d=r(this.namespace+(typeof p>"u"?":":p)+u);return d.log=this.log,d}function i(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let p=(typeof u=="string"?u:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(u,p){let d=0,h=0,m=-1,g=0;for(;d<u.length;)if(h<p.length&&(p[h]===u[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 u=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),u}function a(u){for(let p of r.skips)if(s(u,p))return!1;for(let p of r.names)if(s(u,p))return!0;return!1}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){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}fO.exports=Nte});var mO=C((pn,_m)=>{f();pn.formatArgs=Ote;pn.save=Rte;pn.load=Mte;pn.useColors=Fte;pn.storage=Lte();pn.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`."))}})();pn.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 Fte(){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 Ote(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+_m.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)}pn.log=console.debug||console.log||(()=>{});function Rte(e){try{e?pn.storage.setItem("debug",e):pn.storage.removeItem("debug")}catch{}}function Mte(){let e;try{e=pn.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Lte(){try{return localStorage}catch{}}_m.exports=ow()(pn);var{formatters:Bte}=_m.exports;Bte.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var gO=C((QFe,hO)=>{"use strict";f();hO.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 xO=C((eOe,bO)=>{"use strict";f();var $te=require("os"),yO=require("tty"),Pn=gO(),{env:Jt}=process,Ks;Pn("no-color")||Pn("no-colors")||Pn("color=false")||Pn("color=never")?Ks=0:(Pn("color")||Pn("colors")||Pn("color=true")||Pn("color=always"))&&(Ks=1);"FORCE_COLOR"in Jt&&(Jt.FORCE_COLOR==="true"?Ks=1:Jt.FORCE_COLOR==="false"?Ks=0:Ks=Jt.FORCE_COLOR.length===0?1:Math.min(parseInt(Jt.FORCE_COLOR,10),3));function aw(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cw(e,t){if(Ks===0)return 0;if(Pn("color=16m")||Pn("color=full")||Pn("color=truecolor"))return 3;if(Pn("color=256"))return 2;if(e&&!t&&Ks===void 0)return 0;let r=Ks||0;if(Jt.TERM==="dumb")return r;if(process.platform==="win32"){let n=$te.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in Jt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in Jt)||Jt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in Jt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Jt.TEAMCITY_VERSION)?1:0;if(Jt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Jt){let n=parseInt((Jt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Jt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Jt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Jt.TERM)||"COLORTERM"in Jt?1:r}function Ute(e){let t=cw(e,e&&e.isTTY);return aw(t)}bO.exports={supportsColor:Ute,stdout:aw(cw(!0,yO.isatty(1))),stderr:aw(cw(!0,yO.isatty(2)))}});var wO=C((Yt,km)=>{f();var jte=require("tty"),Im=require("util");Yt.init=Wte;Yt.log=Hte;Yt.formatArgs=zte;Yt.save=Kte;Yt.load=Vte;Yt.useColors=qte;Yt.destroy=Im.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Yt.colors=[6,2,3,4,5,1];try{let e=xO();e&&(e.stderr||e).level>=2&&(Yt.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{}Yt.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 qte(){return"colors"in Yt.inspectOpts?!!Yt.inspectOpts.colors:jte.isatty(process.stderr.fd)}function zte(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+"+km.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Gte()+t+" "+e[0]}function Gte(){return Yt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Hte(...e){return process.stderr.write(Im.formatWithOptions(Yt.inspectOpts,...e)+`
|
|
26
26
|
`)}function Kte(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Vte(){return process.env.DEBUG}function Wte(e){e.inspectOpts={};let t=Object.keys(Yt.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Yt.inspectOpts[t[r]]}km.exports=ow()(Yt);var{formatters:vO}=km.exports;vO.o=function(e){return this.inspectOpts.colors=this.useColors,Im.inspect(e,this.inspectOpts).split(`
|
|
@@ -102,7 +102,7 @@ Please see the 3.x to 4.x migration guide for details on how to update your app.
|
|
|
102
102
|
`+Object.keys(n).map(i=>`${i}: ${n[i]}`).join(`\r
|
|
103
103
|
`)+`\r
|
|
104
104
|
\r
|
|
105
|
-
`+r)}function pa(e,t,r,n,i){if(e.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,pa),e.emit("wsClientError",s,r,t)}else Qp(r,n,i)}});var cbe={};TS(cbe,{default:()=>abe});module.exports=KU(cbe);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]="64fb5ccb-9a79-4623-8d95-ab6b2b3647cb",e._sentryDebugIdIdentifier="sentry-dbid-64fb5ccb-9a79-4623-8d95-ab6b2b3647cb")}catch{}f();var IU=require("../core/index.cjs"),kU=require("../node/index.cjs"),NU=require("../server/index.cjs"),FU=j(_S(),1);f();f();var xg=require("fs/promises");f();var qg=j(require("prettier"),1),IS=require("module"),kS=j(require("path"),1);function WU(e){if(!e)return qg.default;try{let r=(0,IS.createRequire)(e)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return qg.default}}async function Zr(e,t,r,n){try{let i=kS.default.resolve(e,n??"file.tsx"),s=WU(i),o=await s.resolveConfig(i);return o?await s.format(t,{...o,filepath:n,parser:r}):await s.format(t,{filepath:n,parser:r})}catch{return t}}f();var C$=require("http");f();var zg="preview-url";var fa="framework",nd="platform",id="node",NS="/~builder-connect",po="/~builder-connected",Gg="/~builder-dev-tools",Hg="/~builder-dev-tools.js",fo="/~builder-dev-tools-close",FS="/mappings";var S$=require("os"),$i=require("path"),ii=require("fs");f();var md=require("util");f();var ur=j(sd(),1),ha=require("process"),vs=j(require("readline"),1),Xg=j(require("readline"),1),HS=require("stream"),KS=j(ut(),1);function tj({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var rj=tj();function VS(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(rj,"")}function WS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var JS={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),l=0;l<c.length;l++){var u=c[l],p=t.length(u);if(a>=i-(p==2?1:0))if(a+p<=s)o+=u;else break;a+=p}return o}})(JS);var nj=JS.exports,ij=WS(nj),sj=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},oj=WS(sj);function ml(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=VS(e),e.length===0))return 0;e=e.replace(oj()," ");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(ij.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Jg=10,LS=(e=0)=>t=>`\x1B[${t+e}m`,BS=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,$S=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,yt={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(yt.modifier);var aj=Object.keys(yt.color),cj=Object.keys(yt.bgColor);[...aj,...cj];function lj(){let e=new Map;for(let[t,r]of Object.entries(yt)){for(let[n,i]of Object.entries(r))yt[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=yt[n],e.set(i[0],i[1]);Object.defineProperty(yt,t,{value:r,enumerable:!1})}return Object.defineProperty(yt,"codes",{value:e,enumerable:!1}),yt.color.close="\x1B[39m",yt.bgColor.close="\x1B[49m",yt.color.ansi=LS(),yt.color.ansi256=BS(),yt.color.ansi16m=$S(),yt.bgColor.ansi=LS(Jg),yt.bgColor.ansi256=BS(Jg),yt.bgColor.ansi16m=$S(Jg),Object.defineProperties(yt,{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=>yt.rgbToAnsi256(...yt.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)=>yt.ansi256ToAnsi(yt.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>yt.ansi256ToAnsi(yt.hexToAnsi256(t)),enumerable:!1}}),yt}var uj=lj(),fd=new Set(["\x1B","\x9B"]),pj=39,Zg="\x07",YS="[",dj="]",XS="m",ey=`${dj}8;;`,US=e=>`${fd.values().next().value}${YS}${e}${XS}`,jS=e=>`${fd.values().next().value}${ey}${e}${Zg}`,fj=e=>e.split(" ").map(t=>ml(t)),Yg=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=ml(VS(e[e.length-1]));for(let[a,c]of n.entries()){let l=ml(c);if(o+l<=r?e[e.length-1]+=c:(e.push(c),o=0),fd.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(ey)),i){s?c===Zg&&(i=!1,s=!1):c===XS&&(i=!1);continue}o+=l,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())},mj=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(ml(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},hj=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=fj(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=ml(a[a.length-1]);if(l!==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[l]>t){let d=t-p,h=1+Math.floor((o[l]-d-1)/t);Math.floor((o[l]-1)/t)<h&&a.push(""),Yg(a,u,t);continue}if(p+o[l]>t&&p>0&&o[l]>0){if(r.wordWrap===!1&&p<t){Yg(a,u,t);continue}a.push("")}if(p+o[l]>t&&r.wordWrap===!1){Yg(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>mj(l)));let c=[...a.join(`
|
|
105
|
+
`+r)}function pa(e,t,r,n,i){if(e.listenerCount("wsClientError")){let s=new Error(i);Error.captureStackTrace(s,pa),e.emit("wsClientError",s,r,t)}else Qp(r,n,i)}});var cbe={};TS(cbe,{default:()=>abe});module.exports=KU(cbe);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]="1daf9891-eff1-4cb9-8916-e772c5187632",e._sentryDebugIdIdentifier="sentry-dbid-1daf9891-eff1-4cb9-8916-e772c5187632")}catch{}f();var IU=require("../core/index.cjs"),kU=require("../node/index.cjs"),NU=require("../server/index.cjs"),FU=j(_S(),1);f();f();var xg=require("fs/promises");f();var qg=j(require("prettier"),1),IS=require("module"),kS=j(require("path"),1);function WU(e){if(!e)return qg.default;try{let r=(0,IS.createRequire)(e)("prettier");if(!r)throw new Error("Prettier not found");return r}catch{return qg.default}}async function Zr(e,t,r,n){try{let i=kS.default.resolve(e,n??"file.tsx"),s=WU(i),o=await s.resolveConfig(i);return o?await s.format(t,{...o,filepath:n,parser:r}):await s.format(t,{filepath:n,parser:r})}catch{return t}}f();var C$=require("http");f();var zg="preview-url";var fa="framework",nd="platform",id="node",NS="/~builder-connect",po="/~builder-connected",Gg="/~builder-dev-tools",Hg="/~builder-dev-tools.js",fo="/~builder-dev-tools-close",FS="/mappings";var S$=require("os"),$i=require("path"),ii=require("fs");f();var md=require("util");f();var ur=j(sd(),1),ha=require("process"),vs=j(require("readline"),1),Xg=j(require("readline"),1),HS=require("stream"),KS=j(ut(),1);function tj({onlyFirst:e=!1}={}){let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}var rj=tj();function VS(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(rj,"")}function WS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var JS={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),l=0;l<c.length;l++){var u=c[l],p=t.length(u);if(a>=i-(p==2?1:0))if(a+p<=s)o+=u;else break;a+=p}return o}})(JS);var nj=JS.exports,ij=WS(nj),sj=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},oj=WS(sj);function ml(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=VS(e),e.length===0))return 0;e=e.replace(oj()," ");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(ij.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var Jg=10,LS=(e=0)=>t=>`\x1B[${t+e}m`,BS=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,$S=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,yt={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(yt.modifier);var aj=Object.keys(yt.color),cj=Object.keys(yt.bgColor);[...aj,...cj];function lj(){let e=new Map;for(let[t,r]of Object.entries(yt)){for(let[n,i]of Object.entries(r))yt[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=yt[n],e.set(i[0],i[1]);Object.defineProperty(yt,t,{value:r,enumerable:!1})}return Object.defineProperty(yt,"codes",{value:e,enumerable:!1}),yt.color.close="\x1B[39m",yt.bgColor.close="\x1B[49m",yt.color.ansi=LS(),yt.color.ansi256=BS(),yt.color.ansi16m=$S(),yt.bgColor.ansi=LS(Jg),yt.bgColor.ansi256=BS(Jg),yt.bgColor.ansi16m=$S(Jg),Object.defineProperties(yt,{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=>yt.rgbToAnsi256(...yt.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)=>yt.ansi256ToAnsi(yt.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>yt.ansi256ToAnsi(yt.hexToAnsi256(t)),enumerable:!1}}),yt}var uj=lj(),fd=new Set(["\x1B","\x9B"]),pj=39,Zg="\x07",YS="[",dj="]",XS="m",ey=`${dj}8;;`,US=e=>`${fd.values().next().value}${YS}${e}${XS}`,jS=e=>`${fd.values().next().value}${ey}${e}${Zg}`,fj=e=>e.split(" ").map(t=>ml(t)),Yg=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=ml(VS(e[e.length-1]));for(let[a,c]of n.entries()){let l=ml(c);if(o+l<=r?e[e.length-1]+=c:(e.push(c),o=0),fd.has(c)&&(i=!0,s=n.slice(a+1).join("").startsWith(ey)),i){s?c===Zg&&(i=!1,s=!1):c===XS&&(i=!1);continue}o+=l,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())},mj=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(ml(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},hj=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=fj(e),a=[""];for(let[l,u]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=ml(a[a.length-1]);if(l!==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[l]>t){let d=t-p,h=1+Math.floor((o[l]-d-1)/t);Math.floor((o[l]-1)/t)<h&&a.push(""),Yg(a,u,t);continue}if(p+o[l]>t&&p>0&&o[l]>0){if(r.wordWrap===!1&&p<t){Yg(a,u,t);continue}a.push("")}if(p+o[l]>t&&r.wordWrap===!1){Yg(a,u,t);continue}a[a.length-1]+=u}r.trim!==!1&&(a=a.map(l=>mj(l)));let c=[...a.join(`
|
|
106
106
|
`)];for(let[l,u]of c.entries()){if(n+=u,fd.has(u)){let{groups:d}=new RegExp(`(?:\\${YS}(?<code>\\d+)m|\\${ey}(?<uri>.*)${Zg})`).exec(c.slice(l).join(""))||{groups:{}};if(d.code!==void 0){let h=Number.parseFloat(d.code);i=h===pj?void 0:h}else d.uri!==void 0&&(s=d.uri.length===0?void 0:d.uri)}let p=uj.codes.get(Number(i));c[l+1]===`
|
|
107
107
|
`?(s&&(n+=jS("")),i&&p&&(n+=US(p))):u===`
|
|
108
108
|
`&&(i&&p&&(n+=US(i)),s&&(n+=jS(s)))}return n};function qS(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
@@ -169,7 +169,7 @@ ${tD}${n.trimStart()}`),r=3+(0,md.stripVTControlCharacters)(n.trimStart()).lengt
|
|
|
169
169
|
`),m(),i()};return{start:v,stop:E,message:(x="")=>{a=y(x??a)}}};var oo=j(ut(),1);f();var be=j(require("typescript"),1);var he=j(ut(),1);f();f();function ke(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function xd(e,t=""){let r=ke(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function zt(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()+`
|
|
170
170
|
`:n.printNode(e.ts.EmitHint.Unspecified,t,e.ts.createSourceFile("module.tsx","",e.ts.ScriptTarget.Latest)).trim()+`
|
|
171
171
|
`}return""}f();var dD=j(uD(),1);function pr(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function Ne(e,t,r){t=$n(t),r=$n(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=$n(e.normalize(i)),i.startsWith(".")||(i="./"+i),i}function $n(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function mo(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),i=n[n.length-1];return pD(i==="index"?e.basename(e.dirname(t)):i)}function pD(e){return nt(e).replace(/ /g,"")}function gn(e,t){let r=e.extname(t),n=$n(e.basename(t,r)).split("/").pop();return nt(n==="index"?e.basename(e.dirname(t)):n)}function it(e,t){let r=$n(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 $e(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 nt(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 $r(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function tt(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 fD(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function hl(e){return typeof e=="number"}function ya(e){return typeof e=="boolean"}function wr(e){return typeof e=="string"}function ba(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function tn(e){return JSON.parse(JSON.stringify(e))}function vd(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function mD(){try{let e=(0,dD.default)();if(e?.name)return e.name}catch{}return"npm"}function Nj(){return process.platform.startsWith("win")}function Er(){return Nj()?'"@builder.io/dev-tools"':"builder.io"}function oy(e){return e.replace(/[^a-zA-Z0-9-_]/g,"_")}f();function Cr(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var Fj=["node_modules","dist","build","public"];async function Ur(e,t){async function r(i,s){if(s>10)return;let o=await e.readdir(i);for(let a of o){if(Fj.includes(a))continue;let c=e.join(i,a),l=await e.stat(c);if(l){if(l.isFile()&&a.startsWith("builder-registry."))return c;if(l.isDirectory()){let u=await r(c,s+1);if(u)return u}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await Cr(e)?"ts":"js"}`;return e.join(t,s)}return n}async function Un(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 hD(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 gl(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 gl(e,o,r);if(c)return c}}))).find(s=>typeof s=="string")}async function Ut(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await hD(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=yl.get(a);if(!c){try{e.statSync(a).isFile()?c={exists:!0,content:e.readFileSync(a)}:c={exists:!1}}catch{c={exists:!1}}yl.set(a,c)}return c.exists}if(!s.has(a))if(e.existsSync(a)){let l=e.statSync(a);s.set(a,l.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:()=>`
|
|
172
|
-
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let l=yl.get(a);if(l)return ke(e,l.content)}let c;try{c=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let l=e.basename(a),u=e.extname(l).toLowerCase();if(a.startsWith(i)&&u===".ts"&&(c=yD.get(l),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new Ed(l)}return a.includes("node_modules")&&(c?yl.set(a,{exists:!0,content:c}):yl.set(a,{exists:!1})),ke(e,c)},readFile:a=>{let c=e.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return Oj(e,o,t,r)}catch(a){if(a instanceof Ed){await Rj(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function Oj(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=gD.get(s);if(!o){let a=e.ts.readConfigFile(s,c=>{let l=e.readFileSync(c);return typeof l=="string"?l: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:(l,u)=>e.readdirSync(l),fileExists:l=>e.existsSync(l),readFile:l=>e.readFileSync(l)||void 0},e.dirname(s),void 0,s).options,gD.set(s,o))}o&&(i.options=tn(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=e.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),e.ts.createProgram(i)}async function xa(e,t,r){r||(r=await Ut(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}var Ed=class{constructor(t){this.libName=t}};async function Rj(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;wd.has(t)||wd.set(t,fetch(r).then(n=>n.text()).then(n=>{yD.set(t,n)})),await wd.get(t),wd.delete(t)}var yD=new Map,wd=new Map,yl=new Map,gD=new Map;async function bD(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:ay(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function ay(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 Mj="1.6.
|
|
172
|
+
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let l=yl.get(a);if(l)return ke(e,l.content)}let c;try{c=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),c==null}if(c==null){let l=e.basename(a),u=e.extname(l).toLowerCase();if(a.startsWith(i)&&u===".ts"&&(c=yD.get(l),c==null&&typeof self<"u"&&typeof fetch=="function"))throw new Ed(l)}return a.includes("node_modules")&&(c?yl.set(a,{exists:!0,content:c}):yl.set(a,{exists:!1})),ke(e,c)},readFile:a=>{let c=e.readFileSync(a);return typeof c=="string"?c:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return Oj(e,o,t,r)}catch(a){if(a instanceof Ed){await Rj(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function Oj(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=gD.get(s);if(!o){let a=e.ts.readConfigFile(s,c=>{let l=e.readFileSync(c);return typeof l=="string"?l: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:(l,u)=>e.readdirSync(l),fileExists:l=>e.existsSync(l),readFile:l=>e.readFileSync(l)||void 0},e.dirname(s),void 0,s).options,gD.set(s,o))}o&&(i.options=tn(o))}return i.options.noEmit=!0,i.options.isolatedModules=!1,i.options.strict=!1,i.options.jsx=e.ts.JsxEmit.Preserve,i.options.allowJs=!0,Object.assign(i.options,n),e.ts.createProgram(i)}async function xa(e,t,r){r||(r=await Ut(e,[t]));let n=r.getSourceFile(t);if(!n)throw new Error(`getTypeChecker() Could not find source file: ${t}`);return{typeChecker:r.getTypeChecker(),sourceFile:n}}var Ed=class{constructor(t){this.libName=t}};async function Rj(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;wd.has(t)||wd.set(t,fetch(r).then(n=>n.text()).then(n=>{yD.set(t,n)})),await wd.get(t),wd.delete(t)}var yD=new Map,wd=new Map,yl=new Map,gD=new Map;async function bD(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:ay(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function ay(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 Mj="1.6.108",Ae=process.env.OVERRIDE_VERSION??Mj;f();f();async function ho(e){let t=[],r=await Un(e,e.getRepoRootDir());if(r){let n=await vD(r,e);t.push(...n)}return t}async function vD(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let i of Lj)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};xD.has(i)&&(s.version=await xD.get(i)(t)),r.push(s)}}return r}function cy(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var xD=new Map([["next",async e=>{if(!e.spawnSync)return;let t=mD(),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:cy(o),minor:cy(a),patch:cy(c)}}]]),Lj=["@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 yn(e){let t=wD(e),r=await e.readFile(t);return typeof r=="string"?JSON.parse(r):{}}async function bn(e,t){t=typeof t=="object"&&t!=null?t:{};let r=wD(e);await e.writeFile(r,JSON.stringify(t??{},null,2))}function wD(e){let t=e.getAppRootDir();return e.join(t,"node_modules",".builder","builder-cache.json")}f();f();async function ai(e,t,r){let n={envKey:r,envValue:null,file:""};for(let i of t){let s=e.join(e.getAppRootDir(),i),o=await Bj(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 Bj(e,t){let r=await e.readFile(t);return typeof r=="string"?ED(r):null}function ED(e){let t={},r=e.replace(/\r\n?/gm,`
|
|
173
173
|
`),n;for(;(n=$j.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,`
|
|
174
174
|
`),s=s.replace(/\\r/g,"\r")),t[i]=s}return t}var $j=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;async function ci(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+=`
|
|
175
175
|
|
|
@@ -1186,7 +1186,7 @@ module.exports = nextConfig
|
|
|
1186
1186
|
`:`
|
|
1187
1187
|
`)+r,i=n+1,n=e.indexOf(`
|
|
1188
1188
|
`,i)}while(n!==-1);return s+=e.slice(i),s}var{stdout:a_,stderr:c_}=i_,hb=Symbol("GENERATOR"),Ra=Symbol("STYLER"),Ml=Symbol("IS_EMPTY"),l_=["ansi","ansi","ansi256","ansi16m"],Ma=Object.create(null),IK=(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=a_?a_.level:0;e.level=t.level===void 0?r:t.level},Qd=class{constructor(t){return u_(t)}},u_=e=>{let t=(...r)=>r.join(" ");return IK(t,e),Object.setPrototypeOf(t,Ll.prototype),t};function Ll(e){return u_(e)}Object.setPrototypeOf(Ll.prototype,Function.prototype);for(let[e,t]of Object.entries(Gn))Ma[e]={get(){let r=Zd(this,yb(t.open,t.close,this[Ra]),this[Ml]);return Object.defineProperty(this,e,{value:r}),r}};Ma.visible={get(){let e=Zd(this,this[Ra],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var gb=(e,t,r,...n)=>e==="rgb"?t==="ansi16m"?Gn[r].ansi16m(...n):t==="ansi256"?Gn[r].ansi256(Gn.rgbToAnsi256(...n)):Gn[r].ansi(Gn.rgbToAnsi(...n)):e==="hex"?gb("rgb",t,r,...Gn.hexToRgb(...n)):Gn[r][e](...n),kK=["rgb","hex","ansi256"];for(let e of kK){Ma[e]={get(){let{level:r}=this;return function(...n){let i=yb(gb(e,l_[r],"color",...n),Gn.color.close,this[Ra]);return Zd(this,i,this[Ml])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);Ma[t]={get(){let{level:r}=this;return function(...n){let i=yb(gb(e,l_[r],"bgColor",...n),Gn.bgColor.close,this[Ra]);return Zd(this,i,this[Ml])}}}}var NK=Object.defineProperties(()=>{},{...Ma,level:{enumerable:!0,get(){return this[hb].level},set(e){this[hb].level=e}}}),yb=(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}},Zd=(e,t,r)=>{let n=(...i)=>FK(n,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(n,NK),n[hb]=e,n[Ra]=t,n[Ml]=r,n},FK=(e,t)=>{if(e.level<=0||!t)return e[Ml]?"":t;let r=e[Ra];if(r===void 0)return t;let{openAll:n,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=s_(t,r.close,r.open),r=r.parent;let s=t.indexOf(`
|
|
1189
|
-
`);return s!==-1&&(t=o_(t,i,n,s)),n+t+i};Object.defineProperties(Ll.prototype,Ma);var lPe=Ll(),uPe=Ll({level:c_?c_.level:0});var Pe=new Qd({level:2}),p_={comment:Pe.gray,quote:Pe.gray,keyword:Pe.green,"selector-tag":Pe.green,addition:Pe.green,number:Pe.cyan,string:Pe.cyan,"meta meta-string":Pe.cyan,literal:Pe.cyan,doctag:Pe.cyan,regexp:Pe.cyan,title:Pe.blue,section:Pe.blue,name:Pe.blue,"selector-id":Pe.blue,"selector-class":Pe.blue,attribute:Pe.yellow,attr:Pe.yellow,variable:Pe.yellow,"template-variable":Pe.yellow,"class title":Pe.yellow,type:Pe.yellow,symbol:Pe.magenta,bullet:Pe.magenta,subst:Pe.magenta,meta:Pe.magenta,"meta keyword":Pe.magenta,"selector-attr":Pe.magenta,"selector-pseudo":Pe.magenta,link:Pe.magenta,built_in:Pe.red,deletion:Pe.red,emphasis:Pe.italic,strong:Pe.bold,formula:Pe.inverse};function Bl(e){let t=fb(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:bb(o||p_,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let u=s;a={subset:u.subset},o=u.sheet}else o=s;let c=t.highlightAuto(i,a),l=c.data;return{language:l.language,relevance:l.relevance,value:bb(o||p_,c)}}}function bb(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=OK(n,t.children)),i&&(s=i(s)),s}function OK(e,t){let r=[],n=-1;for(;++n<t.length;)r.push(bb(e,t[n]));return r.join("")}f();var d_=j(require("@sentry/node"),1),f_=j(require("@amplitude/analytics-node"),1);async function ee(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([d_.flush(2e3),f_.flush().promise])}catch(t){console.error(t)}process.exit(e)}f();var Kt=process.env.AIR_HOST||"https://ai.builder.io";f();var Ci=j(require("@amplitude/analytics-node"),1),Yn=j(require("@sentry/node"),1);var m_="1.6.107";f();var Wt=require("fs/promises"),hk=require("crypto"),st=require("fs"),pu=require("os"),Ie=j(require("path"),1),gk=j(require("typescript"),1),yk=j(require("launch-editor"),1);var Fo=require("child_process");var kx={};TS(kx,{MagicastError:()=>hr,builders:()=>ZJ,detectCodeFormat:()=>dk,generateCode:()=>Ix,loadFile:()=>XJ,parseExpression:()=>mk,parseModule:()=>fk,writeFile:()=>QJ});f();var Sf=require("fs");var Nf=j(U_(),1),NI=j(yI(),1);function an(e){var t=e.use(Tt),r=t.Type,n=t.builtInTypes,i=n.number;function s(l){return r.from(u=>i.check(u)&&u>=l,i+" >= "+l)}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(l=>{if(l===null)return!0;var u=typeof l;return!(u==="object"||u==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:c}}function Ze(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 SW=Object.defineProperty,DW=(e,t,r)=>t in e?SW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ar=(e,t,r)=>(DW(e,typeof t!="symbol"?t+"":t,r),r),FI=Object.prototype,Df=FI.toString,Cn=FI.hasOwnProperty,No=class{assert(t,r){if(!this.check(t,r)){var n=Dx(t);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let t=this;return new ou(t)}},ou=class extends No{constructor(t){super(),this.elemType=t,Ar(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,r){return Array.isArray(t)&&t.every(n=>this.elemType.check(n,r))}},Tf=class extends No{constructor(t){super(),this.value=t,Ar(this,"kind","IdentityType")}toString(){return String(this.value)}check(t,r){let n=t===this.value;return!n&&typeof r=="function"&&r(this,t),n}},Af=class extends No{constructor(t){super(),this.fields=t,Ar(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,r){return Df.call(t)===Df.call({})&&this.fields.every(n=>n.type.check(t[n.name],r))}},Pf=class extends No{constructor(t){super(),this.types=t,Ar(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(t,r){return this.types.some(n=>n.check(t,!!r))?!0:(typeof r=="function"&&r(this,t),!1)}},ko=class extends No{constructor(t,r){super(),this.name=t,this.predicate=r,Ar(this,"kind","PredicateType")}toString(){return this.name}check(t,r){let n=this.predicate(t,r);return!n&&typeof r=="function"&&r(this,t),n}},iu=class e{constructor(t,r){this.type=t,this.typeName=r,Ar(this,"baseNames",[]),Ar(this,"ownFields",Object.create(null)),Ar(this,"allSupertypes",Object.create(null)),Ar(this,"supertypeList",[]),Ar(this,"allFields",Object.create(null)),Ar(this,"fieldNames",[]),Ar(this,"finalized",!1),Ar(this,"buildable",!1),Ar(this,"buildParams",[])}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return Cn.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}},_f=class{constructor(t,r,n,i){this.name=t,this.type=r,this.defaultFn=n,Ar(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(t){var r=t[this.name];return typeof r<"u"||typeof this.defaultFn=="function"&&(r=this.defaultFn.call(t)),r}};function Dx(e){return Array.isArray(e)?"["+e.map(Dx).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+" }":JSON.stringify(e)}function Tt(e){let t={or(...R){return new Pf(R.map(M=>t.from(M)))},from(R,M){if(R instanceof ou||R instanceof Tf||R instanceof Af||R instanceof Pf||R instanceof ko)return R;if(R instanceof iu)return R.type;if(a.check(R)){if(R.length!==1)throw new Error("only one element type is permitted for typed arrays");return new ou(t.from(R[0]))}if(c.check(R))return new Af(Object.keys(R).map(W=>new _f(W,t.from(R[W],W))));if(typeof R=="function"){var H=r.indexOf(R);if(H>=0)return n[H];if(typeof M!="string")throw new Error("missing name");return new ko(M,R)}return new Tf(R)},def(R){return Cn.call(b,R)?b[R]:b[R]=new E(R)},hasDef(R){return Cn.call(b,R)}};var r=[],n=[];function i(R,M){let H=Df.call(M),W=new ko(R,fe=>Df.call(fe)===H);return M&&typeof M.constructor=="function"&&(r.push(M.constructor),n.push(W)),W}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),c=i("object",{}),l=i("RegExp",/./),u=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 ko("BigInt",()=>!1),y={string:s,function:o,array:a,object:c,RegExp:l,Date:u,number:p,boolean:d,null:h,undefined:m,BigInt:g};var b=Object.create(null);function v(R){if(R&&typeof R=="object"){var M=R.type;if(typeof M=="string"&&Cn.call(b,M)){var H=b[M];if(H.finalized)return H}}return null}class E extends iu{constructor(M){super(new ko(M,(H,W)=>this.check(H,W)),M)}check(M,H){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(M===null||typeof M!="object")return!1;var W=v(M);return W?H&&W===this?this.checkAllFields(M,H):this.isSupertypeOf(W)?H?W.checkAllFields(M,H)&&this.checkAllFields(M,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(M,H):!1}build(...M){if(this.buildParams=M,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let H=(fe,ce,Q,St)=>{if(!Cn.call(fe,ce)){var nr=this.allFields;if(!Cn.call(nr,ce))throw new Error(""+ce);var J=nr[ce],Be=J.type,K;if(St)K=Q;else if(J.defaultFn)K=J.defaultFn.call(fe);else{var me="no value or default function given for field "+JSON.stringify(ce)+" of "+this.typeName+"("+this.buildParams.map(function(ae){return nr[ae]}).join(", ")+")";throw new Error(me)}if(!Be.check(K))throw new Error(Dx(K)+" does not match field "+J+" of type "+this.typeName);fe[ce]=K}},W=(...fe)=>{var ce=fe.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var Q=Object.create(D);if(this.buildParams.forEach(function(St,nr){nr<ce?H(Q,St,fe[nr],!0):H(Q,St,null,!1)}),Object.keys(this.allFields).forEach(function(St){H(Q,St,null,!1)}),Q.type!==this.typeName)throw new Error("");return Q};return W.from=fe=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var ce=Object.create(D);if(Object.keys(this.allFields).forEach(function(Q){Cn.call(fe,Q)?H(ce,Q,fe[Q],!0):H(ce,Q,null,!1)}),ce.type!==this.typeName)throw new Error("");return ce},Object.defineProperty(S,O(this.typeName),{enumerable:!0,value:W}),this}field(M,H,W,fe){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(M)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[M]=new _f(M,t.from(H),W,fe),this)}finalize(){if(!this.finalized){var M=this.allFields,H=this.allSupertypes;this.baseNames.forEach(fe=>{var ce=b[fe];if(ce instanceof iu)ce.finalize(),N(M,ce.allFields),N(H,ce.allSupertypes);else{var Q="unknown supertype name "+JSON.stringify(fe)+" for subtype "+JSON.stringify(this.typeName);throw new Error(Q)}}),N(M,this.ownFields),H[this.typeName]=this,this.fieldNames.length=0;for(var W in M)Cn.call(M,W)&&!M[W].hidden&&this.fieldNames.push(W);Object.defineProperty(T,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,L(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&F(this.typeName)}}}function x(R){if(!Cn.call(b,R))throw new Error("");var M=b[R];if(M.finalized!==!0)throw new Error("");return M.supertypeList.slice(1)}function w(R){for(var M={},H=Object.keys(b),W=H.length,fe=0;fe<W;++fe){var ce=H[fe],Q=b[ce];if(Q.finalized!==!0)throw new Error(""+ce);for(var St=0;St<Q.supertypeList.length;++St){var nr=Q.supertypeList[St];if(Cn.call(R,nr)){M[ce]=nr;break}}}return M}var S=Object.create(null),D={};function _(R,M){var H=D[R];return m.check(M)?delete D[R]:(o.assert(M),Object.defineProperty(D,R,{enumerable:!0,configurable:!0,value:M})),H}function O(R){return R.replace(/^[A-Z]+/,function(M){var H=M.length;switch(H){case 0:return"";case 1:return M.toLowerCase();default:return M.slice(0,H-1).toLowerCase()+M.charAt(H-1)}})}function P(R){return R=O(R),R.replace(/(Expression)?$/,"Statement")}var T={};function V(R){var M=v(R);if(M)return M.fieldNames.slice(0);if("type"in R)throw new Error("did not recognize object of type "+JSON.stringify(R.type));return Object.keys(R)}function X(R,M){var H=v(R);if(H){var W=H.allFields[M];if(W)return W.getValue(R)}return R&&R[M]}function te(R,M,H){V(R).forEach(function(W){M.call(this,W,X(R,W))},H)}function I(R,M,H){return V(R).some(function(W){return M.call(this,W,X(R,W))},H)}function F(R){var M=P(R);if(S[M])return;var H=S[O(R)];if(!H)return;let W=function(...fe){return S.expressionStatement(H.apply(S,fe))};W.from=function(...fe){return S.expressionStatement(H.from.apply(S,fe))},S[M]=W}function L(R,M){M.length=0,M.push(R);for(var H=Object.create(null),W=0;W<M.length;++W){R=M[W];var fe=b[R];if(fe.finalized!==!0)throw new Error("");Cn.call(H,R)&&delete M[H[R]],H[R]=W,M.push.apply(M,fe.baseNames)}for(var ce=0,Q=ce,St=M.length;Q<St;++Q)Cn.call(M,Q)&&(M[ce++]=M[Q]);M.length=ce}function N(R,M){return Object.keys(M).forEach(function(H){R[H]=M[H]}),R}function G(){Object.keys(b).forEach(function(R){b[R].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:w,builders:S,defineMethod:_,getBuilderName:O,getStatementBuilderName:P,namedTypes:T,getFieldNames:V,getFieldValue:X,eachField:te,someField:I,finalize:G}}Ze(()=>module);var TW=Object.prototype,hf=TW.hasOwnProperty;function OI(e){var t=e.use(Tt),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(!hf.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)hf.call(this.value,y)&&(m[y]=this.get(y));for(h=h||this,y=0;y<g;++y)hf.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 l(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),E=h;E<m;++E)if(hf.call(p.value,E)){var x=p.get(E);if(x.name!==E)throw new Error("");var w=E+d;x.name=w,b[w]=x,delete v[E]}return delete v.length,function(){for(var S in b){var D=b[S];if(D.name!==+S)throw new Error("");v[S]=D,p.value[S]=D.value}}}s.shift=function(){var d=l(this,-1),h=this.value.shift();return d(),h},s.unshift=function(...d){var h=l(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=l(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 u(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(u(this),r.check(m)){for(var b=m.length,v=l(this.parentPath,y-1,this.name+1),E=[this.name,1],x=0;x<y;++x)E.push(arguments[x]);var w=m.splice.apply(m,E);if(w[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}Ze(()=>module);var Wa=Object.prototype.hasOwnProperty;function AW(e){var t=e.use(Tt),r=t.Type,n=t.namedTypes,i=n.Node,s=n.Expression,o=t.builtInTypes.array,a=t.builders;let c=function x(w,S){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");u.check(w.value)||l.assert(w.value);var D;if(S){if(!(S instanceof x))throw new Error("");D=S.depth+1}else S=null,D=0;Object.defineProperties(this,{path:{value:w},node:{value:w.value},isGlobal:{value:!S,enumerable:!0},depth:{value:D},parent:{value:S},bindings:{value:{}},types:{value:{}}})};var l=r.or(n.Program,n.Function,n.CatchClause),u=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 l.check(x)||u.check(x)};var d=c.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Wa.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Wa.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 w=0;this.declares(x+w);)++w;var S=x+w;return this.bindings[S]=t.builders.identifier(S)},d.injectTemporary=function(x,w){x||(x=this.declareTemporary());var S=this.path.get("body");return n.BlockStatement.check(S.value)&&(S=S.get("body")),S.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,w||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var w in this.bindings)delete this.bindings[w];for(var w in this.types)delete this.types[w];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,w,S){var D=x.value;if(u.check(D)){let _=x.get("typeParameters","params");o.check(_.value)&&_.each(O=>{E(O,S)})}l.check(D)&&(n.CatchClause.check(D)?b(x.get("param"),w):m(x,w,S))}function m(x,w,S){var D=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&b(x.parent.get("id"),w),D&&(o.check(D)?x.each(_=>{y(_,w,S)}):n.Function.check(D)?(x.get("params").each(_=>{b(_,w)}),y(x.get("body"),w,S),m(x.get("typeParameters"),w,S)):n.TypeAlias&&n.TypeAlias.check(D)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(D)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(D)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(D)?v(x.get("id"),S):n.VariableDeclarator.check(D)?(b(x.get("id"),w),y(x.get("init"),w,S)):D.type==="ImportSpecifier"||D.type==="ImportNamespaceSpecifier"||D.type==="ImportDefaultSpecifier"?b(x.get(D.local?"local":D.name?"name":"id"),w):i.check(D)&&!s.check(D)&&t.eachField(D,function(_,O){var P=x.get(_);if(!g(P,O))throw new Error("");y(P,w,S)}))}function g(x,w){return!!(x.value===w||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(w)&&w.length===0)}function y(x,w,S){var D=x.value;if(!(!D||s.check(D)))if(n.FunctionDeclaration.check(D)&&D.id!==null)b(x.get("id"),w);else if(n.ClassDeclaration&&n.ClassDeclaration.check(D)&&D.id!==null)b(x.get("id"),w),m(x.get("typeParameters"),w,S);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(D)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(D))v(x.get("id"),S);else if(l.check(D)){if(n.CatchClause.check(D)&&n.Identifier.check(D.param)){var _=D.param.name,O=Wa.call(w,_);m(x.get("body"),w,S),O||delete w[_]}}else m(x,w,S)}function b(x,w){var S=x.value;n.Pattern.assert(S),n.Identifier.check(S)?Wa.call(w,S.name)?w[S.name].push(x):w[S.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(S)?b(x.get("left"),w):n.ObjectPattern&&n.ObjectPattern.check(S)?x.get("properties").each(function(D){var _=D.value;n.Pattern.check(_)?b(D,w):n.Property.check(_)||n.ObjectProperty&&n.ObjectProperty.check(_)?b(D.get("value"),w):n.SpreadProperty&&n.SpreadProperty.check(_)&&b(D.get("argument"),w)}):n.ArrayPattern&&n.ArrayPattern.check(S)?x.get("elements").each(function(D){var _=D.value;n.Pattern.check(_)?b(D,w):n.SpreadElement&&n.SpreadElement.check(_)&&b(D.get("argument"),w)}):n.PropertyPattern&&n.PropertyPattern.check(S)?b(x.get("pattern"),w):(n.SpreadElementPattern&&n.SpreadElementPattern.check(S)||n.RestElement&&n.RestElement.check(S)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(S))&&b(x.get("argument"),w)}function v(x,w){var S=x.value;n.Pattern.assert(S),n.Identifier.check(S)&&(Wa.call(w,S.name)?w[S.name].push(x):w[S.name]=[x])}function E(x,w){var S=x.value;p.assert(S),Wa.call(w,S.name)?w[S.name].push(x):w[S.name]=[x]}return d.lookup=function(x){for(var w=this;w&&!w.declares(x);w=w.parent);return w},d.lookupType=function(x){for(var w=this;w&&!w.declaresType(x);w=w.parent);return w},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}Ze(()=>module);function RI(e){var t=e.use(Tt),r=t.namedTypes,n=t.builders,i=t.builtInTypes.number,s=t.builtInTypes.array,o=e.use(OI),a=e.use(AW);let c=function y(b,v,E){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,b,v,E)};var l=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(l,{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}}}),l.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},l.prune=function(){var y=this.parent;return this.replace(),m(y)},l._computeNode=function(){var y=this.value;if(r.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},l._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},l._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},l.getValueProperty=function(y){return t.getFieldValue(this.value,y)},l.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 E=b.value;switch(v.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===v;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===v;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===v;case"BinaryExpression":case"LogicalExpression":{let x=v,w=E.operator,S=p[w],D=x.operator,_=p[D];if(S>_)return!0;if(S===_&&this.name==="right"){if(E.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.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 E.type==="MemberExpression"&&i.check(v.value)&&this.name==="object"&&E.object===v;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===v;case"ConditionalExpression":return this.name==="test"&&E.test===v;case"MemberExpression":return this.name==="object"&&E.object===v;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===v)return d(v)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function u(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}l.canBeFirstInStatement=function(){var y=this.node;return!r.FunctionExpression.check(y)&&!r.ObjectExpression.check(y)},l.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(u(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,E=y.get("consequent").value;if(!E&&!v){var x=n.expressionStatement(b);y.replace(x)}else if(!E&&v){var w=n.unaryExpression("!",b,!0);r.UnaryExpression.check(b)&&b.operator==="!"&&(w=b.argument),y.get("test").replace(w),y.get("consequent").replace(v),y.get("alternate").replace()}}return c}Ze(()=>module);var gf=Object.prototype.hasOwnProperty;function PW(e){var t=e.use(Tt),r=e.use(RI),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=gf.call(this._methodNameTable,"Block")||gf.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),E=Object.keys(b),x=E.length,w=0;w<x;++w){var S=E[w];y="visit"+b[S],s.check(m[y])&&(v[S]=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(u);return b.constructor=y,l(b,g),l(y,a),s.assert(y.fromMethodsObject),s.assert(y.visit),new y};function l(m,g){for(var y in g)gf.call(g,y)&&(m[y]=g[y]);return m}a.visit=function(g,y){return a.fromMethodsObject(y).visit(g)};var u=a.prototype;u.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},u.AbortRequest=function(){},u.abort=function(){var m=this;m._abortRequested=!0;var g=new m.AbortRequest;throw g.cancel=function(){m._abortRequested=!1},g},u.reset=function(m){},u.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,E=[],x=0;x<v;++x){var w=b[x];gf.call(y,w)||(y[w]=t.getFieldValue(y,w)),E.push(m.get(w))}for(var x=0;x<v;++x)g.visitWithoutReset(E[x])}return m.value}u.acquireContext=function(m){return this._reusableContextStack.length===0?new this.Context(m):this._reusableContextStack.pop().reset(m)},u.releaseContext=function(m){if(!(m instanceof this.Context))throw new Error("");this._reusableContextStack.push(m),m.currentPath=null},u.reportChanged=function(){this._changeReported=!0},u.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,l(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}Ze(()=>module);function _W(e){var t=e.use(Tt),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 l(m,g,y){return i.check(y)?y.length=0:y=null,p(m,g,y)}l.assert=function(m,g){var y=[];if(!l(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(u).join(""))};function u(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 E=y.pop();if(E!==v)throw new Error(""+E)}}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,E=r(g),x=E.length;if(v===x){for(var w=0;w<v;++w){var S=b[w],D=n(m,S),_=n(g,S);if(y&&y.push(S),!p(D,_,y))return!1;if(y){var O=y.pop();if(O!==S)throw new Error(""+O)}}return!0}if(!y)return!1;var P=Object.create(null);for(w=0;w<v;++w)P[b[w]]=!0;for(w=0;w<x;++w){if(S=E[w],!c.call(P,S))return y.push(S),!1;delete P[S]}for(S in P){y.push(S);break}return!1}return l}Ze(()=>module);function IW(e){let t=kW(),r=t.use(Tt);e.forEach(t.use),r.finalize();let n=t.use(PW);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(_W),finalize:r.finalize,Path:t.use(OI),NodePath:t.use(RI),PathVisitor:n,use:t.use,visit:n.visit}}function kW(){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}Ze(()=>module);function MI(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}Ze(()=>module);function LI(e){let t=e.use(MI);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}Ze(()=>module);function BI(e){let t=e.use(LI);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}Ze(()=>module);function NW(e){let t=e.use(BI);return t.LogicalOperators.forEach(r=>{let n=r+"=";t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}Ze(()=>module);function FW(e){var t=e.use(Tt),r=t.Type,n=r.def,i=r.or,s=e.use(an),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:l,LogicalOperators:u}=e.use(MI);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(...l);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(...u);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)}Ze(()=>module);function OW(e){e.use(FW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))}Ze(()=>module);function RW(e){e.use(LI),e.use(OW)}Ze(()=>module);function MW(e){e.use(RW);let r=e.use(Tt).Type.def,n=e.use(an).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}Ze(()=>module);function LW(e){e.use(MW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))])}Ze(()=>module);function BW(e){e.use(LW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}Ze(()=>module);function $W(e){e.use(BI),e.use(BW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,s=e.use(an).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)}Ze(()=>module);function UW(e){e.use(NW),e.use($W)}Ze(()=>module);function jW(e){e.use(UW);let r=e.use(Tt).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}Ze(()=>module);function uu(e){e.use(jW);let t=e.use(Tt),r=t.Type,n=t.Type.def,i=r.or,o=e.use(an).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"))}Ze(()=>module);function qW(e){e.use(uu);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))}Ze(()=>module);function $I(e){var t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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)})}Ze(()=>module);function UI(e){e.use(uu),e.use($I);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))}Ze(()=>module);function zW(e){e.use(uu);var t=e.use(Tt),r=e.use(an).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")}Ze(()=>module);function jI(e){e.use(uu);let t=e.use(Tt),r=e.use(an).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(u=String,p){return["extra",{rawValue:u,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,u=>JSON.stringify(u))),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,u=>u+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,u=>u+"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),u=>`/${u.pattern}/${u.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(u=>{n(u).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(u=>{n(u).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 l=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[l]).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()}Ze(()=>module);function GW(e){let r=e.use(Tt).Type.def;e.use(jI),e.use(UI),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}Ze(()=>module);function HW(e){e.use(jI),e.use($I);var t=e.use(Tt),r=t.namedTypes,n=t.Type.def,i=t.Type.or,s=e.use(an).defaults,o=t.Type.from(function(u,p){return!!(r.StringLiteral&&r.StringLiteral.check(u,p)||r.Literal&&r.Literal.check(u,p)&&typeof u.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(u=>{n(u).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(u=>{n(u).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(u=>{n(u).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(u=>{n(u).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 l=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[l]),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",[l]),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"),l)])}Ze(()=>module);var Wn;Wn||(Wn={});var{astNodesAreEquivalent:n_e,builders:tc,builtInTypes:Jn,defineMethod:i_e,eachField:s_e,finalize:o_e,getBuilderName:a_e,getFieldNames:KW,getFieldValue:rs,getSupertypeNames:c_e,namedTypes:VW,NodePath:WW,Path:l_e,PathVisitor:u_e,someField:JW,Type:p_e,use:d_e,visit:f_e}=IW([uu,qW,UI,zW,GW,HW]);Object.assign(Wn,VW);var yf=Wn,bI=Nf.default.SourceMapConsumer,YW=Nf.default.SourceMapGenerator,qI=Object.prototype.hasOwnProperty;function XW(){return`
|
|
1189
|
+
`);return s!==-1&&(t=o_(t,i,n,s)),n+t+i};Object.defineProperties(Ll.prototype,Ma);var lPe=Ll(),uPe=Ll({level:c_?c_.level:0});var Pe=new Qd({level:2}),p_={comment:Pe.gray,quote:Pe.gray,keyword:Pe.green,"selector-tag":Pe.green,addition:Pe.green,number:Pe.cyan,string:Pe.cyan,"meta meta-string":Pe.cyan,literal:Pe.cyan,doctag:Pe.cyan,regexp:Pe.cyan,title:Pe.blue,section:Pe.blue,name:Pe.blue,"selector-id":Pe.blue,"selector-class":Pe.blue,attribute:Pe.yellow,attr:Pe.yellow,variable:Pe.yellow,"template-variable":Pe.yellow,"class title":Pe.yellow,type:Pe.yellow,symbol:Pe.magenta,bullet:Pe.magenta,subst:Pe.magenta,meta:Pe.magenta,"meta keyword":Pe.magenta,"selector-attr":Pe.magenta,"selector-pseudo":Pe.magenta,link:Pe.magenta,built_in:Pe.red,deletion:Pe.red,emphasis:Pe.italic,strong:Pe.bold,formula:Pe.inverse};function Bl(e){let t=fb(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:bb(o||p_,a)}}function n(i,s){let o,a;if(s&&("subset"in s||"sheet"in s)){let u=s;a={subset:u.subset},o=u.sheet}else o=s;let c=t.highlightAuto(i,a),l=c.data;return{language:l.language,relevance:l.relevance,value:bb(o||p_,c)}}}function bb(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=OK(n,t.children)),i&&(s=i(s)),s}function OK(e,t){let r=[],n=-1;for(;++n<t.length;)r.push(bb(e,t[n]));return r.join("")}f();var d_=j(require("@sentry/node"),1),f_=j(require("@amplitude/analytics-node"),1);async function ee(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([d_.flush(2e3),f_.flush().promise])}catch(t){console.error(t)}process.exit(e)}f();var Kt=process.env.AIR_HOST||"https://ai.builder.io";f();var Ci=j(require("@amplitude/analytics-node"),1),Yn=j(require("@sentry/node"),1);var m_="1.6.108";f();var Wt=require("fs/promises"),hk=require("crypto"),st=require("fs"),pu=require("os"),Ie=j(require("path"),1),gk=j(require("typescript"),1),yk=j(require("launch-editor"),1);var Fo=require("child_process");var kx={};TS(kx,{MagicastError:()=>hr,builders:()=>ZJ,detectCodeFormat:()=>dk,generateCode:()=>Ix,loadFile:()=>XJ,parseExpression:()=>mk,parseModule:()=>fk,writeFile:()=>QJ});f();var Sf=require("fs");var Nf=j(U_(),1),NI=j(yI(),1);function an(e){var t=e.use(Tt),r=t.Type,n=t.builtInTypes,i=n.number;function s(l){return r.from(u=>i.check(u)&&u>=l,i+" >= "+l)}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(l=>{if(l===null)return!0;var u=typeof l;return!(u==="object"||u==="function")},a.toString());return{geq:s,defaults:o,isPrimitive:c}}function Ze(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 SW=Object.defineProperty,DW=(e,t,r)=>t in e?SW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ar=(e,t,r)=>(DW(e,typeof t!="symbol"?t+"":t,r),r),FI=Object.prototype,Df=FI.toString,Cn=FI.hasOwnProperty,No=class{assert(t,r){if(!this.check(t,r)){var n=Dx(t);throw new Error(n+" does not match type "+this)}return!0}arrayOf(){let t=this;return new ou(t)}},ou=class extends No{constructor(t){super(),this.elemType=t,Ar(this,"kind","ArrayType")}toString(){return"["+this.elemType+"]"}check(t,r){return Array.isArray(t)&&t.every(n=>this.elemType.check(n,r))}},Tf=class extends No{constructor(t){super(),this.value=t,Ar(this,"kind","IdentityType")}toString(){return String(this.value)}check(t,r){let n=t===this.value;return!n&&typeof r=="function"&&r(this,t),n}},Af=class extends No{constructor(t){super(),this.fields=t,Ar(this,"kind","ObjectType")}toString(){return"{ "+this.fields.join(", ")+" }"}check(t,r){return Df.call(t)===Df.call({})&&this.fields.every(n=>n.type.check(t[n.name],r))}},Pf=class extends No{constructor(t){super(),this.types=t,Ar(this,"kind","OrType")}toString(){return this.types.join(" | ")}check(t,r){return this.types.some(n=>n.check(t,!!r))?!0:(typeof r=="function"&&r(this,t),!1)}},ko=class extends No{constructor(t,r){super(),this.name=t,this.predicate=r,Ar(this,"kind","PredicateType")}toString(){return this.name}check(t,r){let n=this.predicate(t,r);return!n&&typeof r=="function"&&r(this,t),n}},iu=class e{constructor(t,r){this.type=t,this.typeName=r,Ar(this,"baseNames",[]),Ar(this,"ownFields",Object.create(null)),Ar(this,"allSupertypes",Object.create(null)),Ar(this,"supertypeList",[]),Ar(this,"allFields",Object.create(null)),Ar(this,"fieldNames",[]),Ar(this,"finalized",!1),Ar(this,"buildable",!1),Ar(this,"buildParams",[])}isSupertypeOf(t){if(t instanceof e){if(this.finalized!==!0||t.finalized!==!0)throw new Error("");return Cn.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}},_f=class{constructor(t,r,n,i){this.name=t,this.type=r,this.defaultFn=n,Ar(this,"hidden"),this.hidden=!!i}toString(){return JSON.stringify(this.name)+": "+this.type}getValue(t){var r=t[this.name];return typeof r<"u"||typeof this.defaultFn=="function"&&(r=this.defaultFn.call(t)),r}};function Dx(e){return Array.isArray(e)?"["+e.map(Dx).join(", ")+"]":e&&typeof e=="object"?"{ "+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+" }":JSON.stringify(e)}function Tt(e){let t={or(...R){return new Pf(R.map(M=>t.from(M)))},from(R,M){if(R instanceof ou||R instanceof Tf||R instanceof Af||R instanceof Pf||R instanceof ko)return R;if(R instanceof iu)return R.type;if(a.check(R)){if(R.length!==1)throw new Error("only one element type is permitted for typed arrays");return new ou(t.from(R[0]))}if(c.check(R))return new Af(Object.keys(R).map(W=>new _f(W,t.from(R[W],W))));if(typeof R=="function"){var H=r.indexOf(R);if(H>=0)return n[H];if(typeof M!="string")throw new Error("missing name");return new ko(M,R)}return new Tf(R)},def(R){return Cn.call(b,R)?b[R]:b[R]=new E(R)},hasDef(R){return Cn.call(b,R)}};var r=[],n=[];function i(R,M){let H=Df.call(M),W=new ko(R,fe=>Df.call(fe)===H);return M&&typeof M.constructor=="function"&&(r.push(M.constructor),n.push(W)),W}let s=i("string","truthy"),o=i("function",function(){}),a=i("array",[]),c=i("object",{}),l=i("RegExp",/./),u=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 ko("BigInt",()=>!1),y={string:s,function:o,array:a,object:c,RegExp:l,Date:u,number:p,boolean:d,null:h,undefined:m,BigInt:g};var b=Object.create(null);function v(R){if(R&&typeof R=="object"){var M=R.type;if(typeof M=="string"&&Cn.call(b,M)){var H=b[M];if(H.finalized)return H}}return null}class E extends iu{constructor(M){super(new ko(M,(H,W)=>this.check(H,W)),M)}check(M,H){if(this.finalized!==!0)throw new Error("prematurely checking unfinalized type "+this.typeName);if(M===null||typeof M!="object")return!1;var W=v(M);return W?H&&W===this?this.checkAllFields(M,H):this.isSupertypeOf(W)?H?W.checkAllFields(M,H)&&this.checkAllFields(M,!1):!0:!1:this.typeName==="SourceLocation"||this.typeName==="Position"?this.checkAllFields(M,H):!1}build(...M){if(this.buildParams=M,this.buildable)return this;this.field("type",String,()=>this.typeName),this.buildable=!0;let H=(fe,ce,Q,St)=>{if(!Cn.call(fe,ce)){var nr=this.allFields;if(!Cn.call(nr,ce))throw new Error(""+ce);var J=nr[ce],Be=J.type,K;if(St)K=Q;else if(J.defaultFn)K=J.defaultFn.call(fe);else{var me="no value or default function given for field "+JSON.stringify(ce)+" of "+this.typeName+"("+this.buildParams.map(function(ae){return nr[ae]}).join(", ")+")";throw new Error(me)}if(!Be.check(K))throw new Error(Dx(K)+" does not match field "+J+" of type "+this.typeName);fe[ce]=K}},W=(...fe)=>{var ce=fe.length;if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var Q=Object.create(D);if(this.buildParams.forEach(function(St,nr){nr<ce?H(Q,St,fe[nr],!0):H(Q,St,null,!1)}),Object.keys(this.allFields).forEach(function(St){H(Q,St,null,!1)}),Q.type!==this.typeName)throw new Error("");return Q};return W.from=fe=>{if(!this.finalized)throw new Error("attempting to instantiate unfinalized type "+this.typeName);var ce=Object.create(D);if(Object.keys(this.allFields).forEach(function(Q){Cn.call(fe,Q)?H(ce,Q,fe[Q],!0):H(ce,Q,null,!1)}),ce.type!==this.typeName)throw new Error("");return ce},Object.defineProperty(S,O(this.typeName),{enumerable:!0,value:W}),this}field(M,H,W,fe){return this.finalized?(console.error("Ignoring attempt to redefine field "+JSON.stringify(M)+" of finalized type "+JSON.stringify(this.typeName)),this):(this.ownFields[M]=new _f(M,t.from(H),W,fe),this)}finalize(){if(!this.finalized){var M=this.allFields,H=this.allSupertypes;this.baseNames.forEach(fe=>{var ce=b[fe];if(ce instanceof iu)ce.finalize(),N(M,ce.allFields),N(H,ce.allSupertypes);else{var Q="unknown supertype name "+JSON.stringify(fe)+" for subtype "+JSON.stringify(this.typeName);throw new Error(Q)}}),N(M,this.ownFields),H[this.typeName]=this,this.fieldNames.length=0;for(var W in M)Cn.call(M,W)&&!M[W].hidden&&this.fieldNames.push(W);Object.defineProperty(T,this.typeName,{enumerable:!0,value:this.type}),this.finalized=!0,L(this.typeName,this.supertypeList),this.buildable&&this.supertypeList.lastIndexOf("Expression")>=0&&F(this.typeName)}}}function x(R){if(!Cn.call(b,R))throw new Error("");var M=b[R];if(M.finalized!==!0)throw new Error("");return M.supertypeList.slice(1)}function w(R){for(var M={},H=Object.keys(b),W=H.length,fe=0;fe<W;++fe){var ce=H[fe],Q=b[ce];if(Q.finalized!==!0)throw new Error(""+ce);for(var St=0;St<Q.supertypeList.length;++St){var nr=Q.supertypeList[St];if(Cn.call(R,nr)){M[ce]=nr;break}}}return M}var S=Object.create(null),D={};function _(R,M){var H=D[R];return m.check(M)?delete D[R]:(o.assert(M),Object.defineProperty(D,R,{enumerable:!0,configurable:!0,value:M})),H}function O(R){return R.replace(/^[A-Z]+/,function(M){var H=M.length;switch(H){case 0:return"";case 1:return M.toLowerCase();default:return M.slice(0,H-1).toLowerCase()+M.charAt(H-1)}})}function P(R){return R=O(R),R.replace(/(Expression)?$/,"Statement")}var T={};function V(R){var M=v(R);if(M)return M.fieldNames.slice(0);if("type"in R)throw new Error("did not recognize object of type "+JSON.stringify(R.type));return Object.keys(R)}function X(R,M){var H=v(R);if(H){var W=H.allFields[M];if(W)return W.getValue(R)}return R&&R[M]}function te(R,M,H){V(R).forEach(function(W){M.call(this,W,X(R,W))},H)}function I(R,M,H){return V(R).some(function(W){return M.call(this,W,X(R,W))},H)}function F(R){var M=P(R);if(S[M])return;var H=S[O(R)];if(!H)return;let W=function(...fe){return S.expressionStatement(H.apply(S,fe))};W.from=function(...fe){return S.expressionStatement(H.from.apply(S,fe))},S[M]=W}function L(R,M){M.length=0,M.push(R);for(var H=Object.create(null),W=0;W<M.length;++W){R=M[W];var fe=b[R];if(fe.finalized!==!0)throw new Error("");Cn.call(H,R)&&delete M[H[R]],H[R]=W,M.push.apply(M,fe.baseNames)}for(var ce=0,Q=ce,St=M.length;Q<St;++Q)Cn.call(M,Q)&&(M[ce++]=M[Q]);M.length=ce}function N(R,M){return Object.keys(M).forEach(function(H){R[H]=M[H]}),R}function G(){Object.keys(b).forEach(function(R){b[R].finalize()})}return{Type:t,builtInTypes:y,getSupertypeNames:x,computeSupertypeLookupTable:w,builders:S,defineMethod:_,getBuilderName:O,getStatementBuilderName:P,namedTypes:T,getFieldNames:V,getFieldValue:X,eachField:te,someField:I,finalize:G}}Ze(()=>module);var TW=Object.prototype,hf=TW.hasOwnProperty;function OI(e){var t=e.use(Tt),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(!hf.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)hf.call(this.value,y)&&(m[y]=this.get(y));for(h=h||this,y=0;y<g;++y)hf.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 l(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),E=h;E<m;++E)if(hf.call(p.value,E)){var x=p.get(E);if(x.name!==E)throw new Error("");var w=E+d;x.name=w,b[w]=x,delete v[E]}return delete v.length,function(){for(var S in b){var D=b[S];if(D.name!==+S)throw new Error("");v[S]=D,p.value[S]=D.value}}}s.shift=function(){var d=l(this,-1),h=this.value.shift();return d(),h},s.unshift=function(...d){var h=l(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=l(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 u(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(u(this),r.check(m)){for(var b=m.length,v=l(this.parentPath,y-1,this.name+1),E=[this.name,1],x=0;x<y;++x)E.push(arguments[x]);var w=m.splice.apply(m,E);if(w[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}Ze(()=>module);var Wa=Object.prototype.hasOwnProperty;function AW(e){var t=e.use(Tt),r=t.Type,n=t.namedTypes,i=n.Node,s=n.Expression,o=t.builtInTypes.array,a=t.builders;let c=function x(w,S){if(!(this instanceof x))throw new Error("Scope constructor cannot be invoked without 'new'");u.check(w.value)||l.assert(w.value);var D;if(S){if(!(S instanceof x))throw new Error("");D=S.depth+1}else S=null,D=0;Object.defineProperties(this,{path:{value:w},node:{value:w.value},isGlobal:{value:!S,enumerable:!0},depth:{value:D},parent:{value:S},bindings:{value:{}},types:{value:{}}})};var l=r.or(n.Program,n.Function,n.CatchClause),u=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 l.check(x)||u.check(x)};var d=c.prototype;d.didScan=!1,d.declares=function(x){return this.scan(),Wa.call(this.bindings,x)},d.declaresType=function(x){return this.scan(),Wa.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 w=0;this.declares(x+w);)++w;var S=x+w;return this.bindings[S]=t.builders.identifier(S)},d.injectTemporary=function(x,w){x||(x=this.declareTemporary());var S=this.path.get("body");return n.BlockStatement.check(S.value)&&(S=S.get("body")),S.unshift(a.variableDeclaration("var",[a.variableDeclarator(x,w||null)])),x},d.scan=function(x){if(x||!this.didScan){for(var w in this.bindings)delete this.bindings[w];for(var w in this.types)delete this.types[w];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,w,S){var D=x.value;if(u.check(D)){let _=x.get("typeParameters","params");o.check(_.value)&&_.each(O=>{E(O,S)})}l.check(D)&&(n.CatchClause.check(D)?b(x.get("param"),w):m(x,w,S))}function m(x,w,S){var D=x.value;x.parent&&n.FunctionExpression.check(x.parent.node)&&x.parent.node.id&&b(x.parent.get("id"),w),D&&(o.check(D)?x.each(_=>{y(_,w,S)}):n.Function.check(D)?(x.get("params").each(_=>{b(_,w)}),y(x.get("body"),w,S),m(x.get("typeParameters"),w,S)):n.TypeAlias&&n.TypeAlias.check(D)||n.InterfaceDeclaration&&n.InterfaceDeclaration.check(D)||n.TSTypeAliasDeclaration&&n.TSTypeAliasDeclaration.check(D)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(D)?v(x.get("id"),S):n.VariableDeclarator.check(D)?(b(x.get("id"),w),y(x.get("init"),w,S)):D.type==="ImportSpecifier"||D.type==="ImportNamespaceSpecifier"||D.type==="ImportDefaultSpecifier"?b(x.get(D.local?"local":D.name?"name":"id"),w):i.check(D)&&!s.check(D)&&t.eachField(D,function(_,O){var P=x.get(_);if(!g(P,O))throw new Error("");y(P,w,S)}))}function g(x,w){return!!(x.value===w||Array.isArray(x.value)&&x.value.length===0&&Array.isArray(w)&&w.length===0)}function y(x,w,S){var D=x.value;if(!(!D||s.check(D)))if(n.FunctionDeclaration.check(D)&&D.id!==null)b(x.get("id"),w);else if(n.ClassDeclaration&&n.ClassDeclaration.check(D)&&D.id!==null)b(x.get("id"),w),m(x.get("typeParameters"),w,S);else if(n.InterfaceDeclaration&&n.InterfaceDeclaration.check(D)||n.TSInterfaceDeclaration&&n.TSInterfaceDeclaration.check(D))v(x.get("id"),S);else if(l.check(D)){if(n.CatchClause.check(D)&&n.Identifier.check(D.param)){var _=D.param.name,O=Wa.call(w,_);m(x.get("body"),w,S),O||delete w[_]}}else m(x,w,S)}function b(x,w){var S=x.value;n.Pattern.assert(S),n.Identifier.check(S)?Wa.call(w,S.name)?w[S.name].push(x):w[S.name]=[x]:n.AssignmentPattern&&n.AssignmentPattern.check(S)?b(x.get("left"),w):n.ObjectPattern&&n.ObjectPattern.check(S)?x.get("properties").each(function(D){var _=D.value;n.Pattern.check(_)?b(D,w):n.Property.check(_)||n.ObjectProperty&&n.ObjectProperty.check(_)?b(D.get("value"),w):n.SpreadProperty&&n.SpreadProperty.check(_)&&b(D.get("argument"),w)}):n.ArrayPattern&&n.ArrayPattern.check(S)?x.get("elements").each(function(D){var _=D.value;n.Pattern.check(_)?b(D,w):n.SpreadElement&&n.SpreadElement.check(_)&&b(D.get("argument"),w)}):n.PropertyPattern&&n.PropertyPattern.check(S)?b(x.get("pattern"),w):(n.SpreadElementPattern&&n.SpreadElementPattern.check(S)||n.RestElement&&n.RestElement.check(S)||n.SpreadPropertyPattern&&n.SpreadPropertyPattern.check(S))&&b(x.get("argument"),w)}function v(x,w){var S=x.value;n.Pattern.assert(S),n.Identifier.check(S)&&(Wa.call(w,S.name)?w[S.name].push(x):w[S.name]=[x])}function E(x,w){var S=x.value;p.assert(S),Wa.call(w,S.name)?w[S.name].push(x):w[S.name]=[x]}return d.lookup=function(x){for(var w=this;w&&!w.declares(x);w=w.parent);return w},d.lookupType=function(x){for(var w=this;w&&!w.declaresType(x);w=w.parent);return w},d.getGlobalScope=function(){for(var x=this;!x.isGlobal;)x=x.parent;return x},c}Ze(()=>module);function RI(e){var t=e.use(Tt),r=t.namedTypes,n=t.builders,i=t.builtInTypes.number,s=t.builtInTypes.array,o=e.use(OI),a=e.use(AW);let c=function y(b,v,E){if(!(this instanceof y))throw new Error("NodePath constructor cannot be invoked without 'new'");o.call(this,b,v,E)};var l=c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}});Object.defineProperties(l,{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}}}),l.replace=function(){return delete this.node,delete this.parent,delete this.scope,o.prototype.replace.apply(this,arguments)},l.prune=function(){var y=this.parent;return this.replace(),m(y)},l._computeNode=function(){var y=this.value;if(r.Node.check(y))return y;var b=this.parentPath;return b&&b.node||null},l._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},l._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},l.getValueProperty=function(y){return t.getFieldValue(this.value,y)},l.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 E=b.value;switch(v.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return E.type==="MemberExpression"&&this.name==="object"&&E.object===v;case"BinaryExpression":case"LogicalExpression":switch(E.type){case"CallExpression":return this.name==="callee"&&E.callee===v;case"UnaryExpression":case"SpreadElement":case"SpreadProperty":return!0;case"MemberExpression":return this.name==="object"&&E.object===v;case"BinaryExpression":case"LogicalExpression":{let x=v,w=E.operator,S=p[w],D=x.operator,_=p[D];if(S>_)return!0;if(S===_&&this.name==="right"){if(E.right!==x)throw new Error("Nodes must be equal");return!0}}default:return!1}case"SequenceExpression":switch(E.type){case"ForStatement":return!1;case"ExpressionStatement":return this.name!=="expression";default:return!0}case"YieldExpression":switch(E.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 E.type==="MemberExpression"&&i.check(v.value)&&this.name==="object"&&E.object===v;case"AssignmentExpression":case"ConditionalExpression":switch(E.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return this.name==="callee"&&E.callee===v;case"ConditionalExpression":return this.name==="test"&&E.test===v;case"MemberExpression":return this.name==="object"&&E.object===v;default:return!1}default:if(E.type==="NewExpression"&&this.name==="callee"&&E.callee===v)return d(v)}return!!(y!==!0&&!this.canBeFirstInStatement()&&this.firstInStatement())};function u(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}l.canBeFirstInStatement=function(){var y=this.node;return!r.FunctionExpression.check(y)&&!r.ObjectExpression.check(y)},l.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(u(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,E=y.get("consequent").value;if(!E&&!v){var x=n.expressionStatement(b);y.replace(x)}else if(!E&&v){var w=n.unaryExpression("!",b,!0);r.UnaryExpression.check(b)&&b.operator==="!"&&(w=b.argument),y.get("test").replace(w),y.get("consequent").replace(v),y.get("alternate").replace()}}return c}Ze(()=>module);var gf=Object.prototype.hasOwnProperty;function PW(e){var t=e.use(Tt),r=e.use(RI),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=gf.call(this._methodNameTable,"Block")||gf.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),E=Object.keys(b),x=E.length,w=0;w<x;++w){var S=E[w];y="visit"+b[S],s.check(m[y])&&(v[S]=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(u);return b.constructor=y,l(b,g),l(y,a),s.assert(y.fromMethodsObject),s.assert(y.visit),new y};function l(m,g){for(var y in g)gf.call(g,y)&&(m[y]=g[y]);return m}a.visit=function(g,y){return a.fromMethodsObject(y).visit(g)};var u=a.prototype;u.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},u.AbortRequest=function(){},u.abort=function(){var m=this;m._abortRequested=!0;var g=new m.AbortRequest;throw g.cancel=function(){m._abortRequested=!1},g},u.reset=function(m){},u.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,E=[],x=0;x<v;++x){var w=b[x];gf.call(y,w)||(y[w]=t.getFieldValue(y,w)),E.push(m.get(w))}for(var x=0;x<v;++x)g.visitWithoutReset(E[x])}return m.value}u.acquireContext=function(m){return this._reusableContextStack.length===0?new this.Context(m):this._reusableContextStack.pop().reset(m)},u.releaseContext=function(m){if(!(m instanceof this.Context))throw new Error("");this._reusableContextStack.push(m),m.currentPath=null},u.reportChanged=function(){this._changeReported=!0},u.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,l(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}Ze(()=>module);function _W(e){var t=e.use(Tt),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 l(m,g,y){return i.check(y)?y.length=0:y=null,p(m,g,y)}l.assert=function(m,g){var y=[];if(!l(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(u).join(""))};function u(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 E=y.pop();if(E!==v)throw new Error(""+E)}}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,E=r(g),x=E.length;if(v===x){for(var w=0;w<v;++w){var S=b[w],D=n(m,S),_=n(g,S);if(y&&y.push(S),!p(D,_,y))return!1;if(y){var O=y.pop();if(O!==S)throw new Error(""+O)}}return!0}if(!y)return!1;var P=Object.create(null);for(w=0;w<v;++w)P[b[w]]=!0;for(w=0;w<x;++w){if(S=E[w],!c.call(P,S))return y.push(S),!1;delete P[S]}for(S in P){y.push(S);break}return!1}return l}Ze(()=>module);function IW(e){let t=kW(),r=t.use(Tt);e.forEach(t.use),r.finalize();let n=t.use(PW);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(_W),finalize:r.finalize,Path:t.use(OI),NodePath:t.use(RI),PathVisitor:n,use:t.use,visit:n.visit}}function kW(){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}Ze(()=>module);function MI(){return{BinaryOperators:["==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof"],AssignmentOperators:["=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&="],LogicalOperators:["||","&&"]}}Ze(()=>module);function LI(e){let t=e.use(MI);return t.BinaryOperators.indexOf("**")<0&&t.BinaryOperators.push("**"),t.AssignmentOperators.indexOf("**=")<0&&t.AssignmentOperators.push("**="),t}Ze(()=>module);function BI(e){let t=e.use(LI);return t.LogicalOperators.indexOf("??")<0&&t.LogicalOperators.push("??"),t}Ze(()=>module);function NW(e){let t=e.use(BI);return t.LogicalOperators.forEach(r=>{let n=r+"=";t.AssignmentOperators.indexOf(n)<0&&t.AssignmentOperators.push(n)}),t}Ze(()=>module);function FW(e){var t=e.use(Tt),r=t.Type,n=r.def,i=r.or,s=e.use(an),o=s.defaults,a=s.geq;let{BinaryOperators:c,AssignmentOperators:l,LogicalOperators:u}=e.use(MI);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(...l);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(...u);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)}Ze(()=>module);function OW(e){e.use(FW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))}Ze(()=>module);function RW(e){e.use(LI),e.use(OW)}Ze(()=>module);function MW(e){e.use(RW);let r=e.use(Tt).Type.def,n=e.use(an).defaults;r("Function").field("async",Boolean,n.false),r("AwaitExpression").bases("Expression").build("argument").field("argument",r("Expression"))}Ze(()=>module);function LW(e){e.use(MW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))])}Ze(()=>module);function BW(e){e.use(LW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).defaults;r("CatchClause").field("param",n(r("Pattern"),null),i.null)}Ze(()=>module);function $W(e){e.use(BI),e.use(BW);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,s=e.use(an).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)}Ze(()=>module);function UW(e){e.use(NW),e.use($W)}Ze(()=>module);function jW(e){e.use(UW);let r=e.use(Tt).Type.def;r("StaticBlock").bases("Declaration").build("body").field("body",[r("Statement")])}Ze(()=>module);function uu(e){e.use(jW);let t=e.use(Tt),r=t.Type,n=t.Type.def,i=r.or,o=e.use(an).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"))}Ze(()=>module);function qW(e){e.use(uu);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))}Ze(()=>module);function $I(e){var t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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)})}Ze(()=>module);function UI(e){e.use(uu),e.use($I);let t=e.use(Tt),r=t.Type.def,n=t.Type.or,i=e.use(an).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"))}Ze(()=>module);function zW(e){e.use(uu);var t=e.use(Tt),r=e.use(an).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")}Ze(()=>module);function jI(e){e.use(uu);let t=e.use(Tt),r=e.use(an).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(u=String,p){return["extra",{rawValue:u,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,u=>JSON.stringify(u))),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,u=>u+"n")),n("DecimalLiteral").bases("Literal").build("value").field("value",String).field(...o(String,u=>u+"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),u=>`/${u.pattern}/${u.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(u=>{n(u).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(u=>{n(u).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 l=i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"),n("SpreadProperty"),n("ObjectProperty"),n("RestProperty"),n("RestElement"));n("ObjectPattern").bases("Pattern").build("properties").field("properties",[l]).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()}Ze(()=>module);function GW(e){let r=e.use(Tt).Type.def;e.use(jI),e.use(UI),r("V8IntrinsicIdentifier").bases("Expression").build("name").field("name",String),r("TopicReference").bases("Expression").build()}Ze(()=>module);function HW(e){e.use(jI),e.use($I);var t=e.use(Tt),r=t.namedTypes,n=t.Type.def,i=t.Type.or,s=e.use(an).defaults,o=t.Type.from(function(u,p){return!!(r.StringLiteral&&r.StringLiteral.check(u,p)||r.Literal&&r.Literal.check(u,p)&&typeof u.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(u=>{n(u).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(u=>{n(u).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(u=>{n(u).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(u=>{n(u).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 l=i(n("TSCallSignatureDeclaration"),n("TSConstructSignatureDeclaration"),n("TSIndexSignature"),n("TSMethodSignature"),n("TSPropertySignature"));n("TSTypeLiteral").bases("TSType").build("members").field("members",[l]),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",[l]),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"),l)])}Ze(()=>module);var Wn;Wn||(Wn={});var{astNodesAreEquivalent:n_e,builders:tc,builtInTypes:Jn,defineMethod:i_e,eachField:s_e,finalize:o_e,getBuilderName:a_e,getFieldNames:KW,getFieldValue:rs,getSupertypeNames:c_e,namedTypes:VW,NodePath:WW,Path:l_e,PathVisitor:u_e,someField:JW,Type:p_e,use:d_e,visit:f_e}=IW([uu,qW,UI,zW,GW,HW]);Object.assign(Wn,VW);var yf=Wn,bI=Nf.default.SourceMapConsumer,YW=Nf.default.SourceMapGenerator,qI=Object.prototype.hasOwnProperty;function XW(){return`
|
|
1190
1190
|
`}function xI(e,t,r){return e&&qI.call(e,t)?e[t]:r}function QW(...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 Le(e,t){return e.line-t.line||e.column-t.column}function Os(e){return{line:e.line,column:e.column}}function ZW(e,t){if(e){if(!t)return e}else return t||null;let r=new bI(e),n=new bI(t),i=new YW({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:Os(a),generated:{line:o.generatedLine,column:o.generatedColumn},name:o.name});let l=r.sourceContentFor(c);l&&!qI.call(s,c)&&(s[c]=l,i.setSourceContent(c,l))}),i.toJSON()}function zI(e,t){if(!e.loc)return null;let r={start:e.loc.start,end:e.loc.end};function n(i){gx(r,i.loc)}return e.declaration&&e.declaration.decorators&&Ff(e)&&e.declaration.decorators.forEach(n),Le(r.start,r.end)<0&&(r.start=Os(r.start),t.skipSpaces(r.start,!1,!0),Le(r.start,r.end)<0&&(r.end=Os(r.end),t.skipSpaces(r.end,!0,!0))),e.comments&&e.comments.forEach(n),r}function gx(e,t){e&&t&&(Le(t.start,e.start)<0&&(e.start=t.start),Le(e.end,t.end)<0&&(e.end=t.end))}function Tx(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()),eJ(e,t),tJ(e,t),r&&e.decorators)e.decorators.forEach(function(n){gx(r,n.loc)});else if(e.declaration&&Ff(e)){e.declaration.loc=null;let n=e.declaration.decorators;n&&n.forEach(function(i){gx(r,i.loc)})}else if(yf.MethodDefinition&&yf.MethodDefinition.check(e)||yf.Property.check(e)&&(e.method||e.shorthand))e.value.loc=null,yf.FunctionExpression.check(e.value)&&(e.value.id=null);else if(e.type==="ObjectTypeProperty"){let n=e.loc,i=n&&n.end;i&&(i=Os(i),t.prevPos(i)&&t.charAt(i)===","&&(i=t.skipSpaces(i,!0,!0))&&(n.end=i))}}function eJ(e,t){if(e.type!=="ForStatement")return;function r(n){let i=n&&n.loc,s=i&&i.start,o=i&&Os(i.end);for(;s&&o&&Le(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 tJ(e,t){if(e.type==="TemplateLiteral"&&e.quasis.length!==0){if(e.loc){let r=Os(e.loc.start),n=e.quasis[0];Le(n.loc.start,r)<0&&(n.loc.start=r);let i=Os(e.loc.end),s=e.quasis[e.quasis.length-1];Le(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];Le(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];Le(o.loc.start,s)<0&&(o.loc.start=s)}})}}function Ff(e){if(e)switch(e.type){case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function GI(e){let t=e.getParentNode();return e.getName()==="declaration"&&Ff(t)?t:null}function su(e,t){let r=e.trailingComma;return typeof r=="object"?!!r[t]:!!r}var yx={tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:XW(),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},rJ=yx.hasOwnProperty;function Of(e){let t=e||yx;function r(n){return rJ.call(t,n)?t[n]:yx[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 bx=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 l=s[c],u=o[c],p=r;return c==="end"&&(p=n),nJ(i,l,t,u,p)}if(Le(r,o.start)<=0)if(Le(o.end,n)<=0)o={start:Fs(o.start,r.line,r.column),end:Fs(o.end,r.line,r.column)};else{if(Le(n,o.start)<=0)return null;s={start:s.start,end:a("end")},o={start:Fs(o.start,r.line,r.column),end:Fs(n,r.line,r.column)}}else{if(Le(o.end,r)<=0)return null;Le(o.end,n)<=0?(s={start:a("start"),end:s.end},o={start:{line:1,column:0},end:Fs(o.end,r.line,r.column)}):(s={start:a("start"),end:a("end")},o={start:{line:1,column:0},end:Fs(n,r.line,r.column)})}return new e(this.sourceLines,s,o)}add(t,r){return new e(this.sourceLines,this.sourceLoc,{start:vI(this.targetLoc.start,t,r),end:vI(this.targetLoc.end,t,r)})}subtract(t,r){return new e(this.sourceLines,this.sourceLoc,{start:Fs(this.targetLoc.start,t,r),end:Fs(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 vI(e,t,r){return{line:e.line+t-1,column:e.line===1?e.column+r:e.column}}function Fs(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function nJ(e,t,r,n,i){let s=Le(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);Le(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));Le(i,a)<0&&r.prevPos(a,!0););}return o}var iJ=Object.defineProperty,sJ=(e,t,r)=>t in e?iJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ql=(e,t,r)=>(sJ(e,typeof t!="symbol"?t+"":t,r),r),Za=class e{constructor(t,r=null){this.infos=t,Ql(this,"length"),Ql(this,"name"),Ql(this,"mappings",[]),Ql(this,"cachedSourceMap",null),Ql(this,"cachedTabWidth"),this.length=t.length,this.name=r||null,this.name&&this.mappings.push(new bx(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 Nf.default.SourceMapGenerator(i()),o={};return n.mappings.forEach(function(a){let c=a.sourceLines.skipSpaces(a.sourceLoc.start)||a.sourceLines.lastPos(),l=n.skipSpaces(a.targetLoc.start)||n.lastPos();for(;Le(c,a.sourceLoc.end)<0&&Le(l,a.targetLoc.end)<0;){a.sourceLines.charAt(c),n.charAt(l);let u=a.sourceLines.name;if(s.addMapping({source:u,original:{line:c.line,column:c.column},generated:{line:l.line,column:l.column}}),!xx.call(o,u)){let p=a.sourceLines.toString();s.setSourceContent(u,p),o[u]=p}n.nextPos(l,!0),a.sourceLines.nextPos(c,!0)}}),n.cachedSourceMap=s,s.toJSON()}bootstrapCharAt(t){let r=t.line,n=t.column,i=this.toString().split(vx),s=i[r-1];return typeof s>"u"?"":n===s.length&&r<i.length?`
|
|
1191
1191
|
`: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?`
|
|
1192
1192
|
`: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(Ja(c))continue;let l=Math.abs(a.indent-r);t[l]=~~t[l]+1,r=a.indent}let n=-1,i=2;for(let s=1;s<t.length;s+=1)xx.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 Ja(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 Ja(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(!Ja(this.charAt(t))&&this.nextPos(t))return t;return null}else{for(;Ja(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):Io}trimRight(){let t=this.skipSpaces(this.lastPos(),!0,!0);return t?this.slice(this.firstPos(),t):Io}trim(){let t=this.skipSpaces(this.firstPos(),!1,!0);if(t===null)return Io;let r=this.skipSpaces(this.lastPos(),!0,!0);return r===null?Io: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(vx).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)),$(n.join(`
|
|
@@ -1300,15 +1300,15 @@ ${c.join(`
|
|
|
1300
1300
|
\u274C Not a Figma URL - hostname check failed`),null;let n=r.searchParams.get("node-id")?.replaceAll("-",":"),i=r.pathname.split("/")[2];return n&&i?{fileID:i,nodeId:n}:null}catch{return null}},mY="https://api.figma.com/v1/",Si=async(e,t,r,{auth:n,params:i})=>{let s=new URL(`${mY}${r}`),o={};if(n.oauth?o.Authorization=`Bearer ${n.access_token}`:o["X-FIGMA-TOKEN"]=n.access_token,i)for(let c in i)i[c]!=null&&s.searchParams.set(c,i[c].toString());let a=await ot(s,{headers:o});if(!a.ok){if(a.status===401){B.error("Seems like figma auth is expired or it's invalid, let's try to");let c=await xt(e,t,{force:!0,figmaAuth:!0});return Si(e,t,r,{auth:c.figmaAuth,params:i})}throw new Error(`Figma REST ${a.statusText}: ${await a.text()}`)}return a.json()},Lk=async(e,t,r,n,i,s)=>(await Si(e,t,`files/${n}/nodes`,{auth:r,params:{ids:i,depth:s}})).nodes,hY=/^[a-f0-9]{40}$/;async function Bk(e,t,r){let n=JSON.stringify({token:t}),i=new URL(`${Kt}/mappings/figma-components/get`);e.builderPublicKey&&i.searchParams.set("apiKey",e.builderPublicKey),e.userId&&i.searchParams.set("userId",e.userId),r&&console.log("FETCH",i,n);let s={"Content-Type":"application/json"};e.builderPrivateKey&&(s.Authorization=`Bearer ${e.builderPrivateKey}`);let o=await ot(i,{method:"POST",body:n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`}});if(!o.ok)throw new Error(`Failed to generate completion:
|
|
1301
1301
|
`+await o.text());let a=await o.json();if(!Array.isArray(a.figmaComponents))throw new Error("Invalid response from Figma API");return a.figmaComponents.map(c=>["",c])}function $k(e){return e.some(t=>!!mu(t))}async function Uk(e,t,r,n,i){return(await Promise.all(i.map(async o=>{let a,c;if(o.match(hY))try{if(r){let p;try{p=await Si(e,t,`components/${o}`,{auth:r}),a=p.meta.file_key,c=p.meta.node_id}catch{B.warning("Failed to fetch component from Figma API.")}}}catch(p){throw Mk.captureException(p),p}if(!a||!c){let p=mu(o);if(!p)return xe(`Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection.
|
|
1302
1302
|
Or make sure the command is copied correctly from the Figma plugin and the same builder space is being used.`),await ee(1);p&&({fileID:a,nodeId:c}=p)}if(!r)return[];let l=await Lk(e,t,r,a,c),u=await gY(l[c],c);return u?[[o,u]]:[]}))).flat().filter(bY)}async function gY(e,t){let r=e.document;if(r.type!=="COMPONENT"&&r.type!=="COMPONENT_SET"){let i=`Seems like the pasted URL points to a ${r.type} node, not a COMPONENT or COMPONENT_SET.`;return r.type==="INSTANCE"&&(i+=`
|
|
1303
|
-
Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),xe(i),await ee(1)}let n=e.components[t]?.key??e.componentSets[t]?.key;return n?(e.document.key=n,fu(e,t)):(xe("Pasted URL does not correspond to a component or component set"),await ee(1))}async function $f(e,t,r,n,i){if(i.length>0){let s=await yY(e,t,r,i);for(let o of n)if(o.figmaUrl&&!o.figmaKey){let a=s[o.figmaUrl];a&&(o.figmaKey=a)}}}var yY=async(e,t,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=mu(o);if(!a){e.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await Lk(e,t,r,o,a.join(","),0);for(let l of a){let u=c[l],p=u.components[l]?.key??u.componentSets[l]?.key;p||e.Sentry?.withScope(h=>{h.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),e.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:l,fileID:o},level:"warning"})});let d=`${o}/${l}`;for(let h of n)s[h]===d&&(s[h]=p)}})),s};function bY(e){return e!=null}f();var ue=j(ut(),1);f();var Hr=require("path"),Kr=require("fs"),zs=j(ut(),1);f();var L0=j(require("process"),1),
|
|
1304
|
-
${c}`)}else n(`Request to ${e.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${e.url.href}, ${o}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function Uee(e){if(e.protocol==="https:")return
|
|
1303
|
+
Double click and select "Go to main component", then copy the URL to the figma COMPONENT`),xe(i),await ee(1)}let n=e.components[t]?.key??e.componentSets[t]?.key;return n?(e.document.key=n,fu(e,t)):(xe("Pasted URL does not correspond to a component or component set"),await ee(1))}async function $f(e,t,r,n,i){if(i.length>0){let s=await yY(e,t,r,i);for(let o of n)if(o.figmaUrl&&!o.figmaKey){let a=s[o.figmaUrl];a&&(o.figmaKey=a)}}}var yY=async(e,t,r,n)=>{if(!r)return{};let i=new Map,s={};return n.forEach(o=>{let a=mu(o);if(!a){e.Sentry?.captureException(new Error("Invalid Figma URL, use Cmd+L while selecting a figma component to get a link to selection"),{extra:{figmaUrl:o},level:"warning"});return}let c=i.get(a.fileID);c||(c=[],i.set(a.fileID,c)),c.includes(a.nodeId)||c.push(a.nodeId),s[o]=`${a.fileID}/${a.nodeId}`}),await Promise.all(Array.from(i.entries()).map(async([o,a])=>{let c=await Lk(e,t,r,o,a.join(","),0);for(let l of a){let u=c[l],p=u.components[l]?.key??u.componentSets[l]?.key;p||e.Sentry?.withScope(h=>{h.addAttachment({data:JSON.stringify(c,null,2),filename:`${o}.json`}),e.Sentry?.captureException(new Error("Cannot resolve figma component key for NodeID"),{extra:{nodeId:l,fileID:o},level:"warning"})});let d=`${o}/${l}`;for(let h of n)s[h]===d&&(s[h]=p)}})),s};function bY(e){return e!=null}f();var ue=j(ut(),1);f();var Hr=require("path"),Kr=require("fs"),zs=j(ut(),1);f();var L0=j(require("process"),1),Z8=j(require("fs"),1),Bo=j(require("path"),1);f();var jf=require("events"),zk=require("stream"),Kx=require("stream/promises");function Vx(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let i of e)Gx(i);let t=e.some(({readableObjectMode:i})=>i),r=xY(e,t),n=new zx({objectMode:t,writableHighWaterMark:r,readableHighWaterMark:r});for(let i of e)n.add(i);return e.length===0&&Kk(n),n}var xY=(e,t)=>{if(e.length===0)return 16384;let r=e.filter(({readableObjectMode:n})=>n===t).map(({readableHighWaterMark:n})=>n);return Math.max(...r)},zx=class extends zk.PassThrough{#c=new Set([]);#p=new Set([]);#d=new Set([]);#u;add(t){Gx(t),!this.#c.has(t)&&(this.#c.add(t),this.#u??=vY(this,this.#c),CY({passThroughStream:this,stream:t,streams:this.#c,ended:this.#p,aborted:this.#d,onFinished:this.#u}),t.pipe(this,{end:!1}))}remove(t){return Gx(t),this.#c.has(t)?(t.unpipe(this),!0):!1}},vY=async(e,t)=>{Uf(e,jk);let r=new AbortController;try{await Promise.race([wY(e,r),EY(e,t,r)])}finally{r.abort(),Uf(e,-jk)}},wY=async(e,{signal:t})=>{await(0,Kx.finished)(e,{signal:t,cleanup:!0})},EY=async(e,t,{signal:r})=>{for await(let[n]of(0,jf.on)(e,"unpipe",{signal:r}))t.has(n)&&n.emit(Hk)},Gx=e=>{if(typeof e?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},CY=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:i,onFinished:s})=>{Uf(e,qk);let o=new AbortController;try{await Promise.race([SY(s,t),DY({passThroughStream:e,stream:t,streams:r,ended:n,aborted:i,controller:o}),TY({stream:t,streams:r,ended:n,aborted:i,controller:o})])}finally{o.abort(),Uf(e,-qk)}r.size===n.size+i.size&&(n.size===0&&i.size>0?Hx(e):Kk(e))},Gk=e=>e?.code==="ERR_STREAM_PREMATURE_CLOSE",SY=async(e,t)=>{try{await e,Hx(t)}catch(r){Gk(r)?Hx(t):Vk(t,r)}},DY=async({passThroughStream:e,stream:t,streams:r,ended:n,aborted:i,controller:{signal:s}})=>{try{await(0,Kx.finished)(t,{signal:s,cleanup:!0,readable:!0,writable:!1}),r.has(t)&&n.add(t)}catch(o){if(s.aborted||!r.has(t))return;Gk(o)?i.add(t):Vk(e,o)}},TY=async({stream:e,streams:t,ended:r,aborted:n,controller:{signal:i}})=>{await(0,jf.once)(e,Hk,{signal:i}),t.delete(e),r.delete(e),n.delete(e)},Hk=Symbol("unpipe"),Kk=e=>{e.writable&&e.end()},Hx=e=>{(e.readable||e.writable)&&e.destroy()},Vk=(e,t)=>{e.destroyed||(e.once("error",AY),e.destroy(t))},AY=()=>{},Uf=(e,t)=>{let r=e.getMaxListeners();r!==0&&r!==Number.POSITIVE_INFINITY&&e.setMaxListeners(r+t)},jk=2,qk=1;var dc=j(N0(),1);f();var R8=j(require("fs"),1),M8=j(require("fs/promises"),1);async function F0(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await M8.default[e](r))[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}function O0(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return R8.default[e](r)[t]()}catch(n){if(n.code==="ENOENT")return!1;throw n}}var $2e=F0.bind(void 0,"stat","isFile"),L8=F0.bind(void 0,"stat","isDirectory"),U2e=F0.bind(void 0,"lstat","isSymbolicLink"),j2e=O0.bind(void 0,"statSync","isFile"),B8=O0.bind(void 0,"statSync","isDirectory"),q2e=O0.bind(void 0,"lstatSync","isSymbolicLink");f();var $8=require("util"),R0=require("child_process");var U8=require("url"),H2e=(0,$8.promisify)(R0.execFile);function vu(e){return e instanceof URL?(0,U8.fileURLToPath)(e):e}var K2e=10*1024*1024;f();var j8=j(require("process"),1),q8=j(require("fs"),1),z8=j(require("fs/promises"),1),Lo=j(require("path"),1),M0=j(N0(),1),G8=j(require("ignore"),1);f();function pc(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}f();var wu=e=>e[0]==="!";var Fee=["**/node_modules","**/flow-typed","**/coverage","**/.git"],H8={absolute:!0,dot:!0},K8="**/.gitignore",Oee=(e,t)=>wu(e)?"!"+Lo.default.posix.join(t,e.slice(1)):Lo.default.posix.join(t,e),Ree=(e,t)=>{let r=pc(Lo.default.relative(t,Lo.default.dirname(e.filePath)));return e.content.split(/\r?\n/).filter(n=>n&&!n.startsWith("#")).map(n=>Oee(n,r))},Mee=(e,t)=>{if(t=pc(t),Lo.default.isAbsolute(e)){if(pc(e).startsWith(t))return Lo.default.relative(t,e);throw new Error(`Path ${e} is not in cwd ${t}`)}return e},V8=(e,t)=>{let r=e.flatMap(i=>Ree(i,t)),n=(0,G8.default)().add(r);return i=>(i=vu(i),i=Mee(i,t),i?n.ignores(pc(i)):!1)},W8=(e={})=>({cwd:vu(e.cwd)??j8.default.cwd(),suppressErrors:!!e.suppressErrors,deep:typeof e.deep=="number"?e.deep:Number.POSITIVE_INFINITY,ignore:[...e.ignore??[],...Fee]}),J8=async(e,t)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=W8(t),o=await(0,M0.default)(e,{cwd:r,suppressErrors:n,deep:i,ignore:s,...H8}),a=await Promise.all(o.map(async c=>({filePath:c,content:await z8.default.readFile(c,"utf8")})));return V8(a,r)},Y8=(e,t)=>{let{cwd:r,suppressErrors:n,deep:i,ignore:s}=W8(t),a=M0.default.sync(e,{cwd:r,suppressErrors:n,deep:i,ignore:s,...H8}).map(c=>({filePath:c,content:q8.default.readFileSync(c,"utf8")}));return V8(a,r)};var Lee=e=>{if(e.some(t=>typeof t!="string"))throw new TypeError("Patterns must be a string or an array of strings")},eF=(e,t)=>{let r=wu(e)?e.slice(1):e;return Bo.default.isAbsolute(r)?r:Bo.default.join(t,r)},tF=({directoryPath:e,files:t,extensions:r})=>{let n=r?.length>0?`.${r.length>1?`{${r.join(",")}}`:r[0]}`:"";return t?t.map(i=>Bo.default.posix.join(e,`**/${Bo.default.extname(i)?i:`${i}${n}`}`)):[Bo.default.posix.join(e,`**${n?`/*${n}`:""}`)]},X8=async(e,{cwd:t=L0.default.cwd(),files:r,extensions:n}={})=>(await Promise.all(e.map(async s=>await L8(eF(s,t))?tF({directoryPath:s,files:r,extensions:n}):s))).flat(),Q8=(e,{cwd:t=L0.default.cwd(),files:r,extensions:n}={})=>e.flatMap(i=>B8(eF(i,t))?tF({directoryPath:i,files:r,extensions:n}):i),B0=e=>(e=[...new Set([e].flat())],Lee(e),e),Bee=e=>{if(!e)return;let t;try{t=Z8.default.statSync(e)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},rF=(e={})=>(e={...e,ignore:e.ignore??[],expandDirectories:e.expandDirectories??!0,cwd:vu(e.cwd)},Bee(e.cwd),e),nF=e=>async(t,r)=>e(B0(t),rF(r)),bm=e=>(t,r)=>e(B0(t),rF(r)),iF=e=>{let{ignoreFiles:t,gitignore:r}=e,n=t?B0(t):[];return r&&n.push(K8),n},$ee=async e=>{let t=iF(e);return oF(t.length>0&&await J8(t,e))},sF=e=>{let t=iF(e);return oF(t.length>0&&Y8(t,e))},oF=e=>{let t=new Set;return r=>{let n=Bo.default.normalize(r.path??r);return t.has(n)||e&&e(n)?!1:(t.add(n),!0)}},aF=(e,t)=>e.flat().filter(r=>t(r)),cF=(e,t)=>{let r=[];for(;e.length>0;){let n=e.findIndex(s=>wu(s));if(n===-1){r.push({patterns:e,options:t});break}let i=e[n].slice(1);for(let s of r)s.options.ignore.push(i);n!==0&&r.push({patterns:e.slice(0,n),options:{...t,ignore:[...t.ignore,i]}}),e=e.slice(n+1)}return r},lF=(e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e}),uF=async(e,t)=>{let r=cF(e,t),{cwd:n,expandDirectories:i}=t;if(!i)return r;let s=lF(i,n);return Promise.all(r.map(async o=>{let{patterns:a,options:c}=o;return[a,c.ignore]=await Promise.all([X8(a,s),X8(c.ignore,{cwd:n})]),{patterns:a,options:c}}))},$0=(e,t)=>{let r=cF(e,t),{cwd:n,expandDirectories:i}=t;if(!i)return r;let s=lF(i,n);return r.map(o=>{let{patterns:a,options:c}=o;return a=Q8(a,s),c.ignore=Q8(c.ignore,{cwd:n}),{patterns:a,options:c}})},U0=nF(async(e,t)=>{let[r,n]=await Promise.all([uF(e,t),$ee(t)]),i=await Promise.all(r.map(s=>(0,dc.default)(s.patterns,s.options)));return aF(i,n)}),uNe=bm((e,t)=>{let r=$0(e,t),n=sF(t),i=r.map(s=>dc.default.sync(s.patterns,s.options));return aF(i,n)}),pNe=bm((e,t)=>{let r=$0(e,t),n=sF(t),i=r.map(o=>dc.default.stream(o.patterns,o.options));return Vx(i).filter(o=>n(o))}),dNe=bm((e,t)=>e.some(r=>dc.default.isDynamicPattern(r,t))),fNe=nF(uF),mNe=bm($0),{convertPathToPattern:hNe}=dc.default;f();f();f();var xm=require("http");f();f();f();f();f();f();var pF=require("console"),dF=require("http"),fF=require("https");function fc(e){let t=Date.now();return new Promise((r,n)=>{let s=Uee(e.url)({protocol:e.url.protocol,host:e.url.host,port:e.url.port,path:e.url.pathname+e.url.search,method:e.method,headers:e.headers},o=>{let a="";o.on("data",c=>{a+=c}),o.on("end",()=>{if((0,pF.debug)(`${e.method} ${e.url.href}, duration: ${Date.now()-t}ms`),typeof o.statusCode=="number"&&o.statusCode>=200&&o.statusCode<300)if(typeof o.headers["content-type"]!="string"||!o.headers["content-type"].includes("application/json"))n(`Response from ${e.url.href} content-type is ${o.headers["content-type"]}`);else try{r(JSON.parse(a))}catch(c){n(`Response from ${e.url.href} is not valid JSON: ${a}
|
|
1304
|
+
${c}`)}else n(`Request to ${e.url.href} failed with status ${o.statusCode}: ${a}`)})}).on("error",o=>{n(`Error fetching ${e.url.href}, ${o}`)});e.body&&(s.setHeader("Content-Type","application/json"),s.write(e.body)),s.end()})}function Uee(e){if(e.protocol==="https:")return fF.request;if(e.protocol==="http:")return dF.request;throw new Error(`Unsupported protocol ${e.protocol}`)}async function mF(e){let t=new URL(`https://cdn.builder.io/api/v3/query/${e.publicApiKey}/${e.model}`);return t.searchParams.set("omit","meta.componentsUsed"),t.searchParams.set("apiKey",e.publicApiKey),t.searchParams.set("userAttributes.urlPath",e.pageUrl),t.searchParams.set("options.page.model",`"${e.model}"`),t.searchParams.set("cachebust","true"),(await fc({url:t,method:"GET"}))[e.model]}async function hF(e,t){if(t.kind===xl.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
1305
1305
|
models {
|
|
1306
1306
|
id
|
|
1307
1307
|
name
|
|
1308
1308
|
}
|
|
1309
|
-
}`};e.debug(`Get model id for model name "${t.model}"`);let s=(await fc({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)})).data.models.find(c=>c.name===t.model);if(!s)return e.debug(`No model found for model name "${t.model}"`),!1;e.debug(`Data query, modelId: "${s.id}", urlPath: "${t.pageUrl}"`);let o=new URL("https://cdn.builder.io/api/v3/data");o.searchParams.set("limit","1"),o.searchParams.set("cachebust","true"),o.searchParams.set("collection","content"),o.searchParams.set("query.published.$ne","archived"),o.searchParams.set("query.query.$elemMatch.$and[0].property","urlPath"),o.searchParams.set("query.query.$elemMatch.$and[0].operator","is"),o.searchParams.set("query.query.$elemMatch.$and[0].value",t.pageUrl),o.searchParams.set("query.modelId",s.id),o.searchParams.set("apiKey",t.publicApiKey);let a=await fc({url:o,method:"GET"});return e.debug(`Data results (${a.results.length}): ${o.href}`),a.results.length>0}async function
|
|
1309
|
+
}`};e.debug(`Get model id for model name "${t.model}"`);let s=(await fc({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)})).data.models.find(c=>c.name===t.model);if(!s)return e.debug(`No model found for model name "${t.model}"`),!1;e.debug(`Data query, modelId: "${s.id}", urlPath: "${t.pageUrl}"`);let o=new URL("https://cdn.builder.io/api/v3/data");o.searchParams.set("limit","1"),o.searchParams.set("cachebust","true"),o.searchParams.set("collection","content"),o.searchParams.set("query.published.$ne","archived"),o.searchParams.set("query.query.$elemMatch.$and[0].property","urlPath"),o.searchParams.set("query.query.$elemMatch.$and[0].operator","is"),o.searchParams.set("query.query.$elemMatch.$and[0].value",t.pageUrl),o.searchParams.set("query.modelId",s.id),o.searchParams.set("apiKey",t.publicApiKey);let a=await fc({url:o,method:"GET"});return e.debug(`Data results (${a.results.length}): ${o.href}`),a.results.length>0}async function gF(e,t){let r=new URL(`https://cdn.builder.io/api/v3/content/${t.model}`);r.searchParams.set("apiKey",t.publicApiKey),r.searchParams.set("cachebust","true"),r.searchParams.set("cb",Date.now().toString()),t.pageUrl&&(r.searchParams.set("url",t.pageUrl),e.debug(`get model: "${t.model}", pageUrl: "${t.pageUrl}":`,r.href)),t.id&&(r.searchParams.set("query.id",t.id),e.debug(`get model: "${t.model}", id: "${t.id}":`,r.href));let n=await fc({url:r,method:"GET"});return e.debug(`get content results: ${n.results.length}`),n}async function yF(e,t){let r=new URL(`https://cdn.builder.io/api/v1/write/${t.model}`);e.debug(`writing "${t.model}" content:`,r.href),await fc({url:r,method:"POST",headers:{Authorization:`Bearer ${t.privateAuthKey}`},body:t.body})}f();var mc="page",bF="integration-welcome-screens",xF="8d9ee72a33344b4b867918b442ebd0af";async function vF(e,t){let r=await gF(e,{model:bF,publicApiKey:xF,id:t.templateContentId});if(!Array.isArray(r?.results)||r.results.length===0||!r.results[0].data?.blocks)throw new Error(`No Builder content found for id ${t.templateContentId}`);let n=JSON.stringify(r.results[0].data.blocks),i=jee(t.publicApiKey,t.pathname,t.title,n);await yF(e,{privateAuthKey:t.privateAuthKey,model:mc,body:i})}function jee(e,t,r,n){return JSON.stringify({name:r,ownerId:e,published:"published",query:[{property:"urlPath",value:[t],operator:"is"}],data:{title:r,blocksString:n}})}async function wF(e,t,r,n){e.debug(`connect builder with public key: ${t}`),e.publicApiKey=t;let i=e.closeAppServer(),s=await e.setPublicApiKey({publicApiKey:t});if(s.modifiedType==="permission-error")return e.debug("permission error, failed to set public api key"),{success:!1,pathname:""};e.debug(`set public key: process.env.${s.envKey}=${t}`),process.env[s.envKey]=t;let o=await e.builderPageOptions();e.debug(`builder model: ${mc}, path: ${o.pathname}, template: ${o.templateContentId}`);let a=await hF(e,{model:mc,pageUrl:o.pathname,publicApiKey:t,privateAuthKey:r,kind:n});if(!a){await vF(e,{templateContentId:o.templateContentId,pathname:o.pathname,title:o.title,publicApiKey:t,privateAuthKey:r});let u=5,p=0;for(;!a&&p<u;){await new Promise(h=>setTimeout(h,1e3));let d=await mF({model:mc,pageUrl:o.pathname,publicApiKey:t,privateAuthKey:r});p++,d&&d.length>0&&(a=!0)}}await i,e.debug("ensure builder setup");let c=[];n===xl.VCP?c=await e.ensureFigmaImportPage():c=await e.ensureBuilderSetup(),s.modifiedType&&c.push({filePath:s.file,modifiedType:s.modifiedType}),c.forEach(u=>{u.displayFilePath=e.relative(e.getAppRootDir(),u.filePath)}),c.sort((u,p)=>u.filePath.localeCompare(p.filePath)),c.length>0?(e.debug(`modified files: ${c.map(u=>u.displayFilePath).join(", ")}`),await e.restartAppServer(),await new Promise(u=>setTimeout(u,500))):e.debug("no modified files");let l={success:!0,pathname:o.localePathname||o.pathname,modifiedFiles:c,platform:e.platform(),kind:n};return n===xl.VCP&&(l.pathname="/"),e.debug(`connected builder: ${l.pathname}`),l}async function EF(e){let t=await e.builderPageOptions();e.debug(`validateBuilder, pathname: ${t.pathname}, localePathname: ${t.localePathname}, isValid: ${e.isValid}`);let r={isValid:e.isValid,pathname:t.localePathname||t.pathname,platform:e.platform()};if(e.isValid)return r;let n=await e.getPublicApiKey();return n.envValue?(e.debug(`public api key: ${n.envValue}, ${n.file}`),e.publicApiKey=n.envValue,e.debug("builder connection is valid"),r.isValid=!0,e.isValid=!0,r):(e.debug("missing public api key"),r)}async function CF(e,t){let r={type:t.type};switch(t.type){case"getCache":{r.data=await e.getCache();break}case"setCache":{await e.setCache(t.data);break}case"connectBuilder":{r.data=await wF(e,t.data.publicApiKey,t.data.privateAuthKey,t.data.kind);break}case"enableDevTools":{r.data=Gee(e,t.data.enabled);break}case"getRegistry":{r.data=await e.getRegistry(t.data);break}case"launchEditor":{r.data=await e.launchEditor(t.data);break}case"validateBuilder":{r.data=await EF(e);break}case"loadComponent":{r.data=await e.loadComponent(t.data);break}case"getAllProjectFiles":{e.getAllProjectFiles?r.data=await e.getAllProjectFiles():r.errors=["getAllProjectFiles not implemented"];break}case"registerComponent":{r.data=await e.registerComponent(t.data),e.serverShouldRestart=!0;break}case"setComponentInfo":{r.data=await e.setRegisteredComponentInfo(t.data),e.serverShouldRestart=!0;break}case"setComponentInput":{r.data=await e.setRegisteredComponentInput(t.data),e.serverShouldRestart=!0;break}case"unregisterComponent":{r.data=await e.unregisterComponent(t.data),e.serverShouldRestart=!0;break}case"getFrameworks":{r.data=e.getFrameworks();break}case"readdir":{j0(e,t.path)?r.data=await e.readdir(t.path,!0):r.errors=[`Invalid file request: ${t.path}`];break}case"readFile":{j0(e,t.path)?r.data=await e.readFile(t.path):r.errors=[`Invalid file request: ${t.path}`];break}case"writeFile":{j0(e,t.path)?await e.writeFile(t.path,t.content):r.errors=[`Invalid file request: ${t.path}`];break}case"ensureFigmaImportPage":{r.data=await e.ensureFigmaImportPage();break}case"transileFile":{r.data=await bD(e,t);break}case"transileModule":{r.data=ay(e,t);break}case"getPastSyncInfo":{r.data=await e.getPastSyncInfo?.(t.data);break}case"resyncSnippet":{r.data=await e.resyncSnippet?.(t.data);break}case"localConfig":{r.data=await rc();break}default:{r.errors=[`Unknown request type: ${JSON.stringify(t)}`];let n=t}}return r}function j0(e,t){if(!t||t.includes(".."))return!1;t=t.replace(/\\/g,"/");let r=t.split("/"),n=r[r.length-1];if(n.length>0){let i=n.split(".").pop();if(i&&(i=`.${i}`.toLocaleLowerCase(),i=i.split("?")[0],!zee.includes(i)))return!1}return qee(e,t),!1}function qee(e,t){if(!t)return!1;t=e.normalize(e.resolve(t));let r=e.getAppRootDir();return!(!t.startsWith(r)&&!t.includes("node_modules"))}var zee=[".js",".jsx",".ts",".tsx",".json",".css",".scss",".sass",".less",".html",".htm",".xml",".svg",".png",".jpg",".jpeg",".gif",".ico",".webp",".woff",".woff2",".ttf",".eot",".mp4",".webm",".ogg",".md",".txt",".csv",".pdf"];function Gee(e,t){return!t&&e.serverShouldRestart&&setTimeout(()=>{console.log(`
|
|
1310
1310
|
Restarting server after Builder Devtools update...
|
|
1311
|
-
`),e.restartAppServer()},10),e.enableAppWatch(!t),{enabled:t,platform:e.platform()}}f();async function S8(e){return T8(e,`"use strict";(()=>{var fi=Object.create;var Mt=Object.defineProperty;var mi=Object.getOwnPropertyDescriptor;var vi=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,hi=Object.prototype.hasOwnProperty;var yi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bi=(t,e)=>{for(var r in e)Mt(t,r,{get:e[r],enumerable:!0})},Ei=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vi(e))!hi.call(t,i)&&i!==r&&Mt(t,i,{get:()=>e[i],enumerable:!(n=mi(e,i))||n.enumerable});return t};var _i=(t,e,r)=>(r=t!=null?fi(gi(t)):{},Ei(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t));var jn=yi((Qe,Ct)=>{(function(t,e){"use strict";var r="0.7.33",n="",i="?",o="function",s="undefined",u="object",d="string",p="major",a="model",c="name",l="type",f="vendor",m="version",_="architecture",b="console",v="mobile",y="tablet",T="smarttv",L="wearable",k="embedded",w=350,C="Amazon",R="Apple",K="ASUS",z="BlackBerry",Q="Browser",P="Chrome",Ce="Edge",ce="Firefox",_e="Google",Me="Huawei",Re="LG",Oe="Microsoft",Be="Motorola",Te="Opera",we="Samsung",ke="Sharp",fe="Sony",me="Xiaomi",Ve="Zebra",U="Facebook",et=function(S,O){var I={};for(var q in S)O[q]&&O[q].length%2===0?I[q]=O[q].concat(S[q]):I[q]=S[q];return I},tt=function(S){for(var O={},I=0;I<S.length;I++)O[S[I].toUpperCase()]=S[I];return O},Pr=function(S,O){return typeof S===d?Fe(O).indexOf(Fe(S))!==-1:!1},Fe=function(S){return S.toLowerCase()},di=function(S){return typeof S===d?S.replace(/[^\\d\\.]/g,n).split(".")[0]:e},Nt=function(S,O){if(typeof S===d)return S=S.replace(/^\\s\\s*/,n),typeof O===s?S:S.substring(0,w)},He=function(S,O){for(var I=0,q,x,nt,D,qe,ie;I<O.length&&!qe;){var Or=O[I],kr=O[I+1];for(q=x=0;q<Or.length&&!qe;)if(qe=Or[q++].exec(S),qe)for(nt=0;nt<kr.length;nt++)ie=qe[++x],D=kr[nt],typeof D===u&&D.length>0?D.length===2?typeof D[1]==o?this[D[0]]=D[1].call(this,ie):this[D[0]]=D[1]:D.length===3?typeof D[1]===o&&!(D[1].exec&&D[1].test)?this[D[0]]=ie?D[1].call(this,ie,D[2]):e:this[D[0]]=ie?ie.replace(D[1],D[2]):e:D.length===4&&(this[D[0]]=ie?D[3].call(this,ie.replace(D[1],D[2])):e):this[D]=ie||e;I+=2}},Ut=function(S,O){for(var I in O)if(typeof O[I]===u&&O[I].length>0){for(var q=0;q<O[I].length;q++)if(Pr(O[I][q],S))return I===i?e:I}else if(Pr(O[I],S))return I===i?e:I;return S},pi={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Cr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Rr={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[m,[c,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[m,[c,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[c,m],[/opios[\\/ ]+([\\w\\.]+)/i],[m,[c,Te+" Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[m,[c,Te]],[/(kindle)\\/([\\w\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i,/(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i,/(?:ms|\\()(ie) ([\\w\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,/(weibo)__([\\d\\.]+)/i],[c,m],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[m,[c,"UC"+Q]],[/microm.+\\bqbcore\\/([\\w\\.]+)/i,/\\bqbcore\\/([\\w\\.]+).+microm/i],[m,[c,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[m,[c,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[m,[c,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[m,[c,"IE"]],[/yabrowser\\/([\\w\\.]+)/i],[m,[c,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 Secure "+Q],m],[/\\bfocus\\/([\\w\\.]+)/i],[m,[c,ce+" Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[m,[c,Te+" Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[m,[c,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[m,[c,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[m,[c,Te+" Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[m,[c,"MIUI "+Q]],[/fxios\\/([-\\w\\.]+)/i],[m,[c,ce]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+Q]],[/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 "+Q],m],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[c,/_/g," "],m],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[c,m],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i,/\\[(linkedin)app\\]/i],[c],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[c,U],m],[/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[c,m],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[m,[c,"GSA"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[m,[c,P+" Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[c,P+" WebView"],m],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[m,[c,"Android "+Q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[c,m],[/version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i],[m,[c,"Mobile Safari"]],[/version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i],[m,c],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[c,[m,Ut,pi]],[/(webkit|khtml)\\/([\\w\\.]+)/i],[c,m],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[c,"Netscape"],m],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[m,[c,ce+" Reality"]],[/ekiohf.+(flow)\\/([\\w\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,/(firefox)\\/([\\w\\.]+)/i,/(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,/(links) \\(([\\w\\.]+)/i],[c,m],[/(cobalt)\\/([\\w\\.]+)/i],[c,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,Fe]],[/((?:i[346]|x)86)[;\\)]/i],[[_,"ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[[_,"arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[[_,/ower/,n,Fe]],[/(sun4\\w)[;\\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[[_,Fe]]],device:[[/\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[f,we],[l,y]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[a,[f,we],[l,v]],[/((ipod|iphone)\\d+,\\d+)/i],[a,[f,R],[l,v]],[/(ipad\\d+,\\d+)/i],[a,[f,R],[l,y]],[/\\((ip(?:hone|od)[\\w ]*);/i],[a,[f,R],[l,v]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[a,[f,R],[l,y]],[/(macintosh);/i],[a,[f,R]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[a,[f,Me],[l,y]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i],[a,[f,Me],[l,v]],[/\\b(poco[\\w ]+)(?: bui|\\))/i,/\\b; (\\w+) build\\/hm\\1/i,/\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i,/\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i,/\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,v]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,y]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i],[a,[f,"OPPO"],[l,v]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[a,[f,"Vivo"],[l,v]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[a,[f,"Realme"],[l,v]],[/\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,/\\bmot(?:orola)?[- ](\\w*)/i,/((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i],[a,[f,Be],[l,v]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[a,[f,Be],[l,y]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[f,Re],[l,y]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[a,[f,Re],[l,v]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[a,[f,"Lenovo"],[l,y]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[a,/_/g," "],[f,"Nokia"],[l,v]],[/(pixel c)\\b/i],[a,[f,_e],[l,y]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[a,[f,_e],[l,v]],[/droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[a,[f,fe],[l,v]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[a,"Xperia Tablet"],[f,fe],[l,y]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[a,[f,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[a,[f,C],[l,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[a,/(.+)/g,"Fire Phone $1"],[f,C],[l,v]],[/(playbook);[-\\w\\),; ]+(rim)/i],[a,f,[l,y]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[a,[f,z],[l,v]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[a,[f,K],[l,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[a,[f,K],[l,v]],[/(nexus 9)/i],[a,[f,"HTC"],[l,y]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\\w]*)/i],[f,[a,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[a,[f,"Acer"],[l,y]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[a,[f,"Meizu"],[l,v]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[a,[f,ke],[l,v]],[/(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,/(hp) ([\\w ]+\\w)/i,/(asus)-?(\\w+)/i,/(microsoft); (lumia[\\w ]+)/i,/(lenovo)[-_ ]?([-\\w]+)/i,/(jolla)/i,/(oppo) ?([\\w ]+) bui/i],[f,a,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\/([\\w\\.]+)/i,/(nook)[\\w ]+build\\/(\\w+)/i,/(dell) (strea[kpr\\d ]*[\\dko])/i,/(le[- ]+pan)[- ]+(\\w{1,9}) bui/i,/(trinity)[- ]*(t\\d{3}) bui/i,/(gigaset)[- ]+(q\\w{1,9}) bui/i,/(vodafone) ([\\w ]+)(?:\\)| bui)/i],[f,a,[l,y]],[/(surface duo)/i],[a,[f,Oe],[l,y]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[a,[f,"Fairphone"],[l,v]],[/(u304aa)/i],[a,[f,"AT&T"],[l,v]],[/\\bsie-(\\w*)/i],[a,[f,"Siemens"],[l,v]],[/\\b(rct\\w+) b/i],[a,[f,"RCA"],[l,y]],[/\\b(venue[\\d ]{2,7}) b/i],[a,[f,"Dell"],[l,y]],[/\\b(q(?:mv|ta)\\w+) b/i],[a,[f,"Verizon"],[l,y]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[a,[f,"Barnes & Noble"],[l,y]],[/\\b(tm\\d{3}\\w+) b/i],[a,[f,"NuVision"],[l,y]],[/\\b(k88) b/i],[a,[f,"ZTE"],[l,y]],[/\\b(nx\\d{3}j) b/i],[a,[f,"ZTE"],[l,v]],[/\\b(gen\\d{3}) b.+49h/i],[a,[f,"Swiss"],[l,v]],[/\\b(zur\\d{3}) b/i],[a,[f,"Swiss"],[l,y]],[/\\b((zeki)?tb.*\\b) b/i],[a,[f,"Zeki"],[l,y]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[f,"Dragon Touch"],a,[l,y]],[/\\b(ns-?\\w{0,9}) b/i],[a,[f,"Insignia"],[l,y]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[a,[f,"NextBook"],[l,y]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],a,[l,v]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[f,"LvTel"],a,[l,v]],[/\\b(ph-1) /i],[a,[f,"Essential"],[l,v]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[a,[f,"Envizen"],[l,y]],[/\\b(trio[-\\w\\. ]+) b/i],[a,[f,"MachSpeed"],[l,y]],[/\\btu_(1491) b/i],[a,[f,"Rotor"],[l,y]],[/(shield[\\w ]+) b/i],[a,[f,"Nvidia"],[l,y]],[/(sprint) (\\w+)/i],[f,a,[l,v]],[/(kin\\.[onetw]{3})/i],[[a,/\\./g," "],[f,Oe],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[a,[f,Ve],[l,y]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[a,[f,Ve],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,a,[l,b]],[/droid.+; (shield) bui/i],[a,[f,"Nvidia"],[l,b]],[/(playstation [345portablevi]+)/i],[a,[f,fe],[l,b]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[a,[f,Oe],[l,b]],[/smart-tv.+(samsung)/i],[f,[l,T]],[/hbbtv.+maple;(\\d+)/i],[[a,/^/,"SmartTV"],[f,we],[l,T]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[f,Re],[l,T]],[/(apple) ?tv/i],[f,[a,R+" TV"],[l,T]],[/crkey/i],[[a,P+"cast"],[f,_e],[l,T]],[/droid.+aft(\\w)( bui|\\))/i],[a,[f,C],[l,T]],[/\\(dtv[\\);].+(aquos)/i,/(aquos-tv[\\w ]+)\\)/i],[a,[f,ke],[l,T]],[/(bravia[\\w ]+)( bui|\\))/i],[a,[f,fe],[l,T]],[/(mitv-\\w{5}) bui/i],[a,[f,me],[l,T]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i],[[f,Nt],[a,Nt],[l,T]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[l,T]],[/((pebble))app/i],[f,a,[l,L]],[/droid.+; (glass) \\d/i],[a,[f,_e],[l,L]],[/droid.+; (wt63?0{2,3})\\)/i],[a,[f,Ve],[l,L]],[/(quest( 2)?)/i],[a,[f,U],[l,L]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[f,[l,k]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[a,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[a,[l,y]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[l,y]],[/(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\\w\\. ]{0,9});.+buil/i],[a,[f,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[m,[c,Ce+"HTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[m,[c,"Blink"]],[/(presto)\\/([\\w\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i,/ekioh(flow)\\/([\\w\\.]+)/i,/(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i,/(icab)[\\/ ]([23]\\.[\\d\\.]+)/i],[c,m],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[m,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,m],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[c,[m,Ut,Cr]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[c,"Windows"],[m,Ut,Cr]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/cfnetwork\\/.+darwin/i],[[m,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[c,"Mac OS"],[m,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i],[m,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[c,m],[/\\(bb(10);/i],[m,[c,z]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[m,[c,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[m,[c,ce+" OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[m,[c,"webOS"]],[/crkey\\/([\\d\\.]+)/i],[m,[c,P+"cast"]],[/(cros) [\\w]+ ([\\w\\.]+\\w)/i],[[c,"Chromium OS"],m],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\\);]+)/i,/\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i,/(mint)[\\/\\(\\) ]?(\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,/(hurd|linux) ?([\\w\\.]*)/i,/(gnu) ?([\\w\\.]*)/i,/\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i,/(haiku) (\\w+)/i],[c,m],[/(sunos) ?([\\w\\.\\d]*)/i],[[c,"Solaris"],m],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\\w\\.]*)/i],[c,m]]},Z=function(S,O){if(typeof S===u&&(O=S,S=e),!(this instanceof Z))return new Z(S,O).getResult();var I=S||(typeof t!==s&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:n),q=O?et(Rr,O):Rr;return this.getBrowser=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.browser),x.major=di(x.version),x},this.getCPU=function(){var x={};return x[_]=e,He.call(x,I,q.cpu),x},this.getDevice=function(){var x={};return x[f]=e,x[a]=e,x[l]=e,He.call(x,I,q.device),x},this.getEngine=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.engine),x},this.getOS=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.os),x},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return I},this.setUA=function(x){return I=typeof x===d&&x.length>w?Nt(x,w):x,this},this.setUA(I),this};Z.VERSION=r,Z.BROWSER=tt([c,m,p]),Z.CPU=tt([_]),Z.DEVICE=tt([a,f,l,b,v,T,y,L,k]),Z.ENGINE=Z.OS=tt([c,m]),typeof Qe!==s?(typeof Ct!==s&&Ct.exports&&(Qe=Ct.exports=Z),Qe.UAParser=Z):typeof define===o&&define.amd?define(function(){return Z}):typeof t!==s&&(t.UAParser=Z);var Ae=typeof t!==s&&(t.jQuery||t.Zepto);if(Ae&&!Ae.ua){var rt=new Z;Ae.ua=rt.getResult(),Ae.ua.get=function(){return rt.getUA()},Ae.ua.set=function(S){rt.setUA(S);var O=rt.getResult();for(var I in O)Ae.ua[I]=O[I]}}})(typeof window=="object"?window:Qe)});var oe=(t,e)=>{Vt(t);let r=t.querySelector("aside");r.dataset.view=e,r.classList.remove("section-ready"),setTimeout(()=>{r.classList.add("section-ready")},200)},Ar=t=>{Array.from(t.querySelectorAll(".back-button")).forEach(e=>{e.addEventListener("click",r=>{Vt(t),r.preventDefault(),r.stopPropagation();let n=r.target;oe(t,n?.dataset.back||"nav-home")})})},Bt=(t,e)=>{Vt(t);let r=t.querySelector("aside"),n=document.createElement("div");n.className="ui-toast",n.innerHTML=e,r.appendChild(n),setTimeout(()=>{n.classList.add("ui-toast-show"),setTimeout(()=>{n.classList.remove("ui-toast-show"),setTimeout(()=>{n.remove()},500)},4e3)},30)},Vt=t=>{let e=t.querySelector("aside");Array.from(e.querySelectorAll(".ui-toast")).forEach(n=>{n.classList.remove("ui-toast-show")})},it=()=>{let t=Dr();return localStorage.getItem(t)!=="true"},Ft=t=>{let e=Dr();t?localStorage.removeItem(e):localStorage.setItem(e,"true")},Dr=()=>Ti("disableEdit"),Ti=t=>\`builder.__LOCAL_APP_ID__.\${t}\`,Nr=()=>{let e=document.body.querySelector("[builder-content-id]")?.getAttribute("builder-content-id");return je(e)},je=(t,e)=>{let r="/content";t&&(r+="/"+t+"/edit");let n=new URL(r,"https://builder.io");t&&e&&n.searchParams.set("selectedBlock",e);let i=new URL(location.pathname,location.href);return n.searchParams.set("overridePreviewUrl",i.href),n.href},ot="__DEV_TOOLS_URL__",G={components:[],registryPath:"",registryDisplayPath:"",frameworks:[],dependencies:[],publicApiKey:void 0,devToolsVersion:""},le=t=>{G.components=t.components,G.registryPath=t.registryPath,G.registryDisplayPath=t.registryDisplayPath,G.dependencies=t.dependencies,G.publicApiKey=t.publicApiKey};function Ur(t){let e=null,r=document.querySelector("builder-dev-tools-menu"),n=()=>{t.hide()},i=u=>{let d=u.target;if(!d){n();return}if(d.closest("builder-dev-tools-edit"))return;let p=d.closest("[builder-content-id]"),a=d.closest("[builder-id]");if(!p||!a){t.hide();return}let c=t.show(p,a);!c||c===e||(r.highlightOpener(),e=c)};document.addEventListener("pointerover",i,{passive:!0}),document.addEventListener("pointerleave",n,{passive:!0}),document.addEventListener("pointercancel",n,{passive:!0}),document.addEventListener("visibilitychange",n,{passive:!0}),window.addEventListener("popstate",n,{passive:!0});let o=history.pushState;history.pushState=function(...u){t.hide(),o.apply(this,u)};let s=history.replaceState;history.replaceState=function(...u){t.hide(),s.apply(this,u)}}var st=class extends HTMLElement{openInBuilder=null;block=null;constructor(){super()}connectedCallback(){this.setAttribute("aria-hidden","true");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)}:host{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}#content-highlight,#block{position:absolute}#content-highlight{border:3px solid var(--primary-color);background-color:var(--primary-color-alpha)}a{position:absolute;top:-33px;left:0;display:block;padding:5px 10px 8px;pointer-events:auto;z-index:100;text-decoration:none}a:hover{text-decoration:none}a span{display:block;padding:3px 6px;font-size:10px;font-weight:300;border-radius:3px;text-align:center;text-decoration:none;pointer-events:none;background-color:var(--edit-color);color:var(--text-color);white-space:nowrap}a:hover span{background-color:var(--edit-color-highlight)}a:hover~.outline{border-color:var(--edit-color-highlight)}#open-in-editor{display:none}.outline{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid var(--edit-color);background-color:var(--edit-color-alpha)}</style><div id="block"> <a id="open-in-builder" target="builder"><span>Open In Builder</span></a> <a id="open-in-editor" href="#open-in-editor"><span>Open In Editor</span></a> <div class="outline"></div> </div>',this.openInBuilder=e.getElementById("open-in-builder"),this.block=e.getElementById("block"),Ur(this)}show(e,r){if(!it())return this.hide(),null;let n=e.getAttribute("builder-content-id"),i=r.getAttribute("builder-id");if(!n||!i)return this.hide(),null;let o=this.block,s=this.openInBuilder,u=r.getBoundingClientRect();o.style.top=u.top+window.scrollY-1+"px",o.style.left=u.left+window.scrollX+"px",o.style.width=u.width+"px",o.style.height=u.height+1+"px";let d=s.getBoundingClientRect();if(d.width>u.width){let p=d.width-u.width;s.style.left=p/2*-1+"px"}else s.style.left="";return s.href=je(n,i),this.style.display="block",i}hide(){this.style.display=""}};var Mr="preview-url";var Br="_b-uid";var Vr="/~builder-connect";var Fr="/~builder-dev-tools";var Hr="https://cdn.builder.io/api/v1/proxy-api?url=https://api2.amplitude.com/2/httpapi";var qr=()=>se({type:"validateBuilder"}),De=t=>se({type:"launchEditor",data:t}),jr=t=>se({type:"getRegistry",data:t}),Gr=t=>se({type:"loadComponent",data:t}),Kr=t=>se({type:"registerComponent",data:t}),Wr=t=>se({type:"setComponentInfo",data:t}),at=t=>se({type:"setComponentInput",data:t}),$r=t=>se({type:"unregisterComponent",data:t}),Yr=t=>se({type:"enableDevTools",data:{enabled:t}}),zr=()=>se({type:"localConfig"}),se=async t=>{let e=new URL(Fr,ot),r;try{r=await fetch(e,{method:"POST",body:JSON.stringify(t)})}catch(i){throw console.error(\`Devtools Fetch Error, \${e.href}\`,i),new Error("Builder Devtools Fetch Error")}if((r.headers.get("content-type")||"").includes("application/json")){let i=await r.json();if(r.ok)return i.data;if(Array.isArray(i.errors)&&i.errors.length>0)throw i.errors.forEach(o=>console.error(o)),new Error(\`Builder Devtools Fetch Error: \${i.errors[0]}\`)}throw new Error(\`Builder Devtools Fetch Error: \${r.status}, \${await r.text()}\`)};var Qr=[{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"}],ut=["color","date","email","file","longText","richText","string"],ct=["number"],lt=["boolean"],dt=["list"],pt=["object"];function ft(t){return ut.includes(t)?"string":ct.includes(t)?"number":lt.includes(t)?"boolean":dt.includes(t)?"array":pt.includes(t)?"object":"string"}var Io=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(t=>t.toLowerCase()));var Ht=function(t,e){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ht(t,e)};function ae(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ht(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var E=function(){return E=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},E.apply(this,arguments)};function Ge(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function g(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(a){try{p(n.next(a))}catch(c){s(c)}}function d(a){try{p(n.throw(a))}catch(c){s(c)}}function p(a){a.done?o(a.value):i(a.value).then(u,d)}p((n=n.apply(t,e||[])).next())})}function h(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(p){return function(a){return d([p,a])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(n=1,i&&(o=p[0]&2?i.return:p[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,p[1])).done)return o;switch(i=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){r.label=p[1];break}if(p[0]===6&&r.label<o[1]){r.label=o[1],o=p;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(p);break}o[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(a){p=[6,a],i=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function J(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function ee(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var mt={};bi(mt,{IdentifyOperation:()=>B,LogLevel:()=>Y,PluginType:()=>N,RevenueProperty:()=>re,ServerZone:()=>Se,SpecialEventType:()=>de,Status:()=>M,TransportType:()=>Ie});var B;(function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"})(B||(B={}));var re;(function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue"})(re||(re={}));var de;(function(t){t.IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"})(de||(de={}));var Y;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})(Y||(Y={}));var N;(function(t){t.BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})(N||(N={}));var Se;(function(t){t.US="US",t.EU="EU",t.STAGING="STAGING"})(Se||(Se={}));var M;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})(M||(M={}));var Ie;(function(t){t.XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})(Ie||(Ie={}));var qt="-",xe="AMP",jt="".concat(xe,"_unsent"),Gt="https://api2.amplitude.com/2/httpapi",Xr="https://api.eu.amplitude.com/2/httpapi",Zr="https://api2.amplitude.com/batch",Jr="https://api.eu.amplitude.com/batch";var wi=1e3,vt=function(t){if(Object.keys(t).length>wi)return!1;for(var e in t){var r=t[e];if(!Kt(e,r))return!1}return!0},Kt=function(t,e){var r,n;if(typeof t!="string")return!1;if(Array.isArray(e)){var i=!0;try{for(var o=J(e),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if(typeof u=="object")i=i&&vt(u);else if(!["number","string"].includes(typeof u))return!1;if(!i)return!1}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else{if(e==null)return!1;if(typeof e=="object")return vt(e);if(!["number","string","boolean"].includes(typeof e))return!1}return!0};var ne=function(){function t(){this._propertySet=new Set,this._properties={}}return t.prototype.getUserProperties=function(){return E({},this._properties)},t.prototype.set=function(e,r){return this._safeSet(B.SET,e,r),this},t.prototype.setOnce=function(e,r){return this._safeSet(B.SET_ONCE,e,r),this},t.prototype.append=function(e,r){return this._safeSet(B.APPEND,e,r),this},t.prototype.prepend=function(e,r){return this._safeSet(B.PREPEND,e,r),this},t.prototype.postInsert=function(e,r){return this._safeSet(B.POSTINSERT,e,r),this},t.prototype.preInsert=function(e,r){return this._safeSet(B.PREINSERT,e,r),this},t.prototype.remove=function(e,r){return this._safeSet(B.REMOVE,e,r),this},t.prototype.add=function(e,r){return this._safeSet(B.ADD,e,r),this},t.prototype.unset=function(e){return this._safeSet(B.UNSET,e,qt),this},t.prototype.clearAll=function(){return this._properties={},this._properties[B.CLEAR_ALL]=qt,this},t.prototype._safeSet=function(e,r,n){if(this._validate(e,r,n)){var i=this._properties[e];return i===void 0&&(i={},this._properties[e]=i),i[r]=n,this._propertySet.add(r),!0}return!1},t.prototype._validate=function(e,r,n){return this._properties[B.CLEAR_ALL]!==void 0||this._propertySet.has(r)?!1:e===B.ADD?typeof n=="number":e!==B.UNSET&&e!==B.REMOVE?Kt(r,n):!0},t}();var en=function(t,e,r){var n=typeof t=="string"?{event_type:t}:t;return E(E(E({},n),r),e&&{event_properties:e})},Ke=function(t,e){var r=E(E({},e),{event_type:de.IDENTIFY,user_properties:t.getUserProperties()});return r},tn=function(t,e,r,n){var i,o=E(E({},n),{event_type:de.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:(i={},i[t]=e,i)});return o},rn=function(t,e,r){var n,i=new ne;i.set(t,e);var o=E(E({},r),{event_type:de.IDENTIFY,user_properties:i.getUserProperties(),groups:(n={},n[t]=e,n)});return o},nn=function(t,e){return E(E({},e),{event_type:de.REVENUE,event_properties:t.getEventProperties()})};var ve=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=M.Unknown),{event:t,code:e,message:r}};var on=function(){function t(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return t.prototype.register=function(e,r){return g(this,void 0,void 0,function(){return h(this,function(n){switch(n.label){case 0:return[4,e.setup(r,this.client)];case 1:return n.sent(),this.plugins.push(e),[2]}})})},t.prototype.deregister=function(e,r){var n;return g(this,void 0,void 0,function(){var i,o;return h(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(u){return u.name===e}),i===-1?(r.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(n=o.teardown)===null||n===void 0?void 0:n.call(o)]);case 1:return s.sent(),[2]}})})},t.prototype.reset=function(e){this.applying=!1;var r=this.plugins;r.map(function(n){var i;return(i=n.teardown)===null||i===void 0?void 0:i.call(n)}),this.plugins=[],this.client=e},t.prototype.push=function(e){var r=this;return new Promise(function(n){r.queue.push([e,n]),r.scheduleApply(0)})},t.prototype.scheduleApply=function(e){var r=this;this.applying||(this.applying=!0,setTimeout(function(){r.apply(r.queue.shift()).then(function(){r.applying=!1,r.queue.length>0&&r.scheduleApply(0)})},e))},t.prototype.apply=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d,f,m,p,a,c,l,f,m,_,b,v,y,T,L,k;return h(this,function(w){switch(w.label){case 0:if(!e)return[2];r=A(e,1),n=r[0],i=A(e,2),o=i[1],s=this.plugins.filter(function(C){return C.type===N.BEFORE}),w.label=1;case 1:w.trys.push([1,6,7,8]),u=J(s),d=u.next(),w.label=2;case 2:return d.done?[3,5]:(f=d.value,[4,f.execute(E({},n))]);case 3:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=4;case 4:return d=u.next(),[3,2];case 5:return[3,8];case 6:return p=w.sent(),y={error:p},[3,8];case 7:try{d&&!d.done&&(T=u.return)&&T.call(u)}finally{if(y)throw y.error}return[7];case 8:a=this.plugins.filter(function(C){return C.type===N.ENRICHMENT}),w.label=9;case 9:w.trys.push([9,14,15,16]),c=J(a),l=c.next(),w.label=10;case 10:return l.done?[3,13]:(f=l.value,[4,f.execute(E({},n))]);case 11:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return _=w.sent(),L={error:_},[3,16];case 15:try{l&&!l.done&&(k=c.return)&&k.call(c)}finally{if(L)throw L.error}return[7];case 16:return b=this.plugins.filter(function(C){return C.type===N.DESTINATION}),v=b.map(function(C){var R=E({},n);return C.execute(R).catch(function(K){return ve(R,0,String(K))})}),Promise.all(v).then(function(C){var R=A(C,1),K=R[0];o(K)}),[2]}})})},t.prototype.flush=function(){return g(this,void 0,void 0,function(){var e,r,n,i=this;return h(this,function(o){switch(o.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(s){return i.apply(s)}))];case 1:return o.sent(),r=this.plugins.filter(function(s){return s.type===N.DESTINATION}),n=r.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(n)];case 2:return o.sent(),[2]}})})},t}();var sn="Event tracked successfully",an="Unexpected error occurred",un="Event rejected due to exceeded retry count",cn="Event skipped due to optOut config",ln="Event rejected due to missing API key",dn="Invalid API key",pn="Client not initialized";var X=function(t){return{promise:t||Promise.resolve()}};var Wt=function(){function t(e){e===void 0&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new on(this),this.name=e}return t.prototype._init=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){switch(r.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return r.sent(),[2]}})})},t.prototype.runQueuedFunctions=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d;return h(this,function(p){switch(p.label){case 0:r=this[e],this[e]=[],p.label=1;case 1:p.trys.push([1,6,7,8]),n=J(r),i=n.next(),p.label=2;case 2:return i.done?[3,5]:(o=i.value,[4,o()]);case 3:p.sent(),p.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s=p.sent(),u={error:s},[3,8];case 7:try{i&&!i.done&&(d=n.return)&&d.call(n)}finally{if(u)throw u.error}return[7];case 8:return[2]}})})},t.prototype.track=function(e,r,n){var i=en(e,r,n);return X(this.dispatch(i))},t.prototype.identify=function(e,r){var n=Ke(e,r);return X(this.dispatch(n))},t.prototype.groupIdentify=function(e,r,n,i){var o=tn(e,r,n,i);return X(this.dispatch(o))},t.prototype.setGroup=function(e,r,n){var i=rn(e,r,n);return X(this.dispatch(i))},t.prototype.revenue=function(e,r){var n=nn(e,r);return X(this.dispatch(n))},t.prototype.add=function(e){return this.config?X(this.timeline.register(e,this.config)):(this.q.push(this.add.bind(this,e)),X())},t.prototype.remove=function(e){return this.config?X(this.timeline.deregister(e,this.config)):(this.q.push(this.remove.bind(this,e)),X())},t.prototype.dispatchWithCallback=function(e,r){if(!this.config)return r(ve(e,0,pn));this.process(e).then(r)},t.prototype.dispatch=function(e){return g(this,void 0,void 0,function(){var r=this;return h(this,function(n){return this.config?[2,this.process(e)]:[2,new Promise(function(i){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,i))})]})})},t.prototype.process=function(e){return g(this,void 0,void 0,function(){var i,r,n,i;return h(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,ve(e,0,cn)]:[4,this.timeline.push(e)];case 1:return i=o.sent(),i.code===200?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return r=o.sent(),this.config.loggerProvider.error(r),n=String(r),i=ve(e,0,n),[2,i];case 3:return[2]}})})},t.prototype.setOptOut=function(e){if(!this.config){this.q.push(this.setOptOut.bind(this,!!e));return}this.config.optOut=!!e},t.prototype.flush=function(){return X(this.timeline.flush())},t}();var gt=function(){function t(){this.productId="",this.quantity=1,this.price=0}return t.prototype.setProductId=function(e){return this.productId=e,this},t.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},t.prototype.setPrice=function(e){return this.price=e,this},t.prototype.setRevenueType=function(e){return this.revenueType=e,this},t.prototype.setCurrency=function(e){return this.currency=e,this},t.prototype.setRevenue=function(e){return this.revenue=e,this},t.prototype.setEventProperties=function(e){return vt(e)&&(this.properties=e),this},t.prototype.getEventProperties=function(){var e=this.properties?E({},this.properties):{};return e[re.REVENUE_PRODUCT_ID]=this.productId,e[re.REVENUE_QUANTITY]=this.quantity,e[re.REVENUE_PRICE]=this.price,e[re.REVENUE_TYPE]=this.revenueType,e[re.REVENUE_CURRENCY]=this.currency,e[re.REVENUE]=this.revenue,e},t}();var fn=function(t,e){var r=Math.max(e,1);return t.reduce(function(n,i,o){var s=Math.floor(o/r);return n[s]||(n[s]=[]),n[s].push(i),n},[])};var ht="Amplitude Logger ",mn=function(){function t(){this.logLevel=Y.None}return t.prototype.disable=function(){this.logLevel=Y.None},t.prototype.enable=function(e){e===void 0&&(e=Y.Warn),this.logLevel=e},t.prototype.log=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Verbose||console.log("".concat(ht,"[Log]: ").concat(e.join(" ")))},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Warn||console.warn("".concat(ht,"[Warn]: ").concat(e.join(" ")))},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Error||console.error("".concat(ht,"[Error]: ").concat(e.join(" ")))},t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Debug||console.log("".concat(ht,"[Debug]: ").concat(e.join(" ")))},t}();var yt=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:Y.Warn,loggerProvider:new mn,optOut:!1,serverUrl:Gt,serverZone:Se.US,useBatch:!1}},$t=function(){function t(e){var r,n,i,o;this._optOut=!1;var s=yt();this.apiKey=e.apiKey,this.flushIntervalMillis=(r=e.flushIntervalMillis)!==null&&r!==void 0?r:s.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||s.flushQueueSize,this.instanceName=e.instanceName||s.instanceName,this.loggerProvider=e.loggerProvider||s.loggerProvider,this.logLevel=(n=e.logLevel)!==null&&n!==void 0?n:s.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=(i=e.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||s.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=(o=e.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var u=Yt(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=u.serverZone,this.serverUrl=u.serverUrl}return Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();var Si=function(t,e){return t===Se.EU?e?Jr:Xr:e?Zr:Gt},Yt=function(t,e,r){if(t===void 0&&(t=""),e===void 0&&(e=yt().serverZone),r===void 0&&(r=yt().useBatch),t)return{serverUrl:t,serverZone:void 0};var n=["US","EU"].includes(e)?e:yt().serverZone;return{serverZone:n,serverUrl:Si(n,r)}};function Ii(t){return t instanceof Error?t.message:String(t)}function bt(t){var e="";try{"body"in t&&(e=JSON.stringify(t.body))}catch{}return e}var zt=function(){function t(){this.name="amplitude",this.type=N.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return t.prototype.setup=function(e){var r;return g(this,void 0,void 0,function(){var n,i=this;return h(this,function(o){switch(o.label){case 0:return this.config=e,this.storageKey="".concat(jt,"_").concat(this.config.apiKey.substring(0,10)),[4,(r=this.config.storageProvider)===null||r===void 0?void 0:r.get(this.storageKey)];case 1:return n=o.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},t.prototype.execute=function(e){var r=this;return new Promise(function(n){var i={event:e,attempts:0,callback:function(o){return n(o)},timeout:0};r.addToQueue(i)})},t.prototype.addToQueue=function(){for(var e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.filter(function(o){return o.attempts<e.config.flushMaxRetries?(o.attempts+=1,!0):(e.fulfillRequest([o],500,un),!1)});i.forEach(function(o){if(e.queue=e.queue.concat(o),o.timeout===0){e.schedule(e.config.flushIntervalMillis);return}setTimeout(function(){o.timeout=0,e.schedule(0)},o.timeout)}),this.saveEvents()},t.prototype.schedule=function(e){var r=this;this.scheduled||(this.scheduled=setTimeout(function(){r.flush(!0).then(function(){r.queue.length>0&&r.schedule(e)})},e))},t.prototype.flush=function(e){return e===void 0&&(e=!1),g(this,void 0,void 0,function(){var r,n,i,o=this;return h(this,function(s){switch(s.label){case 0:return r=[],n=[],this.queue.forEach(function(u){return u.timeout===0?r.push(u):n.push(u)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=fn(r,this.config.flushQueueSize),[4,Promise.all(i.map(function(u){return o.send(u,e)}))];case 1:return s.sent(),[2]}})})},t.prototype.send=function(e,r){return r===void 0&&(r=!0),g(this,void 0,void 0,function(){var n,i,o,s,u;return h(this,function(d){switch(d.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,ln)];n={api_key:this.config.apiKey,events:e.map(function(p){var a=p.event,c=a.extra,l=Ge(a,["extra"]);return l}),options:{min_id_length:this.config.minIdLength}},d.label=1;case 1:return d.trys.push([1,3,,4]),i=Yt(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:return o=d.sent(),o===null?(this.fulfillRequest(e,0,an),[2]):r?(this.handleResponse(o,e),[3,4]):("body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(bt(o))):this.fulfillRequest(e,o.statusCode,o.status),[2]);case 3:return s=d.sent(),this.config.loggerProvider.error(s),u=Ii(s),this.fulfillRequest(e,0,u),[3,4];case 4:return[2]}})})},t.prototype.handleResponse=function(e,r){var n=e.status;switch(n){case M.Success:{this.handleSuccessResponse(e,r);break}case M.Invalid:{this.handleInvalidResponse(e,r);break}case M.PayloadTooLarge:{this.handlePayloadTooLargeResponse(e,r);break}case M.RateLimit:{this.handleRateLimitResponse(e,r);break}default:{this.config.loggerProvider.warn(\`{code: 0, error: "Status '\`.concat(n,"' provided for ").concat(r.length,' events"}')),this.handleOtherResponse(r);break}}},t.prototype.handleSuccessResponse=function(e,r){this.fulfillRequest(r,e.statusCode,sn)},t.prototype.handleInvalidResponse=function(e,r){var n=this;if(e.body.missingField||e.body.error.startsWith(dn)){this.fulfillRequest(r,e.statusCode,e.body.error);return}var i=ee(ee(ee(ee([],A(Object.values(e.body.eventsWithInvalidFields)),!1),A(Object.values(e.body.eventsWithMissingFields)),!1),A(Object.values(e.body.eventsWithInvalidIdLengths)),!1),A(e.body.silencedEvents),!1).flat(),o=new Set(i),s=r.filter(function(u,d){if(o.has(d)){n.fulfillRequest([u],e.statusCode,e.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(s),!1))},t.prototype.handlePayloadTooLargeResponse=function(e,r){if(r.length===1){this.fulfillRequest(r,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(bt(e)),this.config.flushQueueSize/=2,this.addToQueue.apply(this,ee([],A(r),!1))},t.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),s=e.body.throttledEvents,u=new Set(i),d=new Set(o),p=new Set(s),a=r.filter(function(c,l){if(c.event.user_id&&u.has(c.event.user_id)||c.event.device_id&&d.has(c.event.device_id)){n.fulfillRequest([c],e.statusCode,e.body.error);return}return p.has(l)&&(c.timeout=n.throttleTimeout),!0});a.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(a),!1))},t.prototype.handleOtherResponse=function(e){var r=this;this.addToQueue.apply(this,ee([],A(e.map(function(n){return n.timeout=n.attempts*r.retryTimeout,n})),!1))},t.prototype.fulfillRequest=function(e,r,n){this.saveEvents(),e.forEach(function(i){return i.callback(ve(i.event,r,n))})},t.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map(function(r){return r.event}));this.config.storageProvider.set(this.storageKey,e)}},t}();var xi=function(t){t===void 0&&(t=0);var e=new Error().stack||"";return e.split(\`
|
|
1311
|
+
`),e.restartAppServer()},10),e.enableAppWatch(!t),{enabled:t,platform:e.platform()}}f();async function SF(e){return TF(e,`"use strict";(()=>{var fi=Object.create;var Mt=Object.defineProperty;var mi=Object.getOwnPropertyDescriptor;var vi=Object.getOwnPropertyNames;var gi=Object.getPrototypeOf,hi=Object.prototype.hasOwnProperty;var yi=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),bi=(t,e)=>{for(var r in e)Mt(t,r,{get:e[r],enumerable:!0})},Ei=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of vi(e))!hi.call(t,i)&&i!==r&&Mt(t,i,{get:()=>e[i],enumerable:!(n=mi(e,i))||n.enumerable});return t};var _i=(t,e,r)=>(r=t!=null?fi(gi(t)):{},Ei(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t));var jn=yi((Qe,Ct)=>{(function(t,e){"use strict";var r="0.7.33",n="",i="?",o="function",s="undefined",u="object",d="string",p="major",a="model",c="name",l="type",f="vendor",m="version",_="architecture",b="console",v="mobile",y="tablet",T="smarttv",L="wearable",k="embedded",w=350,C="Amazon",R="Apple",K="ASUS",z="BlackBerry",Q="Browser",P="Chrome",Ce="Edge",ce="Firefox",_e="Google",Me="Huawei",Re="LG",Oe="Microsoft",Be="Motorola",Te="Opera",we="Samsung",ke="Sharp",fe="Sony",me="Xiaomi",Ve="Zebra",U="Facebook",et=function(S,O){var I={};for(var q in S)O[q]&&O[q].length%2===0?I[q]=O[q].concat(S[q]):I[q]=S[q];return I},tt=function(S){for(var O={},I=0;I<S.length;I++)O[S[I].toUpperCase()]=S[I];return O},Pr=function(S,O){return typeof S===d?Fe(O).indexOf(Fe(S))!==-1:!1},Fe=function(S){return S.toLowerCase()},di=function(S){return typeof S===d?S.replace(/[^\\d\\.]/g,n).split(".")[0]:e},Nt=function(S,O){if(typeof S===d)return S=S.replace(/^\\s\\s*/,n),typeof O===s?S:S.substring(0,w)},He=function(S,O){for(var I=0,q,x,nt,D,qe,ie;I<O.length&&!qe;){var Or=O[I],kr=O[I+1];for(q=x=0;q<Or.length&&!qe;)if(qe=Or[q++].exec(S),qe)for(nt=0;nt<kr.length;nt++)ie=qe[++x],D=kr[nt],typeof D===u&&D.length>0?D.length===2?typeof D[1]==o?this[D[0]]=D[1].call(this,ie):this[D[0]]=D[1]:D.length===3?typeof D[1]===o&&!(D[1].exec&&D[1].test)?this[D[0]]=ie?D[1].call(this,ie,D[2]):e:this[D[0]]=ie?ie.replace(D[1],D[2]):e:D.length===4&&(this[D[0]]=ie?D[3].call(this,ie.replace(D[1],D[2])):e):this[D]=ie||e;I+=2}},Ut=function(S,O){for(var I in O)if(typeof O[I]===u&&O[I].length>0){for(var q=0;q<O[I].length;q++)if(Pr(O[I][q],S))return I===i?e:I}else if(Pr(O[I],S))return I===i?e:I;return S},pi={"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Cr={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Rr={browser:[[/\\b(?:crmo|crios)\\/([\\w\\.]+)/i],[m,[c,"Chrome"]],[/edg(?:e|ios|a)?\\/([\\w\\.]+)/i],[m,[c,"Edge"]],[/(opera mini)\\/([-\\w\\.]+)/i,/(opera [mobiletab]{3,6})\\b.+version\\/([-\\w\\.]+)/i,/(opera)(?:.+version\\/|[\\/ ]+)([\\w\\.]+)/i],[c,m],[/opios[\\/ ]+([\\w\\.]+)/i],[m,[c,Te+" Mini"]],[/\\bopr\\/([\\w\\.]+)/i],[m,[c,Te]],[/(kindle)\\/([\\w\\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\\/ ]?([\\w\\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\\/ ]?([\\w\\.]*)/i,/(ba?idubrowser)[\\/ ]?([\\w\\.]+)/i,/(?:ms|\\()(ie) ([\\w\\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\\/([-\\w\\.]+)/i,/(weibo)__([\\d\\.]+)/i],[c,m],[/(?:\\buc? ?browser|(?:juc.+)ucweb)[\\/ ]?([\\w\\.]+)/i],[m,[c,"UC"+Q]],[/microm.+\\bqbcore\\/([\\w\\.]+)/i,/\\bqbcore\\/([\\w\\.]+).+microm/i],[m,[c,"WeChat(Win) Desktop"]],[/micromessenger\\/([\\w\\.]+)/i],[m,[c,"WeChat"]],[/konqueror\\/([\\w\\.]+)/i],[m,[c,"Konqueror"]],[/trident.+rv[: ]([\\w\\.]{1,9})\\b.+like gecko/i],[m,[c,"IE"]],[/yabrowser\\/([\\w\\.]+)/i],[m,[c,"Yandex"]],[/(avast|avg)\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 Secure "+Q],m],[/\\bfocus\\/([\\w\\.]+)/i],[m,[c,ce+" Focus"]],[/\\bopt\\/([\\w\\.]+)/i],[m,[c,Te+" Touch"]],[/coc_coc\\w+\\/([\\w\\.]+)/i],[m,[c,"Coc Coc"]],[/dolfin\\/([\\w\\.]+)/i],[m,[c,"Dolphin"]],[/coast\\/([\\w\\.]+)/i],[m,[c,Te+" Coast"]],[/miuibrowser\\/([\\w\\.]+)/i],[m,[c,"MIUI "+Q]],[/fxios\\/([-\\w\\.]+)/i],[m,[c,ce]],[/\\bqihu|(qi?ho?o?|360)browser/i],[[c,"360 "+Q]],[/(oculus|samsung|sailfish|huawei)browser\\/([\\w\\.]+)/i],[[c,/(.+)/,"$1 "+Q],m],[/(comodo_dragon)\\/([\\w\\.]+)/i],[[c,/_/g," "],m],[/(electron)\\/([\\w\\.]+) safari/i,/(tesla)(?: qtcarbrowser|\\/(20\\d\\d\\.[-\\w\\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\\/ ]?([\\w\\.]+)/i],[c,m],[/(metasr)[\\/ ]?([\\w\\.]+)/i,/(lbbrowser)/i,/\\[(linkedin)app\\]/i],[c],[/((?:fban\\/fbios|fb_iab\\/fb4a)(?!.+fbav)|;fbav\\/([\\w\\.]+);)/i],[[c,U],m],[/safari (line)\\/([\\w\\.]+)/i,/\\b(line)\\/([\\w\\.]+)\\/iab/i,/(chromium|instagram)[\\/ ]([-\\w\\.]+)/i],[c,m],[/\\bgsa\\/([\\w\\.]+) .*safari\\//i],[m,[c,"GSA"]],[/headlesschrome(?:\\/([\\w\\.]+)| )/i],[m,[c,P+" Headless"]],[/ wv\\).+(chrome)\\/([\\w\\.]+)/i],[[c,P+" WebView"],m],[/droid.+ version\\/([\\w\\.]+)\\b.+(?:mobile safari|safari)/i],[m,[c,"Android "+Q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\\/v?([\\w\\.]+)/i],[c,m],[/version\\/([\\w\\.\\,]+) .*mobile\\/\\w+ (safari)/i],[m,[c,"Mobile Safari"]],[/version\\/([\\w(\\.|\\,)]+) .*(mobile ?safari|safari)/i],[m,c],[/webkit.+?(mobile ?safari|safari)(\\/[\\w\\.]+)/i],[c,[m,Ut,pi]],[/(webkit|khtml)\\/([\\w\\.]+)/i],[c,m],[/(navigator|netscape\\d?)\\/([-\\w\\.]+)/i],[[c,"Netscape"],m],[/mobile vr; rv:([\\w\\.]+)\\).+firefox/i],[m,[c,ce+" Reality"]],[/ekiohf.+(flow)\\/([\\w\\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\\/ ]?([\\w\\.\\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\\/([-\\w\\.]+)$/i,/(firefox)\\/([\\w\\.]+)/i,/(mozilla)\\/([\\w\\.]+) .+rv\\:.+gecko\\/\\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\\. ]?browser)[-\\/ ]?v?([\\w\\.]+)/i,/(links) \\(([\\w\\.]+)/i],[c,m],[/(cobalt)\\/([\\w\\.]+)/i],[c,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\\)]/i],[[_,"amd64"]],[/(ia32(?=;))/i],[[_,Fe]],[/((?:i[346]|x)86)[;\\)]/i],[[_,"ia32"]],[/\\b(aarch64|arm(v?8e?l?|_?64))\\b/i],[[_,"arm64"]],[/\\b(arm(?:v[67])?ht?n?[fl]p?)\\b/i],[[_,"armhf"]],[/windows (ce|mobile); ppc;/i],[[_,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\\))/i],[[_,/ower/,n,Fe]],[/(sun4\\w)[;\\)]/i],[[_,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\\))|\\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\\b|pa-risc)/i],[[_,Fe]]],device:[[/\\b(sch-i[89]0\\d|shw-m380s|sm-[ptx]\\w{2,4}|gt-[pn]\\d{2,4}|sgh-t8[56]9|nexus 10)/i],[a,[f,we],[l,y]],[/\\b((?:s[cgp]h|gt|sm)-\\w+|galaxy nexus)/i,/samsung[- ]([-\\w]+)/i,/sec-(sgh\\w+)/i],[a,[f,we],[l,v]],[/((ipod|iphone)\\d+,\\d+)/i],[a,[f,R],[l,v]],[/(ipad\\d+,\\d+)/i],[a,[f,R],[l,y]],[/\\((ip(?:hone|od)[\\w ]*);/i],[a,[f,R],[l,v]],[/\\((ipad);[-\\w\\),; ]+apple/i,/applecoremedia\\/[\\w\\.]+ \\((ipad)/i,/\\b(ipad)\\d\\d?,\\d\\d?[;\\]].+ios/i],[a,[f,R],[l,y]],[/(macintosh);/i],[a,[f,R]],[/\\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\\d{2})\\b(?!.+d\\/s)/i],[a,[f,Me],[l,y]],[/(?:huawei|honor)([-\\w ]+)[;\\)]/i,/\\b(nexus 6p|\\w{2,4}e?-[atu]?[ln][\\dx][012359c][adn]?)\\b(?!.+d\\/s)/i],[a,[f,Me],[l,v]],[/\\b(poco[\\w ]+)(?: bui|\\))/i,/\\b; (\\w+) build\\/hm\\1/i,/\\b(hm[-_ ]?note?[_ ]?(?:\\d\\w)?) bui/i,/\\b(redmi[\\-_ ]?(?:note|k)?[\\w_ ]+)(?: bui|\\))/i,/\\b(mi[-_ ]?(?:a\\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\\d?\\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,v]],[/\\b(mi[-_ ]?(?:pad)(?:[\\w_ ]+))(?: bui|\\))/i],[[a,/_/g," "],[f,me],[l,y]],[/; (\\w+) bui.+ oppo/i,/\\b(cph[12]\\d{3}|p(?:af|c[al]|d\\w|e[ar])[mt]\\d0|x9007|a101op)\\b/i],[a,[f,"OPPO"],[l,v]],[/vivo (\\w+)(?: bui|\\))/i,/\\b(v[12]\\d{3}\\w?[at])(?: bui|;)/i],[a,[f,"Vivo"],[l,v]],[/\\b(rmx[12]\\d{3})(?: bui|;|\\))/i],[a,[f,"Realme"],[l,v]],[/\\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\\b[\\w ]+build\\//i,/\\bmot(?:orola)?[- ](\\w*)/i,/((?:moto[\\w\\(\\) ]+|xt\\d{3,4}|nexus 6)(?= bui|\\)))/i],[a,[f,Be],[l,v]],[/\\b(mz60\\d|xoom[2 ]{0,2}) build\\//i],[a,[f,Be],[l,y]],[/((?=lg)?[vl]k\\-?\\d{3}) bui| 3\\.[-\\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[f,Re],[l,y]],[/(lm(?:-?f100[nv]?|-[\\w\\.]+)(?= bui|\\))|nexus [45])/i,/\\blg[-e;\\/ ]+((?!browser|netcast|android tv)\\w+)/i,/\\blg-?([\\d\\w]+) bui/i],[a,[f,Re],[l,v]],[/(ideatab[-\\w ]+)/i,/lenovo ?(s[56]000[-\\w]+|tab(?:[\\w ]+)|yt[-\\d\\w]{6}|tb[-\\d\\w]{6})/i],[a,[f,"Lenovo"],[l,y]],[/(?:maemo|nokia).*(n900|lumia \\d+)/i,/nokia[-_ ]?([-\\w\\.]*)/i],[[a,/_/g," "],[f,"Nokia"],[l,v]],[/(pixel c)\\b/i],[a,[f,_e],[l,y]],[/droid.+; (pixel[\\daxl ]{0,6})(?: bui|\\))/i],[a,[f,_e],[l,v]],[/droid.+ (a?\\d[0-2]{2}so|[c-g]\\d{4}|so[-gl]\\w+|xq-a\\w[4-7][12])(?= bui|\\).+chrome\\/(?![1-6]{0,1}\\d\\.))/i],[a,[f,fe],[l,v]],[/sony tablet [ps]/i,/\\b(?:sony)?sgp\\w+(?: bui|\\))/i],[[a,"Xperia Tablet"],[f,fe],[l,y]],[/ (kb2005|in20[12]5|be20[12][59])\\b/i,/(?:one)?(?:plus)? (a\\d0\\d\\d)(?: b|\\))/i],[a,[f,"OnePlus"],[l,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\\))/i,/(kf[a-z]+)( bui|\\)).+silk\\//i],[a,[f,C],[l,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\\)).+silk\\//i],[[a,/(.+)/g,"Fire Phone $1"],[f,C],[l,v]],[/(playbook);[-\\w\\),; ]+(rim)/i],[a,f,[l,y]],[/\\b((?:bb[a-f]|st[hv])100-\\d)/i,/\\(bb10; (\\w+)/i],[a,[f,z],[l,v]],[/(?:\\b|asus_)(transfo[prime ]{4,10} \\w+|eeepc|slider \\w+|nexus 7|padfone|p00[cj])/i],[a,[f,K],[l,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \\d\\w?)\\b/i],[a,[f,K],[l,v]],[/(nexus 9)/i],[a,[f,"HTC"],[l,y]],[/(htc)[-;_ ]{1,2}([\\w ]+(?=\\)| bui)|\\w+)/i,/(zte)[- ]([\\w ]+?)(?: bui|\\/|\\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\\w]*)/i],[f,[a,/_/g," "],[l,v]],[/droid.+; ([ab][1-7]-?[0178a]\\d\\d?)/i],[a,[f,"Acer"],[l,y]],[/droid.+; (m[1-5] note) bui/i,/\\bmz-([-\\w]{2,})/i],[a,[f,"Meizu"],[l,v]],[/\\b(sh-?[altvz]?\\d\\d[a-ekm]?)/i],[a,[f,ke],[l,v]],[/(blackberry|benq|palm(?=\\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\\w]*)/i,/(hp) ([\\w ]+\\w)/i,/(asus)-?(\\w+)/i,/(microsoft); (lumia[\\w ]+)/i,/(lenovo)[-_ ]?([-\\w]+)/i,/(jolla)/i,/(oppo) ?([\\w ]+) bui/i],[f,a,[l,v]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\\/([\\w\\.]+)/i,/(nook)[\\w ]+build\\/(\\w+)/i,/(dell) (strea[kpr\\d ]*[\\dko])/i,/(le[- ]+pan)[- ]+(\\w{1,9}) bui/i,/(trinity)[- ]*(t\\d{3}) bui/i,/(gigaset)[- ]+(q\\w{1,9}) bui/i,/(vodafone) ([\\w ]+)(?:\\)| bui)/i],[f,a,[l,y]],[/(surface duo)/i],[a,[f,Oe],[l,y]],[/droid [\\d\\.]+; (fp\\du?)(?: b|\\))/i],[a,[f,"Fairphone"],[l,v]],[/(u304aa)/i],[a,[f,"AT&T"],[l,v]],[/\\bsie-(\\w*)/i],[a,[f,"Siemens"],[l,v]],[/\\b(rct\\w+) b/i],[a,[f,"RCA"],[l,y]],[/\\b(venue[\\d ]{2,7}) b/i],[a,[f,"Dell"],[l,y]],[/\\b(q(?:mv|ta)\\w+) b/i],[a,[f,"Verizon"],[l,y]],[/\\b(?:barnes[& ]+noble |bn[rt])([\\w\\+ ]*) b/i],[a,[f,"Barnes & Noble"],[l,y]],[/\\b(tm\\d{3}\\w+) b/i],[a,[f,"NuVision"],[l,y]],[/\\b(k88) b/i],[a,[f,"ZTE"],[l,y]],[/\\b(nx\\d{3}j) b/i],[a,[f,"ZTE"],[l,v]],[/\\b(gen\\d{3}) b.+49h/i],[a,[f,"Swiss"],[l,v]],[/\\b(zur\\d{3}) b/i],[a,[f,"Swiss"],[l,y]],[/\\b((zeki)?tb.*\\b) b/i],[a,[f,"Zeki"],[l,y]],[/\\b([yr]\\d{2}) b/i,/\\b(dragon[- ]+touch |dt)(\\w{5}) b/i],[[f,"Dragon Touch"],a,[l,y]],[/\\b(ns-?\\w{0,9}) b/i],[a,[f,"Insignia"],[l,y]],[/\\b((nxa|next)-?\\w{0,9}) b/i],[a,[f,"NextBook"],[l,y]],[/\\b(xtreme\\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],a,[l,v]],[/\\b(lvtel\\-)?(v1[12]) b/i],[[f,"LvTel"],a,[l,v]],[/\\b(ph-1) /i],[a,[f,"Essential"],[l,v]],[/\\b(v(100md|700na|7011|917g).*\\b) b/i],[a,[f,"Envizen"],[l,y]],[/\\b(trio[-\\w\\. ]+) b/i],[a,[f,"MachSpeed"],[l,y]],[/\\btu_(1491) b/i],[a,[f,"Rotor"],[l,y]],[/(shield[\\w ]+) b/i],[a,[f,"Nvidia"],[l,y]],[/(sprint) (\\w+)/i],[f,a,[l,v]],[/(kin\\.[onetw]{3})/i],[[a,/\\./g," "],[f,Oe],[l,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\\)/i],[a,[f,Ve],[l,y]],[/droid.+; (ec30|ps20|tc[2-8]\\d[kx])\\)/i],[a,[f,Ve],[l,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,a,[l,b]],[/droid.+; (shield) bui/i],[a,[f,"Nvidia"],[l,b]],[/(playstation [345portablevi]+)/i],[a,[f,fe],[l,b]],[/\\b(xbox(?: one)?(?!; xbox))[\\); ]/i],[a,[f,Oe],[l,b]],[/smart-tv.+(samsung)/i],[f,[l,T]],[/hbbtv.+maple;(\\d+)/i],[[a,/^/,"SmartTV"],[f,we],[l,T]],[/(nux; netcast.+smarttv|lg (netcast\\.tv-201\\d|android tv))/i],[[f,Re],[l,T]],[/(apple) ?tv/i],[f,[a,R+" TV"],[l,T]],[/crkey/i],[[a,P+"cast"],[f,_e],[l,T]],[/droid.+aft(\\w)( bui|\\))/i],[a,[f,C],[l,T]],[/\\(dtv[\\);].+(aquos)/i,/(aquos-tv[\\w ]+)\\)/i],[a,[f,ke],[l,T]],[/(bravia[\\w ]+)( bui|\\))/i],[a,[f,fe],[l,T]],[/(mitv-\\w{5}) bui/i],[a,[f,me],[l,T]],[/\\b(roku)[\\dx]*[\\)\\/]((?:dvp-)?[\\d\\.]*)/i,/hbbtv\\/\\d+\\.\\d+\\.\\d+ +\\([\\w ]*; *(\\w[^;]*);([^;]*)/i],[[f,Nt],[a,Nt],[l,T]],[/\\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\\b/i],[[l,T]],[/((pebble))app/i],[f,a,[l,L]],[/droid.+; (glass) \\d/i],[a,[f,_e],[l,L]],[/droid.+; (wt63?0{2,3})\\)/i],[a,[f,Ve],[l,L]],[/(quest( 2)?)/i],[a,[f,U],[l,L]],[/(tesla)(?: qtcarbrowser|\\/[-\\w\\.]+)/i],[f,[l,k]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+? mobile safari/i],[a,[l,v]],[/droid .+?; ([^;]+?)(?: bui|\\) applew).+?(?! mobile) safari/i],[a,[l,y]],[/\\b((tablet|tab)[;\\/]|focus\\/\\d(?!.+mobile))/i],[[l,y]],[/(phone|mobile(?:[;\\/]| [ \\w\\/\\.]*safari)|pda(?=.+windows ce))/i],[[l,v]],[/(android[-\\w\\. ]{0,9});.+buil/i],[a,[f,"Generic"]]],engine:[[/windows.+ edge\\/([\\w\\.]+)/i],[m,[c,Ce+"HTML"]],[/webkit\\/537\\.36.+chrome\\/(?!27)([\\w\\.]+)/i],[m,[c,"Blink"]],[/(presto)\\/([\\w\\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\\/([\\w\\.]+)/i,/ekioh(flow)\\/([\\w\\.]+)/i,/(khtml|tasman|links)[\\/ ]\\(?([\\w\\.]+)/i,/(icab)[\\/ ]([23]\\.[\\d\\.]+)/i],[c,m],[/rv\\:([\\w\\.]{1,9})\\b.+(gecko)/i],[m,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,m],[/(windows) nt 6\\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\\/ ]?([\\d\\.\\w ]*)/i,/(windows)[\\/ ]?([ntce\\d\\. ]+\\w)(?!.+xbox)/i],[c,[m,Ut,Cr]],[/(win(?=3|9|n)|win 9x )([nt\\d\\.]+)/i],[[c,"Windows"],[m,Ut,Cr]],[/ip[honead]{2,4}\\b(?:.*os ([\\w]+) like mac|; opera)/i,/cfnetwork\\/.+darwin/i],[[m,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\\w\\. ]*)/i,/(macintosh|mac_powerpc\\b)(?!.+haiku)/i],[[c,"Mac OS"],[m,/_/g,"."]],[/droid ([\\w\\.]+)\\b.+(android[- ]x86|harmonyos)/i],[m,c],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\\/ ]?([\\w\\.]*)/i,/(blackberry)\\w*\\/([\\w\\.]*)/i,/(tizen|kaios)[\\/ ]([\\w\\.]+)/i,/\\((series40);/i],[c,m],[/\\(bb(10);/i],[m,[c,z]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\\/ ]?([\\w\\.]*)/i],[m,[c,"Symbian"]],[/mozilla\\/[\\d\\.]+ \\((?:mobile|tablet|tv|mobile; [\\w ]+); rv:.+ gecko\\/([\\w\\.]+)/i],[m,[c,ce+" OS"]],[/web0s;.+rt(tv)/i,/\\b(?:hp)?wos(?:browser)?\\/([\\w\\.]+)/i],[m,[c,"webOS"]],[/crkey\\/([\\d\\.]+)/i],[m,[c,P+"cast"]],[/(cros) [\\w]+ ([\\w\\.]+\\w)/i],[[c,"Chromium OS"],m],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\\);]+)/i,/\\b(joli|palm)\\b ?(?:os)?\\/?([\\w\\.]*)/i,/(mint)[\\/\\(\\) ]?(\\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\\/ ]?(?!chrom|package)([-\\w\\.]*)/i,/(hurd|linux) ?([\\w\\.]*)/i,/(gnu) ?([\\w\\.]*)/i,/\\b([-frentopcghs]{0,5}bsd|dragonfly)[\\/ ]?(?!amd|[ix346]{1,2}86)([\\w\\.]*)/i,/(haiku) (\\w+)/i],[c,m],[/(sunos) ?([\\w\\.\\d]*)/i],[[c,"Solaris"],m],[/((?:open)?solaris)[-\\/ ]?([\\w\\.]*)/i,/(aix) ((\\d)(?=\\.|\\)| )[\\w\\.])*/i,/\\b(beos|os\\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\\w\\.]*)/i],[c,m]]},Z=function(S,O){if(typeof S===u&&(O=S,S=e),!(this instanceof Z))return new Z(S,O).getResult();var I=S||(typeof t!==s&&t.navigator&&t.navigator.userAgent?t.navigator.userAgent:n),q=O?et(Rr,O):Rr;return this.getBrowser=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.browser),x.major=di(x.version),x},this.getCPU=function(){var x={};return x[_]=e,He.call(x,I,q.cpu),x},this.getDevice=function(){var x={};return x[f]=e,x[a]=e,x[l]=e,He.call(x,I,q.device),x},this.getEngine=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.engine),x},this.getOS=function(){var x={};return x[c]=e,x[m]=e,He.call(x,I,q.os),x},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return I},this.setUA=function(x){return I=typeof x===d&&x.length>w?Nt(x,w):x,this},this.setUA(I),this};Z.VERSION=r,Z.BROWSER=tt([c,m,p]),Z.CPU=tt([_]),Z.DEVICE=tt([a,f,l,b,v,T,y,L,k]),Z.ENGINE=Z.OS=tt([c,m]),typeof Qe!==s?(typeof Ct!==s&&Ct.exports&&(Qe=Ct.exports=Z),Qe.UAParser=Z):typeof define===o&&define.amd?define(function(){return Z}):typeof t!==s&&(t.UAParser=Z);var Ae=typeof t!==s&&(t.jQuery||t.Zepto);if(Ae&&!Ae.ua){var rt=new Z;Ae.ua=rt.getResult(),Ae.ua.get=function(){return rt.getUA()},Ae.ua.set=function(S){rt.setUA(S);var O=rt.getResult();for(var I in O)Ae.ua[I]=O[I]}}})(typeof window=="object"?window:Qe)});var oe=(t,e)=>{Vt(t);let r=t.querySelector("aside");r.dataset.view=e,r.classList.remove("section-ready"),setTimeout(()=>{r.classList.add("section-ready")},200)},Ar=t=>{Array.from(t.querySelectorAll(".back-button")).forEach(e=>{e.addEventListener("click",r=>{Vt(t),r.preventDefault(),r.stopPropagation();let n=r.target;oe(t,n?.dataset.back||"nav-home")})})},Bt=(t,e)=>{Vt(t);let r=t.querySelector("aside"),n=document.createElement("div");n.className="ui-toast",n.innerHTML=e,r.appendChild(n),setTimeout(()=>{n.classList.add("ui-toast-show"),setTimeout(()=>{n.classList.remove("ui-toast-show"),setTimeout(()=>{n.remove()},500)},4e3)},30)},Vt=t=>{let e=t.querySelector("aside");Array.from(e.querySelectorAll(".ui-toast")).forEach(n=>{n.classList.remove("ui-toast-show")})},it=()=>{let t=Dr();return localStorage.getItem(t)!=="true"},Ft=t=>{let e=Dr();t?localStorage.removeItem(e):localStorage.setItem(e,"true")},Dr=()=>Ti("disableEdit"),Ti=t=>\`builder.__LOCAL_APP_ID__.\${t}\`,Nr=()=>{let e=document.body.querySelector("[builder-content-id]")?.getAttribute("builder-content-id");return je(e)},je=(t,e)=>{let r="/content";t&&(r+="/"+t+"/edit");let n=new URL(r,"https://builder.io");t&&e&&n.searchParams.set("selectedBlock",e);let i=new URL(location.pathname,location.href);return n.searchParams.set("overridePreviewUrl",i.href),n.href},ot="__DEV_TOOLS_URL__",G={components:[],registryPath:"",registryDisplayPath:"",frameworks:[],dependencies:[],publicApiKey:void 0,devToolsVersion:""},le=t=>{G.components=t.components,G.registryPath=t.registryPath,G.registryDisplayPath=t.registryDisplayPath,G.dependencies=t.dependencies,G.publicApiKey=t.publicApiKey};function Ur(t){let e=null,r=document.querySelector("builder-dev-tools-menu"),n=()=>{t.hide()},i=u=>{let d=u.target;if(!d){n();return}if(d.closest("builder-dev-tools-edit"))return;let p=d.closest("[builder-content-id]"),a=d.closest("[builder-id]");if(!p||!a){t.hide();return}let c=t.show(p,a);!c||c===e||(r.highlightOpener(),e=c)};document.addEventListener("pointerover",i,{passive:!0}),document.addEventListener("pointerleave",n,{passive:!0}),document.addEventListener("pointercancel",n,{passive:!0}),document.addEventListener("visibilitychange",n,{passive:!0}),window.addEventListener("popstate",n,{passive:!0});let o=history.pushState;history.pushState=function(...u){t.hide(),o.apply(this,u)};let s=history.replaceState;history.replaceState=function(...u){t.hide(),s.apply(this,u)}}var st=class extends HTMLElement{openInBuilder=null;block=null;constructor(){super()}connectedCallback(){this.setAttribute("aria-hidden","true");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)}:host{display:none;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}#content-highlight,#block{position:absolute}#content-highlight{border:3px solid var(--primary-color);background-color:var(--primary-color-alpha)}a{position:absolute;top:-33px;left:0;display:block;padding:5px 10px 8px;pointer-events:auto;z-index:100;text-decoration:none}a:hover{text-decoration:none}a span{display:block;padding:3px 6px;font-size:10px;font-weight:300;border-radius:3px;text-align:center;text-decoration:none;pointer-events:none;background-color:var(--edit-color);color:var(--text-color);white-space:nowrap}a:hover span{background-color:var(--edit-color-highlight)}a:hover~.outline{border-color:var(--edit-color-highlight)}#open-in-editor{display:none}.outline{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid var(--edit-color);background-color:var(--edit-color-alpha)}</style><div id="block"> <a id="open-in-builder" target="builder"><span>Open In Builder</span></a> <a id="open-in-editor" href="#open-in-editor"><span>Open In Editor</span></a> <div class="outline"></div> </div>',this.openInBuilder=e.getElementById("open-in-builder"),this.block=e.getElementById("block"),Ur(this)}show(e,r){if(!it())return this.hide(),null;let n=e.getAttribute("builder-content-id"),i=r.getAttribute("builder-id");if(!n||!i)return this.hide(),null;let o=this.block,s=this.openInBuilder,u=r.getBoundingClientRect();o.style.top=u.top+window.scrollY-1+"px",o.style.left=u.left+window.scrollX+"px",o.style.width=u.width+"px",o.style.height=u.height+1+"px";let d=s.getBoundingClientRect();if(d.width>u.width){let p=d.width-u.width;s.style.left=p/2*-1+"px"}else s.style.left="";return s.href=je(n,i),this.style.display="block",i}hide(){this.style.display=""}};var Mr="preview-url";var Br="_b-uid";var Vr="/~builder-connect";var Fr="/~builder-dev-tools";var Hr="https://cdn.builder.io/api/v1/proxy-api?url=https://api2.amplitude.com/2/httpapi";var qr=()=>se({type:"validateBuilder"}),De=t=>se({type:"launchEditor",data:t}),jr=t=>se({type:"getRegistry",data:t}),Gr=t=>se({type:"loadComponent",data:t}),Kr=t=>se({type:"registerComponent",data:t}),Wr=t=>se({type:"setComponentInfo",data:t}),at=t=>se({type:"setComponentInput",data:t}),$r=t=>se({type:"unregisterComponent",data:t}),Yr=t=>se({type:"enableDevTools",data:{enabled:t}}),zr=()=>se({type:"localConfig"}),se=async t=>{let e=new URL(Fr,ot),r;try{r=await fetch(e,{method:"POST",body:JSON.stringify(t)})}catch(i){throw console.error(\`Devtools Fetch Error, \${e.href}\`,i),new Error("Builder Devtools Fetch Error")}if((r.headers.get("content-type")||"").includes("application/json")){let i=await r.json();if(r.ok)return i.data;if(Array.isArray(i.errors)&&i.errors.length>0)throw i.errors.forEach(o=>console.error(o)),new Error(\`Builder Devtools Fetch Error: \${i.errors[0]}\`)}throw new Error(\`Builder Devtools Fetch Error: \${r.status}, \${await r.text()}\`)};var Qr=[{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"}],ut=["color","date","email","file","longText","richText","string"],ct=["number"],lt=["boolean"],dt=["list"],pt=["object"];function ft(t){return ut.includes(t)?"string":ct.includes(t)?"number":lt.includes(t)?"boolean":dt.includes(t)?"array":pt.includes(t)?"object":"string"}var Io=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(t=>t.toLowerCase()));var Ht=function(t,e){return Ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Ht(t,e)};function ae(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Ht(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var E=function(){return E=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},E.apply(this,arguments)};function Ge(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function g(t,e,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(a){try{p(n.next(a))}catch(c){s(c)}}function d(a){try{p(n.throw(a))}catch(c){s(c)}}function p(a){a.done?o(a.value):i(a.value).then(u,d)}p((n=n.apply(t,e||[])).next())})}function h(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(p){return function(a){return d([p,a])}}function d(p){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,p[0]&&(r=0)),r;)try{if(n=1,i&&(o=p[0]&2?i.return:p[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,p[1])).done)return o;switch(i=0,o&&(p=[p[0]&2,o.value]),p[0]){case 0:case 1:o=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,i=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!o||p[1]>o[0]&&p[1]<o[3])){r.label=p[1];break}if(p[0]===6&&r.label<o[1]){r.label=o[1],o=p;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(p);break}o[2]&&r.ops.pop(),r.trys.pop();continue}p=e.call(t,r)}catch(a){p=[6,a],i=0}finally{n=o=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}}function J(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}function ee(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}var mt={};bi(mt,{IdentifyOperation:()=>B,LogLevel:()=>Y,PluginType:()=>N,RevenueProperty:()=>re,ServerZone:()=>Se,SpecialEventType:()=>de,Status:()=>M,TransportType:()=>Ie});var B;(function(t){t.SET="$set",t.SET_ONCE="$setOnce",t.ADD="$add",t.APPEND="$append",t.PREPEND="$prepend",t.REMOVE="$remove",t.PREINSERT="$preInsert",t.POSTINSERT="$postInsert",t.UNSET="$unset",t.CLEAR_ALL="$clearAll"})(B||(B={}));var re;(function(t){t.REVENUE_PRODUCT_ID="$productId",t.REVENUE_QUANTITY="$quantity",t.REVENUE_PRICE="$price",t.REVENUE_TYPE="$revenueType",t.REVENUE_CURRENCY="$currency",t.REVENUE="$revenue"})(re||(re={}));var de;(function(t){t.IDENTIFY="$identify",t.GROUP_IDENTIFY="$groupidentify",t.REVENUE="revenue_amount"})(de||(de={}));var Y;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Warn=2]="Warn",t[t.Verbose=3]="Verbose",t[t.Debug=4]="Debug"})(Y||(Y={}));var N;(function(t){t.BEFORE="before",t.ENRICHMENT="enrichment",t.DESTINATION="destination"})(N||(N={}));var Se;(function(t){t.US="US",t.EU="EU",t.STAGING="STAGING"})(Se||(Se={}));var M;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.PayloadTooLarge="payload_too_large",t.Invalid="invalid",t.Failed="failed",t.Timeout="Timeout",t.SystemError="SystemError"})(M||(M={}));var Ie;(function(t){t.XHR="xhr",t.SendBeacon="beacon",t.Fetch="fetch"})(Ie||(Ie={}));var qt="-",xe="AMP",jt="".concat(xe,"_unsent"),Gt="https://api2.amplitude.com/2/httpapi",Xr="https://api.eu.amplitude.com/2/httpapi",Zr="https://api2.amplitude.com/batch",Jr="https://api.eu.amplitude.com/batch";var wi=1e3,vt=function(t){if(Object.keys(t).length>wi)return!1;for(var e in t){var r=t[e];if(!Kt(e,r))return!1}return!0},Kt=function(t,e){var r,n;if(typeof t!="string")return!1;if(Array.isArray(e)){var i=!0;try{for(var o=J(e),s=o.next();!s.done;s=o.next()){var u=s.value;if(Array.isArray(u))return!1;if(typeof u=="object")i=i&&vt(u);else if(!["number","string"].includes(typeof u))return!1;if(!i)return!1}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}else{if(e==null)return!1;if(typeof e=="object")return vt(e);if(!["number","string","boolean"].includes(typeof e))return!1}return!0};var ne=function(){function t(){this._propertySet=new Set,this._properties={}}return t.prototype.getUserProperties=function(){return E({},this._properties)},t.prototype.set=function(e,r){return this._safeSet(B.SET,e,r),this},t.prototype.setOnce=function(e,r){return this._safeSet(B.SET_ONCE,e,r),this},t.prototype.append=function(e,r){return this._safeSet(B.APPEND,e,r),this},t.prototype.prepend=function(e,r){return this._safeSet(B.PREPEND,e,r),this},t.prototype.postInsert=function(e,r){return this._safeSet(B.POSTINSERT,e,r),this},t.prototype.preInsert=function(e,r){return this._safeSet(B.PREINSERT,e,r),this},t.prototype.remove=function(e,r){return this._safeSet(B.REMOVE,e,r),this},t.prototype.add=function(e,r){return this._safeSet(B.ADD,e,r),this},t.prototype.unset=function(e){return this._safeSet(B.UNSET,e,qt),this},t.prototype.clearAll=function(){return this._properties={},this._properties[B.CLEAR_ALL]=qt,this},t.prototype._safeSet=function(e,r,n){if(this._validate(e,r,n)){var i=this._properties[e];return i===void 0&&(i={},this._properties[e]=i),i[r]=n,this._propertySet.add(r),!0}return!1},t.prototype._validate=function(e,r,n){return this._properties[B.CLEAR_ALL]!==void 0||this._propertySet.has(r)?!1:e===B.ADD?typeof n=="number":e!==B.UNSET&&e!==B.REMOVE?Kt(r,n):!0},t}();var en=function(t,e,r){var n=typeof t=="string"?{event_type:t}:t;return E(E(E({},n),r),e&&{event_properties:e})},Ke=function(t,e){var r=E(E({},e),{event_type:de.IDENTIFY,user_properties:t.getUserProperties()});return r},tn=function(t,e,r,n){var i,o=E(E({},n),{event_type:de.GROUP_IDENTIFY,group_properties:r.getUserProperties(),groups:(i={},i[t]=e,i)});return o},rn=function(t,e,r){var n,i=new ne;i.set(t,e);var o=E(E({},r),{event_type:de.IDENTIFY,user_properties:i.getUserProperties(),groups:(n={},n[t]=e,n)});return o},nn=function(t,e){return E(E({},e),{event_type:de.REVENUE,event_properties:t.getEventProperties()})};var ve=function(t,e,r){return e===void 0&&(e=0),r===void 0&&(r=M.Unknown),{event:t,code:e,message:r}};var on=function(){function t(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return t.prototype.register=function(e,r){return g(this,void 0,void 0,function(){return h(this,function(n){switch(n.label){case 0:return[4,e.setup(r,this.client)];case 1:return n.sent(),this.plugins.push(e),[2]}})})},t.prototype.deregister=function(e,r){var n;return g(this,void 0,void 0,function(){var i,o;return h(this,function(s){switch(s.label){case 0:return i=this.plugins.findIndex(function(u){return u.name===e}),i===-1?(r.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(o=this.plugins[i],this.plugins.splice(i,1),[4,(n=o.teardown)===null||n===void 0?void 0:n.call(o)]);case 1:return s.sent(),[2]}})})},t.prototype.reset=function(e){this.applying=!1;var r=this.plugins;r.map(function(n){var i;return(i=n.teardown)===null||i===void 0?void 0:i.call(n)}),this.plugins=[],this.client=e},t.prototype.push=function(e){var r=this;return new Promise(function(n){r.queue.push([e,n]),r.scheduleApply(0)})},t.prototype.scheduleApply=function(e){var r=this;this.applying||(this.applying=!0,setTimeout(function(){r.apply(r.queue.shift()).then(function(){r.applying=!1,r.queue.length>0&&r.scheduleApply(0)})},e))},t.prototype.apply=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d,f,m,p,a,c,l,f,m,_,b,v,y,T,L,k;return h(this,function(w){switch(w.label){case 0:if(!e)return[2];r=A(e,1),n=r[0],i=A(e,2),o=i[1],s=this.plugins.filter(function(C){return C.type===N.BEFORE}),w.label=1;case 1:w.trys.push([1,6,7,8]),u=J(s),d=u.next(),w.label=2;case 2:return d.done?[3,5]:(f=d.value,[4,f.execute(E({},n))]);case 3:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=4;case 4:return d=u.next(),[3,2];case 5:return[3,8];case 6:return p=w.sent(),y={error:p},[3,8];case 7:try{d&&!d.done&&(T=u.return)&&T.call(u)}finally{if(y)throw y.error}return[7];case 8:a=this.plugins.filter(function(C){return C.type===N.ENRICHMENT}),w.label=9;case 9:w.trys.push([9,14,15,16]),c=J(a),l=c.next(),w.label=10;case 10:return l.done?[3,13]:(f=l.value,[4,f.execute(E({},n))]);case 11:if(m=w.sent(),m===null)return o({event:n,code:0,message:""}),[2];n=m,w.label=12;case 12:return l=c.next(),[3,10];case 13:return[3,16];case 14:return _=w.sent(),L={error:_},[3,16];case 15:try{l&&!l.done&&(k=c.return)&&k.call(c)}finally{if(L)throw L.error}return[7];case 16:return b=this.plugins.filter(function(C){return C.type===N.DESTINATION}),v=b.map(function(C){var R=E({},n);return C.execute(R).catch(function(K){return ve(R,0,String(K))})}),Promise.all(v).then(function(C){var R=A(C,1),K=R[0];o(K)}),[2]}})})},t.prototype.flush=function(){return g(this,void 0,void 0,function(){var e,r,n,i=this;return h(this,function(o){switch(o.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(s){return i.apply(s)}))];case 1:return o.sent(),r=this.plugins.filter(function(s){return s.type===N.DESTINATION}),n=r.map(function(s){return s.flush&&s.flush()}),[4,Promise.all(n)];case 2:return o.sent(),[2]}})})},t}();var sn="Event tracked successfully",an="Unexpected error occurred",un="Event rejected due to exceeded retry count",cn="Event skipped due to optOut config",ln="Event rejected due to missing API key",dn="Invalid API key",pn="Client not initialized";var X=function(t){return{promise:t||Promise.resolve()}};var Wt=function(){function t(e){e===void 0&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new on(this),this.name=e}return t.prototype._init=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){switch(r.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return r.sent(),[2]}})})},t.prototype.runQueuedFunctions=function(e){return g(this,void 0,void 0,function(){var r,n,i,o,s,u,d;return h(this,function(p){switch(p.label){case 0:r=this[e],this[e]=[],p.label=1;case 1:p.trys.push([1,6,7,8]),n=J(r),i=n.next(),p.label=2;case 2:return i.done?[3,5]:(o=i.value,[4,o()]);case 3:p.sent(),p.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return s=p.sent(),u={error:s},[3,8];case 7:try{i&&!i.done&&(d=n.return)&&d.call(n)}finally{if(u)throw u.error}return[7];case 8:return[2]}})})},t.prototype.track=function(e,r,n){var i=en(e,r,n);return X(this.dispatch(i))},t.prototype.identify=function(e,r){var n=Ke(e,r);return X(this.dispatch(n))},t.prototype.groupIdentify=function(e,r,n,i){var o=tn(e,r,n,i);return X(this.dispatch(o))},t.prototype.setGroup=function(e,r,n){var i=rn(e,r,n);return X(this.dispatch(i))},t.prototype.revenue=function(e,r){var n=nn(e,r);return X(this.dispatch(n))},t.prototype.add=function(e){return this.config?X(this.timeline.register(e,this.config)):(this.q.push(this.add.bind(this,e)),X())},t.prototype.remove=function(e){return this.config?X(this.timeline.deregister(e,this.config)):(this.q.push(this.remove.bind(this,e)),X())},t.prototype.dispatchWithCallback=function(e,r){if(!this.config)return r(ve(e,0,pn));this.process(e).then(r)},t.prototype.dispatch=function(e){return g(this,void 0,void 0,function(){var r=this;return h(this,function(n){return this.config?[2,this.process(e)]:[2,new Promise(function(i){r.dispatchQ.push(r.dispatchWithCallback.bind(r,e,i))})]})})},t.prototype.process=function(e){return g(this,void 0,void 0,function(){var i,r,n,i;return h(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,ve(e,0,cn)]:[4,this.timeline.push(e)];case 1:return i=o.sent(),i.code===200?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return r=o.sent(),this.config.loggerProvider.error(r),n=String(r),i=ve(e,0,n),[2,i];case 3:return[2]}})})},t.prototype.setOptOut=function(e){if(!this.config){this.q.push(this.setOptOut.bind(this,!!e));return}this.config.optOut=!!e},t.prototype.flush=function(){return X(this.timeline.flush())},t}();var gt=function(){function t(){this.productId="",this.quantity=1,this.price=0}return t.prototype.setProductId=function(e){return this.productId=e,this},t.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},t.prototype.setPrice=function(e){return this.price=e,this},t.prototype.setRevenueType=function(e){return this.revenueType=e,this},t.prototype.setCurrency=function(e){return this.currency=e,this},t.prototype.setRevenue=function(e){return this.revenue=e,this},t.prototype.setEventProperties=function(e){return vt(e)&&(this.properties=e),this},t.prototype.getEventProperties=function(){var e=this.properties?E({},this.properties):{};return e[re.REVENUE_PRODUCT_ID]=this.productId,e[re.REVENUE_QUANTITY]=this.quantity,e[re.REVENUE_PRICE]=this.price,e[re.REVENUE_TYPE]=this.revenueType,e[re.REVENUE_CURRENCY]=this.currency,e[re.REVENUE]=this.revenue,e},t}();var fn=function(t,e){var r=Math.max(e,1);return t.reduce(function(n,i,o){var s=Math.floor(o/r);return n[s]||(n[s]=[]),n[s].push(i),n},[])};var ht="Amplitude Logger ",mn=function(){function t(){this.logLevel=Y.None}return t.prototype.disable=function(){this.logLevel=Y.None},t.prototype.enable=function(e){e===void 0&&(e=Y.Warn),this.logLevel=e},t.prototype.log=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Verbose||console.log("".concat(ht,"[Log]: ").concat(e.join(" ")))},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Warn||console.warn("".concat(ht,"[Warn]: ").concat(e.join(" ")))},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Error||console.error("".concat(ht,"[Error]: ").concat(e.join(" ")))},t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this.logLevel<Y.Debug||console.log("".concat(ht,"[Debug]: ").concat(e.join(" ")))},t}();var yt=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:"$default_instance",logLevel:Y.Warn,loggerProvider:new mn,optOut:!1,serverUrl:Gt,serverZone:Se.US,useBatch:!1}},$t=function(){function t(e){var r,n,i,o;this._optOut=!1;var s=yt();this.apiKey=e.apiKey,this.flushIntervalMillis=(r=e.flushIntervalMillis)!==null&&r!==void 0?r:s.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||s.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||s.flushQueueSize,this.instanceName=e.instanceName||s.instanceName,this.loggerProvider=e.loggerProvider||s.loggerProvider,this.logLevel=(n=e.logLevel)!==null&&n!==void 0?n:s.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.optOut=(i=e.optOut)!==null&&i!==void 0?i:s.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||s.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=(o=e.useBatch)!==null&&o!==void 0?o:s.useBatch,this.loggerProvider.enable(this.logLevel);var u=Yt(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=u.serverZone,this.serverUrl=u.serverUrl}return Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),t}();var Si=function(t,e){return t===Se.EU?e?Jr:Xr:e?Zr:Gt},Yt=function(t,e,r){if(t===void 0&&(t=""),e===void 0&&(e=yt().serverZone),r===void 0&&(r=yt().useBatch),t)return{serverUrl:t,serverZone:void 0};var n=["US","EU"].includes(e)?e:yt().serverZone;return{serverZone:n,serverUrl:Si(n,r)}};function Ii(t){return t instanceof Error?t.message:String(t)}function bt(t){var e="";try{"body"in t&&(e=JSON.stringify(t.body))}catch{}return e}var zt=function(){function t(){this.name="amplitude",this.type=N.DESTINATION,this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduled=null,this.queue=[]}return t.prototype.setup=function(e){var r;return g(this,void 0,void 0,function(){var n,i=this;return h(this,function(o){switch(o.label){case 0:return this.config=e,this.storageKey="".concat(jt,"_").concat(this.config.apiKey.substring(0,10)),[4,(r=this.config.storageProvider)===null||r===void 0?void 0:r.get(this.storageKey)];case 1:return n=o.sent(),this.saveEvents(),n&&n.length>0&&Promise.all(n.map(function(s){return i.execute(s)})).catch(),[2,Promise.resolve(void 0)]}})})},t.prototype.execute=function(e){var r=this;return new Promise(function(n){var i={event:e,attempts:0,callback:function(o){return n(o)},timeout:0};r.addToQueue(i)})},t.prototype.addToQueue=function(){for(var e=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=r.filter(function(o){return o.attempts<e.config.flushMaxRetries?(o.attempts+=1,!0):(e.fulfillRequest([o],500,un),!1)});i.forEach(function(o){if(e.queue=e.queue.concat(o),o.timeout===0){e.schedule(e.config.flushIntervalMillis);return}setTimeout(function(){o.timeout=0,e.schedule(0)},o.timeout)}),this.saveEvents()},t.prototype.schedule=function(e){var r=this;this.scheduled||(this.scheduled=setTimeout(function(){r.flush(!0).then(function(){r.queue.length>0&&r.schedule(e)})},e))},t.prototype.flush=function(e){return e===void 0&&(e=!1),g(this,void 0,void 0,function(){var r,n,i,o=this;return h(this,function(s){switch(s.label){case 0:return r=[],n=[],this.queue.forEach(function(u){return u.timeout===0?r.push(u):n.push(u)}),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),i=fn(r,this.config.flushQueueSize),[4,Promise.all(i.map(function(u){return o.send(u,e)}))];case 1:return s.sent(),[2]}})})},t.prototype.send=function(e,r){return r===void 0&&(r=!0),g(this,void 0,void 0,function(){var n,i,o,s,u;return h(this,function(d){switch(d.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,ln)];n={api_key:this.config.apiKey,events:e.map(function(p){var a=p.event,c=a.extra,l=Ge(a,["extra"]);return l}),options:{min_id_length:this.config.minIdLength}},d.label=1;case 1:return d.trys.push([1,3,,4]),i=Yt(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(i,n)];case 2:return o=d.sent(),o===null?(this.fulfillRequest(e,0,an),[2]):r?(this.handleResponse(o,e),[3,4]):("body"in o?this.fulfillRequest(e,o.statusCode,"".concat(o.status,": ").concat(bt(o))):this.fulfillRequest(e,o.statusCode,o.status),[2]);case 3:return s=d.sent(),this.config.loggerProvider.error(s),u=Ii(s),this.fulfillRequest(e,0,u),[3,4];case 4:return[2]}})})},t.prototype.handleResponse=function(e,r){var n=e.status;switch(n){case M.Success:{this.handleSuccessResponse(e,r);break}case M.Invalid:{this.handleInvalidResponse(e,r);break}case M.PayloadTooLarge:{this.handlePayloadTooLargeResponse(e,r);break}case M.RateLimit:{this.handleRateLimitResponse(e,r);break}default:{this.config.loggerProvider.warn(\`{code: 0, error: "Status '\`.concat(n,"' provided for ").concat(r.length,' events"}')),this.handleOtherResponse(r);break}}},t.prototype.handleSuccessResponse=function(e,r){this.fulfillRequest(r,e.statusCode,sn)},t.prototype.handleInvalidResponse=function(e,r){var n=this;if(e.body.missingField||e.body.error.startsWith(dn)){this.fulfillRequest(r,e.statusCode,e.body.error);return}var i=ee(ee(ee(ee([],A(Object.values(e.body.eventsWithInvalidFields)),!1),A(Object.values(e.body.eventsWithMissingFields)),!1),A(Object.values(e.body.eventsWithInvalidIdLengths)),!1),A(e.body.silencedEvents),!1).flat(),o=new Set(i),s=r.filter(function(u,d){if(o.has(d)){n.fulfillRequest([u],e.statusCode,e.body.error);return}return!0});s.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(s),!1))},t.prototype.handlePayloadTooLargeResponse=function(e,r){if(r.length===1){this.fulfillRequest(r,e.statusCode,e.body.error);return}this.config.loggerProvider.warn(bt(e)),this.config.flushQueueSize/=2,this.addToQueue.apply(this,ee([],A(r),!1))},t.prototype.handleRateLimitResponse=function(e,r){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),o=Object.keys(e.body.exceededDailyQuotaDevices),s=e.body.throttledEvents,u=new Set(i),d=new Set(o),p=new Set(s),a=r.filter(function(c,l){if(c.event.user_id&&u.has(c.event.user_id)||c.event.device_id&&d.has(c.event.device_id)){n.fulfillRequest([c],e.statusCode,e.body.error);return}return p.has(l)&&(c.timeout=n.throttleTimeout),!0});a.length>0&&this.config.loggerProvider.warn(bt(e)),this.addToQueue.apply(this,ee([],A(a),!1))},t.prototype.handleOtherResponse=function(e){var r=this;this.addToQueue.apply(this,ee([],A(e.map(function(n){return n.timeout=n.attempts*r.retryTimeout,n})),!1))},t.prototype.fulfillRequest=function(e,r,n){this.saveEvents(),e.forEach(function(i){return i.callback(ve(i.event,r,n))})},t.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map(function(r){return r.event}));this.config.storageProvider.set(this.storageKey,e)}},t}();var xi=function(t){t===void 0&&(t=0);var e=new Error().stack||"";return e.split(\`
|
|
1312
1312
|
\`).slice(2+t).map(function(r){return r.trim()})},V=function(t){return function(){var e=E({},t.config),r=e.loggerProvider,n=e.logLevel;return{logger:r,logLevel:n}}},Li=function(t,e){var r,n;e=e.replace(/\\[(\\w+)\\]/g,".$1"),e=e.replace(/^\\./,"");try{for(var i=J(e.split(".")),o=i.next();!o.done;o=i.next()){var s=o.value;if(s in t)t=t[s];else return}}catch(u){r={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return t},F=function(t,e){return function(){var r,n,i={};try{for(var o=J(e),s=o.next();!s.done;s=o.next()){var u=s.value;i[u]=Li(t,u)}}catch(d){r={error:d}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}},H=function(t,e,r,n,i){return i===void 0&&(i=null),function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=r(),d=u.logger,p=u.logLevel;if(p&&p<Y.Debug||!p||!d)return t.apply(i,o);var a={type:"invoke public method",name:e,args:o,stacktrace:xi(1),time:{start:new Date().toISOString()},states:{}};n&&a.states&&(a.states.before=n());var c=t.apply(i,o);return c&&c.promise?c.promise.then(function(){n&&a.states&&(a.states.after=n()),a.time&&(a.time.end=new Date().toISOString()),d.debug(JSON.stringify(a,null,2))}):(n&&a.states&&(a.states.after=n()),a.time&&(a.time.end=new Date().toISOString()),d.debug(JSON.stringify(a,null,2))),c}};var ge=function(t){return t?(t^Math.random()*16>>t/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,ge)};var Et=function(){function t(){this.memoryStorage=new Map}return t.prototype.isEnabled=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return[2,!0]})})},t.prototype.get=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){return[2,this.memoryStorage.get(e)]})})},t.prototype.getRaw=function(e){return g(this,void 0,void 0,function(){var r;return h(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return r=n.sent(),[2,r?JSON.stringify(r):void 0]}})})},t.prototype.set=function(e,r){return g(this,void 0,void 0,function(){return h(this,function(n){return this.memoryStorage.set(e,r),[2]})})},t.prototype.remove=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){return this.memoryStorage.delete(e),[2]})})},t.prototype.reset=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return this.memoryStorage.clear(),[2]})})},t}();var Le=function(){function t(){}return t.prototype.send=function(e,r){return Promise.resolve(null)},t.prototype.buildResponse=function(e){var r,n,i,o,s,u,d,p,a,c,l,f,m,_,b,v,y,T,L,k,w,C;if(typeof e!="object")return null;var R=e.code||0,K=this.buildStatus(R);switch(K){case M.Success:return{status:K,statusCode:R,body:{eventsIngested:(r=e.events_ingested)!==null&&r!==void 0?r:0,payloadSizeBytes:(n=e.payload_size_bytes)!==null&&n!==void 0?n:0,serverUploadTime:(i=e.server_upload_time)!==null&&i!==void 0?i:0}};case M.Invalid:return{status:K,statusCode:R,body:{error:(o=e.error)!==null&&o!==void 0?o:"",missingField:(s=e.missing_field)!==null&&s!==void 0?s:"",eventsWithInvalidFields:(u=e.events_with_invalid_fields)!==null&&u!==void 0?u:{},eventsWithMissingFields:(d=e.events_with_missing_fields)!==null&&d!==void 0?d:{},eventsWithInvalidIdLengths:(p=e.events_with_invalid_id_lengths)!==null&&p!==void 0?p:{},epsThreshold:(a=e.eps_threshold)!==null&&a!==void 0?a:0,exceededDailyQuotaDevices:(c=e.exceeded_daily_quota_devices)!==null&&c!==void 0?c:{},silencedDevices:(l=e.silenced_devices)!==null&&l!==void 0?l:[],silencedEvents:(f=e.silenced_events)!==null&&f!==void 0?f:[],throttledDevices:(m=e.throttled_devices)!==null&&m!==void 0?m:{},throttledEvents:(_=e.throttled_events)!==null&&_!==void 0?_:[]}};case M.PayloadTooLarge:return{status:K,statusCode:R,body:{error:(b=e.error)!==null&&b!==void 0?b:""}};case M.RateLimit:return{status:K,statusCode:R,body:{error:(v=e.error)!==null&&v!==void 0?v:"",epsThreshold:(y=e.eps_threshold)!==null&&y!==void 0?y:0,throttledDevices:(T=e.throttled_devices)!==null&&T!==void 0?T:{},throttledUsers:(L=e.throttled_users)!==null&&L!==void 0?L:{},exceededDailyQuotaDevices:(k=e.exceeded_daily_quota_devices)!==null&&k!==void 0?k:{},exceededDailyQuotaUsers:(w=e.exceeded_daily_quota_users)!==null&&w!==void 0?w:{},throttledEvents:(C=e.throttled_events)!==null&&C!==void 0?C:[]}};case M.Timeout:default:return{status:K,statusCode:R}}},t.prototype.buildStatus=function(e){return e>=200&&e<300?M.Success:e===429?M.RateLimit:e===413?M.PayloadTooLarge:e===408?M.Timeout:e>=400&&e<500?M.Invalid:e>=500?M.Failed:M.Unknown},t}();var Pi=function(){function t(){}return t.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:Ci(),platform:"Web",os:void 0,deviceModel:void 0}},t}(),Ci=function(){return typeof navigator<"u"&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},Ri=function(){function t(){this.queue=[]}return t.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},t.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(r){e(r)}),this.queue=[])},t}(),he=function(){return he=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},he.apply(this,arguments)};function _t(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function vn(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],s;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(u){s={error:u}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o}var Tt=function(t,e){var r,n,i=["string","number","boolean","undefined"],o=typeof t,s=typeof e;if(o!==s)return!1;try{for(var u=_t(i),d=u.next();!d.done;d=u.next()){var p=d.value;if(p===o)return t===e}}catch(b){r={error:b}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}if(t==null&&e==null)return!0;if(t==null||e==null||t.length!==e.length)return!1;var a=Array.isArray(t),c=Array.isArray(e);if(a!==c)return!1;if(a&&c){for(var l=0;l<t.length;l++)if(!Tt(t[l],e[l]))return!1}else{var f=Object.keys(t).sort(),m=Object.keys(e).sort();if(!Tt(f,m))return!1;var _=!0;return Object.keys(t).forEach(function(b){Tt(t[b],e[b])||(_=!1)}),_}return!0},Oi="$set",ki="$unset",Ai="$clearAll";Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),r=e.length,n=new Array(r);r--;)n[r]=[e[r],t[e[r]]];return n});var Di=function(){function t(){this.identity={userProperties:{}},this.listeners=new Set}return t.prototype.editIdentity=function(){var e=this,r=he({},this.identity.userProperties),n=he(he({},this.identity),{userProperties:r});return{setUserId:function(i){return n.userId=i,this},setDeviceId:function(i){return n.deviceId=i,this},setUserProperties:function(i){return n.userProperties=i,this},setOptOut:function(i){return n.optOut=i,this},updateUserProperties:function(i){var o,s,u,d,p,a,c=n.userProperties||{};try{for(var l=_t(Object.entries(i)),f=l.next();!f.done;f=l.next()){var m=vn(f.value,2),_=m[0],b=m[1];switch(_){case Oi:try{for(var v=(u=void 0,_t(Object.entries(b))),y=v.next();!y.done;y=v.next()){var T=vn(y.value,2),L=T[0],k=T[1];c[L]=k}}catch(R){u={error:R}}finally{try{y&&!y.done&&(d=v.return)&&d.call(v)}finally{if(u)throw u.error}}break;case ki:try{for(var w=(p=void 0,_t(Object.keys(b))),C=w.next();!C.done;C=w.next()){var L=C.value;delete c[L]}}catch(R){p={error:R}}finally{try{C&&!C.done&&(a=w.return)&&a.call(w)}finally{if(p)throw p.error}}break;case Ai:c={};break}}}catch(R){o={error:R}}finally{try{f&&!f.done&&(s=l.return)&&s.call(l)}finally{if(o)throw o.error}}return n.userProperties=c,this},commit:function(){return e.setIdentity(n),this}}},t.prototype.getIdentity=function(){return he({},this.identity)},t.prototype.setIdentity=function(e){var r=he({},this.identity);this.identity=he({},e),Tt(r,this.identity)||this.listeners.forEach(function(n){n(e)})},t.prototype.addIdentityListener=function(e){this.listeners.add(e)},t.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},t}(),We=typeof globalThis<"u"?globalThis:typeof global<"u"?global:self,gn=function(){function t(){this.identityStore=new Di,this.eventBridge=new Ri,this.applicationContextProvider=new Pi}return t.getInstance=function(e){return We.analyticsConnectorInstances||(We.analyticsConnectorInstances={}),We.analyticsConnectorInstances[e]||(We.analyticsConnectorInstances[e]=new t),We.analyticsConnectorInstances[e]},t}();var pe=function(t){return t===void 0&&(t="$default_instance"),gn.getInstance(t)},Qt=function(t,e){pe(e).identityStore.editIdentity().setUserId(t).commit()},Xt=function(t,e){pe(e).identityStore.editIdentity().setDeviceId(t).commit()},Zt=function(t,e){pe(e).identityStore.editIdentity().setOptOut(t).commit()};var $=function(){if(typeof globalThis<"u")return globalThis;if(typeof window<"u")return window;if(typeof self<"u")return self;if(typeof global<"u")return global};var Ne=function(){var t,e=$();if(!(!((t=e?.location)===null||t===void 0)&&t.search))return{};var r=e.location.search.substring(1).split("&").filter(Boolean),n=r.reduce(function(i,o){var s=o.split("=",2),u=hn(s[0]),d=hn(s[1]);return d&&(i[u]=d),i},{});return n},hn=function(t){t===void 0&&(t="");try{return decodeURIComponent(t)}catch{return""}};var yn="utm_campaign",bn="utm_content",En="utm_id",_n="utm_medium",Tn="utm_source",wn="utm_term",Jt="dclid",er="fbclid",tr="gbraid",rr="gclid",nr="ko_click_id",ir="li_fat_id",or="msclkid",sr="rtd_cid",ar="ttclid",ur="twclid",cr="wbraid";var Pe={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rtd_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0};var $e=function(){function t(){}return t.prototype.parse=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return[2,E(E(E(E({},Pe),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},t.prototype.getUtmParam=function(){var e=Ne(),r=e[yn],n=e[bn],i=e[En],o=e[_n],s=e[Tn],u=e[wn];return{utm_campaign:r,utm_content:n,utm_id:i,utm_medium:o,utm_source:s,utm_term:u}},t.prototype.getReferrer=function(){var e,r,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=(r=(e=n.referrer)===null||e===void 0?void 0:e.split("/")[2])!==null&&r!==void 0?r:void 0}catch{}return n},t.prototype.getClickIds=function(){var e,r=Ne();return e={},e[Jt]=r[Jt],e[er]=r[er],e[tr]=r[tr],e[rr]=r[rr],e[nr]=r[nr],e[ir]=r[ir],e[or]=r[or],e[sr]=r[sr],e[ar]=r[ar],e[ur]=r[ur],e[cr]=r[cr],e},t}();var Ye=function(t,e,r){return e===void 0&&(e=""),r===void 0&&(r=10),[xe,e,t.substring(0,r)].filter(Boolean).join("_")},lr=function(t){return"".concat(xe.toLowerCase(),"_").concat(t.substring(0,6))};var dr=function(t){return typeof t=="boolean"?t:!!t?.fileDownloads},pr=function(t){return typeof t=="boolean"?t:!!t?.formInteractions},Sn=function(t){return typeof t=="boolean"?t:!!(t?.pageViews===!0||t?.pageViews&&typeof t.pageViews=="object")},fr=function(t){return typeof t=="boolean"?t:!!t?.sessions},mr=function(t){var e,r=!((e=t.attribution)===null||e===void 0)&&e.trackPageViews?"attribution":function(){return!1},n=void 0,i="Page View",o=Sn(t.defaultTracking);return o&&(r=void 0,i=void 0,t.defaultTracking&&typeof t.defaultTracking=="object"&&t.defaultTracking.pageViews&&typeof t.defaultTracking.pageViews=="object"&&("trackOn"in t.defaultTracking.pageViews&&(r=t.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in t.defaultTracking.pageViews&&(n=t.defaultTracking.pageViews.trackHistoryChanges),"eventType"in t.defaultTracking.pageViews&&t.defaultTracking.pageViews.eventType&&(i=t.defaultTracking.pageViews.eventType))),{trackOn:r,trackHistoryChanges:n,eventType:i}};var vr=function(){var t,e,r,n;if(typeof navigator>"u")return"";var i=navigator.userLanguage;return(n=(r=(e=(t=navigator.languages)===null||t===void 0?void 0:t[0])!==null&&e!==void 0?e:navigator.language)!==null&&r!==void 0?r:i)!==null&&n!==void 0?n:""};var gr=function(){function t(){this.name="identity",this.type=N.BEFORE,this.identityStore=pe().identityStore}return t.prototype.execute=function(e){return g(this,void 0,void 0,function(){var r;return h(this,function(n){return r=e.user_properties,r&&this.identityStore.editIdentity().updateUserProperties(r).commit(),[2,e]})})},t.prototype.setup=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){return e.instanceName&&(this.identityStore=pe(e.instanceName).identityStore),[2]})})},t}();var ze=function(){function t(e){this.options=E({},e)}return t.prototype.isEnabled=function(){return g(this,void 0,void 0,function(){var e,r,n,i;return h(this,function(o){switch(o.label){case 0:if(!$())return[2,!1];t.testValue=String(Date.now()),e=new t(this.options),r="AMP_TEST",o.label=1;case 1:return o.trys.push([1,4,5,7]),[4,e.set(r,t.testValue)];case 2:return o.sent(),[4,e.get(r)];case 3:return n=o.sent(),[2,n===t.testValue];case 4:return i=o.sent(),[2,!1];case 5:return[4,e.remove(r)];case 6:return o.sent(),[7];case 7:return[2]}})})},t.prototype.get=function(e){return g(this,void 0,void 0,function(){var r;return h(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(r=n.sent(),!r)return[2,void 0];try{try{r=decodeURIComponent(atob(r))}catch{}return[2,JSON.parse(r)]}catch{return[2,void 0]}return[2]}})})},t.prototype.getRaw=function(e){var r;return g(this,void 0,void 0,function(){var n,i,o;return h(this,function(s){return n=$(),i=(r=n?.document.cookie.split("; "))!==null&&r!==void 0?r:[],o=i.find(function(u){return u.indexOf(e+"=")===0}),o?[2,o.substring(e.length+1)]:[2,void 0]})})},t.prototype.set=function(e,r){var n;return g(this,void 0,void 0,function(){var i,o,s,u,d,p;return h(this,function(a){try{i=(n=this.options.expirationDays)!==null&&n!==void 0?n:0,o=r!==null?i:-1,s=void 0,o&&(u=new Date,u.setTime(u.getTime()+o*24*60*60*1e3),s=u),d="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(r)))),s&&(d+="; expires=".concat(s.toUTCString())),d+="; path=/",this.options.domain&&(d+="; domain=".concat(this.options.domain)),this.options.secure&&(d+="; Secure"),this.options.sameSite&&(d+="; SameSite=".concat(this.options.sameSite)),p=$(),p&&(p.document.cookie=d)}catch{}return[2]})})},t.prototype.remove=function(e){return g(this,void 0,void 0,function(){return h(this,function(r){switch(r.label){case 0:return[4,this.set(e,null)];case 1:return r.sent(),[2]}})})},t.prototype.reset=function(){return g(this,void 0,void 0,function(){return h(this,function(e){return[2]})})},t}();var hr=function(t){ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(r,n){return g(this,void 0,void 0,function(){var i,o,s;return h(this,function(u){switch(u.label){case 0:if(typeof fetch>"u")throw new Error("FetchTransport is not supported");return i={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(n),method:"POST"},[4,fetch(r,i)];case 1:return o=u.sent(),[4,o.text()];case 2:s=u.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch{return[2,this.buildResponse({code:o.status})]}return[2]}})})},e}(Le);var In=function(t){var e={};for(var r in t){var n=t[r];n&&(e[r]=n)}return e};var yr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r,n={},i=$(),o=void 0,s,u=A(t,2),d=u[0],p=u[1];d&&"init"in d?(r=d,p&&(n=p)):d&&(n=d);var a=function(){return g(void 0,void 0,void 0,function(){var b,v,y;return h(this,function(T){switch(T.label){case 0:return v={event_type:(y=n.eventType)!==null&&y!==void 0?y:"Page View"},b=[{}],[4,Ni()];case 1:return[2,(v.event_properties=E.apply(void 0,[E.apply(void 0,b.concat([T.sent()])),{page_domain:typeof location<"u"&&location.hostname||"",page_location:typeof location<"u"&&location.href||"",page_path:typeof location<"u"&&location.pathname||"",page_title:typeof document<"u"&&document.title||"",page_url:typeof location<"u"&&location.href.split("?")[0]||""}]),v)]}})})},c=function(){return typeof n.trackOn>"u"||typeof n.trackOn=="function"&&n.trackOn()},l=typeof location<"u"?location.href:null,f=function(){return g(void 0,void 0,void 0,function(){var b,v,y,T,L;return h(this,function(k){switch(k.label){case 0:return b=location.href,v=Mi(n.trackHistoryChanges,b,l||"")&&c(),l=b,v?(o?.log("Tracking page view event"),r!=null?[3,1]:(y=void 0,[3,3])):[3,4];case 1:return L=(T=r).track,[4,a()];case 2:y=L.apply(T,[k.sent()]),k.label=3;case 3:k.label=4;case 4:return[2]}})})},m=function(){f()},_={name:"page-view-tracking",type:N.ENRICHMENT,setup:function(b,v){return g(void 0,void 0,void 0,function(){var y,T,L,k,w;return h(this,function(C){switch(C.label){case 0:return r=r??v,r?(o=b.loggerProvider,o.log("Installing @amplitude/plugin-page-view-tracking-browser"),n.trackOn=!((k=b.attribution)===null||k===void 0)&&k.trackPageViews?"attribution":n.trackOn,!v&&(!((w=b.attribution)===null||w===void 0)&&w.trackPageViews)&&(o.warn("@amplitude/plugin-page-view-tracking-browser overrides page view tracking behavior defined in @amplitude/analytics-browser. Resolve by disabling page view tracking in @amplitude/analytics-browser."),b.attribution.trackPageViews=!1),n.trackHistoryChanges&&i&&(i.addEventListener("popstate",m),s=i.history.pushState,i.history.pushState=new Proxy(i.history.pushState,{apply:function(R,K,z){var Q=A(z,3),P=Q[0],Ce=Q[1],ce=Q[2];R.apply(K,[P,Ce,ce]),f()}})),c()?(o.log("Tracking page view event"),L=(T=r).track,[4,a()]):[3,2]):(y=d?"Options":"undefined",b.loggerProvider.error("Argument of type '".concat(y,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:L.apply(T,[C.sent()]),C.label=2;case 2:return[2]}})})},execute:function(b){return g(void 0,void 0,void 0,function(){var v;return h(this,function(y){switch(y.label){case 0:return n.trackOn==="attribution"&&Ui(b)?(o?.log("Enriching campaign event to page view event with campaign parameters"),[4,a()]):[3,2];case 1:v=y.sent(),b.event_type=v.event_type,b.event_properties=E(E({},b.event_properties),v.event_properties),y.label=2;case 2:return[2,b]}})})},teardown:function(){return g(void 0,void 0,void 0,function(){return h(this,function(b){return i&&(i.removeEventListener("popstate",m),s&&(i.history.pushState=s)),[2]})})}};return _.__trackHistoryPageView=f,_},Ni=function(){return g(void 0,void 0,void 0,function(){var t;return h(this,function(e){switch(e.label){case 0:return t=In,[4,new $e().parse()];case 1:return[2,t.apply(void 0,[e.sent()])]}})})},Ui=function(t){if(t.event_type==="$identify"&&t.user_properties){var e=t.user_properties,r=e[B.SET]||{},n=e[B.UNSET]||{},i=ee(ee([],A(Object.keys(r)),!1),A(Object.keys(n)),!1);return Object.keys(Pe).every(function(o){return i.includes(o)})}return!1},Mi=function(t,e,r){switch(t){case"pathOnly":return e.split("?")[0]!==r.split("?")[0];default:return e!==r}};var Ln=function(t,e,r){return e===void 0&&(e=""),r===void 0&&(r=10),[xe,e,t.substring(0,r)].filter(Boolean).join("_")},xn=function(t){var e=t.split(".");return e.length<=2?t:e.slice(e.length-2,e.length).join(".")},Pn=function(t,e,r){var n,i=t.referrer,o=t.referring_domain,s=Ge(t,["referrer","referring_domain"]),u=e||{},d=u.referrer,p=u.referring_domain,a=Ge(u,["referrer","referring_domain"]);if(t.referring_domain&&(!((n=r.excludeReferrers)===null||n===void 0)&&n.includes(t.referring_domain)))return!1;var c=JSON.stringify(s)!==JSON.stringify(a),l=xn(o||"")!==xn(p||"");return!e||c||l},Cn=function(t,e){var r=E(E({},Pe),t),n=Object.entries(r).reduce(function(i,o){var s,u=A(o,2),d=u[0],p=u[1];return i.setOnce("initial_".concat(d),(s=p??e.initialEmptyValue)!==null&&s!==void 0?s:"EMPTY"),p?i.set(d,p):i.unset(d)},new ne);return Ke(n)};var br=function(){for(var t=this,e,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i,o={},s=A(r,2),u=s[0],d=s[1];u&&"init"in u?(i=u,d&&(o=d)):u&&(o=u);var p=(e=o.excludeReferrers)!==null&&e!==void 0?e:[];typeof location<"u"&&p.unshift(location.hostname),o=E(E({disabled:!1,initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1},o),{excludeReferrers:p});var a={name:"web-attribution",type:N.BEFORE,setup:function(c,l){var f;return g(this,void 0,void 0,function(){var m,_,b,v,y,T,L,k;return h(this,function(w){switch(w.label){case 0:return i=i??l,i?o.disabled?(c.loggerProvider.log("@amplitude/plugin-web-attribution-browser is disabled. Attribution is not tracked."),[2]):(c.loggerProvider.log("Installing @amplitude/plugin-web-attribution-browser."),!l&&!(!((f=c.attribution)===null||f===void 0)&&f.disabled)&&(c.loggerProvider.warn("@amplitude/plugin-web-attribution-browser overrides web attribution behavior defined in @amplitude/analytics-browser. Resolve by disabling web attribution tracking in @amplitude/analytics-browser."),c.attribution={disabled:!0}),_=c.cookieStorage,b=Ln(c.apiKey,"MKTG"),[4,Promise.all([new $e().parse(),_.get(b)])]):(m=u?"Options":"undefined",c.loggerProvider.error("Argument of type '".concat(m,"' is not assignable to parameter of type 'BrowserClient'.")),[2]);case 1:return v=A.apply(void 0,[w.sent(),2]),y=v[0],T=v[1],L=this.__pluginEnabledOverride,(L??Pn(y,T,o))&&(o.resetSessionOnNewCampaign&&(i.setSessionId(Date.now()),c.loggerProvider.log("Created a new session for new campaign.")),c.loggerProvider.log("Tracking attribution."),k=Cn(y,o),i.track(k),_.set(b,y)),[2]}})})},execute:function(c){return g(t,void 0,void 0,function(){return h(this,function(l){return[2,c]})})}};return a.__pluginEnabledOverride=void 0,a};var wt=1e3,Er=function(){function t(e){this.loggerProvider=e?.loggerProvider}return t.prototype.isEnabled=function(){return g(this,void 0,void 0,function(){var e,r,n,i,o;return h(this,function(s){switch(s.label){case 0:if(!$())return[2,!1];e=String(Date.now()),r=new t,n="AMP_TEST",s.label=1;case 1:return s.trys.push([1,4,5,7]),[4,r.set(n,e)];case 2:return s.sent(),[4,r.get(n)];case 3:return i=s.sent(),[2,i===e];case 4:return o=s.sent(),[2,!1];case 5:return[4,r.remove(n)];case 6:return s.sent(),[7];case 7:return[2]}})})},t.prototype.get=function(e){return g(this,void 0,void 0,function(){var r,n;return h(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return r=i.sent(),r?[2,JSON.parse(r)]:[2,void 0];case 2:return n=i.sent(),[2,void 0];case 3:return[2]}})})},t.prototype.getRaw=function(e){var r;return g(this,void 0,void 0,function(){return h(this,function(n){return[2,((r=$())===null||r===void 0?void 0:r.localStorage.getItem(e))||void 0]})})},t.prototype.set=function(e,r){var n,i;return g(this,void 0,void 0,function(){var o,s,u;return h(this,function(d){o=Array.isArray(r)&&r.length>wt;try{s=JSON.stringify(o?r.slice(0,wt):r),(n=$())===null||n===void 0||n.localStorage.setItem(e,s)}catch{}return o&&(u=r.length-wt,(i=this.loggerProvider)===null||i===void 0||i.error("Failed to save ".concat(u," events because the queue length exceeded ").concat(wt,"."))),[2]})})},t.prototype.remove=function(e){var r;return g(this,void 0,void 0,function(){return h(this,function(n){try{(r=$())===null||r===void 0||r.localStorage.removeItem(e)}catch{}return[2]})})},t.prototype.reset=function(){var e;return g(this,void 0,void 0,function(){return h(this,function(r){try{(e=$())===null||e===void 0||e.localStorage.clear()}catch{}return[2]})})},t}();var Rn=function(t){ae(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.state={done:4},r}return e.prototype.send=function(r,n){return g(this,void 0,void 0,function(){var i=this;return h(this,function(o){return[2,new Promise(function(s,u){typeof XMLHttpRequest>"u"&&u(new Error("XHRTransport is not supported."));var d=new XMLHttpRequest;d.open("POST",r,!0),d.onreadystatechange=function(){if(d.readyState===i.state.done)try{var p=d.responseText,a=JSON.parse(p),c=i.buildResponse(a);s(c)}catch(l){u(l)}},d.setRequestHeader("Content-Type","application/json"),d.setRequestHeader("Accept","*/*"),d.send(JSON.stringify(n))})]})})},e}(Le);var On=function(t){ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.send=function(r,n){return g(this,void 0,void 0,function(){var i=this;return h(this,function(o){return[2,new Promise(function(s,u){var d=$();if(!d?.navigator.sendBeacon)throw new Error("SendBeaconTransport is not supported");try{var p=JSON.stringify(n),a=d.navigator.sendBeacon(r,JSON.stringify(n));return s(a?i.buildResponse({code:200,events_ingested:n.events.length,payload_size_bytes:p.length,server_upload_time:Date.now()}):i.buildResponse({code:500}))}catch(c){u(c)}})]})})},e}(Le);var Ue=function(){var t=new Et,e={deviceManufacturer:!0,deviceModel:!0,ipAddress:!0,language:!0,osName:!0,osVersion:!0,platform:!0};return{cookieExpiration:365,cookieSameSite:"Lax",cookieSecure:!1,cookieStorage:t,cookieUpgrade:!0,disableCookies:!1,domain:"",sessionTimeout:30*60*1e3,trackingOptions:e,transportProvider:new hr}},kn=function(t){ae(e,t);function e(r,n){var i=this,o,s,u,d,p,a,c,l,f,m=Ue();return i=t.call(this,E(E({flushIntervalMillis:1e3,flushMaxRetries:5,flushQueueSize:30,transportProvider:m.transportProvider},n),{apiKey:r}))||this,i._optOut=!1,i.cookieStorage=(o=n?.cookieStorage)!==null&&o!==void 0?o:m.cookieStorage,i.deviceId=n?.deviceId,i.lastEventId=n?.lastEventId,i.lastEventTime=n?.lastEventTime,i.optOut=!!n?.optOut,i.sessionId=n?.sessionId,i.userId=n?.userId,i.appVersion=n?.appVersion,i.attribution=n?.attribution,i.cookieExpiration=(s=n?.cookieExpiration)!==null&&s!==void 0?s:m.cookieExpiration,i.cookieSameSite=(u=n?.cookieSameSite)!==null&&u!==void 0?u:m.cookieSameSite,i.cookieSecure=(d=n?.cookieSecure)!==null&&d!==void 0?d:m.cookieSecure,i.cookieUpgrade=(p=n?.cookieUpgrade)!==null&&p!==void 0?p:m.cookieUpgrade,i.defaultTracking=n?.defaultTracking,i.disableCookies=(a=n?.disableCookies)!==null&&a!==void 0?a:m.disableCookies,i.defaultTracking=n?.defaultTracking,i.domain=(c=n?.domain)!==null&&c!==void 0?c:m.domain,i.partnerId=n?.partnerId,i.sessionTimeout=(l=n?.sessionTimeout)!==null&&l!==void 0?l:m.sessionTimeout,i.trackingOptions=(f=n?.trackingOptions)!==null&&f!==void 0?f:m.trackingOptions,i}return Object.defineProperty(e.prototype,"deviceId",{get:function(){return this._deviceId},set:function(r){this._deviceId!==r&&(this._deviceId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userId",{get:function(){return this._userId},set:function(r){this._userId!==r&&(this._userId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sessionId",{get:function(){return this._sessionId},set:function(r){this._sessionId!==r&&(this._sessionId=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(r){this._optOut!==r&&(this._optOut=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(r){this._lastEventTime!==r&&(this._lastEventTime=r,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(r){this._lastEventId!==r&&(this._lastEventId=r,this.updateStorage())},enumerable:!1,configurable:!0}),e.prototype.updateStorage=function(){var r,n={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId};(r=this.cookieStorage)===null||r===void 0||r.set(Ye(this.apiKey),n)},e}($t);var An=function(t,e){return g(void 0,void 0,void 0,function(){var r,n,i,o,s,u,d,p,a,c,l,f,m,_,b;return h(this,function(v){switch(v.label){case 0:return r=Ue(),n=(_=e?.deviceId)!==null&&_!==void 0?_:ge(),i=e?.lastEventId,o=e?.lastEventTime,s=e?.optOut,u=e?.sessionId,d=e?.userId,p=e?.cookieStorage,a=e?.domain,c=kn.bind,l=[void 0,t],f=[E({},e)],m={cookieStorage:p,deviceId:n,domain:a,lastEventId:i,lastEventTime:o,optOut:s,sessionId:u},[4,Vi(e)];case 1:return[2,new(c.apply(kn,l.concat([E.apply(void 0,f.concat([(m.storageProvider=v.sent(),m.trackingOptions=E(E({},r.trackingOptions),e?.trackingOptions),m.transportProvider=(b=e?.transportProvider)!==null&&b!==void 0?b:_r(e?.transport),m.userId=d,m)]))])))]}})})},St=function(t,e){return e===void 0&&(e=Ue()),g(void 0,void 0,void 0,function(){var r,n,i;return h(this,function(o){switch(o.label){case 0:return r=E(E({},e),t),n=t?.cookieStorage,i=!n,i?[3,2]:[4,n.isEnabled()];case 1:i=!o.sent(),o.label=2;case 2:return i?[2,Bi(r)]:[2,n]}})})},Bi=function(t){return g(void 0,void 0,void 0,function(){var e,r;return h(this,function(n){switch(n.label){case 0:return e=new ze({domain:t.domain,expirationDays:t.cookieExpiration,sameSite:t.cookieSameSite,secure:t.cookieSecure}),r=t.disableCookies,r?[3,2]:[4,e.isEnabled()];case 1:r=!n.sent(),n.label=2;case 2:return r?(e=new Er,[4,e.isEnabled()]):[3,4];case 3:n.sent()||(e=new Et),n.label=4;case 4:return[2,e]}})})},Vi=function(t){return g(void 0,void 0,void 0,function(){var e,r,n,i,o,s,u,d,p;return h(this,function(a){switch(a.label){case 0:if(e=t&&Object.prototype.hasOwnProperty.call(t,"storageProvider"),r=t&&t.loggerProvider,!(!e||t.storageProvider))return[3,9];a.label=1;case 1:a.trys.push([1,7,8,9]),n=J([t?.storageProvider,new Er({loggerProvider:r})]),i=n.next(),a.label=2;case 2:return i.done?[3,6]:(o=i.value,s=o,s?[4,o.isEnabled()]:[3,4]);case 3:s=a.sent(),a.label=4;case 4:if(s)return[2,o];a.label=5;case 5:return i=n.next(),[3,2];case 6:return[3,9];case 7:return u=a.sent(),d={error:u},[3,9];case 8:try{i&&!i.done&&(p=n.return)&&p.call(n)}finally{if(d)throw d.error}return[7];case 9:return[2,void 0]}})})},_r=function(t){return t===Ie.XHR?new Rn:t===Ie.SendBeacon?new On:Ue().transportProvider},Dn=function(t){return g(void 0,void 0,void 0,function(){var e,r,n,i,o,o,s,u,d,p;return h(this,function(a){switch(a.label){case 0:return[4,new ze().isEnabled()];case 1:if(!a.sent()||!t&&typeof location>"u")return[2,""];for(e=t??location.hostname,r=e.split("."),n=[],i="AMP_TLDTEST",o=r.length-2;o>=0;--o)n.push(r.slice(o).join("."));o=0,a.label=2;case 2:return o<n.length?(s=n[o],u={domain:"."+s},d=new ze(u),[4,d.set(i,1)]):[3,7];case 3:return a.sent(),[4,d.get(i)];case 4:return p=a.sent(),p?[4,d.remove(i)]:[3,6];case 5:return a.sent(),[2,"."+s];case 6:return o++,[3,2];case 7:return[2,""]}})})};var W="[Amplitude]",It="".concat(W," Page Viewed"),Tr="".concat(W," Form Started"),Nn="".concat(W," Form Submitted"),Un="".concat(W," File Downloaded"),wr="session_start",Sr="session_end",Mn="".concat(W," File Extension"),Bn="".concat(W," File Name"),Vn="".concat(W," Link ID"),Fn="".concat(W," Link Text"),Hn="".concat(W," Link URL"),xt="".concat(W," Form ID"),Lt="".concat(W," Form Name"),Pt="".concat(W," Form Destination");var qn=function(t,e){return g(void 0,void 0,void 0,function(){var r,n,i,o,s,u,d,p,a,c,l;return h(this,function(f){switch(f.label){case 0:return[4,St(e)];case 1:return r=f.sent(),n=lr(t),[4,r.getRaw(n)];case 2:return i=f.sent(),i?((l=e.cookieUpgrade)!==null&&l!==void 0?l:Ue().cookieUpgrade)?[4,r.remove(n)]:[3,4]:[2,{optOut:!1}];case 3:f.sent(),f.label=4;case 4:return o=A(i.split("."),6),s=o[0],u=o[1],d=o[2],p=o[3],a=o[4],c=o[5],[2,{deviceId:s,userId:Fi(u),sessionId:Ir(p),lastEventId:Ir(c),lastEventTime:Ir(a),optOut:!!d}]}})})},Ir=function(t){var e=parseInt(t,32);if(!isNaN(e))return e},Fi=function(t){if(!(!atob||!escape||!t))try{return decodeURIComponent(escape(atob(t)))}catch{return}};var Kn=_i(jn());var Gn="1.13.4";var Hi="Web",qi="$remote",Wn=function(){function t(){this.name="context",this.type=N.BEFORE,this.library="amplitude-ts/".concat(Gn),typeof navigator<"u"&&(this.userAgent=navigator.userAgent),this.uaResult=new Kn.default(this.userAgent).getResult()}return t.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},t.prototype.execute=function(e){var r,n;return g(this,void 0,void 0,function(){var i,o,s,u,d,p,a,c;return h(this,function(l){return i=new Date().getTime(),o=this.uaResult.browser.name,s=this.uaResult.browser.version,u=this.uaResult.device.model||this.uaResult.os.name,d=this.uaResult.device.vendor,p=(r=this.config.lastEventId)!==null&&r!==void 0?r:-1,a=(n=e.event_id)!==null&&n!==void 0?n:p+1,this.config.lastEventId=a,e.time||(this.config.lastEventTime=i),c=E(E(E(E(E(E(E(E(E(E(E(E({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:i},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:Hi}),this.config.trackingOptions.osName&&{os_name:o}),this.config.trackingOptions.osVersion&&{os_version:s}),this.config.trackingOptions.deviceManufacturer&&{device_manufacturer:d}),this.config.trackingOptions.deviceModel&&{device_model:u}),this.config.trackingOptions.language&&{language:vr()}),this.config.trackingOptions.ipAddress&&{ip:qi}),{insert_id:ge(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:a,library:this.library,user_agent:this.userAgent}),[2,c]})})},t}();var ji={page_domain:"".concat(W," Page Domain"),page_location:"".concat(W," Page Location"),page_path:"".concat(W," Page Path"),page_title:"".concat(W," Page Title"),page_url:"".concat(W," Page URL")},$n=function(){var t="@amplitude/plugin-default-page-view-event-enrichment-browser",e=N.ENRICHMENT,r=function(){return g(void 0,void 0,void 0,function(){return h(this,function(i){return[2,void 0]})})},n=function(i){return g(void 0,void 0,void 0,function(){return h(this,function(o){return i.event_type===It&&i.event_properties&&(i.event_properties=Object.entries(i.event_properties).reduce(function(s,u){var d=A(u,2),p=d[0],a=d[1],c=ji[p];return c?s[c]=a:s[p]=a,s},{})),[2,i]})})};return{name:t,type:e,setup:r,execute:n}};var Yn=function(){var t,e=[],r=function(p,a,c){p.addEventListener(a,c),e.push({element:p,type:a,handler:c})},n=function(){e.forEach(function(p){var a=p.element,c=p.type,l=p.handler;a?.removeEventListener(c,l)}),e=[]},i="@amplitude/plugin-file-download-tracking-browser",o=N.ENRICHMENT,s=function(p,a){return g(void 0,void 0,void 0,function(){var c,l,f;return h(this,function(m){return a?typeof document>"u"?[2]:(c=function(_){var b;try{b=new URL(_.href,window.location.href)}catch{return}var v=l.exec(b.href),y=v?.[1];y&&r(_,"click",function(){var T;y&&a.track(Un,(T={},T[Mn]=y,T[Bn]=b.pathname,T[Vn]=_.id,T[Fn]=_.text,T[Hn]=_.href,T))})},l=/\\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/,f=Array.from(document.getElementsByTagName("a")),f.forEach(c),typeof MutationObserver<"u"&&(t=new MutationObserver(function(_){_.forEach(function(b){b.addedNodes.forEach(function(v){v.nodeName==="A"&&c(v),"querySelectorAll"in v&&typeof v.querySelectorAll=="function"&&Array.from(v.querySelectorAll("a")).map(c)})})}),t.observe(document.body,{subtree:!0,childList:!0})),[2]):(p.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked."),[2])})})},u=function(p){return g(void 0,void 0,void 0,function(){return h(this,function(a){return[2,p]})})},d=function(){return g(void 0,void 0,void 0,function(){return h(this,function(p){return t?.disconnect(),n(),[2]})})};return{name:i,type:o,setup:s,execute:u,teardown:d}};var zn=function(){var t,e=[],r=function(p,a,c){p.addEventListener(a,c),e.push({element:p,type:a,handler:c})},n=function(){e.forEach(function(p){var a=p.element,c=p.type,l=p.handler;a?.removeEventListener(c,l)}),e=[]},i="@amplitude/plugin-form-interaction-tracking-browser",o=N.ENRICHMENT,s=function(p,a){return g(void 0,void 0,void 0,function(){var c,l;return h(this,function(f){return a?typeof document>"u"?[2]:(c=function(m){var _=!1;r(m,"change",function(){var b;_||a.track(Tr,(b={},b[xt]=m.id,b[Lt]=m.name,b[Pt]=m.action,b)),_=!0}),r(m,"submit",function(){var b,v;_||a.track(Tr,(b={},b[xt]=m.id,b[Lt]=m.name,b[Pt]=m.action,b)),a.track(Nn,(v={},v[xt]=m.id,v[Lt]=m.name,v[Pt]=m.action,v)),_=!1})},l=Array.from(document.getElementsByTagName("form")),l.forEach(c),typeof MutationObserver<"u"&&(t=new MutationObserver(function(m){m.forEach(function(_){_.addedNodes.forEach(function(b){b.nodeName==="FORM"&&c(b),"querySelectorAll"in b&&typeof b.querySelectorAll=="function"&&Array.from(b.querySelectorAll("form")).map(c)})})}),t.observe(document.body,{subtree:!0,childList:!0})),[2]):(p.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked."),[2])})})},u=function(p){return g(void 0,void 0,void 0,function(){return h(this,function(a){return[2,p]})})},d=function(){return g(void 0,void 0,void 0,function(){return h(this,function(p){return t?.disconnect(),n(),[2]})})};return{name:i,type:o,setup:s,execute:u,teardown:d}};var Rt=function(t,e){for(var r=0;r<e.length;r++){var n=e[r],i=n.name,o=n.args,s=n.resolve,u=t&&t[i];if(typeof u=="function"){var d=u.apply(t,o);typeof s=="function"&&s(d?.promise)}}return t},Ot=function(t){var e=t;return e&&e._q!==void 0};var Qn=function(t){ae(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(r,n,i){return r===void 0&&(r=""),X(this._init(E(E({},i),{userId:n,apiKey:r})))},e.prototype._init=function(r){var n,i,o,s,u,d,p,a,c,l,f,m,_,b,v,y,T,L,k,w;return g(this,void 0,void 0,function(){var C,R,K,z,Q,P,Ce,ce,_e,Me,Re,Oe,Be,Te,we,ke,fe,me,Ve=this;return h(this,function(U){switch(U.label){case 0:return this.initializing?[2]:(this.initializing=!0,C=r,r.disableCookies?(R="",[3,5]):[3,1]);case 1:return(n=r.domain)!==null&&n!==void 0?(K=n,[3,4]):[3,2];case 2:return[4,Dn()];case 3:K=U.sent(),U.label=4;case 4:R=K,U.label=5;case 5:return C.domain=R,[4,qn(r.apiKey,r)];case 6:return z=U.sent(),[4,St(r)];case 7:return Q=U.sent(),[4,Q.get(Ye(r.apiKey))];case 8:return P=U.sent(),Ce=Ne(),ce=(s=(o=(i=r.deviceId)!==null&&i!==void 0?i:Ce.deviceId)!==null&&o!==void 0?o:P?.deviceId)!==null&&s!==void 0?s:z.deviceId,_e=(u=P?.sessionId)!==null&&u!==void 0?u:z.sessionId,Me=(p=(d=r.optOut)!==null&&d!==void 0?d:P?.optOut)!==null&&p!==void 0?p:z.optOut,Re=(a=P?.lastEventId)!==null&&a!==void 0?a:z.lastEventId,Oe=(c=P?.lastEventTime)!==null&&c!==void 0?c:z.lastEventTime,Be=(f=(l=r.userId)!==null&&l!==void 0?l:P?.userId)!==null&&f!==void 0?f:z.userId,this.previousSessionDeviceId=(m=P?.deviceId)!==null&&m!==void 0?m:z.deviceId,this.previousSessionUserId=(_=P?.userId)!==null&&_!==void 0?_:z.userId,[4,An(r.apiKey,E(E({},r),{deviceId:ce,sessionId:_e,optOut:Me,lastEventId:Re,lastEventTime:Oe,userId:Be,cookieStorage:Q}))];case 9:return Te=U.sent(),[4,t.prototype._init.call(this,Te)];case 10:return U.sent(),we=!1,(!this.config.lastEventTime||!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&(this.setSessionId((v=(b=r.sessionId)!==null&&b!==void 0?b:this.config.sessionId)!==null&&v!==void 0?v:Date.now()),we=!0),ke=pe(r.instanceName),ke.identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new zt).promise];case 11:return U.sent(),[4,this.add(new Wn).promise];case 12:return U.sent(),[4,this.add(new gr).promise];case 13:return U.sent(),dr(this.config.defaultTracking)?[4,this.add(Yn()).promise]:[3,15];case 14:U.sent(),U.label=15;case 15:return pr(this.config.defaultTracking)?[4,this.add(zn()).promise]:[3,17];case 16:U.sent(),U.label=17;case 17:return!((y=this.config.attribution)===null||y===void 0)&&y.disabled?[3,19]:(fe=br({excludeReferrers:(T=this.config.attribution)===null||T===void 0?void 0:T.excludeReferrers,initialEmptyValue:(L=this.config.attribution)===null||L===void 0?void 0:L.initialEmptyValue,resetSessionOnNewCampaign:(k=this.config.attribution)===null||k===void 0?void 0:k.resetSessionOnNewCampaign}),fe.__pluginEnabledOverride=we||!((w=this.config.attribution)===null||w===void 0)&&w.trackNewCampaigns?void 0:!1,[4,this.add(fe).promise]);case 18:U.sent(),U.label=19;case 19:return me=mr(this.config),me.eventType=me.eventType||It,[4,this.add(yr(me)).promise];case 20:return U.sent(),[4,this.add($n()).promise];case 21:return U.sent(),this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 22:return U.sent(),ke.eventBridge.setEventReceiver(function(et){Ve.track(et.eventType,et.eventProperties)}),[2]}})})},e.prototype.getUserId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.userId},e.prototype.setUserId=function(r){if(!this.config){this.q.push(this.setUserId.bind(this,r));return}(r!==this.config.userId||r===void 0)&&(this.config.userId=r,Qt(r,this.config.instanceName))},e.prototype.getDeviceId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.deviceId},e.prototype.setDeviceId=function(r){if(!this.config){this.q.push(this.setDeviceId.bind(this,r));return}this.config.deviceId=r,Xt(r,this.config.instanceName)},e.prototype.setOptOut=function(r){Zt(r,this.config.instanceName),t.prototype.setOptOut.call(this,r)},e.prototype.reset=function(){this.setDeviceId(ge()),this.setUserId(void 0)},e.prototype.getSessionId=function(){var r;return(r=this.config)===null||r===void 0?void 0:r.sessionId},e.prototype.setSessionId=function(r){var n;if(!this.config){this.q.push(this.setSessionId.bind(this,r));return}if(r!==this.config.sessionId){var i=this.getSessionId(),o=this.config.lastEventTime,s=(n=this.config.lastEventId)!==null&&n!==void 0?n:-1;this.config.sessionId=r,this.config.lastEventTime=void 0,fr(this.config.defaultTracking)&&(i&&o&&this.track(Sr,void 0,{device_id:this.previousSessionDeviceId,event_id:++s,session_id:i,time:o+1,user_id:this.previousSessionUserId}),this.config.lastEventTime=this.config.sessionId,this.track(wr,void 0,{event_id:++s,session_id:this.config.sessionId,time:this.config.lastEventTime})),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId}},e.prototype.extendSession=function(){if(!this.config){this.q.push(this.extendSession.bind(this));return}this.config.lastEventTime=Date.now()},e.prototype.setTransport=function(r){if(!this.config){this.q.push(this.setTransport.bind(this,r));return}this.config.transportProvider=_r(r)},e.prototype.identify=function(r,n){if(Ot(r)){var i=r._q;r._q=[],r=Rt(new ne,i)}return n?.user_id&&this.setUserId(n.user_id),n?.device_id&&this.setDeviceId(n.device_id),t.prototype.identify.call(this,r,n)},e.prototype.groupIdentify=function(r,n,i,o){if(Ot(i)){var s=i._q;i._q=[],i=Rt(new ne,s)}return t.prototype.groupIdentify.call(this,r,n,i,o)},e.prototype.revenue=function(r,n){if(Ot(r)){var i=r._q;r._q=[],r=Rt(new gt,i)}return t.prototype.revenue.call(this,r,n)},e.prototype.process=function(r){return g(this,void 0,void 0,function(){var n,i,o;return h(this,function(s){return n=Date.now(),i=this.config.lastEventTime||Date.now(),o=n-i,r.event_type!==wr&&r.event_type!==Sr&&(!r.session_id||r.session_id===this.getSessionId())&&o>this.config.sessionTimeout&&this.setSessionId(n),[2,t.prototype.process.call(this,r)]})})},e}(Wt);var Gi=function(){var t=new Qn;return{init:H(t.init.bind(t),"init",V(t),F(t,["config"])),add:H(t.add.bind(t),"add",V(t),F(t,["config.apiKey","timeline.plugins"])),remove:H(t.remove.bind(t),"remove",V(t),F(t,["config.apiKey","timeline.plugins"])),track:H(t.track.bind(t),"track",V(t),F(t,["config.apiKey","timeline.queue.length"])),logEvent:H(t.logEvent.bind(t),"logEvent",V(t),F(t,["config.apiKey","timeline.queue.length"])),identify:H(t.identify.bind(t),"identify",V(t),F(t,["config.apiKey","timeline.queue.length"])),groupIdentify:H(t.groupIdentify.bind(t),"groupIdentify",V(t),F(t,["config.apiKey","timeline.queue.length"])),setGroup:H(t.setGroup.bind(t),"setGroup",V(t),F(t,["config.apiKey","timeline.queue.length"])),revenue:H(t.revenue.bind(t),"revenue",V(t),F(t,["config.apiKey","timeline.queue.length"])),flush:H(t.flush.bind(t),"flush",V(t),F(t,["config.apiKey","timeline.queue.length"])),getUserId:H(t.getUserId.bind(t),"getUserId",V(t),F(t,["config","config.userId"])),setUserId:H(t.setUserId.bind(t),"setUserId",V(t),F(t,["config","config.userId"])),getDeviceId:H(t.getDeviceId.bind(t),"getDeviceId",V(t),F(t,["config","config.deviceId"])),setDeviceId:H(t.setDeviceId.bind(t),"setDeviceId",V(t),F(t,["config","config.deviceId"])),reset:H(t.reset.bind(t),"reset",V(t),F(t,["config","config.userId","config.deviceId"])),getSessionId:H(t.getSessionId.bind(t),"getSessionId",V(t),F(t,["config"])),setSessionId:H(t.setSessionId.bind(t),"setSessionId",V(t),F(t,["config"])),extendSession:H(t.extendSession.bind(t),"extendSession",V(t),F(t,["config"])),setOptOut:H(t.setOptOut.bind(t),"setOptOut",V(t),F(t,["config"])),setTransport:H(t.setTransport.bind(t),"setTransport",V(t),F(t,["config"]))}},j=Gi();var cc=j.add,lc=j.extendSession,dc=j.flush,pc=j.getDeviceId,fc=j.getSessionId,mc=j.getUserId,vc=j.groupIdentify,Xn=j.identify,Zn=j.init,gc=j.logEvent,hc=j.remove,yc=j.reset,bc=j.revenue,Ec=j.setDeviceId,_c=j.setGroup,Tc=j.setOptOut,wc=j.setSessionId,Sc=j.setTransport,Ic=j.setUserId,ye=j.track;var te=t=>{window.dispatchEvent(new CustomEvent("builderdevtools",{detail:{eventName:t}}))};async function Ki(){return zr()}var Jn=async()=>{let t=new URL(window.location.href),e=t.hash,r=\`#\${Br}=\`,n=Math.random().toString(36).substring(2,15),i=await Ki();Zn("f1d2eb79aecd01b28c8a371ea5d1751c",i?.userId||n,{logLevel:mt.LogLevel.None,serverUrl:Hr,flushIntervalMillis:500});let o=new ne;Xn(o,{device_id:i?.deviceId,user_id:i?.userId||n});let s="anonymous";e.startsWith(r)&&(s=e.slice(r.length),s&&(Wi(s),t.hash="",window.history.replaceState({},"",t.href))),te("init")};var Wi=t=>{if(typeof t=="string"&&t.length>0){let e=Ze();Xe({...e,builderUserId:t})}},Ze=()=>{let t=localStorage.getItem(ei);if(t)try{let e=JSON.parse(t);return(!e.ctas||typeof e.ctas!="object")&&(e=Xe({...e,ctas:{}})),e.menuOpenedTs&&(e=Xe({...e,ctas:{...e.ctas,menuOpened:e.menuOpenedTs}}),delete e.menuOpenedTs),e}catch(e){console.error(e)}return Xe({firstVisitTs:Date.now(),ctas:{},builderUserId:""})},Xe=t=>{try{localStorage.setItem(ei,JSON.stringify(t))}catch(e){console.error(e)}return t},xr=t=>!!Ze().ctas[t],Lr=t=>{let e=Ze();return Xe({...e,ctas:{...e.ctas,[t]:Date.now()}})},ei="builderDevtools";function ti(t){$i(t),Yi(t),zi(t),Qi(t)}function $i(t){let e=t.getElementById("input-register");e.addEventListener("change",async r=>{r.stopPropagation();let n=t.getElementById("input-name"),i=t.querySelector(".nav-cmp-input");i.classList.add("input-loading"),i.classList.remove("input-enabled");let o=n.dataset.id,s=n.dataset.prop,u=await at({cmpId:o,name:s,registerInput:e.checked});te("registryUpdate"),le(u),Je(t,o,s),be(t,o),i.classList.remove("input-loading")})}function Yi(t){t.getElementById("input-open-source").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let n=r.target,i=G.components.find(o=>o.id===n?.dataset.id);i&&De({filePath:i.filePath})})}function zi(t){let e=t.getElementById("input-name"),r=e.closest(".ui-text-input"),n="",i;e.addEventListener("focus",o=>{clearTimeout(i),r.classList.remove("saved"),o.stopPropagation(),n=e.value}),e.addEventListener("blur",async o=>{if(o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),e.value!==n){if(e.value.trim().length<3){e.value=n;return}r.classList.add("saved"),i=setTimeout(()=>{r.classList.remove("saved")},3e3);let s=e.dataset.id,u=e.dataset.prop,d=await at({cmpId:s,name:u,friendlyName:e.value});te("registryUpdate"),le(d),ue(t),be(t,s),Je(t,s,u)}}),e.addEventListener("keyup",o=>{o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),o.key==="Escape"?(e.value=n,e.blur()):o.key==="Enter"&&e.blur()})}function Qi(t){let e=t.getElementById("input-type");e.addEventListener("change",async r=>{r.stopPropagation();let n=e.dataset.id,i=e.dataset.prop,o=await at({cmpId:n,name:i,type:e.value});te("registryUpdate"),le(o),ue(t),be(t,n),Je(t,n,i)})}function Je(t,e,r){let n=G.components.find(l=>l.id===e);if(!n)return null;let i=n.inputs.find(l=>l.name===r);if(!i)return null;let o=t.querySelector(".nav-cmp-input");i.isRegistered?o.classList.add("input-enabled"):o.classList.remove("input-enabled");let s=t.getElementById("input-register");s.checked=!!i.isRegistered;let u=t.getElementById("cmp-input-title");u.innerText=n.name+": "+(i.friendlyName||i.name);let d=t.getElementById("input-open-source");d.innerText=\`Open \${n.displayFilePath}\`,d.dataset.id=n.id;let p=t.getElementById("cmp-prop-name");p.innerText=i.name;let a=t.getElementById("cmp-prop-type");a.innerText=ft(i.type);let c=t.getElementById("input-name");return c.dataset.id=n.id,c.dataset.prop=i.name,c.value=i.friendlyName||i.name,Xi(t,n,i),i}function Xi(t,e,r){let n=t.getElementById("input-type");n.dataset.id=e.id,n.dataset.prop=r.name,n.innerHTML="";let i=r.type,o=ut.includes(i),s=ct.includes(i),u=lt.includes(i),d=dt.includes(i),p=pt.includes(i);Qr.forEach(a=>{let c=document.createElement("option");c.value=a.value,c.innerText=a.text,c.disabled=ut.includes(a.value)&&!o||ct.includes(a.value)&&!s||lt.includes(a.value)&&!u||dt.includes(a.value)&&!d||pt.includes(a.value)&&!p,n.appendChild(c)}),n.value=i}function ri(t){Zi(t),Ji(t),eo(t),ro(t),to(t)}function Zi(t){t.getElementById("cmp-register").addEventListener("change",r=>{r.stopPropagation(),kt(t,"update")})}async function kt(t,e){let r=t.querySelector(".nav-cmp-detail"),n=t.getElementById("cmp-error"),i=t.getElementById("cmp-register"),o=i.closest(".ui-switch");r.classList.remove("cmp-enabled"),i.checked&&r.classList.add("cmp-loading");try{let s=i.dataset.id,u;e==="load"?u=await Gr({cmpId:s}):i.checked?(u=await Kr({cmpId:s}),te("registryUpdate"),ye("interaction",{type:"click",name:"register component",detail:s})):(u=await $r({cmpId:s}),te("registryUpdate"),ye("interaction",{type:"click",name:"unregister component",detail:s})),le(u),ue(t);let d=be(t,s);e==="update"&&d&&(i.checked?(r.classList.add("cmp-enabled"),Bt(t,\`<strong>\${d.name}</strong> is now registered in <strong>\${G.registryDisplayPath}</strong> and available for use in the Builder Visual Editor\`)):Bt(t,\`<strong>\${d.name}</strong> has been unregistered from <strong>\${G.registryDisplayPath}</strong> and removed from the Builder Visual Editor\`))}catch(s){console.error(s),n.innerHTML=\`<p class="error">Error loading components</p><p class="error">\${s.message||s}</p>\`,o.style.display="none"}r.classList.remove("cmp-loading")}function Ji(t){let e=t.getElementById("cmp-name"),r=e.closest(".ui-text-input"),n="",i;e.addEventListener("focus",o=>{clearTimeout(i),r.classList.remove("saved"),o.stopPropagation(),n=e.value}),e.addEventListener("blur",async o=>{if(o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),e.value!==n){if(e.value.trim().length<3){e.value=n;return}r.classList.add("saved"),i=setTimeout(()=>{r.classList.remove("saved")},3e3);let s=e.dataset.id,u=await Wr({cmpId:s,name:e.value});te("registryUpdate"),le(u),ue(t),be(t,s)}}),e.addEventListener("keyup",o=>{o.stopPropagation(),clearTimeout(i),r.classList.remove("saved"),o.key==="Escape"?(e.value=n,e.blur()):o.key==="Enter"&&e.blur()})}function be(t,e){let r=G.components.find(a=>a.id===e);if(!r)return null;let n=t.getElementById("cmp-register"),i=t.getElementById("cmp-error"),o=n.closest(".ui-switch");o.style.display="",i.innerHTML="",n.dataset.id=r.id,n.checked=!!r.isRegistered;let s=t.querySelector(".nav-cmp-detail");r.isRegistered?s.classList.add("cmp-enabled"):s.classList.remove("cmp-enabled");let u=t.getElementById("cmp-name");u.dataset.id=r.id,u.value=r.name;let d=t.getElementById("cmp-open-source");d.innerText=\`Open \${r.displayFilePath}\`,d.dataset.id=r.id;let p=t.getElementById("cmp-detail-title");return p.innerText=\`\${r.name} Component\`,no(t,r),r}function eo(t){t.getElementById("cmp-open-source").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let n=r.target,i=G.components.find(o=>o.id===n?.dataset.id);i&&(De({filePath:i.filePath}),ye("interaction",{type:"click",name:"open component source file",detail:i.filePath}))})}function to(t){t.getElementById("btn-inputs-reload").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),kt(t,"load")})}function ro(t){t.getElementById("cmp-detail-inputs").addEventListener("click",r=>{r.preventDefault(),r.stopPropagation();let i=r.target?.closest("button"),o=i?.dataset.id,s=i?.dataset.propName;Je(t,o,s)&&oe(t,"nav-cmp-input")})}function no(t,e){let r=t.getElementById("cmp-detail-inputs"),n=e.inputs.filter(i=>!i.hideFromUI);n.length>0?(r.innerHTML="",n.forEach(i=>{r.appendChild(io(e,i))})):r.innerHTML=\`<p class="cmp-inputs-empty">\${e.name} component does not have any props</p>\`}function io(t,e){let r=document.createElement("button");r.dataset.id=t.id,r.dataset.propName=e.name,r.className="cmp-input-item nav-list-item",e.isRegistered||r.classList.add("cmp-input-item-unregistered");let n=document.createElement("span"),i=ft(e.type);n.className=\`nav-list-item-icon input-icon input-icon-\${i}\`,r.appendChild(n);let o=document.createElement("span");o.innerText=e.friendlyName||e.name,r.appendChild(o);let s=document.createElement("span");return s.className="nav-list-item-note",s.innerText=e.type,r.appendChild(s),r}function oi(t){t.getElementById("open-builder-registry").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),De({filePath:G.registryPath,line:1,column:1})}),t.getElementById("cmp-list").addEventListener("click",o=>{o.preventDefault(),o.stopPropagation();let u=o.target?.dataset.id,d=G.components.find(p=>p.id===u);if(d){let p=t.querySelector(".nav-cmp-detail .section-content");p.scrollTop=0,be(t,d.id),oe(t,"nav-cmp-detail"),d.isRegistered&&kt(t,"load")}});let n=t.getElementById("component-search"),i=t.getElementById("clear-search");n?.addEventListener("input",o=>{let s=o.target.value.toLowerCase(),u=s?G.components.filter(d=>d.name.toLowerCase().includes(s)||d.displayFilePath?.toLowerCase().includes(s)):G.components;ue(t,u),i.style.display=s?"flex":"none"}),i?.addEventListener("click",()=>{n.value="",ue(t),i.style.display="none"}),n?.addEventListener("keydown",o=>{o.key==="Escape"&&(n.value="",ue(t),i.style.display="none")})}function si(t){let e=jr();oo(t,e)}async function oo(t,e){let r=t.getElementById("cmp-list"),n=t.querySelector(".nav-cmp-list");n.classList.add("nav-loading");let i=t.getElementById("open-builder-registry");try{let o=await e;le(o),ue(t),G.registryDisplayPath?i.innerText="Open "+o.registryDisplayPath:i.innerText=""}catch(o){r.innerHTML=\`<p class="error">Error loading components</p><p class="error">\${o.message||o}</p>\`,console.error(o)}n.classList.remove("nav-loading")}function ue(t,e){let r=t.getElementById("cmp-list");r.innerHTML="";let n=e||G.components,i=n.filter(s=>s.isRegistered),o=n.filter(s=>!s.isRegistered);if(e&&e.length===0){let s=document.createElement("p");s.className="no-results",s.innerText="No matching components found",r.appendChild(s);return}ni(r,"Registered Components",i),ni(r,"Unregistered Components",o)}function ni(t,e,r){if(r.length>0){let n=document.createElement("h4");n.innerText=e,t.appendChild(n),r.forEach(i=>{t.appendChild(so(i))})}}function so(t){let e=document.getElementById("component-search")?.value.toLowerCase(),r=document.createElement("button");r.dataset.id=t.id,r.className="cmp-item nav-list-item",t.isRegistered&&r.classList.add("registered");let n=document.createElement("span");n.className="nav-list-item-icon",t.image&&(n.style.backgroundImage=\`url(\${t.image})\`),r.appendChild(n);let i=document.createElement("span");i.className="nav-list-item-name",i.innerHTML=ii(t.name,e),r.appendChild(i);let o=document.createElement("span");return o.className="nav-list-item-note",o.innerHTML=ii(t.displayFilePath||"",e),r.appendChild(o),r}function ii(t,e){if(!e)return t;let r=new RegExp(\`(\${e})\`,"gi");return t.replace(r,'<span class="search-highlight">$1</span>')}var ai=t=>{t.querySelector(".menu-toggle").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Ee(t,!0)}),t.getElementById("close").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Ee(t,!1)}),t.getElementById("hit").addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),Ee(t,!1)}),Ar(t),t.addEventListener("click",e=>e.stopPropagation()),ao(t)},Ee=(t,e)=>{e?(document.body.classList.add("builder-no-scroll"),t.host.classList.add("show-builder-menu"),te("menuOpen"),Lr("menuOpened"),ye("interaction",{type:"click",name:"open dev-tools menu"})):(document.body.classList.remove("builder-no-scroll"),t.host.classList.remove("show-builder-menu"),te("menuClose"),setTimeout(()=>{oe(t,"nav-home")},300)),Yr(e)},ao=t=>{if(!xr("menuOpened")){uo(t);return}let e=Ze();if(!((Date.now()-e.firstVisitTs)/1e3/60<10)&&!xr("feedback")){Lr("feedback"),co(t);return}},uo=t=>{let e=document.createElement("a");e.classList.add("menu-toggle-tooltip"),e.href="#open-dev-tools",e.innerHTML=\`
|
|
1313
1313
|
<div class="menu-toggle-tooltip-content">
|
|
1314
1314
|
<h3>Open Builder Devtools</h3>
|
|
@@ -1319,7 +1319,7 @@ Restarting server after Builder Devtools update...
|
|
|
1319
1319
|
<h3>How's Devtools working for you?</h3>
|
|
1320
1320
|
<p>We'd love your feedback!</p>
|
|
1321
1321
|
</div>
|
|
1322
|
-
\`,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.6.107"}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)}
|
|
1322
|
+
\`,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.6.108"}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)}
|
|
1323
1323
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
1324
1324
|
<aside>
|
|
1325
1325
|
<div class="logo"></div>
|
|
@@ -1358,7 +1358,7 @@ Restarting server after Builder Devtools update...
|
|
|
1358
1358
|
</nav>
|
|
1359
1359
|
</section>
|
|
1360
1360
|
</main>
|
|
1361
|
-
\`,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.6.
|
|
1361
|
+
\`,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.6.108"),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.6.108"),mo());})();`)}async function DF(e){return TF(e,`<!doctype html>
|
|
1362
1362
|
<html lang="en" dir="ltr">
|
|
1363
1363
|
<head>
|
|
1364
1364
|
<meta charset="utf-8" />
|
|
@@ -1524,20 +1524,20 @@ Restarting server after Builder Devtools update...
|
|
|
1524
1524
|
</script>
|
|
1525
1525
|
</body>
|
|
1526
1526
|
</html>
|
|
1527
|
-
`)}async function
|
|
1528
|
-
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await ee(1);let t=e.snippetId;if(!t&&!e.snippet)return xe("SnippetId expected. npx builder.io add <snippetId>"),await ee(1);let r=ga(),n=e.snippet||null;if(!n&&t&&(r.start(`Fetching snippet ${t}`),n=await z0(t),r.stop(`Fetched snippet ${t}`)),!n)return xe(`No snippet found for id ${t}`),await ee(1);let i=process.cwd(),s=du(i)??i;if(n.files?.length>0){let o=G0(s,n.framework||"react"),a=e.path||await pt({message:"Where should we copy the files?",initialValue:o,validate(l){if(l.length===0)return"File path is required!";if(l[0]!==".")return"Please enter a relative path."}});if(Se(a))return xe("Cancelled sync"),await ee(0);let c=await vm(s,n,n.files,a,!1);return B.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:c,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:c}=n;c&&(a=await Qee(s,c,o)),a??="./src/components/MyComponent.jsx";let l=
|
|
1527
|
+
`)}async function TF(e,t){let r=await fD(e),n=e.getFrameworks();return t.replace(/__LOCAL_APP_ID__/g,r).replace(/__DEV_TOOLS_URL__/g,e.devToolsServerUrl).replace(/__CLIENT_ID__/g,e.getClientId()).replace(/__FRAMEWORK__/g,n.length?n[0].name:"")}f();var AF=require("os");async function PF(e,t){let r=new URL("/cli-auth","https://builder.io");r.searchParams.set("client_id",e.getClientId()),r.searchParams.set("host",await e.getDeviceId()),r.searchParams.set("response_type","code"),r.searchParams.set("cli","true");let n=new URL(po,e.devToolsServerUrl);n.searchParams.set(nd,(0,AF.platform)()),n.searchParams.set(id,process.versions.node);let i=e.getFrameworks();return i.length>0&&(r.searchParams.set(fa,i[0].name),n.searchParams.set(fa,i[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",t),r.href}async function IF(e,t,r,n){try{if(!e)return hc(r,n,400,"Builder context closed");let i=Jee(r);if(i.pathname===Gg){if(r.method==="POST"){let s=await Wee(r);if(s)try{let o=await CF(e,JSON.parse(s));return _F(r,n,200,o)}catch(o){e.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return _F(r,n,500,a)}}else if(r.method==="OPTIONS"){let s={"Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type, Cache-Control, X-Builder-Devtools-Version, sentry-trace, baggage"},o=r.headers.origin;o&&o!=="null"?kF(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return hc(r,n,405,`${Gg} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===Hg)return Hee(r,n,200,await SF(e));if(i.pathname===NS){let s=i.searchParams.get(zg);return s?Vee(n,302,await PF(e,s)):hc(r,n,400,`Missing ${zg} querystring`)}if(i.pathname===po)return Kee(r,n,200,await DF(e));if(i.pathname===FS){await xt(e,{_:[]},{});let s=await $o(e),{figmaBuilderLinks:o,diagnostics:a}=await Cu({mappingFiles:s,sys:e});return Eu(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return i.pathname===fo?(e.debug(`Close Dev Tools Server Requested: ${i.href}`),setTimeout(()=>{try{t.close(s=>{e.debug(`Dev Tools Server Closed Error: ${s}`)})}catch(s){e.debug(`Error closing devtools server: ${s}`)}},20),hc(r,n,200,"Closing Dev Tools Server")):hc(r,n,404,"Not found")}catch(i){return e?.Sentry?.captureException(i),hc(r,n,500,`Dev Server Error: ${i}`)}}function _F(e,t,r,n){Eu(e,t,r,"application/json",JSON.stringify(n))}function Hee(e,t,r,n){Eu(e,t,r,"application/javascript",n)}function Kee(e,t,r,n){Eu(e,t,r,"text/html",n)}function hc(e,t,r,n){Eu(e,t,r,"text/plain",n)}function Eu(e,t,r,n,i){let s={"Content-Type":`${n}; charset=utf-8`,"Cache-Control":"no-cache, no-store, must-revalidate","X-Builder-Devtools-Version":Ae},o=e.headers.origin;o&&o!=="null"?kF(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",t.writeHead(r,s),t.end(i)}function kF(e){return e.hostname==="localhost"||e.origin==="https://builder.io"||e.origin==="https://www.builder.io"||e.origin.endsWith(".builder.io")?!0:e.port===""?!1:e.port!=="80"&&e.port!=="443"}function Vee(e,t,r){e.writeHead(t,{Location:r}),e.end()}async function Wee(e){let t="";for await(let r of e)t+=r;return t}function Jee(e){let t=e.url||"/";return new URL(t,`http://${e.headers.host}`)}async function NF(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let t=await Yee(e),r=(0,xm.createServer)((i,s)=>{IF(e,r,i,s)}),n=()=>new Promise((i,s)=>{r.listening?(e.debug(`closing devtools server on port ${t}`),r.close(o=>{e=null,o?(e.debug(`error closing devtools server on port ${t}`),s(o)):(e&&e.debug(`closed devtools server on port ${t}`),i())})):(e.debug(`devtools server on port ${t} not listening`),i())});return process.once("SIGTERM",n),process.once("SIGINT",n),process.env.CI!=="true"&&process.stdin.on("end",n),globalThis.__builderDevToolsServer={url:new URL(`http://localhost:${t}`).href,port:t,setContext:i=>{e.debug(`set devtools context on server ${t}`),e=i},close:async()=>{globalThis.__builderDevToolsServer=null,await n()}},new Promise(i=>{r.listen(t,()=>{e.debug(`started devtools server on port ${t}`),i(globalThis.__builderDevToolsServer)})})}function Yee(e){return new Promise(t=>{let r=e.port;try{(0,xm.request)({hostname:"localhost",port:r,path:fo,method:"GET"},i=>{i.on("end",()=>{e.debug(`${fo} - Response ended`),t(r)})}).on("error",i=>{e.debug(`${fo} - No response ${i}`),t(r)}).end()}catch(n){e.debug(`${fo} - Error ${n}`),t(r)}})}async function q0(e){let t={...e,devToolsServerUrl:"",isValid:!1,serverShouldRestart:!1,publicApiKey:"",port:e.port||5273,ignoreMissingConfig:!1,getAllProjectFiles:e.getAllProjectFiles||(()=>Promise.resolve([]))},r=e.getFrameworks().map(s=>s.name).join(", ");t.debug(`create devtools ${FF} [${r}]`);let n=await NF(t);return t.devToolsServerUrl=n.url,t.port=n.port,{getUrl:()=>t.devToolsServerUrl}}var FF=Ae;f();var Zn=require("path"),ar=require("fs");var qs=j(ut(),1);async function OF(e){if(console.log(""),qe((0,qs.bgCyan)((0,qs.bold)((0,qs.white)(" add ")))+" "+(0,qs.dim)(Ae)),!e.path&&!process.stdout.isTTY&&process.env.FORCE_TTY!=="1")return xe(`This command requires a TTY-enabled terminal.
|
|
1528
|
+
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await ee(1);let t=e.snippetId;if(!t&&!e.snippet)return xe("SnippetId expected. npx builder.io add <snippetId>"),await ee(1);let r=ga(),n=e.snippet||null;if(!n&&t&&(r.start(`Fetching snippet ${t}`),n=await z0(t),r.stop(`Fetched snippet ${t}`)),!n)return xe(`No snippet found for id ${t}`),await ee(1);let i=process.cwd(),s=du(i)??i;if(n.files?.length>0){let o=G0(s,n.framework||"react"),a=e.path||await pt({message:"Where should we copy the files?",initialValue:o,validate(l){if(l.length===0)return"File path is required!";if(l[0]!==".")return"Please enter a relative path."}});if(Se(a))return xe("Cancelled sync"),await ee(0);let c=await vm(s,n,n.files,a,!1);return B.success("All files have been written successfully."),{snippet:n,pathInput:a,writtenFiles:c,timeStamp:Date.now()}}else{let{code:o,suggestedName:a,framework:c}=n;c&&(a=await Qee(s,c,o)),a??="./src/components/MyComponent.jsx";let l=RF(n,Xee(n.code),n.framework);try{n.framework==="html"?l=await Zr(s,l,"html",void 0):n.framework==="angular"?l=await Zr(s,l,"angular",void 0):n.framework==="vue"?l=await Zr(s,l,"vue",void 0):n.framework==="svelte"?l=await Zr(s,l,"svelte",void 0):l=await Zr(s,l,"typescript",void 0)}catch{}let u=e.path;if(!u){try{let h=(await xk({cwd:process.cwd()})).getFrameworks();if(h.length>0){let m;if(h.some(g=>g.name.includes("qwik"))?m="qwik":h.some(g=>g.name.includes("react"))?m="react":m=h[0].name,n.framework&&n.framework!==m){let g=await vr({message:`This snippet is for ${n.framework}, but you are using ${m}. Continue?`,initialValue:!1});if(Se(g)||!g)return console.log("Please go back to builder and change the output framework to match your project."),console.log(),await ee(0)}}}catch{}if(u=await pt({message:"Where should we copy the code?",initialValue:a?.startsWith("./")?a:`./${a}`,validate(d){if(d.length===0)return"File path is required!";if(d[0]!==".")return"Please enter a relative path."}}),Se(u))return console.log(""),await ee(0)}let p=(0,Zn.resolve)(s,u);B.info(`Writing code to ${p}`),(0,ar.mkdirSync)((0,Zn.dirname)(p),{recursive:!0}),(0,ar.writeFileSync)(p,l)}}function z0(e){return ot(`https://cdn.builder.io/api/v1/snippet/${e}`).then(t=>t.status===404?null:t.json())}function Xee(e){return e.replace(/^```jsx\s?|\s?```$/g,"").trim()}function RF(e,t,r,n=!1){if(!r)return t;let i="This code was generated by Builder.io",s=n?`https://builder.io/content/${e.contentId}?codeSession=${e.sessionKey}&sid=${e.id}`:"",o=["vue","html","svelte"].includes(r.toLowerCase()),a=[i,s].filter(Boolean);return`${o?a.map(l=>`<!-- ${l} -->`).join(`
|
|
1529
1529
|
`):`/**
|
|
1530
1530
|
${a.map(l=>` * ${l}`).join(`
|
|
1531
1531
|
`)}
|
|
1532
1532
|
*/`}
|
|
1533
|
-
${t}`}async function Qee(e,t,r){let n,i=ete(r,t.toLowerCase());switch(t.toLowerCase()){case"react":let s=await Zee(e);n=`components/${i||"MyComponent"}.${s?"tsx":"jsx"}`;break;case"angular":n=`app/components/${i||"my-component"}.component.ts`;break;case"vue":n=`components/${i||"MyComponent"}.vue`;break;case"svelte":n=`components/${i||"MyComponent"}.svelte`;break;case"html":n=`${i||"my-design"}.html`;break;case"qwik":n=`components/${i||"MyComponent"}.tsx`;break;default:n=`components/${i||"MyComponent"}.tsx`}return n=(0,ar.existsSync)("./src")?`./src/${n}`:`./${n}`,n}async function Zee(e){if((0,ar.existsSync)((0,Zn.join)(e,"./tsconfig.json")))return!0;let t=Rx(e);return t&&(0,ar.existsSync)((0,Zn.join)(t,"./package.json"))?(0,ar.readFileSync)((0,Zn.join)(t,"./package.json"),"utf-8").includes("typescript"):!1}function ete(e,t){let r={vue:/name:\s*'([^']+)'/,react:/function (\w+)\([\w\W]+\)/,qwik:/export const (\w+) = component\$/,angular:/selector:\s*'([^']+)'/};if(!r[t])return null;let n=e.match(r[t]);return t==="react"&&!n?.[1]?e.match(/const (\w+)[\w\W]+=\s*\(/)?.[1]||null:n?.[1]||null}async function vm(e,t,r,n,i){let s=[];for(let o of r){let a=tte(n,o.path),c=(0,Zn.resolve)(e,a);if("code"in o){let l=await nte(e,t,o.code,rte(o.path),i);(0,ar.existsSync)(c)||(0,ar.mkdirSync)((0,Zn.dirname)(c),{recursive:!0}),(0,ar.writeFileSync)(c,l),s.push({...o,path:a,code:l,timestamp:(0,ar.statSync)(c).mtime.getTime()}),B.info(`Writing file to ${c}`)}else(0,ar.mkdirSync)(c,{recursive:!0}),s=s.concat(await vm(e,t,o.files,a,i))}return s}function tte(e,t){let r=e.replace(/^\.?\/+|\/+$/g,""),n=t.replace(/^\.?\/+|\/+$/g,""),i=r.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o=-1;for(let c=0;c<i.length;c++){let l=s.indexOf(i[c]);l!==-1&&(o=l)}return[...i,...s.slice(o+1)].join("/")}function rte(e){switch(e.split(".").pop()?.toLowerCase()){case"html":case"svelte":return"html";case"vue":return"vue";case"ts":case"tsx":case"js":case"jsx":return"typescript";case"css":return"css";case"json":return"json";default:return"typescript"}}async function nte(e,t,r,n,i){let s=r;try{s=await Zr(e,r,n,void 0)}catch{}return i?
|
|
1533
|
+
${t}`}async function Qee(e,t,r){let n,i=ete(r,t.toLowerCase());switch(t.toLowerCase()){case"react":let s=await Zee(e);n=`components/${i||"MyComponent"}.${s?"tsx":"jsx"}`;break;case"angular":n=`app/components/${i||"my-component"}.component.ts`;break;case"vue":n=`components/${i||"MyComponent"}.vue`;break;case"svelte":n=`components/${i||"MyComponent"}.svelte`;break;case"html":n=`${i||"my-design"}.html`;break;case"qwik":n=`components/${i||"MyComponent"}.tsx`;break;default:n=`components/${i||"MyComponent"}.tsx`}return n=(0,ar.existsSync)("./src")?`./src/${n}`:`./${n}`,n}async function Zee(e){if((0,ar.existsSync)((0,Zn.join)(e,"./tsconfig.json")))return!0;let t=Rx(e);return t&&(0,ar.existsSync)((0,Zn.join)(t,"./package.json"))?(0,ar.readFileSync)((0,Zn.join)(t,"./package.json"),"utf-8").includes("typescript"):!1}function ete(e,t){let r={vue:/name:\s*'([^']+)'/,react:/function (\w+)\([\w\W]+\)/,qwik:/export const (\w+) = component\$/,angular:/selector:\s*'([^']+)'/};if(!r[t])return null;let n=e.match(r[t]);return t==="react"&&!n?.[1]?e.match(/const (\w+)[\w\W]+=\s*\(/)?.[1]||null:n?.[1]||null}async function vm(e,t,r,n,i){let s=[];for(let o of r){let a=tte(n,o.path),c=(0,Zn.resolve)(e,a);if("code"in o){let l=await nte(e,t,o.code,rte(o.path),i);(0,ar.existsSync)(c)||(0,ar.mkdirSync)((0,Zn.dirname)(c),{recursive:!0}),(0,ar.writeFileSync)(c,l),s.push({...o,path:a,code:l,timestamp:(0,ar.statSync)(c).mtime.getTime()}),B.info(`Writing file to ${c}`)}else(0,ar.mkdirSync)(c,{recursive:!0}),s=s.concat(await vm(e,t,o.files,a,i))}return s}function tte(e,t){let r=e.replace(/^\.?\/+|\/+$/g,""),n=t.replace(/^\.?\/+|\/+$/g,""),i=r.split("/").filter(Boolean),s=n.split("/").filter(Boolean),o=-1;for(let c=0;c<i.length;c++){let l=s.indexOf(i[c]);l!==-1&&(o=l)}return[...i,...s.slice(o+1)].join("/")}function rte(e){switch(e.split(".").pop()?.toLowerCase()){case"html":case"svelte":return"html";case"vue":return"vue";case"ts":case"tsx":case"js":case"jsx":return"typescript";case"css":return"css";case"json":return"json";default:return"typescript"}}async function nte(e,t,r,n,i){let s=r;try{s=await Zr(e,r,n,void 0)}catch{}return i?RF(t,s,n,i):s}function G0(e,t){let n=(0,ar.existsSync)((0,Zn.join)(e,"src"))?"src/":"";switch(t.toLowerCase()){case"angular":return`./${n}app/components/`;case"html":return"./";default:return`./${n}components/`}}var BF=j(require("chokidar"),1),$F=j(require("ignore"),1);function UF(e){let t=e.match(/builder\.io\/content\/([^?]+)\?codeSession=([^&]+)&sid=([^\s]+)/);return t?{contentId:t[1],sessionKey:t[2],snippetId:t[3]}:{}}async function gc(e,t="**/*",r){return await U0(t,{cwd:e,ignoreFiles:H0,ignore:[...K0,...r||[]],absolute:!1})}async function ite(e,t,r){let n=await U0("**/*",{cwd:e,ignoreFiles:H0,ignore:K0}),i=[];for(let s of n){let o=(0,Hr.resolve)(e,s);try{let a=(0,Kr.readFileSync)(o,"utf-8");if(a.includes("This code was generated by Builder.io")){let c=UF(a);if(t&&r&&(c.contentId!==t||c.sessionKey!==r))continue;i.push({path:s,code:wm(a),name:s.split("/").pop()||"",timestamp:(0,Kr.statSync)(o).mtime.getTime(),snippetId:c.snippetId})}}catch(a){console.error(`Error reading file ${o}:`,a)}}return i}function ste(e,t){let r=UF(e);return r.contentId===t.contentId&&r.sessionKey===t.sessionKey}function jF(e){return e.filter(t=>(t=t.toLowerCase(),!t.endsWith(".png")&&!t.endsWith(".jpg")&&!t.endsWith(".jpeg")&&!t.endsWith(".gif")&&!t.endsWith(".ico")&&!t.endsWith(".webp")&&!t.includes(".mapper.")))}var H0=[".gitignore",".prettierignore",".builderignore"],K0=["*.yml","*.yaml","*.snap","*.liquid",".git",".DS_Store",".vscode","node_modules",".next","coverage","example","yarn.lock","pnpm-lock.yaml","__snapshots__","package-lock.json","fusion.config.json","builder.config.json","builder-registry.*",".gradle","xcuserdata",".build","*.zip"];function ote(e){let t=(0,$F.default)().add(K0);function r(n){try{let i=(0,Hr.resolve)(e,n);if((0,Kr.existsSync)(i)){let s=(0,Kr.readFileSync)(i,"utf8");t.add(s)}}catch(i){console.debug(`No ${n} found or error reading it:`,i)}}for(let n of H0)r(n);return n=>{let i=n.split(Hr.sep).join("/");return t.ignores(i)}}function MF(e,t,r){let n=ote(e),i=BF.default.watch(e,{ignored:n,ignoreInitial:!0,awaitWriteFinish:{stabilityThreshold:500,pollInterval:600},ignorePermissionErrors:!0,followSymlinks:!1,atomic:600}),s=async a=>{let c=(0,Hr.relative)(e,a);try{let l=(0,Kr.readFileSync)(a,"utf-8");if(ste(l,t.snippet)){let u=t.writtenFiles.find(p=>p.path===c);u?(u.code=wm(l),u.timestamp=Date.now()):t.writtenFiles.push({path:c,code:wm(l),timestamp:Date.now(),name:c.split("/").pop()||""}),t.timeStamp=Date.now(),r(t)}}catch(l){console.debug(`Error reading file ${a}:`,l)}};i.on("add",async a=>{B.info(`File added: ${a}`),await s(a)}).on("change",async a=>{B.info(`File changed: ${a}`),await s(a)}).on("unlink",a=>{B.info(`File deleted: ${a}`);let c=(0,Hr.relative)(e,a);t.writtenFiles=t.writtenFiles.filter(l=>l.path!==c),t.timeStamp=Date.now(),r(t)}).on("unlinkDir",a=>{B.info(`Folder deleted: ${a}`);let c=(0,Hr.relative)(e,a);t.writtenFiles=t.writtenFiles.filter(l=>!l.path.startsWith(c)),t.timeStamp=Date.now(),r(t)}).on("ready",()=>{console.debug("Initial scan complete. Ready for changes.")}).on("error",a=>{console.error(`Watcher error: ${a}`)}),i.on("raw",async(a,c,l)=>{if(a==="rename"){B.info(`File renamed: ${l?.oldPath} -> ${c}`);let u=l?.oldPath?(0,Hr.relative)(e,l.oldPath):void 0,p=c?(0,Hr.relative)(e,c):void 0;if(u&&p){let d=t.writtenFiles.find(h=>h.path===u);d&&(d.path=p,t.timeStamp=Date.now(),r(t))}}});let o=async()=>{await i.close()};return process.on("SIGINT",o),process.on("SIGTERM",o),o}async function qF(e,t){console.log(""),qe((0,zs.bgMagenta)((0,zs.bold)((0,zs.white)(" sync server ")))+" "+(0,zs.dim)(Ae)),e.debug("builder sync server init");let r=await Ps(e),n=t,i=()=>Promise.resolve();n&&setTimeout(()=>{i=MF(e.getAppRootDir(),n,s=>{n=s})},1e3),await q0({...r,ensureFigmaImportPage:()=>Promise.reject("Not supported"),getPastSyncInfo:({sessionKey:s,since:o})=>!n||s!==n.snippet.sessionKey?null:{...n,hasChanged:n.timeStamp>o},resyncSnippet:async s=>{await i();let o=await V0({path:n?.pathInput,snippet:s.snippet,cwd:e.getAppRootDir()});return o&&(n=o,i=MF(e.getAppRootDir(),n,a=>{n=a})),n},getClientId:()=>"builder-sync-cli",closeAppServer:async()=>{await i()},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async s=>s,...e})}async function V0(e){let t=e.snippetId,r=e.snippet||null;if(!r&&t&&(r=await z0(t)),!r)return xe(`No snippet found for id ${t}`),await ee(1);let n=process.cwd(),i=du(n)??n,s=await ite(i,r.contentId,r.sessionKey),o=s.filter(p=>p.snippetId===r.id);if(B.info(`Found ${o.length} matching files for snippet ${r.id} in existing files ${s.length}`),o.length>0){let p=Math.max(...o.map(d=>d.timestamp||0));return{snippet:r,writtenFiles:o,pathInput:LF(o.map(d=>d.path)),timeStamp:p}}let a=G0(i,r.framework||"react"),c=e.path||LF(s.map(p=>p.path))||await pt({message:"Where should we copy the files?",initialValue:a,validate(p){if(p.length===0)return"File path is required!";if(p[0]!==".")return"Please enter a relative path."}});Se(c)&&(xe("Cancelled sync"),process.exit(0));for(let p of s){let d=(0,Hr.resolve)(i,p.path);try{(0,Kr.unlinkSync)(d),B.info(`Deleted old file: ${d}`);let h=(0,Hr.dirname)(d);(0,Kr.readdirSync)(h).length===0&&((0,Kr.rmdirSync)(h),B.info(`Deleted empty folder: ${h}`))}catch(h){B.error(`Error cleaning up file ${d}: ${h}`)}}let l=await vm(i,r,r.files,c,!0);B.success("All files have been written successfully.");let u=Math.max(...l.map(p=>p.timestamp||0));return{snippet:r,writtenFiles:l.map(p=>({...p,code:wm(p.code)})),pathInput:c,timeStamp:u||Date.now()}}function wm(e){if(!e)return e;let t=/<!--\s*This code was generated by Builder\.io\s*-->\s*(?:<!--\s*https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*-->\s*)?/,r=/\/\*\*\s*\n\s*\* This code was generated by Builder\.io\s*\n\s*\* https:\/\/builder\.io\/content\/[a-f0-9]+\?codeSession=[a-f0-9]+&sid=[a-f0-9]+\s*\n\s*\*\/\s*/,n=e.replace(t,"").replace(r,"");return n=n.replace(/^\n+/,""),n}function LF(e){if(e.length===0)return"";if(e.length===1)return`./${e[0].slice(0,e[0].lastIndexOf("/")+1)}`;let t=e.map(i=>i.split("/")),r=Math.min(...t.map(i=>i.length)),n=[];for(let i=0;i<r;i++){let s=t[0][i];if(t.every(o=>o[i]===s))n.push(s);else break}return`./${n.join("/")}`}f();var Hs=j(ut(),1);f();f();var W0=j(require("process"),1);function J0(){let{env:e}=W0.default,{TERM:t,TERM_PROGRAM:r}=e;return W0.default.platform!=="win32"?t!=="linux":!!e.WT_SESSION||!!e.TERMINUS_SUBLIME||e.ConEmuTask==="{cmd::Cmder}"||r==="Terminus-Sublime"||r==="vscode"||t==="xterm-256color"||t==="alacritty"||t==="rxvt-unicode"||t==="rxvt-unicode-256color"||e.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Y0=j(ut(),1),os=j(sd(),1),Em=require("process"),Gs=j(require("readline"),1),Su=j(ut(),1),Ir=()=>{let e=X0?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=X0?80:120,r,n,i=!1,s="",o="",a="",c=b=>{let v=b>1?"Something went wrong":"Canceled";i&&m(v,b)},l=(b,v)=>{console.error(v,b),c(2)},u=()=>c(1),p=()=>{process.on("uncaughtExceptionMonitor",l),process.on("unhandledRejection",l),process.on("SIGINT",u),process.on("SIGTERM",u),process.on("exit",c)},d=()=>{process.removeListener("uncaughtExceptionMonitor",l),process.removeListener("unhandledRejection",l),process.removeListener("SIGINT",u),process.removeListener("SIGTERM",u),process.removeListener("exit",c)},h=(b="")=>{i=!0,r=dte(),s=b.replace(/\.+$/,""),process.stdout.write(`${Y0.default.gray(ate)}
|
|
1534
1534
|
`);let v=0,E=0;p(),process.env.CI||(n=setInterval(()=>{let x=Y0.default.magenta(e[v]),w=".".repeat(Math.floor(E)).slice(0,3);process.stdout.write(os.cursor.move(-999,-a.split(`
|
|
1535
1535
|
`).length+1)),process.stdout.write(os.erase.down(a.split(`
|
|
1536
1536
|
`).length));let S=`${x} ${s}${w}${o}`;process.stdout.write(S),v=v+1<e.length?v+1:0,E=E<e.length?E+.125:0,a=S},t))},m=(b,v=0)=>{s=b??s,i=!1,clearInterval(n);let E=v===0?(0,Su.green)(ute):v===1?(0,Su.red)(cte):(0,Su.red)(lte);process.stdout.write(os.cursor.move(-999,-a.split(`
|
|
1537
1537
|
`).length+1)),process.stdout.write(os.erase.down(a.split(`
|
|
1538
1538
|
`).length)),process.stdout.write(`${E} ${s}
|
|
1539
1539
|
`),a=s,d(),r()};return{start:h,stop:m,message:(b="")=>{s=b??s},extra:(b="")=>{o=b}}},X0=J0(),Cm=(e,t)=>X0?e:t,ate=Cm("\u2502","|"),cte=Cm("\u25A0","x"),lte=Cm("\u25B2","x"),ute=Cm("\u25C7","o"),pte=globalThis.process.platform.startsWith("win");function dte({input:e=Em.stdin,output:t=Em.stdout,overwrite:r=!0,hideCursor:n=!0}={}){let i=Gs.createInterface({input:e,output:t,prompt:"",tabSize:1});Gs.emitKeypressEvents(e,i),e.isTTY&&e.setRawMode(!0);let s=(o,{name:a})=>{if(String(o)===""){n&&t.write(os.cursor.show),process.exit(0);return}if(!r)return;Gs.moveCursor(t,a==="return"?0:-1,a==="return"?-1:0,()=>{Gs.clearLine(t,1,()=>{e.once("keypress",s)})})};return n&&t.write(os.cursor.hide),e.once("keypress",s),()=>{e.off("keypress",s),n&&t.write(os.cursor.show),e.isTTY&&!pte&&e.setRawMode(!1),i.terminal=!1,i.close()}}f();async function*Du(e){if(!e)return;let t="",r=e.getReader(),n,i;for(;!n&&({value:i,done:n}=await r.read(),!n);){let s=new TextDecoder().decode(i);t+=s;let o=t.split(`
|
|
1540
|
-
`);for(let a=0;a<o.length-1;a++)yield o[a];t=o[o.length-1]}}var
|
|
1540
|
+
`);for(let a=0;a<o.length-1;a++)yield o[a];t=o[o.length-1]}}var zF=async(e,t)=>{console.log(""),qe((0,Hs.bgCyan)((0,Hs.bold)((0,Hs.white)(" code indexing ")))+" "+(0,Hs.dim)(Ae)),console.error("NOT SUPPORTED YET"),$t("DONE")};f();var U=j(ut(),1);function ei(e){switch(Re("cli help",{subcommand:e}),console.log(""),qe((0,U.bgCyan)((0,U.bold)((0,U.white)(" help ")))+" "+(0,U.dim)(Ae)),e){case"add":case"generate":case"gen":case"g":qe(`${(0,U.cyan)("\u2192")} ${(0,U.bold)("Generate Figma Components")}
|
|
1541
1541
|
|
|
1542
1542
|
${(0,U.bgGreen)((0,U.white)(` npx ${Er()} figma generate URL [URL ...] `))}
|
|
1543
1543
|
|
|
@@ -1673,12 +1673,12 @@ ${(0,U.yellow)("Arguments:")}
|
|
|
1673
1673
|
`),[{command:"generate URL [URL ...]",description:"Start the auto-mapping wizard for Figma Component URLs"},{command:"publish",description:"Publish your Figma Mappings to Builder.io"},{command:"migrate",description:"Migrate existing Figma Mappings into the repo as local files"},{command:"auth",description:"Re-authenticate with Figma and Builder.io"},{command:"code",description:"Generate or modify code based on Figma designs"},{command:"indexing",description:"Index your codebase to improve code generation results"},{command:"index-repo",description:"Index your entire repository to improve code generation results"},{command:"code-server",description:"Start a development server that provides project file information and code analysis"},{command:"launch",description:"Launch a development server"}].forEach(({command:r,description:n})=>{B.info(`${(0,U.cyan)("\u2192")} ${(0,U.bgGreen)((0,U.white)(` npx ${Er()} figma ${r} `))}
|
|
1674
1674
|
${(0,U.dim)(n)}
|
|
1675
1675
|
`)}),B.info(`
|
|
1676
|
-
Use ${(0,U.cyan)(`npx ${Er()} figma help <command>`)} for detailed help about a command`)}$t("bye \u{1F44B}")}var gg=j(require("os"),1);f();f();f();f();function Q0(e){return typeof e=="string"?e:e.map(t=>t.type==="text"?t.text:"").join("")}f();f();f();f();f();f();function as(){}as.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function a(x){return s?(setTimeout(function(){s(void 0,x)},0),!0):x}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var c=r.length,l=t.length,u=1,p=c+l;i.maxEditLength&&(p=Math.min(p,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(m[0],r,t,0);if(m[0].oldPos+1>=l&&g+1>=c)return a([{value:this.join(r),count:r.length}]);var y=-1/0,b=1/0;function v(){for(var x=Math.max(y,-u);x<=Math.min(b,u);x+=2){var w=void 0,S=m[x-1],D=m[x+1];S&&(m[x-1]=void 0);var _=!1;if(D){var O=D.oldPos-x;_=D&&0<=O&&O<c}var P=S&&S.oldPos+1<l;if(!_&&!P){m[x]=void 0;continue}if(!P||_&&S.oldPos+1<D.oldPos?w=o.addToPath(D,!0,void 0,0):w=o.addToPath(S,void 0,!0,1),g=o.extractCommon(w,r,t,x),w.oldPos+1>=l&&g+1>=c)return a(fte(o,w.lastComponent,r,t,o.useLongestToken));m[x]=w,w.oldPos+1>=l&&(b=Math.min(b,x-1)),g+1>=c&&(y=Math.max(y,x+1))}u++}if(s)(function x(){setTimeout(function(){if(u>p||Date.now()>h)return s();v()||x()},0)})();else for(;u<=p&&Date.now()<=h;){var E=v();if(E)return E}},addToPath:function(t,r,n,i){var s=t.lastComponent;return s&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i){for(var s=r.length,o=n.length,a=t.oldPos,c=a-i,l=0;c+1<s&&a+1<o&&this.equals(r[c+1],n[a+1]);)c++,a++,l++;return l&&(t.lastComponent={count:l,previousComponent:t.lastComponent}),t.oldPos=a,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function fte(e,t,r,n,i){for(var s=[],o;t;)s.push(t),o=t.previousComponent,delete t.previousComponent,t=o;s.reverse();for(var a=0,c=s.length,l=0,u=0;a<c;a++){var p=s[a];if(p.removed){if(p.value=e.join(n.slice(u,u+p.count)),u+=p.count,a&&s[a-1].added){var h=s[a-1];s[a-1]=s[a],s[a]=h}}else{if(!p.added&&i){var d=r.slice(l,l+p.count);d=d.map(function(g,y){var b=n[u+y];return b.length>g.length?b:g}),p.value=e.join(d)}else p.value=e.join(r.slice(l,l+p.count));l+=p.count,p.added||(u+=p.count)}}var m=s[c-1];return c>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(s[c-2].value+=m.value,s.pop()),s}var
|
|
1677
|
-
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var i=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function
|
|
1676
|
+
Use ${(0,U.cyan)(`npx ${Er()} figma help <command>`)} for detailed help about a command`)}$t("bye \u{1F44B}")}var gg=j(require("os"),1);f();f();f();f();function Q0(e){return typeof e=="string"?e:e.map(t=>t.type==="text"?t.text:"").join("")}f();f();f();f();f();f();function as(){}as.prototype={diff:function(t,r){var n,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function a(x){return s?(setTimeout(function(){s(void 0,x)},0),!0):x}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var c=r.length,l=t.length,u=1,p=c+l;i.maxEditLength&&(p=Math.min(p,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(m[0],r,t,0);if(m[0].oldPos+1>=l&&g+1>=c)return a([{value:this.join(r),count:r.length}]);var y=-1/0,b=1/0;function v(){for(var x=Math.max(y,-u);x<=Math.min(b,u);x+=2){var w=void 0,S=m[x-1],D=m[x+1];S&&(m[x-1]=void 0);var _=!1;if(D){var O=D.oldPos-x;_=D&&0<=O&&O<c}var P=S&&S.oldPos+1<l;if(!_&&!P){m[x]=void 0;continue}if(!P||_&&S.oldPos+1<D.oldPos?w=o.addToPath(D,!0,void 0,0):w=o.addToPath(S,void 0,!0,1),g=o.extractCommon(w,r,t,x),w.oldPos+1>=l&&g+1>=c)return a(fte(o,w.lastComponent,r,t,o.useLongestToken));m[x]=w,w.oldPos+1>=l&&(b=Math.min(b,x-1)),g+1>=c&&(y=Math.max(y,x+1))}u++}if(s)(function x(){setTimeout(function(){if(u>p||Date.now()>h)return s();v()||x()},0)})();else for(;u<=p&&Date.now()<=h;){var E=v();if(E)return E}},addToPath:function(t,r,n,i){var s=t.lastComponent;return s&&s.added===r&&s.removed===n?{oldPos:t.oldPos+i,lastComponent:{count:s.count+1,added:r,removed:n,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:r,removed:n,previousComponent:s}}},extractCommon:function(t,r,n,i){for(var s=r.length,o=n.length,a=t.oldPos,c=a-i,l=0;c+1<s&&a+1<o&&this.equals(r[c+1],n[a+1]);)c++,a++,l++;return l&&(t.lastComponent={count:l,previousComponent:t.lastComponent}),t.oldPos=a,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function fte(e,t,r,n,i){for(var s=[],o;t;)s.push(t),o=t.previousComponent,delete t.previousComponent,t=o;s.reverse();for(var a=0,c=s.length,l=0,u=0;a<c;a++){var p=s[a];if(p.removed){if(p.value=e.join(n.slice(u,u+p.count)),u+=p.count,a&&s[a-1].added){var h=s[a-1];s[a-1]=s[a],s[a]=h}}else{if(!p.added&&i){var d=r.slice(l,l+p.count);d=d.map(function(g,y){var b=n[u+y];return b.length>g.length?b:g}),p.value=e.join(d)}else p.value=e.join(r.slice(l,l+p.count));l+=p.count,p.added||(u+=p.count)}}var m=s[c-1];return c>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(s[c-2].value+=m.value,s.pop()),s}var vFe=new as;var GF=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,HF=/\S/,KF=new as;KF.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!HF.test(e)&&!HF.test(t)};KF.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&GF.test(t[r])&&GF.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var tw=new as;tw.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1677
|
+
`));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var n=0;n<r.length;n++){var i=r[n];n%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};function VF(e,t,r){return tw.diff(e,t,r)}var mte=new as;mte.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var hte=new as;hte.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Sm(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sm=function(t){return typeof t}:Sm=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sm(e)}var gte=Object.prototype.toString,Tu=new as;Tu.useLongestToken=!0;Tu.tokenize=tw.tokenize;Tu.castInput=function(e){var t=this.options,r=t.undefinedReplacement,n=t.stringifyReplacer,i=n===void 0?function(s,o){return typeof o>"u"?r:o}:n;return typeof e=="string"?e:JSON.stringify(Z0(e,null,null,i),i," ")};Tu.equals=function(e,t){return as.prototype.equals.call(Tu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Z0(e,t,r,n,i){t=t||[],r=r||[],n&&(e=n(i,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return r[s];var o;if(gte.call(e)==="[object Array]"){for(t.push(e),o=new Array(e.length),r.push(o),s=0;s<e.length;s+=1)o[s]=Z0(e[s],t,r,n,i);return t.pop(),r.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),Sm(e)==="object"&&e!==null){t.push(e),o={},r.push(o);var a=[],c;for(c in e)e.hasOwnProperty(c)&&a.push(c);for(a.sort(),s=0;s<a.length;s+=1)c=a[s],o[c]=Z0(e[c],t,r,n,c);t.pop(),r.pop()}else o=e;return o}var ew=new as;ew.tokenize=function(e){return e.slice()};ew.join=ew.removeEmpty=function(e){return e};var fg=j(require("os"),1),_C=require("child_process"),IC=j(require("fs"),1);f();var rw=j(require("path"),1);function yte(e){if(!e||typeof e!="string")return{frontmatter:{description:"",glob:"",type:"agent-mode"},body:""};try{let r=JSON.stringify(e).replace(/\\n/g,`
|
|
1678
1678
|
`).split("---");if(r.length<3)return{frontmatter:{description:"",glob:"",type:"agent-mode"},body:e.trim()};let n=r.map(u=>u.trim()).filter(Boolean);if(n.length<2)return{frontmatter:{description:"",glob:"",type:"agent-mode"},body:""};let i="",s="";n.length>=3?(i=n[1],s=n.slice(2).join(" --- "),s.endsWith('"')&&(s=s.slice(0,-1))):n.length===2&&(i=n[0],s=n[1],s.endsWith('"')&&(s=s.slice(0,-1))),s=s.trim();let o=i.split(`
|
|
1679
|
-
`).filter(u=>u.trim()),a="",c="",l="agent-mode";for(let u of o){let p=u.indexOf(":");if(p===-1)continue;let d=u.substring(0,p).trim(),h=u.substring(p+1).trim();switch(d){case"description":a=h||"";break;case"globs":c=h||"";break;case"alwaysApply":l=h==="true"?"always":"agent-mode";break}}return{frontmatter:{description:a,glob:c,type:l},body:s}}catch{return{frontmatter:{description:"",glob:"",type:"agent-mode"},body:e.trim()}}}function
|
|
1679
|
+
`).filter(u=>u.trim()),a="",c="",l="agent-mode";for(let u of o){let p=u.indexOf(":");if(p===-1)continue;let d=u.substring(0,p).trim(),h=u.substring(p+1).trim();switch(d){case"description":a=h||"";break;case"globs":c=h||"";break;case"alwaysApply":l=h==="true"?"always":"agent-mode";break}}return{frontmatter:{description:a,glob:c,type:l},body:s}}catch{return{frontmatter:{description:"",glob:"",type:"agent-mode"},body:e.trim()}}}function WF(e,t,r){let n=yte(e),i=s=>{let o;t.startsWith("https://")||t.startsWith("http://")?o=rw.default.basename(new URL(t).pathname):o=rw.default.basename(t);let a=o.split(".")[0];return{id:s||`hash-${Date.now()}`,name:a,content:n.body,description:n.frontmatter.description,filePath:t,glob:n.frontmatter.glob,type:n.frontmatter.type}};if(r){let s=r(e);return i(`hash-${s}`)}return i()}f();async function JF(e,t,r,n){try{let i=new URL(`${Kt}/codegen/search`);i.searchParams.set("apiKey",t.builderPublicKey),i.searchParams.set("userId",t.userId),i.searchParams.set("v2","true");let s=await ot(i,{method:"POST",body:JSON.stringify(n),signal:r,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`}});return s.ok?await s.json():(e.Sentry?.captureException(new Error("Failed to search codebase"),{extra:{text:await s.text()}}),null)}catch(i){if(i instanceof Error&&i.name==="AbortError")throw i;return e.Sentry?.captureException(i),null}}var d$=j(require("prettier"),1);f();f();function bte(e){let r="^"+e.replace(/([.+^=!:${}()|[\]\\\/^])/g,"\\$1").replace(/\*/g,".*").replace(/\?/g,".")+"$";return new RegExp(r)}function xte(e){return e.split(/(?:&&|\|\||;|\|)/).map(t=>t.trim()).filter(Boolean)}function Dm(e){return e.map(bte)}function YF(e,t=[],r=[]){if(/`|\$\(/.test(e))return!1;let n=typeof t[0]=="string"?Dm(t):t,i=typeof r[0]=="string"?Dm(r):r;return xte(e).every(o=>i.some(c=>c.test(o))?n.some(c=>c.test(o)):n.length>0?n.some(c=>c.test(o)):!0)}var dg=require("child_process");f();var XF=require("path");function QF(e,t=10){let r={name:"",children:new Map,isFile:!1};e.map(s=>(0,XF.normalize)(s).replace(/\\/g,"/")).filter(s=>s!=="."&&s!=="..").sort().forEach(s=>{let o=r,a=s.split("/").filter(c=>c!==""&&c!=="."&&c!=="..");for(let c=0;c<a.length;c++){let l=a[c],u=c===a.length-1;o.children.has(l)||o.children.set(l,{name:l,children:new Map,isFile:u}),o=o.children.get(l)}});function n(s){let o=s.name,a=s;for(;!a.isFile&&a.children.size===1;){let[c,l]=Array.from(a.children.entries())[0];if(l.isFile)break;o+="/"+c,a=l}return a===s?null:o+"/"}function i(s,o="",a=!0,c=!0){let l="";if(s.name){let u=s.isFile?null:n(s);if(l+=o,l+=a?"\u2514\u2500 ":"\u251C\u2500 ",l+=u||s.name+(s.isFile?"":"/"),l+=`
|
|
1680
1680
|
`,u){let p=s;for(;!p.isFile&&p.children.size===1;){let[d,h]=Array.from(p.children.entries())[0];if(h.isFile)break;p=h}s=p}}if(!s.isFile){let u=Array.from(s.children.entries()),p;if(c)p=u.sort(([g],[y])=>g.localeCompare(y));else{let g=u.filter(([b,v])=>!v.isFile).sort(([b],[v])=>b.localeCompare(v)),y=u.filter(([b,v])=>v.isFile).sort(([b],[v])=>b.localeCompare(v));p=[...g,...y]}let d=p.filter(([g,y])=>y.isFile),h=d.slice(0,t),m=c?p.filter(([g,y])=>!y.isFile||p.indexOf([g,y])<t):[...p.filter(([g,y])=>!y.isFile),...h];if(m.forEach(([g,y],b)=>{let v=o+(s.name?a?" ":"\u2502 ":""),E=b===m.length-1&&(!y.isFile||d.length<=t);l+=i(y,v,E,!1)}),d.length>t){let g=d.length-t,y=o+(s.name?a?" ":"\u2502 ":"");l+=`${y}\u2514\u2500 ... ${g} more file${g===1?"":"s"}
|
|
1681
|
-
`}}return l}return i(r)}f();function
|
|
1681
|
+
`}}return l}return i(r)}f();function ZF(e,t,r){if(r){if(!Array.isArray(r)||r.length!==2)throw new Error(`The provided viewRange must be an array of 2 numbers, like [1, 100], instead it was \`${JSON.stringify(r)}\``);let n=t.split(`
|
|
1682
1682
|
`),i=Math.max(1,r[0]??0)-1,s=r[1]?Math.max(1,r[1]??0)-1:void 0;if(i>n.length)throw new Error(`The file ${e} only contains up to ${n.length} lines. However, the provided viewRange was \`[${r[0]}, ${r[1]}]\``);return n.slice(i,s).join(`
|
|
1683
1683
|
`)}if(t.length>5e4&&!r){let n=t.split(`
|
|
1684
1684
|
`);throw new Error(`The file content of ${e} is too large to view (${n.length} lines).
|
|
@@ -1791,13 +1791,13 @@ ${e.devServerOrchestrator.getCheckpoints(1,"all")}
|
|
|
1791
1791
|
|
|
1792
1792
|
existed with 1 code`:`Dev server currently not running
|
|
1793
1793
|
|
|
1794
|
-
existed with 1 code`,title:"Dev server logs"}}async function Wme({readFile:e,stat:t,listDir:r,files:n},{file_path:i,view_range:s}){let o=`Read path "${i}"`;try{let a=await t(i);if(!a)throw new Error(`File or directory not found: ${i}`);if(a.isFile()){o=`Read file "${i}"`,s&&(o+=` (lines ${s[0]} to ${s[1]})`);let c=await e(i);if(c===null)throw new Error(`File not found: ${i}`);let l=
|
|
1794
|
+
existed with 1 code`,title:"Dev server logs"}}async function Wme({readFile:e,stat:t,listDir:r,files:n},{file_path:i,view_range:s}){let o=`Read path "${i}"`;try{let a=await t(i);if(!a)throw new Error(`File or directory not found: ${i}`);if(a.isFile()){o=`Read file "${i}"`,s&&(o+=` (lines ${s[0]} to ${s[1]})`);let c=await e(i);if(c===null)throw new Error(`File not found: ${i}`);let l=ZF(i,c,s);return n.push({filePath:i,content:c,importance:.1,wasIncluded:!0}),{isError:!1,toolResult:l,title:o}}else if(a.isDirectory()){o=`Listing directory "${i}"`;let c=await r(i);return{isError:!1,toolResult:QF(c,100),title:o}}else throw new Error("Unknown file type")}catch(a){return{isError:!0,toolResult:a instanceof Error?a.message:String(a),title:o}}}async function Jme({listDir:e,workspaceFolders:t,sys:r},{pattern:n}){if(t&&t.length>0){let c=[];for(let l of t){let u=l.name||l.path,p=n.indexOf("/"),d=p!==-1?n.substring(0,p):".";try{let m=(await e(`${u}/${d}`)).filter(g=>{let y=g.substring(u.length+1),b=n.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${b}$`).test(y)});m.length>0&&(c.push(`
|
|
1795
1795
|
## Workspace: ${u}
|
|
1796
1796
|
`),c.push(m.join(`
|
|
1797
1797
|
`)))}catch{continue}}if(c.length>0)return{isError:!1,toolResult:c.join(`
|
|
1798
1798
|
`),title:`Files matching "${n}" across workspaces`}}let i=n.indexOf("/"),s=i!==-1?n.substring(0,i):".";return{isError:!1,toolResult:(await e(s)).filter(c=>{let l=n.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${l}$`).test(c)}).join(`
|
|
1799
1799
|
`),title:`Files matching "${n}"`}}async function n$(e,t,r,n,i){let s=await i$(e),o=["--path-separator","/","--json","--max-columns","200"];return n&&n.split(",").forEach(a=>{o.push("--glob",a)}),i&&i.split(",").forEach(a=>{o.push("--glob",`!${a}`)}),o.push("--",r),new Promise(a=>{let c=(0,dg.spawn)(s,o,{env:process.env,cwd:t,stdio:["ignore","pipe","pipe"]}),l="";c.stdout.on("data",u=>{l+=u.toString()}),c.on("error",()=>{a({matches:[]})}),c.on("close",u=>{if(u!==0)a({matches:[]});else{let p=[],d=l.split(`
|
|
1800
|
-
`);for(let h of d)if(h.trim()){let m=JSON.parse(h);m.type==="match"&&p.push({path:m.data.path.text,lineNumber:m.data.line_number,lineContent:m.data.lines.text})}a({matches:p})}})})}async function i$(e){let{rgPath:t}=await import("@vscode/ripgrep");return e.existsSync(t)?t:"rg"}var Yme=["!**/.git/**","!**/.hg/**","!**/.svn/**","!**/.DS_Store","!**/.idea/**","!**/.vscode/**","!**/.cache/**","!**/coverage/**","!**/node_modules/**","!**/dist/**","!**/build/**","!**/*.tsbuildinfo","!**/package-lock.json","!**/yarn.lock","!**/pnpm-lock.yaml","!**/*.min.js","!**/*.min.css","!**/*.bundle.js","!**/*.chunk.js","!**/builder-registry.*","!**/*.bundle.css","!**/*.map","!**/vendor/**","!**/target/**","!**/__pycache__/**","!**/*.pyc","!**/*.pyo","!**/*.class","!**/*.jar","!**/build/**/*.gradle","!**/*.lock","!**/*.log","!**/*.o","!**/*.a","!**/*.so","!**/*.dylib","!**/*.dll","!**/*.exe","!**/*.zip","!**/*.tar","!**/*.tar.gz","!**/*.tgz","!**/*.7z","!**/*.rar","!**/*.png","!**/*.jpg","!**/*.jpeg","!**/*.gif","!**/*.svg","!**/*.ico","!**/*.webp","!**/*.mp4","!**/*.mp3"];async function Xme({signal:e,workingDirectory:t,bashWorkingDirectory:r,sys:n},i){let s=await i$(n),o=["--path-separator","/","-A","1","-B","1","--heading","--line-number","-i"];Yme.forEach(l=>{o.push("--glob",l)});let a=`Grepping codebase with "${i.query}"`,c="";return i.include_glob&&(c+=` (in: ${i.include_glob})`,i.include_glob.split(",").forEach(l=>{o.push("--glob",l)})),i.exclude_glob&&(c+=` (excluding: ${i.exclude_glob})`,i.exclude_glob.split(",").forEach(l=>{o.push("--glob",`!${l}`)})),a+=c,o.push("--",i.query),Qme(s,o,r,e,i.query,c,a)}async function Qme(e,t,r,n,i,s,o){return new Promise(a=>{let c=new un(500,600),l=(0,dg.spawn)(e,t,{env:process.env,cwd:r,stdio:["ignore","pipe","pipe"],signal:n});l.stdout.on("data",u=>{c.write(u.toString())}),l.stderr.on("data",u=>{c.write(u.toString())}),l.on("error",u=>{a({isError:!0,toolResult:`Failed to start ripgrep process: ${u.message}`,title:o})}),l.on("close",u=>{a(u!==0?{isError:!0,toolResult:`No matches found for pattern: "${i}" ${s||""}`,title:o}:{isError:!1,toolResult:Au(c.getContent(),r),title:o})})})}function Zme(e){return e.includes("npm i")||e==="yarn"||e.includes("pnpm i")}async function ehe({sys:e,signal:t,allowedCommands:r,bashWorkingDirectory:n,emitter:i,devServerOrchestrator:s},{command:o},a){if(o){if(s&&o.includes(s.devCommand))return{isError:!0,toolResult:`Seems like you tried to execute "${s.devCommand}", however "bash" tool is not the right tool to use, use "dev_server_control" tool with {"restart": true} instead.`,title:`Bash command "${o}"`};if(!
|
|
1800
|
+
`);for(let h of d)if(h.trim()){let m=JSON.parse(h);m.type==="match"&&p.push({path:m.data.path.text,lineNumber:m.data.line_number,lineContent:m.data.lines.text})}a({matches:p})}})})}async function i$(e){let{rgPath:t}=await import("@vscode/ripgrep");return e.existsSync(t)?t:"rg"}var Yme=["!**/.git/**","!**/.hg/**","!**/.svn/**","!**/.DS_Store","!**/.idea/**","!**/.vscode/**","!**/.cache/**","!**/coverage/**","!**/node_modules/**","!**/dist/**","!**/build/**","!**/*.tsbuildinfo","!**/package-lock.json","!**/yarn.lock","!**/pnpm-lock.yaml","!**/*.min.js","!**/*.min.css","!**/*.bundle.js","!**/*.chunk.js","!**/builder-registry.*","!**/*.bundle.css","!**/*.map","!**/vendor/**","!**/target/**","!**/__pycache__/**","!**/*.pyc","!**/*.pyo","!**/*.class","!**/*.jar","!**/build/**/*.gradle","!**/*.lock","!**/*.log","!**/*.o","!**/*.a","!**/*.so","!**/*.dylib","!**/*.dll","!**/*.exe","!**/*.zip","!**/*.tar","!**/*.tar.gz","!**/*.tgz","!**/*.7z","!**/*.rar","!**/*.png","!**/*.jpg","!**/*.jpeg","!**/*.gif","!**/*.svg","!**/*.ico","!**/*.webp","!**/*.mp4","!**/*.mp3"];async function Xme({signal:e,workingDirectory:t,bashWorkingDirectory:r,sys:n},i){let s=await i$(n),o=["--path-separator","/","-A","1","-B","1","--heading","--line-number","-i"];Yme.forEach(l=>{o.push("--glob",l)});let a=`Grepping codebase with "${i.query}"`,c="";return i.include_glob&&(c+=` (in: ${i.include_glob})`,i.include_glob.split(",").forEach(l=>{o.push("--glob",l)})),i.exclude_glob&&(c+=` (excluding: ${i.exclude_glob})`,i.exclude_glob.split(",").forEach(l=>{o.push("--glob",`!${l}`)})),a+=c,o.push("--",i.query),Qme(s,o,r,e,i.query,c,a)}async function Qme(e,t,r,n,i,s,o){return new Promise(a=>{let c=new un(500,600),l=(0,dg.spawn)(e,t,{env:process.env,cwd:r,stdio:["ignore","pipe","pipe"],signal:n});l.stdout.on("data",u=>{c.write(u.toString())}),l.stderr.on("data",u=>{c.write(u.toString())}),l.on("error",u=>{a({isError:!0,toolResult:`Failed to start ripgrep process: ${u.message}`,title:o})}),l.on("close",u=>{a(u!==0?{isError:!0,toolResult:`No matches found for pattern: "${i}" ${s||""}`,title:o}:{isError:!1,toolResult:Au(c.getContent(),r),title:o})})})}function Zme(e){return e.includes("npm i")||e==="yarn"||e.includes("pnpm i")}async function ehe({sys:e,signal:t,allowedCommands:r,bashWorkingDirectory:n,emitter:i,devServerOrchestrator:s},{command:o},a){if(o){if(s&&o.includes(s.devCommand))return{isError:!0,toolResult:`Seems like you tried to execute "${s.devCommand}", however "bash" tool is not the right tool to use, use "dev_server_control" tool with {"restart": true} instead.`,title:`Bash command "${o}"`};if(!YF(o,r))return{isError:!0,toolResult:`Command "${o}" is not allowed.`,title:`Bash command "${o}"`};let l=await new Promise(u=>{let p=process.env.SHELL||process.env.COMSPEC||"/bin/sh",d=(0,dg.spawn)(p,[...Pu(o,p)],{stdio:["ignore","pipe","pipe"],cwd:n,env:{...process.env,NO_COLOR:"1",FORCE_COLOR:"0",NPM_CONFIG_PROGRESS:"false",TERM:"dumb",CI:"true"}}),h=new un(1e3);t?.addEventListener("abort",async()=>{$p(e,d,t),u({isError:!0,toolResult:`Command aborted by the user. Stdout so far:
|
|
1801
1801
|
|
|
1802
1802
|
${Au(h.getContent().slice(0,5e3),n)}`,title:`Bash command "${o}"`})}),d.stdout.on("data",m=>{let g=m.toString();h.write(g),i.emit("step",{type:"stdio",id:a,command:o,stream:"stdout",source:"tool-command",content:g})}),d.stderr.on("data",m=>{let g=m.toString();h.write(g),i.emit("step",{type:"stdio",id:a,command:o,stream:"stderr",source:"tool-command",content:g})}),d.on("error",m=>{u({isError:!0,toolResult:Au(h.getContent().slice(0,5e3),n)+`
|
|
1803
1803
|
`+String(m),title:`Bash command "${o}"`})}),d.on("exit",m=>{let g=Au(h.getContent().slice(0,5e3),n),y=m!==0;y&&(g+=`
|
|
@@ -1835,11 +1835,11 @@ ${i}
|
|
|
1835
1835
|
${s}`}:{code:0,logs:`${i}
|
|
1836
1836
|
${s}`})})}):null}setDebug(t){this.#i=t}async getAllFiles(){if(!this.#n?.folders?.length)return gc(this.#s,void 0,a$(this.#l?.accessControl));let t=[],r=await this.#e.readdir(this.#s);for(let n of r)u$(n)&&t.push(n);r.includes("AGENTS.md")&&this.#n.agentsMD&&t.push("AGENTS.md");for(let n of this.#n.folders){let i=this.#e.resolve(this.#s,n.path),s=await gc(i),o=this.#N()?".":n.name||this.#e.basename(i);for(let a of s)o!=="."?t.push(this.#e.join(o,a)):t.push(a)}return t}getSessionId(){return this.getSessionContext().sessionId}getSpaceId(){return this.#a.builderPublicKey}async restore({location:t,predicate:r,dryRun:n=!1,forceReplay:i=!1}){let s=this.getSessionContext(),o=s.turns.length,a=null;for(let d=o-1;d>=-1;d--)if(r(d>=0?s.turns[d]:null,d)){a=d;break}if(a===null)return null;await this.abort();let c=new Map,l=!!this.#t?.git,u=s.turns,p=Math.max(0,t==="before"?a:a+1);for(let d=u.length-1;d>=p;d--){let h=u[d];for(let m of h.applyResults)c.set(m.filePath,m.oldContent??"")}if(!n){let d;if(l){if(a===-1?s.beforeCommit?d=s.beforeCommit:u.length>0&&(d=u[0].beforeCommit):a<u.length&&(t==="after"?(d=u[a].afterCommit,!d&&a+1<u.length&&(d=u[a+1].beforeCommit)):d=u[a].beforeCommit),!d)return[];await this.runGitCommand(`git reset --quiet --hard ${d}`)}else for(let[y,b]of c.entries())try{b?await this.writeFile(y,b):await this.deleteFile(y)}catch{}let h=u.splice(p,u.length-p);this.#i&&console.log("Remaining turns",u);let g=u[u.length-1]?.completionId;if(h.length>0&&(await l$(this.#e,this.#a,{lastCompletionId:g,sessionId:s.sessionId},!!this.#i),s.updatedUnixTime=Date.now()),i){let y=s.state;this.#r.emit("step",{type:"batch",steps:[{type:"state",newState:"replay",abortable:!1,previousState:y},...this.#z(),{type:"restore",files:Array.from(c.keys()),lastCompletionId:g,location:t},{type:"state",newState:y,abortable:!1,previousState:"replay"}]})}else h.length>0&&this.#r.emit("step",{type:"restore",files:Array.from(c.keys()),lastCompletionId:g,location:t})}return await this.#q(),Array.from(c.keys())}async#q(t){return await this.#t?.devServerOrchestrator?.ensureDevCommand(t)}async restoreHEAD(){return this.restore({location:"after",predicate:()=>!0})}async restoreAll(){return this.restore({location:"before",predicate:(t,r)=>r===-1})}async restoreFromCompletionId({location:t,completionId:r,forceReplay:n}){let i=this.getSessionContext();return i.turns.find(o=>o.completionId===r)?this.restore({location:t,predicate:o=>o?.completionId===r,forceReplay:n}):(await this.#v,i.turns=[],i.canLoadMore=!0,await l$(this.#e,this.#a,{sessionId:i.sessionId,lastCompletionId:r},!!this.#i),await this.loadMoreTurns(),this.restore({location:t,predicate:()=>!0,forceReplay:!0}))}async restoreBeforeCompletionId(t){return this.restoreFromCompletionId({location:"before",completionId:t,forceReplay:!1})}async undoLastUserMessage(t=!1){return this.restore({location:"before",predicate:r=>r?.user.role==="user",dryRun:t})}getLastCompletionId(){let t=this.getSessionContext();return TC(t)?.completionId}getCurrentState(){return this.getSessionContext().state}getLastApplyResultsTurn(){let t=this.getSessionContext();return rhe(t)}getLastTurn(){let t=this.getSessionContext();return TC(t)}getNextUrl(){let t=this.getSessionContext();return TC(t)?.nextUrl}getNextMessage(){let t=new Promise(r=>{this.#u?r():this.#d=r}).then(()=>{let r=this.#u;if(r)return!r.dropAbortedPrompt&&this.#f&&(r=che(this.#f,r)),this.#u=void 0,this.#f=r,r});return{shouldWait:!this.#u,promise:t}}async sendFeedback(t){if(process.env.NODE_ENV==="test")return;Re("quality code feedback given",{spaceId:this.#a.builderPublicKey,sentiment:t.feedbackSentiment,mode:"cli"});let r=t.id??this.getLastCompletionId();r&&await c$(this.#e,this.#a,{...t,id:r},!!this.#i)}async lastTurnHasChanges(){let t=await this.undoLastUserMessage(!0);return t?t.length>0:!1}#x(t){let r=this.getSessionContext(),n=r.state;n!==t&&(r.state=t,this.#r.emit("step",{type:"state",abortable:t==="generating",previousState:n,newState:t}))}clearSession(){let t=this.getSessionContext();t.turns=[]}async sendMessage(t,r=!0){r&&await this.abort(!1),this.#u=t,this.#d&&this.#d()}getTurns(){let t=this.getSessionContext();return structuredClone(t.turns)}getSessionContext(){if(!this.#c)throw new Error("Session context not initialized");return this.#c}async runSetupCommand(){return await this.#t?.devServerOrchestrator?.runSetupCommand()}abortSetupCommand(){this.#t?.devServerOrchestrator?.abortSetupCommand()}async abort(t=!0){if(t&&(this.#f=void 0),this.#p){if(this.#p.abort(),this.#p=void 0,this.#H()){let r=this.getNetLinesChanged();await this.sendFeedback({acceptedLines:r})}return!0}return!1}async stopEventLoop(){await this.abort(),this.#m?.abort(),this.#m=void 0,this.#d&&this.#d()}requestRefresh(){this.#r.emit("step",{type:"builder-action",action:"refresh",metadata:{}})}async close(){B.warn("Closing code session"),await this.stopEventLoop(),this.#L.forEach(t=>t()),this.#r.removeAllListeners()}async emitGitStatus(){let t=await this.#Z();return t&&(this.#C=t,this.#r.emit("step",t)),t}async manualCommit(t){await this.runGitCommand(`git add ${t.add}`),await this.runGitCommand(`git commit --quiet --no-verify -m ${JSON.stringify(t.commitMessage)}`),await this.emitGitStatus()}async#k(){let t=this.getSessionContext(),r,n=await this.#J();if(n){let i=!this.#u&&the.includes(t.state);r=this.#S={actionButtonText:"Try to fix",type:"build-error",level:"error",canAutoApply:i,healthStatus:n,message:n.message,userMessage:{userPrompt:n.prompt,skipSearch:!0,displayPrompt:"The app seems to be in a broken state, please fix and debug."}}}return t.state!=="generating"?(this.#r.emit("step",{type:"wait-for-input",state:t.state,suggestion:r}),!0):!1}async#Z(){if(!this.#t?.git)return null;this.#D++;let t=this.#H(),r=await this.#I(),n=!1,i="",s=null;try{let u=await this.runGitCommand("git rev-parse --absolute-git-dir");s=this.#e.join(u,"FETCH_HEAD"),IC.default.existsSync(s)&&IC.default.unlinkSync(s)}catch(u){this.#e.Sentry?.captureException(u,{extra:{fetchHeadFilePath:s,isCheckingGitStatus:this.#D}}),s=null}try{i=await this.runGitCommand(`git fetch --no-tags origin ${r}`),n=!0}catch{n=!1}let o=await this.#e.getRepoInfo(this.#o),a=t?1:0,c=0;if(n)try{let u=uhe(await this.runGitCommand("git rev-list --left-right --count HEAD...FETCH_HEAD"));a=u.ahead,c=u.behind}catch(u){let p=null;if(s)try{p=await this.#e.readFile(this.#e.join(this.#o,".git/FETCH_HEAD")),p=`FETCH_HEAD: ${p}`}catch(d){p=`FETCH_HEAD FAILED: ${String(d)}`}else p="FETCH_HEAD MISSING";this.#e.Sentry?.captureException(u,{extra:{fetchOutput:i,fetchHead:p,remoteBranch:r,currentBranch:o.currentBranch,currentCommit:o.commit,isCheckingGitStatus:this.#D}})}let l=this.getSessionContext().beforeCommit;return this.#D--,{type:"git",remoteBranchExists:n,isSessionDirty:t||!!l&&l!==o.commit,canSync:a>0||c>0,canPush:a>0,canPull:c>0,ahead:a,behind:c,currentCommit:o.commit,currentBranch:o.currentBranch,remoteBranch:r}}#z(){let t=this.getSessionContext(),r=t.turns,n=[];n.push({type:"session",title:t.title,beforeCommit:t.beforeCommit,createdUnixTime:t.createdUnixTime,updatedUnixTime:t.updatedUnixTime,turns:t.turns.length,id:t.sessionId});for(let i of r){n.push({type:"user",displayPrompt:i.userMessage?i.userMessage.displayPrompt??i.userMessage.userPrompt:void 0,attachments:i.userMessage?.attachments,id:i.completionId,user:i.user,role:i.user.role});for(let s of i.actions)(s.type==="file"||s.type==="diff"||s.type==="text"||s.type==="thinking")&&(n.push({type:"start",name:s.type,content:"",id:s.id??"",filePath:s.filePath??"",title:s.actionTitle??s.artifactTitle??""}),n.push({type:"delta",name:s.type,delta:s.content}),s.type==="file"?n.push({type:s.type,id:i.completionId,filePath:s.filePath??"",content:s.content,title:s.actionTitle??s.artifactTitle??"Created"}):s.type==="diff"?n.push({type:"diff",id:i.completionId,filePath:s.filePath??"",content:s.content,title:s.actionTitle??s.artifactTitle??"Updated"}):s.type==="thinking"?n.push({type:"planning",content:s.content}):s.type==="text"&&n.push({type:"text",content:s.content}))}return n}connectToEventLoop(t,r){if(t){let n=[],i=this.getSessionContext();if(n.push({type:"state",newState:"replay",abortable:!1,previousState:i.state}),this.#A&&n.push(this.#A),this.#C&&n.push(this.#C),n.push(...this.#z()),this.#b){let o=this.#b[this.#b.length-1];switch(o.type){case"file":case"diff":case"text":case"thinking":case"suggestion":case"tool":n.push({type:"start",id:o.id,name:o.type,title:o.actionTitle??o.artifactTitle??"",content:""}),n.push({type:"delta",name:o.type,delta:o.content});break}}let s=this.#t?.devServerOrchestrator;s?(n.push({type:"dev-server",devServerState:s.devState,setupState:s.setupState,httpServerState:s.httpServerState}),s.setupState!=="installed"&&n.push({type:"stdio",id:"setupCommand",command:s.setupCommand??"",content:s.getSetupOutput(),source:"run-command",stream:"stdout"}),n.push({type:"stdio",id:"devServer",command:s.devCommand,content:s.getOutput(),source:"run-command",stream:"stdout"})):r({type:"dev-server",devServerState:"running",setupState:"installed",httpServerState:"ok-2xx"}),n.push({type:"state",newState:i.state,abortable:i.state==="generating",previousState:"replay"}),this.#g&&i.state!=="generating"&&n.push({type:"wait-for-input",state:i.state,suggestion:this.#S}),r({type:"batch",steps:n})}return this.#r.on("step",r),this.waitForEventLoop(),()=>{this.#r.off("step",r)}}waitUntilIdle(){return this.waitForEventLoop(),(0,mg.once)(this.#r,"idle").then(()=>{})}waitForEventLoop(){return this.#g?this.#g:this.#g=this.#ee()}async#ee(){if(this.#g||this.#m)throw new Error("Event loop already started");let t=lhe(),r=o=>{this.#r.emit("step",o)};this.#m=new AbortController;let n=this.#m.signal,i=this.#t?.devServerOrchestrator,s=this.getSessionContext();this.#e.Sentry?.setContext("codeGen",{sessionId:s.sessionId}),await this.emitGitStatus(),i?.setupState==="not-installed"&&this.runSetupCommand();try{for(;!n.aborted;){this.#p=void 0;let o=this.getNextMessage();o.shouldWait&&await this.#k()&&this.#r.emit("idle");let a=await o.promise;if(n.aborted)break;if(a){try{this.#S=void 0,a.logsCheckpoint&&i?.addCheckpoint(),this.#p=new AbortController;let c=pg([n,this.#p.signal]);if(c?.aborted)throw no();this.#x("generating"),await this.#G(a,c,r),this.#x("success"),this.#S=void 0}catch(c){c instanceof Error?c.name==="AbortError"?(r({type:"user-abort"}),this.#x("abort")):(this.#f=void 0,r({type:"error",code:"cli-genetic-error",message:c.message,metadata:{error:c}}),this.#e.Sentry?.captureException(c),this.#x("error")):this.#x("error")}this.#K++}}}catch(o){throw this.#e.Sentry?.captureException(o,{level:"fatal"}),o}finally{this.#m=void 0,this.#g=void 0,t()}this.#x("close")}async agentCompletion(t,r,n){if(this.#i){let i=n;n=s=>{s.type!=="delta"&&B.info(`Event: ${JSON.stringify(s,void 0,2)}`),i(s)}}return this.#G(t,r,n)}async#G(t,r,n){let i=this.getSessionContext(),s=0;for(;;){if(r?.aborted)throw no();try{let o=await this.#re(s===0?t:void 0,r,n);if(o.role==="user"){let c=o.files.filter(l=>(l.importance??0)>2.5&&l.content).map(l=>({filePath:l.filePath,size:l.content?.length??0,isCustomInstruction:!1,wasIncluded:l.wasIncluded}));i.customInstructions.forEach(l=>{l.filePath&&c.push({filePath:l.filePath,size:l.content?.length??0,isCustomInstruction:!0,wasIncluded:!0})}),n({type:"user-input",prompt:o.userPrompt,files:c})}else n({type:"agent-input",toolResults:o.toolResults});let a=await this.#te(i,o,r,n);if(this.#f=void 0,await this.#q(),!a)break}finally{nhe(i.turns),s++}}}async#te(t,r,n,i){if(this.#b)throw new Error("generateCompletion already started");let s=this.getLastTurn()?.nextUrl??this.#T;i({type:"start",id:"",name:"thinking",title:"Thinking",content:""});try{let o=this.#b=[],a=await this.getCurrentCommitHash();!t.beforeCommit&&a&&(t.beforeCommit=a);let c=[...this.#j??[],"view_path","get_rule","get_style_inspiration","bash","grep_search","web_search","find_media"];this.#t?.devServerOrchestrator&&c.push("dev_server_control");let l={url:s,position:this.#F,eventName:"cli code",maxPages:2,autoContinue:1,codeGenMode:this.#E,userContext:t.userContext,files:r.files,mcpServers:this.#U,maxTokens:this.#$,aclPolicy:this.#l?.accessControl,attachments:r.attachments,customInstructions:t.customInstructions,sessionId:t.sessionId,userPrompt:r.userPrompt,ephemeralUserPrompt:r.userMessage?.ephemeralUserPrompt,displayUserPrompt:r.userMessage?.displayPrompt,prettierConfig:t.prettierConfig??void 0,diffActions:!0,pingEvents:!0,workingDirectory:this.#s,beforeCommit:a,toolResults:r.toolResults,role:r.role,user:r.userMessage?.user,enabledTools:c,conclusionText:!0,searchResponse:r.searchResponse},u=ihe(this.#e,this.#a,l,this.#i,n),p;for await(let d of u){let h=async y=>{if(y.type==="user"){let b=p={state:"running",unixTime:Date.now(),title:"",sentiment:void 0,userMessage:r.userMessage,afterCommit:a,beforeCommit:a,creditsUsed:0,actions:[],applyResults:[],completionId:y.id??"",nextUrl:void 0,user:y.user};p=b,t.turns.push(b),i({type:"user",displayPrompt:y.displayPrompt,id:y.id,user:y.user,role:y.user.role})}else if(y.type==="mcp-status")this.#A=y,i(y);else if(y.type==="error")i(y);else if(y.type==="done"){let b=p=await this.#ne(t,y,p,a);b.applyResults.length>0&&this.#t?.devServerOrchestrator?.addCheckpoint();let v=await this.#ie(this.#e,b),E=await this.commitWorkInProgress(b);E&&(v=!0,b.afterCommit=E,a=E),c$(this.#e,this.#a,{id:b.completionId,beforeCommit:b.beforeCommit,afterCommit:b.afterCommit},this.#i),i({type:"done",stopReason:y.stopReason,id:y.id,applyResults:b.applyResults,actions:y.actions??[],usage:y.usage,url:y.nextUrl,hasChanges:v})}else{if(y.type==="continue")return i({type:"continue",id:y.id,url:y.nextUrl}),!0;y.type==="thinking"&&(y.actionTitle="Planning"),"content"in y&&y.type!=="delta"&&i({type:"start",name:y.type,id:"id"in y?y.id:void 0,title:y.actionTitle??y.artifactTitle??y.filePath??"",content:y.content})}return!1},m=async y=>{y.type==="user"&&i({type:"user",displayPrompt:y.displayPrompt,id:y.id,role:y.user.role,user:y.user}),y.type==="thinking"&&i({type:"planning",content:y.content}),y.type==="server_tool_result"&&i({type:"server_tool_result",content:JSON.parse(y.content),title:y.actionTitle??y.artifactTitle??"Server Tool Result",id:y.id}),y.type==="file"&&y.filePath&&!y.synthetic&&i({type:"file",filePath:y.filePath,content:y.content,title:y.actionTitle??y.artifactTitle??"Created",id:y.id}),y.type==="diff"&&y.filePath&&!y.synthetic&&i({type:"diff",filePath:y.filePath,title:y.actionTitle??y.artifactTitle??"Updated",content:y.content,id:y.id}),y.type==="tool"&&y.filePath?i({type:"tool",name:y.filePath,id:y.id,content:y.content}):y.type==="text"&&i({type:"text",content:y.content})},g=async(y,b)=>{i({type:"delta",name:y.type,delta:b})};if(d.type!=="ping")if(d.type==="delta"){let y=d.content,b=AC(o);b&&"content"in b&&(b.content+=y,await g(b,y))}else{let y=AC(o);if(y&&"content"in y&&(y.incomplete=!1,await m(y)),o.push(d),await h(d))break}}return p?p.actions.some(d=>d.type==="tool"):!1}finally{this.#b=void 0}}async commitWorkInProgress(t){if(this.#t?.git){if(await this.isCleanWorkTree())return;try{await this.runGitCommand("git add .");let n=`${t.title}
|
|
1837
1837
|
${t.completionId}`.split(`
|
|
1838
|
-
`).map(s=>`-m ${JSON.stringify(s)}`).join(" ");await this.runGitCommand(`git commit --allow-empty --quiet --no-verify ${n}`);let i=await this.getCurrentCommitHash();return await this.emitGitStatus(),i}catch(r){console.error("Error in Fusion commit process:",r),this.#e.Sentry?.captureException(r)}}}async#re(t,r,n){let i=this.getSessionContext(),s=AC(i.turns),o=s?.actions.filter(d=>d.type==="tool").map(d=>{let h=d.content.trim();return{id:d.id,name:d.filePath,input:h?JSON.parse(h):{}}})??[],a={userMessage:t,userPrompt:t?.userPrompt??"",files:[],attachments:[],searchResponse:null,rerankFiles:0,mostRelevantFile:null,toolResults:[],role:t?.user?.role??"agent"},c=!!this.getLastTurn()?.nextUrl,l=i.turns.length<2||!c,u=null;if(t){if(l){let E=function(w){return b&&u$(w)?5:m.has(w)||v.some(S=>w.toLowerCase().startsWith(S.toLowerCase()))?2:0};var p=E;let d=
|
|
1839
|
-
`).length,content:"",oldContent:u});else{let p=
|
|
1840
|
-
`).length,removedLines:0,content:a.content,oldContent:""})}}return o}#H(){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 isCleanWorkTree(){try{return(await this.runGitCommand("git status --porcelain=v1 -z --ignore-submodules=dirty")).trim().length===0}catch{return!1}}async#ie(t,r){let n=!1,i=r.applyResults;for(let s of i)try{if(s.action==="delete")await this.deleteFile(s.filePath)&&(n=!0);else if(s.content){let{resolvedPath:o}=this.resolveWorkspacePath(s.filePath,!0),a=await Zr(this.#s,s.content,void 0,o);await this.writeFile(s.filePath,a)&&(n=!0)}}catch(o){t.Sentry?.captureException(o)}return n}#se(){return this.#n?.folders?.length===1&&this.#n.folders[0].name==="."}#N(){return this.#n?.folders?.length===1}resolveWorkspacePath(t,r){return o$({filePath:t,forceWorkspace:r,workspace:this.#n,workingDirectory:this.#s,sys:this.#e,canCollapseWorkspace:this.#N()})}async readFile(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return this.#n.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n))return await this.#e.readFile(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n))return await this.#e.readFile(n)}catch(n){this.#e.Sentry?.captureException(n)}return null}async fileExists(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return!0;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n)||({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n)))return!0}catch(n){this.#e.Sentry?.captureException(n)}return!1}readFileSync(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return this.#n.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(this.#e.existsSync(n))return this.#e.readFileSync(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),this.#e.existsSync(n))return this.#e.readFileSync(n)}catch(n){this.#e.Sentry?.captureException(n)}return null}async writeFile(t,r){let n=io(t,"write",this.#l?.accessControl);if(!n.allowed)throw new Error(`ACL denied: ${n.message}`);try{let{resolvedPath:i}=this.resolveWorkspacePath(t,!0);return await this.#e.writeFile(i,r),!0}catch(i){return this.#e.Sentry?.captureException(i),!1}}async listDir(t){let r=io(t,"list",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n,workspaceFolder:i}=this.resolveWorkspacePath(t,!0);if(!await this.#e.exists(n))return[];let s=await this.#e.readdir(n);if(this.#se())return s.map(o=>this.#e.join(t,o).replace(/^\.\//,""));if(i&&this.#n?.folders){let o=i.name||i.path;return s.map(a=>`${o}/${this.#e.join(t,a).replace(/^\.\//,"")}`)}return s}catch(n){return this.#e.Sentry?.captureException(n),[]}}async stat(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n))return await this.#e.stat(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n))return await this.#e.stat(n)}catch(n){this.#e.Sentry?.captureException(n)}return null}async deleteFile(t){let r=io(t,"write",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!0);return await this.#e.exists(n)?(await this.#e.unlink(n),!0):!1}catch(n){return this.#e.Sentry?.captureException(n),!1}}getNetLinesChanged(){return this.#c?.turns.reduce((t,r)=>t+r.applyResults.reduce((n,i)=>n+i.addedLines-i.removedLines,0),0)??0}};function TC(e){for(let t=e.turns.length-1;t>=0;t--){let r=e.turns[t];if(r.nextUrl)return r}}function rhe(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 AC(e){return e[e.length-1]}function nhe(e){for(let t=e.length-1;t>=0;t--)e[t].state!=="done"&&e.splice(t,1)}async function*ihe(e,t,r,n,i){if(!t.builderPrivateKey)throw new Error("Missing builder public key during completion stream");let s=JSON.stringify(r),o=new URL(`${Kt}/codegen/completion`);t.builderPublicKey&&o.searchParams.set("apiKey",t.builderPublicKey),t.userId&&o.searchParams.set("userId",t.userId),n&&console.log("FETCH",o,s);let a=performance.now(),c=a,l=!1;try{let u=await ot(o,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`},signal:i});if(!u.ok){if(u.status===402){yield await u.json();return}let d=new Error("codegen/codegen status error");throw d.httpText=await u.text(),d}let p=Du(u.body);for await(let d of p)if(c=performance.now(),d.length!==0)try{let h=JSON.parse(d);l=!0,yield h}catch(h){e.Sentry?.captureException(h,{extra:{value:d}})}}catch(u){if(u instanceof Error&&u.name==="AbortError")throw u;let p=new Error("codegen/completion endpoint error",{cause:u}),d=performance.now();throw e.Sentry?.captureException(p,{extra:{didStream:l,lastMessageElapsed:d-c,totalElapsed:d-a}}),p}}async function c$(e,t,r,n){try{let i=JSON.stringify(r),s=new URL(`${Kt}/codegen/feedback`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),n&&console.log("FETCH",s,i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`),await ot(s,{method:"POST",body:i,keepalive:!0,headers:o})}catch(i){e.Sentry?.captureException(i)}}async function l$(e,t,r,n){try{let i=JSON.stringify(r),s=new URL(`${Kt}/codegen/sessions/set-last-completion`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),n&&console.log("FETCH",s,i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`),await ot(s,{method:"POST",body:i,keepalive:!0,headers:o})}catch(i){e.Sentry?.captureException(i)}}async function PC(e,t,r,n,i){try{let s=new URL(`${Kt}/codegen/sessions/${r}/turns`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),s.searchParams.set("linear",String(n)),i&&s.searchParams.set("completionIdCursor",i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`);let a=await ot(s,{method:"GET",headers:o,keepalive:!0});if(!a.ok)throw new Error("Failed to get turns");return await a.json()}catch(s){return e.Sentry?.captureException(s),{turns:[],sessionId:r,initialUrl:void 0,beforeCommit:void 0,title:void 0,createdUnixTime:void 0,updatedUnixTime:void 0,allIds:[],lastCompletionId:void 0,canLoadMore:!1}}}async function she(e,t){let r=[];async function n(s){try{let o=e.resolve(t,s);if(await e.exists(o)){let a=await e.readFile(o);if(a){let c=await
|
|
1838
|
+
`).map(s=>`-m ${JSON.stringify(s)}`).join(" ");await this.runGitCommand(`git commit --allow-empty --quiet --no-verify ${n}`);let i=await this.getCurrentCommitHash();return await this.emitGitStatus(),i}catch(r){console.error("Error in Fusion commit process:",r),this.#e.Sentry?.captureException(r)}}}async#re(t,r,n){let i=this.getSessionContext(),s=AC(i.turns),o=s?.actions.filter(d=>d.type==="tool").map(d=>{let h=d.content.trim();return{id:d.id,name:d.filePath,input:h?JSON.parse(h):{}}})??[],a={userMessage:t,userPrompt:t?.userPrompt??"",files:[],attachments:[],searchResponse:null,rerankFiles:0,mostRelevantFile:null,toolResults:[],role:t?.user?.role??"agent"},c=!!this.getLastTurn()?.nextUrl,l=i.turns.length<2||!c,u=null;if(t){if(l){let E=function(w){return b&&u$(w)?5:m.has(w)||v.some(S=>w.toLowerCase().startsWith(S.toLowerCase()))?2:0};var p=E;let d=jF(await this.getAllFiles()),h=new Set,m=new Set,g=i.sessionId;if(!(t.skipSearch??this.#E==="quality-v3")&&o.length===0){n({type:"start",title:"Searching codebase",id:"",content:"",name:"search"});let w=await this.#e.getRepoInfo(this.#o),S=await Un(this.#e,this.#o);if(r?.aborted)throw no();if(u=await JF(this.#e,this.#a,r,{query:t.userPrompt,selectedFiles:t.files,repoInfo:w,limit:10,files:d.slice(0,300),packageJson:S?JSON.stringify(S):void 0,sessionId:g}),r?.aborted)throw no();if(this.#i&&B.info(`Search Codebase results: ${JSON.stringify(u,void 0,2)}`),u){for(let D of u.relevantPaths)h.add(Up(D));for(let D of u.ranked)h.add(Up(D.filePath));if(this.#E==="quality"){let D=0;for(let _ of u.grepQueries){let O=await n$(this.#e,this.#s,_);for(let P of O.matches)D===0?h.add(Up(P.path)):m.add(Up(P.path));D++}}}}if(t.files)for(let w of t.files)h.add(Up(w));let b=t.includeBaseFiles??i.turns.length===0,v=Array.from(h),x=r?.aborted?[]:d.map(w=>{let S=E(w);if(S===0)return{filePath:w};let D=null;try{if(D=this.readFileSync(w),!D)return{filePath:w}}catch{return{filePath:w}}let _=D.length<3e4;return{filePath:w,content:D,importance:_?S:2}});a.files=x}a.role="user",a.attachments=t.attachments??[],a.searchResponse=u,a.rerankFiles=0,a.mostRelevantFile=null,a.toolResults=[]}if(o.length>0){let d,h={sys:this.#e,files:a.files,signal:r,emitter:this.#r,workingDirectory:this.#s,bashWorkingDirectory:this.#_,workspaceFolders:this.#n?.folders??[],patchFusionConfig:m=>{d||(d={});let g=d.envVariables;Object.assign(d,m),d.envVariables={...g,...m.envVariables}},readFile:m=>this.readFile(m),writeFile:(m,g)=>this.writeFile(m,g),deleteFile:m=>this.deleteFile(m),fileExists:m=>this.fileExists(m),listDir:m=>this.listDir(m),stat:m=>this.stat(m),resolveWorkspacePath:(m,g)=>this.resolveWorkspacePath(m,g),...this.#t};if(r?.aborted)throw no();if(s){s.state="running";let m=await r$(h,o);d&&this.#r.emit("step",{type:"fusion-config-patch",patch:d}),s.state="done",a.files=h.files,a.toolResults=m}}return a}async#ne(t,r,n,i){let{actions:s}=r,o=n||{state:"done",unixTime:r.unixTime??Date.now(),title:r.actionTitle,user:{source:"agent",role:"agent"},completionId:r.id??"",creditsUsed:r.creditsUsed??0,nextUrl:r.nextUrl,applyResults:[],actions:s??[],userMessage:void 0,beforeCommit:i,afterCommit:i,sentiment:void 0};if(o.state="done",o.title=r.actionTitle??"",o.creditsUsed=r.creditsUsed??0,o.nextUrl=r.nextUrl,o.actions=s??[],n||t.turns.push(o),Array.isArray(s))for(let a of s){let c=a.filePath;if(a.type==="file"&&c&&!a.incomplete){let u=await this.fileExists(c)?this.readFileSync(c):null;if(u)if(a.content.trim()==="")o.applyResults.push({action:"delete",filePath:c,addedLines:0,removedLines:u.split(`
|
|
1839
|
+
`).length,content:"",oldContent:u});else{let p=VF(u,a.content);o.applyResults.push({action:"update",filePath:c,addedLines:p.filter(d=>d.added).reduce((d,h)=>d+(h.count??0),0),removedLines:p.filter(d=>d.removed).reduce((d,h)=>d+(h.count??0),0),content:a.content,oldContent:u})}else o.applyResults.push({action:"create",filePath:c,addedLines:a.content.split(`
|
|
1840
|
+
`).length,removedLines:0,content:a.content,oldContent:""})}}return o}#H(){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 isCleanWorkTree(){try{return(await this.runGitCommand("git status --porcelain=v1 -z --ignore-submodules=dirty")).trim().length===0}catch{return!1}}async#ie(t,r){let n=!1,i=r.applyResults;for(let s of i)try{if(s.action==="delete")await this.deleteFile(s.filePath)&&(n=!0);else if(s.content){let{resolvedPath:o}=this.resolveWorkspacePath(s.filePath,!0),a=await Zr(this.#s,s.content,void 0,o);await this.writeFile(s.filePath,a)&&(n=!0)}}catch(o){t.Sentry?.captureException(o)}return n}#se(){return this.#n?.folders?.length===1&&this.#n.folders[0].name==="."}#N(){return this.#n?.folders?.length===1}resolveWorkspacePath(t,r){return o$({filePath:t,forceWorkspace:r,workspace:this.#n,workingDirectory:this.#s,sys:this.#e,canCollapseWorkspace:this.#N()})}async readFile(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return this.#n.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n))return await this.#e.readFile(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n))return await this.#e.readFile(n)}catch(n){this.#e.Sentry?.captureException(n)}return null}async fileExists(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return!0;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n)||({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n)))return!0}catch(n){this.#e.Sentry?.captureException(n)}return!1}readFileSync(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{if(t==="AGENTS.md"&&this.#n?.agentsMD)return this.#n.agentsMD;let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(this.#e.existsSync(n))return this.#e.readFileSync(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),this.#e.existsSync(n))return this.#e.readFileSync(n)}catch(n){this.#e.Sentry?.captureException(n)}return null}async writeFile(t,r){let n=io(t,"write",this.#l?.accessControl);if(!n.allowed)throw new Error(`ACL denied: ${n.message}`);try{let{resolvedPath:i}=this.resolveWorkspacePath(t,!0);return await this.#e.writeFile(i,r),!0}catch(i){return this.#e.Sentry?.captureException(i),!1}}async listDir(t){let r=io(t,"list",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n,workspaceFolder:i}=this.resolveWorkspacePath(t,!0);if(!await this.#e.exists(n))return[];let s=await this.#e.readdir(n);if(this.#se())return s.map(o=>this.#e.join(t,o).replace(/^\.\//,""));if(i&&this.#n?.folders){let o=i.name||i.path;return s.map(a=>`${o}/${this.#e.join(t,a).replace(/^\.\//,"")}`)}return s}catch(n){return this.#e.Sentry?.captureException(n),[]}}async stat(t){let r=io(t,"read",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!1);if(await this.#e.exists(n))return await this.#e.stat(n);if({resolvedPath:n}=this.resolveWorkspacePath(t,!0),await this.#e.exists(n))return await this.#e.stat(n)}catch(n){this.#e.Sentry?.captureException(n)}return null}async deleteFile(t){let r=io(t,"write",this.#l?.accessControl);if(!r.allowed)throw new Error(`ACL denied: ${r.message}`);try{let{resolvedPath:n}=this.resolveWorkspacePath(t,!0);return await this.#e.exists(n)?(await this.#e.unlink(n),!0):!1}catch(n){return this.#e.Sentry?.captureException(n),!1}}getNetLinesChanged(){return this.#c?.turns.reduce((t,r)=>t+r.applyResults.reduce((n,i)=>n+i.addedLines-i.removedLines,0),0)??0}};function TC(e){for(let t=e.turns.length-1;t>=0;t--){let r=e.turns[t];if(r.nextUrl)return r}}function rhe(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 AC(e){return e[e.length-1]}function nhe(e){for(let t=e.length-1;t>=0;t--)e[t].state!=="done"&&e.splice(t,1)}async function*ihe(e,t,r,n,i){if(!t.builderPrivateKey)throw new Error("Missing builder public key during completion stream");let s=JSON.stringify(r),o=new URL(`${Kt}/codegen/completion`);t.builderPublicKey&&o.searchParams.set("apiKey",t.builderPublicKey),t.userId&&o.searchParams.set("userId",t.userId),n&&console.log("FETCH",o,s);let a=performance.now(),c=a,l=!1;try{let u=await ot(o,{method:"POST",body:s,keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t.builderPrivateKey}`},signal:i});if(!u.ok){if(u.status===402){yield await u.json();return}let d=new Error("codegen/codegen status error");throw d.httpText=await u.text(),d}let p=Du(u.body);for await(let d of p)if(c=performance.now(),d.length!==0)try{let h=JSON.parse(d);l=!0,yield h}catch(h){e.Sentry?.captureException(h,{extra:{value:d}})}}catch(u){if(u instanceof Error&&u.name==="AbortError")throw u;let p=new Error("codegen/completion endpoint error",{cause:u}),d=performance.now();throw e.Sentry?.captureException(p,{extra:{didStream:l,lastMessageElapsed:d-c,totalElapsed:d-a}}),p}}async function c$(e,t,r,n){try{let i=JSON.stringify(r),s=new URL(`${Kt}/codegen/feedback`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),n&&console.log("FETCH",s,i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`),await ot(s,{method:"POST",body:i,keepalive:!0,headers:o})}catch(i){e.Sentry?.captureException(i)}}async function l$(e,t,r,n){try{let i=JSON.stringify(r),s=new URL(`${Kt}/codegen/sessions/set-last-completion`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),n&&console.log("FETCH",s,i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`),await ot(s,{method:"POST",body:i,keepalive:!0,headers:o})}catch(i){e.Sentry?.captureException(i)}}async function PC(e,t,r,n,i){try{let s=new URL(`${Kt}/codegen/sessions/${r}/turns`);t.builderPublicKey&&s.searchParams.set("apiKey",t.builderPublicKey),t.userId&&s.searchParams.set("userId",t.userId),s.searchParams.set("linear",String(n)),i&&s.searchParams.set("completionIdCursor",i);let o={"Content-Type":"application/json"};t.builderPrivateKey&&(o.Authorization=`Bearer ${t.builderPrivateKey}`);let a=await ot(s,{method:"GET",headers:o,keepalive:!0});if(!a.ok)throw new Error("Failed to get turns");return await a.json()}catch(s){return e.Sentry?.captureException(s),{turns:[],sessionId:r,initialUrl:void 0,beforeCommit:void 0,title:void 0,createdUnixTime:void 0,updatedUnixTime:void 0,allIds:[],lastCompletionId:void 0,canLoadMore:!1}}}async function she(e,t){let r=[];async function n(s){try{let o=e.resolve(t,s);if(await e.exists(o)){let a=await e.readFile(o);if(a){let c=await WF(a,s);r.push(c)}}}catch(o){console.debug(`No ${s} found or error reading it:`,o)}}async function i(s){try{let o=e.resolve(t,s);if(await e.exists(o)){let a=await e.readFile(o);if(a){let c="hash-"+await e.hash(a);r.push({id:c,name:s,content:a,filePath:s})}}}catch(o){console.debug(`No ${s} found or error reading it:`,o)}}try{let s=e.resolve(t,".cursor/rules");if(await e.exists(s)){let o=await e.readdir(s);for(let a of o)await n(`.cursor/rules/${a}`)}}catch(s){console.debug("Error reading .cursor directory:",s)}return await i(".cursorrules"),await i(".builderrules"),await i(".windsurfrules"),await i(".github/copilot-instructions.md"),r}var ohe=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 kC(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:fg.default.EOL,systemArch:fg.default.arch(),inGitRepo:!!r.remoteUrl};try{let i=fg.default.userInfo();n.systemShell=i.shell??void 0}catch{}return n}function m$(){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 u$(e){return e.endsWith("package.json")||e.endsWith("Podfile")||e.endsWith("Cartfile")||e.endsWith("libraries.toml")||e.endsWith("layout.tsx")||e.endsWith("page.tsx")||e.endsWith("CLAUDE.md")||e.endsWith("AGENT.md")||e.endsWith("AGENTS.md")}function Up(e){return e=e.replace(/\\/g,"/"),e.startsWith("/")?e.slice(1):e}function ahe(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 hg(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 che(e,t){return{userPrompt:e.userPrompt+`
|
|
1841
1841
|
|
|
1842
|
-
`+t.userPrompt,files:Array.from(new Set([...e.files??[],...t.files??[]])),includeBaseFiles:e.includeBaseFiles,skipSearch:t.skipSearch,attachments:t.attachments,debugMode:t.debugMode,displayPrompt:t.displayPrompt,ephemeralUserPrompt:t.ephemeralUserPrompt,dropAbortedPrompt:t.dropAbortedPrompt,user:t.user}}function lhe(){let e=setInterval(()=>{},1073741824);return()=>clearInterval(e)}function uhe(e){let t=e.trim().split(/\s+/).filter(Boolean),r=Number.parseInt(t[0]??"",10),n=Number.parseInt(t[1]??"",10);return{ahead:Number.isFinite(r)?r:0,behind:Number.isFinite(n)?n:0}}function p$(e){if(e.startsWith("ai/")){let t=e.split("/");if(t.length<3)return{sessionId:void 0,featureBranch:e};let r=t.pop();t.shift();let n=t.join("/");return{sessionId:r,featureBranch:n}}else if(e.startsWith("ai_")){let t=e.split("_");if(t.length<3)return{sessionId:void 0,featureBranch:e};let r=t.pop();t.shift();let n=t.join("_");return{sessionId:r,featureBranch:n}}return{sessionId:void 0,featureBranch:e}}var FC=j(require("readline"),1);f();async function nl(e){let{default:t}=await import("open");await t(e)}var b$=async(e,t,r)=>{t==="indexing"?await
|
|
1842
|
+
`+t.userPrompt,files:Array.from(new Set([...e.files??[],...t.files??[]])),includeBaseFiles:e.includeBaseFiles,skipSearch:t.skipSearch,attachments:t.attachments,debugMode:t.debugMode,displayPrompt:t.displayPrompt,ephemeralUserPrompt:t.ephemeralUserPrompt,dropAbortedPrompt:t.dropAbortedPrompt,user:t.user}}function lhe(){let e=setInterval(()=>{},1073741824);return()=>clearInterval(e)}function uhe(e){let t=e.trim().split(/\s+/).filter(Boolean),r=Number.parseInt(t[0]??"",10),n=Number.parseInt(t[1]??"",10);return{ahead:Number.isFinite(r)?r:0,behind:Number.isFinite(n)?n:0}}function p$(e){if(e.startsWith("ai/")){let t=e.split("/");if(t.length<3)return{sessionId:void 0,featureBranch:e};let r=t.pop();t.shift();let n=t.join("/");return{sessionId:r,featureBranch:n}}else if(e.startsWith("ai_")){let t=e.split("_");if(t.length<3)return{sessionId:void 0,featureBranch:e};let r=t.pop();t.shift();let n=t.join("_");return{sessionId:r,featureBranch:n}}return{sessionId:void 0,featureBranch:e}}var FC=j(require("readline"),1);f();async function nl(e){let{default:t}=await import("open");await t(e)}var b$=async(e,t,r)=>{t==="indexing"?await zF(e,r):t==="generate"||t==="gen"||t==="g"?await h$(e,r):t==="gen"?ei("code"):await h$(e,r)},h$=async(e,t)=>{if(console.log(""),qe((0,ue.bgCyan)((0,ue.bold)((0,ue.white)(" code ")))+" "+(0,ue.dim)(Ae)),!ghe()&&!t.prompt){await Re("tty error",{}),B.error(`This command requires a TTY-enabled terminal.
|
|
1843
1843
|
If you are using Windows Git Bash, try a different terminal or wrap the command with winpty.`),await ee(1);return}await Re("figma code started",{}),t.workspace||await jp(e,!t.prompt);let r=await xt(e,t,{forceSpaceId:t.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),n,i;if(t.workspace){let g=await hg(e,t.workspace);n=g.workspace,i=g.workingDirectory}let s=new so({sys:e,credentials:r,position:"cli",initialUrl:t.url,mode:t.mode??"quality-v3",workspace:n,workingDirectory:i,enabledTools:t.enabledTools}),o=t.prompt,a=(g,y)=>{(y.ctrl&&y.name==="c"||y.name==="escape")&&s.abort()},c,l=()=>{c&&u(),c=FC.default.createInterface({input:process.stdin,output:process.stdout}),process.stdin.isTTY&&process.stdin.setRawMode(!0),FC.default.emitKeypressEvents(process.stdin,c),process.stdin.on("keypress",a)},u=()=>{c&&(process.stdin.removeListener("keypress",a),process.stdin.isTTY&&process.stdin.setRawMode(!1),c.close(),c=void 0)},p,d;await s.initializeSession();let h="",m="";o&&await s.sendMessage({userPrompt:o}),await s.connectToEventLoop(!1,async g=>{switch(g.type){case"start":{if(h="",m=g.title,g.name==="tool")break;p&&(p.stop(),p=void 0),d&&(d[1](`
|
|
1844
1844
|
`),d[2](),d=void 0),g.name==="text"?(d=m$(),ws.message(d[0],{symbol:(0,ue.magenta)("~")})):(p=Ir(),p.start(g.title),p.extra(g$));break}case"delta":{h+=g.delta,g.name==="tool"||(d?d[1](g.delta):p&&p.extra(`
|
|
1845
1845
|
|
|
@@ -3848,12 +3848,13 @@ Skipped ${y} components
|
|
|
3848
3848
|
|
|
3849
3849
|
## Gather information
|
|
3850
3850
|
|
|
3851
|
-
1.
|
|
3852
|
-
2.
|
|
3853
|
-
3.
|
|
3854
|
-
4.
|
|
3855
|
-
5. Use the \`
|
|
3856
|
-
6.
|
|
3851
|
+
1. Ask the user to provide more information, if the error is not clear.
|
|
3852
|
+
2. Look at the error message, stack trace provided by the user, look for specific clues, like error messages, file names.
|
|
3853
|
+
3. Use the \`view_file\` tool to view the content of files that could be related to the error.
|
|
3854
|
+
4. Check out the package.json to find out interesting scripts, that could be used for debugging. For example, \`npm run typecheck\` or \`npm run build\`.
|
|
3855
|
+
5. Use the \`bash\` tool to run typecheck, build, test, etc to get more information, avoid re-running the dev command, cuz it's already running.
|
|
3856
|
+
6. Use the \`dev_server_control\` tool to debug and control the dev server.
|
|
3857
|
+
7. If still not enough information, try to use the \`search_web\` tool to search the web for more information.
|
|
3857
3858
|
|
|
3858
3859
|
## Describe the root of the problem, or multiple possible problems
|
|
3859
3860
|
|
|
@@ -3861,11 +3862,14 @@ Before jumping to make code changes, describe the root cause of the problem, whi
|
|
|
3861
3862
|
If there are multiple possible problems, describe them all
|
|
3862
3863
|
|
|
3863
3864
|
## Think step by step about a solution
|
|
3865
|
+
|
|
3864
3866
|
Come up with a minimal set of changes to fix the problems
|
|
3865
3867
|
For example, it's better to fix the configuration using dev_server_control tool, than to change the code.
|
|
3868
|
+
If the solution is unreasonable or infeasible, or if any of the tests are incorrect, please tell me. The solution should be robust, maintainable, and extendable.
|
|
3866
3869
|
|
|
3867
3870
|
## Make changes
|
|
3868
|
-
|
|
3871
|
+
|
|
3872
|
+
Do not hack around the problem, make the necessary changes to fix the problem if it's possible.
|
|
3869
3873
|
Those could be file changes, or (dev_server_control) dev-server command changes, or proxy port changes, etc. or a combination of them.
|
|
3870
3874
|
`;f();var xS=require("process");async function gU(e,t){let r=["builder.config.json","fusion.config.json"],n=e.cwd(),i=!!t.local||!t.projectId,s,o={devCommand:"",authenticateProxy:!i,workingDirectory:n,projectId:t.projectId,serverUrl:"",commitMode:"commits",isLocal:i,allowedCommands:["npm *","pnpm *","yarn *","git diff *","git log *","git status *","git add *","git commit *","git pull *","git fetch *","git merge *","git rebase *","echo *","cd *","rm *","find *","ls *","curl *","npx tsc *","head *","lsof *","kill *","ps *","awk *","cat *","grep *","sed *","tail *","touch *","mkdir *"]};if(t.configJson)try{let d=JSON.parse(t.configJson);o=Object.assign({},o,d)}catch(d){e.Sentry?.captureException(d)}else{for(let d of r){let h=e.join(n,d);if(await e.exists(h)){s=h;break}}if(s)try{let d=await e.readFile(s);if(d){let h=JSON.parse(d);o=Object.assign({},o,h)}}catch(d){e.Sentry?.captureException(d)}}o.command&&(o.devCommand||(o.devCommand=o.command),delete o.command);let a=t.c||t.command,c=t.p||t.port,l=t.installCommand,u=t.serverUrl,p=t.interactive&&!t.configJson&&!t.fusionInit&&i;if(u?(p=!1,o.serverUrl=u,a||(o.devCommand="")):a&&c&&(p=!1,o.serverUrl=`http://localhost:${c}`,o.devCommand=a),a&&c&&(p=!1),c&&!u&&(o.serverUrl=`http://localhost:${c}`),l&&(o.setupCommand=l),a&&(o.devCommand=a),typeof t.authenticateProxy=="boolean"&&(o.authenticateProxy=t.authenticateProxy),p){if(!o.devCommand){let d=await pt({message:"Enter the command to run for the dev server (e.g. 'npm run dev')",placeholder:"npm run dev",validate:h=>{if(h.trim()===""||h.length===0)return"Command cannot be empty"}});if(Se(d))return xe("Goodbye! \u{1F44B}"),await(0,xS.exit)(1);o.devCommand=d}if(!o.serverUrl){let d=await pt({message:"Enter the port number for the dev server",placeholder:"3000",validate:h=>{let m=Number(h);if(isNaN(m)||m<0||m>65535||Math.floor(m)!==m)return"Invalid port number, must be an integer between 0 and 65535"}});if(Se(d))return xe("Goodbye! \u{1F44B}"),await(0,xS.exit)(1);o.serverUrl=`http://localhost:${d}`}await e.writeFile(s??e.join(n,r[0]),JSON.stringify(Wye(o,"workingDirectory","projectId","authenticateProxy"),null,2))}return o}var Wye=(e,...t)=>{let r={};if(e&&typeof e=="object")for(let n in e)(!e.hasOwnProperty||e.hasOwnProperty(n))&&(t.includes(n)||(r[n]=e[n]));return r};f();var xs=require("child_process"),dl=j(require("fs"),1),Zp=j(require("path"),1),yU=j(require("@sentry/node"),1),bU=require("util");var Jye=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos"],vS=(0,bU.promisify)(xs.exec),Rg=class{logIdCounter=0;initStatusLogs=[];initState={isRunning:!1,isComplete:!1,success:!1,currentStep:"",error:void 0};async init(t,r){this.clearInitLogs(),this.initState.isRunning=!0,this.initState.isComplete=!1;let n=(t.fusionConfig.workspace?.folders??[]).filter(i=>i.branchName&&i.repoUrl&&i.name&&i.path&&i.repoName);t.debug&&console.log(`[DEBUG] Starting initialization with ${n.length} repositories`),this.addInitLog("log",`Starting initialization with ${n.length} repositories`,{step:"init"});try{if(!n.length){let i="At least one repository must be configured";throw new Error(i)}if(!t.sys){let i="DevToolsSys is required in config";throw this.addInitLog("error",i,{step:"validation",error:i}),new Error(i)}return await this.step1CheckDirectories(t,n,r),this.addInitLog("log","Directories checked",{step:"check-directories"}),await this.step2ConfigureGitRepositories(t,n,r),this.addInitLog("log","Git repositories configured",{step:"configure-git-repos"}),await this.step3ConfigureGitUser(t,n,r),this.addInitLog("log","Git user configured",{step:"configure-git-user"}),await this.step4StashChanges(t,n,r),this.addInitLog("log","Initialization completed successfully",{step:"stash-changes"}),t.debug&&console.log("[DEBUG] Initialization completed successfully"),this.addInitLog("complete","Initialization completed successfully",{step:"init-success",success:!0}),!0}catch(i){let s=i instanceof Error?i.message:String(i);t.debug&&console.error(`[DEBUG] Initialization failed with error: ${s}`);let o=this.initStatusLogs.some(a=>a.type==="error"&&a.step&&a.step!=="init-failed");return this.addInitLog("complete",`Initialization failed with error: ${s}`,{step:o?void 0:"init-failed",success:!1,error:s}),yU.captureException(i,{tags:{operation:"init"}}),!1}}addInitLog(t,r,n){let i={id:++this.logIdCounter,timestamp:new Date().toISOString(),type:t,message:r,...n};this.initStatusLogs.push(i),this.initStatusLogs.length>1e3&&this.initStatusLogs.splice(0,this.initStatusLogs.length-1e3),n?.step&&(this.initState.currentStep=n.step),t==="complete"&&(this.initState.isComplete=!0,this.initState.isRunning=!1,this.initState.success=n?.success??!1,this.initState.error=n?.error),t==="error"&&n?.error&&(this.initState.error=n.error)}clearInitLogs(){this.initStatusLogs.length=0,this.logIdCounter=0,this.initState={isRunning:!1,isComplete:!1,success:!1,currentStep:"",error:void 0}}async step1CheckDirectories(t,r,n){t.debug&&console.log("[DEBUG] Checking directories"),this.addInitLog("log","Checking directories",{step:"check-directories"});let i=t.fusionConfig.workingDirectory;if(!dl.existsSync(i)){let s=`Volume directory ${i} does not exist`;throw this.addInitLog("error",s,{step:"check-directories",error:s}),new Error(s)}this.addInitLog("log",`Volume directory exists: ${i}`,{step:"check-directories"});for(let s of r){if(n?.aborted)throw new Error("Operation cancelled");let o=Zp.join(i,s.path);if(dl.existsSync(o))this.addInitLog("log",`Directory already exists: ${o}`,{step:"check-directories"});else{t.debug&&console.log(`[DEBUG] Creating directory: ${o}`),this.addInitLog("log",`Creating directory: ${o}`,{step:"create-directories"});try{dl.mkdirSync(o,{recursive:!0})}catch(a){let c=`Failed to create directory for ${s.repoName} at ${o}: ${a}`;throw this.addInitLog("error",c,{step:"create-directories",error:c}),new Error(c)}}}}async step2ConfigureGitRepositories(t,r,n){t.debug&&console.log("[DEBUG] Configuring git repositories"),this.addInitLog("log","Configuring git repositories",{step:"configure-git-repos"});let i=t.fusionConfig.workingDirectory;for(let s of r){if(n?.aborted)throw new Error("Operation cancelled");let o=Zp.join(i,s.path);if(this.addInitLog("log",`Processing repository: ${s.repoName}`,{step:"configure-git-repos"}),this.isGitConfigured(o)){this.addInitLog("log",`Git already configured for ${s.repoName}, checking remote URL`,{step:"check-existing-git"});let a=this.getGitRemoteUrl(o);if(a){let c=this.sanitizeGitRemoteUrl(a),l=this.sanitizeGitRemoteUrl(s.repoUrl);if(c!==l){this.addInitLog("log",`Updating remote URL for ${s.repoName}`,{step:"update-remote-url"});try{(0,xs.execSync)(`git remote set-url origin ${JSON.stringify(s.repoUrl)}`,{cwd:o,stdio:["ignore","pipe","pipe"]})}catch(u){let p=`Failed to update git remote URL for ${s.repoName}: ${u}`;throw this.addInitLog("error",p,{step:"update-remote-url",error:p}),new Error(p)}}}else{this.addInitLog("log",`Adding remote origin for ${s.repoName}`,{step:"check-existing-git"});try{(0,xs.execSync)(`git remote add origin ${JSON.stringify(s.repoUrl)}`,{cwd:o,stdio:"pipe"})}catch(c){let l=`Failed to add git remote origin for ${s.repoName}: ${c}`;throw this.addInitLog("error",l,{step:"check-existing-git",error:l}),new Error(l)}}}else if(this.addInitLog("log",`Cloning repository: ${s.repoName}`,{step:"clone-repo"}),await this.cloneRepository(s,o,t.debug,n))this.addInitLog("log",`Successfully cloned ${s.repoName}`,{step:"clone-repo"});else{let c=`Failed to clone repository ${s.repoName}`;throw this.addInitLog("error",c,{step:"clone-repo",error:c}),new Error(c)}}}async step3ConfigureGitUser(t,r,n){t.debug&&console.log("[DEBUG] Configuring git user"),this.addInitLog("log","Configuring git user",{step:"configure-git-user"});let i=t.fusionConfig.workingDirectory;for(let s of r){if(n?.aborted)throw new Error("Operation cancelled");let o=Zp.join(i,s.path);this.addInitLog("log",`Setting git user for ${s.repoName}`,{step:"configure-git-user"});try{(0,xs.execSync)('git config user.email "builder-bot@builder.io" && git config user.name "Builder.io"',{cwd:o,stdio:["ignore","pipe","pipe"]})}catch(a){let c=`Failed to configure git user for ${s.repoName}: ${a}`;throw this.addInitLog("error",c,{step:"configure-git-user",error:c}),new Error(c)}}}async step4StashChanges(t,r,n){t.debug&&console.log("[DEBUG] Stashing changes"),this.addInitLog("log","Stashing changes",{step:"stash-changes"});let i=t.fusionConfig.workingDirectory;for(let s of r){if(n?.aborted)throw new Error("Operation cancelled");let o=Zp.join(i,s.path);try{this.addInitLog("log",`Stashing changes for ${s.repoName}`,{step:"stash-changes"}),(0,xs.execSync)("git stash --include-untracked",{cwd:o,stdio:["ignore","pipe","pipe"]}),this.addInitLog("log",`Successfully stashed changes for ${s.repoName}`,{step:"stash-changes"})}catch{t.debug&&console.log(`[DEBUG] Stash failed for ${s.repoName} (likely no changes)`),this.addInitLog("log",`No changes to stash for ${s.repoName}`,{step:"stash-changes"})}}}isGitConfigured(t){try{return(0,xs.execSync)("git rev-parse --is-inside-work-tree",{cwd:t,stdio:["ignore","pipe","pipe"]}),!0}catch{return!1}}getGitRemoteUrl(t){try{return(0,xs.execSync)("git config --get remote.origin.url",{cwd:t,stdio:["ignore","pipe","pipe"]}).toString().trim()}catch{return null}}sanitizeGitRemoteUrl(t){return t.replace(/https:\/\/[^@]+@/,"https://")}async cloneRepository(t,r,n,i){let s=[t.branchName??"main",null,"main","master"];for(let o of s){if(i?.aborted)return!1;try{if(dl.existsSync("/template")&&t.repoName==="BuilderIO/fusion-starter")return n&&console.log("[DEBUG] Copying from template instead of cloning"),await vS(`rm -rf ${r} && cp -a /template ${r}`,{signal:i}),this.addInitLog("log",`Copied from template for ${t.repoName}`,{step:"clone-repo"}),!0;{let c=`git clone${o?` -b ${o}`:""} ${JSON.stringify(t.repoUrl)} ${JSON.stringify(r)}`;if(n&&console.log(`[DEBUG] Cloning with branch: ${o||"default"}`),await vS(c,{signal:i}),Jye.includes(t.repoName)){let l=[`cd ${JSON.stringify(r)}`,"rm -rf .git","git init","git add .","git branch -M main",'git commit -m "Initial setup"'].join(" && ");await vS(l,{signal:i}),this.addInitLog("log",`Cleared git history for ${t.repoName}`,{step:"clone-repo"})}return!0}}catch(a){n&&console.log(`[DEBUG] Clone failed for branch ${o||"default"}: ${a}`),this.addInitLog("error",`Clone failed for branch ${o||"default"}: ${a}`,{step:"clone-repo",error:String(a)});continue}}return!1}};var Mg=48752,Yye=!0;async function Xye(e){return new Promise(t=>{let r=CU.createServer();r.listen(e,()=>{r.once("close",()=>{t(!0)}),r.close()}),r.on("error",()=>{t(!1)})})}async function Qye(e){let t=e,r=100;for(let n=0;n<r;n++){if(await Xye(t))return t;t=Math.floor(Math.random()*16384)+49152}throw new Error(`Could not find an available port after ${r} attempts`)}function xU(e,t,r){if(e.jsonOutput){let n={type:"server_error",data:{error:t,details:r,timestamp:Date.now()}};console.log(JSON.stringify(n))}}var Bt;async function SU({sys:e,args:t}){process.env.FLY_APP_NAME&&vU.getCurrentScope().setContext("flyIo",{flyAppName:process.env.FLY_APP_NAME,flyMachineId:process.env.FLY_MACHINE_ID,flyRegion:process.env.FLY_REGION,flyPublicIp:process.env.FLY_PUBLIC_IP,flyVmMemoryMb:process.env.FLY_VM_MEMORY_MB,flyPrimaryRegion:process.env.PRIMARY_REGION});let r=new Rg;console.log(),qe((0,Ln.bgCyan)((0,Ln.bold)((0,Ln.white)(" fusion ")))+" "+(0,Ln.dim)(nc));let n=await Zye(e,t),i=await gU(e,t),{app:s,proxyUrl:o,server:a}=await ebe(n,i,r);if(t.fusionInit){if(!await r.init({sys:e,fusionConfig:i,debug:!0})){B.error("\u274C Initialization failed");return}B.success("\u2705 Initialization completed successfully")}let c=await tbe(e,i,t);t.fusionInit&&c&&await Promise.race([c.ensureSetupCommand(),new Promise(l=>setTimeout(l,2e3))]),await rbe({sys:e,credentials:n,args:t,fusionConfig:i,proxyUrl:o,server:a,app:s,devServer:c,initStateMachine:r}),await Re("launch",{...i,dev:!!t.dev})}async function Zye(e,t){let r;try{if(r=await xt(e,t,{builderPrivateKey:!0,builderPublicKey:!0}),!r.builderPublicKey||!r.builderPrivateKey){let n="You need to be logged in to use the fusion command.";return xU(t,n),B.error(n),xe("Please login first with: npx builder.io login"),await ee(1)}if(!r.timestamp&&!t.projectId){let n=await e.getDeviceId();if(n)try{let i=new URL(`${Kt}/fusion/cli-key`);i.searchParams.set("host",n),i.searchParams.set("apiKey",r.builderPublicKey);let s=await ot(i.toString(),{headers:{"Content-Type":"application/json",Authorization:`Bearer ${r.builderPrivateKey}`},method:"GET"}).then(o=>o.json()).then(o=>o.key);s&&(r.builderPrivateKey=s,r.timestamp=new Date().toISOString(),bg(e,r))}catch(i){t.debug&&console.error("Failed to fetch original private key, using existing credentials",i)}}B.success(`Logged in as space: ${r.spaceName||r.builderPublicKey}`)}catch(n){let i="Authentication failed.";return xU(t,i,n instanceof Error?n.message:String(n)),B.error(i),xe("Please login first with: npx builder.io login"),await ee(1)}return r}async function ebe(e,t,r){let n=!!t.isLocal,i=Mg;n&&(i=await Qye(Mg),i!==Mg&&B.info(`\u26A0\uFE0F Port ${Mg} is in use, using port ${i} instead`)),B.info(`\u{1F50D} Setting up Builder.io server on port ${i}`);let s=(0,ES.default)(),o=EU.createServer(s),a=e.builderPrivateKey,c=t.authenticateProxy??!1;X9({app:s,validBuilderPrivateKey:a,authenticateProxy:c,isLocal:n,initStateMachine:r});let l=`http://localhost:${i}`;return await new Promise((p,d)=>{o.listen(i,async()=>{B.success(`\u{1F680} Builder.io server running at ${l}`),p(!0)})}),{app:s,proxyUrl:l,server:o,availablePort:i}}async function tbe(e,t,r){if(r.serverUrl&&!r.command){B.info(`Proxying to existing dev server at ${(0,Ln.cyan)(t.serverUrl)}...`);return}else return B.info(`Running ${(0,Ln.cyan)(t.devCommand)} on host ${(0,Ln.cyan)(t.serverUrl)}...`),await t$(e,t,r.fusionInit?"not-installed":"installed")}async function rbe({sys:e,credentials:t,args:r,fusionConfig:n,app:i,server:s,proxyUrl:o,devServer:a,initStateMachine:c}){try{let l=ES.default.Router();l.get("/status",(b,v)=>{v.status(200).json({status:"ok",editorReady:!0,state:a?.state,setupState:a?.setupState,devState:a?.devState,initState:c.initState,initStatusLogs:c.initStatusLogs,devToolsVersion:nc})}),l.get("/proxy-status",async(b,v)=>{try{let E=a?.proxyTarget??n.serverUrl;(await fetch(E,{method:"HEAD"})).status===200?v.status(200).json({status:"ok"}):v.status(500).json({error:"Failed to check proxy status"})}catch{v.status(500).json({error:"Failed to check proxy status"})}}),l.post("/git/pull-latest",async(b,v)=>{try{(0,wU.execSync)("git pull --rebase"),v.json({status:"ok"})}catch(E){e.Sentry?.captureException(E),v.status(500).json({error:"Failed to pull latest changes"})}}),l.post("/generate",async(b,v)=>{try{let{prompt:E,userMessage:x,context:{pushChanges:w}}=b.body;if(!E&&!x)return v.status(400).json({error:"No prompt/userMessage provided"});v.setHeader("Content-Type","text/event-stream"),v.setHeader("Cache-Control","no-cache"),v.setHeader("Connection","keep-alive");let S=await wS(e,t,n,a,void 0,void 0),D=S.connectToEventLoop(!1,_=>{v.write(JSON.stringify(_)+`
|
|
3871
3875
|
`)});try{if(await S.pullLatestFromRemote(),await S.sendMessage(E?{userPrompt:E}:x),await new Promise(_=>setTimeout(_,100)),await S.waitUntilIdle(),w)try{await S.pushChanges(!1)}catch(_){e.Sentry?.captureException(_)}}catch(_){e.Sentry?.captureException(_);let O=_ instanceof Error?_.message:String(_);v.write(`${JSON.stringify({type:"error",message:`Error: ${O}`})}
|
|
@@ -4627,7 +4631,7 @@ Make sure to save the output in the file AGENT.md`;var ibe=(e,t)=>e.replace("{{c
|
|
|
4627
4631
|
]`),SS=async(e,t)=>{let{designSystemPackage:r,skipDetailedGrouping:n,force:i,skipHeader:s}=t;oi.getCurrentScope().setTag("operation","repo-indexing"),oi.getCurrentScope().setTag("designSystemPackage",r||"none"),s||(console.log(""),qe((0,Bn.bgCyan)((0,Bn.bold)((0,Bn.white)(" repository indexing ")))+" "+(0,Bn.dim)(Ae)));let o=Ir(),a=_U.default.randomUUID();oi.getCurrentScope().setTag("sessionId",a);let c=await xt(e,t,{forceSpaceId:t.spaceId,builderPrivateKey:!0,builderPublicKey:!0}),l={userPrompt:ibe(DU,r)},u=[];try{if(!await e.exists(e.join(e.getAppRootDir(),"component-groups.json"))||i){o.start("Indexing repository");try{await CS(e,c,l,t.debug)}catch(m){throw oi.captureException(m,{tags:{operation:"repo-index",step:"generate-component-groups"},extra:{designSystemPackage:r,...t.debug&&m instanceof Error?{stack:m.stack}:{}}}),m}o.stop("Repository indexed and components grouped"),$t("DONE")}let d=await e.readFile(e.join(e.getAppRootDir(),"component-groups.json"));if(!d)throw new Error("No component groups found");if(n){try{o.stop("")}catch{}return}if(u=JSON.parse(d),!await e.exists(e.join(e.getAppRootDir(),"AGENT.md"))||i){let m={userPrompt:AU.replaceAll("{{COMPONENT_GROUPS}}",JSON.stringify(u))};try{await CS(e,c,m)}catch(b){throw oi.captureException(b,{tags:{operation:"repo-agent-docs",step:"generate-agent-docs"},extra:{componentGroupsCount:u.length,...t.debug&&b instanceof Error?{stack:b.stack}:{}}}),b}let g=await e.readFile(e.join(e.getAppRootDir(),"AGENT.md"));if(!g)throw new Error("AGENT.md file not found");let y=JSON.stringify({name:"AGENT.md",description:"Repository agent documentation",components:[],content:g});try{await PU(c,e,y),console.log("Successfully stored AGENT.md file")}catch(b){throw oi.captureException(b,{tags:{operation:"store-agent-docs",step:"store-agent-docs"},extra:{fileName:"AGENT.md",...t.debug&&b instanceof Error?{stack:b.stack}:{}}}),console.error("Failed to store AGENT.md file:",b),b}}for(let m of u){let g=m.name.toLowerCase().replace(/ /g,"-");if(!await e.exists(e.join(e.getAppRootDir(),"repo-indexing",`${g}.mdx`))||i){let b={userPrompt:TU.replaceAll("{{GROUP_NAME}}",m.name).replaceAll("{{GROUP_DESCRIPTION}}",m.description).replaceAll("{{COMPONENT_LIST}}",m.components.join(", ")).replaceAll("{{FILE_LIST}}",m.relevantFiles.join(", ")).replaceAll("{{GROUP_NAME_KEBAB}}",g)};try{o.start(`Generating ${m.name} component group`),await CS(e,c,b,t.debug),o.stop(`Generated ${m.name} component group`);let v=await e.readFile(e.join(e.getAppRootDir(),"repo-indexing",`${g}.mdx`));if(v){let E=JSON.stringify({name:m.name,description:m.description,components:m.components,content:v});try{await PU(c,e,E),o.extra(`Stored ${m.name} component group`)}catch(x){throw oi.captureException(x,{tags:{operation:"store-component-docs",componentGroup:m.name},extra:{fileName:`${g}.mdx`,components:m.components,...t.debug&&x instanceof Error?{stack:x.stack}:{}}}),x}}}catch(v){throw oi.captureException(v,{tags:{operation:"generate-component-group",componentGroup:m.name},extra:{kebabName:g,...t.debug&&v instanceof Error?{stack:v.stack}:{}}}),v}}}}catch(p){throw o.stop("Failed to index repository"),console.error(`
|
|
4628
4632
|
Detailed error information:`),console.error("Error ID:",a),console.error("Error:",p instanceof Error?p.message:String(p)),oi.captureException(p,{tags:{operation:"repo-indexing",sessionId:a,designSystemPackage:r||"none"},extra:{skipDetailedGrouping:n,force:i,componentGroupsCount:u.length,...t.debug&&p instanceof Error?{stack:p.stack}:{}}}),t.debug&&console.error(`
|
|
4629
4633
|
Stack trace:`,p instanceof Error?p.stack:""),p}},CS=async(e,t,r,n)=>{console.log(""),qe((0,Bn.bgCyan)((0,Bn.bold)((0,Bn.white)(" code ")))+" "+(0,Bn.dim)(Ae));let i=new so({sys:e,credentials:t,position:"repo-indexing",mode:"quality-v3"});n&&i.setDebug(n),await i.initializeSession(),i.connectToEventLoop(!1,async a=>{switch(a.type){case"error":{console.error(`
|
|
4630
|
-
`,a.message);break}}});let s=Ir();s.start("Analyzing repository"),await i.sendMessage(r),await i.waitUntilIdle(),await i.close();let o=i.getLastTurn();return s.stop("Running LLM"),o},PU=async(e,t,r)=>{try{let n=new URL("/mappings/store-component-docs",Kt);n.searchParams.set("apiKey",e.builderPublicKey),n.searchParams.set("userId",e.userId);let i=await ot(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`},body:r});if(!i.ok){let s=await i.text();throw console.error("API request failed:",i.status,s),new Error(`Failed to store component group: ${i.status} ${s}`)}return await i.json()}catch(n){throw console.error("Error in storeComponentDocs:",n),n}};async function sbe(e){console.log(""),qe((0,ed.bgMagenta)((0,Lg.bold)((0,fl.white)(" dev-tools server ")))+" "+(0,ed.dim)(Ae)),e.debug("builder dev tools cli init");let t=await(0,IU.createDevTools)(e);await(0,NU.createDevToolsServer)({...t,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async r=>r,...e})}var MU=async()=>{await OU.flush().promise,process.exit(0)};process.on("SIGINT",MU);process.on("SIGTERM",MU);async function obe(){let e=(0,FU.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"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index"],alias:{p:"port",c:"command",json:"jsonOutput"},default:{interactive:!0,fusionInit:!1}});e.cwd&&process.chdir(e.cwd);let t=await Dk(!!(e.verbose||e.debug));await t.withScope(async r=>{try{let n=await(0,kU.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});if(n.Sentry?.setTag("cli-command",e._.join(" ")),n.Sentry?.setContext("flags-args",{...e}),await xt(n,e,{}),e.help)return ei(e._[e._.length-1]),await ee(0);let i=e._[0];if(i==="figma"){let s=e._[1];try{return await U$(n,s,e),await ee(0)}catch(o){return n.Sentry?.captureException(o),await ee(1)}}else if(i==="code"){let s=e._[1];try{e.index&&(e.skipDetailedGrouping=!0,e.skipHeader=!0,await SS(n,e)),await b$(n,s,e)}catch(o){return n.Sentry?.captureException(o),await ee(1)}}else if(i==="index-repo")try{return await SS(n,e),await ee(0)}catch(s){return n.Sentry?.captureException(s),await ee(1)}else if(i==="launch"||i==="fusion")try{await SU({sys:n,args:e})}catch(s){return n.Sentry?.captureException(s),await ee(1)}else if(i==="add"){let s=$C(n.getAppRootDir(),process.argv.slice(2));return await
|
|
4634
|
+
`,a.message);break}}});let s=Ir();s.start("Analyzing repository"),await i.sendMessage(r),await i.waitUntilIdle(),await i.close();let o=i.getLastTurn();return s.stop("Running LLM"),o},PU=async(e,t,r)=>{try{let n=new URL("/mappings/store-component-docs",Kt);n.searchParams.set("apiKey",e.builderPublicKey),n.searchParams.set("userId",e.userId);let i=await ot(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.builderPrivateKey}`},body:r});if(!i.ok){let s=await i.text();throw console.error("API request failed:",i.status,s),new Error(`Failed to store component group: ${i.status} ${s}`)}return await i.json()}catch(n){throw console.error("Error in storeComponentDocs:",n),n}};async function sbe(e){console.log(""),qe((0,ed.bgMagenta)((0,Lg.bold)((0,fl.white)(" dev-tools server ")))+" "+(0,ed.dim)(Ae)),e.debug("builder dev tools cli init");let t=await(0,IU.createDevTools)(e);await(0,NU.createDevToolsServer)({...t,getClientId:()=>"builder-dev-tools-cli",closeAppServer:async()=>{},restartAppServer:async()=>{e.debug("restart server")},enableAppWatch:async r=>r,...e})}var MU=async()=>{await OU.flush().promise,process.exit(0)};process.on("SIGINT",MU);process.on("SIGTERM",MU);async function obe(){let e=(0,FU.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"],boolean:["help","ci","force","verbose","fusionInit","debug","dryrun","yes","skipInstallation","skipDetailedGrouping","noAuth","auth","dev","noOpen","open","silent","interactive","jsonOutput","local","clearMappings","index"],alias:{p:"port",c:"command",json:"jsonOutput"},default:{interactive:!0,fusionInit:!1}});e.cwd&&process.chdir(e.cwd);let t=await Dk(!!(e.verbose||e.debug));await t.withScope(async r=>{try{let n=await(0,kU.createDevToolsNodeSys)({cwd:process.cwd(),ignoreMissingConfig:!0});if(n.Sentry?.setTag("cli-command",e._.join(" ")),n.Sentry?.setContext("flags-args",{...e}),await xt(n,e,{}),e.help)return ei(e._[e._.length-1]),await ee(0);let i=e._[0];if(i==="figma"){let s=e._[1];try{return await U$(n,s,e),await ee(0)}catch(o){return n.Sentry?.captureException(o),await ee(1)}}else if(i==="code"){let s=e._[1];try{e.index&&(e.skipDetailedGrouping=!0,e.skipHeader=!0,await SS(n,e)),await b$(n,s,e)}catch(o){return n.Sentry?.captureException(o),await ee(1)}}else if(i==="index-repo")try{return await SS(n,e),await ee(0)}catch(s){return n.Sentry?.captureException(s),await ee(1)}else if(i==="launch"||i==="fusion")try{await SU({sys:n,args:e})}catch(s){return n.Sentry?.captureException(s),await ee(1)}else if(i==="add"){let s=$C(n.getAppRootDir(),process.argv.slice(2));return await OF(s),await ee(0)}else if(i==="sync"){let s=$C(n.getAppRootDir(),process.argv.slice(2)),o=await V0(s);await qF(n,o).then(()=>{B.success("Builder dev tools is running")}).catch(a=>(B.error("Cannot start builder dev tools"),n.Sentry?.captureException(a),ee(1)))}else if(i==="auth"){console.log(""),qe((0,fl.bgCyan)((0,Lg.bold)((0,fl.white)(" figma auth ")))+" "+(0,ed.dim)(Ae));let{builderPublicKey:s}=await xt(n,e,{builderPrivateKey:!0,builderPublicKey:!0,force:!0});return await Re("auth",{spaceId:s}),$t((0,RU.bgGreen)((0,Lg.bold)((0,fl.white)(" Done! \u{1F389} ")))),await ee(0)}else{if(i==="help")return ei(e._[1]),await ee(0);if(i==="publish"||i==="migrate"||i==="generate")return xe("Command not found, do you mean `npx builder.io figma "+i+"`?"),await ee(1);sbe(n).then(()=>{B.success("Builder dev tools is running")}).catch(s=>(B.error("Cannot start builder dev tools"),t.captureException(s),ee(1)))}}catch(n){return t.captureException(n),console.error("Cannot start builder dev tools",n),await ee(1)}})}obe();var abe=void 0;
|
|
4631
4635
|
/*! Bundled license information:
|
|
4632
4636
|
|
|
4633
4637
|
is-extglob/index.js:
|