@rsdoctor/client 1.5.8 → 1.5.10
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/dist/config/constants.d.cts +8 -0
- package/dist/diff.html +1 -1
- package/dist/index.html +1 -1
- package/dist/resource/css/630.63628dfed2.css +1 -0
- package/dist/resource/js/181.202c32f28e.js +1 -0
- package/dist/resource/js/630.d98cf14f77.js +112 -0
- package/dist/resource/js/681.2f02a25876.js +2 -0
- package/dist/resource/js/70.b88e2c49cf.js +343 -0
- package/dist/resource/js/{ant-design-0.71243426.js → ant-design-0.423dc49a53.js} +12 -12
- package/dist/resource/js/ant-design-1.3da9e5560d.js +262 -0
- package/dist/resource/js/{ant-design-2.16432452.js → ant-design-2.f4524a4f5e.js} +11 -11
- package/dist/resource/js/{ant-design-3.23ce91b6.js → ant-design-3.864d7e37fa.js} +14 -14
- package/dist/resource/js/{ant-design-4.97833ea2.js → ant-design-4.a51fff4025.js} +26 -26
- package/dist/resource/js/ant-design-icons.6d735fb087.js +1 -0
- package/dist/resource/js/diff.55f1533174.js +57 -0
- package/dist/resource/js/index.f83e52ca10.js +91 -0
- package/dist/resource/js/rc-0.6e1040359f.js +1 -0
- package/dist/resource/js/rc-1.f953c6a3e4.js +1 -0
- package/dist/resource/js/react.a376b049da.js +1 -0
- package/dist/src/App.d.cts +3 -0
- package/dist/src/DiffApp.d.cts +3 -0
- package/dist/src/DiffRouter.d.cts +2 -0
- package/dist/src/components/BaseApp.d.cts +8 -0
- package/dist/src/diff.d.cts +2 -0
- package/dist/src/index.d.cts +2 -0
- package/dist/src/router.d.cts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/resource/css/601.20cc6df9.css +0 -1
- package/dist/resource/js/383.2e75ce49.js +0 -2
- package/dist/resource/js/577.10ff2379.js +0 -343
- package/dist/resource/js/601.dc26c158.js +0 -112
- package/dist/resource/js/641.c0cd2597.js +0 -1
- package/dist/resource/js/ant-design-1.6050f2c5.js +0 -262
- package/dist/resource/js/ant-design-icons.6f529e48.js +0 -1
- package/dist/resource/js/diff.6498e93a.js +0 -57
- package/dist/resource/js/index.5cff221c.js +0 -91
- package/dist/resource/js/rc-0.f5bcb33d.js +0 -1
- package/dist/resource/js/rc-1.08d0910e.js +0 -1
- package/dist/resource/js/react.f1c1c97a.js +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
(()=>{"use strict";var e,t,s,r,i,n,a={10359(e,t,s){var r=s(65723);s(91118);var i=s(41148);s(22155);var n=s(47903),a=s(41346),l=s(75524);function o(){let e=[{path:l._y.wE,element:(0,r.jsx)(l._y.YW,{})},{path:l.hK.wE,element:(0,r.jsx)(l.hK.YW,{})},{path:l.FO.wE,element:(0,r.jsx)(l.FO.YW,{})},{path:l.dn.wE,element:(0,r.jsx)(l.dn.YW,{})},{path:l.pI.wE,element:(0,r.jsx)(l.pI.YW,{})},{path:l.PR.wE,element:(0,r.jsx)(l.PR.YW,{})},{path:l.s0.wE,element:(0,r.jsx)(l.s0.BU,{})}].filter(e=>!!e);return(0,r.jsxs)(a.BV,{children:[(0,r.jsx)(a.qh,{path:"/",element:(0,r.jsx)(l.wm.YW,{})}),(0,r.jsx)(a.qh,{path:l.wm.wE,element:(0,r.jsx)(l.wm.YW,{})}),e.map(e=>(0,r.jsx)(a.qh,{path:e.path,element:e.element},e.path)),(0,r.jsx)(a.qh,{path:l.aD.wE,element:(0,r.jsx)(l.aD.YW,{})}),(0,r.jsx)(a.qh,{path:l.d9.wE,element:(0,r.jsx)(l.d9.YW,{})})]})}var d=s(1145),c=s(47746),h=s(58997);s(99044);let u=document.getElementById("root");h.H(u).render((0,r.jsx)(()=>{let e=(0,n.useDetectIfCloudIdeEnv)();return(0,r.jsx)(d.A,{router:(0,r.jsx)(o,{}),renderFailState:()=>{let e=(0,n.getDemoUrl)();return e?(0,r.jsxs)(c.A.Text,{style:{fontSize:16},children:["or you can open the",(0,r.jsx)(c.A.Text,{strong:!0,style:{fontSize:"inherit"},children:(0,r.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",children:"demo"})}),"to get started with the Rsdoctor."]}):null},extraContent:e&&(0,r.jsx)(i.A,{message:"Warning",description:(0,r.jsx)("a",{href:window.location.href.replace(/https/,"http"),children:`Please jump to:${window.location.href.replace(/https/,"http")}`}),type:"warning",showIcon:!0,closable:!0})})},{}));let p=document.createElement("link");p.setAttribute("type","image/x-icon"),p.setAttribute("rel","icon"),p.setAttribute("href","https://assets.rspack.rs/rsdoctor/rsdoctor-logo-960x960.png"),document.head.appendChild(p)},30371(e,t,s){s.d(t,{A:()=>i});var r=s(65723);s(22155);let i=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,r.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,r.jsx)("g",{clipPath:"url(#total-size_svg__a)",children:(0,r.jsx)("path",{fill:"#F2793D",d:"m2.5 5.77 5.026 2.534V13.5L2.5 11.011zm11-.016v5.23l-1.775.881-1.508.747-1.685.854V8.254zM8 2.5l4.902 2.472L7.999 7.45 3.04 4.961z"})}),(0,r.jsx)("defs",{children:(0,r.jsx)("clipPath",{id:"total-size_svg__a",children:(0,r.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]})},11123(e,t,s){s.d(t,{EJ:()=>p.EJ,mn:()=>u});var r=s(65723),i=s(22155),n=s(15722),a=s(47903),l=s(17599),o=s(95869),d=s(14023),c=s(58250),h=s(27574);let u=(0,o.eN)({api:n.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:s}=e,{errors:n,root:o}=s,{setBundleAlertsViewMode:u,viewMode:p,setViewMode:m}=(0,a.useViewMode)(),{t:f}=(0,a.useI18n)(),g=t?n.filter(t):n;return(0,i.useEffect)(()=>{(0,a.hasViewModeFromStorage)()||m({bundleAlerts:n.length>=5?d.nE.Group:d.nE.List},!1)},[]),(0,r.jsx)(h.Ay,{theme:{components:{Alert:{colorInfoBg:"#e6f4ff57",colorInfoBorder:"none"}},token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)"}},children:(0,r.jsx)(l.J,{title:f("Bundle Alerts"),dataSource:g,extraData:{cwd:o,getPackageRelationContentComponent:e=>(0,r.jsx)(c.rU,{body:{id:e.data.id,target:e.package.target},cwd:o})},viewMode:p.bundleAlerts,setViewMode:u,cwd:o})})}});s(20112);var p=s(49073)},72270(e,t,s){s.d(t,{GB:()=>a,dK:()=>r,wx:()=>n});let r=["#F2793D","#F28B24","#F2A200","#F5CC00","#F5E000","#A3D900","#66CC00","#0AC419","#0AC496","#0AC7D1","#00A8E0","#1471F5","#4060FF","#7559FF","#884DFF","#A526FF","#BA39E5","#C700D9","#D900B5","#E50099","#E52E6B","#F24957","#30B2F2","#00BF70","#5959FF","#9F40FF","#528BFF"];var i,n=((i={})[i.Bootstrap=0]="Bootstrap",i[i.Compile=1]="Compile",i[i.Done=2]="Done",i[i.Minify=3]="Minify",i[i.Loader=4]="Loader",i[i.Normal=5]="Normal",i);let a=["#bda29a","#6F3FE1","#3966ed","#0a5f74","#3EBD7C","#F7A925","#ca8622","#749f83","#6e7074"]},20986(e,t,s){s.d(t,{a:()=>i});var r,i=((r={}).BEGIN="B",r.END="E",r.COMPLETE="X",r.INSTANT="I",r.MARK="R",r)},57838(e,t,s){s.d(t,{Bq:()=>h,QR:()=>p,Wy:()=>f,iv:()=>u,kr:()=>m});var r=s(71513),i=s(80286),n=s.n(i),a=s(41024),l=s(62186),o=s(47903);s(99566);var d=s(20986),c=s(22155);function h(e){return`
|
|
2
|
+
<div class="loader-tooltip-container">
|
|
3
|
+
<div class="loader-tooltip-title">${e.loader}</div>
|
|
4
|
+
<li class="loader-tooltip-item">
|
|
5
|
+
<span>isPitch</span>
|
|
6
|
+
<span>${e.isPitch}</span>
|
|
7
|
+
</li>
|
|
8
|
+
${e.layer&&"undefined"!==e.layer?`<li class="loader-tooltip-item">
|
|
9
|
+
<span>layer</span>
|
|
10
|
+
<span>${e.layer}</span>
|
|
11
|
+
</li>`:""}
|
|
12
|
+
<li class="loader-tooltip-item">
|
|
13
|
+
<span>duration</span>
|
|
14
|
+
<span class="loader-tooltip-text-bold">${(0,o.formatCosts)(e.costs)}</span>
|
|
15
|
+
</li>
|
|
16
|
+
<li class="loader-tooltip-item">
|
|
17
|
+
<span>filepath</span>
|
|
18
|
+
<span>${e.resource}</span>
|
|
19
|
+
</li>
|
|
20
|
+
<li class="loader-tooltip-item">
|
|
21
|
+
<span>start</span>
|
|
22
|
+
<span class="loader-tooltip-text-bold">${n()(e.startAt).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
23
|
+
</li>
|
|
24
|
+
<li class="loader-tooltip-item">
|
|
25
|
+
<span>end</span>
|
|
26
|
+
<span class="loader-tooltip-text-bold">${n()(e.endAt).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
27
|
+
</li>
|
|
28
|
+
</div>
|
|
29
|
+
`.trim()}function u(e,t,s){let i=t=>t.loader===e,d=t.filter(i),c=d.map(e=>e.resource),h=c.filter(e=>e.includes("/node_modules/")),u=c.filter(e=>!e.startsWith(s)),p=(0,a.w)(d,e=>e.startAt).startAt,m=(0,l.S)(d,e=>e.endAt).endAt,f=r.aH.getLoadersCosts(i,t);return`
|
|
30
|
+
<div class="loader-tooltip-container">
|
|
31
|
+
<div class="loader-tooltip-title">${e}</div>
|
|
32
|
+
<li class="loader-tooltip-item">
|
|
33
|
+
<span>files</span>
|
|
34
|
+
<span class="loader-tooltip-text-bold">${c.length}</span>
|
|
35
|
+
</li>
|
|
36
|
+
<li class="loader-tooltip-item">
|
|
37
|
+
<span>files(node_modules)</span>
|
|
38
|
+
<span class="loader-tooltip-text-bold">${h.length}</span>
|
|
39
|
+
</li>
|
|
40
|
+
<li class="loader-tooltip-item">
|
|
41
|
+
<span>files(outside the cwd)</span>
|
|
42
|
+
<span class="loader-tooltip-text-bold">${u.length}</span>
|
|
43
|
+
</li>
|
|
44
|
+
<li class="loader-tooltip-item">
|
|
45
|
+
<span>duration(estimated)</span>
|
|
46
|
+
<span class="loader-tooltip-text-bold">${(0,o.formatCosts)(f)}</span>
|
|
47
|
+
</li>
|
|
48
|
+
<li class="loader-tooltip-item">
|
|
49
|
+
<span>start(min)</span>
|
|
50
|
+
<span>${n()(p).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
51
|
+
</li>
|
|
52
|
+
<li class="loader-tooltip-item">
|
|
53
|
+
<span>end(max)</span>
|
|
54
|
+
<span>${n()(m).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
55
|
+
</li>
|
|
56
|
+
</div>
|
|
57
|
+
`.trim()}function p(e){return function e(t){return t.reduce((t,s)=>{if(s.c){let r=e(s.c);t.push({name:s.n,ph:d.a.BEGIN,pid:s.p,ts:s.s,args:s},...r,{name:s.n,ph:d.a.END,pid:s.p,ts:s.e,args:s})}else t.push({name:s.n,ph:d.a.BEGIN,pid:s.p,ts:s.s,args:s}),t.push({name:s.n,ph:d.a.END,pid:s.p,ts:s.e,args:s});return t},[])}(Object.entries(e.sort((e,t)=>e.s-t.s).reduce((e,t)=>{let s=e[t.p];return s?function(e,t){let s=[e];for(;s.length>0;){let e,r=s.shift()||[];if(0===r.length)return;let i=r[r.length-1];if(i.e<=t.s)return r.push(t);for(let t=r.length-1;t>=0;t--){let{c:s}=r[t];s&&(e=s)}e?s.push(e):i.c=[t]}}(s,t):e[t.p]=[t],e},{})).reduce((e,t)=>{let[s,r]=t;return e.push(...r),e},[]))}function m(e){let{ext:t}=e.data;return`
|
|
58
|
+
<div class="loader-tooltip-container">
|
|
59
|
+
<div class="loader-tooltip-title">[${t.args.p}] ${t.args.n}</div>
|
|
60
|
+
<li class="loader-tooltip-item">
|
|
61
|
+
<span>hook</span>
|
|
62
|
+
<span>${t.args.p}</span>
|
|
63
|
+
</li>
|
|
64
|
+
<li class="loader-tooltip-item">
|
|
65
|
+
<span>tap name</span>
|
|
66
|
+
<span>${t.args.n}</span>
|
|
67
|
+
</li>
|
|
68
|
+
<li class="loader-tooltip-item">
|
|
69
|
+
<span>start</span>
|
|
70
|
+
<span>${n()(t.args.s).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
71
|
+
</li>
|
|
72
|
+
<li class="loader-tooltip-item">
|
|
73
|
+
<span>end</span>
|
|
74
|
+
<span>${n()(t.args.e).format("YYYY/MM/DD HH:mm:ss")}</span>
|
|
75
|
+
</li>
|
|
76
|
+
<li class="loader-tooltip-item">
|
|
77
|
+
<span>duration</span>
|
|
78
|
+
<span>${(0,o.formatCosts)(t.args.e-t.args.s)}</span>
|
|
79
|
+
</li>
|
|
80
|
+
</div>
|
|
81
|
+
`.trim()}function f(e,t){let[s,r]=(0,c.useState)(e);return(0,c.useEffect)(()=>{let s=setTimeout(()=>r(e),t);return()=>clearTimeout(s)},[e,t]),s}},86542(e,t,s){s.d(t,{U:()=>A});var r=s(65723),i=s(15722),n=s(63079),a=s(10944),l=s(51583),o=s(47746),d=s(59453),c=s(45164),h=s(22155),u=s(43092),p=s.n(u),m=s(47903),f=s(95869),g=s(93685),x=s(6662),y=s(20717),j=s(71513);let A=(0,f.eN)({Component:e=>{let{defaultKeys:t,configs:s}=e,i=(0,m.useWebpackConfigurationByConfigs)(s||[]);if(!i)return null;let{config:u,version:f,name:A}=i,v=Object.keys(u),[S,b]=(0,h.useState)(t||v);return(0,r.jsxs)(g.hX,{text:(0,r.jsxs)("div",{className:y.A.title,children:[(0,r.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:"View Bundler Config"}),(0,r.jsx)(c.A,{style:{fontSize:"10px"}})]}),children:[(0,r.jsxs)(n.A,{children:[(0,r.jsx)(x.h,{text:"Bundler Config Viewer"}),(0,r.jsx)(a.A,{}),(0,r.jsxs)(l.A,{children:[(0,r.jsx)(o.A.Text,{children:"Properties: "}),(0,r.jsx)(d.A,{dropdownStyle:{zIndex:999},mode:"multiple",allowClear:!0,value:S.length===v.length?[]:S,style:{width:350},popupMatchSelectWidth:!0,placeholder:"Show Selected Properties Only.",onChange:e=>{b(e)},children:v.map(e=>(0,r.jsx)(d.A.Option,{label:e,value:e,children:e},e))})]}),(0,r.jsx)(a.A,{})]}),(0,r.jsx)(p(),{name:f&&"unknown"!==f?`${A}@${f}`:"webpack.config",theme:"monokai",src:0===S.length?u:j.AP.pick(u,S),displayDataTypes:!1,displayObjectSize:!1,style:{overflowX:"auto"}})]})},api:i.hp.ServerAPI.API.LoadDataByKey,responsePropName:"configs",body:{key:"configs"},showSkeleton:!1})},24197(e,t,s){s.d(t,{i:()=>l});var r=s(65723);s(22155);var i=s(47746),n=s(28342),a=s(20934);let l=e=>{let{text:t,keyword:s,...n}=e;if(!s||-1===t.indexOf(s))return o({text:t,rest:n});let l=[],d=t;for(;d.length>0;){let e=d.indexOf(s);if(e>-1)0!==e&&l.push(o({text:d,els:l})),l.push(o({text:d,els:l,marked:!0})),d=d.slice(e+s.length);else{l.push(o({text:d,els:l,marked:!0}));break}}return(0,r.jsx)(i.A.Text,{className:a.A.text,...n,children:l})},o=e=>{let{text:t,els:s,marked:l=!1,rest:o}=e;if(!t)return null;let d=t.length;if(d>40){let e=Math.floor(18.5),s=Math.ceil(18.5);return(0,r.jsx)(n.A,{content:t,placement:"left",children:(0,r.jsx)("div",{children:(0,r.jsxs)(i.A.Text,{className:a.A.text,mark:!!l,...o,children:[t.slice(0,e),"...",t.slice(d-s)]})})})}return(0,r.jsx)(n.A,{content:t,children:(0,r.jsx)("div",{children:(0,r.jsx)(i.A.Text,{className:a.A.text,...o,children:t},s?s.length:0)})})}},58530(e,t,s){s.d(t,{L:()=>n,h:()=>i});var r=s(22155);let i=(0,r.createContext)({project:null});function n(){return(0,r.useContext)(i)}},72373(e,t,s){s.d(t,{e:()=>m,z:()=>p});var r=s(65723),i=s(15722),n=s(79682),a=s(7881),l=s(22155),o=s(63962),d=s(47903),c=s(14023),h=s(40176),u=s(71513);let p=e=>{let{manifestLoader:t=d.fetchManifest,api:s,children:p,body:m=null,showSkeleton:f=!0,fallbackComponent:g}=e,[x,y]=(0,l.useState)(),[j,A]=(0,l.useState)(c.nl.Pending),[v,S]=(0,l.useState)({}),{loader:b}=(0,d.useDataLoader)(x);function M(e){window[i.YM.WINDOW_RSDOCTOR_TAG]?k(e):t().then(e=>{y(e)}).catch(e=>{if(!("u"<typeof window)&&window.location.hash.includes(i.Kj.RsdoctorClientRoutes.Uploader)){console.warn("[ServerAPIProvider] Failed to load manifest for uploader route, continuing with empty manifest:",e),A(c.nl.Success);return}throw A(c.nl.Fail),e}).then(()=>{k(e)})}let z=(0,l.useCallback)(e=>{let{req:t,res:r}=e;t.api===s&&((0,o.n)(t.body,m)||u.AP.isNil(t.body)&&u.AP.isNil(m))&&!(0,o.n)(v,r)&&S(r),A(c.nl.Success)},[v,s,m]);function k(e){e&&(Object.values(i.hp.ServerAPI.APIExtends).includes(s)?A(c.nl.Success):e.loadAPI(s,m).then(e=>{u.AP.isNil(e)||(S(e),A(c.nl.Success))}).catch(e=>{console.error(e),A(c.nl.Fail)}))}return((0,l.useEffect)(()=>{M(b)},[b,s,m]),(0,l.useEffect)(()=>{if(b)return b.onDataUpdate(s,z),()=>{b.removeOnDataUpdate(s,z)}},[b,s,m]),j===c.nl.Pending)?f?(0,r.jsx)(n.A,{active:!0}):null:j===c.nl.Fail?g||(0,r.jsx)(h.c,{retry:()=>{A(c.nl.Pending),t(),M()}}):j===c.nl.Updating?(0,r.jsx)(a.A,{spinning:!0,children:p(v)}):p(v)};function m(e){let{Component:t,api:s,responsePropName:i,body:n,fallbackComponent:a,showSkeleton:l}=e;return function(e){let{body:o=n,...d}=e;return(0,r.jsx)(p,{api:s,body:o,showSkeleton:l,fallbackComponent:a,children:e=>{let s={...d,[i]:e};return(0,r.jsx)(t,{...s})}})}}},2431(e,t,s){s.d(t,{u:()=>d});var r=s(65723),i=s(79682),n=s(22155),a=s(47903),l=s(14023),o=s(40176);function d(e,t,s){let d=e();return function(){let[c,h]=(0,n.useState)(),[u,p]=(0,n.useState)(l.jK.Pending),[m,f]=(0,n.useState)({}),{loader:g}=(0,a.useDataLoader)(c);function x(e){return e.then(e=>{h(e)}).catch(()=>{p(l.jK.Fail)})}function y(e){e&&Promise.all(t.map(t=>{let[s]=t;return e.loadData(s)})).then(e=>{f(e.reduce((e,s,r)=>{let[i,n]=t[r];return e[n]=s,e},{})),p(l.jK.Success)}).catch(e=>{console.error(e),p(l.jK.Fail)})}return((0,n.useEffect)(()=>{x(d).then(()=>{y(g)})},[g]),u===l.jK.Pending)?(0,r.jsx)(i.A,{active:!0}):u===l.jK.Fail?(0,r.jsx)(o.c,{retry:()=>{p(l.jK.Pending),d.then(()=>{y(g)}).catch(()=>{x(e())})}}):(0,r.jsx)(s,{...m})}}},68281(e,t,s){s.d(t,{oc:()=>E,Rl:()=>V,Wf:()=>N,DG:()=>en});var r=s(65723),i=s(22155),n=s(91077),a=s(73014),l=s(33325),o=s(59271),d=s(52751),c=s(51327),h=s(45164),u=s(41346),p=s(65390),m=s(47903),f=s(93685),g=s(24184),x=s(95869);s(53401);s(65919);let y="card-lyOUB6";var j=s(11728),A=s(30371);let v=e=>(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,r.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,r.jsx)("path",{fill:"#3874F6",d:"M13.353 4.51c.094.095.147.221.147.354V14.5a.5.5 0 0 1-.5.5H3a.5.5 0 0 1-.5-.5v-13A.5.5 0 0 1 3 1h6.636c.133 0 .26.053.355.147zm-1.006.584-2.94-2.94v2.94z"})]});s(12971);let S={errorNumber:"errorNumber-NtnGpL",warningNumber:"warningNumber-UgutU8",successNumber:"successNumber-YOK23K",errorText:"errorText-u5Q3ns",warningText:"warningText-PymRi4",successText:"successText-ddFAF_",errorButton:"errorButton-jYRQzL",warningButton:"warningButton-KAF3GT",successButton:"successButton-clAJSx",container:"container-ssAvLP",icon:"icon-K6JtIV",description:"description-Ik1PO7",data:"data-J9Vxvq",common:"common-sHeHRd",warning:"warning-HnVMOj"},b=e=>{let{theme:t,number:s,description:i}=e;return(0,r.jsxs)("div",{className:`${S.container} ${S[t]}`,children:[(0,r.jsx)(j.A,{style:{fontSize:"18px",margin:"0 5px"},component:"common"===t?v:A.A}),(0,r.jsx)("span",{className:S.description,children:i}),(0,r.jsx)("span",{className:S.data,children:s})]})};var M=s(15722);s(9077);let z="column-VJtpT7",k="description-nwRikm",w="unit-poAoxV",I="tag-fNEiQ8",P="label-vITl7c",{DirectoryTree:C}=n.A,E=e=>{let t=[];e.files.length&&(t=e.files.map(e=>{let t=e.path.split("/");return{fileName:t.pop(),defaultDir:t.join("/")||"output",size:e.size,initial:e.initial}}));let s=[];return t.forEach(e=>{let t=s.find(t=>t.title===e.defaultDir),i=t||{title:e.defaultDir,key:e.defaultDir,icon:(0,r.jsx)(c.A,{}),children:[]},n=(0,p.C)(e.fileName);t||s.push(i),i.children.push({title:(0,r.jsxs)("div",{className:"treeContainer-jcFlxc",children:[(0,r.jsx)("div",{className:"treeTitle-B083rc",children:e.fileName}),(0,r.jsx)("div",{className:"line-Ia_8Yg"}),(0,r.jsx)(a.A,{className:I,color:"green",children:(0,m.formatSize)(e.size)}),e.initial?(0,r.jsx)(a.A,{className:I,color:"cyan",children:"initial"}):null]}),key:e.fileName,isLeaf:!0,icon:n})}),{treeData:s}},D=e=>{let{treeData:t}=E(e);return(0,r.jsx)(r.Fragment,{children:e.files.length?(0,r.jsx)(f.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,r.jsx)("span",{children:e.count}),children:(0,r.jsx)(C,{defaultExpandAll:!0,selectable:!1,treeData:t,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}})}):e.count})},_=e=>{let{res:t,view:s}=e,i=[{key:"js-files-count",label:"JS files",children:(0,r.jsx)("span",{className:`${k} ${z}`,children:D(t.js.total)})},{key:"css-files-count",label:"CSS files",children:(0,r.jsx)("span",{className:`${k} ${z}`,children:D(t.css.total)})},{key:"font-files-count",label:"Font files",children:(0,r.jsx)("span",{className:`${k} ${z}`,children:D(t.fonts.total)})},{key:"html-files-count",label:"HTML files",children:(0,r.jsx)("span",{className:k,children:D(t.html.total)})},{key:"image-files-count",label:"Image files",children:(0,r.jsx)("span",{className:k,children:D(t.imgs.total)})},{key:"media-files-count",label:"Media files",children:(0,r.jsx)("span",{className:k,children:D(t.media.total)})}],[n,a]=(0,m.formatSize)(t.js.total.size).split(" "),[o,d]=(0,m.formatSize)(t.css.total.size).split(" "),[c,h]=(0,m.formatSize)(t.fonts.total.size).split(" "),[u,p]=(0,m.formatSize)(t.html.total.size).split(" "),[f,g]=(0,m.formatSize)(t.imgs.total.size).split(" "),[x,y]=(0,m.formatSize)(t.media.total.size).split(" "),j=[{key:"js-files-size",label:(0,r.jsx)("span",{className:P,children:"JS size"}),children:(0,r.jsxs)("div",{className:z,children:[(0,r.jsx)("span",{className:k,children:n}),(0,r.jsx)("span",{className:w,children:a})]})},{key:"css-files-size",label:(0,r.jsx)("span",{className:P,children:"CSS size"}),children:(0,r.jsxs)("div",{className:z,children:[(0,r.jsx)("span",{className:k,children:o}),(0,r.jsx)("span",{className:w,children:d})]})},{key:"font-files-size",label:(0,r.jsx)("span",{className:P,children:"Font size"}),children:(0,r.jsxs)("div",{className:z,children:[(0,r.jsx)("span",{className:k,children:c}),(0,r.jsx)("span",{className:w,children:h})]})},{key:"html-files-size",label:(0,r.jsx)("span",{className:P,children:"HTML size"}),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:k,children:u}),(0,r.jsx)("span",{className:w,children:p})]})},{key:"image-files-size",label:(0,r.jsx)("span",{className:P,children:"Image size"}),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:k,children:f}),(0,r.jsx)("span",{className:w,children:g})]})},{key:"media-files-size",label:(0,r.jsx)("span",{className:P,children:"Media size"}),children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:k,children:x}),(0,r.jsx)("span",{className:w,children:y})]})}];return(0,r.jsx)(l.A,{layout:"vertical",className:"bundleOverall-Ay7WmZ",size:"small",column:3,colon:!1,items:"files"===s?i:j})},N=()=>{let[e,t]=(0,i.useState)("size"),s=(0,u.Zp)(),{t:n}=(0,m.useI18n)();return(0,r.jsx)(x.zW,{api:M.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:i=>{let a=(0,m.formatSize)(i.all.total.size);return(0,r.jsx)(g.Zp,{className:y,style:{height:"316px"},children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"title-fNYU5O",children:[(0,r.jsx)("span",{children:n("Bundle Overall")}),(0,r.jsx)(o.Ay,{type:"link",style:{padding:"0px"},onClick:()=>{s(M.Kj.RsdoctorClientRoutes.BundleSize)},children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:n("ViewBundleSize")}),(0,r.jsx)(h.A,{style:{fontSize:"10px"}})]})})]}),(0,r.jsx)(d.A,{options:["Size","Files"],onChange:e=>{t(e.toLocaleLowerCase())},size:"small",style:{marginBottom:8,fontSize:"14px"}}),(0,r.jsx)(b,{theme:"files"===e?"common":"warning",number:"files"===e?i.all.total.count:a,description:`Total ${e}`}),(0,r.jsx)(_,{view:e,res:i})]})})}})};var T=s(71513),B=s(47746),R=s(10944),F=s(51583),$=s(34851);s(76755),s(99566);var O=s(41148),G=s(31376),L=s(57838);let W=e=>{let{plugins:t,defaultDatas:s=[],type:n}=e,{isDark:a}=(0,m.useTheme)(),l=(0,i.useRef)(null),[o,d]=(0,i.useState)([]);return(0,i.useEffect)(()=>{let e=[];t.forEach(t=>{t.data.forEach(s=>{e.push({p:t.hook,n:`${t.tapName}`,s:s.startAt,e:s.endAt})})}),d([...(0,L.QR)(s),...(0,L.QR)(e)])},[]),(0,r.jsx)("div",{className:["loader-chart-container",a?"loader-chart-container_dark":""].join(" ").trim(),ref:l,style:{width:"100%"},children:(0,r.jsx)(G.n,{pluginsData:o,formatterFn:L.kr,chartType:n})})},K=()=>(0,r.jsx)(O.A,{message:(0,r.jsxs)(B.A.Text,{children:[(0,r.jsx)(B.A.Text,{children:"make sure that you have turn on "}),(0,r.jsxs)(B.A.Text,{children:[" ","in configuration for the Rsdoctor plugin."]})]}),type:"info",showIcon:!0});var Y=s(72270);let U=e=>{let{summary:t}=e,{costs:s=[]}=t||{};return s.find(e=>e.name===T.BD.SummaryCostsDataName.Bootstrap)?(0,r.jsx)(f.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Chart of the "Bootstrap -> BeforeCompile" stage'},text:(0,r.jsx)(F.A,{children:"detail"}),children:(0,r.jsx)(x.zW,{api:M.hp.ServerAPI.API.GetPluginData,body:{hooks:["environment","afterEnvironment","entryOption","afterPlugins","afterResolvers","initialize","beforeRun","run","watchRun","normalModuleFactory","contextModuleFactory","beforeCompile"]},children:e=>e&&e.length?(0,r.jsx)(W,{plugins:e,type:Y.wx.Bootstrap}):(0,r.jsx)(K,{})})}):null};var q=s(17617);let H=e=>{let{summary:t}=e,{costs:s=[]}=t||{},i=s.find(e=>e.name===T.BD.SummaryCostsDataName.Done),n='of the "AfterCompile -> Done" stage';return i?(0,r.jsx)(f.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:`Details ${n}`},text:(0,r.jsx)(F.A,{children:"detail"}),children:(0,r.jsx)(x.zW,{api:M.hp.ServerAPI.API.GetPluginData,body:{hooks:["afterCompile","shouldEmit","emit","afterEmit","assetEmitted","done"]},children:e=>e&&e.length?(0,r.jsxs)(F.A,{direction:"vertical",style:{width:"100%"},children:[(0,r.jsx)(g.Zp,{title:`Plugin DataSource of ${n}`,collapsable:!0,children:(0,r.jsx)(q.u,{dataSource:e})}),(0,r.jsx)(R.A,{}),(0,r.jsx)(g.Zp,{title:`Chart ${n}`,children:(0,r.jsx)(W,{plugins:e,type:Y.wx.Done})})]}):(0,r.jsx)(K,{})})}):null},Q=e=>{let{summary:t}=e,{costs:s=[]}=t||{};return s.find(e=>e.name===T.BD.SummaryCostsDataName.Minify)?(0,r.jsx)(f.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Details of the "Minify" stage'},text:(0,r.jsx)(F.A,{children:"detail"}),children:(0,r.jsx)(x.zW,{api:M.hp.ServerAPI.API.GetPluginData,body:{hooks:["processAssets","optimizeChunkAssets"]},children:e=>e&&e.length?(0,r.jsxs)(F.A,{direction:"vertical",style:{width:"100%"},children:[(0,r.jsx)(g.Zp,{title:'Plugin DataSource of the "Minify"',collapsable:!0,children:(0,r.jsx)(q.u,{dataSource:e})}),(0,r.jsx)(R.A,{}),(0,r.jsx)(g.Zp,{title:'Chart of the "Minify"',children:(0,r.jsx)(W,{plugins:e,type:Y.wx.Minify})})]}):(0,r.jsx)(K,{})})}):null};s(61614);let Z=e=>{let{children:t,name:s,showDivider:i=!0}=e;return(0,r.jsxs)(B.A.Text,{style:{color:"inherit"},children:[(0,r.jsx)(B.A.Text,{style:{color:"inherit"},children:s}),i?(0,r.jsx)(R.A,{type:"vertical"}):null,t]})},V=e=>{let{summary:t}=e,{t:s}=(0,m.useI18n)();if(!t?.costs?.length)return null;let i=Math.max(...t.costs.map(e=>e.costs));return(0,r.jsx)(g.Zp,{className:y,children:(0,r.jsx)("div",{children:(0,r.jsxs)(F.A,{style:{wordBreak:"break-all",width:"100%",marginTop:"0"},size:20,direction:"vertical",children:[(0,r.jsx)("div",{className:"title-wq4_QM",children:s("Compile Overall")}),t.costs.map(e=>{let{name:s,costs:n}=e,a=(0,r.jsx)($.A,{className:"progress-y4rFf4",percent:100*n/i,status:"normal",format:()=>(0,m.formatCosts)(n)});switch(s){case T.BD.SummaryCostsDataName.Bootstrap:return(0,r.jsxs)(Z,{name:"Bootstrap ~ BeforeCompile",children:[(0,r.jsx)(U,{summary:t}),a]},s);case T.BD.SummaryCostsDataName.Compile:return(0,r.jsx)(Z,{name:"Compile",showDivider:!1,children:a},s);case T.BD.SummaryCostsDataName.Done:return(0,r.jsxs)(Z,{name:"AfterCompile ~ Done",children:[(0,r.jsx)(H,{summary:t}),a]},s);case T.BD.SummaryCostsDataName.Minify:return(0,r.jsxs)(Z,{name:"Minify",children:[(0,r.jsx)(Q,{summary:t}),a]},s);default:return null}})]})})})};var J=s(13657),X=s(29743),ee=s(51990),et=s(9198),es=s(7284),er=s(86542),ei=s(96905);s(60118);let en=e=>{let{configs:t=[],cwd:s,envinfo:i,alerts:n=[],name:a}=e,{t:o}=(0,m.useI18n)(),d=n.filter(e=>"warn"===e.level).length,c=n.length-d,h=[...a?[{key:"name",label:"Builder",children:a}]:[],...Object.keys(i||{}).map(e=>{let t=/Version$/,s=t.test(e);return{key:e,label:s?e.replace(t,""):e,children:i?i[e]:void 0}}),...t.filter(e=>!!e.version).map(e=>{let{name:t,version:s}=e;return{key:t,label:t,children:s}}),{key:"cwd",label:"cwd",children:s}];return(0,r.jsx)(x.zW,{api:M.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let t=(0,m.formatSize)(e.all.total.size),s=e.all.total.count,[i,n]=t.split(" "),a=[{title:"Errors",description:(0,r.jsx)("span",{style:{color:"#FF4D4F"},children:c}),icon:(0,r.jsx)(J.A,{style:{background:"#FF4D4F"},shape:"circle",icon:(0,r.jsx)(X.A,{style:{fontSize:"18px"}})})},{title:"Warnings",description:(0,r.jsx)("span",{style:{color:"#FAAD14"},children:d}),icon:(0,r.jsx)(J.A,{style:{background:"#FAAD14"},shape:"circle",icon:(0,r.jsx)(ee.A,{style:{fontSize:"18px"}})})},{title:"Total Files",description:(0,r.jsx)("span",{children:s}),icon:(0,r.jsx)(J.A,{style:{background:"#3874F6"},shape:"circle",icon:(0,r.jsx)(et.A,{style:{fontSize:"18px"}})})},{title:"Total Size",description:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{fontSize:"20px"},children:i}),(0,r.jsx)("span",{style:{fontSize:"13px",marginLeft:"5px"},children:n})]}),icon:(0,r.jsx)(J.A,{style:{background:"rgba(226, 129, 73)"},shape:"circle",icon:(0,r.jsx)(es.A,{style:{fontSize:"18px"}})})}];return(0,r.jsx)(g.Zp,{className:y,children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"title-cqt0lp",children:[(0,r.jsx)("span",{className:"left-sk7eLC",children:o("Project Overall")}),(0,r.jsx)(er.U,{})]}),(0,r.jsx)("div",{className:"overview-ZAp1A3",children:a.map((e,t)=>(0,r.jsx)(ei.A,{title:e.title,description:(0,r.jsx)("span",{children:e.description}),icon:e.icon},t))}),(0,r.jsx)(l.A,{className:"projectOverall-T7onhG",items:h})]})})}})}},96905(e,t,s){s.d(t,{A:()=>i,h:()=>n});var r=s(65723);s(58466);let i=e=>{let{title:t,description:s,icon:i,style:n}=e;return(0,r.jsxs)("div",{className:"container-KSV5DZ",style:n,children:[(0,r.jsxs)("div",{className:"content-BsjkSU",children:[(0,r.jsx)("div",{className:"title-jUwqD5",children:t}),(0,r.jsx)("div",{className:"description-ArkOg4",children:s})]}),i]})},n=i},17617(e,t,s){s.d(t,{u:()=>o});var r=s(65723);s(22155);var i=s(78799),n=s(37924),a=s(29166),l=s(47903);let o=e=>{let{dataSource:t}=e;return(0,r.jsx)(i.A,{dataSource:t,rowKey:e=>`${e.tapName}_${e.hook}`,columns:[{title:"Plugin Tap Name",render:(e,t)=>t.tapName},{title:"Hook",render:(e,t)=>t.hook},{title:"calls",render:(e,t)=>(0,r.jsx)(n.A,{title:`"${t.hook}" has been called ${t.data.length} times by "${t.tapName}"`,children:t.data.length}),sorter:(e,t)=>e.data.length-t.data.length},{title:"duration(total)",render:(e,t)=>(0,l.formatCosts)((0,a.x)(t.data,e=>e.costs)),sorter:(e,t)=>(0,a.x)(e.data,e=>e.costs)-(0,a.x)(t.data,e=>e.costs),defaultSortOrder:"descend"}]})}},40176(e,t,s){s.d(t,{c:()=>o});var r=s(65723),i=s(85314),n=s(51583),a=s(47746),l=s(59271);let o=s(22155).memo(e=>{let{title:t="Load data failed, please try again",buttonText:s="retry",retry:o}=e;return(0,r.jsx)(i.A,{description:(0,r.jsxs)(n.A,{direction:"vertical",children:[(0,r.jsx)(a.A.Text,{children:t}),(0,r.jsx)(l.Ay,{type:"primary",onClick:()=>{o()},children:s})]})})})},63674(e,t,s){s.d(t,{Y:()=>o});var r=s(65723),i=s(95524),n=s(85314),a=s(22155),l=s(11467);function o(e){let[t,s]=(0,a.useState)(""),[o,d]=(0,a.useState)(""),[c,h]=(0,a.useState)(""),[u,p]=(0,a.useState)(!1),[m,f]=(0,a.useState)(),[g,x]=(0,a.useState)();return{showCode(e){s(e.code||""),d(e.lang||""),h(e.filePath||""),f(e.defaultLine),x(e.ranges),p(!0)},codeDrawerComponent:(0,r.jsx)(i.A,{maskClosable:!0,zIndex:999,width:"70%",destroyOnClose:!0,title:`Code of "${c}"`,open:u,onClose:()=>p(!1),children:t?(0,r.jsx)(l.Cv,{code:t,lang:o,filePath:c,defaultLine:m,ranges:g}):(0,r.jsx)(n.A,{description:e||"No Code"})})}}},29861(e,t,s){s.d(t,{PE:()=>r.P,zW:()=>i.zW}),s(11123),s(98705),s(3730),s(24184),s(1821);var r=s(5326),i=s(95869);s(68281),s(93685),s(31376)},76464(e,t,s){s.d(t,{U:()=>i,w:()=>n});var r=s(15722);let i="Overall",n=r.Kj.RsdoctorClientRoutes.Overall},75524(e,t,s){s.d(t,{_y:()=>n,dn:()=>d,FO:()=>o,s0:()=>h,aD:()=>sb,hK:()=>l,PR:()=>c,pI:()=>a,d9:()=>u,wm:()=>i});var r,i={};s.r(i),s.d(i,{YW:()=>w,wE:()=>k.w});var n={};s.r(n),s.d(n,{YW:()=>t$,UU:()=>tR,wE:()=>tF});var a={};s.r(a),s.d(a,{YW:()=>tZ,UU:()=>tH,wE:()=>tQ});var l={};s.r(l),s.d(l,{YW:()=>t7,UU:()=>t5,wE:()=>t4});var o={};s.r(o),s.d(o,{YW:()=>ss,UU:()=>se,wE:()=>st});var d={};s.r(d),s.d(d,{YW:()=>su,UU:()=>sc,wE:()=>sh});var c={};s.r(c),s.d(c,{YW:()=>sg,wE:()=>sf});var h={};s.r(h),s.d(h,{BU:()=>sS,wE:()=>sv});var u={};s.r(u),s.d(u,{YW:()=>s_,wE:()=>sD});var p=s(65723),m=s(22155),f=s(31658),g=s(59271),x=s(45164),y=s(24184),j=s(47903);s(50428);let A=[{title:"FAQ",link:"https://rsdoctor.rs/guide/more/faq"},{title:"Introduction",link:"https://rsdoctor.rs/guide/start/intro"},{title:"Bundle Alerts",link:"https://rsdoctor.rs/guide/usage/bundle-alerts"},{title:"Bundle Overall",link:"https://rsdoctor.rs/guide/usage/bundle-overall"},{title:"Bundle Analysis",link:"https://rsdoctor.rs/guide/usage/bundle-size"},{title:"Compilation Alerts",link:"https://rsdoctor.rs/guide/usage/compile-alerts"},{title:"Compile Overall",link:"https://rsdoctor.rs/guide/usage/compile-overall"},{title:"Loaders Analysis",link:"https://rsdoctor.rs/guide/usage/loaders-analysis"},{title:"Loaders Timeline",link:"https://rsdoctor.rs/guide/usage/loaders-timeline"},{title:"Plugin Analysis",link:"https://rsdoctor.rs/guide/usage/plugins-analysis"}],v=()=>{let{t:e}=(0,j.useI18n)();return(0,p.jsx)(y.Zp,{style:{width:"100%",borderRadius:"12px"},children:(0,p.jsxs)("div",{children:[(0,p.jsxs)("div",{className:"title-dP_KVY",children:[(0,p.jsx)("span",{children:e("Help Center")}),(0,p.jsxs)(g.Ay,{style:{display:"flex",alignItems:"center",padding:0},type:"link",onClick:()=>{window.open("https://rsdoctor.rs/index","_blank")},children:[(0,p.jsx)("span",{style:{marginRight:"3px"},children:"More"}),(0,p.jsx)(x.A,{style:{fontSize:"10px"}})]})]}),(0,p.jsx)("div",{className:"container-LiYKWu",children:A.map((t,s)=>{let{title:r,link:i}=t;return(0,p.jsx)("div",{className:"content-WPe5pa",style:{marginBottom:s<A.length-2?"16px":0},onClick:()=>window.open(i,"_blank"),children:e(r)},s)})})]})})};var S=s(11123),b=s(68281);s(35259);let M=e=>{let{children:t}=e;return(0,p.jsx)(f.A,{vertical:!0,className:"layout-izKUgB",children:t.map(e=>(0,p.jsx)("div",{className:"row-RDk0Pl",children:e}))})};var z=s(58530),k=s(76464);let w=()=>{let{project:e}=(0,z.L)();if(!e)return null;let{summary:t,configs:s,root:r,envinfo:i,errors:n,name:a}=e;return(0,p.jsx)("div",{className:"overall-MGHzQh",children:(0,p.jsxs)(f.A,{style:{width:"100%"},children:[(0,p.jsx)("div",{style:{flex:3,marginRight:"16px",maxWidth:"75%"},children:(0,p.jsxs)(M,{children:[(0,p.jsx)(b.DG,{configs:s,cwd:r,envinfo:i,alerts:n,name:a}),(0,p.jsx)(S.mn,{})]})}),(0,p.jsx)("div",{style:{flex:1},children:(0,p.jsxs)(M,{children:[(0,p.jsx)(b.Wf,{errors:n,cwd:r}),(0,p.jsx)(b.Rl,{summary:t}),(0,p.jsx)(v,{})]})})]})})};var I=s(63079),P=s(84585),C=s(14023),E=s(74369),D=s(32277),_=s(67777),N=s(82219),T=s(15722),B=s(59453),R=s(51583),F=s(10944),$=s(47746),O=s(83691),G=s(81355),L=s(37924),W=s(73014),K=s(98516),Y=s(85314),U=s(25199),q=s(29166),H=s(63674),Q=s(98705),Z=s(65390),V=s(1821),J=s(24197),X=s(95869),ee=s(30772),et=s(91077),es=s(28342),er=s(63271),ei=s(13078),en=s.n(ei),ea=s(3730),el=s(93685),eo=s(95524),ed=s(22945);let ec=(0,m.createContext)({setModuleJumpList(e){},moduleJumpList:[]});var eh=s(9396),eu=s(39729),ep=s(18977),em=s(41419),ef=s(17060),eg=s(157),ex=s(643),ey=s(44644);s(95913);let ej="file-tree-com",eA=e=>{let{treeData:t,needJumpto:s=!1,defaultOpenFather:r=0}=e,{required:i,handlers:n}=(0,ey.pk)({id:`${ej}-tree`,data:t||[],defaultOpened:!1,multipleSelect:!1,refreshAsyncNodes:!0}),a=(0,m.useRef)(new Set);(0,m.useEffect)(()=>{a.current.clear()},[t]);let l=(0,m.useCallback)(e=>{let t,{node:i,onToggle:l}=e;if("object"!=typeof i.data||null===i.data||Array.isArray(i.data))return null;let o="function"==typeof i.data.getChildren||Array.isArray(i.data.children)&&i.data.children.length>0;if(r>0&&"number"==typeof i.data.level&&i.data.level<r&&o){let e=i.id;a.current.has(e)||(a.current.add(e),requestAnimationFrame(()=>{n.setOpen(e,!0)}))}let d=(0,Z.C)(i.data.name);return(0,p.jsx)("div",{className:`${ej}-titles-box`,children:(0,p.jsx)("div",{className:`${ej}-titles`,children:(0,p.jsx)(R.A,{direction:"vertical",children:(0,p.jsx)("div",{className:`${ej}-node-title`,children:(0,p.jsxs)(R.A,{children:[(0,p.jsx)("div",{onClick:l,children:(0,p.jsxs)(R.A,{children:[(t="function"==typeof i.data.getChildren||Array.isArray(i.data.children)&&i.data.children.length>0,!i.options.opened&&t?(0,p.jsx)(ef.A,{style:{color:"lightblue"}}):(0,p.jsx)(eg.A,{style:{color:"lightblue"}})),d,(0,p.jsx)(es.A,{content:(0,p.jsx)(p.Fragment,{children:i.data.__RESOURCEPATH__?(0,p.jsx)($.A.Text,{code:!0,children:i.data.__RESOURCEPATH__},`${i.data.name}-popover-path`):(0,p.jsx)(p.Fragment,{})}),title:"INFO",trigger:"hover",children:(0,p.jsx)($.A.Text,{children:i.data.name})},`${i.data.name}popover`)]})}),(0,p.jsx)(R.A,{children:s&&(0,p.jsx)(ec.Consumer,{children:e=>{let{moduleJumpList:t,setModuleJumpList:s}=e;return(0,p.jsx)(ex.A,{onClick:()=>{let e=[...t];e.push(+i.id),s(e)}})}})})]})})})})},i.data.name)},[n,r,s]);return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(ey.Ay,{...i,...n,horizontalLineStyles:{stroke:"#c4c4c4",strokeWidth:2,strokeDasharray:"1 1"},verticalLineStyles:{stroke:"#c4c4c4",strokeWidth:2,strokeDasharray:"1 1"},draggable:!1,depthGap:14,gapMode:"padding",disableLines:!1,disableTransitions:!0,disableHorizontalLines:!1,disableVerticalLines:!1,verticalLineTopOffset:0,verticalLineOffset:5,renderNode:l})})};T.Kj.RsdoctorClientRoutes.ModuleAnalyze;let ev="module-analyze";s(65649);var eS=s(71513);let eb=(0,m.memo)(e=>{let{dependencies:t,cwd:s,module:r}=e,i=(0,m.useMemo)(()=>{let e=r.dependencies.map(e=>{let s=t.find(t=>t.id===e);if(s)return{__RESOURCEPATH__:s.resolvedRequest||"",id:s.dependency,key:s.resolvedRequest,name:(0,j.getShortPath)(s.resolvedRequest)||"",level:1,kind:s.kind,concatModules:void 0}});return eS.AP.compact(e)},[r]);return(0,p.jsx)(I.A,{justify:"start",align:"middle",children:(0,p.jsx)(P.A,{span:24,children:i.length?(0,p.jsx)(eA,{treeData:i,needJumpto:!0,cwd:s}):(0,p.jsx)(Y.A,{})})})}),eM=(e,t)=>{if(e?.imported?.length){let s=e.imported.map(e=>t.find(t=>t.id===Number(e)));return eS.AP.compact(s)}return[]},ez=e=>{let{reasons:t,sideEffectCodes:s,modulePath:r}=e;return t&&t.length||s&&s.length?(0,p.jsxs)(O.A,{className:`${ev}-bailout-card`,bordered:!1,bodyStyle:{padding:20,height:"100%"},children:[t&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)($.A.Text,{strong:!0,className:`${ev}-bailout-card-title`,children:"Bailout Reasons"}),(0,p.jsx)("div",{className:`${ev}-bailout-card-list`,style:{maxHeight:156,overflowY:"auto"},children:t.length>0?t.map((e,t)=>(0,p.jsxs)("div",{className:`${ev}-bailout-card-item`,children:[(0,p.jsx)(es.A,{content:e,trigger:"hover",children:(0,p.jsx)($.A.Paragraph,{ellipsis:{rows:1},className:`${ev}-bailout-card-text`,style:{marginBottom:0},children:e})}),(0,p.jsxs)($.A.Text,{type:"secondary",className:`${ev}-bailout-card-meta`,children:["#",String(t+1).padStart(2,"0")]})]},`${e}-${t}`)):(0,p.jsx)(Y.A,{})})]}),s&&s.length>0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:12*!!t?.length},children:[(0,p.jsx)($.A.Text,{strong:!0,className:`${ev}-bailout-card-title`,children:"Side Effect Codes"}),r&&s[0]&&(0,p.jsx)(L.A,{title:`Open in VSCode: line ${s[0].startLine}`,children:(0,p.jsx)(eu.A,{style:{width:16,height:16,cursor:"pointer",flexShrink:0,marginBottom:12},onClick:()=>(0,eh.jk)({file:r,line:s[0].startLine})})}),r&&s[0]&&(0,p.jsx)(L.A,{title:`Open in Cursor: line ${s[0].startLine}`,children:(0,p.jsx)(ep.A,{style:{width:16,height:16,cursor:"pointer",flexShrink:0,marginBottom:12},onClick:()=>(0,eh.L2)({file:r,line:s[0].startLine})})}),r&&s[0]&&(0,p.jsx)(L.A,{title:`Open in Trae: line ${s[0].startLine}`,children:(0,p.jsx)(em.A,{style:{width:16,height:16,cursor:"pointer",flexShrink:0,marginBottom:12},onClick:()=>(0,eh.bX)({file:r,line:s[0].startLine})})})]}),(0,p.jsx)("div",{className:`${ev}-bailout-card-list`,style:{minHeight:"50vh",display:"flex",flexDirection:"column",gap:12,overflow:"auto"},children:s.map((e,t)=>(0,p.jsx)("div",{className:`${ev}-bailout-card-item`,style:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:8,minHeight:0,flex:"1 1 0"},children:(0,p.jsx)("div",{style:{flex:1,minHeight:0,width:"100%",display:"flex",flexDirection:"column"},children:e.code?(0,p.jsx)(ea.Cv,{code:e.code,ranges:[{start:{line:e.startLine||0,column:0}}],filePath:"",lang:"javascript",style:{flex:1,minHeight:"40vh",width:"100%"},isLightTheme:!1,formatOnMount:!0}):(0,p.jsx)(Y.A,{})})},`${e.moduleId}-${t}`))})]})]}):(0,p.jsx)(O.A,{className:`${ev}-bailout-card`,bordered:!1,bodyStyle:{padding:20,height:"100%"},children:(0,p.jsx)(Y.A,{})})},ek=e=>{let{curModule:t,modules:s,dependencies:r,cwd:i,activeTabKey:n,selectedChunk:a=""}=e,[l,o]=(0,m.useState)([]),{data:d}=(0,m.useMemo)(()=>l&&l?.length?{data:eS.AP.compact(l?.map((e,r)=>({key:`0-${r}`,name:(0,j.getShortPath)(e.path),__RESOURCEPATH__:e.path,id:e.id,level:0,chunks:e.chunks,size:(0,j.formatSize)(e.size.parsedSize),kind:e.kind,concatModules:e.concatenationModules,fatherPath:(0,j.getShortPath)(t.path),dependencies:e.dependencies,getChildren:()=>(function e(t,s,r,i){let n=eM(t,s),a=i+1;return n?.map((i,n)=>({key:`0-${n}`,name:(0,j.getShortPath)(i.path),__RESOURCEPATH__:i.path,id:i.id,level:a,size:(0,j.formatSize)(i.size.parsedSize),kind:i.kind,chunks:i.chunks,concatModules:i.concatenationModules,fatherPath:(0,j.getShortPath)(r.path),dependencies:i.dependencies,getChildren:()=>e(i,s,t,a),children:i.imported}))})(e,s,t,0),children:e.imported})))}:{filterData:[],data:[]},[l,t]);(0,m.useEffect)(()=>{o(eM(t,s))},[t,s]);let c=(0,m.useMemo)(()=>n===eC[eC.Reasons]?l?(0,p.jsx)(eA,{cwd:i,treeData:d,needCode:!0,needShowAllTree:!0,needJumpto:!0,selectedChunk:a,defaultOpenFather:1}):(0,p.jsx)(Y.A,{className:`${ev}-empty`}):(0,p.jsx)("div",{className:`${ev}-file-tree`,style:{padding:C.or.BasePadding/2},children:(0,p.jsx)(P.A,{span:24,style:{marginTop:C.or.BasePadding/2},children:t?(0,p.jsx)(eb,{module:t,dependencies:r,cwd:i}):(0,p.jsx)(Y.A,{className:`${ev}-empty`})})}),[n,t,r,d,l,i,a]);return(0,p.jsx)(p.Fragment,{children:c})};var ew=s(33792),eI=s(2423),eP=s(80479),eC=((r={})[r.Reasons=0]="Reasons",r[r.Dependencies=1]="Dependencies",r);let eE=[{key:eC[0],label:eC[0]},{key:eC[1],label:eC[1]}],eD=e=>{let{modules:t,cwd:s,moduleId:r,show:i,setShow:n}=e,[a,l]=(0,m.useState)(""),[o,d]=(0,m.useState)(eC[0]);return(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetModuleDetails,body:{moduleId:+r},children:e=>{let{module:r,dependencies:l,sideEffectCodes:c}=e;return(0,p.jsx)(eo.A,{title:(0,p.jsxs)("div",{className:"module-analyze-box",children:[(0,p.jsx)($.A.Text,{children:(0,j.getShortPath)(r.path)}),(0,p.jsx)($.A.Text,{style:{fontSize:12,color:"rgba(0, 0, 0, 0.45)"},children:`Current Module: ${r.path}`})]}),open:i,maskClosable:!0,width:.8*C.Y7,onClose:()=>n(!1),children:(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAllChunkGraph,body:{},children:e=>(0,p.jsx)(ec.Consumer,{children:e=>{let{moduleJumpList:i,setModuleJumpList:n}=e;return(0,p.jsx)(G.A,{defaultActiveKey:"bailout",items:[{key:"moduleTree",label:"Module Tree",children:(0,p.jsx)(O.A,{style:{minHeight:400},tabList:eE,activeTabKey:o,tabProps:{size:"small",style:{fontSize:12}},onTabChange:e=>d(e),styles:{title:{paddingTop:0}},title:(0,p.jsxs)(R.A,{style:{padding:"10px 0px"},children:[(0,p.jsx)(ew.A,{onClick:()=>{n([...i.slice(0,-1)])}}),(0,p.jsx)($.A.Text,{style:{fontSize:14,color:"rgba(28, 31, 35, 0.8)"},children:"Current Module Imported Reasons Tree"}),(0,p.jsx)(es.A,{content:(0,p.jsx)("div",{children:(0,p.jsxs)("div",{children:[(0,p.jsx)(ed.A,{status:"success",text:" "}),(0,p.jsx)(eI.A,{}),(0,p.jsx)($.A.Text,{children:": Jump button, click to jump to the Module dependency analysis page of this module."})]})}),title:"Usage",children:(0,p.jsx)(eP.A,{})})]}),children:(0,p.jsx)(ek,{curModule:r,modules:t,dependencies:l,cwd:s,selectedChunk:a,activeTabKey:o})})},{key:"bailout",label:"Bailout",children:(0,p.jsx)("div",{style:{marginTop:16},children:(0,p.jsx)(ez,{reasons:r.bailoutReason,sideEffectCodes:c,modulePath:r.path})})}]})}})})})}})};s(91464);let e_={assets:"assets-ll1P_L",assetBox:"assetBox-Y8vGse",fileText:"fileText-W0quVZ","bundle-tree":"bundle-tree-IbtEQg",bundleTree:"bundle-tree-IbtEQg",box:"box-On1BLb",keyword:"keyword-PqQzB1",divider:"divider-asnppW",dividerDiv:"dividerDiv-s50mAr",assetsTag:"assetsTag-eAVvyj",bundle:"bundle-cPw2Kc",modal:"modal-afyzYa","search-btn":"search-btn-To902q",searchBtn:"search-btn-To902q","search-modal-list":"search-modal-list-G_Uxc8",searchModalList:"search-modal-list-G_Uxc8"},{DirectoryTree:eN}=et.A,eT=[],eB={margin:"none",marginInlineEnd:0},eR=()=>(0,p.jsx)(Y.A,{description:`Do not have the module code.
|
|
82
|
+
(1) If you use the brief mode, there will not have any codes to show.
|
|
83
|
+
(2) If you use lite mode, there will not have source codes.`}),eF=e=>{let{data:t}=e,[s,r]=(0,m.useState)(""),{t:i}=(0,j.useI18n)(),n={source:"Source Code",transformed:`Transformed Code(${i("After Compile")})`,parsedSource:`Bundled Code(${i("After Bundled")})`};if(!t)return null;let{path:a}=t;return(0,p.jsx)(el.hX,{text:"",buttonProps:{size:"small",icon:(0,p.jsx)(es.A,{content:"Open the Codes Box",children:(0,p.jsx)(_.A,{})}),type:"default"},buttonStyle:{padding:"0 4px"},drawerProps:{destroyOnClose:!0,title:`Code of "${a}"`},children:(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:t.id},children:e=>(0,p.jsx)(p.Fragment,{children:e.source||e.parsedSource||e.transformed?(0,p.jsx)(O.A,{className:"code-size-card",style:{width:"100%"},tabList:Object.keys((0,er.z)(e,e=>!e)).map(e=>({tab:e})).map(e=>({...e,tab:n[e.tab],key:e.tab})),defaultActiveTabKey:e.parsedSource?"parsedSource":"source",onTabChange:e=>r(e),tabBarExtraContent:(0,p.jsx)(es.A,{placement:"bottom",title:(0,p.jsx)($.A.Title,{level:5,children:"Explain"}),content:(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginBottom:30},children:[(0,p.jsxs)("div",{children:[(0,p.jsx)($.A.Text,{strong:!0,children:"Source: "}),(0,p.jsx)($.A.Text,{children:"source code"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)($.A.Text,{strong:!0,children:"Transformed:"}),(0,p.jsx)($.A.Text,{children:"Transformed Code (After compile)"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)($.A.Text,{strong:!0,children:"Bundled Source:"}),(0,p.jsx)($.A.Text,{children:"Bundled Code (After bundle and tree-shaking)"})]}),(0,p.jsx)("br",{}),(0,p.jsx)($.A.Text,{strong:!0,children:"More"}),(0,p.jsx)($.A.Text,{children:i("CodeModeExplain")})]})}),trigger:"hover",children:(0,p.jsx)("a",{href:"#",children:"Explain"})}),styles:{body:{padding:0,overflow:"hidden"}},children:e.parsedSource||e.source||e.transformed?(0,p.jsx)(ea.Cv,{isEmbed:!0,code:s?e[s]:e.parsedSource?e.parsedSource:e.source,filePath:a}):(0,p.jsx)(eR,{})}):(0,p.jsx)(eR,{})})})})},e$=e=>{let{id:t,show:s,setShow:r,cwd:i}=e;return t?(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAllModuleGraph,body:{},children:e=>(0,p.jsx)(eD,{cwd:i,moduleId:t,modules:e,show:s,setShow:r})}):null},eO="__RESOURCEPATH__",eG=e=>{let{modules:t,chunks:s,filteredModules:r}=e,{sourceSize:i,parsedSize:n,filteredParsedSize:a,filteredSourceSize:l}=(0,m.useMemo)(()=>({sourceSize:(0,q.x)(t,e=>e.size.sourceSize),parsedSize:(0,q.x)(t,e=>e.size.parsedSize),filteredSourceSize:(0,q.x)(r,e=>e.size.sourceSize),filteredParsedSize:(0,q.x)(r,e=>e.size.parsedSize)}),[t,r]);return(0,p.jsxs)(R.A,{children:[(0,p.jsx)(L.A,{title:`total modules count is ${t.length}, the filtered modules count is ${r.length}`,children:(0,p.jsxs)(R.A,{children:[(0,p.jsxs)($.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Modules: ",r.length," / ",t.length]}),(0,p.jsx)(D.A,{})]})}),(0,p.jsx)(F.A,{type:"vertical"}),(0,p.jsx)(L.A,{title:(0,p.jsxs)(R.A,{direction:"vertical",children:[(0,p.jsxs)($.A.Text,{style:{color:"inherit"},children:["Total modules bundled size: ",(0,j.formatSize)(n)]}),(0,p.jsxs)($.A.Text,{style:{color:"inherit"},children:["Total modules source size: ",(0,j.formatSize)(i)]}),(0,p.jsxs)($.A.Text,{style:{color:"inherit"},children:["Filtered modules bundled size: ",(0,j.formatSize)(a)]}),(0,p.jsxs)($.A.Text,{style:{color:"inherit"},children:["Filtered modules source size: ",(0,j.formatSize)(l)]})]}),children:(0,p.jsxs)(R.A,{children:[(0,p.jsxs)($.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Modules Size:",a===n?(0,j.formatSize)(n):`${(0,j.formatSize)(a)} / ${(0,j.formatSize)(n)}`]}),(0,p.jsx)(D.A,{})]})}),(0,p.jsx)(F.A,{type:"vertical"}),(0,p.jsx)(L.A,{title:(0,p.jsxs)(R.A,{direction:"vertical",children:[(0,p.jsxs)($.A.Text,{style:{color:"inherit"},children:["this asset includes ",s.length," chunks:"]}),s.map(e=>(0,p.jsx)(Q.Ex,{label:"chunk",value:e.name},e.name))]}),children:(0,p.jsxs)(R.A,{children:[(0,p.jsxs)($.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Chunks: ",s.length]}),(0,p.jsx)(D.A,{})]})})]})},eL=e=>{let{moduleCount:t}=e;return(0,p.jsx)(L.A,{title:(0,p.jsx)(R.A,{children:(0,p.jsxs)($.A.Text,{style:{color:"inherit"},children:["This is a concatenated container module that includes ",t," ","modules"]})}),children:(0,p.jsx)(W.A,{color:"blue",style:eB,children:"concatenated container"})})},eW=e=>{let{size:t}=e;return(0,p.jsx)(L.A,{title:(0,p.jsx)(R.A,{children:(0,p.jsx)($.A.Text,{style:{color:"inherit"},children:"The total output size of all the files in this folder. If you enabled minification, this value shows the minified size."})}),children:(0,p.jsx)(W.A,{style:eB,color:"geekblue",children:`bundled size: ${(0,j.formatSize)(t)}`})})},eK=e=>{let{size:t}=e;return(0,p.jsx)(L.A,{title:(0,p.jsx)(R.A,{children:(0,p.jsx)($.A.Text,{style:{color:"inherit"},children:"The final output size of this file. If you enabled minification, this value shows the minified size."})}),children:(0,p.jsx)(W.A,{color:"geekblue",children:`bundled size: ${(0,j.formatSize)(t)}`})})},eY=e=>{let{size:t}=e;return(0,p.jsx)(L.A,{title:(0,p.jsx)(R.A,{children:(0,p.jsx)($.A.Text,{style:{color:"inherit"},children:"The compressed file size that users actually download, as most web servers use gzip compression."})}),children:(0,p.jsx)(W.A,{color:"orange",children:`gzipped: ${(0,j.formatSize)(t)}`})})},eU=e=>{let{size:t}=e;return(0,p.jsx)(L.A,{title:(0,p.jsx)(R.A,{children:(0,p.jsx)($.A.Text,{style:{color:"inherit"},children:"The total original size of all the files in this folder, before any transformations and minification."})}),children:(0,p.jsx)(W.A,{style:eB,color:"cyan",children:`source size: ${(0,j.formatSize)(t)}`})})},eq=e=>{let{size:t}=e;return(0,p.jsx)(L.A,{title:(0,p.jsx)(R.A,{children:(0,p.jsx)($.A.Text,{style:{color:"inherit"},children:"The original size of this file, before any transformations and minification."})}),children:(0,p.jsx)(W.A,{color:"cyan",children:`source size: ${(0,j.formatSize)(t)}`})})},eH=e=>{let{asset:t,chunks:s,modules:r,moduleSizeLimit:i,height:n,root:a}=e,[l,o]=(0,m.useState)(""),[d,c]=(0,m.useState)(!1),[h,u]=(0,m.useState)([]),[f,x]=(0,m.useState)(!1),y=(0,m.useMemo)(()=>{let e=r.slice();if(l){let t=RegExp(l,"i");e=e.filter(e=>t.test(e.path))}return i&&(e=e.filter(e=>e.size.parsedSize>=i)),e},[r,l,i]),A=(0,m.useMemo)(()=>(0,j.createFileStructures)({files:y.map(e=>e.path).filter(Boolean),inlinedResourcePathKey:eO,fileTitle(e,t){let s=y.find(t=>t.path.replace(/\\/g,"/")===e.replace(/\\/g,"/"));if(!s)return t;let{parsedSize:i=0,sourceSize:n=0,gzipSize:a=0}=s.size,l=s.kind===T.hp.ModuleKind.Concatenation,o=!l&&0===i&&r.filter(e=>e!==s&&e.modules&&e.modules.indexOf(s.id)>-1);return(0,p.jsxs)("div",{className:e_["bundle-tree"],children:[(0,p.jsx)(es.A,{content:`Open the ${t}’s module reasons tree.`,placement:"bottom",children:(0,p.jsxs)("div",{className:e_.box,onClick:()=>{u([s.id]),x(!0)},children:[(0,p.jsx)("div",{className:e_.keywords,children:(0,p.jsx)(J.i,{ellipsis:!0,text:t,keyword:""})}),(0,p.jsx)("div",{className:e_.dividerDiv,children:(0,p.jsx)(F.A,{className:e_.divider,dashed:!0})})]})}),(0,p.jsxs)(R.A,{children:[0!==i?(0,p.jsx)(p.Fragment,{children:"number"==typeof a?(0,p.jsx)(es.A,{placement:"bottom",content:(0,p.jsx)(eq,{size:n}),children:(0,p.jsxs)(R.A,{direction:"horizontal",children:[(0,p.jsx)(eK,{size:i}),(0,p.jsx)(eY,{size:a})]})}):(0,p.jsxs)(R.A,{direction:"horizontal",children:[(0,p.jsx)(eK,{size:i}),(0,p.jsx)(eq,{size:n})]})}):0!==n?(0,p.jsx)(eq,{size:n}):null,l?(0,p.jsx)(eL,{moduleCount:s.modules?.length||0}):null,o&&o.length?(0,p.jsx)(L.A,{title:(0,p.jsxs)(R.A,{direction:"vertical",children:[(0,p.jsx)($.A.Text,{style:{color:"inherit"},children:"This module is concatenated into another container module:"}),o.map(e=>{let{id:t,path:r}=e;if((0,j.isJsDataUrl)(r))return(0,p.jsx)($.A.Paragraph,{ellipsis:{rows:4},style:{color:"inherit",maxWidth:"100%"},code:!0,children:r},t);let i=(0,ei.relative)((0,ei.dirname)(s.path),r);return i.startsWith("javascript;charset=utf-8;base64,")?(0,p.jsx)($.A.Text,{style:{color:"inherit",maxWidth:"100%"},code:!0,children:"."===i[0]?i:`./${i}`},t):(0,p.jsx)($.A.Text,{style:{color:"inherit"},code:!0,children:"."===i[0]?i:`./${i}`},t)})]}),children:(0,p.jsx)(W.A,{color:"green",children:"concatenated"})}):null,(0,p.jsx)(eF,{data:s})]})]})},dirTitle(e,t){let s=function e(t,s){return t.children&&t.children.forEach(t=>{t.isLeaf?s.push(t[eO]):e(t,s)}),s}(e,[]);if(s.length){let e=s.map(e=>r.find(t=>t.path.replace(/\\/g,"/")===e.replace(/\\/g,"/"))),i=(0,q.x)(e,e=>e?.size?.parsedSize||0),n=(0,q.x)(e,e=>e?.size?.sourceSize||0);return(0,p.jsxs)("div",{className:e_["bundle-tree"],children:[(0,p.jsxs)("div",{className:e_.box,children:[(0,p.jsx)("div",{className:e_.keywords,children:(0,p.jsx)(J.i,{ellipsis:!0,text:t,keyword:""})}),(0,p.jsx)("div",{className:e_.dividerDiv,children:(0,p.jsx)(F.A,{className:e_.divider,dashed:!0})})]}),(0,p.jsx)(R.A,{children:i>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(eW,{size:i}),(0,p.jsx)(eU,{size:n})]}):(0,p.jsx)(eU,{size:n})})]})}return t},page:"bundle"}),[y]);return(0,m.useEffect)(()=>{o(""),c(!1)},[t]),(0,m.useEffect)(()=>{c(!1)},[l]),(0,p.jsx)(ec.Provider,{value:{moduleJumpList:h,setModuleJumpList:u},children:(0,p.jsxs)(O.A,{className:e_.bundle,title:`Modules of "${t.path}"`,bodyStyle:{minHeight:n},size:"small",children:[r.length?(0,p.jsxs)(I.A,{children:[(0,p.jsx)(P.A,{span:24,children:(0,p.jsx)(eG,{modules:r,chunks:s,filteredModules:y})}),(0,p.jsx)(P.A,{span:24,children:(0,p.jsxs)(R.A,{children:[(0,p.jsx)(V.E,{placeholder:"search module by keyword",onChange:e=>o(e)},t.path),(0,p.jsx)(g.Ay,{onClick:()=>c(!0),size:"small",icon:(0,p.jsx)(ee.A,{})})]})}),(0,p.jsx)(P.A,{span:24,style:{marginTop:C.or.BasePadding},children:y.length?(0,p.jsx)(eN,{selectable:!1,defaultExpandAll:d||y.length<=20,onExpand:e=>{eT=e},defaultExpandParent:!0,defaultExpandedKeys:eT?.length?eT:1===A.length?[A[0].key]:[],treeData:A,rootStyle:{maxHeight:"500px",overflow:"auto",border:"1px solid rgba(235, 237, 241)",padding:"14px 20px"}},`tree_${l}_${d}_${t.path}`):(0,p.jsx)(Y.A,{description:(0,p.jsx)($.A.Text,{strong:!0,children:`"${l}" can't match any modules`})})})]}):(0,p.jsx)(Y.A,{description:(0,p.jsx)($.A.Text,{strong:!0,children:`"${t.path}" doesn't have any modules`})}),(0,p.jsx)(e$,{id:h?.length?h[h.length-1]:"",show:f,setShow:x,cwd:a})]})})};var eQ=s(80192),eZ=s(52751),eV=s(13657),eJ=s(9198),eX=s(70283),e0=s(17830),e1=s(34851);s(56071);let e2="dataContainer-lJ0PuO",e5="title-Gj8JxL",e4="description-miJCbD",{DirectoryTree:e3}=et.A,e7=e=>{let{files:t,total:s,showProgress:r=!1,type:i}=e,n=i.toLocaleLowerCase(),a=(0,m.useMemo)(()=>(0,q.x)(t,e=>e.size),[t]);return(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let i=n.includes("image")?"imgs":n,{treeData:l}=(0,b.oc)(e[i].total);return(0,p.jsxs)(R.A,{style:{height:100},align:"center",children:[(0,p.jsx)(e1.A,{type:"circle",percent:+(a/s*100).toFixed(2),strokeColor:{"0%":"#108ee9","100%":"#108ee9"},strokeWidth:12,format:e=>(0,p.jsxs)("div",{className:"percentContainer-VJxs6L",children:[(0,p.jsxs)("span",{style:{marginTop:"10px"},children:[e,"%"]}),(0,p.jsxs)("span",{className:"percentDescription-ymSkb_",children:["total ",i]})]})}),(0,p.jsxs)("div",{style:{marginLeft:"10px"},children:[(0,p.jsxs)("div",{className:e2,children:[(0,p.jsx)("div",{className:e5,children:"Size"}),(0,p.jsx)("div",{className:e4,children:(0,j.formatSize)(a)})]}),(0,p.jsx)(el.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,p.jsx)(R.A,{style:{textAlign:r?"left":"center"},align:"end",children:(0,p.jsx)(R.A,{direction:"vertical",children:(0,p.jsx)("div",{className:e2,children:(0,p.jsxs)("div",{className:e5,children:[(0,p.jsx)("span",{style:{marginRight:"5px"},children:"Files"}),(0,p.jsx)(x.A,{})]})})})}),children:l.length?(0,p.jsx)(e3,{defaultExpandAll:!0,selectable:!1,treeData:l,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}}):(0,p.jsx)("div",{style:{position:"relative",top:"50%",transform:"translateY(-50%)"},children:(0,p.jsx)(Y.A,{style:{height:"100%"}})})}),(0,p.jsx)("div",{className:e4,children:t.length})]})]})}})};var e6=s(96905);s(86234);let{DirectoryTree:e9}=et.A,{useToken:e8}=eQ.A,{innerWidth:te}=window,tt=e=>{let{showProgress:t=!1,data:s,total:r,tagBgColor:i,type:n}=e,{token:a}=e8(),l=i||a.colorPrimaryBorderHover;return(0,p.jsx)(e7,{type:n,files:s.files,total:r,showProgress:t,tagBgColor:l})},ts=e=>{let{titles:t,datas:s,bgColor:r,type:i}=e,[n,a]=(0,m.useState)(t[0]),l=(0,m.useMemo)(()=>t.indexOf(n),[t,n]),o=l>=0?l:0,d=i||n||t[0],c=o>=0&&o<s.length?s[o]:s[0]||{};return(0,p.jsx)(e0.j,{title:(0,p.jsxs)("div",{className:"cardTitle-xNmEfV",children:[(0,p.jsx)("div",{className:"title-qIR7dd",children:d}),t.length>1?(0,p.jsx)(eZ.A,{defaultValue:t[0],options:t,onChange:e=>{a(e)},size:"small",style:{transition:"transform 0.3s ease"},value:n}):null]}),value:(0,p.jsx)(tt,{type:d,...c,tagBgColor:r?.tagBgColor}),boxProps:{style:{background:r?.bgColor,width:te>1300?"80%":"95%"}}})},tr=e=>{let{errors:t,summary:s}=e,r=(0,j.useDuplicatePackagesByErrors)(t),[i,n]=(0,j.formatSize)(s.all.total.size).split(" "),a=[(0,p.jsx)(ts,{type:"JS",titles:["Total","Initial"],datas:[{data:s.js.total,total:s.all.total.size,showProgress:!0},{data:s.js.initial,total:s.all.total.size,showProgress:!0}]}),(0,p.jsx)(ts,{type:"CSS",titles:["Total","Initial"],datas:[{data:s.css.total,total:s.all.total.size,showProgress:!0},{data:s.css.initial,total:s.all.total.size,showProgress:!0}]}),(0,p.jsx)(ts,{titles:["Images","Fonts","Media"],datas:[{data:s.imgs.total,total:s.all.total.size,showProgress:!0},{data:s.fonts.total,total:s.all.total.size,showProgress:!0},{data:s.media.total,total:s.all.total.size,showProgress:!0}]}),(0,p.jsx)(ts,{type:"HTML",titles:["HTML Files"],datas:[{data:s.html.total,total:s.all.total.size,showProgress:!0}]})];return(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let{treeData:t}=(0,b.oc)(e.all.total);return(0,p.jsxs)("div",{className:"container-wODg_6",children:[(0,p.jsxs)("div",{className:"summary-zj0ygd",children:[(0,p.jsx)(e6.h,{title:(0,p.jsx)(el.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,p.jsxs)("div",{style:{color:"#000000a6"},children:[(0,p.jsx)("span",{style:{marginRight:"5px"},children:"Total Files"}),(0,p.jsx)(x.A,{})]}),children:(0,p.jsx)(e9,{defaultExpandAll:!0,selectable:!1,treeData:t,rootStyle:{minHeight:"800px",border:"1px solid rgba(235, 237, 241)"}})}),description:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("span",{className:"description-o0ffpO",children:i}),(0,p.jsx)("span",{className:"unit-n5Yty6",children:n}),(0,p.jsxs)("div",{className:"totalNumber-UweUl8",children:[(0,p.jsx)("span",{style:{marginRight:"7px"},children:"Number of files"}),(0,p.jsx)("span",{style:{fontWeight:500},children:s.all.total.count})]})]}),icon:(0,p.jsx)(eV.A,{style:{background:"#3874F6"},shape:"circle",icon:(0,p.jsx)(eJ.A,{style:{fontSize:"18px"}})}),style:{marginBottom:"12px",minWidth:"210px"}}),(0,p.jsx)(e6.h,{style:{minWidth:"210px"},title:(0,p.jsx)("div",{style:{margin:"4px 0"},children:(0,p.jsx)("span",{style:{marginRight:"5px"},children:"Duplicate Packages"})}),description:r.length,icon:(0,p.jsx)(eV.A,{style:{background:"#13C2C2"},shape:"circle",icon:(0,p.jsx)(eX.A,{style:{fontSize:"18px"}})})})]}),(0,p.jsx)(F.A,{style:{height:"200px"},type:"vertical"}),(0,p.jsx)("div",{className:"chartsContainer-msRyOd",children:a.map((e,t)=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:"chart-GmBMa_",children:e},t),t!==a.length-1?(0,p.jsx)(F.A,{style:{height:"200px"},type:"vertical"},`${t}-divider`):null]}))})]})}})};s(19343);var ti=s(37786),tn=s(51869),ta=s(88451),tl=s(79682),to=s(29861),td=s(38616);let{Search:tc}=ti.A,th=e=>{let{onModuleClick:t,onClose:s,open:r,setOpen:i,isIcon:n=!1}=e,[a,l]=(0,m.useState)(!1),[o,d]=(0,m.useState)(""),[c,h]=(0,m.useState)(""),u=void 0!==r?r:a,f=i||l,x=(0,m.useCallback)(function(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let[r,i]=t;d(r)},[]),y=()=>{f(!0)},j=()=>{f(!1),s?.()},A=()=>{f(!1),s?.()};return(0,p.jsxs)(p.Fragment,{children:[n?(0,p.jsx)(td.A,{onClick:y}):(0,p.jsx)(g.Ay,{className:e_["search-btn"],color:"cyan",onClick:y,children:"Search Module"}),(0,p.jsx)(to.zW,{api:T.hp.ServerAPI.API.GetSearchModules,body:{moduleName:String(o)},children:e=>{let r=Object.keys(e)[0];return(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(tn.A,{className:e_.modal,title:"Search Modules",onOk:j,onCancel:A,open:u,width:"65rem",footer:"",children:[(0,p.jsx)(tc,{placeholder:"input search module name",allowClear:!0,onSearch:x,style:{width:500}}),r?(0,p.jsx)(G.A,{defaultActiveKey:r,tabPosition:"top",onChange:e=>h(e),items:Object.keys(e).map((i,n)=>({label:e[i],key:i,children:tu(o,c||r,e=>{t?.(e),f(!1),s?.()})}))}):(0,p.jsx)(Y.A,{description:"No modules found."})]})})}})]})},tu=(e,t,s)=>(0,p.jsx)(to.zW,{api:T.hp.ServerAPI.API.GetSearchModuleInChunk,body:{moduleName:String(e),chunk:t},children:t=>(0,p.jsx)(p.Fragment,{children:t?.length!==0?(0,p.jsx)(ta.A,{className:e_["search-modal-list"],loading:!t.length,itemLayout:"horizontal",pagination:{position:"bottom",align:"center"},dataSource:t,renderItem:t=>{let r=t.relativePath.split(e);return(0,p.jsx)(ta.A.Item,{className:s?"search-list-item clickable":"search-list-item",onClick:s?()=>s(t):void 0,children:(0,p.jsx)(tl.A,{avatar:!0,title:!1,loading:!t.path,active:!0,children:(0,p.jsx)(ta.A.Item.Meta,{description:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)($.A.Text,{code:!0,children:"Module:"}),r.map((t,s)=>s<r.length-1?(0,p.jsxs)($.A.Text,{style:{fontWeight:200},children:[t,(0,p.jsx)($.A.Text,{strong:!0,style:{fontWeight:600},children:e},`${t}-${s}-strong`)]},`${t}-${s}`):(0,p.jsx)($.A.Text,{style:{fontWeight:200},children:t}))]})},`${t.path}-${t.relativePath}-meta`)})},`${t.path}-${t.relativePath}`)}}):(0,p.jsx)(Y.A,{})})});var tp=s(16762),tm=s(36473),tf=s(84222),tg=s(41522),tx=s(98038),ty=s(10017),tj=s(30574),tA=s(65925),tv=s(41148),tS=s(37893),tb=s(7147),tM=s(42396),tz=s(82990),tk=s(61411);s(61019);let tw="collapsed-hxz3Bf";var tI=s(72270);function tP(e){let t=5381;for(let s=0;s<e.length;s++)t=(t<<5)+t+e.charCodeAt(s);return t>>>0}function tC(e,t){let s=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16),n=Math.round(s*t+255*(1-t)),a=Math.round(r*t+255*(1-t)),l=Math.round(i*t+255*(1-t));return`#${n.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${l.toString(16).padStart(2,"0")}`}tm.Y([tx.a,ty.a,tj.a,tA.a]);let tE=(0,m.memo)(e=>{let{treeData:t,sizeType:s,style:r,onChartClick:i,highlightNodeId:n,centerNodeId:a,rootPath:l}=e,[o,d]=(0,m.useState)(null),c=m.useRef(null),h=m.useRef([]),u=m.useRef(null);return(0,m.useEffect)(()=>{if(!t)return;let e=t.map((e,r)=>(function e(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3?arguments[3]:void 0,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,d=arguments.length>6?arguments[6]:void 0,c=a||tI.GB[r%tI.GB.length],h=0===i?t.path||t.name||"":d||"",u=t.children?.map((s,n)=>e(s,r,i+1,c,n,t.children?.length||0,h)),p=0;"stat"===s?p=t.sourceSize||0:"parsed"===s?p=t.bundledSize||0:"gzip"===s?p=t.gzipSize||0:"value"===s&&(p=t.value||0),!p&&t.value&&(p=t.value);let m=tP(0===i?t.path||t.name||"":`${h}::${t.path||t.name||""}`),f=n===m,g=0===i?1:Math.max(.35,1-.15*i),x=0===i?1:Math.max(.4,1-.15*i),y=o>1?1-l/(o-1)*.15:1,j=f?"#fff5f5":0===i?tC(c,.8):tC(c,g*y),A=f?"#ff4d4f":0===i?c:tC(c,x*y),v=.4>function(e){let[t,s,r]=[parseInt(e.slice(1,3),16)/255,parseInt(e.slice(3,5),16)/255,parseInt(e.slice(5,7),16)/255].map(e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4));return .2126*t+.7152*s+.0722*r}(j),S=v?"#ffffff":"#000000",b={id:m,name:t.name,value:p,path:t.path||t.name,sourceSize:t.sourceSize??("stat"===s?p:void 0),bundledSize:t.bundledSize??("parsed"===s?p:void 0),gzipSize:t.gzipSize??("gzip"===s?p:void 0),moduleId:t.id,itemStyle:{borderWidth:f?4:1,color:j,borderColor:A,...0===i&&{gapWidth:2}},label:{show:!0,color:S,textBorderColor:v?"rgba(255, 255, 255, 0.2)":"rgba(0, 0, 0, 0.1)",textBorderWidth:1},upperLabel:0===i?void 0:{show:!0,color:S}};return u&&u.length>0&&(b.children=u),f?b.emphasis={itemStyle:{borderColor:"#ff4d4f",borderWidth:4,color:"#fff5f5"}}:b.emphasis={itemStyle:{color:j,borderColor:A,borderWidth:f?4:1}},b})(e,r,0,void 0,r,t.length,void 0)).filter(e=>"number"==typeof e.value&&e.value>0||e.children&&e.children.length>0);h.current=e,d({color:tI.GB,tooltip:{padding:10,backgroundColor:"#fff",borderColor:"#eee",borderWidth:1,textStyle:{color:"rgba(0, 0, 0, 0.8)"},confine:!0,extraCssText:"max-width: 450px; word-wrap: break-word;",position:function(e,t,s,r,i){let n={top:e[1]+10};return e[0]<i.viewSize[0]/2?n.left=e[0]+10:n.right=i.viewSize[0]-e[0]+10,n},formatter:function(e){let t=e.data||{},r="string"==typeof t.path?t.path:"string"==typeof t.name?t.name:String(t.name??"");if(l&&r){let e=l.replace(/\\/g,"/").replace(/\/$/,""),t=r.replace(/\\/g,"/");t.startsWith(e+"/")?r=t.slice(e.length+1):t===e&&(r="")}let i="number"==typeof t.sourceSize&&t.sourceSize>0?t.sourceSize:"number"==typeof t.value&&t.value>0&&"stat"===s?t.value:void 0,n="number"==typeof t.bundledSize&&t.bundledSize>0?t.bundledSize:void 0,a="number"==typeof t.gzipSize&&t.gzipSize>0?t.gzipSize:void 0;function o(e,t,s){return`<div class="tooltip-row-sZbl0R">
|
|
84
|
+
<span class="tooltip-label-INs_JK" style="color: ${s};">${e}</span>
|
|
85
|
+
<span style="color: ${s};">${t}</span>
|
|
86
|
+
</div>`}let d=[];return void 0!==i&&i>0&&d.push(o("Stat size",(0,j.formatSize)(i),"#52c41a")),void 0!==n&&n>0&&d.push(o("Parsed size",(0,j.formatSize)(n),"#d96420")),void 0!==a&&a>0&&d.push(o("Gzipped size",(0,j.formatSize)(a),"#1677ff")),`
|
|
87
|
+
<div style="font-family: sans-serif; font-size: 12px; line-height: 1.5;">
|
|
88
|
+
<div style="margin-bottom: 6px; max-width: 400px; word-wrap: break-word; overflow-wrap: break-word; word-break: break-all; white-space: normal; color: rgba(0, 0, 0, 0.8);">${tf.Me(r)}</div>
|
|
89
|
+
${d.join("")}
|
|
90
|
+
</div>
|
|
91
|
+
`}},series:[{type:"treemap",itemStyle:{gapColor:"#ffffff"},label:{show:!0,formatter:"{b}",fontSize:12,position:"inside",fontWeight:"normal",textBorderWidth:1,padding:[4,8,4,8]},upperLabel:{show:!0,height:30,fontSize:12,fontWeight:"normal",padding:[0,0,0,4]},levels:[{itemStyle:{borderWidth:0,gapWidth:4,gapColor:"#ffffff"}},{itemStyle:{borderColorAlpha:[1,.3],borderWidth:5,gapWidth:4,gapColor:"#ffffff"},upperLabel:{show:!0,color:"#ffffff",fontSize:12,height:30}}],data:e,breadcrumb:{show:!0,left:"center",top:"bottom",height:22,emptyItemWidth:25,itemStyle:{color:"#999",borderColor:"transparent",borderWidth:0,borderRadius:0},emphasis:{itemStyle:{color:"#333"}},textStyle:{fontFamily:"sans-serif",fontSize:12,color:"#666"}},roam:!0,nodeClick:!1,zoomToNodeRatio:.7,animationDurationUpdate:500,width:"100%",height:"100%",top:-10,bottom:30,left:0,right:0,zoomLimit:{min:.5,max:5}}]})},[t,s,n,l]),(0,m.useEffect)(()=>{if(a&&c.current&&o){let e=c.current.getEchartsInstance();if(e){let t=function(e,s){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let i of e){let e="string"==typeof i.name?i.name:String(i.name??""),n=[...r,e];if(i.id===s)return{name:e,path:n};if(i.children){let e=t(i.children,s,n);if(e)return e}}return null};setTimeout(()=>{let s=t(h.current,a);if(!s)return;let r=s.name;try{e.dispatchAction({type:"highlight",seriesIndex:0,name:r})}catch(e){console.error("Failed to highlight node with name:",r,e)}for(let t of[()=>e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,targetNodeId:String(a)}),()=>e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,name:r}),()=>e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,name:s.path.join("/")}),()=>s.path.length>0&&e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,name:s.path[s.path.length-1]})])try{t();return}catch(e){console.error("Failed to zoom to node with id:",a,e)}console.warn("Failed to zoom to node with id:",a)},200)}}},[a,o]),(0,m.useEffect)(()=>()=>{u.current&&window.clearTimeout(u.current)},[]),o?(0,p.jsxs)("div",{className:"chart-container-gPlZC7",style:r,children:[(0,p.jsx)(tv.A,{message:"If parsed size lacks detailed module information, you can enable sourceMap when RSDOCTOR = true. This is because Rsdoctor relies on SourceMap to obtain Parsed Size. Rspack provides SourceMap information to Rsdoctor by default without affecting the build output.",type:"info",showIcon:!0,style:{marginBottom:0}}),(0,p.jsx)(tp.A,{ref:c,option:o,echarts:tg,onEvents:{click:e=>{u.current&&window.clearTimeout(u.current),u.current=window.setTimeout(()=>{if(c.current){let t=c.current.getEchartsInstance(),s=e?.data;t&&s?.id!==void 0&&t.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,targetNodeId:String(s.id)})}},180)},dblclick:e=>{u.current&&(window.clearTimeout(u.current),u.current=null),i?.(e)}},style:{width:"100%",height:"100%"}})]}):null}),tD=e=>{let{treeData:t,onChartClick:s,bundledSize:r=!0}=e;return(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetProjectInfo,children:e=>(0,p.jsx)(t_,{treeData:t,onChartClick:s,bundledSize:r,rootPath:e.root})})},t_=e=>{let{treeData:t,onChartClick:s,bundledSize:r=!0,rootPath:i}=e,n=(0,m.useMemo)(()=>t.map(e=>e.name),[t]),[a,l]=(0,m.useState)(n),[o,d]=(0,m.useState)(!1),[c,h]=(0,m.useState)(r?"parsed":"stat"),[u,f]=(0,m.useState)(""),[g,y]=(0,m.useState)(!1),[A,v]=(0,m.useState)(),[S,b]=(0,m.useState)(),[M,z]=(0,m.useState)(""),[k,w]=(0,m.useState)(!1),[I,P]=(0,m.useState)(""),C=m.useRef(null),E=(0,m.useCallback)(e=>{s?.(e);let t=e.data,r=t?.moduleId;void 0!==r&&(z(r),w(!0))},[s]),D=(0,m.useCallback)(()=>{if(C.current){let e=C.current;if(e.requestFullscreen)e.requestFullscreen().then(()=>y(!0)).catch(e=>console.error("Failed to enter fullscreen:",e));else if(e.webkitRequestFullscreen)try{e.webkitRequestFullscreen(),y(!0)}catch(e){console.error("Failed to enter fullscreen (webkit):",e)}else if(e.mozRequestFullScreen)try{e.mozRequestFullScreen(),y(!0)}catch(e){console.error("Failed to enter fullscreen (moz):",e)}else if(e.msRequestFullscreen)try{e.msRequestFullscreen(),y(!0)}catch(e){console.error("Failed to enter fullscreen (ms):",e)}else console.error("Fullscreen API is not supported in this browser.")}},[]),_=(0,m.useCallback)(()=>{document.exitFullscreen().then(()=>y(!1)).catch(e=>console.error("Failed to exit fullscreen:",e))},[]),N=(0,m.useCallback)(()=>{g?_():D()},[g,D,_]);(0,m.useEffect)(()=>{let e=()=>{y(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e)}},[]);let B=(0,m.useMemo)(()=>{let e=t.filter(e=>a.includes(e.name));if(I.trim()){let t=I.toLowerCase();e=e.filter(e=>e.name.toLowerCase().includes(t))}return e},[t,a,I]),R=(0,m.useMemo)(()=>{if(!u.trim())return[];let e=RegExp(u,"i"),t=[],s=(r,i)=>{let n=i||r.path||r.name||"";if(r.path&&e.test(r.path)){let e=tP(i?`${i}::${r.path}`:r.path);t.push({path:r.path,nodeId:e})}r.children&&r.children.forEach(e=>s(e,n))};return B.forEach(e=>s(e)),t},[B,u]),F=(0,m.useCallback)(e=>{v(e),b(e)},[]),$=(0,m.useCallback)(e=>{if(!i||!e)return e;let t=i.replace(/\\/g,"/").replace(/\/$/,""),s=e.replace(/\\/g,"/");return s.startsWith(t+"/")?s.slice(t.length+1):s===t?"":e},[i]),O=(0,m.useCallback)((e,t)=>"stat"===t?e.sourceSize||0:"parsed"===t?e.bundledSize||0:"gzip"===t?e.gzipSize||0:"value"===t?e.value||0:e.value?e.value:0,[]),G=(0,m.useCallback)((e,t)=>{let s=O(e,t);if(e.children&&e.children.length>0){let r=e.children.reduce((e,s)=>e+G(s,t),0);(0===s||!e.path&&r>0)&&(s=r)}return s},[O]),L=(0,m.useCallback)((e,s)=>{let r=t.find(t=>t.name===e);return r?G(r,s||c):0},[t,c,G]);return(0,p.jsxs)("div",{className:"treemap-DOrYiA",ref:C,children:[(0,p.jsx)("button",{className:"fullscreen-button-jVdrxO",onClick:N,title:g?"Exit fullscreen":"Enter fullscreen","aria-label":g?"Exit fullscreen":"Enter fullscreen",children:g?(0,p.jsx)(tM.A,{}):(0,p.jsx)(tz.A,{})}),(0,p.jsxs)("div",{className:`sidebar-Pww0Wm ${o?tw:""}`,children:[(0,p.jsx)("div",{className:`sidebar-toggle-NaGZQP ${o?tw:""}`,onClick:()=>d(!o),children:o?(0,p.jsx)(x.A,{}):(0,p.jsx)(tk.A,{})}),(0,p.jsxs)("div",{className:"sidebar-content-WuURH8",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)("h4",{children:"Treemap sizes"}),(0,p.jsxs)(tS.A.Group,{value:c,onChange:e=>h(e.target.value),size:"small",buttonStyle:"solid",children:[(0,p.jsx)(tS.A.Button,{value:"stat",children:"Stat"}),(0,p.jsx)(tS.A.Button,{value:"parsed",children:"Parsed"}),(0,p.jsx)(tS.A.Button,{value:"gzip",children:"Gzipped"})]})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("h4",{children:"Show chunks"}),(0,p.jsx)(ti.A,{placeholder:"Search chunks",value:I,onChange:e=>P(e.target.value),suffix:(0,p.jsx)(td.A,{style:{color:"#ccc"}}),allowClear:!0,size:"small",style:{marginBottom:8}}),(0,p.jsx)(tb.A,{indeterminate:a.length>0&&a.length<n.length,checked:a.length===n.length,onChange:e=>l(e.target.checked?n:[]),className:"all-none-checkbox-kw3p6X",children:"All"}),(0,p.jsx)("div",{className:"chunk-list-TUqr7U",style:{maxHeight:180,overflowY:"auto"},children:n.filter(e=>e.toLowerCase().includes(I.toLowerCase())).map(e=>(0,p.jsxs)("div",{className:"chunk-item-dQ0XI7",style:{height:15,lineHeight:"15px"},children:[(0,p.jsx)(tb.A,{checked:a.includes(e),onChange:t=>{t.target.checked?l([...a,e]):l(a.filter(t=>t!==e))},children:(0,p.jsx)("span",{title:e,children:e})}),(0,p.jsx)("span",{className:"size-tag-EM4AKE",children:(0,j.formatSize)(L(e,"value"))})]},e))})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("h4",{children:"Search modules"}),(0,p.jsx)(ti.A,{placeholder:"Enter regexp",value:u,onChange:e=>{f(e.target.value),v(void 0),b(void 0)},suffix:(0,p.jsx)(td.A,{style:{color:"#ccc"}}),allowClear:!0,size:"small"}),u.trim()&&R.length>0&&(0,p.jsxs)("div",{className:"search-results-emVgaj",children:[(0,p.jsxs)("div",{className:"search-results-header-oyQ0jw",children:["Found ",R.length," file",R.length>1?"s":""]}),(0,p.jsx)("div",{className:"search-results-list-FSMG6d",children:R.map((e,t)=>{let s=$(e.path);return(0,p.jsx)("div",{className:"search-result-item-IZR6nt",onClick:()=>F(e.nodeId),title:e.path,children:s||e.path},t)})})]}),u.trim()&&0===R.length&&(0,p.jsxs)("div",{className:"search-results-empty-_khCd5",children:['No files found matching "',u,'"']})]})]})]}),(0,p.jsxs)("div",{className:"chart-wrapper-w7fJr6",children:[(0,p.jsx)(tE,{treeData:B,sizeType:c,onChartClick:E,highlightNodeId:A,centerNodeId:S,rootPath:i,style:{width:"100%",height:"100%"}}),M?(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAllModuleGraph,body:{},children:e=>(0,p.jsx)(eD,{cwd:i,moduleId:M,modules:e,show:k,setShow:w})}):null]})]})},{Option:tN}=B.A,tT=e=>{let{errors:t,cwd:s,summary:r,entryPoints:i}=e,[n,a]=(0,m.useState)([]),[l,o]=(0,m.useState)(0),[d,c]=(0,m.useState)(""),[h,u]=(0,m.useState)(0),[f,x]=(0,m.useState)(!1),[y,A]=(0,m.useState)(""),[v,S]=(0,m.useState)(""),[b,M]=(0,m.useState)(null),{showCode:z,codeDrawerComponent:k}=(0,H.Y)("Do not have the codes of assets. If you use the lite or brief mode, there will have codes."),{t:w}=(0,j.useI18n)(),ee=r.all.total.files,et=(0,m.useCallback)(e=>t=>{"module"===e?A(t):"chunk"===e&&S(t)},[]),es=e=>(0,p.jsxs)(B.A,{defaultValue:"kb",onChange:et(e),children:[(0,p.jsx)(tN,{value:"kb",children:"KB"}),(0,p.jsx)(tN,{value:"mb",children:"MB"})]}),er=(0,m.useCallback)((0,U.s)(e=>{o("mb"===y?1024*e*1024:1024*e)},300),[]),ei=(0,m.useCallback)((0,U.s)(e=>{u("mb"===v?1024*e*1024:1024*e)},300),[]),en=(0,m.useMemo)(()=>{let e=ee.slice();return d&&(e=e.filter(e=>e.path.indexOf(d)>-1)),h>0&&(e=e.filter(e=>e.size>=h)),n.length&&(e=e.filter(e=>!!n.some(t=>t.assets.includes(e.path)))),e.sort((e,t)=>{let s=+(e.path.indexOf("/")>-1);return(t.path.indexOf("/")>-1)-s})},[ee,n,d,h]);(0,m.useEffect)(()=>{r.all.total.files.forEach(e=>{let t;"js"===((t=e.path.split(".")).length>1?t.pop():"")&&M(e.path)})},[r.all.total.files]);let ea=(0,m.useMemo)(()=>(0,j.createFileStructures)({files:en.map(e=>e.path).filter(Boolean),fileTitle(e,t){let{size:s,initial:r,path:i,content:n}=en.find(t=>t.path===e);return(0,p.jsxs)("div",{className:e_.assetBox,onClick:()=>{M(i)},children:[(0,p.jsx)(J.i,{text:t,keyword:"",className:e_.fileText}),(0,p.jsxs)(R.A,{size:"small",className:e_.assetsTag,children:[(0,p.jsx)(F.A,{type:"vertical"}),(0,p.jsx)($.A.Text,{style:{color:"#4FD233"},children:(0,j.formatSize)(s)}),(0,p.jsx)(F.A,{type:"vertical"}),r?(0,p.jsx)($.A.Text,{style:{color:"#009A9E"},children:"initial"}):null,(0,p.jsx)(E.A,{style:{fontSize:14,padding:0},onClick:()=>z({code:n,filePath:i})})]})]})}}),[en]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(tr,{cwd:s,errors:t,summary:r}),(0,p.jsx)(O.A,{styles:{body:{paddingTop:0}},children:(0,p.jsx)(G.A,{size:"middle",items:[{key:"tree",label:(0,p.jsxs)(R.A,{children:[(0,p.jsx)($.A.Text,{children:"Tree Graph"}),(0,p.jsx)(L.A,{overlayStyle:{maxWidth:380},overlayInnerStyle:{marginLeft:16,padding:10},color:"white",title:(0,p.jsxs)(R.A,{direction:"vertical",color:"white",size:"middle",children:[(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)(W.A,{color:"cyan",style:{margin:0},children:"initial"}),(0,p.jsx)($.A.Text,{style:{marginLeft:4},children:"Identify whether the chunk is an initial chunk."})]})}),(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)(W.A,{color:"green",style:{margin:0},children:"concatenated"}),(0,p.jsx)($.A.Text,{style:{marginLeft:4},children:"Identify whether the module is a concatenated module"}),(0,p.jsx)(L.A,{overlayStyle:{maxWidth:408},placement:"bottom",color:"white",title:(0,p.jsx)(R.A,{direction:"vertical",color:"white",children:(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)($.A.Text,{strong:!0,children:"Concatenated Module"}),(0,p.jsx)($.A.Text,{children:': A performance optimization where multiple modules are merged (or "hoisted") into a single scope instead of wrapping each module in separate function closures. This reduces the bundle size and improves runtime performance by minimizing function call overhead.'})]})})}),children:(0,p.jsx)(D.A,{style:{color:"rgba(0,0,0,.45)",marginLeft:4}})}),(0,p.jsx)($.A.Text,{children:"."})]})}),(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)(g.Ay,{size:"small",icon:(0,p.jsx)(_.A,{})}),(0,p.jsx)($.A.Text,{style:{marginLeft:4},children:"Open the code."})]})}),(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)(g.Ay,{size:"small",icon:(0,p.jsx)(N.A,{})}),(0,p.jsx)($.A.Text,{style:{marginLeft:4},children:"View the module dependency, that is, module reasons in stats.json."})]})}),(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)(W.A,{color:"purple",children:"Bundled: 15.77 KB"}),(0,p.jsx)($.A.Text,{children:"The final size of the output files after processing, bundling, and optimization. This is what is delivered to the browser."})]})}),(0,p.jsx)(I.A,{children:(0,p.jsxs)(P.A,{children:[(0,p.jsx)(W.A,{color:"orange",children:"Source: 60.46 KB"}),(0,p.jsx)($.A.Text,{children:"The original size of your source code files before any processing or transformations. This is the raw size of your code as you wrote it."})]})})]}),children:(0,p.jsx)(D.A,{style:{color:"rgba(0,0,0,.45)"}})})]}),children:(0,p.jsxs)(R.A,{direction:"vertical",children:[(0,p.jsxs)(I.A,{align:"middle",gutter:[C.or.BasePadding,C.or.BasePadding],children:[i&&i.length?(0,p.jsx)(P.A,{children:(0,p.jsx)(B.A,{mode:"multiple",value:n.map(e=>e.name),style:{minWidth:230,width:"auto",maxWidth:300},placeholder:"filter assets by entry point",onChange:e=>{a(e.map(e=>i.find(t=>t.name===e)).filter(Boolean))},allowClear:!0,onClear:()=>{a([])},children:i.map(e=>(0,p.jsx)(B.A.Option,{value:e.name,children:(0,p.jsx)(R.A,{children:(0,p.jsx)(Q.Ex,{label:e.name,value:(0,j.formatSize)(e.size),tooltip:e.name})})},e.name))})}):null,(0,p.jsx)(P.A,{children:(0,p.jsx)(V.E,{placeholder:"search asset by keyword",onChange:e=>{c(e),x(!1)}})}),(0,p.jsx)(P.A,{span:6,children:(0,p.jsx)(K.A,{min:0,style:{width:"95%"},addonBefore:(0,p.jsxs)(R.A,{children:[(0,p.jsx)($.A.Text,{style:{fontSize:14,color:"inherit"},children:"Asset Size"}),(0,p.jsx)(L.A,{title:w("filter the output assets which size is greater than the input value"),style:{marginLeft:3},children:(0,p.jsx)(D.A,{style:{color:"rgba(0,0,0,.45)"}})})]}),onChange:e=>ei(Number(e)),addonAfter:es("chunk")})}),(0,p.jsx)(P.A,{span:6,children:(0,p.jsx)(K.A,{min:0,style:{width:"95%"},addonBefore:(0,p.jsxs)(R.A,{children:[(0,p.jsx)($.A.Text,{style:{fontSize:14,color:"inherit"},children:"Module Size"}),(0,p.jsx)(L.A,{title:w("filter the modules which size is greater than the input value"),style:{marginLeft:3},children:(0,p.jsx)(D.A,{style:{color:"rgba(0,0,0,.45)"}})})]}),onChange:e=>{er(Number(e))},addonAfter:es("module")})})]}),(0,p.jsx)(I.A,{children:(0,p.jsx)(th,{})}),(0,p.jsx)(I.A,{align:"middle",gutter:[C.or.BasePadding,C.or.BasePadding],children:(0,p.jsx)(P.A,{span:24,children:en.length?(0,p.jsxs)(I.A,{gutter:C.or.BasePadding,children:[(0,p.jsx)(P.A,{span:6,children:(0,p.jsx)(O.A,{title:(0,p.jsxs)(R.A,{children:[(0,p.jsx)($.A.Text,{children:w("Output Assets List")}),(0,p.jsx)(F.A,{type:"vertical"}),(0,p.jsx)(L.A,{title:`total assets count is ${ee.length}, the filtered assets count is ${en.length}`,children:(0,p.jsxs)($.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:[en.length," /"," ",ee.length]})}),(0,p.jsx)(F.A,{type:"vertical"}),(0,p.jsx)($.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:(0,j.formatSize)((0,q.x)(en,e=>e.size))})]}),size:"small",bodyStyle:{overflow:"scroll",height:600},children:(0,p.jsx)(Z.h,{className:e_.assets,treeData:ea,autoExpandParent:!0,defaultExpandAll:f||en.length<=20},`tree_${d}_${f}`)})}),(0,p.jsx)(P.A,{span:18,children:b?(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAssetDetails,body:{assetPath:b},children:e=>(0,p.jsx)(eH,{asset:e.asset,chunks:e.chunks,modules:e.modules,height:600,moduleSizeLimit:l,root:s})}):(0,p.jsx)(O.A,{bodyStyle:{height:600},children:(0,p.jsx)(Y.A,{description:(0,p.jsx)($.A.Text,{strong:!0,children:"Click the file path on the left to show the modules of the asset"})})})})]}):(0,p.jsx)(Y.A,{})})})]})},{key:"treemap",label:"Treemap",children:(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetProjectInfo,children:e=>{let{isRspack:t,hasSourceMap:s}=eS.l5.checkSourceMapSupport(e.configs);return(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetSummaryBundles,children:e=>{let r=e.filter(e=>{let t;return"js"===(t=e.asset.path.toLowerCase().split(".").pop()||"")||"cjs"===t||"mjs"===t||"bundle"===t||"css"===t||"html"===t}).map(e=>({name:e.asset.path,value:e.asset.size,children:(0,j.flattenTreemapData)(e.modules).children}));return(0,p.jsx)(tD,{treeData:r,bundledSize:s||t})}})}})}],defaultActiveKey:"tree"})})]}),k]})},tB=()=>{let{project:e}=(0,z.L)();if(!e)return null;let{root:t,errors:s}=e;return(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!0},children:e=>(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetEntryPoints,children:r=>(0,p.jsx)(tT,{cwd:t,errors:s,summary:e,entryPoints:r})})})},tR="BundleSize",tF=T.Kj.RsdoctorClientRoutes.BundleSize,t$=()=>(0,p.jsx)(I.A,{children:(0,p.jsx)(P.A,{span:24,style:{marginBottom:C.or.BasePadding},children:(0,p.jsx)(tB,{})})});var tO=s(86542),tG=s(44704),tL=s(77354),tW=s(47311);let tK=(0,X.eN)({api:T.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:s}=t,[r,i]=(0,m.useState)({filename:"",loaders:[],layer:""}),[n]=(0,m.useState)(0);return(0,p.jsxs)(R.A,{direction:"vertical",style:{width:"100%"},children:[(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetLoaderNames,children:e=>(0,p.jsx)(tG.F,{onChange:i,loaderNames:e})}),(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetLoaderChartData,children:e=>{let t=e.filter(e=>(0,tW.ak)(e.resource,e.loader,r.filename,r.loaders,e.layer,r?.layer));return 0===n?(0,p.jsx)(tL.z,{loaders:t,cwd:s}):(0,p.jsx)(p.Fragment,{})}})]})}});var tY=s(58359),tU=s(73063),tq=s(27410);let tH="Loaders Timeline",tQ=T.Kj.RsdoctorClientRoutes.WebpackLoaderOverall,tZ=()=>{let{t:e}=(0,tq.B)();return(0,p.jsx)(y.Zp,{title:(0,p.jsxs)(tY.$x,{align:"baseline",children:[(0,p.jsx)(tY.o5.Title,{level:5,style:{margin:0},children:"Loader Timeline"}),(0,p.jsx)(tY.AM,{content:(0,p.jsxs)("div",{children:[e("AsyncLoaderInfo"),(0,p.jsx)("a",{href:"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98",target:"_blank",rel:"noreferrer",children:e("Details")})]}),title:"Info",children:(0,p.jsx)(tY.vw,{icon:(0,p.jsx)(tU.A,{}),color:"warning",children:"Info"})})]}),extra:(0,p.jsx)(tO.U,{defaultKeys:["module"]}),children:(0,p.jsx)(tK,{})})};var tV=s(27574),tJ=s(57490),tX=s(25699),t0=s(32269);let t1=(0,X.eN)({api:T.hp.ServerAPI.API.LoadDataByKey,body:{key:"root"},responsePropName:"cwd",Component:e=>{let{cwd:t}=e,[s,r]=(0,m.useState)({filename:"",loaders:[],layer:""});return(0,p.jsx)(tJ.Q.Consumer,{children:e=>(0,p.jsx)(tV.Ay,{locale:(0,j.getLocale)(e.locale),theme:{token:{padding:16,fontSize:14}},children:(0,p.jsxs)("div",{className:t0.A.loaderAnalysis,children:[(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetLoaderNames,children:e=>(0,p.jsx)(tG.F,{onChange:e=>r(e),loaderNames:e})}),(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetLoaderFileTree,children:e=>(0,p.jsx)(tX.h,{filename:s.filename,filetree:e,loaders:s.loaders,layer:s.layer,cwd:t})})]})})})}});var t2=s(25205);let t5="Loaders Analysis",t4=T.Kj.RsdoctorClientRoutes.WebpackLoaderAnalysis,{useToken:t3}=eQ.A,t7=()=>{let{token:e}=t3();return(0,p.jsx)(y.Zp,{title:(0,p.jsxs)(R.A,{align:"baseline",children:[(0,p.jsx)($.A.Title,{level:5,style:{margin:0},children:"Loader Analysis"}),(0,p.jsx)(es.A,{content:(0,p.jsxs)("div",{children:[(0,t2.t)("AsyncLoaderInfo"),(0,p.jsx)("a",{href:"https://rsdoctor.rs/guide/more/faq#cssextractrspackplugin-%E7%9A%84-loader-%E8%80%97%E6%97%B6%E8%BF%87%E9%95%BF%E9%97%AE%E9%A2%98",target:"_blank",rel:"noreferrer",children:(0,t2.t)("Details")})]}),title:"Info",children:(0,p.jsx)(W.A,{icon:(0,p.jsx)(tU.A,{}),color:"warning",children:"Info"})})]}),extra:(0,p.jsx)(tO.U,{defaultKeys:["module","resolve"]}),bodyStyle:{paddingTop:e.padding,height:800},children:(0,p.jsx)(t1,{})})};var t6=s(3534),t9=s(72573),t8=s(17617);s(58556);let se="Plugins Analysis",st=T.Kj.RsdoctorClientRoutes.WebpackPlugins,ss=()=>{let[e,t]=(0,m.useState)([]),[s,r]=(0,m.useState)([]);return(0,p.jsx)("div",{children:(0,p.jsx)(O.A,{title:"Plugins Overall",bodyStyle:{paddingTop:C.or.BasePadding/3},extra:(0,p.jsx)(tO.U,{defaultKeys:["plugins"]}),children:(0,p.jsxs)(R.A,{direction:"vertical",style:{width:"100%",padding:"0 30px"},children:[(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetPluginSummary,children:e=>{let{hooks:s,tapNames:i}=e;return(0,p.jsxs)(R.A,{style:{marginBottom:C.or.BasePadding/2},children:[(0,p.jsxs)(ti.A.Group,{compact:!0,children:[(0,p.jsxs)(g.Ay,{children:[(0,p.jsx)(t6.A,{}),(0,p.jsx)($.A.Text,{children:"Plugin Tap Names"})]}),(0,p.jsx)(B.A,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{t(e)},children:i.map(e=>(0,p.jsx)(B.A.Option,{label:e,value:e,children:e},e))})]}),(0,p.jsxs)(ti.A.Group,{compact:!0,children:[(0,p.jsxs)(g.Ay,{children:[(0,p.jsx)(t9.A,{}),(0,p.jsx)($.A.Text,{children:"Hooks"})]}),(0,p.jsx)(B.A,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{r(e)},children:s.map(e=>(0,p.jsx)(B.A.Option,{label:e,value:e,children:e},e))})]})]})}}),(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetPluginData,body:{hooks:s,tapNames:e},children:e=>(0,p.jsx)(t8.u,{dataSource:e})})]})})})};var sr=s(99800),si=s(34136),sn=s(78799),sa=s(38763);let sl=e=>{let{filepath:t,before:s,after:r,resolvers:i}=e;return(0,p.jsx)(P.A,{flex:1,children:(0,p.jsx)(G.A,{defaultActiveKey:"diff",items:[{key:"diff",label:"Resolve Diff Viewer",children:(0,p.jsx)(O.A,{styles:{body:{padding:0,overflow:"hidden"}},children:(0,p.jsx)(ea.Mh,{style:{height:785},isEmbed:!0,originalFilePath:t,modifiedFilePath:t,original:s,modified:r})})},{key:"details",label:"Resolve Details",children:(0,p.jsx)(O.A,{children:(0,p.jsx)(sn.A,{style:{width:"100%",height:735,overflowY:"scroll",wordBreak:"break-all"},size:"small",pagination:!1,bordered:!0,rowKey:e=>e.request,columns:[{title:"Source Code",width:200,render:(e,t)=>(0,p.jsx)($.A.Text,{copyable:!0,children:(0,p.jsx)($.A.Text,{code:!0,strong:!0,children:t.request})})},{title:"Duration",width:80,render:(e,t)=>(0,p.jsx)($.A.Text,{strong:!0,children:(0,j.formatCosts)(t.costs)}),sorter:(e,t)=>e.costs-t.costs,sortDirections:["descend","ascend"]},{title:"Resolve Result",render:(e,t)=>eS.xR.isResolveSuccessData(t)?(0,p.jsx)($.A.Text,{copyable:!0,children:t.result}):(0,p.jsx)(sr.A,{style:{color:"#f50"}})}],dataSource:i})})}]})})},so=e=>{let{resolver:t,cwd:s}=e,[r,i]=(0,m.useState)(""),n="/node_modules/",a=(0,m.useMemo)(()=>t.map(e=>e.issuerPath).filter(Boolean),[t]),l=(0,m.useMemo)(()=>a.filter(t=>!e.filename||t.indexOf(e.filename)>-1),[e.filename,a]),o=l.length&&l.every(e=>e.indexOf(n)>-1),d=(0,m.useMemo)(()=>(0,j.createFileStructures)({files:l.length?l:a,cwd:s,fileTitle:(e,t)=>(0,p.jsx)("div",{onClick:()=>i(e),children:t})}),[e.filename]);return(0,p.jsxs)(I.A,{justify:"start",align:"top",wrap:!1,gutter:C.or.BasePadding,children:[(0,p.jsx)(P.A,{span:7,children:(0,p.jsx)(O.A,{title:"Files",children:(0,p.jsx)(Z.h,{style:{width:"100%",height:735,overflow:"scroll"},treeData:d,defaultExpandedKeys:(0,j.mapFileKey)(d,o?1:4,o?void 0:e=>{let t=(0,sa.J)(e,"__RESOURCEPATH__").indexOf(n)>-1;return!!(l.length&&l.every(e=>e.indexOf(n)>-1))||!t})},`tree_${e.filename}`)})}),r&&(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetResolverFileDetails,body:{filepath:r},children:e=>(0,p.jsx)(sl,{...e})})]})},sd=(0,X.eN)({api:T.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:s}=t,[r,i]=(0,m.useState)("");return(0,p.jsxs)("div",{style:{width:"100%"},children:[(0,p.jsx)(R.A,{style:{marginTop:C.or.BasePadding,marginBottom:C.or.BasePadding},children:(0,p.jsx)(V.E,{icon:(0,p.jsx)(si.A,{}),label:"Filename",placeholder:"search filename by keyword",onChange:e=>i(e)})}),(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetResolverFileTree,children:e=>(0,p.jsx)(so,{filename:r,resolver:e,cwd:s})})]})}}),sc="ModuleResolve",sh=T.Kj.RsdoctorClientRoutes.ModuleResolve,su=()=>(0,p.jsx)("div",{children:(0,p.jsx)(O.A,{title:"Webpack Resolver Analysis",extra:(0,p.jsx)(tO.U,{defaultKeys:["resolve","resolveLoader"]}),bodyStyle:{paddingTop:0},children:(0,p.jsx)(sd,{})})});var sp=s(92790),sm=s(6662);let sf=T.Kj.RsdoctorClientRoutes.RuleIndex,sg=()=>{let e=(0,j.useUrlQuery)()[T.jO.RsdoctorRuleClientConstant.UrlQueryForErrorCode]||"",[t,s]=(0,m.useState)(T.jO.RuleErrorMap[e]),r=Object.values(T.jO.RuleErrorMap);return(0,m.useEffect)(()=>{window.scrollTo({top:0})},[]),(0,p.jsxs)(I.A,{gutter:C.or.BasePadding/2,children:[(0,p.jsx)(P.A,{span:8,children:(0,p.jsx)(O.A,{title:(0,p.jsx)(sm.h,{text:"list of the error codes."}),bordered:!0,children:(0,p.jsx)(R.A,{direction:"vertical",children:r.map((e,r)=>(0,p.jsxs)(R.A,{style:{marginTop:0===r?0:C.or.BasePadding/2,cursor:"pointer"},onClick:()=>s(e),align:"center",children:[(0,p.jsx)(ed.A,{status:"default"}),(0,p.jsx)($.A.Text,{code:!0,children:(0,p.jsx)("a",{children:e.code})}),(0,p.jsx)($.A.Text,{style:{color:t&&t.code===e.code?"#1890ff":void 0},children:e.title})]},e.code))})})}),(0,p.jsx)(P.A,{span:16,children:t?(0,p.jsx)(O.A,{title:(0,p.jsxs)(I.A,{justify:"space-between",children:[(0,p.jsxs)(R.A,{children:[(0,p.jsx)($.A.Text,{code:!0,children:t.code}),(0,p.jsx)($.A.Text,{children:t.title})]}),(0,p.jsx)("div",{children:(0,p.jsx)(W.A,{children:t.category})})]}),bodyStyle:{paddingTop:0},bordered:!0,children:(0,p.jsx)($.A.Paragraph,{children:"markdown"===t.type?(0,p.jsx)(sp.oz,{children:t.description}):(0,p.jsx)($.A.Text,{children:t.description})})}):(0,p.jsx)(O.A,{title:"This page lists all the error codes emitted by the Rsdoctor.",bordered:!0,children:(0,p.jsx)($.A.Text,{children:"click the error code in left bar to show more details."})})})]})};var sx=s(57792),sy=s(91986),sj=s(85309),sA=s(84407);s(62926);let sv=T.Kj.RsdoctorClientRoutes.TreeShaking,sS=(0,X.ug)(j.fetchManifest,[["moduleGraph","data"],["root","cwd"]],e=>{let{data:t,cwd:s}=e,r=(0,j.useModuleGraphInstanceByModuleGraph)(t);if(0===r.size())return(0,p.jsx)(sj.$,{});let[i,n]=(0,m.useState)(""),[a,l]=(0,m.useState)(1),[o,d]=(0,m.useState)([]),[c,h]=(0,m.useState)("side-effect"),u=(0,m.useMemo)(()=>r.getModules().filter(e=>e.kind===T.hp.ModuleKind.Normal&&en().basename(e.path).includes(i)),[i]),f=(0,m.useMemo)(()=>u.find(e=>e.isEntry),[]),[g,x]=(0,m.useState)(f||u?.length&&u?.[0]),y=(0,sx.EV)(u,r,i,g,e=>{A(u.find(t=>t.path===e),[])},s),A=(e,t,s)=>{x(e),d(t.slice()),eS.AP.isNumber(s)&&l(s)};return(0,p.jsxs)(O.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:[(0,p.jsxs)(I.A,{justify:"space-between",align:"middle",style:{marginBottom:C.or.BasePadding,marginTop:C.or.BasePadding},children:[(0,p.jsx)(V.E,{icon:(0,p.jsx)(si.A,{}),width:400,label:"FileName",placeholder:"search filename by keyword",style:{width:"auto"},onChange:e=>n(e)}),(0,p.jsxs)(tS.A.Group,{value:c,onChange:e=>{let{target:t}=e;return h(t.value)},children:[(0,p.jsx)(tS.A.Button,{value:"side-effect",children:"SideEffects"}),(0,p.jsx)(tS.A.Button,{value:"export",children:"Export Variables"})]})]}),(0,p.jsxs)(I.A,{justify:"space-between",align:"top",wrap:!1,gutter:[C.or.BasePadding,C.or.BasePadding],children:[(0,p.jsx)(P.A,{span:7,children:(0,p.jsx)(O.A,{title:`Total Files: ${u.length}`,className:"tree-shaking-files-box",children:(0,p.jsx)(Z.h,{style:{height:"80%"},className:"tree-shaking-files",selectedKeys:g?[g.path]:[],defaultExpandedKeys:(0,sx.ut)(y),treeData:y,expandAction:"click"})})}),(0,p.jsx)(P.A,{span:9,children:(0,p.jsx)(X.zW,{api:T.hp.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:g.id},children:e=>(0,p.jsx)(sy.B,{module:g,moduleGraph:r,ranges:o,toLine:a,setEditorData:A,source:e})})}),(0,p.jsx)(P.A,{flex:1,children:(0,p.jsx)(sA.oK,{kind:c,setEditorData:A,module:g,moduleGraph:r})})]})]})});var sb=s(99877),sM=s(25872),sz=s(3782),sk=s(7881),sw=s(98975),sI=s(52727);let sP=[T._8.RsdoctorManifestClientRoutes.Overall,T._8.RsdoctorManifestClientRoutes.BundleSize],sC=(e,t)=>{let s,r;window[T.YM.WINDOW_RSDOCTOR_TAG]=e,window[T.YM.WINDOW_RSDOCTOR_TAG].enableRoutes=t;let i=(s=`//${location.host}${location.pathname}#/overall`,r=t&&t.length>0?`?${T.Kj.RsdoctorClientUrlQuery.EnableRoutes}=${encodeURIComponent(JSON.stringify(t))}`:"",`${s}${r}`);location.href=i,sz.Ay.success("JSON data loaded successfully!")},sE=async e=>{try{let t=await (0,sI.k)([e]);if(t&&t[0])sC(t[0].data,sP);else throw Error("Invalid manifest data")}catch(t){let e=t instanceof Error?t.message:"Unknown error";throw sz.Ay.error(`Failed to load Rspack stats: ${e}`),t}},sD=T.Kj.RsdoctorClientRoutes.Uploader,s_=()=>{let[e,t]=(0,m.useState)(!1),s=async e=>{if(e){t(!0);try{let t=await (0,j.readJSONByFileReader)(e);if(!t||"object"!=typeof t)throw Error("Invalid JSON format");if((0,sI.A)(t))await sE(t);else try{let e=t.clientRoutes||sP;sC(t.data,e)}catch(t){let e=t instanceof Error?t.message:"Unknown error";sz.Ay.error(`Failed to load manifest data: ${e}`),console.error("Failed to load manifest data:",t)}}catch(t){let e=t instanceof Error?t.message:"Unknown error";sz.Ay.error(`Upload failed: ${e}`),console.error("Upload error:",t)}finally{t(!1)}}};return(0,p.jsx)(sk.A,{spinning:e,tip:"uploading...",children:(0,p.jsxs)(sw.A.Dragger,{multiple:!1,showUploadList:!1,accept:".json",onChange:e=>{let{file:t}=e;s(t)},style:{width:"100%"},beforeUpload:()=>!1,children:[(0,p.jsx)("p",{className:"ant-upload-drag-icon",children:(0,p.jsx)(sM.A,{})}),(0,p.jsx)("p",{className:"ant-upload-text",children:"Click or drag JSON file to this area to upload and analyze your stats.json or rsdoctor's rsdoctor-data.json."}),(0,p.jsxs)("p",{className:"ant-upload-hint",children:["The rsdoctor's rsdoctor-data.json is in brief mode, and use the file type: ['json'].",(0,p.jsx)("a",{href:"https://rsdoctor.rs/zh/config/options/output#mode-brief",target:"_blank",rel:"noopener noreferrer",children:"Check the details."})]}),(0,p.jsx)("p",{className:"ant-upload-hint",children:"By default, Rsdoctor will emit the rsdoctor-data.json to the output folder."})]})})}},28108(e,t,s){s.d(t,{Bq:()=>f,ME:()=>p,Rz:()=>y,Zb:()=>g,h4:()=>A,jC:()=>x});var r=s(65723),i=s(38763),n=s(3782),a=s(51583),l=s(45164),o=s(51327),d=s(72240),c=s(75920),h=s(65390);let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",s=e?.indexOf(t);return -1===s?null:0===s?t+(u(e?.slice(1),t)||""):e?.slice(0,s)};function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0,r=0,i=[],n=e;for(;r<t&&(n.filter(s).forEach(e=>{e.isLeaf||i.push(e.key)}),(n=n.reduce((e,t)=>e.concat(t.children||[]),[])).length);)r++;return i}let m="__BASENAME__";function f(e){let{files:t,inlinedResourcePathKey:s="__RESOURCEPATH__",fileTitle:r=(e,t)=>t,dirTitle:n=(e,t)=>t,page:a="other"}=e,l=t.map(e=>e.replace(/\\/g,"/")),o=RegExp("/"),d=l.reduce((e,t)=>{let n=u(t,"/"),l=n?t?.slice(n.length+1):t,d=e;for(;n;){let e=d.children.find(e=>e.title===n);if(!e){let t=[d[s],n].filter(Boolean).join("/");e={title:n,icon:"bundle"===a?e=>j(e,!1):null,key:t,children:[],[s]:t,[m]:n},d.children.push(e)}d=e,l=(n=u(l,"/"))?l.slice(n.length).replace(o,""):l}return d.children.some(e=>(0,i.J)(e,s)===t)||d.children.push({title:()=>r(t,l),icon:"bundle"===a?e=>j(e):null,key:t,isLeaf:!0,[s]:t,[m]:l}),e},{key:"0",children:[]}).children;return d.forEach(e=>{e.children&&e.children.forEach(t=>(function e(t,s){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",i=arguments.length>3?arguments[3]:void 0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(e,t)=>t;if(!t.isLeaf)if(s.children&&1===s.children.length){let a=[s[m],t[m]].join(r);s[i]=t[i],s[m]=a,s.key=[s.key,t.key].join("-"),s.children=t.children,s.title=n(s,a),t.children&&t.children.forEach(t=>{e(t,s,r,i,n)})}else t.title=n(t,t[m]),t.children&&t.children.forEach(s=>{e(s,t,r,i,n)})})(t,e,"/",s,n))}),d}function g(e,t){return e.startsWith(t)?e.replace(t,"."):e}function x(e){return new Promise((t,s)=>{let r=new FileReader;r.onloadend=()=>{let{result:e}=r;try{let s=JSON.parse(e.toString());t(s)}catch(e){n.Ay.error("json parse error"),s(e)}},r.onerror=()=>{let e="upload json file error, please try again.";n.Ay.error(e),s(Error(e))},r.readAsText(e.originFileObj||e)})}function y(e,t){let s=g(e,t),r="/node_modules/",i=s.lastIndexOf(r);return i>-1?{alias:s.slice(i+r.length),inNodeModules:!0}:{alias:s,inNodeModules:!1}}function j(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{data:s}=e,i=e.expanded;return s?.children?(0,r.jsxs)(a.A,{children:[t?(0,r.jsx)(l.A,{className:`file-tree-switcher-arrow ${i?"file-tree-switcher-arrow-expand":""}`}):(0,r.jsx)(r.Fragment,{}),i?(0,r.jsx)(o.A,{}):(0,r.jsx)(d.A,{})]}):e.eventKey&&"string"==typeof e.eventKey?(0,h.C)(e.eventKey):(0,r.jsx)(c.A,{})}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",s=function e(t){if(!t.children||0===t.children.length)return t;let s=t;for(;s.children&&1===s.children.length&&!s.children[0].sourceSize;)s={name:s.name+"/"+s.children[0].name,children:s.children[0].children};return s.children&&(s.children=s.children.map(e)),s}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",s={name:t,children:[],_map:new Map};for(let t of e){let e=t.path.split(/[\\/]/).filter(Boolean),r=s;for(let s=0;s<e.length;s++){let i=e[s];if(s===e.length-1)r.children||(r.children=[]),r.children.push({name:i,path:t.path,sourceSize:t.size?.sourceSize??0,bundledSize:t.size?.parsedSize??0,gzipSize:t.size?.gzipSize??0,id:t.id});else{r._map||(r._map=new Map);let e=r._map.get(i);e||(e={name:i,children:[],_map:new Map},r.children.push(e),r._map.set(i,e)),r=e}}}return!function e(t){delete t._map,t.children&&t.children.forEach(e)}(s),s}(e,t));return!function e(t){if(!t.children||0===t.children.length)return{sourceSize:t.sourceSize??0,bundledSize:t.bundledSize??0,gzipSize:t.gzipSize??0};let s=0,r=0,i=0;for(let n of t.children){let{sourceSize:t,bundledSize:a,gzipSize:l}=e(n);s+=t,r+=a,i+=l}return t.sourceSize=s,t.bundledSize=r,t.gzipSize=i,{sourceSize:s,bundledSize:r,gzipSize:i}}(s),s}},47903(e,t,s){s.d(t,{getDemoUrl:()=>B.JI,getFirstVisitFromStorage:()=>m.R7,useModuleGraph:()=>j,useRuleIndexNavigate:()=>x,flattenTreemapData:()=>i.h4,useCompileAlertsByErrors:()=>v,hasBundle:()=>_.r,useLocale:()=>E.Ym,useDataLoader:()=>r.V,getEnableRoutesFromUrlQuery:()=>B.TR,useUniqModules:()=>A,fetchManifest:()=>D.Cj,isDef:()=>B.C8,setThemeToStorage:()=>m.Kv,formatSize:()=>N.X,beautifyPath:()=>i.Zb,useWebpackConfigurationByConfigs:()=>b,createFileStructures:()=>i.Bq,useDuplicatePackagesByErrors:()=>S,useTheme:()=>E.DP,mapFileKey:()=>i.ME,filterLoader:()=>z.ak,setFirstVisitToStorage:()=>m.Yh,useI18n:()=>g,getShortPath:()=>B.Ml,beautifyModulePath:()=>i.Rz,changeOrigin:()=>B.$G,isJsDataUrl:()=>B.XC,readJSONByFileReader:()=>i.jC,getLocale:()=>P,setViewModeToStorage:()=>m.ZI,useDetectIfCloudIdeEnv:()=>M,formatPercent:()=>N.l,useModuleGraphInstanceByModuleGraph:()=>E.mB,useUrlQuery:()=>y,getLanguage:()=>C,hasCompile:()=>_.c,formatCosts:()=>T.a4,hasViewModeFromStorage:()=>m.it,useViewMode:()=>E.an});var r=s(53529),i=s(28108),n=s(71513),a=s(15722),l=s(27108),o=s(6161),d=s(22155),c=s(27410),h=s(41346),u=s(31337),p=s.n(u);s(91118);var m=s(36757);let f=a.Kj.RsdoctorClientRoutes.RuleIndex,g=()=>{let{i18n:e,...t}=(0,c.B)();return{...t,i18n:{...e,changeLanguage:(t,s)=>e.changeLanguage(t,(e,r)=>{e||(0,m.XX)(t),s&&s(e,r)})}}};function x(e,t){let s=(0,h.Zp)();return t?()=>window.open(t,"__blank"):()=>{s(`${f}?${a.jO.RsdoctorRuleClientConstant.UrlQueryForErrorCode}=${e}`)}}function y(){let e=(0,h.zy)().search||location.search;return(0,d.useMemo)(()=>p()(e,!0).query,[e])}function j(e){let t=e;"string"==typeof t&&(e=JSON.parse(n.oG.decompressText(t)));var s=e,r={dependencies:[],modules:[],moduleGraphModules:[],exports:[],sideEffects:[],variables:[]};return s&&"object"==typeof s?Array.isArray(s)?r:(0,l.N)(s,r):r}function A(e){return(0,o.h)(e,e=>e.path)}function v(e){return Array.isArray(e)?e.filter(e=>e.category===a.jO.RuleMessageCategory.Compile&&e.code!==a.jO.RuleMessageCodeEnumerated.Overlay):[]}function S(e){return(Array.isArray(e)?e.filter(e=>e.category===a.jO.RuleMessageCategory.Bundle&&e.code!==a.jO.RuleMessageCodeEnumerated.Overlay):[]).filter(e=>e.code===a.jO.RuleErrorMap.E1001.code)}function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.find(e=>"webpack"===e.name||"rspack"===e.name):null}function M(){return!!("https:"===window.location.protocol&&window.location.href.indexOf("ide-proxy")>0)}var z=s(47311),k=s(63116),w=s(63398),I=s(14023);function P(e){return"cn"===e||"zh-CN"===e?k.A:w.A}function C(e){return"cn"===e||"zh"===e?I.TM.Cn:I.TM.En}var E=s(23137),D=s(25109),_=s(81256),N=s(93733);s(67485);var T=s(61005),B=s(48805);s(74038),s(52727)},52727(e,t,s){s.d(t,{A:()=>a,k:()=>l});var r=s(15722),i=s(98485),n=s(90804);function a(e){return(0,n.c)(e.assets)&&(0,n.c)(e.chunks)}async function l(e){return(await Promise.all(e.map(async e=>{let t=i.L2.chunkTransform(new Map,e),s=i.zG.getModuleGraphByStats(e,".",t);await i.L2.getAssetsModulesData(s,t,e.outputPath||"",{},void 0);let n=i.ps.fromModuleGraph(s,".");return{hash:e.hash||"",moduleGraph:await s.toData(),chunkGraph:t.toData(r.hp.ToDataType.Normal),packageGraph:n.toData()}}))).map(e=>({client:{enableRoutes:[]},data:{pid:0,root:"",errors:[],configs:[],plugin:{},summary:{costs:[]},envinfo:{},resolver:[],loader:[],moduleCodeMap:{},...e}}))}},48805(e,t,s){s.d(t,{$G:()=>d,C8:()=>u,JI:()=>c,Ml:()=>h,TR:()=>o,XC:()=>a,kJ:()=>l});var r=s(31337),i=s.n(r),n=s(15722);function a(e){return e.startsWith("data:text/javascript;")}function l(){let{query:e}=i()(location.href,!0),t=e[n.Kj.RsdoctorClientUrlQuery.ManifestFile];if(t)return decodeURIComponent(t)}function o(){let{query:e}=i()(location.href,!0),t=e[n.Kj.RsdoctorClientUrlQuery.EnableRoutes];if(!t&&location.hash&&(t=i()(location.hash,!0).query[n.Kj.RsdoctorClientUrlQuery.EnableRoutes]),!t&&location.hash){let e=location.hash,s=e.indexOf("?");-1!==s&&(t=new URLSearchParams(e.substring(s+1)).get(n.Kj.RsdoctorClientUrlQuery.EnableRoutes)||void 0)}if(t)try{return JSON.parse(decodeURIComponent(t))}catch(e){console.warn("Failed to parse enableRoutes from URL query:",e)}}function d(e){let t=i()(location.href,!0),s=i()(e,!0);return t.hash.endsWith(n.Kj.RsdoctorClientRoutes.Uploader)&&t.set("hash",n.Kj.RsdoctorClientRoutes.Overall),t.set("origin",e),t.set("protocol",s.protocol),t.set("host",s.host),t.set("port",s.port),t.toString()}function c(){return null}let h=e=>{if(e?.indexOf("node_modules")>=0){let t=e.split("node_modules");return`node_modules${t[t.length-1]}`}return e?.length?`${e?.split("/").slice(-4).join("/")}`:e};function u(e){return null!=e}},98485(e,t,s){s.d(t,{L2:()=>p,dh:()=>$,nV:()=>E,ps:()=>Y,zG:()=>m});var r=s(15722),i=s(46068),n=s(13078),a=s.n(n),l=s(71513),o=s(34258),d=s(98900),c=s(85409),h=s(8963).Buffer,u={};u.d=(e,t)=>{for(var s in t)u.o(t,s)&&!u.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var p={};u.r(p),u.d(p,{assetsContents:()=>V,chunkTransform:()=>Q,getAssetsModulesData:()=>U,transformAssetsModulesData:()=>q});var m={};u.r(m),u.d(m,{getImportKind:()=>X,getModuleGraphByStats:()=>el,getModulesFromArray:()=>ea,getPositionByStatsLocation:()=>et,isImportDependency:()=>J,isWebpack5orRspack:()=>es,removeNoImportStyle:()=>ee});var f={};u.r(f),u.d(f,{transStats:()=>eo});var g={};u.r(g),u.d(g,{getAllModules:()=>eS,getDependencyPosition:()=>ex,getEntryModule:()=>eg,getExportDependency:()=>ey,getExportStatement:()=>eA,getLastExportInfo:()=>ev,getModuleSource:()=>ef,getResolveRequest:()=>ep,getSdkDependencyByWebpackDependency:()=>ej,getWebpackDependencyRequest:()=>eu,getWebpackModuleId:()=>ec,getWebpackModulePath:()=>eh,isExternalModule:()=>em,isNormalModule:()=>ed});class x{constructor(e,t,s,r,i){this._assets=[],this._modules=[],this._dependencies=[],this._imported=[],this.id=e,this.name=t,this.size=s,this.initial=r,this.entry=i}isEntry(){return this.entry}isChunkEntryModule(e){return e.isEntry||e.getImported().every(e=>!this.hasModule(e))}hasModule(e){return this._modules.includes(e)}addModule(e){this.hasModule(e)||(this._modules.push(e),e.addChunk(this))}addAsset(e){this._assets.push(e)}addModules(e){e.forEach(e=>{this.hasModule(e)||(this._modules.push(e),e.addChunk(this))})}addDependency(e){this._dependencies.includes(e)||this._dependencies.push(e)}addImported(e){this._imported.includes(e)||this._imported.push(e)}getAssets(){return this._assets.slice()}getModules(){return this._modules.slice()}getDependencies(){return this._dependencies.slice()}getImported(){return this._imported.slice()}setParsedSize(e){this._parsedSize=e}toData(){return{id:this.id,name:this.name,initial:this.initial,size:this.size,parsedSize:this._parsedSize||0,entry:this.isEntry(),assets:this._assets.map(e=>{let{path:t}=e;return t}),modules:this._modules.map(e=>{let{id:t}=e;return t}),dependencies:this._dependencies.map(e=>{let{id:t}=e;return t}),imported:this._imported.map(e=>{let{id:t}=e;return t})}}setDependencies(e){this._dependencies=e}setImported(e){this._imported=e}setModules(e){this._modules=e}setAssets(e){this._assets=e}}class y{getAssets(){return Array.from(this._assetMap.values())}getChunks(){return Array.from(this._chunkMap.values())}addAsset(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(e=>{this._assetMap.set(e.id,e),this._assetPathMap.set(e.path,e)})}addChunk(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(e=>{this._chunkMap.set(e.id,e)})}getChunkById(e){return this._chunkMap.get(e)}getAssetByPath(e){return this._assetPathMap.get(e)}getAssetById(e){return this._assetMap.get(e)}getEntryPoints(){return Array.from(this._entrypointMap.values())}getEntryPointById(e){return this._entrypointMap.get(e)}addEntryPoint(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];t.forEach(e=>{this._entrypointMap.set(e.id,e)})}toData(e){return{assets:Array.from(this._assetMap.values()).map(t=>t.toData(e)),chunks:Array.from(this._chunkMap.values()).map(e=>e.toData()),entrypoints:Array.from(this._entrypointMap.values()).map(e=>e.toData())}}setChunks(e){this._chunkMap=new Map(e.map(e=>[e.id,e]))}setEntrypoints(e){this._entrypointMap=new Map(e.map(e=>[e.id,e]))}setAssets(e){this._assetMap=new Map(e.map(e=>[e.id,e])),this._assetPathMap=new Map(e.map(e=>[e.path,e]))}constructor(){this._assetMap=new Map,this._assetPathMap=new Map,this._chunkMap=new Map,this._entrypointMap=new Map}}let j=1;class A{static init(){j=1}constructor(e,t,s,r){this.id=j++,this.path=e,this.size=t,this.chunks=s,this.content=r}toData(e){return{id:this.id,path:this.path,size:this.size,gzipSize:this.gzipSize,chunks:this.chunks?.map(e=>e.id),content:e===r.hp.ToDataType.NoSourceAndAssets||e===r.hp.ToDataType.NoCode?"":this.content}}setChunks(e){this.chunks=e}setId(e){this.id=e}setGzipSize(e){this.gzipSize=(0,i.gzipSync)(e,{level:9}).length}}let v=1;class S{static init(){v=1}constructor(e){this.name=e,this._chunks=[],this._assets=[],this.id=v++}addChunk(e){this._chunks.includes(e)||this._chunks.push(e)}addAsset(e){this._assets.includes(e)||this._assets.push(e)}toData(){return{id:this.id,name:this.name,chunks:this._chunks.map(e=>e.id),assets:this._assets.map(e=>e.path),size:this._assets.length?this._assets.reduce((e,t)=>e+t.size,0):0}}setChunks(e){this._chunks=e}setAssets(e){this._assets=e}setId(e){this.id=e}}let b=1;class M{static #e=this.kind=r.hp.DependencyKind;static init(){b=1}constructor(e,t,s,r,i){this.statements=[],this.meta={exportsType:"default-with-named"},this.id=b++,this.request=e,this.module=t,this._originDependency=s,this.kind=r,this.statements=i??[]}get resolvedRequest(){return this.dependency.path}get dependency(){return this.originDependency.rootModule??this.originDependency}get originDependency(){return this._originDependency}get kindString(){return r.hp.DependencyKind[this.kind]}get resolveConcatenationModule(){return this.dependency.kind===r.hp.ModuleKind.Concatenation}isSameWithoutStatements(e){return this.request===e.request&&this.kind===e.kind&&this.module.id===e.module.id&&this.dependency.id===e.dependency.id}addStatement(e){this.hasStatement(e)||this.statements.push(e)}hasStatement(e){return this.statements.some(t=>t.isSame(e))}setBuildMeta(e){this.meta={...this.meta,...e}}toData(){return{id:this.id,request:this.request,resolvedRequest:this.resolvedRequest,kind:this.kind,...void 0!==this.typeString&&{typeString:this.typeString},module:this.module.id,dependency:this.dependency.id,originDependency:this.originDependency.id,statements:this.statements.map(e=>e.toData())}}setId(e){this.id=e}}function z(e,t){return e.line===t.line&&e.column===t.column}let k=/!/,w=/\s\+\s\d*\smodules$/,I=/^css\s.*node_modules(?!\/)/;class P{static getDefaultStatement(e){let t={line:1,column:0},s={start:{...t},end:{...t}};return new P(e,{source:{...s},transformed:{...s}})}constructor(e,t){this.module=e,this.position=t}isSame(e){var t,s;return this.module.id===e.module.id&&(t=this.position.transformed,s=e.position.transformed,!!z(t.start,s.start)&&(l.AP.isNil(t.end)||l.AP.isNil(s.end)?l.AP.isUndefined(t.end)&&l.AP.isUndefined(s.end):z(t.end,s.end)))}getSourcePosition(){let{module:e,position:t}=this;return t.source?t.source:e.getSourceMap()?(t.source=e.getSourceRange(t.transformed),t.source):void 0}getLineCode(){let e=this.module.isPreferSource&&this.position.source,t=this.module.getSource(),s=e?t.source:t.transformed,r=e?this.position.source.start.line:this.position.transformed.start.line;if("number"==typeof r)return s.split("\n")[r-1]}toData(){let e={transformed:this.position.transformed};return this.position.source&&(e.source=this.position.source),{position:e,module:this.module.id}}}let C=1;class E{static #e=this.kind=r.hp.ModuleKind;static init(){C=1}constructor(e,t,s=!1,i=r.hp.ModuleKind.Normal,n,a=""){this.issuerPath=[],this.bailoutReason=[],this.sideEffectLocations=[],this.sideEffectCodes=[],this.source={source:"",transformed:"",parsedSource:""},this.size={sourceSize:0,transformedSize:0,parsedSize:0,gzipSize:0},this.chunks=[],this.dependencies=[],this.imported=[],this.modules=[],this.concatenationModules=[],this.meta={hasSetEsModuleStatement:!1,strictHarmonyModule:!1},this.id=C++,this.webpackId=e,this.path=t,this.isEntry=s,this.kind=i,this.renderId=n,this.layer=a}get rootModule(){return this.modules.find(e=>e.path===this.path)}get isPreferSource(){if("boolean"==typeof this._isPreferSource)return this._isPreferSource;let e=this.source.source.length>0&&"test code"!==this.source.source&&!!this.sourceMap;return this._isPreferSource=e,e}addBailoutReason(e){this.bailoutReason.push(e)}getBailoutReason(){return this.bailoutReason}addSideEffectLocation(e){this.sideEffectLocations.push(e)}getSideEffectLocations(){return this.sideEffectLocations.slice()}addSideEffectCode(e){this.sideEffectCodes.push(e)}getSideEffectCodes(){return this.sideEffectCodes.slice()}getChunks(){return this.chunks.slice()}addChunk(e){this.chunks.includes(e)||(this.chunks.push(e),e.addModule(this))}removeChunk(e){this.chunks=this.chunks.filter(t=>t!==e)}getDependencies(){return this.dependencies.slice()}getDependencyByRequest(e){return this.dependencies.find(t=>t.request===e)}getDependencyByModule(e){return this.dependencies.find(t=>t.originDependency===e||t.dependency===e)}addDependency(e,t,s,r){let i=new M(e,this,t,s,r);if(this.dependencies.every(e=>!e.isSameWithoutStatements(i)))return this.dependencies.push(i),t.addImported(this),t.rootModule&&t.rootModule.addImported(this),i}removeDependency(e){this.dependencies=this.dependencies.filter(t=>t===e)}removeDependencyByModule(e){let t=this.getDependencyByModule(e);t&&this.removeDependency(t)}getImported(){return this.imported.slice()}addImported(e){this.imported.includes(e)||this.imported.push(e)}removeImported(e){this.imported=this.imported.filter(t=>t===e)}setProgram(e){this.program=e}getProgram(){return this.program}setSource(e){let{source:t}=this;t.source=e.source??t.source,t.transformed=e.transformed??t.transformed,t.parsedSource=e.parsedSource??t.parsedSource}getSource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.hp.ToDataType.Normal;return e===r.hp.ToDataType.NoCode?{source:"",transformed:"",parsedSource:""}:e===r.hp.ToDataType.NoSourceAndAssets||e===r.hp.ToDataType.NoSource?{source:"",transformed:"",parsedSource:this.isPreferSource?"":this.source.parsedSource}:e===r.hp.ToDataType.All?{source:this.source.source,transformed:this.source.transformed,parsedSource:this.isPreferSource?"":this.source.parsedSource}:{source:this.source.source,transformed:"",parsedSource:this.isPreferSource?"":this.source.parsedSource}}setSourceMap(e){this.sourceMap=e}getSourceMap(){return this.sourceMap}setSize(e){let{size:t}=this;if(t.sourceSize=e.sourceSize??t.sourceSize,t.transformedSize=e.transformedSize??t.transformedSize,t.parsedSize=e.parsedSize??t.parsedSize,"number"==typeof e.gzipSize)t.gzipSize=e.gzipSize;else{let e=this.source.parsedSource||this.source.source;if(e&&"string"==typeof e&&e.length>0)try{t.gzipSize=(0,i.gzipSync)(e,{level:9}).length}catch{t.gzipSize=0}}}getSize(){return{...this.size}}getStatement(e){return new P(this,{source:this.getSourceRange(e),transformed:{start:{...e.start},end:e.end?{...e.end}:void 0}})}getSourceRange(e){let{sourceMap:t}=this;if(!t)return;let s={start:{}},r=t.originalPositionFor({line:e.start.line??0,column:e.start.column??0,bias:1});if(l.AP.isNumber(r.line)&&(s.start={line:r.line,column:r.column??void 0}),e.end){let r=t.originalPositionFor({line:e.end.line??0,column:e.end.column??0});l.AP.isNumber(r.line)&&(s.end={line:r.line,column:r.column??void 0})}return s}addNormalModule(e){this.modules.includes(e)||(this.modules.push(e),e.addConcatenationModule(this))}getNormalModules(){return this.modules.slice()}addConcatenationModule(e){this.concatenationModules.includes(e)||this.concatenationModules.push(e)}addIssuerPath(e){this.issuerPath?.length||(this.issuerPath=e)}getIssuerPath(){return this.issuerPath}getConcatenationModules(){return this.concatenationModules.slice()}toData(e,t){let{isPreferSource:s}=this,r=function(e){if(!e)return"";if(k.test(e)){let t=l.AP.last(e.split(k));if(t?.trim())return t}return w.test(e)?e.replace(w,""):I.test(e)?e.replace(I,""):e}(this.webpackId),i={id:this.id,renderId:this.renderId,webpackId:e&&r.indexOf(".")>0?a().relative(e,r):this.webpackId,path:this.path,isPreferSource:s,dependencies:this.dependencies.map(e=>e.id),imported:this.imported.map(e=>e.id),chunks:this.chunks.map(e=>e.id),size:this.getSize(),kind:this.kind,...this.layer?{layer:this.layer}:{},issuerPath:t?void 0:this.issuerPath?.filter(e=>e.moduleId).map(e=>e.moduleId)||[],bailoutReason:this.bailoutReason,...this.sideEffectLocations.length>0?{sideEffectLocations:this.sideEffectLocations}:{}};return(this.meta.hasSetEsModuleStatement||this.meta.strictHarmonyModule)&&(i.meta={},this.meta.hasSetEsModuleStatement&&(i.meta.hasSetEsModuleStatement=!0),this.meta.strictHarmonyModule&&(i.meta.strictHarmonyModule=!0)),this.isEntry&&(i.isEntry=this.isEntry),this.modules.length>0&&(i.modules=this.modules.map(e=>e.id)),this.rootModule&&(i.rootModule=this.rootModule.id),this.concatenationModules.length>0&&(i.concatenationModules=this.concatenationModules.map(e=>e.id)),i}setId(e){this.id=e}setRenderId(e){this.renderId=e}setChunks(e){this.chunks=e}setDependencies(e){this.dependencies=e}setImported(e){this.imported=e}setModules(e){this.modules=e}setConcatenationModules(e){this.concatenationModules=e}}let D=1;class _{static init(){D=1}constructor(e,t,s){this.id=D++,this._sideEffects=[],this.name=e,this.identifier=t,this._variable=s}get isReExport(){return!!this.from}set variable(e){this._variable=e}get variable(){if(this._variable)return this._variable;if(!this.from||!1===this._variable){this._variable=!1;return}let e=this.getRecursiveExport()?.variable;return e||(this._variable=!1),e}addSideEffect(e){this._sideEffects.every(t=>t.id!==e.id)&&(this._sideEffects.push(e),this.from&&this.from.addSideEffect(e))}getSideEffects(){return this._sideEffects.slice()}setFromExport(e){this.from=e}getRecursiveExport(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0;if(0===e)throw Error("`getRecursiveExport` method parameter depth must be greater than 1.");if(!this.from)return this;let t=0,s=this;for(;s.from&&t<e;)t++,s=s.from;return s}toData(){let e={id:this.id,name:this.name,isReExport:this.isReExport,used:this._sideEffects.map(e=>e.id)};return this.from&&(e.from=this.from.id,e.root=this.getRecursiveExport().id),this.variable&&(e.variable=this.variable.id),e}}let N=1;class T{static init(){N=1}static #e=this.NamespaceSymbol=Symbol("namespace");constructor(e,t,s,r,i){this.id=N++,this._exports=[],this.name=e,this.module=t,this.identifier=s,r&&(this.fromDependency=this.module.getDependencyByRequest(r)),i===T.NamespaceSymbol?this.isNameSpace=!0:(this.isNameSpace=!1,this.originName=i)}get variable(){if(void 0!==this._variable)return this._variable?this._variable:void 0;let e=this.exports[0]?.getRecursiveExport()?.variable;return this._variable=e??!1,e}get exports(){return this._exports?.slice()??[]}setModuleExport(e){e.getExports().forEach(e=>this.setExportInfo(e))}setExportInfo(e){this._exports.push(e),e.addSideEffect(this)}toData(){let e={id:this.id,name:this.name,identifier:this.identifier.toData(),module:this.module.id};return this.fromDependency&&(e.fromDependency=this.fromDependency.id),this.isNameSpace&&(e.isNameSpace=this.isNameSpace),this.exports.length>0&&(e.exports=this.exports.map(e=>e.id)),this.variable&&(e.variable=this.variable.id),e}}let B=1;class R{static init(){B=1}constructor(e,t,s,r){this.id=B++,this.name=e,this.module=t,this.usedInfo=s,this.identifier=r}get isUsed(){return!!this._exported&&this._exported.getSideEffects().length>0}setExportInfo(e){this._exported=e,e.variable=this}getExportInfo(){return this._exported}toData(){let e={id:this.id,name:this.name,module:this.module.id,identifier:this.identifier.toData(),usedInfo:this.usedInfo};return this._exported&&(e.exported=this._exported.id),e}}class F{static init(){_.init(),T.init(),R.init()}constructor(e,t,s){this.exports=[],this.sideEffects=[],this.variables=[],this.module=e,this._graph=t,"boolean"==typeof this._dynamic&&(this._dynamic=s)}get dynamic(){return"boolean"==typeof this._dynamic?this._dynamic:this.module.getImported().map(e=>e.getDependencyByModule(this.module)).some(e=>e&&"dynamic"===e.meta.exportsType)}addExportInfo(e){this.exports.push(e),this._graph.addExportInfo(e)}addSideEffect(e){this.sideEffects.push(e),this._graph.addSideEffect(e)}addVariable(e){this.variables.push(e),this._graph.addVariable(e)}getExports(){return this.exports.slice()}getSideEffects(e){return e?this.sideEffects.filter(t=>t.name===e):this.sideEffects.slice()}getOwnExports(){return this.exports.filter(e=>!e.isReExport)}getExport(e){return this.exports.find(t=>t.name===e)}getReExports(){return this.exports.filter(e=>e.isReExport)}getOwnExport(e){return this.getOwnExports().find(t=>t.name===e)}getReExport(e){return this.getReExports().find(t=>t.name===e)}toData(){return{module:this.module.id,dynamic:this.dynamic,exports:this.exports.map(e=>e.id),sideEffects:this.sideEffects.map(e=>e.id),variables:this.variables.map(e=>e.id)}}}class ${static init(){E.init(),M.init(),F.init()}static fromData(e){let t=new $,s=e=>new P(t.getModuleById(e.module),e.position);for(let s of e.modules??[]){let e=new E(String(s.id),s.path,s.isEntry,s.kind,s.renderId,s.layer);e.id=s.id,e.setSize(s.size),e.meta={strictHarmonyModule:s.meta?.strictHarmonyModule??!1,hasSetEsModuleStatement:s.meta?.hasSetEsModuleStatement??!1},e._isPreferSource=s.isPreferSource,e.chunks=s.chunks,t.addModule(e)}for(let r of e.modules??[]){let i=t.getModuleById(r.id);for(let n of r.dependencies){let r=(e.dependencies??[]).find(e=>e.id===n),a=r&&t.getModuleById(r.originDependency);if(!r||!a){console.warn(`The connection data ID is empty: ${n}`);continue}let l=i.addDependency(r.request,a,r.kind,r.statements.map(s));l&&(l.id=r.id,t.addDependency(l))}for(let e of r.modules??[]){let s=t.getModuleById(e);if(!s){console.warn(`Add the ordinary module ID as empty: ${e}`);continue}i.addNormalModule(s)}for(let e of r.concatenationModules??[]){let s=t.getModuleById(e);if(!s){console.warn(`The aggregation module ID is empty: ${s}`);continue}i.addConcatenationModule(s)}}for(let r of e.exports??[]){let e=new _(r.name,r.identifier?s(r.identifier):void 0);e.id=r.id,t.addExportInfo(e)}for(let s of e.exports??[])if(s.from){let e=t._exportIdMap.get(s.id),r=t._exportIdMap.get(s.from);e&&r&&e.setFromExport(r)}for(let r of e.variables??[]){let e=t.getModuleById(r.module);if(!e){console.warn(`The module ID in the variable is empty:${r.module}`);continue}let i=new R(r.name,e,r.usedInfo,s(r.identifier)),n=t._exportIdMap.get(r.exported??-1);n&&i.setExportInfo(n),i.id=r.id,t.addVariable(i)}for(let r of e.sideEffects??[]){let e=t.getModuleById(r.module);if(!e){console.warn(`The module ID in the side effects is empty:${r.module}`);continue}let i=new T(r.name,e,s(r.identifier),r.originName);for(let e of(i.isNameSpace=r.isNameSpace,i.id=r.id,r.exports??[])){let s=t._exportIdMap.get(e);s&&s.addSideEffect(i)}if(r.variable){let e=t._varIdMap.get(r.variable);e&&(i._variable=e)}t.addSideEffect(i)}for(let s of e.moduleGraphModules??[]){let e=t.getModuleById(s.module);if(!e){console.warn(`The module ID in ModuleGraphModule is empty: ${s.module}`);continue}let r=new F(e,t,s.dynamic);t.addModuleGraphModule(r),s.exports.forEach(e=>{let s=t._exportIdMap.get(e);s&&r.addExportInfo(s)}),s.sideEffects.forEach(e=>{let s=t._sideEffectIdMap.get(e);s&&r.addSideEffect(s)}),s.variables.forEach(e=>{let s=t._varIdMap.get(e);s&&r.addVariable(s)})}return $.init(),t}clear(){this._dependenciesIdMap=new Map,this._moduleWebpackIdMap=new Map,this._moduleIdMap=new Map,this._moduleGraphModules=new Map,this._exportIdMap=new Map,this._sideEffectIdMap=new Map,this._varIdMap=new Map,this._layers=new Map}size(){return this._moduleIdMap.size}fromInstance(e){this.setModules(e.getModules()),this.setDependencies(e.getDependencies()),this.setConnectionsOnlyImports(e.getConnectionsOnlyImports()),e instanceof $&&(this._moduleGraphModules=new Map(e._moduleGraphModules),this._exportIdMap=new Map(e._exportIdMap),this._sideEffectIdMap=new Map(e._sideEffectIdMap),this._varIdMap=new Map(e._varIdMap),this._layers=new Map(e._layers))}getSubGraphByModule(e){let t=new Set,s=[e];t.add(e);for(let e=0;e<s.length;e++)for(let{dependency:r}of s[e].getDependencies())t.has(r)||(t.add(r),s.push(r));return s}getModules(){return Array.from(this._moduleWebpackIdMap.values())}getDependencies(){return Array.from(this._dependenciesIdMap.values())}getEntryModules(){return this.getModules().filter(e=>e.isEntry&&e.kind!==r.hp.ModuleKind.Concatenation)}getModuleById(e){return this._moduleIdMap.get(e)}getDependencyById(e){return this._dependenciesIdMap.get(e)}getModuleByWebpackId(e){return this._moduleWebpackIdMap.get(e)}getModuleByFile(e,t){return this.getModules().filter(s=>s.path===e&&(void 0===t||s.layer===t))}addModule(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];for(let e of t)!this._moduleIdMap.has(e.id)&&(this._moduleWebpackIdMap.set(e.webpackId,e),this._moduleIdMap.set(e.id,e),e.layer&&this.addLayer(e.layer))}addDependency(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];for(let e of t)this._dependenciesIdMap.has(e.id)||(this._dependenciesIdMap.set(e.id,e),this.addModule(e.module),this.addModule(e.dependency))}removeModule(e){for(let t of(this._moduleIdMap.delete(e.id),this._moduleWebpackIdMap.delete(e.webpackId),e.getDependencies()))this.removeDependency(t),this._dependenciesIdMap.delete(t.id);for(let t of e.getImported())t.removeDependencyByModule(t)}removeDependency(e){e.module.removeDependency(e),e.dependency.removeImported(e.module),this._dependenciesIdMap.delete(e.id)}addModuleGraphModule(e){this._moduleGraphModules.has(e.module)||this._moduleGraphModules.set(e.module,e)}getModuleGraphModule(e){return this._moduleGraphModules.get(e)}getModuleGraphModules(){return Array.from(this._moduleGraphModules.values())}addExportInfo(e){this._exportIdMap.set(e.id,e)}addSideEffect(e){this._sideEffectIdMap.set(e.id,e)}addVariable(e){this._varIdMap.set(e.id,e)}addLayer(e){this._layers.get(e)||this._layers.set(e,1)}getLayers(){return this._layers}toData(e){let t=!!(e?.briefOptions?.type&&e.briefOptions.type.length);return{dependencies:this.getDependencies().map(e=>e.toData()),modules:this.getModules().map(s=>s.toData(e?.contextPath,t)),moduleGraphModules:t?[]:Array.from(this._moduleGraphModules.values()).map(e=>e.toData()),exports:t?[]:Array.from(this._exportIdMap.values()).map(e=>e.toData()),sideEffects:t?[]:Array.from(this._sideEffectIdMap.values()).map(e=>e.toData()),variables:t?[]:Array.from(this._varIdMap.values()).map(e=>e.toData()),layers:Array.from(this._layers.keys())}}toTreeShakingData(){let e={};for(let t of this.getModules()){let s=t.getSideEffectCodes();s.length>0&&(e[s[0].moduleId]=s)}return{sideEffectCodes:e}}toCodeData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.hp.ToDataType.Normal,t={};return this.getModules().forEach(s=>{t[s.id]=s.getSource(e)}),t}setModules(e){this._moduleIdMap=new Map(e.map(e=>[e.id,e])),this._moduleWebpackIdMap=new Map(e.map(e=>[e.webpackId,e])),this._layers=new Map(e.filter(e=>e.layer).map(e=>[e.layer,1]))}setDependencies(e){this._dependenciesIdMap=new Map(e.map(e=>[e.id,e]))}setConnectionsOnlyImports(e){this._connectionsOnlyImports=e}getConnectionsOnlyImports(){return this._connectionsOnlyImports}constructor(){this._dependenciesIdMap=new Map,this._connectionsOnlyImports=[],this._moduleWebpackIdMap=new Map,this._moduleIdMap=new Map,this._moduleGraphModules=new Map,this._exportIdMap=new Map,this._sideEffectIdMap=new Map,this._varIdMap=new Map,this._layers=new Map}}let O=1;class G{constructor(e,t,s){this.id=O++,this.package=e,this.dependency=t,this.refDependency=s}get name(){return this.dependency.name}get version(){return this.dependency.version}get root(){return this.dependency.root}isSame(e){return this.refDependency===e.refDependency&&this.dependency.isSame(e.dependency)}toData(){return{id:this.id,dependency:this.dependency.id,package:this.package.id,refDependency:this.refDependency.id}}}let L=(e,t)=>{let s,r=e;for(;"/"!==r&&!s&&(0,n.dirname)(r)!==r;)r=(0,n.dirname)(r),t&&(s=t((0,n.join)(r,"package.json"))),t?s?.name||(s=void 0):s=l.lP.getPackageMetaFromModulePath(e);if(s)return!t||s.name&&s.version?{...s,root:r}:L((0,n.dirname)(r),t)},W=1;class K{constructor(e,t,s){this.id=W++,this._modules=[],this._dependencies=[],this._imported=[],this.name=e,this.root=t,this.version=s,this.duplicates=[]}setDuplicates(e){this.duplicates.push({module:e.module,chunks:e.chunks})}getModules(){return this._modules.slice()}getDependencies(){return this._dependencies.slice()}getImported(){return this._imported.slice()}addModule(e){this._modules.includes(e)||this._modules.push(e)}addDependency(e){this._dependencies.every(t=>!t.isSame(e))&&(this._dependencies.push(e),e.dependency.addImported(this))}getDependenciesChain(e){return function t(s,r){for(let i of e.getDependenciesFromPackage(s))if(i.refDependency&&!r.some(e=>e.dependency===s)){if(!i.package)return r.concat(i);return t(i.package,r.concat(i))}return r}(this,[])}addImported(e){this._imported.includes(e)||this._imported.push(e)}contain(e){var t;return!!e.includes(this.root)&&(t=(0,n.relative)(this.root,e),!/(^|[/\\])node_modules[/\\]/.test(t))}isSame(e){return this.root===e.root&&this.version===e.version&&this.name===e.name}getSize(){return this._modules.reduce((e,t)=>{let s=t.getSize();return e.sourceSize+=s.sourceSize,e.transformedSize+=s.transformedSize,e.parsedSize+=s.parsedSize,e.gzipSize+=s.gzipSize,e},{sourceSize:0,transformedSize:0,parsedSize:0,gzipSize:0})}toData(){return{id:this.id,name:this.name,root:this.root,version:this.version,modules:this.getModules().map(e=>e.id),size:this.getSize(),duplicates:this.duplicates}}}class Y{static fromModuleGraph(e,t,s){let i=new Y(t);for(let t of e.getModules().filter(e=>e.kind===r.hp.ModuleKind.Normal)){if(!t.getChunks())continue;let e=i.getPackageByModule(t,s);e&&(i.addPackage(e),e.addModule(t))}for(let t of e.getDependencies()){let e=i.getPackageByFile(t.module.path),s=i.getPackageByFile(t.dependency.path);if(e&&s&&!e.isSame(s)){let r=new G(e,s,t);i.addDependency(r),e.addDependency(r)}}return i}constructor(e){this._dependencies=[],this._packages=[],this._pkgNameMap=new Map,this._pkgFileMap=new Map,this._root=e}getPackages(){return this._packages.slice()}getPackageByModule(e,t){let{path:s,meta:r}=e,{_pkgFileMap:i}=this,a=e=>this.getPackageByData(e)??new K(e.name,e.root,e.version);if(i.has(s))return i.get(s);if(r.packageData){let t=a(r.packageData);return this.setDuplicates(e,t),i.set(s,t),t}let l=this.getPackageContainFile(s);if(l)return i.set(s,l),l;let o=L(s,t);if(!o)return;o.root.startsWith(".")&&(o.root=(0,n.resolve)(this._root,o.root));let d=a(o);return this.setDuplicates(e,d),this.addPackage(d),i.set(s,d),d}getPackageByFile(e){return this._pkgFileMap.get(e)}getPackageContainFile(e){return this._packages.find(t=>t.contain(e))}getPackagesByName(e){return this._pkgNameMap.get(e)??[]}getPackageByData(e){return this._pkgNameMap.get(e.name)?.find(t=>t.version===e.version&&t.root===e.root)}addPackage(e){if(this._packages.every(t=>!t.isSame(e))){this._packages.push(e);let{_pkgNameMap:t}=this,s=t.get(e.name)??[];s.every(t=>!t.isSame(e))&&(s.push(e),t.set(e.name,s))}}setDuplicates(e,t){let s=[],r=e.getChunks();r.forEach(e=>s.push(...e.getAssets().filter(e=>e.path.endsWith(".js")||e.path.endsWith(".bundle")))),r.length>1&&t.setDuplicates({module:{id:e.id,path:e.path},chunks:s.map(e=>({name:e.path}))})}getDependenciesFromPackage(e){return this._dependencies.filter(t=>t.dependency===e)}addDependency(e){this._dependencies.every(t=>!t.isSame(e))&&this._dependencies.push(e)}getDependenciesFromOrigin(){return this._dependencies.filter(e=>!e.package)}getDuplicatePackages(){return(0,o.R)(Array.from(this._pkgNameMap.values()).map(e=>(0,o.R)(e,"version")).filter(e=>e.length>1),e=>e[0].name)}toData(){return{packages:this._packages.map(e=>e.toData()),dependencies:this._dependencies.map(e=>e.toData())}}}async function U(e,t,s,r){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Map,o=arguments.length>5?arguments[5]:void 0;if(n.size>0){for(let[t,s]of((0,d.kB)("Start Parse bundle by sourcemap."),n.entries())){let r,n=e.getModuleByFile(t);try{s&&"string"==typeof s&&s.length>0&&(r=(0,i.gzipSync)(s,{level:9}).length)}catch{}for(let e of n)e?.setSize({parsedSize:s.length,gzipSize:r}),e?.setSource({parsedSource:s})}(0,d.PZ)("Start Parse bundle by sourcemap.")}if(r.parseBundle&&(o&&o.size>0||n.size<1)){(0,d.kB)("Start Parse bundle by AST.");let{parseBundle:i=()=>({})}=r||{},n=t.getAssets(),h=e.getModules(),u=null,p=null;if(s&&n.length){for(let e of(u={},p={},n)){let t;if(o&&o.size>0&&!o.has(e.path))continue;let r=a().join(s,e.path);try{t=i(r,h)}catch(i){let{code:e="",message:t}=i,s="ENOENT"===e?"no such file":t;"1"===c.env.DEVTOOLS_NODE_DEV&&d.vF.warn(`Error parsing bundle asset "${r}": ${s}`);continue}u[e.path]=l.AP.pick(t,["src","runtimeSrc"]),Object.assign(p,t?.modules||{})}l.AP.isEmpty(u)&&(u=null,p=null,c.env.DEVTOOLS_DEV&&d.vF.warn("\nNo bundles were parsed. Analyzer will show only original module sizes from stats file.\n")),p&&q(p,e)}(0,d.PZ)("Start Parse bundle by AST.")}}function q(e,t){t&&Object.entries(e).forEach(e=>{let[s,r]=e,n,a=t.getModuleByWebpackId(s??"");try{r?.content&&"string"==typeof r.content&&r.content.length>0&&(n=(0,i.gzipSync)(r.content,{level:9}).length)}catch{}a?.setSize({parsedSize:r?.size,gzipSize:n}),a?.setSource({parsedSource:r?.content||""})})}let H="assets by status";function Q(e,t){let s=new y;if(t.chunks?.forEach(e=>{let t=new x(String(e.id),e.names?.join("")||e.files?.join("| ")||"",e.size,e.initial,e.entry);t.setParsedSize(0),s.addChunk(t)}),t.assets?.every(e=>e.type===H)?t.chunks?.forEach(t=>{let r=s.getChunkById(String(t.id));r&&t.files&&t.files.forEach(t=>{if(!s.getAssetByPath(t)){let{content:i=""}=e.get(t)||{},n=new A(t,0,[r],i);r.addAsset(n),s.addAsset(n)}})}):t.assets?.forEach(t=>{if(t.type===H)return;let r=t.chunks?.map(e=>s.getChunkById(String(e))).filter(e=>!!e)||[],{content:i=""}=e.get(t.name)||{},n=h.byteLength(i,"utf8"),a=t.size??n,l=new A(t.name,a,r,i);r.forEach(e=>e?.addAsset(l)),s.addAsset(l)}),t.entrypoints)for(let[e,r]of Object.entries(t.entrypoints)){let t=new S(r.name||e);r.chunks?.forEach(e=>{let r=s.getChunkById(`${e}`);r&&t.addChunk(r)}),r.assets?.forEach(e=>{let r=s.getAssetByPath(e.name);r&&t.addAsset(r)}),s.addEntryPoint(t)}return s}let Z=/\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest)$/i;function V(e,t,s){t.getAssets().forEach(t=>{let{content:r=""}=e.get(t.path)||{};t.content=r,r.length>0&&0===t.size&&(t.size=h.byteLength(r,"utf8")),Z.test(t.path)&&s?.gzip&&t.setGzipSize(r)})}function J(e){let{type:t}=e;return"harmony side effect evaluation"===t||"cjs require"===t||"cjs full require"===t||"cjs export require"===t||"provided"===t||"esm import"===t}function X(e){let{type:t}=e;return t?t.includes("harmony")||"esm import"===t?r.hp.DependencyKind.ImportStatement:t.includes("cjs")?r.hp.DependencyKind.RequireCall:t.includes("import()")?r.hp.DependencyKind.DynamicImport:t.includes("amd")?r.hp.DependencyKind.AMDRequire:r.hp.DependencyKind.Unknown:r.hp.DependencyKind.Unknown}function ee(e){e.getModules().filter(e=>l.ZH.isStyleExt(e.path)).filter(e=>0===e.getImported().length).forEach(t=>e.removeModule(t))}function et(e){function t(e){let[t,s]=e.split(":");return{line:Number(t),column:Number(s)}}if(e.includes("-")){let s=e.split("-"),r=t(s[0]),i=t(s[1]);return{start:r,end:Number.isNaN(i.column)?{line:r.line,column:i.line}:i}}return e.includes(":")?{start:t(e)}:e.includes("[")?{start:{index:Number(e.match(/\[(\d+)\]/)[1])}}:void 0}function es(e){return"moduleGraph"in e&&!!e.moduleGraph}function er(e){if(!e.identifier||!(e?.nameForCondition||e.name)||e.identifier.startsWith("webpack/runtime")||e?.name?.startsWith("(webpack)"))return!0}function ei(e,t){if(t.nameForCondition)return t.nameForCondition.replace("\0","");let s=t.name.replace(/ ?\+ ?\d+ ?modules$/,"");return a().isAbsolute(s)?s:a().join(e,s)}function en(e){return".json"===a().extname(e).toLowerCase()}function ea(e,t){e.forEach(e=>{"module"===e.type||void 0===e.type?t.push(e):"children"in e&&e.children&&ea(e.children,t)})}function el(e,t,s){var i;let{modules:n,chunks:a}=e;$.init();let l=new $,o=[],d=[];for(let e of(ea(n??[],d),i=a??[],i?.forEach(e=>{e.modules?.length&&d.push(...e.modules.map(e=>({...e,identifier:e.identifier??e.moduleIdentifier,name:e.name??e.moduleName})))}),d??[])){if(er(e)||l.getModuleByWebpackId(e.identifier))continue;o.push(e);let i=!!(e.modules&&e.modules.length>0),n=new E(e.identifier??e.moduleIdentifier,ei(t,e),0===e.depth,i?r.hp.ModuleKind.Concatenation:r.hp.ModuleKind.Normal,e.id?String(e.id):void 0,e.layer);if(e.optimizationBailout&&e.optimizationBailout.forEach(e=>n.addBailoutReason(e)),e.issuerPath&&n.addIssuerPath(e.issuerPath),e.chunks?.forEach(e=>{let t=s.getChunkById(String(e));t&&n.addChunk(t)}),l.addModule(n),e.source&&n.setSource({transformed:h.isBuffer(e.source)?e.source.toString():e.source}),"number"==typeof e.size){n.setSize({sourceSize:e.size,transformedSize:e.size});let t={sourceSize:e.size,transformedSize:e.size};en(n.path)&&(t.parsedSize=e.size),n.setSize(t)}for(let i of e.modules??[]){let a;if(er(i))continue;o.push(i);let d=i.identifier;if(a=l.getModuleByWebpackId(d)||(l.getModuleByWebpackId(d)??new E(d,ei(t,i),0===i.depth,r.hp.ModuleKind.Normal,i.id?String(i.id):void 0,i.layer)),i.optimizationBailout&&i.optimizationBailout.filter(e=>!e.includes("ModuleConcatenation bailout")).forEach(e=>a.addBailoutReason(e)),i.issuerPath&&a.addIssuerPath(i.issuerPath),i.chunks?.length?i.chunks?.forEach(e=>{let t=s.getChunkById(String(e));t&&a.addChunk(t)}):e.chunks?.forEach(e=>{let t=s.getChunkById(String(e));t&&a.addChunk(t)}),i.source&&a.setSource({transformed:h.isBuffer(i.source)?i.source.toString():i.source}),"number"==typeof i.size){a.setSize({sourceSize:i.size,transformedSize:i.size});let e={sourceSize:i.size,transformedSize:i.size};en(a.path)&&(e.parsedSize=i.size),a.setSize(e)}l.addModule(a),n.addNormalModule(a)}}for(let e of o){let t=l.getModuleByWebpackId(e.identifier??"");if(!t)continue;let s=(e.reasons??[]).filter(J).filter(e=>!!(e.moduleIdentifier&&e.userRequest));for(let r of((e.reasons??[]).filter(e=>"from origin"===e.type).forEach(e=>e?.children?.forEach(t=>s.push({...e,...t,children:void 0}))),s)){let e=r.userRequest,s=l.getModuleByWebpackId(r.moduleIdentifier);if(!s)continue;if(!s.getDependencyByRequest(e)){let i=s.addDependency(e,t,X(r));i&&l.addDependency(i)}let i=s.getDependencyByRequest(e);if(i&&r?.loc){let e=et(r.loc);e&&i.addStatement(new P(s,{transformed:e}))}}}let c=new Map;return l.getModules().forEach(e=>{e.issuerPath&&e.issuerPath.forEach(e=>{let t=c.get(e.identifier);!t&&(t=l.getModuleByWebpackId(e.identifier))&&c.set(e.identifier,t),t&&(e.moduleId=t.id)})}),l}async function eo(e){let t=Q(new Map,e),s=el(e,".",t);return await U(s,t,e.outputPath||"",{}),{chunkGraph:t,moduleGraph:s}}function ed(e){return"request"in e&&"rawRequest"in e&&"resource"in e}function ec(e){return e.identifier()}function eh(e){return e.resource??e.nameForCondition?.()??ec(e)}function eu(e,t){return e.request??e.userRequest??t?.rawRequest}function ep(e,t){return eh(t.getResolvedModule(e))}function em(e){return!!e.externalType}function ef(e){return em(e)?"":e.originalSource?.()?.source().toString()??""}function eg(e){return Array.from(e.values()).map(e=>e.getRuntimeChunk()).map(e=>e?e.entryModule:null).filter(Boolean).map(e=>ed(e)?e:e.rootModule)}function ex(e,t){let s=!(arguments.length>2)||void 0===arguments[2]||arguments[2],{loc:r}=e;if(void 0===r||!("start"in r))return;let i={start:{line:r.start.line,column:r.start.column},end:r.end?{line:r.end.line,column:r.end.column}:void 0};return new P(t,{source:s?t.getSourceRange(i):void 0,transformed:i})}function ey(e,t){let s=t.dependencies.find(t=>t.name===e.name&&("harmony export imported specifier"===t.type||"harmony export specifier"===t.type));return!s&&e._target&&e._target.size>0&&(s=e._getMaxTarget().values().next().value.connection.dependency),s}function ej(e,t,s){let r=eh(t),i=eu(e);return s.getDependencies().find(e=>e.module.path===r&&e.request===i)}function eA(e,t,s){let r=ey(e,t);if(!r)return;let i=eh(t),n=eu(r),a=s.getDependencies().find(e=>e.module.path===i&&e.request===n);if(a&&1===a.statements.length)return a.statements[0];let l=s.getModuleByWebpackId(ec(t));if(l)return ex(r,l)}function ev(e,t){let s=e.findTarget(t,()=>!0);if(s&&s.export)return t.getExportsInfo(s.module).getExportInfo(s.export[0])}function eS(e){let t=[];for(let s of e.modules)t.push(...s.modules??[]),t.push(s);return(0,o.R)(t.filter(e=>!ec(e).startsWith("webpack/runtime")),e=>ec(e))}},71513(e,t,s){s.d(t,{AP:()=>g.AP,BD:()=>_,B_:()=>S,Fp:()=>b,TS:()=>k,Wh:()=>y,ZH:()=>M,_8:()=>I,aH:()=>w,gX:()=>N,l5:()=>D,lP:()=>P,oG:()=>j,s0:()=>T,xR:()=>E});var r,i,n=s(98219),a=s(46068),l=s(8963),o=s(13078),d=s.n(o),c=s(85409),h=s(15722),u=s(39980),p=s.n(u),m=s(35207),f=s(98900),g=s(20645),x=s(85409),y={};n.Q.r(y),n.Q.d(y,{getPackageRelationAlertDetails:()=>e8});var j={};n.Q.r(j),n.Q.d(j,{compressText:()=>O,decompressText:()=>G,mergeIntervals:()=>$,random:()=>L});var A={};n.Q.r(A),n.Q.d(A,{getBundleDiffPageQueryString:()=>e2,getBundleDiffPageUrl:()=>e5,parseFilesFromBundlePageUrlQuery:()=>e4});var v={};n.Q.r(v),n.Q.d(v,{decode:()=>F,encode:()=>R});var S={};n.Q.r(S),n.Q.d(S,{APIDataLoader:()=>tr});var b={};n.Q.r(b),n.Q.d(b,{fetchWithTimeout:()=>tn,getFetch:()=>ti,postJSON:()=>ta});var M={};n.Q.r(M),n.Q.d(M,{isJsExt:()=>tm,isStyleExt:()=>tp});var z={};n.Q.r(z),n.Q.d(z,{getMcpConfigPath:()=>tu,writeMcpPort:()=>th});var k={};n.Q.r(k),n.Q.d(k,{diffAssetsByExtensions:()=>eq,diffSize:()=>eU,extname:()=>eV,filterAssets:()=>eG,filterAssetsByExtensions:()=>eO,filterModulesAndDependenciesByPackageDeps:()=>eN,formatAssetName:()=>eR,getAllBundleData:()=>eZ,getAssetDetails:()=>eQ,getAssetsDiffResult:()=>eY,getAssetsSizeInfo:()=>eL,getAssetsSummary:()=>eH,getBundleDiffResult:()=>e0,getChunkByChunkId:()=>ev,getChunkIdsByAsset:()=>ej,getChunksByAsset:()=>eb,getChunksByChunkIds:()=>eS,getChunksByModule:()=>eA,getChunksByModuleId:()=>eM,getDependenciesByModule:()=>ek,getDependencyByPackageData:()=>ez,getDependencyByResolvedRequest:()=>ew,getEntryPoints:()=>e1,getInitialAssetsSizeInfo:()=>eK,getModuleByDependency:()=>e_,getModuleDetails:()=>eT,getModuleIdsByChunk:()=>eP,getModuleIdsByModulesIds:()=>eC,getModulesByAsset:()=>eI,getModulesByChunk:()=>eE,getModulesByChunks:()=>eD,getModulesDiffResult:()=>eJ,getPackagesDiffResult:()=>eX,isAssetMatchExtension:()=>eF,isAssetMatchExtensions:()=>e$,isInitialAsset:()=>eW});var w={};n.Q.r(w),n.Q.d(w,{LoaderInternalPropertyName:()=>el,findLoaderTotalTiming:()=>Q,getDirectoriesLoaders:()=>ei,getLoaderChartData:()=>ee,getLoaderCosts:()=>V,getLoaderFileDetails:()=>es,getLoaderFileFirstInput:()=>en,getLoaderFileInputAndOutput:()=>ea,getLoaderFileTree:()=>et,getLoaderFolderStatistics:()=>er,getLoaderNames:()=>J,getLoadersCosts:()=>Z,getLoadersTransformData:()=>X,isVue:()=>eo});var I={};n.Q.r(I),n.Q.d(I,{fetchShardingData:()=>q,fetchShardingFiles:()=>H,isShardingData:()=>U});var P={};n.Q.r(P),n.Q.d(P,{MODULE_PATH_PACKAGES:()=>to,PACKAGE_PATH_NAME:()=>td,getPackageMetaFromModulePath:()=>tc});var C={};n.Q.r(C),n.Q.d(C,{getPluginData:()=>e9,getPluginHooks:()=>e3,getPluginSummary:()=>e6,getPluginTapNames:()=>e7});var E={};n.Q.r(E),n.Q.d(E,{getResolverCosts:()=>eg,getResolverFileDetails:()=>ey,getResolverFileTree:()=>ex,isResolveFailData:()=>ef,isResolveSuccessData:()=>em});var D={};n.Q.r(D),n.Q.d(D,{RspackLoaderInternalPropertyName:()=>te,RspackSummaryCostsDataName:()=>tt,checkSourceMapSupport:()=>ts});var _={};n.Q.r(_),n.Q.d(_,{SummaryCostsDataName:()=>B});var N={};n.Q.r(N),n.Q.d(N,{formatCosts:()=>eu,getCurrentTimestamp:()=>ep,getUnit:()=>eh,toFixedDigits:()=>ec});var T={};n.Q.r(T),n.Q.d(T,{isFilePath:()=>K,isRemoteUrl:()=>Y,isUrl:()=>W});var B=((r={}).Bootstrap="bootstrap->beforeCompile",r.Compile="beforeCompile->afterCompile",r.Done="afterCompile->done",r.Minify="minify(processAssets)",r);function R(e){let t=`${e.charCodeAt(0)}`;for(let s=1;s<e.length;s++)t+=`!${e.charCodeAt(s)}`;return t}function F(e){let t="",s="";for(let r=0;r<e.length;r++)"!"===e[r]?(t+=String.fromCharCode(+s),s=""):s+=e[r];return s&&(t+=String.fromCharCode(+s)),t}function $(e){let t,s;e.sort((e,t)=>e[0]-t[0]);let r=[];for(let i=0;i<e.length;i++)s=e[i],!t||s[0]>t[1]?(t=s,r.push(s)):t[1]=Math.max(t[1],s[1]);return r}function O(e){try{return(0,a.deflateSync)(e).toString("base64")}catch(e){return f.vF.debug(`compressText error: ${e}`),""}}function G(e){return(0,a.inflateSync)(l.Buffer.from(e,"base64")).toString()}function L(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function W(e){return/^https?:\/\//.test(e)}function K(e){return(0,o.isAbsolute)(e)}function Y(e){return!!("string"==typeof e&&(W(e)||(0,o.isAbsolute)(e)))}function U(e){return!!(Array.isArray(e)&&e.length>0&&e.every(e=>Y(e)))}async function q(e,t){let s=await Promise.all(e.map(e=>t(e))),r=0===s.length?[]:s.reduce((e,t)=>e+t);return"object"==typeof r?r:JSON.parse(G(r))}async function H(e,t,s){return(await Promise.all(Object.keys(e).map(async r=>{let i=e[r];return s?.length&&0>s.indexOf(r)?{[r]:[]}:U(i)?{[r]:await q(i,t)}:{[r]:i}}))).reduce((e,t)=>Object.assign(e,t))}function Q(e){let t=1/0,s=-1/0;for(let r=0;r<e.length;r++){let i=e[r];i.startAt<=t&&(t=i.startAt),i.endAt>=s&&(s=i.endAt)}return{start:t,end:s}}function Z(e,t){let s={},r={};t.forEach(t=>{e(t)?(s[t.pid]||(s[t.pid]=[]),s[t.pid].push([t.startAt,t.endAt])):(r[t.pid]||(r[t.pid]=[]),r[t.pid].push([t.startAt,t.endAt]))});let i=0,n=Object.keys(s);for(let e=0;e<n.length;e++){let t=n[e],a=$(s[t]),l=$(r[t]||[]).filter(e=>{let[t,s]=e;return a.some(e=>t>=e[0]&&s<=e[1])});i+=(a.length?a.reduce((e,t)=>e+=t[1]-t[0],0):0)-(l.length?l.reduce((e,t)=>e+=t[1]-t[0],0):0)}return i}function V(e,t){let s=t.filter(t=>!t.loader.includes("builtin")&&t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),r=e.endAt-e.startAt;return s.length&&$(s.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];r-=t}),r}function J(e){let t=new Set;return e.forEach(e=>e.loaders.forEach(e=>t.add(ed(e.loader)))),[...t]}function X(e){let t=[];for(let s=0;s<e.length;s++){let r=e[s];for(let e=0;e<r.loaders.length;e++){let s=r.loaders[e];t.push(s)}}return t}function ee(e){let t=[],s=X(e);return e.forEach(e=>{e.loaders.forEach(r=>{t.push({layer:e.resource.layer,loader:ed(r.loader),isPitch:r.isPitch,startAt:r.startAt,endAt:r.endAt,pid:r.pid,sync:r.sync,resource:e.resource.path,costs:V(r,s)})})}),t}function et(e){let t=X(e);return e.map(e=>{let{loaders:s,resource:r}=e;return{path:r.path,layer:r.layer,loaders:s.map(e=>({key:e.path,loader:ed(e.loader),path:e.path,errors:e.errors,costs:V(e,t)}))}})}function es(e,t){let s=t.find(t=>t.resource.path===e);if(!s)throw Error(`"${e}" not match any loader data`);let r=X(t);return{...s,loaders:s.loaders.map(e=>{let{input:t,result:s,...i}=e;return{...i,loader:ed(e.loader),costs:V(e,r)}})}}function er(e,t){let s=t.filter(t=>{let{path:s}=t.resource;return s.startsWith(e)}),r=[],i=new Map;return s.forEach(e=>{e.loaders.forEach(e=>{let t=i.get(e.loader);return t?i.set(e.loader,{files:t.files+1,path:e.path}):i.set(e.loader,{files:1,path:e.path}),r.push({loader:e.loader,startAt:e.startAt,endAt:e.endAt,pid:e.pid})})}),Array.from(i).map(e=>{let t=Z(t=>t.loader===e[0],r);return{loader:e[0],files:e[1].files,path:e[1].path,costs:t}})}function ei(e,t){let s,r=t||x.cwd();return(s=new Set,e.forEach(e=>{if(e.resource.path.startsWith(r)){let t=e.resource.path.split(r).slice(1).join("/").split("/");if(t.length>=2){let e=t.slice(0,2).join("/");s.add(`${r}/${e}`)}}else{let t=e.resource.path.split("/"),r=t.slice(0,t.length-1).join("/");s.add(r)}}),Array.from(s)).map(t=>{let s=er(t,e);return{directory:t,stats:s}})}function en(e,t){for(let s=0;s<t.length;s++){let r=t[s];if(r.resource.path===e){let e=r.loaders.filter(e=>!e.isPitch);if(!e.length)return"";return e[0].input||""}}return""}function ea(e,t,s,r){for(let i=0;i<r.length;i++){let n=r[i];if(n.resource.path===e)for(let e=0;e<n.loaders.length;e++){let r=n.loaders[e];if(ed(r.loader)===t&&r.loaderIndex===s)return{input:r.input||"",output:r.result||""}}}return{input:"",output:""}}let el="__l__",eo=e=>("module"in e.options&&e.options.module.rules||[]).some(e=>!!(e&&"object"==typeof e&&e.test instanceof RegExp&&e.test?.test(".vue"))),ed=e=>{let t=e.includes("node_modules")?e.split("node_modules"):null;return t?t[t.length-1]:e};function ec(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 0===t?Math.floor(e):+e.toFixed(t)}function eh(e,t){return"m"===t?e>1?"mins":"min":e>1?"hours":"hour"}function eu(e){if((e=Number(e))>=1e3){let t=e/1e3;if(t>=60){let e=t/60;if(e>=60){let t=ec(e/60,0),s=ec(e%60,1),r=eh(t,"h");return s>0?`${t}${r} ${s}${eh(s,"m")}`:`${t}${r}`}let s=eh(e=ec(e,0),"m"),r=ec(t%60,0);return r>0?`${e}${s} ${r}s`:`${e}${s}`}return`${ec(t,1)}s`}if(e>=10)return`${+ec(e,0)}ms`;if(e>=1)return`${+ec(e,1)}ms`;let t=+ec(e,2);return 0===t&&(t=+ec(e,3)),`${t}ms`}function ep(e,t){let s=(0,c.hrtime)(t);return e+1e3*s[0]+(x.env.RSTEST?Math.round(s[1]/1e6):s[1]/1e6)}function em(e){return!!e.result}function ef(e){return!!e.error}function eg(e,t){let s=t.filter(t=>t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),r=e.endAt-e.startAt;return s.length&&$(s.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];r-=t}),r}function ex(e){return e.map(e=>({issuerPath:e.issuerPath}))}function ey(e,t,s,r){let i=s.find(t=>t.path===e),n=t.filter(t=>t.issuerPath===e),a=i&&r&&r[i.id]?r[i.id].source:"",l=n.reduce((e,t)=>t.request&&em(t)?e.replace(RegExp(`["']${t.request}["']`),`"${t.result}"`):e,a);return{filepath:e,before:a,after:l,resolvers:n.map(e=>({...e,costs:eg(e,t)}))}}function ej(e){return e.chunks?e.chunks:[]}function eA(e,t){return e.chunks.length?eS(e.chunks,t):[]}function ev(e,t){return t.find(t=>t.id===e)}function eS(e,t,s){return e.length?e.map(e=>t.find(t=>t.id===e)).filter(Boolean).map(e=>{if(s&&s.length>0){let t={};for(let r of s)void 0!==e[r]&&(t[r]=e[r]);return t}return e}):[]}function eb(e,t,s){return eS(ej(e),t,s)}function eM(e,t,s){let r=t.find(t=>t.id===e);return r?eA(r,s):[]}function ez(e,t){return t.find(t=>t.id===e.dependencyId)}function ek(e,t){return e.dependencies.map(e=>t.find(t=>t.id===e)).filter(Boolean)}function ew(e,t){return t.find(t=>t.resolvedRequest===e)}function eI(e,t,s,r,i){return eD(eS(ej(e),t),s,r,i)}function eP(e){let{modules:t=[]}=e;return t}function eC(e,t){return e.map(e=>t.find(t=>t.id===e)).filter(Boolean)}function eE(e,t,s){return eP(e).map(e=>{let r=t.find(t=>t.id===e);if(s&&s.length>0){if(!r)return null;let e={};for(let t of s)void 0!==r[t]&&(e[t]=r[t]);return e}return r}).filter(Boolean)}function eD(e,t,s,r){let i=[];try{e.forEach(e=>{eE(e,t,s).forEach(e=>{(!r||r(e))&&!i.filter(t=>t.id===e.id).length&&i.push(e)})})}catch(e){f.vF.debug(e)}return i}function e_(e,t){return t.find(t=>t.id===e.module)}function eN(e,t,s){let r=[],i=[];for(let n=0;n<e.length;n++){let a=ez(e[n],t);if(a){r.push(a);let e=e_(a,s);e&&i.push(e)}}return{dependencies:r,modules:i}}function eT(e,t,s,r){let i=t.find(t=>t.id===e);return{module:i,dependencies:ek(i,s),...r?.length?{sideEffectCodes:r}:{}}}let eB=RegExp(`(.*)${/[-|.]/.source}(${/(?:[a-f0-9]{4,32}|[a-zA-Z]{3,}[0-9]|[a-zA-Z]*[0-9][a-zA-Z]{2,}|[a-zA-Z]*[0-9][a-zA-Z0-9]{3,31})/.source})(${/(?:\.[a-z|A-Z|0-9]{2,}){1,}/.source})$`);function eR(e,t){let s=t?.split("."),r="",i=e;if(s?.length&&s.length>=3&&s[s.length-2]?.indexOf("[")<0&&"js|css|html".indexOf(s[s.length-1])>-1){r=s[s.length-2];let t=e.match(/(.*)(\.([a-f0-9]{4,32}|[a-zA-Z]*[0-9][a-zA-Z0-9]*))(\.[^.]+){2,}$/);if(t&&t[3].length>=4&&t[3].length<=32)return i=t[1],`${i}.${r}.${e.substring(e.lastIndexOf(".")+1)}`}let n=e.match(eB);return n&&n[2]&&n[2].length>=4&&n[2].length<=32?e.replace(eB,"$1$3"):e}function eF(e,t){return e.path.slice(-t.length)===t||eV(e.path)===t}function e$(e,t){return!!t.length&&t.some(t=>eF(e,t))}function eO(e,t){return"string"==typeof t?e.filter(e=>eF(e,t)):Array.isArray(t)?e.filter(e=>e$(e,t)):[]}function eG(e,t){return t&&(e="function"==typeof t?e.filter(t):eO(e,t)),e}function eL(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{withFileContent:r=!0,filterOrExtensions:i}=s;return(e=e.filter(e=>!e$(e,h.YM.MapExtensions)),i&&(e=eG(e,i)),e.length)?{count:e.length,size:e.reduce((e,t)=>e+t.size,0),files:e.map(e=>({path:e.path,size:e.size,gzipSize:e.gzipSize,initial:eW(e,t),content:r?e.content:void 0}))}:{count:0,size:0,files:[]}}function eW(e,t){return eb(e,t).some(e=>!!e.initial)}function eK(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return eL(e,t,{...s,filterOrExtensions:e=>{var r;return(!(r=s.filterOrExtensions)||("function"==typeof r?r(e):"string"==typeof r?eF(e,r):e$(e,r)))&&eW(e,t)}})}function eY(e,t){return{all:{total:eq(e,t)},js:{total:eq(e,t,h.YM.JSExtensions),initial:eq(e,t,h.YM.JSExtensions,!0)},css:{total:eq(e,t,h.YM.CSSExtension),initial:eq(e,t,h.YM.CSSExtension,!0)},imgs:{total:eq(e,t,h.YM.ImgExtensions)},html:{total:eq(e,t,h.YM.HtmlExtension)},media:{total:eq(e,t,h.YM.MediaExtensions)},fonts:{total:eq(e,t,h.YM.FontExtensions)},others:{total:eq(e,t,e=>!e$(e,[...h.YM.JSExtensions,h.YM.CSSExtension,h.YM.HtmlExtension].concat(h.YM.ImgExtensions,h.YM.MediaExtensions,h.YM.FontExtensions,h.YM.MapExtensions)))}}}function eU(e,t){let s=e===t;return{percent:s?0:0===e?100:Math.abs(t-e)/e*100,state:s?h.Kj.RsdoctorClientDiffState.Equal:e>t?h.Kj.RsdoctorClientDiffState.Down:h.Kj.RsdoctorClientDiffState.Up}}function eq(e,t,s){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i,n,{size:a,count:l}=r?eK(e.assets,e.chunks,{filterOrExtensions:s}):eL(e.assets,e.chunks,{filterOrExtensions:s});if(e===t)i=a,n=l;else{let{size:e,count:a}=r?eK(t.assets,t.chunks,{filterOrExtensions:s}):eL(t.assets,t.chunks,{filterOrExtensions:s});i=e,n=a}let{percent:o,state:d}=eU(a,i);return{size:{baseline:a,current:i},count:{baseline:l,current:n},percent:o,state:d}}function eH(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={...s,filterOrExtensions:h.YM.JSExtensions},i={...s,filterOrExtensions:h.YM.CSSExtension},n={...s,filterOrExtensions:h.YM.ImgExtensions},a={...s,filterOrExtensions:h.YM.HtmlExtension},l={...s,filterOrExtensions:h.YM.MediaExtensions},o={...s,filterOrExtensions:h.YM.FontExtensions},d={...s,filterOrExtensions:e=>!e$(e,[...h.YM.JSExtensions,h.YM.CSSExtension,h.YM.HtmlExtension].concat(h.YM.ImgExtensions,h.YM.MediaExtensions,h.YM.FontExtensions,h.YM.MapExtensions))};return{all:{total:eL(e,t,s)},js:{total:eL(e,t,r),initial:eK(e,t,r)},css:{total:eL(e,t,i),initial:eK(e,t,i)},imgs:{total:eL(e,t,n)},html:{total:eL(e,t,a)},media:{total:eL(e,t,l)},fonts:{total:eL(e,t,o)},others:{total:eL(e,t,d)}}}function eQ(e,t,s,r,i){let n=t.find(t=>t.path===e);return{asset:n,chunks:eb(n,s),modules:eI(n,s,r,void 0,i)}}function eZ(e,t,s,r){let i=[];try{for(let n=0;n<e.length;n++){let a=e[n];i.push({asset:a,modules:eI(a,t,s,r)})}return i}catch(e){return console.error(e),[]}}function eV(e){let t=e.split("?")[0].match(/\.([0-9a-z]+)(?:[\?#]|$)/i);return t?`.${t[1]}`:""}function eJ(e,t){let s=new Map;for(let t of e.modules)s.set(t.path,t);let r=new Map;for(let e of t.modules)r.set(e.path,e);let i=[],n=[],a=[];for(let[e,t]of s){let s=r.get(e);if(s){if(t.size.parsedSize!==s.size.parsedSize){let{percent:r,state:i}=eU(t.size.parsedSize,s.size.parsedSize);a.push({path:e,size:{baseline:t.size,current:s.size},percent:r,state:i})}}else n.push({path:e,size:t.size})}for(let[e,t]of r)s.has(e)||i.push({path:e,size:t.size});return i.sort((e,t)=>e.path.localeCompare(t.path)),n.sort((e,t)=>e.path.localeCompare(t.path)),a.sort((e,t)=>e.path.localeCompare(t.path)),{added:i,removed:n,changed:a}}function eX(e,t){let s=e=>`${e.name}@${e.version}`,r=new Map;for(let t of e.packages)r.set(s(t),t);let i=new Map;for(let e of t.packages)i.set(s(e),e);let n=[],a=[],l=[];for(let[e,t]of r){let s=i.get(e);if(s){if(t.size.parsedSize!==s.size.parsedSize){let{percent:e,state:r}=eU(t.size.parsedSize,s.size.parsedSize);l.push({name:t.name,version:t.version,root:t.root,size:{baseline:t.size,current:s.size},percent:e,state:r})}}else a.push({name:t.name,version:t.version,root:t.root,size:t.size})}for(let[e,t]of i)r.has(e)||n.push({name:t.name,version:t.version,root:t.root,size:t.size});return{added:n,removed:a,changed:l}}function e0(e,t){return{assets:eY(e.chunkGraph,t.chunkGraph),modules:eJ(e.moduleGraph,t.moduleGraph),packages:eX(e.packageGraph,t.packageGraph)}}function e1(e){return e}function e2(e){let t=encodeURIComponent(e.join(","));return t&&(t=`?${h.Kj.RsdoctorClientUrlQuery.BundleDiffFiles}=${t}`),t}function e5(e){let t=e2(e);return`${t}#${h.Kj.RsdoctorClientRoutes.BundleDiff}`}function e4(e){return decodeURIComponent(e).split(",")}function e3(e){return Object.keys(e)}function e7(e){let t=e3(e),s=new Set;return t.forEach(t=>{e[t].forEach(e=>{s.add(e.tapName)})}),[...s]}function e6(e){return{hooks:e3(e),tapNames:e7(e)}}function e9(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e3(e).filter(e=>!t.length||-1!==t.indexOf(e));return r.length?e7(e).reduce((t,i)=>(s.length&&-1===s.indexOf(i)||r.forEach(s=>{let r=e[s].filter(e=>e.tapName===i);0!==r.length&&t.push({tapName:i,hook:s,data:r.map(e=>({startAt:e.startAt,endAt:e.endAt,costs:e.costs,type:e.type}))})}),t),[]):[]}function e8(e,t,s,r,i){return r.slice().reverse().map(r=>{let n=t.find(e=>e.id===r.dependencyId);if(!n)return null;let a=e.find(e=>e.id===n.module);return a?{group:r.group,module:a,dependency:n,relativePath:(0,o.relative)(s,a.path),moduleCode:i?.[a.id]}:null}).filter(Boolean)}let te="__l__";var tt=((i={}).Bootstrap="bootstrap->rspack:beforeCompile",i.Compile="rspack:beforeCompile->afterCompile",i.Done="rspack:afterCompile->done",i.Minify="rspack:minify(rspack:optimizeChunkAssets)",i);function ts(e){if(!Array.isArray(e)||!e[0])return{isRspack:!1,hasSourceMap:!1};let t="rspack"===e[0].name&&e[0]?.config?.name!=="lynx",s=e[0].config?.devtool,r=e[0].config?.plugins,i=r?.filter(e=>e&&e.includes("SourceMapDevToolPlugin"));return{isRspack:t,hasSourceMap:"string"==typeof s&&s.includes("source-map")&&!s.includes("eval")||!!i?.length}}class tr{loader;constructor(e){this.loader=e,this.loadAPI=this.loadAPI.bind(this)}log(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];console.log(`[${this.constructor.name}]`,...t)}loadAPI(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];let[r,i]=t;switch(r){case h.hp.ServerAPI.API.LoadDataByKey:return this.loader.loadData(i.key);case h.hp.ServerAPI.API.GetProjectInfo:return Promise.all([this.loader.loadData("root"),this.loader.loadData("pid"),this.loader.loadData("hash"),this.loader.loadData("summary"),this.loader.loadData("configs"),this.loader.loadData("envinfo"),this.loader.loadData("errors")]).then(e=>{let[t,s,r,i,n,a,l]=e;return{root:t,pid:s,hash:r,summary:i,configs:n,envinfo:a,errors:l,name:n?.[0]?.config?.name}});case h.hp.ServerAPI.API.GetClientRoutes:if("u">typeof window&&window?.[h.YM.WINDOW_RSDOCTOR_TAG])return window[h.YM.WINDOW_RSDOCTOR_TAG].enableRoutes;return this.loader.loadManifest().then(e=>{let{enableRoutes:t=[]}=e.client||{};return t});case h.hp.ServerAPI.API.GetLoaderNames:return this.loader.loadData("loader").then(e=>J(e||[]));case h.hp.ServerAPI.API.GetLayers:return this.loader.loadData("moduleGraph").then(e=>{let{layers:t}=e||{};return t});case h.hp.ServerAPI.API.GetLoaderChartData:return this.loader.loadData("loader").then(e=>ee(e||[]));case h.hp.ServerAPI.API.GetLoaderFileTree:return this.loader.loadData("loader").then(e=>et(e||[]));case h.hp.ServerAPI.API.GetLoaderFileDetails:return this.loader.loadData("loader").then(e=>es(i.path,e||[]));case h.hp.ServerAPI.API.GetLoaderFolderStatistics:return this.loader.loadData("loader").then(e=>er(i.folder,e||[]));case h.hp.ServerAPI.API.GetLoaderFileFirstInput:return this.loader.loadData("loader").then(e=>en(i.file,e||[]));case h.hp.ServerAPI.API.GetLoaderFileInputAndOutput:return this.loader.loadData("loader").then(e=>ea(i.file,i.loader,i.loaderIndex,e||[]));case h.hp.ServerAPI.API.GetResolverFileTree:return this.loader.loadData("resolver").then(e=>ex(e||[]));case h.hp.ServerAPI.API.GetResolverFileDetails:return Promise.all([this.loader.loadData("resolver"),this.loader.loadData("moduleGraph.modules"),this.loader.loadData("moduleCodeMap")]).then(e=>{let t=e[0],s=e[1],r=e[2];return ey(i.filepath,t||[],s||[],r||{})});case h.hp.ServerAPI.API.GetPluginSummary:return this.loader.loadData("plugin").then(e=>e6(e||{}));case h.hp.ServerAPI.API.GetPluginData:return this.loader.loadData("plugin").then(e=>{let{hooks:t,tapNames:s}=i;return e9(e||{},t,s)});case h.hp.ServerAPI.API.GetAssetsSummary:return this.loader.loadData("chunkGraph").then(e=>{let{withFileContent:t=!0}=i,{assets:s=[],chunks:r=[]}=e||{};return eH(s,r,{withFileContent:t})});case h.hp.ServerAPI.API.GetAssetDetails:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph"),this.loader.loadData("configs")]).then(e=>{let{assetPath:t}=i,{isRspack:s,hasSourceMap:r}=ts(e[2]||[]),{assets:n=[],chunks:a=[]}=e[0]||{},{modules:l=[]}=e[1]||{};return eQ(t,n,a,l,s||r?e=>0!==e.size.parsedSize:()=>!0)});case h.hp.ServerAPI.API.GetSummaryBundles:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph"),this.loader.loadData("configs")]).then(e=>{let{assets:t=[],chunks:s=[]}=e[0]||{},{modules:r=[]}=e[1]||{},i=e[2]||[],n=t;return Array.isArray(i)&&i[0]?.config?.name==="lynx"&&(n=t.filter(e=>!e.path.endsWith("/template.js"))),eZ(n,s,r,["id","path","size","kind"])});case h.hp.ServerAPI.API.GetChunksByModuleId:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{moduleId:t}=i,{chunks:s=[]}=e[0]||{},{modules:r=[]}=e[1]||{};return eM(t,r,s)});case h.hp.ServerAPI.API.GetModuleDetails:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph"),this.loader.loadData("treeShaking")]).then(e=>{let{moduleId:t}=i,{modules:s=[],dependencies:r=[]}=e[1]||{},n=e[2],a=n?.sideEffectCodes[t]||[];return eT(t,s,r,a)});case h.hp.ServerAPI.API.GetModulesByModuleIds:return this.loader.loadData("moduleGraph").then(e=>{let{moduleIds:t}=i,{modules:s=[]}=e||{};return eC(t,s)});case h.hp.ServerAPI.API.GetEntryPoints:return Promise.all([this.loader.loadData("chunkGraph")]).then(e=>{let[t]=e,{entrypoints:s=[]}=t||{};return s});case h.hp.ServerAPI.API.GetModuleCodeByModuleId:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleId:t}=i;return e?e[t]:{source:"",transformed:"",parsedSource:""}});case h.hp.ServerAPI.API.GetModuleCodeByModuleIds:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleIds:t}=i,s={};return e?(t.forEach(t=>{s[t]=e[t]}),s):[]});case h.hp.ServerAPI.API.GetAllModuleGraph:return this.loader.loadData("moduleGraph").then(e=>e?.modules);case h.hp.ServerAPI.API.GetSearchModules:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("chunkGraph")]).then(e=>{let[t,s]=e,{moduleName:r}=i;if(!r)return[];let n=s.chunks.reduce((e,t)=>(t.assets.forEach(s=>{e[t.id]||(e[t.id]=[]),e[t.id].push(s)}),e),{}),a=new Map;return t?.modules.filter(e=>{e.webpackId.includes(r)&&e.chunks.forEach(e=>{a.has(e)||(n[e]||[]).forEach(t=>{t.endsWith(".js")&&a.set(e,t)})})}),Object.fromEntries(a)});case h.hp.ServerAPI.API.GetSearchModuleInChunk:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("root")]).then(e=>{let[t,s]=e,{moduleName:r,chunk:n}=i;return r?t?.modules.filter(e=>e.webpackId.includes(r)&&e.chunks.includes(n)).map(e=>({id:e.id,path:e.path,relativePath:(0,o.relative)(s,e.path)})):[]});case h.hp.ServerAPI.API.GetAllChunkGraph:return this.loader.loadData("chunkGraph").then(e=>e?.chunks);case h.hp.ServerAPI.API.GetPackageRelationAlertDetails:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("errors"),this.loader.loadData("root"),this.loader.loadData("moduleCodeMap")]).then(e=>{let{id:t,target:s}=i,[r,n=[],a="",l]=e,{modules:o=[],dependencies:d=[]}=r||{},{packages:c=[]}=n.find(e=>e.id===t)||{},{dependencies:h=[]}=c.find(e=>e.target.name===s.name&&e.target.root===s.root&&e.target.version===s.version)||{};return e8(o,d,a,h,l||{})});case h.hp.ServerAPI.API.GetOverlayAlerts:return this.loader.loadData("errors").then(e=>(e||[]).filter(e=>e.code===h.jO.RuleMessageCodeEnumerated.Overlay));case h.hp.ServerAPI.API.GetBundleAlerts:return this.loader.loadData("errors").then(e=>(e||[]).filter(e=>e.category===h.jO.RuleMessageCategory.Bundle));case h.hp.ServerAPI.API.BundleDiffManifest:return this.loader.loadManifest();case h.hp.ServerAPI.API.GetBundleDiffSummary:return Promise.all([this.loader.loadManifest(),this.loader.loadData("root"),this.loader.loadData("hash"),this.loader.loadData("errors"),this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph"),this.loader.loadData("moduleCodeMap"),this.loader.loadData("packageGraph"),this.loader.loadData("configs")]).then(e=>{let[t,s="",r="",i={},n={},a={},l={},o={},d=[]]=e,c="";return"string"==typeof d[0]?.config?.output?.chunkFilename&&(c=d[0]?.config.output.chunkFilename),{root:s,hash:r,errors:i,chunkGraph:n,moduleGraph:a,packageGraph:o,outputFilename:c,moduleCodeMap:l}});case h.hp.ServerAPI.API.GetChunkGraph:return this.loader.loadData("chunkGraph").then(e=>{let{chunks:t=[]}=e||{};return t});case h.hp.ServerAPI.API.GetAllModuleGraphFilter:return this.loader.loadData("moduleGraph").then(e=>e?.modules.map(e=>({id:e.id,webpackId:e.webpackId,path:e.path,size:e.size,chunks:e.chunks,kind:e.kind})));case h.hp.ServerAPI.API.GetModuleByName:return this.loader.loadData("moduleGraph").then(e=>{let{moduleName:t}=i,{modules:s=[]}=e||{};return s.filter(e=>e.path.includes(t)).map(e=>({id:e.id,path:e.path}))||[]});case h.hp.ServerAPI.API.GetModuleIssuerPath:return this.loader.loadData("moduleGraph").then(e=>{let{moduleId:t}=i,s=e?.modules||[],r=s.find(e=>String(e.id)===t)?.issuerPath||[];return Array.isArray(r)&&r.length>0&&"number"==typeof r[0]?r.map(e=>s.find(t=>t.id===e)?.path).filter(Boolean):r});case h.hp.ServerAPI.API.GetPackageInfo:return this.loader.loadData("packageGraph").then(e=>e?.packages);case h.hp.ServerAPI.API.GetPackageDependency:return this.loader.loadData("packageGraph").then(e=>e?.dependencies||[]);case h.hp.ServerAPI.API.GetChunkGraphAI:return this.loader.loadData("chunkGraph").then(e=>{let{assets:t=[]}=e||{};return t.map(e=>{let{content:t,...s}=e;return s})});case h.hp.ServerAPI.API.GetChunkByIdAI:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let[t,s]=e,{chunks:r=[]}=t||{},{modules:n=[]}=s||{},{chunkId:a}=i,l=r.find(e=>e.id===a);if(!l)return null;let o=n.filter(e=>l.modules.includes(e.id)).map(e=>({id:e.id,path:e.path,size:e.size,chunks:e.chunks,kind:e.kind,issuerPath:e.issuerPath}));return l.modulesInfo=o,l});case h.hp.ServerAPI.API.GetDirectoriesLoaders:return Promise.all([this.loader.loadData("root"),this.loader.loadData("loader")]).then(e=>{let[t,s]=e;return ei(s||[],t||"")});default:throw Error(`API not implement: "${r}"`)}}}function ti(){let e=globalThis.fetch;if("function"!=typeof e)throw Error("fetch is not available in this environment");return e.bind(globalThis)}async function tn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{timeout:s=3e4,signal:r,...i}=t,n=new AbortController,a=setTimeout(()=>n.abort(),s);r&&(r.aborted?n.abort():r.addEventListener("abort",()=>n.abort(),{once:!0}));let l=ti();try{let t=await l(e,{...i,signal:n.signal});if(!t.ok)throw Error(`Request failed with status ${t.status}`);return t}finally{clearTimeout(a)}}async function ta(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e4;return tn(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),timeout:s})}let tl=/[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*/,to=RegExp(`(?:${/(?:node_modules|~)(?:\/\.pnpm)?/.source}/)(?:(?:@${tl.source}[/|+])?(?:${tl.source}\\+)*(?:${tl.source})(?:${/@[\w|\-|_|.]+/.source})?)(?:_(?:@${tl.source}[/|+])?(?:${tl.source})(?:@${tl.source})?)*/`,"g"),td=/(?:(?:node_modules|~)(?:\/\.pnpm)?\/)(?:((?:@[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*[/|+])?(?:(?:[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*\+)*)(?:[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*))(?:@[\w|\-|_|.]+)?)(?:_((?:@[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*[/|+])?(?:[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*))(?:@[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*))*\//gm,tc=e=>{var t;let s,r=e.match(to);if(!r)return{name:"",version:""};let i=(t=r.flatMap(e=>{let t=e.matchAll(td);return t?(0,g.oE)([...t].flat()).slice(1).filter(Boolean).map(e=>e.replace(/\+/g,"/")):[]}),s=[],t.forEach((e,r)=>{t.slice(r+1).includes(e)||s.push(e)}),s);if((0,g.Im)(i))return{name:"",version:""};let n=(0,g.HV)(i),a=RegExp(`(.*)(${(0,g.HV)(r)}).*`),l=e.replace(a,"$1$2").replace(/\/$/,"");return{name:n,version:l&&n&&l.match(RegExp(`${n}@([\\d.]+)`))?.flat().slice(1)?.[0]||""}};function th(e,t){let s=m.tA(),r=d().join(s,".cache/rsdoctor"),i=d().join(r,"mcp.json");p().existsSync(r)||p().mkdirSync(r,{recursive:!0});let n={portList:{},port:0};if(p().existsSync(i))try{n=JSON.parse(p().readFileSync(i,"utf8"))}catch(e){f.vF.debug("Failed to parse mcp.json",e)}n.portList||(n.portList={}),n.portList[t||"builder"]=e,n.port=e,p().writeFileSync(i,JSON.stringify(n,null,2),"utf8")}function tu(){let e=m.tA(),t=d().join(e,".cache/rsdoctor");return d().join(t,"mcp.json")}function tp(e){return/\.(c|le|sa|sc)ss(\?.*)?$/.test(e)}function tm(e){return/\.(js|ts|jsx|tsx)(\?.*)?$/.test(e)}}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var s=l[e]={exports:{}};return a[e].call(s.exports,s,s.exports,o),s.exports}o.m=a,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(s,r){if(1&r&&(s=this(s)),8&r||"object"==typeof s&&s&&(4&r&&s.__esModule||16&r&&"function"==typeof s.then))return s;var i=Object.create(null);o.r(i);var n={};e=e||[null,t({}),t([]),t(t)];for(var a=2&r&&s;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{n[e]=()=>s[e]});return n.default=()=>s,o.d(i,n),i},o.d=(e,t)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},o.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s=[],o.O=(e,t,r,i)=>{if(t){i=i||0;for(var n=s.length;n>0&&s[n-1][2]>i;n--)s[n]=s[n-1];s[n]=[t,r,i];return}for(var a=1/0,n=0;n<s.length;n++){for(var[t,r,i]=s[n],l=!0,d=0;d<t.length;d++)(!1&i||a>=i)&&Object.keys(o.O).every(e=>o.O[e](t[d]))?t.splice(d--,1):(l=!1,i<a&&(a=i));if(l){s.splice(n--,1);var c=r();void 0!==c&&(e=c)}}return e},o.j="410",r={410:0},o.O.j=e=>0===r[e],i=(e,t)=>{var s,i,[n,a,l]=t,d=0;if(n.some(e=>0!==r[e])){for(s in a)o.o(a,s)&&(o.m[s]=a[s]);if(l)var c=l(o)}for(e&&e(t);d<n.length;d++)i=n[d],o.o(r,i)&&r[i]&&r[i][0](),r[i]=0;return o.O(c)},(n=self.rspackChunk_rsdoctor_client=self.rspackChunk_rsdoctor_client||[]).forEach(i.bind(null,0)),n.push=i.bind(null,n.push.bind(n));var d=o.O(void 0,["85","286","637","767","576","25","66","195","485","681","181","630"],()=>o(10359));d=o.O(d)})();
|