'use strict';

!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6e48b08e-1eb9-5ea6-8b59-418adcdd0872")}catch(e){}}();

var chunk3CHCQNH4_js = require('./chunk-3CHCQNH4.js');
var chunkTKGT252T_js = require('./chunk-TKGT252T.js');
var ge = require('path');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var ge__default = /*#__PURE__*/_interopDefault(ge);

var le=chunkTKGT252T_js.c((fr,Ke)=>{var yt=chunkTKGT252T_js.a("path"),ee="\\\\/",je=`[^${ee}]`,te="\\.",At="\\+",Rt="\\?",$e="\\/",St="(?=.)",Ue="[^/]",_e=`(?:${$e}|$)`,qe=`(?:^|${$e})`,xe=`${te}{1,2}${_e}`,Et=`(?!${te})`,Ct=`(?!${qe}${xe})`,_t=`(?!${te}{0,1}${_e})`,xt=`(?!${xe})`,kt=`[^.${$e}]`,vt=`${Ue}*?`,ze={DOT_LITERAL:te,PLUS_LITERAL:At,QMARK_LITERAL:Rt,SLASH_LITERAL:$e,ONE_CHAR:St,QMARK:Ue,END_ANCHOR:_e,DOTS_SLASH:xe,NO_DOT:Et,NO_DOTS:Ct,NO_DOT_SLASH:_t,NO_DOTS_SLASH:xt,QMARK_NO_DOT:kt,STAR:vt,START_ANCHOR:qe},wt={...ze,SLASH_LITERAL:`[${ee}]`,QMARK:je,STAR:`${je}*?`,DOTS_SLASH:`${te}{1,2}(?:[${ee}]|$)`,NO_DOT:`(?!${te})`,NO_DOTS:`(?!(?:^|[${ee}])${te}{1,2}(?:[${ee}]|$))`,NO_DOT_SLASH:`(?!${te}{0,1}(?:[${ee}]|$))`,NO_DOTS_SLASH:`(?!${te}{1,2}(?:[${ee}]|$))`,QMARK_NO_DOT:`[^.${ee}]`,START_ANCHOR:`(?:^|[${ee}])`,END_ANCHOR:`(?:[${ee}]|$)`},Tt={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"};Ke.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Tt,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:yt.sep,extglobChars(e){return {"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?wt:ze}};});var ye=chunkTKGT252T_js.c(Z=>{var Ht=chunkTKGT252T_js.a("path"),Lt=process.platform==="win32",{REGEX_BACKSLASH:Ot,REGEX_REMOVE_BACKSLASH:Nt,REGEX_SPECIAL_CHARS:Mt,REGEX_SPECIAL_CHARS_GLOBAL:Ft}=le();Z.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);Z.hasRegexChars=e=>Mt.test(e);Z.isRegexChar=e=>e.length===1&&Z.hasRegexChars(e);Z.escapeRegex=e=>e.replace(Ft,"\\$1");Z.toPosixSlashes=e=>e.replace(Ot,"/");Z.removeBackslashes=e=>e.replace(Nt,r=>r==="\\"?"":r);Z.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};Z.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:Lt===!0||Ht.sep==="\\";Z.escapeLast=(e,r,t)=>{let d=e.lastIndexOf(r,t);return d===-1?e:e[d-1]==="\\"?Z.escapeLast(e,r,d-1):`${e.slice(0,d)}\\${e.slice(d)}`};Z.removePrefix=(e,r={})=>{let t=e;return t.startsWith("./")&&(t=t.slice(2),r.prefix="./"),t};Z.wrapOutput=(e,r={},t={})=>{let d=t.contains?"":"^",l=t.contains?"":"$",m=`${d}(?:${e})${l}`;return r.negated===!0&&(m=`(?:^(?!${m}).*$)`),m};});var tt=chunkTKGT252T_js.c((hr,et)=>{var We=ye(),{CHAR_ASTERISK:ke,CHAR_AT:Dt,CHAR_BACKWARD_SLASH:pe,CHAR_COMMA:Pt,CHAR_DOT:ve,CHAR_EXCLAMATION_MARK:Xe,CHAR_FORWARD_SLASH:Je,CHAR_LEFT_CURLY_BRACE:we,CHAR_LEFT_PARENTHESES:Te,CHAR_LEFT_SQUARE_BRACKET:It,CHAR_PLUS:Bt,CHAR_QUESTION_MARK:Qe,CHAR_RIGHT_CURLY_BRACE:Gt,CHAR_RIGHT_PARENTHESES:Ze,CHAR_RIGHT_SQUARE_BRACKET:jt}=le(),Ye=e=>e===Je||e===pe,Ve=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1);},Ut=(e,r)=>{let t=r||{},d=e.length-1,l=t.parts===!0||t.scanToEnd===!0,m=[],h=[],$=[],b=e,T=-1,S=0,M=0,R=!1,c=!1,i=!1,A=!1,L=!1,w=!1,O=!1,k=!1,N=!1,F=0,B,f,y={value:"",depth:0,isGlob:!1},H=()=>T>=d,D=()=>b.charCodeAt(T+1),o=()=>(B=f,b.charCodeAt(++T));for(;T<d;){f=o();let s;if(f===pe){O=y.backslashes=!0,f=o(),f===we&&(w=!0);continue}if(w===!0||f===we){for(F++;H()!==!0&&(f=o());){if(f===pe){O=y.backslashes=!0,o();continue}if(f===we){F++;continue}if(w!==!0&&f===ve&&(f=o())===ve){if(R=y.isBrace=!0,i=y.isGlob=!0,N=!0,l===!0)continue;break}if(w!==!0&&f===Pt){if(R=y.isBrace=!0,i=y.isGlob=!0,N=!0,l===!0)continue;break}if(f===Gt&&(F--,F===0)){w=!1,R=y.isBrace=!0,N=!0;break}}if(l===!0)continue;break}if(f===Je){if(m.push(T),h.push(y),y={value:"",depth:0,isGlob:!1},N===!0)continue;if(B===ve&&T===S+1){S+=2;continue}M=T+1;continue}if(t.noext!==!0&&(f===Bt||f===Dt||f===ke||f===Qe||f===Xe)===!0&&D()===Te){if(i=y.isGlob=!0,A=y.isExtglob=!0,N=!0,l===!0){for(;H()!==!0&&(f=o());){if(f===pe){O=y.backslashes=!0,f=o();continue}if(f===Ze){i=y.isGlob=!0,N=!0;break}}continue}break}if(f===ke){if(B===ke&&(L=y.isGlobstar=!0),i=y.isGlob=!0,N=!0,l===!0)continue;break}if(f===Qe){if(i=y.isGlob=!0,N=!0,l===!0)continue;break}if(f===It)for(;H()!==!0&&(s=o());){if(s===pe){O=y.backslashes=!0,o();continue}if(s===jt){if(c=y.isBracket=!0,i=y.isGlob=!0,N=!0,l===!0)continue;break}}if(t.nonegate!==!0&&f===Xe&&T===S){k=y.negated=!0,S++;continue}if(t.noparen!==!0&&f===Te){if(i=y.isGlob=!0,l===!0){for(;H()!==!0&&(f=o());){if(f===Te){O=y.backslashes=!0,f=o();continue}if(f===Ze){N=!0;break}}continue}break}if(i===!0){if(N=!0,l===!0)continue;break}}t.noext===!0&&(A=!1,i=!1);let C=b,z="",K="";S>0&&(z=b.slice(0,S),b=b.slice(S),M-=S),C&&i===!0&&M>0?(C=b.slice(0,M),K=b.slice(M)):i===!0?(C="",K=b):C=b,C&&C!==""&&C!=="/"&&C!==b&&Ye(C.charCodeAt(C.length-1))&&(C=C.slice(0,-1)),t.unescape===!0&&(K&&(K=We.removeBackslashes(K)),C&&O===!0&&(C=We.removeBackslashes(C)));let n={prefix:z,input:e,start:S,base:C,glob:K,isBrace:R,isBracket:c,isGlob:i,isExtglob:A,isGlobstar:L,negated:k};if(t.tokens===!0&&(n.maxDepth=0,Ye(f)||h.push(y),n.tokens=h),t.parts===!0||t.tokens===!0){let s;for(let P=0;P<m.length;P++){let I=s?s+1:S,X=m[P],Q=e.slice(I,X);t.tokens&&(P===0&&S!==0?(h[P].isPrefix=!0,h[P].value=z):h[P].value=Q,Ve(h[P]),n.maxDepth+=h[P].depth),(P!==0||Q!=="")&&$.push(Q),s=X;}if(s&&s+1<e.length){let P=e.slice(s+1);$.push(P),t.tokens&&(h[h.length-1].value=P,Ve(h[h.length-1]),n.maxDepth+=h[h.length-1].depth);}n.slashes=m,n.parts=$;}return n};et.exports=Ut;});var nt=chunkTKGT252T_js.c((gr,st)=>{var Ae=le(),Y=ye(),{MAX_LENGTH:Re,POSIX_REGEX_SOURCE:qt,REGEX_NON_SPECIAL_CHARS:zt,REGEX_SPECIAL_CHARS_BACKREF:Kt,REPLACEMENTS:rt}=Ae,Wt=(e,r)=>{if(typeof r.expandRange=="function")return r.expandRange(...e,r);e.sort();let t=`[${e.join("-")}]`;try{new RegExp(t);}catch{return e.map(l=>Y.escapeRegex(l)).join("..")}return t},ie=(e,r)=>`Missing ${e}: "${r}" - use "\\\\${r}" to match literal characters`,ot=(e,r)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=rt[e]||e;let t={...r},d=typeof t.maxLength=="number"?Math.min(Re,t.maxLength):Re,l=e.length;if(l>d)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${d}`);let m={type:"bos",value:"",output:t.prepend||""},h=[m],$=t.capture?"":"?:",b=Y.isWindows(r),T=Ae.globChars(b),S=Ae.extglobChars(T),{DOT_LITERAL:M,PLUS_LITERAL:R,SLASH_LITERAL:c,ONE_CHAR:i,DOTS_SLASH:A,NO_DOT:L,NO_DOT_SLASH:w,NO_DOTS_SLASH:O,QMARK:k,QMARK_NO_DOT:N,STAR:F,START_ANCHOR:B}=T,f=u=>`(${$}(?:(?!${B}${u.dot?A:M}).)*?)`,y=t.dot?"":L,H=t.dot?k:N,D=t.bash===!0?f(t):F;t.capture&&(D=`(${D})`),typeof t.noext=="boolean"&&(t.noextglob=t.noext);let o={input:e,index:-1,start:0,dot:t.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=Y.removePrefix(e,o),l=e.length;let C=[],z=[],K=[],n=m,s,P=()=>o.index===l-1,I=o.peek=(u=1)=>e[o.index+u],X=o.advance=()=>e[++o.index],Q=()=>e.slice(o.index+1),V=(u="",_=0)=>{o.consumed+=u,o.index+=_;},oe=u=>{o.output+=u.output!=null?u.output:u.value,V(u.value);},p=()=>{let u=1;for(;I()==="!"&&(I(2)!=="("||I(3)==="?");)X(),o.start++,u++;return u%2===0?!1:(o.negated=!0,o.start++,!0)},v=u=>{o[u]++,K.push(u);},E=u=>{o[u]--,K.pop();},g=u=>{if(n.type==="globstar"){let _=o.braces>0&&(u.type==="comma"||u.type==="brace"),a=u.extglob===!0||C.length&&(u.type==="pipe"||u.type==="paren");u.type!=="slash"&&u.type!=="paren"&&!_&&!a&&(o.output=o.output.slice(0,-n.output.length),n.type="star",n.value="*",n.output=D,o.output+=n.output);}if(C.length&&u.type!=="paren"&&!S[u.value]&&(C[C.length-1].inner+=u.value),(u.value||u.output)&&oe(u),n&&n.type==="text"&&u.type==="text"){n.value+=u.value,n.output=(n.output||"")+u.value;return}u.prev=n,h.push(u),n=u;},J=(u,_)=>{let a={...S[_],conditions:1,inner:""};a.prev=n,a.parens=o.parens,a.output=o.output;let x=(t.capture?"(":"")+a.open;v("parens"),g({type:u,value:_,output:o.output?"":i}),g({type:"paren",extglob:!0,value:X(),output:x}),C.push(a);},se=u=>{let _=u.close+(t.capture?")":"");if(u.type==="negate"){let a=D;u.inner&&u.inner.length>1&&u.inner.includes("/")&&(a=f(t)),(a!==D||P()||/^\)+$/.test(Q()))&&(_=u.close=`)$))${a}`),u.prev.type==="bos"&&P()&&(o.negatedExtglob=!0);}g({type:"paren",extglob:!0,value:s,output:_}),E("parens");};if(t.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let u=!1,_=e.replace(Kt,(a,x,G,W,q,Ee)=>W==="\\"?(u=!0,a):W==="?"?x?x+W+(q?k.repeat(q.length):""):Ee===0?H+(q?k.repeat(q.length):""):k.repeat(G.length):W==="."?M.repeat(G.length):W==="*"?x?x+W+(q?D:""):D:x?a:`\\${a}`);return u===!0&&(t.unescape===!0?_=_.replace(/\\/g,""):_=_.replace(/\\+/g,a=>a.length%2===0?"\\\\":a?"\\":"")),_===e&&t.contains===!0?(o.output=e,o):(o.output=Y.wrapOutput(_,o,r),o)}for(;!P();){if(s=X(),s==="\0")continue;if(s==="\\"){let a=I();if(a==="/"&&t.bash!==!0||a==="."||a===";")continue;if(!a){s+="\\",g({type:"text",value:s});continue}let x=/^\\+/.exec(Q()),G=0;if(x&&x[0].length>2&&(G=x[0].length,o.index+=G,G%2!==0&&(s+="\\")),t.unescape===!0?s=X()||"":s+=X()||"",o.brackets===0){g({type:"text",value:s});continue}}if(o.brackets>0&&(s!=="]"||n.value==="["||n.value==="[^")){if(t.posix!==!1&&s===":"){let a=n.value.slice(1);if(a.includes("[")&&(n.posix=!0,a.includes(":"))){let x=n.value.lastIndexOf("["),G=n.value.slice(0,x),W=n.value.slice(x+2),q=qt[W];if(q){n.value=G+q,o.backtrack=!0,X(),!m.output&&h.indexOf(n)===1&&(m.output=i);continue}}}(s==="["&&I()!==":"||s==="-"&&I()==="]")&&(s=`\\${s}`),s==="]"&&(n.value==="["||n.value==="[^")&&(s=`\\${s}`),t.posix===!0&&s==="!"&&n.value==="["&&(s="^"),n.value+=s,oe({value:s});continue}if(o.quotes===1&&s!=='"'){s=Y.escapeRegex(s),n.value+=s,oe({value:s});continue}if(s==='"'){o.quotes=o.quotes===1?0:1,t.keepQuotes===!0&&g({type:"text",value:s});continue}if(s==="("){v("parens"),g({type:"paren",value:s});continue}if(s===")"){if(o.parens===0&&t.strictBrackets===!0)throw new SyntaxError(ie("opening","("));let a=C[C.length-1];if(a&&o.parens===a.parens+1){se(C.pop());continue}g({type:"paren",value:s,output:o.parens?")":"\\)"}),E("parens");continue}if(s==="["){if(t.nobracket===!0||!Q().includes("]")){if(t.nobracket!==!0&&t.strictBrackets===!0)throw new SyntaxError(ie("closing","]"));s=`\\${s}`;}else v("brackets");g({type:"bracket",value:s});continue}if(s==="]"){if(t.nobracket===!0||n&&n.type==="bracket"&&n.value.length===1){g({type:"text",value:s,output:`\\${s}`});continue}if(o.brackets===0){if(t.strictBrackets===!0)throw new SyntaxError(ie("opening","["));g({type:"text",value:s,output:`\\${s}`});continue}E("brackets");let a=n.value.slice(1);if(n.posix!==!0&&a[0]==="^"&&!a.includes("/")&&(s=`/${s}`),n.value+=s,oe({value:s}),t.literalBrackets===!1||Y.hasRegexChars(a))continue;let x=Y.escapeRegex(n.value);if(o.output=o.output.slice(0,-n.value.length),t.literalBrackets===!0){o.output+=x,n.value=x;continue}n.value=`(${$}${x}|${n.value})`,o.output+=n.value;continue}if(s==="{"&&t.nobrace!==!0){v("braces");let a={type:"brace",value:s,output:"(",outputIndex:o.output.length,tokensIndex:o.tokens.length};z.push(a),g(a);continue}if(s==="}"){let a=z[z.length-1];if(t.nobrace===!0||!a){g({type:"text",value:s,output:s});continue}let x=")";if(a.dots===!0){let G=h.slice(),W=[];for(let q=G.length-1;q>=0&&(h.pop(),G[q].type!=="brace");q--)G[q].type!=="dots"&&W.unshift(G[q].value);x=Wt(W,t),o.backtrack=!0;}if(a.comma!==!0&&a.dots!==!0){let G=o.output.slice(0,a.outputIndex),W=o.tokens.slice(a.tokensIndex);a.value=a.output="\\{",s=x="\\}",o.output=G;for(let q of W)o.output+=q.output||q.value;}g({type:"brace",value:s,output:x}),E("braces"),z.pop();continue}if(s==="|"){C.length>0&&C[C.length-1].conditions++,g({type:"text",value:s});continue}if(s===","){let a=s,x=z[z.length-1];x&&K[K.length-1]==="braces"&&(x.comma=!0,a="|"),g({type:"comma",value:s,output:a});continue}if(s==="/"){if(n.type==="dot"&&o.index===o.start+1){o.start=o.index+1,o.consumed="",o.output="",h.pop(),n=m;continue}g({type:"slash",value:s,output:c});continue}if(s==="."){if(o.braces>0&&n.type==="dot"){n.value==="."&&(n.output=M);let a=z[z.length-1];n.type="dots",n.output+=s,n.value+=s,a.dots=!0;continue}if(o.braces+o.parens===0&&n.type!=="bos"&&n.type!=="slash"){g({type:"text",value:s,output:M});continue}g({type:"dot",value:s,output:M});continue}if(s==="?"){if(!(n&&n.value==="(")&&t.noextglob!==!0&&I()==="("&&I(2)!=="?"){J("qmark",s);continue}if(n&&n.type==="paren"){let x=I(),G=s;if(x==="<"&&!Y.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(n.value==="("&&!/[!=<:]/.test(x)||x==="<"&&!/<([!=]|\w+>)/.test(Q()))&&(G=`\\${s}`),g({type:"text",value:s,output:G});continue}if(t.dot!==!0&&(n.type==="slash"||n.type==="bos")){g({type:"qmark",value:s,output:N});continue}g({type:"qmark",value:s,output:k});continue}if(s==="!"){if(t.noextglob!==!0&&I()==="("&&(I(2)!=="?"||!/[!=<:]/.test(I(3)))){J("negate",s);continue}if(t.nonegate!==!0&&o.index===0){p();continue}}if(s==="+"){if(t.noextglob!==!0&&I()==="("&&I(2)!=="?"){J("plus",s);continue}if(n&&n.value==="("||t.regex===!1){g({type:"plus",value:s,output:R});continue}if(n&&(n.type==="bracket"||n.type==="paren"||n.type==="brace")||o.parens>0){g({type:"plus",value:s});continue}g({type:"plus",value:R});continue}if(s==="@"){if(t.noextglob!==!0&&I()==="("&&I(2)!=="?"){g({type:"at",extglob:!0,value:s,output:""});continue}g({type:"text",value:s});continue}if(s!=="*"){(s==="$"||s==="^")&&(s=`\\${s}`);let a=zt.exec(Q());a&&(s+=a[0],o.index+=a[0].length),g({type:"text",value:s});continue}if(n&&(n.type==="globstar"||n.star===!0)){n.type="star",n.star=!0,n.value+=s,n.output=D,o.backtrack=!0,o.globstar=!0,V(s);continue}let u=Q();if(t.noextglob!==!0&&/^\([^?]/.test(u)){J("star",s);continue}if(n.type==="star"){if(t.noglobstar===!0){V(s);continue}let a=n.prev,x=a.prev,G=a.type==="slash"||a.type==="bos",W=x&&(x.type==="star"||x.type==="globstar");if(t.bash===!0&&(!G||u[0]&&u[0]!=="/")){g({type:"star",value:s,output:""});continue}let q=o.braces>0&&(a.type==="comma"||a.type==="brace"),Ee=C.length&&(a.type==="pipe"||a.type==="paren");if(!G&&a.type!=="paren"&&!q&&!Ee){g({type:"star",value:s,output:""});continue}for(;u.slice(0,3)==="/**";){let me=e[o.index+4];if(me&&me!=="/")break;u=u.slice(3),V("/**",3);}if(a.type==="bos"&&P()){n.type="globstar",n.value+=s,n.output=f(t),o.output=n.output,o.globstar=!0,V(s);continue}if(a.type==="slash"&&a.prev.type!=="bos"&&!W&&P()){o.output=o.output.slice(0,-(a.output+n.output).length),a.output=`(?:${a.output}`,n.type="globstar",n.output=f(t)+(t.strictSlashes?")":"|$)"),n.value+=s,o.globstar=!0,o.output+=a.output+n.output,V(s);continue}if(a.type==="slash"&&a.prev.type!=="bos"&&u[0]==="/"){let me=u[1]!==void 0?"|$":"";o.output=o.output.slice(0,-(a.output+n.output).length),a.output=`(?:${a.output}`,n.type="globstar",n.output=`${f(t)}${c}|${c}${me})`,n.value+=s,o.output+=a.output+n.output,o.globstar=!0,V(s+X()),g({type:"slash",value:"/",output:""});continue}if(a.type==="bos"&&u[0]==="/"){n.type="globstar",n.value+=s,n.output=`(?:^|${c}|${f(t)}${c})`,o.output=n.output,o.globstar=!0,V(s+X()),g({type:"slash",value:"/",output:""});continue}o.output=o.output.slice(0,-n.output.length),n.type="globstar",n.output=f(t),n.value+=s,o.output+=n.output,o.globstar=!0,V(s);continue}let _={type:"star",value:s,output:D};if(t.bash===!0){_.output=".*?",(n.type==="bos"||n.type==="slash")&&(_.output=y+_.output),g(_);continue}if(n&&(n.type==="bracket"||n.type==="paren")&&t.regex===!0){_.output=s,g(_);continue}(o.index===o.start||n.type==="slash"||n.type==="dot")&&(n.type==="dot"?(o.output+=w,n.output+=w):t.dot===!0?(o.output+=O,n.output+=O):(o.output+=y,n.output+=y),I()!=="*"&&(o.output+=i,n.output+=i)),g(_);}for(;o.brackets>0;){if(t.strictBrackets===!0)throw new SyntaxError(ie("closing","]"));o.output=Y.escapeLast(o.output,"["),E("brackets");}for(;o.parens>0;){if(t.strictBrackets===!0)throw new SyntaxError(ie("closing",")"));o.output=Y.escapeLast(o.output,"("),E("parens");}for(;o.braces>0;){if(t.strictBrackets===!0)throw new SyntaxError(ie("closing","}"));o.output=Y.escapeLast(o.output,"{"),E("braces");}if(t.strictSlashes!==!0&&(n.type==="star"||n.type==="bracket")&&g({type:"maybe_slash",value:"",output:`${c}?`}),o.backtrack===!0){o.output="";for(let u of o.tokens)o.output+=u.output!=null?u.output:u.value,u.suffix&&(o.output+=u.suffix);}return o};ot.fastpaths=(e,r)=>{let t={...r},d=typeof t.maxLength=="number"?Math.min(Re,t.maxLength):Re,l=e.length;if(l>d)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${d}`);e=rt[e]||e;let m=Y.isWindows(r),{DOT_LITERAL:h,SLASH_LITERAL:$,ONE_CHAR:b,DOTS_SLASH:T,NO_DOT:S,NO_DOTS:M,NO_DOTS_SLASH:R,STAR:c,START_ANCHOR:i}=Ae.globChars(m),A=t.dot?M:S,L=t.dot?R:S,w=t.capture?"":"?:",O={negated:!1,prefix:""},k=t.bash===!0?".*?":c;t.capture&&(k=`(${k})`);let N=y=>y.noglobstar===!0?k:`(${w}(?:(?!${i}${y.dot?T:h}).)*?)`,F=y=>{switch(y){case"*":return `${A}${b}${k}`;case".*":return `${h}${b}${k}`;case"*.*":return `${A}${k}${h}${b}${k}`;case"*/*":return `${A}${k}${$}${b}${L}${k}`;case"**":return A+N(t);case"**/*":return `(?:${A}${N(t)}${$})?${L}${b}${k}`;case"**/*.*":return `(?:${A}${N(t)}${$})?${L}${k}${h}${b}${k}`;case"**/.*":return `(?:${A}${N(t)}${$})?${h}${b}${k}`;default:{let H=/^(.*?)\.(\w+)$/.exec(y);if(!H)return;let D=F(H[1]);return D?D+h+H[2]:void 0}}},B=Y.removePrefix(e,O),f=F(B);return f&&t.strictSlashes!==!0&&(f+=`${$}?`),f};st.exports=ot;});var it=chunkTKGT252T_js.c((mr,at)=>{var Xt=chunkTKGT252T_js.a("path"),Qt=tt(),He=nt(),Le=ye(),Zt=le(),Yt=e=>e&&typeof e=="object"&&!Array.isArray(e),j=(e,r,t=!1)=>{if(Array.isArray(e)){let S=e.map(R=>j(R,r,t));return R=>{for(let c of S){let i=c(R);if(i)return i}return !1}}let d=Yt(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!d)throw new TypeError("Expected pattern to be a non-empty string");let l=r||{},m=Le.isWindows(r),h=d?j.compileRe(e,r):j.makeRe(e,r,!1,!0),$=h.state;delete h.state;let b=()=>!1;if(l.ignore){let S={...r,ignore:null,onMatch:null,onResult:null};b=j(l.ignore,S,t);}let T=(S,M=!1)=>{let{isMatch:R,match:c,output:i}=j.test(S,h,r,{glob:e,posix:m}),A={glob:e,state:$,regex:h,posix:m,input:S,output:i,match:c,isMatch:R};return typeof l.onResult=="function"&&l.onResult(A),R===!1?(A.isMatch=!1,M?A:!1):b(S)?(typeof l.onIgnore=="function"&&l.onIgnore(A),A.isMatch=!1,M?A:!1):(typeof l.onMatch=="function"&&l.onMatch(A),M?A:!0)};return t&&(T.state=$),T};j.test=(e,r,t,{glob:d,posix:l}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return {isMatch:!1,output:""};let m=t||{},h=m.format||(l?Le.toPosixSlashes:null),$=e===d,b=$&&h?h(e):e;return $===!1&&(b=h?h(e):e,$=b===d),($===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?$=j.matchBase(e,r,t,l):$=r.exec(b)),{isMatch:!!$,match:$,output:b}};j.matchBase=(e,r,t,d=Le.isWindows(t))=>(r instanceof RegExp?r:j.makeRe(r,t)).test(Xt.basename(e));j.isMatch=(e,r,t)=>j(r,t)(e);j.parse=(e,r)=>Array.isArray(e)?e.map(t=>j.parse(t,r)):He(e,{...r,fastpaths:!1});j.scan=(e,r)=>Qt(e,r);j.compileRe=(e,r,t=!1,d=!1)=>{if(t===!0)return e.output;let l=r||{},m=l.contains?"":"^",h=l.contains?"":"$",$=`${m}(?:${e.output})${h}`;e&&e.negated===!0&&($=`^(?!${$}).*$`);let b=j.toRegex($,r);return d===!0&&(b.state=e),b};j.makeRe=(e,r,t=!1,d=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let l=r||{},m={negated:!1,fastpaths:!0},h="",$;return e.startsWith("./")&&(e=e.slice(2),h=m.prefix="./"),l.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&($=He.fastpaths(e,r)),$===void 0?(m=He(e,r),m.prefix=h+(m.prefix||"")):m.output=$,j.compileRe(m,r,t,d)};j.toRegex=(e,r)=>{try{let t=r||{};return new RegExp(e,t.flags||(t.nocase?"i":""))}catch(t){if(r&&r.debug===!0)throw t;return /$^/}};j.constants=Zt;at.exports=j;});var ct=chunkTKGT252T_js.c((br,ut)=>{ut.exports=it();});var gt=chunkTKGT252T_js.c((Fe,De)=>{(function(e,r){typeof chunkTKGT252T_js.a=="function"&&typeof Fe=="object"&&typeof De=="object"?De.exports=r():typeof define=="function"&&define.amd?define(function(){return r()}):e.pluralize=r();})(Fe,function(){var e=[],r=[],t={},d={},l={};function m(c){return typeof c=="string"?new RegExp("^"+c+"$","i"):c}function h(c,i){return c===i?i:c===c.toLowerCase()?i.toLowerCase():c===c.toUpperCase()?i.toUpperCase():c[0]===c[0].toUpperCase()?i.charAt(0).toUpperCase()+i.substr(1).toLowerCase():i.toLowerCase()}function $(c,i){return c.replace(/\$(\d{1,2})/g,function(A,L){return i[L]||""})}function b(c,i){return c.replace(i[0],function(A,L){var w=$(i[1],arguments);return h(A===""?c[L-1]:A,w)})}function T(c,i,A){if(!c.length||t.hasOwnProperty(c))return i;for(var L=A.length;L--;){var w=A[L];if(w[0].test(i))return b(i,w)}return i}function S(c,i,A){return function(L){var w=L.toLowerCase();return i.hasOwnProperty(w)?h(L,w):c.hasOwnProperty(w)?h(L,c[w]):T(w,L,A)}}function M(c,i,A,L){return function(w){var O=w.toLowerCase();return i.hasOwnProperty(O)?!0:c.hasOwnProperty(O)?!1:T(O,O,A)===O}}function R(c,i,A){var L=i===1?R.singular(c):R.plural(c);return (A?i+" ":"")+L}return R.plural=S(l,d,e),R.isPlural=M(l,d,e),R.singular=S(d,l,r),R.isSingular=M(d,l,r),R.addPluralRule=function(c,i){e.push([m(c),i]);},R.addSingularRule=function(c,i){r.push([m(c),i]);},R.addUncountableRule=function(c){if(typeof c=="string"){t[c.toLowerCase()]=!0;return}R.addPluralRule(c,"$0"),R.addSingularRule(c,"$0");},R.addIrregularRule=function(c,i){i=i.toLowerCase(),c=c.toLowerCase(),l[c]=i,d[i]=c;},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(c){return R.addIrregularRule(c[0],c[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(c){return R.addPluralRule(c[0],c[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(c){return R.addSingularRule(c[0],c[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(R.addUncountableRule),R});});var pt=chunkTKGT252T_js.e(ct()),yr=e=>`${e.charAt(0).toLowerCase()}${e.slice(1)}`,Ar=e=>new Promise(r=>setTimeout(r,e));var Rr=(e,r)=>{let t=0;return (...d)=>{let l=Date.now();l-t>=r&&(t=l,e(...d));}},Ne=(e,r)=>Array.from({length:Math.round(e)}).map(()=>r),Sr=(e,r=20)=>{let t=Ne(r," ");return `[${`${Ne(e/100*r||0,"=").join("")}${t.join("")}`.slice(0,20)}]`},Er=(e=0,r=20)=>{let t=Ne(r," "),d=e%((r-1)*2);return t[d>=r?(r-1)*2-d:d]="*",`[${t.join("")}]`},Cr=(e,r)=>{try{return e.message=r,e}catch{let t=new Error(r);return t.stack=e.stack,t}},Oe={},ft=(e,r)=>(Oe[e]||(Oe[e]=(0, pt.default)(e,{dot:!0})),Oe[e](r.replace(/^\.\//,""))),fe=e=>[/(^|\/)package\.json$/].some(r=>r.test(e)),Vt=e=>[/(^|\/)package-lock\.json$/,/(^|\/)yarn\.lock$/].some(r=>r.test(e)),_r=e=>fe(e)||Vt(e),lt=(e,...r)=>{if(e===null||typeof e!="object")return e;if(Array.isArray(e))return e.map(d=>lt(d,...r));let t={...e};for(let d of Object.keys(t))t[d]=r.includes(d)?void 0:lt(t[d],...r);return t};var he=chunkTKGT252T_js.e(chunk3CHCQNH4_js.u()),Me=chunkTKGT252T_js.e(chunk3CHCQNH4_js.v());var dt=chunkTKGT252T_js.e(chunk3CHCQNH4_js.u()),de=e=>dt.default.cyan(e);var ht=({statsPath:e,storybookDir:r,storybookBuildDir:t,entryFile:d,viewLayer:l="react"})=>{if(d){let m=t?he.default`Configure {bold --storybook-config-dir} with the value for {bold --config-dir} or {bold -c} from your build-storybook script.`:he.default`Configure {bold --build-script-name} to point at the {bold build-storybook} script which has {bold --config-dir} or {bold -c} set.`;return (0, Me.dedent)(he.default`
      ${chunk3CHCQNH4_js.z} Did not find any CSF globs in {bold ${e}}
      Found an entry file at {bold ${d}} but expected it at {bold ${r}/generated-stories-entry.js}.
      ${m}
      ${chunk3CHCQNH4_js.w} Read more at ${de("https://www.chromatic.com/docs/turbosnap")}
    `)}return (0, Me.dedent)(he.default`
    ${chunk3CHCQNH4_js.z} Did not find any CSF globs in {bold ${e}}
    Check your stories configuration in {bold ${r}/main.js}
    ${chunk3CHCQNH4_js.w} Read more at ${de(`https://storybook.js.org/docs/${l}/configure/overview`)}
  `)};var U=chunkTKGT252T_js.e(chunk3CHCQNH4_js.u()),Pe=chunkTKGT252T_js.e(gt());var Jt=(e,r,t)=>(r==="."?e:e.replace(`${r}/`,U.default.dim(`${r}/`))).split("/").map((l,m,h)=>{if(m<h.length-1)return l;let[,$,b=""]=l.match(/^(.+?)( \+ \d+ modules)?$/)||[];return U.default.bold($)+(t?U.default.magenta(b):U.default.dim(b))}).join("/"),er="The root directory of your project:",tr="The base directory (The relative path from the root to the storybook config root):",rr="The storybook directory (The directory can either be at the root or in a sub-directory):",or=`If you are having trouble with tracing, please check the following:

  1. Make sure you have the correct root path, base path, and storybook path.

  2. Make sure you have the correct storybook config file.

  3. Make sure you have the correct storybook config file path.
You can either set the flags storybook-base-dir or storybook-config-dir to help TurboSnap find the correct storybook config file.

`,mt=(e,{changedFiles:r,affectedModules:t,modulesByName:d,normalize:l})=>{var O,k,N;let m=e.log===console?"--mode (-m)":"--trace-changed",h=e.options.storybookBaseDir||".",$=e.options.storybookConfigDir||".storybook",b=e.options.traceChanged==="expanded",T=F=>Jt(F,h,b),S=(0, Pe.default)("changed files",r.length,!0),M=(0, Pe.default)("affected story files",Object.keys(t).length,!0),R;if(b){let F=(O=e.turboSnap)!=null&&O.bailReason?`${sr(e.turboSnap.bailReason)}

`:"",B=`${U.default.magenta(er)} ${(k=e.turboSnap)==null?void 0:k.rootPath}

`,f=`${U.default.magenta(tr)} ${h}

`,y=`${U.default.magenta(rr)} ${$}

`,H=e.untracedFiles&&e.untracedFiles.length>0?`${U.default.magenta(`We detected some untraced files, this may affect your traced changes as 
    the untraced flag instructs TurboSnap to not trace dependencies for the files:`)} 
  ${e.untracedFiles.join(",")}


`:"";R=`${B}${f}${y}${F}${H}${or}`;}let c=U.default`${e.options.traceChanged==="expanded"?R:""}${chunk3CHCQNH4_js.w} Traced {bold ${S}} to {bold ${M}}`;if(e.options.traceChanged==="compact"){let F=!1,f=Object.values(t).map(([H,...D])=>D.length===0?H:(F=!0,`${H} + ${D.length} modules`)).map(H=>U.default`— ${T(H)}`).join(`
`),y=F?U.default`\nSet {bold ${m}} to {bold 'expanded'} to reveal underlying modules.`:U.default`\nSet {bold ${m}} to reveal how these files are affected.`;return `${c}:
${f}${y}`}let i=(F,B="")=>{if(!b)return "";let{modules:f}=d[F]||{};if(!f)return "";let y="";for(let H of f)y+=U.default`\n${B}  ⎸  {dim ${l(H.name)}}`;return y},A=new Set,L=[...((N=e.turboSnap)==null?void 0:N.tracedPaths)||[]].map(F=>{let B=F.split(`
`),f="";for(let[y,H]of B.entries()){if(y===0){f=U.default`— ${T(H)} {cyan [changed]}${i(H)}`;continue}let D="";y===B.length-1&&(A.has(H)?D=U.default` {yellow [duplicate]}`:A.add(H));let o="  ".repeat(y);f=U.default`${b?`File Path: ${H}

Base Directory: ${h}

`:""}${f}\n${o}∟ ${T(H)}${D}${i(H,o)}`;}return f+U.default`\n${"  ".repeat(B.length)}∟ {cyan [story index]}`}),w=U.default`\n\nSet {bold ${m}} to {bold 'expanded'} to reveal underlying modules.`;return `${c}:

${L.join(`

`)}${b?"":w}`},Se=(e,r)=>U.default`{bold ${e}}\n`+r.map(t=>`  - ${t}`).join(`
`);function sr(e){if(!e)return "";let r=[];return e.changedPackageFiles&&r.push(Se("Changed Package Files",e.changedPackageFiles)),e.changedStorybookFiles&&r.push(Se("Changed Storybook Files",e.changedStorybookFiles)),e.changedExternalFiles&&r.push(Se("Changed External Files",e.changedExternalFiles)),e.changedStaticFiles&&r.push(Se("Changed Static Files",e.changedStaticFiles)),r.join(`
`)}var ue=chunkTKGT252T_js.e(chunk3CHCQNH4_js.u()),bt=chunkTKGT252T_js.e(chunk3CHCQNH4_js.v());var nr="https://www.chromatic.com/docs/turbosnap#how-it-works",$t=({turboSnap:e})=>{let{changedPackageFiles:r,changedStaticFiles:t,changedStorybookFiles:d}=(e==null?void 0:e.bailReason)||{},l=r||d||t,m=l==null?void 0:l.every(S=>fe(S)),[h,...$]=l||[],b=r?"package file":"static file";m&&(b="dependency"),d&&(b="Storybook config");let T="";return $.length===1&&(T=ue.default` or its module sibling {bold ${$[0]}}`),$.length>1&&(T=ue.default` or one of its ${$.length} module siblings:\n{dim →} ${$.map(S=>ue.default.bold(S)).join(ue.default`\n{dim →} `)}`),(0, bt.dedent)(ue.default`
    ${chunk3CHCQNH4_js.y} {bold TurboSnap disabled due to file change}
    Found a ${b} change in {bold ${h}}${T}
    A full build is required because this file cannot be linked to any specific stories.
    ${chunk3CHCQNH4_js.w} Read more at ${de(nr)}
  `)};var ar=[/^package-lock\.json$/,/^yarn\.lock$/,/\/package-lock\.json$/,/\/yarn\.lock$/],ir=[/\/webpack\/runtime\//,/^\(webpack\)/],ur=e=>ar.some(r=>r.test(e)),cr=e=>e.id!==void 0&&e.id!==null&&!ir.some(r=>r.test(e.name||e.moduleName)),Ie=e=>e.split(ge__default.default.sep).filter(Boolean).join(ge__default.default.posix.sep),lr=e=>{let[,r]=e.match(/\/node_modules\/(@[\w-]+\/[\w-]+)\//)||[];if(r)return r;let[,t]=e.match(/\/node_modules\/([\w-]+)\//)||[];return t};function pr(e,r,t=""){return !e||e.startsWith("/virtual:")?e:ge__default.default.posix.isAbsolute(e)?ge__default.default.posix.relative(r,e):ge__default.default.posix.join(t,e)}async function Ur(e,r,t,d,l=[]){var V,oe;let{rootPath:m}=e.git||{};if(!m)throw new Error("Failed to determine repository root");let{baseDir:h="",configDir:$=".storybook",staticDir:b=[],viewLayer:T}=e.storybook||{},{storybookBuildDir:S,storybookConfigDir:M=$,untraced:R=[]}=e.options,c=Ie(h),i=p=>{let v=/\s+(sync|lazy)\s+/g,E=/(\?.*)/g,g=pr(p,m,c);return E.test(g)&&!v.test(g)?g.replaceAll(E,""):g},A=i(Ie(M)),L=b.map(p=>i(Ie(p)));e.log.debug("BASE Directory:",c),e.log.debug("Storybook CONFIG Directory:",A);let w=new Set([`${M}/generated-stories-entry.js`,"./generated-stories-entry.js","./generated-stories-entry.cjs","./storybook-stories.js","/virtual:/@storybook/builder-vite/vite-app.js","./node_modules/.cache/storybook/default/dev-server/storybook-stories.js","./node_modules/.cache/storybook/storybook-rsbuild-builder/storybook-config-entry.js"].map(p=>i(p))),O=new Map,k=new Map,N=new Map,F=new Map,B=new Set;if(r.modules.filter(p=>cr(p)).map(p=>{var J,se,u;let v=i(p.name);O.set(v,p),N.set(p.id,v);let E=lr(p.name);if(E&&(k.has(E)||k.set(E,[]),(J=k.get(E))==null||J.push(v)),p.modules)for(let _ of p.modules)O.set(i(_.name),p);let g=(se=p.reasons)==null?void 0:se.map(_=>i(_.resolvedModule||_.moduleName)).filter(_=>_&&_!==v);g&&F.set(p.id,g),(u=F.get(p.id))!=null&&u.some(_=>w.has(_))&&B.add(v);}),B.size===0){let p=/^(.+\/)?generated-stories-entry\.js$/,v=r.modules.find(g=>p.test(g.name)&&!w.has(i(g.name))),E=v&&i(v.name);throw e.log.error(ht({statsPath:t,storybookDir:A,storybookBuildDir:S,entryFile:E,viewLayer:T})),new Error("Did not find any CSF globs in preview-stats.json")}let f=p=>B.has(p),y=p=>p&&p.startsWith(`${A}/`)&&!w.has(p),H=p=>L.some(v=>p&&p.startsWith(`${v}/`));e.untracedFiles=[];function D(p){var v;return R.some(E=>ft(E,p))?((v=e.untracedFiles)==null||v.push(p),!1):!0}function o(p){var E;let v=O.get(p);return v?(E=v.modules)!=null&&E.length?v.modules.map(g=>i(g.name)):[i(v.name)]:[p]}let C=[...l.flatMap(p=>k.get(p)||[]),...d].filter(p=>D(p)),z=new Set,K=new Set,n={},s=[];e.turboSnap={rootPath:m,baseDir:c,storybookDir:A,staticDirs:L,globs:[...B],modules:[...O.keys()],tracedFiles:C,tracedPaths:z,affectedModuleIds:K,bailReason:void 0};let P=C.filter(p=>ur(p));k.size===0&&l.length>0&&(e.turboSnap.bailReason={changedPackageFiles:[...((V=e.git.changedFiles)==null?void 0:V.filter(p=>fe(p)))||[],...P]});function I(p){return e.turboSnap||(e.turboSnap={}),y(p)?(e.turboSnap.bailReason={changedStorybookFiles:o(p)},!0):H(p)?(e.turboSnap.bailReason={changedStaticFiles:o(p)},!0):!1}function X(p,v=[]){var J,se;if((J=e.turboSnap)!=null&&J.bailReason||f(p)||I(p))return;let{id:E}=O.get(p)||{},g=N.get(E||null);g&&(I(g)||!E||!F.get(E)||n[E]||(s.push([E,[...v,E.toString()]]),(se=F.get(E))!=null&&se.some(u=>f(u))&&(K.add(E),z.add([...v,E].map(u=>N.get(u)).join(`
`)))));}for(e.options.traceChanged&&(e.log.debug("Traced files..."),e.log.debug(C)),C.map(p=>X(p));s.length>0;){let[p,v]=s.pop();if(Array.isArray(p)){e.log.debug("Trace ID is an unexpected value, skipping");continue}if(!Array.isArray(v)){e.log.debug("Trace path is an unexpected value, skipping");continue}n[p]=!0,(oe=F.get(p))==null||oe.filter(E=>D(E)).map(E=>X(E,v));}let Q=Object.fromEntries([...K].map(p=>[String(p),o(N.get(p)||"")]));if(e.options.traceChanged&&(e.log.debug("Affected modules..."),e.log.debug(Q)),e.options.traceChanged&&(e.log.info(mt(e,{changedFiles:d,affectedModules:Q,modulesByName:Object.fromEntries(O),normalize:i})),e.log.info("")),e.turboSnap.bailReason){e.log.warn($t({turboSnap:e.turboSnap}));return}return Q}

exports.a = de;
exports.b = gt;
exports.c = ct;
exports.d = yr;
exports.e = Ar;
exports.f = Rr;
exports.g = Sr;
exports.h = Er;
exports.i = Cr;
exports.j = ft;
exports.k = fe;
exports.l = _r;
exports.m = lt;
exports.n = $t;
exports.o = Ur;
//# sourceMappingURL=out.js.map
//# sourceMappingURL=chunk-PHWTJQYY.js.map
//# debugId=6e48b08e-1eb9-5ea6-8b59-418adcdd0872
