create-next-app 14.2.24 → 14.2.25

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -71,4 +71,4 @@ var o=i(4300);var a=o.Buffer;function copyProps(t,r){for(var i in t){r[i]=t[i]}}
71
71
  * Released under the MIT License.
72
72
  */const o=i(3357);const toRegexRange=(t,r,i)=>{if(o(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(r===void 0||t===r){return String(t)}if(o(r)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let a={relaxZeros:true,...i};if(typeof a.strictZeros==="boolean"){a.relaxZeros=a.strictZeros===false}let c=String(a.relaxZeros);let l=String(a.shorthand);let u=String(a.capture);let h=String(a.wrap);let d=t+":"+r+"="+c+l+u+h;if(toRegexRange.cache.hasOwnProperty(d)){return toRegexRange.cache[d].result}let p=Math.min(t,r);let m=Math.max(t,r);if(Math.abs(p-m)===1){let i=t+"|"+r;if(a.capture){return`(${i})`}if(a.wrap===false){return i}return`(?:${i})`}let y=hasPadding(t)||hasPadding(r);let g={min:t,max:r,a:p,b:m};let v=[];let b=[];if(y){g.isPadded=y;g.maxLen=String(g.max).length}if(p<0){let t=m<0?Math.abs(m):1;b=splitToPatterns(t,Math.abs(p),g,a);p=g.a=0}if(m>=0){v=splitToPatterns(p,m,g,a)}g.negatives=b;g.positives=v;g.result=collatePatterns(b,v,a);if(a.capture===true){g.result=`(${g.result})`}else if(a.wrap!==false&&v.length+b.length>1){g.result=`(?:${g.result})`}toRegexRange.cache[d]=g;return g.result};function collatePatterns(t,r,i){let o=filterPatterns(t,r,"-",false,i)||[];let a=filterPatterns(r,t,"",false,i)||[];let c=filterPatterns(t,r,"-?",true,i)||[];let l=o.concat(c).concat(a);return l.join("|")}function splitToRanges(t,r){let i=1;let o=1;let a=countNines(t,i);let c=new Set([r]);while(t<=a&&a<=r){c.add(a);i+=1;a=countNines(t,i)}a=countZeros(r+1,o)-1;while(t<a&&a<=r){c.add(a);o+=1;a=countZeros(r+1,o)-1}c=[...c];c.sort(compare);return c}function rangeToPattern(t,r,i){if(t===r){return{pattern:t,count:[],digits:0}}let o=zip(t,r);let a=o.length;let c="";let l=0;for(let t=0;t<a;t++){let[r,a]=o[t];if(r===a){c+=r}else if(r!=="0"||a!=="9"){c+=toCharacterClass(r,a,i)}else{l++}}if(l){c+=i.shorthand===true?"\\d":"[0-9]"}return{pattern:c,count:[l],digits:a}}function splitToPatterns(t,r,i,o){let a=splitToRanges(t,r);let c=[];let l=t;let u;for(let t=0;t<a.length;t++){let r=a[t];let h=rangeToPattern(String(l),String(r),o);let d="";if(!i.isPadded&&u&&u.pattern===h.pattern){if(u.count.length>1){u.count.pop()}u.count.push(h.count[0]);u.string=u.pattern+toQuantifier(u.count);l=r+1;continue}if(i.isPadded){d=padZeros(r,i,o)}h.string=d+h.pattern+toQuantifier(h.count);c.push(h);l=r+1;u=h}return c}function filterPatterns(t,r,i,o,a){let c=[];for(let a of t){let{string:t}=a;if(!o&&!contains(r,"string",t)){c.push(i+t)}if(o&&contains(r,"string",t)){c.push(i+t)}}return c}function zip(t,r){let i=[];for(let o=0;o<t.length;o++)i.push([t[o],r[o]]);return i}function compare(t,r){return t>r?1:r>t?-1:0}function contains(t,r,i){return t.some((t=>t[r]===i))}function countNines(t,r){return Number(String(t).slice(0,-r)+"9".repeat(r))}function countZeros(t,r){return t-t%Math.pow(10,r)}function toQuantifier(t){let[r=0,i=""]=t;if(i||r>1){return`{${r+(i?","+i:"")}}`}return""}function toCharacterClass(t,r,i){return`[${t}${r-t===1?"":"-"}${r}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,r,i){if(!r.isPadded){return t}let o=Math.abs(r.maxLen-String(t).length);let a=i.relaxZeros!==false;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:{return a?`0{0,${o}}`:`0{${o}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},5656:(t,r,i)=>{const{URL:o}=i(7310);const{join:a}=i(1017);const c=i(7147);const{promisify:l}=i(3837);const{tmpdir:u}=i(2037);const h=i(9074);const d=l(c.writeFile);const p=l(c.mkdir);const m=l(c.readFile);const compareVersions=(t,r)=>t.localeCompare(r,"en-US",{numeric:true});const encode=t=>encodeURIComponent(t).replace(/^%40/,"@");const getFile=async(t,r)=>{const i=u();const o=a(i,"update-check");if(!c.existsSync(o)){await p(o)}let l=`${t.name}-${r}.json`;if(t.scope){l=`${t.scope}-${l}`}return a(o,l)};const evaluateCache=async(t,r,i)=>{if(c.existsSync(t)){const o=await m(t,"utf8");const{lastUpdate:a,latest:c}=JSON.parse(o);const l=a+i;if(l>r){return{shouldCheck:false,latest:c}}}return{shouldCheck:true,latest:null}};const updateCache=async(t,r,i)=>{const o=JSON.stringify({latest:r,lastUpdate:i});await d(t,o,"utf8")};const loadPackage=(t,r)=>new Promise(((o,a)=>{const c={host:t.hostname,path:t.pathname,port:t.port,headers:{accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},timeout:2e3};if(r){c.headers.authorization=`${r.type} ${r.token}`}const{get:l}=i(t.protocol==="https:"?5687:3685);l(c,(t=>{const{statusCode:r}=t;if(r!==200){const i=new Error(`Request failed with code ${r}`);i.code=r;a(i);t.resume();return}let i="";t.setEncoding("utf8");t.on("data",(t=>{i+=t}));t.on("end",(()=>{try{const t=JSON.parse(i);o(t)}catch(t){a(t)}}))})).on("error",a).on("timeout",a)}));const getMostRecent=async({full:t,scope:r},a)=>{const c=h(r);const l=new o(t,c);let u=null;try{u=await loadPackage(l)}catch(t){if(t.code&&String(t.code).startsWith(4)){const t=i(1281);const r=t(c,{recursive:true});u=await loadPackage(l,r)}else{throw t}}const d=u["dist-tags"][a];if(!d){throw new Error(`Distribution tag ${a} is not available`)}return d};const y={interval:36e5,distTag:"latest"};const getDetails=t=>{const r={full:encode(t)};if(t.includes("/")){const i=t.split("/");r.scope=i[0];r.name=i[1]}else{r.scope=null;r.name=t}return r};t.exports=async(t,r)=>{if(typeof t!=="object"){throw new Error("The first parameter should be your package.json file content")}const i=getDetails(t.name);const o=Date.now();const{distTag:a,interval:c}=Object.assign({},y,r);const l=await getFile(i,a);let u=null;let h=true;({shouldCheck:h,latest:u}=await evaluateCache(l,o,c));if(h){u=await getMostRecent(i,a);await updateCache(l,u,o)}const d=compareVersions(t.version,u);if(d===-1){return{latest:u,fromCache:!h}}return null}},4856:function(t,r){
73
73
  /** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
74
- (function(t,i){true?i(r):0})(this,(function(t){"use strict";function merge(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++){r[i]=arguments[i]}if(r.length>1){r[0]=r[0].slice(0,-1);var o=r.length-1;for(var a=1;a<o;++a){r[a]=r[a].slice(1,-1)}r[o]=r[o].slice(1);return r.join("")}else{return r[0]}}function subexp(t){return"(?:"+t+")"}function typeOf(t){return t===undefined?"undefined":t===null?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(t){return t.toUpperCase()}function toArray(t){return t!==undefined&&t!==null?t instanceof Array?t:typeof t.length!=="number"||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[]}function assign(t,r){var i=t;if(r){for(var o in r){i[o]=r[o]}}return i}function buildExps(t){var r="[A-Za-z]",i="[\\x0D]",o="[0-9]",a="[\\x22]",c=merge(o,"[A-Fa-f]"),l="[\\x0A]",u="[\\x20]",h=subexp(subexp("%[EFef]"+c+"%"+c+c+"%"+c+c)+"|"+subexp("%[89A-Fa-f]"+c+"%"+c+c)+"|"+subexp("%"+c+c)),d="[\\:\\/\\?\\#\\[\\]\\@]",p="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",m=merge(d,p),y=t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",g=t?"[\\uE000-\\uF8FF]":"[]",v=merge(r,o,"[\\-\\.\\_\\~]",y),b=subexp(r+merge(r,o,"[\\+\\-\\.]")+"*"),w=subexp(subexp(h+"|"+merge(v,p,"[\\:]"))+"*"),E=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+o)+"|"+subexp("1"+o+o)+"|"+subexp("[1-9]"+o)+"|"+o),S=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+o)+"|"+subexp("1"+o+o)+"|"+subexp("0?[1-9]"+o)+"|0?0?"+o),x=subexp(S+"\\."+S+"\\."+S+"\\."+S),R=subexp(c+"{1,4}"),P=subexp(subexp(R+"\\:"+R)+"|"+x),$=subexp(subexp(R+"\\:")+"{6}"+P),O=subexp("\\:\\:"+subexp(R+"\\:")+"{5}"+P),T=subexp(subexp(R)+"?\\:\\:"+subexp(R+"\\:")+"{4}"+P),A=subexp(subexp(subexp(R+"\\:")+"{0,1}"+R)+"?\\:\\:"+subexp(R+"\\:")+"{3}"+P),C=subexp(subexp(subexp(R+"\\:")+"{0,2}"+R)+"?\\:\\:"+subexp(R+"\\:")+"{2}"+P),k=subexp(subexp(subexp(R+"\\:")+"{0,3}"+R)+"?\\:\\:"+R+"\\:"+P),I=subexp(subexp(subexp(R+"\\:")+"{0,4}"+R)+"?\\:\\:"+P),N=subexp(subexp(subexp(R+"\\:")+"{0,5}"+R)+"?\\:\\:"+R),D=subexp(subexp(subexp(R+"\\:")+"{0,6}"+R)+"?\\:\\:"),L=subexp([$,O,T,A,C,k,I,N,D].join("|")),M=subexp(subexp(v+"|"+h)+"+"),j=subexp(L+"\\%25"+M),U=subexp(L+subexp("\\%25|\\%(?!"+c+"{2})")+M),B=subexp("[vV]"+c+"+\\."+merge(v,p,"[\\:]")+"+"),H=subexp("\\["+subexp(U+"|"+L+"|"+B)+"\\]"),z=subexp(subexp(h+"|"+merge(v,p))+"*"),V=subexp(H+"|"+x+"(?!"+z+")"+"|"+z),G=subexp(o+"*"),q=subexp(subexp(w+"@")+"?"+V+subexp("\\:"+G)+"?"),K=subexp(h+"|"+merge(v,p,"[\\:\\@]")),W=subexp(K+"*"),Y=subexp(K+"+"),Z=subexp(subexp(h+"|"+merge(v,p,"[\\@]"))+"+"),X=subexp(subexp("\\/"+W)+"*"),J=subexp("\\/"+subexp(Y+X)+"?"),Q=subexp(Z+X),ee=subexp(Y+X),te="(?!"+K+")",re=subexp(X+"|"+J+"|"+Q+"|"+ee+"|"+te),se=subexp(subexp(K+"|"+merge("[\\/\\?]",g))+"*"),ie=subexp(subexp(K+"|[\\/\\?]")+"*"),ne=subexp(subexp("\\/\\/"+q+X)+"|"+J+"|"+ee+"|"+te),oe=subexp(b+"\\:"+ne+subexp("\\?"+se)+"?"+subexp("\\#"+ie)+"?"),ae=subexp(subexp("\\/\\/"+q+X)+"|"+J+"|"+Q+"|"+te),ce=subexp(ae+subexp("\\?"+se)+"?"+subexp("\\#"+ie)+"?"),le=subexp(oe+"|"+ce),ue=subexp(b+"\\:"+ne+subexp("\\?"+se)+"?"),he="^("+b+")\\:"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+ee+"|"+te+")")+subexp("\\?("+se+")")+"?"+subexp("\\#("+ie+")")+"?$",fe="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+Q+"|"+te+")")+subexp("\\?("+se+")")+"?"+subexp("\\#("+ie+")")+"?$",de="^("+b+")\\:"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+ee+"|"+te+")")+subexp("\\?("+se+")")+"?$",pe="^"+subexp("\\#("+ie+")")+"?$",me="^"+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",r,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",v,p),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",v,p),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",v,p),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",v,p),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",v,p,"[\\:\\@\\/\\?]",g),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",v,p,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",v,p),"g"),UNRESERVED:new RegExp(v,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",v,m),"g"),PCT_ENCODED:new RegExp(h,"g"),IPV4ADDRESS:new RegExp("^("+x+")$"),IPV6ADDRESS:new RegExp("^\\[?("+L+")"+subexp(subexp("\\%25|\\%(?!"+c+"{2})")+"("+M+")")+"?\\]?$")}}var r=buildExps(false);var i=buildExps(true);var o=function(){function sliceIterator(t,r){var i=[];var o=true;var a=false;var c=undefined;try{for(var l=t[Symbol.iterator](),u;!(o=(u=l.next()).done);o=true){i.push(u.value);if(r&&i.length===r)break}}catch(t){a=true;c=t}finally{try{if(!o&&l["return"])l["return"]()}finally{if(a)throw c}}return i}return function(t,r){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return sliceIterator(t,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(t){if(Array.isArray(t)){for(var r=0,i=Array(t.length);r<t.length;r++)i[r]=t[r];return i}else{return Array.from(t)}};var a=2147483647;var c=36;var l=1;var u=26;var h=38;var d=700;var p=72;var m=128;var y="-";var g=/^xn--/;var v=/[^\0-\x7E]/;var b=/[\x2E\u3002\uFF0E\uFF61]/g;var w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var E=c-l;var S=Math.floor;var x=String.fromCharCode;function error$1(t){throw new RangeError(w[t])}function map(t,r){var i=[];var o=t.length;while(o--){i[o]=r(t[o])}return i}function mapDomain(t,r){var i=t.split("@");var o="";if(i.length>1){o=i[0]+"@";t=i[1]}t=t.replace(b,".");var a=t.split(".");var c=map(a,r).join(".");return o+c}function ucs2decode(t){var r=[];var i=0;var o=t.length;while(i<o){var a=t.charCodeAt(i++);if(a>=55296&&a<=56319&&i<o){var c=t.charCodeAt(i++);if((c&64512)==56320){r.push(((a&1023)<<10)+(c&1023)+65536)}else{r.push(a);i--}}else{r.push(a)}}return r}var R=function ucs2encode(t){return String.fromCodePoint.apply(String,toConsumableArray(t))};var P=function basicToDigit(t){if(t-48<10){return t-22}if(t-65<26){return t-65}if(t-97<26){return t-97}return c};var $=function digitToBasic(t,r){return t+22+75*(t<26)-((r!=0)<<5)};var O=function adapt(t,r,i){var o=0;t=i?S(t/d):t>>1;t+=S(t/r);for(;t>E*u>>1;o+=c){t=S(t/E)}return S(o+(E+1)*t/(t+h))};var T=function decode(t){var r=[];var i=t.length;var o=0;var h=m;var d=p;var g=t.lastIndexOf(y);if(g<0){g=0}for(var v=0;v<g;++v){if(t.charCodeAt(v)>=128){error$1("not-basic")}r.push(t.charCodeAt(v))}for(var b=g>0?g+1:0;b<i;){var w=o;for(var E=1,x=c;;x+=c){if(b>=i){error$1("invalid-input")}var R=P(t.charCodeAt(b++));if(R>=c||R>S((a-o)/E)){error$1("overflow")}o+=R*E;var $=x<=d?l:x>=d+u?u:x-d;if(R<$){break}var T=c-$;if(E>S(a/T)){error$1("overflow")}E*=T}var A=r.length+1;d=O(o-w,A,w==0);if(S(o/A)>a-h){error$1("overflow")}h+=S(o/A);o%=A;r.splice(o++,0,h)}return String.fromCodePoint.apply(String,r)};var A=function encode(t){var r=[];t=ucs2decode(t);var i=t.length;var o=m;var h=0;var d=p;var g=true;var v=false;var b=undefined;try{for(var w=t[Symbol.iterator](),E;!(g=(E=w.next()).done);g=true){var R=E.value;if(R<128){r.push(x(R))}}}catch(t){v=true;b=t}finally{try{if(!g&&w.return){w.return()}}finally{if(v){throw b}}}var P=r.length;var T=P;if(P){r.push(y)}while(T<i){var A=a;var C=true;var k=false;var I=undefined;try{for(var N=t[Symbol.iterator](),D;!(C=(D=N.next()).done);C=true){var L=D.value;if(L>=o&&L<A){A=L}}}catch(t){k=true;I=t}finally{try{if(!C&&N.return){N.return()}}finally{if(k){throw I}}}var M=T+1;if(A-o>S((a-h)/M)){error$1("overflow")}h+=(A-o)*M;o=A;var j=true;var U=false;var B=undefined;try{for(var H=t[Symbol.iterator](),z;!(j=(z=H.next()).done);j=true){var V=z.value;if(V<o&&++h>a){error$1("overflow")}if(V==o){var G=h;for(var q=c;;q+=c){var K=q<=d?l:q>=d+u?u:q-d;if(G<K){break}var W=G-K;var Y=c-K;r.push(x($(K+W%Y,0)));G=S(W/Y)}r.push(x($(G,0)));d=O(h,M,T==P);h=0;++T}}}catch(t){U=true;B=t}finally{try{if(!j&&H.return){H.return()}}finally{if(U){throw B}}}++h;++o}return r.join("")};var C=function toUnicode(t){return mapDomain(t,(function(t){return g.test(t)?T(t.slice(4).toLowerCase()):t}))};var k=function toASCII(t){return mapDomain(t,(function(t){return v.test(t)?"xn--"+A(t):t}))};var I={version:"2.1.0",ucs2:{decode:ucs2decode,encode:R},decode:T,encode:A,toASCII:k,toUnicode:C};var N={};function pctEncChar(t){var r=t.charCodeAt(0);var i=void 0;if(r<16)i="%0"+r.toString(16).toUpperCase();else if(r<128)i="%"+r.toString(16).toUpperCase();else if(r<2048)i="%"+(r>>6|192).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();else i="%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();return i}function pctDecChars(t){var r="";var i=0;var o=t.length;while(i<o){var a=parseInt(t.substr(i+1,2),16);if(a<128){r+=String.fromCharCode(a);i+=3}else if(a>=194&&a<224){if(o-i>=6){var c=parseInt(t.substr(i+4,2),16);r+=String.fromCharCode((a&31)<<6|c&63)}else{r+=t.substr(i,6)}i+=6}else if(a>=224){if(o-i>=9){var l=parseInt(t.substr(i+4,2),16);var u=parseInt(t.substr(i+7,2),16);r+=String.fromCharCode((a&15)<<12|(l&63)<<6|u&63)}else{r+=t.substr(i,9)}i+=9}else{r+=t.substr(i,3);i+=3}}return r}function _normalizeComponentEncoding(t,r){function decodeUnreserved(t){var i=pctDecChars(t);return!i.match(r.UNRESERVED)?t:i}if(t.scheme)t.scheme=String(t.scheme).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_SCHEME,"");if(t.userinfo!==undefined)t.userinfo=String(t.userinfo).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_USERINFO,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.host!==undefined)t.host=String(t.host).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_HOST,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.path!==undefined)t.path=String(t.path).replace(r.PCT_ENCODED,decodeUnreserved).replace(t.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.query!==undefined)t.query=String(t.query).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_QUERY,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.fragment!==undefined)t.fragment=String(t.fragment).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_FRAGMENT,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);return t}function _stripLeadingZeros(t){return t.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(t,r){var i=t.match(r.IPV4ADDRESS)||[];var a=o(i,2),c=a[1];if(c){return c.split(".").map(_stripLeadingZeros).join(".")}else{return t}}function _normalizeIPv6(t,r){var i=t.match(r.IPV6ADDRESS)||[];var a=o(i,3),c=a[1],l=a[2];if(c){var u=c.toLowerCase().split("::").reverse(),h=o(u,2),d=h[0],p=h[1];var m=p?p.split(":").map(_stripLeadingZeros):[];var y=d.split(":").map(_stripLeadingZeros);var g=r.IPV4ADDRESS.test(y[y.length-1]);var v=g?7:8;var b=y.length-v;var w=Array(v);for(var E=0;E<v;++E){w[E]=m[E]||y[b+E]||""}if(g){w[v-1]=_normalizeIPv4(w[v-1],r)}var S=w.reduce((function(t,r,i){if(!r||r==="0"){var o=t[t.length-1];if(o&&o.index+o.length===i){o.length++}else{t.push({index:i,length:1})}}return t}),[]);var x=S.sort((function(t,r){return r.length-t.length}))[0];var R=void 0;if(x&&x.length>1){var P=w.slice(0,x.index);var $=w.slice(x.index+x.length);R=P.join(":")+"::"+$.join(":")}else{R=w.join(":")}if(l){R+="%"+l}return R}else{return t}}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var L="".match(/(){0}/)[1]===undefined;function parse(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a={};var c=o.iri!==false?i:r;if(o.reference==="suffix")t=(o.scheme?o.scheme+":":"")+"//"+t;var l=t.match(D);if(l){if(L){a.scheme=l[1];a.userinfo=l[3];a.host=l[4];a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=l[7];a.fragment=l[8];if(isNaN(a.port)){a.port=l[5]}}else{a.scheme=l[1]||undefined;a.userinfo=t.indexOf("@")!==-1?l[3]:undefined;a.host=t.indexOf("//")!==-1?l[4]:undefined;a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=t.indexOf("?")!==-1?l[7]:undefined;a.fragment=t.indexOf("#")!==-1?l[8]:undefined;if(isNaN(a.port)){a.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?l[4]:undefined}}if(a.host){a.host=_normalizeIPv6(_normalizeIPv4(a.host,c),c)}if(a.scheme===undefined&&a.userinfo===undefined&&a.host===undefined&&a.port===undefined&&!a.path&&a.query===undefined){a.reference="same-document"}else if(a.scheme===undefined){a.reference="relative"}else if(a.fragment===undefined){a.reference="absolute"}else{a.reference="uri"}if(o.reference&&o.reference!=="suffix"&&o.reference!==a.reference){a.error=a.error||"URI is not a "+o.reference+" reference."}var u=N[(o.scheme||a.scheme||"").toLowerCase()];if(!o.unicodeSupport&&(!u||!u.unicodeSupport)){if(a.host&&(o.domainHost||u&&u.domainHost)){try{a.host=I.toASCII(a.host.replace(c.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){a.error=a.error||"Host's domain name can not be converted to ASCII via punycode: "+t}}_normalizeComponentEncoding(a,r)}else{_normalizeComponentEncoding(a,c)}if(u&&u.parse){u.parse(a,o)}}else{a.error=a.error||"URI can not be parsed."}return a}function _recomposeAuthority(t,o){var a=o.iri!==false?i:r;var c=[];if(t.userinfo!==undefined){c.push(t.userinfo);c.push("@")}if(t.host!==undefined){c.push(_normalizeIPv6(_normalizeIPv4(String(t.host),a),a).replace(a.IPV6ADDRESS,(function(t,r,i){return"["+r+(i?"%25"+i:"")+"]"})))}if(typeof t.port==="number"||typeof t.port==="string"){c.push(":");c.push(String(t.port))}return c.length?c.join(""):undefined}var M=/^\.\.?\//;var j=/^\/\.(\/|$)/;var U=/^\/\.\.(\/|$)/;var B=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(t){var r=[];while(t.length){if(t.match(M)){t=t.replace(M,"")}else if(t.match(j)){t=t.replace(j,"/")}else if(t.match(U)){t=t.replace(U,"/");r.pop()}else if(t==="."||t===".."){t=""}else{var i=t.match(B);if(i){var o=i[0];t=t.slice(o.length);r.push(o)}else{throw new Error("Unexpected dot segment condition")}}}return r.join("")}function serialize(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=o.iri?i:r;var c=[];var l=N[(o.scheme||t.scheme||"").toLowerCase()];if(l&&l.serialize)l.serialize(t,o);if(t.host){if(a.IPV6ADDRESS.test(t.host)){}else if(o.domainHost||l&&l.domainHost){try{t.host=!o.iri?I.toASCII(t.host.replace(a.PCT_ENCODED,pctDecChars).toLowerCase()):I.toUnicode(t.host)}catch(r){t.error=t.error||"Host's domain name can not be converted to "+(!o.iri?"ASCII":"Unicode")+" via punycode: "+r}}}_normalizeComponentEncoding(t,a);if(o.reference!=="suffix"&&t.scheme){c.push(t.scheme);c.push(":")}var u=_recomposeAuthority(t,o);if(u!==undefined){if(o.reference!=="suffix"){c.push("//")}c.push(u);if(t.path&&t.path.charAt(0)!=="/"){c.push("/")}}if(t.path!==undefined){var h=t.path;if(!o.absolutePath&&(!l||!l.absolutePath)){h=removeDotSegments(h)}if(u===undefined){h=h.replace(/^\/\//,"/%2F")}c.push(h)}if(t.query!==undefined){c.push("?");c.push(t.query)}if(t.fragment!==undefined){c.push("#");c.push(t.fragment)}return c.join("")}function resolveComponents(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var o=arguments[3];var a={};if(!o){t=parse(serialize(t,i),i);r=parse(serialize(r,i),i)}i=i||{};if(!i.tolerant&&r.scheme){a.scheme=r.scheme;a.userinfo=r.userinfo;a.host=r.host;a.port=r.port;a.path=removeDotSegments(r.path||"");a.query=r.query}else{if(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined){a.userinfo=r.userinfo;a.host=r.host;a.port=r.port;a.path=removeDotSegments(r.path||"");a.query=r.query}else{if(!r.path){a.path=t.path;if(r.query!==undefined){a.query=r.query}else{a.query=t.query}}else{if(r.path.charAt(0)==="/"){a.path=removeDotSegments(r.path)}else{if((t.userinfo!==undefined||t.host!==undefined||t.port!==undefined)&&!t.path){a.path="/"+r.path}else if(!t.path){a.path=r.path}else{a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+r.path}a.path=removeDotSegments(a.path)}a.query=r.query}a.userinfo=t.userinfo;a.host=t.host;a.port=t.port}a.scheme=t.scheme}a.fragment=r.fragment;return a}function resolve(t,r,i){var o=assign({scheme:"null"},i);return serialize(resolveComponents(parse(t,o),parse(r,o),o,true),o)}function normalize(t,r){if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=parse(serialize(t,r),r)}return t}function equal(t,r,i){if(typeof t==="string"){t=serialize(parse(t,i),i)}else if(typeOf(t)==="object"){t=serialize(t,i)}if(typeof r==="string"){r=serialize(parse(r,i),i)}else if(typeOf(r)==="object"){r=serialize(r,i)}return t===r}function escapeComponent(t,o){return t&&t.toString().replace(!o||!o.iri?r.ESCAPE:i.ESCAPE,pctEncChar)}function unescapeComponent(t,o){return t&&t.toString().replace(!o||!o.iri?r.PCT_ENCODED:i.PCT_ENCODED,pctDecChars)}var H={scheme:"http",domainHost:true,parse:function parse(t,r){if(!t.host){t.error=t.error||"HTTP URIs must have a host."}return t},serialize:function serialize(t,r){var i=String(t.scheme).toLowerCase()==="https";if(t.port===(i?443:80)||t.port===""){t.port=undefined}if(!t.path){t.path="/"}return t}};var z={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize};function isSecure(t){return typeof t.secure==="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}var V={scheme:"ws",domainHost:true,parse:function parse(t,r){var i=t;i.secure=isSecure(i);i.resourceName=(i.path||"/")+(i.query?"?"+i.query:"");i.path=undefined;i.query=undefined;return i},serialize:function serialize(t,r){if(t.port===(isSecure(t)?443:80)||t.port===""){t.port=undefined}if(typeof t.secure==="boolean"){t.scheme=t.secure?"wss":"ws";t.secure=undefined}if(t.resourceName){var i=t.resourceName.split("?"),a=o(i,2),c=a[0],l=a[1];t.path=c&&c!=="/"?c:undefined;t.query=l;t.resourceName=undefined}t.fragment=undefined;return t}};var G={scheme:"wss",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};var q={};var K=true;var W="[A-Za-z0-9\\-\\.\\_\\~"+(K?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var Y="[0-9A-Fa-f]";var Z=subexp(subexp("%[EFef]"+Y+"%"+Y+Y+"%"+Y+Y)+"|"+subexp("%[89A-Fa-f]"+Y+"%"+Y+Y)+"|"+subexp("%"+Y+Y));var X="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var J="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var Q=merge(J,'[\\"\\\\]');var ee="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var te=new RegExp(W,"g");var re=new RegExp(Z,"g");var se=new RegExp(merge("[^]",X,"[\\.]",'[\\"]',Q),"g");var ie=new RegExp(merge("[^]",W,ee),"g");var ne=ie;function decodeUnreserved(t){var r=pctDecChars(t);return!r.match(te)?t:r}var oe={scheme:"mailto",parse:function parse$$1(t,r){var i=t;var o=i.to=i.path?i.path.split(","):[];i.path=undefined;if(i.query){var a=false;var c={};var l=i.query.split("&");for(var u=0,h=l.length;u<h;++u){var d=l[u].split("=");switch(d[0]){case"to":var p=d[1].split(",");for(var m=0,y=p.length;m<y;++m){o.push(p[m])}break;case"subject":i.subject=unescapeComponent(d[1],r);break;case"body":i.body=unescapeComponent(d[1],r);break;default:a=true;c[unescapeComponent(d[0],r)]=unescapeComponent(d[1],r);break}}if(a)i.headers=c}i.query=undefined;for(var g=0,v=o.length;g<v;++g){var b=o[g].split("@");b[0]=unescapeComponent(b[0]);if(!r.unicodeSupport){try{b[1]=I.toASCII(unescapeComponent(b[1],r).toLowerCase())}catch(t){i.error=i.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}}else{b[1]=unescapeComponent(b[1],r).toLowerCase()}o[g]=b.join("@")}return i},serialize:function serialize$$1(t,r){var i=t;var o=toArray(t.to);if(o){for(var a=0,c=o.length;a<c;++a){var l=String(o[a]);var u=l.lastIndexOf("@");var h=l.slice(0,u).replace(re,decodeUnreserved).replace(re,toUpperCase).replace(se,pctEncChar);var d=l.slice(u+1);try{d=!r.iri?I.toASCII(unescapeComponent(d,r).toLowerCase()):I.toUnicode(d)}catch(t){i.error=i.error||"Email address's domain name can not be converted to "+(!r.iri?"ASCII":"Unicode")+" via punycode: "+t}o[a]=h+"@"+d}i.path=o.join(",")}var p=t.headers=t.headers||{};if(t.subject)p["subject"]=t.subject;if(t.body)p["body"]=t.body;var m=[];for(var y in p){if(p[y]!==q[y]){m.push(y.replace(re,decodeUnreserved).replace(re,toUpperCase).replace(ie,pctEncChar)+"="+p[y].replace(re,decodeUnreserved).replace(re,toUpperCase).replace(ne,pctEncChar))}}if(m.length){i.query=m.join("&")}return i}};var ae=/^([^\:]+)\:(.*)/;var ce={scheme:"urn",parse:function parse$$1(t,r){var i=t.path&&t.path.match(ae);var o=t;if(i){var a=r.scheme||o.scheme||"urn";var c=i[1].toLowerCase();var l=i[2];var u=a+":"+(r.nid||c);var h=N[u];o.nid=c;o.nss=l;o.path=undefined;if(h){o=h.parse(o,r)}}else{o.error=o.error||"URN can not be parsed."}return o},serialize:function serialize$$1(t,r){var i=r.scheme||t.scheme||"urn";var o=t.nid;var a=i+":"+(r.nid||o);var c=N[a];if(c){t=c.serialize(t,r)}var l=t;var u=t.nss;l.path=(o||r.nid)+":"+u;return l}};var le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var ue={scheme:"urn:uuid",parse:function parse(t,r){var i=t;i.uuid=i.nss;i.nss=undefined;if(!r.tolerant&&(!i.uuid||!i.uuid.match(le))){i.error=i.error||"UUID is not valid."}return i},serialize:function serialize(t,r){var i=t;i.nss=(t.uuid||"").toLowerCase();return i}};N[H.scheme]=H;N[z.scheme]=z;N[V.scheme]=V;N[G.scheme]=G;N[oe.scheme]=oe;N[ce.scheme]=ce;N[ue.scheme]=ue;t.SCHEMES=N;t.pctEncChar=pctEncChar;t.pctDecChars=pctDecChars;t.parse=parse;t.removeDotSegments=removeDotSegments;t.serialize=serialize;t.resolveComponents=resolveComponents;t.resolve=resolve;t.normalize=normalize;t.equal=equal;t.escapeComponent=escapeComponent;t.unescapeComponent=unescapeComponent;Object.defineProperty(t,"__esModule",{value:true})}))},2338:(t,r,i)=>{"use strict";var o=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var a=i(3113);var c=["node_modules","favicon.ico"];var l=t.exports=function(t){var r=[];var i=[];if(t===null){i.push("name cannot be null");return done(r,i)}if(t===undefined){i.push("name cannot be undefined");return done(r,i)}if(typeof t!=="string"){i.push("name must be a string");return done(r,i)}if(!t.length){i.push("name length must be greater than zero")}if(t.match(/^\./)){i.push("name cannot start with a period")}if(t.match(/^_/)){i.push("name cannot start with an underscore")}if(t.trim()!==t){i.push("name cannot contain leading or trailing spaces")}c.forEach((function(r){if(t.toLowerCase()===r){i.push(r+" is a blacklisted name")}}));a.forEach((function(i){if(t.toLowerCase()===i){r.push(i+" is a core module name")}}));if(t.length>214){r.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){r.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){r.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var l=t.match(o);if(l){var u=l[1];var h=l[2];if(encodeURIComponent(u)===u&&encodeURIComponent(h)===h){return done(r,i)}}i.push("name can only contain URL-friendly characters")}return done(r,i)};l.scopedPackagePattern=o;var done=function(t,r){var i={validForNewPackages:r.length===0&&t.length===0,validForOldPackages:r.length===0,warnings:t,errors:r};if(!i.warnings.length)delete i.warnings;if(!i.errors.length)delete i.errors;return i}},7200:(t,r,i)=>{const o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const a=i(1017);const c=o?";":":";const l=i(7745);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,r)=>{const i=r.colon||c;const a=t.match(/\//)||o&&t.match(/\\/)?[""]:[...o?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(i)];const l=o?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const u=o?l.split(i):[""];if(o){if(t.indexOf(".")!==-1&&u[0]!=="")u.unshift("")}return{pathEnv:a,pathExt:u,pathExtExe:l}};const which=(t,r,i)=>{if(typeof r==="function"){i=r;r={}}if(!r)r={};const{pathEnv:o,pathExt:c,pathExtExe:u}=getPathInfo(t,r);const h=[];const step=i=>new Promise(((c,l)=>{if(i===o.length)return r.all&&h.length?c(h):l(getNotFoundError(t));const u=o[i];const d=/^".*"$/.test(u)?u.slice(1,-1):u;const p=a.join(d,t);const m=!d&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(subStep(m,i,0))}));const subStep=(t,i,o)=>new Promise(((a,d)=>{if(o===c.length)return a(step(i+1));const p=c[o];l(t+p,{pathExt:u},((c,l)=>{if(!c&&l){if(r.all)h.push(t+p);else return a(t+p)}return a(subStep(t,i,o+1))}))}));return i?step(0).then((t=>i(null,t)),i):step(0)};const whichSync=(t,r)=>{r=r||{};const{pathEnv:i,pathExt:o,pathExtExe:c}=getPathInfo(t,r);const u=[];for(let h=0;h<i.length;h++){const d=i[h];const p=/^".*"$/.test(d)?d.slice(1,-1):d;const m=a.join(p,t);const y=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;for(let t=0;t<o.length;t++){const i=y+o[t];try{const t=l.sync(i,{pathExt:c});if(t){if(r.all)u.push(i);else return i}}catch(t){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},9414:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},3401:(t,r,i)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var r=this;if(!(r instanceof Yallist)){r=new Yallist}r.tail=null;r.head=null;r.length=0;if(t&&typeof t.forEach==="function"){t.forEach((function(t){r.push(t)}))}else if(arguments.length>0){for(var i=0,o=arguments.length;i<o;i++){r.push(arguments[i])}}return r}Yallist.prototype.removeNode=function(t){if(t.list!==this){throw new Error("removing node which does not belong to this list")}var r=t.next;var i=t.prev;if(r){r.prev=i}if(i){i.next=r}if(t===this.head){this.head=r}if(t===this.tail){this.tail=i}t.list.length--;t.next=null;t.prev=null;t.list=null;return r};Yallist.prototype.unshiftNode=function(t){if(t===this.head){return}if(t.list){t.list.removeNode(t)}var r=this.head;t.list=this;t.next=r;if(r){r.prev=t}this.head=t;if(!this.tail){this.tail=t}this.length++};Yallist.prototype.pushNode=function(t){if(t===this.tail){return}if(t.list){t.list.removeNode(t)}var r=this.tail;t.list=this;t.prev=r;if(r){r.next=t}this.tail=t;if(!this.head){this.head=t}this.length++};Yallist.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++){push(this,arguments[t])}return this.length};Yallist.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++){unshift(this,arguments[t])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var t=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return t};Yallist.prototype.shift=function(){if(!this.head){return undefined}var t=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return t};Yallist.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,o=0;i!==null;o++){t.call(r,i.value,o,this);i=i.next}};Yallist.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,o=this.length-1;i!==null;o--){t.call(r,i.value,o,this);i=i.prev}};Yallist.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++){i=i.next}if(r===t&&i!==null){return i.value}};Yallist.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++){i=i.prev}if(r===t&&i!==null){return i.value}};Yallist.prototype.map=function(t,r){r=r||this;var i=new Yallist;for(var o=this.head;o!==null;){i.push(t.call(r,o.value,this));o=o.next}return i};Yallist.prototype.mapReverse=function(t,r){r=r||this;var i=new Yallist;for(var o=this.tail;o!==null;){i.push(t.call(r,o.value,this));o=o.prev}return i};Yallist.prototype.reduce=function(t,r){var i;var o=this.head;if(arguments.length>1){i=r}else if(this.head){o=this.head.next;i=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=0;o!==null;a++){i=t(i,o.value,a);o=o.next}return i};Yallist.prototype.reduceReverse=function(t,r){var i;var o=this.tail;if(arguments.length>1){i=r}else if(this.tail){o=this.tail.prev;i=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=this.length-1;o!==null;a--){i=t(i,o.value,a);o=o.prev}return i};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var r=0,i=this.head;i!==null;r++){t[r]=i.value;i=i.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var r=0,i=this.tail;i!==null;r++){t[r]=i.value;i=i.prev}return t};Yallist.prototype.slice=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}for(;a!==null&&o<r;o++,a=a.next){i.push(a.value)}return i};Yallist.prototype.sliceReverse=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=this.length,a=this.tail;a!==null&&o>r;o--){a=a.prev}for(;a!==null&&o>t;o--,a=a.prev){i.push(a.value)}return i};Yallist.prototype.splice=function(t,r,...i){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}var c=[];for(var o=0;a&&o<r;o++){c.push(a.value);a=this.removeNode(a)}if(a===null){a=this.tail}if(a!==this.head&&a!==this.tail){a=a.prev}for(var o=0;o<i.length;o++){a=insert(this,a,i[o])}return c};Yallist.prototype.reverse=function(){var t=this.head;var r=this.tail;for(var i=t;i!==null;i=i.prev){var o=i.prev;i.prev=i.next;i.next=o}this.head=r;this.tail=t;return this};function insert(t,r,i){var o=r===t.head?new Node(i,null,r,t):new Node(i,r,r.next,t);if(o.next===null){t.tail=o}if(o.prev===null){t.head=o}t.length++;return o}function push(t,r){t.tail=new Node(r,t.tail,null,t);if(!t.head){t.head=t.tail}t.length++}function unshift(t,r){t.head=new Node(r,null,t.head,t);if(!t.tail){t.tail=t.head}t.length++}function Node(t,r,i,o){if(!(this instanceof Node)){return new Node(t,r,i,o)}this.list=o;this.value=t;if(r){r.next=this;this.prev=r}else{this.prev=null}if(i){i.prev=this;this.next=i}else{this.next=null}}try{i(9414)(Yallist)}catch(t){}},8776:(t,r,i)=>{"use strict";i.r(r);var o=i(9306);var a=i(4101);var c=i.n(a);var l=i(7136);var u=i.n(l);var h=i(1017);var d=i.n(h);var p=i(5713);var m=i.n(p);var y=i(5656);var g=i.n(y);var v=i(9239);var b=i.n(v);var w=i(7147);var E=i.n(w);var S=i(5255);var x=i(2781);const R=require("stream/promises");async function isUrlOk(t){try{const r=await fetch(t,{method:"HEAD"});return r.status===200}catch{return false}}async function getRepoInfo(t,r){const[,i,o,a,c,...l]=t.pathname.split("/");const u=r?r.replace(/^\//,""):l.join("/");if(a===undefined||a===""&&c===undefined){try{const t=await fetch(`https://api.github.com/repos/${i}/${o}`);if(t.status!==200){return}const r=await t.json();return{username:i,name:o,branch:r["default_branch"],filePath:u}}catch{return}}const h=r?`${c}/${l.join("/")}`.replace(new RegExp(`/${u}|/$`),""):c;if(i&&o&&h&&a==="tree"){return{username:i,name:o,branch:h,filePath:u}}}function hasRepo({username:t,name:r,branch:i,filePath:o}){const a=`https://api.github.com/repos/${t}/${r}/contents`;const c=`${o?`/${o}`:""}/package.json`;return isUrlOk(a+c+`?ref=${i}`)}function existsInRepo(t){try{const r=new URL(t);return isUrlOk(r.href)}catch{return isUrlOk(`https://api.github.com/repos/vercel/next.js/contents/examples/${encodeURIComponent(t)}`)}}async function downloadTarStream(t){const r=await fetch(t);if(!r.body){throw new Error(`Failed to download: ${t}`)}return x.Readable.fromWeb(r.body)}async function downloadAndExtractRepo(t,{username:r,name:i,branch:o,filePath:a}){await(0,R.pipeline)(await downloadTarStream(`https://codeload.github.com/${r}/${i}/tar.gz/${o}`),S.x({cwd:t,strip:a?a.split("/").length+1:1,filter:t=>t.startsWith(`${i}-${o.replace(/\//g,"-")}${a?`/${a}/`:"/"}`)}))}async function downloadAndExtractExample(t,r){if(r==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}await(0,R.pipeline)(await downloadTarStream("https://codeload.github.com/vercel/next.js/tar.gz/canary"),S.x({cwd:t,strip:2+r.split("/").length,filter:t=>t.includes(`next.js-canary/examples/${r}/`)}))}var P=i(2081);function isInGitRepository(){try{(0,P.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,P.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,P.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let r=false;try{(0,P.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,P.execSync)("git init",{stdio:"ignore"});r=true;if(!isDefaultBranchSet()){(0,P.execSync)("git checkout -b main",{stdio:"ignore"})}(0,P.execSync)("git add -A",{stdio:"ignore"});(0,P.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(i){if(r){try{E().rmSync(d().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}var $=i(4488);var O=i.n($);async function install(t,r){const i=["install"];if(!r){console.log((0,o.yellow)("You appear to be offline.\nFalling back to the local cache."));i.push("--offline")}return new Promise(((r,o)=>{const a=O()(t,i,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});a.on("close",(a=>{if(a!==0){o({command:`${t} ${i.join(" ")}`});return}r()}))}))}function isFolderEmpty(t,r){const i=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const a=E().readdirSync(t).filter((t=>!i.includes(t)&&!/\.iml$/.test(t)));if(a.length>0){console.log(`The directory ${(0,o.green)(r)} contains files that could conflict:`);console.log();for(const r of a){try{const i=E().lstatSync(d().join(t,r));if(i.isDirectory()){console.log(` ${(0,o.blue)(r)}/`)}else{console.log(` ${r}`)}}catch{console.log(` ${r}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}const T=require("dns/promises");var A=i.n(T);var C=i(7310);var k=i.n(C);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,P.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch(t){return}}async function getOnline(){try{await A().lookup("registry.yarnpkg.com");return true}catch{const t=getProxy();if(!t){return false}const{hostname:r}=k().parse(t);if(!r){return false}try{await A().lookup(r);return true}catch{return false}}}async function isWriteable(t){try{await E().promises.access(t,(E().constants||E()).W_OK);return true}catch(t){return false}}var I=i(8695);const identity=t=>t;const copy=async(t,r,{cwd:i,rename:o=identity,parents:a=true}={})=>{const c=typeof t==="string"?[t]:t;if(c.length===0||!r){throw new TypeError("`src` and `dest` are required")}const l=await(0,I.async)(c,{cwd:i,dot:true,absolute:false,stats:false});const u=i?d().resolve(i,r):r;return Promise.all(l.map((async t=>{const r=d().dirname(t);const c=o(d().basename(t));const l=i?d().resolve(i,t):t;const h=a?d().join(u,r,c):d().join(u,c);await E().promises.mkdir(d().dirname(h),{recursive:true});return E().promises.copyFile(l,h)})))};var N=i(2037);var D=i.n(N);const L=require("fs/promises");var M=i.n(L);var j=i(8383);const U=JSON.parse('{"name":"create-next-app","version":"14.2.24","keywords":["react","next","next.js"],"description":"Create Next.js-powered React apps with one command","repository":{"type":"git","url":"https://github.com/vercel/next.js","directory":"packages/create-next-app"},"author":"Next.js Team <support@vercel.com>","license":"MIT","bin":{"create-next-app":"./dist/index.js"},"files":["dist"],"scripts":{"dev":"ncc build ./index.ts -w -o dist/","prerelease":"node ../../scripts/rm.mjs dist","release":"ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register","prepublishOnly":"cd ../../ && turbo run build","build":"pnpm release","lint-fix":"pnpm prettier -w --plugin prettier-plugin-tailwindcss \'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}\'"},"devDependencies":{"@types/async-retry":"1.4.2","@types/ci-info":"2.0.0","@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.4.2","@types/tar":"6.1.5","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","async-retry":"1.3.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","commander":"2.20.0","conf":"10.2.0","cross-spawn":"7.0.3","fast-glob":"3.3.1","picocolors":"1.0.0","prettier-plugin-tailwindcss":"0.3.0","prompts":"2.4.2","tar":"6.1.15","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.17.0"}}');const getTemplateFile=({template:t,mode:r,file:o})=>i.ab+"templates/"+t+"/"+r+"/"+o;const B=["app","pages","styles"];const installTemplate=async({appName:t,root:r,packageManager:a,isOnline:c,template:l,mode:u,tailwind:h,eslint:p,srcDir:m,importAlias:y})=>{var g;console.log((0,o.bold)(`Using ${a}.`));console.log("\nInitializing project with template:",l,"\n");const v=i.ab+"templates/"+l+"/"+u;const b=["**"];if(!p)b.push("!eslintrc.json");if(!h)b.push(u=="ts"?"tailwind.config.ts":"!tailwind.config.js","!postcss.config.mjs");await copy(b,r,{parents:true,cwd:v,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const w=d().join(r,u==="js"?"jsconfig.json":"tsconfig.json");await M().writeFile(w,(await M().readFile(w,"utf8")).replace(`"@/*": ["./*"]`,m?`"@/*": ["./src/*"]`:`"@/*": ["./*"]`).replace(`"@/*":`,`"${y}":`));if(y!=="@/*"){const t=await(0,I.async)("**/*",{cwd:r,dot:true,stats:false,ignore:["tsconfig.json","jsconfig.json",".git/**/*","**/fonts/**","**/favicon.ico"]});const i=new j.Sema(8,{capacity:t.length});await Promise.all(t.map((async t=>{await i.acquire();const o=d().join(r,t);if((await M().stat(o)).isFile()){await M().writeFile(o,(await M().readFile(o,"utf8")).replace(`@/`,`${y.replace(/\*/g,"")}`))}i.release()})))}if(m){await M().mkdir(d().join(r,"src"),{recursive:true});await Promise.all(B.map((async t=>{await M().rename(d().join(r,t),d().join(r,"src",t)).catch((t=>{if(t.code!=="ENOENT"){throw t}}))})));const t=l.startsWith("app");const i=d().join("src",t?"app":"pages",`${t?"page":"index"}.${u==="ts"?"tsx":"js"}`);await M().writeFile(i,(await M().readFile(i,"utf8")).replace(t?"app/page":"pages/index",t?"src/app/page":"src/pages/index"));if(h){const t=d().join(r,u==="ts"?"tailwind.config.ts":"tailwind.config.js");await M().writeFile(t,(await M().readFile(t,"utf8")).replace(/\.\/(\w+)\/\*\*\/\*\.\{js,ts,jsx,tsx,mdx\}/g,"./src/$1/**/*.{js,ts,jsx,tsx,mdx}"))}}const E=(g=process.env.NEXT_PRIVATE_TEST_VERSION)!==null&&g!==void 0?g:U.version;const S={name:t,version:"0.1.0",private:true,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"next lint"},dependencies:{react:"^18","react-dom":"^18",next:E},devDependencies:{}};if(u==="ts"){S.devDependencies={...S.devDependencies,typescript:"^5","@types/node":"^20","@types/react":"^18","@types/react-dom":"^18"}}if(h){S.devDependencies={...S.devDependencies,postcss:"^8",tailwindcss:"^3.4.1"}}if(p){S.devDependencies={...S.devDependencies,eslint:"^8","eslint-config-next":E}}const x=Object.keys(S.devDependencies).length;if(!x)delete S.devDependencies;await M().writeFile(d().join(r,"package.json"),JSON.stringify(S,null,2)+D().EOL);console.log("\nInstalling dependencies:");for(const t in S.dependencies)console.log(`- ${(0,o.cyan)(t)}`);if(x){console.log("\nInstalling devDependencies:");for(const t in S.devDependencies)console.log(`- ${(0,o.cyan)(t)}`)}console.log();await install(a,c)};class DownloadError extends Error{}async function createApp({appPath:t,packageManager:r,example:i,examplePath:a,typescript:c,tailwind:l,eslint:u,appRouter:h,srcDir:p,importAlias:m}){let y;const g=c?"ts":"js";const v=h?l?"app-tw":"app":l?"default-tw":"default";if(i){let t;try{t=new URL(i)}catch(t){const r=t;if(r.code!=="ERR_INVALID_URL"){console.error(t);process.exit(1)}}if(t){if(t.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,o.red)(`"${i}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}y=await getRepoInfo(t,a);if(!y){console.error(`Found invalid GitHub URL: ${(0,o.red)(`"${i}"`)}. Please fix the URL and try again.`);process.exit(1)}const r=await hasRepo(y);if(!r){console.error(`Could not locate the repository for ${(0,o.red)(`"${i}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(i!=="__internal-testing-retry"){const t=await existsInRepo(i);if(!t){console.error(`Could not locate an example named ${(0,o.red)(`"${i}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,o.red)(`"${i}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const w=d().resolve(t);if(!await isWriteable(d().dirname(w))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const S=d().basename(w);E().mkdirSync(w,{recursive:true});if(!isFolderEmpty(w,S)){process.exit(1)}const x=r==="yarn";const R=!x||await getOnline();const P=process.cwd();console.log(`Creating a new Next.js app in ${(0,o.green)(w)}.`);console.log();process.chdir(w);const $=d().join(w,"package.json");let O=false;if(i){try{if(y){const t=y;console.log(`Downloading files from repo ${(0,o.cyan)(i)}. This might take a moment.`);console.log();await b()((()=>downloadAndExtractRepo(w,t)),{retries:3})}else{console.log(`Downloading files for example ${(0,o.cyan)(i)}. This might take a moment.`);console.log();await b()((()=>downloadAndExtractExample(w,i)),{retries:3})}}catch(t){function isErrorLike(t){return typeof t==="object"&&t!==null&&typeof t.message==="string"}throw new DownloadError(isErrorLike(t)?t.message:t+"")}const t=d().join(w,".gitignore");if(!E().existsSync(t)){E().copyFileSync(getTemplateFile({template:v,mode:g,file:"gitignore"}),t)}const a=d().join(w,"tsconfig.json");if(E().existsSync(a)){E().copyFileSync(getTemplateFile({template:v,mode:"ts",file:"next-env.d.ts"}),d().join(w,"next-env.d.ts"))}O=E().existsSync($);if(O){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(r,R);console.log()}}else{await installTemplate({appName:S,root:w,template:v,mode:g,packageManager:r,isOnline:R,tailwind:l,eslint:u,srcDir:p,importAlias:m})}if(tryGitInit(w)){console.log("Initialized a git repository.");console.log()}let T;if(d().join(P,S)===t){T=S}else{T=t}console.log(`${(0,o.green)("Success!")} Created ${S} at ${t}`);if(O){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,o.cyan)(` ${r} ${x?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,o.cyan)(` ${r} ${x?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,o.cyan)(` ${r} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,o.cyan)(" cd"),T);console.log(` ${(0,o.cyan)(`${r} ${x?"":"run "}dev`)}`)}console.log()}function getPkgManager(){const t=process.env.npm_config_user_agent||"";if(t.startsWith("yarn")){return"yarn"}if(t.startsWith("pnpm")){return"pnpm"}if(t.startsWith("bun")){return"bun"}return"npm"}var H=i(2338);var z=i.n(H);function validateNpmName(t){const r=z()(t);if(r.validForNewPackages){return{valid:true}}return{valid:false,problems:[...r.errors||[],...r.warnings||[]]}}var V=i(7741);var G=i.n(V);let q="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const K=new(c().Command)(U.name).version(U.version).arguments("<project-directory>").usage(`${(0,o.green)("<project-directory>")} [options]`).action((t=>{q=t})).option("--ts, --typescript",`\n\n Initialize as a TypeScript project. (default)\n`).option("--js, --javascript",`\n\n Initialize as a JavaScript project.\n`).option("--tailwind",`\n\n Initialize with Tailwind CSS config. (default)\n`).option("--eslint",`\n\n Initialize with eslint config.\n`).option("--app",`\n\n Initialize as an App Router project.\n`).option("--src-dir",`\n\n Initialize inside a \`src/\` directory.\n`).option("--import-alias <alias-to-configure>",`\n\n Specify import alias to use (default "@/*").\n`).option("--use-npm",`\n\n Explicitly tell the CLI to bootstrap the application using npm\n`).option("--use-pnpm",`\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`).option("--use-yarn",`\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`).option("--use-bun",`\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`).option("-e, --example [name]|[github-url]",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Next.js repo or a GitHub URL. The URL can use\n any branch and/or subdirectory\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).option("--reset-preferences",`\n\n Explicitly tell the CLI to reset any stored preferences\n`).allowUnknownOption().parse(process.argv);const W=!!K.useNpm?"npm":!!K.usePnpm?"pnpm":!!K.useYarn?"yarn":!!K.useBun?"bun":getPkgManager();async function run(){const t=new(u())({projectName:"create-next-app"});if(K.resetPreferences){t.clear();console.log(`Preferences reset successfully`);return}if(typeof q==="string"){q=q.trim()}if(!q){const t=await m()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const r=validateNpmName(d().basename(d().resolve(t)));if(r.valid){return true}return"Invalid project name: "+r.problems[0]}});if(typeof t.path==="string"){q=t.path.trim()}}if(!q){console.log("\nPlease specify the project directory:\n"+` ${(0,o.cyan)(K.name())} ${(0,o.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,o.cyan)(K.name())} ${(0,o.green)("my-next-app")}\n\n`+`Run ${(0,o.cyan)(`${K.name()} --help`)} to see all options.`);process.exit(1)}const r=d().resolve(q);const i=d().basename(r);const a=validateNpmName(i);if(!a.valid){console.error(`Could not create a project called ${(0,o.red)(`"${i}"`)} because of npm naming restrictions:`);a.problems.forEach((t=>console.error(` ${(0,o.red)((0,o.bold)("*"))} ${t}`)));process.exit(1)}if(K.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}const c=d().resolve(r);const l=d().basename(c);const h=E().existsSync(c);if(h&&!isFolderEmpty(c,l)){process.exit(1)}const p=typeof K.example==="string"&&K.example.trim();const y=t.get("preferences")||{};if(!p){const t={typescript:true,eslint:true,tailwind:true,app:true,srcDir:false,importAlias:"@/*",customizeImportAlias:false};const getPrefOrDefault=r=>{var i;return(i=y[r])!==null&&i!==void 0?i:t[r]};if(!K.typescript&&!K.javascript){if(G().isCI){K.typescript=getPrefOrDefault("typescript")}else{const t=(0,o.blue)("TypeScript");const{typescript:r}=await m()({type:"toggle",name:"typescript",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});K.typescript=Boolean(r);K.javascript=!Boolean(r);y.typescript=Boolean(r)}}if(!process.argv.includes("--eslint")&&!process.argv.includes("--no-eslint")){if(G().isCI){K.eslint=getPrefOrDefault("eslint")}else{const t=(0,o.blue)("ESLint");const{eslint:r}=await m()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});K.eslint=Boolean(r);y.eslint=Boolean(r)}}if(!process.argv.includes("--tailwind")&&!process.argv.includes("--no-tailwind")){if(G().isCI){K.tailwind=getPrefOrDefault("tailwind")}else{const t=(0,o.blue)("Tailwind CSS");const{tailwind:r}=await m()({onState:onPromptState,type:"toggle",name:"tailwind",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("tailwind"),active:"Yes",inactive:"No"});K.tailwind=Boolean(r);y.tailwind=Boolean(r)}}if(!process.argv.includes("--src-dir")&&!process.argv.includes("--no-src-dir")){if(G().isCI){K.srcDir=getPrefOrDefault("srcDir")}else{const t=(0,o.blue)("`src/` directory");const{srcDir:r}=await m()({onState:onPromptState,type:"toggle",name:"srcDir",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("srcDir"),active:"Yes",inactive:"No"});K.srcDir=Boolean(r);y.srcDir=Boolean(r)}}if(!process.argv.includes("--app")&&!process.argv.includes("--no-app")){if(G().isCI){K.app=getPrefOrDefault("app")}else{const t=(0,o.blue)("App Router");const{appRouter:r}=await m()({onState:onPromptState,type:"toggle",name:"appRouter",message:`Would you like to use ${t}? (recommended)`,initial:getPrefOrDefault("app"),active:"Yes",inactive:"No"});K.app=Boolean(r)}}const r=/^[^*"]+\/\*\s*$/;if(typeof K.importAlias!=="string"||!r.test(K.importAlias)){if(G().isCI){K.importAlias=t.importAlias}else if(process.argv.includes("--no-import-alias")){K.importAlias=t.importAlias}else{const i=(0,o.blue)("import alias");const{customizeImportAlias:a}=await m()({onState:onPromptState,type:"toggle",name:"customizeImportAlias",message:`Would you like to customize the default ${i} (${t.importAlias})?`,initial:getPrefOrDefault("customizeImportAlias"),active:"Yes",inactive:"No"});if(!a){K.importAlias=t.importAlias}else{const{importAlias:t}=await m()({onState:onPromptState,type:"text",name:"importAlias",message:`What ${i} would you like configured?`,initial:getPrefOrDefault("importAlias"),validate:t=>r.test(t)?true:"Import alias must follow the pattern <prefix>/*"});K.importAlias=t;y.importAlias=t}}}}try{await createApp({appPath:r,packageManager:W,example:p&&p!=="default"?p:undefined,examplePath:K.examplePath,typescript:K.typescript,tailwind:K.tailwind,eslint:K.eslint,appRouter:K.app,srcDir:K.srcDir,importAlias:K.importAlias})}catch(t){if(!(t instanceof DownloadError)){throw t}const i=await m()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${p}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!i.builtin){throw t}await createApp({appPath:r,packageManager:W,typescript:K.typescript,eslint:K.eslint,tailwind:K.tailwind,appRouter:K.app,srcDir:K.srcDir,importAlias:K.importAlias})}t.set("preferences",y)}const Y=g()(U).catch((()=>null));async function notifyUpdate(){try{const t=await Y;if(t===null||t===void 0?void 0:t.latest){const t=W==="yarn"?"yarn global add create-next-app":W==="pnpm"?"pnpm add -g create-next-app":W==="bun"?"bun add -g create-next-app":"npm i -g create-next-app";console.log((0,o.yellow)((0,o.bold)("A new version of `create-next-app` is available!"))+"\n"+"You can update by running: "+(0,o.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,o.cyan)(t.command)} has failed.`)}else{console.log((0,o.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},9491:t=>{"use strict";t.exports=require("assert")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},7918:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},9520:t=>{"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3113:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')},6107:t=>{"use strict";t.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')}};var r={};function __nccwpck_require__(i){var o=r[i];if(o!==undefined){return o.exports}var a=r[i]={id:i,loaded:false,exports:{}};var c=true;try{t[i].call(a.exports,a,a.exports,__nccwpck_require__);c=false}finally{if(c)delete r[i]}a.loaded=true;return a.exports}(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var i in r){if(__nccwpck_require__.o(r,i)&&!__nccwpck_require__.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:r[i]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=t=>{t.paths=[];if(!t.children)t.children=[];return t}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(8776);module.exports=i})();
74
+ (function(t,i){true?i(r):0})(this,(function(t){"use strict";function merge(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++){r[i]=arguments[i]}if(r.length>1){r[0]=r[0].slice(0,-1);var o=r.length-1;for(var a=1;a<o;++a){r[a]=r[a].slice(1,-1)}r[o]=r[o].slice(1);return r.join("")}else{return r[0]}}function subexp(t){return"(?:"+t+")"}function typeOf(t){return t===undefined?"undefined":t===null?"null":Object.prototype.toString.call(t).split(" ").pop().split("]").shift().toLowerCase()}function toUpperCase(t){return t.toUpperCase()}function toArray(t){return t!==undefined&&t!==null?t instanceof Array?t:typeof t.length!=="number"||t.split||t.setInterval||t.call?[t]:Array.prototype.slice.call(t):[]}function assign(t,r){var i=t;if(r){for(var o in r){i[o]=r[o]}}return i}function buildExps(t){var r="[A-Za-z]",i="[\\x0D]",o="[0-9]",a="[\\x22]",c=merge(o,"[A-Fa-f]"),l="[\\x0A]",u="[\\x20]",h=subexp(subexp("%[EFef]"+c+"%"+c+c+"%"+c+c)+"|"+subexp("%[89A-Fa-f]"+c+"%"+c+c)+"|"+subexp("%"+c+c)),d="[\\:\\/\\?\\#\\[\\]\\@]",p="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",m=merge(d,p),y=t?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",g=t?"[\\uE000-\\uF8FF]":"[]",v=merge(r,o,"[\\-\\.\\_\\~]",y),b=subexp(r+merge(r,o,"[\\+\\-\\.]")+"*"),w=subexp(subexp(h+"|"+merge(v,p,"[\\:]"))+"*"),E=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+o)+"|"+subexp("1"+o+o)+"|"+subexp("[1-9]"+o)+"|"+o),S=subexp(subexp("25[0-5]")+"|"+subexp("2[0-4]"+o)+"|"+subexp("1"+o+o)+"|"+subexp("0?[1-9]"+o)+"|0?0?"+o),x=subexp(S+"\\."+S+"\\."+S+"\\."+S),R=subexp(c+"{1,4}"),P=subexp(subexp(R+"\\:"+R)+"|"+x),$=subexp(subexp(R+"\\:")+"{6}"+P),O=subexp("\\:\\:"+subexp(R+"\\:")+"{5}"+P),T=subexp(subexp(R)+"?\\:\\:"+subexp(R+"\\:")+"{4}"+P),A=subexp(subexp(subexp(R+"\\:")+"{0,1}"+R)+"?\\:\\:"+subexp(R+"\\:")+"{3}"+P),C=subexp(subexp(subexp(R+"\\:")+"{0,2}"+R)+"?\\:\\:"+subexp(R+"\\:")+"{2}"+P),k=subexp(subexp(subexp(R+"\\:")+"{0,3}"+R)+"?\\:\\:"+R+"\\:"+P),I=subexp(subexp(subexp(R+"\\:")+"{0,4}"+R)+"?\\:\\:"+P),N=subexp(subexp(subexp(R+"\\:")+"{0,5}"+R)+"?\\:\\:"+R),D=subexp(subexp(subexp(R+"\\:")+"{0,6}"+R)+"?\\:\\:"),L=subexp([$,O,T,A,C,k,I,N,D].join("|")),M=subexp(subexp(v+"|"+h)+"+"),j=subexp(L+"\\%25"+M),U=subexp(L+subexp("\\%25|\\%(?!"+c+"{2})")+M),B=subexp("[vV]"+c+"+\\."+merge(v,p,"[\\:]")+"+"),H=subexp("\\["+subexp(U+"|"+L+"|"+B)+"\\]"),z=subexp(subexp(h+"|"+merge(v,p))+"*"),V=subexp(H+"|"+x+"(?!"+z+")"+"|"+z),G=subexp(o+"*"),q=subexp(subexp(w+"@")+"?"+V+subexp("\\:"+G)+"?"),K=subexp(h+"|"+merge(v,p,"[\\:\\@]")),W=subexp(K+"*"),Y=subexp(K+"+"),Z=subexp(subexp(h+"|"+merge(v,p,"[\\@]"))+"+"),X=subexp(subexp("\\/"+W)+"*"),J=subexp("\\/"+subexp(Y+X)+"?"),Q=subexp(Z+X),ee=subexp(Y+X),te="(?!"+K+")",re=subexp(X+"|"+J+"|"+Q+"|"+ee+"|"+te),se=subexp(subexp(K+"|"+merge("[\\/\\?]",g))+"*"),ie=subexp(subexp(K+"|[\\/\\?]")+"*"),ne=subexp(subexp("\\/\\/"+q+X)+"|"+J+"|"+ee+"|"+te),oe=subexp(b+"\\:"+ne+subexp("\\?"+se)+"?"+subexp("\\#"+ie)+"?"),ae=subexp(subexp("\\/\\/"+q+X)+"|"+J+"|"+Q+"|"+te),ce=subexp(ae+subexp("\\?"+se)+"?"+subexp("\\#"+ie)+"?"),le=subexp(oe+"|"+ce),ue=subexp(b+"\\:"+ne+subexp("\\?"+se)+"?"),he="^("+b+")\\:"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+ee+"|"+te+")")+subexp("\\?("+se+")")+"?"+subexp("\\#("+ie+")")+"?$",fe="^(){0}"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+Q+"|"+te+")")+subexp("\\?("+se+")")+"?"+subexp("\\#("+ie+")")+"?$",de="^("+b+")\\:"+subexp(subexp("\\/\\/("+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?)")+"?("+X+"|"+J+"|"+ee+"|"+te+")")+subexp("\\?("+se+")")+"?$",pe="^"+subexp("\\#("+ie+")")+"?$",me="^"+subexp("("+w+")@")+"?("+V+")"+subexp("\\:("+G+")")+"?$";return{NOT_SCHEME:new RegExp(merge("[^]",r,o,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(merge("[^\\%\\:]",v,p),"g"),NOT_HOST:new RegExp(merge("[^\\%\\[\\]\\:]",v,p),"g"),NOT_PATH:new RegExp(merge("[^\\%\\/\\:\\@]",v,p),"g"),NOT_PATH_NOSCHEME:new RegExp(merge("[^\\%\\/\\@]",v,p),"g"),NOT_QUERY:new RegExp(merge("[^\\%]",v,p,"[\\:\\@\\/\\?]",g),"g"),NOT_FRAGMENT:new RegExp(merge("[^\\%]",v,p,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(merge("[^]",v,p),"g"),UNRESERVED:new RegExp(v,"g"),OTHER_CHARS:new RegExp(merge("[^\\%]",v,m),"g"),PCT_ENCODED:new RegExp(h,"g"),IPV4ADDRESS:new RegExp("^("+x+")$"),IPV6ADDRESS:new RegExp("^\\[?("+L+")"+subexp(subexp("\\%25|\\%(?!"+c+"{2})")+"("+M+")")+"?\\]?$")}}var r=buildExps(false);var i=buildExps(true);var o=function(){function sliceIterator(t,r){var i=[];var o=true;var a=false;var c=undefined;try{for(var l=t[Symbol.iterator](),u;!(o=(u=l.next()).done);o=true){i.push(u.value);if(r&&i.length===r)break}}catch(t){a=true;c=t}finally{try{if(!o&&l["return"])l["return"]()}finally{if(a)throw c}}return i}return function(t,r){if(Array.isArray(t)){return t}else if(Symbol.iterator in Object(t)){return sliceIterator(t,r)}else{throw new TypeError("Invalid attempt to destructure non-iterable instance")}}}();var toConsumableArray=function(t){if(Array.isArray(t)){for(var r=0,i=Array(t.length);r<t.length;r++)i[r]=t[r];return i}else{return Array.from(t)}};var a=2147483647;var c=36;var l=1;var u=26;var h=38;var d=700;var p=72;var m=128;var y="-";var g=/^xn--/;var v=/[^\0-\x7E]/;var b=/[\x2E\u3002\uFF0E\uFF61]/g;var w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"};var E=c-l;var S=Math.floor;var x=String.fromCharCode;function error$1(t){throw new RangeError(w[t])}function map(t,r){var i=[];var o=t.length;while(o--){i[o]=r(t[o])}return i}function mapDomain(t,r){var i=t.split("@");var o="";if(i.length>1){o=i[0]+"@";t=i[1]}t=t.replace(b,".");var a=t.split(".");var c=map(a,r).join(".");return o+c}function ucs2decode(t){var r=[];var i=0;var o=t.length;while(i<o){var a=t.charCodeAt(i++);if(a>=55296&&a<=56319&&i<o){var c=t.charCodeAt(i++);if((c&64512)==56320){r.push(((a&1023)<<10)+(c&1023)+65536)}else{r.push(a);i--}}else{r.push(a)}}return r}var R=function ucs2encode(t){return String.fromCodePoint.apply(String,toConsumableArray(t))};var P=function basicToDigit(t){if(t-48<10){return t-22}if(t-65<26){return t-65}if(t-97<26){return t-97}return c};var $=function digitToBasic(t,r){return t+22+75*(t<26)-((r!=0)<<5)};var O=function adapt(t,r,i){var o=0;t=i?S(t/d):t>>1;t+=S(t/r);for(;t>E*u>>1;o+=c){t=S(t/E)}return S(o+(E+1)*t/(t+h))};var T=function decode(t){var r=[];var i=t.length;var o=0;var h=m;var d=p;var g=t.lastIndexOf(y);if(g<0){g=0}for(var v=0;v<g;++v){if(t.charCodeAt(v)>=128){error$1("not-basic")}r.push(t.charCodeAt(v))}for(var b=g>0?g+1:0;b<i;){var w=o;for(var E=1,x=c;;x+=c){if(b>=i){error$1("invalid-input")}var R=P(t.charCodeAt(b++));if(R>=c||R>S((a-o)/E)){error$1("overflow")}o+=R*E;var $=x<=d?l:x>=d+u?u:x-d;if(R<$){break}var T=c-$;if(E>S(a/T)){error$1("overflow")}E*=T}var A=r.length+1;d=O(o-w,A,w==0);if(S(o/A)>a-h){error$1("overflow")}h+=S(o/A);o%=A;r.splice(o++,0,h)}return String.fromCodePoint.apply(String,r)};var A=function encode(t){var r=[];t=ucs2decode(t);var i=t.length;var o=m;var h=0;var d=p;var g=true;var v=false;var b=undefined;try{for(var w=t[Symbol.iterator](),E;!(g=(E=w.next()).done);g=true){var R=E.value;if(R<128){r.push(x(R))}}}catch(t){v=true;b=t}finally{try{if(!g&&w.return){w.return()}}finally{if(v){throw b}}}var P=r.length;var T=P;if(P){r.push(y)}while(T<i){var A=a;var C=true;var k=false;var I=undefined;try{for(var N=t[Symbol.iterator](),D;!(C=(D=N.next()).done);C=true){var L=D.value;if(L>=o&&L<A){A=L}}}catch(t){k=true;I=t}finally{try{if(!C&&N.return){N.return()}}finally{if(k){throw I}}}var M=T+1;if(A-o>S((a-h)/M)){error$1("overflow")}h+=(A-o)*M;o=A;var j=true;var U=false;var B=undefined;try{for(var H=t[Symbol.iterator](),z;!(j=(z=H.next()).done);j=true){var V=z.value;if(V<o&&++h>a){error$1("overflow")}if(V==o){var G=h;for(var q=c;;q+=c){var K=q<=d?l:q>=d+u?u:q-d;if(G<K){break}var W=G-K;var Y=c-K;r.push(x($(K+W%Y,0)));G=S(W/Y)}r.push(x($(G,0)));d=O(h,M,T==P);h=0;++T}}}catch(t){U=true;B=t}finally{try{if(!j&&H.return){H.return()}}finally{if(U){throw B}}}++h;++o}return r.join("")};var C=function toUnicode(t){return mapDomain(t,(function(t){return g.test(t)?T(t.slice(4).toLowerCase()):t}))};var k=function toASCII(t){return mapDomain(t,(function(t){return v.test(t)?"xn--"+A(t):t}))};var I={version:"2.1.0",ucs2:{decode:ucs2decode,encode:R},decode:T,encode:A,toASCII:k,toUnicode:C};var N={};function pctEncChar(t){var r=t.charCodeAt(0);var i=void 0;if(r<16)i="%0"+r.toString(16).toUpperCase();else if(r<128)i="%"+r.toString(16).toUpperCase();else if(r<2048)i="%"+(r>>6|192).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();else i="%"+(r>>12|224).toString(16).toUpperCase()+"%"+(r>>6&63|128).toString(16).toUpperCase()+"%"+(r&63|128).toString(16).toUpperCase();return i}function pctDecChars(t){var r="";var i=0;var o=t.length;while(i<o){var a=parseInt(t.substr(i+1,2),16);if(a<128){r+=String.fromCharCode(a);i+=3}else if(a>=194&&a<224){if(o-i>=6){var c=parseInt(t.substr(i+4,2),16);r+=String.fromCharCode((a&31)<<6|c&63)}else{r+=t.substr(i,6)}i+=6}else if(a>=224){if(o-i>=9){var l=parseInt(t.substr(i+4,2),16);var u=parseInt(t.substr(i+7,2),16);r+=String.fromCharCode((a&15)<<12|(l&63)<<6|u&63)}else{r+=t.substr(i,9)}i+=9}else{r+=t.substr(i,3);i+=3}}return r}function _normalizeComponentEncoding(t,r){function decodeUnreserved(t){var i=pctDecChars(t);return!i.match(r.UNRESERVED)?t:i}if(t.scheme)t.scheme=String(t.scheme).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_SCHEME,"");if(t.userinfo!==undefined)t.userinfo=String(t.userinfo).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_USERINFO,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.host!==undefined)t.host=String(t.host).replace(r.PCT_ENCODED,decodeUnreserved).toLowerCase().replace(r.NOT_HOST,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.path!==undefined)t.path=String(t.path).replace(r.PCT_ENCODED,decodeUnreserved).replace(t.scheme?r.NOT_PATH:r.NOT_PATH_NOSCHEME,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.query!==undefined)t.query=String(t.query).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_QUERY,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);if(t.fragment!==undefined)t.fragment=String(t.fragment).replace(r.PCT_ENCODED,decodeUnreserved).replace(r.NOT_FRAGMENT,pctEncChar).replace(r.PCT_ENCODED,toUpperCase);return t}function _stripLeadingZeros(t){return t.replace(/^0*(.*)/,"$1")||"0"}function _normalizeIPv4(t,r){var i=t.match(r.IPV4ADDRESS)||[];var a=o(i,2),c=a[1];if(c){return c.split(".").map(_stripLeadingZeros).join(".")}else{return t}}function _normalizeIPv6(t,r){var i=t.match(r.IPV6ADDRESS)||[];var a=o(i,3),c=a[1],l=a[2];if(c){var u=c.toLowerCase().split("::").reverse(),h=o(u,2),d=h[0],p=h[1];var m=p?p.split(":").map(_stripLeadingZeros):[];var y=d.split(":").map(_stripLeadingZeros);var g=r.IPV4ADDRESS.test(y[y.length-1]);var v=g?7:8;var b=y.length-v;var w=Array(v);for(var E=0;E<v;++E){w[E]=m[E]||y[b+E]||""}if(g){w[v-1]=_normalizeIPv4(w[v-1],r)}var S=w.reduce((function(t,r,i){if(!r||r==="0"){var o=t[t.length-1];if(o&&o.index+o.length===i){o.length++}else{t.push({index:i,length:1})}}return t}),[]);var x=S.sort((function(t,r){return r.length-t.length}))[0];var R=void 0;if(x&&x.length>1){var P=w.slice(0,x.index);var $=w.slice(x.index+x.length);R=P.join(":")+"::"+$.join(":")}else{R=w.join(":")}if(l){R+="%"+l}return R}else{return t}}var D=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;var L="".match(/(){0}/)[1]===undefined;function parse(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a={};var c=o.iri!==false?i:r;if(o.reference==="suffix")t=(o.scheme?o.scheme+":":"")+"//"+t;var l=t.match(D);if(l){if(L){a.scheme=l[1];a.userinfo=l[3];a.host=l[4];a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=l[7];a.fragment=l[8];if(isNaN(a.port)){a.port=l[5]}}else{a.scheme=l[1]||undefined;a.userinfo=t.indexOf("@")!==-1?l[3]:undefined;a.host=t.indexOf("//")!==-1?l[4]:undefined;a.port=parseInt(l[5],10);a.path=l[6]||"";a.query=t.indexOf("?")!==-1?l[7]:undefined;a.fragment=t.indexOf("#")!==-1?l[8]:undefined;if(isNaN(a.port)){a.port=t.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?l[4]:undefined}}if(a.host){a.host=_normalizeIPv6(_normalizeIPv4(a.host,c),c)}if(a.scheme===undefined&&a.userinfo===undefined&&a.host===undefined&&a.port===undefined&&!a.path&&a.query===undefined){a.reference="same-document"}else if(a.scheme===undefined){a.reference="relative"}else if(a.fragment===undefined){a.reference="absolute"}else{a.reference="uri"}if(o.reference&&o.reference!=="suffix"&&o.reference!==a.reference){a.error=a.error||"URI is not a "+o.reference+" reference."}var u=N[(o.scheme||a.scheme||"").toLowerCase()];if(!o.unicodeSupport&&(!u||!u.unicodeSupport)){if(a.host&&(o.domainHost||u&&u.domainHost)){try{a.host=I.toASCII(a.host.replace(c.PCT_ENCODED,pctDecChars).toLowerCase())}catch(t){a.error=a.error||"Host's domain name can not be converted to ASCII via punycode: "+t}}_normalizeComponentEncoding(a,r)}else{_normalizeComponentEncoding(a,c)}if(u&&u.parse){u.parse(a,o)}}else{a.error=a.error||"URI can not be parsed."}return a}function _recomposeAuthority(t,o){var a=o.iri!==false?i:r;var c=[];if(t.userinfo!==undefined){c.push(t.userinfo);c.push("@")}if(t.host!==undefined){c.push(_normalizeIPv6(_normalizeIPv4(String(t.host),a),a).replace(a.IPV6ADDRESS,(function(t,r,i){return"["+r+(i?"%25"+i:"")+"]"})))}if(typeof t.port==="number"||typeof t.port==="string"){c.push(":");c.push(String(t.port))}return c.length?c.join(""):undefined}var M=/^\.\.?\//;var j=/^\/\.(\/|$)/;var U=/^\/\.\.(\/|$)/;var B=/^\/?(?:.|\n)*?(?=\/|$)/;function removeDotSegments(t){var r=[];while(t.length){if(t.match(M)){t=t.replace(M,"")}else if(t.match(j)){t=t.replace(j,"/")}else if(t.match(U)){t=t.replace(U,"/");r.pop()}else if(t==="."||t===".."){t=""}else{var i=t.match(B);if(i){var o=i[0];t=t.slice(o.length);r.push(o)}else{throw new Error("Unexpected dot segment condition")}}}return r.join("")}function serialize(t){var o=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var a=o.iri?i:r;var c=[];var l=N[(o.scheme||t.scheme||"").toLowerCase()];if(l&&l.serialize)l.serialize(t,o);if(t.host){if(a.IPV6ADDRESS.test(t.host)){}else if(o.domainHost||l&&l.domainHost){try{t.host=!o.iri?I.toASCII(t.host.replace(a.PCT_ENCODED,pctDecChars).toLowerCase()):I.toUnicode(t.host)}catch(r){t.error=t.error||"Host's domain name can not be converted to "+(!o.iri?"ASCII":"Unicode")+" via punycode: "+r}}}_normalizeComponentEncoding(t,a);if(o.reference!=="suffix"&&t.scheme){c.push(t.scheme);c.push(":")}var u=_recomposeAuthority(t,o);if(u!==undefined){if(o.reference!=="suffix"){c.push("//")}c.push(u);if(t.path&&t.path.charAt(0)!=="/"){c.push("/")}}if(t.path!==undefined){var h=t.path;if(!o.absolutePath&&(!l||!l.absolutePath)){h=removeDotSegments(h)}if(u===undefined){h=h.replace(/^\/\//,"/%2F")}c.push(h)}if(t.query!==undefined){c.push("?");c.push(t.query)}if(t.fragment!==undefined){c.push("#");c.push(t.fragment)}return c.join("")}function resolveComponents(t,r){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var o=arguments[3];var a={};if(!o){t=parse(serialize(t,i),i);r=parse(serialize(r,i),i)}i=i||{};if(!i.tolerant&&r.scheme){a.scheme=r.scheme;a.userinfo=r.userinfo;a.host=r.host;a.port=r.port;a.path=removeDotSegments(r.path||"");a.query=r.query}else{if(r.userinfo!==undefined||r.host!==undefined||r.port!==undefined){a.userinfo=r.userinfo;a.host=r.host;a.port=r.port;a.path=removeDotSegments(r.path||"");a.query=r.query}else{if(!r.path){a.path=t.path;if(r.query!==undefined){a.query=r.query}else{a.query=t.query}}else{if(r.path.charAt(0)==="/"){a.path=removeDotSegments(r.path)}else{if((t.userinfo!==undefined||t.host!==undefined||t.port!==undefined)&&!t.path){a.path="/"+r.path}else if(!t.path){a.path=r.path}else{a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+r.path}a.path=removeDotSegments(a.path)}a.query=r.query}a.userinfo=t.userinfo;a.host=t.host;a.port=t.port}a.scheme=t.scheme}a.fragment=r.fragment;return a}function resolve(t,r,i){var o=assign({scheme:"null"},i);return serialize(resolveComponents(parse(t,o),parse(r,o),o,true),o)}function normalize(t,r){if(typeof t==="string"){t=serialize(parse(t,r),r)}else if(typeOf(t)==="object"){t=parse(serialize(t,r),r)}return t}function equal(t,r,i){if(typeof t==="string"){t=serialize(parse(t,i),i)}else if(typeOf(t)==="object"){t=serialize(t,i)}if(typeof r==="string"){r=serialize(parse(r,i),i)}else if(typeOf(r)==="object"){r=serialize(r,i)}return t===r}function escapeComponent(t,o){return t&&t.toString().replace(!o||!o.iri?r.ESCAPE:i.ESCAPE,pctEncChar)}function unescapeComponent(t,o){return t&&t.toString().replace(!o||!o.iri?r.PCT_ENCODED:i.PCT_ENCODED,pctDecChars)}var H={scheme:"http",domainHost:true,parse:function parse(t,r){if(!t.host){t.error=t.error||"HTTP URIs must have a host."}return t},serialize:function serialize(t,r){var i=String(t.scheme).toLowerCase()==="https";if(t.port===(i?443:80)||t.port===""){t.port=undefined}if(!t.path){t.path="/"}return t}};var z={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize};function isSecure(t){return typeof t.secure==="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}var V={scheme:"ws",domainHost:true,parse:function parse(t,r){var i=t;i.secure=isSecure(i);i.resourceName=(i.path||"/")+(i.query?"?"+i.query:"");i.path=undefined;i.query=undefined;return i},serialize:function serialize(t,r){if(t.port===(isSecure(t)?443:80)||t.port===""){t.port=undefined}if(typeof t.secure==="boolean"){t.scheme=t.secure?"wss":"ws";t.secure=undefined}if(t.resourceName){var i=t.resourceName.split("?"),a=o(i,2),c=a[0],l=a[1];t.path=c&&c!=="/"?c:undefined;t.query=l;t.resourceName=undefined}t.fragment=undefined;return t}};var G={scheme:"wss",domainHost:V.domainHost,parse:V.parse,serialize:V.serialize};var q={};var K=true;var W="[A-Za-z0-9\\-\\.\\_\\~"+(K?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]";var Y="[0-9A-Fa-f]";var Z=subexp(subexp("%[EFef]"+Y+"%"+Y+Y+"%"+Y+Y)+"|"+subexp("%[89A-Fa-f]"+Y+"%"+Y+Y)+"|"+subexp("%"+Y+Y));var X="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";var J="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";var Q=merge(J,'[\\"\\\\]');var ee="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";var te=new RegExp(W,"g");var re=new RegExp(Z,"g");var se=new RegExp(merge("[^]",X,"[\\.]",'[\\"]',Q),"g");var ie=new RegExp(merge("[^]",W,ee),"g");var ne=ie;function decodeUnreserved(t){var r=pctDecChars(t);return!r.match(te)?t:r}var oe={scheme:"mailto",parse:function parse$$1(t,r){var i=t;var o=i.to=i.path?i.path.split(","):[];i.path=undefined;if(i.query){var a=false;var c={};var l=i.query.split("&");for(var u=0,h=l.length;u<h;++u){var d=l[u].split("=");switch(d[0]){case"to":var p=d[1].split(",");for(var m=0,y=p.length;m<y;++m){o.push(p[m])}break;case"subject":i.subject=unescapeComponent(d[1],r);break;case"body":i.body=unescapeComponent(d[1],r);break;default:a=true;c[unescapeComponent(d[0],r)]=unescapeComponent(d[1],r);break}}if(a)i.headers=c}i.query=undefined;for(var g=0,v=o.length;g<v;++g){var b=o[g].split("@");b[0]=unescapeComponent(b[0]);if(!r.unicodeSupport){try{b[1]=I.toASCII(unescapeComponent(b[1],r).toLowerCase())}catch(t){i.error=i.error||"Email address's domain name can not be converted to ASCII via punycode: "+t}}else{b[1]=unescapeComponent(b[1],r).toLowerCase()}o[g]=b.join("@")}return i},serialize:function serialize$$1(t,r){var i=t;var o=toArray(t.to);if(o){for(var a=0,c=o.length;a<c;++a){var l=String(o[a]);var u=l.lastIndexOf("@");var h=l.slice(0,u).replace(re,decodeUnreserved).replace(re,toUpperCase).replace(se,pctEncChar);var d=l.slice(u+1);try{d=!r.iri?I.toASCII(unescapeComponent(d,r).toLowerCase()):I.toUnicode(d)}catch(t){i.error=i.error||"Email address's domain name can not be converted to "+(!r.iri?"ASCII":"Unicode")+" via punycode: "+t}o[a]=h+"@"+d}i.path=o.join(",")}var p=t.headers=t.headers||{};if(t.subject)p["subject"]=t.subject;if(t.body)p["body"]=t.body;var m=[];for(var y in p){if(p[y]!==q[y]){m.push(y.replace(re,decodeUnreserved).replace(re,toUpperCase).replace(ie,pctEncChar)+"="+p[y].replace(re,decodeUnreserved).replace(re,toUpperCase).replace(ne,pctEncChar))}}if(m.length){i.query=m.join("&")}return i}};var ae=/^([^\:]+)\:(.*)/;var ce={scheme:"urn",parse:function parse$$1(t,r){var i=t.path&&t.path.match(ae);var o=t;if(i){var a=r.scheme||o.scheme||"urn";var c=i[1].toLowerCase();var l=i[2];var u=a+":"+(r.nid||c);var h=N[u];o.nid=c;o.nss=l;o.path=undefined;if(h){o=h.parse(o,r)}}else{o.error=o.error||"URN can not be parsed."}return o},serialize:function serialize$$1(t,r){var i=r.scheme||t.scheme||"urn";var o=t.nid;var a=i+":"+(r.nid||o);var c=N[a];if(c){t=c.serialize(t,r)}var l=t;var u=t.nss;l.path=(o||r.nid)+":"+u;return l}};var le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;var ue={scheme:"urn:uuid",parse:function parse(t,r){var i=t;i.uuid=i.nss;i.nss=undefined;if(!r.tolerant&&(!i.uuid||!i.uuid.match(le))){i.error=i.error||"UUID is not valid."}return i},serialize:function serialize(t,r){var i=t;i.nss=(t.uuid||"").toLowerCase();return i}};N[H.scheme]=H;N[z.scheme]=z;N[V.scheme]=V;N[G.scheme]=G;N[oe.scheme]=oe;N[ce.scheme]=ce;N[ue.scheme]=ue;t.SCHEMES=N;t.pctEncChar=pctEncChar;t.pctDecChars=pctDecChars;t.parse=parse;t.removeDotSegments=removeDotSegments;t.serialize=serialize;t.resolveComponents=resolveComponents;t.resolve=resolve;t.normalize=normalize;t.equal=equal;t.escapeComponent=escapeComponent;t.unescapeComponent=unescapeComponent;Object.defineProperty(t,"__esModule",{value:true})}))},2338:(t,r,i)=>{"use strict";var o=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$");var a=i(3113);var c=["node_modules","favicon.ico"];var l=t.exports=function(t){var r=[];var i=[];if(t===null){i.push("name cannot be null");return done(r,i)}if(t===undefined){i.push("name cannot be undefined");return done(r,i)}if(typeof t!=="string"){i.push("name must be a string");return done(r,i)}if(!t.length){i.push("name length must be greater than zero")}if(t.match(/^\./)){i.push("name cannot start with a period")}if(t.match(/^_/)){i.push("name cannot start with an underscore")}if(t.trim()!==t){i.push("name cannot contain leading or trailing spaces")}c.forEach((function(r){if(t.toLowerCase()===r){i.push(r+" is a blacklisted name")}}));a.forEach((function(i){if(t.toLowerCase()===i){r.push(i+" is a core module name")}}));if(t.length>214){r.push("name can no longer contain more than 214 characters")}if(t.toLowerCase()!==t){r.push("name can no longer contain capital letters")}if(/[~'!()*]/.test(t.split("/").slice(-1)[0])){r.push('name can no longer contain special characters ("~\'!()*")')}if(encodeURIComponent(t)!==t){var l=t.match(o);if(l){var u=l[1];var h=l[2];if(encodeURIComponent(u)===u&&encodeURIComponent(h)===h){return done(r,i)}}i.push("name can only contain URL-friendly characters")}return done(r,i)};l.scopedPackagePattern=o;var done=function(t,r){var i={validForNewPackages:r.length===0&&t.length===0,validForOldPackages:r.length===0,warnings:t,errors:r};if(!i.warnings.length)delete i.warnings;if(!i.errors.length)delete i.errors;return i}},7200:(t,r,i)=>{const o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const a=i(1017);const c=o?";":":";const l=i(7745);const getNotFoundError=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"});const getPathInfo=(t,r)=>{const i=r.colon||c;const a=t.match(/\//)||o&&t.match(/\\/)?[""]:[...o?[process.cwd()]:[],...(r.path||process.env.PATH||"").split(i)];const l=o?r.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const u=o?l.split(i):[""];if(o){if(t.indexOf(".")!==-1&&u[0]!=="")u.unshift("")}return{pathEnv:a,pathExt:u,pathExtExe:l}};const which=(t,r,i)=>{if(typeof r==="function"){i=r;r={}}if(!r)r={};const{pathEnv:o,pathExt:c,pathExtExe:u}=getPathInfo(t,r);const h=[];const step=i=>new Promise(((c,l)=>{if(i===o.length)return r.all&&h.length?c(h):l(getNotFoundError(t));const u=o[i];const d=/^".*"$/.test(u)?u.slice(1,-1):u;const p=a.join(d,t);const m=!d&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;c(subStep(m,i,0))}));const subStep=(t,i,o)=>new Promise(((a,d)=>{if(o===c.length)return a(step(i+1));const p=c[o];l(t+p,{pathExt:u},((c,l)=>{if(!c&&l){if(r.all)h.push(t+p);else return a(t+p)}return a(subStep(t,i,o+1))}))}));return i?step(0).then((t=>i(null,t)),i):step(0)};const whichSync=(t,r)=>{r=r||{};const{pathEnv:i,pathExt:o,pathExtExe:c}=getPathInfo(t,r);const u=[];for(let h=0;h<i.length;h++){const d=i[h];const p=/^".*"$/.test(d)?d.slice(1,-1):d;const m=a.join(p,t);const y=!p&&/^\.[\\\/]/.test(t)?t.slice(0,2)+m:m;for(let t=0;t<o.length;t++){const i=y+o[t];try{const t=l.sync(i,{pathExt:c});if(t){if(r.all)u.push(i);else return i}}catch(t){}}}if(r.all&&u.length)return u;if(r.nothrow)return null;throw getNotFoundError(t)};t.exports=which;which.sync=whichSync},9414:t=>{"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},3401:(t,r,i)=>{"use strict";t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var r=this;if(!(r instanceof Yallist)){r=new Yallist}r.tail=null;r.head=null;r.length=0;if(t&&typeof t.forEach==="function"){t.forEach((function(t){r.push(t)}))}else if(arguments.length>0){for(var i=0,o=arguments.length;i<o;i++){r.push(arguments[i])}}return r}Yallist.prototype.removeNode=function(t){if(t.list!==this){throw new Error("removing node which does not belong to this list")}var r=t.next;var i=t.prev;if(r){r.prev=i}if(i){i.next=r}if(t===this.head){this.head=r}if(t===this.tail){this.tail=i}t.list.length--;t.next=null;t.prev=null;t.list=null;return r};Yallist.prototype.unshiftNode=function(t){if(t===this.head){return}if(t.list){t.list.removeNode(t)}var r=this.head;t.list=this;t.next=r;if(r){r.prev=t}this.head=t;if(!this.tail){this.tail=t}this.length++};Yallist.prototype.pushNode=function(t){if(t===this.tail){return}if(t.list){t.list.removeNode(t)}var r=this.tail;t.list=this;t.prev=r;if(r){r.next=t}this.tail=t;if(!this.head){this.head=t}this.length++};Yallist.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++){push(this,arguments[t])}return this.length};Yallist.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++){unshift(this,arguments[t])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var t=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return t};Yallist.prototype.shift=function(){if(!this.head){return undefined}var t=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return t};Yallist.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,o=0;i!==null;o++){t.call(r,i.value,o,this);i=i.next}};Yallist.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,o=this.length-1;i!==null;o--){t.call(r,i.value,o,this);i=i.prev}};Yallist.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++){i=i.next}if(r===t&&i!==null){return i.value}};Yallist.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++){i=i.prev}if(r===t&&i!==null){return i.value}};Yallist.prototype.map=function(t,r){r=r||this;var i=new Yallist;for(var o=this.head;o!==null;){i.push(t.call(r,o.value,this));o=o.next}return i};Yallist.prototype.mapReverse=function(t,r){r=r||this;var i=new Yallist;for(var o=this.tail;o!==null;){i.push(t.call(r,o.value,this));o=o.prev}return i};Yallist.prototype.reduce=function(t,r){var i;var o=this.head;if(arguments.length>1){i=r}else if(this.head){o=this.head.next;i=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=0;o!==null;a++){i=t(i,o.value,a);o=o.next}return i};Yallist.prototype.reduceReverse=function(t,r){var i;var o=this.tail;if(arguments.length>1){i=r}else if(this.tail){o=this.tail.prev;i=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var a=this.length-1;o!==null;a--){i=t(i,o.value,a);o=o.prev}return i};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var r=0,i=this.head;i!==null;r++){t[r]=i.value;i=i.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var r=0,i=this.tail;i!==null;r++){t[r]=i.value;i=i.prev}return t};Yallist.prototype.slice=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}for(;a!==null&&o<r;o++,a=a.next){i.push(a.value)}return i};Yallist.prototype.sliceReverse=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var i=new Yallist;if(r<t||r<0){return i}if(t<0){t=0}if(r>this.length){r=this.length}for(var o=this.length,a=this.tail;a!==null&&o>r;o--){a=a.prev}for(;a!==null&&o>t;o--,a=a.prev){i.push(a.value)}return i};Yallist.prototype.splice=function(t,r,...i){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var o=0,a=this.head;a!==null&&o<t;o++){a=a.next}var c=[];for(var o=0;a&&o<r;o++){c.push(a.value);a=this.removeNode(a)}if(a===null){a=this.tail}if(a!==this.head&&a!==this.tail){a=a.prev}for(var o=0;o<i.length;o++){a=insert(this,a,i[o])}return c};Yallist.prototype.reverse=function(){var t=this.head;var r=this.tail;for(var i=t;i!==null;i=i.prev){var o=i.prev;i.prev=i.next;i.next=o}this.head=r;this.tail=t;return this};function insert(t,r,i){var o=r===t.head?new Node(i,null,r,t):new Node(i,r,r.next,t);if(o.next===null){t.tail=o}if(o.prev===null){t.head=o}t.length++;return o}function push(t,r){t.tail=new Node(r,t.tail,null,t);if(!t.head){t.head=t.tail}t.length++}function unshift(t,r){t.head=new Node(r,null,t.head,t);if(!t.tail){t.tail=t.head}t.length++}function Node(t,r,i,o){if(!(this instanceof Node)){return new Node(t,r,i,o)}this.list=o;this.value=t;if(r){r.next=this;this.prev=r}else{this.prev=null}if(i){i.prev=this;this.next=i}else{this.next=null}}try{i(9414)(Yallist)}catch(t){}},8776:(t,r,i)=>{"use strict";i.r(r);var o=i(9306);var a=i(4101);var c=i.n(a);var l=i(7136);var u=i.n(l);var h=i(1017);var d=i.n(h);var p=i(5713);var m=i.n(p);var y=i(5656);var g=i.n(y);var v=i(9239);var b=i.n(v);var w=i(7147);var E=i.n(w);var S=i(5255);var x=i(2781);const R=require("stream/promises");async function isUrlOk(t){try{const r=await fetch(t,{method:"HEAD"});return r.status===200}catch{return false}}async function getRepoInfo(t,r){const[,i,o,a,c,...l]=t.pathname.split("/");const u=r?r.replace(/^\//,""):l.join("/");if(a===undefined||a===""&&c===undefined){try{const t=await fetch(`https://api.github.com/repos/${i}/${o}`);if(t.status!==200){return}const r=await t.json();return{username:i,name:o,branch:r["default_branch"],filePath:u}}catch{return}}const h=r?`${c}/${l.join("/")}`.replace(new RegExp(`/${u}|/$`),""):c;if(i&&o&&h&&a==="tree"){return{username:i,name:o,branch:h,filePath:u}}}function hasRepo({username:t,name:r,branch:i,filePath:o}){const a=`https://api.github.com/repos/${t}/${r}/contents`;const c=`${o?`/${o}`:""}/package.json`;return isUrlOk(a+c+`?ref=${i}`)}function existsInRepo(t){try{const r=new URL(t);return isUrlOk(r.href)}catch{return isUrlOk(`https://api.github.com/repos/vercel/next.js/contents/examples/${encodeURIComponent(t)}`)}}async function downloadTarStream(t){const r=await fetch(t);if(!r.body){throw new Error(`Failed to download: ${t}`)}return x.Readable.fromWeb(r.body)}async function downloadAndExtractRepo(t,{username:r,name:i,branch:o,filePath:a}){await(0,R.pipeline)(await downloadTarStream(`https://codeload.github.com/${r}/${i}/tar.gz/${o}`),S.x({cwd:t,strip:a?a.split("/").length+1:1,filter:t=>t.startsWith(`${i}-${o.replace(/\//g,"-")}${a?`/${a}/`:"/"}`)}))}async function downloadAndExtractExample(t,r){if(r==="__internal-testing-retry"){throw new Error("This is an internal example for testing the CLI.")}await(0,R.pipeline)(await downloadTarStream("https://codeload.github.com/vercel/next.js/tar.gz/canary"),S.x({cwd:t,strip:2+r.split("/").length,filter:t=>t.includes(`next.js-canary/examples/${r}/`)}))}var P=i(2081);function isInGitRepository(){try{(0,P.execSync)("git rev-parse --is-inside-work-tree",{stdio:"ignore"});return true}catch(t){}return false}function isInMercurialRepository(){try{(0,P.execSync)("hg --cwd . root",{stdio:"ignore"});return true}catch(t){}return false}function isDefaultBranchSet(){try{(0,P.execSync)("git config init.defaultBranch",{stdio:"ignore"});return true}catch(t){}return false}function tryGitInit(t){let r=false;try{(0,P.execSync)("git --version",{stdio:"ignore"});if(isInGitRepository()||isInMercurialRepository()){return false}(0,P.execSync)("git init",{stdio:"ignore"});r=true;if(!isDefaultBranchSet()){(0,P.execSync)("git checkout -b main",{stdio:"ignore"})}(0,P.execSync)("git add -A",{stdio:"ignore"});(0,P.execSync)('git commit -m "Initial commit from Create Next App"',{stdio:"ignore"});return true}catch(i){if(r){try{E().rmSync(d().join(t,".git"),{recursive:true,force:true})}catch(t){}}return false}}var $=i(4488);var O=i.n($);async function install(t,r){const i=["install"];if(!r){console.log((0,o.yellow)("You appear to be offline.\nFalling back to the local cache."));i.push("--offline")}return new Promise(((r,o)=>{const a=O()(t,i,{stdio:"inherit",env:{...process.env,ADBLOCK:"1",NODE_ENV:"development",DISABLE_OPENCOLLECTIVE:"1"}});a.on("close",(a=>{if(a!==0){o({command:`${t} ${i.join(" ")}`});return}r()}))}))}function isFolderEmpty(t,r){const i=[".DS_Store",".git",".gitattributes",".gitignore",".gitlab-ci.yml",".hg",".hgcheck",".hgignore",".idea",".npmignore",".travis.yml","LICENSE","Thumbs.db","docs","mkdocs.yml","npm-debug.log","yarn-debug.log","yarn-error.log","yarnrc.yml",".yarn"];const a=E().readdirSync(t).filter((t=>!i.includes(t)&&!/\.iml$/.test(t)));if(a.length>0){console.log(`The directory ${(0,o.green)(r)} contains files that could conflict:`);console.log();for(const r of a){try{const i=E().lstatSync(d().join(t,r));if(i.isDirectory()){console.log(` ${(0,o.blue)(r)}/`)}else{console.log(` ${r}`)}}catch{console.log(` ${r}`)}}console.log();console.log("Either try using a new directory name, or remove the files listed above.");console.log();return false}return true}const T=require("dns/promises");var A=i.n(T);var C=i(7310);var k=i.n(C);function getProxy(){if(process.env.https_proxy){return process.env.https_proxy}try{const t=(0,P.execSync)("npm config get https-proxy").toString().trim();return t!=="null"?t:undefined}catch(t){return}}async function getOnline(){try{await A().lookup("registry.yarnpkg.com");return true}catch{const t=getProxy();if(!t){return false}const{hostname:r}=k().parse(t);if(!r){return false}try{await A().lookup(r);return true}catch{return false}}}async function isWriteable(t){try{await E().promises.access(t,(E().constants||E()).W_OK);return true}catch(t){return false}}var I=i(8695);const identity=t=>t;const copy=async(t,r,{cwd:i,rename:o=identity,parents:a=true}={})=>{const c=typeof t==="string"?[t]:t;if(c.length===0||!r){throw new TypeError("`src` and `dest` are required")}const l=await(0,I.async)(c,{cwd:i,dot:true,absolute:false,stats:false});const u=i?d().resolve(i,r):r;return Promise.all(l.map((async t=>{const r=d().dirname(t);const c=o(d().basename(t));const l=i?d().resolve(i,t):t;const h=a?d().join(u,r,c):d().join(u,c);await E().promises.mkdir(d().dirname(h),{recursive:true});return E().promises.copyFile(l,h)})))};var N=i(2037);var D=i.n(N);const L=require("fs/promises");var M=i.n(L);var j=i(8383);const U=JSON.parse('{"name":"create-next-app","version":"14.2.25","keywords":["react","next","next.js"],"description":"Create Next.js-powered React apps with one command","repository":{"type":"git","url":"https://github.com/vercel/next.js","directory":"packages/create-next-app"},"author":"Next.js Team <support@vercel.com>","license":"MIT","bin":{"create-next-app":"./dist/index.js"},"files":["dist"],"scripts":{"dev":"ncc build ./index.ts -w -o dist/","prerelease":"node ../../scripts/rm.mjs dist","release":"ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register","prepublishOnly":"cd ../../ && turbo run build","build":"pnpm release","lint-fix":"pnpm prettier -w --plugin prettier-plugin-tailwindcss \'templates/*-tw/{ts,js}/{app,pages}/**/*.{js,ts,tsx}\'"},"devDependencies":{"@types/async-retry":"1.4.2","@types/ci-info":"2.0.0","@types/cross-spawn":"6.0.0","@types/node":"^20.2.5","@types/prompts":"2.4.2","@types/tar":"6.1.5","@types/validate-npm-package-name":"3.0.0","@vercel/ncc":"0.34.0","async-retry":"1.3.1","ci-info":"watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540","commander":"2.20.0","conf":"10.2.0","cross-spawn":"7.0.3","fast-glob":"3.3.1","picocolors":"1.0.0","prettier-plugin-tailwindcss":"0.3.0","prompts":"2.4.2","tar":"6.1.15","update-check":"1.5.4","validate-npm-package-name":"3.0.0"},"engines":{"node":">=18.17.0"}}');const getTemplateFile=({template:t,mode:r,file:o})=>i.ab+"templates/"+t+"/"+r+"/"+o;const B=["app","pages","styles"];const installTemplate=async({appName:t,root:r,packageManager:a,isOnline:c,template:l,mode:u,tailwind:h,eslint:p,srcDir:m,importAlias:y})=>{var g;console.log((0,o.bold)(`Using ${a}.`));console.log("\nInitializing project with template:",l,"\n");const v=i.ab+"templates/"+l+"/"+u;const b=["**"];if(!p)b.push("!eslintrc.json");if(!h)b.push(u=="ts"?"tailwind.config.ts":"!tailwind.config.js","!postcss.config.mjs");await copy(b,r,{parents:true,cwd:v,rename(t){switch(t){case"gitignore":case"eslintrc.json":{return`.${t}`}case"README-template.md":{return"README.md"}default:{return t}}}});const w=d().join(r,u==="js"?"jsconfig.json":"tsconfig.json");await M().writeFile(w,(await M().readFile(w,"utf8")).replace(`"@/*": ["./*"]`,m?`"@/*": ["./src/*"]`:`"@/*": ["./*"]`).replace(`"@/*":`,`"${y}":`));if(y!=="@/*"){const t=await(0,I.async)("**/*",{cwd:r,dot:true,stats:false,ignore:["tsconfig.json","jsconfig.json",".git/**/*","**/fonts/**","**/favicon.ico"]});const i=new j.Sema(8,{capacity:t.length});await Promise.all(t.map((async t=>{await i.acquire();const o=d().join(r,t);if((await M().stat(o)).isFile()){await M().writeFile(o,(await M().readFile(o,"utf8")).replace(`@/`,`${y.replace(/\*/g,"")}`))}i.release()})))}if(m){await M().mkdir(d().join(r,"src"),{recursive:true});await Promise.all(B.map((async t=>{await M().rename(d().join(r,t),d().join(r,"src",t)).catch((t=>{if(t.code!=="ENOENT"){throw t}}))})));const t=l.startsWith("app");const i=d().join("src",t?"app":"pages",`${t?"page":"index"}.${u==="ts"?"tsx":"js"}`);await M().writeFile(i,(await M().readFile(i,"utf8")).replace(t?"app/page":"pages/index",t?"src/app/page":"src/pages/index"));if(h){const t=d().join(r,u==="ts"?"tailwind.config.ts":"tailwind.config.js");await M().writeFile(t,(await M().readFile(t,"utf8")).replace(/\.\/(\w+)\/\*\*\/\*\.\{js,ts,jsx,tsx,mdx\}/g,"./src/$1/**/*.{js,ts,jsx,tsx,mdx}"))}}const E=(g=process.env.NEXT_PRIVATE_TEST_VERSION)!==null&&g!==void 0?g:U.version;const S={name:t,version:"0.1.0",private:true,scripts:{dev:"next dev",build:"next build",start:"next start",lint:"next lint"},dependencies:{react:"^18","react-dom":"^18",next:E},devDependencies:{}};if(u==="ts"){S.devDependencies={...S.devDependencies,typescript:"^5","@types/node":"^20","@types/react":"^18","@types/react-dom":"^18"}}if(h){S.devDependencies={...S.devDependencies,postcss:"^8",tailwindcss:"^3.4.1"}}if(p){S.devDependencies={...S.devDependencies,eslint:"^8","eslint-config-next":E}}const x=Object.keys(S.devDependencies).length;if(!x)delete S.devDependencies;await M().writeFile(d().join(r,"package.json"),JSON.stringify(S,null,2)+D().EOL);console.log("\nInstalling dependencies:");for(const t in S.dependencies)console.log(`- ${(0,o.cyan)(t)}`);if(x){console.log("\nInstalling devDependencies:");for(const t in S.devDependencies)console.log(`- ${(0,o.cyan)(t)}`)}console.log();await install(a,c)};class DownloadError extends Error{}async function createApp({appPath:t,packageManager:r,example:i,examplePath:a,typescript:c,tailwind:l,eslint:u,appRouter:h,srcDir:p,importAlias:m}){let y;const g=c?"ts":"js";const v=h?l?"app-tw":"app":l?"default-tw":"default";if(i){let t;try{t=new URL(i)}catch(t){const r=t;if(r.code!=="ERR_INVALID_URL"){console.error(t);process.exit(1)}}if(t){if(t.origin!=="https://github.com"){console.error(`Invalid URL: ${(0,o.red)(`"${i}"`)}. Only GitHub repositories are supported. Please use a GitHub URL and try again.`);process.exit(1)}y=await getRepoInfo(t,a);if(!y){console.error(`Found invalid GitHub URL: ${(0,o.red)(`"${i}"`)}. Please fix the URL and try again.`);process.exit(1)}const r=await hasRepo(y);if(!r){console.error(`Could not locate the repository for ${(0,o.red)(`"${i}"`)}. Please check that the repository exists and try again.`);process.exit(1)}}else if(i!=="__internal-testing-retry"){const t=await existsInRepo(i);if(!t){console.error(`Could not locate an example named ${(0,o.red)(`"${i}"`)}. It could be due to the following:\n`,`1. Your spelling of example ${(0,o.red)(`"${i}"`)} might be incorrect.\n`,`2. You might not be connected to the internet or you are behind a proxy.`);process.exit(1)}}}const w=d().resolve(t);if(!await isWriteable(d().dirname(w))){console.error("The application path is not writable, please check folder permissions and try again.");console.error("It is likely you do not have write permissions for this folder.");process.exit(1)}const S=d().basename(w);E().mkdirSync(w,{recursive:true});if(!isFolderEmpty(w,S)){process.exit(1)}const x=r==="yarn";const R=!x||await getOnline();const P=process.cwd();console.log(`Creating a new Next.js app in ${(0,o.green)(w)}.`);console.log();process.chdir(w);const $=d().join(w,"package.json");let O=false;if(i){try{if(y){const t=y;console.log(`Downloading files from repo ${(0,o.cyan)(i)}. This might take a moment.`);console.log();await b()((()=>downloadAndExtractRepo(w,t)),{retries:3})}else{console.log(`Downloading files for example ${(0,o.cyan)(i)}. This might take a moment.`);console.log();await b()((()=>downloadAndExtractExample(w,i)),{retries:3})}}catch(t){function isErrorLike(t){return typeof t==="object"&&t!==null&&typeof t.message==="string"}throw new DownloadError(isErrorLike(t)?t.message:t+"")}const t=d().join(w,".gitignore");if(!E().existsSync(t)){E().copyFileSync(getTemplateFile({template:v,mode:g,file:"gitignore"}),t)}const a=d().join(w,"tsconfig.json");if(E().existsSync(a)){E().copyFileSync(getTemplateFile({template:v,mode:"ts",file:"next-env.d.ts"}),d().join(w,"next-env.d.ts"))}O=E().existsSync($);if(O){console.log("Installing packages. This might take a couple of minutes.");console.log();await install(r,R);console.log()}}else{await installTemplate({appName:S,root:w,template:v,mode:g,packageManager:r,isOnline:R,tailwind:l,eslint:u,srcDir:p,importAlias:m})}if(tryGitInit(w)){console.log("Initialized a git repository.");console.log()}let T;if(d().join(P,S)===t){T=S}else{T=t}console.log(`${(0,o.green)("Success!")} Created ${S} at ${t}`);if(O){console.log("Inside that directory, you can run several commands:");console.log();console.log((0,o.cyan)(` ${r} ${x?"":"run "}dev`));console.log(" Starts the development server.");console.log();console.log((0,o.cyan)(` ${r} ${x?"":"run "}build`));console.log(" Builds the app for production.");console.log();console.log((0,o.cyan)(` ${r} start`));console.log(" Runs the built app in production mode.");console.log();console.log("We suggest that you begin by typing:");console.log();console.log((0,o.cyan)(" cd"),T);console.log(` ${(0,o.cyan)(`${r} ${x?"":"run "}dev`)}`)}console.log()}function getPkgManager(){const t=process.env.npm_config_user_agent||"";if(t.startsWith("yarn")){return"yarn"}if(t.startsWith("pnpm")){return"pnpm"}if(t.startsWith("bun")){return"bun"}return"npm"}var H=i(2338);var z=i.n(H);function validateNpmName(t){const r=z()(t);if(r.validForNewPackages){return{valid:true}}return{valid:false,problems:[...r.errors||[],...r.warnings||[]]}}var V=i(7741);var G=i.n(V);let q="";const handleSigTerm=()=>process.exit(0);process.on("SIGINT",handleSigTerm);process.on("SIGTERM",handleSigTerm);const onPromptState=t=>{if(t.aborted){process.stdout.write("[?25h");process.stdout.write("\n");process.exit(1)}};const K=new(c().Command)(U.name).version(U.version).arguments("<project-directory>").usage(`${(0,o.green)("<project-directory>")} [options]`).action((t=>{q=t})).option("--ts, --typescript",`\n\n Initialize as a TypeScript project. (default)\n`).option("--js, --javascript",`\n\n Initialize as a JavaScript project.\n`).option("--tailwind",`\n\n Initialize with Tailwind CSS config. (default)\n`).option("--eslint",`\n\n Initialize with eslint config.\n`).option("--app",`\n\n Initialize as an App Router project.\n`).option("--src-dir",`\n\n Initialize inside a \`src/\` directory.\n`).option("--import-alias <alias-to-configure>",`\n\n Specify import alias to use (default "@/*").\n`).option("--use-npm",`\n\n Explicitly tell the CLI to bootstrap the application using npm\n`).option("--use-pnpm",`\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`).option("--use-yarn",`\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`).option("--use-bun",`\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`).option("-e, --example [name]|[github-url]",`\n\n An example to bootstrap the app with. You can use an example name\n from the official Next.js repo or a GitHub URL. The URL can use\n any branch and/or subdirectory\n`).option("--example-path <path-to-example>",`\n\n In a rare case, your GitHub URL might contain a branch name with\n a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar).\n In this case, you must specify the path to the example separately:\n --example-path foo/bar\n`).option("--reset-preferences",`\n\n Explicitly tell the CLI to reset any stored preferences\n`).allowUnknownOption().parse(process.argv);const W=!!K.useNpm?"npm":!!K.usePnpm?"pnpm":!!K.useYarn?"yarn":!!K.useBun?"bun":getPkgManager();async function run(){const t=new(u())({projectName:"create-next-app"});if(K.resetPreferences){t.clear();console.log(`Preferences reset successfully`);return}if(typeof q==="string"){q=q.trim()}if(!q){const t=await m()({onState:onPromptState,type:"text",name:"path",message:"What is your project named?",initial:"my-app",validate:t=>{const r=validateNpmName(d().basename(d().resolve(t)));if(r.valid){return true}return"Invalid project name: "+r.problems[0]}});if(typeof t.path==="string"){q=t.path.trim()}}if(!q){console.log("\nPlease specify the project directory:\n"+` ${(0,o.cyan)(K.name())} ${(0,o.green)("<project-directory>")}\n`+"For example:\n"+` ${(0,o.cyan)(K.name())} ${(0,o.green)("my-next-app")}\n\n`+`Run ${(0,o.cyan)(`${K.name()} --help`)} to see all options.`);process.exit(1)}const r=d().resolve(q);const i=d().basename(r);const a=validateNpmName(i);if(!a.valid){console.error(`Could not create a project called ${(0,o.red)(`"${i}"`)} because of npm naming restrictions:`);a.problems.forEach((t=>console.error(` ${(0,o.red)((0,o.bold)("*"))} ${t}`)));process.exit(1)}if(K.example===true){console.error("Please provide an example name or url, otherwise remove the example option.");process.exit(1)}const c=d().resolve(r);const l=d().basename(c);const h=E().existsSync(c);if(h&&!isFolderEmpty(c,l)){process.exit(1)}const p=typeof K.example==="string"&&K.example.trim();const y=t.get("preferences")||{};if(!p){const t={typescript:true,eslint:true,tailwind:true,app:true,srcDir:false,importAlias:"@/*",customizeImportAlias:false};const getPrefOrDefault=r=>{var i;return(i=y[r])!==null&&i!==void 0?i:t[r]};if(!K.typescript&&!K.javascript){if(G().isCI){K.typescript=getPrefOrDefault("typescript")}else{const t=(0,o.blue)("TypeScript");const{typescript:r}=await m()({type:"toggle",name:"typescript",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("typescript"),active:"Yes",inactive:"No"},{onCancel:()=>{console.error("Exiting.");process.exit(1)}});K.typescript=Boolean(r);K.javascript=!Boolean(r);y.typescript=Boolean(r)}}if(!process.argv.includes("--eslint")&&!process.argv.includes("--no-eslint")){if(G().isCI){K.eslint=getPrefOrDefault("eslint")}else{const t=(0,o.blue)("ESLint");const{eslint:r}=await m()({onState:onPromptState,type:"toggle",name:"eslint",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("eslint"),active:"Yes",inactive:"No"});K.eslint=Boolean(r);y.eslint=Boolean(r)}}if(!process.argv.includes("--tailwind")&&!process.argv.includes("--no-tailwind")){if(G().isCI){K.tailwind=getPrefOrDefault("tailwind")}else{const t=(0,o.blue)("Tailwind CSS");const{tailwind:r}=await m()({onState:onPromptState,type:"toggle",name:"tailwind",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("tailwind"),active:"Yes",inactive:"No"});K.tailwind=Boolean(r);y.tailwind=Boolean(r)}}if(!process.argv.includes("--src-dir")&&!process.argv.includes("--no-src-dir")){if(G().isCI){K.srcDir=getPrefOrDefault("srcDir")}else{const t=(0,o.blue)("`src/` directory");const{srcDir:r}=await m()({onState:onPromptState,type:"toggle",name:"srcDir",message:`Would you like to use ${t}?`,initial:getPrefOrDefault("srcDir"),active:"Yes",inactive:"No"});K.srcDir=Boolean(r);y.srcDir=Boolean(r)}}if(!process.argv.includes("--app")&&!process.argv.includes("--no-app")){if(G().isCI){K.app=getPrefOrDefault("app")}else{const t=(0,o.blue)("App Router");const{appRouter:r}=await m()({onState:onPromptState,type:"toggle",name:"appRouter",message:`Would you like to use ${t}? (recommended)`,initial:getPrefOrDefault("app"),active:"Yes",inactive:"No"});K.app=Boolean(r)}}const r=/^[^*"]+\/\*\s*$/;if(typeof K.importAlias!=="string"||!r.test(K.importAlias)){if(G().isCI){K.importAlias=t.importAlias}else if(process.argv.includes("--no-import-alias")){K.importAlias=t.importAlias}else{const i=(0,o.blue)("import alias");const{customizeImportAlias:a}=await m()({onState:onPromptState,type:"toggle",name:"customizeImportAlias",message:`Would you like to customize the default ${i} (${t.importAlias})?`,initial:getPrefOrDefault("customizeImportAlias"),active:"Yes",inactive:"No"});if(!a){K.importAlias=t.importAlias}else{const{importAlias:t}=await m()({onState:onPromptState,type:"text",name:"importAlias",message:`What ${i} would you like configured?`,initial:getPrefOrDefault("importAlias"),validate:t=>r.test(t)?true:"Import alias must follow the pattern <prefix>/*"});K.importAlias=t;y.importAlias=t}}}}try{await createApp({appPath:r,packageManager:W,example:p&&p!=="default"?p:undefined,examplePath:K.examplePath,typescript:K.typescript,tailwind:K.tailwind,eslint:K.eslint,appRouter:K.app,srcDir:K.srcDir,importAlias:K.importAlias})}catch(t){if(!(t instanceof DownloadError)){throw t}const i=await m()({onState:onPromptState,type:"confirm",name:"builtin",message:`Could not download "${p}" because of a connectivity issue between your machine and GitHub.\n`+`Do you want to use the default template instead?`,initial:true});if(!i.builtin){throw t}await createApp({appPath:r,packageManager:W,typescript:K.typescript,eslint:K.eslint,tailwind:K.tailwind,appRouter:K.app,srcDir:K.srcDir,importAlias:K.importAlias})}t.set("preferences",y)}const Y=g()(U).catch((()=>null));async function notifyUpdate(){try{const t=await Y;if(t===null||t===void 0?void 0:t.latest){const t=W==="yarn"?"yarn global add create-next-app":W==="pnpm"?"pnpm add -g create-next-app":W==="bun"?"bun add -g create-next-app":"npm i -g create-next-app";console.log((0,o.yellow)((0,o.bold)("A new version of `create-next-app` is available!"))+"\n"+"You can update by running: "+(0,o.cyan)(t)+"\n")}process.exit()}catch{}}run().then(notifyUpdate).catch((async t=>{console.log();console.log("Aborting installation.");if(t.command){console.log(` ${(0,o.cyan)(t.command)} has failed.`)}else{console.log((0,o.red)("Unexpected error. Please report it as a bug:")+"\n",t)}console.log();await notifyUpdate();process.exit(1)}))},9491:t=>{"use strict";t.exports=require("assert")},4300:t=>{"use strict";t.exports=require("buffer")},2081:t=>{"use strict";t.exports=require("child_process")},6113:t=>{"use strict";t.exports=require("crypto")},2361:t=>{"use strict";t.exports=require("events")},7147:t=>{"use strict";t.exports=require("fs")},3685:t=>{"use strict";t.exports=require("http")},5687:t=>{"use strict";t.exports=require("https")},2037:t=>{"use strict";t.exports=require("os")},1017:t=>{"use strict";t.exports=require("path")},7282:t=>{"use strict";t.exports=require("process")},4521:t=>{"use strict";t.exports=require("readline")},2781:t=>{"use strict";t.exports=require("stream")},1576:t=>{"use strict";t.exports=require("string_decoder")},6224:t=>{"use strict";t.exports=require("tty")},7310:t=>{"use strict";t.exports=require("url")},3837:t=>{"use strict";t.exports=require("util")},9796:t=>{"use strict";t.exports=require("zlib")},7918:t=>{"use strict";t.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},9520:t=>{"use strict";t.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},3113:t=>{"use strict";t.exports=JSON.parse('["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"]')},6107:t=>{"use strict";t.exports=JSON.parse('[{"name":"AppVeyor","constant":"APPVEYOR","env":"APPVEYOR","pr":"APPVEYOR_PULL_REQUEST_NUMBER"},{"name":"Azure Pipelines","constant":"AZURE_PIPELINES","env":"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI","pr":"SYSTEM_PULLREQUEST_PULLREQUESTID"},{"name":"Bamboo","constant":"BAMBOO","env":"bamboo_planKey"},{"name":"Bitbucket Pipelines","constant":"BITBUCKET","env":"BITBUCKET_COMMIT","pr":"BITBUCKET_PR_ID"},{"name":"Bitrise","constant":"BITRISE","env":"BITRISE_IO","pr":"BITRISE_PULL_REQUEST"},{"name":"Buddy","constant":"BUDDY","env":"BUDDY_WORKSPACE_ID","pr":"BUDDY_EXECUTION_PULL_REQUEST_ID"},{"name":"Buildkite","constant":"BUILDKITE","env":"BUILDKITE","pr":{"env":"BUILDKITE_PULL_REQUEST","ne":"false"}},{"name":"CircleCI","constant":"CIRCLE","env":"CIRCLECI","pr":"CIRCLE_PULL_REQUEST"},{"name":"Cirrus CI","constant":"CIRRUS","env":"CIRRUS_CI","pr":"CIRRUS_PR"},{"name":"AWS CodeBuild","constant":"CODEBUILD","env":"CODEBUILD_BUILD_ARN"},{"name":"Codeship","constant":"CODESHIP","env":{"CI_NAME":"codeship"}},{"name":"Drone","constant":"DRONE","env":"DRONE","pr":{"DRONE_BUILD_EVENT":"pull_request"}},{"name":"dsari","constant":"DSARI","env":"DSARI"},{"name":"GitHub Actions","constant":"GITHUB_ACTIONS","env":"GITHUB_ACTIONS","pr":{"GITHUB_EVENT_NAME":"pull_request"}},{"name":"GitLab CI","constant":"GITLAB","env":"GITLAB_CI"},{"name":"GoCD","constant":"GOCD","env":"GO_PIPELINE_LABEL"},{"name":"Hudson","constant":"HUDSON","env":"HUDSON_URL"},{"name":"Jenkins","constant":"JENKINS","env":["JENKINS_URL","BUILD_ID"],"pr":{"any":["ghprbPullId","CHANGE_ID"]}},{"name":"ZEIT Now","constant":"ZEIT_NOW","env":"NOW_BUILDER"},{"name":"Magnum CI","constant":"MAGNUM","env":"MAGNUM"},{"name":"Netlify CI","constant":"NETLIFY","env":"NETLIFY","pr":{"env":"PULL_REQUEST","ne":"false"}},{"name":"Nevercode","constant":"NEVERCODE","env":"NEVERCODE","pr":{"env":"NEVERCODE_PULL_REQUEST","ne":"false"}},{"name":"Render","constant":"RENDER","env":"RENDER","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Sail CI","constant":"SAIL","env":"SAILCI","pr":"SAIL_PULL_REQUEST_NUMBER"},{"name":"Semaphore","constant":"SEMAPHORE","env":"SEMAPHORE","pr":"PULL_REQUEST_NUMBER"},{"name":"Shippable","constant":"SHIPPABLE","env":"SHIPPABLE","pr":{"IS_PULL_REQUEST":"true"}},{"name":"Solano CI","constant":"SOLANO","env":"TDDIUM","pr":"TDDIUM_PR_ID"},{"name":"Strider CD","constant":"STRIDER","env":"STRIDER"},{"name":"TaskCluster","constant":"TASKCLUSTER","env":["TASK_ID","RUN_ID"]},{"name":"TeamCity","constant":"TEAMCITY","env":"TEAMCITY_VERSION"},{"name":"Travis CI","constant":"TRAVIS","env":"TRAVIS","pr":{"env":"TRAVIS_PULL_REQUEST","ne":"false"}}]')}};var r={};function __nccwpck_require__(i){var o=r[i];if(o!==undefined){return o.exports}var a=r[i]={id:i,loaded:false,exports:{}};var c=true;try{t[i].call(a.exports,a,a.exports,__nccwpck_require__);c=false}finally{if(c)delete r[i]}a.loaded=true;return a.exports}(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var i in r){if(__nccwpck_require__.o(r,i)&&!__nccwpck_require__.o(t,i)){Object.defineProperty(t,i,{enumerable:true,get:r[i]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();(()=>{__nccwpck_require__.nmd=t=>{t.paths=[];if(!t.children)t.children=[];return t}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(8776);module.exports=i})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-next-app",
3
- "version": "14.2.24",
3
+ "version": "14.2.25",
4
4
  "keywords": [
5
5
  "react",
6
6
  "next",