@visulima/packem 2.0.0-alpha.9 → 2.0.0-alpha.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1288 -3
- package/LICENSE.md +3812 -2243
- package/README.md +92 -34
- package/dist/babel-runtime/packem_shared/transform-code-KNtowoK1.js +1 -0
- package/dist/babel-runtime/plugins/babel/worker.js +1 -0
- package/dist/builder/typedoc/index.d.ts +11 -23
- package/dist/builder/typedoc/index.js +3 -3
- package/dist/cli/index.js +69 -41
- package/dist/config/index.d.ts +55 -24
- package/dist/config/index.js +1 -1
- package/dist/config/preset/preact.d.ts +31 -0
- package/dist/config/preset/preact.js +2 -0
- package/dist/config/preset/react.d.ts +72 -0
- package/dist/config/preset/react.js +1 -0
- package/dist/config/preset/solid.d.ts +114 -0
- package/dist/config/preset/solid.js +1 -0
- package/dist/config/preset/svelte.d.ts +84 -0
- package/dist/config/preset/svelte.js +1 -0
- package/dist/config/preset/vue.d.ts +66 -0
- package/dist/config/preset/vue.js +1 -0
- package/dist/css/loaders/less.d.ts +1 -0
- package/dist/css/loaders/less.js +1 -0
- package/dist/css/loaders/lightningcss.d.ts +1 -0
- package/dist/css/loaders/lightningcss.js +1 -0
- package/dist/css/loaders/postcss.d.ts +1 -0
- package/dist/css/loaders/postcss.js +1 -0
- package/dist/css/loaders/sass.d.ts +1 -0
- package/dist/css/loaders/sass.js +1 -0
- package/dist/css/loaders/sourcemap.d.ts +1 -0
- package/dist/css/loaders/sourcemap.js +1 -0
- package/dist/css/loaders/stylus.d.ts +1 -0
- package/dist/css/loaders/stylus.js +1 -0
- package/dist/{rollup/plugins/css/minifiers/lightningcss.js → css/loaders/tailwindcss.d.ts} +1 -1
- package/dist/css/loaders/tailwindcss.js +1 -0
- package/dist/css/minifiers/cssnano.d.ts +1 -0
- package/dist/css/minifiers/cssnano.js +1 -0
- package/dist/css/minifiers/lightningcss.d.ts +1 -0
- package/dist/css/minifiers/lightningcss.js +1 -0
- package/dist/index.d.ts +55 -30
- package/dist/index.js +45 -1
- package/dist/packem_shared/create-or-update-key-storage-DHOKZmnD.js +28 -0
- package/dist/packem_shared/default-mHB0zin0.js +1 -0
- package/dist/packem_shared/index-UxllEEEe.js +249 -0
- package/dist/packem_shared/oxcTransformPlugin-Dwvbw2jE-BsmmBg7q.js +177 -0
- package/dist/packem_shared/types.d-BkLP91NJ.d.ts +464 -0
- package/dist/packem_shared/utils-Bsoe7qJG.js +1 -0
- package/dist/rollup/plugins/esbuild/index.d.ts +1 -24
- package/dist/rollup/plugins/esbuild/index.js +1 -1
- package/dist/rollup/plugins/oxc/oxc-transformer.d.ts +1 -20
- package/dist/rollup/plugins/oxc/oxc-transformer.js +1 -1
- package/dist/rollup/plugins/sucrase/index.d.ts +1 -19
- package/dist/rollup/plugins/sucrase/index.js +1 -1
- package/dist/rollup/plugins/swc/swc-plugin.d.ts +1 -26
- package/dist/rollup/plugins/swc/swc-plugin.js +1 -1
- package/files.d.ts +37 -0
- package/package.json +113 -78
- package/dist/packem_shared/browserslistToEsbuild-C0IWmbNe-C6xPL1oW.js +0 -1
- package/dist/packem_shared/create-or-update-key-storage-GwAIWW7R.js +0 -3
- package/dist/packem_shared/default-B6X7-Lx3.js +0 -1
- package/dist/packem_shared/default-BYM_JvQL.js +0 -1
- package/dist/packem_shared/default-B_dUKZ_J.js +0 -1
- package/dist/packem_shared/default-DjNIGH2Y.js +0 -1
- package/dist/packem_shared/default-DqRcOUe1.js +0 -1
- package/dist/packem_shared/esbuildPlugin-BAwyhG6L-yty60jMl.js +0 -3
- package/dist/packem_shared/index-CSyJAz0_.js +0 -139
- package/dist/packem_shared/index-CUp9WuCG.js +0 -1
- package/dist/packem_shared/index-DvyuEcZZ.d.ts +0 -5235
- package/dist/packem_shared/isolatedDeclarationsOxcTransformer-WbfE6cGu-NeZOx2Y7.js +0 -1
- package/dist/packem_shared/isolatedDeclarationsSwcTransformer-Ch2AgtWC-B-0lOgFf.js +0 -1
- package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js +0 -3
- package/dist/packem_shared/oxcResolvePlugin-BJpi-eSG-BsYx9cDO.js +0 -1
- package/dist/packem_shared/oxcTransformPlugin-DfVQouIB-Cpfv95eA.js +0 -4
- package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-BEkYWTsH.js +0 -6
- package/dist/packem_shared/swcPlugin-Boip4lWG-CwJ-HVJc.js +0 -1
- package/dist/packem_shared/types-0XfKu6f9.d.ts +0 -163
- package/dist/rollup/plugins/css/loaders/less.d.ts +0 -1
- package/dist/rollup/plugins/css/loaders/less.js +0 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.d.ts +0 -1
- package/dist/rollup/plugins/css/loaders/lightningcss.js +0 -1
- package/dist/rollup/plugins/css/loaders/postcss.d.ts +0 -1
- package/dist/rollup/plugins/css/loaders/postcss.js +0 -1
- package/dist/rollup/plugins/css/loaders/sass.d.ts +0 -1
- package/dist/rollup/plugins/css/loaders/sass.js +0 -1
- package/dist/rollup/plugins/css/loaders/sourcemap.d.ts +0 -9
- package/dist/rollup/plugins/css/loaders/sourcemap.js +0 -1
- package/dist/rollup/plugins/css/loaders/stylus.d.ts +0 -1
- package/dist/rollup/plugins/css/loaders/stylus.js +0 -1
- package/dist/rollup/plugins/css/loaders/tailwindcss.d.ts +0 -1
- package/dist/rollup/plugins/css/loaders/tailwindcss.js +0 -1
- package/dist/rollup/plugins/css/minifiers/cssnano.d.ts +0 -1
- package/dist/rollup/plugins/css/minifiers/cssnano.js +0 -1
- package/dist/rollup/plugins/css/minifiers/lightningcss.d.ts +0 -1
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +0 -25
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.js +0 -1
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +0 -20
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.js +0 -1
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +0 -24
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1 +1,45 @@
|
|
|
1
|
-
var c=Object.defineProperty;var o=(e,r)=>c(e,"name",{value:r,configurable:!0});import{createPail as s}from"@visulima/pail";import{SimpleReporter as u}from"@visulima/pail/reporter";import{b as g}from"./packem_shared/index-CSyJAz0_.js";var f=Object.defineProperty,l=o((e,r)=>f(e,"name",{value:r,configurable:!0}),"r");const C=l(async(e,r={})=>{const{debug:t,environment:i,logger:a,mode:n,tsconfigPath:m,...d}={debug:!1,environment:"production",logger:{},mode:"build",tsconfigPath:void 0,...r},p=s({reporters:[new u({error:{hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0}})],scope:"packem",...a});await g(e,n,i,p,t,d,m)},"packem");export{C as packem};
|
|
1
|
+
import{createRequire as He}from"node:module";import{n as Ht,Z as xe,Y as Jt,J as Je,h as Se,y as yt,X as Gt,q as Ut,M as zt,a as Kt,A as be,K as Yt,k as Qt,b as Zt,c as Be,d as Xt,T as er}from"./packem_shared/index-UxllEEEe.js";import{g as wt}from"./packem_shared/create-or-update-key-storage-DHOKZmnD.js";const tr=He(import.meta.url),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Q,Ge=t=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,r]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ie.getBuiltinModule(t)}return tr(t)},Q=ie,{execFileSync:rr}=Ge("node:child_process"),ue=Ge("node:fs"),sr=Ge("node:tty"),Ue=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],ze=[12288,12288,65281,65376,65504,65510],Ke=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],Ye=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],Ae=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],ge=(t,e)=>{let r=0,s=Math.floor(t.length/2)-1;for(;r<=s;){const i=Math.floor((r+s)/2),o=i*2;if(e<t[o])s=i-1;else if(e>t[o+1])r=i+1;else return!0}return!1},ir=Ue[0],nr=Ue.at(-1),or=ze[0],ar=ze.at(-1),lr=Ke[0],cr=Ke.at(-1),ur=Ye[0],fr=Ye.at(-1),hr=Ae[0],gr=Ae.at(-1),nt=19968,[dr,pr]=mr(Ae);function mr(t){let e=t[0],r=t[1];for(let s=0;s<t.length;s+=2){const i=t[s],o=t[s+1];if(nt>=i&&nt<=o)return[i,o];o-i>r-e&&(e=i,r=o)}return[e,r]}const br=t=>t<ir||t>nr?!1:ge(Ue,t),yr=t=>t<or||t>ar?!1:ge(ze,t),wr=t=>t<lr||t>cr?!1:ge(Ke,t),$r=t=>t<ur||t>fr?!1:ge(Ye,t),vr=t=>t>=dr&&t<=pr?!0:t<hr||t>gr?!1:ge(Ae,t);function xr(t){return br(t)?"ambiguous":yr(t)?"fullwidth":wr(t)?"halfwidth":$r(t)?"narrow":vr(t)?"wide":"neutral"}function Sr(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function $t(t){return Sr(t),xr(t)}const vt=String.raw,ot=vt`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,kr=()=>new RegExp(vt`\p{RI}{2}|(?)${ot}(?:\u200D${ot})*`,"gu"),ae=new Set(["\x1B",""]),Le="\x07",xt="[",Qe="m",ke="]8;;",Er=39,Tr=/[\u200B\uFEFF\u2060-\u2064]/g,Ar=new RegExp(`(?:\\${xt}(?<code>\\d+)m|\\${ke}(?<uri>.*)${Le})`),Lr=Object.freeze(new Map([[0,0],[1,22],[2,22],[3,23],[4,24],[7,27],[8,28],[9,29],[30,39],[31,39],[32,39],[33,39],[34,39],[35,39],[36,39],[37,39],[40,49],[41,49],[42,49],[43,49],[44,49],[45,49],[46,49],[47,49],[90,39]])),le=/[\u001B\u009B](?:[[()#;?]{0,10}(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-ORZcf-nqry=><]|\]8;;[^\u0007\u001B]{0,100}(?:\u0007|\u001B\\))/g,ye=/[\u0000-\u0008\n-\u001F\u007F-\u009F]{1,1000}/y,je=kr(),at=new Map,we=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,$e=t=>t>=32&&t<=126?"latin":t===8203||t===8204||t===8205||t===8288?"zero":t<=31||t>=127&&t<=159?"control":t>=160&&t<=255||t>=9472&&t<=9599?"latin":t>=4352&&t<=4607||t>=11904&&t<=40959||t>=44032&&t<=55215||t>=63744&&t<=64255||t>=65280&&t<=65519&&!(t>=65377&&t<=65439)||t>=12352&&t<=12543?"wide":t===8230?"latin":"other",Mr=(t,e)=>{const r=Math.floor(t/65536),s=t%65536;let i=at.get(r);if(i||(i=new Map,at.set(r,i)),i.has(s))return i.get(s);let o;if($e(t)==="latin")o=e.width.regular;else if($e(t)==="control")o=e.width.control;else if($e(t)==="wide")o=e.width.wide;else switch($t(t)){case"ambiguous":{o=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{o=e.width.fullWidth;break}case"wide":{o=e.width.wide;break}default:o=e.width.regular}return i.set(s,o),o},Or=t=>t>=768&&t<=879||t>=6832&&t<=6911||t>=7616&&t<=7679||t>=8400&&t<=8447||t>=65056&&t<=65071||t>=917760&&t<=917999||t>=65024&&t<=65039||t>=3633&&t<=3642||t>=3655&&t<=3662||t>=3761&&t<=3769||t>=3771&&t<=3772||t>=3784&&t<=3789||t>=2304&&t<=2307||t>=2362&&t<=2383||t>=2385&&t<=2391||t>=2402&&t<=2403||t>=2433&&t<=2435||t>=2492&&t<=2500||t>=2509&&t<=2509||t>=2561&&t<=2563||t>=2620&&t<=2637||t>=1611&&t<=1631||t>=1648&&t<=1648||t>=1750&&t<=1773||t>=2276&&t<=2302||t>=1425&&t<=1469||t>=1471&&t<=1471||t>=1473&&t<=1474||t>=1476&&t<=1477||t>=1479&&t<=1479||t>=3893&&t<=3893||t>=3895&&t<=3895||t>=3897&&t<=3897||t>=3953&&t<=3966||t>=3968&&t<=3972||t>=3974&&t<=3975?!0:t>=768&&t<=777||t>=803&&t<=803,Ce=(t,e={})=>{if(!t||t.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const r={truncation:{countAnsiEscapeCodes:e.countAnsiEscapeCodes??!1,ellipsis:e.ellipsis??"",ellipsisWidth:e.ellipsisWidth??(e.ellipsis?Ce(e.ellipsis,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:e.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:e.ambiguousIsNarrow??!1,ansi:e.ansiWidth??0,control:e.controlWidth??0,emoji:e.emojiWidth??2,fullWidth:e.fullWidth??2,halfWidth:e.halfWidth??1,regular:e.regularWidth??1,tab:e.tabWidth??8,wide:e.wideWidth??2}},s=Math.max(0,r.truncation.limit-r.truncation.ellipsisWidth),{length:i}=t,o=i>1e4;let a=0,n=0,c=i,u=!1;const l=t.includes("\x1B")||t.includes("");for(;a<i;){if(l&&(t[a]==="\x1B"||t[a]==="")){if(t.startsWith("\x1B]8;;",a)){const v="\x1B]8;;\x07",B=v.length,V=t.indexOf("\x07",a+5);if(V!==-1){const H=t.indexOf(v,V+1);if(H!==-1){const d=H+B,g=t.slice(V+1,H).replace(le,""),$=Ce(g,{ambiguousIsNarrow:r.width.ambiguousIsNarrow,ansiWidth:r.width.ansi,controlWidth:r.width.control,countAnsiEscapeCodes:!1,ellipsis:r.truncation.ellipsis,ellipsisWidth:r.truncation.ellipsisWidth,emojiWidth:r.width.emoji,fullWidth:r.width.fullWidth,halfWidth:r.width.halfWidth,limit:Math.max(0,s-n),regularWidth:r.width.regular,tabWidth:r.width.tab,wideWidth:r.width.wide}),I=$.width;if($.truncated)u=!0,c=Math.min(c,a);else if(n+I>s&&(c=Math.min(c,a),u=!0,n+I>r.truncation.limit))break;if(n+=I,a=d,u&&n>=r.truncation.limit)break;continue}}}if(le.lastIndex=a,le.test(t)){const v=le.lastIndex-a,B=r.truncation.countAnsiEscapeCodes?v:r.width.ansi;if(n+B>s&&(c=Math.min(c,a),n+B>r.truncation.limit)){u=!0;break}n+=B,a=le.lastIndex;continue}}const w=t.codePointAt(a);if(w===8203||w===65279||w>=8288&&w<=8292){a+=1;continue}if(w===9){if(n+r.width.tab>s&&(c=Math.min(c,a),n+r.width.tab>r.truncation.limit)){u=!0;break}n+=r.width.tab,a+=1;continue}if(we.lastIndex=a,we.test(t)){const v=(we.lastIndex-a)*r.width.regular;if(n+v>s){const B=Math.floor((s-n)/r.width.regular);if(c=Math.min(c,a+B),n+v>r.truncation.limit){u=!0;break}}n+=v,a=we.lastIndex;continue}if((w<=31||w>=127&&w<=159)&&(ye.lastIndex=a,ye.test(t))){const v=(ye.lastIndex-a)*r.width.control;if(n+v>s&&(c=Math.min(c,a+Math.floor((s-n)/r.width.control)),n+v>r.truncation.limit)){u=!0;break}n+=v,a=ye.lastIndex;continue}if(je.lastIndex=a,je.test(t)){if(n+r.width.emoji>s&&(c=Math.min(c,a),n+r.width.emoji>r.truncation.limit)){u=!0;break}n+=r.width.emoji,a=je.lastIndex;continue}const N=t.codePointAt(a)??0;if(Or(N)){a+=N>65535?2:1;continue}let k;if(o)k=Mr(N,r);else switch($e(N)){case"control":{k=r.width.control;break}case"latin":{k=r.width.regular;break}case"wide":{k=r.width.wide;break}case"zero":{k=0;break}default:switch($t(N)){case"ambiguous":{k=r.width.ambiguousIsNarrow?r.width.regular:r.width.wide;break}case"fullwidth":{k=r.width.fullWidth;break}case"wide":{k=r.width.wide;break}default:k=r.width.regular}}if(n+k>s&&(c=Math.min(c,a),n+k>r.truncation.limit)){u=!0;break}n+=k,a+=N>65535?2:1}let h=n,p=!1;return u&&r.truncation.limit>=r.truncation.ellipsisWidth&&(h=r.truncation.limit,p=!0),{ellipsed:p,index:u?c:i,truncated:u,width:h}},Z=(t,e={})=>Ce(t,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,Br=/\x1B\[(\d+)m/;class St{activeForeground=void 0;activeBackground=void 0;activeFormatting=[];processEscape(e){const r=Br.exec(e);if(!r)return;const s=Number.parseInt(r[1],10);switch(s){case 0:{this.activeForeground=void 0,this.activeBackground=void 0,this.activeFormatting=[];break}case 39:{this.activeForeground=void 0;break}case 49:{this.activeBackground=void 0;break}default:if(s>=30&&s<=37||s>=90&&s<=97)this.activeForeground=e;else if(s>=40&&s<=47||s>=100&&s<=107)this.activeBackground=e;else if([1,2,3,4,7,8,9].includes(s))this.activeFormatting.push(e);else if([22,23,24,27,28,29].includes(s)){const i={22:"[1m",23:"[3m",24:"[4m",27:"[7m",28:"[8m",29:"[9m"}[s];i&&(this.activeFormatting=this.activeFormatting.filter(o=>!o.includes(i)))}}}getStartEscapesForAllActiveAttributes(){return[this.activeBackground,this.activeForeground,...this.activeFormatting].filter(Boolean).join("")}getEndEscapesForAllActiveAttributes(){const e=[];if(this.activeFormatting.length>0){const r={"\x1B[1m":"\x1B[22m","\x1B[2m":"\x1B[22m","\x1B[3m":"\x1B[23m","\x1B[4m":"\x1B[24m","\x1B[7m":"\x1B[27m","\x1B[8m":"\x1B[28m","\x1B[9m":"\x1B[29m"};[...this.activeFormatting].toReversed().forEach(s=>{const i=r[s];i&&e.push(i)})}return this.activeForeground&&e.push("\x1B[39m"),this.activeBackground&&e.push("\x1B[49m"),e.join("")}}const kt=(t,e)=>{if(!ae.has(t[e]))return{isInsideEscape:!1,isInsideLinkEscape:!1};const r=!0,s=t.slice(e+1,e+1+ke.length).join("")===ke;return{isInsideEscape:r,isInsideLinkEscape:s}},jr=(t,e={})=>{const r=new St;let s="",i=!1,o="",a="",n=!1;const c=[...t];for(let u=0;u<c.length;u++){const l=c[u];if(l&&ae.has(l)){if(s){const k=e.getWidth?.(s)??0,v={isEscapeSequence:!1,isGrapheme:!0,text:s,width:k};if(n&&(v.isHyperlink=!0,v.hyperlinkUrl=a),e.onSegment?.(v,r)===!1)return;s=""}i=!0,o=l;const w=kt(c,u),{isInsideLinkEscape:N}=w;if(N){let k=u+1;for(a="";k<c.length;){const B=c[k];if(B===Le)break;a+=B,k+=1}a=a.slice(4);const v={hyperlinkUrl:a,isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkStart:!0,width:0};if(e.onSegment?.(v,r)===!1)return;u=k,n=!0,i=!1,o="";continue}if(u+1<c.length&&c[u+1]==="\\"&&n){const k={isEscapeSequence:!0,isGrapheme:!1,isHyperlink:!0,isHyperlinkEnd:!0,width:0};if(e.onSegment?.(k,r)===!1)return;n=!1,a="",u+=1,i=!1,o="";continue}}if(i){if(o!==l&&(o+=l),l===Qe){i=!1,r.processEscape(o);const w={isEscapeSequence:!0,isGrapheme:!1,text:o,width:0};if(e.onSegment?.(w,r)===!1)return;o=""}continue}s+=l;const h=e.getWidth?.(s)??0,p={isEscapeSequence:!1,isGrapheme:!0,text:s,width:h};if(n&&(p.isHyperlink=!0,p.hyperlinkUrl=a),e.onSegment?.(p,r)===!1)return;s=""}if(s){const u=e.getWidth?.(s)??0,l={isEscapeSequence:!1,isGrapheme:!0,text:s,width:u};n&&(l.isHyperlink=!0,l.hyperlinkUrl=a),e.onSegment?.(l,r)}if(o){const u={isEscapeSequence:!0,isGrapheme:!1,text:o,width:0};e.onSegment?.(u,r)}},lt=t=>`${ae.values().next().value}${xt}${String(t)}${Qe}`,ct=t=>`${ae.values().next().value}${ke}${t}${Le}`,Nr=t=>{if(t.length===0)return"";if(t.length===1)return t[0];let e="",r,s;const i=t.join(`
|
|
2
|
+
`),o=[...i];let a=0;for(const[n,c]of o.entries()){if(e+=c,ae.has(c)){const l=Ar.exec(i.slice(a))?.groups??{};if(l.code!==void 0){const h=Number.parseFloat(l.code);r=h===Er?void 0:h}else l.uri!==void 0&&(s=l.uri.length===0?void 0:l.uri)}const u=Lr.get(Number(r));o[n+1]===`
|
|
3
|
+
`?(s&&(e+=ct("")),r&&u&&(e+=lt(u))):c===`
|
|
4
|
+
`&&(r&&u&&(e+=lt(r)),s&&(e+=ct(s))),a+=c.length}return e},Et=/(?=\s)|(?<=\s)/,Tt=/^\s+$/,Ne=t=>{if(!t.includes("\x1B"))return t;let e=t;return t.includes("\x1B[30m")&&(e+="\x1B[39m"),t.includes("\x1B[42m")&&(e+="\x1B[49m"),e},te=t=>{const e=t.split(" ");let r=e.length;for(;r>0&&Z(e[r-1])===0;)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},At=(t,e,r)=>{if(t.length===0)return[""];if(e<=0)return[t];const s=[],i=new St;let o="",a=0,n=!1,c=!1,u="",l=0;for(;l<t.length;){const h=t[l];if(ae.has(h)){n=!0,u=h,o+=h,c=kt([...t],l).isInsideLinkEscape,l+=1;continue}if(n){u+=h,o+=h,c?h===Le&&(n=c=!1):h===Qe&&(n=!1,i.processEscape(u)),l+=1;continue}const p=Z(h),w=h===" ";if(p===0){o+=h,l+=1;continue}if(a+p>e&&(o&&s.push(o+i.getEndEscapesForAllActiveAttributes()),o=i.getStartEscapesForAllActiveAttributes(),a=Z(o),w&&r)){for(;l<t.length&&t[l]===" ";)l+=1;continue}if(o+=h,a+=p,a===e&&l<t.length-1&&(s.push(o+i.getEndEscapesForAllActiveAttributes()),o=i.getStartEscapesForAllActiveAttributes(),a=Z(o),l+1<t.length&&t[l+1]===" "&&r)){for(l+=1;l<t.length&&t[l]===" ";)l+=1;continue}l+=1}return o&&s.push(o+i.getEndEscapesForAllActiveAttributes()),r?s.map(h=>te(h)):s},Ir=(t,e,r)=>{if(t.length===0)return[];const s=r?t.trim():t;if(s.length===0)return[];const i=[];let o="",a=0;return jr(s,{getWidth:Z,onSegment:(n,c)=>{const u=n.text??"";if(n.isEscapeSequence)o+=u;else{const l=u===" ";if(n.width===0)return o+=u,!0;if(a+n.width>e&&(o&&i.push(o),o=c.getStartEscapesForAllActiveAttributes(),a=0,l))return r||i.push(c.getStartEscapesForAllActiveAttributes()+u),!0;o+=u,a+=n.width}return!0}}),o&&i.push(o),r?i.map(n=>te(n)):i},Pr=(t,e,r)=>{if(t.length===0)return[];const s=r?t.trim():t;if(s.length===0)return[];const i=s.split(Et),o=[];let a="",n=0,c=0;for(;c<i.length;){const u=i[c],l=Tt.test(u),h=Z(u);if(u.length===0){c+=1;continue}if(r&&l&&n===0){c+=1;continue}if(n+h>e&&n>0){r?o.push(te(a)):o.push(a),a="",n=0;continue}a+=u,n+=h,c+=1}return a&&(r?o.push(te(a)):o.push(a)),o},Fr=(t,e,r)=>{if(t.length===0)return[];const s=r?t.trim():t;if(s.length===0)return[];const i=s.split(Et),o=[];let a="",n=0,c=0;for(;c<i.length;){const u=i[c],l=Tt.test(u),h=Z(u);if(u.length===0){c+=1;continue}if(r&&l&&n===0){c+=1;continue}if(h>e){a&&o.push(Ne(r?te(a):a));const p=At(u,e,r);if(p.length>0){for(let w=0;w<p.length-1;w+=1)o.push(p[w]);a=p.at(-1),n=Z(a)}else a="",n=0;c+=1;continue}if(n+h>e&&n>0&&(o.push(Ne(r?te(a):a)),a="",n=0,r&&l)){c+=1;continue}a+=u,n+=h,c+=1}return a&&o.push(Ne(r?te(a):a)),o},fe={BREAK_AT_CHARACTERS:"BREAK_AT_CHARACTERS",BREAK_WORDS:"BREAK_WORDS",PRESERVE_WORDS:"PRESERVE_WORDS",STRICT_WIDTH:"STRICT_WIDTH"},Rr=(t,e={})=>{const{removeZeroWidthCharacters:r=!0,trim:s=!0,width:i=80,wrapMode:o=fe.PRESERVE_WORDS}=e;if(s&&t.trim()==="")return"";let a=t.normalize("NFC").replaceAll(`\r
|
|
5
|
+
`,`
|
|
6
|
+
`);return r&&(a=a.replaceAll(Tr,"")),a.split(`
|
|
7
|
+
`).map(n=>{if(s&&n.trim()==="")return"";let c;switch(o){case fe.BREAK_AT_CHARACTERS:{c=Ir(n,i,s);break}case fe.BREAK_WORDS:{c=Fr(n,i,s);break}case fe.STRICT_WIDTH:{c=At(n,i,s);break}default:c=Pr(n,i,s)}return Nr(c)}).join(`
|
|
8
|
+
`)},Lt=80,Mt=24,We=(t,e,{shell:r,env:s}={})=>rr(t,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:r,env:s}).trim(),ve=(t,e)=>({columns:Number.parseInt(t,10),rows:Number.parseInt(e,10)}),Ot=(t,e)=>{const{columns:r,rows:s}=ve(t,e);if(!(Number.isNaN(r)||Number.isNaN(s))&&!(r===Lt&&s===Mt))return{columns:r,rows:s}},_r=()=>{if(Q.platform!=="linux")return!0;try{const t=ue.readFileSync("/proc/self/stat","utf8"),e=t.lastIndexOf(") ");if(e===-1)return!1;const r=t.slice(e+2).trim().split(/\s+/),s=Number.parseInt(r[2],10),i=Number.parseInt(r[5],10);return Number.isNaN(s)||Number.isNaN(i)||i<=0?!1:s===i}catch{return!1}};function Cr(){const{env:t,stdout:e,stderr:r}=Q;if(e?.columns&&e?.rows)return ve(e.columns,e.rows);if(r?.columns&&r?.rows)return ve(r.columns,r.rows);if(t.COLUMNS&&t.LINES)return ve(t.COLUMNS,t.LINES);const s={columns:Lt,rows:Mt};return Q.platform==="win32"?Ie()??s:Q.platform==="darwin"?ut()??Ie()??s:ut()??Ie()??Wr()??s}const ut=()=>{try{const t=Q.platform==="darwin"?ue.constants.O_EVTONLY|ue.constants.O_NONBLOCK:ue.constants.O_NONBLOCK,{columns:e,rows:r}=sr.WriteStream(ue.openSync("/dev/tty",t));return{columns:e,rows:r}}catch{}},Ie=()=>{try{const t=We("tput",["cols"],{env:{TERM:"dumb",...Q.env}}),e=We("tput",["lines"],{env:{TERM:"dumb",...Q.env}});if(t&&e)return Ot(t,e)}catch{}},Wr=()=>{try{if(!_r())return;const t=We("resize",["-u"]).match(/\d+/g);if(t.length===2)return Ot(t[0],t[1])}catch{}};let Dr=class{#r;#e=!1;#t=!1;#s=0;#i=0;constructor(e,r){this.#r={stderr:r,stdout:e}}get lastLength(){return this.#s}get outside(){return this.#i}get isHooked(){return this.#e}get isSuspended(){return this.#t}erase(e,r=this.#s){this.#r[e].erase(r)}hook(){if(this.#e)return!1;const e=Object.values(this.#r);for(const r of e)r.active();return this.#n(!0),!0}resume(e,r){if(this.#t){this.#t=!1,r&&this.erase(e,r),this.#s=0;const s=Object.values(this.#r);for(const i of s)i.active()}}suspend(e,r=!0){if(!this.#t){this.#t=!0,r&&this.erase(e);const s=Object.values(this.#r);for(const i of s)i.renew()}}unhook(e=!0){if(!this.#e)return!1;const r=Object.values(this.#r);for(const s of r)s.inactive(e);return this.#n(),!0}update(e,r,s=0){if(r.length>0){const i=this.#r[e],{columns:o,rows:a}=Cr(),n=s>a?a-1:Math.max(0,Math.min(a-1,s)),c=this.lastLength-n,u=Math.max(c-a,this.outside);let l=r.reduce((h,p)=>[...h,Rr(p,{trim:!1,width:o,wrapMode:fe.STRICT_WIDTH})],[]);a<=c?(i.erase(a),n<u&&(l=l.slice(u-n+1))):c&&i.erase(c),i.write(`${l.join(`
|
|
9
|
+
`)}
|
|
10
|
+
`),this.#s=u?u+l.length+1:l.length,this.#i=Math.max(this.lastLength-a,this.outside)}}#n(e=!1){this.#e=e,this.#s=0,this.#i=0}};const qr=He(import.meta.url),ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vr=t=>{if(typeof ce<"u"&&ce.versions&&ce.versions.node){const[e,r]=ce.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return ce.getBuiltinModule(t)}return qr(t)},{StringDecoder:Hr}=Vr("node:string_decoder"),Jr="\x1B",de=`${Jr}[`,Gr=`${de}?25l`,Ur=`${de}G`,zr=`${de}?25h`,Kr=(t=1)=>`${de}${String(t)}A`,Yr=t=>`${de}${String(t)}K`,Qr=Yr(2),Zr=t=>{if(t<=0)return"";let e="";for(let r=0;r<t;r+=1)e+=Qr,r<t-1&&(e+=Kr());return e+=Ur,e};class Ee{static DRAIN=!0;#r=new Hr;#e=[];#t;#s;constructor(e){this.#t=e.write.bind(e),this.#s=e}active(){this.write(Gr),this.#s.write=(e,...r)=>{const s=r.at(-1);return this.#e.push(this.#r.write(typeof e=="string"?Buffer.from(e,typeof r[0]=="string"?r[0]:void 0):Buffer.from(e))),typeof s=="function"&&s(),Ee.DRAIN}}erase(e){e>0&&this.write(Zr(e+1))}inactive(e=!1){this.#e.length>0&&(e&&this.write(`
|
|
11
|
+
`),this.#e.forEach(r=>{this.write(r)}),this.#e=[]),this.renew()}renew(){this.#s.write=this.#t,this.write(zr)}write(e){this.#t.apply(this.#s,[e])}}var Xr=Object.defineProperty,Bt=(t,e)=>Xr(t,"name",{value:e,configurable:!0}),es=Object.defineProperty,jt=Bt((t,e)=>es(t,"name",{value:e,configurable:!0}),"e");class ts extends Error{static{Bt(this,"n")}static{jt(this,"PailError")}status;why;fix;link;constructor(e){const r=typeof e=="string"?{message:e}:e;super(r.message,r.cause===void 0?void 0:{cause:r.cause}),this.name="PailError",this.status=r.status??500,this.why=r.why,this.fix=r.fix,this.link=r.link}toJSON(){const e={message:this.message,name:this.name,status:this.status};return this.why&&(e.why=this.why),this.fix&&(e.fix=this.fix),this.link&&(e.link=this.link),this.stack&&(e.stack=this.stack),this.cause!==void 0&&(e.cause=this.cause instanceof Error?{message:this.cause.message,name:this.cause.name,stack:this.cause.stack}:this.cause),e}toString(){let e=`${this.name} [${String(this.status)}]: ${this.message}`;if(this.why&&(e+=`
|
|
12
|
+
Why: ${this.why}`),this.fix&&(e+=`
|
|
13
|
+
Fix: ${this.fix}`),this.link&&(e+=`
|
|
14
|
+
Link: ${this.link}`),this.cause!==void 0){const r=this.cause instanceof Error?this.cause.message:String(this.cause);e+=`
|
|
15
|
+
Cause: ${r}`}return e}}jt(t=>new ts(t),"createPailError");var rs=Object.defineProperty,y=(t,e)=>rs(t,"name",{value:e,configurable:!0});He(import.meta.url);const ss=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{stdout:Ze,stderr:Xe,env:he}=ss,is="\x1B",O="\x1B[",Nt=";";var ns=Object.defineProperty,os=y((t,e)=>ns(t,"name",{value:e,configurable:!0}),"t$3"),as=Object.defineProperty,ls=os((t,e)=>as(t,"name",{value:e,configurable:!0}),"t");const cs=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,us=/^(?:msys|cygwin)$/,fs=!cs&&(process.platform==="win32"||us.test(process.env.OSTYPE));var hs=Object.defineProperty,W=ls((t,e)=>hs(t,"name",{value:e,configurable:!0}),"n");const gs=W((t=1)=>`${O}${String(t)}D`,"cursorBackward");W((t=1)=>`${O}${String(t)}B`,"cursorDown");W((t=1)=>`${O}${String(t)}C`,"cursorForward");const ds=`${O}G`;W((t=1)=>gs(t),"cursorLeft");const ps=W((t=1)=>`${O}${String(t)}G`,"cursorHorizontalAbsolute");W((t,e)=>{let r="";return t<0?r+=`${O}${String(-t)}D`:t>0&&(r+=`${O}${String(t)}C`),e<0?r+=`${O}${String(-e)}A`:e>0&&(r+=`${O}${String(e)}B`),r},"cursorMove");W((t=1)=>`${O}${String(t)}E`,"cursorNextLine");W((t=1)=>`${O}${String(t)}F`,"cursorPreviousLine");const ms=W((t,e)=>e===void 0?ps(t+1):`${O}${String(e+1)}${Nt}${String(t+1)}H`,"cursorTo");W((t,e)=>e===void 0?`${O}${String(t)}H`:`${O}${String(t)}${Nt}${String(e)}H`,"cursorPosition");W((t=1)=>`${O}${String(t)}I`,"cursorHorizontalForwardTab");W((t=1)=>`${O}${String(t)}Z`,"cursorBackwardTab");W((t=1)=>`${O}${String(t)}X`,"eraseCharacter");W((t=1)=>`${O}${String(t)}d`,"cursorVerticalAbsolute");const bs=W((t=1)=>`${O}${String(t)}A`,"cursorUp");var ys=(t=>(t[t.Default=0]="Default",t[t.BlinkingBlock=1]="BlinkingBlock",t[t.SteadyBlock=2]="SteadyBlock",t[t.BlinkingUnderline=3]="BlinkingUnderline",t[t.SteadyUnderline=4]="SteadyUnderline",t[t.BlinkingBar=5]="BlinkingBar",t[t.SteadyBar=6]="SteadyBar",t))(ys||{});W(t=>`${O}${String(t)} q`,"setCursorStyle");var ws=Object.defineProperty,$s=y((t,e)=>ws(t,"name",{value:e,configurable:!0}),"o$3"),vs=Object.defineProperty,xs=$s((t,e)=>vs(t,"name",{value:e,configurable:!0}),"s"),Ss=Object.defineProperty,et=xs((t,e)=>Ss(t,"name",{value:e,configurable:!0}),"o"),ne=(t=>(t[t.ToEnd=0]="ToEnd",t[t.ToBeginning=1]="ToBeginning",t[t.EntireScreen=2]="EntireScreen",t[t.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",t))(ne||{});const Y=et(t=>{const e=t>=0&&t<=3?t:0;return`${O}${e===0?"":String(e)}J`},"eraseDisplay");var It=(t=>(t[t.ToEnd=0]="ToEnd",t[t.ToBeginning=1]="ToBeginning",t[t.EntireLine=2]="EntireLine",t))(It||{});const Me=et(t=>{const e=t>=0&&t<=2?t:0;return`${O}${e===0?"":String(e)}K`},"eraseInLine");Y(0);const ks=Me(2);Me(0);Me(1);et(t=>{if(t<=0)return"";let e="";for(let r=0;r<t;r+=1)e+=ks,r<t-1&&(e+=bs());return e+=ds,e},"eraseLines");Y(2);Y(1);Y(3);ms(0,0)+Y(ne.ToEnd);`${Me(It.EntireLine)}${O}`;`${O}${Y(ne.EntireScreen)}`;const ft=fs?`${Y(ne.EntireScreen)}${O}0f`:`${Y(ne.EntireScreen)}${Y(ne.EntireScreenAndScrollback)}${O}H${is}c`;var Es=Object.defineProperty,oe=y((t,e)=>Es(t,"name",{value:e,configurable:!0}),"t$2");function tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}y(tt,"getDefaultExportFromCjs");oe(tt,"getDefaultExportFromCjs");function Pt(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}y(Pt,"getDefaultExportFromNamespaceIfPresent");oe(Pt,"getDefaultExportFromNamespaceIfPresent");function Ft(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")&&Object.keys(t).length===1?t.default:t}y(Ft,"getDefaultExportFromNamespaceIfNotNamed");oe(Ft,"getDefaultExportFromNamespaceIfNotNamed");function Rt(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=oe(y(function s(){var i=!1;try{i=this instanceof s}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a"),"a");r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var i=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:oe(function(){return t[s]},"get")})}),r}y(Rt,"getAugmentedNamespace");oe(Rt,"getAugmentedNamespace");var Pe={exports:{}},ht;function _t(){return ht||(ht=1,(function(t,e){var r=Object.defineProperty,s=y((d,g)=>r(d,"name",{value:g,configurable:!0}),"$");const{hasOwnProperty:i}=Object.prototype,o=H();o.configure=H,o.stringify=o,o.default=o,e.stringify=o,e.configure=H,t.exports=o;const a=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function n(d){return d.length<5e3&&!a.test(d)?`"${d}"`:JSON.stringify(d)}y(n,"strEscape"),s(n,"strEscape");function c(d,g){if(d.length>200||g)return d.sort(g);for(let $=1;$<d.length;$++){const I=d[$];let L=$;for(;L!==0&&d[L-1]>I;)d[L]=d[L-1],L--;d[L]=I}return d}y(c,"sort"),s(c,"sort");const u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function l(d){return u.call(d)!==void 0&&d.length!==0}y(l,"isTypedArrayWithEntries"),s(l,"isTypedArrayWithEntries");function h(d,g,$){d.length<$&&($=d.length);const I=g===","?"":" ";let L=`"0":${I}${d[0]}`;for(let R=1;R<$;R++)L+=`${g}"${R}":${I}${d[R]}`;return L}y(h,"stringifyTypedArray"),s(h,"stringifyTypedArray");function p(d){if(i.call(d,"circularValue")){const g=d.circularValue;if(typeof g=="string")return`"${g}"`;if(g==null)return g;if(g===Error||g===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}y(p,"getCircularValueOption"),s(p,"getCircularValueOption");function w(d){let g;if(i.call(d,"deterministic")&&(g=d.deterministic,typeof g!="boolean"&&typeof g!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return g===void 0?!0:g}y(w,"getDeterministicOption"),s(w,"getDeterministicOption");function N(d,g){let $;if(i.call(d,g)&&($=d[g],typeof $!="boolean"))throw new TypeError(`The "${g}" argument must be of type boolean`);return $===void 0?!0:$}y(N,"getBooleanOption"),s(N,"getBooleanOption");function k(d,g){let $;if(i.call(d,g)){if($=d[g],typeof $!="number")throw new TypeError(`The "${g}" argument must be of type number`);if(!Number.isInteger($))throw new TypeError(`The "${g}" argument must be an integer`);if($<1)throw new RangeError(`The "${g}" argument must be >= 1`)}return $===void 0?1/0:$}y(k,"getPositiveIntegerOption"),s(k,"getPositiveIntegerOption");function v(d){return d===1?"1 item":`${d} items`}y(v,"getItemCount"),s(v,"getItemCount");function B(d){const g=new Set;for(const $ of d)(typeof $=="string"||typeof $=="number")&&g.add(String($));return g}y(B,"getUniqueReplacerSet"),s(B,"getUniqueReplacerSet");function V(d){if(i.call(d,"strict")){const g=d.strict;if(typeof g!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(g)return $=>{let I=`Object can not safely be stringified. Received type ${typeof $}`;throw typeof $!="function"&&(I+=` (${$.toString()})`),new Error(I)}}}y(V,"getStrictOption"),s(V,"getStrictOption");function H(d){d={...d};const g=V(d);g&&(d.bigint===void 0&&(d.bigint=!1),"circularValue"in d||(d.circularValue=Error));const $=p(d),I=N(d,"bigint"),L=w(d),R=typeof L=="function"?L:void 0,J=k(d,"maximumDepth"),j=k(d,"maximumBreadth");function re(C,f,m,E,x,T){let b=f[C];switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(C)),b=E.call(f,C,b),typeof b){case"string":return n(b);case"object":{if(b===null)return"null";if(m.indexOf(b)!==-1)return $;let S="",P=",";const F=T;if(Array.isArray(b)){if(b.length===0)return"[]";if(J<m.length+1)return'"[Array]"';m.push(b),x!==""&&(T+=x,S+=`
|
|
16
|
+
${T}`,P=`,
|
|
17
|
+
${T}`);const q=Math.min(b.length,j);let z=0;for(;z<q-1;z++){const me=re(String(z),b,m,E,x,T);S+=me!==void 0?me:"null",S+=P}const K=re(String(z),b,m,E,x,T);if(S+=K!==void 0?K:"null",b.length-1>j){const me=b.length-j-1;S+=`${P}"... ${v(me)} not stringified"`}return x!==""&&(S+=`
|
|
18
|
+
${F}`),m.pop(),`[${S}]`}let M=Object.keys(b);const _=M.length;if(_===0)return"{}";if(J<m.length+1)return'"[Object]"';let A="",D="";x!==""&&(T+=x,P=`,
|
|
19
|
+
${T}`,A=" ");const G=Math.min(_,j);L&&!l(b)&&(M=c(M,R)),m.push(b);for(let q=0;q<G;q++){const z=M[q],K=re(z,b,m,E,x,T);K!==void 0&&(S+=`${D}${n(z)}:${A}${K}`,D=P)}if(_>j){const q=_-j;S+=`${D}"...":${A}"${v(q)} not stringified"`,D=P}return x!==""&&D.length>1&&(S=`
|
|
20
|
+
${T}${S}
|
|
21
|
+
${F}`),m.pop(),`{${S}}`}case"number":return isFinite(b)?String(b):g?g(b):"null";case"boolean":return b===!0?"true":"false";case"undefined":return;case"bigint":if(I)return String(b);default:return g?g(b):void 0}}y(re,"J"),s(re,"stringifyFnReplacer");function se(C,f,m,E,x,T){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(C)),typeof f){case"string":return n(f);case"object":{if(f===null)return"null";if(m.indexOf(f)!==-1)return $;const b=T;let S="",P=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(J<m.length+1)return'"[Array]"';m.push(f),x!==""&&(T+=x,S+=`
|
|
22
|
+
${T}`,P=`,
|
|
23
|
+
${T}`);const _=Math.min(f.length,j);let A=0;for(;A<_-1;A++){const G=se(String(A),f[A],m,E,x,T);S+=G!==void 0?G:"null",S+=P}const D=se(String(A),f[A],m,E,x,T);if(S+=D!==void 0?D:"null",f.length-1>j){const G=f.length-j-1;S+=`${P}"... ${v(G)} not stringified"`}return x!==""&&(S+=`
|
|
24
|
+
${b}`),m.pop(),`[${S}]`}m.push(f);let F="";x!==""&&(T+=x,P=`,
|
|
25
|
+
${T}`,F=" ");let M="";for(const _ of E){const A=se(_,f[_],m,E,x,T);A!==void 0&&(S+=`${M}${n(_)}:${F}${A}`,M=P)}return x!==""&&M.length>1&&(S=`
|
|
26
|
+
${T}${S}
|
|
27
|
+
${b}`),m.pop(),`{${S}}`}case"number":return isFinite(f)?String(f):g?g(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(I)return String(f);default:return g?g(f):void 0}}y(se,"I"),s(se,"stringifyArrayReplacer");function X(C,f,m,E,x){switch(typeof f){case"string":return n(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(C),typeof f!="object")return X(C,f,m,E,x);if(f===null)return"null"}if(m.indexOf(f)!==-1)return $;const T=x;if(Array.isArray(f)){if(f.length===0)return"[]";if(J<m.length+1)return'"[Array]"';m.push(f),x+=E;let A=`
|
|
28
|
+
${x}`;const D=`,
|
|
29
|
+
${x}`,G=Math.min(f.length,j);let q=0;for(;q<G-1;q++){const K=X(String(q),f[q],m,E,x);A+=K!==void 0?K:"null",A+=D}const z=X(String(q),f[q],m,E,x);if(A+=z!==void 0?z:"null",f.length-1>j){const K=f.length-j-1;A+=`${D}"... ${v(K)} not stringified"`}return A+=`
|
|
30
|
+
${T}`,m.pop(),`[${A}]`}let b=Object.keys(f);const S=b.length;if(S===0)return"{}";if(J<m.length+1)return'"[Object]"';x+=E;const P=`,
|
|
31
|
+
${x}`;let F="",M="",_=Math.min(S,j);l(f)&&(F+=h(f,P,j),b=b.slice(f.length),_-=f.length,M=P),L&&(b=c(b,R)),m.push(f);for(let A=0;A<_;A++){const D=b[A],G=X(D,f[D],m,E,x);G!==void 0&&(F+=`${M}${n(D)}: ${G}`,M=P)}if(S>j){const A=S-j;F+=`${M}"...": "${v(A)} not stringified"`,M=P}return M!==""&&(F=`
|
|
32
|
+
${x}${F}
|
|
33
|
+
${T}`),m.pop(),`{${F}}`}case"number":return isFinite(f)?String(f):g?g(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(I)return String(f);default:return g?g(f):void 0}}y(X,"V"),s(X,"stringifyIndent");function ee(C,f,m){switch(typeof f){case"string":return n(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(C),typeof f!="object")return ee(C,f,m);if(f===null)return"null"}if(m.indexOf(f)!==-1)return $;let E="";const x=f.length!==void 0;if(x&&Array.isArray(f)){if(f.length===0)return"[]";if(J<m.length+1)return'"[Array]"';m.push(f);const F=Math.min(f.length,j);let M=0;for(;M<F-1;M++){const A=ee(String(M),f[M],m);E+=A!==void 0?A:"null",E+=","}const _=ee(String(M),f[M],m);if(E+=_!==void 0?_:"null",f.length-1>j){const A=f.length-j-1;E+=`,"... ${v(A)} not stringified"`}return m.pop(),`[${E}]`}let T=Object.keys(f);const b=T.length;if(b===0)return"{}";if(J<m.length+1)return'"[Object]"';let S="",P=Math.min(b,j);x&&l(f)&&(E+=h(f,",",j),T=T.slice(f.length),P-=f.length,S=","),L&&(T=c(T,R)),m.push(f);for(let F=0;F<P;F++){const M=T[F],_=ee(M,f[M],m);_!==void 0&&(E+=`${S}${n(M)}:${_}`,S=",")}if(b>j){const F=b-j;E+=`${S}"...":"${v(F)} not stringified"`}return m.pop(),`{${E}}`}case"number":return isFinite(f)?String(f):g?g(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(I)return String(f);default:return g?g(f):void 0}}y(ee,"N"),s(ee,"stringifySimple");function Oe(C,f,m){if(arguments.length>1){let E="";if(typeof m=="number"?E=" ".repeat(Math.min(m,10)):typeof m=="string"&&(E=m.slice(0,10)),f!=null){if(typeof f=="function")return re("",{"":C},[],f,E,"");if(Array.isArray(f))return se("",C,[],B(f),E,"")}if(E.length!==0)return X("",C,[],E,"")}return ee("",C,[])}return y(Oe,"M"),s(Oe,"stringify"),Oe}y(H,"configure"),s(H,"configure")})(Pe,Pe.exports)),Pe.exports}y(_t,"requireSafeStableStringify");var Ts=_t();const As=tt(Ts),Ls=As.configure;var Ms=Object.defineProperty,Os=y((t,e)=>Ms(t,"name",{value:e,configurable:!0}),"o$1");const Bs=Os(t=>{const e=console;return t==="error"?e.__error??console.error:t==="warn"?e.__warn??console.warn:t==="trace"?e.__trace??console.trace:e.__log??console.log},"writeConsoleLogBasedOnLevel");var js=Object.defineProperty,Ns=y((t,e)=>js(t,"name",{value:e,configurable:!0}),"t");let Is=class{static{y(this,"a")}static{Ns(this,"RawReporter")}log(t){const{context:e=[],message:r,type:s}=t;Bs(s.level)(r,...e)}};var Ps=Object.defineProperty,Fs=y((t,e)=>Ps(t,"name",{value:e,configurable:!0}),"a");const De=Fs(t=>t===void 0?[]:Array.isArray(t)?t:[t],"arrayify");var Rs=Object.defineProperty,_s=y((t,e)=>Rs(t,"name",{value:e,configurable:!0}),"g$3");const qe=_s((t,e)=>{const r={...t};return Object.keys(e).forEach(s=>{r[s]={...r[s],...e[s]}}),r},"mergeTypes");var Cs=Object.defineProperty,Ve=y((t,e)=>Cs(t,"name",{value:e,configurable:!0}),"d");const Ws=Ve(t=>{let e=!1;return function(...r){if(!e){e=!0;try{const s=t.apply(this,r);return e=!1,s}catch(s){throw e=!1,s}}}},"preventLoop");class rt{static{y(this,"PailBrowserImpl")}static{Ve(this,"PailBrowserImpl")}timersMap;countMap;seqTimers;lastLog;logLevels;disabled;paused;messageQueue;scopeName;types;longestLabel;processors;generalLogLevel;reporters;throttle;throttleMin;stringify;groups;startTimerMessage;endTimerMessage;rawReporter;force={};constructor(e){this.throttle=e.throttle??1e3,this.throttleMin=e.throttleMin??5;const r=e.parentLongestLabel,s=e.parentTypes,i=e.parentStringify,o=e.parentLogLevels;this.stringify=i??Ls({strict:!0}),this.startTimerMessage=e.messages?.timerStart??"Initialized timer...",this.endTimerMessage=e.messages?.timerEnd??"Timer run for:",s&&r?(this.types=s,this.longestLabel=r):(this.types=qe(Ht,e.types??{}),this.longestLabel=xe(this.types)),this.logLevels=o&&!e.logLevels?o:{...Jt,...e.logLevels},this.generalLogLevel=this.#t(e.logLevel),this.reporters=new Set,this.processors=new Set,this.disabled=e.disabled??!1,this.paused=!1,this.messageQueue=[],this.scopeName=De(e.scope).filter(Boolean),this.timersMap=new Map,this.countMap=new Map,this.groups=[],this.seqTimers=new Set,this.lastLog={},this.logger=Ws(this.logger.bind(this)),this.#r(),Array.isArray(e.reporters)&&this.registerReporters(e.reporters),this.rawReporter=this.extendReporter(e.rawReporter??new Is),Array.isArray(e.processors)&&this.registerProcessors(e.processors)}#r(){for(const e in this.types)this[e]=this.logger.bind(this,e,!1,!1);for(const e in this.types)this.force[e]=this.logger.bind(this,e,!1,!0)}wrapConsole(){for(const e in this.types)console[`__${e}`]||(console[`__${e}`]=console[e]),console[e]=this[e]}restoreConsole(){for(const e in this.types)console[`__${e}`]&&(console[e]=console[`__${e}`],delete console[`__${e}`])}wrapException(){process.on("uncaughtException",e=>{this.error(e)}),process.on("unhandledRejection",e=>{this.error(e)})}disable(){this.disabled=!0}enable(){this.disabled=!1}isEnabled(){return!this.disabled}pause(){this.paused=!0}resume(){this.paused=!1;const e=this.messageQueue.splice(0);for(let r=0;r<e.length;r+=1){const{messageObject:s,raw:i,type:o}=e[r];this.logger(o,i,!1,...s)}}scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}unscope(){this.scopeName=[]}child(e){const r=e?.types!==void 0,s=r?qe(this.types,e.types):this.types,i=e?.reporters??[],o=i.length>0?[...this.reporters,...i]:[...this.reporters],a=e?.processors??[],n=a.length>0?[...this.processors,...a]:[...this.processors],c=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let u;if(e?.scope){const p=De(e.scope).filter(Boolean);u=this.scopeName.length>0?[...this.scopeName,...p]:p}else u=this.scopeName.length>0?this.scopeName:[];const l=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},h={disabled:e?.disabled??this.disabled,logLevel:e?.logLevel??this.generalLogLevel,logLevels:c,messages:l,processors:n,rawReporter:e?.rawReporter??this.rawReporter,reporters:o,scope:u,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return r?(h.parentTypes=s,h.parentLongestLabel=xe(s)):(h.parentTypes=this.types,h.parentLongestLabel=this.longestLabel),e?.logLevels||(h.parentLogLevels=this.logLevels),e?.messages||(h.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),h.parentStringify=this.stringify,new rt(h)}time(e="default"){this.seqTimers.has(e)?this.logger("warn",!1,!1,{message:`Timer '${e}' already exists`,prefix:e}):(this.seqTimers.add(e),this.timersMap.set(e,Date.now()),this.logger("start",!1,!1,{message:this.startTimerMessage,prefix:e}))}timeLog(e,...r){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const s=Date.now()-this.timersMap.get(e);this.logger("info",!1,!1,{context:r,message:s<1e3?`${String(s)} ms`:`${(s/1e3).toFixed(2)} s`,prefix:e})}else this.logger("warn",!1,!1,{context:r,message:"Timer not found",prefix:e})}timeEnd(e){if(!e&&this.seqTimers.size>0&&(e=[...this.seqTimers].pop()),e&&this.timersMap.has(e)){const r=Date.now()-this.timersMap.get(e);this.timersMap.delete(e),this.logger("stop",!1,!1,{message:`${this.endTimerMessage} ${r<1e3?`${String(r)} ms`:`${(r/1e3).toFixed(2)} s`}`,prefix:e})}else this.logger("warn",!1,!1,{message:"Timer not found",prefix:e})}group(e="console.group"){globalThis.window===void 0?this.groups.push(e):console.group(e)}groupEnd(){globalThis.window===void 0?this.groups.pop():console.groupEnd()}count(e="default"){const r=this.countMap.get(e)??0;this.countMap.set(e,r+1),this.logger("log",!1,!1,{message:`${e}: ${String(r+1)}`,prefix:e})}countReset(e="default"){this.countMap.has(e)?this.countMap.delete(e):this.logger("warn",!1,!1,{message:`Count for ${e} does not exist`,prefix:e})}clear(){console.clear()}raw(e,...r){this.disabled||this.logger("log",!0,!1,{context:r,message:e})}extendReporter(e){return typeof e.setLoggerTypes=="function"&&e.setLoggerTypes(this.types),typeof e.setStringify=="function"&&e.setStringify(this.stringify),e}registerReporters(e){for(let r=0;r<e.length;r+=1)this.reporters.add(this.extendReporter(e[r]))}registerProcessors(e){for(let r=0;r<e.length;r+=1){const s=e[r];typeof s.setStringify=="function"&&s.setStringify(this.stringify),this.processors.add(s)}}#e(e,r){if(r)this.rawReporter.log(Object.freeze(e));else for(const s of this.reporters)s.log(Object.freeze(e))}#t(e){return e&&this.logLevels[e]?e:"debug"}#s(e,r,...s){const i={badge:void 0,context:void 0,error:void 0,label:void 0,message:Je,prefix:void 0,repeated:void 0,scope:void 0,suffix:void 0};if(i.type={level:r.logLevel,name:e},i.groups=this.groups,i.scope=this.scopeName,i.date=new Date,s.length>0&&s[0]instanceof Error)i.error=s[0],s.length>1&&(i.context=s.slice(1));else if(s.length>0&&typeof s[0]=="object"&&s[0]!==null&&"message"in s[0]){const{context:o,message:a,prefix:n,suffix:c}=s[0];if(o&&(i.context=o),n&&(i.prefix=n),c&&(i.suffix=c),i.message=a,s.length>1){const u=s.slice(1);i.context?i.context=Array.isArray(i.context)?[...i.context,...u]:[i.context,...u]:i.context=u}}else s.length>1?(i.message=s[0],i.context=s.slice(1)):s.length===1?i.message=s[0]:i.message=void 0;return r.logLevel==="trace"&&(i.traceError=new Error("Trace")),r.badge&&(i.badge=r.badge),r.label&&(i.label=r.label),i}logger(e,r,s,...i){if(this.disabled)return;if(this.paused){this.messageQueue.push({messageObject:i,raw:r,type:e});return}const o=this.types[e],a=this.#t(o.logLevel);if(s||this.logLevels[a]>=this.logLevels[this.generalLogLevel]){let n=this.#s(e,o,...i);const c=Ve((l=!1)=>{const h=(this.lastLog.count??0)-this.throttleMin;if(this.lastLog.object&&h>0){const p={...this.lastLog.object};h>1&&(p.repeated=h),this.#e(p,r),this.lastLog.count=1}if(l){for(const p of this.processors)n={...p.process(n)};this.lastLog.object=n,this.#e(n,r)}},"resolveLog");clearTimeout(this.lastLog.timeout);const u=this.lastLog.time&&n.date?new Date(n.date).getTime()-this.lastLog.time.getTime():0;if(this.lastLog.time=new Date(n.date),u<this.throttle)try{if(this.lastLog.object&&JSON.stringify([n.label,n.scope,n.type,n.message,n.prefix,n.suffix,n.context])===JSON.stringify([this.lastLog.object.label,this.lastLog.object.scope,this.lastLog.object.type,this.lastLog.object.message,this.lastLog.object.prefix,this.lastLog.object.suffix,this.lastLog.object.context])&&(this.lastLog.count=(this.lastLog.count??0)+1,this.lastLog.count>this.throttleMin)){this.lastLog.timeout=setTimeout(c,this.throttle);return}}catch{}c(!0)}}}var Ds=Object.defineProperty,qs=y((t,e)=>Ds(t,"name",{value:e,configurable:!0}),"c$1");let Vs=class{static{y(this,"v")}static{qs(this,"RawReporter")}#r;#e;#t;#s=!1;#i;constructor(t={}){this.#r=Ze,this.#e=Xe,this.#i=t}setStdout(t){this.#r=t}setStderr(t){this.#e=t}setInteractiveManager(t){this.#t=t}setIsInteractive(t){this.#s=t}log(t){const{context:e,groups:r,message:s,type:i}=t,o=[];if(s!==Je){const u=typeof s=="string"?s:Se(s,this.#i);o.push(u)}e&&o.push(...e.map(u=>typeof u=="object"?` ${Se(u,this.#i)}`:` ${String(u)}`));const a=["error","trace","warn"].includes(i.level)?"stderr":"stdout",n=a==="stderr"?this.#e:this.#r,c=r.map(()=>" ").join("");this.#s&&this.#t!==void 0&&n.isTTY?this.#t.update(a,(c+o.join("")).split(`
|
|
34
|
+
`),0):yt(c+o.join(""),n)}};var Hs=Object.defineProperty,Js=y((t,e)=>Hs(t,"name",{value:e,configurable:!0}),"m$1");class st extends rt{static{y(this,"c")}constructor(e){const r=e.parentStderr,s=e.parentStdout,{interactive:i,processors:o,rawReporter:a,reporters:n,stderr:c,stdout:u}=e,l=r??c,h=s??u,p=e.parentLongestLabel,w=e.parentTypes,{parentLogLevels:N,parentMessages:k,parentStringify:v}=e,B={disabled:e.disabled,logLevel:e.logLevel,logLevels:e.logLevels,messages:e.messages,processors:[],rawReporter:e.rawReporter,reporters:[],scope:e.scope,throttle:e.throttle,throttleMin:e.throttleMin},V="types"in e;w&&p&&!V?(B.parentTypes=w,B.parentLongestLabel=p):V&&e.types!==void 0&&(B.types=e.types),v&&(B.parentStringify=v),N&&!e.logLevels&&(B.parentLogLevels=N),k&&!e.messages&&(B.parentMessages=k),super(B),this.options=e,this.interactive=i??!1,this.stdout=h,this.stderr=l,this.interactive&&(this.interactiveManager=new Dr(new Ee(this.stdout),new Ee(this.stderr))),Array.isArray(n)&&this.registerReporters(n),this.rawReporter=this.extendReporter(a??new Vs),Array.isArray(o)&&this.registerProcessors(o)}options;static{Js(this,"PailServerImpl")}stdout;stderr;interactiveManager;interactive;scope(...e){if(e.length===0)throw new Error("No scope name was defined.");return this.scopeName=e.flat(),this}child(e){const r=e?.types!==void 0,s=r?qe(this.types,e.types):this.types,i=e?.reporters??[],o=i.length>0?[...this.reporters,...i]:[...this.reporters],a=e?.processors??[],n=a.length>0?[...this.processors,...a]:[...this.processors],c=e?.logLevels?{...this.logLevels,...e.logLevels}:this.logLevels;let u;if(e?.scope){const p=De(e.scope).filter(Boolean);u=this.scopeName.length>0?[...this.scopeName,...p]:p}else u=this.scopeName.length>0?this.scopeName:[];const l=e?.messages?{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage,...e.messages}:{timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage},h={disabled:e?.disabled??this.disabled,interactive:e?.interactive??this.interactive,logLevel:e?.logLevel??this.generalLogLevel,logLevels:c,messages:l,processors:n,rawReporter:e?.rawReporter??this.rawReporter,reporters:o,scope:u,stderr:e?.stderr??this.stderr,stdout:e?.stdout??this.stdout,throttle:e?.throttle??this.throttle,throttleMin:e?.throttleMin??this.throttleMin};return this.#r(h,e,r,s),new st(h)}#r(e,r,s,i){s?(e.parentTypes=i,e.parentLongestLabel=xe(i)):(e.parentTypes=this.types,e.parentLongestLabel=this.longestLabel),r?.logLevels||(e.parentLogLevels=this.logLevels),r?.messages||(e.parentMessages={timerEnd:this.endTimerMessage,timerStart:this.startTimerMessage}),e.parentStringify=this.stringify,r?.stdout||(e.parentStdout=this.stdout),r?.stderr||(e.parentStderr=this.stderr)}getInteractiveManager(){return this.interactiveManager}wrapStd(){this.#e(this.stdout,"log"),this.#e(this.stderr,"log")}restoreStd(){this.#t(this.stdout),this.#t(this.stderr)}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}clear(){this.stdout.write(ft),this.stderr.write(ft)}extendReporter(e){return typeof e.setStdout=="function"&&e.setStdout(this.stdout),typeof e.setStderr=="function"&&e.setStderr(this.stderr),typeof e.setLoggerTypes=="function"&&e.setLoggerTypes(this.types),typeof e.setStringify=="function"&&e.setStringify(this.stringify),typeof e.setIsInteractive=="function"&&e.setIsInteractive(this.interactive),this.interactive&&typeof e.setInteractiveManager=="function"&&e.setInteractiveManager(this.interactiveManager),e}#e(e,r){e&&(e.__write||(e.__write=e.write),e.write=s=>{this[r](String(s).trim())})}#t(e){e&&e.__write&&(e.write=e.__write,delete e.__write)}}const Gs=st;var Us=Object.defineProperty,zs=y((t,e)=>Us(t,"name",{value:e,configurable:!0}),"x"),Ks=Object.defineProperty,Ct=zs((t,e)=>Ks(t,"name",{value:e,configurable:!0}),"h"),Ys=Object.defineProperty,pe=Ct((t,e)=>Ys(t,"name",{value:e,configurable:!0}),"g$1");const gt=new Map([["aliceblue","#f0f8ff"],["antiquewhite","#faebd7"],["aqua","#00ffff"],["aquamarine","#7fffd4"],["azure","#f0ffff"],["beige","#f5f5dc"],["bisque","#ffe4c4"],["black","#000000"],["blanchedalmond","#ffebcd"],["blue","#0000ff"],["blueviolet","#8a2be2"],["brown","#a52a2a"],["burlywood","#deb887"],["cadetblue","#5f9ea0"],["chartreuse","#7fff00"],["chocolate","#d2691e"],["coral","#ff7f50"],["cornflowerblue","#6495ed"],["cornsilk","#fff8dc"],["crimson","#dc143c"],["cyan","#00ffff"],["darkblue","#00008b"],["darkcyan","#008b8b"],["darkgoldenrod","#b8860b"],["darkgray","#a9a9a9"],["darkgreen","#006400"],["darkgrey","#a9a9a9"],["darkkhaki","#bdb76b"],["darkmagenta","#8b008b"],["darkolivegreen","#556b2f"],["darkorange","#ff8c00"],["darkorchid","#9932cc"],["darkred","#8b0000"],["darksalmon","#e9967a"],["darkseagreen","#8fbc8f"],["darkslateblue","#483d8b"],["darkslategray","#2f4f4f"],["darkslategrey","#2f4f4f"],["darkturquoise","#00ced1"],["darkviolet","#9400d3"],["deeppink","#ff1493"],["deepskyblue","#00bfff"],["dimgray","#696969"],["dimgrey","#696969"],["dodgerblue","#1e90ff"],["firebrick","#b22222"],["floralwhite","#fffaf0"],["forestgreen","#228b22"],["fuchsia","#ff00ff"],["gainsboro","#dcdcdc"],["ghostwhite","#f8f8ff"],["gold","#ffd700"],["goldenrod","#daa520"],["gray","#808080"],["green","#008000"],["greenyellow","#adff2f"],["grey","#808080"],["honeydew","#f0fff0"],["hotpink","#ff69b4"],["indianred","#cd5c5c"],["indigo","#4b0082"],["ivory","#fffff0"],["khaki","#f0e68c"],["lavender","#e6e6fa"],["lavenderblush","#fff0f5"],["lawngreen","#7cfc00"],["lemonchiffon","#fffacd"],["lightblue","#add8e6"],["lightcoral","#f08080"],["lightcyan","#e0ffff"],["lightgoldenrodyellow","#fafad2"],["lightgray","#d3d3d3"],["lightgreen","#90ee90"],["lightgrey","#d3d3d3"],["lightpink","#ffb6c1"],["lightsalmon","#ffa07a"],["lightseagreen","#20b2aa"],["lightskyblue","#87cefa"],["lightslategray","#778899"],["lightslategrey","#778899"],["lightsteelblue","#b0c4de"],["lightyellow","#ffffe0"],["lime","#00ff00"],["limegreen","#32cd32"],["linen","#faf0e6"],["magenta","#ff00ff"],["maroon","#800000"],["mediumaquamarine","#66cdaa"],["mediumblue","#0000cd"],["mediumorchid","#ba55d3"],["mediumpurple","#9370db"],["mediumseagreen","#3cb371"],["mediumslateblue","#7b68ee"],["mediumspringgreen","#00fa9a"],["mediumturquoise","#48d1cc"],["mediumvioletred","#c71585"],["midnightblue","#191970"],["mintcream","#f5fffa"],["mistyrose","#ffe4e1"],["moccasin","#ffe4b5"],["navajowhite","#ffdead"],["navy","#000080"],["oldlace","#fdf5e6"],["olive","#808000"],["olivedrab","#6b8e23"],["orange","#ffa500"],["orangered","#ff4500"],["orchid","#da70d6"],["palegoldenrod","#eee8aa"],["palegreen","#98fb98"],["paleturquoise","#afeeee"],["palevioletred","#db7093"],["papayawhip","#ffefd5"],["peachpuff","#ffdab9"],["peru","#cd853f"],["pink","#ffc0cb"],["plum","#dda0dd"],["powderblue","#b0e0e6"],["purple","#800080"],["rebeccapurple","#663399"],["red","#ff0000"],["rosybrown","#bc8f8f"],["royalblue","#4169e1"],["saddlebrown","#8b4513"],["salmon","#fa8072"],["sandybrown","#f4a460"],["seagreen","#2e8b57"],["seashell","#fff5ee"],["sienna","#a0522d"],["silver","#c0c0c0"],["skyblue","#87ceeb"],["slateblue","#6a5acd"],["slategray","#708090"],["slategrey","#708090"],["snow","#fffafa"],["springgreen","#00ff7f"],["steelblue","#4682b4"],["tan","#d2b48c"],["teal","#008080"],["thistle","#d8bfd8"],["tomato","#ff6347"],["turquoise","#40e0d0"],["violet","#ee82ee"],["wheat","#f5deb3"],["white","#ffffff"],["whitesmoke","#f5f5f5"],["yellow","#ffff00"],["yellowgreen","#9acd32"]]),Qs=/^#([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})([\dA-F]{2})?$/i,Zs=/^#([\dA-F])([\dA-F])([\dA-F])([\dA-F])?$/i,Xs=/^rgba?\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*(,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*)?\)$/,ei=/^hsla?\(\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))%\s*,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))%\s*(,\s*([+-]?(?:\d+(?:\.\d+)?|\.\d+))\s*)?\)$/,Wt=pe(()=>({__proto__:null,backgroundColor:null,color:null,fontStyle:null,fontWeight:null,textDecorationColor:null,textDecorationLine:[]}),"getDefaultCss"),dt=/\s+/,Te=pe(t=>{gt.has(t)&&(t=gt.get(t));const e=Qs.exec(t);if(e)return[Number.parseInt(e[1],16),Number.parseInt(e[2],16),Number.parseInt(e[3],16)];const r=Zs.exec(t);if(r)return[Number.parseInt(`${r[1]}${r[1]}`,16),Number.parseInt(`${r[2]}${r[2]}`,16),Number.parseInt(`${r[3]}${r[3]}`,16)];const s=Xs.exec(t);if(s)return[Math.round(Math.max(0,Math.min(255,Number(s[1])))),Math.round(Math.max(0,Math.min(255,Number(s[2])))),Math.round(Math.max(0,Math.min(255,Number(s[3]))))];const i=ei.exec(t);if(i){let o=Number(i[1])%360;o<0&&(o+=360);const a=Math.max(0,Math.min(100,Number(i[2])))/100,n=Math.max(0,Math.min(100,Number(i[3])))/100,c=(1-Math.abs(2*n-1))*a,u=c*(1-Math.abs(o/60%2-1)),l=n-c/2;let h,p,w;return o<60?{0:h,1:p,2:w}=[c,u,0]:o<120?{0:h,1:p,2:w}=[u,c,0]:o<180?{0:h,1:p,2:w}=[0,c,u]:o<240?{0:h,1:p,2:w}=[0,u,c]:o<300?{0:h,1:p,2:w}=[u,0,c]:{0:h,1:p,2:w}=[c,0,u],[Math.round((h+l)*255),Math.round((p+l)*255),Math.round((w+l)*255)]}return null},"parseCssColor"),Fe=pe((t,e)=>t?.[0]===e?.[0]&&t?.[1]===e?.[1]&&t?.[2]===e?.[2],"colorEquals"),ti=pe(t=>{const e=Wt(),r=[];let s=!1,i=null,o=0,a="";for(const n of t){if(n==="(")o+=1;else if(o>0)n===")"&&(o-=1);else if(s){if(n===";"){const c=a.trim();c!==""&&r.push([i,c]),i=null,a="",s=!1;continue}}else if(n===":"){i=a.trim(),a="",s=!0;continue}a+=n}if(s&&o===0){const n=a.trim();n!==""&&r.push([i,n]),i=null,a=""}for(const{0:n,1:c}of r)switch(n){case"background-color":{c!=null&&(e.backgroundColor=c);break}case"color":{c!=null&&(e.color=c);break}case"font-style":{["italic","oblique","oblique 14deg"].includes(c)&&(e.fontStyle="italic");break}case"font-weight":{c==="bold"&&(e.fontWeight=c);break}case"text-decoration":{e.textDecorationColor=null,e.textDecorationLine=[];const u=c.split(dt);for(const l of u){const h=Te(l);h!=null?e.textDecorationColor=h:["line-through","overline","underline"].includes(l)&&e.textDecorationLine.push(l)}break}case"text-decoration-color":{const u=Te(c);u!=null&&(e.textDecorationColor=u);break}case"text-decoration-line":{e.textDecorationLine=[];const u=c.split(dt);for(const l of u)["line-through","overline","underline"].includes(l)&&e.textDecorationLine.push(l);break}}return e},"parseCss"),ri=pe((t,e)=>{e=e??Wt();let r="";if(!Fe(t.backgroundColor,e.backgroundColor))if(t.backgroundColor==null)r+="\x1B[49m";else switch(t.backgroundColor){case"black":{r+="\x1B[40m";break}case"blue":{r+="\x1B[44m";break}case"cyan":{r+="\x1B[46m";break}case"green":{r+="\x1B[42m";break}case"magenta":{r+="\x1B[45m";break}case"red":{r+="\x1B[41m";break}case"white":{r+="\x1B[47m";break}case"yellow":{r+="\x1B[43m";break}default:if(Array.isArray(t.backgroundColor)){const{0:s,1:i,2:o}=t.backgroundColor;r+=`\x1B[48;2;${String(s)};${String(i)};${String(o)}m`}else{const s=Te(t.backgroundColor);if(s===null)r+="\x1B[49m";else{const{0:i,1:o,2:a}=s;r+=`\x1B[48;2;${String(i)};${String(o)};${String(a)}m`}}}if(!Fe(t.color,e.color))if(t.color==null)r+="\x1B[39m";else switch(t.color){case"black":{r+="\x1B[30m";break}case"blue":{r+="\x1B[34m";break}case"cyan":{r+="\x1B[36m";break}case"green":{r+="\x1B[32m";break}case"magenta":{r+="\x1B[35m";break}case"red":{r+="\x1B[31m";break}case"white":{r+="\x1B[37m";break}case"yellow":{r+="\x1B[33m";break}default:if(Array.isArray(t.color)){const{0:s,1:i,2:o}=t.color;r+=`\x1B[38;2;${String(s)};${String(i)};${String(o)}m`}else{const s=Te(t.color);if(s===null)r+="\x1B[39m";else{const{0:i,1:o,2:a}=s;r+=`\x1B[38;2;${String(i)};${String(o)};${String(a)}m`}}}if(t.fontWeight!==e.fontWeight&&(r+=t.fontWeight==="bold"?"\x1B[1m":"\x1B[22m"),t.fontStyle!==e.fontStyle&&(r+=t.fontStyle==="italic"?"\x1B[3m":"\x1B[23m"),!Fe(t.textDecorationColor,e.textDecorationColor))if(t.textDecorationColor==null)r+="\x1B[59m";else{const{0:s,1:i,2:o}=t.textDecorationColor;r+=`\x1B[58;2;${String(s)};${String(i)};${String(o)}m`}return t.textDecorationLine.includes("line-through")!==e.textDecorationLine.includes("line-through")&&(r+=t.textDecorationLine.includes("line-through")?"\x1B[9m":"\x1B[29m"),t.textDecorationLine.includes("overline")!==e.textDecorationLine.includes("overline")&&(r+=t.textDecorationLine.includes("overline")?"\x1B[53m":"\x1B[55m"),t.textDecorationLine.includes("underline")!==e.textDecorationLine.includes("underline")&&(r+=t.textDecorationLine.includes("underline")?"\x1B[4m":"\x1B[24m"),r},"cssToAnsi");var si=Object.defineProperty,it=Ct((t,e)=>si(t,"name",{value:e,configurable:!0}),"y");const ii=it(t=>{try{return JSON.stringify(t)}catch{return'"[Circular]"'}},"tryStringify"),pt="%".codePointAt(0),ni="s".codePointAt(0),oi="d".codePointAt(0),ai="f".codePointAt(0),li="i".codePointAt(0),ci="O".codePointAt(0),ui="o".codePointAt(0),fi="j".codePointAt(0),hi="c".codePointAt(0),gi=it((t,e=[],r={})=>{if(typeof t!="string"&&typeof t!="object"||t===null)throw new TypeError(`fmt must be a string or object, got ${t===null?"null":typeof t}`);const s=r.stringify??ii,i=1;if(typeof t=="object"){const l=e.length+i;if(l===1)return"{}";const h=Array.from({length:l});h[0]=s(t);for(let p=1;p<l;p+=1)h[p]=s(e[p-i]);return h.join(" ")}if(e.length===0)return t;let o="",a=1-i,n=-1,c=!1,u;for(let l=0;l<t.length;){if(t.codePointAt(l)===pt&&l+1<t.length){n=n>-1?n:0;const h=t.codePointAt(l+1);if(h===void 0){a+=1;break}switch(h){case hi:{if(globalThis.window===void 0){const p=ti(e[a]);n<l&&(o+=t.slice(n,l)),o+=ri(p,u),o!==""&&(c=!0,u=p)}n=l+2,l+=1;break}case oi:case ai:{if(a>=e.length||e[a]==null)break;n<l&&(o+=t.slice(n,l)),o+=Number(e[a]).toString(),n=l+2,l+=1;break}case li:{if(a>=e.length||e[a]==null)break;n<l&&(o+=t.slice(n,l)),o+=Math.floor(Number(e[a])).toString(),n=l+2,l+=1;break}case fi:case ci:case ui:{if(a>=e.length||e[a]===void 0)break;n<l&&(o+=t.slice(n,l));const p=e[a],w=typeof p;if(w==="string"){o+=`'${p}'`,n=l+2;break}if(w==="function"){o+=p.name?`[Function: ${p.name}]`:"[Function: <anonymous>]",n=l+2;break}o+=s(p),n=l+2,l+=1;break}case pt:{n<l&&(o+=t.slice(n,l)),o+="%",n=l+2,l+=1,a-=1;break}case ni:{if(a>=e.length)break;n<l&&(o+=t.slice(n,l)),o+=typeof e[a]=="object"?s(e[a]):String(e[a]),n=l+2,l+=1;break}default:typeof r.formatters?.[h]=="function"&&(n<l&&(o+=t.slice(n,l)),o+=r.formatters[h](e[a]),n=l+2,l+=1)}a+=1}l+=1}return n===-1?t:(n<t.length&&(o+=t.slice(n)),c&&(o+="\x1B[0m"),o)},"format"),di=it((t={})=>{const e={};return typeof t.formatters=="object"&&Object.entries(t.formatters).forEach(([r,s])=>{if(r.length===0)throw new Error(`Formatter %${r} has no characters`);if(r.length>1)throw new Error(`Formatter %${r} has more than one character`);if(typeof s!="function")throw new TypeError(`Formatter for %${r} is not a function`);const i=r.codePointAt(0);if(i===void 0)throw new Error(`${r}.codePointAt(0) failed to return a value, please report this issue`);e[i]=s}),(r,s=[],i={})=>gi(r,s,{...i,formatters:e})},"build");var pi=Object.defineProperty,mt=y((t,e)=>pi(t,"name",{value:e,configurable:!0}),"i$1");let mi=class{static{y(this,"g")}static{mt(this,"MessageFormatterProcessor")}#r;#e;constructor(t={}){this.#e=t.formatters}setStringify(t){this.#r=t}process(t){const e=di({formatters:this.#e,stringify:mt(r=>this.#r?this.#r(r):JSON.stringify(r),"stringify")});return t.message!==void 0&&(t.message=this.#t(e,t.message,t.context??[])),t}#t(t,e,r=[]){if(typeof e=="string")return t(e,r);if(typeof e=="object"&&e!==null){const s=e,i=Object.keys(s);for(let o=0;o<i.length;o+=1){const a=i[o],n=s[a];(typeof n=="string"||Array.isArray(n)||typeof n=="object")&&(s[a]=this.#t(t,n,r))}}return e}};var bi=Object.defineProperty,Dt=y((t,e)=>bi(t,"name",{value:e,configurable:!0}),"M");const{bgGrey:yi,cyan:wi,green:$i,greenBright:vi,grey:U,red:Re,underline:bt,white:xi}=wt,Si=/[\\/]pail[\\/]dist/,_e=Dt(t=>!Si.test(t),"pailFileFilter");class ki extends Gt{static{y(this,"PrettyReporter")}static{Dt(this,"PrettyReporter")}#r;#e;#t;#s=!1;#i;#n;constructor(e={}){const{error:r,inspect:s,...i}=e;super({uppercase:{label:!0,...i.uppercase},...i}),this.#i={...Ut,...s},this.#n={...r,color:{fileLine:$i,hint:wi,marker:Re,message:Re,method:vi,title:Re}},this.#r=Ze,this.#e=Xe}setStdout(e){this.#r=e}setStderr(e){this.#e=e}setInteractiveManager(e){this.#t=e}setIsInteractive(e){this.#s=e}log(e){this._log(this._formatMessage(e),e.type.level)}_formatMessage(e){const{columns:r}=zt();let s=r;typeof this.styles.messageLength=="number"&&(s=this.styles.messageLength);const{badge:i,context:o,date:a,error:n,file:c,groups:u,label:l,message:h,prefix:p,repeated:w,scope:N,suffix:k,traceError:v,type:B}=e,{color:V}=this.loggerTypes[B.name],H=V?wt[V]:xi,d=u.map(()=>" ").join(""),g=[];if(u.length>0&&g.push(`${d+U(`[${u.at(-1)??""}]`)} `),a&&g.push(`${U(this.styles.dateFormatter(typeof a=="string"?new Date(a):a))} `),i)g.push(H(i));else{const L=Kt(this.loggerTypes);L.length>0&&g.push(`${U(".".repeat(L.length))} `)}const $=xe(this.loggerTypes);if(l){const L=be($),R=be(l);g.push(`${H(Yt(l,this.styles))} `,U(".".repeat(Math.max(0,L-R))))}else g.push(U(".".repeat($.length+2)));w&&g.push(`${yi.white(`[${String(w)}x]`)} `),Array.isArray(N)&&N.length>0&&g.push(` ${U(`[${N.join(" > ")}]`)} `),p&&g.push(`${U(`${Array.isArray(N)&&N.length>0?". ":" "}[${this.styles.underline.prefix?bt(p):p}]`)} `);const I=be(g.join(" "));if(c){const L=(c.name??"")+(c.line?`:${String(c.line)}`:""),R=be(L);if(R+I+2>s)g.push(U(` ${L}`));else{const J=Math.max(0,s-I-R-2);g.push(U(`${".".repeat(J)} ${L}`))}}else g.push(U(".".repeat(Math.max(0,s-I-1))));if(g.length>0&&g.push(`
|
|
35
|
+
|
|
36
|
+
`),h!==Je){const L=typeof h=="string"?h:Se(h,this.#i);g.push(d+Qt(L,{trim:!1,width:s-3,wrapMode:Zt.STRICT_WIDTH}))}if(o){let L=!1;g.push(...o.map(R=>{if(R instanceof Error)return L=!0,`
|
|
37
|
+
|
|
38
|
+
${Be(R,{...this.#n,filterStacktrace:_e,prefix:d})}`;if(typeof R=="object")return` ${Se(R,this.#i)}`;const J=(L?`
|
|
39
|
+
|
|
40
|
+
`:" ")+String(R);return L=!1,J}))}return n&&g.push(Be(n,{...this.#n,filterStacktrace:_e,prefix:d})),v&&g.push(`
|
|
41
|
+
|
|
42
|
+
${Be(v,{...this.#n,filterStacktrace:_e,hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0,hideMessage:!0,prefix:d})}`),k&&g.push(`
|
|
43
|
+
`,d+U(this.styles.underline.suffix?bt(k):k)),g.join("")}_log(e,r){const s=["error","trace","warn"].includes(r)?"stderr":"stdout",i=s==="stderr"?this.#e:this.#r;this.#s&&this.#t!==void 0&&i.isTTY?this.#t.update(s,e.split(`
|
|
44
|
+
`),0):yt(`${e}
|
|
45
|
+
`,i)}}var Ei=Object.defineProperty,qt=y((t,e)=>Ei(t,"name",{value:e,configurable:!0}),"o");const Ti=qt(()=>he.NODE_ENV==="debug"||he.DEBUG!==void 0?"debug":he.NODE_ENV==="test"?"warning":"informational","getDefaultLogLevel"),Vt=qt(t=>{let e=Ti();return he.PAIL_LOG_LEVEL!==void 0&&(e=he.PAIL_LOG_LEVEL),new Gs({logLevel:e,processors:[new mi],reporters:[new ki],stderr:Xe,stdout:Ze,...t})},"createPail");Vt();const Bi=async(t,e={})=>{const{debug:r,environment:s,logger:i,mode:o,tsconfigPath:a,...n}={debug:!1,environment:"production",logger:{},mode:"build",tsconfigPath:void 0,...e},c={reporters:[new Xt({error:{hideErrorCauseCodeView:!0,hideErrorCodeView:!0,hideErrorErrorsCodeView:!0}})],scope:"packem",...i},u=Vt(c);await er(t,o,s,u,r,n,a)};export{Bi as packem};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{createRequire as F}from"node:module";import{H as ie,B as D,E as Oe,P as se,w as Nt,Z as zt,V as po,R as go,v as ho}from"./utils-Bsoe7qJG.js";const Wt=0,Te=1,rt=2,ke=3,Di=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,Fi=/^-{1,2}(color=256)$/,Ii=/^-{1,2}(color=16m|color=full|color=truecolor)$/,Hi=/^-{1,2}(color|colors|color=true|color=always)$/,Gi=/-mono|dumb/i,Ui=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,Wi=/-256(color)?$/i,qi=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,Ki=e=>{const t=globalThis,r=t.Deno!=null,n=t.process??t.Deno??{},i=n.argv??n.args??[],s=w=>{const R=i.indexOf("--"),J=i.findIndex(L=>w.test(L));return J!==-1&&(R===-1||J<R)};let o={};try{o=r?n.env.toObject():n.env??{}}catch{}const a="FORCE_COLOR",u=a in o,f=o[a]??void 0,c=Object.prototype.toString.call(f).slice(8,-1)==="String",p=typeof f=="number";let d;if(f==="true"?d=Te:f==="false"?d=Wt:c&&f.length===0?d=Te:c&&f.length>0?d=Math.min(Number.parseInt(f,10),3):p&&(d=Math.min(f,3)),f!=="true"&&f!=="false"&&d!==void 0&&d<4)return d;if("NO_COLOR"in o||u&&d===0||s(Di))return Wt;if(s(Fi))return rt;if(s(Ii))return ke;if(s(Hi))return Te;const b=d??Wt;if("TF_BUILD"in o&&"AGENT_NAME"in o)return Te;if(o.TERM&&Gi.test(o.TERM))return b;if((r?t.Deno.build.os:n.platform)==="win32")try{const w=(r?t.Deno.osRelease():n.os.release()).split(".");return Number(w[0])>=10&&Number(w[2])>=10586?Number(w[2])>=14931?ke:rt:Te}catch{}if("CI"in o)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(w=>w in o)?ke:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(w=>w in o)||o.CI_NAME==="codeship"?Te:b;if(o.TERMINAL_EMULATOR?.includes("JediTerm"))return ke;if("TEAMCITY_VERSION"in o)return Ui.test(o.TEAMCITY_VERSION)?Te:Wt;if(o.COLORTERM==="truecolor"||o.TERM==="xterm-kitty"||o.TERM==="xterm-ghostty"||o.TERM==="wezterm")return ke;if("TERM_PROGRAM"in o){const w=Number.parseInt((o.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(o.TERM_PROGRAM==="iTerm.app")return w>=3?ke:rt;if(o.TERM_PROGRAM==="Apple_Terminal")return rt}if(Wi.test(o.TERM))return rt;let S;return r?S=t.Deno.stdout.isTerminal():"PM2_HOME"in o&&"pm_id"in o?S=!0:S=n[`std${e}`]&&"isTTY"in n[`std${e}`],S&&qi.test(o.TERM)||"COLORTERM"in o?Te:b},Xi=()=>Ki("out");var zi=Object.defineProperty,Fe=(e,t)=>zi(e,"name",{value:t,configurable:!0}),Qi=Object.defineProperty,Vi=Fe((e,t)=>Qi(e,"name",{value:t,configurable:!0}),"e$1");function Gr({onlyFirst:e=!1}={}){const t="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(t,e?void 0:"g")}Fe(Gr,"t$1");Vi(Gr,"ansiRegex");var Yi=Object.defineProperty,Ji=Fe((e,t)=>Yi(e,"name",{value:t,configurable:!0}),"n$1");const Be=Ji((e,t,r)=>t>e?t:Math.min(e,r),"clamp");var Zi=Object.defineProperty,es=Fe((e,t)=>Zi(e,"name",{value:t,configurable:!0}),"a$1");const ts=/([a-f\d]{3,6})/i,rs=es(e=>{let[,t]=ts.exec(e)??[];const r=t?t.length:0;if(r===3){const i=t.charAt(0),s=t.charAt(1),o=t.charAt(2);t=i+i+s+s+o+o}else if(r!==6)return[0,0,0];const n=Number.parseInt(t,16);return[n>>16&255,n>>8&255,n&255]},"convertHexToRgb");var ns=Object.defineProperty,Ur=Fe((e,t)=>ns(e,"name",{value:t,configurable:!0}),"e");const yo=Ur((e,t,r)=>e===t&&t===r?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/51)+6*Math.round(t/51)+Math.round(r/51),"rgbToAnsi256"),Cr=Ur(e=>{let t,r,n;if(e<8)return 30+e;if(e<16)return 90+(e-8);if(e>=232)t=r=n=((e-232)*10+8)/255;else{e-=16;const o=e%36;t=Math.floor(e/36)/5,r=Math.floor(o/6)/5,n=o%6/5}const i=Math.max(t,r,n)*2;if(i===0)return 30;const s=30+(Math.round(n)<<2|Math.round(r)<<1|Math.round(t));return i===2?s+60:s},"ansi256To16"),kn=Ur((e,t,r)=>Cr(yo(e,t,r)),"rgbToAnsi16");var os=Object.defineProperty,fe=Fe((e,t)=>os(e,"name",{value:t,configurable:!0}),"b");const Q=39,V=49,jn=10,Nr=Xi(),$o={close:"",open:""},x=Nr>0?(e,t)=>({close:`\x1B[${String(t)}m`,open:`\x1B[${String(e)}m`}):()=>$o,Cn=fe(e=>(t,r,n)=>e(yo(Number(t),Number(r),Number(n))),"createRgbFunction"),Nn=fe(e=>t=>{const[r,n,i]=rs(t);return e(r,n,i)},"createHexFunction");let Mr=fe(e=>x(`38;5;${String(e)}`,Q),"createAnsi256"),Br=fe(e=>x(`48;5;${String(e)}`,V),"createBgAnsi256"),Qt=fe((e,t,r)=>x(`38;2;${String(e)};${String(t)};${String(r)}`,Q),"createRgb"),Vt=fe((e,t,r)=>x(`48;2;${String(e)};${String(t)};${String(r)}`,V),"createBgRgb");Nr===1?(Mr=fe(e=>x(Cr(Number(e)),Q),"createAnsi256"),Br=fe(e=>x(Cr(Number(e))+jn,V),"createBgAnsi256"),Qt=fe((e,t,r)=>x(kn(Number(e),Number(t),Number(r)),Q),"createRgb"),Vt=fe((e,t,r)=>x(kn(Number(e),Number(t),Number(r))+jn,V),"createBgRgb")):Nr===2&&(Qt=Cn(Mr),Vt=Cn(Br));const Mn={bold:x(1,22),dim:x(2,22),hidden:x(8,28),inverse:x(7,27),italic:x(3,23),overline:x(53,55),reset:x(0,0),strike:x(9,29),strikethrough:x(9,29),underline:x(4,24),visible:$o},Bn={bgBlack:x(40,V),bgBlackBright:x(100,V),bgBlue:x(44,V),bgBlueBright:x(104,V),bgCyan:x(46,V),bgCyanBright:x(106,V),bgGray:x(100,V),bgGreen:x(42,V),bgGreenBright:x(102,V),bgGrey:x(100,V),bgMagenta:x(45,V),bgMagentaBright:x(105,V),bgRed:x(41,V),bgRedBright:x(101,V),bgWhite:x(47,V),bgWhiteBright:x(107,V),bgYellow:x(43,V),bgYellowBright:x(103,V),black:x(30,Q),blackBright:x(90,Q),blue:x(34,Q),blueBright:x(94,Q),cyan:x(36,Q),cyanBright:x(96,Q),gray:x(90,Q),green:x(32,Q),greenBright:x(92,Q),grey:x(90,Q),magenta:x(35,Q),magentaBright:x(95,Q),red:x(31,Q),redBright:x(91,Q),white:x(37,Q),whiteBright:x(97,Q),yellow:x(33,Q),yellowBright:x(93,Q)},Ln={bg:fe(e=>Br(Be(e,0,255)),"bg"),bgHex:Nn(Vt),bgRgb:fe((e,t,r)=>Vt(Be(e,0,255),Be(t,0,255),Be(r,0,255)),"bgRgb"),fg:fe(e=>Mr(Be(e,0,255)),"fg"),hex:Nn(Qt),rgb:fe((e,t,r)=>Qt(Be(e,0,255),Be(t,0,255),Be(r,0,255)),"rgb")};var is=Object.defineProperty,ss=Fe((e,t)=>is(e,"name",{value:t,configurable:!0}),"s");const as=ss((e,t,r)=>{if(t==="")return e;let n=e.indexOf(t);if(n<0)return e;const i=t.length;let s=0,o="";for(;~n;)o+=e.slice(s,n)+r,s=n+i,n=e.indexOf(t,s);return o+e.slice(s)},"stringReplaceAll");var us=Object.defineProperty,jt=Fe((e,t)=>us(e,"name",{value:t,configurable:!0}),"a");const De={};let Lr=null;const cs=jt((e,t,r)=>{if(!e)return"";let n;if(e.raw===void 0?n=String(e):n=String.raw(e,...t),n.includes("\x1B"))for(let i=r;i;i=i.props)n=as(n,i.close,i.open);return n.includes(`
|
|
2
|
+
`)&&(n=n.replace(/(\r*\n)/g,`${r.closeStack}$1${r.openStack}`)),r.openStack+n+r.closeStack},"wrapText"),Dr=jt(({props:e},{close:t,open:r})=>{const n=(e?.openStack??"")+r,i=t+(e?.closeStack??""),s=jt((o,...a)=>cs(o,a,s.props),"style");return Object.setPrototypeOf(s,Lr),s.props={close:t,closeStack:i,open:r,openStack:n,props:e},s.open=n,s.close=i,s},"createStyle"),ls=jt(function(){const e=jt(t=>String(t),"self");e.strip=t=>t.replaceAll(Gr(),"");for(const t in Bn)De[t]={get(){const r=Dr(this,Bn[t]);return Object.defineProperty(this,t,{value:r}),r}};for(const t in Mn)De[t]={get(){const r=Dr(this,Mn[t]);return Object.defineProperty(this,t,{value:r}),r}};return Lr=Object.defineProperties({},De),Object.setPrototypeOf(e,Lr),e},"Colorize");for(const e in Ln)De[e]={get(){return(...t)=>Dr(this,Ln[e](...t))}};De.ansi256=De.fg;De.bgAnsi256=De.bg;const xe=new ls,Gg=xe.blue,Ug=xe.bold,Wg=xe.cyan,qg=xe.dim,Kg=xe.gray,Xg=xe.green,zg=xe.grey,Qg=xe.magenta,Vg=xe.red,Yg=xe.yellow,Ve=0,or=4,bo=Symbol("findUpStop"),Jg=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g;var fs=Object.defineProperty,ps=(e,t)=>fs(e,"name",{value:t,configurable:!0}),gs=Object.defineProperty,hs=ps((e,t)=>gs(e,"name",{value:t,configurable:!0}),"n");const q=hs(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var ds=Object.defineProperty,ys=(e,t)=>ds(e,"name",{value:t,configurable:!0}),$s=Object.defineProperty,bs=ys((e,t)=>$s(e,"name",{value:t,configurable:!0}),"i");const Ae=bs(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var ms=Object.defineProperty,mo=(e,t)=>ms(e,"name",{value:t,configurable:!0});const vs=F(import.meta.url),nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ws=mo(e=>{if(typeof nt<"u"&&nt.versions&&nt.versions.node){const[t,r]=nt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return nt.getBuiltinModule(e)}return vs(e)},"__cjs_getBuiltinModule"),{lstat:Dn,mkdir:Ss}=ws("node:fs/promises");var Es=Object.defineProperty,Os=mo((e,t)=>Es(e,"name",{value:t,configurable:!0}),"o");const Wr=Os(async e=>{q(e);try{const t=await Dn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ae(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{await Ss(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=await Dn(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ae(r))}'`,{cause:t})}},"ensureDir");var _s=Object.defineProperty,vo=(e,t)=>_s(e,"name",{value:t,configurable:!0});const As=F(import.meta.url),ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xs=vo(e=>{if(typeof ot<"u"&&ot.versions&&ot.versions.node){const[t,r]=ot.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ot.getBuiltinModule(e)}return As(e)},"__cjs_getBuiltinModule"),{lstatSync:Fn,mkdirSync:Ps}=xs("node:fs");var Rs=Object.defineProperty,Ts=vo((e,t)=>Rs(e,"name",{value:t,configurable:!0}),"o");const qr=Ts(e=>{q(e);try{const t=Fn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ae(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Ps(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Fn(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Ae(r))}'`,{cause:t})}},"ensureDirSync");var ks=Object.defineProperty,wo=(e,t)=>ks(e,"name",{value:t,configurable:!0});const js=F(import.meta.url),it=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=wo(e=>{if(typeof it<"u"&&it.versions&&it.versions.node){const[t,r]=it.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return it.getBuiltinModule(e)}return js(e)},"__cjs_getBuiltinModule"),{lstat:Ns,writeFile:Ms}=Cs("node:fs/promises");var Bs=Object.defineProperty,Ls=wo((e,t)=>Bs(e,"name",{value:t,configurable:!0}),"o");Ls(async e=>{q(e);try{const t=await Ns(e);if(!t.isFile())throw new Error(`Ensure path exists, expected 'file', got '${String(Ae(t))}'`)}catch(t){if(t.code==="ENOENT"){await Wr(ie(D(e))),await Ms(e,new Uint8Array);return}throw t}},"ensureFile");var Ds=Object.defineProperty,So=(e,t)=>Ds(e,"name",{value:t,configurable:!0});const Fs=F(import.meta.url),st=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Is=So(e=>{if(typeof st<"u"&&st.versions&&st.versions.node){const[t,r]=st.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return st.getBuiltinModule(e)}return Fs(e)},"__cjs_getBuiltinModule"),{lstatSync:Hs,writeFileSync:Gs}=Is("node:fs");var Us=Object.defineProperty,Ws=So((e,t)=>Us(e,"name",{value:t,configurable:!0}),"o");Ws(e=>{q(e);try{const t=Hs(e);if(!t.isFile())throw new Error(`Ensure path exists, expected 'file', got '${String(Ae(t))}'`)}catch(t){if(t.code==="ENOENT"){qr(ie(D(e))),Gs(e,new Uint8Array);return}throw t}},"ensureFileSync");var qs=Object.defineProperty,Ks=(e,t)=>qs(e,"name",{value:t,configurable:!0}),Xs=Object.defineProperty,zs=Ks((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"d");const Ye=zs((e,t)=>!!t.ino&&!!t.dev&&t.ino===e.ino&&t.dev===e.dev,"isStatsIdentical");var Qs=Object.defineProperty,Eo=(e,t)=>Qs(e,"name",{value:t,configurable:!0});const Vs=F(import.meta.url),at=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ys=Eo(e=>{if(typeof at<"u"&&at.versions&&at.versions.node){const[t,r]=at.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return at.getBuiltinModule(e)}return Vs(e)},"__cjs_getBuiltinModule"),{lstat:In,link:Js}=Ys("node:fs/promises");var Zs=Object.defineProperty,ea=Eo((e,t)=>Zs(e,"name",{value:t,configurable:!0}),"i");ea(async(e,t)=>{q(e),q(t),e=Oe(D(e)),t=Oe(D(t));let r;try{r=await In(t)}catch{}let n;try{n=await In(e)}catch(i){const s=i;throw s.message=s.message.replace("lstat","ensureLink"),s}r&&Ye(n,r)||(await Wr(ie(t)),await Js(e,t))},"ensureLink");var ta=Object.defineProperty,Oo=(e,t)=>ta(e,"name",{value:t,configurable:!0});const ra=F(import.meta.url),ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,na=Oo(e=>{if(typeof ut<"u"&&ut.versions&&ut.versions.node){const[t,r]=ut.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ut.getBuiltinModule(e)}return ra(e)},"__cjs_getBuiltinModule"),{lstatSync:Hn,linkSync:oa}=na("node:fs");var ia=Object.defineProperty,sa=Oo((e,t)=>ia(e,"name",{value:t,configurable:!0}),"m");sa((e,t)=>{q(e),q(t),e=Oe(D(e)),t=Oe(D(t));let r;try{r=Hn(t)}catch{}let n;try{n=Hn(e)}catch(i){const s=i;throw s.message=s.message.replace("lstat","ensureLink"),s}r&&Ye(n,r)||(qr(ie(t)),oa(e,t))},"ensureLinkSync");var aa=Object.defineProperty,ua=(e,t)=>aa(e,"name",{value:t,configurable:!0}),ca=Object.defineProperty,la=ua((e,t)=>ca(e,"name",{value:t,configurable:!0}),"i");const _o=la((e,t)=>typeof e!="string"?e:e.startsWith("./")?se(e):typeof t=="string"?se(ie(t),e):new URL(e,t),"resolveSymlinkTarget");var fa=Object.defineProperty,Ao=(e,t)=>fa(e,"name",{value:t,configurable:!0}),pa=Object.defineProperty,ga=Ao((e,t)=>pa(e,"name",{value:t,configurable:!0}),"t");let Yt=class extends Error{static{Ao(this,"n")}static{ga(this,"AlreadyExistsError")}constructor(t){super(`EEXIST: ${t}`)}get code(){return"EEXIST"}set code(t){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(t){throw new Error("Cannot overwrite name of AlreadyExistsError")}};var ha=Object.defineProperty,xo=(e,t)=>ha(e,"name",{value:t,configurable:!0});const da=F(import.meta.url),ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ya=xo(e=>{if(typeof ct<"u"&&ct.versions&&ct.versions.node){const[t,r]=ct.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ct.getBuiltinModule(e)}return da(e)},"__cjs_getBuiltinModule"),{lstat:Sr,stat:qt,symlink:$a,readlink:ba}=ya("node:fs/promises");var ma=Object.defineProperty,va=xo((e,t)=>ma(e,"name",{value:t,configurable:!0}),"m");const wa=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE);va(async(e,t,r)=>{q(e),q(t);const n=_o(e,t);t=Oe(D(t));try{if((await Sr(t)).isSymbolicLink()&&Ye(await qt(n),await qt(t))){const[a,u]=await Promise.all([qt(n),qt(t)]);if(Ye(a,u))return}}catch{}const i=await Sr(n),s=Ae(i);await Wr(ie(t));let o=r??"file";r||(wa?o="junction":o=s==="dir"?"dir":"file");try{await $a(Oe(D(n)),t,o)}catch(a){if(a.code!=="EEXIST")throw a;const u=await Sr(t);if(!u.isSymbolicLink())throw new Yt(`A ${String(Ae(u))} already exists at the path: ${t}`);const f=await ba(t),c=Oe(se(f));if(c!==n)throw new Yt(`A symlink targeting to an undesired path already exists: ${t} -> ${c}`)}},"ensureSymlink");var Sa=Object.defineProperty,Po=(e,t)=>Sa(e,"name",{value:t,configurable:!0});const Ea=F(import.meta.url),lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oa=Po(e=>{if(typeof lt<"u"&<.versions&<.versions.node){const[t,r]=lt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return lt.getBuiltinModule(e)}return Ea(e)},"__cjs_getBuiltinModule"),{lstatSync:Er,statSync:Kt,symlinkSync:_a,readlinkSync:Aa}=Oa("node:fs");var xa=Object.defineProperty,Pa=Po((e,t)=>xa(e,"name",{value:t,configurable:!0}),"p");const Ra=process.platform==="win32"||/^(?:msys|cygwin)$/.test(process.env.OSTYPE);Pa((e,t,r)=>{q(e),q(t);const n=_o(e,t);t=Oe(D(t));try{if(Er(t).isSymbolicLink()&&Ye(Kt(n),Kt(t))){const a=Kt(n),u=Kt(t);if(Ye(a,u))return}}catch{}const i=Er(n),s=Ae(i);qr(ie(t));let o=r??"file";r||(Ra?o="junction":o=s==="dir"?"dir":"file");try{_a(Oe(D(n)),t,o)}catch(a){if(a.code!=="EEXIST")throw a;const u=Er(t);if(!u.isSymbolicLink())throw new Yt(`A ${String(Ae(u))} already exists at the path: ${t}`);const f=Aa(t),c=Oe(se(f));if(c!==n)throw new Yt(`A symlink targeting to an undesired path already exists: ${t} -> ${c}`)}},"ensureSymlinkSync");var Ta=Object.defineProperty,ka=(e,t)=>Ta(e,"name",{value:t,configurable:!0});F(import.meta.url);var ja=Object.defineProperty,Ro=ka((e,t)=>ja(e,"name",{value:t,configurable:!0}),"r");const To=/\r?\n/g,Ca=`
|
|
3
|
+
`,Gn=`\r
|
|
4
|
+
`;Ro(e=>{const t=e.match(To);if(!t||t.length===0)return null;const r=t.filter(i=>i===Gn).length,n=t.length-r;return r>n?Gn:Ca},"detect");Ro((e,t)=>e.replaceAll(To,t),"format");var Na=Object.defineProperty,ko=(e,t)=>Na(e,"name",{value:t,configurable:!0}),Ma=Object.defineProperty,Ba=ko((e,t)=>Ma(e,"name",{value:t,configurable:!0}),"t");let Jt=class extends Error{static{ko(this,"i")}static{Ba(this,"WalkError")}root;constructor(t,r){super(`${t instanceof Error?t.message:String(t)} for path "${r}"`),this.cause=t,this.root=r}get name(){return"WalkError"}set name(t){throw new Error("Cannot overwrite name of WalkError")}};var La=Object.defineProperty,jo=(e,t)=>La(e,"name",{value:t,configurable:!0}),Da=Object.defineProperty,Fa=jo((e,t)=>Da(e,"name",{value:t,configurable:!0}),"g");const Zt=Fa(e=>{const t=e.replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`).replace(/\{/g,"(").replace(/\}/g,")").replace(/,/g,"|").replace(/\[!(.*?)\]/g,"[^$1]");return new RegExp(`^${t}$`)},"globToRegExp");var Ia=Object.defineProperty,Ha=jo((e,t)=>Ia(e,"name",{value:t,configurable:!0}),"n");const Le=Ha((e,t,r,n)=>Array.isArray(t)&&t.length>0&&!t.some(i=>e.endsWith(i))||r&&!r.some(i=>i.test(e))?!1:!n?.some(i=>i.test(e)),"walkInclude");var Ga=Object.defineProperty,Kr=(e,t)=>Ga(e,"name",{value:t,configurable:!0});const Ua=F(import.meta.url),ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wa=Kr(e=>{if(typeof ft<"u"&&ft.versions&&ft.versions.node){const[t,r]=ft.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ft.getBuiltinModule(e)}return Ua(e)},"__cjs_getBuiltinModule"),{readdir:qa,realpath:Ka,stat:Xa}=Wa("node:fs/promises");var za=Object.defineProperty,de=Kr((e,t)=>za(e,"name",{value:t,configurable:!0}),"r");const Qa=de(async e=>{const t=zt(e),r=po(t),n=await Xa(t);return{isDirectory:de(()=>n.isDirectory(),"isDirectory"),isFile:de(()=>n.isFile(),"isFile"),isSymbolicLink:de(()=>n.isSymbolicLink(),"isSymbolicLink"),name:r,path:t}},"_createWalkEntry");async function*ir(e,{extensions:t,followSymlinks:r=!1,includeDirs:n=!0,includeFiles:i=!0,includeSymlinks:s=!0,match:o,maxDepth:a=Number.POSITIVE_INFINITY,skip:u}={}){if(q(e),a<0)return;const f=o?o.map(p=>typeof p=="string"?Zt(p):p):void 0,c=u?u.map(p=>typeof p=="string"?Zt(p):p):void 0;if(e=se(D(e)),n&&Le(e,t,f,c)&&(yield await Qa(e)),!(a<1||!Le(e,void 0,void 0,c)))try{const p=await qa(e,{withFileTypes:!0});for(const d of p){let b=Nt(e,d.name);if(d.isSymbolicLink())if(r)b=await Ka(b);else if(s&&Le(b,t,f,c)){yield{isDirectory:de(()=>d.isDirectory(),"isDirectory"),isFile:de(()=>d.isFile(),"isFile"),isSymbolicLink:de(()=>d.isSymbolicLink(),"isSymbolicLink"),name:d.name,path:b};continue}else continue;d.isDirectory()?yield*ir(b,{extensions:t,followSymlinks:r,includeDirs:n,includeFiles:i,includeSymlinks:s,match:f,maxDepth:a-1,skip:c}):d.isFile()&&i&&Le(b,t,f,c)&&(yield{isDirectory:de(()=>d.isDirectory(),"isDirectory"),isFile:de(()=>d.isFile(),"isFile"),isSymbolicLink:de(()=>d.isSymbolicLink(),"isSymbolicLink"),name:d.name,path:b})}}catch(p){throw p instanceof Jt?p:new Jt(p,e)}}Kr(ir,"g");de(ir,"walk");var Va=Object.defineProperty,Ya=(e,t)=>Va(e,"name",{value:t,configurable:!0}),Ja=Object.defineProperty,Za=Ya((e,t)=>Ja(e,"name",{value:t,configurable:!0}),"e");Za(async(e,t={})=>{Array.isArray(t.extensions)||(t.extensions=["js","mjs","cjs","ts"]);const r=[];for await(const n of ir(e,t))r.push(n.path);return r},"collect");var eu=Object.defineProperty,Xr=(e,t)=>eu(e,"name",{value:t,configurable:!0});const tu=F(import.meta.url),pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ru=Xr(e=>{if(typeof pt<"u"&&pt.versions&&pt.versions.node){const[t,r]=pt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return pt.getBuiltinModule(e)}return tu(e)},"__cjs_getBuiltinModule"),{readdirSync:nu,realpathSync:ou,statSync:iu}=ru("node:fs");var su=Object.defineProperty,ye=Xr((e,t)=>su(e,"name",{value:t,configurable:!0}),"t");const au=ye(e=>{const t=zt(e),r=iu(t);return{isDirectory:ye(()=>r.isDirectory(),"isDirectory"),isFile:ye(()=>r.isFile(),"isFile"),isSymbolicLink:ye(()=>r.isSymbolicLink(),"isSymbolicLink"),name:po(t),path:t}},"_createWalkEntry");function*sr(e,{extensions:t,followSymlinks:r=!1,includeDirs:n=!0,includeFiles:i=!0,includeSymlinks:s=!0,match:o,maxDepth:a=Number.POSITIVE_INFINITY,skip:u}={}){if(q(e),a<0)return;const f=o?o.map(p=>typeof p=="string"?Zt(p):p):void 0,c=u?u.map(p=>typeof p=="string"?Zt(p):p):void 0;if(e=se(D(e)),n&&Le(e,t,f,c)&&(yield au(e)),!(a<1||!Le(e,void 0,void 0,c)))try{const p=nu(e,{withFileTypes:!0});for(const d of p){let b=Nt(e,d.name);if(d.isSymbolicLink())if(r)b=ou(b);else if(s&&Le(b,t,f,c)){yield{isDirectory:ye(()=>d.isDirectory(),"isDirectory"),isFile:ye(()=>d.isFile(),"isFile"),isSymbolicLink:ye(()=>d.isSymbolicLink(),"isSymbolicLink"),name:d.name,path:zt(b)};continue}else continue;d.isDirectory()?yield*sr(b,{extensions:t,followSymlinks:r,includeDirs:n,includeFiles:i,includeSymlinks:s,match:f,maxDepth:a-1,skip:c}):d.isFile()&&i&&Le(b,t,f,c)&&(yield{isDirectory:ye(()=>d.isDirectory(),"isDirectory"),isFile:ye(()=>d.isFile(),"isFile"),isSymbolicLink:ye(()=>d.isSymbolicLink(),"isSymbolicLink"),name:d.name,path:zt(b)})}}catch(p){throw p instanceof Jt?p:new Jt(p,e)}}Xr(sr,"b");ye(sr,"walkSync");var uu=Object.defineProperty,cu=(e,t)=>uu(e,"name",{value:t,configurable:!0}),lu=Object.defineProperty,fu=cu((e,t)=>lu(e,"name",{value:t,configurable:!0}),"n");const th=fu((e,t={})=>{Array.isArray(t.extensions)||(t.extensions=["js","mjs","cjs","ts"]);const r=[];for(const n of sr(e,t))r.push(n.path);return r},"collectSync");var pu=Object.defineProperty,Co=(e,t)=>pu(e,"name",{value:t,configurable:!0});const gu=F(import.meta.url),gt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,No=Co(e=>{if(typeof gt<"u"&>.versions&>.versions.node){const[t,r]=gt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return gt.getBuiltinModule(e)}return gu(e)},"__cjs_getBuiltinModule"),{stat:hu,lstat:du}=No("node:fs/promises"),{fileURLToPath:yu}=No("node:url");var $u=Object.defineProperty,Un=Co((e,t)=>$u(e,"name",{value:t,configurable:!0}),"n");const rh=Un(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?D(t.cwd):process.cwd();let n=se(r);const{root:i}=go(n),s=D(t.stopAt??i),o=se(n,s),a=t.type??"file",u=Un(async function(c){return typeof e=="function"?[await e(c)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const f=t.allowSymlinks?hu:du;for(;n&&n!==o&&n!==i;){const c=await u(n);for(let p of c){if(p===bo)return;if(p===void 0)continue;Buffer.isBuffer(p)?p=p.toString():p instanceof URL&&(p=yu(p));const d=ho(p)?p:se(n,p);try{const b=await f(d);if(a==="file"&&b.isFile()||a==="directory"&&b.isDirectory())return d}catch{}}n=ie(n)}},"findUp");var bu=Object.defineProperty,Mo=(e,t)=>bu(e,"name",{value:t,configurable:!0});const mu=F(import.meta.url),ht=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bo=Mo(e=>{if(typeof ht<"u"&&ht.versions&&ht.versions.node){const[t,r]=ht.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ht.getBuiltinModule(e)}return mu(e)},"__cjs_getBuiltinModule"),{statSync:vu,lstatSync:wu}=Bo("node:fs"),{fileURLToPath:Su}=Bo("node:url");var Eu=Object.defineProperty,Wn=Mo((e,t)=>Eu(e,"name",{value:t,configurable:!0}),"o");const nh=Wn((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?D(t.cwd):process.cwd();let n=se(r);const{root:i}=go(n),s=D(t.stopAt??i),o=se(n,s),a=t.type??"file",u=Wn(function(c){return typeof e=="function"?[e(c)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const f=t.allowSymlinks?vu:wu;for(;n&&n!==o&&n!==i;){for(let c of u(n)){if(c===bo)return;if(c===void 0)continue;Buffer.isBuffer(c)?c=c.toString():c instanceof URL&&(c=Su(c));const p=ho(c)?c:se(n,c);try{const d=f(p);if(a==="file"&&d.isFile()||a==="directory"&&d.isDirectory())return p}catch{}}n=ie(n)}},"findUpSync");var Ou=Object.defineProperty,Ze=(e,t)=>Ou(e,"name",{value:t,configurable:!0}),_u=Object.defineProperty,Je=Ze((e,t)=>_u(e,"name",{value:t,configurable:!0}),"t");function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Ze(Mt,"getDefaultExportFromCjs");Je(Mt,"getDefaultExportFromCjs");function Lo(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}Ze(Lo,"getDefaultExportFromNamespaceIfPresent");Je(Lo,"getDefaultExportFromNamespaceIfPresent");function Do(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}Ze(Do,"getDefaultExportFromNamespaceIfNotNamed");Je(Do,"getDefaultExportFromNamespaceIfNotNamed");function Fo(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=Je(Ze(function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:Je(function(){return e[n]},"get")})}),r}Ze(Fo,"getAugmentedNamespace");Je(Fo,"getAugmentedNamespace");var Au=Object.defineProperty,$e=(e,t)=>Au(e,"name",{value:t,configurable:!0}),qn={},Or,Kn;function Bt(){if(Kn)return Or;Kn=1;const e="[^\\\\/]",t=Symbol("unignore"),r="\\.",n="\\+",i="\\?",s="\\/",o="(?=.)",a="[^/]",u=`(?:${s}|$)`,f=`(?:^|${s})`,c=`${r}{1,2}${u}`,p=`(?!${r})`,d=`(?!${f}${c})`,b=`(?!${r}{0,1}${u})`,S=`(?!${c})`,w=`[^.${s}]`,R=`${a}*?`,J="/",L={DOT_LITERAL:r,PLUS_LITERAL:n,QMARK_LITERAL:i,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:a,END_ANCHOR:u,DOTS_SLASH:c,NO_DOT:p,NO_DOTS:d,NO_DOT_SLASH:b,NO_DOTS_SLASH:S,QMARK_NO_DOT:w,STAR:R,START_ANCHOR:f,SEP:J},U={...L,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${r}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[\\\\/])${r}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},$={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Or={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:$,UNIGNORE:t,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(E){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${E.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(E){return E===!0?U:L}},Or}$e(Bt,"requireConstants");var Xn;function Lt(){return Xn||(Xn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:i}=Bt();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>n.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(i,"\\$1"),e.toPosixSlashes=s=>s.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},e.removeBackslashes=s=>s.replace(r,o=>o==="\\"?"":o),e.escapeLast=(s,o,a)=>{const u=s.lastIndexOf(o,a);return u===-1?s:s[u-1]==="\\"?e.escapeLast(s,o,u-1):`${s.slice(0,u)}\\${s.slice(u)}`},e.removePrefix=(s,o={})=>{let a=s;return a.startsWith("./")&&(a=a.slice(2),o.prefix="./"),a},e.wrapOutput=(s,o={},a={})=>{const u=a.contains?"":"^",f=a.contains?"":"$";let c=`${u}(?:${s})${f}`;return o.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},e.basename=(s,{windows:o}={})=>{const a=s.split(o?/[\\/]/:"/"),u=a[a.length-1];return u===""?a[a.length-2]:u}})(qn)),qn}$e(Lt,"requireUtils");var _r,zn;function Io(){if(zn)return _r;zn=1;var e=Object.defineProperty,t=$e(($,E)=>e($,"name",{value:E,configurable:!0}),"k");const r=Lt(),{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:o,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:f,CHAR_LEFT_CURLY_BRACE:c,CHAR_LEFT_PARENTHESES:p,CHAR_LEFT_SQUARE_BRACKET:d,CHAR_PLUS:b,CHAR_QUESTION_MARK:S,CHAR_RIGHT_CURLY_BRACE:w,CHAR_RIGHT_PARENTHESES:R,CHAR_RIGHT_SQUARE_BRACKET:J}=Bt(),L=t($=>$===f||$===s,"isPathSeparator"),U=t($=>{$.isPrefix!==!0&&($.depth=$.isGlobstar?1/0:1)},"depth");return _r=t(($,E)=>{const l=E||{},P=$.length-1,k=l.parts===!0||l.scanToEnd===!0,A=[],O=[],j=[];let te=$,ce=-1,Z=0,be=0,ae=!1,me=!1,K=!1,Pe=!1,Ge=!1,ve=!1,G=!1,we=!1,Ue=!1,ue=!1,oe=0,pe,C,B={value:"",depth:0,isGlob:!1};const y=t(()=>ce>=P,"eos"),le=t(()=>te.charCodeAt(ce+1),"peek"),ee=t(()=>(pe=C,te.charCodeAt(++ce)),"advance");for(;ce<P;){C=ee();let I;if(C===s){G=B.backslashes=!0,C=ee(),C===c&&(ve=!0);continue}if(ve===!0||C===c){for(oe++;y()!==!0&&(C=ee());){if(C===s){G=B.backslashes=!0,ee();continue}if(C===c){oe++;continue}if(ve!==!0&&C===a&&(C=ee())===a){if(ae=B.isBrace=!0,K=B.isGlob=!0,ue=!0,k===!0)continue;break}if(ve!==!0&&C===o){if(ae=B.isBrace=!0,K=B.isGlob=!0,ue=!0,k===!0)continue;break}if(C===w&&(oe--,oe===0)){ve=!1,ae=B.isBrace=!0,ue=!0;break}}if(k===!0)continue;break}if(C===f){if(A.push(ce),O.push(B),B={value:"",depth:0,isGlob:!1},ue===!0)continue;if(pe===a&&ce===Z+1){Z+=2;continue}be=ce+1;continue}if(l.noext!==!0&&(C===b||C===i||C===n||C===S||C===u)&&le()===p){if(K=B.isGlob=!0,Pe=B.isExtglob=!0,ue=!0,C===u&&ce===Z&&(Ue=!0),k===!0){for(;y()!==!0&&(C=ee());){if(C===s){G=B.backslashes=!0,C=ee();continue}if(C===R){K=B.isGlob=!0,ue=!0;break}}continue}break}if(C===n){if(pe===n&&(Ge=B.isGlobstar=!0),K=B.isGlob=!0,ue=!0,k===!0)continue;break}if(C===S){if(K=B.isGlob=!0,ue=!0,k===!0)continue;break}if(C===d){for(;y()!==!0&&(I=ee());){if(I===s){G=B.backslashes=!0,ee();continue}if(I===J){me=B.isBracket=!0,K=B.isGlob=!0,ue=!0;break}}if(k===!0)continue;break}if(l.nonegate!==!0&&C===u&&ce===Z){we=B.negated=!0,Z++;continue}if(l.noparen!==!0&&C===p){if(K=B.isGlob=!0,k===!0){for(;y()!==!0&&(C=ee());){if(C===p){G=B.backslashes=!0,C=ee();continue}if(C===R){ue=!0;break}}continue}break}if(K===!0){if(ue=!0,k===!0)continue;break}}l.noext===!0&&(Pe=!1,K=!1);let Y=te,g="",h="";Z>0&&(g=te.slice(0,Z),te=te.slice(Z),be-=Z),Y&&K===!0&&be>0?(Y=te.slice(0,be),h=te.slice(be)):K===!0?(Y="",h=te):Y=te,Y&&Y!==""&&Y!=="/"&&Y!==te&&L(Y.charCodeAt(Y.length-1))&&(Y=Y.slice(0,-1)),l.unescape===!0&&(h&&(h=r.removeBackslashes(h)),Y&&G===!0&&(Y=r.removeBackslashes(Y)));const he={prefix:g,input:$,start:Z,base:Y,glob:h,isBrace:ae,isBracket:me,isGlob:K,isExtglob:Pe,isGlobstar:Ge,negated:we,negatedExtglob:Ue};if(l.tokens===!0&&(he.maxDepth=0,L(C)||O.push(B),he.tokens=O),l.parts===!0||l.tokens===!0){let I;for(let X=0;X<A.length;X++){const Re=I?I+1:Z,ge=A[X],Ne=$.slice(Re,ge);l.tokens&&(X===0&&Z!==0?(O[X].isPrefix=!0,O[X].value=g):O[X].value=Ne,U(O[X]),he.maxDepth+=O[X].depth),(X!==0||Ne!=="")&&j.push(Ne),I=ge}if(I&&I+1<$.length){const X=$.slice(I+1);j.push(X),l.tokens&&(O[O.length-1].value=X,U(O[O.length-1]),he.maxDepth+=O[O.length-1].depth)}he.slashes=A,he.parts=j}return he},"scan"),_r}$e(Io,"requireScan");var Ar,Qn;function Ho(){if(Qn)return Ar;Qn=1;var e=Object.defineProperty,t=$e(($,E)=>e($,"name",{value:E,configurable:!0}),"y");const r=Bt(),n=Lt(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:u}=r,f=t(($,E)=>typeof E.expandRange=="function"?E.expandRange(...$,E):($.sort(),`[${$.join("-")}]`),"expandRange"),c=t(($,E)=>`Missing ${$}: "${E}" - use "\\\\${E}" to match literal characters`,"syntaxError"),p=t($=>{const E=[];let l=0,P=0,k=0,A="",O=!1;for(const j of $){if(O===!0){A+=j,O=!1;continue}if(j==="\\"){A+=j,O=!0;continue}if(j==='"'){k=k===1?0:1,A+=j;continue}if(k===0){if(j==="[")l++;else if(j==="]"&&l>0)l--;else if(l===0){if(j==="(")P++;else if(j===")"&&P>0)P--;else if(j==="|"&&P===0){E.push(A),A="";continue}}}A+=j}return E.push(A),E},"splitTopLevel"),d=t($=>{let E=!1;for(const l of $){if(E===!0){E=!1;continue}if(l==="\\"){E=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},"isPlainBranch"),b=t($=>{let E=$.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(E)&&(E=E.slice(2,-1),l=!0);if(d(E))return E.replace(/\\(.)/g,"$1")},"normalizeSimpleBranch"),S=t($=>{const E=$.map(b).filter(Boolean);for(let l=0;l<E.length;l++)for(let P=l+1;P<E.length;P++){const k=E[l],A=E[P],O=k[0];if(!(!O||k!==O.repeat(k.length)||A!==O.repeat(A.length))&&(k===A||k.startsWith(A)||A.startsWith(k)))return!0}return!1},"hasRepeatedCharPrefixOverlap"),w=t(($,E=!0)=>{if($[0]!=="+"&&$[0]!=="*"||$[1]!=="(")return;let l=0,P=0,k=0,A=!1;for(let O=1;O<$.length;O++){const j=$[O];if(A===!0){A=!1;continue}if(j==="\\"){A=!0;continue}if(j==='"'){k=k===1?0:1;continue}if(k!==1){if(j==="["){l++;continue}if(j==="]"&&l>0){l--;continue}if(!(l>0)){if(j==="("){P++;continue}if(j===")"&&(P--,P===0))return E===!0&&O!==$.length-1?void 0:{type:$[0],body:$.slice(2,O),end:O}}}}},"parseRepeatedExtglob"),R=t($=>{let E=0;const l=[];for(;E<$.length;){const P=w($.slice(E),!1);if(!P||P.type!=="*")return;const k=p(P.body).map(O=>O.trim());if(k.length!==1)return;const A=b(k[0]);if(!A||A.length!==1)return;l.push(A),E+=P.end+1}return l.length<1?void 0:`${l.length===1?n.escapeRegex(l[0]):`[${l.map(P=>n.escapeRegex(P)).join("")}]`}*`},"getStarExtglobSequenceOutput"),J=t($=>{let E=0,l=$.trim(),P=w(l);for(;P;)E++,l=P.body.trim(),P=w(l);return E},"repeatedExtglobRecursion"),L=t(($,E)=>{if(E.maxExtglobRecursion===!1)return{risky:!1};const l=typeof E.maxExtglobRecursion=="number"?E.maxExtglobRecursion:r.DEFAULT_MAX_EXTGLOB_RECURSION,P=p($).map(k=>k.trim());if(P.length>1&&(P.some(k=>k==="")||P.some(k=>/^[*?]+$/.test(k))||S(P)))return{risky:!0};for(const k of P){const A=R(k);if(A)return{risky:!0,safeOutput:A};if(J(k)>l)return{risky:!0}}return{risky:!1}},"analyzeRepeatedExtglob"),U=t(($,E)=>{if(typeof $!="string")throw new TypeError("Expected a string");$=u[$]||$;const l={...E},P=typeof l.maxLength=="number"?Math.min(i,l.maxLength):i;let k=$.length;if(k>P)throw new SyntaxError(`Input length: ${k}, exceeds maximum allowed length: ${P}`);const A={type:"bos",value:"",output:l.prepend||""},O=[A],j=l.capture?"":"?:",te=r.globChars(l.windows),ce=r.extglobChars(te),{DOT_LITERAL:Z,PLUS_LITERAL:be,SLASH_LITERAL:ae,ONE_CHAR:me,DOTS_SLASH:K,NO_DOT:Pe,NO_DOT_SLASH:Ge,NO_DOTS_SLASH:ve,QMARK:G,QMARK_NO_DOT:we,STAR:Ue,START_ANCHOR:ue}=te,oe=t(v=>`(${j}(?:(?!${ue}${v.dot?K:Z}).)*?)`,"globstar"),pe=l.dot?"":Pe,C=l.dot?G:we;let B=l.bash===!0?oe(l):Ue;l.capture&&(B=`(${B})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const y={input:$,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:O};$=n.removePrefix($,y),k=$.length;const le=[],ee=[],Y=[];let g=A,h;const he=t(()=>y.index===k-1,"eos"),I=y.peek=(v=1)=>$[y.index+v],X=y.advance=()=>$[++y.index]||"",Re=t(()=>$.slice(y.index+1),"remaining"),ge=t((v="",W=0)=>{y.consumed+=v,y.index+=W},"consume"),Ne=t(v=>{y.output+=v.output!=null?v.output:v.value,ge(v.value)},"append"),Bi=t(()=>{let v=1;for(;I()==="!"&&(I(2)!=="("||I(3)==="?");)X(),y.start++,v++;return v%2===0?!1:(y.negated=!0,y.start++,!0)},"negate"),Gt=t(v=>{y[v]++,Y.push(v)},"increment"),Me=t(v=>{y[v]--,Y.pop()},"decrement"),N=t(v=>{if(g.type==="globstar"){const W=y.braces>0&&(v.type==="comma"||v.type==="brace"),m=v.extglob===!0||le.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!W&&!m&&(y.output=y.output.slice(0,-g.output.length),g.type="star",g.value="*",g.output=B,y.output+=g.output)}if(le.length&&v.type!=="paren"&&(le[le.length-1].inner+=v.value),(v.value||v.output)&&Ne(v),g&&g.type==="text"&&v.type==="text"){g.output=(g.output||g.value)+v.value,g.value+=v.value;return}v.prev=g,O.push(v),g=v},"push"),Ut=t((v,W)=>{const m={...ce[W],conditions:1,inner:""};m.prev=g,m.parens=y.parens,m.output=y.output,m.startIndex=y.index,m.tokensIndex=O.length;const M=(l.capture?"(":"")+m.open;Gt("parens"),N({type:v,value:W,output:y.output?"":me}),N({type:"paren",extglob:!0,value:X(),output:M}),le.push(m)},"extglobOpen"),Li=t(v=>{const W=$.slice(v.startIndex,y.index+1),m=$.slice(v.startIndex+2,y.index),M=L(m,l);if((v.type==="plus"||v.type==="star")&&M.risky){const H=M.safeOutput?(v.output?"":me)+(l.capture?`(${M.safeOutput})`:M.safeOutput):void 0,Se=O[v.tokensIndex];Se.type="text",Se.value=W,Se.output=H||n.escapeRegex(W);for(let Ee=v.tokensIndex+1;Ee<O.length;Ee++)O[Ee].value="",O[Ee].output="",delete O[Ee].suffix;y.output=v.output+Se.output,y.backtrack=!0,N({type:"paren",extglob:!0,value:h,output:""}),Me("parens");return}let z=v.close+(l.capture?")":""),re;if(v.type==="negate"){let H=B;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(H=oe(l)),(H!==B||he()||/^\)+$/.test(Re()))&&(z=v.close=`)$))${H}`),v.inner.includes("*")&&(re=Re())&&/^\.[^\\/.]+$/.test(re)){const Se=U(re,{...E,fastpaths:!1}).output;z=v.close=`)${Se})${H})`}v.prev.type==="bos"&&(y.negatedExtglob=!0)}N({type:"paren",extglob:!0,value:h,output:z}),Me("parens")},"extglobClose");if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let v=!1,W=$.replace(a,(m,M,z,re,H,Se)=>re==="\\"?(v=!0,m):re==="?"?M?M+re+(H?G.repeat(H.length):""):Se===0?C+(H?G.repeat(H.length):""):G.repeat(z.length):re==="."?Z.repeat(z.length):re==="*"?M?M+re+(H?B:""):B:M?m:`\\${m}`);return v===!0&&(l.unescape===!0?W=W.replace(/\\/g,""):W=W.replace(/\\+/g,m=>m.length%2===0?"\\\\":m?"\\":"")),W===$&&l.contains===!0?(y.output=$,y):(y.output=n.wrapOutput(W,y,E),y)}for(;!he();){if(h=X(),h==="\0")continue;if(h==="\\"){const m=I();if(m==="/"&&l.bash!==!0||m==="."||m===";")continue;if(!m){h+="\\",N({type:"text",value:h});continue}const M=/^\\+/.exec(Re());let z=0;if(M&&M[0].length>2&&(z=M[0].length,y.index+=z,z%2!==0&&(h+="\\")),l.unescape===!0?h=X():h+=X(),y.brackets===0){N({type:"text",value:h});continue}}if(y.brackets>0&&(h!=="]"||g.value==="["||g.value==="[^")){if(l.posix!==!1&&h===":"){const m=g.value.slice(1);if(m.includes("[")&&(g.posix=!0,m.includes(":"))){const M=g.value.lastIndexOf("["),z=g.value.slice(0,M),re=g.value.slice(M+2),H=s[re];if(H){g.value=z+H,y.backtrack=!0,X(),!A.output&&O.indexOf(g)===1&&(A.output=me);continue}}}(h==="["&&I()!==":"||h==="-"&&I()==="]")&&(h=`\\${h}`),h==="]"&&(g.value==="["||g.value==="[^")&&(h=`\\${h}`),l.posix===!0&&h==="!"&&g.value==="["&&(h="^"),g.value+=h,Ne({value:h});continue}if(y.quotes===1&&h!=='"'){h=n.escapeRegex(h),g.value+=h,Ne({value:h});continue}if(h==='"'){y.quotes=y.quotes===1?0:1,l.keepQuotes===!0&&N({type:"text",value:h});continue}if(h==="("){Gt("parens"),N({type:"paren",value:h});continue}if(h===")"){if(y.parens===0&&l.strictBrackets===!0)throw new SyntaxError(c("opening","("));const m=le[le.length-1];if(m&&y.parens===m.parens+1){Li(le.pop());continue}N({type:"paren",value:h,output:y.parens?")":"\\)"}),Me("parens");continue}if(h==="["){if(l.nobracket===!0||!Re().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(c("closing","]"));h=`\\${h}`}else Gt("brackets");N({type:"bracket",value:h});continue}if(h==="]"){if(l.nobracket===!0||g&&g.type==="bracket"&&g.value.length===1){N({type:"text",value:h,output:`\\${h}`});continue}if(y.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(c("opening","["));N({type:"text",value:h,output:`\\${h}`});continue}Me("brackets");const m=g.value.slice(1);if(g.posix!==!0&&m[0]==="^"&&!m.includes("/")&&(h=`/${h}`),g.value+=h,Ne({value:h}),l.literalBrackets===!1||n.hasRegexChars(m))continue;const M=n.escapeRegex(g.value);if(y.output=y.output.slice(0,-g.value.length),l.literalBrackets===!0){y.output+=M,g.value=M;continue}g.value=`(${j}${M}|${g.value})`,y.output+=g.value;continue}if(h==="{"&&l.nobrace!==!0){Gt("braces");const m={type:"brace",value:h,output:"(",outputIndex:y.output.length,tokensIndex:y.tokens.length};ee.push(m),N(m);continue}if(h==="}"){const m=ee[ee.length-1];if(l.nobrace===!0||!m){N({type:"text",value:h,output:h});continue}let M=")";if(m.dots===!0){const z=O.slice(),re=[];for(let H=z.length-1;H>=0&&(O.pop(),z[H].type!=="brace");H--)z[H].type!=="dots"&&re.unshift(z[H].value);M=f(re,l),y.backtrack=!0}if(m.comma!==!0&&m.dots!==!0){const z=y.output.slice(0,m.outputIndex),re=y.tokens.slice(m.tokensIndex);m.value=m.output="\\{",h=M="\\}",y.output=z;for(const H of re)y.output+=H.output||H.value}N({type:"brace",value:h,output:M}),Me("braces"),ee.pop();continue}if(h==="|"){le.length>0&&le[le.length-1].conditions++,N({type:"text",value:h});continue}if(h===","){let m=h;const M=ee[ee.length-1];M&&Y[Y.length-1]==="braces"&&(M.comma=!0,m="|"),N({type:"comma",value:h,output:m});continue}if(h==="/"){if(g.type==="dot"&&y.index===y.start+1){y.start=y.index+1,y.consumed="",y.output="",O.pop(),g=A;continue}N({type:"slash",value:h,output:ae});continue}if(h==="."){if(y.braces>0&&g.type==="dot"){g.value==="."&&(g.output=Z);const m=ee[ee.length-1];g.type="dots",g.output+=h,g.value+=h,m.dots=!0;continue}if(y.braces+y.parens===0&&g.type!=="bos"&&g.type!=="slash"){N({type:"text",value:h,output:Z});continue}N({type:"dot",value:h,output:Z});continue}if(h==="?"){if(!(g&&g.value==="(")&&l.noextglob!==!0&&I()==="("&&I(2)!=="?"){Ut("qmark",h);continue}if(g&&g.type==="paren"){const m=I();let M=h;(g.value==="("&&!/[!=<:]/.test(m)||m==="<"&&!/<([!=]|\w+>)/.test(Re()))&&(M=`\\${h}`),N({type:"text",value:h,output:M});continue}if(l.dot!==!0&&(g.type==="slash"||g.type==="bos")){N({type:"qmark",value:h,output:we});continue}N({type:"qmark",value:h,output:G});continue}if(h==="!"){if(l.noextglob!==!0&&I()==="("&&(I(2)!=="?"||!/[!=<:]/.test(I(3)))){Ut("negate",h);continue}if(l.nonegate!==!0&&y.index===0){Bi();continue}}if(h==="+"){if(l.noextglob!==!0&&I()==="("&&I(2)!=="?"){Ut("plus",h);continue}if(g&&g.value==="("||l.regex===!1){N({type:"plus",value:h,output:be});continue}if(g&&(g.type==="bracket"||g.type==="paren"||g.type==="brace")||y.parens>0){N({type:"plus",value:h});continue}N({type:"plus",value:be});continue}if(h==="@"){if(l.noextglob!==!0&&I()==="("&&I(2)!=="?"){N({type:"at",extglob:!0,value:h,output:""});continue}N({type:"text",value:h});continue}if(h!=="*"){(h==="$"||h==="^")&&(h=`\\${h}`);const m=o.exec(Re());m&&(h+=m[0],y.index+=m[0].length),N({type:"text",value:h});continue}if(g&&(g.type==="globstar"||g.star===!0)){g.type="star",g.star=!0,g.value+=h,g.output=B,y.backtrack=!0,y.globstar=!0,ge(h);continue}let v=Re();if(l.noextglob!==!0&&/^\([^?]/.test(v)){Ut("star",h);continue}if(g.type==="star"){if(l.noglobstar===!0){ge(h);continue}const m=g.prev,M=m.prev,z=m.type==="slash"||m.type==="bos",re=M&&(M.type==="star"||M.type==="globstar");if(l.bash===!0&&(!z||v[0]&&v[0]!=="/")){N({type:"star",value:h,output:""});continue}const H=y.braces>0&&(m.type==="comma"||m.type==="brace"),Se=le.length&&(m.type==="pipe"||m.type==="paren");if(!z&&m.type!=="paren"&&!H&&!Se){N({type:"star",value:h,output:""});continue}for(;v.slice(0,3)==="/**";){const Ee=$[y.index+4];if(Ee&&Ee!=="/")break;v=v.slice(3),ge("/**",3)}if(m.type==="bos"&&he()){g.type="globstar",g.value+=h,g.output=oe(l),y.output=g.output,y.globstar=!0,ge(h);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&!re&&he()){y.output=y.output.slice(0,-(m.output+g.output).length),m.output=`(?:${m.output}`,g.type="globstar",g.output=oe(l)+(l.strictSlashes?")":"|$)"),g.value+=h,y.globstar=!0,y.output+=m.output+g.output,ge(h);continue}if(m.type==="slash"&&m.prev.type!=="bos"&&v[0]==="/"){const Ee=v[1]!==void 0?"|$":"";y.output=y.output.slice(0,-(m.output+g.output).length),m.output=`(?:${m.output}`,g.type="globstar",g.output=`${oe(l)}${ae}|${ae}${Ee})`,g.value+=h,y.output+=m.output+g.output,y.globstar=!0,ge(h+X()),N({type:"slash",value:"/",output:""});continue}if(m.type==="bos"&&v[0]==="/"){g.type="globstar",g.value+=h,g.output=`(?:^|${ae}|${oe(l)}${ae})`,y.output=g.output,y.globstar=!0,ge(h+X()),N({type:"slash",value:"/",output:""});continue}if(H&&v[0]==="/"){g.type="globstar",g.value+=h,g.output=`(?:^|${ae}|${oe(l)}${ae})`,y.output+=g.output,y.globstar=!0,ge(h+X()),N({type:"slash",value:"/",output:""});continue}y.output=y.output.slice(0,-g.output.length),g.type="globstar",g.output=oe(l),g.value+=h,y.output+=g.output,y.globstar=!0,ge(h);continue}const W={type:"star",value:h,output:B};if(l.bash===!0){W.output=".*?",(g.type==="bos"||g.type==="slash")&&(W.output=pe+W.output),N(W);continue}if(g&&(g.type==="bracket"||g.type==="paren")&&l.regex===!0){W.output=h,N(W);continue}(y.index===y.start||g.type==="slash"||g.type==="dot")&&(g.type==="dot"?(y.output+=Ge,g.output+=Ge):l.dot===!0?(y.output+=ve,g.output+=ve):(y.output+=pe,g.output+=pe),I()!=="*"&&(y.output+=me,g.output+=me)),N(W)}for(;y.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(c("closing","]"));y.output=n.escapeLast(y.output,"["),Me("brackets")}for(;y.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(c("closing",")"));y.output=n.escapeLast(y.output,"("),Me("parens")}for(;y.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(c("closing","}"));y.output=n.escapeLast(y.output,"{"),Me("braces")}if(l.strictSlashes!==!0&&(g.type==="star"||g.type==="bracket")&&N({type:"maybe_slash",value:"",output:`${ae}?`}),y.backtrack===!0){y.output="";for(const v of y.tokens)y.output+=v.output!=null?v.output:v.value,v.suffix&&(y.output+=v.suffix)}return y},"parse");return U.fastpaths=($,E)=>{const l={...E},P=typeof l.maxLength=="number"?Math.min(i,l.maxLength):i,k=$.length;if(k>P)throw new SyntaxError(`Input length: ${k}, exceeds maximum allowed length: ${P}`);$=u[$]||$;const{DOT_LITERAL:A,SLASH_LITERAL:O,ONE_CHAR:j,DOTS_SLASH:te,NO_DOT:ce,NO_DOTS:Z,NO_DOTS_SLASH:be,STAR:ae,START_ANCHOR:me}=r.globChars(l.windows),K=l.dot?Z:ce,Pe=l.dot?be:ce,Ge=l.capture?"":"?:",ve={negated:!1,prefix:""};let G=l.bash===!0?".*?":ae;l.capture&&(G=`(${G})`);const we=t(pe=>pe.noglobstar===!0?G:`(${Ge}(?:(?!${me}${pe.dot?te:A}).)*?)`,"globstar"),Ue=t(pe=>{switch(pe){case"*":return`${K}${j}${G}`;case".*":return`${A}${j}${G}`;case"*.*":return`${K}${G}${A}${j}${G}`;case"*/*":return`${K}${G}${O}${j}${Pe}${G}`;case"**":return K+we(l);case"**/*":return`(?:${K}${we(l)}${O})?${Pe}${j}${G}`;case"**/*.*":return`(?:${K}${we(l)}${O})?${Pe}${G}${A}${j}${G}`;case"**/.*":return`(?:${K}${we(l)}${O})?${A}${j}${G}`;default:{const C=/^(.*?)\.(\w+)$/.exec(pe);if(!C)return;const B=Ue(C[1]);return B?B+A+C[2]:void 0}}},"create"),ue=n.removePrefix($,ve);let oe=Ue(ue);return oe&&l.strictSlashes!==!0&&(oe+=`${O}?`),oe},Ar=U,Ar}$e(Ho,"requireParse");var xr,Vn;function Go(){if(Vn)return xr;Vn=1;var e=Object.defineProperty,t=$e((u,f)=>e(u,"name",{value:f,configurable:!0}),"h");const r=Io(),n=Ho(),i=Lt(),s=Bt(),o=t(u=>u&&typeof u=="object"&&!Array.isArray(u),"isObject"),a=t((u,f,c=!1)=>{if(Array.isArray(u)){const L=u.map(U=>a(U,f,c));return t(U=>{for(const $ of L){const E=$(U);if(E)return E}return!1},"arrayMatcher")}const p=o(u)&&u.tokens&&u.input;if(u===""||typeof u!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");const d=f||{},b=d.windows,S=p?a.compileRe(u,f):a.makeRe(u,f,!1,!0),w=S.state;delete S.state;let R=t(()=>!1,"isIgnored");if(d.ignore){const L={...f,ignore:null,onMatch:null,onResult:null};R=a(d.ignore,L,c)}const J=t((L,U=!1)=>{const{isMatch:$,match:E,output:l}=a.test(L,S,f,{glob:u,posix:b}),P={glob:u,state:w,regex:S,posix:b,input:L,output:l,match:E,isMatch:$};if(typeof d.onResult=="function"&&d.onResult(P),$===!1)return P.isMatch=!1,U?P:!1;e:if(R(L)){if(typeof d.onIgnore=="function"&&d.onIgnore(P)===s.UNIGNORE){P.isMatch=!0;break e}return P.isMatch=!1,U?P:!1}return typeof d.onMatch=="function"&&d.onMatch(P),U?P:!0},"matcher");return c&&(J.state=w),J},"picomatch");return a.test=(u,f,c,{glob:p,posix:d}={})=>{if(typeof u!="string")throw new TypeError("Expected input to be a string");if(u==="")return{isMatch:!1,output:""};const b=c||{},S=b.format||(d?i.toPosixSlashes:null);let w=u===p,R=w&&S?S(u):u;return w===!1&&(R=S?S(u):u,w=R===p),(w===!1||b.capture===!0)&&(b.matchBase===!0||b.basename===!0?w=a.matchBase(u,f,c,d):w=f.exec(R)),{isMatch:!!w,match:w,output:R}},a.matchBase=(u,f,c)=>(f instanceof RegExp?f:a.makeRe(f,c)).test(i.basename(u)),a.isMatch=(u,f,c)=>a(f,c)(u),a.parse=(u,f)=>Array.isArray(u)?u.map(c=>a.parse(c,f)):n(u,{...f,fastpaths:!1}),a.scan=(u,f)=>r(u,f),a.compileRe=(u,f,c=!1,p=!1)=>{if(c===!0)return u.output;const d=f||{},b=d.contains?"":"^",S=d.contains?"":"$";let w=`${b}(?:${u.output})${S}`;u&&u.negated===!0&&(w=`^(?!${w}).*$`);const R=a.toRegex(w,f);return p===!0&&(R.state=u),R},a.makeRe=(u,f={},c=!1,p=!1)=>{if(!u||typeof u!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return f.fastpaths!==!1&&(u[0]==="."||u[0]==="*")&&(d.output=n.fastpaths(u,f)),d.output||(d=n(u,f)),a.compileRe(d,f,c,p)},a.toRegex=(u,f)=>{try{const c=f||{};return new RegExp(u,c.flags||(c.nocase?"i":""))}catch(c){if(f&&f.debug===!0)throw c;return/$^/}},a.constants=s,xr=a,xr}$e(Go,"requirePicomatch$1");var Pr,Yn;function Uo(){if(Yn)return Pr;Yn=1;var e=Object.defineProperty,t=$e((s,o)=>e(s,"name",{value:o,configurable:!0}),"c");const r=Go(),n=Lt();function i(s,o,a=!1){return o&&(o.windows===null||o.windows===void 0)&&(o={...o,windows:n.isWindows()}),r(s,o,a)}return $e(i,"picomatch"),t(i,"picomatch"),Object.assign(i,r),Pr=i,Pr}$e(Uo,"requirePicomatch");var xu=Uo();const je=Mt(xu);var Pu=Object.defineProperty,T=(e,t)=>Pu(e,"name",{value:t,configurable:!0});const Ru=F(import.meta.url),dt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Dt=T(e=>{if(typeof dt<"u"&&dt.versions&&dt.versions.node){const[t,r]=dt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return dt.getBuiltinModule(e)}return Ru(e)},"__cjs_getBuiltinModule"),Jn=Dt("fs"),Tu={...Jn,default:Jn},{statSync:ku,stat:ju,realpathSync:Cu,realpath:Nu,readdirSync:Mu,readdir:Bu}=Dt("fs"),{sep:Wo,basename:Lu,dirname:Fr,resolve:qo,normalize:Du,relative:Fu,posix:qe,isAbsolute:Iu}=Dt("path"),{fileURLToPath:Hu}=Dt("url"),{createRequire:Gu}=Dt("module");var Uu=Object.defineProperty,_=T((e,t)=>Uu(e,"name",{value:t,configurable:!0}),"r"),Zn=Gu(import.meta.url);function zr(e){let t=Du(e);return t.length>1&&t[t.length-1]===Wo&&(t=t.substring(0,t.length-1)),t}T(zr,"M$1");_(zr,"cleanPath");const Wu=/[\\/]/g;function ar(e,t){return e.replace(Wu,t)}T(ar,"D$1");_(ar,"convertSlashes");const qu=/^[a-z]:[\\/]$/i;function Qr(e){return e==="/"||qu.test(e)}T(Qr,"T$1");_(Qr,"isRootDirectory");function Tt(e,t){const{resolvePaths:r,normalizePath:n,pathSeparator:i}=t,s=process.platform==="win32"&&e.includes("/")||e.startsWith(".");if(r&&(e=qo(e)),(n||s)&&(e=zr(e)),e===".")return"";const o=e[e.length-1]!==i;return ar(o?e+i:e,i)}T(Tt,"w");_(Tt,"normalizePath");function ur(e,t){return t+e}T(ur,"P");_(ur,"joinPathWithBasePath");function Vr(e,t){return function(r,n){return n.startsWith(e)?n.slice(e.length)+r:ar(Fu(e,n),t.pathSeparator)+t.pathSeparator+r}}T(Vr,"X");_(Vr,"joinPathWithRelativePath");function Yr(e){return e}T(Yr,"H");_(Yr,"joinPath");function Jr(e,t,r){return t+e+r}T(Jr,"U$1");_(Jr,"joinDirectoryPath");function Zr(e,t){const{relativePaths:r,includeBasePath:n}=t;return r&&e?Vr(e,t):n?ur:Yr}T(Zr,"J");_(Zr,"build$7");function en(e){return function(t,r){r.push(t.substring(e.length)||".")}}T(en,"K$1");_(en,"pushDirectoryWithRelativePath");function tn(e){return function(t,r,n){const i=t.substring(e.length)||".";n.every(s=>s(i,!0))&&r.push(i)}}T(tn,"V");_(tn,"pushDirectoryFilterWithRelativePath");const Ku=_((e,t)=>{t.push(e||".")},"pushDirectory"),Xu=_((e,t,r)=>{const n=e||".";r.every(i=>i(n,!0))&&t.push(n)},"pushDirectoryFilter"),zu=_(()=>{},"empty$2");function rn(e,t){const{includeDirs:r,filters:n,relativePaths:i}=t;return r?i?n&&n.length?tn(e):en(e):n&&n.length?Xu:Ku:zu}T(rn,"st$1");_(rn,"build$6");const Qu=_((e,t,r,n)=>{n.every(i=>i(e,!1))&&r.files++},"pushFileFilterAndCount"),Vu=_((e,t,r,n)=>{n.every(i=>i(e,!1))&&t.push(e)},"pushFileFilter"),Yu=_((e,t,r,n)=>{r.files++},"pushFileCount"),Ju=_((e,t)=>{t.push(e)},"pushFile"),Zu=_(()=>{},"empty$1");function nn(e){const{excludeFiles:t,filters:r,onlyCounts:n}=e;return t?Zu:r&&r.length?n?Qu:Vu:n?Yu:Ju}T(nn,"ut$1");_(nn,"build$5");const ec=_(e=>e,"getArray"),tc=_(()=>[""].slice(0,0),"getArrayGroup");function on(e){return e.group?tc:ec}T(on,"ct$1");_(on,"build$4");const rc=_((e,t,r)=>{e.push({directory:t,files:r,dir:t})},"groupFiles"),nc=_(()=>{},"empty");function sn(e){return e.group?rc:nc}T(sn,"ft$1");_(sn,"build$3");const oc=_(function(e,t,r){const{queue:n,fs:i,options:{suppressErrors:s}}=t;n.enqueue(),i.realpath(e,(o,a)=>{if(o)return n.dequeue(s?null:o,t);i.stat(a,(u,f)=>{if(u)return n.dequeue(s?null:u,t);if(f.isDirectory()&&cr(e,a,t))return n.dequeue(null,t);r(f,a),n.dequeue(null,t)})})},"resolveSymlinksAsync"),ic=_(function(e,t,r){const{queue:n,fs:i,options:{suppressErrors:s}}=t;n.enqueue();try{const o=i.realpathSync(e),a=i.statSync(o);if(a.isDirectory()&&cr(e,o,t))return;r(a,o)}catch(o){if(!s)throw o}},"resolveSymlinks");function an(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:t?ic:oc}T(an,"gt$1");_(an,"build$2");function cr(e,t,r){if(r.options.useRealPaths)return un(t,r);let n=Fr(e),i=1;for(;n!==r.root&&i<2;){const s=r.symlinks.get(n);s&&(s===t||s.startsWith(t)||t.startsWith(s))?i++:n=Fr(n)}return r.symlinks.set(e,t),i>1}T(cr,"E$1");_(cr,"isRecursive");function un(e,t){return t.visited.includes(e+t.options.pathSeparator)}T(un,"dt$1");_(un,"isRecursiveUsingRealPaths");const sc=_(e=>e.counts,"onlyCountsSync"),ac=_(e=>e.groups,"groupsSync"),uc=_(e=>e.paths,"defaultSync"),cc=_(e=>e.paths.slice(0,e.options.maxFiles),"limitFilesSync"),lc=_((e,t,r)=>(et(t,r,e.counts,e.options.suppressErrors),null),"onlyCountsAsync"),fc=_((e,t,r)=>(et(t,r,e.paths,e.options.suppressErrors),null),"defaultAsync"),pc=_((e,t,r)=>(et(t,r,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),"limitFilesAsync"),gc=_((e,t,r)=>(et(t,r,e.groups,e.options.suppressErrors),null),"groupsAsync");function et(e,t,r,n){t(e&&!n?e:null,r)}T(et,"y");_(et,"report");function cn(e,t){const{onlyCounts:r,group:n,maxFiles:i}=e;return r?t?sc:lc:n?t?ac:gc:i?t?cc:pc:t?uc:fc}T(cn,"Et");_(cn,"build$1");const Ko={withFileTypes:!0},hc=_((e,t,r,n,i)=>{if(e.queue.enqueue(),n<0)return e.queue.dequeue(null,e);const{fs:s}=e;e.visited.push(t),e.counts.directories++,s.readdir(t||".",Ko,(o,a=[])=>{i(a,r,n),e.queue.dequeue(e.options.suppressErrors?null:o,e)})},"walkAsync"),dc=_((e,t,r,n,i)=>{const{fs:s}=e;if(n<0)return;e.visited.push(t),e.counts.directories++;let o=[];try{o=s.readdirSync(t||".",Ko)}catch(a){if(!e.options.suppressErrors)throw a}i(o,r,n)},"walkSync");function ln(e){return e?dc:hc}T(ln,"xt$1");_(ln,"build");var yc=class{static{T(this,"_t")}static{_(this,"Queue")}count=0;constructor(e){this.onQueueEmpty=e}enqueue(){return this.count++,this.count}dequeue(e,t){this.onQueueEmpty&&(--this.count<=0||e)&&(this.onQueueEmpty(e,t),e&&(t.controller.abort(),this.onQueueEmpty=void 0))}},$c=class{static{T(this,"At")}static{_(this,"Counter")}_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}},bc=class{static{T(this,"Wt")}static{_(this,"Aborter")}aborted=!1;abort(){this.aborted=!0}},Xo=class{static{T(this,"q")}static{_(this,"Walker")}root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,r){this.isSynchronous=!r,this.callbackInvoker=cn(t,this.isSynchronous),this.root=Tt(e,t),this.state={root:Qr(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new $c,options:t,queue:new yc((n,i)=>this.callbackInvoker(i,n,r)),symlinks:new Map,visited:[""].slice(0,0),controller:new bc,fs:t.fs||Tu},this.joinPath=Zr(this.root,t),this.pushDirectory=rn(this.root,t),this.pushFile=nn(t),this.getArray=on(t),this.groupFiles=sn(t),this.resolveSymlink=an(t,this.isSynchronous),this.walkDirectory=ln(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=_((e,t,r)=>{const{paths:n,options:{filters:i,resolveSymlinks:s,excludeSymlinks:o,exclude:a,maxFiles:u,signal:f,useRealPaths:c,pathSeparator:p},controller:d}=this.state;if(d.aborted||f&&f.aborted||u&&n.length>u)return;const b=this.getArray(this.state.paths);for(let S=0;S<e.length;++S){const w=e[S];if(w.isFile()||w.isSymbolicLink()&&!s&&!o){const R=this.joinPath(w.name,t);this.pushFile(R,b,this.state.counts,i)}else if(w.isDirectory()){let R=Jr(w.name,t,this.state.options.pathSeparator);if(a&&a(w.name,R))continue;this.pushDirectory(R,n,i),this.walkDirectory(this.state,R,R,r-1,this.walk)}else if(this.resolveSymlink&&w.isSymbolicLink()){let R=ur(w.name,t);this.resolveSymlink(R,this.state,(J,L)=>{if(J.isDirectory()){if(L=Tt(L,this.state.options),a&&a(w.name,c?L:R+p))return;this.walkDirectory(this.state,L,c?L:R+p,r-1,this.walk)}else{L=c?L:R;const U=Lu(L),$=Tt(Fr(L),this.state.options);L=this.joinPath(U,$),this.pushFile(L,b,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,b)},"walk")};function fn(e,t){return new Promise((r,n)=>{lr(e,t,(i,s)=>{if(i)return n(i);r(s)})})}T(fn,"Ct");_(fn,"promise");function lr(e,t,r){new Xo(e,t,r).start()}T(lr,"x");_(lr,"callback");function pn(e,t){return new Xo(e,t).start()}T(pn,"jt");_(pn,"sync");var eo=class{static{T(this,"F")}static{_(this,"APIBuilder")}constructor(e,t){this.root=e,this.options=t}withPromise(){return fn(this.root,this.options)}withCallback(e){lr(this.root,this.options,e)}sync(){return pn(this.root,this.options)}};let zo=null;try{Zn.resolve("picomatch"),zo=Zn("picomatch")}catch{}var mc=class{static{T(this,"$t")}static{_(this,"Builder")}globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:Wo,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new eo(e||".",this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new eo(e||".",this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){const r=this.globFunction||zo;if(!r)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[e.join("\0")];return n||(n=r(e,...t),this.globCache[e.join("\0")]=n),this.options.filters.push(i=>n(i)),this}},vc=Object.defineProperty,ne=T((e,t)=>vc(e,"name",{value:t,configurable:!0}),"a");const wc=Array.isArray,Qo=/\\/g,Vo=process.platform==="win32",Sc=/^(\/?\.\.)+$/;function er(e,t={}){const r=e.length,n=Array(r),i=Array(r);let s,o;for(s=0;s<r;s++){const a=fr(e[s]);n[s]=a;const u=a.length,f=Array(u);for(o=0;o<u;o++)f[o]=je(a[o],t);i[s]=f}return a=>{const u=a.split("/");if(u[0]===".."&&Sc.test(a))return!0;for(s=0;s<r;s++){const f=n[s],c=i[s],p=u.length,d=Math.min(p,f.length);for(o=0;o<d;){const b=f[o];if(b.includes("/"))return!0;if(!c[o](u[o]))break;if(!t.noglobstar&&b==="**")return!0;o++}if(o===p)return!0}return!1}}T(er,"D");ne(er,"getPartialMatcher");const Ec=/^[A-Z]:\/$/i,Oc=Vo?e=>Ec.test(e):e=>e==="/";function tr(e,t,r){if(e===t||t.startsWith(`${e}/`)){if(r){const i=e.length+ +!Oc(e);return(s,o)=>s.slice(i,o?-1:void 0)||"."}const n=t.slice(e.length+1);return n?(i,s)=>{if(i===".")return n;const o=`${n}/${i}`;return s?o.slice(0,-1):o}:(i,s)=>s&&i!=="."?i.slice(0,-1):i}return r?n=>qe.relative(e,n)||".":n=>qe.relative(e,`${t}/${n}`)||"."}T(tr,"M");ne(tr,"buildFormat");function gn(e,t){if(t.startsWith(`${e}/`)){const r=t.slice(e.length+1);return n=>`${r}/${n}`}return r=>{const n=qe.relative(e,`${t}/${r}`);return r[r.length-1]==="/"&&n!==""?`${n}/`:n||"."}}T(gn,"at");ne(gn,"buildRelative");const _c={parts:!0};function fr(e){var t;const r=je.scan(e,_c);return!((t=r.parts)===null||t===void 0)&&t.length?r.parts:[e]}T(fr,"N");ne(fr,"splitPattern");const Ac=/\\(?![()[\]{}!+@])/g;function Yo(e){return Zo(e)}T(Yo,"ut");ne(Yo,"convertPosixPathToPattern");function Jo(e){return ei(e).replace(Ac,"/")}T(Jo,"ft");ne(Jo,"convertWin32PathToPattern");const xc=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,Pc=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,Zo=ne(e=>e.replace(xc,"\\$&"),"escapePosixPath"),ei=ne(e=>e.replace(Pc,"\\$&"),"escapeWin32Path"),Rc=Vo?ei:Zo;function hn(e,t){if(t?.caseSensitiveMatch===!1)return!0;const r=je.scan(e);return r.isGlob||r.negated}T(hn,"k");ne(hn,"isDynamicPattern");function Ke(...e){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...e)}T(Ke,"E");ne(Ke,"log");function pr(e){return typeof e=="string"?[e]:e??[]}T(pr,"W");ne(pr,"ensureStringArray");const Tc=/^(\/?\.\.)+/,kc=/\\(?=[()[\]{}!*+?@|])/g;function kt(e,t,r,n){var i;const s=t.cwd;let o=e;e[e.length-1]==="/"&&(o=e.slice(0,-1));const a=o.lastIndexOf("/"),u=(a===-1?o:o.slice(a+1)).startsWith("!(");o[o.length-1]!=="*"&&!u&&t.expandDirectories&&(o+="/**");const f=Rc(s);o=Iu(o.replace(kc,""))?qe.relative(f,o):qe.normalize(o);const c=(i=Tc.exec(o))===null||i===void 0?void 0:i[0],p=fr(o);if(c){const b=(c.length+1)/3;let S=0;const w=f.split("/");for(;S<b&&p[S+b]===w[w.length+S-b];)o=o.slice(0,(b-S-1)*3)+o.slice((b-S)*3+p[S+b].length+1)||".",S++;const R=qe.join(s,c.slice(S*3));R[0]!=="."&&r.root.length>R.length&&(r.root=R,r.depthOffset=-b+S)}if(!n&&r.depthOffset>=0){var d;(d=r.commonPath)!==null&&d!==void 0||(r.commonPath=p);const b=[],S=Math.min(r.commonPath.length,p.length);for(let w=0;w<S;w++){const R=p[w];if(R==="**"&&!p[w+1]){b.pop();break}if(w===p.length-1||R!==r.commonPath[w]||hn(R))break;b.push(R)}r.depthOffset=b.length,r.commonPath=b,r.root=b.length>0?qe.join(s,...b):s}return o}T(kt,"$");ne(kt,"normalizePattern");function dn(e,t,r){const n=[],i=[],s=[];for(const o of e.ignore)o&&(o[0]!=="!"||o[1]==="("?i.push(kt(o,e,r,!0)):s.push(o.slice(1)));for(const o of t)o&&(o[0]!=="!"||o[1]==="("?n.push(kt(o,e,r,!1)):(o[1]!=="!"||o[2]==="(")&&i.push(kt(o.slice(1),e,r,!0)));return{match:n,ignore:i,unignore:s}}T(dn,"St");ne(dn,"processPatterns");function yn(e,t){const r=e.cwd,n={root:r,depthOffset:0},i=dn(e,t,n);e.debug&&Ke("internal processing patterns:",i);const{absolute:s,caseSensitiveMatch:o,debug:a,dot:u,followSymbolicLinks:f,onlyDirectories:c}=e,p=n.root.replace(Qo,""),d={dot:u,nobrace:e.braceExpansion===!1,nocase:!o,noextglob:e.extglob===!1,noglobstar:e.globstar===!1,posix:!0},b=i.unignore.length>0,S=b?je(i.unignore,d):void 0,w=b?er(i.unignore,d):void 0,R=je(i.match,{...d,ignore:i.ignore,onIgnore:S?A=>S(A.output)&&je.constants.UNIGNORE:void 0}),J=je(i.ignore,d),L=er(i.match,d),U=tr(r,p,s),$=s?U:tr(r,p,!0),E=i.match.length>0&&i.match.every(A=>A==="**"||A==="**/*"),l=i.ignore.length>0||b||!E?(A,O)=>{const j=$(O,!0);return j==="."||w&&w(j)?!1:!L(j)||J(j)}:void 0;let P;e.deep!==void 0&&(P=Math.round(e.deep-n.depthOffset));const k=new mc({filters:[a?(A,O)=>{const j=U(A,O),te=R(j);return te&&Ke(`matched ${j}`),te}:(A,O)=>{const j=U(A,O);return R(j)}],exclude:a&&l?(A,O)=>{const j=l(A,O);return Ke(`${j?"skipped":"crawling"} ${O}`),j}:l,fs:e.fs,pathSeparator:"/",relativePaths:!s,resolvePaths:s,includeBasePath:s,resolveSymlinks:f,excludeSymlinks:!f,excludeFiles:c,includeDirs:c||!e.onlyFiles,maxDepth:P,signal:e.signal}).crawl(p);return e.debug&&Ke("internal properties:",{...n,root:p}),[k,r!==p&&!s&&gn(r,p)]}T(yn,"vt");ne(yn,"buildCrawler");function gr(e,t){if(t)for(let r=e.length-1;r>=0;r--)e[r]=t(e[r]);return e}T(gr,"U");ne(gr,"formatPaths");const jc={caseSensitiveMatch:!0,cwd:process.cwd(),debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function $n(e){const t={...jc,...e};return t.cwd=(t.cwd instanceof URL?Hu(t.cwd):qo(t.cwd)).replace(Qo,"/"),t.ignore=pr(t.ignore),t.fs&&(t.fs={readdir:t.fs.readdir||Bu,readdirSync:t.fs.readdirSync||Mu,realpath:t.fs.realpath||Nu,realpathSync:t.fs.realpathSync||Cu,stat:t.fs.stat||ju,statSync:t.fs.statSync||ku}),t.debug&&Ke("globbing with options:",t),t}T($n,"pt");ne($n,"getOptions");function hr(e,t={}){var r;if(e&&t?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=wc(e)||typeof e=="string",i=pr((r=n?e:e.patterns)!==null&&r!==void 0?r:"**/*"),s=$n(n?t:e);return i.length>0?yn(s,i):[]}T(hr,"G");ne(hr,"getCrawler");async function bn(e,t){const[r,n]=hr(e,t);return r?gr(await r.withPromise(),n):[]}T(bn,"bt");ne(bn,"glob");function mn(e,t){const[r,n]=hr(e,t);return r?gr(r.sync(),n):[]}T(mn,"xt");ne(mn,"globSync");var Cc=Object.defineProperty,Nc=(e,t)=>Cc(e,"name",{value:t,configurable:!0}),Mc=Object.defineProperty,Bc=Nc((e,t)=>Mc(e,"name",{value:t,configurable:!0}),"r");Bc(async(e,t)=>await bn(e,t),"glob");var Lc=Object.defineProperty,Dc=(e,t)=>Lc(e,"name",{value:t,configurable:!0}),Fc=Object.defineProperty,Ic=Dc((e,t)=>Fc(e,"name",{value:t,configurable:!0}),"n");const oh=Ic((e,t)=>mn(e,t),"globSync");var Hc=Object.defineProperty,dr=(e,t)=>Hc(e,"name",{value:t,configurable:!0}),Rr,to;function ti(){if(to)return Rr;to=1;var e=Object.defineProperty,t=dr((r,n)=>e(r,"name",{value:n,configurable:!0}),"l");/*!
|
|
5
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
8
|
+
* Licensed under the MIT License.
|
|
9
|
+
*/return Rr=t(function(r){if(typeof r!="string"||r==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(r);){if(n[2])return!0;r=r.slice(n.index+n[0].length)}return!1},"isExtglob"),Rr}dr(ti,"requireIsExtglob");var Tr,ro;function vn(){if(ro)return Tr;ro=1;var e=Object.defineProperty,t=dr((o,a)=>e(o,"name",{value:a,configurable:!0}),"x");/*!
|
|
10
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
13
|
+
* Released under the MIT License.
|
|
14
|
+
*/var r=ti(),n={"{":"}","(":")","[":"]"},i=t(function(o){if(o[0]==="!")return!0;for(var a=0,u=-2,f=-2,c=-2,p=-2,d=-2;a<o.length;){if(o[a]==="*"||o[a+1]==="?"&&/[\].+)]/.test(o[a])||f!==-1&&o[a]==="["&&o[a+1]!=="]"&&(f<a&&(f=o.indexOf("]",a)),f>a&&(d===-1||d>f||(d=o.indexOf("\\",a),d===-1||d>f)))||c!==-1&&o[a]==="{"&&o[a+1]!=="}"&&(c=o.indexOf("}",a),c>a&&(d=o.indexOf("\\",a),d===-1||d>c))||p!==-1&&o[a]==="("&&o[a+1]==="?"&&/[:!=]/.test(o[a+2])&&o[a+3]!==")"&&(p=o.indexOf(")",a),p>a&&(d=o.indexOf("\\",a),d===-1||d>p))||u!==-1&&o[a]==="("&&o[a+1]!=="|"&&(u<a&&(u=o.indexOf("|",a)),u!==-1&&o[u+1]!==")"&&(p=o.indexOf(")",u),p>u&&(d=o.indexOf("\\",u),d===-1||d>p))))return!0;if(o[a]==="\\"){var b=o[a+1];a+=2;var S=n[b];if(S){var w=o.indexOf(S,a);w!==-1&&(a=w+1)}if(o[a]==="!")return!0}else a++}return!1},"strictCheck"),s=t(function(o){if(o[0]==="!")return!0;for(var a=0;a<o.length;){if(/[*?{}()[\]]/.test(o[a]))return!0;if(o[a]==="\\"){var u=o[a+1];a+=2;var f=n[u];if(f){var c=o.indexOf(f,a);c!==-1&&(a=c+1)}if(o[a]==="!")return!0}else a++}return!1},"relaxedCheck");return Tr=t(function(o,a){if(typeof o!="string"||o==="")return!1;if(r(o))return!0;var u=i;return a&&a.strict===!1&&(u=s),u(o)},"isGlob"),Tr}dr(vn,"requireIsGlob");var Gc=Object.defineProperty,Qe=(e,t)=>Gc(e,"name",{value:t,configurable:!0});const Uc=F(import.meta.url),yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ri=Qe(e=>{if(typeof yt<"u"&&yt.versions&&yt.versions.node){const[t,r]=yt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return yt.getBuiltinModule(e)}return Uc(e)},"__cjs_getBuiltinModule"),Wc=ri("path"),qc=ri("os");var kr,no;function ni(){if(no)return kr;no=1;var e=Object.defineProperty,t=Qe((c,p)=>e(c,"name",{value:p,configurable:!0}),"n"),r=vn(),n=Wc.posix.dirname,i=qc.platform()==="win32",s="/",o=/\\/g,a=/\\([!*?|[\](){}])/g;kr=t(function(c,p){var d=Object.assign({flipBackslashes:!0},p);d.flipBackslashes&&i&&c.indexOf(s)<0&&(c=c.replace(o,s)),u(c)&&(c+=s),c+="a";do c=n(c);while(f(c));return c.replace(a,"$1")},"globParent");function u(c){var p=c.slice(-1),d;switch(p){case"}":d="{";break;case"]":d="[";break;default:return!1}var b=c.indexOf(d);return b<0?!1:c.slice(b+1,-1).includes(s)}Qe(u,"isEnclosure"),t(u,"isEnclosure");function f(c){return/\([^()]+$/.test(c)||c[0]==="{"||c[0]==="["||/[^\\][{[]/.test(c)?!0:r(c)}return Qe(f,"isGlobby"),t(f,"isGlobby"),kr}Qe(ni,"requireGlobParent");var Kc=ni();const Xc=Mt(Kc);var zc=Object.defineProperty,Qc=Qe((e,t)=>zc(e,"name",{value:t,configurable:!0}),"e");Qc((e,t)=>Xc(e,t),"globParent");var Vc=Object.defineProperty,wn=(e,t)=>Vc(e,"name",{value:t,configurable:!0});const Yc=F(import.meta.url),$t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Jc=wn(e=>{if(typeof $t<"u"&&$t.versions&&$t.versions.node){const[t,r]=$t.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return $t.getBuiltinModule(e)}return Yc(e)},"__cjs_getBuiltinModule"),{access:Zc}=Jc("node:fs/promises");var el=Object.defineProperty,tl=wn((e,t)=>el(e,"name",{value:t,configurable:!0}),"o");async function Ce(e,t=Ve){q(e),e=D(e);try{return await Zc(e,t),!0}catch{return!1}}wn(Ce,"m");tl(Ce,"isAccessible");var rl=Object.defineProperty,Sn=(e,t)=>rl(e,"name",{value:t,configurable:!0});const nl=F(import.meta.url),bt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ol=Sn(e=>{if(typeof bt<"u"&&bt.versions&&bt.versions.node){const[t,r]=bt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return bt.getBuiltinModule(e)}return nl(e)},"__cjs_getBuiltinModule"),{accessSync:il}=ol("node:fs");var sl=Object.defineProperty,al=Sn((e,t)=>sl(e,"name",{value:t,configurable:!0}),"o");function _e(e,t=Ve){q(e),e=D(e);try{return il(e,t),!0}catch{return!1}}Sn(_e,"m");al(_e,"isAccessibleSync");var ul=Object.defineProperty,cl=(e,t)=>ul(e,"name",{value:t,configurable:!0}),ll=vn();const fl=Mt(ll);var pl=Object.defineProperty,gl=cl((e,t)=>pl(e,"name",{value:t,configurable:!0}),"s");const ih=gl((e,t)=>fl(e,t),"isGlob");var hl=Object.defineProperty,dl=(e,t)=>hl(e,"name",{value:t,configurable:!0}),yl=Object.defineProperty,oi=dl((e,t)=>yl(e,"name",{value:t,configurable:!0}),"i");oi((e,t,r)=>{const n=je(t,r);return Array.isArray(e)?e.some(i=>n(i)):n(e)},"match");oi((e,t)=>{const r=je(e,t);return n=>r(n)},"matcher");var $l=Object.defineProperty,tt=(e,t)=>$l(e,"name",{value:t,configurable:!0});const bl=F(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=tt(e=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[t,r]=ze.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ze.getBuiltinModule(e)}return bl(e)},"__cjs_getBuiltinModule"),{cwd:yr}=ze,{mkdir:ml,rename:vl,copyFile:wl,unlink:Sl}=ii("node:fs/promises"),{mkdirSync:El,renameSync:Ol,copyFileSync:_l,unlinkSync:Al}=ii("node:fs");var xl=Object.defineProperty,si=tt((e,t)=>xl(e,"name",{value:t,configurable:!0}),"o");let Pl=class extends Error{static{tt(this,"a")}static{si(this,"SameDirectoryError")}constructor(t,r){super(`Source directory "${ie(t)}" does not match destination directory "${ie(r)}"`),this.name="SameDirectoryError"}};const ai=si((e,t)=>{if(!e||!t)throw new Error("Source and destination paths must not be empty");if(ie(e)!==ie(t))throw new Pl(e,t)},"validateSameDirectory");var Rl=Object.defineProperty,Tl=tt((e,t)=>Rl(e,"name",{value:t,configurable:!0}),"m$1");const ui=Tl(async(e,t,{cwd:r,directoryMode:n,overwrite:i,validateDirectory:s})=>{if(r&&(e=se(r,e),t=se(r,t)),s&&ai(e,t),!i&&await Ce(t))throw new Error(`The destination file exists: ${t}`);await ml(ie(t),{mode:n,recursive:!0});try{await vl(e,t)}catch(o){if(o.code==="EXDEV")await wl(e,t),await Sl(e);else throw o}},"internalMoveFile");var kl=Object.defineProperty,jl=tt((e,t)=>kl(e,"name",{value:t,configurable:!0}),"m");const ci=jl((e,t,{cwd:r,directoryMode:n,overwrite:i,validateDirectory:s})=>{if(r&&(e=se(r,e),t=se(r,t)),s&&ai(e,t),!i&&_e(t))throw new Error(`The destination file exists: ${t}`);El(ie(t),{mode:n,recursive:!0});try{Ol(e,t)}catch(o){if(o.code==="EXDEV")_l(e,t),Al(e);else throw o}},"internalMoveFileSync");var Cl=Object.defineProperty,$r=tt((e,t)=>Cl(e,"name",{value:t,configurable:!0}),"i");$r(async(e,t,r={})=>{const n={overwrite:!0,validateDirectory:!1,...r,cwd:r.cwd?D(r.cwd):yr()};await ui(e,t,n)},"move");$r((e,t,r)=>{const n={overwrite:!0,validateDirectory:!1,...r};n.cwd=n.cwd?D(n.cwd):yr(),ci(e,t,n)},"moveSync");$r(async(e,t,r)=>{const n={overwrite:!0,...r,validateDirectory:!0};n.cwd=n.cwd?D(n.cwd):yr(),await ui(e,t,n)},"rename");$r((e,t,r)=>{const n={overwrite:!0,...r,validateDirectory:!0};n.cwd=n.cwd?D(n.cwd):yr(),ci(e,t,n)},"renameSync");var Nl=Object.defineProperty,li=(e,t)=>Nl(e,"name",{value:t,configurable:!0}),Ml=Object.defineProperty,Bl=li((e,t)=>Ml(e,"name",{value:t,configurable:!0}),"o");let Ir=class extends Error{static{li(this,"n")}static{Bl(this,"PermissionError")}constructor(t){super(`EPERM: Operation not permitted, ${t}`)}get code(){return"EPERM"}set code(t){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(t){throw new Error("Cannot overwrite name of PermissionError")}};var Ll=Object.defineProperty,fi=(e,t)=>Ll(e,"name",{value:t,configurable:!0});const Dl=F(import.meta.url),mt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pi=fi(e=>{if(typeof mt<"u"&&mt.versions&&mt.versions.node){const[t,r]=mt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return mt.getBuiltinModule(e)}return Dl(e)},"__cjs_getBuiltinModule"),{readFile:Fl}=pi("node:fs/promises"),{unzip:Il,brotliDecompress:Hl}=pi("node:zlib");var Gl=Object.defineProperty,gi=fi((e,t)=>Gl(e,"name",{value:t,configurable:!0}),"n");const Ul={brotli:Hl,gzip:Il,none:gi((e,t)=>{t(null,e)},"none")},Wl=gi(async(e,t)=>{if(q(e),e=D(e),!await Ce(e))throw new Ir(`unable to read the non-accessible file: ${e}`);if(!await Ce(e,or))throw new Error(`Unable to read the non-readable file: ${e}`);const{buffer:r,compression:n,encoding:i,flag:s}=t??{};return await Fl(e,s?{encoding:i,flag:s}:{encoding:i}).then(async o=>await new Promise((a,u)=>{Ul[n??"none"](o,(f,c)=>{f?u(f):a(r?c:c.toString())})})).catch(o=>{throw o})},"readFile");var ql=Object.defineProperty,hi=(e,t)=>ql(e,"name",{value:t,configurable:!0});const Kl=F(import.meta.url),vt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,di=hi(e=>{if(typeof vt<"u"&&vt.versions&&vt.versions.node){const[t,r]=vt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return vt.getBuiltinModule(e)}return Kl(e)},"__cjs_getBuiltinModule"),{readFileSync:Xl}=di("node:fs"),{unzipSync:zl,brotliDecompressSync:Ql}=di("node:zlib");var Vl=Object.defineProperty,yi=hi((e,t)=>Vl(e,"name",{value:t,configurable:!0}),"r");const Yl={brotli:Ql,gzip:zl,none:yi(e=>e,"none")},Jl=yi((e,t)=>{if(q(e),e=D(e),!_e(e))throw new Ir(`unable to read the non-accessible file: ${e}`);if(!_e(e,or))throw new Ir(`invalid access to read file at: ${e}`);const{buffer:r,compression:n,encoding:i,flag:s}=t??{},o=Xl(e,s?{encoding:i,flag:s}:{encoding:i}),a=Yl[n??"none"],u=a(o);return r?u:u.toString()},"readFileSync");var Zl=Object.defineProperty,$i=(e,t)=>Zl(e,"name",{value:t,configurable:!0}),ef=Object.defineProperty,tf=$i((e,t)=>ef(e,"name",{value:t,configurable:!0}),"A"),rf=Object.defineProperty,En=tf((e,t)=>rf(e,"name",{value:t,configurable:!0}),"$"),nf=Object.defineProperty,of=En((e,t)=>nf(e,"name",{value:t,configurable:!0}),"r$1");const sf=of(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
15
|
+
`),"normalizeLF"),af=globalThis.process??Object.create(null),oo={versions:{}},io=new Proxy(af,{get(e,t){if(t in e)return e[t];if(t in oo)return oo[t]}});var uf=Object.defineProperty,cf=En((e,t)=>uf(e,"name",{value:t,configurable:!0}),"b");const lf=cf((e,t,r,n)=>{const i={column:0,line:-1,...e.start},s={...i,...e.end},o=i.line,a=i.column,u=s.line,f=s.column;let c=Math.max(o-(r+1),0),p=Math.min(t.length,u+n);o===-1&&(c=0),u===-1&&(p=t.length);const d=u-o,b={};if(d)for(let S=0;S<=d;S++){const w=S+o;if(!a)b[w]=!0;else if(S===0){const R=t[w-1]?.length;b[w]=[a,(R??0)-a+1]}else if(S===d)b[w]=[0,f];else{const R=t[w-S]?.length;b[w]=[0,R]}}else a===f?b[o]=a?[a,0]:!0:b[o]=[a,(f??0)-(a??0)];return{end:p,markerLines:b,start:c}},"getMarkerLines");var ff=Object.defineProperty,Xt=En((e,t)=>ff(e,"name",{value:t,configurable:!0}),"t");const pf=io.platform==="win32"&&!io.env?.WT_SESSION?">":"❯",gf=Xt((e,t,r)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:Xt(S=>S,"gutter"),marker:Xt(S=>S,"marker"),message:Xt(S=>S,"message"),...r?.color}},i=typeof t.start.column=="number";let s=sf(e).split(`
|
|
16
|
+
`);typeof n.tabWidth=="number"&&(s=s.map(S=>S.replaceAll(" "," ".repeat(n.tabWidth))));const{end:o,markerLines:a,start:u}=lf(t,s,n.linesAbove,n.linesBelow),f=String(o).length,{gutter:c,marker:p,message:d}=n.color;let b=s.slice(u,o).map((S,w)=>{const R=u+1+w,J=a[R],L=` ${String(R)}`.slice(-f),U=!a[R+1],$=` ${L}${n.showGutter?" |":""}`;if(J){let E="";if(Array.isArray(J)){const l=S.replaceAll(/[^\t]/g," ").slice(0,Math.max(J[0]-1,0)),P=J[1]||1;E=[`
|
|
17
|
+
`,n.prefix+c($.replaceAll(/\d/g," "))," ",l,p("^").repeat(P)].join(""),U&&n.message&&(E+=` ${d(n.message)}`)}return[n.prefix+p(pf),c($),S.length>0?` ${S}`:"",E].join("")}return`${n.prefix} ${c($)}${S.length>0?` ${S}`:""}`}).join(`
|
|
18
|
+
`);return n.message&&!i&&(b=`${n.prefix+" ".repeat(f+1)+n.message}
|
|
19
|
+
${b}`),b},"codeFrame");var hf=Object.defineProperty,df=$i((e,t)=>hf(e,"name",{value:t,configurable:!0}),"s"),yf=Object.defineProperty,$f=df((e,t)=>yf(e,"name",{value:t,configurable:!0}),"o"),bf=Object.defineProperty,On=$f((e,t)=>bf(e,"name",{value:t,configurable:!0}),"l");const so=On((e,t)=>{let r=0,n=t.length-2;for(;r<n;){const i=r+(n-r>>1);if(e<t[i])n=i-1;else if(e>=t[i+1])r=i+1;else{r=i;break}}return r},"binarySearch"),mf=/\n|\r(?!\n)/,vf=On(e=>e.split(mf).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),wf=On((e,t,r)=>{const n=r?.skipChecks??!1;if(!n&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!n&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const s=vf(e),o=so(t,s);return{column:t-s[o]+1,line:o+1}}const i=so(t,e);return{column:t-e[i]+1,line:i+1}},"indexToLineColumn");var Sf=Object.defineProperty,bi=(e,t)=>Sf(e,"name",{value:t,configurable:!0}),Ef=Object.defineProperty,Of=bi((e,t)=>Ef(e,"name",{value:t,configurable:!0}),"i");let _f=class extends Error{static{bi(this,"t")}static{Of(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
|
|
20
|
+
|
|
21
|
+
${this.codeFrame}
|
|
22
|
+
`:""}`}set message(t){this.#e=t}};var Af=Object.defineProperty,mi=(e,t)=>Af(e,"name",{value:t,configurable:!0}),xf=Object.defineProperty,Ft=mi((e,t)=>xf(e,"name",{value:t,configurable:!0}),"a");const Pf=Ft(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Rf=Ft((e,t,r)=>gf(e,{start:t},{tabWidth:!1,...r}),"generateCodeFrame"),Tf=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,kf=Ft((e,t)=>{const r=Tf.exec(t);if(!r)return;const[,n,i,s]=r;if(i&&s)return{column:Number(s),line:Number(i)};let o=Number(n);return o===e.length&&(o=e.length-1),wf(e,o)},"getErrorLocation"),jf=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Cf=Ft(e=>e.replace(jf,(t,r,n)=>`"${n}"(${Pf(n)})`),"addCodePointToUnexpectedToken");function br(e,t,r,n){typeof t=="string"&&(typeof r=="object"&&(n=r),r=t,t=void 0);let i;try{return JSON.parse(e,t)}catch(a){i=a.message}let s;e?(s=kf(e,i),i=Cf(i)):i+=" while parsing empty string";const o=new _f(i);throw o.fileName=r,s&&(o.codeFrame=Rf(e,s,n)),o}mi(br,"E");Ft(br,"parseJson");var Nf=Object.defineProperty,vi=(e,t)=>Nf(e,"name",{value:t,configurable:!0}),Mf=Object.defineProperty,Bf=vi((e,t)=>Mf(e,"name",{value:t,configurable:!0}),"i");async function wi(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=await Wl(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:s,color:o}=r??{};return typeof s=="function"&&(i=s(i)),br(i,t,D(e),{color:o})}vi(wi,"c");Bf(wi,"readJson");var Lf=Object.defineProperty,Si=(e,t)=>Lf(e,"name",{value:t,configurable:!0}),Df=Object.defineProperty,Ff=Si((e,t)=>Df(e,"name",{value:t,configurable:!0}),"r");function _n(e,t,r){typeof t=="object"&&(r=t,t=void 0);const n=Jl(e,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(n);const{beforeParse:s,color:o}=r??{};return typeof s=="function"&&(i=s(i)),br(i,t,D(e),{color:o})}Si(_n,"J");Ff(_n,"readJsonSync");var If=Object.defineProperty,Hf=(e,t)=>If(e,"name",{value:t,configurable:!0}),Gf=Object.defineProperty,Uf=Hf((e,t)=>Gf(e,"name",{value:t,configurable:!0}),"t");const mr=Uf(e=>{const t={force:!0,recursive:!0};return e?.maxRetries!==void 0&&(t.maxRetries=e.maxRetries),e?.retryDelay!==void 0&&(t.retryDelay=e.retryDelay),t},"buildRmOptions");var Wf=Object.defineProperty,Ei=(e,t)=>Wf(e,"name",{value:t,configurable:!0});const qf=F(import.meta.url),wt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Oi=Ei(e=>{if(typeof wt<"u"&&wt.versions&&wt.versions.node){const[t,r]=wt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return wt.getBuiltinModule(e)}return qf(e)},"__cjs_getBuiltinModule"),{existsSync:Kf}=Oi("node:fs"),{mkdir:Xf,readdir:zf,rm:Qf}=Oi("node:fs/promises");var Vf=Object.defineProperty,Yf=Ei((e,t)=>Vf(e,"name",{value:t,configurable:!0}),"o");const ch=Yf(async(e,t)=>{if(q(e),!Kf(e)){await Xf(e,{recursive:!0});return}const r=await zf(e),n=mr(t);for(const i of r)await Qf(Nt(D(e),i),n)},"emptyDir");var Jf=Object.defineProperty,_i=(e,t)=>Jf(e,"name",{value:t,configurable:!0});const Zf=F(import.meta.url),St=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ep=_i(e=>{if(typeof St<"u"&&St.versions&&St.versions.node){const[t,r]=St.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return St.getBuiltinModule(e)}return Zf(e)},"__cjs_getBuiltinModule"),{existsSync:tp,mkdirSync:rp,readdirSync:np,rmSync:op}=ep("node:fs");var ip=Object.defineProperty,sp=_i((e,t)=>ip(e,"name",{value:t,configurable:!0}),"o");sp((e,t)=>{if(q(e),!tp(e)){rp(e,{recursive:!0});return}const r=mr(t);for(const n of np(e))op(Nt(D(e),n),r)},"emptyDirSync");var ap=Object.defineProperty,Ai=(e,t)=>ap(e,"name",{value:t,configurable:!0});const up=F(import.meta.url),Et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,cp=Ai(e=>{if(typeof Et<"u"&&Et.versions&&Et.versions.node){const[t,r]=Et.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Et.getBuiltinModule(e)}return up(e)},"__cjs_getBuiltinModule"),{unlink:lp,rm:fp}=cp("node:fs/promises");var pp=Object.defineProperty,gp=Ai((e,t)=>pp(e,"name",{value:t,configurable:!0}),"i");gp(async(e,t={})=>{q(e);try{await lp(e)}catch{}try{await fp(e,mr(t))}catch{}},"remove");var hp=Object.defineProperty,xi=(e,t)=>hp(e,"name",{value:t,configurable:!0});const dp=F(import.meta.url),Ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yp=xi(e=>{if(typeof Ot<"u"&&Ot.versions&&Ot.versions.node){const[t,r]=Ot.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Ot.getBuiltinModule(e)}return dp(e)},"__cjs_getBuiltinModule"),{unlinkSync:$p,rmSync:bp}=yp("node:fs");var mp=Object.defineProperty,vp=xi((e,t)=>mp(e,"name",{value:t,configurable:!0}),"o");vp((e,t={})=>{q(e);try{$p(e)}catch{}try{bp(e,mr(t))}catch{}},"removeSync");var wp=Object.defineProperty,Sp=(e,t)=>wp(e,"name",{value:t,configurable:!0});F(import.meta.url);const Ep=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,{platform:Op}=Ep;var _p=Object.defineProperty,Ie=Sp((e,t)=>_p(e,"name",{value:t,configurable:!0}),"l");const We="unnamed",Ap=128,ao={'"':"ˮ","*":"⁎","/":"⁄",":":"꞉","<":"‹",">":"›","?":"ʔ","\\":"∖","|":"ǀ"},xp=/[\u0000-\u001F\u0080-\u009F]/g,Pp=/^(?:\.+[/\\]+)+|^\.+$/g,Hr=/^(?:con|prn|aux|nul|com\d|lpt\d)$/i,Rp=/[<>:"/\\|?*]/g,Tp=/\//g,Ct=new Set([" "," ","."]),It=Ie((e,t)=>t>0&&t<e.length-1,"hasExtension"),kp=Ie((e,t)=>{const r=e.lastIndexOf(".");if(!It(e,r))return e.slice(0,t);const n=e.slice(0,r),i=e.slice(r),s=t-i.length;return s>0?`${n.slice(0,s)}${i}`:e.slice(0,t)},"truncateWithExtension"),uo=Ie(e=>{let t=0,r=e.length;for(;t<r;){const n=e[t];if(n===void 0||!Ct.has(n))break;t+=1}for(;r>t;){const n=e[r-1];if(n===void 0||!Ct.has(n))break;r-=1}return e.slice(t,r)},"trimSpacesAndPeriods"),jp=Ie(e=>{const t=e.lastIndexOf(".");if(It(e,t)){const n=e.slice(0,t),i=e.slice(t);let s=n;for(;s.length>0;){const o=s.at(-1);if(o===void 0||!Ct.has(o))break;s=s.slice(0,-1)}return s.length===0?i.slice(1):`${s}${i}`}let r=e;for(;r.length>0;){const n=r.at(-1);if(n===void 0||!Ct.has(n))break;r=r.slice(0,-1)}return r},"cleanWindowsName"),Cp=Ie(e=>{const t=e.lastIndexOf(".");if(It(e,t))return!1;if(Hr.test(e))return!0;let r=e;for(;r.length>0;){const n=r.at(-1);if(n===void 0||!Ct.has(n))break;r=r.slice(0,-1)}return!!(r.length>0&&Hr.test(r))},"isWindowsReservedName"),Np=Ie(e=>{const t=e.lastIndexOf(".");if(It(e,t)){const i=e.slice(0,t),s=e.slice(t),o=uo(i);return o.length===0?void 0:`${o}${s}`}const r=e.trim();if(r.length>0&&r[0]==="."&&r.length<=5&&r.indexOf(".",1)===-1)return;const n=uo(e);if(n.length!==0)return n},"cleanFat32Name"),Mp=Ie(e=>{const t=e?.filesystem??"auto";return t==="auto"?Op==="win32"?"win32":"unix":t==="darwin"?"unix":t},"getFileSystemType");Ie((e,t)=>{if(typeof e!="string"||e.length===0)return We;const r=Mp(t);let n=e;if(n=n.replace(xp,""),n.length===0||(n=n.replace(Pp,""),n.length===0))return We;if(r==="win32"||r==="fat32"){const s=n.lastIndexOf(".");if(!It(n,s)&&Hr.test(n))return We}if(n=r==="win32"||r==="fat32"?n.replaceAll(Rp,s=>ao[s]??""):n.replaceAll(Tp,ao["/"]),n=n.trim(),(r==="win32"||r==="fat32")&&(Cp(n)||r==="win32"&&(n=jp(n),n.length===0)))return We;if(r==="fat32"){const s=Np(n);if(s===void 0)return We;n=s}if(n.length===0)return We;const i=t?.maxLength??Ap;return n.length>i&&(n=kp(n,i),n.length===0)?We:n},"sanitize");var Bp=Object.defineProperty,Lp=(e,t)=>Bp(e,"name",{value:t,configurable:!0}),Dp=Object.defineProperty,Fp=Lp((e,t)=>Dp(e,"name",{value:t,configurable:!0}),"e");const Pi=Fp(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var Ip=Object.defineProperty,Hp=(e,t)=>Ip(e,"name",{value:t,configurable:!0}),Gp=Object.defineProperty,Up=Hp((e,t)=>Gp(e,"name",{value:t,configurable:!0}),"f");const Wp=new TextEncoder,Ri=Up(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return Wp.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");var qp=Object.defineProperty,Ti=(e,t)=>qp(e,"name",{value:t,configurable:!0});const Kp=F(import.meta.url),_t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xp=Ti(e=>{if(typeof _t<"u"&&_t.versions&&_t.versions.node){const[t,r]=_t.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return _t.getBuiltinModule(e)}return Kp(e)},"__cjs_getBuiltinModule"),{mkdir:zp,writeFile:Qp,stat:Vp,rename:co,chown:Yp,chmod:Jp,unlink:Zp}=Xp("node:fs/promises");var eg=Object.defineProperty,tg=Ti((e,t)=>eg(e,"name",{value:t,configurable:!0}),"d");const rg=tg(async(e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},q(e),Pi(t),e=D(e);const n=`${e}.tmp`;try{const i=await Ce(e,Ve);if(!i&&r.recursive){const o=ie(e);await Ce(o,Ve)||await zp(o,{recursive:!0})}let s;if(await Qp(n,Ri(t),{encoding:r.encoding,flag:r.flag}),i&&!r.overwrite&&(s=await Vp(e),r.chown??={gid:s.gid,uid:s.uid},await co(e,`${e}.bak`)),r.chown)try{await Yp(n,r.chown.uid,r.chown.gid)}catch{}await Jp(n,s&&!r.mode?s.mode:r.mode??438),await co(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{await Ce(n)&&await Zp(`${e}.tmp`)}},"writeFile");var ng=Object.defineProperty,ki=(e,t)=>ng(e,"name",{value:t,configurable:!0});const og=F(import.meta.url),At=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ig=ki(e=>{if(typeof At<"u"&&At.versions&&At.versions.node){const[t,r]=At.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return At.getBuiltinModule(e)}return og(e)},"__cjs_getBuiltinModule"),{mkdirSync:sg,writeFileSync:ag,statSync:ug,renameSync:lo,chownSync:cg,chmodSync:lg,unlinkSync:fg}=ig("node:fs");var pg=Object.defineProperty,gg=ki((e,t)=>pg(e,"name",{value:t,configurable:!0}),"f");const hg=gg((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},q(e),Pi(t),e=D(e);const n=`${e}.tmp`;try{const i=_e(e,Ve);if(!i&&r.recursive){const o=ie(e);_e(o,Ve)||sg(o,{recursive:!0})}let s;if(ag(n,Ri(t),{encoding:r.encoding,flag:r.flag}),i&&!r.overwrite&&(s=ug(e),r.chown??={gid:s.gid,uid:s.uid},lo(e,`${e}.bak`)),r.chown)try{cg(n,r.chown.uid,r.chown.gid)}catch{}lg(n,s&&!r.mode?s.mode:r.mode??438),lo(n,e)}catch(i){throw new Error(`Failed to write file at: ${e} - ${i.message}`,{cause:i})}finally{_e(n)&&fg(`${e}.tmp`)}},"writeFileSync");var dg=Object.defineProperty,He=(e,t)=>dg(e,"name",{value:t,configurable:!0}),yg=Object.defineProperty,Xe=He((e,t)=>yg(e,"name",{value:t,configurable:!0}),"i");const $g=/^(?:( )+|\t+)/,Ht="space";function rr(e,t,r){return e&&t===Ht&&r===1}He(rr,"I");Xe(rr,"shouldIgnoreSingleSpace");function nr(e,t){const r=new Map;let n=0,i,s;for(const o of e.split(/\n/g)){if(!o)continue;const a=o.match($g);if(a===null)n=0,i="";else{const u=a[0].length,f=a[1]?Ht:"tab";if(rr(t,f,u))continue;f!==i&&(n=0),i=f;let c=1,p=0;const d=u-n;if(n=u,d===0)c=0,p=1;else{const S=Math.abs(d);if(rr(t,f,S))continue;s=An(f,S)}const b=r.get(s);r.set(s,b===void 0?[1,0]:[b[0]+c,b[1]+p])}}return r}He(nr,"h");Xe(nr,"makeIndentsMap");function An(e,t){return(e===Ht?"s":"t")+String(t)}He(An,"m");Xe(An,"encodeIndentsKey");function xn(e){const t=e[0]==="s"?Ht:"tab",r=Number(e.slice(1));return{type:t,amount:r}}He(xn,"_");Xe(xn,"decodeIndentsKey");function Pn(e){let t,r=0,n=0;for(const[i,[s,o]]of e)(s>r||s===r&&o>n)&&(r=s,n=o,t=i);return t}He(Pn,"k");Xe(Pn,"getMostUsedKey");function Rn(e,t){return(e===Ht?" ":" ").repeat(t)}He(Rn,"D");Xe(Rn,"makeIndentString");function vr(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=nr(e,!0);t.size===0&&(t=nr(e,!1));const r=Pn(t);let n,i=0,s="";return r!==void 0&&({type:n,amount:i}=xn(r),s=Rn(n,i)),{amount:i,type:n,indent:s}}He(vr,"C");Xe(vr,"detectIndent");var bg=Object.defineProperty,ji=(e,t)=>bg(e,"name",{value:t,configurable:!0});const mg=F(import.meta.url),xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vg=ji(e=>{if(typeof xt<"u"&&xt.versions&&xt.versions.node){const[t,r]=xt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return xt.getBuiltinModule(e)}return mg(e)},"__cjs_getBuiltinModule"),{readFile:wg}=vg("node:fs/promises");var Sg=Object.defineProperty,Eg=ji((e,t)=>Sg(e,"name",{value:t,configurable:!0}),"r");const lh=Eg(async(e,t,r={})=>{const{detectIndent:n,indent:i,replacer:s,stringify:o=JSON.stringify,...a}={indent:" ",...r};let u=i,f=`
|
|
23
|
+
`;if(await Ce(e,or))try{const p=await wg(e,"utf8");if(n){const{indent:d}=vr(p);u=d}f=p.endsWith(`
|
|
24
|
+
`)?`
|
|
25
|
+
`:""}catch(p){if(p.code!=="ENOENT")throw p}const c=o(t,s,u);await rg(e,`${c}${f}`,a)},"writeJson");var Og=Object.defineProperty,Ci=(e,t)=>Og(e,"name",{value:t,configurable:!0});const _g=F(import.meta.url),Pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ag=Ci(e=>{if(typeof Pt<"u"&&Pt.versions&&Pt.versions.node){const[t,r]=Pt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Pt.getBuiltinModule(e)}return _g(e)},"__cjs_getBuiltinModule"),{readFileSync:xg}=Ag("node:fs");var Pg=Object.defineProperty,Rg=Ci((e,t)=>Pg(e,"name",{value:t,configurable:!0}),"r");const Tg=Rg((e,t,r={})=>{const{detectIndent:n,indent:i,replacer:s,stringify:o=JSON.stringify,...a}={indent:" ",...r};let u=i,f=`
|
|
26
|
+
`;if(_e(e,or))try{const p=xg(e,"utf8");if(n){const{indent:d}=vr(p);u=d}f=p.endsWith(`
|
|
27
|
+
`)?`
|
|
28
|
+
`:""}catch(p){if(p.code!=="ENOENT")throw p}const c=o(t,s,u);hg(e,`${c}${f}`,a)},"writeJsonSync");var kg=Object.defineProperty,Ni=(e,t)=>kg(e,"name",{value:t,configurable:!0});const jg=F(import.meta.url),Rt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tn=Ni(e=>{if(typeof Rt<"u"&&Rt.versions&&Rt.versions.node){const[t,r]=Rt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return Rt.getBuiltinModule(e)}return jg(e)},"__cjs_getBuiltinModule"),Cg=Tn("fs"),Ng=Tn("os"),Mg=Tn("path");var Bg=Object.defineProperty,Lg=Ni((e,t)=>Bg(e,"name",{value:t,configurable:!0}),"a"),Dg=Object.defineProperty,wr=Lg((e,t)=>Dg(e,"name",{value:t,configurable:!0}),"s");const Mi=wr(e=>{let t="";for(let r=0;r<e.length;r+=1){const n=e[r],i=n.toUpperCase();t+=n===i?n.toLowerCase():i}return t},"invertCase"),jr=new Map,fo=wr((e,t)=>{const r=Mg.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(r,""),!t.existsSync(Mi(r))}finally{try{t.unlinkSync(r)}catch{}}},"checkDirectoryCaseWithWrite"),Fg=wr((e,t,r)=>{try{return fo(e,r)}catch(n){if(t===void 0)return fo(Ng.tmpdir(),r);throw n}},"checkDirectoryCaseWithFallback");wr((e,t=Cg,r=!0)=>{const n=e??process.cwd();if(r&&jr.has(n))return jr.get(n);let i;const s=Mi(n);return s!==n&&t.existsSync(n)?i=!t.existsSync(s):i=Fg(n,e,t),r&&jr.set(n,i),i},"isFsCaseSensitive");const fh=(e,t,r,n)=>{try{let i={};const s=Nt(t,"keystore.json");_e(s)&&(i=_n(s)),Object.hasOwn(i,e)||(i[e]=new Date().toISOString()),Tg(s,i,{overwrite:!0})}catch(i){r.debug({context:[i],message:i instanceof Error?i.message:String(i),prefix:"cache-key-store"})}};export{qg as E,nh as F,Gg as H,Xg as I,lh as J,zg as K,rh as N,Jl as P,Tg as S,hg as T,ch as _,Wl as a,rg as b,_n as c,Ce as d,Kg as e,fh as f,xe as g,Qg as h,th as i,Ug as j,Yg as k,oh as l,ih as m,Vg as n,Jg as o,ir as p,Wg as q,qr as r,_e as s,wi as t,br as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s,t as a}from"./oxcTransformPlugin-Dwvbw2jE-BsmmBg7q.js";export{s as oxcResolvePlugin,a as oxcTransformPlugin};
|