@rsdoctor/client 1.6.3 → 1.6.5

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.
@@ -0,0 +1,91 @@
1
+ (()=>{"use strict";var e,t,r,s,i,n,a={70617(e,t,r){var s=r(27080);r(24916);var i=r(8587);r(27348);var n=r(86525),a=r(66349),l=r(82895);function o(){let e=[{path:l._y.wE,element:(0,s.jsx)(l._y.YW,{})},{path:l.hK.wE,element:(0,s.jsx)(l.hK.YW,{})},{path:l.FO.wE,element:(0,s.jsx)(l.FO.YW,{})},{path:l.dn.wE,element:(0,s.jsx)(l.dn.YW,{})},{path:l.pI.wE,element:(0,s.jsx)(l.pI.YW,{})},{path:l.PR.wE,element:(0,s.jsx)(l.PR.YW,{})},{path:l.s0.wE,element:(0,s.jsx)(l.s0.BU,{})}].filter(e=>!!e);return(0,s.jsxs)(a.BV,{children:[(0,s.jsx)(a.qh,{path:"/",element:(0,s.jsx)(l.wm.YW,{})}),(0,s.jsx)(a.qh,{path:l.wm.wE,element:(0,s.jsx)(l.wm.YW,{})}),e.map(e=>(0,s.jsx)(a.qh,{path:e.path,element:e.element},e.path)),(0,s.jsx)(a.qh,{path:l.aD.wE,element:(0,s.jsx)(l.aD.YW,{})}),(0,s.jsx)(a.qh,{path:l.d9.wE,element:(0,s.jsx)(l.d9.YW,{})})]})}var d=r(17427),c=r(78195),h=r(2303);r(23746);let u=document.getElementById("root");h.createRoot(u).render((0,s.jsx)(()=>{let e=(0,n.useDetectIfCloudIdeEnv)();return(0,s.jsx)(d.A,{router:(0,s.jsx)(o,{}),renderFailState:()=>{let e=(0,n.getDemoUrl)();return e?(0,s.jsxs)(c.A.Text,{style:{fontSize:16},children:["or you can open the",(0,s.jsx)(c.A.Text,{strong:!0,style:{fontSize:"inherit"},children:(0,s.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",children:"demo"})}),"to get started with the Rsdoctor."]}):null},extraContent:e&&(0,s.jsx)(i.A,{message:"Warning",description:(0,s.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)},72921(e,t,r){var s=r(27080);r(27348),t.A=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#FFF7E6",rx:2}),(0,s.jsx)("g",{clipPath:"url(#total-size_svg__a)",children:(0,s.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,s.jsx)("defs",{children:(0,s.jsx)("clipPath",{id:"total-size_svg__a",children:(0,s.jsx)("path",{fill:"#fff",d:"M2 2h12v12H2z"})})})]})},91597(e,t,r){r.d(t,{mn:()=>u,EJ:()=>p.EJ});var s=r(27080),i=r(27348),n=r(80336),a=r(86525),l=r(38980),o=r(85491),d=r(30597),c=r(70412),h=r(89654);let u=(0,o.eN)({api:n.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{filter:t,project:r}=e,{errors:n,root:o}=r,{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,s.jsx)(h.Ay,{theme:{components:{Alert:{colorInfoBg:"var(--color-accent-subtle)",colorInfoBorder:"transparent"}},token:{padding:16}},children:(0,s.jsx)(l.J,{title:f("Bundle Alerts"),dataSource:g,extraData:{cwd:o,getPackageRelationContentComponent:e=>(0,s.jsx)(c.rU,{body:{id:e.data.id,target:e.package.target},cwd:o})},viewMode:p.bundleAlerts,setViewMode:u,cwd:o})})}});r(47902);var p=r(14263)},59104(e,t,r){var s,i=((s={})[s.Bootstrap=0]="Bootstrap",s[s.Compile=1]="Compile",s[s.Done=2]="Done",s[s.Minify=3]="Minify",s[s.Loader=4]="Loader",s[s.Normal=5]="Normal",s);r.d(t,{wx:()=>i},{GB:["#bda29a","#6F3FE1","#3966ed","#0a5f74","#3EBD7C","#F7A925","#ca8622","#749f83","#6e7074"],LS:["#5B8FF9","#43C6D9","#A78BFA","#F2B84B","#F27D62","#5CCB8A","#7C9CF5","#D879B9"]})},32782(e,t,r){function s(e,t){let r="stat"===t?e.sourceSize??0:"parsed"===t?e.bundledSize??0:"gzip"===t?e.gzipSize??0:e.value??0;return r>0||!e.children?.length?r:e.children.reduce((e,r)=>e+s(r,t),0)}function i(e,t){return e.reduce((e,r)=>e+s(r,t),0)}r.d(t,{M:()=>s,z:()=>i})},42776(e,t,r){var s,i=((s={}).BEGIN="B",s.END="E",s.COMPLETE="X",s.INSTANT="I",s.MARK="R",s);r.d(t,{a:()=>i})},10932(e,t,r){var s=r(55807),i=r(79595),n=r.n(i),a=r(86745),l=r(53117),o=r(41975),d=r(42776),c=r(94575),h=r(27348);function u(e){return`
2
+ <div class="loader-tooltip-container">
3
+ <div class="loader-tooltip-title">${(0,c.Z)(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>${(0,c.Z)(e.layer)}</span>
11
+ </li>`:""}
12
+ <li class="loader-tooltip-item">
13
+ <span>duration</span>
14
+ <span class="loader-tooltip-text-bold">${(0,o.a4)(e.costs)}</span>
15
+ </li>
16
+ <li class="loader-tooltip-item">
17
+ <span>filepath</span>
18
+ <span>${(0,c.Z)(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 p(e,t,r){let i=t=>t.loader===e,d=t.filter(i),h=d.map(e=>e.resource),u=h.filter(e=>e.includes("/node_modules/")),p=h.filter(e=>!e.startsWith(r)),m=(0,a.w)(d,e=>e.startAt).startAt,f=(0,l.S)(d,e=>e.endAt).endAt,g=s.aH.getLoadersCosts(i,t);return`
30
+ <div class="loader-tooltip-container">
31
+ <div class="loader-tooltip-title">${(0,c.Z)(e)}</div>
32
+ <li class="loader-tooltip-item">
33
+ <span>files</span>
34
+ <span class="loader-tooltip-text-bold">${h.length}</span>
35
+ </li>
36
+ <li class="loader-tooltip-item">
37
+ <span>files(node_modules)</span>
38
+ <span class="loader-tooltip-text-bold">${u.length}</span>
39
+ </li>
40
+ <li class="loader-tooltip-item">
41
+ <span>files(outside the cwd)</span>
42
+ <span class="loader-tooltip-text-bold">${p.length}</span>
43
+ </li>
44
+ <li class="loader-tooltip-item">
45
+ <span>duration(estimated)</span>
46
+ <span class="loader-tooltip-text-bold">${(0,o.a4)(g)}</span>
47
+ </li>
48
+ <li class="loader-tooltip-item">
49
+ <span>start(min)</span>
50
+ <span>${n()(m).format("YYYY/MM/DD HH:mm:ss")}</span>
51
+ </li>
52
+ <li class="loader-tooltip-item">
53
+ <span>end(max)</span>
54
+ <span>${n()(f).format("YYYY/MM/DD HH:mm:ss")}</span>
55
+ </li>
56
+ </div>
57
+ `.trim()}function m(e){return function e(t){return t.reduce((t,r)=>{if(r.c){let s=e(r.c);t.push({name:r.n,ph:d.a.BEGIN,pid:r.p,ts:r.s,args:r},...s,{name:r.n,ph:d.a.END,pid:r.p,ts:r.e,args:r})}else t.push({name:r.n,ph:d.a.BEGIN,pid:r.p,ts:r.s,args:r}),t.push({name:r.n,ph:d.a.END,pid:r.p,ts:r.e,args:r});return t},[])}(Object.entries(e.sort((e,t)=>e.s-t.s).reduce((e,t)=>{let r=e[t.p];return r?function(e,t){let r=[e];for(;r.length>0;){let e,s=r.shift()||[];if(0===s.length)return;let i=s[s.length-1];if(i.e<=t.s)return s.push(t);for(let t=s.length-1;t>=0;t--){let{c:r}=s[t];r&&(e=r)}e?r.push(e):i.c=[t]}}(r,t):e[t.p]=[t],e},{})).reduce((e,t)=>{let[r,s]=t;return e.push(...s),e},[]))}function f(e){let{ext:t}=e.data;return`
58
+ <div class="loader-tooltip-container">
59
+ <div class="loader-tooltip-title">[${(0,c.Z)(t.args.p)}] ${(0,c.Z)(t.args.n)}</div>
60
+ <li class="loader-tooltip-item">
61
+ <span>hook</span>
62
+ <span>${(0,c.Z)(t.args.p)}</span>
63
+ </li>
64
+ <li class="loader-tooltip-item">
65
+ <span>tap name</span>
66
+ <span>${(0,c.Z)(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.a4)(t.args.e-t.args.s)}</span>
79
+ </li>
80
+ </div>
81
+ `.trim()}function g(e,t){let[r,s]=(0,h.useState)(e);return(0,h.useEffect)(()=>{let r=setTimeout(()=>s(e),t);return()=>clearTimeout(r)},[e,t]),r}r.d(t,{Bq:()=>u,QR:()=>m,Wy:()=>g,iv:()=>p,kr:()=>f})},96372(e,t,r){r.d(t,{U:()=>A});var s=r(27080),i=r(80336),n=r(25294),a=r(11034),l=r(64254),o=r(78195),d=r(88059),c=r(11383),h=r(27348),u=r(23007),p=r.n(u),m=r(86525),f=r(85491),g=r(83283),x=r(72876),y=r(4159),j=r(55807);let A=(0,f.eN)({Component:e=>{let{defaultKeys:t,configs:r}=e,i=(0,m.useWebpackConfigurationByConfigs)(r||[]);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,s.jsxs)(g.hX,{text:(0,s.jsxs)("div",{className:y.A.title,children:[(0,s.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:"View Bundler Config"}),(0,s.jsx)(c.A,{style:{fontSize:"10px"}})]}),children:[(0,s.jsxs)(n.A,{children:[(0,s.jsx)(x.h,{text:"Bundler Config Viewer"}),(0,s.jsx)(a.A,{}),(0,s.jsxs)(l.A,{children:[(0,s.jsx)(o.A.Text,{children:"Properties: "}),(0,s.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,s.jsx)(d.A.Option,{label:e,value:e,children:e},e))})]}),(0,s.jsx)(a.A,{})]}),(0,s.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})},99219(e,t,r){var s=r(27080);r(27348);var i=r(78195),n=r(91915),a=r(55080);let l=e=>{let{text:t,els:r,marked:l=!1,rest:o}=e;if(!t)return null;let d=t.length;if(d>40){let e=Math.floor(18.5),r=Math.ceil(18.5);return(0,s.jsx)(n.A,{content:t,placement:"left",children:(0,s.jsx)("div",{children:(0,s.jsxs)(i.A.Text,{className:a.A.text,mark:!!l,...o,children:[t.slice(0,e),"...",t.slice(d-r)]})})})}return(0,s.jsx)(n.A,{content:t,children:(0,s.jsx)("div",{children:(0,s.jsx)(i.A.Text,{className:a.A.text,...o,children:t},r?r.length:0)})})};r.d(t,{},{i:e=>{let{text:t,keyword:r,...n}=e;if(!r||-1===t.indexOf(r))return l({text:t,rest:n});let o=[],d=t;for(;d.length>0;){let e=d.indexOf(r);if(e>-1)0!==e&&o.push(l({text:d,els:o})),o.push(l({text:d,els:o,marked:!0})),d=d.slice(e+r.length);else{o.push(l({text:d,els:o,marked:!0}));break}}return(0,s.jsx)(i.A.Text,{className:a.A.text,...n,children:o})}})},29056(e,t,r){var s=r(27348);let i=(0,s.createContext)({project:null});function n(){return(0,s.useContext)(i)}r.d(t,{L:()=>n},{h:i})},81215(e,t,r){var s=r(27080),i=r(80336),n=r(25453),a=r(87734),l=r(27348),o=r(86624),d=r(86525),c=r(30597),h=r(88238),u=r(55807);let p=e=>{let{manifestLoader:t=d.fetchManifest,api:r,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 z(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 M=(0,l.useCallback)(e=>{let{req:t,res:s}=e;t.api===r&&((0,o.n)(t.body,m)||u.AP.isNil(t.body)&&u.AP.isNil(m))&&!(0,o.n)(v,s)&&S(s),A(c.nl.Success)},[v,r,m]);function k(e){e&&(Object.values(i.hp.ServerAPI.APIExtends).includes(r)?A(c.nl.Success):e.loadAPI(r,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)(()=>{z(b)},[b,r,m]),(0,l.useEffect)(()=>{if(b)return b.onDataUpdate(r,M),()=>{b.removeOnDataUpdate(r,M)}},[b,r,m]),j===c.nl.Pending)?f?(0,s.jsx)(n.A,{active:!0}):null:j===c.nl.Fail?g||(0,s.jsx)(h.c,{retry:()=>{A(c.nl.Pending),t(),z()}}):j===c.nl.Updating?(0,s.jsx)(a.A,{spinning:!0,children:p(v)}):p(v)};function m(e){let{Component:t,api:r,responsePropName:i,body:n,fallbackComponent:a,showSkeleton:l}=e;return function(e){let{body:o=n,...d}=e;return(0,s.jsx)(p,{api:r,body:o,showSkeleton:l,fallbackComponent:a,children:e=>{let r={...d,[i]:e};return(0,s.jsx)(t,{...r})}})}}r.d(t,{e:()=>m},{z:p})},1733(e,t,r){var s=r(27080),i=r(25453),n=r(27348),a=r(86525),l=r(30597),o=r(88238);function d(e,t,r){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[r]=t;return e.loadData(r)})).then(e=>{f(e.reduce((e,r,s)=>{let[i,n]=t[s];return e[n]=r,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,s.jsx)(i.A,{active:!0}):u===l.jK.Fail?(0,s.jsx)(o.c,{retry:()=>{p(l.jK.Pending),d.then(()=>{y(g)}).catch(()=>{x(e())})}}):(0,s.jsx)(r,{...m})}}r.d(t,{u:()=>d})},60839(e,t,r){r.d(t,{Wf:()=>N,Rl:()=>Q,DG:()=>ei,oc:()=>E});var s=r(27080),i=r(27348),n=r(80946),a=r(98670),l=r(32410),o=r(46198),d=r(23307),c=r(5873),h=r(11383),u=r(66349),p=r(15292),m=r(86525),f=r(83283),g=r(24674),x=r(85491);r(21023);r(86201);var y="card-lyOUB6",j=r(76086),A=r(8587),v=r(72921),S=e=>(0,s.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("rect",{width:16,height:16,fill:"#E6F7FF",rx:2}),(0,s.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"})]});r(6953);let b=e=>{let{theme:t,number:r,description:i}=e;return(0,s.jsx)(A.A,{message:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j.A,{className:"icon-K6JtIV",component:"common"===t?S:v.A}),(0,s.jsx)("span",{className:"description-Ik1PO7",children:i}),(0,s.jsx)("span",{className:"data-J9Vxvq",children:r})]}),className:"container-ssAvLP",type:"warning"===t?"warning":"info"})};var z=r(80336);r(56263);var M="column-VJtpT7",k="description-nwRikm",w="unit-poAoxV",I="tag-fNEiQ8",P="label-vITl7c";let{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 r=[];return t.forEach(e=>{let t=r.find(t=>t.title===e.defaultDir),i=t||{title:e.defaultDir,key:e.defaultDir,icon:(0,s.jsx)(c.A,{}),children:[]},n=(0,p.C)(e.fileName);t||r.push(i),i.children.push({title:(0,s.jsxs)("div",{className:"treeContainer-jcFlxc",children:[(0,s.jsx)("div",{className:"treeTitle-B083rc",children:e.fileName}),(0,s.jsx)("div",{className:"line-Ia_8Yg"}),(0,s.jsx)(a.A,{className:`${I} sizeTag-ukmRN7`,children:(0,m.formatSize)(e.size)}),e.initial?(0,s.jsx)(a.A,{className:I,color:"cyan",children:"initial"}):null]}),key:e.fileName,isLeaf:!0,icon:n})}),{treeData:r}},D=e=>{let{treeData:t}=E(e);return(0,s.jsx)(s.Fragment,{children:e.files.length?(0,s.jsx)(f.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,s.jsx)("span",{children:e.count}),children:(0,s.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:r}=e,i=[{key:"js-files-count",label:"JS files",children:(0,s.jsx)("span",{className:`${k} ${M}`,children:D(t.js.total)})},{key:"css-files-count",label:"CSS files",children:(0,s.jsx)("span",{className:`${k} ${M}`,children:D(t.css.total)})},{key:"font-files-count",label:"Font files",children:(0,s.jsx)("span",{className:`${k} ${M}`,children:D(t.fonts.total)})},{key:"html-files-count",label:"HTML files",children:(0,s.jsx)("span",{className:k,children:D(t.html.total)})},{key:"image-files-count",label:"Image files",children:(0,s.jsx)("span",{className:k,children:D(t.imgs.total)})},{key:"media-files-count",label:"Media files",children:(0,s.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,s.jsx)("span",{className:P,children:"JS size"}),children:(0,s.jsxs)("div",{className:M,children:[(0,s.jsx)("span",{className:k,children:n}),(0,s.jsx)("span",{className:w,children:a})]})},{key:"css-files-size",label:(0,s.jsx)("span",{className:P,children:"CSS size"}),children:(0,s.jsxs)("div",{className:M,children:[(0,s.jsx)("span",{className:k,children:o}),(0,s.jsx)("span",{className:w,children:d})]})},{key:"font-files-size",label:(0,s.jsx)("span",{className:P,children:"Font size"}),children:(0,s.jsxs)("div",{className:M,children:[(0,s.jsx)("span",{className:k,children:c}),(0,s.jsx)("span",{className:w,children:h})]})},{key:"html-files-size",label:(0,s.jsx)("span",{className:P,children:"HTML size"}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:k,children:u}),(0,s.jsx)("span",{className:w,children:p})]})},{key:"image-files-size",label:(0,s.jsx)("span",{className:P,children:"Image size"}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:k,children:f}),(0,s.jsx)("span",{className:w,children:g})]})},{key:"media-files-size",label:(0,s.jsx)("span",{className:P,children:"Media size"}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:k,children:x}),(0,s.jsx)("span",{className:w,children:y})]})}];return(0,s.jsx)(l.A,{layout:"vertical",className:"bundleOverall-Ay7WmZ",size:"small",column:3,colon:!1,items:"files"===r?i:j})},N=()=>{let[e,t]=(0,i.useState)("size"),r=(0,u.Zp)(),{t:n}=(0,m.useI18n)();return(0,s.jsx)(x.zW,{api:z.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:i=>{let a=(0,m.formatSize)(i.all.total.size);return(0,s.jsx)(g.Zp,{className:y,style:{height:"316px"},children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"title-fNYU5O",children:[(0,s.jsx)("span",{children:n("Bundle Overall")}),(0,s.jsx)(o.Ay,{type:"link",style:{padding:"0px"},onClick:()=>{r(z.Kj.RsdoctorClientRoutes.BundleSize)},children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,s.jsx)("span",{style:{marginRight:"8px",fontSize:"13px"},children:n("ViewBundleSize")}),(0,s.jsx)(h.A,{style:{fontSize:"10px"}})]})})]}),(0,s.jsx)(d.A,{options:["Size","Files"],onChange:e=>{t(e.toLocaleLowerCase())},size:"small",style:{marginBottom:8,fontSize:"14px"}}),(0,s.jsx)(b,{theme:"files"===e?"common":"size",number:"files"===e?i.all.total.count:a,description:`Total ${e}`}),(0,s.jsx)(_,{view:e,res:i})]})})}})};var T=r(55807),R=r(78195),B=r(11034),F=r(64254),$=r(60377);r(2157),r(59276);var O=r(99766),G=r(10932);let L=e=>{let{plugins:t,defaultDatas:r=[],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(r=>{e.push({p:t.hook,n:`${t.tapName}`,s:r.startAt,e:r.endAt})})}),d([...(0,G.QR)(r),...(0,G.QR)(e)])},[]),(0,s.jsx)("div",{className:["loader-chart-container",a?"loader-chart-container_dark":""].join(" ").trim(),ref:l,style:{width:"100%"},children:(0,s.jsx)(O.n,{pluginsData:o,formatterFn:G.kr,chartType:n})})},W=()=>(0,s.jsx)(A.A,{message:(0,s.jsxs)(R.A.Text,{children:[(0,s.jsx)(R.A.Text,{children:"make sure that you have turn on "}),(0,s.jsxs)(R.A.Text,{children:[" ","in configuration for the Rsdoctor plugin."]})]}),type:"info",showIcon:!0});var U=r(59104);let K=e=>{let{summary:t}=e,{costs:r=[]}=t||{};return r.find(e=>e.name===T.BD.SummaryCostsDataName.Bootstrap)?(0,s.jsx)(f.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Chart of the "Bootstrap -> BeforeCompile" stage'},text:(0,s.jsx)(F.A,{children:"detail"}),children:(0,s.jsx)(x.zW,{api:z.hp.ServerAPI.API.GetPluginData,body:{hooks:["environment","afterEnvironment","entryOption","afterPlugins","afterResolvers","initialize","beforeRun","run","watchRun","normalModuleFactory","contextModuleFactory","beforeCompile"]},children:e=>e&&e.length?(0,s.jsx)(L,{plugins:e,type:U.wx.Bootstrap}):(0,s.jsx)(W,{})})}):null};var Y=r(85687);let q=e=>{let{summary:t}=e,{costs:r=[]}=t||{},i=r.find(e=>e.name===T.BD.SummaryCostsDataName.Done),n='of the "AfterCompile -> Done" stage';return i?(0,s.jsx)(f.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:`Details ${n}`},text:(0,s.jsx)(F.A,{children:"detail"}),children:(0,s.jsx)(x.zW,{api:z.hp.ServerAPI.API.GetPluginData,body:{hooks:["afterCompile","shouldEmit","emit","afterEmit","assetEmitted","done"]},children:e=>e&&e.length?(0,s.jsxs)(F.A,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(g.Zp,{title:`Plugin DataSource of ${n}`,collapsable:!0,children:(0,s.jsx)(Y.u,{dataSource:e})}),(0,s.jsx)(B.A,{}),(0,s.jsx)(g.Zp,{title:`Chart ${n}`,children:(0,s.jsx)(L,{plugins:e,type:U.wx.Done})})]}):(0,s.jsx)(W,{})})}):null},H=e=>{let{summary:t}=e,{costs:r=[]}=t||{};return r.find(e=>e.name===T.BD.SummaryCostsDataName.Minify)?(0,s.jsx)(f.hX,{containerProps:{style:{display:"inline"}},drawerProps:{title:'Details of the "Minify" stage'},text:(0,s.jsx)(F.A,{children:"detail"}),children:(0,s.jsx)(x.zW,{api:z.hp.ServerAPI.API.GetPluginData,body:{hooks:["processAssets","optimizeChunkAssets"]},children:e=>e&&e.length?(0,s.jsxs)(F.A,{direction:"vertical",style:{width:"100%"},children:[(0,s.jsx)(g.Zp,{title:'Plugin DataSource of the "Minify"',collapsable:!0,children:(0,s.jsx)(Y.u,{dataSource:e})}),(0,s.jsx)(B.A,{}),(0,s.jsx)(g.Zp,{title:'Chart of the "Minify"',children:(0,s.jsx)(L,{plugins:e,type:U.wx.Minify})})]}):(0,s.jsx)(W,{})})}):null};r(884);let Z=e=>{let{children:t,name:r,showDivider:i=!0}=e;return(0,s.jsxs)(R.A.Text,{style:{color:"inherit"},children:[(0,s.jsx)(R.A.Text,{style:{color:"inherit"},children:r}),i?(0,s.jsx)(B.A,{type:"vertical"}):null,t]})},Q=e=>{let{summary:t}=e,{t:r}=(0,m.useI18n)();if(!t?.costs?.length)return null;let i=Math.max(...t.costs.map(e=>e.costs));return(0,s.jsx)(g.Zp,{className:y,children:(0,s.jsx)("div",{children:(0,s.jsxs)(F.A,{style:{wordBreak:"break-all",width:"100%",marginTop:"0"},size:20,direction:"vertical",children:[(0,s.jsx)("div",{className:"title-wq4_QM",children:r("Compile Overall")}),t.costs.map(e=>{let{name:r,costs:n}=e,a=(0,s.jsx)($.A,{className:"progress-y4rFf4",percent:100*n/i,status:"normal",format:()=>(0,m.formatCosts)(n)});switch(r){case T.BD.SummaryCostsDataName.Bootstrap:return(0,s.jsxs)(Z,{name:"Bootstrap ~ BeforeCompile",children:[(0,s.jsx)(K,{summary:t}),a]},r);case T.BD.SummaryCostsDataName.Compile:return(0,s.jsx)(Z,{name:"Compile",showDivider:!1,children:a},r);case T.BD.SummaryCostsDataName.Done:return(0,s.jsxs)(Z,{name:"AfterCompile ~ Done",children:[(0,s.jsx)(q,{summary:t}),a]},r);case T.BD.SummaryCostsDataName.Minify:return(0,s.jsxs)(Z,{name:"Minify",children:[(0,s.jsx)(H,{summary:t}),a]},r);default:return null}})]})})})};var J=r(93884),V=r(62935),X=r(97059),ee=r(55245),et=r(40728),er=r(96372),es=r(19615);r(32532);let ei=e=>{let{configs:t=[],cwd:r,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$/,r=t.test(e);return{key:e,label:r?e.replace(t,""):e,children:i?i[e]:void 0}}),...t.filter(e=>!!e.version).map(e=>{let{name:t,version:r}=e;return{key:t,label:t,children:r}}),{key:"cwd",label:"cwd",children:r}];return(0,s.jsx)(x.zW,{api:z.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let t=(0,m.formatSize)(e.all.total.size),r=e.all.total.count,[i,n]=t.split(" "),a=[{title:"Errors",description:(0,s.jsx)("span",{style:{color:"#FF4D4F"},children:c}),icon:(0,s.jsx)(J.A,{style:{background:"#FF4D4F"},shape:"circle",icon:(0,s.jsx)(V.A,{style:{fontSize:"18px"}})})},{title:"Warnings",description:(0,s.jsx)("span",{style:{color:"#FAAD14"},children:d}),icon:(0,s.jsx)(J.A,{style:{background:"#FAAD14"},shape:"circle",icon:(0,s.jsx)(X.A,{style:{fontSize:"18px"}})})},{title:"Total Files",description:(0,s.jsx)("span",{children:r}),icon:(0,s.jsx)(J.A,{style:{background:"#3874F6"},shape:"circle",icon:(0,s.jsx)(ee.A,{style:{fontSize:"18px"}})})},{title:"Total Size",description:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{style:{fontSize:"20px"},children:i}),(0,s.jsx)("span",{style:{fontSize:"13px",marginLeft:"5px"},children:n})]}),icon:(0,s.jsx)(J.A,{style:{background:"#5B8FF9"},shape:"circle",icon:(0,s.jsx)(et.A,{style:{fontSize:"18px"}})})}];return(0,s.jsx)(g.Zp,{className:y,children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"title-cqt0lp",children:[(0,s.jsx)("span",{className:"left-sk7eLC",children:o("Project Overall")}),(0,s.jsx)(er.U,{})]}),(0,s.jsx)("div",{className:"overview-ZAp1A3",children:a.map((e,t)=>(0,s.jsx)(es.A,{title:e.title,description:(0,s.jsx)("span",{children:e.description}),icon:e.icon},t))}),(0,s.jsx)(l.A,{className:"projectOverall-T7onhG",items:h})]})})}})}},19615(e,t,r){r.d(t,{A:()=>i,h:()=>n});var s=r(27080);r(18176);let i=e=>{let{title:t,description:r,icon:i,style:n}=e;return(0,s.jsxs)("div",{className:"container-KSV5DZ",style:n,children:[(0,s.jsxs)("div",{className:"content-BsjkSU",children:[(0,s.jsx)("div",{className:"title-jUwqD5",children:t}),(0,s.jsx)("div",{className:"description-ArkOg4",children:r})]}),i]})};var n=i},85687(e,t,r){var s=r(27080);r(27348);var i=r(10006),n=r(57126),a=r(95469),l=r(86525);r.d(t,{},{u:e=>{let{dataSource:t}=e;return(0,s.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,s.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"}]})}})},88238(e,t,r){r.d(t,{c:()=>o});var s=r(27080),i=r(39646),n=r(64254),a=r(78195),l=r(46198);let o=r(27348).memo(e=>{let{title:t="Load data failed, please try again",buttonText:r="retry",retry:o}=e;return(0,s.jsx)(i.A,{description:(0,s.jsxs)(n.A,{direction:"vertical",children:[(0,s.jsx)(a.A.Text,{children:t}),(0,s.jsx)(l.Ay,{type:"primary",onClick:()=>{o()},children:r})]})})})},12420(e,t,r){r.d(t,{Y:()=>o});var s=r(27080),i=r(95818),n=r(39646),a=r(27348),l=r(66849);function o(e){let[t,r]=(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){r(e.code||""),d(e.lang||""),h(e.filePath||""),f(e.defaultLine),x(e.ranges),p(!0)},codeDrawerComponent:(0,s.jsx)(i.A,{maskClosable:!0,zIndex:999,width:"70%",destroyOnClose:!0,title:`Code of "${c}"`,open:u,onClose:()=>p(!1),children:t?(0,s.jsx)(l.Cv,{code:t,lang:o,filePath:c,defaultLine:m,ranges:g}):(0,s.jsx)(n.A,{description:e||"No Code"})})}}},83615(e,t,r){r.d(t,{PE:()=>s.P,zW:()=>i.zW}),r(91597),r(75567),r(33620),r(24674),r(60287);var s=r(6836),i=r(85491);r(60839),r(83283),r(99766)},91920(e,t,r){r.d(t,{},{kw:e=>new Map(e.map(e=>[e.path.replace(/\\/g,"/"),e])),yF:(e,t,r)=>e.get(t.replace(/\\/g,"/"))??r})},6002(e,t,r){let s=r(80336).Kj.RsdoctorClientRoutes.Overall;r.d(t,{},{U:"Overall",w:s})},82895(e,t,r){r.d(t,{aD:()=>rW,_y:()=>n,hK:()=>l,pI:()=>a,dn:()=>d,wm:()=>i,FO:()=>o,PR:()=>c,s0:()=>h,d9:()=>u});var s,i={};r.r(i),r.d(i,{YW:()=>w,wE:()=>k.w});var n={};r.r(n),r.d(n,{YW:()=>t6,UU:()=>t4,wE:()=>t3});var a={};r.r(a),r.d(a,{YW:()=>rl,UU:()=>rn,wE:()=>ra});var l={};r.r(l),r.d(l,{YW:()=>rg,UU:()=>rm,wE:()=>rf});var o={};r.r(o),r.d(o,{YW:()=>rS,UU:()=>rA,wE:()=>rv});var d={};r.r(d),r.d(d,{YW:()=>rD,UU:()=>rC,wE:()=>rE});var c={};r.r(c),r.d(c,{YW:()=>rR,wE:()=>rT});var h={};r.r(h),r.d(h,{BU:()=>rL,wE:()=>rG});var u={};r.r(u),r.d(u,{YW:()=>rX,wE:()=>rV});var p=r(27080),m=r(27348),f=r(46198),g=r(11383),x=r(24674),y=r(86525);r(77406);let j=[{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"}],A=()=>{let{t:e}=(0,y.useI18n)();return(0,p.jsx)(x.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)(f.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)(g.A,{style:{fontSize:"10px"}})]})]}),(0,p.jsx)("div",{className:"container-LiYKWu",children:j.map((t,r)=>{let{title:s,link:i}=t;return(0,p.jsx)("div",{className:"content-WPe5pa",style:{marginBottom:r<j.length-2?"16px":0},onClick:()=>window.open(i,"_blank"),children:e(s)},r)})})]})})};var v=r(91597),S=r(60839),b=r(12890);r(40817);let z=e=>{let{children:t}=e;return(0,p.jsx)(b.A,{vertical:!0,className:"layout-izKUgB",children:t.map((e,t)=>(0,p.jsx)("div",{className:"row-RDk0Pl",children:e},t))})};var M=r(29056),k=r(6002);let w=()=>{let{project:e}=(0,M.L)();if(!e)return null;let{summary:t,configs:r,root:s,envinfo:i,errors:n,name:a}=e;return(0,p.jsx)("div",{className:"overall-MGHzQh",children:(0,p.jsxs)("div",{className:"columns-QZp7uT",children:[(0,p.jsx)("main",{className:"mainColumn-qPTakG",children:(0,p.jsxs)(z,{children:[(0,p.jsx)(S.DG,{configs:r,cwd:s,envinfo:i,alerts:n,name:a}),(0,p.jsx)(v.mn,{})]})}),(0,p.jsx)("aside",{className:"sideColumn-QYJE_Q",children:(0,p.jsxs)(z,{children:[(0,p.jsx)(S.Wf,{errors:n,cwd:s}),(0,p.jsx)(S.Rl,{summary:t}),(0,p.jsx)(A,{})]})})]})})};var I=r(23484),P=r(37440),C=r(66641),E=r(62189),D=r(34112),_=r(80336),N=r(34424),T=r(58924),R=r(57126),B=r(64254),F=r(78195),$=r(25294),O=r(87884),G=r(98670),L=r(85491),W=r(80946),U=r(23307),K=r(93884),Y=r(11034),q=r(55245),H=r(55690),Z=r(29736),Q=r(60377),J=r(39646),V=r(95469),X=r(83283);r(38089);var ee="dataContainer-lJ0PuO",et="title-Gj8JxL",er="description-miJCbD";let{DirectoryTree:es}=W.A,ei=e=>{let{files:t,total:r,showProgress:s=!1,type:i}=e,n=i.toLocaleLowerCase(),a=(0,m.useMemo)(()=>(0,V.x)(t,e=>e.size),[t]),l=(0,m.useMemo)(()=>(0,V.x)(t,e=>e.gzipSize??0),[t]),o=t.some(e=>void 0!==e.gzipSize);return(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let i=n.includes("image")?"imgs":n,{treeData:d}=(0,S.oc)(e[i].total);return(0,p.jsxs)(B.A,{style:{height:100},align:"center",children:[(0,p.jsx)(Q.A,{type:"circle",percent:+(a/r*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:"sizeMetrics-P0U17b",children:[(0,p.jsxs)("div",{className:ee,children:[(0,p.jsx)("div",{className:et,children:"Size"}),(0,p.jsx)("div",{className:er,children:(0,y.formatSize)(a)})]}),(0,p.jsxs)("div",{className:ee,children:[(0,p.jsx)("div",{className:et,children:"Gzipped"}),(0,p.jsx)("div",{className:er,children:o?(0,y.formatSize)(l):"N/A"})]})]}),(0,p.jsx)(X.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,p.jsx)(B.A,{style:{textAlign:s?"left":"center"},align:"end",children:(0,p.jsx)(B.A,{direction:"vertical",children:(0,p.jsx)("div",{className:ee,children:(0,p.jsxs)("div",{className:et,children:[(0,p.jsx)("span",{style:{marginRight:"5px"},children:"Files"}),(0,p.jsx)(g.A,{})]})})})}),children:d.length?(0,p.jsx)(es,{defaultExpandAll:!0,selectable:!1,treeData:d,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)(J.A,{style:{height:"100%"}})})}),(0,p.jsx)("div",{className:er,children:t.length})]})]})}})};var en=r(19615);r(11288);let{DirectoryTree:ea}=W.A,{innerWidth:el}=window,eo=e=>{let{showProgress:t=!1,data:r,total:s,tagBgColor:i,type:n}=e,a=(0,y.useThemeToken)(),l=i||a.colorPrimaryBorderHover;return(0,p.jsx)(ei,{type:n,files:r.files,total:s,showProgress:t,tagBgColor:l})},ed=e=>{let{titles:t,datas:r,bgColor:s,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<r.length?r[o]:r[0]||{};return(0,p.jsx)(Z.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)(U.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)(eo,{type:d,...c,tagBgColor:s?.tagBgColor}),boxProps:{style:{background:s?.bgColor,width:el>1300?"80%":"95%"}}})},ec=e=>{let{errors:t,summary:r}=e,s=(0,y.useDuplicatePackagesByErrors)(t),[i,n]=(0,y.formatSize)(r.all.total.size).split(" "),a=[(0,p.jsx)(ed,{type:"JS",titles:["Total","Initial"],datas:[{data:r.js.total,total:r.all.total.size,showProgress:!0},{data:r.js.initial,total:r.all.total.size,showProgress:!0}]}),(0,p.jsx)(ed,{type:"CSS",titles:["Total","Initial"],datas:[{data:r.css.total,total:r.all.total.size,showProgress:!0},{data:r.css.initial,total:r.all.total.size,showProgress:!0}]}),(0,p.jsx)(ed,{titles:["Images","Fonts","Media"],datas:[{data:r.imgs.total,total:r.all.total.size,showProgress:!0},{data:r.fonts.total,total:r.all.total.size,showProgress:!0},{data:r.media.total,total:r.all.total.size,showProgress:!0}]}),(0,p.jsx)(ed,{type:"HTML",titles:["HTML Files"],datas:[{data:r.html.total,total:r.all.total.size,showProgress:!0}]})];return(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!1},children:e=>{let{treeData:t}=(0,S.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)(en.h,{title:(0,p.jsx)(X.hX,{buttonProps:{size:"small"},buttonStyle:{fontSize:"inherit"},drawerProps:{title:"Files"},text:(0,p.jsxs)("div",{style:{color:"var(--text-color-secondary)"},children:[(0,p.jsx)("span",{style:{marginRight:"5px"},children:"Total Files"}),(0,p.jsx)(g.A,{})]}),children:(0,p.jsx)(ea,{defaultExpandAll:!0,selectable:!1,treeData:t,rootStyle:{minHeight:"800px",border:"1px solid var(--color-border)"}})}),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:r.all.total.count})]})]}),icon:(0,p.jsx)(K.A,{style:{background:"#3874F6"},shape:"circle",icon:(0,p.jsx)(q.A,{style:{fontSize:"18px"}})}),style:{marginBottom:"12px",minWidth:"210px"}}),(0,p.jsx)(en.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:s.length,icon:(0,p.jsx)(K.A,{style:{background:"#13C2C2"},shape:"circle",icon:(0,p.jsx)(H.A,{style:{fontSize:"18px"}})})})]}),(0,p.jsx)(Y.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)(Y.A,{style:{height:"200px"},type:"vertical"},`${t}-divider`):null]}))})]})}})};r(76110);var eh="assetDetailCol-jwyTZJ";r(7721);var eu=r(53829),ep=r(36473),em=r(84222),ef=r(41522),eg=r(98038),ex=r(10017),ey=r(30574),ej=r(65925),eA=r(8587),ev=r(99791),eS=r(65773),eb=r(24553),ez=r(40012),eM=r(98060),ek=r(27492),ew=r(63117),eI=r(95818),eP=r(91915),eC=r(5877);let eE=(0,m.createContext)({setModuleJumpList(e){},moduleJumpList:[]});var eD=r(30597),e_=r(75238),eN=r(33620),eT=r(27723),eR=r(95807),eB=r(68257),eF=r(64397),e$=r(81221),eO=r(67276),eG=r(95503);r(60727);var eL=r(15292);let eW="file-tree-com",eU=e=>{let{treeData:t,needJumpto:r=!1,defaultOpenFather:s=0}=e,{required:i,handlers:n}=(0,eG.pk)({id:`${eW}-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(s>0&&"number"==typeof i.data.level&&i.data.level<s&&o){let e=i.id;a.current.has(e)||(a.current.add(e),requestAnimationFrame(()=>{n.setOpen(e,!0)}))}let d=(0,eL.C)(i.data.name);return(0,p.jsx)("div",{className:`${eW}-titles-box`,children:(0,p.jsx)("div",{className:`${eW}-titles`,children:(0,p.jsx)(B.A,{direction:"vertical",children:(0,p.jsx)("div",{className:`${eW}-node-title`,children:(0,p.jsxs)(B.A,{children:[(0,p.jsx)("div",{onClick:l,children:(0,p.jsxs)(B.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)(e$.A,{style:{color:"lightblue"}})),d,(0,p.jsx)(eP.A,{content:(0,p.jsx)(p.Fragment,{children:i.data.__RESOURCEPATH__?(0,p.jsx)(F.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)(F.A.Text,{children:i.data.name})},`${i.data.name}popover`)]})}),(0,p.jsx)(B.A,{children:r&&(0,p.jsx)(eE.Consumer,{children:e=>{let{moduleJumpList:t,setModuleJumpList:r}=e;return(0,p.jsx)(eO.A,{onClick:()=>{let e=[...t];e.push(+i.id),r(e)}})}})})]})})})})},i.data.name)},[n,s,r]);return(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(eG.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})})};_.Kj.RsdoctorClientRoutes.ModuleAnalyze;let eK="module-analyze";r(46251);var eY=r(55807);let eq=(0,m.memo)(e=>{let{dependencies:t,cwd:r,module:s}=e,i=(0,m.useMemo)(()=>{let e=s.dependencies.map(e=>{let r=t.find(t=>t.id===e);if(r)return{__RESOURCEPATH__:r.resolvedRequest||"",id:r.dependency,key:r.resolvedRequest,name:(0,y.getShortPath)(r.resolvedRequest)||"",level:1,kind:r.kind,concatModules:void 0}});return eY.AP.compact(e)},[s]);return(0,p.jsx)($.A,{justify:"start",align:"middle",children:(0,p.jsx)(O.A,{span:24,children:i.length?(0,p.jsx)(eU,{treeData:i,needJumpto:!0,cwd:r}):(0,p.jsx)(J.A,{})})})}),eH=(e,t)=>{if(e?.imported?.length){let r=e.imported.map(e=>t.find(t=>t.id===Number(e)));return eY.AP.compact(r)}return[]},eZ=e=>{let{reasons:t,sideEffectCodes:r,modulePath:s}=e;return t&&t.length||r&&r.length?(0,p.jsxs)(N.A,{className:`${eK}-bailout-card`,bordered:!1,bodyStyle:{padding:20,height:"100%"},children:[t&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(F.A.Text,{strong:!0,className:`${eK}-bailout-card-title`,children:"Bailout Reasons"}),(0,p.jsx)("div",{className:`${eK}-bailout-card-list`,style:{maxHeight:156,overflowY:"auto"},children:t.length>0?t.map((e,t)=>(0,p.jsxs)("div",{className:`${eK}-bailout-card-item`,children:[(0,p.jsx)(eP.A,{content:e,trigger:"hover",children:(0,p.jsx)(F.A.Paragraph,{ellipsis:{rows:1},className:`${eK}-bailout-card-text`,style:{marginBottom:0},children:e})}),(0,p.jsxs)(F.A.Text,{type:"secondary",className:`${eK}-bailout-card-meta`,children:["#",String(t+1).padStart(2,"0")]})]},`${e}-${t}`)):(0,p.jsx)(J.A,{})})]}),r&&r.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)(F.A.Text,{strong:!0,className:`${eK}-bailout-card-title`,children:"Side Effect Codes"}),s&&r[0]&&(0,p.jsx)(R.A,{title:`Open in VSCode: line ${r[0].startLine}`,children:(0,p.jsx)(eT.A,{style:{width:16,height:16,cursor:"pointer",flexShrink:0,marginBottom:12},onClick:()=>(0,e_.jk)({file:s,line:r[0].startLine})})}),s&&r[0]&&(0,p.jsx)(R.A,{title:`Open in Cursor: line ${r[0].startLine}`,children:(0,p.jsx)(eR.A,{style:{width:16,height:16,cursor:"pointer",flexShrink:0,marginBottom:12},onClick:()=>(0,e_.L2)({file:s,line:r[0].startLine})})}),s&&r[0]&&(0,p.jsx)(R.A,{title:`Open in Trae: line ${r[0].startLine}`,children:(0,p.jsx)(eB.A,{style:{width:16,height:16,cursor:"pointer",flexShrink:0,marginBottom:12},onClick:()=>(0,e_.bX)({file:s,line:r[0].startLine})})})]}),(0,p.jsx)("div",{className:`${eK}-bailout-card-list`,style:{minHeight:"50vh",display:"flex",flexDirection:"column",gap:12,overflow:"auto"},children:r.map((e,t)=>(0,p.jsx)("div",{className:`${eK}-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)(eN.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)(J.A,{})})},`${e.moduleId}-${t}`))})]})]}):(0,p.jsx)(N.A,{className:`${eK}-bailout-card`,bordered:!1,bodyStyle:{padding:20,height:"100%"},children:(0,p.jsx)(J.A,{})})},eQ=e=>{let{curModule:t,modules:r,dependencies:s,cwd:i,activeTabKey:n,selectedChunk:a=""}=e,[l,o]=(0,m.useState)([]),{data:d}=(0,m.useMemo)(()=>l&&l?.length?{data:eY.AP.compact(l?.map((e,s)=>({key:`0-${s}`,name:(0,y.getShortPath)(e.path),__RESOURCEPATH__:e.path,id:e.id,level:0,chunks:e.chunks,size:(0,y.formatSize)(e.size.parsedSize),kind:e.kind,concatModules:e.concatenationModules,fatherPath:(0,y.getShortPath)(t.path),dependencies:e.dependencies,getChildren:()=>(function e(t,r,s,i){let n=eH(t,r),a=i+1;return n?.map((i,n)=>({key:`0-${n}`,name:(0,y.getShortPath)(i.path),__RESOURCEPATH__:i.path,id:i.id,level:a,size:(0,y.formatSize)(i.size.parsedSize),kind:i.kind,chunks:i.chunks,concatModules:i.concatenationModules,fatherPath:(0,y.getShortPath)(s.path),dependencies:i.dependencies,getChildren:()=>e(i,r,t,a),children:i.imported}))})(e,r,t,0),children:e.imported})))}:{filterData:[],data:[]},[l,t]);(0,m.useEffect)(()=>{o(eH(t,r))},[t,r]);let c=(0,m.useMemo)(()=>n===e0[e0.Reasons]?l?(0,p.jsx)(eU,{cwd:i,treeData:d,needCode:!0,needShowAllTree:!0,needJumpto:!0,selectedChunk:a,defaultOpenFather:1}):(0,p.jsx)(J.A,{className:`${eK}-empty`}):(0,p.jsx)("div",{className:`${eK}-file-tree`,style:{padding:eD.or.BasePadding/2},children:(0,p.jsx)(O.A,{span:24,style:{marginTop:eD.or.BasePadding/2},children:t?(0,p.jsx)(eq,{module:t,dependencies:s,cwd:i}):(0,p.jsx)(J.A,{className:`${eK}-empty`})})}),[n,t,s,d,l,i,a]);return(0,p.jsx)(p.Fragment,{children:c})};var eJ=r(90079),eV=r(69794),eX=r(14289),e0=((s={})[s.Reasons=0]="Reasons",s[s.Dependencies=1]="Dependencies",s);let e1=[{key:e0[0],label:e0[0]},{key:e0[1],label:e0[1]}],e2=e=>{let{modules:t,cwd:r,moduleId:s,show:i,setShow:n}=e,[a,l]=(0,m.useState)(""),[o,d]=(0,m.useState)(e0[0]);return(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetModuleDetails,body:{moduleId:+s},children:e=>{let{module:s,dependencies:l,sideEffectCodes:c}=e;return(0,p.jsx)(eI.A,{title:(0,p.jsxs)("div",{className:"module-analyze-box",children:[(0,p.jsx)(F.A.Text,{children:(0,y.getShortPath)(s.path)}),(0,p.jsx)(F.A.Text,{type:"secondary",style:{fontSize:12},children:`Current Module: ${s.path}`})]}),open:i,maskClosable:!0,width:.8*eD.Y7,onClose:()=>n(!1),children:(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAllChunkGraph,body:{},children:e=>(0,p.jsx)(eE.Consumer,{children:e=>{let{moduleJumpList:i,setModuleJumpList:n}=e;return(0,p.jsx)(T.A,{defaultActiveKey:"bailout",items:[{key:"moduleTree",label:"Module Tree",children:(0,p.jsx)(N.A,{style:{minHeight:400},tabList:e1,activeTabKey:o,tabProps:{size:"small",style:{fontSize:12}},onTabChange:e=>d(e),styles:{title:{paddingTop:0}},title:(0,p.jsxs)(B.A,{style:{padding:"10px 0px"},children:[(0,p.jsx)(eJ.A,{onClick:()=>{n([...i.slice(0,-1)])}}),(0,p.jsx)(F.A.Text,{style:{fontSize:14},children:"Current Module Imported Reasons Tree"}),(0,p.jsx)(eP.A,{content:(0,p.jsx)("div",{children:(0,p.jsxs)("div",{children:[(0,p.jsx)(eC.A,{status:"success",text:" "}),(0,p.jsx)(eV.A,{}),(0,p.jsx)(F.A.Text,{children:": Jump button, click to jump to the Module dependency analysis page of this module."})]})}),title:"Usage",children:(0,p.jsx)(eX.A,{})})]}),children:(0,p.jsx)(eQ,{curModule:s,modules:t,dependencies:l,cwd:r,selectedChunk:a,activeTabKey:o})})},{key:"bailout",label:"Bailout",children:(0,p.jsx)("div",{style:{marginTop:16},children:(0,p.jsx)(eZ,{reasons:s.bailoutReason,sideEffectCodes:c,modulePath:s.path})})}]})}})})})}})};r(83161);var e8="collapsed-hxz3Bf",e5="chunk-item-dQ0XI7",e4="size-tag-EM4AKE",e3="all-none-checkbox-kw3p6X",e6=r(59104);let e7=new Set(["js","cjs","mjs","jsx","bundle"]),e9=e=>{let t=e.split(/[?#]/,1)[0]??"",r=t.lastIndexOf(".");if(-1===r)return!1;let s=t.slice(r+1).toLowerCase();return e7.has(s)};var te=r(32782);function tt(e){let t=5381;for(let r=0;r<e.length;r++)t=(t<<5)+t+e.charCodeAt(r);return t>>>0}function tr(e,t){let r=parseInt(e.slice(1,3),16),s=parseInt(e.slice(3,5),16),i=parseInt(e.slice(5,7),16),n=Math.round(r*t+255*(1-t)),a=Math.round(s*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")}`}ep.Y([eg.a,ex.a,ey.a,ej.a]);let ts=(0,m.memo)(e=>{let{treeData:t,sizeType:r,onChartClick:s,highlightNodeId:i,centerNodeId:n,rootPath:a}=e,[l,o]=(0,m.useState)(null),d=m.useRef(null),c=m.useRef([]),h=m.useRef(null),u=(0,y.useThemeToken)();return(0,m.useEffect)(()=>{var e;if(!t)return;let s=t.map((e,s)=>(function e(t){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=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||e6.GB[s%e6.GB.length],h=0===n?t.path||t.name||"":d||"",u=t.children?.map((r,i)=>e(r,s,n+1,c,i,t.children?.length||0,h)),p=0;"stat"===r?p=t.sourceSize||0:"parsed"===r?p=t.bundledSize||0:"gzip"===r?p=t.gzipSize||0:"value"===r&&(p=t.value||0);let m=tt(0===n?t.path||t.name||"":`${h}::${t.path||t.name||""}`),f=i===m,g=0===n?1:Math.max(.35,1-.15*n),x=0===n?1:Math.max(.4,1-.15*n),y=o>1?1-l/(o-1)*.15:1,j=f?"#fff5f5":0===n?tr(c,.8):tr(c,g*y),A=f?"#ff4d4f":0===n?c:tr(c,x*y),v=.4>function(e){let[t,r,s]=[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*r+.0722*s}(j),S=v?"#ffffff":"#000000",b={id:m,name:t.name,value:p,path:t.path||t.name,sourceSize:t.sourceSize??("stat"===r?p:void 0),bundledSize:t.bundledSize??("parsed"===r?p:void 0),gzipSize:t.gzipSize??("gzip"===r?p:void 0),moduleId:t.id,itemStyle:{borderWidth:f?4:1,color:j,borderColor:A,...0===n&&{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===n?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,s,0,void 0,s,t.length,void 0)).filter(e=>"number"==typeof e.value&&e.value>0||e.children&&e.children.length>0);c.current=s;let n=u.colorText;o({color:e6.GB,tooltip:{padding:10,backgroundColor:u.colorBgElevated,borderColor:u.colorBorder,borderWidth:1,textStyle:{color:n},confine:!0,extraCssText:"max-width: 450px; word-wrap: break-word;",position:function(e,t,r,s,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||{},s="string"==typeof t.path?t.path:"string"==typeof t.name?t.name:String(t.name??"");if(a&&s){let e=a.replace(/\\/g,"/").replace(/\/$/,""),t=s.replace(/\\/g,"/");t.startsWith(e+"/")?s=t.slice(e.length+1):t===e&&(s="")}let i="number"==typeof t.sourceSize&&t.sourceSize>0?t.sourceSize:"number"==typeof t.value&&t.value>0&&"stat"===r?t.value:void 0,l="number"==typeof t.bundledSize&&t.bundledSize>0?t.bundledSize:void 0,o="number"==typeof t.gzipSize&&t.gzipSize>0?t.gzipSize:void 0;function d(e,t,r){return`<div class="tooltip-row-sZbl0R">
82
+ <span class="tooltip-label-INs_JK" style="color: ${r};">${e}</span>
83
+ <span style="color: ${r};">${t}</span>
84
+ </div>`}let c=[];return void 0!==i&&i>0&&c.push(d("Stat size",(0,y.formatSize)(i),"#43c6d9")),void 0!==l&&l>0&&c.push(d("Parsed size",(0,y.formatSize)(l),"#5b8ff9")),void 0!==o&&o>0&&c.push(d("Gzipped size",(0,y.formatSize)(o),"#f2b84b")),`
85
+ <div style="font-family: sans-serif; font-size: 12px; line-height: 1.5;">
86
+ <div style="margin-bottom: 6px; max-width: 400px; word-wrap: break-word; overflow-wrap: break-word; word-break: break-all; white-space: normal; color: ${n};">${em.Me(s)}</div>
87
+ ${c.join("")}
88
+ </div>
89
+ `}},series:[{type:"treemap",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:e=u.colorBgContainer}},{itemStyle:{borderColorAlpha:[1,.3],borderWidth:5,gapWidth:4,gapColor:e},upperLabel:{show:!0,color:"#ffffff",fontSize:12,height:30}}],data:s,breadcrumb:{show:!0,left:"center",top:"bottom",height:22,emptyItemWidth:25,itemStyle:{color:"#999",borderColor:"transparent",borderWidth:0,borderRadius:0,textStyle:{fontFamily:"sans-serif",fontSize:12,color:"white"}},emphasis:{itemStyle:{color:"#333"}}},roam:!0,nodeClick:!1,zoomToNodeRatio:.7,animationDurationUpdate:500,width:"100%",height:"100%",top:-10,bottom:30,left:0,right:0,scaleLimit:{min:.5,max:5}}]})},[t,r,i,a,u]),(0,m.useEffect)(()=>{if(n&&d.current&&l){let e=d.current.getEchartsInstance();if(e){let t=function(e,r){let s=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=[...s,e];if(i.id===r)return{name:e,path:n};if(i.children){let e=t(i.children,r,n);if(e)return e}}return null};setTimeout(()=>{let r=t(c.current,n);if(!r)return;let s=r.name;try{e.dispatchAction({type:"highlight",seriesIndex:0,name:s})}catch(e){console.error("Failed to highlight node with name:",s,e)}for(let t of[()=>e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,targetNodeId:String(n)}),()=>e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,name:s}),()=>e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,name:r.path.join("/")}),()=>r.path.length>0&&e.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,name:r.path[r.path.length-1]})])try{t();return}catch(e){console.error("Failed to zoom to node with id:",n,e)}console.warn("Failed to zoom to node with id:",n)},200)}}},[n,l]),(0,m.useEffect)(()=>()=>{h.current&&window.clearTimeout(h.current)},[]),l?(0,p.jsxs)("div",{className:"chart-container-gPlZC7",children:[(0,p.jsx)(eA.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)("div",{style:{flex:1},children:(0,p.jsx)(eu.A,{ref:d,option:l,echarts:ef,onEvents:{click:e=>{h.current&&window.clearTimeout(h.current),h.current=window.setTimeout(()=>{if(d.current){let t=d.current.getEchartsInstance(),r=e?.data;t&&r?.id!==void 0&&t.dispatchAction({type:"treemapZoomToNode",seriesIndex:0,targetNodeId:String(r.id)})}},180)},dblclick:e=>{h.current&&(window.clearTimeout(h.current),h.current=null),s?.(e)}},style:{width:"100%",height:"100%"}})})]}):null}),ti=e=>{let{treeData:t,onChartClick:r,bundledSize:s=!0}=e;return(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetProjectInfo,children:e=>(0,p.jsx)(tn,{treeData:t,onChartClick:r,bundledSize:s,rootPath:e.root})})},tn=e=>{let{treeData:t,onChartClick:r,bundledSize:s=!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)(s?"parsed":"stat"),[u,f]=(0,m.useState)(""),[x,j]=(0,m.useState)(!1),[A,v]=(0,m.useState)(),[S,b]=(0,m.useState)(),[z,M]=(0,m.useState)(""),[k,w]=(0,m.useState)(!1),[I,P]=(0,m.useState)(""),[C,E]=(0,m.useState)(!1),D=m.useRef(null),N=(0,m.useMemo)(()=>C?n.filter(e9):n,[n,C]),T=(0,m.useMemo)(()=>N.join("\0"),[N]),R=m.useRef(void 0);(0,m.useEffect)(()=>{R.current!==T&&(R.current=T,l(N))},[N,T]);let B=(0,m.useCallback)(e=>{r?.(e);let t=e.data,s=t?.moduleId;void 0!==s&&(M(s),w(!0))},[r]);(0,m.useEffect)(()=>{let e=()=>{j(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e)}},[]);let F=(0,m.useMemo)(()=>{let e=t.filter(e=>N.includes(e.name)&&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,N]),$=(0,m.useMemo)(()=>{if(!u.trim())return[];let e=RegExp(u,"i"),t=[],r=(s,i)=>{let n=i||s.path||s.name||"";if(s.path&&e.test(s.path)){let e=tt(i?`${i}::${s.path}`:s.path);t.push({path:s.path,nodeId:e})}s.children&&s.children.forEach(e=>r(e,n))};return F.forEach(e=>r(e)),t},[F,u]),O=(0,m.useMemo)(()=>(0,te.z)(F,c),[F,c]);return(0,p.jsxs)("div",{className:"treemap-DOrYiA",ref:D,children:[(0,p.jsx)("button",{className:"fullscreen-button-jVdrxO",onClick:()=>{x?document.exitFullscreen().then(()=>j(!1)).catch(e=>console.error("Failed to exit fullscreen:",e)):(()=>{if(!D.current)return;let e=D.current;if(e.requestFullscreen)e.requestFullscreen().then(()=>j(!0)).catch(e=>console.error("Failed to enter fullscreen:",e));else if(e.webkitRequestFullscreen)try{e.webkitRequestFullscreen(),j(!0)}catch(e){console.error("Failed to enter fullscreen (webkit):",e)}else if(e.mozRequestFullScreen)try{e.mozRequestFullScreen(),j(!0)}catch(e){console.error("Failed to enter fullscreen (moz):",e)}else if(e.msRequestFullscreen)try{e.msRequestFullscreen(),j(!0)}catch(e){console.error("Failed to enter fullscreen (ms):",e)}else console.error("Fullscreen API is not supported in this browser.")})()},title:x?"Exit fullscreen":"Enter fullscreen","aria-label":x?"Exit fullscreen":"Enter fullscreen",children:x?(0,p.jsx)(ez.A,{}):(0,p.jsx)(eM.A,{})}),(0,p.jsxs)("div",{className:`sidebar-Pww0Wm ${o?e8:""}`,children:[(0,p.jsx)("div",{className:`sidebar-toggle-NaGZQP ${o?e8:""}`,onClick:()=>d(!o),children:o?(0,p.jsx)(g.A,{}):(0,p.jsx)(ek.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)(ev.A.Group,{value:c,onChange:e=>h(e.target.value),size:"small",buttonStyle:"solid",children:[(0,p.jsx)(ev.A.Button,{value:"stat",children:"Stat"}),(0,p.jsx)(ev.A.Button,{value:"parsed",children:"Parsed"}),(0,p.jsx)(ev.A.Button,{value:"gzip",children:"Gzipped"})]})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("h4",{children:"Show chunks"}),(0,p.jsx)(eS.A,{placeholder:"Search chunks",value:I,onChange:e=>P(e.target.value),suffix:(0,p.jsx)(ew.A,{style:{color:"#ccc"}}),allowClear:!0,size:"small",style:{marginBottom:8}}),(0,p.jsxs)("div",{className:e5,children:[(0,p.jsx)(eb.A,{indeterminate:a.length>0&&a.length<N.length,checked:N.length>0&&a.length===N.length,onChange:e=>l(e.target.checked?N:[]),className:e3,children:"All"}),(0,p.jsx)("span",{className:e4,children:(0,y.formatSize)(O)})]}),(0,p.jsx)(eb.A,{checked:C,onChange:e=>{E(e.target.checked)},className:e3,children:"JS only"}),(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:e5,style:{height:15,lineHeight:"15px"},children:[(0,p.jsx)(eb.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:e4,children:(0,y.formatSize)(((e,r)=>{let s=t.find(t=>t.name===e);if(!s)return 0;let i=r||c;return(0,te.M)(s,i)})(e,c))})]},e))})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("h4",{children:"Search modules"}),(0,p.jsx)(eS.A,{placeholder:"Enter regexp",value:u,onChange:e=>{f(e.target.value),v(void 0),b(void 0)},suffix:(0,p.jsx)(ew.A,{style:{color:"#ccc"}}),allowClear:!0,size:"small"}),u.trim()&&$.length>0&&(0,p.jsxs)("div",{className:"search-results-emVgaj",children:[(0,p.jsxs)("div",{className:"search-results-header-oyQ0jw",children:["Found ",$.length," file",$.length>1?"s":""]}),(0,p.jsx)("div",{className:"search-results-list-FSMG6d",children:$.map((e,t)=>{let r=(e=>{if(!i||!e)return e;let t=i.replace(/\\/g,"/").replace(/\/$/,""),r=e.replace(/\\/g,"/");return r.startsWith(t+"/")?r.slice(t.length+1):r===t?"":e})(e.path);return(0,p.jsx)("div",{className:"search-result-item-IZR6nt",onClick:()=>{var t;v(t=e.nodeId),b(t)},title:e.path,children:r||e.path},t)})})]}),u.trim()&&0===$.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)(ts,{treeData:F,sizeType:c,onChartClick:B,highlightNodeId:A,centerNodeId:S,rootPath:i}),z?(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAllModuleGraph,body:{},children:e=>(0,p.jsx)(e2,{cwd:i,moduleId:z,modules:e,show:k,setShow:w})}):null]})]})};var ta=r(36176),tl=r(88059),to=r(19089),td=r(66419),tc=r(12420),th=r(75567),tu=r(60287),tp=r(99219),tm=r(92636),tf=r(67682),tg=r(13078),tx=r.n(tg);r(12310);var ty="bundleTreeEntry-Cd5W_S",tj="bundleTreeEntryContent-E8HDg1",tA="bundleTreeEntryTitle-XbeexU",tv="divider-Iq1wtJ",tS=r(26184);let{DirectoryTree:tb}=W.A,tz=(0,m.createContext)({enabled:!0}),tM=e=>{let{children:t}=e;return(0,p.jsx)(tz.Provider,{value:{enabled:!1},children:t})},tk=()=>(0,m.use)(tz)?.enabled??!0,tw=e=>tk()?(0,p.jsx)(R.A,{...e}):e.children??null,tI=e=>tk()?(0,p.jsx)(eP.A,{...e}):e.children??null,tP=()=>(0,p.jsx)(J.A,{description:`Do not have the module code.
90
+ (1) If you use the brief mode, there will not have any codes to show.
91
+ (2) If you use lite mode, there will not have source codes.`}),tC=e=>{let{data:t}=e,[r,s]=(0,m.useState)(""),{t:i}=(0,y.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)(X.hX,{text:"",buttonProps:{size:"small",icon:(0,p.jsx)(tI,{content:"Open the Codes Box",children:(0,p.jsx)(E.A,{})}),type:"default"},buttonStyle:{padding:"0 4px"},drawerProps:{destroyOnClose:!0,title:`Code of "${a}"`},children:(0,p.jsx)(L.zW,{api:_.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)(N.A,{className:"code-size-card",style:{width:"100%"},tabList:Object.keys((0,tf.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=>s(e),tabBarExtraContent:(0,p.jsx)(tI,{placement:"bottom",title:(0,p.jsx)(F.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)(F.A.Text,{strong:!0,children:"Source: "}),(0,p.jsx)(F.A.Text,{children:"source code"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(F.A.Text,{strong:!0,children:"Transformed:"}),(0,p.jsx)(F.A.Text,{children:"Transformed Code (After compile)"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(F.A.Text,{strong:!0,children:"Bundled Source:"}),(0,p.jsx)(F.A.Text,{children:"Bundled Code (After bundle and tree-shaking)"})]}),(0,p.jsx)("br",{}),(0,p.jsx)(F.A.Text,{strong:!0,children:"More"}),(0,p.jsx)(F.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)(eN.Cv,{isEmbed:!0,code:r?e[r]:e.parsedSource?e.parsedSource:e.source,filePath:a}):(0,p.jsx)(tP,{})}):(0,p.jsx)(tP,{})})})})},tE=e=>{let{id:t,show:r,setShow:s,cwd:i}=e;return t?(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAllModuleGraph,body:{},children:e=>(0,p.jsx)(e2,{cwd:i,moduleId:t,modules:e,show:r,setShow:s})}):null},tD="__RESOURCEPATH__",t_=(0,m.memo)(e=>{let{modules:t,chunks:r,filteredModules:s}=e,{sourceSize:i,parsedSize:n,filteredParsedSize:a,filteredSourceSize:l}=(0,m.useMemo)(()=>({sourceSize:(0,V.x)(t,e=>e.size.sourceSize),parsedSize:(0,V.x)(t,e=>e.size.parsedSize),filteredSourceSize:(0,V.x)(s,e=>e.size.sourceSize),filteredParsedSize:(0,V.x)(s,e=>e.size.parsedSize)}),[t,s]);return(0,p.jsxs)(B.A,{children:[(0,p.jsx)(tw,{title:`total modules count is ${t.length}, the filtered modules count is ${s.length}`,children:(0,p.jsxs)(B.A,{children:[(0,p.jsxs)(F.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Modules: ",s.length," / ",t.length]}),(0,p.jsx)(C.A,{})]})}),(0,p.jsx)(Y.A,{type:"vertical"}),(0,p.jsx)(tw,{title:(0,p.jsxs)(B.A,{direction:"vertical",children:[(0,p.jsxs)(F.A.Text,{style:{color:"inherit"},children:["Total modules bundled size: ",(0,y.formatSize)(n)]}),(0,p.jsxs)(F.A.Text,{style:{color:"inherit"},children:["Total modules source size: ",(0,y.formatSize)(i)]}),(0,p.jsxs)(F.A.Text,{style:{color:"inherit"},children:["Filtered modules bundled size: ",(0,y.formatSize)(a)]}),(0,p.jsxs)(F.A.Text,{style:{color:"inherit"},children:["Filtered modules source size: ",(0,y.formatSize)(l)]})]}),children:(0,p.jsxs)(B.A,{children:[(0,p.jsxs)(F.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Modules Size:",a===n?(0,y.formatSize)(n):`${(0,y.formatSize)(a)} / ${(0,y.formatSize)(n)}`]}),(0,p.jsx)(C.A,{})]})}),(0,p.jsx)(Y.A,{type:"vertical"}),(0,p.jsx)(tw,{title:(0,p.jsxs)(B.A,{direction:"vertical",children:[(0,p.jsxs)(F.A.Text,{style:{color:"inherit"},children:["this asset includes ",r.length," chunks:"]}),r.map(e=>(0,p.jsx)(th.Ex,{label:"chunk",value:e.name},e.name))]}),children:(0,p.jsxs)(B.A,{children:[(0,p.jsxs)(F.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:["Chunks: ",r.length]}),(0,p.jsx)(C.A,{})]})})]})}),tN={margin:"none",marginInlineEnd:0},tT=e=>{let{color:t,tooltipTitle:r,style:s=tN,children:i}=e;return(0,p.jsx)(tw,{title:(0,p.jsx)(B.A,{children:(0,p.jsx)(F.A.Text,{style:{color:"inherit"},children:r})}),children:(0,p.jsx)(G.A,{color:t,style:s||void 0,children:i})})},tR=e=>{let{moduleCount:t}=e;return(0,p.jsx)(tT,{color:"blue",tooltipTitle:`This is a concatenated container module that includes ${t} modules`,children:"concatenated container"})},tB=e=>{let{size:t}=e;return(0,p.jsx)(tT,{color:"geekblue",tooltipTitle:"The total output size of all the files in this folder. If you enabled minification, this value shows the minified size.",children:`bundled size: ${(0,y.formatSize)(t)}`})},tF=e=>{let{size:t}=e;return(0,p.jsx)(tT,{color:"geekblue",style:null,tooltipTitle:"The final output size of this file. If you enabled minification, this value shows the minified size.",children:`bundled size: ${(0,y.formatSize)(t)}`})},t$=e=>{let{size:t}=e;return(0,p.jsx)(tT,{color:"orange",style:null,tooltipTitle:"The compressed file size that users actually download, as most web servers use gzip compression.",children:`gzipped: ${(0,y.formatSize)(t)}`})},tO=e=>{let{size:t}=e;return(0,p.jsx)(tT,{tooltipTitle:"The total original size of all the files in this folder, before any transformations and minification.",color:"cyan",children:`source size: ${(0,y.formatSize)(t)}`})},tG=e=>{let{size:t}=e;return(0,p.jsx)(tT,{color:"cyan",style:null,tooltipTitle:"The original size of this file, before any transformations and minification.",children:`source size: ${(0,y.formatSize)(t)}`})},tL=e=>{let{asset:t,chunks:r,modules:s,moduleSizeLimit:i,height:n,root:a}=e,[l,o]=(0,m.useState)(""),[d,c]=(0,m.useState)(!1),[h,u]=(0,m.useState)([]),[g,x]=(0,m.useState)(!1),y=(0,m.useMemo)(()=>{let e=s.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},[s,l,i]),j=(0,m.useCallback)(e=>{x(!0),u(e)},[]);return(0,m.useEffect)(()=>{o(""),c(!1)},[t]),(0,m.useEffect)(()=>{c(!1)},[l]),(0,p.jsx)(eE.Provider,{value:{moduleJumpList:h,setModuleJumpList:u},children:(0,p.jsxs)(N.A,{className:"bundle-JPUVg_",title:`Modules of "${t.path}"`,style:n?{"--body-min-height":n+"px"}:void 0,classNames:{body:"bundleBody-vDRay7"},size:"small",children:[s.length?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{children:(0,p.jsx)(t_,{modules:s,chunks:r,filteredModules:y})}),(0,p.jsx)("div",{children:(0,p.jsxs)(B.A,{children:[(0,p.jsx)(tu.E,{placeholder:"search module by keyword",onChange:e=>o(e)},t.path),(0,p.jsx)(f.Ay,{onClick:()=>c(!0),size:"small",icon:(0,p.jsx)(tm.A,{})})]})}),(0,p.jsx)(tU,{assetPath:t.path,includeModules:s,filteredModules:y,defaultExpandAll:d,moduleKeyword:l,openModuleGraphViewer:j})]}):(0,p.jsx)(J.A,{description:(0,p.jsx)(F.A.Text,{strong:!0,children:`"${t.path}" doesn't have any modules`})}),(0,p.jsx)(tE,{id:h?.length?h[h.length-1]:"",show:g,setShow:x,cwd:a})]})})},tW=[],tU=(0,m.memo)(e=>{let{filteredModules:t,includeModules:r,defaultExpandAll:s,moduleKeyword:i,openModuleGraphViewer:n,assetPath:a}=e,[l,o]=(0,m.useState)(!1),[d,{height:c,width:h}]=(0,y.useElementSize)(),u=(0,m.useMemo)(()=>{let e=(0,td.s)(()=>{o(!1)},150);return()=>{o(!0),e()}},[]),f=(0,m.useMemo)(()=>{let e=e=>e.replace(/\\/g,"/"),s=new Map,i=[];for(let r of t)r.path&&(s.set(e(r.path),r),i.push(r.path));let a=new Map;for(let t of r)t.path&&a.set(e(t.path),t);let l=e=>n([e]);return(0,y.createFileStructures)({files:i,inlinedResourcePathKey:tD,fileTitle(t,i){let n=s.get(e(t));return n?(0,p.jsx)(tY,{mod:n,basename:i,includeModules:r,onClick:l}):i},dirTitle(t,r){let s=function e(t,r){return t.children&&t.children.forEach(t=>{t.isLeaf?r.push(t[tD]):e(t,r)}),r}(t,[]);if(!s.length)return r;let{parsedSize:i,sourceSize:n}=s.reduce((t,r)=>{let s=a.get(e(r));return s&&(t.sourceSize+=s.size?.sourceSize||0,t.parsedSize+=s.size?.parsedSize||0),t},{sourceSize:0,parsedSize:0});return(0,p.jsx)(tK,{title:r,parsedSize:i,sourceSize:n})},page:"bundle"})},[t,n]);return(0,p.jsx)(tz.Provider,{value:{enabled:!l},children:(0,p.jsx)("div",{className:"bundleTree-ym_nR5",style:{marginTop:eD.or.BasePadding,"--item-height":"30px"},children:(0,p.jsx)("div",{className:"bundleTreeViewport-JRXX4Y",children:(0,p.jsx)("div",{className:"bundleTreeInnerViewport-GsHdIR",ref:d,children:c>0&&(0,p.jsx)(p.Fragment,{children:t.length?(0,p.jsx)(tb,{onScroll:u,selectable:!1,virtual:!0,itemHeight:30,height:c,style:h?{width:h+"px"}:void 0,defaultExpandAll:s||t.length<=20,onExpand:e=>{tW=e},defaultExpandParent:!0,defaultExpandedKeys:tW?.length?tW:1===f.length?[f[0].key]:[],treeData:f,motion:!1},`tree_${i}_${s}_${a}`):(0,p.jsx)(J.A,{description:(0,p.jsx)(F.A.Text,{strong:!0,children:`"${i}" can't match any modules`})})})})})})})}),tK=(0,m.memo)(e=>{let{title:t,parsedSize:r,sourceSize:s}=e,i=()=>(0,p.jsxs)("div",{className:tj,children:[(0,p.jsx)(tI,{content:t,children:(0,p.jsx)(F.A.Text,{className:tA,children:t})}),(0,p.jsx)("div",{className:tv}),(0,p.jsx)(B.A,{children:r>0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(tB,{size:r}),(0,p.jsx)(tO,{size:s})]}):(0,p.jsx)(tO,{size:s})})]});return(0,p.jsx)("div",{className:ty,children:(0,p.jsx)(tS.tH,{fallbackRender:()=>(0,p.jsx)(tM,{children:i()}),children:i()})})}),tY=(0,m.memo)(e=>{let{mod:t,basename:r,includeModules:s,onClick:i}=e,n=t.kind===_.hp.ModuleKind.Concatenation,{parsedSize:a=0,sourceSize:l=0,gzipSize:o=0}=t.size,d=()=>{let e;return(0,p.jsxs)("div",{className:tj,children:[(0,p.jsx)(tI,{content:`Open the ${r}’s module reasons tree.`,placement:"bottom",children:(0,p.jsxs)("div",{className:"bundleTreeEntryTitleWrap-pgKUih",onClick:()=>i(t.id),children:[(0,p.jsx)(tI,{content:r,children:(0,p.jsx)(F.A.Text,{className:tA,children:r})}),(0,p.jsx)("div",{className:tv})]})}),(0,p.jsxs)(B.A,{children:[(()=>{if(0!==a){let e=(0,p.jsx)(tG,{size:l}),t=(0,p.jsx)(tF,{size:a});return"number"==typeof o?(0,p.jsx)(tI,{placement:"bottom",content:e,children:(0,p.jsxs)(B.A,{direction:"horizontal",children:[t,(0,p.jsx)(t$,{size:o})]})}):(0,p.jsxs)(B.A,{direction:"horizontal",children:[t,e]})}return 0!==l?(0,p.jsx)(tG,{size:l}):null})(),n&&(0,p.jsx)(tR,{moduleCount:t.modules?.length||0}),(e=!n&&0===a&&s.filter(e=>e!==t&&e.modules&&e.modules.indexOf(t.id)>-1))&&e.length?(0,p.jsx)(tw,{title:(0,p.jsxs)(B.A,{direction:"vertical",children:[(0,p.jsx)(F.A.Text,{style:{color:"inherit"},children:"This module is concatenated into another container module:"}),e.map(e=>{let{id:r,path:s}=e;if((0,y.isJsDataUrl)(s))return(0,p.jsx)(F.A.Paragraph,{ellipsis:{rows:4},style:{color:"inherit",maxWidth:"100%"},code:!0,children:s},r);let i=(0,tg.relative)((0,tg.dirname)(t.path),s);return i.startsWith("javascript;charset=utf-8;base64,")?(0,p.jsx)(F.A.Text,{style:{color:"inherit",maxWidth:"100%"},code:!0,children:"."===i[0]?i:`./${i}`},r):(0,p.jsx)(F.A.Text,{style:{color:"inherit"},code:!0,children:"."===i[0]?i:`./${i}`},r)})]}),children:(0,p.jsx)(G.A,{color:"green",children:"concatenated"})}):null,(0,p.jsx)(tC,{data:t})]})]})};return(0,p.jsx)("div",{className:ty,children:(0,p.jsx)(tS.tH,{fallbackRender:()=>(0,p.jsx)(tM,{children:d()}),children:d()})})});var tq=r(91920),tH=r(40161),tZ=r(73226),tQ=r(25453),tJ=r(83615);r(32454);let{Search:tV}=eS.A,tX=e=>{let{onModuleClick:t,onClose:r,open:s,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!==s?s:a,g=i||l,x=(0,m.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[s,i]=t;d(s)},[]),y=()=>{g(!0)},j=()=>{g(!1),r?.()},A=()=>{g(!1),r?.()};return(0,p.jsxs)(p.Fragment,{children:[n?(0,p.jsx)(ew.A,{onClick:y}):(0,p.jsx)(f.Ay,{className:"searchBtn-ZhRlk8",color:"cyan",onClick:y,children:"Search Module"}),(0,p.jsx)(tJ.zW,{api:_.hp.ServerAPI.API.GetSearchModules,body:{moduleName:String(o)},children:e=>{let s=Object.keys(e)[0];return(0,p.jsx)(p.Fragment,{children:(0,p.jsxs)(tH.A,{className:"modal-jTgoC2",title:"Search Modules",onOk:j,onCancel:A,open:u,width:"65rem",footer:"",children:[(0,p.jsx)(tV,{placeholder:"input search module name",allowClear:!0,onSearch:x,style:{width:500}}),s?(0,p.jsx)(T.A,{defaultActiveKey:s,tabPosition:"top",onChange:e=>h(e),items:Object.keys(e).map((i,n)=>({label:e[i],key:i,children:t0(o,c||s,e=>{t?.(e),g(!1),r?.()})}))}):(0,p.jsx)(J.A,{description:"No modules found."})]})})}})]})},t0=(e,t,r)=>(0,p.jsx)(tJ.zW,{api:_.hp.ServerAPI.API.GetSearchModuleInChunk,body:{moduleName:String(e),chunk:t},children:t=>(0,p.jsx)(p.Fragment,{children:t?.length!==0?(0,p.jsx)(tZ.A,{className:"list-osNsTS",loading:!t.length,itemLayout:"horizontal",pagination:{position:"bottom",align:"center"},dataSource:t,renderItem:t=>{let s=t.relativePath.split(e);return(0,p.jsx)(tZ.A.Item,{className:r&&"listItemInteractive-AC3tqb",onClick:r?()=>r(t):void 0,children:(0,p.jsx)(tQ.A,{avatar:!0,title:!1,loading:!t.path,active:!0,children:(0,p.jsx)(tZ.A.Item.Meta,{description:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(F.A.Text,{code:!0,children:"Module:"}),s.map((t,r)=>r<s.length-1?(0,p.jsxs)(F.A.Text,{style:{fontWeight:200},children:[t,(0,p.jsx)(F.A.Text,{strong:!0,style:{fontWeight:600},children:e},`${t}-${r}-strong`)]},`${t}-${r}`):(0,p.jsx)(F.A.Text,{style:{fontWeight:200},children:t}))]})},`${t.path}-${t.relativePath}-meta`)})},`${t.path}-${t.relativePath}`)}}):(0,p.jsx)(J.A,{})})}),{Option:t1}=tl.A,t2=(0,m.memo)(e=>{let{cwd:t,summary:r,entryPoints:s}=e,[i,n]=(0,m.useState)([]),[a,l]=(0,m.useState)(0),[o,d]=(0,m.useState)(""),[c,h]=(0,m.useState)(0),[u,f]=(0,m.useState)(!1),[g,x]=(0,m.useState)(""),[j,A]=(0,m.useState)(""),[v,S]=(0,m.useState)(!1),[b,z]=(0,m.useState)(null),{showCode:M,codeDrawerComponent:k}=(0,tc.Y)("Do not have the codes of assets. If you use the lite or brief mode, there will have codes."),{t:w}=(0,y.useI18n)(),I=r.all.total.files,P=(0,m.useCallback)(e=>t=>{"module"===e?x(t):"chunk"===e&&A(t)},[]),E=e=>(0,p.jsxs)(tl.A,{defaultValue:"kb",onChange:P(e),children:[(0,p.jsx)(t1,{value:"kb",children:"KB"}),(0,p.jsx)(t1,{value:"mb",children:"MB"})]}),D=(0,m.useCallback)((0,td.s)(e=>{l("mb"===g?1024*e*1024:1024*e)},300),[]),T=(0,m.useCallback)((0,td.s)(e=>{h("mb"===j?1024*e*1024:1024*e)},300),[]),G=(0,m.useMemo)(()=>{let e=I.slice();return o&&(e=e.filter(e=>e.path.indexOf(o)>-1)),v&&(e=e.filter(e=>e9(e.path))),c>0&&(e=e.filter(e=>e.size>=c)),i.length&&(e=e.filter(e=>!!i.some(t=>t.assets.includes(e.path)))),e.sort((e,t)=>{let r=+(e.path.indexOf("/")>-1);return(t.path.indexOf("/")>-1)-r})},[I,i,o,c,v]);(0,m.useEffect)(()=>{if(b&&G.some(e=>e.path===b))return;let e=G.find(e=>e9(e.path))??G[0];z(e?.path??null)},[b,G]);let W=(0,m.useMemo)(()=>(0,tq.kw)(G),[G]),U=(0,m.useMemo)(()=>(0,y.createFileStructures)({files:G.map(e=>e.path).filter(Boolean),fileTitle(e,t){let r=(0,tq.yF)(W,e,t);if("string"==typeof r)return r;let{size:s,initial:i,path:n,content:a}=r;return(0,p.jsxs)("div",{className:"assetBox-Y8vGse",onClick:()=>{z(n)},children:[(0,p.jsx)(tp.i,{text:t,keyword:"",className:"fileText-W0quVZ"}),(0,p.jsxs)(B.A,{size:"small",className:"assetsTag-eAVvyj",children:[(0,p.jsx)(Y.A,{type:"vertical"}),(0,p.jsx)(F.A.Text,{style:{color:"var(--color-data-bundled)"},children:(0,y.formatSize)(s)}),(0,p.jsx)(Y.A,{type:"vertical"}),i?(0,p.jsx)(F.A.Text,{style:{color:"var(--color-data-initial)"},children:"initial"}):null,(0,p.jsx)(ta.A,{style:{fontSize:14,padding:0},onClick:()=>M({code:a,filePath:n})})]})]})}}),[W,G,M]);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"treeGraph-LllSyP",children:[(0,p.jsxs)($.A,{align:"middle",gutter:[eD.or.BasePadding,eD.or.BasePadding],children:[s&&s.length?(0,p.jsx)(O.A,{children:(0,p.jsx)(tl.A,{mode:"multiple",value:i.map(e=>e.name),style:{minWidth:230,width:"auto",maxWidth:300},placeholder:"filter assets by entry point",onChange:e=>{n(e.map(e=>s.find(t=>t.name===e)).filter(Boolean))},allowClear:!0,onClear:()=>{n([])},children:s.map(e=>(0,p.jsx)(tl.A.Option,{value:e.name,children:(0,p.jsx)(B.A,{children:(0,p.jsx)(th.Ex,{label:e.name,value:(0,y.formatSize)(e.size),tooltip:e.name})})},e.name))})}):null,(0,p.jsx)(O.A,{children:(0,p.jsx)(tu.E,{placeholder:"search asset by keyword",onChange:e=>{d(e),f(!1)}})}),(0,p.jsx)(O.A,{children:(0,p.jsx)(eb.A,{checked:v,onChange:e=>{S(e.target.checked),f(!1)},children:"JS only"})}),(0,p.jsx)(O.A,{span:6,children:(0,p.jsx)(to.A,{min:0,style:{width:"95%"},addonBefore:(0,p.jsxs)(B.A,{children:[(0,p.jsx)(F.A.Text,{style:{fontSize:14,color:"inherit"},children:"Asset Size"}),(0,p.jsx)(R.A,{title:w("filter the output assets which size is greater than the input value"),style:{marginLeft:3},children:(0,p.jsx)(C.A,{style:{color:"var(--text-color-secondary)"}})})]}),onChange:e=>T(Number(e)),addonAfter:E("chunk")})}),(0,p.jsx)(O.A,{span:6,children:(0,p.jsx)(to.A,{min:0,style:{width:"95%"},addonBefore:(0,p.jsxs)(B.A,{children:[(0,p.jsx)(F.A.Text,{style:{fontSize:14,color:"inherit"},children:"Module Size"}),(0,p.jsx)(R.A,{title:w("filter the modules which size is greater than the input value"),style:{marginLeft:3},children:(0,p.jsx)(C.A,{style:{color:"var(--text-color-secondary)"}})})]}),onChange:e=>{D(Number(e))},addonAfter:E("module")})})]}),(0,p.jsx)($.A,{children:(0,p.jsx)(tX,{})}),G.length?(0,p.jsxs)("div",{className:"assetDetailRoot-dgQPS5",children:[(0,p.jsx)("div",{className:eh,children:(0,p.jsx)(N.A,{className:"assetDetailFileTreeRoot-RBNnA8",classNames:{body:"assetDetailFileTreeBody-kRMd_h"},title:(0,p.jsxs)(B.A,{children:[(0,p.jsx)(F.A.Text,{children:w("Output Assets List")}),(0,p.jsx)(Y.A,{type:"vertical"}),(0,p.jsx)(R.A,{title:`total assets count is ${I.length}, the filtered assets count is ${G.length}`,children:(0,p.jsxs)(F.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:[G.length," / ",I.length]})}),(0,p.jsx)(Y.A,{type:"vertical"}),(0,p.jsx)(F.A.Text,{type:"secondary",style:{fontSize:12,fontWeight:400},children:(0,y.formatSize)((0,V.x)(G,e=>e.size))})]}),size:"small",children:(0,p.jsx)("div",{className:"assetDetailFileTreeViewport-USNF6e",children:(0,p.jsx)("div",{className:"assetDetailFileTreeScrollArea-IqDzT3",children:(0,p.jsx)(eL.h,{className:"assets-ll1P_L",treeData:U,autoExpandParent:!0,defaultExpandAll:u||G.length<=20},`tree_${o}_${u}`)})})})}),(0,p.jsx)("div",{className:eh,children:b?(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAssetDetails,body:{assetPath:b},children:e=>(0,p.jsx)(tL,{asset:e.asset,chunks:e.chunks,modules:e.modules,moduleSizeLimit:a,root:t})}):(0,p.jsx)(N.A,{children:(0,p.jsx)(J.A,{description:(0,p.jsx)(F.A.Text,{strong:!0,children:"Click the file path on the left to show the modules of the asset"})})})})]}):(0,p.jsx)(J.A,{})]}),k]})}),t8=e=>{let{errors:t,cwd:r,summary:s,entryPoints:i}=e,[n,a]=(0,y.usePersistedState)("bundle-size-tabs-card-expanded",!1),l=(0,m.useId)(),o=n?"Shrink card":"Expand card",{isLight:d}=(0,y.useTheme)(),c=d?"white":void 0;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(m.Activity,{mode:n?"hidden":"visible",children:(0,p.jsx)(ec,{cwd:r,errors:t,summary:s})}),(0,p.jsx)(N.A,{className:"root-DgXuux",classNames:{body:"rootBody-xGjkG7"},id:l,children:(0,p.jsx)(T.A,{size:"middle",className:"tabsRoot-gPEaze",tabBarExtraContent:{right:(0,p.jsx)(R.A,{title:o,children:(0,p.jsx)(f.Ay,{"aria-controls":l,"aria-expanded":n,"aria-label":o,onClick:()=>a(!n),icon:n?(0,p.jsx)(I.A,{}):(0,p.jsx)(P.A,{}),size:"small"})},String(n))},items:[{key:"tree",label:(0,p.jsxs)(B.A,{children:[(0,p.jsx)(F.A.Text,{children:"Tree Graph"}),(0,p.jsx)(R.A,{overlayStyle:{maxWidth:380},overlayInnerStyle:{marginLeft:16,padding:10},color:c,title:(0,p.jsxs)(B.A,{direction:"vertical",color:c,size:"middle",children:[(0,p.jsx)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(G.A,{color:"cyan",style:{margin:0},children:"initial"}),(0,p.jsx)(F.A.Text,{style:{marginLeft:4},children:"Identify whether the chunk is an initial chunk."})]})}),(0,p.jsx)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(G.A,{color:"green",style:{margin:0},children:"concatenated"}),(0,p.jsx)(F.A.Text,{style:{marginLeft:4},children:"Identify whether the module is a concatenated module"}),(0,p.jsx)(R.A,{overlayStyle:{maxWidth:408},placement:"bottom",color:c,title:(0,p.jsx)(B.A,{direction:"vertical",color:"white",children:(0,p.jsx)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(F.A.Text,{strong:!0,children:"Concatenated Module"}),(0,p.jsx)(F.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)(F.A.Text,{type:"secondary",style:{marginLeft:4},children:(0,p.jsx)(C.A,{})})}),(0,p.jsx)(F.A.Text,{children:"."})]})}),(0,p.jsx)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(f.Ay,{size:"small",icon:(0,p.jsx)(E.A,{})}),(0,p.jsx)(F.A.Text,{style:{marginLeft:4},children:"Open the code."})]})}),(0,p.jsx)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(f.Ay,{size:"small",icon:(0,p.jsx)(D.A,{})}),(0,p.jsx)(F.A.Text,{style:{marginLeft:4},children:"View the module dependency, that is, module reasons in stats.json."})]})}),(0,p.jsx)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(G.A,{color:"purple",children:"Bundled: 15.77 KB"}),(0,p.jsx)(F.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)($.A,{children:(0,p.jsxs)(O.A,{children:[(0,p.jsx)(G.A,{color:"orange",children:"Source: 60.46 KB"}),(0,p.jsx)(F.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)(C.A,{style:{color:"var(--text-color-secondary)"}})})]}),children:(0,p.jsx)(t2,{entryPoints:i,cwd:r,summary:s})},{key:"treemap",label:"Treemap",children:(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetProjectInfo,children:e=>{let{isRspack:t,hasSourceMap:r}=eY.l5.checkSourceMapSupport(e.configs);return(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetSummaryBundles,children:e=>{let s=e.filter(e=>{var t;let r;return r=(t=e.asset.path).toLowerCase().split(".").pop()||"",e9(t)||"css"===r||"html"===r}).map(e=>{let t=(0,y.flattenTreemapData)(e.modules),r=e.modules.length>0;return{name:e.asset.path,sourceSize:r?t.sourceSize??0:e.asset.size,bundledSize:e.asset.size,gzipSize:e.asset.gzipSize??0,children:t.children}});return(0,p.jsx)(ti,{treeData:s,bundledSize:r||t})}})}})}],defaultActiveKey:"tree"})})]})},t5=()=>{let{project:e}=(0,M.L)();if(!e)return null;let{root:t,errors:r}=e;return(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetAssetsSummary,body:{withFileContent:!0},children:e=>(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetEntryPoints,children:s=>(0,p.jsx)(t8,{cwd:t,errors:r,summary:e,entryPoints:s})})})},t4="BundleSize",t3=_.Kj.RsdoctorClientRoutes.BundleSize,t6=()=>(0,p.jsx)(t5,{});var t7=r(96372),t9=r(10330),re=r(94208),rt=r(74457);let rr=(0,L.eN)({api:_.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:r}=t,[s,i]=(0,m.useState)({filename:"",loaders:[],layer:""}),[n]=(0,m.useState)(0),{theme:a}=(0,y.useTheme)();return(0,p.jsxs)(B.A,{direction:"vertical",style:{width:"100%"},children:[(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetLoaderNames,children:e=>(0,p.jsx)(t9.F,{onChange:i,loaderNames:e})}),(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetLoaderChartData,children:e=>{let t=e.filter(e=>(0,rt.ak)(e.resource,e.loader,s.filename,s.loaders,e.layer,s?.layer));return 0===n?(0,p.jsx)(re.z,{loaders:t,cwd:r},a):(0,p.jsx)(p.Fragment,{})}})]})}});var rs=r(52864),ri=r(73498);let rn="Loaders Timeline",ra=_.Kj.RsdoctorClientRoutes.WebpackLoaderOverall,rl=()=>{let{t:e}=(0,ri.B)();return(0,p.jsx)(x.Zp,{title:(0,p.jsxs)(B.A,{align:"baseline",children:[(0,p.jsx)(F.A.Title,{level:5,style:{margin:0},children:"Loader Timeline"}),(0,p.jsx)(eP.A,{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)(G.A,{icon:(0,p.jsx)(rs.A,{}),color:"warning",children:"Info"})})]}),extra:(0,p.jsx)(t7.U,{defaultKeys:["module"]}),children:(0,p.jsx)(rr,{})})};var ro=r(89654),rd=r(8568),rc=r(46917),rh=r(85599);let ru=(0,L.eN)({api:_.hp.ServerAPI.API.LoadDataByKey,body:{key:"root"},responsePropName:"cwd",Component:e=>{let{cwd:t}=e,[r,s]=(0,m.useState)({filename:"",loaders:[],layer:""});return(0,p.jsx)(rd.Q.Consumer,{children:e=>(0,p.jsx)(ro.Ay,{locale:(0,y.getLocale)(e.locale),theme:{token:{padding:16,fontSize:14}},children:(0,p.jsxs)("div",{className:rh.A.loaderAnalysis,children:[(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetLoaderNames,children:e=>(0,p.jsx)(t9.F,{onChange:e=>s(e),loaderNames:e})}),(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetLoaderFileTree,children:e=>(0,p.jsx)(rc.h,{filename:r.filename,filetree:e,loaders:r.loaders,layer:r.layer,cwd:t})})]})})})}});var rp=r(25205);let rm="Loaders Analysis",rf=_.Kj.RsdoctorClientRoutes.WebpackLoaderAnalysis,rg=()=>{let e=(0,y.useThemeToken)();return(0,p.jsx)(x.Zp,{title:(0,p.jsxs)(B.A,{align:"baseline",children:[(0,p.jsx)(F.A.Title,{level:5,style:{margin:0},children:"Loader Analysis"}),(0,p.jsx)(eP.A,{content:(0,p.jsxs)("div",{children:[(0,rp.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,rp.t)("Details")})]}),title:"Info",children:(0,p.jsx)(G.A,{icon:(0,p.jsx)(rs.A,{}),color:"warning",children:"Info"})})]}),extra:(0,p.jsx)(t7.U,{defaultKeys:["module","resolve"]}),bodyStyle:{paddingTop:e.padding,height:800},children:(0,p.jsx)(ru,{})})};var rx=r(34401),ry=r(32635),rj=r(85687);r(47762);let rA="Plugins Analysis",rv=_.Kj.RsdoctorClientRoutes.WebpackPlugins,rS=()=>{let[e,t]=(0,m.useState)([]),[r,s]=(0,m.useState)([]);return(0,p.jsx)("div",{children:(0,p.jsx)(N.A,{title:"Plugins Overall",bodyStyle:{paddingTop:eD.or.BasePadding/3},extra:(0,p.jsx)(t7.U,{defaultKeys:["plugins"]}),children:(0,p.jsxs)(B.A,{direction:"vertical",style:{width:"100%",padding:"0 30px"},children:[(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetPluginSummary,children:e=>{let{hooks:r,tapNames:i}=e;return(0,p.jsxs)(B.A,{style:{marginBottom:eD.or.BasePadding/2},children:[(0,p.jsxs)(eS.A.Group,{compact:!0,children:[(0,p.jsxs)(f.Ay,{children:[(0,p.jsx)(rx.A,{}),(0,p.jsx)(F.A.Text,{children:"Plugin Tap Names"})]}),(0,p.jsx)(tl.A,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{t(e)},children:i.map(e=>(0,p.jsx)(tl.A.Option,{label:e,value:e,children:e},e))})]}),(0,p.jsxs)(eS.A.Group,{compact:!0,children:[(0,p.jsxs)(f.Ay,{children:[(0,p.jsx)(ry.A,{}),(0,p.jsx)(F.A.Text,{children:"Hooks"})]}),(0,p.jsx)(tl.A,{mode:"multiple",allowClear:!0,className:"plugin-select",style:{width:300},popupMatchSelectWidth:!0,onChange:e=>{s(e)},children:r.map(e=>(0,p.jsx)(tl.A.Option,{label:e,value:e,children:e},e))})]})]})}}),(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetPluginData,body:{hooks:r,tapNames:e},children:e=>(0,p.jsx)(rj.u,{dataSource:e})})]})})})};var rb=r(65841),rz=r(81923),rM=r(10006),rk=r(66888);let rw=e=>{let{filepath:t,before:r,after:s,resolvers:i}=e;return(0,p.jsx)(O.A,{flex:1,children:(0,p.jsx)(T.A,{defaultActiveKey:"diff",items:[{key:"diff",label:"Resolve Diff Viewer",children:(0,p.jsx)(N.A,{styles:{body:{padding:0,overflow:"hidden"}},children:(0,p.jsx)(eN.Mh,{style:{height:785},isEmbed:!0,originalFilePath:t,modifiedFilePath:t,original:r,modified:s})})},{key:"details",label:"Resolve Details",children:(0,p.jsx)(N.A,{children:(0,p.jsx)(rM.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)(F.A.Text,{copyable:!0,children:(0,p.jsx)(F.A.Text,{code:!0,strong:!0,children:t.request})})},{title:"Duration",width:80,render:(e,t)=>(0,p.jsx)(F.A.Text,{strong:!0,children:(0,y.formatCosts)(t.costs)}),sorter:(e,t)=>e.costs-t.costs,sortDirections:["descend","ascend"]},{title:"Resolve Result",render:(e,t)=>eY.xR.isResolveSuccessData(t)?(0,p.jsx)(F.A.Text,{copyable:!0,children:t.result}):(0,p.jsx)(rb.A,{style:{color:"#f50"}})}],dataSource:i})})}]})})},rI=e=>{let{resolver:t,cwd:r}=e,[s,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,y.createFileStructures)({files:l.length?l:a,cwd:r,fileTitle:(e,t)=>(0,p.jsx)("div",{onClick:()=>i(e),children:t})}),[e.filename]);return(0,p.jsxs)($.A,{justify:"start",align:"top",wrap:!1,gutter:eD.or.BasePadding,children:[(0,p.jsx)(O.A,{span:7,children:(0,p.jsx)(N.A,{title:"Files",children:(0,p.jsx)(eL.h,{style:{width:"100%",height:735,overflow:"scroll"},treeData:d,defaultExpandedKeys:(0,y.mapFileKey)(d,o?1:4,o?void 0:e=>{let t=(0,rk.J)(e,"__RESOURCEPATH__").indexOf(n)>-1;return!!(l.length&&l.every(e=>e.indexOf(n)>-1))||!t})},`tree_${e.filename}`)})}),s&&(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetResolverFileDetails,body:{filepath:s},children:e=>(0,p.jsx)(rw,{...e})})]})},rP=(0,L.eN)({api:_.hp.ServerAPI.API.GetProjectInfo,responsePropName:"project",Component:e=>{let{project:t}=e,{root:r}=t,[s,i]=(0,m.useState)("");return(0,p.jsxs)("div",{style:{width:"100%"},children:[(0,p.jsx)(B.A,{style:{marginTop:eD.or.BasePadding,marginBottom:eD.or.BasePadding},children:(0,p.jsx)(tu.E,{icon:(0,p.jsx)(rz.A,{}),label:"Filename",placeholder:"search filename by keyword",onChange:e=>i(e)})}),(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetResolverFileTree,children:e=>(0,p.jsx)(rI,{filename:s,resolver:e,cwd:r})})]})}}),rC="ModuleResolve",rE=_.Kj.RsdoctorClientRoutes.ModuleResolve,rD=()=>(0,p.jsx)("div",{children:(0,p.jsx)(N.A,{title:"Webpack Resolver Analysis",extra:(0,p.jsx)(t7.U,{defaultKeys:["resolve","resolveLoader"]}),bodyStyle:{paddingTop:0},children:(0,p.jsx)(rP,{})})});var r_=r(56611),rN=r(72876);let rT=_.Kj.RsdoctorClientRoutes.RuleIndex,rR=()=>{let e=(0,y.useUrlQuery)()[_.jO.RsdoctorRuleClientConstant.UrlQueryForErrorCode]||"",[t,r]=(0,m.useState)(_.jO.RuleErrorMap[e]),s=Object.values(_.jO.RuleErrorMap);return(0,m.useEffect)(()=>{window.scrollTo({top:0})},[]),(0,p.jsxs)($.A,{gutter:eD.or.BasePadding/2,children:[(0,p.jsx)(O.A,{span:8,children:(0,p.jsx)(N.A,{title:(0,p.jsx)(rN.h,{text:"list of the error codes."}),bordered:!0,children:(0,p.jsx)(B.A,{direction:"vertical",children:s.map((e,s)=>(0,p.jsxs)(B.A,{style:{marginTop:0===s?0:eD.or.BasePadding/2,cursor:"pointer"},onClick:()=>r(e),align:"center",children:[(0,p.jsx)(eC.A,{status:"default"}),(0,p.jsx)(F.A.Text,{code:!0,children:(0,p.jsx)("a",{children:e.code})}),(0,p.jsx)(F.A.Text,{style:{color:t&&t.code===e.code?"#1890ff":void 0},children:e.title})]},e.code))})})}),(0,p.jsx)(O.A,{span:16,children:t?(0,p.jsx)(N.A,{title:(0,p.jsxs)($.A,{justify:"space-between",children:[(0,p.jsxs)(B.A,{children:[(0,p.jsx)(F.A.Text,{code:!0,children:t.code}),(0,p.jsx)(F.A.Text,{children:t.title})]}),(0,p.jsx)("div",{children:(0,p.jsx)(G.A,{children:t.category})})]}),bodyStyle:{paddingTop:0},bordered:!0,children:(0,p.jsx)(F.A.Paragraph,{children:"markdown"===t.type?(0,p.jsx)(r_.oz,{children:t.description}):(0,p.jsx)(F.A.Text,{children:t.description})})}):(0,p.jsx)(N.A,{title:"This page lists all the error codes emitted by the Rsdoctor.",bordered:!0,children:(0,p.jsx)(F.A.Text,{children:"click the error code in left bar to show more details."})})})]})};var rB=r(94414),rF=r(57336),r$=r(50519),rO=r(46205);r(29936);let rG=_.Kj.RsdoctorClientRoutes.TreeShaking,rL=(0,L.ug)(y.fetchManifest,[["moduleGraph","data"],["root","cwd"]],e=>{let{data:t,cwd:r}=e,s=(0,y.useModuleGraphInstanceByModuleGraph)(t);if(0===s.size())return(0,p.jsx)(r$.$,{});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)(()=>s.getModules().filter(e=>e.kind===_.hp.ModuleKind.Normal&&tx().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]),j=(0,rB.EV)(u,s,i,g,e=>{A(u.find(t=>t.path===e),[])},r),A=(e,t,r)=>{x(e),d(t.slice()),eY.AP.isNumber(r)&&l(r)};return(0,p.jsxs)(N.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:[(0,p.jsxs)($.A,{justify:"space-between",align:"middle",style:{marginBottom:eD.or.BasePadding,marginTop:eD.or.BasePadding},children:[(0,p.jsx)(tu.E,{icon:(0,p.jsx)(rz.A,{}),width:400,label:"FileName",placeholder:"search filename by keyword",style:{width:"auto"},onChange:e=>n(e)}),(0,p.jsxs)(ev.A.Group,{value:c,onChange:e=>{let{target:t}=e;return h(t.value)},children:[(0,p.jsx)(ev.A.Button,{value:"side-effect",children:"SideEffects"}),(0,p.jsx)(ev.A.Button,{value:"export",children:"Export Variables"})]})]}),(0,p.jsxs)($.A,{justify:"space-between",align:"top",wrap:!1,gutter:[eD.or.BasePadding,eD.or.BasePadding],children:[(0,p.jsx)(O.A,{span:7,children:(0,p.jsx)(N.A,{title:`Total Files: ${u.length}`,className:"tree-shaking-files-box",children:(0,p.jsx)(eL.h,{style:{height:"80%"},className:"tree-shaking-files",selectedKeys:g?[g.path]:[],defaultExpandedKeys:(0,rB.ut)(j),treeData:j,expandAction:"click"})})}),(0,p.jsx)(O.A,{span:9,children:(0,p.jsx)(L.zW,{api:_.hp.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:g.id},children:e=>(0,p.jsx)(rF.B,{module:g,moduleGraph:s,ranges:o,toLine:a,setEditorData:A,source:e})})}),(0,p.jsx)(O.A,{flex:1,children:(0,p.jsx)(rO.oK,{kind:c,setEditorData:A,module:g,moduleGraph:s})})]})]})});var rW=r(68478),rU=r(17825),rK=r(8670),rY=r(87734),rq=r(46700),rH=r(26037);let rZ=[_._8.RsdoctorManifestClientRoutes.Overall,_._8.RsdoctorManifestClientRoutes.BundleSize],rQ=(e,t)=>{let r,s;window[_.YM.WINDOW_RSDOCTOR_TAG]=e,window[_.YM.WINDOW_RSDOCTOR_TAG].enableRoutes=t;let i=(r=`//${location.host}${location.pathname}#/overall`,s=t&&t.length>0?`?${_.Kj.RsdoctorClientUrlQuery.EnableRoutes}=${encodeURIComponent(JSON.stringify(t))}`:"",`${r}${s}`);location.href=i,rK.Ay.success("JSON data loaded successfully!")},rJ=async e=>{try{let t=await (0,rH.k)([e]);if(t&&t[0])rQ(t[0].data,rZ);else throw Error("Invalid manifest data")}catch(t){let e=t instanceof Error?t.message:"Unknown error";throw rK.Ay.error(`Failed to load Rspack stats: ${e}`),t}},rV=_.Kj.RsdoctorClientRoutes.Uploader,rX=()=>{let[e,t]=(0,m.useState)(!1),r=async e=>{if(e){t(!0);try{let t=await (0,y.readJSONByFileReader)(e);if(!t||"object"!=typeof t)throw Error("Invalid JSON format");if((0,rH.A)(t))await rJ(t);else try{let e=t.clientRoutes||rZ;rQ(t.data,e)}catch(t){let e=t instanceof Error?t.message:"Unknown error";rK.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";rK.Ay.error(`Upload failed: ${e}`),console.error("Upload error:",t)}finally{t(!1)}}};return(0,p.jsx)(rY.A,{spinning:e,tip:"uploading...",children:(0,p.jsxs)(rq.A.Dragger,{multiple:!1,showUploadList:!1,accept:".json",onChange:e=>{let{file:t}=e;r(t)},style:{width:"100%"},beforeUpload:()=>!1,children:[(0,p.jsx)("p",{className:"ant-upload-drag-icon",children:(0,p.jsx)(rU.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."})]})})}},38298(e,t,r){r.d(t,{Bq:()=>f,ME:()=>p,Rz:()=>y,Zb:()=>g,h4:()=>A,jC:()=>x});var s=r(27080),i=r(66888),n=r(8670),a=r(64254),l=r(11383),o=r(5873),d=r(12329),c=r(12939),h=r(15292);let u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",r=e?.indexOf(t);return -1===r?null:0===r?t+(u(e?.slice(1),t)||""):e?.slice(0,r)};function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0,s=0,i=[],n=e;for(;s<t&&(n.filter(r).forEach(e=>{e.isLeaf||i.push(e.key)}),(n=n.reduce((e,t)=>e.concat(t.children||[]),[])).length);)s++;return i}let m="__BASENAME__";function f(e){let{files:t,inlinedResourcePathKey:r="__RESOURCEPATH__",fileTitle:s=(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[r],n].filter(Boolean).join("/");e={title:n,icon:"bundle"===a?e=>j(e,!1):null,key:t,children:[],[r]: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,r)===t)||d.children.push({title:()=>s(t,l),icon:"bundle"===a?e=>j(e):null,key:t,isLeaf:!0,[r]:t,[m]:l}),e},{key:"0",children:[]}).children;return d.forEach(e=>{e.children&&e.children.forEach(t=>(function e(t,r){let s=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(r.children&&1===r.children.length){let a=[r[m],t[m]].join(s);r[i]=t[i],r[m]=a,r.key=[r.key,t.key].join("-"),r.children=t.children,r.title=n(r,a),t.children&&t.children.forEach(t=>{e(t,r,s,i,n)})}else t.title=n(t,t[m]),t.children&&t.children.forEach(r=>{e(r,t,s,i,n)})})(t,e,"/",r,n))}),d}function g(e,t){return e.startsWith(t)?e.replace(t,"."):e}function x(e){return new Promise((t,r)=>{let s=new FileReader;s.onloadend=()=>{let{result:e}=s;try{let r=JSON.parse(e.toString());t(r)}catch(e){n.Ay.error("json parse error"),r(e)}},s.onerror=()=>{let e="upload json file error, please try again.";n.Ay.error(e),r(Error(e))},s.readAsText(e.originFileObj||e)})}function y(e,t){let r=g(e,t),s="/node_modules/",i=r.lastIndexOf(s);return i>-1?{alias:r.slice(i+s.length),inNodeModules:!0}:{alias:r,inNodeModules:!1}}function j(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{data:r}=e,i=e.expanded;return r?.children?(0,s.jsxs)(a.A,{children:[t?(0,s.jsx)(l.A,{className:`file-tree-switcher-arrow ${i?"file-tree-switcher-arrow-expand":""}`}):(0,s.jsx)(s.Fragment,{}),i?(0,s.jsx)(o.A,{}):(0,s.jsx)(d.A,{})]}):e.eventKey&&"string"==typeof e.eventKey?(0,h.C)(e.eventKey):(0,s.jsx)(c.A,{})}function A(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",r=function e(t){if(!t.children||0===t.children.length)return t;let r=t;for(;r.children&&1===r.children.length&&!r.children[0].sourceSize;)r={name:r.name+"/"+r.children[0].name,children:r.children[0].children};return r.children&&(r.children=r.children.map(e)),r}(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dist",r={name:t,children:[],_map:new Map};for(let t of e){let e=t.path.split(/[\\/]/).filter(Boolean),s=r;for(let r=0;r<e.length;r++){let i=e[r];if(r===e.length-1)s.children||(s.children=[]),s.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{s._map||(s._map=new Map);let e=s._map.get(i);e||(e={name:i,children:[],_map:new Map},s.children.push(e),s._map.set(i,e)),s=e}}}return!function e(t){delete t._map,t.children&&t.children.forEach(e)}(r),r}(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 r=0,s=0,i=0;for(let n of t.children){let{sourceSize:t,bundledSize:a,gzipSize:l}=e(n);r+=t,s+=a,i+=l}return t.sourceSize=r,t.bundledSize=s,t.gzipSize=i,{sourceSize:r,bundledSize:s,gzipSize:i}}(r),r}},86525(e,t,r){r.d(t,{beautifyModulePath:()=>i.Rz,beautifyPath:()=>i.Zb,changeOrigin:()=>L.$G,createFileStructures:()=>i.Bq,fetchManifest:()=>F.Cj,filterLoader:()=>E.ak,flattenTreemapData:()=>i.h4,formatCosts:()=>G.a4,formatPercent:()=>O.l,formatSize:()=>O.X,getDemoUrl:()=>L.JI,getEnableRoutesFromUrlQuery:()=>L.TR,getFirstVisitFromStorage:()=>g.R7,getLanguage:()=>R,getLocale:()=>T,getSafeReportUrl:()=>L.Xx,getSharingUrl:()=>L.mZ,getShortPath:()=>L.Ml,hasBundle:()=>$.r,hasCompile:()=>$.c,hasViewModeFromStorage:()=>g.it,isDef:()=>L.C8,isJsDataUrl:()=>L.XC,mapFileKey:()=>i.ME,readJSONByFileReader:()=>i.jC,setFirstVisitToStorage:()=>g.Yh,setThemeToStorage:()=>g.Kv,setViewModeToStorage:()=>g.ZI,useCompileAlertsByErrors:()=>z,useDataLoader:()=>s.V,useDetectIfCloudIdeEnv:()=>w,useDuplicatePackagesByErrors:()=>M,useElementSize:()=>I,useI18n:()=>j,useLocale:()=>B.Ym,useModuleGraph:()=>S,useModuleGraphInstanceByModuleGraph:()=>B.mB,usePersistedState:()=>P,useRuleIndexNavigate:()=>A,useTheme:()=>B.DP,useThemeToken:()=>C,useUniqModules:()=>b,useUrlQuery:()=>v,useViewMode:()=>B.an,useWebpackConfigurationByConfigs:()=>k});var s=r(93159),i=r(38298),n=r(55807),a=r(80336),l=r(5545),o=r(78762),d=r(5915),c=r(27348),h=r(73498),u=r(66349),p=r(31337),m=r.n(p),f=r(44443);r(24916);var g=r(86931);let x=a.Kj.RsdoctorClientRoutes.RuleIndex,y=new Set(["http:","https:"]),j=()=>{let{i18n:e,...t}=(0,h.B)();return{...t,i18n:{...e,changeLanguage:(t,r)=>e.changeLanguage(t,(e,s)=>{e||(0,g.XX)(t),r&&r(e,s)})}}};function A(e,t){let r=(0,u.Zp)(),s=function(e){if(e)try{let t=new URL(e);return y.has(t.protocol)?t.href:void 0}catch{return}}(t);return()=>{s?window.open(s,"_blank","noopener,noreferrer"):r(`${x}?${a.jO.RsdoctorRuleClientConstant.UrlQueryForErrorCode}=${e}`)}}function v(){let e=(0,u.zy)().search||location.search;return(0,c.useMemo)(()=>m()(e,!0).query,[e])}function S(e){let t=e;"string"==typeof t&&(e=JSON.parse(n.oG.decompressText(t)));var r=e,s={dependencies:[],modules:[],moduleGraphModules:[],exports:[],sideEffects:[],variables:[]};return r&&"object"==typeof r?Array.isArray(r)?s:(0,l.N)(r,s):s}function b(e){return(0,o.h)(e,e=>e.path)}function z(e){return Array.isArray(e)?e.filter(e=>e.category===a.jO.RuleMessageCategory.Compile&&e.code!==a.jO.RuleMessageCodeEnumerated.Overlay):[]}function M(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 k(){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 w(){return!!("https:"===window.location.protocol&&window.location.href.indexOf("ide-proxy")>0)}function I(){let e=(0,c.useRef)(null),[t,r]=(0,c.useState)(0),[s,i]=(0,c.useState)(0);return(0,c.useLayoutEffect)(()=>{let t=e.current;if(!t)return;let s=e=>r(Math.ceil(e)),n=e=>i(Math.ceil(e)),a=t.getBoundingClientRect();s(a.width),n(a.height);let l=(0,d.n)(e=>{let t=e[0];if(!t)return;let r=t.borderBoxSize?.[0];r?(s(r.inlineSize),n(r.blockSize)):(s(t.contentRect.width),n(t.contentRect.height))},100),o=new ResizeObserver(l);return o.observe(t),()=>{o.disconnect(),l.cancel()}},[]),[e,{width:t,height:s}]}function P(e,t){let r="RSDOC:"+e,[s,i]=(0,c.useState)(()=>{try{let e=window.localStorage.getItem(r);if(null!==e)return JSON.parse(e);return"function"==typeof t?t():t}catch(e){return console.warn(`Error reading localStorage key "${r}":`,e),"function"==typeof t?t():t}});return[s,(0,c.useCallback)(e=>{try{i(t=>{let s=e instanceof Function?e(t):e;return window.localStorage.setItem(r,JSON.stringify(s)),s})}catch(e){console.warn(`Error setting localStorage key "${r}":`,e)}},[r])]}let C=()=>{let{token:e}=f.A.useToken();return e};var E=r(74457),D=r(99951),_=r(7999),N=r(30597);function T(e){return"cn"===e||"zh-CN"===e?D.A:_.A}function R(e){return"cn"===e||"zh"===e?N.TM.Cn:N.TM.En}var B=r(91799),F=r(30523),$=r(73646),O=r(42143);r(58239);var G=r(41975),L=r(70463);r(14300),r(26037)},26037(e,t,r){var s=r(80336),i=r(98511),n=r(50053);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),r=i.zG.getModuleGraphByStats(e,".",t);await i.L2.getAssetsModulesData(r,t,e.outputPath||"",{},void 0);let n=i.ps.fromModuleGraph(r,".");return{hash:e.hash||"",moduleGraph:await r.toData(),chunkGraph:t.toData(s.hp.ToDataType.Normal),packageGraph:n.toData()}}))).map(e=>({client:{enableRoutes:[]},data:{pid:0,root:"",errors:[],configs:[],plugin:{},summary:{costs:[]},envinfo:{},resolver:[],loader:[],moduleCodeMap:{},...e}}))}r.d(t,{A:()=>a,k:()=>l})},70463(e,t,r){var s=r(31337),i=r.n(s),n=r(80336);function a(e){e.hash.endsWith(n.Kj.RsdoctorClientRoutes.Uploader)&&e.set("hash",n.Kj.RsdoctorClientRoutes.Overall)}function l(e){return e.startsWith("data:text/javascript;")}function o(){let{query:e}=i()(location.href,!0),t=e[n.Kj.RsdoctorClientUrlQuery.ManifestFile];if(t)return decodeURIComponent(t)}function d(){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,r=e.indexOf("?");-1!==r&&(t=new URLSearchParams(e.substring(r+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 c(e){let t=function(e){try{let t=new URL(e);return["http:","https:"].includes(t.protocol)?t.origin:void 0}catch{return}}(e);if(!t)return;let r=i()(location.href,!0),s=i()(t,!0);return a(r),r.set("origin",t),r.set("protocol",s.protocol),r.set("host",s.host),r.set("port",s.port),r.toString()}function h(e,t){try{let r=new URL(e,t),s=new URL(t);if("file:"===s.protocol){let t=[...e].some(e=>{let t=e.charCodeAt(0);return t<32||127===t}),i=e.trimStart()===e&&!e.startsWith("/")&&!e.includes("\\")&&!/^[a-z][a-z\d+.-]*:/i.test(e)&&!t;return"file:"===r.protocol&&r.host===s.host&&i?r.href:void 0}if(!["http:","https:"].includes(r.protocol)||r.origin!==s.origin)return;return r.href}catch{return}}function u(e,t){let r,s=i()(location.href,!0);r=i()(n.YM.RsdoctorClientUrl,!0),s.set("origin",r.origin),s.set("protocol",r.protocol),s.set("host",r.host),s.set("pathname",r.pathname),a(s);let l={...s.query,[n.Kj.RsdoctorClientUrlQuery.ManifestFile]:e};return t&&t.length>0&&(l[n.Kj.RsdoctorClientUrlQuery.EnableRoutes]=JSON.stringify(t)),s.set("query",l),s.toString()}function p(){return null}function m(e){return null!=e}r.d(t,{$G:()=>c,C8:()=>m,JI:()=>p,TR:()=>d,XC:()=>l,Xx:()=>h,kJ:()=>o,mZ:()=>u},{Ml: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}})},98511(e,t,r){var s=r(80336),i=r(46068),n=r(13078),a=r.n(n),l=r(55807),o=r(85311),d=r(15306),c=r(85409),h=r(8963).Buffer,u={};u.d=(e,t,r)=>{var s=(t,r)=>{for(var s in t)u.o(t,s)&&!u.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,[r]:t[s]})};s(t,"get"),s(r,"value")},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:()=>X,chunkTransform:()=>J,getAssetsModulesData:()=>H,transformAssetsModulesData:()=>Z});var m={};u.r(m),u.d(m,{getImportKind:()=>et,getModuleGraphByStats:()=>ed,getModulesFromArray:()=>eo,getPositionByStatsLocation:()=>es,isImportDependency:()=>ee,isWebpack5orRspack:()=>ei,removeNoImportStyle:()=>er});var f={};u.r(f),u.d(f,{transStats:()=>ec});var g={};u.r(g),u.d(g,{getAllModules:()=>ez,getDependencyPosition:()=>ej,getEntryModule:()=>ey,getExportDependency:()=>eA,getExportStatement:()=>eS,getLastExportInfo:()=>eb,getModuleSource:()=>ex,getResolveRequest:()=>ef,getSdkDependencyByWebpackDependency:()=>ev,getWebpackDependencyRequest:()=>em,getWebpackModuleId:()=>eu,getWebpackModulePath:()=>ep,isExternalModule:()=>eg,isNormalModule:()=>eh});class x{constructor(e,t,r,s,i){this._assets=[],this._modules=[],this._dependencies=[],this._imported=[],this.id=e,this.name=t,this.size=r,this.initial=s,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),r=0;r<e;r++)t[r]=arguments[r];t.forEach(e=>{this._assetMap.set(e.id,e),this._assetPathMap.set(e.path,e)})}addChunk(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];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),r=0;r<e;r++)t[r]=arguments[r];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}}function j(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6;return(0,i.gzipSync)(e,{level:t}).length}let A=1;class v{static init(){A=1}constructor(e,t,r,s){this.id=A++,this.path=e,this.size=t,this.chunks=r,this.content=s}toData(e){return{id:this.id,path:this.path,size:this.size,gzipSize:this.gzipSize,chunks:this.chunks?.map(e=>e.id),content:e===s.hp.ToDataType.NoSourceAndAssets||e===s.hp.ToDataType.NoCode?"":this.content}}setChunks(e){this.chunks=e}setId(e){this.id=e}setGzipSize(e,t){this.gzipSize=j(e,t)}}let S=1;class b{static init(){S=1}constructor(e){this.name=e,this._chunks=[],this._assets=[],this.id=S++}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 z=1;class M{static #e=this.kind=s.hp.DependencyKind;static init(){z=1}constructor(e,t,r,s,i){this.statements=[],this.meta={exportsType:"default-with-named"},this.id=z++,this.request=e,this.module=t,this._originDependency=r,this.kind=s,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 s.hp.DependencyKind[this.kind]}get resolveConcatenationModule(){return this.dependency.kind===s.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 k(e,t){return e.line===t.line&&e.column===t.column}let w=/!/,I=/\s\+\s\d*\smodules$/,P=/^css\s.*node_modules(?!\/)/;class C{static getDefaultStatement(e){let t={line:1,column:0},r={start:{...t},end:{...t}};return new C(e,{source:{...r},transformed:{...r}})}constructor(e,t){this.module=e,this.position=t}isSame(e){var t,r;return this.module.id===e.module.id&&(t=this.position.transformed,r=e.position.transformed,!!k(t.start,r.start)&&(l.AP.isNil(t.end)||l.AP.isNil(r.end)?l.AP.isUndefined(t.end)&&l.AP.isUndefined(r.end):k(t.end,r.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(),r=e?t.source:t.transformed,s=e?this.position.source.start.line:this.position.transformed.start.line;if("number"==typeof s)return r.split("\n")[s-1]}toData(){let e={transformed:this.position.transformed};return this.position.source&&(e.source=this.position.source),{position:e,module:this.module.id}}}let E=1;class D{static #e=this.kind=s.hp.ModuleKind;static init(){E=1}constructor(e,t,r=!1,i=s.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=E++,this.webpackId=e,this.path=t,this.isEntry=r,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,r,s){let i=new M(e,this,t,r,s);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]:s.hp.ToDataType.Normal;return e===s.hp.ToDataType.NoCode?{source:"",transformed:"",parsedSource:""}:e===s.hp.ToDataType.NoSourceAndAssets||e===s.hp.ToDataType.NoSource?{source:"",transformed:"",parsedSource:this.isPreferSource?"":this.source.parsedSource}:e===s.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;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)}getSize(){return{...this.size}}getStatement(e){return new C(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 r={start:{}},s=t.originalPositionFor({line:e.start.line??0,column:e.start.column??0,bias:1});if(l.AP.isNumber(s.line)&&(r.start={line:s.line,column:s.column??void 0}),e.end){let s=t.originalPositionFor({line:e.end.line??0,column:e.end.column??0});l.AP.isNumber(s.line)&&(r.end={line:s.line,column:s.column??void 0})}return r}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:r}=this,s=function(e){if(!e)return"";if(w.test(e)){let t=l.AP.last(e.split(w));if(t?.trim())return t}return I.test(e)?e.replace(I,""):P.test(e)?e.replace(P,""):e}(this.webpackId),i={id:this.id,renderId:this.renderId,webpackId:e&&s.indexOf(".")>0?a().relative(e,s):this.webpackId,path:this.path,isPreferSource:r,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 _=1;class N{static init(){_=1}constructor(e,t,r){this.id=_++,this._sideEffects=[],this.name=e,this.identifier=t,this._variable=r}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,r=this;for(;r.from&&t<e;)t++,r=r.from;return r}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 T=1;class R{static init(){T=1}static #e=this.NamespaceSymbol=Symbol("namespace");constructor(e,t,r,s,i){this.id=T++,this._exports=[],this.name=e,this.module=t,this.identifier=r,s&&(this.fromDependency=this.module.getDependencyByRequest(s)),i===R.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 F{static init(){B=1}constructor(e,t,r,s){this.id=B++,this.name=e,this.module=t,this.usedInfo=r,this.identifier=s}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 ${static init(){N.init(),R.init(),F.init()}constructor(e,t,r){this.exports=[],this.sideEffects=[],this.variables=[],this.module=e,this._graph=t,"boolean"==typeof this._dynamic&&(this._dynamic=r)}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 O{static init(){D.init(),M.init(),$.init()}static fromData(e){let t=new O,r=e=>new C(t.getModuleById(e.module),e.position);for(let r of e.modules??[]){let e=new D(String(r.id),r.path,r.isEntry,r.kind,r.renderId,r.layer);e.id=r.id,e.setSize(r.size),e.meta={strictHarmonyModule:r.meta?.strictHarmonyModule??!1,hasSetEsModuleStatement:r.meta?.hasSetEsModuleStatement??!1},e._isPreferSource=r.isPreferSource,e.chunks=r.chunks,t.addModule(e)}for(let s of e.modules??[]){let i=t.getModuleById(s.id);for(let n of s.dependencies){let s=(e.dependencies??[]).find(e=>e.id===n),a=s&&t.getModuleById(s.originDependency);if(!s||!a){console.warn(`The connection data ID is empty: ${n}`);continue}let l=i.addDependency(s.request,a,s.kind,s.statements.map(r));l&&(l.id=s.id,t.addDependency(l))}for(let e of s.modules??[]){let r=t.getModuleById(e);if(!r){console.warn(`Add the ordinary module ID as empty: ${e}`);continue}i.addNormalModule(r)}for(let e of s.concatenationModules??[]){let r=t.getModuleById(e);if(!r){console.warn(`The aggregation module ID is empty: ${r}`);continue}i.addConcatenationModule(r)}}for(let s of e.exports??[]){let e=new N(s.name,s.identifier?r(s.identifier):void 0);e.id=s.id,t.addExportInfo(e)}for(let r of e.exports??[])if(r.from){let e=t._exportIdMap.get(r.id),s=t._exportIdMap.get(r.from);e&&s&&e.setFromExport(s)}for(let s of e.variables??[]){let e=t.getModuleById(s.module);if(!e){console.warn(`The module ID in the variable is empty:${s.module}`);continue}let i=new F(s.name,e,s.usedInfo,r(s.identifier)),n=t._exportIdMap.get(s.exported??-1);n&&i.setExportInfo(n),i.id=s.id,t.addVariable(i)}for(let s of e.sideEffects??[]){let e=t.getModuleById(s.module);if(!e){console.warn(`The module ID in the side effects is empty:${s.module}`);continue}let i=new R(s.name,e,r(s.identifier),s.originName);for(let e of(i.isNameSpace=s.isNameSpace,i.id=s.id,s.exports??[])){let r=t._exportIdMap.get(e);r&&r.addSideEffect(i)}if(s.variable){let e=t._varIdMap.get(s.variable);e&&(i._variable=e)}t.addSideEffect(i)}for(let r of e.moduleGraphModules??[]){let e=t.getModuleById(r.module);if(!e){console.warn(`The module ID in ModuleGraphModule is empty: ${r.module}`);continue}let s=new $(e,t,r.dynamic);t.addModuleGraphModule(s),r.exports.forEach(e=>{let r=t._exportIdMap.get(e);r&&s.addExportInfo(r)}),r.sideEffects.forEach(e=>{let r=t._sideEffectIdMap.get(e);r&&s.addSideEffect(r)}),r.variables.forEach(e=>{let r=t._varIdMap.get(e);r&&s.addVariable(r)})}return O.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 O&&(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,r=[e];t.add(e);for(let e=0;e<r.length;e++)for(let{dependency:s}of r[e].getDependencies())t.has(s)||(t.add(s),r.push(s));return r}getModules(){return Array.from(this._moduleWebpackIdMap.values())}getDependencies(){return Array.from(this._dependenciesIdMap.values())}getEntryModules(){return this.getModules().filter(e=>e.isEntry&&e.kind!==s.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(r=>r.path===e&&(void 0===t||r.layer===t))}addModule(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];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),r=0;r<e;r++)t[r]=arguments[r];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(r=>r.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 r=t.getSideEffectCodes();r.length>0&&(e[r[0].moduleId]=r)}return{sideEffectCodes:e}}toCodeData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.hp.ToDataType.Normal,t={};return this.getModules().forEach(r=>{t[r.id]=r.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 G=1;class L{constructor(e,t,r){this.id=G++,this.package=e,this.dependency=t,this.refDependency=r}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 W=(e,t)=>{let r,s=e;for(;"/"!==s&&!r&&(0,n.dirname)(s)!==s;)s=(0,n.dirname)(s),t&&(r=t((0,n.join)(s,"package.json"))),t?r?.name||(r=void 0):r=l.lP.getPackageMetaFromModulePath(e);if(r)return!t||r.name&&r.version?{...r,root:s}:W((0,n.dirname)(s),t)},U=1;class K{constructor(e,t,r){this.id=U++,this._modules=[],this._dependencies=[],this._imported=[],this.name=e,this.root=t,this.version=r,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(r,s){for(let i of e.getDependenciesFromPackage(r))if(i.refDependency&&!s.some(e=>e.dependency===r)){if(!i.package)return s.concat(i);return t(i.package,s.concat(i))}return s}(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 r=t.getSize();return e.sourceSize+=r.sourceSize,e.transformedSize+=r.transformedSize,e.parsedSize+=r.parsedSize,e.gzipSize+=r.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,r){let i=new Y(t);for(let t of e.getModules().filter(e=>e.kind===s.hp.ModuleKind.Normal)){if(!t.getChunks())continue;let e=i.getPackageByModule(t,r);e&&(i.addPackage(e),e.addModule(t))}for(let t of e.getDependencies()){let e=i.getPackageByFile(t.module.path),r=i.getPackageByFile(t.dependency.path);if(e&&r&&!e.isSame(r)){let s=new L(e,r,t);i.addDependency(s),e.addDependency(s)}}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:r,meta:s}=e,{_pkgFileMap:i}=this,a=e=>this.getPackageByData(e)??new K(e.name,e.root,e.version);if(i.has(r))return i.get(r);if(s.packageData){let t=a(s.packageData);return this.setDuplicates(e,t),i.set(r,t),t}let l=this.getPackageContainFile(r);if(l)return i.set(r,l),l;let o=W(r,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(r,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,r=t.get(e.name)??[];r.every(t=>!t.isSame(e))&&(r.push(e),t.set(e.name,r))}}setDuplicates(e,t){let r=[],s=e.getChunks();s.forEach(e=>r.push(...e.getAssets().filter(e=>e.path.endsWith(".js")||e.path.endsWith(".bundle")))),s.length>1&&t.setDuplicates({module:{id:e.id,path:e.path},chunks:r.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())}}}function q(e,t){let{gzip:r=!0,gzipLevel:s=6}=t;if(r&&e)try{return j(e,s)}catch{return}}async function H(e,t,r,s){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new Map,n=arguments.length>5?arguments[5]:void 0,o={gzip:s.gzip,gzipLevel:s.gzipLevel};if(i.size>0){for(let[t,r]of((0,d.kB)("Start Parse bundle by sourcemap."),i.entries())){let s=e.getModuleByFile(t),i=q(r,o);for(let e of s)e?.setSize({parsedSize:r.length,gzipSize:i}),e?.setSource({parsedSource:r})}(0,d.PZ)("Start Parse bundle by sourcemap.")}if(s.parseBundle&&(n&&n.size>0||i.size<1)){(0,d.kB)("Start Parse bundle by AST.");let{parseBundle:i=()=>({})}=s||{},h=t.getAssets(),u=e.getModules(),p=null,m=null;if(r&&h.length){for(let e of(p={},m={},h)){let t;if(n&&n.size>0&&!n.has(e.path))continue;let s=a().join(r,e.path);try{t=i(s,u)}catch(i){let{code:e="",message:t}=i,r="ENOENT"===e?"no such file":t;"1"===c.env.DEVTOOLS_NODE_DEV&&d.vF.warn(`Error parsing bundle asset "${s}": ${r}`);continue}p[e.path]=l.AP.pick(t,["src","runtimeSrc"]),Object.assign(m,t?.modules||{})}l.AP.isEmpty(p)&&(p=null,m=null,c.env.DEVTOOLS_DEV&&d.vF.warn("\nNo bundles were parsed. Analyzer will show only original module sizes from stats file.\n")),m&&Z(m,e,o)}(0,d.PZ)("Start Parse bundle by AST.")}if(!1!==o.gzip)for(let t of e.getModules()){if(t.getSize().gzipSize>0)continue;let e=t.getSource(),r=q(e.parsedSource||e.source,o);void 0!==r&&t.setSize({gzipSize:r})}}function Z(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t&&Object.entries(e).forEach(e=>{let[s,i]=e,n=t.getModuleByWebpackId(s??""),a=q(i?.content,r);n?.setSize({parsedSize:i?.size,gzipSize:a}),n?.setSource({parsedSource:i?.content||""})})}let Q="assets by status";function J(e,t){let r=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),r.addChunk(t)}),t.assets?.every(e=>e.type===Q)?t.chunks?.forEach(t=>{let s=r.getChunkById(String(t.id));s&&t.files&&t.files.forEach(t=>{if(!r.getAssetByPath(t)){let{content:i=""}=e.get(t)||{},n=new v(t,0,[s],i);s.addAsset(n),r.addAsset(n)}})}):t.assets?.forEach(t=>{if(t.type===Q)return;let s=t.chunks?.map(e=>r.getChunkById(String(e))).filter(e=>!!e)||[],{content:i=""}=e.get(t.name)||{},n=h.byteLength(i,"utf8"),a=t.size??n,l=new v(t.name,a,s,i);s.forEach(e=>e?.addAsset(l)),r.addAsset(l)}),t.entrypoints)for(let[e,s]of Object.entries(t.entrypoints)){let t=new b(s.name||e);s.chunks?.forEach(e=>{let s=r.getChunkById(`${e}`);s&&t.addChunk(s)}),s.assets?.forEach(e=>{let s=r.getAssetByPath(e.name);s&&t.addAsset(s)}),r.addEntryPoint(t)}return r}let V=/\.(?:js|css|html|json|svg|txt|xml|xhtml|wasm|manifest)$/i;function X(e,t,r){t.getAssets().forEach(t=>{let{content:s=""}=e.get(t.path)||{};t.content=s,s.length>0&&0===t.size&&(t.size=h.byteLength(s,"utf8")),V.test(t.path)&&!1!==r&&t.setGzipSize(s,r.gzipLevel)})}function ee(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 et(e){let{type:t}=e;return t?t.includes("harmony")||"esm import"===t?s.hp.DependencyKind.ImportStatement:t.includes("cjs")?s.hp.DependencyKind.RequireCall:t.includes("import()")?s.hp.DependencyKind.DynamicImport:t.includes("amd")?s.hp.DependencyKind.AMDRequire:s.hp.DependencyKind.Unknown:s.hp.DependencyKind.Unknown}function er(e){e.getModules().filter(e=>l.ZH.isStyleExt(e.path)).filter(e=>0===e.getImported().length).forEach(t=>e.removeModule(t))}function es(e){function t(e){let[t,r]=e.split(":");return{line:Number(t),column:Number(r)}}if(e.includes("-")){let r=e.split("-"),s=t(r[0]),i=t(r[1]);return{start:s,end:Number.isNaN(i.column)?{line:s.line,column:i.line}:i}}return e.includes(":")?{start:t(e)}:e.includes("[")?{start:{index:Number(e.match(/\[(\d+)\]/)[1])}}:void 0}function ei(e){return"moduleGraph"in e&&!!e.moduleGraph}function en(e){if(!e.identifier||!(e?.nameForCondition||e.name)||e.identifier.startsWith("webpack/runtime")||e?.name?.startsWith("(webpack)"))return!0}function ea(e,t){if(t.nameForCondition)return t.nameForCondition.replace("\0","");let r=t.name.replace(/ ?\+ ?\d+ ?modules$/,"");return a().isAbsolute(r)?r:a().join(e,r)}function el(e){return".json"===a().extname(e).toLowerCase()}function eo(e,t){e.forEach(e=>{"module"===e.type||void 0===e.type?t.push(e):"children"in e&&e.children&&eo(e.children,t)})}function ed(e,t,r){var i;let{modules:n,chunks:a}=e;O.init();let l=new O,o=[],d=[];for(let e of(eo(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(en(e)||l.getModuleByWebpackId(e.identifier))continue;o.push(e);let i=!!(e.modules&&e.modules.length>0),n=new D(e.identifier??e.moduleIdentifier,ea(t,e),0===e.depth,i?s.hp.ModuleKind.Concatenation:s.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=r.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};el(n.path)&&(t.parsedSize=e.size),n.setSize(t)}for(let i of e.modules??[]){let a;if(en(i))continue;o.push(i);let d=i.identifier;if(a=l.getModuleByWebpackId(d)||(l.getModuleByWebpackId(d)??new D(d,ea(t,i),0===i.depth,s.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=r.getChunkById(String(e));t&&a.addChunk(t)}):e.chunks?.forEach(e=>{let t=r.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};el(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 r=(e.reasons??[]).filter(ee).filter(e=>!!(e.moduleIdentifier&&e.userRequest));for(let s of((e.reasons??[]).filter(e=>"from origin"===e.type).forEach(e=>e?.children?.forEach(t=>r.push({...e,...t,children:void 0}))),r)){let e=s.userRequest,r=l.getModuleByWebpackId(s.moduleIdentifier);if(!r)continue;if(!r.getDependencyByRequest(e)){let i=r.addDependency(e,t,et(s));i&&l.addDependency(i)}let i=r.getDependencyByRequest(e);if(i&&s?.loc){let e=es(s.loc);e&&i.addStatement(new C(r,{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 ec(e){let t=J(new Map,e),r=ed(e,".",t);return await H(r,t,e.outputPath||"",{}),{chunkGraph:t,moduleGraph:r}}function eh(e){return"request"in e&&"rawRequest"in e&&"resource"in e}function eu(e){return e.identifier()}function ep(e){return e.resource??e.nameForCondition?.()??eu(e)}function em(e,t){return e.request??e.userRequest??t?.rawRequest}function ef(e,t){return ep(t.getResolvedModule(e))}function eg(e){return!!e.externalType}function ex(e){return eg(e)?"":e.originalSource?.()?.source().toString()??""}function ey(e){return Array.from(e.values()).map(e=>e.getRuntimeChunk()).map(e=>e?e.entryModule:null).filter(Boolean).map(e=>eh(e)?e:e.rootModule)}function ej(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],{loc:s}=e;if(!s||!("start"in s))return;let i={start:{line:s.start.line,column:s.start.column},end:s.end?{line:s.end.line,column:s.end.column}:void 0};return new C(t,{source:r?t.getSourceRange(i):void 0,transformed:i})}function eA(e,t){let r=t.dependencies.find(t=>t.name===e.name&&("harmony export imported specifier"===t.type||"harmony export specifier"===t.type));return!r&&e._target&&e._target.size>0&&(r=e._getMaxTarget().values().next().value.connection.dependency),r}function ev(e,t,r){let s=ep(t),i=em(e);return r.getDependencies().find(e=>e.module.path===s&&e.request===i)}function eS(e,t,r){let s=eA(e,t);if(!s)return;let i=ep(t),n=em(s),a=r.getDependencies().find(e=>e.module.path===i&&e.request===n);if(a&&1===a.statements.length)return a.statements[0];let l=r.getModuleByWebpackId(eu(t));if(l)return ej(s,l)}function eb(e,t){let r=e.findTarget(t,()=>!0);if(r&&r.export)return t.getExportsInfo(r.module).getExportInfo(r.export[0])}function ez(e){let t=[];for(let r of e.modules)t.push(...r.modules??[]),t.push(r);return(0,o.R)(t.filter(e=>!eu(e).startsWith("webpack/runtime")),e=>eu(e))}r.d(t,{L2:()=>p,dh:()=>O,nV:()=>D,ps:()=>Y,zG:()=>m})},55807(e,t,r){var s,i,n=r(37757),a=r(8963),l=r(43803),o=r(86704),d=r(46068),c=r(13078),h=r.n(c),u=r(85409),p=r(80336),m=r(39980),f=r.n(m),g=r(35207),x=r(15306),y=r(60066),j=r(85409),A={};n.Q.r(A),n.Q.d(A,{getPackageRelationAlertDetails:()=>tr});var v={};n.Q.r(v),n.Q.d(v,{compressText:()=>Z,decompressText:()=>Q,mergeIntervals:()=>H,random:()=>J});var S={};n.Q.r(S),n.Q.d(S,{getBundleDiffPageQueryString:()=>e4,getBundleDiffPageUrl:()=>e3,parseFilesFromBundlePageUrlQuery:()=>e6});var b={};n.Q.r(b),n.Q.d(b,{decode:()=>O,encode:()=>$});var z={};n.Q.r(z),n.Q.d(z,{APIDataLoader:()=>ta});var M={};n.Q.r(M),n.Q.d(M,{fetchWithTimeout:()=>to,getFetch:()=>tl,postJSON:()=>td});var k={};n.Q.r(k),n.Q.d(k,{isJsExt:()=>tA,isStyleExt:()=>tj});var w={};n.Q.r(w),n.Q.d(w,{getMcpConfigPath:()=>ty,getMcpServerInfo:()=>tf,getMcpServerInfoByPort:()=>tg,readMcpConfig:()=>tm,writeMcpPort:()=>tx});var I={};n.Q.r(I),n.Q.d(I,{diffAssetsByExtensions:()=>eQ,diffSize:()=>eZ,extname:()=>e0,filterAssets:()=>eU,filterAssetsByExtensions:()=>eW,filterModulesAndDependenciesByPackageDeps:()=>eB,formatAssetName:()=>eO,getAllBundleData:()=>eX,getAssetDetails:()=>eV,getAssetsDiffResult:()=>eH,getAssetsSizeInfo:()=>eK,getAssetsSummary:()=>eJ,getBundleDiffResult:()=>e8,getChunkByChunkId:()=>ez,getChunkIdsByAsset:()=>eS,getChunksByAsset:()=>ek,getChunksByChunkIds:()=>eM,getChunksByModule:()=>eb,getChunksByModuleId:()=>ew,getDependenciesByModule:()=>eP,getDependencyByPackageData:()=>eI,getDependencyByResolvedRequest:()=>eC,getEntryPoints:()=>e5,getInitialAssetsSizeInfo:()=>eq,getModuleByDependency:()=>eR,getModuleDetails:()=>eF,getModuleIdsByChunk:()=>eD,getModuleIdsByModulesIds:()=>e_,getModulesByAsset:()=>eE,getModulesByChunk:()=>eN,getModulesByChunks:()=>eT,getModulesDiffResult:()=>e1,getPackagesDiffResult:()=>e2,isAssetMatchExtension:()=>eG,isAssetMatchExtensions:()=>eL,isInitialAsset:()=>eY});var P={};n.Q.r(P),n.Q.d(P,{LoaderInternalPropertyName:()=>ec,findLoaderTotalTiming:()=>V,getDirectoriesLoaders:()=>el,getLoaderChartData:()=>es,getLoaderCosts:()=>ee,getLoaderFileDetails:()=>en,getLoaderFileFirstInput:()=>eo,getLoaderFileInputAndOutput:()=>ed,getLoaderFileTree:()=>ei,getLoaderFolderStatistics:()=>ea,getLoaderNames:()=>et,getLoadersCosts:()=>X,getLoadersTransformData:()=>er,isVue:()=>eh});var C={};n.Q.r(C),n.Q.d(C,{fetchShardingData:()=>Y,fetchShardingFiles:()=>q,isShardingData:()=>K});var E={};n.Q.r(E),n.Q.d(E,{MODULE_PATH_PACKAGES:()=>th,PACKAGE_PATH_NAME:()=>tu,getPackageMetaFromModulePath:()=>tp});var D={};n.Q.r(D),n.Q.d(D,{getPluginData:()=>tt,getPluginHooks:()=>e7,getPluginSummary:()=>te,getPluginTapNames:()=>e9});var _={};n.Q.r(_),n.Q.d(_,{getResolverCosts:()=>ej,getResolverFileDetails:()=>ev,getResolverFileTree:()=>eA,isResolveFailData:()=>ey,isResolveSuccessData:()=>ex});var N={};n.Q.r(N),n.Q.d(N,{RspackLoaderInternalPropertyName:()=>ts,RspackSummaryCostsDataName:()=>ti,checkSourceMapSupport:()=>tn});var T={};n.Q.r(T),n.Q.d(T,{SummaryCostsDataName:()=>F});var R={};n.Q.r(R),n.Q.d(R,{formatCosts:()=>ef,getCurrentTimestamp:()=>eg,getUnit:()=>em,toFixedDigits:()=>ep});var B={};n.Q.r(B),n.Q.d(B,{isFilePath:()=>L,isRemoteUrl:()=>W,isUrl:()=>G});var F=((s={}).Bootstrap="bootstrap->beforeCompile",s.Compile="beforeCompile->afterCompile",s.Done="afterCompile->done",s.Minify="minify(processAssets)",s);function $(e){let t=`${e.charCodeAt(0)}`;for(let r=1;r<e.length;r++)t+=`!${e.charCodeAt(r)}`;return t}function O(e){let t="",r="";for(let s=0;s<e.length;s++)"!"===e[s]?(t+=String.fromCharCode(+r),r=""):r+=e[s];return r&&(t+=String.fromCharCode(+r)),t}function G(e){return/^https?:\/\//.test(e)}function L(e){return(0,c.isAbsolute)(e)}function W(e){return!!("string"==typeof e&&(G(e)||(0,c.isAbsolute)(e)))}async function*U(e,t){let r="";for(let s of e){let e=r+await t(s),i=e.length-e.length%4;i>0&&(yield a.Buffer.from(e.slice(0,i),"base64")),r=e.slice(i)}r.length>0&&(yield a.Buffer.from(r,"base64"))}function K(e){return!!(Array.isArray(e)&&e.length>0&&e.every(e=>W(e)))}async function Y(e,t){if(0===e.length)return[];let r=new o.I("utf8"),s=[];await new Promise((i,n)=>{let o,c;(0,l.pipeline)((o=U(e,t)[Symbol.asyncIterator](),c=!1,new l.Readable({read(){c||(c=!0,o.next().then(e=>{let{value:t,done:r}=e;c=!1,this.push(r?null:t)},e=>{c=!1,this.destroy(e)}))}})),(0,d.createInflate)(),new l.Writable({write(e,t,i){s.push(r.write(a.Buffer.from(e))),i()}}),e=>{e?n(e):i()})});let i=r.end();return i&&s.push(i),JSON.parse(s.join(""))}async function q(e,t,r){return(await Promise.all(Object.keys(e).map(async s=>{let i=e[s];return r?.length&&0>r.indexOf(s)?{[s]:[]}:K(i)?{[s]:await Y(i,t)}:{[s]:i}}))).reduce((e,t)=>Object.assign(e,t))}function H(e){let t,r;e.sort((e,t)=>e[0]-t[0]);let s=[];for(let i=0;i<e.length;i++)r=e[i],!t||r[0]>t[1]?(t=r,s.push(r)):t[1]=Math.max(t[1],r[1]);return s}function Z(e){try{return(0,d.deflateSync)(e).toString("base64")}catch(e){return x.vF.debug(`compressText error: ${e}`),""}}function Q(e){return(0,d.inflateSync)(a.Buffer.from(e,"base64")).toString()}function J(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function V(e){let t=1/0,r=-1/0;for(let s=0;s<e.length;s++){let i=e[s];i.startAt<=t&&(t=i.startAt),i.endAt>=r&&(r=i.endAt)}return{start:t,end:r}}function X(e,t){let r={},s={};t.forEach(t=>{e(t)?(r[t.pid]||(r[t.pid]=[]),r[t.pid].push([t.startAt,t.endAt])):(s[t.pid]||(s[t.pid]=[]),s[t.pid].push([t.startAt,t.endAt]))});let i=0,n=Object.keys(r);for(let e=0;e<n.length;e++){let t=n[e],a=H(r[t]),l=H(s[t]||[]).filter(e=>{let[t,r]=e;return a.some(e=>t>=e[0]&&r<=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 ee(e,t){let r=t.filter(t=>!t.loader.includes("builtin")&&t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),s=e.endAt-e.startAt;return r.length&&H(r.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];s-=t}),s}function et(e){let t=new Set;return e.forEach(e=>e.loaders.forEach(e=>t.add(eu(e.loader)))),[...t]}function er(e){let t=[];for(let r=0;r<e.length;r++){let s=e[r];for(let e=0;e<s.loaders.length;e++){let r=s.loaders[e];t.push(r)}}return t}function es(e){let t=[],r=er(e);return e.forEach(e=>{e.loaders.forEach(s=>{t.push({layer:e.resource.layer,loader:eu(s.loader),isPitch:s.isPitch,startAt:s.startAt,endAt:s.endAt,pid:s.pid,sync:s.sync,resource:e.resource.path,costs:ee(s,r)})})}),t}function ei(e){let t=er(e);return e.map(e=>{let{loaders:r,resource:s}=e;return{path:s.path,layer:s.layer,loaders:r.map(e=>({key:e.path,loader:eu(e.loader),path:e.path,errors:e.errors,costs:ee(e,t)}))}})}function en(e,t){let r=t.find(t=>t.resource.path===e);if(!r)throw Error(`"${e}" not match any loader data`);let s=er(t);return{...r,loaders:r.loaders.map(e=>{let{input:t,result:r,...i}=e;return{...i,loader:eu(e.loader),costs:ee(e,s)}})}}function ea(e,t){let r=t.filter(t=>{let{path:r}=t.resource;return r.startsWith(e)}),s=[],i=new Map;return r.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}),s.push({loader:e.loader,startAt:e.startAt,endAt:e.endAt,pid:e.pid})})}),Array.from(i).map(e=>{let t=X(t=>t.loader===e[0],s);return{loader:e[0],files:e[1].files,path:e[1].path,costs:t}})}function el(e,t){let r,s=t||j.cwd();return(r=new Set,e.forEach(e=>{if(e.resource.path.startsWith(s)){let t=e.resource.path.slice(s.length).replace(/^\/+/,"").split("/");if(t.length>=2){let e=s.replace(/\/+$/,"");r.add(`${e}/${t[0]}`)}}else{let t=e.resource.path.split("/"),s=t.slice(0,t.length-1).join("/");r.add(s)}}),Array.from(r)).map(t=>{let r=ea(t,e);return{directory:t,stats:r}})}function eo(e,t){for(let r=0;r<t.length;r++){let s=t[r];if(s.resource.path===e){let e=s.loaders.filter(e=>!e.isPitch);if(!e.length)return"";return e[0].input||""}}return""}function ed(e,t,r,s){for(let i=0;i<s.length;i++){let n=s[i];if(n.resource.path===e)for(let e=0;e<n.loaders.length;e++){let s=n.loaders[e];if(eu(s.loader)===t&&s.loaderIndex===r)return{input:s.input||"",output:s.result||""}}}return{input:"",output:""}}let ec="__l__",eh=e=>("module"in e.options&&e.options.module.rules||[]).some(e=>!!(e&&"object"==typeof e&&e.test instanceof RegExp&&e.test?.test(".vue"))),eu=e=>{let t=e.includes("node_modules")?e.split("node_modules"):null;return t?t[t.length-1]:e};function ep(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return 0===t?Math.floor(e):+e.toFixed(t)}function em(e,t){return"m"===t?e>1?"mins":"min":e>1?"hours":"hour"}function ef(e){if((e=Number(e))>=1e3){let t=e/1e3;if(t>=60){let e=t/60;if(e>=60){let t=ep(e/60,0),r=ep(e%60,1),s=em(t,"h");return r>0?`${t}${s} ${r}${em(r,"m")}`:`${t}${s}`}let r=em(e=ep(e,0),"m"),s=ep(t%60,0);return s>0?`${e}${r} ${s}s`:`${e}${r}`}return`${ep(t,1)}s`}if(e>=10)return`${+ep(e,0)}ms`;if(e>=1)return`${+ep(e,1)}ms`;let t=+ep(e,2);return 0===t&&(t=+ep(e,3)),`${t}ms`}function eg(e,t){let r=(0,u.hrtime)(t);return e+1e3*r[0]+(j.env.RSTEST?Math.round(r[1]/1e6):r[1]/1e6)}function ex(e){return!!e.result}function ey(e){return!!e.error}function ej(e,t){let r=t.filter(t=>t!==e&&t.pid===e.pid&&t.startAt>=e.startAt&&t.endAt<=e.endAt),s=e.endAt-e.startAt;return r.length&&H(r.map(t=>[Math.max(t.startAt,e.startAt),Math.min(t.endAt,e.endAt)])).forEach(e=>{let t=e[1]-e[0];s-=t}),s}function eA(e){return e.map(e=>({issuerPath:e.issuerPath}))}function ev(e,t,r,s){let i=r.find(t=>t.path===e),n=t.filter(t=>t.issuerPath===e),a=i&&s&&s[i.id]?s[i.id].source:"",l=n.reduce((e,t)=>t.request&&ex(t)?e.replace(RegExp(`["']${t.request}["']`),`"${t.result}"`):e,a);return{filepath:e,before:a,after:l,resolvers:n.map(e=>({...e,costs:ej(e,t)}))}}function eS(e){return e.chunks?e.chunks:[]}function eb(e,t){return e.chunks.length?eM(e.chunks,t):[]}function ez(e,t){return t.find(t=>t.id===e)}function eM(e,t,r){return e.length?e.map(e=>t.find(t=>t.id===e)).filter(Boolean).map(e=>{if(r&&r.length>0){let t={};for(let s of r)void 0!==e[s]&&(t[s]=e[s]);return t}return e}):[]}function ek(e,t,r){return eM(eS(e),t,r)}function ew(e,t,r){let s=t.find(t=>t.id===e);return s?eb(s,r):[]}function eI(e,t){return t.find(t=>t.id===e.dependencyId)}function eP(e,t){return e.dependencies.map(e=>t.find(t=>t.id===e)).filter(Boolean)}function eC(e,t){return t.find(t=>t.resolvedRequest===e)}function eE(e,t,r,s,i){return eT(eM(eS(e),t),r,s,i)}function eD(e){let{modules:t=[]}=e;return t}function e_(e,t){return e.map(e=>t.find(t=>t.id===e)).filter(Boolean)}function eN(e,t,r){return eD(e).map(e=>{let s=t.find(t=>t.id===e);if(r&&r.length>0){if(!s)return null;let e={};for(let t of r)void 0!==s[t]&&(e[t]=s[t]);return e}return s}).filter(Boolean)}function eT(e,t,r,s){let i=[];try{e.forEach(e=>{eN(e,t,r).forEach(e=>{(!s||s(e))&&!i.filter(t=>t.id===e.id).length&&i.push(e)})})}catch(e){x.vF.debug(e)}return i}function eR(e,t){return t.find(t=>t.id===e.module)}function eB(e,t,r){let s=[],i=[];for(let n=0;n<e.length;n++){let a=eI(e[n],t);if(a){s.push(a);let e=eR(a,r);e&&i.push(e)}}return{dependencies:s,modules:i}}function eF(e,t,r,s){let i=t.find(t=>t.id===e);return{module:i,dependencies:eP(i,r),...s?.length?{sideEffectCodes:s}:{}}}let e$=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 eO(e,t){let r=t?.split("."),s="",i=e;if(r?.length&&r.length>=3&&r[r.length-2]?.indexOf("[")<0&&"js|css|html".indexOf(r[r.length-1])>-1){s=r[r.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}.${s}.${e.substring(e.lastIndexOf(".")+1)}`}let n=e.match(e$);return n&&n[2]&&n[2].length>=4&&n[2].length<=32?e.replace(e$,"$1$3"):e}function eG(e,t){return e.path.slice(-t.length)===t||e0(e.path)===t}function eL(e,t){return!!t.length&&t.some(t=>eG(e,t))}function eW(e,t){return"string"==typeof t?e.filter(e=>eG(e,t)):Array.isArray(t)?e.filter(e=>eL(e,t)):[]}function eU(e,t){return t&&(e="function"==typeof t?e.filter(t):eW(e,t)),e}function eK(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{withFileContent:s=!0,filterOrExtensions:i}=r;return(e=e.filter(e=>!eL(e,p.YM.MapExtensions)),i&&(e=eU(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:eY(e,t),content:s?e.content:void 0}))}:{count:0,size:0,files:[]}}function eY(e,t){return ek(e,t).some(e=>!!e.initial)}function eq(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return eK(e,t,{...r,filterOrExtensions:e=>{var s;return(!(s=r.filterOrExtensions)||("function"==typeof s?s(e):"string"==typeof s?eG(e,s):eL(e,s)))&&eY(e,t)}})}function eH(e,t){return{all:{total:eQ(e,t)},js:{total:eQ(e,t,p.YM.JSExtensions),initial:eQ(e,t,p.YM.JSExtensions,!0)},css:{total:eQ(e,t,p.YM.CSSExtension),initial:eQ(e,t,p.YM.CSSExtension,!0)},imgs:{total:eQ(e,t,p.YM.ImgExtensions)},html:{total:eQ(e,t,p.YM.HtmlExtension)},media:{total:eQ(e,t,p.YM.MediaExtensions)},fonts:{total:eQ(e,t,p.YM.FontExtensions)},others:{total:eQ(e,t,e=>!eL(e,[...p.YM.JSExtensions,p.YM.CSSExtension,p.YM.HtmlExtension].concat(p.YM.ImgExtensions,p.YM.MediaExtensions,p.YM.FontExtensions,p.YM.MapExtensions)))}}}function eZ(e,t){let r=e===t;return{percent:r?0:0===e?100:Math.abs(t-e)/e*100,state:r?p.Kj.RsdoctorClientDiffState.Equal:e>t?p.Kj.RsdoctorClientDiffState.Down:p.Kj.RsdoctorClientDiffState.Up}}function eQ(e,t,r){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i,n,{size:a,count:l}=s?eq(e.assets,e.chunks,{filterOrExtensions:r}):eK(e.assets,e.chunks,{filterOrExtensions:r});if(e===t)i=a,n=l;else{let{size:e,count:a}=s?eq(t.assets,t.chunks,{filterOrExtensions:r}):eK(t.assets,t.chunks,{filterOrExtensions:r});i=e,n=a}let{percent:o,state:d}=eZ(a,i);return{size:{baseline:a,current:i},count:{baseline:l,current:n},percent:o,state:d}}function eJ(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={...r,filterOrExtensions:p.YM.JSExtensions},i={...r,filterOrExtensions:p.YM.CSSExtension},n={...r,filterOrExtensions:p.YM.ImgExtensions},a={...r,filterOrExtensions:p.YM.HtmlExtension},l={...r,filterOrExtensions:p.YM.MediaExtensions},o={...r,filterOrExtensions:p.YM.FontExtensions},d={...r,filterOrExtensions:e=>!eL(e,[...p.YM.JSExtensions,p.YM.CSSExtension,p.YM.HtmlExtension].concat(p.YM.ImgExtensions,p.YM.MediaExtensions,p.YM.FontExtensions,p.YM.MapExtensions))};return{all:{total:eK(e,t,r)},js:{total:eK(e,t,s),initial:eq(e,t,s)},css:{total:eK(e,t,i),initial:eq(e,t,i)},imgs:{total:eK(e,t,n)},html:{total:eK(e,t,a)},media:{total:eK(e,t,l)},fonts:{total:eK(e,t,o)},others:{total:eK(e,t,d)}}}function eV(e,t,r,s,i){let n=t.find(t=>t.path===e);return{asset:n,chunks:ek(n,r),modules:eE(n,r,s,void 0,i)}}function eX(e,t,r,s){let i=[];try{for(let n=0;n<e.length;n++){let a=e[n];i.push({asset:a,modules:eE(a,t,r,s)})}return i}catch(e){return console.error(e),[]}}function e0(e){let t=e.split("?")[0].match(/\.([0-9a-z]+)(?:[\?#]|$)/i);return t?`.${t[1]}`:""}function e1(e,t){let r=new Map;for(let t of e.modules)r.set(t.path,t);let s=new Map;for(let e of t.modules)s.set(e.path,e);let i=[],n=[],a=[];for(let[e,t]of r){let r=s.get(e);if(r){if(t.size.parsedSize!==r.size.parsedSize){let{percent:s,state:i}=eZ(t.size.parsedSize,r.size.parsedSize);a.push({path:e,size:{baseline:t.size,current:r.size},percent:s,state:i})}}else n.push({path:e,size:t.size})}for(let[e,t]of s)r.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 e2(e,t){let r=e=>`${e.name}@${e.version}`,s=new Map;for(let t of e.packages)s.set(r(t),t);let i=new Map;for(let e of t.packages)i.set(r(e),e);let n=[],a=[],l=[];for(let[e,t]of s){let r=i.get(e);if(r){if(t.size.parsedSize!==r.size.parsedSize){let{percent:e,state:s}=eZ(t.size.parsedSize,r.size.parsedSize);l.push({name:t.name,version:t.version,root:t.root,size:{baseline:t.size,current:r.size},percent:e,state:s})}}else a.push({name:t.name,version:t.version,root:t.root,size:t.size})}for(let[e,t]of i)s.has(e)||n.push({name:t.name,version:t.version,root:t.root,size:t.size});return{added:n,removed:a,changed:l}}function e8(e,t){return{assets:eH(e.chunkGraph,t.chunkGraph),modules:e1(e.moduleGraph,t.moduleGraph),packages:e2(e.packageGraph,t.packageGraph)}}function e5(e){return e}function e4(e){let t=encodeURIComponent(e.join(","));return t&&(t=`?${p.Kj.RsdoctorClientUrlQuery.BundleDiffFiles}=${t}`),t}function e3(e){let t=e4(e);return`${t}#${p.Kj.RsdoctorClientRoutes.BundleDiff}`}function e6(e){return decodeURIComponent(e).split(",")}function e7(e){return Object.keys(e)}function e9(e){let t=e7(e),r=new Set;return t.forEach(t=>{e[t].forEach(e=>{r.add(e.tapName)})}),[...r]}function te(e){return{hooks:e7(e),tapNames:e9(e)}}function tt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=e7(e).filter(e=>!t.length||-1!==t.indexOf(e));return s.length?e9(e).reduce((t,i)=>(r.length&&-1===r.indexOf(i)||s.forEach(r=>{let s=e[r].filter(e=>e.tapName===i);0!==s.length&&t.push({tapName:i,hook:r,data:s.map(e=>({startAt:e.startAt,endAt:e.endAt,costs:e.costs,type:e.type}))})}),t),[]):[]}function tr(e,t,r,s,i){return s.slice().reverse().map(s=>{let n=t.find(e=>e.id===s.dependencyId);if(!n)return null;let a=e.find(e=>e.id===n.module);return a?{group:s.group,module:a,dependency:n,relativePath:(0,c.relative)(r,a.path),moduleCode:i?.[a.id]}:null}).filter(Boolean)}let ts="__l__";var ti=((i={}).Bootstrap="bootstrap->rspack:beforeCompile",i.Compile="rspack:beforeCompile->afterCompile",i.Done="rspack:afterCompile->done",i.Minify="rspack:minify(rspack:optimizeChunkAssets)",i);function tn(e){if(!Array.isArray(e)||!e[0])return{isRspack:!1,hasSourceMap:!1};let t="rspack"===e[0].name&&e[0]?.config?.name!=="lynx",r=e[0].config?.devtool,s=e[0].config?.plugins,i=s?.filter(e=>e&&e.includes("SourceMapDevToolPlugin"));return{isRspack:t,hasSourceMap:"string"==typeof r&&r.includes("source-map")&&!r.includes("eval")||!!i?.length}}class ta{loader;constructor(e){this.loader=e,this.loadAPI=this.loadAPI.bind(this)}log(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];console.log(`[${this.constructor.name}]`,...t)}loadAPI(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let[s,i]=t;switch(s){case p.hp.ServerAPI.API.LoadDataByKey:return this.loader.loadData(i.key);case p.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,r,s,i,n,a,l]=e;return{root:t,pid:r,hash:s,summary:i,configs:n,envinfo:a,errors:l,name:n?.[0]?.config?.name}});case p.hp.ServerAPI.API.GetClientRoutes:if("u">typeof window&&window?.[p.YM.WINDOW_RSDOCTOR_TAG])return window[p.YM.WINDOW_RSDOCTOR_TAG].enableRoutes;return this.loader.loadManifest().then(e=>{let{enableRoutes:t=[]}=e.client||{};return t});case p.hp.ServerAPI.API.GetLoaderNames:return this.loader.loadData("loader").then(e=>et(e||[]));case p.hp.ServerAPI.API.GetLayers:return this.loader.loadData("moduleGraph").then(e=>{let{layers:t}=e||{};return t});case p.hp.ServerAPI.API.GetLoaderChartData:return this.loader.loadData("loader").then(e=>es(e||[]));case p.hp.ServerAPI.API.GetLoaderFileTree:return this.loader.loadData("loader").then(e=>ei(e||[]));case p.hp.ServerAPI.API.GetLoaderFileDetails:return this.loader.loadData("loader").then(e=>en(i.path,e||[]));case p.hp.ServerAPI.API.GetLoaderFolderStatistics:return this.loader.loadData("loader").then(e=>ea(i.folder,e||[]));case p.hp.ServerAPI.API.GetLoaderFileFirstInput:return this.loader.loadData("loader").then(e=>eo(i.file,e||[]));case p.hp.ServerAPI.API.GetLoaderFileInputAndOutput:return this.loader.loadData("loader").then(e=>ed(i.file,i.loader,i.loaderIndex,e||[]));case p.hp.ServerAPI.API.GetResolverFileTree:return this.loader.loadData("resolver").then(e=>eA(e||[]));case p.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],r=e[1],s=e[2];return ev(i.filepath,t||[],r||[],s||{})});case p.hp.ServerAPI.API.GetPluginSummary:return this.loader.loadData("plugin").then(e=>te(e||{}));case p.hp.ServerAPI.API.GetPluginData:return this.loader.loadData("plugin").then(e=>{let{hooks:t,tapNames:r}=i;return tt(e||{},t,r)});case p.hp.ServerAPI.API.GetAssetsSummary:return this.loader.loadData("chunkGraph").then(e=>{let{withFileContent:t=!0}=i,{assets:r=[],chunks:s=[]}=e||{};return eJ(r,s,{withFileContent:t})});case p.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:r,hasSourceMap:s}=tn(e[2]||[]),{assets:n=[],chunks:a=[]}=e[0]||{},{modules:l=[]}=e[1]||{};return eV(t,n,a,l,r||s?e=>0!==e.size.parsedSize:()=>!0)});case p.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:r=[]}=e[0]||{},{modules:s=[]}=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"))),eX(n,r,s,["id","path","size","kind"])});case p.hp.ServerAPI.API.GetChunksByModuleId:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let{moduleId:t}=i,{chunks:r=[]}=e[0]||{},{modules:s=[]}=e[1]||{};return ew(t,s,r)});case p.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:r=[],dependencies:s=[]}=e[1]||{},n=e[2],a=n?.sideEffectCodes[t]||[];return eF(t,r,s,a)});case p.hp.ServerAPI.API.GetModulesByModuleIds:return this.loader.loadData("moduleGraph").then(e=>{let{moduleIds:t}=i,{modules:r=[]}=e||{};return e_(t,r)});case p.hp.ServerAPI.API.GetEntryPoints:return Promise.all([this.loader.loadData("chunkGraph")]).then(e=>{let[t]=e,{entrypoints:r=[]}=t||{};return r});case p.hp.ServerAPI.API.GetModuleCodeByModuleId:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleId:t}=i;return e?e[t]:{source:"",transformed:"",parsedSource:""}});case p.hp.ServerAPI.API.GetModuleCodeByModuleIds:return this.loader.loadData("moduleCodeMap").then(e=>{let{moduleIds:t}=i,r={};return e?(t.forEach(t=>{r[t]=e[t]}),r):[]});case p.hp.ServerAPI.API.GetAllModuleGraph:return this.loader.loadData("moduleGraph").then(e=>e?.modules);case p.hp.ServerAPI.API.GetSearchModules:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("chunkGraph")]).then(e=>{let[t,r]=e,{moduleName:s}=i;if(!s)return[];let n=r.chunks.reduce((e,t)=>(t.assets.forEach(r=>{e[t.id]||(e[t.id]=[]),e[t.id].push(r)}),e),{}),a=new Map;return t?.modules.filter(e=>{e.webpackId.includes(s)&&e.chunks.forEach(e=>{a.has(e)||(n[e]||[]).forEach(t=>{t.endsWith(".js")&&a.set(e,t)})})}),Object.fromEntries(a)});case p.hp.ServerAPI.API.GetSearchModuleInChunk:return Promise.all([this.loader.loadData("moduleGraph"),this.loader.loadData("root")]).then(e=>{let[t,r]=e,{moduleName:s,chunk:n}=i;return s?t?.modules.filter(e=>e.webpackId.includes(s)&&e.chunks.includes(n)).map(e=>({id:e.id,path:e.path,relativePath:(0,c.relative)(r,e.path)})):[]});case p.hp.ServerAPI.API.GetAllChunkGraph:return this.loader.loadData("chunkGraph").then(e=>e?.chunks);case p.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:r}=i,[s,n=[],a="",l]=e,{modules:o=[],dependencies:d=[]}=s||{},{packages:c=[]}=n.find(e=>e.id===t)||{},{dependencies:h=[]}=c.find(e=>e.target.name===r.name&&e.target.root===r.root&&e.target.version===r.version)||{};return tr(o,d,a,h,l||{})});case p.hp.ServerAPI.API.GetOverlayAlerts:return this.loader.loadData("errors").then(e=>(e||[]).filter(e=>e.code===p.jO.RuleMessageCodeEnumerated.Overlay));case p.hp.ServerAPI.API.GetBundleAlerts:return this.loader.loadData("errors").then(e=>(e||[]).filter(e=>e.category===p.jO.RuleMessageCategory.Bundle));case p.hp.ServerAPI.API.BundleDiffManifest:return this.loader.loadManifest();case p.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,r="",s="",i={},n={},a={},l={},o={},d=[]]=e,c="";return"string"==typeof d[0]?.config?.output?.chunkFilename&&(c=d[0]?.config.output.chunkFilename),{root:r,hash:s,errors:i,chunkGraph:n,moduleGraph:a,packageGraph:o,outputFilename:c,moduleCodeMap:l}});case p.hp.ServerAPI.API.GetChunkGraph:return this.loader.loadData("chunkGraph").then(e=>{let{chunks:t=[]}=e||{};return t});case p.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 p.hp.ServerAPI.API.GetModuleByName:return this.loader.loadData("moduleGraph").then(e=>{let{moduleName:t}=i,{modules:r=[]}=e||{};return r.filter(e=>e.path.includes(t)).map(e=>({id:e.id,path:e.path}))||[]});case p.hp.ServerAPI.API.GetModuleIssuerPath:return this.loader.loadData("moduleGraph").then(e=>{let{moduleId:t}=i,r=e?.modules||[],s=r.find(e=>String(e.id)===t)?.issuerPath||[];return Array.isArray(s)&&s.length>0&&"number"==typeof s[0]?s.map(e=>r.find(t=>t.id===e)?.path).filter(Boolean):s});case p.hp.ServerAPI.API.GetPackageInfo:return this.loader.loadData("packageGraph").then(e=>e?.packages);case p.hp.ServerAPI.API.GetPackageDependency:return this.loader.loadData("packageGraph").then(e=>e?.dependencies||[]);case p.hp.ServerAPI.API.GetChunkGraphAI:return this.loader.loadData("chunkGraph").then(e=>{let{assets:t=[]}=e||{};return t.map(e=>{let{content:t,...r}=e;return r})});case p.hp.ServerAPI.API.GetChunkByIdAI:return Promise.all([this.loader.loadData("chunkGraph"),this.loader.loadData("moduleGraph")]).then(e=>{let[t,r]=e,{chunks:s=[]}=t||{},{modules:n=[]}=r||{},{chunkId:a}=i,l=s.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 p.hp.ServerAPI.API.GetDirectoriesLoaders:return Promise.all([this.loader.loadData("root"),this.loader.loadData("loader")]).then(e=>{let[t,r]=e;return el(r||[],t||"")});default:throw Error(`API not implement: "${s}"`)}}}function tl(){let e=globalThis.fetch;if("function"!=typeof e)throw Error("fetch is not available in this environment");return e.bind(globalThis)}async function to(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{timeout:r=3e4,signal:s,...i}=t,n=new AbortController,a=setTimeout(()=>n.abort(),r);s&&(s.aborted?n.abort():s.addEventListener("abort",()=>n.abort(),{once:!0}));let l=tl();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 td(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3e4;return to(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),timeout:r})}let tc=/[a-zA-Z0-9]+(?:[-|_|.]+[a-zA-Z0-9]+)*/,th=RegExp(`(?:${/(?:node_modules|~)(?:\/\.pnpm)?/.source}/)(?:(?:@${tc.source}[/|+])?(?:${tc.source}\\+)*(?:${tc.source})(?:${/@[\w|\-|_|.]+/.source})?)(?:_(?:@${tc.source}[/|+])?(?:${tc.source})(?:@${tc.source})?)*/`,"g"),tu=/(?:(?: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,tp=e=>{var t;let r,s=e.match(th);if(!s)return{name:"",version:""};let i=(t=s.flatMap(e=>{let t=e.matchAll(tu);return t?(0,y.oE)([...t].flat()).slice(1).filter(Boolean).map(e=>e.replace(/\+/g,"/")):[]}),r=[],t.forEach((e,s)=>{t.slice(s+1).includes(e)||r.push(e)}),r);if((0,y.Im)(i))return{name:"",version:""};let n=(0,y.HV)(i),a=RegExp(`(.*)(${(0,y.HV)(s)}).*`),l=e.replace(a,"$1$2").replace(/\/$/,"");return{name:n,version:l&&n&&l.match(RegExp(`${n}@([\\d.]+)`))?.flat().slice(1)?.[0]||""}};function tm(){let e=ty();if(f().existsSync(e))try{return JSON.parse(f().readFileSync(e,"utf8"))}catch(e){x.vF.debug("Failed to parse mcp.json",e);return}}function tf(e){let t=tm();if(!t)return{};if(e){let r=t.portList?.[e],s=t.socketUrlList?.[e];if(r||s)return{port:r,socketUrl:s}}return{port:t.port,socketUrl:t.socketUrl}}function tg(e){let t=tm();if(!t)return{};let r=Object.entries(t.portList||{}).find(t=>{let[,r]=t;return r===e})?.[0];return r?{port:e,socketUrl:t.socketUrlList?.[r]}:t.port===e?{port:e,socketUrl:t.socketUrl}:{port:e}}function tx(e,t,r){let s=g.tA(),i=h().join(s,".cache/rsdoctor"),n=h().join(i,"mcp.json");f().existsSync(i)||f().mkdirSync(i,{recursive:!0});let a=t||"builder",l=function(e,t){if(e&&t)return`ws://localhost:${e}?token=${encodeURIComponent(t)}`}(e,r),o=tm()??{portList:{},port:0};o.portList||(o.portList={}),o.portList[a]=e,o.socketUrlList||(o.socketUrlList={}),l?(o.socketUrlList[a]=l,o.socketUrl=l):(delete o.socketUrlList[a],delete o.socketUrl),o.port=e,l&&(o.socketUrlList||(o.socketUrlList={}),o.socketUrlList[t||"builder"]=l,o.socketUrl=l),f().writeFileSync(n,JSON.stringify(o,null,2),"utf8")}function ty(){let e=g.tA(),t=h().join(e,".cache/rsdoctor");return h().join(t,"mcp.json")}function tj(e){return/\.(c|le|sa|sc)ss(\?.*)?$/.test(e)}function tA(e){return/\.(js|ts|jsx|tsx)(\?.*)?$/.test(e)}r.d(t,{AP:()=>y.AP,BD:()=>T,B_:()=>z,Fp:()=>M,TS:()=>I,Wh:()=>A,ZH:()=>k,_8:()=>C,aH:()=>P,gX:()=>R,l5:()=>N,lP:()=>E,oG:()=>v,s0:()=>B,xR:()=>_})}},l={};function o(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return a[e].call(r.exports,r,r.exports,o),r.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(r,s){if(1&s&&(r=this(r)),8&s||"object"==typeof r&&r&&(4&s&&r.__esModule||16&s&&"function"==typeof r.then))return r;var i=Object.create(null);o.r(i);var n={};e=e||[null,t({}),t([]),t(t)];for(var a=2&s&&r;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>{n[e]=()=>r[e]});return n.default=()=>r,o.d(i,n),i},o.d=(e,t,r)=>{var s=(t,r)=>{for(var s in t)o.o(t,s)&&!o.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,[r]:t[s]})};s(t,"get"),s(r,"value")},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})},r=[],o.O=(e,t,s,i)=>{if(t){i=i||0;for(var n=r.length;n>0&&r[n-1][2]>i;n--)r[n]=r[n-1];r[n]=[t,s,i];return}for(var a=1/0,n=0;n<r.length;n++){for(var[t,s,i]=r[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){r.splice(n--,1);var c=s();void 0!==c&&(e=c)}}return e},o.j="410",s={410:0},o.O.j=e=>0===s[e],i=(e,t)=>{var r,i,[n,a,l]=t,d=0;if(n.some(e=>0!==s[e])){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(l)var c=l(o)}for(e&&e(t);d<n.length;d++)i=n[d],o.o(s,i)&&s[i]&&s[i][0](),s[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","19","767","576","485","864","140","648"],()=>o(70617));d=o.O(d)})();