builder.io 1.11.50 → 1.12.0
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 +499 -451
- package/cli/index.cjs.map +4 -4
- package/core/index.cjs +1 -1
- package/core/index.mjs +1 -1
- package/node/index.cjs +1 -1
- package/node/index.mjs +1 -1
- package/package.json +1 -1
- package/server/index.cjs +43 -36
- package/server/index.mjs +39 -32
- package/types/cli/credentials.d.ts +1 -0
- package/types/cli/index.d.ts +2 -0
- package/types/cli/repo-indexing/component-indexing.d.ts +1 -0
- package/types/cli/repo-indexing/icons.d.ts +23 -0
- package/types/cli/repo-indexing/repo-indexing-utils.d.ts +1 -0
- package/types/cli/repo-indexing/repo-indexing.d.ts +1 -1
- package/types/cli/utils/repo-indexing-agent-prompt.d.ts +1 -1
- package/types/tsconfig.tsbuildinfo +1 -1
package/server/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";var sf=Object.create;var Jr=Object.defineProperty;var af=Object.getOwnPropertyDescriptor;var uf=Object.getOwnPropertyNames;var cf=Object.getPrototypeOf,lf=Object.prototype.hasOwnProperty;var pf=(e,t,r)=>t in e?Jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),df=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})},pa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uf(t))!lf.call(e,i)&&i!==r&&Jr(e,i,{get:()=>t[i],enumerable:!(n=af(t,i))||n.enumerable});return e};var M=(e,t,r)=>(r=e!=null?sf(cf(e)):{},pa(t||!e||!e.__esModule?Jr(r,"default",{value:e,enumerable:!0}):r,e)),ff=e=>pa(Jr({},"__esModule",{value:!0}),e);var Be=(e,t,r)=>pf(e,typeof t!="symbol"?t+"":t,r);var ga=_((M0,ma)=>{"use strict";ma.exports=function(){if(process.env.npm_config_user_agent)return gf(process.env.npm_config_user_agent)};function gf(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 Wn=_((vw,Ga)=>{"use strict";var Zo="\x1B",le=`${Zo}[`,If="\x07",ei={to(e,t){return t?`${le}${t+1};${e+1}H`:`${le}${e+1}G`},move(e,t){let r="";return e<0?r+=`${le}${-e}D`:e>0&&(r+=`${le}${e}C`),t<0?r+=`${le}${-t}A`:t>0&&(r+=`${le}${t}B`),r},up:(e=1)=>`${le}${e}A`,down:(e=1)=>`${le}${e}B`,forward:(e=1)=>`${le}${e}C`,backward:(e=1)=>`${le}${e}D`,nextLine:(e=1)=>`${le}E`.repeat(e),prevLine:(e=1)=>`${le}F`.repeat(e),left:`${le}G`,hide:`${le}?25l`,show:`${le}?25h`,save:`${Zo}7`,restore:`${Zo}8`},kf={up:(e=1)=>`${le}S`.repeat(e),down:(e=1)=>`${le}T`.repeat(e)},Bf={screen:`${le}2J`,up:(e=1)=>`${le}1J`.repeat(e),down:(e=1)=>`${le}J`.repeat(e),line:`${le}2K`,lineEnd:`${le}K`,lineStart:`${le}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?ei.up():"");return e&&(t+=ei.left),t}};Ga.exports={cursor:ei,scroll:kf,erase:Bf,beep:If}});var or=_((Sw,ti)=>{var qn=process||{},Wa=qn.argv||[],zn=qn.env||{},$f=!(zn.NO_COLOR||Wa.includes("--no-color"))&&(!!zn.FORCE_COLOR||Wa.includes("--color")||qn.platform==="win32"||(qn.stdout||{}).isTTY&&zn.TERM!=="dumb"||!!zn.CI),_f=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+Nf(i,t,r,s)+t:e+i+t},Nf=(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)},za=(e=$f)=>{let t=e?_f:()=>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")}};ti.exports=za();ti.exports.createColors=za});var Pc=_((DF,ao)=>{ao.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;ao.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]/;ao.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 Pi=_((CF,Tc)=>{var Ai=Pc();Tc.exports={isSpaceSeparator(e){return typeof e=="string"&&Ai.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Ai.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"||Ai.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 $c=_((yF,Bc)=>{var Ce=Pi(),Ri,Re,jt,co,Jt,gt,ye,Bi,gn;Bc.exports=function(t,r){Ri=String(t),Re="start",jt=[],co=0,Jt=1,gt=0,ye=void 0,Bi=void 0,gn=void 0;do ye=kh(),_h[Re]();while(ye.type!=="eof");return typeof r=="function"?Ii({"":gn},"",r):gn};function Ii(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=Ii(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=Ii(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 V,j,mn,Mt,G;function kh(){for(V="default",j="",mn=!1,Mt=1;;){G=Ut();let e=Ic[V]();if(e)return e}}function Ut(){if(Ri[co])return String.fromCodePoint(Ri.codePointAt(co))}function b(){let e=Ut();return e===`
|
|
1
|
+
"use strict";var sf=Object.create;var Jr=Object.defineProperty;var af=Object.getOwnPropertyDescriptor;var uf=Object.getOwnPropertyNames;var cf=Object.getPrototypeOf,lf=Object.prototype.hasOwnProperty;var pf=(e,t,r)=>t in e?Jr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),df=(e,t)=>{for(var r in t)Jr(e,r,{get:t[r],enumerable:!0})},pa=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uf(t))!lf.call(e,i)&&i!==r&&Jr(e,i,{get:()=>t[i],enumerable:!(n=af(t,i))||n.enumerable});return e};var M=(e,t,r)=>(r=e!=null?sf(cf(e)):{},pa(t||!e||!e.__esModule?Jr(r,"default",{value:e,enumerable:!0}):r,e)),ff=e=>pa(Jr({},"__esModule",{value:!0}),e);var $e=(e,t,r)=>pf(e,typeof t!="symbol"?t+"":t,r);var ga=_((M0,ma)=>{"use strict";ma.exports=function(){if(process.env.npm_config_user_agent)return gf(process.env.npm_config_user_agent)};function gf(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 Wn=_((vw,Ga)=>{"use strict";var Zo="\x1B",le=`${Zo}[`,If="\x07",ei={to(e,t){return t?`${le}${t+1};${e+1}H`:`${le}${e+1}G`},move(e,t){let r="";return e<0?r+=`${le}${-e}D`:e>0&&(r+=`${le}${e}C`),t<0?r+=`${le}${-t}A`:t>0&&(r+=`${le}${t}B`),r},up:(e=1)=>`${le}${e}A`,down:(e=1)=>`${le}${e}B`,forward:(e=1)=>`${le}${e}C`,backward:(e=1)=>`${le}${e}D`,nextLine:(e=1)=>`${le}E`.repeat(e),prevLine:(e=1)=>`${le}F`.repeat(e),left:`${le}G`,hide:`${le}?25l`,show:`${le}?25h`,save:`${Zo}7`,restore:`${Zo}8`},kf={up:(e=1)=>`${le}S`.repeat(e),down:(e=1)=>`${le}T`.repeat(e)},Bf={screen:`${le}2J`,up:(e=1)=>`${le}1J`.repeat(e),down:(e=1)=>`${le}J`.repeat(e),line:`${le}2K`,lineEnd:`${le}K`,lineStart:`${le}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?ei.up():"");return e&&(t+=ei.left),t}};Ga.exports={cursor:ei,scroll:kf,erase:Bf,beep:If}});var or=_((Sw,ti)=>{var qn=process||{},Wa=qn.argv||[],zn=qn.env||{},$f=!(zn.NO_COLOR||Wa.includes("--no-color"))&&(!!zn.FORCE_COLOR||Wa.includes("--color")||qn.platform==="win32"||(qn.stdout||{}).isTTY&&zn.TERM!=="dumb"||!!zn.CI),_f=(e,t,r=e)=>n=>{let i=""+n,s=i.indexOf(t,e.length);return~s?e+Nf(i,t,r,s)+t:e+i+t},Nf=(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)},za=(e=$f)=>{let t=e?_f:()=>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")}};ti.exports=za();ti.exports.createColors=za});var Pc=_((DF,ao)=>{ao.exports.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;ao.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]/;ao.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 Pi=_((CF,Tc)=>{var Ai=Pc();Tc.exports={isSpaceSeparator(e){return typeof e=="string"&&Ai.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Ai.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"||Ai.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 $c=_((yF,Bc)=>{var Ce=Pi(),Ri,Ie,jt,co,Jt,gt,ye,Bi,gn;Bc.exports=function(t,r){Ri=String(t),Ie="start",jt=[],co=0,Jt=1,gt=0,ye=void 0,Bi=void 0,gn=void 0;do ye=kh(),_h[Ie]();while(ye.type!=="eof");return typeof r=="function"?Ii({"":gn},"",r):gn};function Ii(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=Ii(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=Ii(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 V,j,mn,Mt,G;function kh(){for(V="default",j="",mn=!1,Mt=1;;){G=Ut();let e=Ic[V]();if(e)return e}}function Ut(){if(Ri[co])return String.fromCodePoint(Ri.codePointAt(co))}function b(){let e=Ut();return e===`
|
|
2
2
|
`?(Jt++,gt=0):e?gt+=e.length:gt++,e&&(co+=e.length),e}var Ic={default(){switch(G){case" ":case"\v":case"\f":case" ":case"\xA0":case"\uFEFF":case`
|
|
3
|
-
`:case"\r":case"\u2028":case"\u2029":b();return;case"/":b(),V="comment";return;case void 0:return b(),oe("eof")}if(Ce.isSpaceSeparator(G)){b();return}return Ic[
|
|
3
|
+
`:case"\r":case"\u2028":case"\u2029":b();return;case"/":b(),V="comment";return;case void 0:return b(),oe("eof")}if(Ce.isSpaceSeparator(G)){b();return}return Ic[Ie]()},comment(){switch(G){case"*":b(),V="multiLineComment";return;case"/":b(),V="singleLineComment";return}throw ie(b())},multiLineComment(){switch(G){case"*":b(),V="multiLineCommentAsterisk";return;case void 0:throw ie(b())}b()},multiLineCommentAsterisk(){switch(G){case"*":b();return;case"/":b(),V="default";return;case void 0:throw ie(b())}b(),V="multiLineComment"},singleLineComment(){switch(G){case`
|
|
4
4
|
`:case"\r":case"\u2028":case"\u2029":b(),V="default";return;case void 0:return b(),oe("eof")}b()},value(){switch(G){case"{":case"[":return oe("punctuator",b());case"n":return b(),cr("ull"),oe("null",null);case"t":return b(),cr("rue"),oe("boolean",!0);case"f":return b(),cr("alse"),oe("boolean",!1);case"-":case"+":b()==="-"&&(Mt=-1),V="sign";return;case".":j=b(),V="decimalPointLeading";return;case"0":j=b(),V="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":j=b(),V="decimalInteger";return;case"I":return b(),cr("nfinity"),oe("numeric",1/0);case"N":return b(),cr("aN"),oe("numeric",NaN);case'"':case"'":mn=b()==='"',j="",V="string";return}throw ie(b())},identifierNameStartEscape(){if(G!=="u")throw ie(b());b();let e=ki();switch(e){case"$":case"_":break;default:if(!Ce.isIdStartChar(e))throw Rc();break}j+=e,V="identifierName"},identifierName(){switch(G){case"$":case"_":case"\u200C":case"\u200D":j+=b();return;case"\\":b(),V="identifierNameEscape";return}if(Ce.isIdContinueChar(G)){j+=b();return}return oe("identifier",j)},identifierNameEscape(){if(G!=="u")throw ie(b());b();let e=ki();switch(e){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!Ce.isIdContinueChar(e))throw Rc();break}j+=e,V="identifierName"},sign(){switch(G){case".":j=b(),V="decimalPointLeading";return;case"0":j=b(),V="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":j=b(),V="decimalInteger";return;case"I":return b(),cr("nfinity"),oe("numeric",Mt*(1/0));case"N":return b(),cr("aN"),oe("numeric",NaN)}throw ie(b())},zero(){switch(G){case".":j+=b(),V="decimalPoint";return;case"e":case"E":j+=b(),V="decimalExponent";return;case"x":case"X":j+=b(),V="hexadecimal";return}return oe("numeric",Mt*0)},decimalInteger(){switch(G){case".":j+=b(),V="decimalPoint";return;case"e":case"E":j+=b(),V="decimalExponent";return}if(Ce.isDigit(G)){j+=b();return}return oe("numeric",Mt*Number(j))},decimalPointLeading(){if(Ce.isDigit(G)){j+=b(),V="decimalFraction";return}throw ie(b())},decimalPoint(){switch(G){case"e":case"E":j+=b(),V="decimalExponent";return}if(Ce.isDigit(G)){j+=b(),V="decimalFraction";return}return oe("numeric",Mt*Number(j))},decimalFraction(){switch(G){case"e":case"E":j+=b(),V="decimalExponent";return}if(Ce.isDigit(G)){j+=b();return}return oe("numeric",Mt*Number(j))},decimalExponent(){switch(G){case"+":case"-":j+=b(),V="decimalExponentSign";return}if(Ce.isDigit(G)){j+=b(),V="decimalExponentInteger";return}throw ie(b())},decimalExponentSign(){if(Ce.isDigit(G)){j+=b(),V="decimalExponentInteger";return}throw ie(b())},decimalExponentInteger(){if(Ce.isDigit(G)){j+=b();return}return oe("numeric",Mt*Number(j))},hexadecimal(){if(Ce.isHexDigit(G)){j+=b(),V="hexadecimalInteger";return}throw ie(b())},hexadecimalInteger(){if(Ce.isHexDigit(G)){j+=b();return}return oe("numeric",Mt*Number(j))},string(){switch(G){case"\\":b(),j+=Bh();return;case'"':if(mn)return b(),oe("string",j);j+=b();return;case"'":if(!mn)return b(),oe("string",j);j+=b();return;case`
|
|
5
5
|
`:case"\r":throw ie(b());case"\u2028":case"\u2029":Nh(G);break;case void 0:throw ie(b())}j+=b()},start(){switch(G){case"{":case"[":return oe("punctuator",b())}V="value"},beforePropertyName(){switch(G){case"$":case"_":j=b(),V="identifierName";return;case"\\":b(),V="identifierNameStartEscape";return;case"}":return oe("punctuator",b());case'"':case"'":mn=b()==='"',V="string";return}if(Ce.isIdStartChar(G)){j+=b(),V="identifierName";return}throw ie(b())},afterPropertyName(){if(G===":")return oe("punctuator",b());throw ie(b())},beforePropertyValue(){V="value"},afterPropertyValue(){switch(G){case",":case"}":return oe("punctuator",b())}throw ie(b())},beforeArrayValue(){if(G==="]")return oe("punctuator",b());V="value"},afterArrayValue(){switch(G){case",":case"]":return oe("punctuator",b())}throw ie(b())},end(){throw ie(b())}};function oe(e,t){return{type:e,value:t,line:Jt,column:gt}}function cr(e){for(let t of e){if(Ut()!==t)throw ie(b());b()}}function Bh(){switch(Ut()){case"b":return b(),"\b";case"f":return b(),"\f";case"n":return b(),`
|
|
6
6
|
`;case"r":return b(),"\r";case"t":return b()," ";case"v":return b(),"\v";case"0":if(b(),Ce.isDigit(Ut()))throw ie(b());return"\0";case"x":return b(),$h();case"u":return b(),ki();case`
|
|
7
7
|
`:case"\u2028":case"\u2029":return b(),"";case"\r":return b(),Ut()===`
|
|
8
|
-
`&&b(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ie(b());case void 0:throw ie(b())}return b()}function $h(){let e="",t=Ut();if(!Ce.isHexDigit(t)||(e+=b(),t=Ut(),!Ce.isHexDigit(t)))throw ie(b());return e+=b(),String.fromCodePoint(parseInt(e,16))}function ki(){let e="",t=4;for(;t-- >0;){let r=Ut();if(!Ce.isHexDigit(r))throw ie(b());e+=b()}return String.fromCodePoint(parseInt(e,16))}var _h={start(){if(ye.type==="eof")throw lr();Ti()},beforePropertyName(){switch(ye.type){case"identifier":case"string":Bi=ye.value,
|
|
8
|
+
`&&b(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ie(b());case void 0:throw ie(b())}return b()}function $h(){let e="",t=Ut();if(!Ce.isHexDigit(t)||(e+=b(),t=Ut(),!Ce.isHexDigit(t)))throw ie(b());return e+=b(),String.fromCodePoint(parseInt(e,16))}function ki(){let e="",t=4;for(;t-- >0;){let r=Ut();if(!Ce.isHexDigit(r))throw ie(b());e+=b()}return String.fromCodePoint(parseInt(e,16))}var _h={start(){if(ye.type==="eof")throw lr();Ti()},beforePropertyName(){switch(ye.type){case"identifier":case"string":Bi=ye.value,Ie="afterPropertyName";return;case"punctuator":uo();return;case"eof":throw lr()}},afterPropertyName(){if(ye.type==="eof")throw lr();Ie="beforePropertyValue"},beforePropertyValue(){if(ye.type==="eof")throw lr();Ti()},beforeArrayValue(){if(ye.type==="eof")throw lr();if(ye.type==="punctuator"&&ye.value==="]"){uo();return}Ti()},afterPropertyValue(){if(ye.type==="eof")throw lr();switch(ye.value){case",":Ie="beforePropertyName";return;case"}":uo()}},afterArrayValue(){if(ye.type==="eof")throw lr();switch(ye.value){case",":Ie="beforeArrayValue";return;case"]":uo()}},end(){}};function Ti(){let e;switch(ye.type){case"punctuator":switch(ye.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=ye.value;break}if(gn===void 0)gn=e;else{let t=jt[jt.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,Bi,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")jt.push(e),Array.isArray(e)?Ie="beforeArrayValue":Ie="beforePropertyName";else{let t=jt[jt.length-1];t==null?Ie="end":Array.isArray(t)?Ie="afterArrayValue":Ie="afterPropertyValue"}}function uo(){jt.pop();let e=jt[jt.length-1];e==null?Ie="end":Array.isArray(e)?Ie="afterArrayValue":Ie="afterPropertyValue"}function ie(e){return lo(e===void 0?`JSON5: invalid end of input at ${Jt}:${gt}`:`JSON5: invalid character '${kc(e)}' at ${Jt}:${gt}`)}function lr(){return lo(`JSON5: invalid end of input at ${Jt}:${gt}`)}function Rc(){return gt-=5,lo(`JSON5: invalid identifier character at ${Jt}:${gt}`)}function Nh(e){console.warn(`JSON5: '${kc(e)}' in strings is not valid ECMAScript; consider escaping`)}function kc(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let r=e.charCodeAt(0).toString(16);return"\\x"+("00"+r).substring(r.length)}return e}function lo(e){let t=new SyntaxError(e);return t.lineNumber=Jt,t.columnNumber=gt,t}});var Nc=_((xF,_c)=>{var $i=Pi();_c.exports=function(t,r,n){let i=[],s="",o,a,u="",c;if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&(n=r.space,c=r.quote,r=r.replacer),typeof r=="function")a=r;else if(Array.isArray(r)){o=[];for(let f of r){let g;typeof f=="string"?g=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(g=String(f)),g!==void 0&&o.indexOf(g)<0&&o.push(g)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),u=" ".substr(0,n)):typeof n=="string"&&(u=n.substr(0,10)),l("",{"":t});function l(f,g){let h=g[f];switch(h!=null&&(typeof h.toJSON5=="function"?h=h.toJSON5(f):typeof h.toJSON=="function"&&(h=h.toJSON(f))),a&&(h=a.call(g,f,h)),h instanceof Number?h=Number(h):h instanceof String?h=String(h):h instanceof Boolean&&(h=h.valueOf()),h){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof h=="string")return p(h,!1);if(typeof h=="number")return String(h);if(typeof h=="object")return Array.isArray(h)?m(h):d(h)}function p(f){let g={"'":.1,'"':.2},h={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},E="";for(let P=0;P<f.length;P++){let A=f[P];switch(A){case"'":case'"':g[A]++,E+=A;continue;case"\0":if($i.isDigit(f[P+1])){E+="\\x00";continue}}if(h[A]){E+=h[A];continue}if(A<" "){let F=A.charCodeAt(0).toString(16);E+="\\x"+("00"+F).substring(F.length);continue}E+=A}let v=c||Object.keys(g).reduce((P,A)=>g[P]<g[A]?P:A);return E=E.replace(new RegExp(v,"g"),h[v]),v+E+v}function d(f){if(i.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");i.push(f);let g=s;s=s+u;let h=o||Object.keys(f),E=[];for(let P of h){let A=l(P,f);if(A!==void 0){let F=D(P)+":";u!==""&&(F+=" "),F+=A,E.push(F)}}let v;if(E.length===0)v="{}";else{let P;if(u==="")P=E.join(","),v="{"+P+"}";else{let A=`,
|
|
9
9
|
`+s;P=E.join(A),v=`{
|
|
10
10
|
`+s+P+`,
|
|
11
11
|
`+g+"}"}}return i.pop(),s=g,v}function D(f){if(f.length===0)return p(f,!0);let g=String.fromCodePoint(f.codePointAt(0));if(!$i.isIdStartChar(g))return p(f,!0);for(let h=g.length;h<f.length;h++)if(!$i.isIdContinueChar(String.fromCodePoint(f.codePointAt(h))))return p(f,!0);return f}function m(f){if(i.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");i.push(f);let g=s;s=s+u;let h=[];for(let v=0;v<f.length;v++){let P=l(String(v),f);h.push(P!==void 0?P:"null")}let E;if(h.length===0)E="[]";else if(u==="")E="["+h.join(",")+"]";else{let v=`,
|
|
12
12
|
`+s,P=h.join(v);E=`[
|
|
13
13
|
`+s+P+`,
|
|
14
|
-
`+g+"]"}return i.pop(),s=g,E}}});var Lc=_((wF,Oc)=>{var Oh=$c(),Lh=Nc(),Mh={parse:Oh,stringify:Lh};Oc.exports=Mh});var Li=_(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.throwUnsupportedData=Yt.throwUnknownDataType=Yt.getType=void 0;function el(e){return Object.prototype.toString.call(e)}Yt.getType=el;function pD(e){throw new TypeError("unsupported data type: "+el(e))}Yt.throwUnknownDataType=pD;function dD(e){throw new TypeError("unsupported data type: "+e)}Yt.throwUnsupportedData=dD});var Hi=_(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.s_to_num=Ee.int_str_to_s=Ee.num_to_s=Ee.big_int_to_s=Ee.int_to_s=Ee.s_to_big_int=Ee.s_to_int=void 0;var Vt="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);Vt+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);Vt+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);Vt+=t}var Or=Vt.length,ji={};for(let e=0;e<Or;e++){let t=Vt[e];ji[t]=e}function Ui(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let i=e[n],s=ji[i];s*=r,t+=s,r*=Or}return t}Ee.s_to_int=Ui;function tl(e){let t=BigInt(0),r=BigInt(1),n=BigInt(Or);for(let i=e.length-1;i>=0;i--){let s=e[i],o=BigInt(ji[s]);o*=r,t+=o,r*=n}return t}Ee.s_to_big_int=tl;function Vi(e){if(e===0)return Vt[0];let t=[];for(;e!==0;){let r=e%Or,n=Vt[r];t.push(n),e-=r,e/=Or}return t.reverse().join("")}Ee.int_to_s=Vi;function rl(e){let t=BigInt(0),r=BigInt(Or);if(e===t)return Vt[0];let n=[];for(;e!==t;){let i=e%r,s=Vt[Number(i)];n.push(s),e/=r}return n.reverse().join("")}Ee.big_int_to_s=rl;function nl(e){return e.split("").reverse().join("")}function ol(e){if(e<0)return"-"+ol(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,o]=t.split("e");t=s,r="0e"+o}else return Vi(e);let n;r&&([r,n]=r.split("e")),t=fo(t),r=nl(r),r=fo(r);let i=t+"."+r;if(n){switch(i+=".",n[0]){case"+":n=n.slice(1);break;case"-":i+="-",n=n.slice(1);break}n=fo(n),i+=n}return i}Ee.num_to_s=ol;function fo(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?Vi(t):":"+rl(BigInt(e))}Ee.int_str_to_s=fo;function Mi(e){return e[0]===":"?tl(e.substring(1)).toString():Ui(e).toString()}function il(e){if(e[0]==="-")return-il(e.substr(1));let[t,r,n]=e.split(".");if(!r)return Ui(t);t=Mi(t),r=Mi(r),r=nl(r);let i=t+"."+r;if(n){i+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=Mi(n),i+=s?-n:+n}return+i}Ee.s_to_num=il});var Gi=_(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.decodeStr=ve.encodeStr=ve.decodeBool=ve.encodeBool=ve.decodeKey=ve.decodeNum=ve.encodeNum=void 0;var Ki=Hi();function fD(e){return"n|"+(0,Ki.num_to_s)(e)}ve.encodeNum=fD;function mD(e){return e=e.replace("n|",""),(0,Ki.s_to_num)(e)}ve.decodeNum=mD;function gD(e){return typeof e=="number"?e:(0,Ki.s_to_int)(e)}ve.decodeKey=gD;function hD(e){return e?"b|T":"b|F"}ve.encodeBool=hD;function DD(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}ve.decodeBool=DD;function CD(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}ve.encodeStr=CD;function yD(e){return e[0]+e[1]==="s|"?e.substr(2):e}ve.decodeStr=yD});var Wi=_(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.config=void 0;mo.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var Yi=_(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.addValue=it.makeInMemoryMemory=it.makeInMemoryCache=it.makeInMemoryStore=it.memToValues=void 0;var Ji=Wi(),zi=Li(),qi=Gi(),xD=Hi();function wD(e){return e.store.toArray()}it.memToValues=wD;function sl(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}it.makeInMemoryStore=sl;function al(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,i]of Object.entries(e))if(r(n,i)==="break")return},forEachSchema(r){for(let[n,i]of Object.entries(t))if(r(n,i)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}it.makeInMemoryCache=al;function bD(){return{store:sl(),cache:al(),keyCount:0}}it.makeInMemoryMemory=bD;function dr(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,xD.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function ED(e,t){Ji.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=Dn(e,t,void 0);return e.cache.setSchema(r,n),n}function Dn(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return Dn(e,null,r);break;case"object":if(t===null)return dr(e,null);if(Array.isArray(t)){let n="a";for(let i=0;i<t.length;i++){let s=t[i],o=s===null?"_":Dn(e,s,t);n+="|"+o}return n==="a"&&(n="a|"),dr(e,n)}else{let n=Object.keys(t);if(n.length===0)return dr(e,"o|");let i="o",s=ED(e,n);i+="|"+s;for(let o of n){let a=t[o],u=Dn(e,a,t);i+="|"+u}return dr(e,i)}case"boolean":return dr(e,(0,qi.encodeBool)(t));case"number":return Number.isNaN(t)?(Ji.config.error_on_nan&&(0,zi.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(Ji.config.error_on_infinite&&(0,zi.throwUnsupportedData)("[number Infinity]"),""):dr(e,(0,qi.encodeNum)(t));case"string":return dr(e,(0,qi.encodeStr)(t))}return(0,zi.throwUnknownDataType)(t)}it.addValue=Dn});var Xi=_(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.decompress=Qt.decode=Qt.compress=void 0;var vD=Li(),go=Gi(),Qi=Yi();function SD(e){let t=(0,Qi.makeInMemoryMemory)(),r=(0,Qi.addValue)(t,e,void 0);return[(0,Qi.memToValues)(t),r]}Qt.compress=SD;function FD(e,t){if(t==="o|")return{};let r={},n=t.split("|"),i=n[1],s=Cn(e,i),o=n.length;o-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<o;a++){let u=s[a-2],c=n[a];c=Cn(e,c),r[u]=c}return r}function AD(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,i=new Array(n);for(let s=0;s<n;s++){let o=r[s+1];o=Cn(e,o),i[s]=o}return i}function Cn(e,t){if(t===""||t==="_")return null;let r=(0,go.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,go.decodeBool)(n);case"o|":return FD(e,n);case"n|":return(0,go.decodeNum)(n);case"a|":return AD(e,n);default:return(0,go.decodeStr)(n)}}return(0,vD.throwUnknownDataType)(n)}Qt.decode=Cn;function PD(e){let[t,r]=e;return Cn(t,r)}Qt.decompress=PD});var cl=_(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.trimUndefinedRecursively=Lr.trimUndefined=void 0;function TD(e){for(let t in e)e[t]===void 0&&delete e[t]}Lr.trimUndefined=TD;function RD(e){ul(e,new Set)}Lr.trimUndefinedRecursively=RD;function ul(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&ul(n,t)}}});var dl=_(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.config=Se.trimUndefinedRecursively=Se.trimUndefined=Se.addValue=Se.decode=Se.decompress=Se.compress=void 0;var ll=Xi();Object.defineProperty(Se,"compress",{enumerable:!0,get:function(){return ll.compress}});Object.defineProperty(Se,"decompress",{enumerable:!0,get:function(){return ll.decompress}});var ID=Xi();Object.defineProperty(Se,"decode",{enumerable:!0,get:function(){return ID.decode}});var kD=Yi();Object.defineProperty(Se,"addValue",{enumerable:!0,get:function(){return kD.addValue}});var pl=cl();Object.defineProperty(Se,"trimUndefined",{enumerable:!0,get:function(){return pl.trimUndefined}});Object.defineProperty(Se,"trimUndefinedRecursively",{enumerable:!0,get:function(){return pl.trimUndefinedRecursively}});var BD=Wi();Object.defineProperty(Se,"config",{enumerable:!0,get:function(){return BD.config}})});var Nl=_((_1,_l)=>{"use strict";var $l=require("child_process"),Il=$l.spawn,sC=$l.exec;_l.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":sC("taskkill /pid "+e+" /T /F",r);break;case"darwin":gs(e,n,i,function(s){return Il("pgrep",["-P",s])},function(){kl(n,t,r)});break;default:gs(e,n,i,function(s){return Il("ps",["-o","pid","--no-headers","--ppid",s])},function(){kl(n,t,r)});break}};function kl(e,t,r){var n={};try{Object.keys(e).forEach(function(i){e[i].forEach(function(s){n[s]||(Bl(s,t),n[s]=1)}),n[i]||(Bl(i,t),n[i]=1)})}catch(i){if(r)return r(i);throw i}if(r)return r()}function Bl(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function gs(e,t,r,n,i){var s=n(e),o="";s.stdout.on("data",function(c){var c=c.toString("ascii");o+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&i();return}o.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,gs(c,t,r,n,i)})};s.on("close",a)}});var Sn=_(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.isSSL=void 0;qe.setupOutgoing=lC;qe.setupSocket=pC;qe.getPort=dC;qe.hasEncryptedConnection=Ll;qe.urlJoin=Ml;qe.rewriteCookieProperty=jl;qe.toURL=Ul;var aC=require("tls"),uC=/(^|,)\s*upgrade\s*($|,)/i;qe.isSSL=/^https|wss/;var cC="trailer";function lC(e,t,r,n){let i=t[n||"target"];e.port=+(i.port??(i.protocol!==void 0&&qe.isSSL.test(i.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=i[a];e.method=t.method||r.method,e.headers={...r.headers},t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(cC==a.toLowerCase()){delete e.headers[a];break}t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),i.protocol!==void 0&&qe.isSSL.test(i.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!uC.test(e.headers.connection))&&(e.headers.connection="close"));let s=i&&t.prependPath!==!1&&"pathname"in i?Ol(`${i.pathname}${i.search??""}`):"/",o=t.toProxy?r.url:Ol(r.url);return o=t.ignorePath?"":o,e.path=Ml(s,o??""),t.changeOrigin&&(e.headers.host=i.protocol!==void 0&&mC(e.port,i.protocol)&&!fC(e.host)?e.host+":"+e.port:e.host),e}function pC(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function dC(e){let t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:Ll(e)?"443":"80"}function Ll(e){let t=e.connection;return t instanceof aC.TLSSocket&&t.encrypted||!!t.pair}function Ml(...e){let t=[],r="";e.forEach((i,s)=>{let o=i.indexOf("?");o!==-1&&(t.push(i.substring(o+1)),e[s]=i.substring(0,o))}),r=t.filter(Boolean).join("&");let n="";for(let i of e)i&&(n.endsWith("/")?i.startsWith("/")?n+=i.slice(1):n+=i:i.startsWith("/")?n+=i:n+="/"+i);return r?n+"?"+r:n}function jl(e,t,r){return Array.isArray(e)?e.map(n=>jl(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,i,s)=>{let o;if(s in t)o=t[s];else if("*"in t)o=t["*"];else return n;return o?i+o:""})}function fC(e){return!!~e.indexOf(":")}function Ol(e){if(e===""||e?.startsWith("?"))return e;let t=Ul(e);return`${t.pathname??""}${t.search??""}`}function Ul(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://dummy.org${e}`),new URL(e,"http://dummy.org"))}function mC(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var zl=_(Ie=>{"use strict";var gC=Ie&&Ie.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),hC=Ie&&Ie.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DC=Ie&&Ie.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&gC(r,t,n[i]);return hC(r,t),r}}();Object.defineProperty(Ie,"__esModule",{value:!0});Ie.OUTGOING_PASSES=void 0;Ie.removeChunked=Vl;Ie.setConnection=Hl;Ie.setRedirectHostRewrite=Kl;Ie.writeHeaders=Gl;Ie.writeStatusCode=Wl;var vo=DC(Sn()),CC=/^201|30(1|2|7|8)$/;function Vl(e,t,r){e.httpVersion==="1.0"&&delete r.headers["transfer-encoding"]}function Hl(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function Kl(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&CC.test(`${r.statusCode}`)){let i=vo.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let o=vo.toURL(s);if(i.host!=o.host)return;n.hostRewrite?o.host=n.hostRewrite:n.autoRewrite&&(o.host=e.headers.host??""),n.protocolRewrite&&(o.protocol=n.protocolRewrite),r.headers.location=o.toString()}}function Gl(e,t,r,n){let i=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,o=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(i&&c.toLowerCase()==="set-cookie"&&(l=vo.rewriteCookieProperty(l,i,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=vo.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(o&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c,p=r.headers[l];o&&u&&(l=u[l]??l),a(l,p)}}function Wl(e,t,r){r.statusMessage?(t.statusCode=r.statusCode,t.statusMessage=r.statusMessage):t.statusCode=r.statusCode}Ie.OUTGOING_PASSES={removeChunked:Vl,setConnection:Hl,setRedirectHostRewrite:Kl,writeHeaders:Gl,writeStatusCode:Wl}});var Jl=_((j1,ql)=>{var Ur=1e3,Vr=Ur*60,Hr=Vr*60,hr=Hr*24,yC=hr*7,xC=hr*365.25;ql.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return wC(e);if(r==="number"&&isFinite(e))return t.long?EC(e):bC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function wC(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*xC;case"weeks":case"week":case"w":return r*yC;case"days":case"day":case"d":return r*hr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Hr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Vr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ur;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function bC(e){var t=Math.abs(e);return t>=hr?Math.round(e/hr)+"d":t>=Hr?Math.round(e/Hr)+"h":t>=Vr?Math.round(e/Vr)+"m":t>=Ur?Math.round(e/Ur)+"s":e+"ms"}function EC(e){var t=Math.abs(e);return t>=hr?So(e,t,hr,"day"):t>=Hr?So(e,t,Hr,"hour"):t>=Vr?So(e,t,Vr,"minute"):t>=Ur?So(e,t,Ur,"second"):e+" ms"}function So(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var hs=_((U1,Yl)=>{function vC(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Jl(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,D,m;function f(...g){if(!f.enabled)return;let h=f,E=Number(new Date),v=E-(p||E);h.diff=v,h.prev=p,h.curr=E,p=E,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let P=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(F,T)=>{if(F==="%%")return"%";P++;let k=r.formatters[T];if(typeof k=="function"){let I=g[P];F=k.call(h,I),g.splice(P,1),P--}return F}),r.formatArgs.call(h,g),(h.log||r.log).apply(h,g)}return f.namespace=l,f.useColors=r.useColors(),f.color=r.selectColor(l),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(D!==r.namespaces&&(D=r.namespaces,m=r.enabled(l)),m),set:g=>{d=g}}),typeof r.init=="function"&&r.init(f),f}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,D=0,m=-1,f=0;for(;d<l.length;)if(D<p.length&&(p[D]===l[d]||p[D]==="*"))p[D]==="*"?(m=D,f=d,D++):(d++,D++);else if(m!==-1)D=m+1,f++,d=f;else return!1;for(;D<p.length&&p[D]==="*";)D++;return D===p.length}function o(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){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}Yl.exports=vC});var Ql=_((Je,Fo)=>{Je.formatArgs=FC;Je.save=AC;Je.load=PC;Je.useColors=SC;Je.storage=TC();Je.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`."))}})();Je.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 SC(){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 FC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Fo.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)}Je.log=console.debug||console.log||(()=>{});function AC(e){try{e?Je.storage.setItem("debug",e):Je.storage.removeItem("debug")}catch{}}function PC(){let e;try{e=Je.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function TC(){try{return localStorage}catch{}}Fo.exports=hs()(Je);var{formatters:RC}=Fo.exports;RC.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Zl=_((V1,Xl)=>{"use strict";Xl.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 rp=_((H1,tp)=>{"use strict";var IC=require("os"),ep=require("tty"),at=Zl(),{env:xe}=process,Xt;at("no-color")||at("no-colors")||at("color=false")||at("color=never")?Xt=0:(at("color")||at("colors")||at("color=true")||at("color=always"))&&(Xt=1);"FORCE_COLOR"in xe&&(xe.FORCE_COLOR==="true"?Xt=1:xe.FORCE_COLOR==="false"?Xt=0:Xt=xe.FORCE_COLOR.length===0?1:Math.min(parseInt(xe.FORCE_COLOR,10),3));function Ds(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Cs(e,t){if(Xt===0)return 0;if(at("color=16m")||at("color=full")||at("color=truecolor"))return 3;if(at("color=256"))return 2;if(e&&!t&&Xt===void 0)return 0;let r=Xt||0;if(xe.TERM==="dumb")return r;if(process.platform==="win32"){let n=IC.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in xe)||xe.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xe.TEAMCITY_VERSION)?1:0;if(xe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xe){let n=parseInt((xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xe.TERM)||"COLORTERM"in xe?1:r}function kC(e){let t=Cs(e,e&&e.isTTY);return Ds(t)}tp.exports={supportsColor:kC,stdout:Ds(Cs(!0,ep.isatty(1))),stderr:Ds(Cs(!0,ep.isatty(2)))}});var op=_((we,Po)=>{var BC=require("tty"),Ao=require("util");we.init=jC;we.log=OC;we.formatArgs=_C;we.save=LC;we.load=MC;we.useColors=$C;we.destroy=Ao.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");we.colors=[6,2,3,4,5,1];try{let e=rp();e&&(e.stderr||e).level>=2&&(we.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{}we.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 $C(){return"colors"in we.inspectOpts?!!we.inspectOpts.colors:BC.isatty(process.stderr.fd)}function _C(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(`
|
|
14
|
+
`+g+"]"}return i.pop(),s=g,E}}});var Lc=_((wF,Oc)=>{var Oh=$c(),Lh=Nc(),Mh={parse:Oh,stringify:Lh};Oc.exports=Mh});var Li=_(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.throwUnsupportedData=Yt.throwUnknownDataType=Yt.getType=void 0;function el(e){return Object.prototype.toString.call(e)}Yt.getType=el;function pD(e){throw new TypeError("unsupported data type: "+el(e))}Yt.throwUnknownDataType=pD;function dD(e){throw new TypeError("unsupported data type: "+e)}Yt.throwUnsupportedData=dD});var Hi=_(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.s_to_num=Ee.int_str_to_s=Ee.num_to_s=Ee.big_int_to_s=Ee.int_to_s=Ee.s_to_big_int=Ee.s_to_int=void 0;var Vt="";for(let e=0;e<10;e++){let t=String.fromCharCode(48+e);Vt+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(65+e);Vt+=t}for(let e=0;e<26;e++){let t=String.fromCharCode(97+e);Vt+=t}var Or=Vt.length,ji={};for(let e=0;e<Or;e++){let t=Vt[e];ji[t]=e}function Ui(e){let t=0,r=1;for(let n=e.length-1;n>=0;n--){let i=e[n],s=ji[i];s*=r,t+=s,r*=Or}return t}Ee.s_to_int=Ui;function tl(e){let t=BigInt(0),r=BigInt(1),n=BigInt(Or);for(let i=e.length-1;i>=0;i--){let s=e[i],o=BigInt(ji[s]);o*=r,t+=o,r*=n}return t}Ee.s_to_big_int=tl;function Vi(e){if(e===0)return Vt[0];let t=[];for(;e!==0;){let r=e%Or,n=Vt[r];t.push(n),e-=r,e/=Or}return t.reverse().join("")}Ee.int_to_s=Vi;function rl(e){let t=BigInt(0),r=BigInt(Or);if(e===t)return Vt[0];let n=[];for(;e!==t;){let i=e%r,s=Vt[Number(i)];n.push(s),e/=r}return n.reverse().join("")}Ee.big_int_to_s=rl;function nl(e){return e.split("").reverse().join("")}function ol(e){if(e<0)return"-"+ol(-e);let[t,r]=e.toString().split(".");if(!r)if(t.includes("e")){let[s,o]=t.split("e");t=s,r="0e"+o}else return Vi(e);let n;r&&([r,n]=r.split("e")),t=fo(t),r=nl(r),r=fo(r);let i=t+"."+r;if(n){switch(i+=".",n[0]){case"+":n=n.slice(1);break;case"-":i+="-",n=n.slice(1);break}n=fo(n),i+=n}return i}Ee.num_to_s=ol;function fo(e){let t=+e;return t.toString()===e&&t+1!==t&&t-1!==t?Vi(t):":"+rl(BigInt(e))}Ee.int_str_to_s=fo;function Mi(e){return e[0]===":"?tl(e.substring(1)).toString():Ui(e).toString()}function il(e){if(e[0]==="-")return-il(e.substr(1));let[t,r,n]=e.split(".");if(!r)return Ui(t);t=Mi(t),r=Mi(r),r=nl(r);let i=t+"."+r;if(n){i+="e";let s=!1;n[0]==="-"&&(s=!0,n=n.slice(1)),n=Mi(n),i+=s?-n:+n}return+i}Ee.s_to_num=il});var Gi=_(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.decodeStr=ve.encodeStr=ve.decodeBool=ve.encodeBool=ve.decodeKey=ve.decodeNum=ve.encodeNum=void 0;var Ki=Hi();function fD(e){return"n|"+(0,Ki.num_to_s)(e)}ve.encodeNum=fD;function mD(e){return e=e.replace("n|",""),(0,Ki.s_to_num)(e)}ve.decodeNum=mD;function gD(e){return typeof e=="number"?e:(0,Ki.s_to_int)(e)}ve.decodeKey=gD;function hD(e){return e?"b|T":"b|F"}ve.encodeBool=hD;function DD(e){switch(e){case"b|T":return!0;case"b|F":return!1}return!!e}ve.decodeBool=DD;function CD(e){switch(e[0]+e[1]){case"b|":case"o|":case"n|":case"a|":case"s|":e="s|"+e}return e}ve.encodeStr=CD;function yD(e){return e[0]+e[1]==="s|"?e.substr(2):e}ve.decodeStr=yD});var Wi=_(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.config=void 0;mo.config={sort_key:!1,error_on_nan:!1,error_on_infinite:!1}});var Yi=_(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.addValue=it.makeInMemoryMemory=it.makeInMemoryCache=it.makeInMemoryStore=it.memToValues=void 0;var Ji=Wi(),zi=Li(),qi=Gi(),xD=Hi();function wD(e){return e.store.toArray()}it.memToValues=wD;function sl(){let e=[];return{forEach(t){for(let r=0;r<e.length;r++)if(t(e[r])==="break")return},add(t){e.push(t)},toArray(){return e}}}it.makeInMemoryStore=sl;function al(){let e=Object.create(null),t=Object.create(null);return{getValue(r){return e[r]},getSchema(r){return t[r]},forEachValue(r){for(let[n,i]of Object.entries(e))if(r(n,i)==="break")return},forEachSchema(r){for(let[n,i]of Object.entries(t))if(r(n,i)==="break")return},setValue(r,n){e[r]=n},setSchema(r,n){t[r]=n},hasValue(r){return r in e},hasSchema(r){return r in t}}}it.makeInMemoryCache=al;function bD(){return{store:sl(),cache:al(),keyCount:0}}it.makeInMemoryMemory=bD;function dr(e,t){if(e.cache.hasValue(t))return e.cache.getValue(t);let r=e.keyCount++,n=(0,xD.num_to_s)(r);return e.store.add(t),e.cache.setValue(t,n),n}function ED(e,t){Ji.config.sort_key&&t.sort();let r=t.join(",");if(e.cache.hasSchema(r))return e.cache.getSchema(r);let n=Dn(e,t,void 0);return e.cache.setSchema(r,n),n}function Dn(e,t,r){if(t===null)return"";switch(typeof t){case"undefined":if(Array.isArray(r))return Dn(e,null,r);break;case"object":if(t===null)return dr(e,null);if(Array.isArray(t)){let n="a";for(let i=0;i<t.length;i++){let s=t[i],o=s===null?"_":Dn(e,s,t);n+="|"+o}return n==="a"&&(n="a|"),dr(e,n)}else{let n=Object.keys(t);if(n.length===0)return dr(e,"o|");let i="o",s=ED(e,n);i+="|"+s;for(let o of n){let a=t[o],u=Dn(e,a,t);i+="|"+u}return dr(e,i)}case"boolean":return dr(e,(0,qi.encodeBool)(t));case"number":return Number.isNaN(t)?(Ji.config.error_on_nan&&(0,zi.throwUnsupportedData)("[number NaN]"),""):Number.POSITIVE_INFINITY===t||Number.NEGATIVE_INFINITY===t?(Ji.config.error_on_infinite&&(0,zi.throwUnsupportedData)("[number Infinity]"),""):dr(e,(0,qi.encodeNum)(t));case"string":return dr(e,(0,qi.encodeStr)(t))}return(0,zi.throwUnknownDataType)(t)}it.addValue=Dn});var Xi=_(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.decompress=Qt.decode=Qt.compress=void 0;var vD=Li(),go=Gi(),Qi=Yi();function SD(e){let t=(0,Qi.makeInMemoryMemory)(),r=(0,Qi.addValue)(t,e,void 0);return[(0,Qi.memToValues)(t),r]}Qt.compress=SD;function FD(e,t){if(t==="o|")return{};let r={},n=t.split("|"),i=n[1],s=Cn(e,i),o=n.length;o-2===1&&!Array.isArray(s)&&(s=[s]);for(let a=2;a<o;a++){let u=s[a-2],c=n[a];c=Cn(e,c),r[u]=c}return r}function AD(e,t){if(t==="a|")return[];let r=t.split("|"),n=r.length-1,i=new Array(n);for(let s=0;s<n;s++){let o=r[s+1];o=Cn(e,o),i[s]=o}return i}function Cn(e,t){if(t===""||t==="_")return null;let r=(0,go.decodeKey)(t),n=e[r];if(n===null)return n;switch(typeof n){case"undefined":return n;case"number":return n;case"string":switch(n[0]+n[1]){case"b|":return(0,go.decodeBool)(n);case"o|":return FD(e,n);case"n|":return(0,go.decodeNum)(n);case"a|":return AD(e,n);default:return(0,go.decodeStr)(n)}}return(0,vD.throwUnknownDataType)(n)}Qt.decode=Cn;function PD(e){let[t,r]=e;return Cn(t,r)}Qt.decompress=PD});var cl=_(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.trimUndefinedRecursively=Lr.trimUndefined=void 0;function TD(e){for(let t in e)e[t]===void 0&&delete e[t]}Lr.trimUndefined=TD;function RD(e){ul(e,new Set)}Lr.trimUndefinedRecursively=RD;function ul(e,t){t.add(e);for(let r in e)if(e[r]===void 0)delete e[r];else{let n=e[r];n&&typeof n=="object"&&!t.has(n)&&ul(n,t)}}});var dl=_(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.config=Se.trimUndefinedRecursively=Se.trimUndefined=Se.addValue=Se.decode=Se.decompress=Se.compress=void 0;var ll=Xi();Object.defineProperty(Se,"compress",{enumerable:!0,get:function(){return ll.compress}});Object.defineProperty(Se,"decompress",{enumerable:!0,get:function(){return ll.decompress}});var ID=Xi();Object.defineProperty(Se,"decode",{enumerable:!0,get:function(){return ID.decode}});var kD=Yi();Object.defineProperty(Se,"addValue",{enumerable:!0,get:function(){return kD.addValue}});var pl=cl();Object.defineProperty(Se,"trimUndefined",{enumerable:!0,get:function(){return pl.trimUndefined}});Object.defineProperty(Se,"trimUndefinedRecursively",{enumerable:!0,get:function(){return pl.trimUndefinedRecursively}});var BD=Wi();Object.defineProperty(Se,"config",{enumerable:!0,get:function(){return BD.config}})});var Nl=_((_1,_l)=>{"use strict";var $l=require("child_process"),Il=$l.spawn,sC=$l.exec;_l.exports=function(e,t,r){if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),e=parseInt(e),Number.isNaN(e)){if(r)return r(new Error("pid must be a number"));throw new Error("pid must be a number")}var n={},i={};switch(n[e]=[],i[e]=1,process.platform){case"win32":sC("taskkill /pid "+e+" /T /F",r);break;case"darwin":gs(e,n,i,function(s){return Il("pgrep",["-P",s])},function(){kl(n,t,r)});break;default:gs(e,n,i,function(s){return Il("ps",["-o","pid","--no-headers","--ppid",s])},function(){kl(n,t,r)});break}};function kl(e,t,r){var n={};try{Object.keys(e).forEach(function(i){e[i].forEach(function(s){n[s]||(Bl(s,t),n[s]=1)}),n[i]||(Bl(i,t),n[i]=1)})}catch(i){if(r)return r(i);throw i}if(r)return r()}function Bl(e,t){try{process.kill(parseInt(e,10),t)}catch(r){if(r.code!=="ESRCH")throw r}}function gs(e,t,r,n,i){var s=n(e),o="";s.stdout.on("data",function(c){var c=c.toString("ascii");o+=c});var a=function(u){if(delete r[e],u!=0){Object.keys(r).length==0&&i();return}o.match(/\d+/g).forEach(function(c){c=parseInt(c,10),t[e].push(c),t[c]=[],r[c]=1,gs(c,t,r,n,i)})};s.on("close",a)}});var Sn=_(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.isSSL=void 0;qe.setupOutgoing=lC;qe.setupSocket=pC;qe.getPort=dC;qe.hasEncryptedConnection=Ll;qe.urlJoin=Ml;qe.rewriteCookieProperty=jl;qe.toURL=Ul;var aC=require("tls"),uC=/(^|,)\s*upgrade\s*($|,)/i;qe.isSSL=/^https|wss/;var cC="trailer";function lC(e,t,r,n){let i=t[n||"target"];e.port=+(i.port??(i.protocol!==void 0&&qe.isSSL.test(i.protocol)?443:80));for(let a of["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"])e[a]=i[a];e.method=t.method||r.method,e.headers={...r.headers},t.headers&&(e.headers={...e.headers,...t.headers});for(let a in e.headers)if(cC==a.toLowerCase()){delete e.headers[a];break}t.auth&&(delete e.headers.authorization,e.auth=t.auth),t.ca&&(e.ca=t.ca),i.protocol!==void 0&&qe.isSSL.test(i.protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!uC.test(e.headers.connection))&&(e.headers.connection="close"));let s=i&&t.prependPath!==!1&&"pathname"in i?Ol(`${i.pathname}${i.search??""}`):"/",o=t.toProxy?r.url:Ol(r.url);return o=t.ignorePath?"":o,e.path=Ml(s,o??""),t.changeOrigin&&(e.headers.host=i.protocol!==void 0&&mC(e.port,i.protocol)&&!fC(e.host)?e.host+":"+e.port:e.host),e}function pC(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e}function dC(e){let t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:Ll(e)?"443":"80"}function Ll(e){let t=e.connection;return t instanceof aC.TLSSocket&&t.encrypted||!!t.pair}function Ml(...e){let t=[],r="";e.forEach((i,s)=>{let o=i.indexOf("?");o!==-1&&(t.push(i.substring(o+1)),e[s]=i.substring(0,o))}),r=t.filter(Boolean).join("&");let n="";for(let i of e)i&&(n.endsWith("/")?i.startsWith("/")?n+=i.slice(1):n+=i:i.startsWith("/")?n+=i:n+="/"+i);return r?n+"?"+r:n}function jl(e,t,r){return Array.isArray(e)?e.map(n=>jl(n,t,r)):e.replace(new RegExp("(;\\s*"+r+"=)([^;]+)","i"),(n,i,s)=>{let o;if(s in t)o=t[s];else if("*"in t)o=t["*"];else return n;return o?i+o:""})}function fC(e){return!!~e.indexOf(":")}function Ol(e){if(e===""||e?.startsWith("?"))return e;let t=Ul(e);return`${t.pathname??""}${t.search??""}`}function Ul(e){return e instanceof URL?e:(typeof e=="object"&&"href"in e&&typeof e.href=="string"&&(e=e.href),e||(e=""),typeof e!="string"&&(e=`${e}`),e.startsWith("//")&&(e=`http://dummy.org${e}`),new URL(e,"http://dummy.org"))}function mC(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443}return e!==0}});var zl=_(ke=>{"use strict";var gC=ke&&ke.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),hC=ke&&ke.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DC=ke&&ke.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&gC(r,t,n[i]);return hC(r,t),r}}();Object.defineProperty(ke,"__esModule",{value:!0});ke.OUTGOING_PASSES=void 0;ke.removeChunked=Vl;ke.setConnection=Hl;ke.setRedirectHostRewrite=Kl;ke.writeHeaders=Gl;ke.writeStatusCode=Wl;var vo=DC(Sn()),CC=/^201|30(1|2|7|8)$/;function Vl(e,t,r){e.httpVersion==="1.0"&&delete r.headers["transfer-encoding"]}function Hl(e,t,r){e.httpVersion==="1.0"?r.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!r.headers.connection&&(r.headers.connection=e.headers.connection||"keep-alive")}function Kl(e,t,r,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&r.headers.location&&CC.test(`${r.statusCode}`)){let i=vo.toURL(n.target),s=r.headers.location;if(typeof s!="string")return;let o=vo.toURL(s);if(i.host!=o.host)return;n.hostRewrite?o.host=n.hostRewrite:n.autoRewrite&&(o.host=e.headers.host??""),n.protocolRewrite&&(o.protocol=n.protocolRewrite),r.headers.location=o.toString()}}function Gl(e,t,r,n){let i=typeof n.cookieDomainRewrite=="string"?{"*":n.cookieDomainRewrite}:n.cookieDomainRewrite,s=typeof n.cookiePathRewrite=="string"?{"*":n.cookiePathRewrite}:n.cookiePathRewrite,o=n.preserveHeaderKeyCase,a=(c,l)=>{l!=null&&(i&&c.toLowerCase()==="set-cookie"&&(l=vo.rewriteCookieProperty(l,i,"domain")),s&&c.toLowerCase()==="set-cookie"&&(l=vo.rewriteCookieProperty(l,s,"path")),t.setHeader(String(c).trim(),l))},u;if(o&&r.rawHeaders!=null){u={};for(let c=0;c<r.rawHeaders.length;c+=2){let l=r.rawHeaders[c];u[l.toLowerCase()]=l}}for(let c in r.headers){let l=c,p=r.headers[l];o&&u&&(l=u[l]??l),a(l,p)}}function Wl(e,t,r){r.statusMessage?(t.statusCode=r.statusCode,t.statusMessage=r.statusMessage):t.statusCode=r.statusCode}ke.OUTGOING_PASSES={removeChunked:Vl,setConnection:Hl,setRedirectHostRewrite:Kl,writeHeaders:Gl,writeStatusCode:Wl}});var Jl=_((j1,ql)=>{var Ur=1e3,Vr=Ur*60,Hr=Vr*60,hr=Hr*24,yC=hr*7,xC=hr*365.25;ql.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return wC(e);if(r==="number"&&isFinite(e))return t.long?EC(e):bC(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function wC(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*xC;case"weeks":case"week":case"w":return r*yC;case"days":case"day":case"d":return r*hr;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Hr;case"minutes":case"minute":case"mins":case"min":case"m":return r*Vr;case"seconds":case"second":case"secs":case"sec":case"s":return r*Ur;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function bC(e){var t=Math.abs(e);return t>=hr?Math.round(e/hr)+"d":t>=Hr?Math.round(e/Hr)+"h":t>=Vr?Math.round(e/Vr)+"m":t>=Ur?Math.round(e/Ur)+"s":e+"ms"}function EC(e){var t=Math.abs(e);return t>=hr?So(e,t,hr,"day"):t>=Hr?So(e,t,Hr,"hour"):t>=Vr?So(e,t,Vr,"minute"):t>=Ur?So(e,t,Ur,"second"):e+" ms"}function So(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}});var hs=_((U1,Yl)=>{function vC(e){r.debug=r,r.default=r,r.coerce=u,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Jl(),r.destroy=c,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,D,m;function f(...g){if(!f.enabled)return;let h=f,E=Number(new Date),v=E-(p||E);h.diff=v,h.prev=p,h.curr=E,p=E,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let P=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(F,T)=>{if(F==="%%")return"%";P++;let k=r.formatters[T];if(typeof k=="function"){let I=g[P];F=k.call(h,I),g.splice(P,1),P--}return F}),r.formatArgs.call(h,g),(h.log||r.log).apply(h,g)}return f.namespace=l,f.useColors=r.useColors(),f.color=r.selectColor(l),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(D!==r.namespaces&&(D=r.namespaces,m=r.enabled(l)),m),set:g=>{d=g}}),typeof r.init=="function"&&r.init(f),f}function n(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function i(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,D=0,m=-1,f=0;for(;d<l.length;)if(D<p.length&&(p[D]===l[d]||p[D]==="*"))p[D]==="*"?(m=D,f=d,D++):(d++,D++);else if(m!==-1)D=m+1,f++,d=f;else return!1;for(;D<p.length&&p[D]==="*";)D++;return D===p.length}function o(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function u(l){return l instanceof Error?l.stack||l.message:l}function c(){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}Yl.exports=vC});var Ql=_((Je,Fo)=>{Je.formatArgs=FC;Je.save=AC;Je.load=PC;Je.useColors=SC;Je.storage=TC();Je.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`."))}})();Je.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 SC(){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 FC(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Fo.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)}Je.log=console.debug||console.log||(()=>{});function AC(e){try{e?Je.storage.setItem("debug",e):Je.storage.removeItem("debug")}catch{}}function PC(){let e;try{e=Je.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function TC(){try{return localStorage}catch{}}Fo.exports=hs()(Je);var{formatters:RC}=Fo.exports;RC.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Zl=_((V1,Xl)=>{"use strict";Xl.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 rp=_((H1,tp)=>{"use strict";var IC=require("os"),ep=require("tty"),at=Zl(),{env:xe}=process,Xt;at("no-color")||at("no-colors")||at("color=false")||at("color=never")?Xt=0:(at("color")||at("colors")||at("color=true")||at("color=always"))&&(Xt=1);"FORCE_COLOR"in xe&&(xe.FORCE_COLOR==="true"?Xt=1:xe.FORCE_COLOR==="false"?Xt=0:Xt=xe.FORCE_COLOR.length===0?1:Math.min(parseInt(xe.FORCE_COLOR,10),3));function Ds(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Cs(e,t){if(Xt===0)return 0;if(at("color=16m")||at("color=full")||at("color=truecolor"))return 3;if(at("color=256"))return 2;if(e&&!t&&Xt===void 0)return 0;let r=Xt||0;if(xe.TERM==="dumb")return r;if(process.platform==="win32"){let n=IC.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in xe)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in xe)||xe.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in xe)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(xe.TEAMCITY_VERSION)?1:0;if(xe.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in xe){let n=parseInt((xe.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(xe.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(xe.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(xe.TERM)||"COLORTERM"in xe?1:r}function kC(e){let t=Cs(e,e&&e.isTTY);return Ds(t)}tp.exports={supportsColor:kC,stdout:Ds(Cs(!0,ep.isatty(1))),stderr:Ds(Cs(!0,ep.isatty(2)))}});var op=_((we,Po)=>{var BC=require("tty"),Ao=require("util");we.init=jC;we.log=OC;we.formatArgs=_C;we.save=LC;we.load=MC;we.useColors=$C;we.destroy=Ao.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");we.colors=[6,2,3,4,5,1];try{let e=rp();e&&(e.stderr||e).level>=2&&(we.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{}we.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 $C(){return"colors"in we.inspectOpts?!!we.inspectOpts.colors:BC.isatty(process.stderr.fd)}function _C(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(`
|
|
15
15
|
`).join(`
|
|
16
16
|
`+s),e.push(i+"m+"+Po.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=NC()+t+" "+e[0]}function NC(){return we.inspectOpts.hideDate?"":new Date().toISOString()+" "}function OC(...e){return process.stderr.write(Ao.formatWithOptions(we.inspectOpts,...e)+`
|
|
17
17
|
`)}function LC(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function MC(){return process.env.DEBUG}function jC(e){e.inspectOpts={};let t=Object.keys(we.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=we.inspectOpts[t[r]]}Po.exports=hs()(we);var{formatters:np}=Po.exports;np.o=function(e){return this.inspectOpts.colors=this.useColors,Ao.inspect(e,this.inspectOpts).split(`
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
`)+`\r
|
|
20
20
|
\r
|
|
21
21
|
`;Kr.setupSocket(t),n&&n.length&&t.unshift(n);let c=Kr.isSSL.test(r.target.protocol)?ly:cy,l=Kr.setupOutgoing(r.ssl||{},r,e),p=c.request(l);i&&i.emit("proxyReqWs",p,e,t,r,n),p.on("error",d),p.on("upgrade",(D,m,f)=>{Rn("upgrade"),Bs({add:m}),o.push(m),m.on("close",()=>{Bs({rm:m})}),m.on("error",d),m.on("end",()=>{i.emit("close",D,m,f)}),m.on("close",()=>{t.end()}),Kr.setupSocket(m),f&&f.length&&m.unshift(f),t.write(u("HTTP/1.1 101 Switching Protocols",D.headers)),m.pipe(t).pipe(m),i.emit("open",m)});function d(D){s?s(D,e,t):i.emit("error",D,e,t),t.destroySoon()}p.end()}Fe.WS_PASSES={checkMethodAndHeader:Cp,XHeaders:yp,stream:xp}});var bp=_(ut=>{"use strict";var fy=ut&&ut.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),my=ut&&ut.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wp=ut&&ut.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(r){var n=[];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[n.length]=i);return n},e(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var n=e(t),i=0;i<n.length;i++)n[i]!=="default"&&fy(r,t,n[i]);return my(r,t),r}}(),gy=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ut,"__esModule",{value:!0});ut.ProxyServer=void 0;var hy=wp(require("http")),Dy=wp(require("https")),Cy=hp(),yy=_s(),xy=require("events"),wy=gy(To()),by=Sn(),ko=(0,wy.default)("http-proxy-3"),Ns=class e extends xy.EventEmitter{constructor(t={}){super(),this.createRightProxy=r=>(ko("createRightProxy",{type:r}),n=>(...i)=>{let s=i[0];ko("proxy: ",{type:r,path:s.url});let o=i[1],a=r==="ws"?this.wsPasses:this.webPasses;r=="ws"&&o.on("error",d=>{this.emit("error",d,s,o)});let u=i.length-1,c,l;typeof i[u]=="function"&&(l=i[u],u--);let p;!(i[u]instanceof Buffer)&&i[u]!==o?(p={...n,...i[u]},u--):p={...n},i[u]instanceof Buffer&&(c=i[u]);for(let d of["target","forward"])typeof p[d]=="string"&&(p[d]=(0,by.toURL)(p[d]));if(!p.target&&!p.forward){this.emit("error",new Error("Must set target or forward"),s,o);return}for(let d of a)if(d(s,o,p,c,this,l))break}),this.onError=r=>{if(this.listeners("error").length===1)throw r},this.listen=(r,n)=>{ko("listen",{port:r,hostname:n});let i=(s,o)=>{this.web(s,o)};return this._server=this.options.ssl?Dy.createServer(this.options.ssl,i):hy.createServer(i),this.options.ws&&this._server.on("upgrade",(s,o,a)=>{this.ws(s,o,a)}),this._server.listen(r,n),this},this.address=()=>this._server?.address(),this.close=r=>{if(this._server==null){r?.();return}this._server.close(n=>{this._server=null,r?.(n)})},this.before=(r,n,i)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,o=!1;if(s.forEach((a,u)=>{a.name===n&&(o=u)}),o===!1)throw new Error("No such pass");s.splice(o,0,i)},this.after=(r,n,i)=>{if(r!=="ws"&&r!=="web")throw new Error("type must be `web` or `ws`");let s=r==="ws"?this.wsPasses:this.webPasses,o=!1;if(s.forEach((a,u)=>{a.name===n&&(o=u)}),o===!1)throw new Error("No such pass");s.splice(o++,0,i)},ko("creating a ProxyServer",t),t.prependPath=t.prependPath!==!1,this.options=t,this.web=this.createRightProxy("web")(t),this.ws=this.createRightProxy("ws")(t),this.webPasses=Object.values(Cy.WEB_PASSES),this.wsPasses=Object.values(yy.WS_PASSES),this.on("error",this.onError)}static createProxyServer(t){return new e(t)}static createServer(t){return new e(t)}static createProxy(t){return new e(t)}};ut.ProxyServer=Ns});var Ep=_(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.numOpenSockets=Bt.ProxyServer=void 0;Bt.createProxyServer=Ls;Bt.createServer=Ls;Bt.createProxy=Ls;var Os=bp();Object.defineProperty(Bt,"ProxyServer",{enumerable:!0,get:function(){return Os.ProxyServer}});var Ey=_s();Object.defineProperty(Bt,"numOpenSockets",{enumerable:!0,get:function(){return Ey.numOpenSockets}});function Ls(e={}){return new Os.ProxyServer(e)}Bt.default=Os.ProxyServer});var Fp=_(Ms=>{"use strict";Ms.parse=Ry;Ms.serialize=Iy;var vy=Object.prototype.toString,Sy=Object.prototype.hasOwnProperty,Fy=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,Ay=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,Py=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Ty=/^[\u0020-\u003A\u003D-\u007E]*$/;function Ry(e,t){if(typeof e!="string")throw new TypeError("argument str must be a string");var r={},n=e.length;if(n<2)return r;var i=t&&t.decode||ky,s=0,o=0,a=0;do{if(o=e.indexOf("=",s),o===-1)break;if(a=e.indexOf(";",s),a===-1)a=n;else if(o>a){s=e.lastIndexOf(";",o-1)+1;continue}var u=vp(e,s,o),c=Sp(e,o,u),l=e.slice(u,c);if(!Sy.call(r,l)){var p=vp(e,o+1,a),d=Sp(e,a,p);e.charCodeAt(p)===34&&e.charCodeAt(d-1)===34&&(p++,d--);var D=e.slice(p,d);r[l]=$y(D,i)}s=a+1}while(s<n);return r}function vp(e,t,r){do{var n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<r);return r}function Sp(e,t,r){for(;t>r;){var n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return r}function Iy(e,t,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!Fy.test(e))throw new TypeError("argument name is invalid");var i=n(t);if(!Ay.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(!r)return s;if(r.maxAge!=null){var o=Math.floor(r.maxAge);if(!isFinite(o))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+o}if(r.domain){if(!Py.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain="+r.domain}if(r.path){if(!Ty.test(r.path))throw new TypeError("option path is invalid");s+="; Path="+r.path}if(r.expires){var a=r.expires;if(!By(a)||isNaN(a.valueOf()))throw new TypeError("option expires is invalid");s+="; Expires="+a.toUTCString()}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.partitioned&&(s+="; Partitioned"),r.priority){var u=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(u){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var c=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(c){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s}function ky(e){return e.indexOf("%")!==-1?decodeURIComponent(e):e}function By(e){return vy.call(e)==="[object Date]"}function $y(e,t){try{return t(e)}catch{return e}}});var Tp=_(Bo=>{var Pp=require("crypto");Bo.sign=function(e,t){if(typeof e!="string")throw new TypeError("Cookie value must be provided as a string.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");return e+"."+Pp.createHmac("sha256",t).update(e).digest("base64").replace(/\=+$/,"")};Bo.unsign=function(e,t){if(typeof e!="string")throw new TypeError("Signed cookie string must be provided.");if(typeof t!="string")throw new TypeError("Secret string must be provided.");var r=e.slice(0,e.lastIndexOf(".")),n=Bo.sign(r,t);return Ap(n)==Ap(e)?r:!1};function Ap(e){return Pp.createHash("sha1").update(e).digest("hex")}});var Bp=_((Z1,Gr)=>{"use strict";var _y=Fp(),Ny=Tp();Gr.exports=Oy;Gr.exports.JSONCookie=Rp;Gr.exports.JSONCookies=js;Gr.exports.signedCookie=Ip;Gr.exports.signedCookies=kp;function Oy(e,t){var r=!e||Array.isArray(e)?e||[]:[e];return function(i,s,o){if(i.cookies)return o();var a=i.headers.cookie;if(i.secret=r[0],i.cookies=Object.create(null),i.signedCookies=Object.create(null),!a)return o();i.cookies=_y.parse(a,t),r.length!==0&&(i.signedCookies=kp(i.cookies,r),i.signedCookies=js(i.signedCookies)),i.cookies=js(i.cookies),o()}}function Rp(e){if(!(typeof e!="string"||e.substr(0,2)!=="j:"))try{return JSON.parse(e.slice(2))}catch{return}}function js(e){for(var t=Object.keys(e),r,n,i=0;i<t.length;i++)r=t[i],n=Rp(e[r]),n&&(e[r]=n);return e}function Ip(e,t){if(typeof e=="string"){if(e.substr(0,2)!=="s:")return e;for(var r=!t||Array.isArray(t)?t||[]:[t],n=0;n<r.length;n++){var i=Ny.unsign(e.slice(2),r[n]);if(i!==!1)return i}return!1}}function kp(e,t){for(var r=Object.keys(e),n,i,s=Object.create(null),o,a=0;a<r.length;a++)i=r[a],o=e[i],n=Ip(o,t),o!==n&&(s[i]=n,delete e[i]);return s}});var $o=_(ct=>{"use strict";ct.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ct.find=(e,t)=>e.nodes.find(r=>r.type===t);ct.exceedsLimit=(e,t,r=1,n)=>n===!1||!ct.isInteger(e)||!ct.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;ct.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)};ct.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);ct.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;ct.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ct.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);ct.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 _o=_((RR,Op)=>{"use strict";var Np=$o();Op.exports=(e,t={})=>{let r=(n,i={})=>{let s=t.escapeInvalid&&Np.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(s||o)&&Np.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var Mp=_((IR,Lp)=>{"use strict";Lp.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var qp=_((kR,zp)=>{"use strict";var jp=Mp(),yr=(e,t,r)=>{if(jp(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(jp(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),u=e+":"+t+"="+i+s+o+a;if(yr.cache.hasOwnProperty(u))return yr.cache[u].result;let c=Math.min(e,t),l=Math.max(e,t);if(Math.abs(c-l)===1){let f=e+"|"+t;return n.capture?`(${f})`:n.wrap===!1?f:`(?:${f})`}let p=Wp(e)||Wp(t),d={min:e,max:t,a:c,b:l},D=[],m=[];if(p&&(d.isPadded=p,d.maxLen=String(d.max).length),c<0){let f=l<0?Math.abs(l):1;m=Up(f,Math.abs(c),d,n),c=d.a=0}return l>=0&&(D=Up(c,l,d,n)),d.negatives=m,d.positives=D,d.result=Wy(m,D,n),n.capture===!0?d.result=`(${d.result})`:n.wrap!==!1&&D.length+m.length>1&&(d.result=`(?:${d.result})`),yr.cache[u]=d,d.result};function Wy(e,t,r){let n=Us(e,t,"-",!1,r)||[],i=Us(t,e,"",!1,r)||[],s=Us(e,t,"-?",!0,r)||[];return n.concat(s).concat(i).join("|")}function zy(e,t){let r=1,n=1,i=Hp(e,r),s=new Set([t]);for(;e<=i&&i<=t;)s.add(i),r+=1,i=Hp(e,r);for(i=Kp(t+1,n)-1;e<i&&i<=t;)s.add(i),n+=1,i=Kp(t+1,n)-1;return s=[...s],s.sort(Yy),s}function qy(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Jy(e,t),i=n.length,s="",o=0;for(let a=0;a<i;a++){let[u,c]=n[a];u===c?s+=u:u!=="0"||c!=="9"?s+=Qy(u,c,r):o++}return o&&(s+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:s,count:[o],digits:i}}function Up(e,t,r,n){let i=zy(e,t),s=[],o=e,a;for(let u=0;u<i.length;u++){let c=i[u],l=qy(String(o),String(c),n),p="";if(!r.isPadded&&a&&a.pattern===l.pattern){a.count.length>1&&a.count.pop(),a.count.push(l.count[0]),a.string=a.pattern+Gp(a.count),o=c+1;continue}r.isPadded&&(p=Xy(c,r,n)),l.string=p+l.pattern+Gp(l.count),s.push(l),o=c+1,a=l}return s}function Us(e,t,r,n,i){let s=[];for(let o of e){let{string:a}=o;!n&&!Vp(t,"string",a)&&s.push(r+a),n&&Vp(t,"string",a)&&s.push(r+a)}return s}function Jy(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function Yy(e,t){return e>t?1:t>e?-1:0}function Vp(e,t,r){return e.some(n=>n[t]===r)}function Hp(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function Kp(e,t){return e-e%Math.pow(10,t)}function Gp(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Qy(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function Wp(e){return/^-?(0+)\d/.test(e)}function Xy(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}}`}}yr.cache={};yr.clearCache=()=>yr.cache={};zp.exports=yr});var Ks=_((BR,td)=>{"use strict";var Zy=require("util"),Yp=qp(),Jp=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),ex=e=>t=>e===!0?Number(t):String(t),Vs=e=>typeof e=="number"||typeof e=="string"&&e!=="",In=e=>Number.isInteger(+e),Hs=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},tx=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,rx=(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},Oo=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},nx=(e,t,r)=>{e.negatives.sort((a,u)=>a<u?-1:a>u?1:0),e.positives.sort((a,u)=>a<u?-1:a>u?1:0);let n=t.capture?"":"?:",i="",s="",o;return e.positives.length&&(i=e.positives.map(a=>Oo(String(a),r)).join("|")),e.negatives.length&&(s=`-(${n}${e.negatives.map(a=>Oo(String(a),r)).join("|")})`),i&&s?o=`${i}|${s}`:o=i||s,t.wrap?`(${n}${o})`:o},Qp=(e,t,r,n)=>{if(r)return Yp(e,t,{wrap:!1,...n});let i=String.fromCharCode(e);if(e===t)return i;let s=String.fromCharCode(t);return`[${i}-${s}]`},Xp=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,i=r.capture?"":"?:";return n?`(${i}${e.join("|")})`:e.join("|")}return Yp(e,t,r)},Zp=(...e)=>new RangeError("Invalid range arguments: "+Zy.inspect(...e)),ed=(e,t,r)=>{if(r.strictRanges===!0)throw Zp([e,t]);return[]},ox=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},ix=(e,t,r=1,n={})=>{let i=Number(e),s=Number(t);if(!Number.isInteger(i)||!Number.isInteger(s)){if(n.strictRanges===!0)throw Zp([e,t]);return[]}i===0&&(i=0),s===0&&(s=0);let o=i>s,a=String(e),u=String(t),c=String(r);r=Math.max(Math.abs(r),1);let l=Hs(a)||Hs(u)||Hs(c),p=l?Math.max(a.length,u.length,c.length):0,d=l===!1&&tx(e,t,n)===!1,D=n.transform||ex(d);if(n.toRegex&&r===1)return Qp(Oo(e,p),Oo(t,p),!0,n);let m={negatives:[],positives:[]},f=E=>m[E<0?"negatives":"positives"].push(Math.abs(E)),g=[],h=0;for(;o?i>=s:i<=s;)n.toRegex===!0&&r>1?f(i):g.push(rx(D(i,h),p,d)),i=o?i-r:i+r,h++;return n.toRegex===!0?r>1?nx(m,n,p):Xp(g,null,{wrap:!1,...n}):g},sx=(e,t,r=1,n={})=>{if(!In(e)&&e.length>1||!In(t)&&t.length>1)return ed(e,t,n);let i=n.transform||(d=>String.fromCharCode(d)),s=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),a=s>o,u=Math.min(s,o),c=Math.max(s,o);if(n.toRegex&&r===1)return Qp(u,c,!1,n);let l=[],p=0;for(;a?s>=o:s<=o;)l.push(i(s,p)),s=a?s-r:s+r,p++;return n.toRegex===!0?Xp(l,null,{wrap:!1,options:n}):l},No=(e,t,r,n={})=>{if(t==null&&Vs(e))return[e];if(!Vs(e)||!Vs(t))return ed(e,t,n);if(typeof r=="function")return No(e,t,1,{transform:r});if(Jp(r))return No(e,t,0,r);let i={...n};return i.capture===!0&&(i.wrap=!0),r=r||i.step||1,In(r)?In(e)&&In(t)?ix(e,t,r,i):sx(e,t,Math.max(Math.abs(r),1),i):r!=null&&!Jp(r)?ox(r,i):No(e,t,1,r)};td.exports=No});var od=_(($R,nd)=>{"use strict";var ax=Ks(),rd=$o(),ux=(e,t={})=>{let r=(n,i={})=>{let s=rd.isInvalidBrace(i),o=n.invalid===!0&&t.escapeInvalid===!0,a=s===!0||o===!0,u=t.escapeInvalid===!0?"\\":"",c="";if(n.isOpen===!0)return u+n.value;if(n.isClose===!0)return console.log("node.isClose",u,n.value),u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let l=rd.reduce(n.nodes),p=ax(...l,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(p.length!==0)return l.length>1&&p.length>1?`(${p})`:p}if(n.nodes)for(let l of n.nodes)c+=r(l,n);return c};return r(e)};nd.exports=ux});var ad=_((_R,sd)=>{"use strict";var cx=Ks(),id=_o(),Wr=$o(),xr=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?Wr.flatten(t).map(i=>`{${i}}`):t;for(let i of e)if(Array.isArray(i))for(let s of i)n.push(xr(s,t,r));else for(let s of t)r===!0&&typeof s=="string"&&(s=`{${s}}`),n.push(Array.isArray(s)?xr(i,s,r):i+s);return Wr.flatten(n)},lx=(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(xr(a.pop(),id(i,t)));return}if(i.type==="brace"&&i.invalid!==!0&&i.nodes.length===2){a.push(xr(a.pop(),["{}"]));return}if(i.nodes&&i.ranges>0){let p=Wr.reduce(i.nodes);if(Wr.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=cx(...p,t);d.length===0&&(d=id(i,t)),a.push(xr(a.pop(),d)),i.nodes=[];return}let u=Wr.encloseBrace(i),c=i.queue,l=i;for(;l.type!=="brace"&&l.type!=="root"&&l.parent;)l=l.parent,c=l.queue;for(let p=0;p<i.nodes.length;p++){let d=i.nodes[p];if(d.type==="comma"&&i.type==="brace"){p===1&&c.push(""),c.push("");continue}if(d.type==="close"){a.push(xr(a.pop(),c,u));continue}if(d.value&&d.type!=="open"){c.push(xr(c.pop(),d.value));continue}d.nodes&&n(d,i)}return c};return Wr.flatten(n(e))};sd.exports=lx});var cd=_((NR,ud)=>{"use strict";ud.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:`
|
|
22
|
-
`,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 md=_((OR,fd)=>{"use strict";var px=_o(),{MAX_LENGTH:ld,CHAR_BACKSLASH:Gs,CHAR_BACKTICK:dx,CHAR_COMMA:fx,CHAR_DOT:mx,CHAR_LEFT_PARENTHESES:gx,CHAR_RIGHT_PARENTHESES:hx,CHAR_LEFT_CURLY_BRACE:Dx,CHAR_RIGHT_CURLY_BRACE:Cx,CHAR_LEFT_SQUARE_BRACKET:pd,CHAR_RIGHT_SQUARE_BRACKET:dd,CHAR_DOUBLE_QUOTE:yx,CHAR_SINGLE_QUOTE:xx,CHAR_NO_BREAK_SPACE:wx,CHAR_ZERO_WIDTH_NOBREAK_SPACE:bx}=cd(),Ex=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(ld,r.maxLength):ld;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,u=0,c=e.length,l=0,p=0,d,D=()=>e[l++],m=f=>{if(f.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&f.type==="text"){a.value+=f.value;return}return o.nodes.push(f),f.parent=o,f.prev=a,a=f,f};for(m({type:"bos"});l<c;)if(o=s[s.length-1],d=D(),!(d===bx||d===wx)){if(d===Gs){m({type:"text",value:(t.keepEscaping?d:"")+D()});continue}if(d===dd){m({type:"text",value:"\\"+d});continue}if(d===pd){u++;let f;for(;l<c&&(f=D());){if(d+=f,f===pd){u++;continue}if(f===Gs){d+=D();continue}if(f===dd&&(u--,u===0))break}m({type:"text",value:d});continue}if(d===gx){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===hx){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===yx||d===xx||d===dx){let f=d,g;for(t.keepQuotes!==!0&&(d="");l<c&&(g=D());){if(g===Gs){d+=g+D();continue}if(g===f){t.keepQuotes===!0&&(d+=g);break}d+=g}m({type:"text",value:d});continue}if(d===Dx){p++;let g={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(g),s.push(o),m({type:"open",value:d});continue}if(d===Cx){if(o.type!=="brace"){m({type:"text",value:d});continue}let f="close";o=s.pop(),o.close=!0,m({type:f,value:d}),p--,o=s[s.length-1];continue}if(d===fx&&p>0){if(o.ranges>0){o.ranges=0;let f=o.nodes.shift();o.nodes=[f,{type:"text",value:px(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===mx&&p>0&&o.commas===0){let f=o.nodes;if(p===0||f.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"){f.pop();let g=f[f.length-1];g.value+=a.value+d,a=g,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(h=>{h.nodes||(h.type==="open"&&(h.isOpen=!0),h.type==="close"&&(h.isClose=!0),h.nodes||(h.type="text"),h.invalid=!0)});let f=s[s.length-1],g=f.nodes.indexOf(o);f.nodes.splice(g,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),i};fd.exports=Ex});var Dd=_((LR,hd)=>{"use strict";var gd=_o(),vx=od(),Sx=ad(),Fx=md(),Ye=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=Ye.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(Ye.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Ye.parse=(e,t={})=>Fx(e,t);Ye.stringify=(e,t={})=>gd(typeof e=="string"?Ye.parse(e,t):e,t);Ye.compile=(e,t={})=>(typeof e=="string"&&(e=Ye.parse(e,t)),vx(e,t));Ye.expand=(e,t={})=>{typeof e=="string"&&(e=Ye.parse(e,t));let r=Sx(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Ye.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Ye.compile(e,t):Ye.expand(e,t);hd.exports=Ye});var kn=_((MR,bd)=>{"use strict";var Ax=require("path"),$t="\\\\/",Cd=`[^${$t}]`,Gt="\\.",Px="\\+",Tx="\\?",Lo="\\/",Rx="(?=.)",yd="[^/]",Ws=`(?:${Lo}|$)`,xd=`(?:^|${Lo})`,zs=`${Gt}{1,2}${Ws}`,Ix=`(?!${Gt})`,kx=`(?!${xd}${zs})`,Bx=`(?!${Gt}{0,1}${Ws})`,$x=`(?!${zs})`,_x=`[^.${Lo}]`,Nx=`${yd}*?`,wd={DOT_LITERAL:Gt,PLUS_LITERAL:Px,QMARK_LITERAL:Tx,SLASH_LITERAL:Lo,ONE_CHAR:Rx,QMARK:yd,END_ANCHOR:Ws,DOTS_SLASH:zs,NO_DOT:Ix,NO_DOTS:kx,NO_DOT_SLASH:Bx,NO_DOTS_SLASH:$x,QMARK_NO_DOT:_x,STAR:Nx,START_ANCHOR:xd},Ox={...wd,SLASH_LITERAL:`[${$t}]`,QMARK:Cd,STAR:`${Cd}*?`,DOTS_SLASH:`${Gt}{1,2}(?:[${$t}]|$)`,NO_DOT:`(?!${Gt})`,NO_DOTS:`(?!(?:^|[${$t}])${Gt}{1,2}(?:[${$t}]|$))`,NO_DOT_SLASH:`(?!${Gt}{0,1}(?:[${$t}]|$))`,NO_DOTS_SLASH:`(?!${Gt}{1,2}(?:[${$t}]|$))`,QMARK_NO_DOT:`[^.${$t}]`,START_ANCHOR:`(?:^|[${$t}])`,END_ANCHOR:`(?:[${$t}]|$)`},Lx={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"};bd.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Lx,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:Ax.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?Ox:wd}}});var Bn=_(je=>{"use strict";var Mx=require("path"),jx=process.platform==="win32",{REGEX_BACKSLASH:Ux,REGEX_REMOVE_BACKSLASH:Vx,REGEX_SPECIAL_CHARS:Hx,REGEX_SPECIAL_CHARS_GLOBAL:Kx}=kn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Hx.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Kx,"\\$1");je.toPosixSlashes=e=>e.replace(Ux,"/");je.removeBackslashes=e=>e.replace(Vx,t=>t==="\\"?"":t);je.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};je.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:jx===!0||Mx.sep==="\\";je.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?je.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};je.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};je.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Rd=_((UR,Td)=>{"use strict";var Ed=Bn(),{CHAR_ASTERISK:qs,CHAR_AT:Gx,CHAR_BACKWARD_SLASH:$n,CHAR_COMMA:Wx,CHAR_DOT:Js,CHAR_EXCLAMATION_MARK:Ys,CHAR_FORWARD_SLASH:Pd,CHAR_LEFT_CURLY_BRACE:Qs,CHAR_LEFT_PARENTHESES:Xs,CHAR_LEFT_SQUARE_BRACKET:zx,CHAR_PLUS:qx,CHAR_QUESTION_MARK:vd,CHAR_RIGHT_CURLY_BRACE:Jx,CHAR_RIGHT_PARENTHESES:Sd,CHAR_RIGHT_SQUARE_BRACKET:Yx}=kn(),Fd=e=>e===Pd||e===$n,Ad=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Qx=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=e,c=-1,l=0,p=0,d=!1,D=!1,m=!1,f=!1,g=!1,h=!1,E=!1,v=!1,P=!1,A=!1,F=0,T,k,I={value:"",depth:0,isGlob:!1},S=()=>c>=n,C=()=>u.charCodeAt(c+1),$=()=>(T=k,u.charCodeAt(++c));for(;c<n;){k=$();let ue;if(k===$n){E=I.backslashes=!0,k=$(),k===Qs&&(h=!0);continue}if(h===!0||k===Qs){for(F++;S()!==!0&&(k=$());){if(k===$n){E=I.backslashes=!0,$();continue}if(k===Qs){F++;continue}if(h!==!0&&k===Js&&(k=$())===Js){if(d=I.isBrace=!0,m=I.isGlob=!0,A=!0,i===!0)continue;break}if(h!==!0&&k===Wx){if(d=I.isBrace=!0,m=I.isGlob=!0,A=!0,i===!0)continue;break}if(k===Jx&&(F--,F===0)){h=!1,d=I.isBrace=!0,A=!0;break}}if(i===!0)continue;break}if(k===Pd){if(s.push(c),o.push(I),I={value:"",depth:0,isGlob:!1},A===!0)continue;if(T===Js&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(k===qx||k===Gx||k===qs||k===vd||k===Ys)===!0&&C()===Xs){if(m=I.isGlob=!0,f=I.isExtglob=!0,A=!0,k===Ys&&c===l&&(P=!0),i===!0){for(;S()!==!0&&(k=$());){if(k===$n){E=I.backslashes=!0,k=$();continue}if(k===Sd){m=I.isGlob=!0,A=!0;break}}continue}break}if(k===qs){if(T===qs&&(g=I.isGlobstar=!0),m=I.isGlob=!0,A=!0,i===!0)continue;break}if(k===vd){if(m=I.isGlob=!0,A=!0,i===!0)continue;break}if(k===zx){for(;S()!==!0&&(ue=$());){if(ue===$n){E=I.backslashes=!0,$();continue}if(ue===Yx){D=I.isBracket=!0,m=I.isGlob=!0,A=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&k===Ys&&c===l){v=I.negated=!0,l++;continue}if(r.noparen!==!0&&k===Xs){if(m=I.isGlob=!0,i===!0){for(;S()!==!0&&(k=$());){if(k===Xs){E=I.backslashes=!0,k=$();continue}if(k===Sd){A=!0;break}}continue}break}if(m===!0){if(A=!0,i===!0)continue;break}}r.noext===!0&&(f=!1,m=!1);let O=u,L="",y="";l>0&&(L=u.slice(0,l),u=u.slice(l),p-=l),O&&m===!0&&p>0?(O=u.slice(0,p),y=u.slice(p)):m===!0?(O="",y=u):O=u,O&&O!==""&&O!=="/"&&O!==u&&Fd(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),r.unescape===!0&&(y&&(y=Ed.removeBackslashes(y)),O&&E===!0&&(O=Ed.removeBackslashes(O)));let x={prefix:L,input:e,start:l,base:O,glob:y,isBrace:d,isBracket:D,isGlob:m,isExtglob:f,isGlobstar:g,negated:v,negatedExtglob:P};if(r.tokens===!0&&(x.maxDepth=0,Fd(k)||o.push(I),x.tokens=o),r.parts===!0||r.tokens===!0){let ue;for(let J=0;J<s.length;J++){let ht=ue?ue+1:l,Dt=s[J],Ue=e.slice(ht,Dt);r.tokens&&(J===0&&l!==0?(o[J].isPrefix=!0,o[J].value=L):o[J].value=Ue,Ad(o[J]),x.maxDepth+=o[J].depth),(J!==0||Ue!=="")&&a.push(Ue),ue=Dt}if(ue&&ue+1<e.length){let J=e.slice(ue+1);a.push(J),r.tokens&&(o[o.length-1].value=J,Ad(o[o.length-1]),x.maxDepth+=o[o.length-1].depth)}x.slashes=s,x.parts=a}return x};Td.exports=Qx});var Bd=_((VR,kd)=>{"use strict";var Mo=kn(),Qe=Bn(),{MAX_LENGTH:jo,POSIX_REGEX_SOURCE:Xx,REGEX_NON_SPECIAL_CHARS:Zx,REGEX_SPECIAL_CHARS_BACKREF:e0,REPLACEMENTS:Id}=Mo,t0=(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=>Qe.escapeRegex(i)).join("..")}return r},zr=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Zs=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Id[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(jo,r.maxLength):jo,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?"":"?:",u=Qe.isWindows(t),c=Mo.globChars(u),l=Mo.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:D,ONE_CHAR:m,DOTS_SLASH:f,NO_DOT:g,NO_DOT_SLASH:h,NO_DOTS_SLASH:E,QMARK:v,QMARK_NO_DOT:P,STAR:A,START_ANCHOR:F}=c,T=B=>`(${a}(?:(?!${F}${B.dot?f:p}).)*?)`,k=r.dot?"":g,I=r.dot?v:P,S=r.bash===!0?T(r):A;r.capture&&(S=`(${S})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let C={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=Qe.removePrefix(e,C),i=e.length;let $=[],O=[],L=[],y=s,x,ue=()=>C.index===i-1,J=C.peek=(B=1)=>e[C.index+B],ht=C.advance=()=>e[++C.index]||"",Dt=()=>e.slice(C.index+1),Ue=(B="",ne=0)=>{C.consumed+=B,C.index+=ne},Nn=B=>{C.output+=B.output!=null?B.output:B.value,Ue(B.value)},nf=()=>{let B=1;for(;J()==="!"&&(J(2)!=="("||J(3)==="?");)ht(),C.start++,B++;return B%2===0?!1:(C.negated=!0,C.start++,!0)},On=B=>{C[B]++,L.push(B)},er=B=>{C[B]--,L.pop()},K=B=>{if(y.type==="globstar"){let ne=C.braces>0&&(B.type==="comma"||B.type==="brace"),R=B.extglob===!0||$.length&&(B.type==="pipe"||B.type==="paren");B.type!=="slash"&&B.type!=="paren"&&!ne&&!R&&(C.output=C.output.slice(0,-y.output.length),y.type="star",y.value="*",y.output=S,C.output+=y.output)}if($.length&&B.type!=="paren"&&($[$.length-1].inner+=B.value),(B.value||B.output)&&Nn(B),y&&y.type==="text"&&B.type==="text"){y.value+=B.value,y.output=(y.output||"")+B.value;return}B.prev=y,o.push(B),y=B},Ln=(B,ne)=>{let R={...l[ne],conditions:1,inner:""};R.prev=y,R.parens=C.parens,R.output=C.output;let H=(r.capture?"(":"")+R.open;On("parens"),K({type:B,value:ne,output:C.output?"":m}),K({type:"paren",extglob:!0,value:ht(),output:H}),$.push(R)},of=B=>{let ne=B.close+(r.capture?")":""),R;if(B.type==="negate"){let H=S;if(B.inner&&B.inner.length>1&&B.inner.includes("/")&&(H=T(r)),(H!==S||ue()||/^\)+$/.test(Dt()))&&(ne=B.close=`)$))${H}`),B.inner.includes("*")&&(R=Dt())&&/^\.[^\\/.]+$/.test(R)){let ce=Zs(R,{...t,fastpaths:!1}).output;ne=B.close=`)${ce})${H})`}B.prev.type==="bos"&&(C.negatedExtglob=!0)}K({type:"paren",extglob:!0,value:x,output:ne}),er("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let B=!1,ne=e.replace(e0,(R,H,ce,Ae,me,Vo)=>Ae==="\\"?(B=!0,R):Ae==="?"?H?H+Ae+(me?v.repeat(me.length):""):Vo===0?I+(me?v.repeat(me.length):""):v.repeat(ce.length):Ae==="."?p.repeat(ce.length):Ae==="*"?H?H+Ae+(me?S:""):S:H?R:`\\${R}`);return B===!0&&(r.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),ne===e&&r.contains===!0?(C.output=e,C):(C.output=Qe.wrapOutput(ne,C,t),C)}for(;!ue();){if(x=ht(),x==="\0")continue;if(x==="\\"){let R=J();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){x+="\\",K({type:"text",value:x});continue}let H=/^\\+/.exec(Dt()),ce=0;if(H&&H[0].length>2&&(ce=H[0].length,C.index+=ce,ce%2!==0&&(x+="\\")),r.unescape===!0?x=ht():x+=ht(),C.brackets===0){K({type:"text",value:x});continue}}if(C.brackets>0&&(x!=="]"||y.value==="["||y.value==="[^")){if(r.posix!==!1&&x===":"){let R=y.value.slice(1);if(R.includes("[")&&(y.posix=!0,R.includes(":"))){let H=y.value.lastIndexOf("["),ce=y.value.slice(0,H),Ae=y.value.slice(H+2),me=Xx[Ae];if(me){y.value=ce+me,C.backtrack=!0,ht(),!s.output&&o.indexOf(y)===1&&(s.output=m);continue}}}(x==="["&&J()!==":"||x==="-"&&J()==="]")&&(x=`\\${x}`),x==="]"&&(y.value==="["||y.value==="[^")&&(x=`\\${x}`),r.posix===!0&&x==="!"&&y.value==="["&&(x="^"),y.value+=x,Nn({value:x});continue}if(C.quotes===1&&x!=='"'){x=Qe.escapeRegex(x),y.value+=x,Nn({value:x});continue}if(x==='"'){C.quotes=C.quotes===1?0:1,r.keepQuotes===!0&&K({type:"text",value:x});continue}if(x==="("){On("parens"),K({type:"paren",value:x});continue}if(x===")"){if(C.parens===0&&r.strictBrackets===!0)throw new SyntaxError(zr("opening","("));let R=$[$.length-1];if(R&&C.parens===R.parens+1){of($.pop());continue}K({type:"paren",value:x,output:C.parens?")":"\\)"}),er("parens");continue}if(x==="["){if(r.nobracket===!0||!Dt().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(zr("closing","]"));x=`\\${x}`}else On("brackets");K({type:"bracket",value:x});continue}if(x==="]"){if(r.nobracket===!0||y&&y.type==="bracket"&&y.value.length===1){K({type:"text",value:x,output:`\\${x}`});continue}if(C.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(zr("opening","["));K({type:"text",value:x,output:`\\${x}`});continue}er("brackets");let R=y.value.slice(1);if(y.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(x=`/${x}`),y.value+=x,Nn({value:x}),r.literalBrackets===!1||Qe.hasRegexChars(R))continue;let H=Qe.escapeRegex(y.value);if(C.output=C.output.slice(0,-y.value.length),r.literalBrackets===!0){C.output+=H,y.value=H;continue}y.value=`(${a}${H}|${y.value})`,C.output+=y.value;continue}if(x==="{"&&r.nobrace!==!0){On("braces");let R={type:"brace",value:x,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};O.push(R),K(R);continue}if(x==="}"){let R=O[O.length-1];if(r.nobrace===!0||!R){K({type:"text",value:x,output:x});continue}let H=")";if(R.dots===!0){let ce=o.slice(),Ae=[];for(let me=ce.length-1;me>=0&&(o.pop(),ce[me].type!=="brace");me--)ce[me].type!=="dots"&&Ae.unshift(ce[me].value);H=t0(Ae,r),C.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let ce=C.output.slice(0,R.outputIndex),Ae=C.tokens.slice(R.tokensIndex);R.value=R.output="\\{",x=H="\\}",C.output=ce;for(let me of Ae)C.output+=me.output||me.value}K({type:"brace",value:x,output:H}),er("braces"),O.pop();continue}if(x==="|"){$.length>0&&$[$.length-1].conditions++,K({type:"text",value:x});continue}if(x===","){let R=x,H=O[O.length-1];H&&L[L.length-1]==="braces"&&(H.comma=!0,R="|"),K({type:"comma",value:x,output:R});continue}if(x==="/"){if(y.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",o.pop(),y=s;continue}K({type:"slash",value:x,output:D});continue}if(x==="."){if(C.braces>0&&y.type==="dot"){y.value==="."&&(y.output=p);let R=O[O.length-1];y.type="dots",y.output+=x,y.value+=x,R.dots=!0;continue}if(C.braces+C.parens===0&&y.type!=="bos"&&y.type!=="slash"){K({type:"text",value:x,output:p});continue}K({type:"dot",value:x,output:p});continue}if(x==="?"){if(!(y&&y.value==="(")&&r.noextglob!==!0&&J()==="("&&J(2)!=="?"){Ln("qmark",x);continue}if(y&&y.type==="paren"){let H=J(),ce=x;if(H==="<"&&!Qe.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(y.value==="("&&!/[!=<:]/.test(H)||H==="<"&&!/<([!=]|\w+>)/.test(Dt()))&&(ce=`\\${x}`),K({type:"text",value:x,output:ce});continue}if(r.dot!==!0&&(y.type==="slash"||y.type==="bos")){K({type:"qmark",value:x,output:P});continue}K({type:"qmark",value:x,output:v});continue}if(x==="!"){if(r.noextglob!==!0&&J()==="("&&(J(2)!=="?"||!/[!=<:]/.test(J(3)))){Ln("negate",x);continue}if(r.nonegate!==!0&&C.index===0){nf();continue}}if(x==="+"){if(r.noextglob!==!0&&J()==="("&&J(2)!=="?"){Ln("plus",x);continue}if(y&&y.value==="("||r.regex===!1){K({type:"plus",value:x,output:d});continue}if(y&&(y.type==="bracket"||y.type==="paren"||y.type==="brace")||C.parens>0){K({type:"plus",value:x});continue}K({type:"plus",value:d});continue}if(x==="@"){if(r.noextglob!==!0&&J()==="("&&J(2)!=="?"){K({type:"at",extglob:!0,value:x,output:""});continue}K({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let R=Zx.exec(Dt());R&&(x+=R[0],C.index+=R[0].length),K({type:"text",value:x});continue}if(y&&(y.type==="globstar"||y.star===!0)){y.type="star",y.star=!0,y.value+=x,y.output=S,C.backtrack=!0,C.globstar=!0,Ue(x);continue}let B=Dt();if(r.noextglob!==!0&&/^\([^?]/.test(B)){Ln("star",x);continue}if(y.type==="star"){if(r.noglobstar===!0){Ue(x);continue}let R=y.prev,H=R.prev,ce=R.type==="slash"||R.type==="bos",Ae=H&&(H.type==="star"||H.type==="globstar");if(r.bash===!0&&(!ce||B[0]&&B[0]!=="/")){K({type:"star",value:x,output:""});continue}let me=C.braces>0&&(R.type==="comma"||R.type==="brace"),Vo=$.length&&(R.type==="pipe"||R.type==="paren");if(!ce&&R.type!=="paren"&&!me&&!Vo){K({type:"star",value:x,output:""});continue}for(;B.slice(0,3)==="/**";){let Mn=e[C.index+4];if(Mn&&Mn!=="/")break;B=B.slice(3),Ue("/**",3)}if(R.type==="bos"&&ue()){y.type="globstar",y.value+=x,y.output=T(r),C.output=y.output,C.globstar=!0,Ue(x);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!Ae&&ue()){C.output=C.output.slice(0,-(R.output+y.output).length),R.output=`(?:${R.output}`,y.type="globstar",y.output=T(r)+(r.strictSlashes?")":"|$)"),y.value+=x,C.globstar=!0,C.output+=R.output+y.output,Ue(x);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&B[0]==="/"){let Mn=B[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(R.output+y.output).length),R.output=`(?:${R.output}`,y.type="globstar",y.output=`${T(r)}${D}|${D}${Mn})`,y.value+=x,C.output+=R.output+y.output,C.globstar=!0,Ue(x+ht()),K({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&B[0]==="/"){y.type="globstar",y.value+=x,y.output=`(?:^|${D}|${T(r)}${D})`,C.output=y.output,C.globstar=!0,Ue(x+ht()),K({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-y.output.length),y.type="globstar",y.output=T(r),y.value+=x,C.output+=y.output,C.globstar=!0,Ue(x);continue}let ne={type:"star",value:x,output:S};if(r.bash===!0){ne.output=".*?",(y.type==="bos"||y.type==="slash")&&(ne.output=k+ne.output),K(ne);continue}if(y&&(y.type==="bracket"||y.type==="paren")&&r.regex===!0){ne.output=x,K(ne);continue}(C.index===C.start||y.type==="slash"||y.type==="dot")&&(y.type==="dot"?(C.output+=h,y.output+=h):r.dot===!0?(C.output+=E,y.output+=E):(C.output+=k,y.output+=k),J()!=="*"&&(C.output+=m,y.output+=m)),K(ne)}for(;C.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(zr("closing","]"));C.output=Qe.escapeLast(C.output,"["),er("brackets")}for(;C.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(zr("closing",")"));C.output=Qe.escapeLast(C.output,"("),er("parens")}for(;C.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(zr("closing","}"));C.output=Qe.escapeLast(C.output,"{"),er("braces")}if(r.strictSlashes!==!0&&(y.type==="star"||y.type==="bracket")&&K({type:"maybe_slash",value:"",output:`${D}?`}),C.backtrack===!0){C.output="";for(let B of C.tokens)C.output+=B.output!=null?B.output:B.value,B.suffix&&(C.output+=B.suffix)}return C};Zs.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(jo,r.maxLength):jo,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=Id[e]||e;let s=Qe.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:D,START_ANCHOR:m}=Mo.globChars(s),f=r.dot?p:l,g=r.dot?d:l,h=r.capture?"":"?:",E={negated:!1,prefix:""},v=r.bash===!0?".*?":D;r.capture&&(v=`(${v})`);let P=k=>k.noglobstar===!0?v:`(${h}(?:(?!${m}${k.dot?c:o}).)*?)`,A=k=>{switch(k){case"*":return`${f}${u}${v}`;case".*":return`${o}${u}${v}`;case"*.*":return`${f}${v}${o}${u}${v}`;case"*/*":return`${f}${v}${a}${u}${g}${v}`;case"**":return f+P(r);case"**/*":return`(?:${f}${P(r)}${a})?${g}${u}${v}`;case"**/*.*":return`(?:${f}${P(r)}${a})?${g}${v}${o}${u}${v}`;case"**/.*":return`(?:${f}${P(r)}${a})?${o}${u}${v}`;default:{let I=/^(.*?)\.(\w+)$/.exec(k);if(!I)return;let S=A(I[1]);return S?S+o+I[2]:void 0}}},F=Qe.removePrefix(e,E),T=A(F);return T&&r.strictSlashes!==!0&&(T+=`${a}?`),T};kd.exports=Zs});var _d=_((HR,$d)=>{"use strict";var r0=require("path"),n0=Rd(),ea=Bd(),ta=Bn(),o0=kn(),i0=e=>e&&typeof e=="object"&&!Array.isArray(e),de=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>de(d,t,r));return d=>{for(let D of l){let m=D(d);if(m)return m}return!1}}let n=i0(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=ta.isWindows(t),o=n?de.compileRe(e,t):de.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=de(i.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:d,match:D,output:m}=de.test(l,o,t,{glob:e,posix:s}),f={glob:e,state:a,regex:o,posix:s,input:l,output:m,match:D,isMatch:d};return typeof i.onResult=="function"&&i.onResult(f),d===!1?(f.isMatch=!1,p?f:!1):u(l)?(typeof i.onIgnore=="function"&&i.onIgnore(f),f.isMatch=!1,p?f:!1):(typeof i.onMatch=="function"&&i.onMatch(f),p?f:!0)};return r&&(c.state=a),c};de.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?ta.toPosixSlashes:null),a=e===n,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=de.matchBase(e,t,r,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};de.matchBase=(e,t,r,n=ta.isWindows(r))=>(t instanceof RegExp?t:de.makeRe(t,r)).test(r0.basename(e));de.isMatch=(e,t,r)=>de(t,r)(e);de.parse=(e,t)=>Array.isArray(e)?e.map(r=>de.parse(r,t)):ea(e,{...t,fastpaths:!1});de.scan=(e,t)=>n0(e,t);de.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 u=de.toRegex(a,t);return n===!0&&(u.state=e),u};de.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=ea.fastpaths(e,t)),i.output||(i=ea(e,t)),de.compileRe(i,t,r,n)};de.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/$^/}};de.constants=o0;$d.exports=de});var Od=_((KR,Nd)=>{"use strict";Nd.exports=_d()});var na=_((GR,Vd)=>{"use strict";var Md=require("util"),jd=Dd(),_t=Od(),ra=Bn(),Ld=e=>e===""||e==="./",Ud=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},se=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=_t(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let D of e){let m=p(D,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),i.add(m.output)))}}let c=(o===t.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};se.match=se;se.matcher=(e,t)=>_t(e,t);se.isMatch=(e,t,r)=>_t(t,r)(e);se.any=se.isMatch;se.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(se(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};se.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Md.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>se.contains(e,n,r));if(typeof t=="string"){if(Ld(e)||Ld(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return se.isMatch(e,t,{...r,contains:!0})};se.matchKeys=(e,t,r)=>{if(!ra.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=se(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};se.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=_t(String(i),r);if(n.some(o=>s(o)))return!0}return!1};se.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=_t(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};se.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Md.inspect(e)}"`);return[].concat(t).every(n=>_t(n,r)(e))};se.capture=(e,t,r)=>{let n=ra.isWindows(r),s=_t.makeRe(String(e),{...r,capture:!0}).exec(n?ra.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};se.makeRe=(...e)=>_t.makeRe(...e);se.scan=(...e)=>_t.scan(...e);se.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of jd(String(n),t))r.push(_t.parse(i,t));return r};se.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!Ud(e)?[e]:jd(e,t)};se.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return se.braces(e,{...t,expand:!0})};se.hasBraces=Ud;Vd.exports=se});var $0={};df($0,{createDevToolsServer:()=>ss,version:()=>la});module.exports=ff($0);var mf="1.11.50",Ve=process.env.OVERRIDE_VERSION??mf;var Uo=require("http");var Ho="preview-url";var wr="framework",jn="platform",Un="node",da="/~builder-connect",tr="/~builder-connected",Ko="/~builder-dev-tools",Go="/~builder-dev-tools.js",rr="/~builder-dev-tools-close",fa="/mappings";function W(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Vn(e,t=""){let r=W(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function De(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()+`
|
|
22
|
+
`,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 md=_((OR,fd)=>{"use strict";var px=_o(),{MAX_LENGTH:ld,CHAR_BACKSLASH:Gs,CHAR_BACKTICK:dx,CHAR_COMMA:fx,CHAR_DOT:mx,CHAR_LEFT_PARENTHESES:gx,CHAR_RIGHT_PARENTHESES:hx,CHAR_LEFT_CURLY_BRACE:Dx,CHAR_RIGHT_CURLY_BRACE:Cx,CHAR_LEFT_SQUARE_BRACKET:pd,CHAR_RIGHT_SQUARE_BRACKET:dd,CHAR_DOUBLE_QUOTE:yx,CHAR_SINGLE_QUOTE:xx,CHAR_NO_BREAK_SPACE:wx,CHAR_ZERO_WIDTH_NOBREAK_SPACE:bx}=cd(),Ex=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(ld,r.maxLength):ld;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,u=0,c=e.length,l=0,p=0,d,D=()=>e[l++],m=f=>{if(f.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&f.type==="text"){a.value+=f.value;return}return o.nodes.push(f),f.parent=o,f.prev=a,a=f,f};for(m({type:"bos"});l<c;)if(o=s[s.length-1],d=D(),!(d===bx||d===wx)){if(d===Gs){m({type:"text",value:(t.keepEscaping?d:"")+D()});continue}if(d===dd){m({type:"text",value:"\\"+d});continue}if(d===pd){u++;let f;for(;l<c&&(f=D());){if(d+=f,f===pd){u++;continue}if(f===Gs){d+=D();continue}if(f===dd&&(u--,u===0))break}m({type:"text",value:d});continue}if(d===gx){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:d});continue}if(d===hx){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===yx||d===xx||d===dx){let f=d,g;for(t.keepQuotes!==!0&&(d="");l<c&&(g=D());){if(g===Gs){d+=g+D();continue}if(g===f){t.keepQuotes===!0&&(d+=g);break}d+=g}m({type:"text",value:d});continue}if(d===Dx){p++;let g={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(g),s.push(o),m({type:"open",value:d});continue}if(d===Cx){if(o.type!=="brace"){m({type:"text",value:d});continue}let f="close";o=s.pop(),o.close=!0,m({type:f,value:d}),p--,o=s[s.length-1];continue}if(d===fx&&p>0){if(o.ranges>0){o.ranges=0;let f=o.nodes.shift();o.nodes=[f,{type:"text",value:px(o)}]}m({type:"comma",value:d}),o.commas++;continue}if(d===mx&&p>0&&o.commas===0){let f=o.nodes;if(p===0||f.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"){f.pop();let g=f[f.length-1];g.value+=a.value+d,a=g,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(h=>{h.nodes||(h.type==="open"&&(h.isOpen=!0),h.type==="close"&&(h.isClose=!0),h.nodes||(h.type="text"),h.invalid=!0)});let f=s[s.length-1],g=f.nodes.indexOf(o);f.nodes.splice(g,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),i};fd.exports=Ex});var Dd=_((LR,hd)=>{"use strict";var gd=_o(),vx=od(),Sx=ad(),Fx=md(),Ye=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let i=Ye.create(n,t);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(Ye.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};Ye.parse=(e,t={})=>Fx(e,t);Ye.stringify=(e,t={})=>gd(typeof e=="string"?Ye.parse(e,t):e,t);Ye.compile=(e,t={})=>(typeof e=="string"&&(e=Ye.parse(e,t)),vx(e,t));Ye.expand=(e,t={})=>{typeof e=="string"&&(e=Ye.parse(e,t));let r=Sx(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};Ye.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?Ye.compile(e,t):Ye.expand(e,t);hd.exports=Ye});var kn=_((MR,bd)=>{"use strict";var Ax=require("path"),$t="\\\\/",Cd=`[^${$t}]`,Gt="\\.",Px="\\+",Tx="\\?",Lo="\\/",Rx="(?=.)",yd="[^/]",Ws=`(?:${Lo}|$)`,xd=`(?:^|${Lo})`,zs=`${Gt}{1,2}${Ws}`,Ix=`(?!${Gt})`,kx=`(?!${xd}${zs})`,Bx=`(?!${Gt}{0,1}${Ws})`,$x=`(?!${zs})`,_x=`[^.${Lo}]`,Nx=`${yd}*?`,wd={DOT_LITERAL:Gt,PLUS_LITERAL:Px,QMARK_LITERAL:Tx,SLASH_LITERAL:Lo,ONE_CHAR:Rx,QMARK:yd,END_ANCHOR:Ws,DOTS_SLASH:zs,NO_DOT:Ix,NO_DOTS:kx,NO_DOT_SLASH:Bx,NO_DOTS_SLASH:$x,QMARK_NO_DOT:_x,STAR:Nx,START_ANCHOR:xd},Ox={...wd,SLASH_LITERAL:`[${$t}]`,QMARK:Cd,STAR:`${Cd}*?`,DOTS_SLASH:`${Gt}{1,2}(?:[${$t}]|$)`,NO_DOT:`(?!${Gt})`,NO_DOTS:`(?!(?:^|[${$t}])${Gt}{1,2}(?:[${$t}]|$))`,NO_DOT_SLASH:`(?!${Gt}{0,1}(?:[${$t}]|$))`,NO_DOTS_SLASH:`(?!${Gt}{1,2}(?:[${$t}]|$))`,QMARK_NO_DOT:`[^.${$t}]`,START_ANCHOR:`(?:^|[${$t}])`,END_ANCHOR:`(?:[${$t}]|$)`},Lx={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"};bd.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Lx,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:Ax.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?Ox:wd}}});var Bn=_(je=>{"use strict";var Mx=require("path"),jx=process.platform==="win32",{REGEX_BACKSLASH:Ux,REGEX_REMOVE_BACKSLASH:Vx,REGEX_SPECIAL_CHARS:Hx,REGEX_SPECIAL_CHARS_GLOBAL:Kx}=kn();je.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);je.hasRegexChars=e=>Hx.test(e);je.isRegexChar=e=>e.length===1&&je.hasRegexChars(e);je.escapeRegex=e=>e.replace(Kx,"\\$1");je.toPosixSlashes=e=>e.replace(Ux,"/");je.removeBackslashes=e=>e.replace(Vx,t=>t==="\\"?"":t);je.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};je.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:jx===!0||Mx.sep==="\\";je.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?je.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};je.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};je.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${e})${i}`;return t.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Rd=_((UR,Td)=>{"use strict";var Ed=Bn(),{CHAR_ASTERISK:qs,CHAR_AT:Gx,CHAR_BACKWARD_SLASH:$n,CHAR_COMMA:Wx,CHAR_DOT:Js,CHAR_EXCLAMATION_MARK:Ys,CHAR_FORWARD_SLASH:Pd,CHAR_LEFT_CURLY_BRACE:Qs,CHAR_LEFT_PARENTHESES:Xs,CHAR_LEFT_SQUARE_BRACKET:zx,CHAR_PLUS:qx,CHAR_QUESTION_MARK:vd,CHAR_RIGHT_CURLY_BRACE:Jx,CHAR_RIGHT_PARENTHESES:Sd,CHAR_RIGHT_SQUARE_BRACKET:Yx}=kn(),Fd=e=>e===Pd||e===$n,Ad=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},Qx=(e,t)=>{let r=t||{},n=e.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=e,c=-1,l=0,p=0,d=!1,D=!1,m=!1,f=!1,g=!1,h=!1,E=!1,v=!1,P=!1,A=!1,F=0,T,k,I={value:"",depth:0,isGlob:!1},S=()=>c>=n,C=()=>u.charCodeAt(c+1),$=()=>(T=k,u.charCodeAt(++c));for(;c<n;){k=$();let ue;if(k===$n){E=I.backslashes=!0,k=$(),k===Qs&&(h=!0);continue}if(h===!0||k===Qs){for(F++;S()!==!0&&(k=$());){if(k===$n){E=I.backslashes=!0,$();continue}if(k===Qs){F++;continue}if(h!==!0&&k===Js&&(k=$())===Js){if(d=I.isBrace=!0,m=I.isGlob=!0,A=!0,i===!0)continue;break}if(h!==!0&&k===Wx){if(d=I.isBrace=!0,m=I.isGlob=!0,A=!0,i===!0)continue;break}if(k===Jx&&(F--,F===0)){h=!1,d=I.isBrace=!0,A=!0;break}}if(i===!0)continue;break}if(k===Pd){if(s.push(c),o.push(I),I={value:"",depth:0,isGlob:!1},A===!0)continue;if(T===Js&&c===l+1){l+=2;continue}p=c+1;continue}if(r.noext!==!0&&(k===qx||k===Gx||k===qs||k===vd||k===Ys)===!0&&C()===Xs){if(m=I.isGlob=!0,f=I.isExtglob=!0,A=!0,k===Ys&&c===l&&(P=!0),i===!0){for(;S()!==!0&&(k=$());){if(k===$n){E=I.backslashes=!0,k=$();continue}if(k===Sd){m=I.isGlob=!0,A=!0;break}}continue}break}if(k===qs){if(T===qs&&(g=I.isGlobstar=!0),m=I.isGlob=!0,A=!0,i===!0)continue;break}if(k===vd){if(m=I.isGlob=!0,A=!0,i===!0)continue;break}if(k===zx){for(;S()!==!0&&(ue=$());){if(ue===$n){E=I.backslashes=!0,$();continue}if(ue===Yx){D=I.isBracket=!0,m=I.isGlob=!0,A=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&k===Ys&&c===l){v=I.negated=!0,l++;continue}if(r.noparen!==!0&&k===Xs){if(m=I.isGlob=!0,i===!0){for(;S()!==!0&&(k=$());){if(k===Xs){E=I.backslashes=!0,k=$();continue}if(k===Sd){A=!0;break}}continue}break}if(m===!0){if(A=!0,i===!0)continue;break}}r.noext===!0&&(f=!1,m=!1);let O=u,L="",y="";l>0&&(L=u.slice(0,l),u=u.slice(l),p-=l),O&&m===!0&&p>0?(O=u.slice(0,p),y=u.slice(p)):m===!0?(O="",y=u):O=u,O&&O!==""&&O!=="/"&&O!==u&&Fd(O.charCodeAt(O.length-1))&&(O=O.slice(0,-1)),r.unescape===!0&&(y&&(y=Ed.removeBackslashes(y)),O&&E===!0&&(O=Ed.removeBackslashes(O)));let x={prefix:L,input:e,start:l,base:O,glob:y,isBrace:d,isBracket:D,isGlob:m,isExtglob:f,isGlobstar:g,negated:v,negatedExtglob:P};if(r.tokens===!0&&(x.maxDepth=0,Fd(k)||o.push(I),x.tokens=o),r.parts===!0||r.tokens===!0){let ue;for(let J=0;J<s.length;J++){let ht=ue?ue+1:l,Dt=s[J],Ue=e.slice(ht,Dt);r.tokens&&(J===0&&l!==0?(o[J].isPrefix=!0,o[J].value=L):o[J].value=Ue,Ad(o[J]),x.maxDepth+=o[J].depth),(J!==0||Ue!=="")&&a.push(Ue),ue=Dt}if(ue&&ue+1<e.length){let J=e.slice(ue+1);a.push(J),r.tokens&&(o[o.length-1].value=J,Ad(o[o.length-1]),x.maxDepth+=o[o.length-1].depth)}x.slashes=s,x.parts=a}return x};Td.exports=Qx});var Bd=_((VR,kd)=>{"use strict";var Mo=kn(),Qe=Bn(),{MAX_LENGTH:jo,POSIX_REGEX_SOURCE:Xx,REGEX_NON_SPECIAL_CHARS:Zx,REGEX_SPECIAL_CHARS_BACKREF:e0,REPLACEMENTS:Id}=Mo,t0=(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=>Qe.escapeRegex(i)).join("..")}return r},zr=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Zs=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Id[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(jo,r.maxLength):jo,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?"":"?:",u=Qe.isWindows(t),c=Mo.globChars(u),l=Mo.extglobChars(c),{DOT_LITERAL:p,PLUS_LITERAL:d,SLASH_LITERAL:D,ONE_CHAR:m,DOTS_SLASH:f,NO_DOT:g,NO_DOT_SLASH:h,NO_DOTS_SLASH:E,QMARK:v,QMARK_NO_DOT:P,STAR:A,START_ANCHOR:F}=c,T=B=>`(${a}(?:(?!${F}${B.dot?f:p}).)*?)`,k=r.dot?"":g,I=r.dot?v:P,S=r.bash===!0?T(r):A;r.capture&&(S=`(${S})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let C={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=Qe.removePrefix(e,C),i=e.length;let $=[],O=[],L=[],y=s,x,ue=()=>C.index===i-1,J=C.peek=(B=1)=>e[C.index+B],ht=C.advance=()=>e[++C.index]||"",Dt=()=>e.slice(C.index+1),Ue=(B="",ne=0)=>{C.consumed+=B,C.index+=ne},Nn=B=>{C.output+=B.output!=null?B.output:B.value,Ue(B.value)},nf=()=>{let B=1;for(;J()==="!"&&(J(2)!=="("||J(3)==="?");)ht(),C.start++,B++;return B%2===0?!1:(C.negated=!0,C.start++,!0)},On=B=>{C[B]++,L.push(B)},er=B=>{C[B]--,L.pop()},K=B=>{if(y.type==="globstar"){let ne=C.braces>0&&(B.type==="comma"||B.type==="brace"),R=B.extglob===!0||$.length&&(B.type==="pipe"||B.type==="paren");B.type!=="slash"&&B.type!=="paren"&&!ne&&!R&&(C.output=C.output.slice(0,-y.output.length),y.type="star",y.value="*",y.output=S,C.output+=y.output)}if($.length&&B.type!=="paren"&&($[$.length-1].inner+=B.value),(B.value||B.output)&&Nn(B),y&&y.type==="text"&&B.type==="text"){y.value+=B.value,y.output=(y.output||"")+B.value;return}B.prev=y,o.push(B),y=B},Ln=(B,ne)=>{let R={...l[ne],conditions:1,inner:""};R.prev=y,R.parens=C.parens,R.output=C.output;let H=(r.capture?"(":"")+R.open;On("parens"),K({type:B,value:ne,output:C.output?"":m}),K({type:"paren",extglob:!0,value:ht(),output:H}),$.push(R)},of=B=>{let ne=B.close+(r.capture?")":""),R;if(B.type==="negate"){let H=S;if(B.inner&&B.inner.length>1&&B.inner.includes("/")&&(H=T(r)),(H!==S||ue()||/^\)+$/.test(Dt()))&&(ne=B.close=`)$))${H}`),B.inner.includes("*")&&(R=Dt())&&/^\.[^\\/.]+$/.test(R)){let ce=Zs(R,{...t,fastpaths:!1}).output;ne=B.close=`)${ce})${H})`}B.prev.type==="bos"&&(C.negatedExtglob=!0)}K({type:"paren",extglob:!0,value:x,output:ne}),er("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let B=!1,ne=e.replace(e0,(R,H,ce,Ae,me,Vo)=>Ae==="\\"?(B=!0,R):Ae==="?"?H?H+Ae+(me?v.repeat(me.length):""):Vo===0?I+(me?v.repeat(me.length):""):v.repeat(ce.length):Ae==="."?p.repeat(ce.length):Ae==="*"?H?H+Ae+(me?S:""):S:H?R:`\\${R}`);return B===!0&&(r.unescape===!0?ne=ne.replace(/\\/g,""):ne=ne.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),ne===e&&r.contains===!0?(C.output=e,C):(C.output=Qe.wrapOutput(ne,C,t),C)}for(;!ue();){if(x=ht(),x==="\0")continue;if(x==="\\"){let R=J();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){x+="\\",K({type:"text",value:x});continue}let H=/^\\+/.exec(Dt()),ce=0;if(H&&H[0].length>2&&(ce=H[0].length,C.index+=ce,ce%2!==0&&(x+="\\")),r.unescape===!0?x=ht():x+=ht(),C.brackets===0){K({type:"text",value:x});continue}}if(C.brackets>0&&(x!=="]"||y.value==="["||y.value==="[^")){if(r.posix!==!1&&x===":"){let R=y.value.slice(1);if(R.includes("[")&&(y.posix=!0,R.includes(":"))){let H=y.value.lastIndexOf("["),ce=y.value.slice(0,H),Ae=y.value.slice(H+2),me=Xx[Ae];if(me){y.value=ce+me,C.backtrack=!0,ht(),!s.output&&o.indexOf(y)===1&&(s.output=m);continue}}}(x==="["&&J()!==":"||x==="-"&&J()==="]")&&(x=`\\${x}`),x==="]"&&(y.value==="["||y.value==="[^")&&(x=`\\${x}`),r.posix===!0&&x==="!"&&y.value==="["&&(x="^"),y.value+=x,Nn({value:x});continue}if(C.quotes===1&&x!=='"'){x=Qe.escapeRegex(x),y.value+=x,Nn({value:x});continue}if(x==='"'){C.quotes=C.quotes===1?0:1,r.keepQuotes===!0&&K({type:"text",value:x});continue}if(x==="("){On("parens"),K({type:"paren",value:x});continue}if(x===")"){if(C.parens===0&&r.strictBrackets===!0)throw new SyntaxError(zr("opening","("));let R=$[$.length-1];if(R&&C.parens===R.parens+1){of($.pop());continue}K({type:"paren",value:x,output:C.parens?")":"\\)"}),er("parens");continue}if(x==="["){if(r.nobracket===!0||!Dt().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(zr("closing","]"));x=`\\${x}`}else On("brackets");K({type:"bracket",value:x});continue}if(x==="]"){if(r.nobracket===!0||y&&y.type==="bracket"&&y.value.length===1){K({type:"text",value:x,output:`\\${x}`});continue}if(C.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(zr("opening","["));K({type:"text",value:x,output:`\\${x}`});continue}er("brackets");let R=y.value.slice(1);if(y.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(x=`/${x}`),y.value+=x,Nn({value:x}),r.literalBrackets===!1||Qe.hasRegexChars(R))continue;let H=Qe.escapeRegex(y.value);if(C.output=C.output.slice(0,-y.value.length),r.literalBrackets===!0){C.output+=H,y.value=H;continue}y.value=`(${a}${H}|${y.value})`,C.output+=y.value;continue}if(x==="{"&&r.nobrace!==!0){On("braces");let R={type:"brace",value:x,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};O.push(R),K(R);continue}if(x==="}"){let R=O[O.length-1];if(r.nobrace===!0||!R){K({type:"text",value:x,output:x});continue}let H=")";if(R.dots===!0){let ce=o.slice(),Ae=[];for(let me=ce.length-1;me>=0&&(o.pop(),ce[me].type!=="brace");me--)ce[me].type!=="dots"&&Ae.unshift(ce[me].value);H=t0(Ae,r),C.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let ce=C.output.slice(0,R.outputIndex),Ae=C.tokens.slice(R.tokensIndex);R.value=R.output="\\{",x=H="\\}",C.output=ce;for(let me of Ae)C.output+=me.output||me.value}K({type:"brace",value:x,output:H}),er("braces"),O.pop();continue}if(x==="|"){$.length>0&&$[$.length-1].conditions++,K({type:"text",value:x});continue}if(x===","){let R=x,H=O[O.length-1];H&&L[L.length-1]==="braces"&&(H.comma=!0,R="|"),K({type:"comma",value:x,output:R});continue}if(x==="/"){if(y.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",o.pop(),y=s;continue}K({type:"slash",value:x,output:D});continue}if(x==="."){if(C.braces>0&&y.type==="dot"){y.value==="."&&(y.output=p);let R=O[O.length-1];y.type="dots",y.output+=x,y.value+=x,R.dots=!0;continue}if(C.braces+C.parens===0&&y.type!=="bos"&&y.type!=="slash"){K({type:"text",value:x,output:p});continue}K({type:"dot",value:x,output:p});continue}if(x==="?"){if(!(y&&y.value==="(")&&r.noextglob!==!0&&J()==="("&&J(2)!=="?"){Ln("qmark",x);continue}if(y&&y.type==="paren"){let H=J(),ce=x;if(H==="<"&&!Qe.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(y.value==="("&&!/[!=<:]/.test(H)||H==="<"&&!/<([!=]|\w+>)/.test(Dt()))&&(ce=`\\${x}`),K({type:"text",value:x,output:ce});continue}if(r.dot!==!0&&(y.type==="slash"||y.type==="bos")){K({type:"qmark",value:x,output:P});continue}K({type:"qmark",value:x,output:v});continue}if(x==="!"){if(r.noextglob!==!0&&J()==="("&&(J(2)!=="?"||!/[!=<:]/.test(J(3)))){Ln("negate",x);continue}if(r.nonegate!==!0&&C.index===0){nf();continue}}if(x==="+"){if(r.noextglob!==!0&&J()==="("&&J(2)!=="?"){Ln("plus",x);continue}if(y&&y.value==="("||r.regex===!1){K({type:"plus",value:x,output:d});continue}if(y&&(y.type==="bracket"||y.type==="paren"||y.type==="brace")||C.parens>0){K({type:"plus",value:x});continue}K({type:"plus",value:d});continue}if(x==="@"){if(r.noextglob!==!0&&J()==="("&&J(2)!=="?"){K({type:"at",extglob:!0,value:x,output:""});continue}K({type:"text",value:x});continue}if(x!=="*"){(x==="$"||x==="^")&&(x=`\\${x}`);let R=Zx.exec(Dt());R&&(x+=R[0],C.index+=R[0].length),K({type:"text",value:x});continue}if(y&&(y.type==="globstar"||y.star===!0)){y.type="star",y.star=!0,y.value+=x,y.output=S,C.backtrack=!0,C.globstar=!0,Ue(x);continue}let B=Dt();if(r.noextglob!==!0&&/^\([^?]/.test(B)){Ln("star",x);continue}if(y.type==="star"){if(r.noglobstar===!0){Ue(x);continue}let R=y.prev,H=R.prev,ce=R.type==="slash"||R.type==="bos",Ae=H&&(H.type==="star"||H.type==="globstar");if(r.bash===!0&&(!ce||B[0]&&B[0]!=="/")){K({type:"star",value:x,output:""});continue}let me=C.braces>0&&(R.type==="comma"||R.type==="brace"),Vo=$.length&&(R.type==="pipe"||R.type==="paren");if(!ce&&R.type!=="paren"&&!me&&!Vo){K({type:"star",value:x,output:""});continue}for(;B.slice(0,3)==="/**";){let Mn=e[C.index+4];if(Mn&&Mn!=="/")break;B=B.slice(3),Ue("/**",3)}if(R.type==="bos"&&ue()){y.type="globstar",y.value+=x,y.output=T(r),C.output=y.output,C.globstar=!0,Ue(x);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!Ae&&ue()){C.output=C.output.slice(0,-(R.output+y.output).length),R.output=`(?:${R.output}`,y.type="globstar",y.output=T(r)+(r.strictSlashes?")":"|$)"),y.value+=x,C.globstar=!0,C.output+=R.output+y.output,Ue(x);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&B[0]==="/"){let Mn=B[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(R.output+y.output).length),R.output=`(?:${R.output}`,y.type="globstar",y.output=`${T(r)}${D}|${D}${Mn})`,y.value+=x,C.output+=R.output+y.output,C.globstar=!0,Ue(x+ht()),K({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&B[0]==="/"){y.type="globstar",y.value+=x,y.output=`(?:^|${D}|${T(r)}${D})`,C.output=y.output,C.globstar=!0,Ue(x+ht()),K({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-y.output.length),y.type="globstar",y.output=T(r),y.value+=x,C.output+=y.output,C.globstar=!0,Ue(x);continue}let ne={type:"star",value:x,output:S};if(r.bash===!0){ne.output=".*?",(y.type==="bos"||y.type==="slash")&&(ne.output=k+ne.output),K(ne);continue}if(y&&(y.type==="bracket"||y.type==="paren")&&r.regex===!0){ne.output=x,K(ne);continue}(C.index===C.start||y.type==="slash"||y.type==="dot")&&(y.type==="dot"?(C.output+=h,y.output+=h):r.dot===!0?(C.output+=E,y.output+=E):(C.output+=k,y.output+=k),J()!=="*"&&(C.output+=m,y.output+=m)),K(ne)}for(;C.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(zr("closing","]"));C.output=Qe.escapeLast(C.output,"["),er("brackets")}for(;C.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(zr("closing",")"));C.output=Qe.escapeLast(C.output,"("),er("parens")}for(;C.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(zr("closing","}"));C.output=Qe.escapeLast(C.output,"{"),er("braces")}if(r.strictSlashes!==!0&&(y.type==="star"||y.type==="bracket")&&K({type:"maybe_slash",value:"",output:`${D}?`}),C.backtrack===!0){C.output="";for(let B of C.tokens)C.output+=B.output!=null?B.output:B.value,B.suffix&&(C.output+=B.suffix)}return C};Zs.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(jo,r.maxLength):jo,i=e.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);e=Id[e]||e;let s=Qe.isWindows(t),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:c,NO_DOT:l,NO_DOTS:p,NO_DOTS_SLASH:d,STAR:D,START_ANCHOR:m}=Mo.globChars(s),f=r.dot?p:l,g=r.dot?d:l,h=r.capture?"":"?:",E={negated:!1,prefix:""},v=r.bash===!0?".*?":D;r.capture&&(v=`(${v})`);let P=k=>k.noglobstar===!0?v:`(${h}(?:(?!${m}${k.dot?c:o}).)*?)`,A=k=>{switch(k){case"*":return`${f}${u}${v}`;case".*":return`${o}${u}${v}`;case"*.*":return`${f}${v}${o}${u}${v}`;case"*/*":return`${f}${v}${a}${u}${g}${v}`;case"**":return f+P(r);case"**/*":return`(?:${f}${P(r)}${a})?${g}${u}${v}`;case"**/*.*":return`(?:${f}${P(r)}${a})?${g}${v}${o}${u}${v}`;case"**/.*":return`(?:${f}${P(r)}${a})?${o}${u}${v}`;default:{let I=/^(.*?)\.(\w+)$/.exec(k);if(!I)return;let S=A(I[1]);return S?S+o+I[2]:void 0}}},F=Qe.removePrefix(e,E),T=A(F);return T&&r.strictSlashes!==!0&&(T+=`${a}?`),T};kd.exports=Zs});var _d=_((HR,$d)=>{"use strict";var r0=require("path"),n0=Rd(),ea=Bd(),ta=Bn(),o0=kn(),i0=e=>e&&typeof e=="object"&&!Array.isArray(e),de=(e,t,r=!1)=>{if(Array.isArray(e)){let l=e.map(d=>de(d,t,r));return d=>{for(let D of l){let m=D(d);if(m)return m}return!1}}let n=i0(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=ta.isWindows(t),o=n?de.compileRe(e,t):de.makeRe(e,t,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let l={...t,ignore:null,onMatch:null,onResult:null};u=de(i.ignore,l,r)}let c=(l,p=!1)=>{let{isMatch:d,match:D,output:m}=de.test(l,o,t,{glob:e,posix:s}),f={glob:e,state:a,regex:o,posix:s,input:l,output:m,match:D,isMatch:d};return typeof i.onResult=="function"&&i.onResult(f),d===!1?(f.isMatch=!1,p?f:!1):u(l)?(typeof i.onIgnore=="function"&&i.onIgnore(f),f.isMatch=!1,p?f:!1):(typeof i.onMatch=="function"&&i.onMatch(f),p?f:!0)};return r&&(c.state=a),c};de.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?ta.toPosixSlashes:null),a=e===n,u=a&&o?o(e):e;return a===!1&&(u=o?o(e):e,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=de.matchBase(e,t,r,i):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};de.matchBase=(e,t,r,n=ta.isWindows(r))=>(t instanceof RegExp?t:de.makeRe(t,r)).test(r0.basename(e));de.isMatch=(e,t,r)=>de(t,r)(e);de.parse=(e,t)=>Array.isArray(e)?e.map(r=>de.parse(r,t)):ea(e,{...t,fastpaths:!1});de.scan=(e,t)=>n0(e,t);de.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 u=de.toRegex(a,t);return n===!0&&(u.state=e),u};de.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=ea.fastpaths(e,t)),i.output||(i=ea(e,t)),de.compileRe(i,t,r,n)};de.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/$^/}};de.constants=o0;$d.exports=de});var Od=_((KR,Nd)=>{"use strict";Nd.exports=_d()});var na=_((GR,Vd)=>{"use strict";var Md=require("util"),jd=Dd(),_t=Od(),ra=Bn(),Ld=e=>e===""||e==="./",Ud=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},se=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,i=new Set,s=new Set,o=0,a=l=>{s.add(l.output),r&&r.onResult&&r.onResult(l)};for(let l=0;l<t.length;l++){let p=_t(String(t[l]),{...r,onResult:a},!0),d=p.state.negated||p.state.negatedExtglob;d&&o++;for(let D of e){let m=p(D,!0);(d?!m.isMatch:m.isMatch)&&(d?n.add(m.output):(n.delete(m.output),i.add(m.output)))}}let c=(o===t.length?[...s]:[...i]).filter(l=>!n.has(l));if(r&&c.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(l=>l.replace(/\\/g,"")):t}return c};se.match=se;se.matcher=(e,t)=>_t(e,t);se.isMatch=(e,t,r)=>_t(t,r)(e);se.any=se.isMatch;se.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(se(e,t,{...r,onResult:s}));for(let a of i)o.has(a)||n.add(a);return[...n]};se.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Md.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>se.contains(e,n,r));if(typeof t=="string"){if(Ld(e)||Ld(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return se.isMatch(e,t,{...r,contains:!0})};se.matchKeys=(e,t,r)=>{if(!ra.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=se(Object.keys(e),t,r),i={};for(let s of n)i[s]=e[s];return i};se.some=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=_t(String(i),r);if(n.some(o=>s(o)))return!0}return!1};se.every=(e,t,r)=>{let n=[].concat(e);for(let i of[].concat(t)){let s=_t(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};se.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${Md.inspect(e)}"`);return[].concat(t).every(n=>_t(n,r)(e))};se.capture=(e,t,r)=>{let n=ra.isWindows(r),s=_t.makeRe(String(e),{...r,capture:!0}).exec(n?ra.toPosixSlashes(t):t);if(s)return s.slice(1).map(o=>o===void 0?"":o)};se.makeRe=(...e)=>_t.makeRe(...e);se.scan=(...e)=>_t.scan(...e);se.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let i of jd(String(n),t))r.push(_t.parse(i,t));return r};se.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!Ud(e)?[e]:jd(e,t)};se.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return se.braces(e,{...t,expand:!0})};se.hasBraces=Ud;Vd.exports=se});var $0={};df($0,{createDevToolsServer:()=>ss,version:()=>la});module.exports=ff($0);var mf="1.12.0",Ve=process.env.OVERRIDE_VERSION??mf;var Uo=require("http");var Ho="preview-url";var wr="framework",jn="platform",Un="node",da="/~builder-connect",tr="/~builder-connected",Ko="/~builder-dev-tools",Go="/~builder-dev-tools.js",rr="/~builder-dev-tools-close",fa="/mappings";function W(e,t=""){return e.ts.createSourceFile("module.tsx",typeof t=="string"?t:"",e.ts.ScriptTarget.Latest,void 0)}function Vn(e,t=""){let r=W(e,t?.trim());if(r.statements.length===0)throw new Error(`No statements found in code: ${t}`);return r.statements[0]}function De(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()+`
|
|
23
23
|
`:n.printNode(e.ts.EmitHint.Unspecified,t,e.ts.createSourceFile("module.tsx","",e.ts.ScriptTarget.Latest)).trim()+`
|
|
24
|
-
`}return""}var Da=M(ga(),1);function He(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function z(e,t,r){t=pt(t),r=pt(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=pt(e.normalize(i)),i.startsWith(".")||(i="./"+i),i}function pt(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function nr(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),i=n[n.length-1];return ha(i==="index"?e.basename(e.dirname(t)):i)}function ha(e){return te(e).replace(/ /g,"")}function Ze(e,t){let r=e.extname(t),n=pt(e.basename(t,r)).split("/").pop();return te(n==="index"?e.basename(e.dirname(t)):n)}function re(e,t){let r=pt(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 X(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 te(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
|
|
25
|
-
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=Xr.get(a);if(c)return W(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(u=ba.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Gn(c)}return a.includes("node_modules")&&(u?Xr.set(a,{exists:!0,content:u}):Xr.set(a,{exists:!1})),W(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return Cf(e,o,t,r)}catch(a){if(a instanceof Gn){await yf(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function Cf(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=wa.get(s);if(!o){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c: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:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,wa.set(s,o))}o&&(i.options=Ke(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 vr(e,t,r){r||(r=await ge(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 Gn=class{constructor(t){
|
|
24
|
+
`}return""}var Da=M(ga(),1);function He(e){return e.endsWith(".mapper.tsx")||e.endsWith(".mapper.jsx")||e.endsWith(".mapper.ts")||e.endsWith(".mapper.js")||e.endsWith(".mapper.mjs")}function z(e,t,r){t=pt(t),r=pt(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=pt(e.normalize(i)),i.startsWith(".")||(i="./"+i),i}function pt(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}function nr(e,t){let r=e.extname(t),n=e.basename(t,r).split(/[\/\\]/),i=n[n.length-1];return ha(i==="index"?e.basename(e.dirname(t)):i)}function ha(e){return te(e).replace(/ /g,"")}function Ze(e,t){let r=e.extname(t),n=pt(e.basename(t,r)).split("/").pop();return te(n==="index"?e.basename(e.dirname(t)):n)}function re(e,t){let r=pt(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 X(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 te(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 _e(e){return e.sort((t,r)=>t.name.toLocaleLowerCase().localeCompare(r.name.toLocaleLowerCase()))}async function ee(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 Ca(e){return(await e.hash(e.getAppRootDir())).substring(0,8)}function Yr(e){return typeof e=="number"}function br(e){return typeof e=="boolean"}function Pe(e){return typeof e=="string"}function Er(e){return typeof e=="string"?/^[A-Z][A-Za-z0-9]*$/.test(e):!1}function Ke(e){return JSON.parse(JSON.stringify(e))}function Hn(e,t,r){for(let n of t)if(e.dirname(r).includes(n))return!0;return!1}function ya(){try{let e=(0,Da.default)();if(e?.name)return e.name}catch{}return"npm"}function hf(){return process.platform.startsWith("win")}function Te(){return hf()?'"@builder.io/dev-tools"':"builder.io"}function Re(e){let t=e.join(e.getAppRootDir(),"tsconfig.json");return e.exists(t)}var Df=["node_modules","dist","build","public"];async function Ne(e,t){async function r(i,s){if(s>10)return;let o=await e.readdir(i);for(let a of o){if(Df.includes(a))continue;let u=e.join(i,a),c=await e.stat(u);if(c){if(c.isFile()&&a.startsWith("builder-registry."))return u;if(c.isDirectory()){let l=await r(u,s+1);if(l)return l}}}}let n=await r(e.getAppRootDir(),0);if(!n){let s=`builder-registry.${await Re(e)?"ts":"js"}`;return e.join(t,s)}return n}async function Wt(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 xa(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 Qr(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 u=await Qr(e,o,r);if(u)return u}}))).find(s=>typeof s=="string")}async function ge(e,t,r){if(!Array.isArray(t)||t.length===0)throw new Error(`createTsProgram() Invalid filePaths: ${t}`);let n=await xa(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 u=Xr.get(a);if(!u){try{e.statSync(a).isFile()?u={exists:!0,content:e.readFileSync(a)}:u={exists:!1}}catch{u={exists:!1}}Xr.set(a,u)}return u.exists}if(!s.has(a))if(e.existsSync(a)){let c=e.statSync(a);s.set(a,c.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:()=>`
|
|
25
|
+
`,getSourceFile:a=>{if(a=e.normalize(a),a.includes("node_modules")){let c=Xr.get(a);if(c)return W(e,c.content)}let u;try{u=e.readFileSync(a)}catch{console.error(`Could not read: ${a}`),u==null}if(u==null){let c=e.basename(a),l=e.extname(c).toLowerCase();if(a.startsWith(i)&&l===".ts"&&(u=ba.get(c),u==null&&typeof self<"u"&&typeof fetch=="function"))throw new Gn(c)}return a.includes("node_modules")&&(u?Xr.set(a,{exists:!0,content:u}):Xr.set(a,{exists:!1})),W(e,u)},readFile:a=>{let u=e.readFileSync(a);return typeof u=="string"?u:void 0},useCaseSensitiveFileNames:()=>!1,writeFile:()=>{}};for(;;)try{return Cf(e,o,t,r)}catch(a){if(a instanceof Gn){await yf(e,a.libName);continue}throw e.Sentry?.captureException(a),new Error(`createTsProgram() Could not create program for: ${t[0]}`,{cause:a})}}function Cf(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=wa.get(s);if(!o){let a=e.ts.readConfigFile(s,u=>{let c=e.readFileSync(u);return typeof c=="string"?c: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:(c,l)=>e.readdirSync(c),fileExists:c=>e.existsSync(c),readFile:c=>e.readFileSync(c)||void 0},e.dirname(s),void 0,s).options,wa.set(s,o))}o&&(i.options=Ke(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 vr(e,t,r){r||(r=await ge(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 Gn=class{constructor(t){$e(this,"libName");this.libName=t}};async function yf(e,t){let r=`https://cdn.jsdelivr.net/npm/typescript@${e.ts.version}/lib/${t}`;Kn.has(t)||Kn.set(t,fetch(r).then(n=>n.text()).then(n=>{ba.set(t,n)})),await Kn.get(t),Kn.delete(t)}var ba=new Map,Kn=new Map,Xr=new Map,wa=new Map;async function Ea(e,t){let r=await e.readFile(t.filePath);return r==null?{diagnostics:[{messageText:`Error reading: ${t.filePath}`}],code:null,output:null}:Wo(e,{code:r,filePath:t.filePath,compilerOptions:t.compilerOptions})}function Wo(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}var Ct=require("fs/promises");var qo=require("os"),Jo=M(require("path"),1),bf=M(require("typescript"),1),Ef=M(require("launch-editor"),1);async function Sr(e){let t=[],r=await Wt(e,e.getRepoRootDir());if(r){let n=await Sa(r,e);t.push(...n)}return t}async function Sa(e,t){let r=[];if(e&&typeof e=="object"){let n=new Set(Object.keys({...e.dependencies,...e.devDependencies}));for(let i of xf)if(n.has(i)&&!r.some(s=>s.name===i)){let s={name:i};va.has(i)&&(s.version=await va.get(i)(t)),r.push(s)}}return r}function zo(e){let t=parseInt(e);return Number.isNaN(t)?void 0:t}var va=new Map([["next",async e=>{if(!e.spawnSync)return;let t=ya(),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,u]=s.split(".");return{major:zo(o),minor:zo(a),patch:zo(u)}}]]),xf=["@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"];var vf=M(require("@sentry/node"),1);var Sf=M(require("prettier"),1);function Fa(){let e=(0,qo.homedir)();return Jo.default.join(e,".config","builder","dev-tools.json")}function Yo(e,t){return typeof e=="object"&&e!=null&&t in e}async function Fr(){let e=Fa();try{let t=await(0,Ct.readFile)(e,"utf-8");if(typeof t=="string")return JSON.parse(t)}catch(t){if(t.code==="ENOENT")return null}return null}async function Qo(e){let t=Fa();e=typeof e=="object"&&e!=null?e:{},await(0,Ct.mkdir)(Jo.default.dirname(t),{recursive:!0}),await(0,Ct.writeFile)(t,JSON.stringify(e??{},null,2))}var N={gen1:"Gen 1",gen2:"Gen 2"},Zr={CMS:"cms",VCP:"vcp",HYBRID:"hybrid"};var Aa=require("console"),Pa=require("http"),Ta=require("https");function Ar(e){let t=Date.now();return new Promise((r,n)=>{let s=Ff(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",u=>{a+=u}),o.on("end",()=>{if((0,Aa.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(u){n(`Response from ${e.url.href} is not valid JSON: ${a}
|
|
26
26
|
${u}`)}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 Ff(e){if(e.protocol==="https:")return Ta.request;if(e.protocol==="http:")return Pa.request;throw new Error(`Unsupported protocol ${e.protocol}`)}async function Ra(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 Ar({url:t,method:"GET"}))[e.model]}async function Ia(e,t){if(t.kind===Zr.VCP)return!0;let r=new URL("https://cdn.builder.io/api/v2/admin"),n={query:`query {
|
|
27
27
|
models {
|
|
28
28
|
id
|
|
@@ -41,7 +41,7 @@ Restarting server after Builder Devtools update...
|
|
|
41
41
|
<h3>How's Devtools working for you?</h3>
|
|
42
42
|
<p>We'd love your feedback!</p>
|
|
43
43
|
</div>
|
|
44
|
-
\`,t.appendChild(e),setTimeout(()=>{e.classList.add("menu-toggle-tooltip-show"),e.addEventListener("click",()=>{e.classList.remove("menu-toggle-tooltip-show")})},1e3)};function ui(t){t.getElementById("go-to-builder").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(Nr(),"builder")}),t.getElementById("components-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation();let u=t.querySelector(".nav-cmp-list .section-content");u.scrollTop=0,oe(t,"nav-cmp-list"),si(t)}),t.getElementById("settings-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),oe(t,"nav-settings")}),t.getElementById("add-page-link").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open(je(),"builder")}),t.getElementById("import-from-figma").addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),Ee(t,!1),window.open("https://www.figma.com/community/plugin/747985167520967365/builder-io-ai-powered-figma-to-code-react-vue-tailwind-more")})}function ci(t){let e=t.getElementById("enable-edit");e.addEventListener("change",r=>{r.stopPropagation(),Ft(e.checked)}),e.checked=it(),Ft(e.checked)}var At=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=\`<style>*,*:before,*:after{box-sizing:border-box}:host{--background-color: rgba(40, 40, 40, 1);--primary-color: rgba(72, 161, 255, 1);--primary-color-subdued: rgb(72, 161, 255, .6);--primary-color-highlight: rgb(126, 188, 255);--primary-contrast-color: white;--edit-color: #1d74e2;--edit-color-highlight: #1c6bd1;--edit-color-alpha: rgb(72, 161, 255, .15);--error-color: #ff2b55;--text-color: white;--text-color-highlight: white;--border-color: #454545;--button-background-color-hover: rgba(255, 255, 255, .1);--menu-width: 320px;--transition-time: .15s;--font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";font-family:var(--font-family);line-height:1.6}button{cursor:pointer;color:var(--text-color);-webkit-tap-highlight-color:transparent}input,select,button{font-family:var(--font-family)}.menu-toggle{position:absolute;right:0;bottom:0;pointer-events:auto;padding:8px;background:transparent;border:none;appearance:none}.menu-toggle div{position:relative;width:64px;height:64px;pointer-events:none;border-radius:50%;background:#000;border:1px solid white;box-shadow:#00000054 0 0 8px}.menu-toggle:hover div{background-color:var(--background-color);border:1px solid rgb(220,220,220)}.menu-toggle svg{position:absolute;top:15px;left:15px;width:33px;height:32px}div.highlight-bg{position:absolute;top:-1px;left:-1px;background-color:#1a1a1a;pointer-events:none;transition:all .4s ease-out;opacity:0}.menu-toggle-highlight-no-transition div.highlight-bg{transition:none}.menu-toggle-highlight div.highlight-bg{opacity:1}.menu-toggle-tooltip{position:absolute;bottom:0;right:0;width:382px;height:72px;padding:0;text-align:left;appearance:none;background-color:transparent;border:none;pointer-events:none;transform:translate3d(320px,0,0);opacity:0;transition:all .15s ease-in-out;color:#fff}.menu-toggle-tooltip.menu-toggle-tooltip-show{pointer-events:auto;opacity:1;transform:translateZ(0)}.menu-toggle-tooltip-content{position:absolute;inset:0 95px 10px 0;padding:8px 12px;background-color:var(--primary-color);box-shadow:#00000054 0 0 20px;border-radius:2px}.menu-toggle-tooltip-content:before{content:"";position:absolute;bottom:15px;right:-6px;width:30px;height:30px;background-color:var(--primary-color);transform:rotate(45deg)}.menu-toggle-tooltip:hover .menu-toggle-tooltip-content,.menu-toggle-tooltip:hover .menu-toggle-tooltip-content:before{background-color:var(--primary-color-highlight)}.menu-toggle-tooltip-content h3{margin:0;font-size:16px}.menu-toggle-tooltip-content p{margin:0;font-size:12px}section{position:absolute;display:grid;grid-template-rows:64px auto 64px;top:0;left:0;width:100%;height:100%;padding:0;pointer-events:none}.section-content{margin:0;padding:0 0 10px;font-weight:300;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;overflow-y:auto}.section-content .error{color:var(--error-color);font-weight:700}section a{text-decoration:none;color:var(--text-color)}section h3,section p{margin-left:16px;margin-right:16px}.info{font-size:12px}ul.list{list-style:none;padding:0;margin:0}ul.list li{display:block;padding:0;margin:0}ul.list a,ul.list button{display:grid;grid-template-columns:24px auto;grid-gap:16px;padding:12px;margin:8px 0;border:none;background:transparent;appearance:none;width:100%;font-weight:300;text-align:left;text-decoration:none;color:var(--text-color)}ul.list a:hover,ul.list button:hover{text-decoration:none;color:var(--text-color);background-color:var(--button-background-color-hover)}ul.list a span,ul.list button span{display:block;font-size:16px;font-weight:500;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}header{position:relative;display:grid;grid-template-columns:44px 1fr;gap:8px;padding-left:8px;border-bottom:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}header>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-home header>div{margin-right:56px}header h2{margin:7px 0 0;font-size:18px;font-weight:500;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p{margin:2px 0 0;font-size:12px;font-weight:300;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button{display:block;margin:0;padding:0;width:100%;font-size:12px;font-weight:300;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}header p button:hover{text-decoration:underline;color:var(--primary-color)}.builder-logo{margin:12px 0 0 8px}#close{display:block;position:absolute;appearance:none;background:transparent;border:none;border-radius:50%;margin:0;padding:0;right:4px;top:8px;width:48px;height:48px;z-index:1;opacity:.7}#close:hover{opacity:1;background-color:var(--button-background-color-hover)}#close svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}.back-button{position:relative;display:block;margin:7px 0 0 -2px;width:48px;height:48px;background:transparent;border:none;appearance:none;border-radius:50%}.back-button:hover{background-color:var(--button-background-color-hover)}.back-button svg{position:absolute;top:12px;left:12px;width:24px;height:24px;fill:currentColor;pointer-events:none}footer{border-top:1px solid var(--border-color);transition:opacity var(--transition-time) ease-in-out;opacity:0;pointer-events:none}section.nav-cmp-list{grid-template-rows:64px auto 120px}footer a{text-decoration:underline;color:var(--primary-color)}footer a:hover{color:var(--primary-color);text-decoration:none}.nav-list{padding:2px 0}.nav-loading{pointer-events:none}.nav-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.nav-loading .nav-loading-icon{opacity:.5}.nav-list h4{margin:8px 8px 8px 10px;font-size:14px;font-weight:600}.nav-list .nav-list-item+h4{margin-top:30px}.nav-list-item{display:grid;grid-template-columns:1fr 1fr;gap:8px;position:relative;margin:2px 0;padding:8px 28px 8px 46px;width:100%;font-size:14px;font-weight:300;text-align:left;border:none;background:transparent;appearance:none}.nav-list-item:hover{background-color:var(--button-background-color-hover)}.nav-list-item-icon{position:absolute;top:4px;left:10px;width:24px;height:24px;object-fit:contain;filter:invert(100%);background-size:24px 24px;background-repeat:no-repeat;background-position:center center}.nav-list-item span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.nav-list-item:after{display:block;position:absolute;content:"";background-image:url('data:image/svg+xml,<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L7 7L1 13" stroke="%23F2F2F2" stroke-opacity="0.5" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:12px 9px;top:0;right:0;width:32px;height:32px;pointer-events:none}.nav-list-item-note{opacity:0;font-size:12px;padding-top:1px;text-align:right}.nav-list-item:hover .nav-list-item-note{opacity:.5}.ui-select{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-select h3{margin:0;font-size:14px;font-weight:500}.ui-select p{margin:8px 0;font-size:12px;font-weight:300}.ui-select .select{position:relative;margin:8px 0;border-radius:4px;padding:0;line-height:1.1;overflow:hidden;border:1px solid var(--border-color)}.ui-select select{appearance:none;background-color:transparent;border:none;outline:none;padding:8px 32px 8px 8px;margin:0;width:100%;font-size:14px;cursor:pointer;text-overflow:ellipsis;opacity:.6;color:var(--text-color)}.ui-select .select:after{content:"";top:6px;right:5px;width:24px;height:24px;position:absolute;background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23F2F2F2" d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/></svg>');background-repeat:no-repeat;background-position:center;pointer-events:none;opacity:.6}.ui-select .select:hover{border-color:var(--primary-color-subdued)}.ui-text-input .select:focus-within{border-color:var(--primary-color)}.ui-text-input .select:focus-within select{opacity:1}.spinner:after{content:" ";display:block;width:32px;height:32px;margin:0 auto;pointer-events:auto;border-radius:50%;border:3px solid var(--text-color);border-color:var(--text-color) transparent var(--text-color) transparent;animation:spinner .75s linear infinite}@keyframes spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ui-switch{display:grid;grid-template-columns:auto 48px;grid-gap:20px;margin:8px 0 16px;padding:8px 0 8px 16px;cursor:pointer}.ui-switch>*{pointer-events:none}.ui-switch input{display:none;visibility:hidden}.ui-switch .switcher{display:inline-block;border-radius:100px;width:35px;height:14px;background-color:#ccc;position:relative;top:6px;vertical-align:middle;cursor:pointer}.ui-switch input[type=checkbox]:checked+.switcher{background-color:var(--primary-color-subdued)}.ui-switch .switcher:before{content:"";display:block;width:20px;height:20px;background-color:var(--text-color);box-shadow:0 1px 3px #0009;border-radius:50%;position:absolute;top:-3px;left:0;margin-right:0;transition:all .15s}.ui-switch input[type=checkbox]:checked+.switcher:before{left:100%;margin-left:-20px;background-color:var(--primary-color)}.ui-switch h3{margin:0;font-size:14px;font-weight:500}.ui-switch p{margin:4px 0 0;font-size:12px;font-weight:300}.ui-text-input{display:block;margin:8px 0 16px;padding:8px 16px;cursor:pointer}.ui-text-input h3{margin:0;font-size:14px;font-weight:500}.ui-text-input p{margin:8px 0;font-size:12px;font-weight:300}.ui-text-input .input{position:relative;margin:8px 0;border:1px solid var(--border-color);border-radius:4px;background:transparent;padding:2px;overflow:hidden}.ui-text-input input{display:block;width:235px;font-size:14px;border:none;background:transparent;padding:6px;appearance:none;color:var(--text-color);opacity:.6;outline:none}.ui-text-input .input:hover{border-color:var(--primary-color-subdued)}.ui-text-input .input:focus-within{border-color:var(--primary-color)}.ui-text-input .input:focus-within input{opacity:1}.ui-text-input .input:after{content:"";position:absolute;top:5px;right:14px;width:8px;height:17px;border:2px solid rgba(51,181,51,1);border-top:none;border-left:none;transform:rotate(45deg);opacity:0;transition:opacity 80ms ease-in-out;pointer-events:none}.ui-text-input.saved .input:after{opacity:1}.ui-toast{position:fixed;bottom:8px;left:8px;right:8px;padding:6px 12px;font-size:14px;border-radius:4px;transform:translate3d(0,150%,0);opacity:0;transition:all var(--transition-time) ease-in-out;background-color:var(--primary-color-subdued);color:var(--text-color);pointer-events:none}.ui-toast.ui-toast-show{transform:translateZ(0);opacity:1;pointer-events:auto}[data-view=nav-home] .nav-home .section-content,[data-view=nav-cmp-list] .nav-cmp-list .section-content,[data-view=nav-cmp-detail] .nav-cmp-detail .section-content,[data-view=nav-cmp-input] .nav-cmp-input .section-content,[data-view=nav-settings] .nav-settings .section-content{transform:translateZ(0);pointer-events:auto}[data-view=nav-home] .nav-home header,[data-view=nav-home] .nav-home footer,[data-view=nav-cmp-list] .nav-cmp-list header,[data-view=nav-cmp-list] .nav-cmp-list footer,[data-view=nav-cmp-detail] .nav-cmp-detail header,[data-view=nav-cmp-detail] .nav-cmp-detail footer,[data-view=nav-cmp-input] .nav-cmp-input header,[data-view=nav-cmp-input] .nav-cmp-input footer,[data-view=nav-settings] .nav-settings header,[data-view=nav-settings] .nav-settings footer{opacity:1;pointer-events:auto}[data-view=nav-cmp-list] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-home .section-content,[data-view=nav-cmp-detail] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-home .section-content,[data-view=nav-cmp-input] .nav-cmp-list .section-content,[data-view=nav-cmp-input] .nav-cmp-detail .section-content,[data-view=nav-settings] .nav-home .section-content{transform:translate3d(-105%,0,0)}.cmp-item .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 16.809C20.94 16.561 21 16.289 21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L7.988 3.99001M5.441 5.44801L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L18.544 18.56" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M14.532 10.538L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3.27002 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/><path d="M3 3L21 21" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"/></svg>');opacity:.3}.cmp-item.registered .nav-list-item-icon{background-image:url('data:image/svg+xml,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /></svg>');opacity:.8}.search-highlight{background-color:var(--primary-color-alpha);padding:0 2px;border-radius:2px;font-weight:500}.search-container{position:sticky;top:0;z-index:10;padding:12px 16px;background:var(--background-color);border-bottom:1px solid var(--border-color)}.search-input-wrapper{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:12px;color:var(--text-color-secondary);pointer-events:none}.component-search-input{width:100%;height:36px;padding:8px 36px;border:1px solid var(--border-color);border-radius:6px;background:var(--input-background);color:var(--text-color);font-size:14px;transition:border-color .2s,box-shadow .2s}.component-search-input:focus{outline:none;border-color:var(--primary-color);box-shadow:0 0 0 2px var(--primary-color-alpha)}.component-search-input::placeholder{color:var(--text-color-tertiary)}.clear-search-button{position:absolute;right:8px;padding:4px;color:var(--text-color-secondary);border:none;background:transparent;border-radius:4px;cursor:pointer;opacity:0;transition:opacity .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.clear-search-button:hover{background-color:var(--hover-color)}.component-search-input:not(:placeholder-shown)+.clear-search-button{opacity:1}.no-results{padding:32px 16px;text-align:center;color:var(--text-color-secondary);font-size:14px}#cmp-detail{position:relative}.cmp-loading{pointer-events:none!important}.cmp-loading-icon{position:absolute;display:inline-block;top:170px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.cmp-loading .cmp-loading-icon{opacity:.5}.cmp-cover{position:absolute;top:160px;left:0;width:100%;height:100vh;background:var(--background-color);transform:translateZ(0);pointer-events:none;display:none}[data-view=nav-cmp-detail] .cmp-cover{display:block;pointer-events:auto}.cmp-enabled .cmp-cover{transform:translate3d(0,105%,0);pointer-events:none}.section-ready .cmp-cover{transition:all var(--transition-time) ease-in-out}.cmp-detail-inputs-container{margin:8px 0 16px;padding:0}.cmp-detail-inputs-container h3{margin:0 0 6px;padding-left:16px;padding-right:8px;font-size:14px;font-weight:500;display:flex;justify-content:space-between;align-items:center}.cmp-detail-inputs-reload{font-weight:300;font-size:.9em;text-decoration:none;appearance:none;text-align:left;background-color:transparent;border:none;color:var(--primary-color);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmp-detail-inputs-reload:hover{text-decoration:underline;color:var(--primary-color)}.cmp-detail-inputs-container .cmp-inputs-empty{padding:0;margin-top:12px;font-size:12px;font-weight:300;opacity:.5;font-style:italic}.cmp-detail-inputs-container .nav-list-item-icon{opacity:.8;background-size:20px 20px;background-position:4px center}.input-icon{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path></svg>')}.input-icon-array{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-6a2 2 0 1 1 4 0v6"></path> <path d="M10 13h4"></path></svg>')}.input-icon-boolean{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16h2a2 2 0 1 0 0 -4h-2h2a2 2 0 1 0 0 -4h-2v8z"></path></svg>')}.input-icon-number{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 16v-8l4 8v-8"></path></svg>')}.input-icon-object{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M12 8a2 2 0 0 1 2 2v4a2 2 0 1 1 -4 0v-4a2 2 0 0 1 2 -2z"></path></svg>')}.input-icon-string{background-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"></path> <path d="M10 15a1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1"></path></svg>')}.cmp-input-item-unregistered{opacity:.4}.cmp-input-item-unregistered .input-icon:after{content:"";position:absolute;top:11px;left:4px;width:20px;height:2px;background-color:#000;transform:rotate(-45deg)}.cmp-prop-info{border-bottom:1px solid var(--border-color)}.cmp-input-readonly{margin:16px 0;padding:0 16px;display:grid;grid-template-columns:50% 50%;gap:12px}.cmp-input-readonly h3{margin:0;font-size:14px;font-weight:500}.cmp-input-readonly span{margin-top:2px;font-size:12px;font-weight:300;opacity:.8}.cmp-input-detail{margin:16px 0}.cmp-input-detail a{color:var(--primary-color);text-decoration:none}.cmp-input-detail a:hover{text-decoration:underline}.input-cover{position:absolute;top:175px;left:0;width:100%;height:100%;background:var(--background-color);transform:translateZ(0);transition:all var(--transition-time) ease-in-out;pointer-events:auto}.input-enabled .input-cover{transform:translate3d(0,105%,0);pointer-events:none}.input-loading-icon{position:absolute;display:inline-block;top:190px;left:0;width:100%;transform:translateZ(0);pointer-events:auto;opacity:0;transition:all 50ms ease-in-out;transition-delay:50ms;pointer-events:none}.input-loading .input-loading-icon{opacity:.5}:host{position:fixed;inset:0;z-index:2147483646;user-select:none;pointer-events:none;color:var(--text-color)}aside{position:absolute;top:0;right:0;width:var(--menu-width);height:100%;transform:translate3d(105%,0,0);transition:transform var(--transition-time) ease-in-out;background:var(--background-color);box-shadow:#000000c9 5px 0 20px;overflow:hidden;z-index:1}:host(.show-builder-menu) aside{pointer-events:auto;transform:translateZ(0)}#hit{position:absolute;inset:0;display:none}:host(.show-builder-menu) #hit{display:block;pointer-events:auto}#version{position:absolute;bottom:6px;right:6px;font-size:8px;color:#9b9b9b}</style><div id="hit"></div> <aside data-view="nav-home"> <section class="nav-home"> <header> <svg class="builder-logo" viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> <div> <h2 class="builder-home-title">Builder Devtools</h2> <p><button id="go-to-builder">Go to Builder</button></p> </div> <button id="close" aria-label="Close Menu"> <svg viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M18 6l-12 12" /> <path d="M6 6l12 12" /> </svg> </button> </header> <div class="section-content"> <ul class="list"> <li> <button id="components-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M21 16.008V7.99001C20.9994 7.64108 20.9066 7.29851 20.731 6.99699C20.5554 6.69547 20.3032 6.44571 20 6.27301L13 2.26501C12.6954 2.09103 12.3508 1.99951 12 1.99951C11.6492 1.99951 11.3046 2.09103 11 2.26501L4 6.27301C3.381 6.62801 3 7.28301 3 7.99101V16.009C3 16.718 3.381 17.372 4 17.726L11 21.734C11.3046 21.908 11.6492 21.9995 12 21.9995C12.3508 21.9995 12.6954 21.908 13 21.734L20 17.726C20.619 17.371 21 16.716 21 16.008Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 22V12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 12L20.73 6.95996" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M3.26999 6.95996L12 12" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Components</span> </button> </li> <li> <button id="settings-link"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M10.325 4.317C10.751 2.561 13.249 2.561 13.675 4.317C13.7389 4.5808 13.8642 4.82578 14.0407 5.032C14.2172 5.23822 14.4399 5.39985 14.6907 5.50375C14.9414 5.60764 15.2132 5.65085 15.4838 5.62987C15.7544 5.60889 16.0162 5.5243 16.248 5.383C17.791 4.443 19.558 6.209 18.618 7.753C18.4769 7.98466 18.3924 8.24634 18.3715 8.51677C18.3506 8.78721 18.3938 9.05877 18.4975 9.30938C18.6013 9.55999 18.7627 9.78258 18.9687 9.95905C19.1747 10.1355 19.4194 10.2609 19.683 10.325C21.439 10.751 21.439 13.249 19.683 13.675C19.4192 13.7389 19.1742 13.8642 18.968 14.0407C18.7618 14.2172 18.6001 14.4399 18.4963 14.6907C18.3924 14.9414 18.3491 15.2132 18.3701 15.4838C18.3911 15.7544 18.4757 16.0162 18.617 16.248C19.557 17.791 17.791 19.558 16.247 18.618C16.0153 18.4769 15.7537 18.3924 15.4832 18.3715C15.2128 18.3506 14.9412 18.3938 14.6906 18.4975C14.44 18.6013 14.2174 18.7627 14.0409 18.9687C13.8645 19.1747 13.7391 19.4194 13.675 19.683C13.249 21.439 10.751 21.439 10.325 19.683C10.2611 19.4192 10.1358 19.1742 9.95929 18.968C9.7828 18.7618 9.56011 18.6001 9.30935 18.4963C9.05859 18.3924 8.78683 18.3491 8.51621 18.3701C8.24559 18.3911 7.98375 18.4757 7.752 18.617C6.209 19.557 4.442 17.791 5.382 16.247C5.5231 16.0153 5.60755 15.7537 5.62848 15.4832C5.64942 15.2128 5.60624 14.9412 5.50247 14.6906C5.3987 14.44 5.23726 14.2174 5.03127 14.0409C4.82529 13.8645 4.58056 13.7391 4.317 13.675C2.561 13.249 2.561 10.751 4.317 10.325C4.5808 10.2611 4.82578 10.1358 5.032 9.95929C5.23822 9.7828 5.39985 9.56011 5.50375 9.30935C5.60764 9.05859 5.65085 8.78683 5.62987 8.51621C5.60889 8.24559 5.5243 7.98375 5.383 7.752C4.443 6.209 6.209 4.442 7.753 5.382C8.753 5.99 10.049 5.452 10.325 4.317Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> <path d="M9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12Z" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Settings</span> </button> </li> <li> <button id="add-page-link"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z" /> <path d="M12 11l0 6" /> <path d="M9 14l6 0" /> </svg> <span>Add Builder Page</span> </button> </li> <li> <button id="import-from-figma"> <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-figma" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M15 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M6 3m0 3a3 3 0 0 1 3 -3h6a3 3 0 0 1 3 3v0a3 3 0 0 1 -3 3h-6a3 3 0 0 1 -3 -3z" /> <path d="M9 9a3 3 0 0 0 0 6h3m-3 0a3 3 0 1 0 3 3v-15" /> </svg> <span>Import From Figma</span> </button> </li> </ul> </div> <footer> <ul class="list"> <li> <a href="https://docs.google.com/forms/d/e/1FAIpQLSdqZcJpRtm_Ia5DTHP6SDY9Xa6LID3KiTjRWkjMzWyJRUtSHw/viewform" target="_blank" > <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.013 17.0114L10.013 18.0114L2.513 10.5834C2.0183 10.102 1.62864 9.52342 1.36854 8.88404C1.10845 8.24466 0.983558 7.55836 1.00173 6.86834C1.01991 6.17832 1.18076 5.49954 1.47415 4.87474C1.76755 4.24994 2.18713 3.69266 2.70648 3.23799C3.22583 2.78331 3.8337 2.4411 4.49181 2.23289C5.14991 2.02468 5.844 1.95499 6.53036 2.02821C7.21673 2.10143 7.8805 2.31596 8.47987 2.65831C9.07925 3.00066 9.60124 3.46341 10.013 4.01741C10.8086 2.95654 11.9931 2.2552 13.3059 2.06766C14.6186 1.88012 15.9521 2.22176 17.013 3.01741C18.0739 3.81306 18.7752 4.99755 18.9627 6.3103C19.1503 7.62305 18.8086 8.95654 18.013 10.0174" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M18.2006 19.8175L16.0286 20.9555C15.9642 20.989 15.8917 21.004 15.8192 20.9987C15.7467 20.9934 15.6771 20.9681 15.6182 20.9256C15.5593 20.8831 15.5134 20.825 15.4855 20.7579C15.4577 20.6907 15.4491 20.6172 15.4606 20.5455L15.8756 18.1345L14.1186 16.4275C14.0662 16.3768 14.0291 16.3123 14.0115 16.2416C13.9939 16.1708 13.9966 16.0965 14.0192 16.0271C14.0418 15.9578 14.0835 15.8962 14.1394 15.8494C14.1954 15.8026 14.2634 15.7725 14.3356 15.7625L16.7636 15.4105L17.8496 13.2175C17.8821 13.1521 17.9322 13.0972 17.9942 13.0588C18.0562 13.0204 18.1277 13 18.2006 13C18.2736 13 18.3451 13.0204 18.4071 13.0588C18.4691 13.0972 18.5191 13.1521 18.5516 13.2175L19.6376 15.4105L22.0656 15.7625C22.1377 15.7728 22.2054 15.8031 22.2611 15.85C22.3168 15.8968 22.3583 15.9583 22.3809 16.0275C22.4034 16.0967 22.4062 16.1708 22.3888 16.2415C22.3715 16.3122 22.3347 16.3766 22.2826 16.4275L20.5256 18.1345L20.9396 20.5445C20.9521 20.6163 20.9441 20.6902 20.9166 20.7578C20.8891 20.8254 20.8433 20.8839 20.7842 20.9267C20.7252 20.9695 20.6553 20.9949 20.5825 21C20.5098 21.005 20.4371 20.9896 20.3726 20.9555L18.2006 19.8175Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> <span>Give Feedback</span> </a> </li> </ul> <div id="version"></div> </footer> </section> <section class="nav-cmp-list"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div class="search-container"> <div class="search-input-wrapper"> <svg class="search-icon" viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M15.5 15.5L20 20M10 17C6.13401 17 3 13.866 3 10C3 6.13401 6.13401 3 10 3C13.866 3 17 6.13401 17 10C17 13.866 13.866 17 10 17Z" /> </svg> <input type="text" id="component-search" class="component-search-input" placeholder="Search components..." autocomplete="off" spellcheck="false" /> <button id="clear-search" class="clear-search-button" type="button" aria-label="Clear search" > <svg viewBox="0 0 24 24" width="16" height="16"> <path fill="none" stroke="currentColor" stroke-width="2" d="M6 6l12 12M6 18L18 6" /> </svg> </button> </div> </div> <div> <h2>Custom Components</h2> <p> <button id="open-builder-registry"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-list" class="cmp-list nav-list"></div> </div> <div class="nav-loading-icon spinner"></div> <footer> <p class="info"> Expand on Builder's selection of built-in blocks by <a target="_blank" href="https://www.builder.io/c/docs/custom-components-intro" >registering components</a > from your codebase. This way, teammates can drag and drop your components within Builder's Visual Editor just like any other block. </p> </footer> </section> <section class="nav-cmp-detail"> <header> <button class="back-button" data-back="nav-cmp-list"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-detail-title"></h2> <p> <button id="cmp-open-source"></button> </p> </div> </header> <div class="section-content"> <div id="cmp-error"></div> <label class="ui-switch"> <div> <h3>Register Component</h3> <p> Registers this component so it can be used within Builder Visual CMS </p> </div> <input type="checkbox" role="switch" id="cmp-register" /> <span class="switcher"></span> </label> <div id="cmp-detail"> <label class="ui-text-input"> <h3>Component Name</h3> <div class="input"> <input type="text" id="cmp-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="2" maxlength="30" required placeholder="e.g. My Counter" /> </div> <p> Unique name to identify this custom component within Builder. Press ESC to cancel </p> </label> <div class="cmp-detail-inputs-container"> <h3> <span>Builder Inputs (Props)</span> <button class="cmp-detail-inputs-reload" id="btn-inputs-reload"> Reload </button> </h3> <div id="cmp-detail-inputs"></div> </div> </div> </div> <div class="cmp-cover"></div> <div class="cmp-loading-icon spinner"></div> </section> <section class="nav-cmp-input"> <header> <button class="back-button" data-back="nav-cmp-detail"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2 id="cmp-input-title"></h2> <p> <button id="input-open-source"></button> </p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable Input</h3> <p>Add this component prop as a Builder input</p> </div> <input type="checkbox" role="switch" id="input-register" /> <span class="switcher"></span> </label> <div class="cmp-prop-info"> <div class="cmp-input-readonly"> <h3>Prop Name</h3> <span id="cmp-prop-name"></span> </div> <div class="cmp-input-readonly"> <h3>Prop Type</h3> <span id="cmp-prop-type"></span> </div> </div> <div class="cmp-input-detail"> <label class="ui-text-input"> <h3>Builder Input Name</h3> <div class="input"> <input type="text" id="input-name" autocapitalize="off" autocorrect="off" spellcheck="false" autocomplete="off" minlength="1" maxlength="30" required placeholder="e.g. Text" /> </div> <p> Friendly name to identify this component prop as a Builder input. Press ESC to cancel </p> </label> <label class="ui-select"> <h3>Builder Input Type</h3> <div class="select"> <select id="input-type"></select> </div> <p> Correlate to what editing UI is appropriate for this Builder input. <a href="https://www.builder.io/c/docs/custom-components-input-types" target="_blank" >Read more about input types.</a > </p> </label> </div> <div class="input-cover"></div> <div class="input-loading-icon spinner"></div> </div> </section> <section class="nav-settings"> <header> <button class="back-button"> <svg viewBox="0 0 24 24"> <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" /> </svg> </button> <div> <h2>Settings</h2> <p>Configure Builder's Devtools</p> </div> </header> <div class="section-content"> <label class="ui-switch"> <div> <h3>Enable edit button in UI</h3> <p>Enables the edit button so you can edit content in Builder</p> </div> <input type="checkbox" role="switch" id="enable-edit" /> <span class="switcher"></span> </label> </div> </section> <div class="ui-toast" id="toast"></div> </aside> <button class="menu-toggle" aria-label="Toggle Builder Devtools"> <div> <div class="highlight-bg"></div> <svg viewBox="0 0 31 36" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M31 9.96854C31.0016 11.4553 30.6701 12.9236 30.03 14.2654C29.3898 15.6072 28.4572 16.7884 27.3007 17.7221L0.702841 2.61812C0.601104 2.56012 0.506714 2.49008 0.421705 2.40951C0.288323 2.27871 0.182333 2.12263 0.109928 1.95039C0.0375215 1.77814 0.000151253 1.59319 0 1.40633C0 1.03335 0.148098 0.675643 0.411715 0.411905C0.675332 0.148167 1.03287 0 1.40568 0L21.036 0C23.6786 0 26.213 1.05025 28.0816 2.91972C29.9502 4.78918 31 7.32472 31 9.96854Z" fill="#18B4F4" /> <path d="M31 25.4757C31.0004 26.7849 30.7429 28.0815 30.2423 29.2912C29.7417 30.5009 29.0078 31.6001 28.0825 32.526C27.1572 33.4519 26.0587 34.1864 24.8497 34.6875C23.6406 35.1886 22.3448 35.4465 21.0361 35.4465H1.40573C1.12766 35.4436 0.856725 35.3581 0.627199 35.201C0.397672 35.044 0.219871 34.8223 0.116289 34.5641C0.0127078 34.3059 -0.011999 34.0228 0.0452946 33.7505C0.102588 33.4783 0.239308 33.2292 0.438156 33.0347C0.517415 32.9551 0.606358 32.8858 0.702893 32.8284L11.1705 26.8843L27.2984 17.7244C28.4548 18.6579 29.3874 19.8387 30.028 21.18C30.6685 22.5213 31.0007 23.9891 31 25.4757Z" fill="#FD6B3C" /> <path d="M27.3011 17.7221L11.1709 26.8843L0.703209 32.8284C0.602697 32.8843 0.509784 32.9528 0.426758 33.0323C4.41799 28.9369 6.6496 23.442 6.64456 17.7221C6.65208 12.0015 4.42111 6.50517 0.429101 2.40948C0.51411 2.49005 0.6085 2.56009 0.710237 2.61809L27.3011 17.7221Z" fill="#A97FF2" /> </svg> </div> </button>\`,ai(e),ui(e),oi(e),ri(e),ti(e),ci(e),this.setAttribute("aria-hidden","true"),e.getElementById("version").textContent="v1.11.50"}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)}
|
|
44
|
+
\`,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.12.0"}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)}
|
|
45
45
|
</style>\`,Dt=class extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.attachShadow({mode:"open"});e.innerHTML=lo+\`<main>
|
|
46
46
|
<aside>
|
|
47
47
|
<div class="logo"></div>
|
|
@@ -80,7 +80,7 @@ Restarting server after Builder Devtools update...
|
|
|
80
80
|
</nav>
|
|
81
81
|
</section>
|
|
82
82
|
</main>
|
|
83
|
-
\`,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.
|
|
83
|
+
\`,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.12.0"),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.12.0"),mo());})();`)}async function Ua(e){return Va(e,`<!doctype html>
|
|
84
84
|
<html lang="en" dir="ltr">
|
|
85
85
|
<head>
|
|
86
86
|
<meta charset="utf-8" />
|
|
@@ -246,7 +246,7 @@ Restarting server after Builder Devtools update...
|
|
|
246
246
|
</script>
|
|
247
247
|
</body>
|
|
248
248
|
</html>
|
|
249
|
-
`)}async function Va(e,t){let r=await Ca(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:"")}var Ha=require("os");async function Ka(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(tr,e.devToolsServerUrl);n.searchParams.set(jn,(0,Ha.platform)()),n.searchParams.set(Un,process.versions.node);let i=e.getFrameworks();return i.length>0&&(r.searchParams.set(wr,i[0].name),n.searchParams.set(wr,i[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",t),r.href}var Jd=require("http");var Yd=require("os"),Xe=require("path"),ke=require("fs");var et=M(Wn(),1),Xn=require("process");var oi=M(require("readline"),1),ru=require("stream");function Of({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 Lf=Of();function nu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Lf,"")}function ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iu={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,u=r(n),c=0;c<u.length;c++){var l=u[c],p=t.length(l);if(a>=i-(p==2?1:0))if(a+p<=s)o+=l;else break;a+=p}return o}})(iu);var Mf=iu.exports,jf=ou(Mf),Uf=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},Vf=ou(Uf);function en(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=nu(e),e.length===0))return 0;e=e.replace(Vf()," ");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(jf.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var ri=10,qa=(e=0)=>t=>`\x1B[${t+e}m`,Ja=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ya=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,ae={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(ae.modifier);var Hf=Object.keys(ae.color),Kf=Object.keys(ae.bgColor);[...Hf,...Kf];function Gf(){let e=new Map;for(let[t,r]of Object.entries(ae)){for(let[n,i]of Object.entries(r))ae[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=ae[n],e.set(i[0],i[1]);Object.defineProperty(ae,t,{value:r,enumerable:!1})}return Object.defineProperty(ae,"codes",{value:e,enumerable:!1}),ae.color.close="\x1B[39m",ae.bgColor.close="\x1B[49m",ae.color.ansi=qa(),ae.color.ansi256=Ja(),ae.color.ansi16m=Ya(),ae.bgColor.ansi=qa(ri),ae.bgColor.ansi256=Ja(ri),ae.bgColor.ansi16m=Ya(ri),Object.defineProperties(ae,{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=>ae.rgbToAnsi256(...ae.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)=>ae.ansi256ToAnsi(ae.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>ae.ansi256ToAnsi(ae.hexToAnsi256(t)),enumerable:!1}}),ae}var Wf=Gf(),Zn=new Set(["\x1B","\x9B"]),zf=39,si="\x07",su="[",qf="]",au="m",ai=`${qf}8;;`,Qa=e=>`${Zn.values().next().value}${su}${e}${au}`,Xa=e=>`${Zn.values().next().value}${ai}${e}${si}`,Jf=e=>e.split(" ").map(t=>en(t)),ni=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=en(nu(e[e.length-1]));for(let[a,u]of n.entries()){let c=en(u);if(o+c<=r?e[e.length-1]+=u:(e.push(u),o=0),Zn.has(u)&&(i=!0,s=n.slice(a+1).join("").startsWith(ai)),i){s?u===si&&(i=!1,s=!1):u===au&&(i=!1);continue}o+=c,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())},Yf=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(en(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Qf=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=Jf(e),a=[""];for(let[c,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=en(a[a.length-1]);if(c!==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[c]>t){let d=t-p,D=1+Math.floor((o[c]-d-1)/t);Math.floor((o[c]-1)/t)<D&&a.push(""),ni(a,l,t);continue}if(p+o[c]>t&&p>0&&o[c]>0){if(r.wordWrap===!1&&p<t){ni(a,l,t);continue}a.push("")}if(p+o[c]>t&&r.wordWrap===!1){ni(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>Yf(c)));let u=[...a.join(`
|
|
249
|
+
`)}async function Va(e,t){let r=await Ca(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:"")}var Ha=require("os");async function Ka(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(tr,e.devToolsServerUrl);n.searchParams.set(jn,(0,Ha.platform)()),n.searchParams.set(Un,process.versions.node);let i=e.getFrameworks();return i.length>0&&(r.searchParams.set(wr,i[0].name),n.searchParams.set(wr,i[0].name)),r.searchParams.set("redirect_url",n.href),r.searchParams.set("preview_url",t),r.href}var Jd=require("http");var Yd=require("os"),Xe=require("path"),Be=require("fs");var et=M(Wn(),1),Xn=require("process");var oi=M(require("readline"),1),ru=require("stream");function Of({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 Lf=Of();function nu(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Lf,"")}function ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iu={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,u=r(n),c=0;c<u.length;c++){var l=u[c],p=t.length(l);if(a>=i-(p==2?1:0))if(a+p<=s)o+=l;else break;a+=p}return o}})(iu);var Mf=iu.exports,jf=ou(Mf),Uf=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},Vf=ou(Uf);function en(e,t={}){if(typeof e!="string"||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=nu(e),e.length===0))return 0;e=e.replace(Vf()," ");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(jf.eastAsianWidth(i)){case"F":case"W":n+=2;break;case"A":n+=r;break;default:n+=1}}return n}var ri=10,qa=(e=0)=>t=>`\x1B[${t+e}m`,Ja=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Ya=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,ae={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(ae.modifier);var Hf=Object.keys(ae.color),Kf=Object.keys(ae.bgColor);[...Hf,...Kf];function Gf(){let e=new Map;for(let[t,r]of Object.entries(ae)){for(let[n,i]of Object.entries(r))ae[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=ae[n],e.set(i[0],i[1]);Object.defineProperty(ae,t,{value:r,enumerable:!1})}return Object.defineProperty(ae,"codes",{value:e,enumerable:!1}),ae.color.close="\x1B[39m",ae.bgColor.close="\x1B[49m",ae.color.ansi=qa(),ae.color.ansi256=Ja(),ae.color.ansi16m=Ya(),ae.bgColor.ansi=qa(ri),ae.bgColor.ansi256=Ja(ri),ae.bgColor.ansi16m=Ya(ri),Object.defineProperties(ae,{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=>ae.rgbToAnsi256(...ae.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)=>ae.ansi256ToAnsi(ae.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>ae.ansi256ToAnsi(ae.hexToAnsi256(t)),enumerable:!1}}),ae}var Wf=Gf(),Zn=new Set(["\x1B","\x9B"]),zf=39,si="\x07",su="[",qf="]",au="m",ai=`${qf}8;;`,Qa=e=>`${Zn.values().next().value}${su}${e}${au}`,Xa=e=>`${Zn.values().next().value}${ai}${e}${si}`,Jf=e=>e.split(" ").map(t=>en(t)),ni=(e,t,r)=>{let n=[...t],i=!1,s=!1,o=en(nu(e[e.length-1]));for(let[a,u]of n.entries()){let c=en(u);if(o+c<=r?e[e.length-1]+=u:(e.push(u),o=0),Zn.has(u)&&(i=!0,s=n.slice(a+1).join("").startsWith(ai)),i){s?u===si&&(i=!1,s=!1):u===au&&(i=!1);continue}o+=c,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())},Yf=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(en(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Qf=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,s,o=Jf(e),a=[""];for(let[c,l]of e.split(" ").entries()){r.trim!==!1&&(a[a.length-1]=a[a.length-1].trimStart());let p=en(a[a.length-1]);if(c!==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[c]>t){let d=t-p,D=1+Math.floor((o[c]-d-1)/t);Math.floor((o[c]-1)/t)<D&&a.push(""),ni(a,l,t);continue}if(p+o[c]>t&&p>0&&o[c]>0){if(r.wordWrap===!1&&p<t){ni(a,l,t);continue}a.push("")}if(p+o[c]>t&&r.wordWrap===!1){ni(a,l,t);continue}a[a.length-1]+=l}r.trim!==!1&&(a=a.map(c=>Yf(c)));let u=[...a.join(`
|
|
250
250
|
`)];for(let[c,l]of u.entries()){if(n+=l,Zn.has(l)){let{groups:d}=new RegExp(`(?:\\${su}(?<code>\\d+)m|\\${ai}(?<uri>.*)${si})`).exec(u.slice(c).join(""))||{groups:{}};if(d.code!==void 0){let D=Number.parseFloat(d.code);i=D===zf?void 0:D}else d.uri!==void 0&&(s=d.uri.length===0?void 0:d.uri)}let p=Wf.codes.get(Number(i));u[c+1]===`
|
|
251
251
|
`?(s&&(n+=Xa("")),i&&p&&(n+=Qa(p))):l===`
|
|
252
252
|
`&&(i&&p&&(n+=Qa(i)),s&&(n+=Xa(s)))}return n};function Za(e,t,r){return String(e).normalize().replace(/\r\n/g,`
|
|
@@ -300,7 +300,7 @@ ${r}=${n}
|
|
|
300
300
|
`+i)),e=i+`
|
|
301
301
|
`+e}return e.trim()+`
|
|
302
302
|
`}function mi(e,t){return t.sort((r,n)=>{let i=Tu(e,r),s=Tu(e,n);return i.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())})}function Tu(e,t){let r=t.importClause;if(r){let n=r.namedBindings;if(n&&e.ts.isNamedImports(n)&&n.elements.length>0)return n.elements[0].name.text;if(r.name)return r.name.text}return t.moduleSpecifier&&e.ts.isStringLiteral(t.moduleSpecifier)?t.moduleSpecifier.text:""}function Iu(e){return typeof e=="string"&&!e.includes("'use client'")&&!e.includes(`"use client"'`)&&(e=`"use client"
|
|
303
|
-
${e}`),e}function ku(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function vt(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let i=Ru(e,r),s=Ru(e,n);return i.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Ru(e,t){let r=t.properties.find(n=>Z(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}async function Bu(e){let t=await e.readFile(e.registryPath);return t?lg(e,t):{components:[],sourceFile:W(e,"")}}async function lg(e,t){let r=W(e,t);return e.sdkVersion===N.gen2?dg(e,r):pg(e,r)}async function pg(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isCallExpression(p)){let d=e.ts.isIdentifier(p.expression)&&p.expression.text;if(d==="withChildren"){let m=Di(e,p.arguments[0]);if(e.ts.isCallExpression(m)){let f=await gi(e,n,m,l,!0);f&&r.push(f)}else{let f=m;if(e.ts.isIdentifier(f)){let g=await hi(e,t,n,f,l,!0);g&&r.push(g)}}continue}if(d==="dynamic"){let m=await gi(e,n,p,l,!1);m&&r.push(m);continue}let D=Di(e,p.arguments[0]);if(e.ts.isCallExpression(D)&&e.ts.isIdentifier(D.expression)&&D.expression.text==="dynamic"){let m=await gi(e,n,D,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(D)){let m=await hi(e,t,n,D,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(p)){let d=await hi(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:$e(r)}}function Di(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:Di(e,t.arguments[0]):t}async function gi(e,t,r,n,i){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:i,framework:"react"},o=r.arguments;if(o.length===0)return null;let a=o[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let p=l.text,d=await _r(e,p);s.filePath=d,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(d)?s.importPath=re(e,s.filePath):(s.externalImportPath=p,s.importPath=s.externalImportPath),s.name=Ze(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let p=l.expression;if(!e.ts.isCallExpression(p)||p.expression.kind!==e.ts.SyntaxKind.ImportKeyword||p.arguments.length!==1)return null;let D=p.arguments[0];if(!e.ts.isStringLiteral(D)||!e.ts.isIdentifier(u.name))return null;let m=D.text,f=await _r(e,m);s.filePath=f,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(f)?s.importPath=re(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=te(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=Oe(e,s,n),s.displayFilePath=X(e,s.filePath),s.filePath&&s.exportName&&(s.id=await ee(e,s.filePath,s.exportName,s.externalImportPath)),s}async function hi(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await _r(e,c.text);o.filePath=l,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(l)?o.importPath=re(e,o.filePath):(o.externalImportPath=c.text,o.importPath=o.externalImportPath),o.name=Ze(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(D=>D.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await _r(e,l.text);o.filePath=p,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=re(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=te(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Oe(e,o,i),o.displayFilePath=X(e,o.filePath),o.filePath&&o.exportName&&(o.id=await ee(e,o.filePath,o.exportName,o.externalImportPath)),o}function _r(e,t){return an(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function $u(e,t,r){let n=!1,i=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){i=c;continue}if(!e.ts.isExpressionStatement(l))continue;let p=l.expression;if(!e.ts.isCallExpression(p))continue;let d=p.expression;if(!e.ts.isPropertyAccessExpression(d))continue;let D=d.expression;if(!e.ts.isIdentifier(D)||D.text!=="builder")continue;if(d.name.text=="init"){n=!0;break}else continue}if(n)return t;let o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(wt)),a=r?e.ts.factory.createNonNullExpression(o):o,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(i+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function dg(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await Ci(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:$e(r)}}async function Ci(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Rr(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(Z(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let D=u.arguments;if(D.length===0)return null;let m=D[0];if(!e.ts.isArrowFunction(m))return null;let f=m.body;if(e.ts.isCallExpression(f)){if(f.expression.kind!==e.ts.SyntaxKind.ImportKeyword||f.arguments.length!==1)return null;let h=f.arguments[0];if(!e.ts.isStringLiteral(h))return null;let E=h.text,v=await _r(e,E);n.filePath=v,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(v)?n.importPath=re(e,n.filePath):(n.externalImportPath=E,n.importPath=n.externalImportPath),n.name=Ze(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(f)){let g=f.expression;if(!e.ts.isParenthesizedExpression(g))return null;let h=g.expression;if(!e.ts.isAwaitExpression(h))return null;let E=h.expression;if(!e.ts.isCallExpression(E)||E.expression.kind!==e.ts.SyntaxKind.ImportKeyword||E.arguments.length!==1)return null;let P=E.arguments[0];if(!e.ts.isStringLiteral(P)||!e.ts.isIdentifier(f.name))return null;let A=P.text,F=await _r(e,A);n.filePath=F,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(F)?n.importPath=re(e,n.filePath):(n.externalImportPath=A,n.importPath=n.externalImportPath),n.name=te(f.name.text),n.importName=f.name.text,n.exportName=f.name.text,n.exportType="named"}else return null;return n=Oe(e,n,r),n.displayFilePath=X(e,n.filePath),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=te(a)),n.importName=a;let c=await bt(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=re(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=re(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let D=d.moduleSpecifier;if(!e.ts.isStringLiteral(D))return null;n.exportName=a}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}function St(e,t){let r=[...t.statements],n=!1;for(let i=t.statements.length-1;i>=0;i--){let s=t.statements[i];if(e.ts.isImportDeclaration(s)&&s.importClause){let o=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let p=l.name;if(p&&e.ts.isIdentifier(p)){let d=p.text;_u(e,t,d)||u.splice(c,1)}}}if(u.length===0)o=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[i]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;_u(e,t,u)||(o=!0)}o&&(r.splice(i,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function _u(e,t,r){let n=!1;function i(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,i)}}return e.ts.forEachChild(t,i),n}function Ft(e,t,r,n,i,s,o){let a=null,u=null,c=null,l=-1;t=Ke(t),r=Ke(r);let p=t.find(D=>D.id===e),d=r.find(D=>D.id===e);if(n)d||(a={...Ke(p),inputs:Ke(p.inputs).map(D=>(D.isRegistered=!0,D))},l=r.length,r.push(a));else if(typeof d?.nodeIndex=="number"&&d.nodeIndex>-1){if(i)l=d.nodeIndex,u=Ke(d),r=r.filter(D=>D.id!==e);else if(s!=null)fg(d,s),l=d.nodeIndex,c=d;else if(o!=null){let D=d.inputs.find(m=>m.name===o.name);D&&(o.registerInput===!1?D.isRegistered=!1:(mg(D,o),D.isRegistered=!0),c=d,l=d.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:mt(t,r)}}function mt(e,t){let r=$e([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(i=>i.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(pi),n.inputs.sort((o,a)=>o.name.toLowerCase().localeCompare(a.name.toLowerCase()));let i=t.find(o=>o.id===n.id);i&&(i.acceptsChildren=li(n));let s=e.find(o=>o.id===n.id&&o.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function fg(e,t){Pe(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),Pe(t.description)?e.description=t.description:t.description===null&&delete e.description,Pe(t.image)?e.image=t.image:t.image===null&&delete e.image}function mg(e,t){Pe(t.type)&&(e.type=t.type),Pe(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,Pe(t.defaultValue)||Yr(t.defaultValue)||br(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,Pe(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}async function qt(e){let t=new Set,r=async i=>{let s=await e.readdir(i);await Promise.all(s.map(async o=>{if(o.startsWith(".")||o==="node_modules")return;let a=e.join(i,o),u=e.extname(o).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await ge(e,[...t])}function At(e,t,r){return Ir(e,t,r.variableName)?t:gg(e,t,r)}function gg(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,i=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,i),o=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],o),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}async function Pt(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p,d]=await Promise.all([Pu(e,u),Bu(e),Te(e),nn(e)]),D=c.map(v=>v.cmpInfo),m=l.components,f={components:mt(D,m),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(D),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Br(e,f.components),f;let g=!1,h=l.sourceFile,E=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(E.length>0){let v=E.map(F=>{let T=c.find(k=>k.cmpInfo.id===F);if(!T)throw new Error(`Component ${F} not found`);return T}),P=Array.from(new Set(v.map(F=>F.cmpInfo.filePath))),A=await ge(e,P);for(let F of v){let T=f.components.find(C=>C.id===F.cmpInfo.id),k=await $r(e,F,A,e.registryPath===F.cmpInfo.filePath||He(F.cmpInfo.filePath));We(T,k);let I=D.findIndex(C=>C.id===F.cmpInfo.id);D[I].inputs=k;let S=Ft(F.cmpInfo.id,D,m,r,n,i,s);if(e.sdkVersion===N.gen2){let{elements:C,elmIndex:$,statementIndex:O,statement:L,variableDeclaration:y}=await Cg(e,h,F);if(S.addCmpToRegistry)C.push(Dg(e,S.addCmpToRegistry)),g=!0;else if(S.removeCmpFromRegistry)C.splice($,1),g=!0;else if(S.updateRegisteredCmp){let x=he(e,C[$],S.updateRegisteredCmp);C[$]=e.ts.factory.updateObjectLiteralExpression(x,[Ou(e,S.updateRegisteredCmp),...x.properties.slice(1)]),g=!0}if(g&&o){let x=[...h.statements];x[O]=e.ts.factory.updateVariableStatement(L,L.modifiers,e.ts.factory.updateVariableDeclarationList(L.declarationList,[e.ts.factory.updateVariableDeclaration(y,y.name,y.exclamationToken,y.type,e.ts.factory.createArrayLiteralExpression(vt(e,C)))])),h=e.ts.factory.updateSourceFile(h,x),h=Nu(e,S,h),h=q(e,h,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),h=At(e,h,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=S.components,m=S.components.filter(ue=>ue.isRegistered)}}else{let C=[...h.statements];S.addCmpToRegistry?(C.push(xu(e,S.addCmpToRegistry)),g=!0):S.removeCmpFromRegistry?(C.splice(S.nodeIndex,1),g=!0):S.updateRegisteredCmp&&(C[S.nodeIndex]=di(e,C[S.nodeIndex],S.updateRegisteredCmp),g=!0),g&&o&&(h=e.ts.factory.updateSourceFile(h,C),h=q(e,h,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),h=$u(e,h,p),h=Nu(e,S,h),T?.acceptsChildren&&(h=q(e,h,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=S.components,m=S.components.filter($=>$.isRegistered))}}}if(g&&o){h=St(e,h),h=Et(e,h),e.appDir&&(h=ku(e,h));let v=De(e,h);v=ft(v),e.appDir&&(v=Iu(v)),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}return f}function Ou(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",yg(e,t))}function hg(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function Dg(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([Ou(e,t),...t.acceptsChildren?[hg(e)]:[]],!0),t)}async function Cg(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await Ci(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}function Nu(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let i=n.externalImportPath?n.externalImportPath:z(e,e.registryPath,n.filePath);n.exportType==="default"?r=q(e,r,{defaultImport:n.importName,importPath:i}):n.exportType==="named"&&(r=q(e,r,{namedImports:[n.importName],importPath:i}))}}else r=q(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function yg(e,t){let r=t.externalImportPath?t.externalImportPath:z(e,e.registryPath,t.filePath),n=t.exportName!=="default",i;n?i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):i=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),i);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}async function Mu(e){let t=[],r=await vg(e,t);return await Ku(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await wg(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await bg(e,e.pagesDir,t)),t}async function ju(e){let t=[];return await Ku(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await xg(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await Eg(e,e.pagesDir,t)),t}async function xg(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"figma-imports",n);if(!await e.exists(i)){let s=await e.formatCode(i,Vu({sys:e,routePath:i,modelName:"figma-imports"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Uu(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function wg(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"[...page]",n);if(!await e.exists(i)){let s=await e.formatCode(i,Vu({sys:e,routePath:i,modelName:"page"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Uu(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function Uu(e){let t=e.typescriptEnabled;return e.sdkVersion===N.gen2?`
|
|
303
|
+
${e}`),e}function ku(e,t){let r=t.statements.filter(n=>!(e.ts.isExpressionStatement(n)&&e.ts.isStringLiteral(n.expression)&&e.ts.isStringLiteral(n.expression)&&n.expression.text==="use client"));return e.ts.factory.updateSourceFile(t,r)}function vt(e,t){return t.sort((r,n)=>{if(e.ts.isObjectLiteralExpression(r)&&e.ts.isObjectLiteralExpression(n)){let i=Ru(e,r),s=Ru(e,n);return i.toLocaleLowerCase().localeCompare(s.toLocaleLowerCase())}return 1})}function Ru(e,t){let r=t.properties.find(n=>Z(e,n)==="name");return r&&e.ts.isPropertyAssignment(r)&&e.ts.isStringLiteral(r.initializer)?r.initializer.text:"zzzz"}async function Bu(e){let t=await e.readFile(e.registryPath);return t?lg(e,t):{components:[],sourceFile:W(e,"")}}async function lg(e,t){let r=W(e,t);return e.sdkVersion===N.gen2?dg(e,r):pg(e,r)}async function pg(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isCallExpression(p)){let d=e.ts.isIdentifier(p.expression)&&p.expression.text;if(d==="withChildren"){let m=Di(e,p.arguments[0]);if(e.ts.isCallExpression(m)){let f=await gi(e,n,m,l,!0);f&&r.push(f)}else{let f=m;if(e.ts.isIdentifier(f)){let g=await hi(e,t,n,f,l,!0);g&&r.push(g)}}continue}if(d==="dynamic"){let m=await gi(e,n,p,l,!1);m&&r.push(m);continue}let D=Di(e,p.arguments[0]);if(e.ts.isCallExpression(D)&&e.ts.isIdentifier(D.expression)&&D.expression.text==="dynamic"){let m=await gi(e,n,D,l,!1);m&&r.push(m);continue}if(e.ts.isIdentifier(D)){let m=await hi(e,t,n,D,l,!1);m&&r.push(m);continue}continue}if(e.ts.isIdentifier(p)){let d=await hi(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:_e(r)}}function Di(e,t){return e.ts.isCallExpression(t)?(e.ts.isIdentifier(t.expression)&&t.expression.text)==="dynamic"?t:Di(e,t.arguments[0]):t}async function gi(e,t,r,n,i){let s={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:t,acceptsChildren:i,framework:"react"},o=r.arguments;if(o.length===0)return null;let a=o[0];if(!e.ts.isArrowFunction(a))return null;let u=a.body;if(e.ts.isCallExpression(u)){if(u.expression.kind!==e.ts.SyntaxKind.ImportKeyword||u.arguments.length!==1)return null;let l=u.arguments[0];if(!e.ts.isStringLiteral(l))return null;let p=l.text,d=await _r(e,p);s.filePath=d,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(d)?s.importPath=re(e,s.filePath):(s.externalImportPath=p,s.importPath=s.externalImportPath),s.name=Ze(e,s.filePath),s.importName="default",s.exportName="default",s.exportType="default"}else if(e.ts.isPropertyAccessExpression(u)){let c=u.expression;if(!e.ts.isParenthesizedExpression(c))return null;let l=c.expression;if(!e.ts.isAwaitExpression(l))return null;let p=l.expression;if(!e.ts.isCallExpression(p)||p.expression.kind!==e.ts.SyntaxKind.ImportKeyword||p.arguments.length!==1)return null;let D=p.arguments[0];if(!e.ts.isStringLiteral(D)||!e.ts.isIdentifier(u.name))return null;let m=D.text,f=await _r(e,m);s.filePath=f,s.relFilePath=e.relative(e.getAppRootDir(),s.filePath),await e.exists(f)?s.importPath=re(e,s.filePath):(s.externalImportPath=m,s.importPath=s.externalImportPath),s.name=te(u.name.text),s.importName=u.name.text,s.exportName=u.name.text,s.exportType="named"}else return null;return s=Oe(e,s,n),s.displayFilePath=X(e,s.filePath),s.filePath&&s.exportName&&(s.id=await ee(e,s.filePath,s.exportName,s.externalImportPath)),s}async function hi(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;let l=await _r(e,c.text);o.filePath=l,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(l)?o.importPath=re(e,o.filePath):(o.externalImportPath=c.text,o.importPath=o.externalImportPath),o.name=Ze(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(D=>D.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await _r(e,l.text);o.filePath=p,o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=re(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=te(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Oe(e,o,i),o.displayFilePath=X(e,o.filePath),o.filePath&&o.exportName&&(o.id=await ee(e,o.filePath,o.exportName,o.externalImportPath)),o}function _r(e,t){return an(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}function $u(e,t,r){let n=!1,i=0,s=[...t.statements];for(let c=0;c<s.length;c++){let l=s[c];if(e.ts.isImportDeclaration(l)){i=c;continue}if(!e.ts.isExpressionStatement(l))continue;let p=l.expression;if(!e.ts.isCallExpression(p))continue;let d=p.expression;if(!e.ts.isPropertyAccessExpression(d))continue;let D=d.expression;if(!e.ts.isIdentifier(D)||D.text!=="builder")continue;if(d.name.text=="init"){n=!0;break}else continue}if(n)return t;let o=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("process"),e.ts.factory.createIdentifier("env")),e.ts.factory.createIdentifier(wt)),a=r?e.ts.factory.createNonNullExpression(o):o,u=e.ts.factory.createExpressionStatement(e.ts.factory.createCallExpression(e.ts.factory.createPropertyAccessExpression(e.ts.factory.createIdentifier("builder"),e.ts.factory.createIdentifier("init")),void 0,[a]));return s.splice(i+1,0,u),e.ts.factory.updateSourceFile(t,s)}async function dg(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await Ci(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:_e(r)}}async function Ci(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Rr(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(Z(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isCallExpression(u)&&(e.ts.isIdentifier(u.expression)&&u.expression.text)==="dynamic"){let D=u.arguments;if(D.length===0)return null;let m=D[0];if(!e.ts.isArrowFunction(m))return null;let f=m.body;if(e.ts.isCallExpression(f)){if(f.expression.kind!==e.ts.SyntaxKind.ImportKeyword||f.arguments.length!==1)return null;let h=f.arguments[0];if(!e.ts.isStringLiteral(h))return null;let E=h.text,v=await _r(e,E);n.filePath=v,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(v)?n.importPath=re(e,n.filePath):(n.externalImportPath=E,n.importPath=n.externalImportPath),n.name=Ze(e,n.filePath),n.importName="default",n.exportName="default",n.exportType="default"}else if(e.ts.isPropertyAccessExpression(f)){let g=f.expression;if(!e.ts.isParenthesizedExpression(g))return null;let h=g.expression;if(!e.ts.isAwaitExpression(h))return null;let E=h.expression;if(!e.ts.isCallExpression(E)||E.expression.kind!==e.ts.SyntaxKind.ImportKeyword||E.arguments.length!==1)return null;let P=E.arguments[0];if(!e.ts.isStringLiteral(P)||!e.ts.isIdentifier(f.name))return null;let A=P.text,F=await _r(e,A);n.filePath=F,n.relFilePath=e.relative(e.getAppRootDir(),n.filePath),await e.exists(F)?n.importPath=re(e,n.filePath):(n.externalImportPath=A,n.importPath=n.externalImportPath),n.name=te(f.name.text),n.importName=f.name.text,n.exportName=f.name.text,n.exportType="named"}else return null;return n=Oe(e,n,r),n.displayFilePath=X(e,n.filePath),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=te(a)),n.importName=a;let c=await bt(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=re(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.importPath=re(e,c.filePath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let D=d.moduleSpecifier;if(!e.ts.isStringLiteral(D))return null;n.exportName=a}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}function St(e,t){let r=[...t.statements],n=!1;for(let i=t.statements.length-1;i>=0;i--){let s=t.statements[i];if(e.ts.isImportDeclaration(s)&&s.importClause){let o=!1,a=s.importClause.namedBindings;if(a&&e.ts.isNamedImports(a)&&a.elements){let u=[...a.elements];for(let c=u.length-1;c>=0;c--){let l=u[c];if(e.ts.isImportSpecifier(l)){let p=l.name;if(p&&e.ts.isIdentifier(p)){let d=p.text;_u(e,t,d)||u.splice(c,1)}}}if(u.length===0)o=!0;else if(a.elements.length!==u.length){let c=e.ts.factory.updateImportClause(s.importClause,!1,s.importClause.name,e.ts.factory.createNamedImports(u)),l=e.ts.factory.updateImportDeclaration(s,void 0,c,s.moduleSpecifier,void 0);r[i]=l,n=!0}}else if(s.importClause.name&&e.ts.isIdentifier(s.importClause.name)){let u=s.importClause.name.text;_u(e,t,u)||(o=!0)}o&&(r.splice(i,1),n=!0)}}return n?e.ts.factory.updateSourceFile(t,r):t}function _u(e,t,r){let n=!1;function i(s){if(!e.ts.isImportDeclaration(s)){if(e.ts.isIdentifier(s)&&s.text===r){n=!0;return}e.ts.forEachChild(s,i)}}return e.ts.forEachChild(t,i),n}function Ft(e,t,r,n,i,s,o){let a=null,u=null,c=null,l=-1;t=Ke(t),r=Ke(r);let p=t.find(D=>D.id===e),d=r.find(D=>D.id===e);if(n)d||(a={...Ke(p),inputs:Ke(p.inputs).map(D=>(D.isRegistered=!0,D))},l=r.length,r.push(a));else if(typeof d?.nodeIndex=="number"&&d.nodeIndex>-1){if(i)l=d.nodeIndex,u=Ke(d),r=r.filter(D=>D.id!==e);else if(s!=null)fg(d,s),l=d.nodeIndex,c=d;else if(o!=null){let D=d.inputs.find(m=>m.name===o.name);D&&(o.registerInput===!1?D.isRegistered=!1:(mg(D,o),D.isRegistered=!0),c=d,l=d.nodeIndex)}}return{addCmpToRegistry:a,removeCmpFromRegistry:u,updateRegisteredCmp:c,nodeIndex:l,components:mt(t,r)}}function mt(e,t){let r=_e([...t.map(n=>(n.isRegistered=!0,n)),...e.filter(n=>!t.some(i=>i.id===n.id)).map(n=>(n.isRegistered=!1,n))]);return r.forEach(n=>{n.inputs=n.inputs.map(pi),n.inputs.sort((o,a)=>o.name.toLowerCase().localeCompare(a.name.toLowerCase()));let i=t.find(o=>o.id===n.id);i&&(i.acceptsChildren=li(n));let s=e.find(o=>o.id===n.id&&o.externalImportPath);s&&(n.filePath=s.filePath,n.relFilePath=s.relFilePath)}),r}function fg(e,t){Pe(t.name)?e.name=t.name:t.name===null&&(e.name=e.importName),Pe(t.description)?e.description=t.description:t.description===null&&delete e.description,Pe(t.image)?e.image=t.image:t.image===null&&delete e.image}function mg(e,t){Pe(t.type)&&(e.type=t.type),Pe(t.friendlyName)?e.friendlyName=t.friendlyName:t.friendlyName===null&&delete e.friendlyName,Pe(t.defaultValue)||Yr(t.defaultValue)||br(t.defaultValue)?e.defaultValue=t.defaultValue:t.defaultValue===null&&delete e.defaultValue,Pe(t.helperText)?e.helperText=t.helperText:t.helperText===null&&delete e.helperText,t.required===!0?e.required=t.required:(t.required===null||t.required===!1)&&delete e.required}async function qt(e){let t=new Set,r=async i=>{let s=await e.readdir(i);await Promise.all(s.map(async o=>{if(o.startsWith(".")||o==="node_modules")return;let a=e.join(i,o),u=e.extname(o).toLowerCase();if(u===".tsx"||u===".jsx"||u===".ts"||u===".js"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await ge(e,[...t])}function At(e,t,r){return Ir(e,t,r.variableName)?t:gg(e,t,r)}function gg(e,t,r){let n=typeof r.arrayType=="string"?e.ts.factory.createArrayTypeNode(e.ts.factory.createTypeReferenceNode(r.arrayType,void 0)):void 0,i=e.ts.factory.createArrayLiteralExpression([]),s=e.ts.factory.createVariableDeclaration(r.variableName,void 0,n,i),o=e.ts.factory.createVariableDeclarationList([s],e.ts.NodeFlags.Const),a=e.ts.factory.createModifier(e.ts.SyntaxKind.ExportKeyword),u=e.ts.factory.createVariableStatement([a],o),c=[...t.statements,u];return e.ts.factory.updateSourceFile(t,c)}async function Pt(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p,d]=await Promise.all([Pu(e,u),Bu(e),Re(e),nn(e)]),D=c.map(v=>v.cmpInfo),m=l.components,f={components:mt(D,m),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(D),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Br(e,f.components),f;let g=!1,h=l.sourceFile,E=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(E.length>0){let v=E.map(F=>{let T=c.find(k=>k.cmpInfo.id===F);if(!T)throw new Error(`Component ${F} not found`);return T}),P=Array.from(new Set(v.map(F=>F.cmpInfo.filePath))),A=await ge(e,P);for(let F of v){let T=f.components.find(C=>C.id===F.cmpInfo.id),k=await $r(e,F,A,e.registryPath===F.cmpInfo.filePath||He(F.cmpInfo.filePath));We(T,k);let I=D.findIndex(C=>C.id===F.cmpInfo.id);D[I].inputs=k;let S=Ft(F.cmpInfo.id,D,m,r,n,i,s);if(e.sdkVersion===N.gen2){let{elements:C,elmIndex:$,statementIndex:O,statement:L,variableDeclaration:y}=await Cg(e,h,F);if(S.addCmpToRegistry)C.push(Dg(e,S.addCmpToRegistry)),g=!0;else if(S.removeCmpFromRegistry)C.splice($,1),g=!0;else if(S.updateRegisteredCmp){let x=he(e,C[$],S.updateRegisteredCmp);C[$]=e.ts.factory.updateObjectLiteralExpression(x,[Ou(e,S.updateRegisteredCmp),...x.properties.slice(1)]),g=!0}if(g&&o){let x=[...h.statements];x[O]=e.ts.factory.updateVariableStatement(L,L.modifiers,e.ts.factory.updateVariableDeclarationList(L.declarationList,[e.ts.factory.updateVariableDeclaration(y,y.name,y.exclamationToken,y.type,e.ts.factory.createArrayLiteralExpression(vt(e,C)))])),h=e.ts.factory.updateSourceFile(h,x),h=Nu(e,S,h),h=q(e,h,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),h=At(e,h,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=S.components,m=S.components.filter(ue=>ue.isRegistered)}}else{let C=[...h.statements];S.addCmpToRegistry?(C.push(xu(e,S.addCmpToRegistry)),g=!0):S.removeCmpFromRegistry?(C.splice(S.nodeIndex,1),g=!0):S.updateRegisteredCmp&&(C[S.nodeIndex]=di(e,C[S.nodeIndex],S.updateRegisteredCmp),g=!0),g&&o&&(h=e.ts.factory.updateSourceFile(h,C),h=q(e,h,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),h=$u(e,h,p),h=Nu(e,S,h),T?.acceptsChildren&&(h=q(e,h,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=S.components,m=S.components.filter($=>$.isRegistered))}}}if(g&&o){h=St(e,h),h=Et(e,h),e.appDir&&(h=ku(e,h));let v=De(e,h);v=ft(v),e.appDir&&(v=Iu(v)),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}return f}function Ou(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.appDir?e.ts.factory.createPropertyAssignment("component",r):e.ts.factory.createPropertyAssignment("component",yg(e,t))}function hg(e){return e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())}function Dg(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([Ou(e,t),...t.acceptsChildren?[hg(e)]:[]],!0),t)}async function Cg(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await Ci(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}function Nu(e,t,r){if(e.appDir){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let i=n.externalImportPath?n.externalImportPath:z(e,e.registryPath,n.filePath);n.exportType==="default"?r=q(e,r,{defaultImport:n.importName,importPath:i}):n.exportType==="named"&&(r=q(e,r,{namedImports:[n.importName],importPath:i}))}}else r=q(e,r,{defaultImport:"dynamic",importPath:"next/dynamic"});return r}function yg(e,t){let r=t.externalImportPath?t.externalImportPath:z(e,e.registryPath,t.filePath),n=t.exportName!=="default",i;n?i=e.ts.factory.createPropertyAccessExpression(e.ts.factory.createAwaitExpression(e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)])),e.ts.factory.createIdentifier(t.exportName)):i=e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("import"),void 0,[e.ts.factory.createStringLiteral(r)]);let s=e.ts.factory.createArrowFunction(n?[e.ts.factory.createModifier(e.ts.SyntaxKind.AsyncKeyword)]:void 0,void 0,[],void 0,e.ts.factory.createToken(e.ts.SyntaxKind.EqualsGreaterThanToken),i);return e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("dynamic"),void 0,[s])}async function Mu(e){let t=[],r=await vg(e,t);return await Ku(e,t,r),e.appDir?(e.debug(`ensure builder setup for next.js app ${e.appDir}`),await wg(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure builder setup for next.js pages ${e.pagesDir}`),await bg(e,e.pagesDir,t)),t}async function ju(e){let t=[];return await Ku(e,t),e.appDir?(e.debug(`ensure figma-imports setup for next.js app ${e.appDir}`),await xg(e,e.appDir,t)):e.pagesDir&&(e.debug(`ensure figma-imports setup for next.js pages ${e.pagesDir}`),await Eg(e,e.pagesDir,t)),t}async function xg(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"figma-imports",n);if(!await e.exists(i)){let s=await e.formatCode(i,Vu({sys:e,routePath:i,modelName:"figma-imports"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Uu(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}async function wg(e,t,r){let n=`page.${e.typescriptEnabled?"tsx":"jsx"}`,i=e.join(t,"[...page]",n);if(!await e.exists(i)){let s=await e.formatCode(i,Vu({sys:e,routePath:i,modelName:"page"}));await e.writeFile(i,s),r.push({filePath:i,modifiedType:"create"})}if(!await e.exists(e.builderComponentPath)){let s=await e.formatCode(e.builderComponentPath,Uu(e));await e.writeFile(e.builderComponentPath,s),r.push({filePath:e.builderComponentPath,modifiedType:"create"})}}function Uu(e){let t=e.typescriptEnabled;return e.sdkVersion===N.gen2?`
|
|
304
304
|
"use client";
|
|
305
305
|
import { ${t?"BuilderContent, ":""} isPreviewing, Content } from "@builder.io/sdk-react";
|
|
306
306
|
import DefaultErrorPage from "next/error";
|
|
@@ -659,13 +659,13 @@ export default Counter;
|
|
|
659
659
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
660
660
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
661
661
|
];
|
|
662
|
-
`}async function Nr(e){let t=await Wt(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return N.gen2;if(r.has("@builder.io/react"))return N.gen1}return null}async function Gu(e){let t=await Ag(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>Mu(t),ensureFigmaImportPage:()=>ju(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Pt(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Pt(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Pt(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Pt(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Pt(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Pt(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>nn(t),setPublicApiKey:n=>mu(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function Ag(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await Pg(e),i=await
|
|
662
|
+
`}async function Nr(e){let t=await Wt(e,e.getRepoRootDir());if(t&&typeof t=="object"){let r=new Set(Object.keys({...t.dependencies,...t.devDependencies}));if(r.has("@builder.io/sdk-react"))return N.gen2;if(r.has("@builder.io/react"))return N.gen1}return null}async function Gu(e){let t=await Ag(e);return{builderPageOptions:async()=>({templateContentId:"3de2f13211234071a4b19a17b4fbc5a7",pathname:"/builder-demo",title:"Builder + Next.js Demo Page"}),ensureBuilderSetup:()=>Mu(t),ensureFigmaImportPage:()=>ju(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Pt(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Pt(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Pt(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Pt(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Pt(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Pt(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>nn(t),setPublicApiKey:n=>mu(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function Ag(e){let t=e.getAppRootDir(),r=e.join(t,"src"),n=await Pg(e),i=await Re(e),s=e.getFrameworks().find(c=>c.name==="next"),o={asyncParams:s?.version?.major!==void 0&&s.version.major>=15},a={},u={...e,addExternalPackage:c=>{a[e.join(t,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>a[c]??e.readFileSync(c),existsSync:c=>!!a[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===t?[...l,...Object.keys(a).map(p=>p.slice(t.length+1))]:l},appDir:null,pagesDir:null,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",nextConfigPath:n,typescriptEnabled:i,features:o};if(e.sdkVersion?u.sdkVersion=e.sdkVersion:u.sdkVersion=await Nr(u),await e.exists(r)){u.srcDir=r,u.componentsDir=e.join(r,"components");let c=e.join(r,"app");await e.exists(c)&&(u.appDir=c);let l=e.join(r,"pages");await e.exists(l)&&(u.pagesDir=l),u.registryPath=await Ne(e,r)}else u.componentsDir=e.join(t,"components"),u.registryPath=await Ne(e,t);if(u.builderComponentPath=e.join(u.componentsDir,`builder.${i?"tsx":"jsx"}`),!u.appDir){let c=e.join(t,"app");await e.exists(c)&&(u.appDir=c)}if(!u.pagesDir){let c=e.join(t,"pages");await e.exists(c)&&(u.pagesDir=c)}if(!u.appDir&&!u.pagesDir&&!e.ignoreMissingConfig)throw new Error(`Could not find Next.js "app" or "pages" directory. Searched in "${t}".`);return u}async function Pg(e){let t=e.join(e.getAppRootDir(),"next.config.ts");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"next.config.mjs");if(await e.exists(r))return r;let n=e.join(e.getAppRootDir(),"next.config.js");if(await e.exists(n))return n;throw new Error(`Could not find Next.js config file. Searched for "next.config.ts", "next.config.mjs" and "next.config.js" in "${e.getAppRootDir()}".`)}async function un(e){return await yt(e,[".env"],zu)}async function Wu(e,t){Tg(t);let r=await un(e),n=await xt(e,r.file,r.envKey,t);return{...r,modifiedType:n}}function Tg(e){typeof process<"u"&&(process.env[zu]=e)}var zu="PUBLIC_BUILDER_API_KEY";function qu(e,t,r){if(r.length===0)return e;let n=e.split(`
|
|
663
663
|
`),i=n.findIndex(a=>a.includes(r));if(i===-1||n.some(a=>a.includes(t[0])))return e;let o=["/**",...t.map(a=>` * ${a.trim()}`)," */"];return n.splice(i,0,...o),n.join(`
|
|
664
664
|
`)}async function Yu(e,t){let r=[],n=t.getSourceFiles(),i=t.getTypeChecker();return await Promise.all(n.map(async s=>{let o=e.basename(s.fileName);if(o.startsWith(".")||kg.has(o))return;let a=e.normalize(s.fileName);if(a===e.registryPath)return;let u=await to(e,i,a,s);r.push(...u)})),r}async function Qu(e,t){if(e.extname(t).toLowerCase()===".tsx"){let n=await e.readFile(t);if(n)return Rg(e,t,n)}return null}function Rg(e,t,r){let n=W(e,r);return to(e,null,t,n)}async function to(e,t,r,n){r=e.normalize(r);let i=[],s=ar(e,n);return await Promise.all(s.map(async o=>{let a=await Ig(e,t,r,o);a&&i.push(a)})),i}async function Ig(e,t,r,n){let i=e.relative(e.getAppRootDir(),r),s=re(e,r);if(e.ts.isVariableStatement(n.node))for(let o of n.node.declarationList.declarations){let a=Ju(e,o.initializer);if(a&&e.ts.isIdentifier(o.name)){let u=o.name.text;return{cmpInfo:{id:await ee(e,r,u),displayFilePath:X(e,r),name:te(u),inputs:[],exportName:n.isDefaultExport?"default":u,exportType:n.isDefaultExport?"default":"named",importName:u,filePath:r,relFilePath:i,importPath:s,framework:"qwik"},node:a}}}else if(e.ts.isCallExpression(n.node)){let o=Ju(e,n.node);if(o)return{cmpInfo:{id:await ee(e,r,"default"),displayFilePath:X(e,r),name:Ze(e,r),inputs:[],exportName:"default",exportType:"default",importName:nr(e,r),filePath:r,relFilePath:i,importPath:s,framework:"qwik"},node:o}}return null}function Ju(e,t){if(t&&e.ts.isCallExpression(t)&&e.ts.isIdentifier(t.expression)&&t.expression.text==="component$"&&t.arguments.length>0){let r=t.arguments[0];if(e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))return{callExpression:t,fnNode:r}}return null}var kg=new Set(["node_modules","layout.tsx","404.tsx","router-head.tsx"]);async function Xu(e,t){let r=t.node.fnNode;if((e.ts.isArrowFunction(r)||e.ts.isFunctionExpression(r))&&r.parameters.length>0){let{sourceFile:i,typeChecker:s}=await vr(e,t.cmpInfo.filePath,null);if(!(await to(e,s,t.cmpInfo.filePath,i)).find(u=>u.cmpInfo.id===t.cmpInfo.id))throw new Error(`createComponentInputs() Could not find component ${t.cmpInfo.name} in ${t.cmpInfo.filePath}`);return sr(e,s,r)}return[]}async function Zu(e){return yi(e)}async function yi(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,Bg),t.push({filePath:e.registryPath,modifiedType:"create"})),t}var Bg=`import type { RegisteredComponent } from "@builder.io/sdk-qwik";
|
|
665
665
|
|
|
666
666
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
667
667
|
];
|
|
668
|
-
`;async function ec(e){await yi(e);let t=await e.readFile(e.registryPath);return t?$g(e,t):{components:[],sourceFile:W(e,"")}}async function $g(e,t){let r=W(e,t);return _g(e,r)}async function _g(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await xi(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:$e(r)}}async function xi(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(Z(e,i)==="component"&&e.ts.isIdentifier(i.initializer)){let o=i.initializer.text;n.name===""&&(n.name=te(o)),n.importName=o;let a=await bt(e,e.registryPath,t,o);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=re(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await Qu(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===o);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName)),n}async function tc(e){let t=new Set,r=async i=>{let s=await e.readdir(i);await Promise.all(s.map(async o=>{if(o.startsWith(".")||o==="node_modules")return;let a=e.join(i,o),u=e.extname(o).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await ge(e,[...t])}async function ur(e,t,r,n,i,s,o,a){let u=await tc(e),[c,l,p]=await Promise.all([Yu(e,u),ec(e),un(e)]),d=c.map(f=>f.cmpInfo),D=l.components,m={components:mt(d,D),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m;if(t!=null){let f=c.find(S=>S.cmpInfo.id===t);if(!f)throw new Error(`Component ${t} not found`);let g=l.sourceFile,h=m.components.find(S=>S.id===t),E=await Xu(e,f);We(h,E),t=Array.isArray(t)?t[0]:t;let v=Ft(t,d,D,r,n,i,s),{elements:P,elmIndex:A,statementIndex:F,statement:T,variableDeclaration:k}=await Og(e,g,f),I=!1;if(v.addCmpToRegistry?(P.push(Ng(e,v.addCmpToRegistry)),I=!0):v.removeCmpFromRegistry?(P.splice(A,1),I=!0):v.updateRegisteredCmp&&(P[A]=he(e,P[A],v.updateRegisteredCmp),I=!0),I&&o){let S=[...g.statements];S[F]=e.ts.factory.updateVariableStatement(T,T.modifiers,e.ts.factory.updateVariableDeclarationList(T.declarationList,[e.ts.factory.updateVariableDeclaration(k,k.name,k.exclamationToken,k.type,e.ts.factory.createArrayLiteralExpression(vt(e,P)))])),g=e.ts.factory.updateSourceFile(g,S),h.exportType==="named"?g=q(e,g,{namedImports:[h.importName],importPath:z(e,e.registryPath,h.filePath)}):g=q(e,g,{defaultImport:h.importName,importPath:z(e,e.registryPath,h.filePath)}),g=q(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),g=At(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g=St(e,g),g=Et(e,g);let C=De(e,g);C=ft(C),C=qu(C,Lg,"CUSTOM_COMPONENTS"),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}m.components=v.components}return m}function Ng(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function Og(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await xi(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}var Lg=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"];async function rc(e){let t=await Mg(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>Zu(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>ur(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let i=await ur(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>ur(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>ur(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>ur(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>ur(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>un(t),setPublicApiKey:n=>Wu(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function Mg(e){let t=await Qr(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await Ne(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}async function cn(e){return await yt(e,[".env"],ln)}async function nc(e,t){let r=await cn(e),n=await xt(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var ln="PUBLIC_BUILDER_KEY";var jg=new Set(["dist","node_modules"]);async function oc(e,t){let r=[],n=t.getSourceFiles(),i=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async o=>{let a=e.basename(o.fileName);if(a.startsWith(".")||a==="node_modules"||Hn(e,jg,o.fileName)||Ug.has(a)||a.includes("$."))return;let u=e.normalize(o.fileName);if(u===e.remixConfigPath||u===s)return;let c=await zt(e,i,u,o,u===e.registryPath);r.push(...c)})),r}var Ug=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"]);async function ic(e){await ro(e);let t=await e.readFile(e.registryPath);return t?Vg(e,t):{components:[],sourceFile:W(e,"")}}async function Vg(e,t){let r=W(e,t);return Hg(e,r)}async function Hg(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await wi(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:$e(r)}}async function wi(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===N.gen2&&Rr(e,r)&&(n.acceptsChildren=!0);for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(Z(e,i)==="component"){let o,{initializer:a}=i;if(e.ts.isIdentifier(a))o=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(o=l.text)}if(!o)continue;n.name===""&&(n.name=te(o)),n.importName=o;let u=await bt(e,e.registryPath,t,o);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=re(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=o;else{let c=await Su(e,u.filePath,e.registryPath===u.filePath||He(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===o);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Tt(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p]=await Promise.all([oc(e,u),ic(e),cn(e)]),d=c.map(E=>E.cmpInfo),D=l.components,m={components:mt(d,D),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Br(e,m.components),m;let f=!1,g=l.sourceFile,h=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(h.length>0){let E=h.map(A=>{let F=c.find(T=>T.cmpInfo.id===A);if(!F)throw new Error(`Component ${A} not found`);return F}),v=Array.from(new Set(E.map(A=>A.cmpInfo.filePath))),P=await ge(e,v);for(let A of E){let F=m.components.find(y=>y.id===A.cmpInfo.id),T=await $r(e,A,P,e.registryPath===A.cmpInfo.filePath||He(A.cmpInfo.filePath));We(F,T);let k=d.findIndex(y=>y.id===A.cmpInfo.id);d[k].inputs=T;let I=Ft(A.cmpInfo.id,d,D,r,n,i,s),{elements:S,elmIndex:C,statementIndex:$,statement:O,variableDeclaration:L}=await Gg(e,g,A);if(I.addCmpToRegistry)S.push(Kg(e,I.addCmpToRegistry)),f=!0;else if(I.removeCmpFromRegistry)S.splice(C,1),f=!0;else if(I.updateRegisteredCmp){let y=he(e,S[C],I.updateRegisteredCmp);S[C]=e.ts.factory.updateObjectLiteralExpression(y,[sc(e,I.updateRegisteredCmp),...y.properties.slice(1)]),f=!0}if(f&&o){let y=[...g.statements];y[$]=e.ts.factory.updateVariableStatement(O,O.modifiers,e.ts.factory.updateVariableDeclarationList(O.declarationList,[e.ts.factory.updateVariableDeclaration(L,L.name,L.exclamationToken,L.type,e.ts.factory.createArrayLiteralExpression(vt(e,S)))])),g=e.ts.factory.updateSourceFile(g,y),F.exportType==="named"?g=q(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)}):g=q(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)});let x=e.sdkVersion===N.gen2?"@builder.io/sdk-react":"@builder.io/react";g=q(e,g,{namedImports:["RegisteredComponent"],importPath:x,isTypeOnly:!0}),F.acceptsChildren&&e.sdkVersion!==N.gen2&&(g=q(e,g,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g=At(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=I.components,D=I.components.filter(ue=>ue.isRegistered)}}}if(f&&o){g=St(e,g),g=Et(e,g);let E=De(e,g);E=ft(E),E=await e.formatCode(e.registryPath,E),await e.writeFile(e.registryPath,E)}return m}function sc(e,t){if(e.sdkVersion===N.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function Kg(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([sc(e,t),...t.acceptsChildren&&e.sdkVersion===N.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function Gg(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await wi(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}async function ac(e){let t=[],r=await qg(e,t);return t.push(...await ro(e)),await Yg(e,r),await zg(e,t),t}async function uc(e){let t=[];return t.push(...await ro(e)),await Wg(e,t),t}async function Wg(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),i=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${i}`);let s=await e.formatCode(n,cc({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:i?"update":"create"})}async function zg(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===N.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),i=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${i}`);let s=await e.formatCode(n,cc({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:i?"update":"create"})}function cc({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,i=z(e,t,e.registryPath),s="",o="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",o=": LoaderArgs");let a=`process.env.${ln}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${ln}`,u=", context"),n&&(a+="!"),e.sdkVersion===N.gen2?`
|
|
668
|
+
`;async function ec(e){await yi(e);let t=await e.readFile(e.registryPath);return t?$g(e,t):{components:[],sourceFile:W(e,"")}}async function $g(e,t){let r=W(e,t);return _g(e,r)}async function _g(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await xi(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:_e(r)}}async function xi(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"qwik"};for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(Z(e,i)==="component"&&e.ts.isIdentifier(i.initializer)){let o=i.initializer.text;n.name===""&&(n.name=te(o)),n.importName=o;let a=await bt(e,e.registryPath,t,o);if(!a)continue;n.filePath=a.filePath,n.relFilePath=a.relFilePath,n.importPath=re(e,a.filePath),n.displayFilePath=a.displayFilePath,n.exportType=a.exportType;let u=await Qu(e,a.filePath);if(u&&u.length>0)if(u.length===1)n.exportName=u[0].cmpInfo.exportName;else{let c=u.find(l=>l.cmpInfo.exportName===o);c&&(n.exportName=c.cmpInfo.exportName)}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName)),n}async function tc(e){let t=new Set,r=async i=>{let s=await e.readdir(i);await Promise.all(s.map(async o=>{if(o.startsWith(".")||o==="node_modules")return;let a=e.join(i,o),u=e.extname(o).toLowerCase();if(u===".tsx"||u===".ts"){t.add(a);return}(await e.stat(a)).isDirectory()&&await r(a)}))};return await r(e.getAppRootDir()),await ge(e,[...t])}async function ur(e,t,r,n,i,s,o,a){let u=await tc(e),[c,l,p]=await Promise.all([Yu(e,u),ec(e),un(e)]),d=c.map(f=>f.cmpInfo),D=l.components,m={components:mt(d,D),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m;if(t!=null){let f=c.find(S=>S.cmpInfo.id===t);if(!f)throw new Error(`Component ${t} not found`);let g=l.sourceFile,h=m.components.find(S=>S.id===t),E=await Xu(e,f);We(h,E),t=Array.isArray(t)?t[0]:t;let v=Ft(t,d,D,r,n,i,s),{elements:P,elmIndex:A,statementIndex:F,statement:T,variableDeclaration:k}=await Og(e,g,f),I=!1;if(v.addCmpToRegistry?(P.push(Ng(e,v.addCmpToRegistry)),I=!0):v.removeCmpFromRegistry?(P.splice(A,1),I=!0):v.updateRegisteredCmp&&(P[A]=he(e,P[A],v.updateRegisteredCmp),I=!0),I&&o){let S=[...g.statements];S[F]=e.ts.factory.updateVariableStatement(T,T.modifiers,e.ts.factory.updateVariableDeclarationList(T.declarationList,[e.ts.factory.updateVariableDeclaration(k,k.name,k.exclamationToken,k.type,e.ts.factory.createArrayLiteralExpression(vt(e,P)))])),g=e.ts.factory.updateSourceFile(g,S),h.exportType==="named"?g=q(e,g,{namedImports:[h.importName],importPath:z(e,e.registryPath,h.filePath)}):g=q(e,g,{defaultImport:h.importName,importPath:z(e,e.registryPath,h.filePath)}),g=q(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-qwik",isTypeOnly:!0}),g=At(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),g=St(e,g),g=Et(e,g);let C=De(e,g);C=ft(C),C=qu(C,Lg,"CUSTOM_COMPONENTS"),C=await e.formatCode(e.registryPath,C),await e.writeFile(e.registryPath,C)}m.components=v.components}return m}function Ng(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName))],!0),t)}async function Og(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await xi(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}var Lg=["This array is used to integrate custom components within Builder.","https://www.builder.io/c/docs/custom-components-intro","",'These components will be found the "Custom Components"',"section of Builder's visual editor.",'You can also turn on "components only mode" to limit',"editing to only these components.","https://www.builder.io/c/docs/guides/components-only-mode"];async function rc(e){let t=await Mg(e);return{builderPageOptions:async()=>({templateContentId:"dc70f1d979ad416d8fd357137eb9ddfb",pathname:"/",title:"Builder + Qwik Demo Page"}),ensureBuilderSetup:()=>Zu(t),ensureFigmaImportPage:async()=>[],getRegistryPath:()=>t.registryPath,getRegistry:n=>ur(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{},loadComponent:async n=>{let i=await ur(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>ur(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>ur(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>ur(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>ur(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>un(t),setPublicApiKey:n=>Wu(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-qwik"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function Mg(e){let t=await Qr(e,e.getAppRootDir(),"components");if(!t)throw new Error(`Could not find components directory within project: ${e.getAppRootDir()}`);let r=await Ne(e,t),n=e.join(e.getAppRootDir(),".env");return{...e,componentsDir:t,registryPath:r,envPath:n}}async function cn(e){return await yt(e,[".env"],ln)}async function nc(e,t){let r=await cn(e),n=await xt(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var ln="PUBLIC_BUILDER_KEY";var jg=new Set(["dist","node_modules"]);async function oc(e,t){let r=[],n=t.getSourceFiles(),i=t.getTypeChecker(),s=e.join(e.getAppRootDir(),"build");return await Promise.all(n.map(async o=>{let a=e.basename(o.fileName);if(a.startsWith(".")||a==="node_modules"||Hn(e,jg,o.fileName)||Ug.has(a)||a.includes("$."))return;let u=e.normalize(o.fileName);if(u===e.remixConfigPath||u===s)return;let c=await zt(e,i,u,o,u===e.registryPath);r.push(...c)})),r}var Ug=new Set(["root.tsx","root.ts","root.jsx","root.js","_index.tsx","_index.jsx","_index.ts","_index.js"]);async function ic(e){await ro(e);let t=await e.readFile(e.registryPath);return t?Vg(e,t):{components:[],sourceFile:W(e,"")}}async function Vg(e,t){let r=W(e,t);return Hg(e,r)}async function Hg(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await wi(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:_e(r)}}async function wi(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};e.sdkVersion===N.gen2&&Rr(e,r)&&(n.acceptsChildren=!0);for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(Z(e,i)==="component"){let o,{initializer:a}=i;if(e.ts.isIdentifier(a))o=a.text;else if(e.ts.isCallExpression(a)){(e.ts.isIdentifier(a.expression)&&a.expression.text)==="withChildren"&&(n.acceptsChildren=!0);let l=a.arguments[0];e.ts.isIdentifier(l)&&(o=l.text)}if(!o)continue;n.name===""&&(n.name=te(o)),n.importName=o;let u=await bt(e,e.registryPath,t,o);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=re(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=o;else{let c=await Su(e,u.filePath,e.registryPath===u.filePath||He(u.filePath));if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===o);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Tt(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p]=await Promise.all([oc(e,u),ic(e),cn(e)]),d=c.map(E=>E.cmpInfo),D=l.components,m={components:mt(d,D),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await Br(e,m.components),m;let f=!1,g=l.sourceFile,h=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(h.length>0){let E=h.map(A=>{let F=c.find(T=>T.cmpInfo.id===A);if(!F)throw new Error(`Component ${A} not found`);return F}),v=Array.from(new Set(E.map(A=>A.cmpInfo.filePath))),P=await ge(e,v);for(let A of E){let F=m.components.find(y=>y.id===A.cmpInfo.id),T=await $r(e,A,P,e.registryPath===A.cmpInfo.filePath||He(A.cmpInfo.filePath));We(F,T);let k=d.findIndex(y=>y.id===A.cmpInfo.id);d[k].inputs=T;let I=Ft(A.cmpInfo.id,d,D,r,n,i,s),{elements:S,elmIndex:C,statementIndex:$,statement:O,variableDeclaration:L}=await Gg(e,g,A);if(I.addCmpToRegistry)S.push(Kg(e,I.addCmpToRegistry)),f=!0;else if(I.removeCmpFromRegistry)S.splice(C,1),f=!0;else if(I.updateRegisteredCmp){let y=he(e,S[C],I.updateRegisteredCmp);S[C]=e.ts.factory.updateObjectLiteralExpression(y,[sc(e,I.updateRegisteredCmp),...y.properties.slice(1)]),f=!0}if(f&&o){let y=[...g.statements];y[$]=e.ts.factory.updateVariableStatement(O,O.modifiers,e.ts.factory.updateVariableDeclarationList(O.declarationList,[e.ts.factory.updateVariableDeclaration(L,L.name,L.exclamationToken,L.type,e.ts.factory.createArrayLiteralExpression(vt(e,S)))])),g=e.ts.factory.updateSourceFile(g,y),F.exportType==="named"?g=q(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)}):g=q(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)});let x=e.sdkVersion===N.gen2?"@builder.io/sdk-react":"@builder.io/react";g=q(e,g,{namedImports:["RegisteredComponent"],importPath:x,isTypeOnly:!0}),F.acceptsChildren&&e.sdkVersion!==N.gen2&&(g=q(e,g,{namedImports:["withChildren"],importPath:"@builder.io/react"})),g=At(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=I.components,D=I.components.filter(ue=>ue.isRegistered)}}}if(f&&o){g=St(e,g),g=Et(e,g);let E=De(e,g);E=ft(E),E=await e.formatCode(e.registryPath,E),await e.writeFile(e.registryPath,E)}return m}function sc(e,t){if(e.sdkVersion===N.gen2)return e.ts.factory.createPropertyAssignment("component",e.ts.factory.createIdentifier(t.importName));let r=e.ts.factory.createIdentifier(t.importName),n=t.acceptsChildren?e.ts.factory.createCallExpression(e.ts.factory.createIdentifier("withChildren"),void 0,[r]):r;return e.ts.factory.createPropertyAssignment("component",n)}function Kg(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([sc(e,t),...t.acceptsChildren&&e.sdkVersion===N.gen2?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}async function Gg(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await wi(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}async function ac(e){let t=[],r=await qg(e,t);return t.push(...await ro(e)),await Yg(e,r),await zg(e,t),t}async function uc(e){let t=[];return t.push(...await ro(e)),await Wg(e,t),t}async function Wg(e,t){let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureFigmaImportRoute, hasLocaleParam"),r=`($locale).${r}`);let n=e.join(e.routesDir,r),i=await e.exists(n);e.debug(`remixEnsureFigmaImportRoute, hasRoute: ${i}`);let s=await e.formatCode(n,cc({sys:e,routePath:n,modelName:"figma-imports"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:i?"update":"create"})}async function zg(e,t){let r=`$.${e.typescriptEnabled?"tsx":"jsx"}`;e.hasLocaleParam&&(e.debug("remixEnsureAppRoute, hasLocaleParam"),r=`($locale).${r}`),e.sdkVersion===N.gen2&&(r=`($slug)._index.${e.typescriptEnabled?"tsx":"jsx"}`);let n=e.join(e.routesDir,r),i=await e.exists(n);e.debug(`remixEnsureAppRoute, hasRoute: ${i}`);let s=await e.formatCode(n,cc({sys:e,routePath:n,modelName:"page"}));await e.writeFile(n,s),t.push({filePath:n,modifiedType:i?"update":"create"})}function cc({sys:e,routePath:t,modelName:r}){let n=e.typescriptEnabled,i=z(e,t,e.registryPath),s="",o="";n&&(s="import type { LoaderArgs } from '@remix-run/server-runtime';",o=": LoaderArgs");let a=`process.env.${ln}`,u="";return e.getFrameworks().some(c=>c.name==="@shopify/remix-oxygen")&&(a=`context.env.${ln}`,u=", context"),n&&(a+="!"),e.sdkVersion===N.gen2?`
|
|
669
669
|
|
|
670
670
|
import {
|
|
671
671
|
Content,
|
|
@@ -843,12 +843,12 @@ export default Counter;
|
|
|
843
843
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
844
844
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
845
845
|
];
|
|
846
|
-
`}async function lc(e){let t=await Xg(e);return{builderPageOptions:async()=>{let n="/builder-demo",i=t.hasLocaleParam?`/en-us${n}`:void 0;return{templateContentId:"a5c9eef7909d4fc99554264a17de22c9",pathname:n,localePathname:i,title:"Builder + Remix Demo Page"}},ensureBuilderSetup:()=>ac(t),ensureFigmaImportPage:()=>uc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Tt(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Tt(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Tt(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Tt(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Tt(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Tt(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>cn(t),setPublicApiKey:n=>nc(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function Xg(e){let t=await eh(e),r=e.getAppRootDir(),n=await th(e),i=e.dirname(n),s=e.join(i,"components"),o=await
|
|
846
|
+
`}async function lc(e){let t=await Xg(e);return{builderPageOptions:async()=>{let n="/builder-demo",i=t.hasLocaleParam?`/en-us${n}`:void 0;return{templateContentId:"a5c9eef7909d4fc99554264a17de22c9",pathname:n,localePathname:i,title:"Builder + Remix Demo Page"}},ensureBuilderSetup:()=>ac(t),ensureFigmaImportPage:()=>uc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Tt(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Tt(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Tt(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Tt(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Tt(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Tt(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>cn(t),setPublicApiKey:n=>nc(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function Xg(e){let t=await eh(e),r=e.getAppRootDir(),n=await th(e),i=e.dirname(n),s=e.join(i,"components"),o=await Re(e),a=await Ne(e,i),u={},c={...e,registryPath:a,remixConfigPath:t,typescriptEnabled:o,appDir:i,componentsDir:s,routesDir:n,hasLocaleParam:await Zg(e,n),addExternalPackage:l=>{u[e.join(r,l,"index.ts")]=`export * from "${l}";`},readFileSync:l=>u[l]??e.readFileSync(l),existsSync:l=>!!u[l]||e.existsSync(l),readdirSync:l=>{let p=e.readdirSync(l);return l===r?[...p,...Object.keys(u).map(d=>d.slice(r.length+1))]:p},readdir:async l=>{let p=await e.readdir(l);return l===r?[...p,...Object.keys(u).map(d=>d.slice(r.length+1))]:p}};return e.sdkVersion?c.sdkVersion=e.sdkVersion:c.sdkVersion=await Nr(c),c}async function Zg(e,t){return(await e.readdir(t)).some(n=>n.startsWith("($locale)."))}async function eh(e){let t=["remix.config.ts","remix.config.js","vite.config.ts","vite.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Remix config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function th(e){let t=await Qr(e,e.getAppRootDir(),"routes");if(t)return t;throw new Error(`Could not find Remix "routes" directory in "${e.getAppRootDir()}". Please ensure this command is ran from within your Remix project's directory.`)}async function pn(e){let t=[".env"],r=e.configType==="vite"?dn:no;return await yt(e,t,r)}async function pc(e,t){let r=await pn(e),n=await xt(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var dn="VITE_PUBLIC_BUILDER_KEY",no="PUBLIC_BUILDER_KEY";function dc(e,t){let r=`Builder.registerComponent(
|
|
847
847
|
`;r+=` ${t.importName},
|
|
848
848
|
`,r+=` {
|
|
849
849
|
name: "${t.name}",
|
|
850
850
|
}
|
|
851
|
-
`,r+=");";let n=Vn(e,r);return bi(e,n,t)}function bi(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let i=[...n.arguments];if(i.length<2)return t;let s=i[1];return e.ts.isObjectLiteralExpression(s)?(i[1]=he(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,i))):t}async function fc(e){let t=await e.readFile(e.registryPath);return t?rh(e,t):{components:[],sourceFile:W(e,"")}}async function rh(e,t){let r=W(e,t);return e.sdkVersion===N.gen2?ih(e,r):nh(e,r)}async function nh(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isIdentifier(p)){let d=await oh(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components
|
|
851
|
+
`,r+=");";let n=Vn(e,r);return bi(e,n,t)}function bi(e,t,r){if(!e.ts.isExpressionStatement(t))return t;let n=t.expression;if(!e.ts.isCallExpression(n))return t;let i=[...n.arguments];if(i.length<2)return t;let s=i[1];return e.ts.isObjectLiteralExpression(s)?(i[1]=he(e,s,r),e.ts.factory.updateExpressionStatement(t,e.ts.factory.updateCallExpression(n,n.expression,n.typeArguments,i))):t}async function fc(e){let t=await e.readFile(e.registryPath);return t?rh(e,t):{components:[],sourceFile:W(e,"")}}async function rh(e,t){let r=W(e,t);return e.sdkVersion===N.gen2?ih(e,r):nh(e,r)}async function nh(e,t){let r=[];for(let n=0;n<t.statements.length;n++){let i=t.statements[n];if(!e.ts.isExpressionStatement(i))continue;let s=i.expression;if(!e.ts.isCallExpression(s))continue;let o=s.expression;if(!e.ts.isPropertyAccessExpression(o))continue;let a=o.expression;if(!e.ts.isIdentifier(a)||a.text!=="Builder"||o.name.text!=="registerComponent")continue;let c=s.arguments;if(c.length<2)continue;let l=c[1];if(!e.ts.isObjectLiteralExpression(l))continue;let p=c[0];if(e.ts.isIdentifier(p)){let d=await oh(e,t,n,p,l,!1);d&&r.push(d);continue}}return{sourceFile:t,components:_e(r)}}async function oh(e,t,r,n,i,s){let o={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],nodeIndex:r,acceptsChildren:s,framework:"react"},a=t.statements.filter(c=>e.ts.isImportDeclaration(c)),u=a.find(c=>c.importClause&&c.importClause.name?.text===n.text);if(u){let c=u.moduleSpecifier;if(!e.ts.isStringLiteral(c))return null;o.filePath=await Ei(e,c.text),o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),o.importPath=re(e,o.filePath),o.name=Ze(e,o.filePath),o.importName=n.text,o.exportName="default",o.exportType="default"}else{let c=a.find(d=>!d.importClause||!d.importClause.namedBindings||!e.ts.isNamedImports(d.importClause.namedBindings)?!1:d.importClause.namedBindings.elements.some(D=>D.name.text===n.text));if(!c)return null;let l=c.moduleSpecifier;if(!e.ts.isStringLiteral(l))return null;let p=await Ei(e,l.text);o.filePath=await Ei(e,l.text),o.relFilePath=e.relative(e.getAppRootDir(),o.filePath),await e.exists(p)?o.importPath=re(e,o.filePath):(o.externalImportPath=l.text,o.importPath=o.externalImportPath),o.name=te(n.text),o.importName=n.text,o.exportName=n.text,o.exportType="named"}return o=Oe(e,o,i),o.displayFilePath=X(e,o.filePath),o.filePath&&o.exportName&&(o.id=await ee(e,o.filePath,o.exportName,o.externalImportPath)),o}function Ei(e,t){return an(e,e.normalize(e.resolve(e.dirname(e.registryPath),t)))}async function ih(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await vi(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:_e(r)}}async function vi(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],acceptsChildren:!1,framework:"react"};Rr(e,r)&&(n.acceptsChildren=!0);for(let s of r.properties){if(!e.ts.isPropertyAssignment(s)||!e.ts.isIdentifier(s.name))continue;if(Z(e,s)==="component"){let a,{initializer:u}=s;if(e.ts.isIdentifier(u)&&(a=u.text),!a)continue;n.name===""&&(n.name=te(a)),n.importName=a;let c=await bt(e,e.registryPath,t,a);if(!c)continue;n.filePath=c.filePath,n.relFilePath=c.relFilePath,await e.exists(c.filePath)?n.importPath=re(e,c.filePath):(n.externalImportPath=c.importPath,n.importPath=n.externalImportPath),n.displayFilePath=c.displayFilePath,n.exportType=c.exportType;let l=t.statements.filter(d=>e.ts.isImportDeclaration(d)),p=l.find(d=>d.importClause&&d.importClause.name?.text===a);if(p){let d=p.moduleSpecifier;if(!e.ts.isStringLiteral(d))return null;n.exportName="default"}else{let d=l.find(m=>!m.importClause||!m.importClause.namedBindings||!e.ts.isNamedImports(m.importClause.namedBindings)?!1:m.importClause.namedBindings.elements.some(f=>f.name.text===a));if(!d)return null;let D=d.moduleSpecifier;if(!e.ts.isStringLiteral(D))return null;n.exportName=a}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}async function Rt(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p,d]=await Promise.all([Fu(e,u),fc(e),Re(e),pn(e)]),D=c.map(v=>v.cmpInfo),m=l.components,f={components:mt(D,m),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(D),publicApiKey:d.envValue??void 0,devToolsVersion:e.version};if(a)return f.components=await Br(e,f.components),f;let g=!1,h=l.sourceFile,E=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(E.length>0){let v=E.map(F=>{let T=c.find(k=>k.cmpInfo.id===F);if(!T)throw new Error(`Component ${F} not found`);return T}),P=Array.from(new Set(v.map(F=>F.cmpInfo.filePath))),A=await ge(e,P);for(let F of v){let T=f.components.find(C=>C.id===F.cmpInfo.id),k=await $r(e,F,A,e.registryPath===F.cmpInfo.filePath||He(F.cmpInfo.filePath));We(T,k);let I=D.findIndex(C=>C.id===F.cmpInfo.id);D[I].inputs=k;let S=Ft(F.cmpInfo.id,D,m,r,n,i,s);if(e.sdkVersion===N.gen2){let{elements:C,elmIndex:$,statementIndex:O,statement:L,variableDeclaration:y}=await sh(e,h,F);if(S.addCmpToRegistry)C.push(ah(e,S.addCmpToRegistry)),g=!0;else if(S.removeCmpFromRegistry)C.splice($,1),g=!0;else if(S.updateRegisteredCmp){let x=he(e,C[$],S.updateRegisteredCmp),ue=e.ts.factory.createIdentifier(S.updateRegisteredCmp.importName);C[$]=e.ts.factory.updateObjectLiteralExpression(x,[e.ts.factory.createPropertyAssignment("component",ue),...x.properties.slice(1)]),g=!0}if(g&&o){let x=[...h.statements];x[O]=e.ts.factory.updateVariableStatement(L,L.modifiers,e.ts.factory.updateVariableDeclarationList(L.declarationList,[e.ts.factory.updateVariableDeclaration(y,y.name,y.exclamationToken,y.type,e.ts.factory.createArrayLiteralExpression(vt(e,C)))])),h=e.ts.factory.updateSourceFile(h,x),h=mc(e,S,h),h=q(e,h,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-react",isTypeOnly:!0}),h=At(e,h,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),f.components=S.components,m=S.components.filter(ue=>ue.isRegistered)}}else{let C=[...h.statements];S.addCmpToRegistry?(C.push(dc(e,S.addCmpToRegistry)),g=!0):S.removeCmpFromRegistry?(C.splice(S.nodeIndex,1),g=!0):S.updateRegisteredCmp&&(C[S.nodeIndex]=bi(e,C[S.nodeIndex],S.updateRegisteredCmp),g=!0),g&&o&&(h=e.ts.factory.updateSourceFile(h,C),h=q(e,h,{namedImports:["Builder","builder"],importPath:"@builder.io/react"}),h=mc(e,S,h),T?.acceptsChildren&&(h=q(e,h,{namedImports:["withChildren"],importPath:"@builder.io/react"})),f.components=S.components,m=S.components.filter($=>$.isRegistered))}}}if(g&&o){h=St(e,h),h=Et(e,h);let v=De(e,h);v=ft(v),v=await e.formatCode(e.registryPath,v),await e.writeFile(e.registryPath,v)}return f}async function sh(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await vi(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}function ah(e,t){let r=e.ts.factory.createIdentifier(t.importName);return he(e,e.ts.factory.createObjectLiteralExpression([e.ts.factory.createPropertyAssignment("component",r),...t.acceptsChildren?[e.ts.factory.createPropertyAssignment("canHaveChildren",e.ts.factory.createTrue())]:[]],!0),t)}function mc(e,t,r){let n=t.addCmpToRegistry||t.updateRegisteredCmp;if(n){let i=n.externalImportPath?n.externalImportPath:z(e,e.registryPath,n.filePath);n.exportType==="default"?r=q(e,r,{defaultImport:n.importName,importPath:i}):n.exportType==="named"&&(r=q(e,r,{namedImports:[n.importName],importPath:i}))}return r}async function gc(e){let t=[],r=await uh(e,t);if(await Cc(e,t,r),!await e.exists(e.builderComponentPath)){let n=await e.formatCode(e.builderComponentPath,Dc(e,e.builderComponentPath));await e.writeFile(e.builderComponentPath,n),t.push({filePath:e.builderComponentPath,modifiedType:"create"})}return t}async function hc(e){let t=[];await Cc(e,t);let r=`figma-imports.${e.typescriptEnabled?"tsx":"jsx"}`,n=e.join(e.componentsDir,r);if(!await e.exists(n)){let i=await e.formatCode(n,Dc(e,n,"figma-imports"));await e.writeFile(n,i),t.push({filePath:n,modifiedType:"create"})}return t}function Dc(e,t,r="page"){let n=e.typescriptEnabled;return e.sdkVersion===N.gen2?`
|
|
852
852
|
import React from "react";
|
|
853
853
|
import {
|
|
854
854
|
Content,
|
|
@@ -1026,7 +1026,7 @@ export default Counter;
|
|
|
1026
1026
|
export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
1027
1027
|
];`:`export const CUSTOM_COMPONENTS = [
|
|
1028
1028
|
];
|
|
1029
|
-
`}async function yc(e){let t=await ph(e);return{builderPageOptions:async()=>({templateContentId:"2e36438034894a8abf279ea9e6d3596f",pathname:"/builder-demo",title:"Builder + React Demo Page"}),ensureBuilderSetup:()=>gc(t),ensureFigmaImportPage:()=>hc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Rt(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Rt(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Rt(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Rt(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Rt(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Rt(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>pn(t),setPublicApiKey:n=>pc(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function ph(e){let t=await dh(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await
|
|
1029
|
+
`}async function yc(e){let t=await ph(e);return{builderPageOptions:async()=>({templateContentId:"2e36438034894a8abf279ea9e6d3596f",pathname:"/builder-demo",title:"Builder + React Demo Page"}),ensureBuilderSetup:()=>gc(t),ensureFigmaImportPage:()=>hc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>Rt(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await Rt(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>Rt(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>Rt(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>Rt(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>Rt(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>pn(t),setPublicApiKey:n=>pc(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-react"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/react"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function ph(e){let t=await dh(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await Re(e),s={},o={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",reactConfigPath:t,typescriptEnabled:i,configType:"",addExternalPackage:a=>{s[e.join(r,a,"index.ts")]=`export * from "${a}";`},readFileSync:a=>s[a]??e.readFileSync(a),existsSync:a=>!!s[a]||e.existsSync(a),readdirSync:a=>{let u=e.readdirSync(a);return a===r?[...u,...Object.keys(s).map(c=>c.slice(r.length+1))]:u},readdir:async a=>{let u=await e.readdir(a);return a===r?[...u,...Object.keys(s).map(c=>c.slice(r.length+1))]:u}};return e.sdkVersion?o.sdkVersion=e.sdkVersion:o.sdkVersion=await Nr(o),t.includes("webpack.config")&&(o.configType="webpack"),t.includes("vite.config")&&(o.configType="vite"),await e.exists(n)?(o.srcDir=n,o.componentsDir=e.join(n,"components"),o.registryPath=await Ne(e,n),o.builderComponentPath=e.join(o.srcDir,`builder-page.${i?"tsx":"jsx"}`)):(o.componentsDir=e.join(r,"components"),o.registryPath=await Ne(e,r),o.builderComponentPath=e.join(r,`builder-page.${i?"tsx":"jsx"}`)),o}async function dh(e){let t=["vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find React config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function fn(e){return await fh(e,["environment.ts"],oo)}async function xc(e,t){let r=await fn(e),n=await Dh(e,r.file,r.envKey,t);return{...r,modifiedType:n}}async function fh(e,t,r){let n={envKey:r,envValue:null,file:""};for(let i of t){let s=e.join(e.getAppRootDir(),"src","environments",i),o=await mh(e,s);if(typeof o=="string"&&o.length>0&&o!=="YOUR_API_KEY")return n.envValue=o,n.file=s,n}return n.file=e.join(e.getAppRootDir(),"src","environments",t[t.length-1]),n}async function mh(e,t){let r=await e.readFile(t);return r?gh(e,r):""}function gh(e,t){let r=W(e,t),n="",s=Ir(e,r,"environment");if(s&&s.statement.declarationList.declarations.length>0){let a=s.statement.declarationList.declarations[0].initializer;a&&e.ts.isObjectLiteralExpression(a)&&a.properties.forEach(u=>{e.ts.isPropertyAssignment(u)&&e.ts.isIdentifier(u.name)&&u.name.text===oo&&e.ts.isStringLiteral(u.initializer)&&(n=u.initializer.text)})}return n}async function hh(e,t,r,n){let i=W(e,t),o=Ir(e,i,"environment");if(o&&o.statement.declarationList.declarations.length>0){let a=o.statement.declarationList,u=a.declarations[0],c=u.initializer;if(c&&e.ts.isObjectLiteralExpression(c)){let l=e.ts.factory.createPropertyAssignment(e.ts.factory.createIdentifier(r),e.ts.factory.createStringLiteral(n)),p=e.ts.factory.createNodeArray([...c.properties,l]),d=e.ts.factory.updateObjectLiteralExpression(c,p),D=e.ts.factory.updateVariableDeclaration(u,u.name,u.exclamationToken,u.type,d),m=e.ts.factory.updateVariableDeclarationList(a,[D]);return e.ts.factory.updateVariableStatement(o.statement,o.statement.modifiers,m)}return null}return null}async function Dh(e,t,r,n){let i=await e.readFile(t);if(i)if(i.includes(r))e.debug(`"${r}" already set in ${t}`);else{e.debug(`Add "${r}" to ${t}`);let s=await hh(e,i,r,n);if(s){let o=De(e,s),a=await e.formatCode(t,o);await e.writeFile(t,a)}return"update"}else{e.debug(`Creating new env file with "${r}" at ${t}`);let s=`
|
|
1030
1030
|
// https://www.builder.io/c/docs/using-your-api-key
|
|
1031
1031
|
export const environment = {
|
|
1032
1032
|
production: false,
|
|
@@ -1171,7 +1171,7 @@ export class Counter {
|
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
|
-
`.trimStart()}async function Kc(e){await po(e);let t=await e.readFile(e.registryPath);return t?Kh(e,t):{components:[],sourceFile:W(e,"")}}async function Kh(e,t){let r=W(e,t);return Gh(e,r)}async function Gh(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await _i(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:$e(r)}}async function _i(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(Z(e,i)==="component"){let o,{initializer:a}=i;if(e.ts.isIdentifier(a))o=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(o=c.text)}if(!o)continue;n.name===""&&(n.name=te(o)),n.importName=o;let u=await bt(e,e.registryPath,t,o);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=re(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=o;else{let c=await Ec(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===o);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}async function It(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p]=await Promise.all([bc(e,u),Kc(e),fn(e)]),d=c.map(E=>E.cmpInfo),D=l.components,m={components:mt(d,D),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await vc(e,c,m.components),m;let f=!1,g=l.sourceFile,h=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(h.length>0){let E=h.map(A=>{let F=c.find(T=>T.cmpInfo.id===A);if(!F)throw new Error(`Component ${A} not found`);return F}),v=Array.from(new Set(E.map(A=>A.cmpInfo.filePath))),P=await ge(e,v);for(let A of E){let F=m.components.find(y=>y.id===A.cmpInfo.id),T=await Si(e,A,P);We(F,T);let k=d.findIndex(y=>y.id===A.cmpInfo.id);d[k].inputs=T;let I=Ft(A.cmpInfo.id,d,D,r,n,i,s),{elements:S,elmIndex:C,statementIndex:$,statement:O,variableDeclaration:L}=await zh(e,g,A);if(I.addCmpToRegistry)S.push(Wh(e,I.addCmpToRegistry)),f=!0;else if(I.removeCmpFromRegistry)S.splice(C,1),f=!0;else if(I.updateRegisteredCmp){let y=he(e,S[C],I.updateRegisteredCmp);S[C]=e.ts.factory.updateObjectLiteralExpression(y,[Gc(e,I.updateRegisteredCmp),...y.properties.slice(1)]),f=!0}if(f&&o){let y=[...g.statements];y[$]=e.ts.factory.updateVariableStatement(O,O.modifiers,e.ts.factory.updateVariableDeclarationList(O.declarationList,[e.ts.factory.updateVariableDeclaration(L,L.name,L.exclamationToken,L.type,e.ts.factory.createArrayLiteralExpression(vt(e,S)))])),g=e.ts.factory.updateSourceFile(g,y),F.exportType==="named"?g=q(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)}):g=q(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)}),g=q(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),g=At(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=I.components,D=I.components.filter(x=>x.isRegistered)}}}if(f&&o){g=St(e,g),g=Et(e,g);let E=De(e,g);E=ft(E),E=await e.formatCode(e.registryPath,E),await e.writeFile(e.registryPath,E)}return m}function Gc(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function Wh(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([Gc(e,t)],!0),t)}async function zh(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await _i(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}async function Wc(e){let t=await qh(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>Uc(t),ensureFigmaImportPage:()=>Vc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>It(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await It(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>It(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>It(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>It(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>It(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>fn(t),setPublicApiKey:n=>xc(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function qh(e){let t=await Jh(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await Te(e),s=e.join(n,"app"),o=await Ne(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:o,angularConfigPath:t,typescriptEnabled:i,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:p=>{a[e.join(r,p,"index.ts")]=`export * from "${p}";`},readFileSync:p=>a[p]??e.readFileSync(p),existsSync:p=>!!a[p]||e.existsSync(p),readdirSync:p=>{let d=e.readdirSync(p);return p===r?[...d,...Object.keys(a).map(D=>D.slice(r.length+1))]:d},readdir:async p=>{let d=await e.readdir(p);return p===r?[...d,...Object.keys(a).map(D=>D.slice(r.length+1))]:d}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${i?"ts":"js"}`);let c=`app.module.${i?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function Jh(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}async function hn(e){let t=e.configType==="vite"?Yh:Qh;return await yt(e,[".env"],t)}async function zc(e,t){let r=await hn(e),n=await xt(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Yh="VITE_PUBLIC_BUILDER_KEY",Qh="PUBLIC_BUILDER_KEY";async function Jc(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let i=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",o=tD(s),a=Zh(n,r),u=Xh(n);return{id:rD(t),name:o,filePath:i,relFilePath:i,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:o,importPath:i,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function Xh(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function Zh(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...Ni(l)):r.push(...qc(l))}}let i=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=i.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...Ni(c))}else{let c=u.slice(1,-1);r.push(...qc(c))}}let o=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=o.exec(e))!==null;)a[1]&&r.push(...Ni(a[1]));return eD(r)}function Ni(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,o,a]=n;t.push({name:o.trim(),type:Oi(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let i=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=i.exec(e))!==null;){let[,o,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:o.trim(),type:u?Oi(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,o,a]=n;t.some(u=>u.name===o.trim())||t.push({name:o.trim(),type:Oi(a.trim()),required:!1})}return t}function qc(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function Oi(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function eD(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function tD(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function rD(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}async function pr(e,t){let r=await nD(e,t.readAllInputTypes),n=await hn(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function nD(e,t){let r=[],n=await oD(e,e.getAppRootDir());for(let i of n){let s=await Jc(e,i,t);s&&r.push(s)}return r}async function oD(e,t){let r=[],n=async s=>{try{let o=await e.readdir(s);for(let a of o){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let i=["components","pages","layouts"];for(let s of i){let o=e.join(t,s);try{(await e.stat(o)).isDirectory()&&await n(o)}catch{}}return r}async function Yc(e){let t={errors:[]};try{await Xc(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function Qc(e){let t=[];t.push(...await Xc(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let i=await e.formatCode(n,iD(e,n,"figma-imports"));await e.writeFile(n,i),t.push({filePath:n,modifiedType:"create"})}return t}async function Xc(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,aD(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function iD(e,t,r="page"){let n=z(e,t,e.registryPath),i=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1174
|
+
`.trimStart()}async function Kc(e){await po(e);let t=await e.readFile(e.registryPath);return t?Kh(e,t):{components:[],sourceFile:W(e,"")}}async function Kh(e,t){let r=W(e,t);return Gh(e,r)}async function Gh(e,t){let r=[],n=fe(e,t,"CUSTOM_COMPONENTS");return n&&await Promise.all(n.arrayLiteralExp.elements.map(async(i,s)=>{let o=await _i(e,t,i);o&&(o.nodeIndex=s,r.push(o))})),{sourceFile:t,components:_e(r)}}async function _i(e,t,r){if(!e.ts.isObjectLiteralExpression(r))return null;let n={id:"",name:"",displayFilePath:"",exportName:"",importName:"",filePath:"",relFilePath:"",importPath:"",inputs:[],framework:"angular"};for(let i of r.properties){if(!e.ts.isPropertyAssignment(i)||!e.ts.isIdentifier(i.name))continue;if(Z(e,i)==="component"){let o,{initializer:a}=i;if(e.ts.isIdentifier(a))o=a.text;else if(e.ts.isCallExpression(a)){let c=a.arguments[0];e.ts.isIdentifier(c)&&(o=c.text)}if(!o)continue;n.name===""&&(n.name=te(o)),n.importName=o;let u=await bt(e,e.registryPath,t,o);if(!u)continue;if(n.filePath=u.filePath,n.relFilePath=u.relFilePath,await e.exists(u.filePath)?n.importPath=re(e,u.filePath):(n.externalImportPath=u.importPath,n.importPath=n.externalImportPath),n.displayFilePath=u.displayFilePath,n.exportType=u.exportType,n.externalImportPath)n.exportName=o;else{let c=await Ec(e,u.filePath);if(c&&c.length>0)if(c.length===1)n.exportName=c[0].cmpInfo.exportName;else{let l=c.find(p=>p.cmpInfo.exportName===o);l&&(n.exportName=l.cmpInfo.exportName)}}continue}}return n=Oe(e,n,r),n.filePath&&n.exportName&&(n.id=await ee(e,n.filePath,n.exportName,n.externalImportPath)),n}async function It(e,t,r,n,i,s,o,a){let u=await qt(e),[c,l,p]=await Promise.all([bc(e,u),Kc(e),fn(e)]),d=c.map(E=>E.cmpInfo),D=l.components,m={components:mt(d,D),registryPath:e.registryPath,registryDisplayPath:X(e,e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(d),publicApiKey:p.envValue??void 0,devToolsVersion:e.version};if(a)return m.components=await vc(e,c,m.components),m;let f=!1,g=l.sourceFile,h=Array.isArray(t)?t:typeof t=="string"?[t]:[];if(h.length>0){let E=h.map(A=>{let F=c.find(T=>T.cmpInfo.id===A);if(!F)throw new Error(`Component ${A} not found`);return F}),v=Array.from(new Set(E.map(A=>A.cmpInfo.filePath))),P=await ge(e,v);for(let A of E){let F=m.components.find(y=>y.id===A.cmpInfo.id),T=await Si(e,A,P);We(F,T);let k=d.findIndex(y=>y.id===A.cmpInfo.id);d[k].inputs=T;let I=Ft(A.cmpInfo.id,d,D,r,n,i,s),{elements:S,elmIndex:C,statementIndex:$,statement:O,variableDeclaration:L}=await zh(e,g,A);if(I.addCmpToRegistry)S.push(Wh(e,I.addCmpToRegistry)),f=!0;else if(I.removeCmpFromRegistry)S.splice(C,1),f=!0;else if(I.updateRegisteredCmp){let y=he(e,S[C],I.updateRegisteredCmp);S[C]=e.ts.factory.updateObjectLiteralExpression(y,[Gc(e,I.updateRegisteredCmp),...y.properties.slice(1)]),f=!0}if(f&&o){let y=[...g.statements];y[$]=e.ts.factory.updateVariableStatement(O,O.modifiers,e.ts.factory.updateVariableDeclarationList(O.declarationList,[e.ts.factory.updateVariableDeclaration(L,L.name,L.exclamationToken,L.type,e.ts.factory.createArrayLiteralExpression(vt(e,S)))])),g=e.ts.factory.updateSourceFile(g,y),F.exportType==="named"?g=q(e,g,{namedImports:[F.importName],importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)}):g=q(e,g,{defaultImport:F.importName,importPath:F.externalImportPath?F.externalImportPath:z(e,e.registryPath,F.filePath)}),g=q(e,g,{namedImports:["RegisteredComponent"],importPath:"@builder.io/sdk-angular",isTypeOnly:!0}),g=At(e,g,{variableName:"CUSTOM_COMPONENTS",arrayType:"RegisteredComponent"}),m.components=I.components,D=I.components.filter(x=>x.isRegistered)}}}if(f&&o){g=St(e,g),g=Et(e,g);let E=De(e,g);E=ft(E),E=await e.formatCode(e.registryPath,E),await e.writeFile(e.registryPath,E)}return m}function Gc(e,t){let r=e.ts.factory.createIdentifier(t.importName);return e.ts.factory.createPropertyAssignment("component",r)}function Wh(e,t){return he(e,e.ts.factory.createObjectLiteralExpression([Gc(e,t)],!0),t)}async function zh(e,t,r){let n=fe(e,t,"CUSTOM_COMPONENTS");if(!n)throw new Error(`Exported name of the Builder registry must be "CUSTOM_COMPONENTS". Please update your Builder registry file: ${e.registryPath}`);let i=n.arrayLiteralExp.elements.filter(o=>e.ts.isObjectLiteralExpression(o)),s=-1;for(let o=0;o<i.length;o++)if((await _i(e,t,i[o]))?.id===r.cmpInfo.id){s=o;break}return{...n,elements:i,elmIndex:s}}async function Wc(e){let t=await qh(e);return{builderPageOptions:async()=>({templateContentId:"f0b8016ac92e474699293211a268ebaa",pathname:"/builder-demo",title:"Builder + Angular Demo Page"}),ensureBuilderSetup:()=>Uc(t),ensureFigmaImportPage:()=>Vc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>It(t,null,!1,!1,null,null,!1,!!n?.readAllInputTypes),addExternalPackage:async n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await It(t,n.cmpId,!1,!1,null,null,!1,!1);return{...i,component:i.components.find(s=>s.id===n.cmpId)}},registerComponent:n=>It(t,n.cmpId,!0,!1,null,null,!0,!1),setRegisteredComponentInfo:n=>It(t,n.cmpId,!1,!1,n,null,!0,!1),setRegisteredComponentInput:n=>It(t,n.cmpId,!1,!1,null,n,!0,!1),unregisterComponent:n=>It(t,n.cmpId,!1,!0,null,null,!0,!1),getPublicApiKey:()=>fn(t),setPublicApiKey:n=>xc(t,n.publicApiKey),getDependencies:n=>[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-angular"},{name:"concurrently"}],getDevRunCommand:()=>"builder-dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function qh(e){let t=await Jh(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await Re(e),s=e.join(n,"app"),o=await Ne(e,s),a={},u={...e,srcDir:"",appDir:"",componentsDir:"",registryPath:o,angularConfigPath:t,typescriptEnabled:i,builderPageComponentPath:"",hasAppModule:!1,addExternalPackage:p=>{a[e.join(r,p,"index.ts")]=`export * from "${p}";`},readFileSync:p=>a[p]??e.readFileSync(p),existsSync:p=>!!a[p]||e.existsSync(p),readdirSync:p=>{let d=e.readdirSync(p);return p===r?[...d,...Object.keys(a).map(D=>D.slice(r.length+1))]:d},readdir:async p=>{let d=await e.readdir(p);return p===r?[...d,...Object.keys(a).map(D=>D.slice(r.length+1))]:d}};if(!await e.exists(n))throw new Error(`Could not find src directory. Searched for src in "${e.getAppRootDir()}".`);u.srcDir=n,u.appDir=s,u.componentsDir=e.join(u.appDir,"components"),u.builderPageComponentPath=e.join(u.componentsDir,`builder-page.component.${i?"ts":"js"}`);let c=`app.module.${i?"ts":"js"}`,l=e.join(u.appDir,c);return await e.exists(l)&&(u.hasAppModule=!0),u}async function Jh(e){let t=e.join(e.getAppRootDir(),"angular.json");if(await e.exists(t))return t;let r=e.join(e.getAppRootDir(),"project.json");if(await e.exists(r))return r;if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Angular config file. Searched for angular.json & project.json in "${e.getAppRootDir()}".`)}async function hn(e){let t=e.configType==="vite"?Yh:Qh;return await yt(e,[".env"],t)}async function zc(e,t){let r=await hn(e),n=await xt(e,r.file,r.envKey,t);return{...r,modifiedType:n}}var Yh="VITE_PUBLIC_BUILDER_KEY",Qh="PUBLIC_BUILDER_KEY";async function Jc(e,t,r){try{let n=await e.readFile(t);if(!n)return null;let i=e.relative(e.getAppRootDir(),t),s=t.split("/").pop()?.replace(".vue","")||"UnknownComponent",o=tD(s),a=Zh(n,r),u=Xh(n);return{id:rD(t),name:o,filePath:i,relFilePath:i,inputs:a,framework:"vue",exportType:"default",exportName:"default",importName:o,importPath:i,vueApiType:u}}catch(n){return console.warn(`Failed to parse Vue component ${t}:`,n),null}}function Xh(e){return/<script[^>]*\s+setup[^>]*>/.test(e)?"composition-setup":/import\s+\{[^}]*\b(ref|reactive|computed|watch|onMounted|defineComponent)\b[^}]*\}\s+from\s+['"]vue['"]/.test(e)||/setup\s*\([^)]*\)\s*\{/.test(e)?"composition":"options"}function Zh(e,t){if(!t)return[];let r=[],n=[/defineProps<\s*\{([^}]+)\}\s*>\s*\(\s*\)/g,/defineProps\s*\(\s*\{([^}]+)\}\s*\)/g,/defineProps\s*\(\s*\[([^\]]+)\]\s*\)/g];for(let u of n){let c;for(;(c=u.exec(e))!==null;){let l=c[1];l.includes(":")?r.push(...Ni(l)):r.push(...qc(l))}}let i=/props\s*:\s*(\{[^}]+\}|\[[^\]]+\])/g,s;for(;(s=i.exec(e))!==null;){let u=s[1];if(u.startsWith("{")){let c=u.slice(1,-1);r.push(...Ni(c))}else{let c=u.slice(1,-1);r.push(...qc(c))}}let o=/setup\s*\(\s*props\s*(?::\s*\{([^}]+)\})?\s*[,)]?/g,a;for(;(a=o.exec(e))!==null;)a[1]&&r.push(...Ni(a[1]));return eD(r)}function Ni(e){let t=[],r=/(\w+)\s*:\s*([^,;]+)/g,n;for(;(n=r.exec(e))!==null;){let[,o,a]=n;t.push({name:o.trim(),type:Oi(a.trim()),required:!a.includes("?")&&!a.includes("undefined")})}let i=/(\w+)\s*:\s*\{([^}]+)\}/g;for(;(n=i.exec(e))!==null;){let[,o,a]=n,u=a.match(/type\s*:\s*(\w+)/),c=a.match(/required\s*:\s*(true|false)/),l=a.match(/default\s*:\s*([^,}]+)/);t.push({name:o.trim(),type:u?Oi(u[1]):"any",required:c?c[1]==="true":!1,defaultValue:l?l[1].trim():void 0})}let s=/(\w+)\s*:\s*(\w+)(?=\s*[,}])/g;for(;(n=s.exec(e))!==null;){let[,o,a]=n;t.some(u=>u.name===o.trim())||t.push({name:o.trim(),type:Oi(a.trim()),required:!1})}return t}function qc(e){let t=[],r=e.split(",").map(n=>n.trim().replace(/['"]/g,"")).filter(n=>n.length>0);for(let n of r)t.push({name:n,type:"any",required:!1});return t}function Oi(e){let t={String:"string",Number:"number",Boolean:"boolean",Array:"any[]",Object:"object",Function:"function",Date:"Date",Symbol:"symbol",string:"string",number:"number",boolean:"boolean",object:"object",function:"function"},r=e.replace(/\s*\|\s*undefined/g,"").replace(/\?$/,"");return t[r]||r||"any"}function eD(e){let t=new Set;return e.filter(r=>t.has(r.name)?!1:(t.add(r.name),!0))}function tD(e){return e.replace(/[-_\s]+(.)?/g,(t,r)=>r?r.toUpperCase():"").replace(/^(.)/,(t,r)=>r?r.toUpperCase():"")}function rD(e){return e.replace(/[^a-zA-Z0-9]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").toLowerCase()}async function pr(e,t){let r=await nD(e,t.readAllInputTypes),n=await hn(e);return{components:r,registryPath:e.registryPath,registryDisplayPath:e.relative(e.getAppRootDir(),e.registryPath),frameworks:e.getFrameworks(),dependencies:ot(r),publicApiKey:n.envValue??void 0,devToolsVersion:e.version}}async function nD(e,t){let r=[],n=await oD(e,e.getAppRootDir());for(let i of n){let s=await Jc(e,i,t);s&&r.push(s)}return r}async function oD(e,t){let r=[],n=async s=>{try{let o=await e.readdir(s);for(let a of o){let u=e.join(s,a);(await e.stat(u)).isDirectory()?!a.startsWith(".")&&a!=="node_modules"&&a!=="dist"&&a!=="build"&&a!==".nuxt"&&a!==".output"&&await n(u):a.endsWith(".vue")&&r.push(u)}}catch{}};await n(t);let i=["components","pages","layouts"];for(let s of i){let o=e.join(t,s);try{(await e.stat(o)).isDirectory()&&await n(o)}catch{}}return r}async function Yc(e){let t={errors:[]};try{await Xc(e)}catch(r){t.errors.push(r instanceof Error?r.message:String(r))}return t}async function Qc(e){let t=[];t.push(...await Xc(e));let n=e.join(e.componentsDir,"FigmaImports.vue");if(!await e.exists(n)){let i=await e.formatCode(n,iD(e,n,"figma-imports"));await e.writeFile(n,i),t.push({filePath:n,modifiedType:"create"})}return t}async function Xc(e){let t=[];return await e.exists(e.registryPath)||(await e.writeFile(e.registryPath,aD(e)),t.push({filePath:e.registryPath,modifiedType:"create"})),t}function iD(e,t,r="page"){let n=z(e,t,e.registryPath),i=e.typescriptEnabled;return e.isNuxt?`<template>
|
|
1175
1175
|
<div>
|
|
1176
1176
|
<div v-if="pending">Loading...</div>
|
|
1177
1177
|
<div v-else-if="error">Error loading content</div>
|
|
@@ -1277,13 +1277,13 @@ export const CUSTOM_COMPONENTS: RegisteredComponent[] = [
|
|
|
1277
1277
|
// ]
|
|
1278
1278
|
// }
|
|
1279
1279
|
];
|
|
1280
|
-
`}async function Zc(e){let t=await uD(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await Yc(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>Qc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>pr(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await pr(t,{readAllInputTypes:!1}),s=i.components.find(o=>o.id===n.cmpId);return{...i,component:s}},registerComponent:async n=>pr(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>pr(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>pr(t,{readAllInputTypes:!1}),unregisterComponent:async n=>pr(t,{readAllInputTypes:!1}),getPublicApiKey:()=>hn(t),setPublicApiKey:n=>zc(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function uD(e){let t=await cD(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await
|
|
1280
|
+
`}async function Zc(e){let t=await uD(e);return{builderPageOptions:async()=>({templateContentId:"vue-demo-template-id",pathname:"/builder-demo",title:"Builder + Vue Demo Page"}),ensureBuilderSetup:async()=>(await Yc(t)).errors.length>0?[]:[],ensureFigmaImportPage:()=>Qc(t),getRegistryPath:()=>t.registryPath,getRegistry:n=>pr(t,{readAllInputTypes:!!n?.readAllInputTypes}),addExternalPackage:n=>{t.addExternalPackage(n)},loadComponent:async n=>{let i=await pr(t,{readAllInputTypes:!1}),s=i.components.find(o=>o.id===n.cmpId);return{...i,component:s}},registerComponent:async n=>pr(t,{readAllInputTypes:!1}),setRegisteredComponentInfo:async n=>pr(t,{readAllInputTypes:!1}),setRegisteredComponentInput:async n=>pr(t,{readAllInputTypes:!1}),unregisterComponent:async n=>pr(t,{readAllInputTypes:!1}),getPublicApiKey:()=>hn(t),setPublicApiKey:n=>zc(t,n.publicApiKey),getDependencies:n=>n.sdkVersion===N.gen2?[{name:"@builder.io/dev-tools"},{name:"@builder.io/sdk-vue"}]:[{name:"@builder.io/dev-tools"},{name:"@builder.io/vue"},{name:"@builder.io/sdk"}],getDevRunCommand:()=>"dev",getCache:()=>rt(t),setCache:n=>nt(t,n)}}async function uD(e){let t=await cD(e),r=e.getAppRootDir(),n=e.join(r,"src"),i=await Re(e),s={},o={...e,srcDir:null,builderComponentPath:"",componentsDir:"",registryPath:"",vueConfigPath:t,typescriptEnabled:i,configType:"",isNuxt:await lD(e),addExternalPackage:c=>{s[e.join(r,c,"index.ts")]=`export * from "${c}";`},readFileSync:c=>s[c]??e.readFileSync(c),existsSync:c=>!!s[c]||e.existsSync(c),readdirSync:c=>{let l=e.readdirSync(c);return c===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l},readdir:async c=>{let l=await e.readdir(c);return c===r?[...l,...Object.keys(s).map(p=>p.slice(r.length+1))]:l}};t.includes("webpack.config")&&(o.configType="webpack"),(t.includes("vite.config")||t.includes("nuxt.config"))&&(o.configType="vite");let a=await e.exists(n);o.srcDir=a?n:null;let u=[e.join(r,"components"),e.join(r,"src","components"),e.join(r,"app","components")];for(let c of u)if(await e.exists(c)){o.componentsDir=c;break}return o.componentsDir||(o.componentsDir=a?e.join(n,"components"):e.join(r,"components")),o.registryPath=await Ne(e,o.componentsDir),o}async function cD(e){let t=["nuxt.config.ts","nuxt.config.js","vite.config.ts","vite.config.js","webpack.config.js","webpack.config.ts","vue.config.js","vue.config.ts"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return n}if(e.ignoreMissingConfig)return"";throw new Error(`Could not find Vue config file. Searched for ${t.join(", ")} in "${e.getAppRootDir()}".`)}async function lD(e){let t=["nuxt.config.ts","nuxt.config.js"];for(let r of t){let n=e.join(e.getAppRootDir(),r);if(await e.exists(n))return!0}try{let r=e.join(e.getAppRootDir(),"package.json");if(await e.exists(r)){let n=JSON.parse(await e.readFile(r)||"{}"),i={...n.dependencies,...n.devDependencies};return!!(i.nuxt||i["@nuxt/kit"]||i.nuxt3)}}catch{}return!1}var ho=M(dl(),1);async function fl(e,t){let n={components:(await t.getRegistry()).components.filter(s=>s.isRegistered).map(s=>{let o={filePath:pt(e.relative(e.getAppRootDir(),s.filePath)),name:s.name,image:s.image,description:s.description,exportName:s.exportName,inputs:Ke(s.inputs)};return Ke(o)}),version:1};e.debug("exporting registry components:",n.components.length);let i=(0,ho.compress)(n);return btoa(JSON.stringify(i))}async function ml(e,t,r){if(typeof r!="string")throw new Error("Invalid registry to import");let n=await t.getRegistry(),i=JSON.parse(atob(r)),s=(0,ho.decompress)(i),o=Ke(n);e.debug("importing registry components:",s.components.length);for(let a of s.components){let u=pt(e.normalize(a.filePath)),c=n.components.find(p=>pt(p.filePath).endsWith(u)&&p.exportName===a.exportName);if(!c){console.error(`Could not find component to register: ${a.filePath}, ${a.exportName}`);continue}e.debug(`register (${c.id})`,c.filePath),await t.registerComponent({cmpId:c.id});for(let p of a.inputs)e.debug(`set input (${c.id})`),await t.setRegisteredComponentInput({cmpId:c.id,name:p.name,type:p.type,required:p.required,defaultValue:p.defaultValue,friendlyName:p.friendlyName,helperText:p.helperText});e.debug(`set input (${c.id}) info`);let l=await t.setRegisteredComponentInfo({cmpId:c.id,name:a.name,image:a.image,description:a.description});o=Ke(l)}return o}var ze={react:"react",remix:"remix",angular:"angular",next:"next",qwik:"qwik",vue:"vue"},$A={[ze.react]:[{version:N.gen1,recommended:!0},{version:N.gen2,recommended:!1}],[ze.remix]:[{version:N.gen1,recommended:!1},{version:N.gen2,recommended:!0}],[ze.angular]:[{version:N.gen2,recommended:!0}],[ze.next]:[{version:N.gen1,recommended:!0},{version:N.gen2,recommended:!1}],[ze.qwik]:[{version:N.gen2,recommended:!0}],[ze.vue]:[{version:N.gen1,recommended:!0},{version:N.gen2,recommended:!1}]};async function gl(e,t){let r=[],n=new Set;async function i(s){let o=e.join(s,"package.json");try{if(!await e.exists(o))return null;let u=await e.readFile(o);if(u===null)throw new Error(`Failed to read package.json at ${o}`);let c=JSON.parse(u);if(typeof c.name!="string"||c.name.trim()===""||n.has(c.name))return null;n.add(c.name);let l={name:c.name,subPackages:[]},p=await e.readdir(s);for(let d of p)d!=="node_modules"&&(await e.stat(e.join(s,d))).isDirectory()&&l.subPackages.push(d);return r.push(l),l}catch(a){return e.Sentry?.captureException(a,{level:"warning"}),null}}try{let s=e.join(t,"package.json");if(await e.exists(s)){let a=await e.readFile(s);if(a!==null){let u=JSON.parse(a),c={...u.dependencies,...u.devDependencies};for(let l of Object.keys(c)){let p=e.join(t,"node_modules",l);await i(p)}if(Array.isArray(u.workspaces))for(let l of u.workspaces){let p=await e.readdir(e.join(t,l));for(let d of p){let D=e.join(t,l,d);await i(D)}}}}}catch(s){e.Sentry?.captureException(s,{level:"warning"})}return r}var $D={"@builder.io/qwik-city":rc,next:Gu,"@remix-run/react":lc,react:yc,"@angular/core":Wc,vue:Zc},_D={"@builder.io/qwik-city":ze.qwik,next:ze.next,"@remix-run/react":ze.remix,react:ze.react,"@angular/core":ze.angular,vue:ze.vue};async function Do(e){if(!e.ts)throw new Error("createDevTools() requires a TypeScript instance passed to the 'ts' option");if((!e.frameworks||e.frameworks.length===0)&&(e.frameworks=await Sr(e)),e.frameworks.length===0)throw new Error("Supported Devtools framework for not found");for(let t of e.frameworks){let r=$D[t.name];if(r)try{let n=await r(e);return{...n,exportRegistry:()=>fl(e,n),importRegistry:s=>ml(e,n,s),framework:_D[t.name],findAllDependencies:async()=>await gl(e,e.getRepoRootDir())}}catch(n){e.Sentry?.captureException(n,{level:"warning"})}}throw new Error(`Devtools framework not found for ${e.getAppRootDir()}, ${JSON.stringify(e.frameworks,null,2)}`)}var IP=`
|
|
1281
1281
|
/** @type {import('next').NextConfig} */
|
|
1282
1282
|
const nextConfig = {
|
|
1283
1283
|
}
|
|
1284
1284
|
|
|
1285
1285
|
module.exports = nextConfig
|
|
1286
|
-
`.trimStart();var hl=M(require("@sentry/node"),1),Dl=M(require("@amplitude/analytics-node"),1);async function Ht(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([hl.flush(2e3),Dl.flush().promise])}catch(t){console.error(t)}process.exit(e)}var fr=process.env.AIR_HOST||"https://api.builder.io";var Mr=M(require("@amplitude/analytics-node"),1),yn=M(require("@sentry/node"),1);var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function Cl(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}var yl=M(require("crypto")),yo=new Uint8Array(256),Co=yo.length;function Zi(){return Co>yo.length-16&&(yl.default.randomFillSync(yo),Co=0),yo.slice(Co,Co+=16)}var xl=M(require("crypto")),es={randomUUID:xl.default.randomUUID};function ND(e,t,r){if(es.randomUUID&&!t&&!e)return es.randomUUID();e=e||{};let n=e.random||(e.rng||Zi)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Cl(n)}var ts=ND;var mr=class extends Error{},st=class extends mr{constructor({type:r,cause:n,message:i,suggestions:s=[],hostname:o,port:a,statusCode:u,errorCode:c}){super(i,{cause:n})
|
|
1286
|
+
`.trimStart();var hl=M(require("@sentry/node"),1),Dl=M(require("@amplitude/analytics-node"),1);async function Ht(e){if(process.env.NODE_ENV!=="test")try{await Promise.allSettled([hl.flush(2e3),Dl.flush().promise])}catch(t){console.error(t)}process.exit(e)}var fr=process.env.AIR_HOST||"https://api.builder.io";var Mr=M(require("@amplitude/analytics-node"),1),yn=M(require("@sentry/node"),1);var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function Cl(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}var yl=M(require("crypto")),yo=new Uint8Array(256),Co=yo.length;function Zi(){return Co>yo.length-16&&(yl.default.randomFillSync(yo),Co=0),yo.slice(Co,Co+=16)}var xl=M(require("crypto")),es={randomUUID:xl.default.randomUUID};function ND(e,t,r){if(es.randomUUID&&!t&&!e)return es.randomUUID();e=e||{};let n=e.random||(e.rng||Zi)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return Cl(n)}var ts=ND;var mr=class extends Error{},st=class extends mr{constructor({type:r,cause:n,message:i,suggestions:s=[],hostname:o,port:a,statusCode:u,errorCode:c}){super(i,{cause:n});$e(this,"type");$e(this,"suggestions");$e(this,"hostname");$e(this,"port");$e(this,"statusCode");$e(this,"errorCode");this.name="NetworkError",this.type=r,this.suggestions=s,this.hostname=o,this.port=a,this.statusCode=u,this.errorCode=c}};function rs(e,t,r){switch(e.code){case"ECONNREFUSED":return new st({type:"connection_refused",cause:e,message:`Connection refused to ${t}${r?`:${r}`:""}. The server may be down or unreachable.`,suggestions:["Check your internet connection","Try again in a few minutes - the service may be temporarily unavailable","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ECONNREFUSED"});case"ETIMEDOUT":return new st({type:"connection_timeout",cause:e,message:`Connection timed out to ${t}${r?`:${r}`:""}. The request took too long to complete.`,suggestions:["Check your internet connection speed","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r,errorCode:"ETIMEDOUT"});case"ENOTFOUND":return new st({type:"dns_not_found",cause:e,message:`Cannot resolve ${t}. The server address could not be found.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,errorCode:"ENOTFOUND"});default:return new st({type:"unknown",cause:e,message:`Network error connecting to ${t}: ${e.message}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:t,port:r})}}async function xn(e,t){let r={...t,app:"dev-tools-cli",package:"cli"},n=await OD(),i=await LD();return await Mr.track(e,r,{user_id:n,device_id:i}).promise}var xo,ns;async function wl(e){xo=e;let t=await Fr();await Qo({...t,userId:e})}async function OD(){if(xo)return xo;let e=await Fr(),t;return Yo(e,"userId")&&(t=e.userId),xo=t,t}async function LD(){if(ns)return ns;let e=await Fr(),t=ts();return Yo(e,"deviceId")?t=e.deviceId:await Qo({...e,deviceId:t}),ns=t,t}var El=require("undici");var bl="0.0.0";var os=M(require("process"),1),vl=M(require("@sentry/node"),1);var gr=class extends Error{constructor(r,n,i){super(r,i);$e(this,"code");this.name="CodeGenError",this.code=n}};var kt=async(e,t)=>{let r="fetch"in globalThis?globalThis.fetch:El.fetch,n=typeof e=="string"?e:e instanceof URL?e.toString():e.url,i=new URL(n),s=i.hostname,o=i.port?parseInt(i.port):void 0;try{let a=vl.getTraceData(),u=await r(e,{...t,headers:{...t?.headers,...jD(),...a}});if(!u.ok){if(u.status===402){let c=await u.json(),l=c.code??"credits-limit-daily",p=c.message??"You've reached the DAY AI credits limit for your current plan.";throw new gr(p,l)}else if(u.status===429){let c=await u.json(),l=c.code??"credits-limit-other",p=c.message??"Rate limit exceeded. Please try again later.";throw new gr(p,l)}if(u.status>=500){let c;try{let l=await u.text();if(l)try{let p=JSON.parse(l);c=p.message||p.error||l}catch{c=l}}catch{}throw new st({type:"server_error",cause:c?new Error(c):void 0,message:`Server error from ${s} (HTTP ${u.status}). The server encountered an internal error.`,suggestions:["Try again in a few minutes - this may be a temporary issue","Contact support if the problem persists"],hostname:s,statusCode:u.status})}}return u}catch(a){if(a instanceof st||a instanceof gr||a instanceof Error&&a.name==="AbortError")throw a;if(a instanceof Error){if(a.name==="TypeError"&&a.cause instanceof Error){let p=a.cause;if(p.code)throw rs(p,s,o)}if(a.code)throw rs(a,s,o);if(a.message?.includes("SSL")||a.message?.includes("TLS")||a.message?.includes("certificate")||a.message?.includes("CERT"))throw new st({type:"ssl_error",cause:a,message:`SSL/TLS error connecting to ${s}. The connection could not be secured.`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support@builder.io if the issue persists"],hostname:s})}let u=t?.method||"GET",c=a instanceof Error?a.message:String(a);throw new st({type:"unknown",cause:a instanceof Error?a:new Error(String(a)),message:`Network error for ${u} ${i.toString()}: ${c}`,suggestions:["Check your internet connection","Try again in a few minutes","Contact support if the issue persists"],hostname:s,port:o})}};function jD(){let t={darwin:"Macintosh",win32:"Windows NT",linux:"Linux",android:"Android",ios:"iPhone"}[os.default.platform]||"Unknown",r=os.default.platform==="win32"?"10.0":"";return{"User-Agent":`Mozilla/5.0 (${t}${r?"; "+r:""}) builder-cli/${bl}`,"Sec-Ch-Ua-Platform":t}}var UD=M(require("@sentry/node"),1);var Nt=M(or(),1);var VD=M(require("prettier"),1);var WD=M(require("chokidar"),1),zD=M(require("ignore"),1);var as=M(require("process"),1);function us(){let{env:e}=as.default,{TERM:t,TERM_PROGRAM:r}=e;return as.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 cs=M(or(),1),jr=M(Wn(),1),En=M(or(),1),wo=()=>{let e=ls?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],t=ls?80:120,r,n=!1,i="",s="",o="",a=g=>{let h=g>1?"Something went wrong":"Canceled";n&&D(h,g)},u=(g,h)=>{console.error(h,g),a(2)},c=()=>a(1),l=()=>{process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",c),process.on("SIGTERM",c),process.on("exit",a)},p=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",c),process.removeListener("SIGTERM",c),process.removeListener("exit",a)},d=(g="")=>{n=!0,i=g.replace(/\.+$/,""),process.stdout.write(`${cs.default.gray(qD)}
|
|
1287
1287
|
`);let h=0,E=0;l(),process.env.CI||(r=setInterval(()=>{let v=cs.default.magenta(e[h]),P=".".repeat(Math.floor(E)).slice(0,3);process.stdout.write(jr.cursor.move(-999,-o.split(`
|
|
1288
1288
|
`).length+1)),process.stdout.write(jr.erase.down(o.split(`
|
|
1289
1289
|
`).length));let A=`${v} ${i}${P}${s}`;process.stdout.write(A),h=h+1<e.length?h+1:0,E=E<e.length?E+.125:0,o=A},t))},D=(g,h=0)=>{i=g??i,n=!1,clearInterval(r);let E=h===0?(0,En.green)(QD):h===1?(0,En.red)(JD):(0,En.red)(YD);process.stdout.write(jr.cursor.move(-999,-o.split(`
|
|
@@ -1291,7 +1291,7 @@ module.exports = nextConfig
|
|
|
1291
1291
|
`).length)),process.stdout.write(`${E} ${i}
|
|
1292
1292
|
`),o=i,p()};return{start:d,stop:D,message:(g="")=>{i=g??i},extra:(g="")=>{s=g}}},ls=us(),bo=(e,t)=>ls?e:t,qD=bo("\u2502","|"),JD=bo("\u25A0","x"),YD=bo("\u25B2","x"),QD=bo("\u25C7","o");var w=M(or(),1);function ps(e){switch(xn("cli help",{subcommand:e}),console.log(""),Ot((0,w.bgCyan)((0,w.bold)((0,w.white)(" help ")))+" "+(0,w.dim)(Ve)),e){case"add":case"generate":case"gen":case"g":Ot(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Generate Figma Components")}
|
|
1293
1293
|
|
|
1294
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1294
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} figma generate URL [URL ...] `))}
|
|
1295
1295
|
|
|
1296
1296
|
Start the auto-mapping wizard for the Figma Component URLs pasted in.
|
|
1297
1297
|
|
|
@@ -1309,7 +1309,7 @@ ${(0,w.yellow)("Arguments:")}
|
|
|
1309
1309
|
${(0,w.cyan)("--skipInstallation")} Skip the package installation step
|
|
1310
1310
|
${(0,w.cyan)("--yes")} Auto-confirm all prompts`);break;case"auth":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Authentication")}
|
|
1311
1311
|
|
|
1312
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1312
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} auth `))}
|
|
1313
1313
|
|
|
1314
1314
|
Re-authenticate with Figma and Builder.io.
|
|
1315
1315
|
|
|
@@ -1325,12 +1325,13 @@ ${(0,w.yellow)("Non-Interactive Authentication:")}
|
|
|
1325
1325
|
Example using environment variables:
|
|
1326
1326
|
${(0,w.dim)('export BUILDER_PRIVATE_KEY="your-private-key"')}
|
|
1327
1327
|
${(0,w.dim)('export FIGMA_PERSONAL_TOKEN="your-figma-token"')}
|
|
1328
|
-
${(0,w.dim)(`npx ${
|
|
1328
|
+
${(0,w.dim)(`npx ${Te()} figma generate <url> --ci`)}
|
|
1329
1329
|
|
|
1330
1330
|
${(0,w.yellow)("Arguments:")}
|
|
1331
1331
|
${(0,w.cyan)("--figmaToken")} Figma access token for authentication
|
|
1332
1332
|
${(0,w.cyan)("--spaceId")} Builder.io space ID to use
|
|
1333
1333
|
${(0,w.cyan)("--force")} Force re-authentication even if already authenticated
|
|
1334
|
+
${(0,w.cyan)("--reset")} Clear all stored credentials (logout)
|
|
1334
1335
|
|
|
1335
1336
|
${(0,w.yellow)("Learn More:")}
|
|
1336
1337
|
\u2022 Builder.io API keys: https://www.builder.io/c/docs/using-your-api-key#managing-private-keys
|
|
@@ -1340,11 +1341,17 @@ ${(0,w.yellow)("Learn More:")}
|
|
|
1340
1341
|
${(0,w.yellow)("Subcommands:")}
|
|
1341
1342
|
${(0,w.cyan)("status")} Check if you are authenticated and display user/space info
|
|
1342
1343
|
|
|
1343
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1344
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} auth status `))}
|
|
1344
1345
|
|
|
1345
|
-
Check authentication status and user information
|
|
1346
|
+
Check authentication status and user information.
|
|
1346
1347
|
|
|
1347
|
-
${(0,w.
|
|
1348
|
+
${(0,w.yellow)("Clear Credentials:")}
|
|
1349
|
+
|
|
1350
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} auth --reset `))}
|
|
1351
|
+
|
|
1352
|
+
Clear all stored credentials to logout or switch accounts.`);break;case"publish":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Publish Mappings")}
|
|
1353
|
+
|
|
1354
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} figma publish `))}
|
|
1348
1355
|
|
|
1349
1356
|
Publish your Figma Mappings to Builder.io.
|
|
1350
1357
|
|
|
@@ -1357,7 +1364,7 @@ ${(0,w.yellow)("Arguments:")}
|
|
|
1357
1364
|
${(0,w.cyan)("--yes")} Auto-confirm all prompts
|
|
1358
1365
|
${(0,w.cyan)("--clearMappings")} Remove all mappings from the space, publishing zero mappings`);break;case"migrate":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Migrate Mappings")}
|
|
1359
1366
|
|
|
1360
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1367
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} figma migrate `))}
|
|
1361
1368
|
|
|
1362
1369
|
Migrate your existing Figma Mappings into the repo as local files.
|
|
1363
1370
|
|
|
@@ -1369,7 +1376,7 @@ ${(0,w.yellow)("Arguments:")}
|
|
|
1369
1376
|
${(0,w.cyan)("--force")} Force migration even if there are warnings
|
|
1370
1377
|
${(0,w.cyan)("--yes")} Auto-confirm all prompts`);break;case"code":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Code Generation")}
|
|
1371
1378
|
|
|
1372
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1379
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} code --url URL `))}
|
|
1373
1380
|
|
|
1374
1381
|
Generate or modify code based on Figma designs.
|
|
1375
1382
|
|
|
@@ -1387,7 +1394,7 @@ ${(0,w.yellow)("Configuration Files:")}
|
|
|
1387
1394
|
${(0,w.cyan)(".builderrules")} Add custom instructions that will be injected into the LLM prompt
|
|
1388
1395
|
${(0,w.cyan)(".cursorrules")} Cursor's settings are automatically supported for consistent behavior`);break;case"indexing":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Code Indexing")}
|
|
1389
1396
|
|
|
1390
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1397
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} code indexing `))}
|
|
1391
1398
|
|
|
1392
1399
|
Index your codebase to improve code generation results.
|
|
1393
1400
|
|
|
@@ -1395,7 +1402,7 @@ ${(0,w.yellow)("Arguments:")}
|
|
|
1395
1402
|
${(0,w.cyan)("--spaceId")} Builder.io space ID to use
|
|
1396
1403
|
${(0,w.cyan)("--cwd")} Working directory to run commands from`);break;case"index-repo":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Repository Indexing")}
|
|
1397
1404
|
|
|
1398
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1405
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} index-repo `))}
|
|
1399
1406
|
|
|
1400
1407
|
Index your entire repository to improve code generation results.
|
|
1401
1408
|
|
|
@@ -1403,7 +1410,7 @@ ${(0,w.yellow)("Arguments:")}
|
|
|
1403
1410
|
${(0,w.cyan)("--spaceId")} Builder.io space ID to use
|
|
1404
1411
|
${(0,w.cyan)("--cwd")} Working directory to run commands from`);break;case"launch":case"fusion":Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Fusion Development Server")}
|
|
1405
1412
|
|
|
1406
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1413
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} launch -p <port> -c <command> `))}
|
|
1407
1414
|
|
|
1408
1415
|
This command will:
|
|
1409
1416
|
1. Run your development server command
|
|
@@ -1422,7 +1429,7 @@ ${(0,w.yellow)("Example:")}
|
|
|
1422
1429
|
${(0,w.yellow)("Note:")}
|
|
1423
1430
|
- The proxy runs on port ${(0,w.cyan)("48752")} and the API server on port ${(0,w.cyan)("48753")}`);break;case"launch-init":Ot(`${(0,w.cyan)("\u2192")} ${(0,w.bold)("Initialize Builder.io Repository")}
|
|
1424
1431
|
|
|
1425
|
-
${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1432
|
+
${(0,w.bgGreen)((0,w.white)(` npx ${Te()} init `))}
|
|
1426
1433
|
|
|
1427
1434
|
Clone and initialize a repository for use with Builder.io.
|
|
1428
1435
|
|
|
@@ -1431,10 +1438,10 @@ ${(0,w.yellow)("Arguments:")}
|
|
|
1431
1438
|
${(0,w.cyan)("--branchName")} Branch name to clone (required)
|
|
1432
1439
|
${(0,w.cyan)("--githubToken")} GitHub token for private repositories
|
|
1433
1440
|
${(0,w.cyan)("--installCommand")} Command to install dependencies (defaults to npm install)`);break;default:Q.info(`${(0,w.bold)("Available Commands:")}
|
|
1434
|
-
`),[{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:"Authenticate with Builder.io"},{command:"auth status",description:"Check authentication status and user information"},{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})=>{Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bgGreen)((0,w.white)(` npx ${
|
|
1441
|
+
`),[{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:"Authenticate with Builder.io"},{command:"auth status",description:"Check authentication status and user information"},{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})=>{Q.info(`${(0,w.cyan)("\u2192")} ${(0,w.bgGreen)((0,w.white)(` npx ${Te()} figma ${r} `))}
|
|
1435
1442
|
${(0,w.dim)(n)}
|
|
1436
1443
|
`)}),Q.info(`
|
|
1437
|
-
Use ${(0,w.cyan)(`npx ${
|
|
1444
|
+
Use ${(0,w.cyan)(`npx ${Te()} figma help <command>`)} for detailed help about a command`)}rn("bye \u{1F44B}")}var ZD=["steve8708/mui-vite","steve8708/carbon-vite","steve8708/vite-react-shopify-polaris","steve8708/cloudscape-demos","BuilderIO/fusion-angular-tailwind-starter","BuilderIO/fusion-svelte-tailwind-starter","BuilderIO/fusion-vue-tailwind-starter"],eC="BuilderIO/fusion-starter",ds=[...ZD,eC],D1=ds.map(e=>`https://github.com/${e}`);function Kt(){}Kt.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(P){return s?(setTimeout(function(){s(void 0,P)},0),!0):P}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var u=r.length,c=t.length,l=1,p=u+c;i.maxEditLength&&(p=Math.min(p,i.maxEditLength));var d=(n=i.timeout)!==null&&n!==void 0?n:1/0,D=Date.now()+d,m=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(m[0],r,t,0);if(m[0].oldPos+1>=c&&f+1>=u)return a([{value:this.join(r),count:r.length}]);var g=-1/0,h=1/0;function E(){for(var P=Math.max(g,-l);P<=Math.min(h,l);P+=2){var A=void 0,F=m[P-1],T=m[P+1];F&&(m[P-1]=void 0);var k=!1;if(T){var I=T.oldPos-P;k=T&&0<=I&&I<u}var S=F&&F.oldPos+1<c;if(!k&&!S){m[P]=void 0;continue}if(!S||k&&F.oldPos+1<T.oldPos?A=o.addToPath(T,!0,void 0,0):A=o.addToPath(F,void 0,!0,1),f=o.extractCommon(A,r,t,P),A.oldPos+1>=c&&f+1>=u)return a(tC(o,A.lastComponent,r,t,o.useLongestToken));m[P]=A,A.oldPos+1>=c&&(h=Math.min(h,P-1)),f+1>=u&&(g=Math.max(g,P+1))}l++}if(s)(function P(){setTimeout(function(){if(l>p||Date.now()>D)return s();E()||P()},0)})();else for(;l<=p&&Date.now()<=D;){var v=E();if(v)return v}},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,u=a-i,c=0;u+1<s&&a+1<o&&this.equals(r[u+1],n[a+1]);)u++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,u},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 tC(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,u=s.length,c=0,l=0;a<u;a++){var p=s[a];if(p.removed){if(p.value=e.join(n.slice(l,l+p.count)),l+=p.count,a&&s[a-1].added){var D=s[a-1];s[a-1]=s[a],s[a]=D}}else{if(!p.added&&i){var d=r.slice(c,c+p.count);d=d.map(function(f,g){var h=n[l+g];return h.length>f.length?h:f}),p.value=e.join(d)}else p.value=e.join(r.slice(c,c+p.count));c+=p.count,p.added||(l+=p.count)}}var m=s[u-1];return u>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(s[u-2].value+=m.value,s.pop()),s}var R1=new Kt;var Al=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Pl=/\S/,Tl=new Kt;Tl.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Pl.test(e)&&!Pl.test(t)};Tl.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]&&Al.test(t[r])&&Al.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var Rl=new Kt;Rl.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1438
1445
|
`));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};var rC=new Kt;rC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var nC=new Kt;nC.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Eo(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Eo=function(t){return typeof t}:Eo=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(e)}var oC=Object.prototype.toString,vn=new Kt;vn.useLongestToken=!0;vn.tokenize=Rl.tokenize;vn.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(fs(e,null,null,i),i," ")};vn.equals=function(e,t){return Kt.prototype.equals.call(vn,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function fs(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(oC.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]=fs(e[s],t,r,n,i);return t.pop(),r.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),Eo(e)==="object"&&e!==null){t.push(e),o={},r.push(o);var a=[],u;for(u in e)e.hasOwnProperty(u)&&a.push(u);for(a.sort(),s=0;s<a.length;s+=1)u=a[s],o[u]=fs(e[u],t,r,n,u);t.pop(),r.pop()}else o=e;return o}var ms=new Kt;ms.tokenize=function(e){return e.slice()};ms.join=ms.removeEmpty=function(e){return e};var iC=M(require("@sentry/node"),1);var Vy=M(Nl(),1);var My=M(Ep(),1);var Ly=M(Bp(),1),$p="/_builder.io",eR=$p+"/api";var p0=M(require("prettier"),1);var u0=M(na(),1);var s0=M(na(),1);var l0=M(require("@sentry/node"),1);async function oa(e){let{default:t}=await import("open");await t(e)}var d0=M(require("@sentry/node"),1);var ok=`
|
|
1439
1446
|
`+(0,Nt.dim)("ESC to interrupt");var lt=M(require("typescript"),1);function ia(e){return!(e.category!==lt.DiagnosticCategory.Error||!e.file||e.code===6133||e.code===6138||e.code===6305||e.code===6196||e.code===6192||e.code===6198||e.code===6199||e.code===6205||e.code===1449||e.code===2578||e.code===7006||e.code===5074||e.code===7026||e.code===2503||e.code===2695||e.code===2322)}async function f0(e,t,r){let n=[],i=[t],s=e.relative(e.getAppRootDir(),t.fileName);for(;i.length>0;){let o=i.shift();if(C0(o,t)){let a=g0(e,o,t,r),{line:u,character:c}=t.getLineAndCharacterOfPosition(o.getStart());a&&(a.loc=`${s}:${u+1}:${c+1}`,n.push(a))}i.push(...o.getChildren(t))}return n}var m0="figmaMapping";function g0(e,t,r,n){let[i]=t.arguments;if(!i)throw new Error("Invalid figmaMapping call, no arguments found");if(!U.default.isObjectLiteralExpression(i))throw new Error("Invalid figmaMapping call, argument is not an object literal");let s=i.properties;if(!s)throw new Error("Invalid figmaMapping call, argument has no properties");let o="",a,u,c,l="-",p=e.basename(r.fileName).replace(/\.mapper\.[tsxjm]+$/,""),d,D,m,f,g;if(t.typeArguments&&t.typeArguments.length>0){let T=Kd(t.typeArguments[0].getText(r));T&&(p=T)}for(let T of s){let k=T.name?.getText(r);if(!k)throw new Error("Invalid figmaMapping call, property has no name");switch(k){case"componentName":{if(!("initializer"in T))throw new Error("Invalid figmaMapping call, componentName has no initializer");let I=T.initializer;if(!U.default.isStringLiteral(I))throw new Error("Invalid figmaMapping call, componentName is not a string literal");a=I.text;break}case"url":{if(!("initializer"in T))throw new Error("Invalid figmaMapping call, url has no initializer");let I=T.initializer;if(!U.default.isStringLiteral(I))throw new Error("Invalid figmaMapping call, url is not a string literal");f=I.text;break}case"componentKey":{if(!("initializer"in T))throw new Error("Invalid figmaMapping call, componentKey has no initializer");let I=T.initializer;if(!U.default.isStringLiteral(I))throw new Error("Invalid figmaMapping call, componentKey is not a string literal");o=I.text;break}case"meta":{if(!("initializer"in T))throw new Error("Invalid figmaMapping call, meta has no initializer");let I=T.initializer;if(U.default.isObjectLiteralExpression(I)){g={imports:[]};for(let S of I.properties)U.default.isPropertyAssignment(S)&&U.default.isIdentifier(S.name)&&S.name.text==="imports"&&U.default.isArrayLiteralExpression(S.initializer)&&(g.imports=S.initializer.elements.map($=>{if(U.default.isStringLiteral($))return $.text;if(U.default.isObjectLiteralExpression($)){let O={};for(let L of $.properties)if(U.default.isPropertyAssignment(L)&&U.default.isIdentifier(L.name)){let y=L.name.text;U.default.isStringLiteral(L.initializer)&&(O[y]=L.initializer.text)}return O}return null}).filter(Boolean))}break}case"mapper":if(U.default.isMethodDeclaration(T)){let I=function(C){let O=n.getSymbolAtLocation(C)?.getDeclarations()?.[0];if(O){let L=D0(O);if(L?.importClause){let y=L.importClause.name?.getText(r);return y===l?(d="default",D=y):L.importClause.namedBindings&&U.default.isNamedImports(L.importClause.namedBindings)&&(d="named",L.importClause.namedBindings.elements.forEach(x=>{x.name.getText(r)===l&&(D=x.name.getText(r))})),D&&U.default.isStringLiteral(L.moduleSpecifier)&&(m=L.moduleSpecifier.text),!0}}return!1},S=function(C){if((U.default.isJsxOpeningElement(C)||U.default.isJsxSelfClosingElement(C))&&U.default.isIdentifier(C.tagName)){l=C.tagName.getText(r),I(C.tagName);return}else if(U.default.isTaggedTemplateExpression(C)&&U.default.isIdentifier(C.tag)&&(C.tag.escapedText==="html"||C.tag.escapedText==="tmpl")){if(U.default.isTemplateExpression(C.template)){let O=C.template.templateSpans.find(L=>U.default.isIdentifier(L.expression)&&h0(L.expression.text)&&I(L.expression));if(O&&U.default.isIdentifier(O.expression)){l=O.expression.text;return}}let $=C.template.getText(r).match(/^`\s*<([^\s]+)/);if($){l=$[1];return}if($=C.template.getText(r).match(/^`\s*([^\s]+)/),$){l=$[1];return}}else U.default.forEachChild(C,S)};var A=I,F=S;if(T.parameters&&T.parameters.length>0&&T.parameters[0]&&T.parameters[0].type){let C=T.parameters[0].type.getText(r),$=Kd(C);$&&(p=$)}U.default.forEachChild(T,S),c=T.getText(r).replace(/^mapper/,"function Mapper"),u=sa(c);break}case"designTokenMapper":if(U.default.isMethodDeclaration(T)){c=T.getText(r).replace(/^designTokenMapper/,"function Mapper"),u=sa(c),o="design-tokens";break}case"genericMapper":if(U.default.isMethodDeclaration(T)){c=T.getText(r).replace(/^genericMapper/,"function Mapper"),u=sa(c),o="*";break}}}if(!o&&!f)throw new Error("Invalid figmaMapping call, no componentKey or url found");if(!o&&!u)throw new Error("Invalid figmaMapping call, no mapper found");if(!o&&!c)throw new Error("Invalid figmaMapping call, no original mapper found");let h=w0(r),E=g?.imports??[],v=[],P=[];v.push(...h);for(let T of E)typeof T=="string"?P.push(T):v.push(T);return{builderName:l,figmaName:a??p,figmaKey:o,figmaUrl:f,inputMapper:u,exportType:d,importName:D,importPath:m,originalInputMapper:c,imports:v,importStrings:P.length>0?P:void 0,source:"cli"}}function h0(e){return e.charAt(0)===e.charAt(0).toUpperCase()}function sa(e){return U.default.transpile(e,{target:U.default.ScriptTarget.Latest,allowNonTsExtensions:!0,moduleResolution:U.default.ModuleResolutionKind.NodeJs,module:U.default.ModuleKind.CommonJS,noImplicitAny:!1,esModuleInterop:!0,noUnusedLocals:!1,noUnusedParameters:!1,jsx:U.default.JsxEmit.React,jsxFactory:"React.createElement",jsxFragmentFactory:"React.Fragment",allowJs:!0,checkJs:!0,strict:!0,suppressImplicitAnyIndexErrors:!0,typeRoots:["node_modules/@types"],inlineSources:!0,inlineSourceMap:!0})}function D0(e){let t=e;for(;t;){if(U.default.isImportDeclaration(t))return t;t=t.parent}}function C0(e,t){return U.default.isCallExpression(e)&&e.expression.getText(t)===m0}async function Gd(e){let t=["node_modules","dist","build","public"];return(await e.readdirRecursive(e.getAppRootDir(),t)).filter(n=>He(n))}function Kd(e){let t=e.match(/^Figma(\w+)Props$/);if(t&&typeof t[1]=="string")return t[1]}async function Wd(e,t,r,n=!1){try{return r||(r=await Do(e)),(await r.setPublicApiKey({publicApiKey:t})).modifiedType==="permission-error"?{success:!1,error:"permission-error"}:(n&&await r.ensureFigmaImportPage(),{success:!0})}catch(i){let s="unknown-error";return i instanceof Error?s=i.message:typeof i=="string"&&(s=i),{success:!1,error:s}}}var y0={getCanonicalFileName:e=>e,getCurrentDirectory:()=>U.default.sys.getCurrentDirectory(),getNewLine:()=>U.default.sys.newLine};function x0(e){return U.default.formatDiagnosticsWithColorAndContext(e,y0)}async function zd({sys:e,mappingFiles:t,typeCheck:r}){if(e.Sentry?.setContext("findMappings",{mappingFiles:t}),!t.length)return{mapperFiles:[],figmaBuilderLinks:[],figmaLinksToResolve:[],diagnostics:[]};let n=[],i=[],s=[],o=await ge(e,t),a=o.getTypeChecker(),u=o.getSyntacticDiagnostics().filter(ia).filter(p=>p.file?.fileName?t.includes(p.file.fileName):!1);if(u.length>0)return Q.error(`At least one of the mappings contain syntactic errors:
|
|
1440
1447
|
|
|
@@ -1659,10 +1666,10 @@ Please set the BUILDER_PUBLIC_KEY environment variable.`);return{figmaAuth:a,bui
|
|
|
1659
1666
|
<!--SCRIPT_PLACEHOLDER-->
|
|
1660
1667
|
</body>
|
|
1661
1668
|
</html>
|
|
1662
|
-
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Builder.io"),()=>{o({privateKey:a.searchParams.get("p-key")||"",spaceId:a.searchParams.get("api-key")||"",spaceName:a.searchParams.get("org-name")||"",userId:a.searchParams.get("user-id")||""})})},onListen:n=>{let i=new URL("/cli-auth","https://builder.io");i.searchParams.set("client_id","builder-dev-tools-cli"),i.searchParams.set("host",r),i.searchParams.set("response_type","code"),i.searchParams.set("cli","true"),t&&i.searchParams.set("space_id",t);let s=new URL(tr,`http://localhost:${n}`);s.searchParams.set(jn,(0,Yd.platform)()),s.searchParams.set(Un,process.versions.node);let o=e.getFrameworks();return o.length>0&&(i.searchParams.set(wr,o[0].name),s.searchParams.set(wr,o[0].name)),i.searchParams.set("redirect_url",s.href),i.href}})}function qd(e,t){if((0,
|
|
1669
|
+
`.replace("{{MESSAGE}}","The CLI has authenticated correctly with Builder.io"),()=>{o({privateKey:a.searchParams.get("p-key")||"",spaceId:a.searchParams.get("api-key")||"",spaceName:a.searchParams.get("org-name")||"",userId:a.searchParams.get("user-id")||""})})},onListen:n=>{let i=new URL("/cli-auth","https://builder.io");i.searchParams.set("client_id","builder-dev-tools-cli"),i.searchParams.set("host",r),i.searchParams.set("response_type","code"),i.searchParams.set("cli","true"),t&&i.searchParams.set("space_id",t);let s=new URL(tr,`http://localhost:${n}`);s.searchParams.set(jn,(0,Yd.platform)()),s.searchParams.set(Un,process.versions.node);let o=e.getFrameworks();return o.length>0&&(i.searchParams.set(wr,o[0].name),s.searchParams.set(wr,o[0].name)),i.searchParams.set("redirect_url",s.href),i.href}})}function qd(e,t){if((0,Be.existsSync)((0,Xe.join)(e.getAppRootDir(),"node_modules"))){let n=(0,Xe.join)(e.getAppRootDir(),"node_modules",".builder"),i=(0,Xe.join)(n,"data.json"),s=ca(e);t=Object.assign(s,t),(0,Be.mkdirSync)((0,Xe.dirname)(i),{recursive:!0}),(0,Be.writeFileSync)(i,JSON.stringify({credentials:t},null,2))}else{let n=(0,Xe.join)(e.getAppRootDir(),".config","builderio"),i=(0,Xe.join)(n,"data.json"),s=(0,Xe.join)(e.getAppRootDir(),".gitignore"),o=ca(e);t=Object.assign(o,t),(0,Be.mkdirSync)((0,Xe.dirname)(i),{recursive:!0}),(0,Be.writeFileSync)(i,JSON.stringify({credentials:t},null,2));let a=".config/";if((0,Be.existsSync)(s)){let u=(0,Be.readFileSync)(s,"utf8");u.includes(a)||(0,Be.writeFileSync)(s,u+`
|
|
1663
1670
|
`+a+`
|
|
1664
|
-
`)}else(0,
|
|
1665
|
-
`)}}function ca(e){let t=(0,Xe.join)(e.getAppRootDir(),".config","builderio","data.json"),r=[(0,Xe.join)(e.getAppRootDir(),"node_modules",".builder","data.json"),t,(0,Xe.join)(e.getRepoRootDir(),".git",".builder.json")];for(let n of r)if((0,
|
|
1671
|
+
`)}else(0,Be.writeFileSync)(s,a+`
|
|
1672
|
+
`)}}function ca(e){let t=(0,Xe.join)(e.getAppRootDir(),".config","builderio","data.json"),r=[(0,Xe.join)(e.getAppRootDir(),"node_modules",".builder","data.json"),t,(0,Xe.join)(e.getRepoRootDir(),".git",".builder.json")];for(let n of r)if((0,Be.existsSync)(n))try{let i=(0,Be.readFileSync)(n,"utf8");return JSON.parse(i).credentials}catch(i){e.Sentry?.captureException(i,{level:"warning"})}return{}}async function Xd(e){let t,r,n,i=new Promise((p,d)=>{t=p,r=d}),s=e.initialPort,o=0,a=(0,Jd.createServer)((p,d)=>e.requestListener(s,p,d,t,r)),u=()=>{c(),a&&("closeAllConnections"in a&&a.closeAllConnections(),a.close(p=>{p&&e.sys.Sentry?.captureException(p)}))};process.on("uncaughtExceptionMonitor",u),process.on("unhandledRejection",u),process.on("SIGINT",u),process.on("SIGTERM",u),process.on("exit",u);let c=()=>{process.removeListener("uncaughtExceptionMonitor",u),process.removeListener("unhandledRejection",u),process.removeListener("SIGINT",u),process.removeListener("SIGTERM",u),process.removeListener("exit",u)},l=()=>new Promise((p,d)=>{let D=m=>{a.removeListener("error",D),m.code==="EADDRINUSE"&&o<ua?(Q.warning(`Port ${s} is already in use, trying next port`),s++,o++,p(0)):d(m)};a.once("error",D),a.listen(s,()=>{a.removeListener("error",D);let m=a.address();p(m.port)})});try{let p=0;for(;p===0&&o<ua;)p=await l();if(p===0)throw new Error(`Failed to find an available port after ${ua} attempts`);let d=e.onListen(p);Q.warn(`Required authenticating with ${e.name}
|
|
1666
1673
|
OPEN: ${(0,Zt.dim)(d)}`),n=wo(),n.start(`Waiting for ${e.name} authentication`),await oa(d);let D=await i;return n&&n.stop(`Authenticated with ${e.name} successfully`),D}catch(p){throw n&&(n.stop(`Failed to authenticate with ${e.name}.`,-1),ps("auth")),e.sys.Sentry?.captureException(p),u(),p}finally{u()}}async function ef(e,t,r,n){try{if(!e)return qr(r,n,400,"Builder context closed");let i=k0(r);if(i.pathname===Ko){if(r.method==="POST"){let s=await I0(r);if(s)try{let o=await Ma(e,JSON.parse(s));return Zd(r,n,200,o)}catch(o){e.debug("Dev API Error",o.stack||o.message||o);let a={errors:[String(o.message||o)]};return Zd(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"?tf(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",n.writeHead(200,s),n.end();return}return qr(r,n,405,`${Ko} is an API endpoint used only during development by the Builder.io Devtools client-side script`)}if(i.pathname===Go)return P0(r,n,200,await ja(e));if(i.pathname===da){let s=i.searchParams.get(Ho);return s?R0(n,302,await Ka(e,s)):qr(r,n,400,`Missing ${Ho} querystring`)}if(i.pathname===tr)return T0(r,n,200,await Ua(e));if(i.pathname===fa){await bn(e,{_:[]},{});let s=await Gd(e),{figmaBuilderLinks:o,diagnostics:a}=await zd({mappingFiles:s,sys:e});return _n(r,n,200,"application/json",JSON.stringify({figmaBuilderLinks:o,foundErrors:a.length>0,diagnostics:a,version:2,local:!0},null,2))}return i.pathname===rr?(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),qr(r,n,200,"Closing Dev Tools Server")):qr(r,n,404,"Not found")}catch(i){return e?.Sentry?.captureException(i),qr(r,n,500,`Dev Server Error: ${i}`)}}function Zd(e,t,r,n){_n(e,t,r,"application/json",JSON.stringify(n))}function P0(e,t,r,n){_n(e,t,r,"application/javascript",n)}function T0(e,t,r,n){_n(e,t,r,"text/html",n)}function qr(e,t,r,n){_n(e,t,r,"text/plain",n)}function _n(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":Ve},o=e.headers.origin;o&&o!=="null"?tf(new URL(o))&&(s["Access-Control-Allow-Origin"]=o):s["Access-Control-Allow-Origin"]="*",t.writeHead(r,s),t.end(i)}function tf(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 R0(e,t,r){e.writeHead(t,{Location:r}),e.end()}async function I0(e){let t="";for await(let r of e)t+=r;return t}function k0(e){let t=e.url||"/";return new URL(t,`http://${e.headers.host}`)}async function rf(e){if(globalThis.__builderDevToolsServer)return e.debug("reusing existing devtools server"),globalThis.__builderDevToolsServer.setContext(e),globalThis.__builderDevToolsServer;let t=await B0(e),r=(0,Uo.createServer)((i,s)=>{ef(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 B0(e){return new Promise(t=>{let r=e.port;try{(0,Uo.request)({hostname:"localhost",port:r,path:rr,method:"GET"},i=>{i.on("end",()=>{e.debug(`${rr} - Response ended`),t(r)})}).on("error",i=>{e.debug(`${rr} - No response ${i}`),t(r)}).end()}catch(n){e.debug(`${rr} - Error ${n}`),t(r)}})}async function ss(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 ${la} [${r}]`);let n=await rf(t);return t.devToolsServerUrl=n.url,t.port=n.port,{getUrl:()=>t.devToolsServerUrl}}var la=Ve;0&&(module.exports={createDevToolsServer,version});
|
|
1667
1674
|
/*! Bundled license information:
|
|
1668
1675
|
|