create-playcanvas 0.0.2-beta.4 → 0.1.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/README.md +4 -8
- package/dist/index.mjs +20 -20
- package/package.json +1 -1
- package/templates/index.ts +13 -0
- package/templates/vanilla-ts/README.md +114 -0
- package/templates/vanilla-ts/index.html +13 -0
- package/templates/vanilla-ts/package.json +23 -0
- package/templates/vanilla-ts/public/environment-map.png +0 -0
- package/templates/vanilla-ts/scripts/ensure-node-version.cjs +12 -0
- package/templates/vanilla-ts/src/App.css +78 -0
- package/templates/vanilla-ts/src/App.ts +149 -0
- package/templates/vanilla-ts/src/Scene.ts +70 -0
- package/templates/vanilla-ts/src/assets/playcanvas.png +0 -0
- package/templates/vanilla-ts/src/assets/typescript.svg +1 -0
- package/templates/vanilla-ts/src/counter.ts +10 -0
- package/templates/vanilla-ts/src/index.css +73 -0
- package/templates/vanilla-ts/src/main.ts +36 -0
- package/templates/vanilla-ts/src/style.css +133 -0
- package/templates/vanilla-ts/src/utils.ts +16 -0
- package/templates/vanilla-ts/src/vite-env.d.ts +1 -0
- package/templates/vanilla-ts/tsconfig.json +25 -0
package/README.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
# Create a PlayCanvas project in seconds
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## 📦 Usage
|
|
6
|
-
|
|
7
|
-
You don't install anything globally – just run the CLI with your favourite package manager:
|
|
3
|
+
A simple one line command to sin up a read-to-code PlayCanvas project in seconds.
|
|
8
4
|
|
|
9
5
|
```bash
|
|
10
6
|
# npm (recommended)
|
|
@@ -50,10 +46,10 @@ Flags:
|
|
|
50
46
|
|
|
51
47
|
| Template | Description |
|
|
52
48
|
| ------------ | --------------------------- |
|
|
53
|
-
| `vanilla`
|
|
54
|
-
| `react-ts` | React + TypeScript
|
|
49
|
+
| `vanilla-ts` | Plain Typescript PlayCanvas |
|
|
50
|
+
| `react-ts` | React + TypeScript |
|
|
55
51
|
|
|
56
|
-
_To add your own template, drop a folder in `templates/<name>` and
|
|
52
|
+
_To add your own template, drop a folder in `templates/<name>` and update the `templates/index.js`
|
|
57
53
|
|
|
58
54
|
## 🛠 Development
|
|
59
55
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import"node:util";import f,{stdin as hD,stdout as BD}from"node:process";import G from"node:readline";import{WriteStream as mD}from"node:tty";import m from"node:fs";import b from"node:path";import{fileURLToPath as gD}from"node:url";import{promises as pD}from"fs";import fD from"path";function O(e){return e==null?[]:Array.isArray(e)?e:[e]}function bD(e,u,t,r){var i,s=e[u],D=~r.string.indexOf(u)?t==null||t===!0?"":String(t):typeof t=="boolean"?t:~r.boolean.indexOf(u)?t==="false"?!1:t==="true"||(e._.push((i=+t,i*0===0?i:t)),!!t):(i=+t,i*0===0?i:t);e[u]=s==null?D:Array.isArray(s)?s.concat(D):[s,D]}function dD(e,u){e=e||[],u=u||{};var t,r,i,s,D,n={_:[]},F=0,a=0,o=0,E=e.length;const c=u.alias!==void 0,h=u.unknown!==void 0,A=u.default!==void 0;if(u.alias=u.alias||{},u.string=O(u.string),u.boolean=O(u.boolean),c)for(t in u.alias)for(r=u.alias[t]=O(u.alias[t]),F=0;F<r.length;F++)(u.alias[r[F]]=r.concat(t)).splice(F,1);for(F=u.boolean.length;F-- >0;)for(r=u.alias[u.boolean[F]]||[],a=r.length;a-- >0;)u.boolean.push(r[a]);for(F=u.string.length;F-- >0;)for(r=u.alias[u.string[F]]||[],a=r.length;a-- >0;)u.string.push(r[a]);if(A){for(t in u.default)if(s=typeof u.default[t],r=u.alias[t]=u.alias[t]||[],u[s]!==void 0)for(u[s].push(t),F=0;F<r.length;F++)u[s].push(r[F])}const v=h?Object.keys(u.alias):[];for(F=0;F<E;F++){if(i=e[F],i==="--"){n._=n._.concat(e.slice(++F));break}for(a=0;a<i.length&&i.charCodeAt(a)===45;a++);if(a===0)n._.push(i);else if(i.substring(a,a+3)==="no-"){if(s=i.substring(a+3),h&&!~v.indexOf(s))return u.unknown(i);n[s]=!1}else{for(o=a+1;o<i.length&&i.charCodeAt(o)!==61;o++);for(s=i.substring(a,o),D=i.substring(++o)||F+1===E||(""+e[F+1]).charCodeAt(0)===45||e[++F],r=a===2?[s]:s,o=0;o<r.length;o++){if(s=r[o],h&&!~v.indexOf(s))return u.unknown("-".repeat(a)+s);bD(n,s,o+1<r.length||D,u)}}}if(A)for(t in u.default)n[t]===void 0&&(n[t]=u.default[t]);if(c)for(t in n)for(r=u.alias[t]||[];r.length>0;)n[r.shift()]=n[t];return n}function AD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R,J;function vD(){if(J)return R;J=1;const e="\x1B",u=`${e}[`,t="\x07",r={to(D,n){return n?`${u}${n+1};${D+1}H`:`${u}${D+1}G`},move(D,n){let F="";return D<0?F+=`${u}${-D}D`:D>0&&(F+=`${u}${D}C`),n<0?F+=`${u}${-n}A`:n>0&&(F+=`${u}${n}B`),F},up:(D=1)=>`${u}${D}A`,down:(D=1)=>`${u}${D}B`,forward:(D=1)=>`${u}${D}C`,backward:(D=1)=>`${u}${D}D`,nextLine:(D=1)=>`${u}E`.repeat(D),prevLine:(D=1)=>`${u}F`.repeat(D),left:`${u}G`,hide:`${u}?25l`,show:`${u}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(D=1)=>`${u}S`.repeat(D),down:(D=1)=>`${u}T`.repeat(D)},s={screen:`${u}2J`,up:(D=1)=>`${u}1J`.repeat(D),down:(D=1)=>`${u}J`.repeat(D),line:`${u}2K`,lineEnd:`${u}K`,lineStart:`${u}1K`,lines(D){let n="";for(let F=0;F<D;F++)n+=this.line+(F<D-1?r.up():"");return D&&(n+=r.left),n}};return R={cursor:r,scroll:i,erase:s,beep:t},R}var d=vD(),_={exports:{}},q;function xD(){if(q)return _.exports;q=1;let e=process||{},u=e.argv||[],t=e.env||{},r=!(t.NO_COLOR||u.includes("--no-color"))&&(!!t.FORCE_COLOR||u.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(n,F,a=n)=>o=>{let E=""+o,c=E.indexOf(F,n.length);return~c?n+s(E,F,a,c)+F:n+E+F},s=(n,F,a,o)=>{let E="",c=0;do E+=n.substring(c,o)+a,c=o+F.length,o=n.indexOf(F,c);while(~o);return E+n.substring(c)},D=(n=r)=>{let F=n?i:()=>String;return{isColorSupported:n,reset:F("\x1B[0m","\x1B[0m"),bold:F("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:F("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:F("\x1B[3m","\x1B[23m"),underline:F("\x1B[4m","\x1B[24m"),inverse:F("\x1B[7m","\x1B[27m"),hidden:F("\x1B[8m","\x1B[28m"),strikethrough:F("\x1B[9m","\x1B[29m"),black:F("\x1B[30m","\x1B[39m"),red:F("\x1B[31m","\x1B[39m"),green:F("\x1B[32m","\x1B[39m"),yellow:F("\x1B[33m","\x1B[39m"),blue:F("\x1B[34m","\x1B[39m"),magenta:F("\x1B[35m","\x1B[39m"),cyan:F("\x1B[36m","\x1B[39m"),white:F("\x1B[37m","\x1B[39m"),gray:F("\x1B[90m","\x1B[39m"),bgBlack:F("\x1B[40m","\x1B[49m"),bgRed:F("\x1B[41m","\x1B[49m"),bgGreen:F("\x1B[42m","\x1B[49m"),bgYellow:F("\x1B[43m","\x1B[49m"),bgBlue:F("\x1B[44m","\x1B[49m"),bgMagenta:F("\x1B[45m","\x1B[49m"),bgCyan:F("\x1B[46m","\x1B[49m"),bgWhite:F("\x1B[47m","\x1B[49m"),blackBright:F("\x1B[90m","\x1B[39m"),redBright:F("\x1B[91m","\x1B[39m"),greenBright:F("\x1B[92m","\x1B[39m"),yellowBright:F("\x1B[93m","\x1B[39m"),blueBright:F("\x1B[94m","\x1B[39m"),magentaBright:F("\x1B[95m","\x1B[39m"),cyanBright:F("\x1B[96m","\x1B[39m"),whiteBright:F("\x1B[97m","\x1B[39m"),bgBlackBright:F("\x1B[100m","\x1B[49m"),bgRedBright:F("\x1B[101m","\x1B[49m"),bgGreenBright:F("\x1B[102m","\x1B[49m"),bgYellowBright:F("\x1B[103m","\x1B[49m"),bgBlueBright:F("\x1B[104m","\x1B[49m"),bgMagentaBright:F("\x1B[105m","\x1B[49m"),bgCyanBright:F("\x1B[106m","\x1B[49m"),bgWhiteBright:F("\x1B[107m","\x1B[49m")}};return _.exports=D(),_.exports.createColors=D,_.exports}var $D=xD();const C=AD($D);function yD({onlyFirst:e=!1}={}){const u=["[\\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(u,e?void 0:"g")}const wD=yD();function U(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(wD,"")}function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Z={exports:{}};(function(e){var u={};e.exports=u,u.eastAsianWidth=function(r){var i=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,D=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,D=i<<10|s,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){for(var i=t(r),s=0,D=0;D<i.length;D++)s=s+this.characterLength(i[D]);return s},u.slice=function(r,i,s){textLen=u.length(r),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var D="",n=0,F=t(r),a=0;a<F.length;a++){var o=F[a],E=u.length(o);if(n>=i-(E==2?1:0))if(n+E<=s)D+=o;else break;n+=E}return D}})(Z);var SD=Z.exports;const _D=Y(SD);var TD=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\uDDB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\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-\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DCAA\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};const kD=Y(TD);function $(e,u={}){if(typeof e!="string"||e.length===0||(u={ambiguousIsNarrow:!0,...u},e=U(e),e.length===0))return 0;e=e.replace(kD()," ");const t=u.ambiguousIsNarrow?1:2;let r=0;for(const i of e){const s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(_D.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const P=10,H=(e=0)=>u=>`\x1B[${u+e}m`,Q=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,X=(e=0)=>(u,t,r)=>`\x1B[${38+e};2;${u};${t};${r}m`,l={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(l.modifier);const jD=Object.keys(l.color),MD=Object.keys(l.bgColor);[...jD,...MD];function OD(){const e=new Map;for(const[u,t]of Object.entries(l)){for(const[r,i]of Object.entries(t))l[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=l[r],e.set(i[0],i[1]);Object.defineProperty(l,u,{value:t,enumerable:!1})}return Object.defineProperty(l,"codes",{value:e,enumerable:!1}),l.color.close="\x1B[39m",l.bgColor.close="\x1B[49m",l.color.ansi=H(),l.color.ansi256=Q(),l.color.ansi16m=X(),l.bgColor.ansi=H(P),l.bgColor.ansi256=Q(P),l.bgColor.ansi16m=X(P),Object.defineProperties(l,{rgbToAnsi256:{value:(u,t,r)=>u===t&&t===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:u=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(s=>s+s).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:u=>l.rgbToAnsi256(...l.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,r,i;if(u>=232)t=((u-232)*10+8)/255,r=t,i=t;else{u-=16;const n=u%36;t=Math.floor(u/36)/5,r=Math.floor(n/6)/5,i=n%6/5}const s=Math.max(t,r,i)*2;if(s===0)return 30;let D=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return s===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,t,r)=>l.ansi256ToAnsi(l.rgbToAnsi256(u,t,r)),enumerable:!1},hexToAnsi:{value:u=>l.ansi256ToAnsi(l.hexToAnsi256(u)),enumerable:!1}}),l}const RD=OD(),T=new Set(["\x1B","\x9B"]),PD=39,I="\x07",DD="[",ID="]",uD="m",L=`${ID}8;;`,eD=e=>`${T.values().next().value}${DD}${e}${uD}`,tD=e=>`${T.values().next().value}${L}${e}${I}`,LD=e=>e.split(" ").map(u=>$(u)),N=(e,u,t)=>{const r=[...u];let i=!1,s=!1,D=$(U(e[e.length-1]));for(const[n,F]of r.entries()){const a=$(F);if(D+a<=t?e[e.length-1]+=F:(e.push(F),D=0),T.has(F)&&(i=!0,s=r.slice(n+1).join("").startsWith(L)),i){s?F===I&&(i=!1,s=!1):F===uD&&(i=!1);continue}D+=a,D===t&&n<r.length-1&&(e.push(""),D=0)}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},ND=e=>{const u=e.split(" ");let t=u.length;for(;t>0&&!($(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},WD=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",i,s;const D=LD(e);let n=[""];for(const[a,o]of e.split(" ").entries()){t.trim!==!1&&(n[n.length-1]=n[n.length-1].trimStart());let E=$(n[n.length-1]);if(a!==0&&(E>=u&&(t.wordWrap===!1||t.trim===!1)&&(n.push(""),E=0),(E>0||t.trim===!1)&&(n[n.length-1]+=" ",E++)),t.hard&&D[a]>u){const c=u-E,h=1+Math.floor((D[a]-c-1)/u);Math.floor((D[a]-1)/u)<h&&n.push(""),N(n,o,u);continue}if(E+D[a]>u&&E>0&&D[a]>0){if(t.wordWrap===!1&&E<u){N(n,o,u);continue}n.push("")}if(E+D[a]>u&&t.wordWrap===!1){N(n,o,u);continue}n[n.length-1]+=o}t.trim!==!1&&(n=n.map(a=>ND(a)));const F=[...n.join(`
|
|
2
|
-
`)];for(const[a,o]of F.entries()){if(r+=o,T.has(o)){const{groups:c}=new RegExp(`(?:\\${
|
|
3
|
-
`?(s&&(r+=
|
|
4
|
-
`&&(i&&
|
|
1
|
+
import"node:util";import f,{stdin as mD,stdout as gD}from"node:process";import G from"node:readline";import{WriteStream as pD}from"node:tty";import m from"node:fs";import b from"node:path";import{fileURLToPath as fD}from"node:url";import{promises as bD}from"fs";import dD from"path";function O(e){return e==null?[]:Array.isArray(e)?e:[e]}function AD(e,u,t,r){var i,s=e[u],D=~r.string.indexOf(u)?t==null||t===!0?"":String(t):typeof t=="boolean"?t:~r.boolean.indexOf(u)?t==="false"?!1:t==="true"||(e._.push((i=+t,i*0===0?i:t)),!!t):(i=+t,i*0===0?i:t);e[u]=s==null?D:Array.isArray(s)?s.concat(D):[s,D]}function vD(e,u){e=e||[],u=u||{};var t,r,i,s,D,n={_:[]},F=0,a=0,o=0,l=e.length;const c=u.alias!==void 0,h=u.unknown!==void 0,A=u.default!==void 0;if(u.alias=u.alias||{},u.string=O(u.string),u.boolean=O(u.boolean),c)for(t in u.alias)for(r=u.alias[t]=O(u.alias[t]),F=0;F<r.length;F++)(u.alias[r[F]]=r.concat(t)).splice(F,1);for(F=u.boolean.length;F-- >0;)for(r=u.alias[u.boolean[F]]||[],a=r.length;a-- >0;)u.boolean.push(r[a]);for(F=u.string.length;F-- >0;)for(r=u.alias[u.string[F]]||[],a=r.length;a-- >0;)u.string.push(r[a]);if(A){for(t in u.default)if(s=typeof u.default[t],r=u.alias[t]=u.alias[t]||[],u[s]!==void 0)for(u[s].push(t),F=0;F<r.length;F++)u[s].push(r[F])}const v=h?Object.keys(u.alias):[];for(F=0;F<l;F++){if(i=e[F],i==="--"){n._=n._.concat(e.slice(++F));break}for(a=0;a<i.length&&i.charCodeAt(a)===45;a++);if(a===0)n._.push(i);else if(i.substring(a,a+3)==="no-"){if(s=i.substring(a+3),h&&!~v.indexOf(s))return u.unknown(i);n[s]=!1}else{for(o=a+1;o<i.length&&i.charCodeAt(o)!==61;o++);for(s=i.substring(a,o),D=i.substring(++o)||F+1===l||(""+e[F+1]).charCodeAt(0)===45||e[++F],r=a===2?[s]:s,o=0;o<r.length;o++){if(s=r[o],h&&!~v.indexOf(s))return u.unknown("-".repeat(a)+s);AD(n,s,o+1<r.length||D,u)}}}if(A)for(t in u.default)n[t]===void 0&&(n[t]=u.default[t]);if(c)for(t in n)for(r=u.alias[t]||[];r.length>0;)n[r.shift()]=n[t];return n}function xD(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R,J;function $D(){if(J)return R;J=1;const e="\x1B",u=`${e}[`,t="\x07",r={to(D,n){return n?`${u}${n+1};${D+1}H`:`${u}${D+1}G`},move(D,n){let F="";return D<0?F+=`${u}${-D}D`:D>0&&(F+=`${u}${D}C`),n<0?F+=`${u}${-n}A`:n>0&&(F+=`${u}${n}B`),F},up:(D=1)=>`${u}${D}A`,down:(D=1)=>`${u}${D}B`,forward:(D=1)=>`${u}${D}C`,backward:(D=1)=>`${u}${D}D`,nextLine:(D=1)=>`${u}E`.repeat(D),prevLine:(D=1)=>`${u}F`.repeat(D),left:`${u}G`,hide:`${u}?25l`,show:`${u}?25h`,save:`${e}7`,restore:`${e}8`},i={up:(D=1)=>`${u}S`.repeat(D),down:(D=1)=>`${u}T`.repeat(D)},s={screen:`${u}2J`,up:(D=1)=>`${u}1J`.repeat(D),down:(D=1)=>`${u}J`.repeat(D),line:`${u}2K`,lineEnd:`${u}K`,lineStart:`${u}1K`,lines(D){let n="";for(let F=0;F<D;F++)n+=this.line+(F<D-1?r.up():"");return D&&(n+=r.left),n}};return R={cursor:r,scroll:i,erase:s,beep:t},R}var d=$D(),_={exports:{}},q;function yD(){if(q)return _.exports;q=1;let e=process||{},u=e.argv||[],t=e.env||{},r=!(t.NO_COLOR||u.includes("--no-color"))&&(!!t.FORCE_COLOR||u.includes("--color")||e.platform==="win32"||(e.stdout||{}).isTTY&&t.TERM!=="dumb"||!!t.CI),i=(n,F,a=n)=>o=>{let l=""+o,c=l.indexOf(F,n.length);return~c?n+s(l,F,a,c)+F:n+l+F},s=(n,F,a,o)=>{let l="",c=0;do l+=n.substring(c,o)+a,c=o+F.length,o=n.indexOf(F,c);while(~o);return l+n.substring(c)},D=(n=r)=>{let F=n?i:()=>String;return{isColorSupported:n,reset:F("\x1B[0m","\x1B[0m"),bold:F("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:F("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:F("\x1B[3m","\x1B[23m"),underline:F("\x1B[4m","\x1B[24m"),inverse:F("\x1B[7m","\x1B[27m"),hidden:F("\x1B[8m","\x1B[28m"),strikethrough:F("\x1B[9m","\x1B[29m"),black:F("\x1B[30m","\x1B[39m"),red:F("\x1B[31m","\x1B[39m"),green:F("\x1B[32m","\x1B[39m"),yellow:F("\x1B[33m","\x1B[39m"),blue:F("\x1B[34m","\x1B[39m"),magenta:F("\x1B[35m","\x1B[39m"),cyan:F("\x1B[36m","\x1B[39m"),white:F("\x1B[37m","\x1B[39m"),gray:F("\x1B[90m","\x1B[39m"),bgBlack:F("\x1B[40m","\x1B[49m"),bgRed:F("\x1B[41m","\x1B[49m"),bgGreen:F("\x1B[42m","\x1B[49m"),bgYellow:F("\x1B[43m","\x1B[49m"),bgBlue:F("\x1B[44m","\x1B[49m"),bgMagenta:F("\x1B[45m","\x1B[49m"),bgCyan:F("\x1B[46m","\x1B[49m"),bgWhite:F("\x1B[47m","\x1B[49m"),blackBright:F("\x1B[90m","\x1B[39m"),redBright:F("\x1B[91m","\x1B[39m"),greenBright:F("\x1B[92m","\x1B[39m"),yellowBright:F("\x1B[93m","\x1B[39m"),blueBright:F("\x1B[94m","\x1B[39m"),magentaBright:F("\x1B[95m","\x1B[39m"),cyanBright:F("\x1B[96m","\x1B[39m"),whiteBright:F("\x1B[97m","\x1B[39m"),bgBlackBright:F("\x1B[100m","\x1B[49m"),bgRedBright:F("\x1B[101m","\x1B[49m"),bgGreenBright:F("\x1B[102m","\x1B[49m"),bgYellowBright:F("\x1B[103m","\x1B[49m"),bgBlueBright:F("\x1B[104m","\x1B[49m"),bgMagentaBright:F("\x1B[105m","\x1B[49m"),bgCyanBright:F("\x1B[106m","\x1B[49m"),bgWhiteBright:F("\x1B[107m","\x1B[49m")}};return _.exports=D(),_.exports.createColors=D,_.exports}var U=yD();const C=xD(U);function wD({onlyFirst:e=!1}={}){const u=["[\\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(u,e?void 0:"g")}const SD=wD();function Y(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(SD,"")}function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H={exports:{}};(function(e){var u={};e.exports=u,u.eastAsianWidth=function(r){var i=r.charCodeAt(0),s=r.length==2?r.charCodeAt(1):0,D=i;return 55296<=i&&i<=56319&&56320<=s&&s<=57343&&(i&=1023,s&=1023,D=i<<10|s,D+=65536),D==12288||65281<=D&&D<=65376||65504<=D&&D<=65510?"F":D==8361||65377<=D&&D<=65470||65474<=D&&D<=65479||65482<=D&&D<=65487||65490<=D&&D<=65495||65498<=D&&D<=65500||65512<=D&&D<=65518?"H":4352<=D&&D<=4447||4515<=D&&D<=4519||4602<=D&&D<=4607||9001<=D&&D<=9002||11904<=D&&D<=11929||11931<=D&&D<=12019||12032<=D&&D<=12245||12272<=D&&D<=12283||12289<=D&&D<=12350||12353<=D&&D<=12438||12441<=D&&D<=12543||12549<=D&&D<=12589||12593<=D&&D<=12686||12688<=D&&D<=12730||12736<=D&&D<=12771||12784<=D&&D<=12830||12832<=D&&D<=12871||12880<=D&&D<=13054||13056<=D&&D<=19903||19968<=D&&D<=42124||42128<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||55216<=D&&D<=55238||55243<=D&&D<=55291||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65106||65108<=D&&D<=65126||65128<=D&&D<=65131||110592<=D&&D<=110593||127488<=D&&D<=127490||127504<=D&&D<=127546||127552<=D&&D<=127560||127568<=D&&D<=127569||131072<=D&&D<=194367||177984<=D&&D<=196605||196608<=D&&D<=262141?"W":32<=D&&D<=126||162<=D&&D<=163||165<=D&&D<=166||D==172||D==175||10214<=D&&D<=10221||10629<=D&&D<=10630?"Na":D==161||D==164||167<=D&&D<=168||D==170||173<=D&&D<=174||176<=D&&D<=180||182<=D&&D<=186||188<=D&&D<=191||D==198||D==208||215<=D&&D<=216||222<=D&&D<=225||D==230||232<=D&&D<=234||236<=D&&D<=237||D==240||242<=D&&D<=243||247<=D&&D<=250||D==252||D==254||D==257||D==273||D==275||D==283||294<=D&&D<=295||D==299||305<=D&&D<=307||D==312||319<=D&&D<=322||D==324||328<=D&&D<=331||D==333||338<=D&&D<=339||358<=D&&D<=359||D==363||D==462||D==464||D==466||D==468||D==470||D==472||D==474||D==476||D==593||D==609||D==708||D==711||713<=D&&D<=715||D==717||D==720||728<=D&&D<=731||D==733||D==735||768<=D&&D<=879||913<=D&&D<=929||931<=D&&D<=937||945<=D&&D<=961||963<=D&&D<=969||D==1025||1040<=D&&D<=1103||D==1105||D==8208||8211<=D&&D<=8214||8216<=D&&D<=8217||8220<=D&&D<=8221||8224<=D&&D<=8226||8228<=D&&D<=8231||D==8240||8242<=D&&D<=8243||D==8245||D==8251||D==8254||D==8308||D==8319||8321<=D&&D<=8324||D==8364||D==8451||D==8453||D==8457||D==8467||D==8470||8481<=D&&D<=8482||D==8486||D==8491||8531<=D&&D<=8532||8539<=D&&D<=8542||8544<=D&&D<=8555||8560<=D&&D<=8569||D==8585||8592<=D&&D<=8601||8632<=D&&D<=8633||D==8658||D==8660||D==8679||D==8704||8706<=D&&D<=8707||8711<=D&&D<=8712||D==8715||D==8719||D==8721||D==8725||D==8730||8733<=D&&D<=8736||D==8739||D==8741||8743<=D&&D<=8748||D==8750||8756<=D&&D<=8759||8764<=D&&D<=8765||D==8776||D==8780||D==8786||8800<=D&&D<=8801||8804<=D&&D<=8807||8810<=D&&D<=8811||8814<=D&&D<=8815||8834<=D&&D<=8835||8838<=D&&D<=8839||D==8853||D==8857||D==8869||D==8895||D==8978||9312<=D&&D<=9449||9451<=D&&D<=9547||9552<=D&&D<=9587||9600<=D&&D<=9615||9618<=D&&D<=9621||9632<=D&&D<=9633||9635<=D&&D<=9641||9650<=D&&D<=9651||9654<=D&&D<=9655||9660<=D&&D<=9661||9664<=D&&D<=9665||9670<=D&&D<=9672||D==9675||9678<=D&&D<=9681||9698<=D&&D<=9701||D==9711||9733<=D&&D<=9734||D==9737||9742<=D&&D<=9743||9748<=D&&D<=9749||D==9756||D==9758||D==9792||D==9794||9824<=D&&D<=9825||9827<=D&&D<=9829||9831<=D&&D<=9834||9836<=D&&D<=9837||D==9839||9886<=D&&D<=9887||9918<=D&&D<=9919||9924<=D&&D<=9933||9935<=D&&D<=9953||D==9955||9960<=D&&D<=9983||D==10045||D==10071||10102<=D&&D<=10111||11093<=D&&D<=11097||12872<=D&&D<=12879||57344<=D&&D<=63743||65024<=D&&D<=65039||D==65533||127232<=D&&D<=127242||127248<=D&&D<=127277||127280<=D&&D<=127337||127344<=D&&D<=127386||917760<=D&&D<=917999||983040<=D&&D<=1048573||1048576<=D&&D<=1114109?"A":"N"},u.characterLength=function(r){var i=this.eastAsianWidth(r);return i=="F"||i=="W"||i=="A"?2:1};function t(r){return r.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}u.length=function(r){for(var i=t(r),s=0,D=0;D<i.length;D++)s=s+this.characterLength(i[D]);return s},u.slice=function(r,i,s){textLen=u.length(r),i=i||0,s=s||1,i<0&&(i=textLen+i),s<0&&(s=textLen+s);for(var D="",n=0,F=t(r),a=0;a<F.length;a++){var o=F[a],l=u.length(o);if(n>=i-(l==2?1:0))if(n+l<=s)D+=o;else break;n+=l}return D}})(H);var _D=H.exports;const TD=Z(_D);var kD=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\uDFF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\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[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DDB6\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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=Z(kD);function $(e,u={}){if(typeof e!="string"||e.length===0||(u={ambiguousIsNarrow:!0,...u},e=Y(e),e.length===0))return 0;e=e.replace(jD()," ");const t=u.ambiguousIsNarrow?1:2;let r=0;for(const i of e){const s=i.codePointAt(0);if(!(s<=31||s>=127&&s<=159||s>=768&&s<=879))switch(TD.eastAsianWidth(i)){case"F":case"W":r+=2;break;case"A":r+=t;break;default:r+=1}}return r}const P=10,Q=(e=0)=>u=>`\x1B[${u+e}m`,X=(e=0)=>u=>`\x1B[${38+e};5;${u}m`,DD=(e=0)=>(u,t,r)=>`\x1B[${38+e};2;${u};${t};${r}m`,E={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(E.modifier);const MD=Object.keys(E.color),OD=Object.keys(E.bgColor);[...MD,...OD];function RD(){const e=new Map;for(const[u,t]of Object.entries(E)){for(const[r,i]of Object.entries(t))E[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},t[r]=E[r],e.set(i[0],i[1]);Object.defineProperty(E,u,{value:t,enumerable:!1})}return Object.defineProperty(E,"codes",{value:e,enumerable:!1}),E.color.close="\x1B[39m",E.bgColor.close="\x1B[49m",E.color.ansi=Q(),E.color.ansi256=X(),E.color.ansi16m=DD(),E.bgColor.ansi=Q(P),E.bgColor.ansi256=X(P),E.bgColor.ansi16m=DD(P),Object.defineProperties(E,{rgbToAnsi256:{value:(u,t,r)=>u===t&&t===r?u<8?16:u>248?231:Math.round((u-8)/247*24)+232:16+36*Math.round(u/255*5)+6*Math.round(t/255*5)+Math.round(r/255*5),enumerable:!1},hexToRgb:{value:u=>{const t=/[a-f\d]{6}|[a-f\d]{3}/i.exec(u.toString(16));if(!t)return[0,0,0];let[r]=t;r.length===3&&(r=[...r].map(s=>s+s).join(""));const i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:u=>E.rgbToAnsi256(...E.hexToRgb(u)),enumerable:!1},ansi256ToAnsi:{value:u=>{if(u<8)return 30+u;if(u<16)return 90+(u-8);let t,r,i;if(u>=232)t=((u-232)*10+8)/255,r=t,i=t;else{u-=16;const n=u%36;t=Math.floor(u/36)/5,r=Math.floor(n/6)/5,i=n%6/5}const s=Math.max(t,r,i)*2;if(s===0)return 30;let D=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(t));return s===2&&(D+=60),D},enumerable:!1},rgbToAnsi:{value:(u,t,r)=>E.ansi256ToAnsi(E.rgbToAnsi256(u,t,r)),enumerable:!1},hexToAnsi:{value:u=>E.ansi256ToAnsi(E.hexToAnsi256(u)),enumerable:!1}}),E}const PD=RD(),T=new Set(["\x1B","\x9B"]),ID=39,I="\x07",uD="[",LD="]",eD="m",L=`${LD}8;;`,tD=e=>`${T.values().next().value}${uD}${e}${eD}`,rD=e=>`${T.values().next().value}${L}${e}${I}`,ND=e=>e.split(" ").map(u=>$(u)),N=(e,u,t)=>{const r=[...u];let i=!1,s=!1,D=$(Y(e[e.length-1]));for(const[n,F]of r.entries()){const a=$(F);if(D+a<=t?e[e.length-1]+=F:(e.push(F),D=0),T.has(F)&&(i=!0,s=r.slice(n+1).join("").startsWith(L)),i){s?F===I&&(i=!1,s=!1):F===eD&&(i=!1);continue}D+=a,D===t&&n<r.length-1&&(e.push(""),D=0)}!D&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},WD=e=>{const u=e.split(" ");let t=u.length;for(;t>0&&!($(u[t-1])>0);)t--;return t===u.length?e:u.slice(0,t).join(" ")+u.slice(t).join("")},VD=(e,u,t={})=>{if(t.trim!==!1&&e.trim()==="")return"";let r="",i,s;const D=ND(e);let n=[""];for(const[a,o]of e.split(" ").entries()){t.trim!==!1&&(n[n.length-1]=n[n.length-1].trimStart());let l=$(n[n.length-1]);if(a!==0&&(l>=u&&(t.wordWrap===!1||t.trim===!1)&&(n.push(""),l=0),(l>0||t.trim===!1)&&(n[n.length-1]+=" ",l++)),t.hard&&D[a]>u){const c=u-l,h=1+Math.floor((D[a]-c-1)/u);Math.floor((D[a]-1)/u)<h&&n.push(""),N(n,o,u);continue}if(l+D[a]>u&&l>0&&D[a]>0){if(t.wordWrap===!1&&l<u){N(n,o,u);continue}n.push("")}if(l+D[a]>u&&t.wordWrap===!1){N(n,o,u);continue}n[n.length-1]+=o}t.trim!==!1&&(n=n.map(a=>WD(a)));const F=[...n.join(`
|
|
2
|
+
`)];for(const[a,o]of F.entries()){if(r+=o,T.has(o)){const{groups:c}=new RegExp(`(?:\\${uD}(?<code>\\d+)m|\\${L}(?<uri>.*)${I})`).exec(F.slice(a).join(""))||{groups:{}};if(c.code!==void 0){const h=Number.parseFloat(c.code);i=h===ID?void 0:h}else c.uri!==void 0&&(s=c.uri.length===0?void 0:c.uri)}const l=PD.codes.get(Number(i));F[a+1]===`
|
|
3
|
+
`?(s&&(r+=rD("")),i&&l&&(r+=tD(l))):o===`
|
|
4
|
+
`&&(i&&l&&(r+=tD(i)),s&&(r+=rD(s)))}return r};function iD(e,u,t){return String(e).normalize().replace(/\r\n/g,`
|
|
5
5
|
`).split(`
|
|
6
|
-
`).map(r=>
|
|
7
|
-
`)}const
|
|
6
|
+
`).map(r=>VD(r,u,t)).join(`
|
|
7
|
+
`)}const zD=["up","down","left","right","space","enter","cancel"],k={actions:new Set(zD),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]])};function FD(e,u){if(typeof e=="string")return k.aliases.get(e)===u;for(const t of e)if(t!==void 0&&FD(t,u))return!0;return!1}function KD(e,u){if(e===u)return;const t=e.split(`
|
|
8
8
|
`),r=u.split(`
|
|
9
|
-
`),i=[];for(let s=0;s<Math.max(t.length,r.length);s++)t[s]!==r[s]&&i.push(s);return i}globalThis.process.platform.startsWith("win");const W=Symbol("clack:cancel");function j(e){return e===W}function M(e,u){const t=e;t.isTTY&&t.setRawMode(u)}var
|
|
10
|
-
`),M(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const u=
|
|
11
|
-
`).length-1;this.output.write(d.cursor.move(-999,u*-1))}render(){const u=
|
|
9
|
+
`),i=[];for(let s=0;s<Math.max(t.length,r.length);s++)t[s]!==r[s]&&i.push(s);return i}globalThis.process.platform.startsWith("win");const W=Symbol("clack:cancel");function j(e){return e===W}function M(e,u){const t=e;t.isTTY&&t.setRawMode(u)}var GD=Object.defineProperty,JD=(e,u,t)=>u in e?GD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,g=(e,u,t)=>(JD(e,typeof u!="symbol"?u+"":u,t),t);class sD{constructor(u,t=!0){g(this,"input"),g(this,"output"),g(this,"_abortSignal"),g(this,"rl"),g(this,"opts"),g(this,"_render"),g(this,"_track",!1),g(this,"_prevFrame",""),g(this,"_subscribers",new Map),g(this,"_cursor",0),g(this,"state","initial"),g(this,"error",""),g(this,"value");const{input:r=mD,output:i=gD,render:s,signal:D,...n}=u;this.opts=n,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=s.bind(this),this._track=t,this._abortSignal=D,this.input=r,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(u,t){const r=this._subscribers.get(u)??[];r.push(t),this._subscribers.set(u,r)}on(u,t){this.setSubscriber(u,{cb:t})}once(u,t){this.setSubscriber(u,{cb:t,once:!0})}emit(u,...t){const r=this._subscribers.get(u)??[],i=[];for(const s of r)s.cb(...t),s.once&&i.push(()=>r.splice(r.indexOf(s),1));for(const s of i)s()}prompt(){return new Promise((u,t)=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),u(W);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}const r=new pD(0);r._write=(i,s,D)=>{this._track&&(this.value=this.rl?.line.replace(/\t/g,""),this._cursor=this.rl?.cursor??0,this.emit("value",this.value)),D()},this.input.pipe(r),this.rl=G.createInterface({input:this.input,output:r,tabSize:2,prompt:"",escapeCodeTimeout:50}),G.emitKeypressEvents(this.input,this.rl),this.rl.prompt(),this.opts.initialValue!==void 0&&this._track&&this.rl.write(this.opts.initialValue),this.input.on("keypress",this.onKeypress),M(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(d.cursor.show),this.output.off("resize",this.render),M(this.input,!1),u(this.value)}),this.once("cancel",()=>{this.output.write(d.cursor.show),this.output.off("resize",this.render),M(this.input,!1),u(W)})})}onKeypress(u,t){if(this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&k.aliases.has(t.name)&&this.emit("cursor",k.aliases.get(t.name)),k.actions.has(t.name)&&this.emit("cursor",t.name)),u&&(u.toLowerCase()==="y"||u.toLowerCase()==="n")&&this.emit("confirm",u.toLowerCase()==="y"),u===" "&&this.opts.placeholder&&(this.value||(this.rl?.write(this.opts.placeholder),this.emit("value",this.opts.placeholder))),u&&this.emit("key",u.toLowerCase()),t?.name==="return"){if(this.opts.validate){const r=this.opts.validate(this.value);r&&(this.error=r instanceof Error?r.message:r,this.state="error",this.rl?.write(this.value))}this.state!=="error"&&(this.state="submit")}FD([u,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
|
|
10
|
+
`),M(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){const u=iD(this._prevFrame,process.stdout.columns,{hard:!0}).split(`
|
|
11
|
+
`).length-1;this.output.write(d.cursor.move(-999,u*-1))}render(){const u=iD(this._render(this)??"",process.stdout.columns,{hard:!0});if(u!==this._prevFrame){if(this.state==="initial")this.output.write(d.cursor.hide);else{const t=KD(this._prevFrame,u);if(this.restoreCursor(),t&&t?.length===1){const r=t[0];this.output.write(d.cursor.move(0,r)),this.output.write(d.erase.lines(1));const i=u.split(`
|
|
12
12
|
`);this.output.write(i[r]),this._prevFrame=u,this.output.write(d.cursor.move(0,i.length-r-1));return}if(t&&t?.length>1){const r=t[0];this.output.write(d.cursor.move(0,r)),this.output.write(d.erase.down());const i=u.split(`
|
|
13
13
|
`).slice(r);this.output.write(i.join(`
|
|
14
|
-
`)),this._prevFrame=u;return}this.output.write(d.erase.down())}this.output.write(u),this.state==="initial"&&(this.state="active"),this._prevFrame=u}}}var
|
|
15
|
-
${
|
|
14
|
+
`)),this._prevFrame=u;return}this.output.write(d.erase.down())}this.output.write(u),this.state==="initial"&&(this.state="active"),this._prevFrame=u}}}var qD=Object.defineProperty,UD=(e,u,t)=>u in e?qD(e,u,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[u]=t,nD=(e,u,t)=>(UD(e,typeof u!="symbol"?u+"":u,t),t);class YD extends sD{constructor(u){super(u,!1),nD(this,"options"),nD(this,"cursor",0),this.options=u.options,this.cursor=this.options.findIndex(({value:t})=>t===u.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on("cursor",t=>{switch(t){case"left":case"up":this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case"down":case"right":this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}}class ZD extends sD{get valueWithCursor(){if(this.state==="submit")return this.value;if(this.cursor>=this.value.length)return`${this.value}\u2588`;const u=this.value.slice(0,this.cursor),[t,...r]=this.value.slice(this.cursor);return`${u}${C.inverse(t)}${r.join("")}`}get cursor(){return this._cursor}constructor(u){super(u),this.on("finalize",()=>{this.value||(this.value=u.defaultValue)})}}function HD(){return f.platform!=="win32"?f.env.TERM!=="linux":!!f.env.CI||!!f.env.WT_SESSION||!!f.env.TERMINUS_SUBLIME||f.env.ConEmuTask==="{cmd::Cmder}"||f.env.TERM_PROGRAM==="Terminus-Sublime"||f.env.TERM_PROGRAM==="vscode"||f.env.TERM==="xterm-256color"||f.env.TERM==="alacritty"||f.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}const QD=HD(),p=(e,u)=>QD?e:u,XD=p("\u25C6","*"),Du=p("\u25A0","x"),uu=p("\u25B2","x"),aD=p("\u25C7","o"),B=p("\u2502","|"),y=p("\u2514","\u2014"),eu=p("\u25CF",">"),tu=p("\u25CB"," "),ru=p("\u25CF","\u2022"),iu=p("\u25C6","*"),Fu=p("\u25B2","!"),su=p("\u25A0","x"),CD=e=>{switch(e){case"initial":case"active":return C.cyan(XD);case"cancel":return C.red(Du);case"error":return C.yellow(uu);case"submit":return C.green(aD)}},nu=e=>{const{cursor:u,options:t,style:r}=e,i=e.maxItems??Number.POSITIVE_INFINITY,s=Math.max(process.stdout.rows-4,0),D=Math.min(s,Math.max(i,5));let n=0;u>=n+D-3?n=Math.max(Math.min(u-D+3,t.length-D),0):u<n+2&&(n=Math.max(u-2,0));const F=D<t.length&&n>0,a=D<t.length&&n+D<t.length;return t.slice(n,n+D).map((o,l,c)=>{const h=l===0&&F,A=l===c.length-1&&a;return h||A?C.dim("..."):r(o,l+n===u)})},oD=e=>new ZD({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,render(){const u=`${C.gray(B)}
|
|
15
|
+
${CD(this.state)} ${e.message}
|
|
16
16
|
`,t=e.placeholder?C.inverse(e.placeholder[0])+C.dim(e.placeholder.slice(1)):C.inverse(C.hidden("_")),r=this.value?this.valueWithCursor:t;switch(this.state){case"error":return`${u.trim()}
|
|
17
17
|
${C.yellow(B)} ${r}
|
|
18
18
|
${C.yellow(y)} ${C.yellow(this.error)}
|
|
19
19
|
`;case"submit":return`${u}${C.gray(B)} ${C.dim(this.value||e.placeholder)}`;case"cancel":return`${u}${C.gray(B)} ${C.strikethrough(C.dim(this.value??""))}${this.value?.trim()?`
|
|
20
20
|
${C.gray(B)}`:""}`;default:return`${u}${C.cyan(B)} ${r}
|
|
21
21
|
${C.cyan(y)}
|
|
22
|
-
`}}}).prompt(),V=e=>{const u=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${C.dim(i)}`;case"active":return`${C.green(
|
|
23
|
-
${
|
|
22
|
+
`}}}).prompt(),V=e=>{const u=(t,r)=>{const i=t.label??String(t.value);switch(r){case"selected":return`${C.dim(i)}`;case"active":return`${C.green(eu)} ${i} ${t.hint?C.dim(`(${t.hint})`):""}`;case"cancelled":return`${C.strikethrough(C.dim(i))}`;default:return`${C.dim(tu)} ${C.dim(i)}`}};return new YD({options:e.options,initialValue:e.initialValue,render(){const t=`${C.gray(B)}
|
|
23
|
+
${CD(this.state)} ${e.message}
|
|
24
24
|
`;switch(this.state){case"submit":return`${t}${C.gray(B)} ${u(this.options[this.cursor],"selected")}`;case"cancel":return`${t}${C.gray(B)} ${u(this.options[this.cursor],"cancelled")}
|
|
25
|
-
${C.gray(B)}`;default:return`${t}${C.cyan(B)} ${
|
|
25
|
+
${C.gray(B)}`;default:return`${t}${C.cyan(B)} ${nu({cursor:this.cursor,options:this.options,maxItems:e.maxItems,style:(r,i)=>u(r,i?"active":"inactive")}).join(`
|
|
26
26
|
${C.cyan(B)} `)}
|
|
27
27
|
${C.cyan(y)}
|
|
28
|
-
`}}}).prompt()},
|
|
28
|
+
`}}}).prompt()},au=(e="")=>{process.stdout.write(`${C.gray(y)} ${C.red(e)}
|
|
29
29
|
|
|
30
|
-
`)},
|
|
30
|
+
`)},Cu=(e="")=>{process.stdout.write(`${C.gray(B)}
|
|
31
31
|
${C.gray(y)} ${e}
|
|
32
32
|
|
|
33
33
|
`)},x={message:(e="",{symbol:u=C.gray(B)}={})=>{const t=[`${C.gray(B)}`];if(e){const[r,...i]=e.split(`
|
|
34
34
|
`);t.push(`${u} ${r}`,...i.map(s=>`${C.gray(B)} ${s}`))}process.stdout.write(`${t.join(`
|
|
35
35
|
`)}
|
|
36
|
-
`)},info:e=>{x.message(e,{symbol:C.blue(
|
|
37
|
-
`),i=
|
|
36
|
+
`)},info:e=>{x.message(e,{symbol:C.blue(ru)})},success:e=>{x.message(e,{symbol:C.green(iu)})},step:e=>{x.message(e,{symbol:C.green(aD)})},warn:e=>{x.message(e,{symbol:C.yellow(Fu)})},warning:e=>{x.warn(e)},error:e=>{x.message(e,{symbol:C.red(su)})}};`${C.gray(B)}`;function z(e){return e.trim().replace(/\/+$/g,"")}function ou(e){const u=m.readdirSync(e);return u.length===0||u.length===1&&u[0]===".git"}function lu(e){if(m.existsSync(e))for(const u of m.readdirSync(e))u!==".git"&&m.rmSync(b.resolve(e,u),{recursive:!0,force:!0})}function lD(e,u){m.statSync(e).isDirectory()?Eu(e,u):m.copyFileSync(e,u)}function Eu(e,u){m.mkdirSync(u,{recursive:!0});for(const t of m.readdirSync(e)){const r=b.resolve(e,t),i=b.resolve(u,t);lD(r,i)}}function cu(e,u){const t=u?u.name:"npm",r=t==="yarn"&&u?.version.startsWith("1.");return e.replace(/^npm create /,()=>t==="bun"?"bun x create-":`${t} create `).replace("@latest",()=>r?"":"@latest").replace(/^npm exec/,()=>t==="pnpm"?"pnpm dlx":t==="yarn"&&!r?"yarn dlx":t==="bun"?"bun x":"npm exec")}async function hu(e,u,t="VITE_"){const r=Object.entries(e).map(([s,D])=>`${t}${s.toUpperCase()}=${JSON.stringify(D)}`).join(`
|
|
37
|
+
`),i=dD.join(u,".env");await bD.writeFile(i,r,"utf8")}async function Bu(e){const{cwd:u,targetDir:t,template:r,packageName:i,renameFiles:s,pkgInfo:D}=e,n=b.join(u,t);m.mkdirSync(n,{recursive:!0}),await hu({},n);const F=D?D.name:"npm";x.step(`Creating project in ${n}...`);const a=b.resolve(fD(import.meta.url),`../../templates/${r}`),o=(v,S)=>{const K=b.join(n,s[v]??v);S?m.writeFileSync(K,S):lD(b.join(a,v),K)},l=m.readdirSync(a);for(const v of l.filter(S=>S!=="package.json"))o(v);const c=JSON.parse(m.readFileSync(b.join(a,"package.json"),"utf-8"));c.name=i,o("package.json",JSON.stringify(c,null,2)+`
|
|
38
38
|
`);let h="";const A=b.relative(u,n);switch(h+=`Project created. Now run:
|
|
39
39
|
`,n!==u&&(h+=`
|
|
40
40
|
cd ${A.includes(" ")?`"${A}"`:A}`),F){case"yarn":h+=`
|
|
41
41
|
yarn`,h+=`
|
|
42
42
|
yarn dev`;break;default:h+=`
|
|
43
43
|
${F} install`,h+=`
|
|
44
|
-
${F} run dev`;break}
|
|
44
|
+
${F} run dev`;break}Cu(h)}const{blue:ED,cyan:mu}=C,cD=[{name:"vanilla",display:"Vanilla",description:"with playcanvas engine",color:U.yellow,variants:[{name:"vanilla-ts",display:"TypeScript",color:ED}]},{name:"react",display:"React",description:"with @playcanvas/react",color:mu,variants:[{name:"react-ts",display:"TypeScript",color:ED}]}],gu=cD.flatMap(e=>e.variants.map(u=>u.name));async function pu({argTargetDir:e,defaultTargetDir:u,cancel:t}){let r=e?z(String(e)):void 0;if(!r){const i=await oD({message:"Project name:",defaultValue:u,placeholder:u});j(i)&&t(),r=z(i)}return r}async function fu({targetDir:e,argOverwrite:u,cancel:t}){if(m.existsSync(e)&&!ou(e)){const r=u?"yes":await V({message:(e==="."?"Current directory":`Target directory "${e}"`)+" is not empty. Please choose how to proceed:",options:[{label:"Cancel operation",value:"no"},{label:"Remove existing files and continue",value:"yes"},{label:"Ignore files and continue",value:"ignore"}]});if(j(r))return t();switch(r){case"yes":lu(e);break;case"no":t();return}}}function hD(e){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(e)}function BD(e){return e.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}async function bu({targetDir:e,cancel:u}){let t=b.basename(b.resolve(e));if(!hD(t)){const r=await oD({message:"Package name:",defaultValue:BD(t),placeholder:BD(t),validate(i){if(!hD(i))return"Invalid package.json name"}});if(j(r))return u();t=r}return t}async function du({argTemplate:e,FRAMEWORKS:u,TEMPLATES:t,pkgInfo:r,getFullCustomCommand:i,cancel:s}){let D=e,n=!1;if(e&&!t.includes(e)&&(D=void 0,n=!0),!D){const F=await V({message:n?`"${e}" isn't a valid template. Please choose from below: `:"Select a framework:",options:u.map(a=>{const o=a.color;return{label:o(a.display||a.name),value:a,hint:a.description}})});if(j(F))return s();await V({message:"Select a variant:",options:F.variants.map(a=>{const o=a.color,l=a.customCommand?i(a.customCommand,r).replace(/ TARGET_DIR$/,""):void 0;return{label:o(a.display||a.name),value:a.name,hint:l}})}),D=F.variants[0].name}return D}const w=vD(process.argv.slice(2),{alias:{h:"help",t:"template",d:"delete"},boolean:["help","overwrite"],string:["template"]}),Au=process.cwd(),vu=`Usage: npm create playcanvas@latest [OPTION]...
|
|
45
45
|
|
|
46
46
|
Create a new PlayCanvas project in JavaScript or TypeScript.
|
|
47
47
|
With no arguments, start the CLI in interactive mode.
|
|
@@ -50,4 +50,4 @@ Options:
|
|
|
50
50
|
-t, --template NAME use a specific template
|
|
51
51
|
-h, --help show help
|
|
52
52
|
-d, --delete delete the project directory if it exists
|
|
53
|
-
`,xu={_gitignore:".gitignore"},$u="playcanvas-project";async function yu(){const e=w._[0]?z(String(w._[0])):void 0,u=w.template,t=w.overwrite;if(w.help){console.log(vu);return}const r=wu(process.env.npm_config_user_agent),i=()=>
|
|
53
|
+
`,xu={_gitignore:".gitignore"},$u="playcanvas-project";async function yu(){const e=w._[0]?z(String(w._[0])):void 0,u=w.template,t=w.overwrite;if(w.help){console.log(vu);return}const r=wu(process.env.npm_config_user_agent),i=()=>au("Operation cancelled"),s=await pu({argTargetDir:e,defaultTargetDir:$u,cancel:i});await fu({targetDir:s,argOverwrite:t,cancel:i});const D=await bu({targetDir:s,cancel:i}),n=await du({argTemplate:u,FRAMEWORKS:cD,TEMPLATES:gu,pkgInfo:r,getFullCustomCommand:cu,cancel:i});await Bu({cwd:Au,targetDir:s,template:n,packageName:D,renameFiles:xu,pkgInfo:r})}function wu(e){if(!e)return;const u=e.split(" ")[0].split("/");return{name:u[0],version:u[1]}}yu().catch(e=>{console.error(e)});
|
package/package.json
CHANGED
package/templates/index.ts
CHANGED
|
@@ -12,6 +12,19 @@ const { blue, cyan } = colors
|
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
14
14
|
export const FRAMEWORKS: Framework[] = [
|
|
15
|
+
{
|
|
16
|
+
name: 'vanilla',
|
|
17
|
+
display: 'Vanilla',
|
|
18
|
+
description: 'with playcanvas engine',
|
|
19
|
+
color: yellow,
|
|
20
|
+
variants: [
|
|
21
|
+
{
|
|
22
|
+
name: 'vanilla-ts',
|
|
23
|
+
display: 'TypeScript',
|
|
24
|
+
color: blue,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
15
28
|
{
|
|
16
29
|
name: 'react',
|
|
17
30
|
display: 'React',
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# PlayCanvas + Vite Starter
|
|
2
|
+
|
|
3
|
+
A modern, batteries-included starter for building WebGL/PlayCanvas experiences with TypeScript.
|
|
4
|
+
|
|
5
|
+
* **PlayCanvas** `^2.8.2` – high-performance WebGL engine
|
|
6
|
+
* **Vite** `^7` – ultra-fast dev server & bundler with HMR
|
|
7
|
+
* **TypeScript** `~5.8` – static typing out-of-the-box
|
|
8
|
+
* **ESLint** `^9` – linting with recommended TypeScript rules
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
* **Node.js ≥ 20.19.0** (or ≥ 22.12.0). Use [nvm](https://github.com/nvm-sh/nvm) to install/switch:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
nvm install 22 # or 20.19+
|
|
18
|
+
nvm use 22
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Getting Started
|
|
24
|
+
|
|
25
|
+
Clone the repo and install dependencies:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone <your-repo-url> playcanvas-project
|
|
29
|
+
cd playcanvas-project
|
|
30
|
+
npm install
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Start the dev server with hot-module reload:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm run dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Open <http://localhost:5173> to view the app. Any file changes trigger instant reloads.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Scripts
|
|
44
|
+
|
|
45
|
+
| Command | Description |
|
|
46
|
+
|--------------------|--------------------------------------|
|
|
47
|
+
| `npm run dev` | Start Vite dev server with HMR |
|
|
48
|
+
| `npm run build` | Type-check & bundle for production |
|
|
49
|
+
| `npm run preview` | Preview the production build locally |
|
|
50
|
+
| `npm run lint` | Run ESLint over the codebase |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Project Structure
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
.
|
|
58
|
+
├── public/ # Static assets copied as-is
|
|
59
|
+
├── src/
|
|
60
|
+
│ ├── components/
|
|
61
|
+
│ │ └── PlayCanvasCanvas.tsx # React wrapper around a PlayCanvas application
|
|
62
|
+
│ ├── App.tsx # Entry component
|
|
63
|
+
│ └── main.tsx # Vite/React bootstrap
|
|
64
|
+
├── vite.config.ts # Vite + React plugin config
|
|
65
|
+
└── ...
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### `PlayCanvasCanvas.tsx` (concept)
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { useEffect, useRef } from 'react'
|
|
72
|
+
import * as pc from 'playcanvas'
|
|
73
|
+
|
|
74
|
+
export default function PlayCanvasCanvas() {
|
|
75
|
+
const canvasRef = useRef<HTMLCanvasElement>(null)
|
|
76
|
+
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
const canvas = canvasRef.current!
|
|
79
|
+
const app = new pc.Application(canvas, {})
|
|
80
|
+
app.start()
|
|
81
|
+
// demo scene setup here…
|
|
82
|
+
|
|
83
|
+
return () => app.destroy() // cleanup on unmount
|
|
84
|
+
}, [])
|
|
85
|
+
|
|
86
|
+
return <canvas ref={canvasRef} style={{ width: '100%', height: '100%' }} />
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Use the component anywhere in your React tree to embed a PlayCanvas scene.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Linting & Formatting
|
|
95
|
+
|
|
96
|
+
ESLint is pre-configured with TypeScript, React hooks, React Refresh, and global browser/node globals. Adjust `eslint.config.js` as your codebase grows.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Deployment
|
|
101
|
+
|
|
102
|
+
Run `npm run build` to generate a static production bundle in `dist/`. Deploy the contents of that folder to any static hosting provider (Netlify, Vercel, GitHub Pages, Cloudflare Pages, etc.).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Further Reading
|
|
107
|
+
|
|
108
|
+
* [PlayCanvas Engine Docs](https://developer.playcanvas.com/en/api/)
|
|
109
|
+
* [Vite Docs](https://vitejs.dev/)
|
|
110
|
+
* [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
Made with ❤️ and ☕ by **Your Name**. PRs and issues welcome!
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>PlayCanvas + TS</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "playcanvas-project",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"predev": "node ./scripts/ensure-node-version.cjs",
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "tsc && vite build",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"playcanvas": "^2.8.2"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"semver": "^7.7.2",
|
|
17
|
+
"typescript": "~5.8.3",
|
|
18
|
+
"vite": "^7.0.3"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const semver = require('semver');
|
|
2
|
+
const pkg = require('../package.json');
|
|
3
|
+
|
|
4
|
+
const requiredVersion = pkg.engines.node;
|
|
5
|
+
const currentVersion = process.version;
|
|
6
|
+
|
|
7
|
+
if (!semver.satisfies(currentVersion, requiredVersion)) {
|
|
8
|
+
console.error(`\n❌ Unsupported Node.js version: ${currentVersion}`);
|
|
9
|
+
console.error(`Required: ${requiredVersion}`);
|
|
10
|
+
console.error('Please upgrade your Node.js to continue.\n');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#root {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
width: 100vw;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
header {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: row;
|
|
11
|
+
align-items: center;
|
|
12
|
+
padding: 2rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.absolute {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.full-bleed {
|
|
22
|
+
width: 100vw;
|
|
23
|
+
height: 100vh;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.logo {
|
|
28
|
+
height: 2em;
|
|
29
|
+
padding: .5em;
|
|
30
|
+
will-change: filter;
|
|
31
|
+
transition: filter 300ms;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.playcanvas-logo {
|
|
35
|
+
border-radius: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.logo:hover {
|
|
39
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
40
|
+
}
|
|
41
|
+
.card {
|
|
42
|
+
padding: 2em;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.read-the-docs {
|
|
46
|
+
color: #888;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.container{
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
display: flex;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.overlay {
|
|
57
|
+
margin: 0 auto;
|
|
58
|
+
text-align: center;
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: stretch;
|
|
63
|
+
width: 100vw;
|
|
64
|
+
height: 100vh;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.overlay > .grow {
|
|
69
|
+
flex-grow: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.pill {
|
|
73
|
+
background-color: #000;
|
|
74
|
+
color: #fff;
|
|
75
|
+
padding: 0.5rem 1rem;
|
|
76
|
+
border-radius: 0.5rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { DEVICETYPE_WEBGL2, createGraphicsDevice, AppBase, AppOptions, RenderComponentSystem, CameraComponentSystem, LightComponentSystem, TextureHandler, ContainerHandler, FILLMODE_FILL_WINDOW, RESOLUTION_AUTO, Entity, Color, ScriptComponent, ScriptComponentSystem, Vec3, Picker, EVENT_MOUSEDOWN, EVENT_TOUCHSTART, TouchDevice, Mouse, Mesh, MeshInstance, EVENT_MOUSEMOVE, StandardMaterial, Layer, EVENT_MOUSEUP } from 'playcanvas';
|
|
2
|
+
|
|
3
|
+
// @ts-expect-error No declaration exists for this script
|
|
4
|
+
import { Grid } from 'playcanvas/scripts/esm/grid.mjs';
|
|
5
|
+
|
|
6
|
+
// @ts-expect-error No declaration exists for this script
|
|
7
|
+
import { CameraControls } from 'playcanvas/scripts/esm/camera-controls.mjs';
|
|
8
|
+
import { throttle } from './utils';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Setup the PlayCanvas app
|
|
12
|
+
* @param canvas - The canvas element
|
|
13
|
+
* @param onClick - The function to call when the user clicks on the sphere
|
|
14
|
+
*/
|
|
15
|
+
async function setupApp(canvas: HTMLCanvasElement, onClick: () => void) {
|
|
16
|
+
|
|
17
|
+
if (!canvas) {
|
|
18
|
+
throw new Error('Canvas not found');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// create graphics device
|
|
22
|
+
const device = await createGraphicsDevice(canvas, {
|
|
23
|
+
deviceTypes: [DEVICETYPE_WEBGL2],
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// create app options
|
|
27
|
+
const createOptions = new AppOptions();
|
|
28
|
+
createOptions.graphicsDevice = device;
|
|
29
|
+
createOptions.mouse = new Mouse(document.body);
|
|
30
|
+
createOptions.touch = new TouchDevice(document.body);
|
|
31
|
+
createOptions.componentSystems = [RenderComponentSystem, CameraComponentSystem, LightComponentSystem, ScriptComponentSystem];
|
|
32
|
+
createOptions.resourceHandlers = [TextureHandler, ContainerHandler];
|
|
33
|
+
|
|
34
|
+
// create app
|
|
35
|
+
const app = new AppBase(canvas);
|
|
36
|
+
app.init(createOptions);
|
|
37
|
+
app.start();
|
|
38
|
+
|
|
39
|
+
// Set the canvas to fill the window and a
|
|
40
|
+
app.setCanvasFillMode(FILLMODE_FILL_WINDOW);
|
|
41
|
+
app.setCanvasResolution(RESOLUTION_AUTO);
|
|
42
|
+
|
|
43
|
+
// Ensure canvas is resized when window changes size
|
|
44
|
+
const resize = () => app.resizeCanvas();
|
|
45
|
+
window.addEventListener('resize', resize);
|
|
46
|
+
|
|
47
|
+
app.on('destroy', () => {
|
|
48
|
+
window.removeEventListener('resize', resize);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// create sphere entity
|
|
52
|
+
const sphere = new Entity('sphere');
|
|
53
|
+
sphere.setLocalScale(4, 4, 4);
|
|
54
|
+
sphere.setPosition(new Vec3(0, 2, 0));
|
|
55
|
+
sphere.addComponent('render', {
|
|
56
|
+
type: 'sphere'
|
|
57
|
+
});
|
|
58
|
+
app.root.addChild(sphere);
|
|
59
|
+
|
|
60
|
+
// create camera entity
|
|
61
|
+
const camera = new Entity('camera');
|
|
62
|
+
camera.addComponent('camera', {
|
|
63
|
+
clearColor: new Color(0.09, 0.09, 0.09)
|
|
64
|
+
});
|
|
65
|
+
app.root.addChild(camera);
|
|
66
|
+
camera.setPosition(new Vec3(8, 2, 8));
|
|
67
|
+
|
|
68
|
+
// create camera controls
|
|
69
|
+
camera.addComponent('script');
|
|
70
|
+
const controls = camera.script?.create(CameraControls) as CameraControls;
|
|
71
|
+
controls.focusPoint = sphere.getLocalPosition();
|
|
72
|
+
controls.sceneSize = new Vec3(2, 2, 2).length();
|
|
73
|
+
controls.enableFly = false;
|
|
74
|
+
controls.lookSpeed = 0.001;
|
|
75
|
+
|
|
76
|
+
// create grid entity
|
|
77
|
+
const grid = new Entity('grid');
|
|
78
|
+
grid.addComponent('script');
|
|
79
|
+
grid.script?.create(Grid);
|
|
80
|
+
app.root.addChild(grid);
|
|
81
|
+
grid.setLocalScale(1000, 1000, 1000);
|
|
82
|
+
|
|
83
|
+
// create directional light entity
|
|
84
|
+
const light = new Entity('light');
|
|
85
|
+
light.addComponent('light');
|
|
86
|
+
app.root.addChild(light);
|
|
87
|
+
light.setEulerAngles(45, 0, 0);
|
|
88
|
+
|
|
89
|
+
// create a picker
|
|
90
|
+
const picker = new Picker(app, 1, 1);
|
|
91
|
+
|
|
92
|
+
// function handling mouse click / touch
|
|
93
|
+
const worldLayer = app.scene.layers.getLayerByName('World');
|
|
94
|
+
const intersectsSphere = (x: number, y: number, layer: Layer) : Promise<boolean> => {
|
|
95
|
+
|
|
96
|
+
if (!camera.camera) {
|
|
97
|
+
return Promise.resolve(false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const pickerScale = 0.5;
|
|
101
|
+
picker.resize(canvas.clientWidth * pickerScale, canvas.clientHeight * pickerScale);
|
|
102
|
+
|
|
103
|
+
if (!layer) {
|
|
104
|
+
return Promise.resolve(false);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// render the ID texture
|
|
108
|
+
picker.prepare(camera.camera, app.scene, [layer]);
|
|
109
|
+
|
|
110
|
+
// get the meshInstance of the picked object
|
|
111
|
+
return picker.getSelectionAsync(x * pickerScale, y * pickerScale, 1, 1).then((meshInstances: MeshInstance[]) : boolean => {
|
|
112
|
+
if (meshInstances.length === 0) return false;
|
|
113
|
+
return meshInstances[0] === sphere.render?.meshInstances[0];
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
app.mouse?.on(EVENT_MOUSEDOWN, (event) => {
|
|
118
|
+
if (!worldLayer) return;
|
|
119
|
+
intersectsSphere(event.x, event.y, worldLayer);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const HOVER_COLOR = new Color(1, 0, 0);
|
|
123
|
+
const DEFAULT_COLOR = new Color(1, 1, 1);
|
|
124
|
+
const material = sphere.render?.material as StandardMaterial;
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
// on mouse move, check if the user is hovering over the sphere and update the cursor
|
|
128
|
+
app.mouse?.on(EVENT_MOUSEMOVE, throttle((event) => {
|
|
129
|
+
if (!worldLayer) return;
|
|
130
|
+
intersectsSphere(event.x, event.y, worldLayer).then((intersects) => {
|
|
131
|
+
material.diffuse.copy(intersects ? HOVER_COLOR : DEFAULT_COLOR);
|
|
132
|
+
document.body.style.cursor = intersects ? 'pointer' : 'default';
|
|
133
|
+
material.update();
|
|
134
|
+
});
|
|
135
|
+
}, 100));
|
|
136
|
+
|
|
137
|
+
// on mouse up, check if the user clicked on the sphere and call the onClick function
|
|
138
|
+
app.mouse?.on(EVENT_MOUSEUP, (event) => {
|
|
139
|
+
if (!worldLayer || !onClick) return;
|
|
140
|
+
intersectsSphere(event.x, event.y, worldLayer).then((intersects) => {
|
|
141
|
+
if (intersects) {
|
|
142
|
+
onClick();
|
|
143
|
+
}
|
|
144
|
+
})
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export { setupApp };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// // @ts-expect-error - ShadowCatcher is not typed
|
|
2
|
+
// import { Grid } from "playcanvas/scripts/esm/grid.mjs";
|
|
3
|
+
// import { useEffect, useState } from "react";
|
|
4
|
+
// import { Entity } from "@playcanvas/react";
|
|
5
|
+
// import { useEnvAtlas, useMaterial } from "@playcanvas/react/hooks";
|
|
6
|
+
// import { Camera, EnvAtlas, Render, Script } from "@playcanvas/react/components";
|
|
7
|
+
// import { OrbitControls } from "@playcanvas/react/scripts";
|
|
8
|
+
|
|
9
|
+
// /**
|
|
10
|
+
// * The Scene renders a sphere with a grid and camera controls
|
|
11
|
+
// */
|
|
12
|
+
// function Scene({ onClick }: SceneProps) {
|
|
13
|
+
|
|
14
|
+
// // Track the hover state and set the color based on the hover state
|
|
15
|
+
// const [hovering, setHovering] = useState(false);
|
|
16
|
+
|
|
17
|
+
// // Set a material color based on the hover state
|
|
18
|
+
// const diffuse = hovering ? '#ffffff' : '#dddddd';
|
|
19
|
+
|
|
20
|
+
// // Create a material for the sphere
|
|
21
|
+
// const material = useMaterial({ diffuse });
|
|
22
|
+
|
|
23
|
+
// // Load the environment map
|
|
24
|
+
// const { asset: envMap } = useEnvAtlas('/environment-map.png');
|
|
25
|
+
|
|
26
|
+
// // change the mouse cursor based on the hover state
|
|
27
|
+
// useEffect(() => {
|
|
28
|
+
// document.body.style.cursor = hovering ? 'pointer' : 'default';
|
|
29
|
+
// }, [hovering]);
|
|
30
|
+
|
|
31
|
+
// // Don't render until the environment map is loaded
|
|
32
|
+
// if (!envMap) return null;
|
|
33
|
+
|
|
34
|
+
// return (
|
|
35
|
+
// <>
|
|
36
|
+
// {/* Render some environment lighting using the environment map */}
|
|
37
|
+
// <EnvAtlas asset={envMap} showSkybox={false} />
|
|
38
|
+
|
|
39
|
+
// {/* Render a background grid */}
|
|
40
|
+
// <Entity scale={[1000, 1000, 1000]}>
|
|
41
|
+
// <Script script={Grid} />
|
|
42
|
+
// </Entity>
|
|
43
|
+
|
|
44
|
+
// {/* Create a camera entity with orbit controls */}
|
|
45
|
+
// <Entity name='camera' position={[4, 1, 4]}>
|
|
46
|
+
// <Camera clearColor='#171717' />
|
|
47
|
+
// <OrbitControls />
|
|
48
|
+
// </Entity>
|
|
49
|
+
|
|
50
|
+
// {/* Create and position entity with pointer events */}
|
|
51
|
+
// <Entity
|
|
52
|
+
// position={[0, 2, 0]}
|
|
53
|
+
// scale={[4, 4, 4]}
|
|
54
|
+
// onClick={onClick}
|
|
55
|
+
// onPointerOver={() => setHovering(true)}
|
|
56
|
+
// onPointerOut={() => setHovering(false)}
|
|
57
|
+
// >
|
|
58
|
+
|
|
59
|
+
// {/* Render a sphere with the material */}
|
|
60
|
+
// <Render type="sphere" material={material} />
|
|
61
|
+
// </Entity>
|
|
62
|
+
// </>
|
|
63
|
+
// )
|
|
64
|
+
// }
|
|
65
|
+
|
|
66
|
+
// type SceneProps = {
|
|
67
|
+
// onClick: () => void;
|
|
68
|
+
// }
|
|
69
|
+
|
|
70
|
+
// export default Scene;
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="32" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path fill="#007ACC" d="M0 128v128h256V0H0z"></path><path fill="#FFF" d="m56.612 128.85l-.081 10.483h33.32v94.68h23.568v-94.68h33.321v-10.28c0-5.69-.122-10.444-.284-10.566c-.122-.162-20.4-.244-44.983-.203l-44.74.122l-.121 10.443Zm149.955-10.742c6.501 1.625 11.459 4.51 16.01 9.224c2.357 2.52 5.851 7.111 6.136 8.208c.08.325-11.053 7.802-17.798 11.988c-.244.162-1.22-.894-2.317-2.52c-3.291-4.795-6.745-6.867-12.028-7.233c-7.76-.528-12.759 3.535-12.718 10.321c0 1.992.284 3.17 1.097 4.795c1.707 3.536 4.876 5.649 14.832 9.956c18.326 7.883 26.168 13.084 31.045 20.48c5.445 8.249 6.664 21.415 2.966 31.208c-4.063 10.646-14.14 17.879-28.323 20.276c-4.388.772-14.79.65-19.504-.203c-10.28-1.828-20.033-6.908-26.047-13.572c-2.357-2.6-6.949-9.387-6.664-9.874c.122-.163 1.178-.813 2.356-1.504c1.138-.65 5.446-3.129 9.509-5.485l7.355-4.267l1.544 2.276c2.154 3.29 6.867 7.801 9.712 9.305c8.167 4.307 19.383 3.698 24.909-1.26c2.357-2.153 3.332-4.388 3.332-7.68c0-2.966-.366-4.266-1.91-6.501c-1.99-2.845-6.054-5.242-17.595-10.24c-13.206-5.69-18.895-9.224-24.096-14.832c-3.007-3.25-5.852-8.452-7.03-12.8c-.975-3.617-1.22-12.678-.447-16.335c2.723-12.76 12.353-21.659 26.25-24.3c4.51-.853 14.994-.528 19.424.569Z"></path></svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function setupCounter(element: HTMLButtonElement) {
|
|
2
|
+
let counter = 0
|
|
3
|
+
const setCounter = (count: number) => {
|
|
4
|
+
counter = count
|
|
5
|
+
element.innerHTML = `count is ${counter}`
|
|
6
|
+
}
|
|
7
|
+
setCounter(0)
|
|
8
|
+
const increment = () => setCounter(counter + 1);
|
|
9
|
+
return increment;
|
|
10
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a {
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
color: #646cff;
|
|
19
|
+
text-decoration: inherit;
|
|
20
|
+
}
|
|
21
|
+
a:hover {
|
|
22
|
+
color: #535bf2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a > img {
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
body {
|
|
30
|
+
margin: 0;
|
|
31
|
+
display: flex;
|
|
32
|
+
place-items: center;
|
|
33
|
+
min-width: 320px;
|
|
34
|
+
min-height: 100vh;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
h1 {
|
|
38
|
+
font-size: 2.4em;
|
|
39
|
+
line-height: 1.1;
|
|
40
|
+
opacity: 0.85;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button {
|
|
44
|
+
border-radius: 8px;
|
|
45
|
+
border: 1px solid transparent;
|
|
46
|
+
padding: 0.6em 1.2em;
|
|
47
|
+
font-size: 1em;
|
|
48
|
+
font-weight: 500;
|
|
49
|
+
font-family: inherit;
|
|
50
|
+
background-color: #1a1a1a;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
transition: border-color 0.25s;
|
|
53
|
+
}
|
|
54
|
+
button:hover {
|
|
55
|
+
border-color: #646cff;
|
|
56
|
+
}
|
|
57
|
+
button:focus,
|
|
58
|
+
button:focus-visible {
|
|
59
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (prefers-color-scheme: light) {
|
|
63
|
+
:root {
|
|
64
|
+
color: #213547;
|
|
65
|
+
background-color: #ffffff;
|
|
66
|
+
}
|
|
67
|
+
a:hover {
|
|
68
|
+
color: #747bff;
|
|
69
|
+
}
|
|
70
|
+
button {
|
|
71
|
+
background-color: #f9f9f9;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import './style.css'
|
|
2
|
+
import typescriptLogo from './assets/typescript.svg'
|
|
3
|
+
import playcanvasLogo from './assets/playcanvas.png'
|
|
4
|
+
import { setupApp } from './App'
|
|
5
|
+
import { setupCounter } from './counter'
|
|
6
|
+
|
|
7
|
+
document.querySelector<HTMLDivElement>('#root')!.innerHTML = `
|
|
8
|
+
<div>
|
|
9
|
+
<canvas id="application-canvas"></canvas>
|
|
10
|
+
<div class="absolute overlay">
|
|
11
|
+
<div class="grow">
|
|
12
|
+
<header>
|
|
13
|
+
<h1>PlayCanvas + TypeScript</h1>
|
|
14
|
+
<a href="https://developer.playcanvas.com" target="_blank">
|
|
15
|
+
<img src="${playcanvasLogo}" class="playcanvas-logo logo" alt="PlayCanvas logo" />
|
|
16
|
+
</a>
|
|
17
|
+
<a href="https://www.typescriptlang.org/" target="_blank">
|
|
18
|
+
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
|
|
19
|
+
</a>
|
|
20
|
+
</header>
|
|
21
|
+
</div>
|
|
22
|
+
<div>
|
|
23
|
+
<div class="card">
|
|
24
|
+
<button id="counter" type="button"></button>
|
|
25
|
+
</div>
|
|
26
|
+
<p class="read-the-docs">
|
|
27
|
+
Click on the Vite and TypeScript logos to learn more
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
`
|
|
33
|
+
|
|
34
|
+
const increment = setupCounter(document.getElementById('counter') as HTMLButtonElement);
|
|
35
|
+
|
|
36
|
+
setupApp(document.getElementById('application-canvas') as HTMLCanvasElement, () => increment());
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
header {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: row;
|
|
19
|
+
align-items: center;
|
|
20
|
+
padding: 2rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
a {
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
color: #646cff;
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
text-decoration: inherit;
|
|
28
|
+
}
|
|
29
|
+
a:hover {
|
|
30
|
+
color: #535bf2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
body {
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
padding: 0;
|
|
37
|
+
margin: 0;
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h1 {
|
|
42
|
+
font-size: 2.4em;
|
|
43
|
+
line-height: 1.1;
|
|
44
|
+
opacity: 0.85;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#app {
|
|
48
|
+
max-width: 1280px;
|
|
49
|
+
margin: 0 auto;
|
|
50
|
+
padding: 2rem;
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.logo {
|
|
55
|
+
height: 2em;
|
|
56
|
+
padding: .5em;
|
|
57
|
+
will-change: filter;
|
|
58
|
+
transition: filter 300ms;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.playcanvas-logo {
|
|
62
|
+
border-radius: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.logo:hover {
|
|
66
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.logo.vanilla:hover {
|
|
70
|
+
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.card {
|
|
74
|
+
padding: 2em;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.read-the-docs {
|
|
78
|
+
color: #888;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
button {
|
|
82
|
+
border-radius: 8px;
|
|
83
|
+
border: 1px solid transparent;
|
|
84
|
+
padding: 0.6em 1.2em;
|
|
85
|
+
font-size: 1em;
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
font-family: inherit;
|
|
88
|
+
background-color: #1a1a1a;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
transition: border-color 0.25s;
|
|
91
|
+
}
|
|
92
|
+
button:hover {
|
|
93
|
+
border-color: #646cff;
|
|
94
|
+
}
|
|
95
|
+
button:focus,
|
|
96
|
+
button:focus-visible {
|
|
97
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media (prefers-color-scheme: light) {
|
|
101
|
+
:root {
|
|
102
|
+
color: #213547;
|
|
103
|
+
background-color: #ffffff;
|
|
104
|
+
}
|
|
105
|
+
a:hover {
|
|
106
|
+
color: #747bff;
|
|
107
|
+
}
|
|
108
|
+
button {
|
|
109
|
+
background-color: #f9f9f9;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.overlay {
|
|
114
|
+
margin: 0 auto;
|
|
115
|
+
text-align: center;
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
align-items: center;
|
|
119
|
+
justify-content: stretch;
|
|
120
|
+
width: 100vw;
|
|
121
|
+
height: 100vh;
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.overlay > .grow {
|
|
126
|
+
flex-grow: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.absolute {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
left: 0;
|
|
133
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple throttle helper
|
|
3
|
+
* @param fn - The function to throttle
|
|
4
|
+
* @param interval - The interval in milliseconds
|
|
5
|
+
* @returns A throttled function
|
|
6
|
+
*/
|
|
7
|
+
export function throttle(fn: (...args: any[]) => void, interval = 100) { // interval in ms
|
|
8
|
+
let last = 0;
|
|
9
|
+
return (...args: any[]) => {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
if (now - last >= interval) {
|
|
12
|
+
last = now;
|
|
13
|
+
fn(...args);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"strict": true,
|
|
18
|
+
"noUnusedLocals": true,
|
|
19
|
+
"noUnusedParameters": true,
|
|
20
|
+
"erasableSyntaxOnly": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true,
|
|
22
|
+
"noUncheckedSideEffectImports": true
|
|
23
|
+
},
|
|
24
|
+
"include": ["src"]
|
|
25
|
+
}
|