@rsdoctor/client 1.3.0-beta.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><title>Rsdoctor</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.66832997.js"></script><script defer src="./resource/js/rc-0.0816fdf8.js"></script><script defer src="./resource/js/rc-1.9a056fca.js"></script><script defer src="./resource/js/ant-design-0.6eaab0ba.js"></script><script defer src="./resource/js/ant-design-1.fbde6d43.js"></script><script defer src="./resource/js/ant-design-2.0c6e16e5.js"></script><script defer src="./resource/js/ant-design-3.005bd3a7.js"></script><script defer src="./resource/js/ant-design-4.fbcb77ae.js"></script><script defer src="./resource/js/ant-design-icons.a1b962c5.js"></script><script defer src="./resource/js/vender.baa75fcf.js"></script><script defer src="./resource/js/301.29d82550.js"></script><script defer src="./resource/js/index.
|
|
1
|
+
<!doctype html><html><head><title>Rsdoctor</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="./resource/js/react.66832997.js"></script><script defer src="./resource/js/rc-0.0816fdf8.js"></script><script defer src="./resource/js/rc-1.9a056fca.js"></script><script defer src="./resource/js/ant-design-0.6eaab0ba.js"></script><script defer src="./resource/js/ant-design-1.fbde6d43.js"></script><script defer src="./resource/js/ant-design-2.0c6e16e5.js"></script><script defer src="./resource/js/ant-design-3.005bd3a7.js"></script><script defer src="./resource/js/ant-design-4.fbcb77ae.js"></script><script defer src="./resource/js/ant-design-icons.a1b962c5.js"></script><script defer src="./resource/js/vender.baa75fcf.js"></script><script defer src="./resource/js/301.29d82550.js"></script><script defer src="./resource/js/index.803dd75a.js"></script><link href="./resource/css/index.fc1d413f.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
${r=a?t.position.source:t.position.transformed,i=function(e,t){let{path:s,isPreferSource:n}=t,r=n?e.position.source.start:e.position.transformed.start,i=`:${r.line??1}:${r.column??0}`;return s.length<=30?`${s}${i}`:`...${s.substring(s.length-30)}${i}`}(t,s),`<a data-href="data-module=${l}&data-range=${encodeURIComponent(JSON.stringify(r))}">${i}</a>`}
|
|
92
92
|
${o?`<pre>${(0,o3.A)(o)}</pre>`:""}
|
|
93
93
|
</ol>`}return n+"\n</li></div>"}(e)}}}}).filter(e=>!!e)}(t,s)))??[]},200)},[t,l]),(0,w.useEffect)(()=>{function e(){var e;let t=null==(e=a.current)?void 0:e.getModel();t&&(d.current=t.deltaDecorations(d.current,n.map(e=>({range:lt(e,o9),options:{stickiness:1,inlineClassName:"tree-shaking-statement-side-effect",isWholeLine:!1,showIfCollapsed:!0}}))),a.current&&"number"==typeof r&&u.current!==r&&(u.current=r,a.current.revealLine(r,0)))}h?setTimeout(e,300):e(),h.current=!1},[n,r]),(0,w.useEffect)(()=>{let e=e=>{let t=function(e){if("a"!==e.tagName.toLocaleLowerCase())return;let t=e.getAttribute("data-href")??"",s={module:-1,range:{start:{line:1,column:0},end:{line:1,column:0}}};for(let e of t.split("&")){let[t,n]=e.split("=");if("data-module"===t){s.module=Number.parseInt(n,10);continue}"data-range"===t&&(s.range=JSON.parse(decodeURIComponent(n)))}return s}(e.target);if(t){let e=s.getModuleById(t.module);e&&i(e,[t.range],t.range.start.line)}};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}},[]),t)?(0,o.jsx)(r_.A,{title:(0,o.jsx)(rR.A,{title:t.path,children:(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:ea().basename(t.path)}),(0,o.jsx)(ii.A,{})]})}),className:"tree-shaking-editor",children:(0,o.jsx)(i6.Ay,{theme:"vs-dark",language:i7(t.path),value:p,loading:(0,o.jsx)(de.A,{style:{fontSize:30}}),options:dt,onMount:e=>{a.current=e}})}):(0,o.jsx)("div",{children:"请选择要查看的模块"})}function dn(){return(0,o.jsx)(r_.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:(0,o.jsx)(rz.A,{style:{marginTop:30}})})}var dr=s(57474),di=s.n(dr);function dl(e,t){if(!e)return(0,o.jsx)("div",{children:"Can not find declaration."});let{module:s}=e,n=s.isPreferSource?e.position.source:e.position.transformed;return(0,o.jsx)(rR.A,{title:`${s.path}, line ${n.start.line}`,children:(0,o.jsx)(rH.Ay,{type:"link",onClick:()=>t(s,[n],n.start.line),children:"Move To"})})}function da(e){let[t,s]=(0,w.useState)(""),[n,r]=(0,w.useState)(""),i=(0,w.useRef)(null),l=(e,t,n)=>{t(),s(e[0]),r(n)};return{filterDropdown:t=>{let{setSelectedKeys:n,selectedKeys:r,confirm:a,clearFilters:d,close:c}=t;return(0,o.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,o.jsx)(ll.A,{ref:i,placeholder:`Search ${e}`,value:r[0],onChange:e=>n(e.target.value?[e.target.value]:[]),onPressEnter:()=>l(r,a,e),style:{marginBottom:8,display:"block"}}),(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rH.Ay,{type:"primary",onClick:()=>l(r,a,e),icon:(0,o.jsx)(a9.A,{}),size:"small",style:{width:90},children:"Search"}),(0,o.jsx)(rH.Ay,{onClick:()=>d&&void(d(),s("")),size:"small",style:{width:90},children:"Reset"}),(0,o.jsx)(rH.Ay,{type:"link",size:"small",onClick:c,children:"close"})]})]})},filterIcon:e=>(0,o.jsx)(a9.A,{style:{color:e?"#1890ff":void 0}}),onFilter:(t,s)=>s[e].toString().toLowerCase().includes(t.toLowerCase()),render:s=>n===e?(0,o.jsx)(di(),{highlightStyle:{backgroundColor:"#ffc069",padding:0},searchWords:[t],autoEscape:!0,textToHighlight:s?s.toString():""}):s}}let dd=e=>{let{module:t,moduleGraph:s,setEditorData:n}=e,r=(0,w.useMemo)(()=>s.getModuleGraphModule(t).getSideEffects(),[t]),i=r.map((e,s)=>{let{variable:n,name:r,identifier:i}=e;return{key:s,name:r,identifier:t.isPreferSource?i.position.source:i.position.transformed,declaration:null==n?void 0:n.identifier}}).sort((e,t)=>e.name===t.name?e.identifier.start.line>t.identifier.start.line?1:-1:e.name>t.name?1:-1).reduce((e,t)=>{let s=e[e.length-1];return s&&s.name===t.name?(s.children||(s.children=[]),s.children.push(t)):e.push(t),e},[]),l=[{title:"Name",dataIndex:"name",key:"name",align:"center",...da("name")},{title:"SideEffect",dataIndex:"identifier",key:"identifier",align:"center",render:e=>(0,o.jsx)(rR.A,{title:`Current File line ${e.start.line}`,children:(0,o.jsx)(rH.Ay,{type:"link",onClick:()=>n(t,[e],e.start.line),children:"Move To"})})},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>dl(e,n)}],a=(0,o.jsx)(w.Fragment,{children:(0,o.jsxs)(sN.A,{style:{fontWeight:400},children:["Import",(0,o.jsx)(rT.A.Text,{strong:!0,children:i.length}),"variables",(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{strong:!0,children:r.length}),"sideEffects"]})});return(0,o.jsx)(rW,{style:{marginBottom:10},title:a,className:"tree-shaking-export-table",children:(0,o.jsx)(lQ.A,{size:"small",dataSource:i,columns:l,pagination:!1,scroll:{y:600}})})},dc=e=>{let{module:t,moduleGraph:s,setEditorData:n}=e,r=(0,w.useMemo)(()=>s.getModuleGraphModule(t).getExports(),[t]),i=r.filter(e=>0===e.getSideEffects().length),l=(0,o.jsxs)(w.Fragment,{children:[(0,o.jsxs)(sN.A,{style:{fontWeight:400},children:["Export",(0,o.jsx)(rT.A.Text,{strong:!0,children:r.length})]}),r.length>0?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{style:{fontWeight:400},code:!0,children:[(0,o.jsx)(rT.A.Text,{children:"Unused"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{strong:!0,children:i.length})]}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{style:{fontWeight:400},code:!0,children:[(0,o.jsx)(rT.A.Text,{children:"Used"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{strong:!0,children:r.length-i.length})]})]}):""]}),a=r.map((e,t)=>{let{variable:s}=e;return{key:t,name:e.name,declaration:null==s?void 0:s.identifier,used:e.getSideEffects().map(e=>{let{module:t,identifier:s}=e,n=(null==t?void 0:t.isPreferSource)?s.position.source:s.position.transformed;if(t&&n)return{module:t,range:n}}).filter(sA)}}),d=[{title:"Name",dataIndex:"name",key:"name",align:"center",...da("name")},{title:"Declaration",dataIndex:"declaration",key:"declaration",align:"center",render:e=>dl(e,n)},{title:"Info",dataIndex:"used",key:"used",align:"center",sorter:(e,t)=>e.used.length-t.used.length,sortDirections:["descend","ascend"],render:e=>(0,o.jsxs)("span",{children:["Used ",e.length," times"]})}];return(0,o.jsx)(rW,{title:l,className:"tree-shaking-export-table",children:(0,o.jsx)(lQ.A,{size:"small",dataSource:a,columns:d,pagination:!1,scroll:{y:600},expandable:{expandedRowRender:e=>(0,o.jsxs)("div",{className:"tree-shaking-side-effect-list",children:[(0,o.jsx)(rT.A.Text,{children:"List of SideEffect:"}),e.used.map(e=>{let{module:t,range:s}=e;return(0,o.jsx)(rR.A,{title:`${t.path}:${s.start.line}`,children:(0,o.jsx)(rH.Ay,{className:"tree-shaking-side-effect-list-item",type:"link",onClick:()=>{n(t,[s],s.start.line)},children:`${function(e){let t="",s=e;for(let e=0;e<3;e++)t=t?`${ea().basename(s)}/${t}`:ea().basename(s),s=ea().dirname(s);return`...${t}`}(t.path)}:${s.start.line}`})},t.id)})]}),rowExpandable:e=>e.used.length>0}})})},du=e=>"side-effect"===e.kind?(0,o.jsx)(dd,{...e}):(0,o.jsx)(dc,{...e}),dh=X.Client.RsdoctorClientRoutes.TreeShaking,dp=function(e,t,s){let n=e();return function(){let[r,i]=(0,w.useState)(),[l,a]=(0,w.useState)(h.Pending),[d,c]=(0,w.useState)({}),{loader:u}=sz(r);function p(e){return e.then(e=>{i(e)}).catch(()=>{a(h.Fail)})}function m(e){e&&Promise.all(t.map(t=>{let[s]=t;return e.loadData(s)})).then(e=>{c(e.reduce((e,s,n)=>{let[r,i]=t[n];return e[i]=s,e},{})),a(h.Success)}).catch(e=>{console.error(e),a(h.Fail)})}return((0,w.useEffect)(()=>{p(n).then(()=>{m(u)})},[u]),l===h.Pending)?(0,o.jsx)(iu.A,{active:!0}):l===h.Fail?(0,o.jsx)(ih,{retry:()=>{a(h.Pending),n.then(()=>{m(u)}).catch(()=>{p(e())})}}):(0,o.jsx)(s,{...d})}}(sC,[["moduleGraph","data"],["root","cwd"]],e=>{var t;let{data:s,cwd:n}=e,r=(0,w.useMemo)(()=>nK.fromData(s),[s]);if(0===r.size())return(0,o.jsx)(dn,{});let[i,l]=(0,w.useState)(""),[a,d]=(0,w.useState)(1),[c,u]=(0,w.useState)([]),[h,p]=(0,w.useState)("side-effect"),m=(0,w.useMemo)(()=>r.getModules().filter(e=>e.kind===X.SDK.ModuleKind.Normal&&ea().basename(e.path).includes(i)),[i]),f=(0,w.useMemo)(()=>m.find(e=>e.isEntry),[]),[g,j]=(0,w.useState)(f||(null==m?void 0:m.length)&&(null==m?void 0:m[0])),y=(t=e=>{v(m.find(t=>t.path===e),[])},(0,w.useMemo)(()=>sY({files:m.map(e=>e.path),cwd:n,fileTitle(e,s){let n=r.getModules().find(t=>t.path===e&&t.kind===nT.kind.Normal),i=r.getModuleGraphModule(n),l=i.getExports().filter(e=>0===e.getSideEffects().length);return(0,o.jsxs)(sN.A,{style:{wordBreak:"break-all"},children:[(0,o.jsx)(au,{text:s,keyword:e,onClick:()=>t(e)}),i.dynamic?(0,o.jsx)(rP.A,{color:"cyan",children:"dynamic"}):"",l.length>0?(0,o.jsxs)(rP.A,{color:"green",children:[l.length," Unused"]}):""]})}}),[i,g])),v=(e,t,s)=>{j(e),u(t.slice()),eP.isNumber(s)&&d(s)};return(0,o.jsxs)(r_.A,{title:"Tree Shaking Analysis",bodyStyle:{paddingTop:0},className:"tree-shaking-page",children:[(0,o.jsxs)(r7.A,{justify:"space-between",align:"middle",style:{marginBottom:x.BasePadding,marginTop:x.BasePadding},children:[(0,o.jsx)(la,{icon:(0,o.jsx)(oy.A,{}),width:400,label:"FileName",placeholder:"search filename by keyword",style:{width:"auto"},onChange:e=>l(e)}),(0,o.jsxs)(o6.Ay.Group,{value:h,onChange:e=>{let{target:t}=e;return p(t.value)},children:[(0,o.jsx)(o6.Ay.Button,{value:"side-effect",children:"SideEffects"}),(0,o.jsx)(o6.Ay.Button,{value:"export",children:"Export Variables"})]})]}),(0,o.jsxs)(r7.A,{justify:"space-between",align:"top",wrap:!1,gutter:[x.BasePadding,x.BasePadding],children:[(0,o.jsx)(r9.A,{span:7,children:(0,o.jsx)(r_.A,{title:`Total Files: ${m.length}`,className:"tree-shaking-files-box",children:(0,o.jsx)(sq,{style:{height:"80%"},className:"tree-shaking-files",selectedKeys:g?[g.path]:[],defaultExpandedKeys:sV(y,3,e=>!((0,sl.A)(e,"__RESOURCEPATH__").indexOf("/node_modules/")>-1)),treeData:y,expandAction:"click"})})}),(0,o.jsx)(r9.A,{span:9,children:(0,o.jsx)(ix,{api:X.SDK.ServerAPI.API.GetModuleCodeByModuleId,body:{moduleId:g.id},children:e=>(0,o.jsx)(ds,{module:g,moduleGraph:r,ranges:c,toLine:a,setEditorData:v,source:e})})}),(0,o.jsx)(r9.A,{flex:1,children:(0,o.jsx)(du,{kind:h,setEditorData:v,module:g,moduleGraph:r})})]})]})});var dm=s(1661),df=s(31766),dx=s(29503),dg=s(40056);let dj=e=>{let{file:t,data:s}=e,[n,r]=(0,w.useState)(s[0].group),i=s.find(e=>e.group===n);return(0,o.jsxs)(r7.A,{wrap:!0,gutter:[x.BasePadding,x.BasePadding],style:{height:"100%",alignContent:"flex-start"},children:[s.length>1?(0,o.jsx)(r9.A,{span:24,children:(0,o.jsx)(rO.A,{value:n,options:s.map(e=>e.group),onChange:e=>r(e)})}):null,i?(0,o.jsxs)(w.Fragment,{children:[(0,o.jsx)(r9.A,{span:24,children:(0,o.jsxs)(rT.A.Text,{strong:!0,children:[i.baselineTitle||"Baseline"," ⟷"," ",i.currentTitle||"Current"]})}),(0,o.jsx)(r9.A,{span:24,children:(0,o.jsx)(li,{originalFilePath:t,modifiedFilePath:t,original:i.baseline||"",modified:i.current||""})})]},n):null]})},dy=e=>{let{text:t="View Changes",...s}=e;return(0,o.jsx)(iS,{text:t,buttonProps:{size:"small",icon:(0,o.jsx)(dg.A,{})},drawerProps:{destroyOnClose:!0,title:`Content diff for "${s.file}"`},children:(0,o.jsx)(dj,{...s})})};var dv=((i={}).New="New",i.Changed="Changed",i.Deleted="Deleted",i.NotChanged="Not Changed",i),dA=((l={}).Name="Sorted by Name",l.Size="Sorted by Size",l.Delta="Sorted by Delta",l);let db=(e,t,s,n)=>(0,o.jsx)(o.Fragment,{children:t-e==0?(0,o.jsx)(o.Fragment,{}):(0,o.jsxs)(rT.A.Text,{strong:!0,style:{color:s===X.Client.RsdoctorClientDiffState.Up?g.Red:g.Green,...n},children:[s===X.Client.RsdoctorClientDiffState.Up?"+":"-",rv(Math.abs(t-e))]})}),dS=/[a-fA-F0-9]{20,}/,dw=(e,t,s)=>{let n=s?(e,s)=>{var n,r,i,l;return((null==(n=e.current)?void 0:n.size[t])||0)-((null==(r=e.baseline)?void 0:r.size[t])||0)-((null==(i=s.current)?void 0:i.size[t])||0)+((null==(l=s.baseline)?void 0:l.size[t])||0)}:(s,n)=>{var r,i;return((null==(r=s[e])?void 0:r.size[t])||0)-((null==(i=n[e])?void 0:i.size[t])||0)};return{width:200,sorter:(e,t)=>n(e,t),render:(s,n)=>{var r,i;if(!n[e])return"-";let l=n[e].size[t];return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:rv(l)}),"current"===e?db((null==(r=n.baseline)?void 0:r.size[t])||0,l,((null==(i=n.baseline)?void 0:i.size[t])||0)>l?X.Client.RsdoctorClientDiffState.Down:X.Client.RsdoctorClientDiffState.Up):null]})}}},dC=(e,t,s)=>{let[n,r]=(0,w.useState)(!1),i="baseline"===e;return{title:()=>{let n=i?t:s,r=(0,ia.A)(e),l=eS.diffSize(t,s);return(0,o.jsxs)("div",{children:[(0,o.jsx)(rT.A.Text,{children:r}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rR.A,{title:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:[r," modules is ",n]}),i?null:(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["Percent is ",rA(l.percent)]})]}),children:(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:n}),(0,o.jsx)(ii.A,{})]})})]})},children:[{title:"Source Size",...dw(e,"sourceSize",n)},{title:"Parsed Size",defaultSortOrder:i?void 0:"descend",...dw(e,"parsedSize",n)}],filterSearch:!0,filters:[{text:"Show Changed",value:dv.NotChanged},{text:"Show All",value:"All"}],onFilter:(e,t)=>(e===dv.NotChanged?r(!0):r(!1),e!==dv.NotChanged||dk(t)!==e)}},dM=e=>{let{data:t,baseline:s,current:n}=e,{modules:r}=s.moduleGraph,{modules:i}=n.moduleGraph,{chunks:l}=s.chunkGraph,{chunks:a}=n.chunkGraph,d=s.root,c=n.root,[u,h]=(0,w.useState)(""),p=(0,w.useRef)(null),m=(e,t)=>{t(),h(e[0])},f="__is_baseline__",x=(0,w.useMemo)(()=>t.baseline?eS.getModulesByAsset(t.baseline,l,r).map(e=>({...e,[f]:!0})).filter(e=>{var t;return!(null==(t=e.concatenationModules)?void 0:t.length)}):[],[t,s]),j=(0,w.useMemo)(()=>t.current?eS.getModulesByAsset(t.current,a,i).map(e=>({...e,[f]:!1})).filter(e=>{var t;return!(null==(t=e.concatenationModules)?void 0:t.length)}):[],[t,n]),y=e=>sQ(e.path,e.__is_baseline__?d:c),v=(0,w.useMemo)(()=>{let e=[...x,...j],t=new Map;return e.forEach(e=>{var s,n;let r=(null==(s=e.webpackId)?void 0:s.replace(dS,""))||(null==(n=e.path)?void 0:n.replace(dS,"")),i=t.get(r);i||(i={path:r}),e[f]?i.baseline=e:i.current=e,t.set(r,i)}),[...t.values()]},[x,j,u]),{bModulesCount:A,cModulesCount:b,totalCount:S}=(0,w.useMemo)(()=>{let e=e=>y(e).alias.indexOf(u)>-1,t=v.filter(e=>e.baseline),s=v.filter(e=>e.current),n=v.length;return u&&(t=t.filter(e),s=s.filter(e),n=v.filter(e).length),{bModulesCount:t.length,cModulesCount:s.length,totalCount:n}},[v,u]);return(0,o.jsx)(lQ.A,{dataSource:v,rowKey:e=>e.path,size:"small",pagination:{size:"small"},bordered:!0,scroll:{x:1500},columns:[{fixed:"left",title:()=>(0,o.jsxs)("div",{children:[(0,o.jsxs)(rT.A.Text,{children:["Modules of ",`"${t.alias}"`]}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rR.A,{title:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["filtered modules: ",S]}),(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["total modules: ",v.length]})]}),children:[(0,o.jsxs)(rT.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[S,"/",v.length]}),(0,o.jsx)(ii.A,{})]})]}),filterDropdown(e){let{setSelectedKeys:t,selectedKeys:s,confirm:n,clearFilters:r}=e;return(0,o.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,o.jsx)(ll.A,{ref:p,placeholder:"Search by file name",value:s[0],onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>m(s,n),style:{marginBottom:8,display:"block"}}),(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rH.Ay,{type:"primary",onClick:()=>m(s,n),icon:(0,o.jsx)(a9.A,{}),size:"small",style:{width:90},children:"Search"}),(0,o.jsx)(rH.Ay,{onClick:()=>{r&&(r(),h("")),t([]),m([],n)},size:"small",style:{width:90},children:"Reset"})]})]})},filterSearch:!0,filterIcon:e=>(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{type:u?void 0:"secondary",style:{fontWeight:400},children:u||"Search by file name"}),(0,o.jsx)(a9.A,{style:{color:e?g.Blue:void 0}})]}),onFilterDropdownOpenChange:e=>{e&&setTimeout(()=>{var e;return null==(e=p.current)?void 0:e.focus()},100)},onFilter:(e,t)=>y(t).alias.indexOf(e)>-1,render:(e,t)=>{let{alias:s,inNodeModules:n}=y(t);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rR.A,{title:t.path,children:(0,o.jsx)(rT.A.Text,{copyable:{text:t.path},children:s})}),n?(0,o.jsx)(rP.A,{color:"warning",children:"node_modules"}):null,(0,o.jsx)(dD,{type:dk(t)})]})}},dC("current",A,b),dC("baseline",A,b),{title:"Actions",width:200,render:(e,t)=>{var r,i,l,a,d,c,u,h,p,m,f,x;return(0,o.jsx)(sN.A,{direction:"vertical",style:{maxWidth:170},children:(0,o.jsx)(dy,{text:"View Changes",file:t.path,data:[{baseline:null==(r=s.moduleCodeMap[null==(i=t.baseline)?void 0:i.id])?void 0:r.source,current:null==(l=n.moduleCodeMap[null==(a=t.current)?void 0:a.id])?void 0:l.source,group:"Source"},{baseline:null==(d=s.moduleCodeMap[null==(c=t.baseline)?void 0:c.id])?void 0:d.transformed,current:null==(u=n.moduleCodeMap[null==(h=t.current)?void 0:h.id])?void 0:u.transformed,group:"Transformed Source"},{baseline:null==(p=s.moduleCodeMap[null==(m=t.baseline)?void 0:m.id])?void 0:p.parsedSource,current:null==(f=n.moduleCodeMap[null==(x=t.current)?void 0:x.id])?void 0:f.parsedSource,group:"Parsed Source"}]})})}}]})};function dk(e){if(e.baseline&&!e.current)return dv.Deleted;if(!e.baseline&&e.current)return dv.New;if(e.baseline&&e.current)return e.baseline.size.sourceSize===e.current.size.sourceSize&&e.baseline.size.parsedSize===e.current.size.parsedSize?dv.NotChanged:dv.Changed;throw Error("Update Type not match")}let dD=e=>{let{type:t}=e;return t===dv.NotChanged?(0,o.jsx)(rR.A,{title:"It hasn't changed between Baseline and Current",children:(0,o.jsx)(rP.A,{color:"success",children:"Not Changed"})}):t===dv.Changed?(0,o.jsx)(rR.A,{title:"It has been changed between Baseline and Current",children:(0,o.jsx)(rP.A,{color:"warning",children:"Changed"})}):t===dv.New?(0,o.jsx)(rR.A,{title:"It is created in Current",children:(0,o.jsx)(rP.A,{color:"error",children:"New"})}):t===dv.Deleted?(0,o.jsx)(rR.A,{title:"It has been deleted in Current",children:(0,o.jsx)(rP.A,{color:"error",children:"Deleted"})}):null},dP=e=>{let{baseline:t,current:s}=e,n=(0,w.useMemo)(()=>s8(t.moduleGraph.modules),[t]),r=(0,w.useMemo)(()=>s8(s.moduleGraph.modules),[s]),i=t.chunkGraph.chunks,l=s.chunkGraph.chunks,a=t.root,d=s.root,[c,u]=(0,w.useState)(),[h,p]=(0,w.useState)([]),m=(0,w.useMemo)(()=>{let e={};return n.forEach(t=>{var s,n;let r=(null==(s=t.webpackId)?void 0:s.replace(dS,""))||(null==(n=t.path)?void 0:n.replace(dS,""));e[r]?console.warn("[Baseline Module Exists]: ",t,e):e[r]={path:r,baseline:t}}),r.forEach(t=>{var s,n;let r=(null==(s=t.webpackId)?void 0:s.replace(dS,""))||(null==(n=t.path)?void 0:n.replace(dS,""));e[r]||(e[r]={path:r}),e[r].current=t}),Object.values(e)},[n,r]),f=(0,w.useMemo)(()=>{let e=m.slice();return c&&(e=e.filter(e=>e.path.indexOf(c)>-1)),h.length&&(e=e.filter(e=>h.includes(dk(e)))),e},[m,c,h]),{bFilteredModulesLength:g,cFilteredModulesLength:j}=(0,w.useMemo)(()=>({bFilteredModulesLength:f.filter(e=>e.baseline).length,cFilteredModulesLength:f.filter(e=>e.current).length}),[f]);return(0,o.jsxs)(r7.A,{gutter:[x.BasePadding,x.BasePadding],children:[(0,o.jsx)(r9.A,{span:24,children:(0,o.jsxs)(sN.A,{wrap:!0,children:[(0,o.jsx)(la,{icon:(0,o.jsx)(oy.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by name",onChange:e=>{u(e)}}),(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:Object.values(dv).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{p(e)}})]})}),(0,o.jsx)(r9.A,{span:24,children:(0,o.jsx)(lQ.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},scroll:{x:1700},dataSource:f,rowKey:e=>e.path,columns:[{fixed:"left",title:(0,o.jsxs)(rR.A,{title:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["filtered modules is ",f.length," (Current & Baseline)"]}),(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["total modules is ",m.length," (Current & Baseline)"]})]}),children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Modules"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[f.length,"/",m.length]}),(0,o.jsx)(ii.A,{})]}),render:(e,t)=>{let{alias:s,inNodeModules:n}=sQ(t.path,t.baseline?a:d);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rR.A,{title:t.path,children:(0,o.jsx)(rT.A.Text,{copyable:{text:t.path},children:s})}),(0,o.jsx)(dD,{type:dk(t)}),n?(0,o.jsx)(rP.A,{color:"warning",children:"node_modules"}):null]})}},dC("current",g,j),dC("baseline",g,j),{title:"in Assets",render:(e,t)=>{let s=[],n=[];return(t.current&&eS.getChunksByModule(t.current,l).forEach(e=>e.assets.forEach(e=>n.push(e))),t.baseline&&eS.getChunksByModule(t.baseline,i).forEach(e=>e.assets.forEach(e=>s.push(e))),s.length||n.length)?(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,dx.A)(n).filter(Boolean).map(e=>(0,o.jsx)(ic,{label:"Current",value:e},`c_${e}`)),(0,dx.A)(s).filter(Boolean).map(e=>(0,o.jsx)(ic,{label:"Baseline",value:e},`b_${e}`))]}):null}},{title:"Actions",width:200,render:(e,n)=>{var r,i,l,a,d,c,u,h,p,m,f,x,g,j,y,v;let A=dk(n)===dv.Changed;return(0,o.jsxs)(sN.A,{direction:"vertical",style:{maxWidth:170},children:[A?(0,o.jsx)(dy,{text:"View Changes",file:n.path,data:[{baseline:null==(r=t.moduleCodeMap[null==(i=n.baseline)?void 0:i.id])?void 0:r.source,current:null==(l=s.moduleCodeMap[null==(a=n.current)?void 0:a.id])?void 0:l.source,group:"Source"},{baseline:null==(d=t.moduleCodeMap[null==(c=n.baseline)?void 0:c.id])?void 0:d.transformed,current:null==(u=s.moduleCodeMap[null==(h=n.current)?void 0:h.id])?void 0:u.transformed,group:"Transformed Source"},{baseline:null==(p=t.moduleCodeMap[null==(m=n.baseline)?void 0:m.id])?void 0:p.parsedSource,current:null==(f=s.moduleCodeMap[null==(x=n.current)?void 0:x.id])?void 0:f.parsedSource,group:"Parsed Source"}]}):null,(null==n?void 0:n.current)?(0,o.jsx)(dy,{text:"Current Result Viewer",file:n.path,data:[{baseline:null==(g=s.moduleCodeMap[n.current.id])?void 0:g.source,current:null==(j=s.moduleCodeMap[n.current.id])?void 0:j.transformed,baselineTitle:"Current Source",currentTitle:"Current Transformed Source",group:"Transformed Source"},{baseline:null==(y=s.moduleCodeMap[n.current.id])?void 0:y.source,current:null==(v=s.moduleCodeMap[n.current.id])?void 0:v.parsedSource,baselineTitle:"Current Source",currentTitle:"Current Parsed Source",group:"Parsed Source"}]}):null]})}}]})})]})},dz=e=>e.baseline&&e.current?e.baseline.map(e=>e.version).sort().join()===e.current.map(e=>e.version).sort().join()?dv.NotChanged:dv.Changed:e.baseline||e.current?e.baseline&&!e.current?dv.Deleted:dv.New:dv.NotChanged,dI=e=>dz(e)!==dv.NotChanged,dN=e=>{let{dataSource:t}=e,{newCount:s,deleteCount:n,changedCount:r}=(0,w.useMemo)(()=>({newCount:t.filter(e=>e.updateType===dv.New).length,deleteCount:t.filter(e=>e.updateType===dv.Deleted).length,changedCount:t.filter(e=>e.updateType===dv.Changed).length}),[t]);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(ic,{label:"New",value:s,type:s>0?"error":"default",tooltip:`Current has ${s} packages which not found in Baseline`}),(0,o.jsx)(ic,{label:"Deleted",value:n,type:n>0?"error":"default",tooltip:`Current delete ${n} packages than Baseline`}),(0,o.jsx)(ic,{label:"Changed",value:r,type:r>0?"error":"default",tooltip:`Current has ${r} changed packages than Baseline`})]})},dE=e=>{let{baseline:t,current:s}=e,{packages:n=[]}=t||{},{packages:r=[]}=s||{},i={},l=(e,t)=>{i[e.name]||(i[e.name]={name:e.name,updateType:dv.NotChanged}),i[e.name][t]||(i[e.name][t]=[]),i[e.name][t].push(e)};n.forEach(e=>l(e,"baseline")),r.forEach(e=>l(e,"current"));let a=[],o=[];return Object.values(i).forEach(e=>{dI(e)?a.push(e):o.push(e)}),a.concat(o).map(e=>({...e,updateType:dz(e)}))},d_=e=>{let{baseline:t,current:s}=e,{packages:n=[]}=t||{},{packages:r=[]}=s||{};if(!n.length&&!r.length)return(0,o.jsx)(rz.A,{});let i=(0,w.useMemo)(()=>(0,dx.A)(n.concat(r).map(e=>e.name)),[n,r]),[l,a]=(0,w.useState)([]),[d,c]=(0,w.useState)([]),u=(0,w.useMemo)(()=>dE({baseline:t,current:s}),[t,s]),h=(0,w.useMemo)(()=>u.filter(e=>d.length?d.indexOf(e.updateType)>-1:!l.length||l.indexOf(e.name)>-1),[u,l,d]);return(0,o.jsxs)(r7.A,{gutter:[x.BasePadding,x.BasePadding],children:[(0,o.jsx)(r9.A,{span:24,style:{marginTop:16},children:(0,o.jsxs)(sN.A,{wrap:!0,children:[(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by package names",style:{width:400},options:i.map(e=>{let t=u.find(t=>t.name===e);return t&&dI(t)?{label:(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:e}),(0,o.jsx)(dD,{type:dz(t)})]}),value:e}:{label:e,value:e}}),allowClear:!0,onChange:e=>{a(e)}}),(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by changed type",style:{width:200},options:Object.values(dv).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{c(e)}})]})}),(0,o.jsx)(r9.A,{span:24,children:(0,o.jsx)(lQ.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:h,rowKey:e=>e.name,columns:[{title:()=>(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:"Package Name"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rR.A,{title:`Filtered Package Count is ${h.length}, Total Package Count is ${u.length}`,children:(0,o.jsxs)(rT.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400},children:[h.length," / ",u.length]})})]}),render:(e,t)=>t.updateType!==dv.NotChanged?(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:t.name}),(0,o.jsx)(dD,{type:t.updateType})]}):t.name},{title:()=>(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:"Current"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(dN,{dataSource:u})]}),children:[{title:"Version",render:(e,t)=>t.current?(0,o.jsx)(sN.A,{direction:"vertical",children:t.current.map(e=>(0,o.jsx)(ic,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===dv.Deleted?"error":t.updateType===dv.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{let s=(0,r4.A)(t.current,e=>e.size.parsedSize),n=()=>(0,o.jsx)(rF,{baseline:(0,r4.A)(t.baseline,e=>e.size.parsedSize),current:s});return t.current?(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{strong:t.updateType!==dv.NotChanged,children:rv(s)}),(0,o.jsx)(n,{})]}):(0,o.jsx)(n,{})}}]},{title:"Baseline",children:[{title:"Version",render:(e,t)=>t.baseline?(0,o.jsx)(sN.A,{direction:"vertical",children:t.baseline.map(e=>(0,o.jsx)(ic,{label:"version",value:e.version,tooltip:e.root,type:t.updateType===dv.Deleted?"error":t.updateType===dv.Changed?"warn":"default"},e.version))}):null},{title:"Parsed Size",render:(e,t)=>{if(t.baseline){let e=(0,r4.A)(t.baseline,e=>e.size.parsedSize);return(0,o.jsx)(rT.A.Text,{children:rv(e)})}return null}}]}]})})]})},dT=e=>{let{baseline:t,current:s,assetsDiffResult:n}=e,r=s8(t.moduleGraph.modules),i=s8(s.moduleGraph.modules),l=ne(t.errors),a=ne(s.errors),d=s9(t.moduleGraph),c=s9(s.moduleGraph),u=t.root,h=s.root,p=dE({baseline:t.packageGraph,current:s.packageGraph}),m=[{title:["Bundle Size"],value:[n.all.total]},{title:["Total JS","Initial JS"],value:[n.js.total,n.js.initial]},{title:["Total CSS","Initial CSS"],value:[n.css.total,n.css.initial]},{title:["Images","Fonts","Media"],value:[n.imgs.total,n.fonts.total,n.media.total]},{title:["HTML"],value:[n.html.total]},{title:["Others"],value:[n.others.total]}];return(0,o.jsxs)(r7.A,{gutter:[x.BasePadding,x.BasePadding],wrap:!0,style:{marginBottom:x.BasePadding},children:[m.map(e=>(0,o.jsx)(r9.A,{style:{minWidth:335},children:(0,o.jsx)(rK,{titles:e.title,datas:e.value,showPercentInTitle:!0})},e.title.join(","))),(0,o.jsx)(r9.A,{style:{minWidth:335},children:(0,o.jsx)(rK,{titles:["Duplicate Packages"],datas:[{size:{baseline:l.length,current:a.length},count:{baseline:l.length,current:a.length},percent:0,state:X.Client.RsdoctorClientDiffState.Equal}],formatter:(e,n)=>(0,o.jsx)(ib,{duplicatePackages:"baseline"===n?l:a,moduleGraph:"baseline"===n?d:c,cwd:"baseline"===n?u:h,buttonProps:{size:"small"},moduleCodeMap:"baseline"===n?t.moduleCodeMap:s.moduleCodeMap})})}),(0,o.jsx)(r9.A,{style:{minWidth:335},children:(0,o.jsx)(rK,{titles:["Modules"],datas:[{size:{baseline:r.length,current:i.length},count:{baseline:r.length,current:i.length},percent:0,state:X.Client.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>{if("baseline"===t)return e;let s=eS.diffSize(r.length,i.length);return(0,o.jsxs)(sN.A,{style:{fontSize:"inherit"},children:[(0,o.jsx)(rT.A.Text,{style:{fontSize:"inherit"},children:e}),(0,o.jsx)(r$,{...s})]})}})}),(0,o.jsx)(r9.A,{style:{minWidth:335},children:(0,o.jsx)(rK,{titles:[(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{style:{color:"inherit"},children:"Packages"}),(0,o.jsx)(dN,{dataSource:p})]},"0")],datas:[{size:{baseline:p.filter(e=>e.baseline).length,current:p.filter(e=>e.current).length},count:{baseline:p.filter(e=>e.baseline).length,current:p.filter(e=>e.current).length},percent:0,state:X.Client.RsdoctorClientDiffState.Equal}],formatter:(e,t)=>"baseline"===t?e:(0,o.jsx)(sN.A,{children:e})})})]})},dR=e=>{let{assetsDiffResult:t}=e,s=[{type:"JS",data:t.js},{type:"CSS",data:t.css},{type:"Imgs",data:t.imgs},{type:"Fonts",data:t.fonts},{type:"Media",data:t.media},{type:"HTML",data:t.html},{type:"Others",data:t.others}];return(0,o.jsx)(lQ.A,{bordered:!0,pagination:!1,dataSource:s,rowKey:e=>e.type,style:{marginTop:x.BasePadding-x.BasePadding/4},columns:[{title:"File Type",dataIndex:"type",key:"type",render:e=>(0,o.jsx)(rT.A.Text,{strong:!0,children:e})},{title:"Size",dataIndex:"data",key:"size",children:[{title:"Current",dataIndex:"data",key:"csize",render:e=>{let t=(0,o.jsxs)(w.Fragment,{children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:rv(e.total.size.current)}),(0,o.jsx)(r$,{percent:e.total.percent,state:e.total.state}),db(e.total.size.baseline,e.total.size.current,e.total.state)]});return e.initial?(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Total"}),t]}),(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Initial"}),(0,o.jsx)(rT.A.Text,{strong:!0,children:rv(e.initial.size.current)}),(0,o.jsx)(r$,{percent:e.initial.percent,state:e.initial.state}),db(e.initial.size.baseline,e.initial.size.current,e.initial.state)]})]}):(0,o.jsx)(sN.A,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bsize",render:e=>{let t=(0,o.jsx)(rT.A.Text,{children:rv(e.total.size.baseline)});return e.initial?(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Total"}),t]}),(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Initial"}),(0,o.jsx)(rT.A.Text,{children:rv(e.initial.size.baseline)})]})]}):t}}]},{title:"Count",dataIndex:"data",key:"count",children:[{title:"Current",dataIndex:"data",key:"ccount",render:e=>{let t=(0,o.jsx)(rT.A.Text,{strong:!0,children:e.total.count.current});return e.initial?(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Total"}),t]}),(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Initial"}),(0,o.jsx)(rT.A.Text,{strong:!0,children:e.initial.count.current})]})]}):(0,o.jsx)(sN.A,{children:t})}},{title:"Baseline",dataIndex:"data",key:"bcount",render:e=>{let t=(0,o.jsx)(rT.A.Text,{children:e.total.count.baseline});return e.initial?(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Total"}),t]}),(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rP.A,{color:g.Blue,children:"Initial"}),(0,o.jsx)(rT.A.Text,{children:e.initial.count.baseline})]})]}):(0,o.jsx)(sN.A,{children:t})}}]}]})};var dO=s(46201),dB=s(12168),dL=s(12199),dF=s(68794),d$=s(52762);let dG={JS:[X.Constants.JSExtension],CSS:[X.Constants.CSSExtension],HTML:[X.Constants.HtmlExtension],Imgs:X.Constants.ImgExtensions,Fonts:X.Constants.FontExtensions,Media:X.Constants.MediaExtensions,Others:[]},dK=Object.values(dG).flat(),dW=e=>{let{data:t}=e,s=(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:t.alias}),(0,o.jsx)(rR.A,{title:(0,o.jsxs)(sN.A,{style:{color:"inherit"},direction:"vertical",children:[t.current?(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["Current realpath: ",t.current.path]}):null,t.baseline?(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["Baseline realpath: ",t.baseline.path]}):null]}),children:(0,o.jsx)(ii.A,{})})]});return t.baseline&&!t.current?(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(dO.A,{style:{color:g.Red}}),s]}):!t.baseline&&t.current?(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(dB.A,{style:{color:g.Green}}),s]}):t.baseline&&t.current?(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(dL.A,{style:{color:g.Yellow}}),s]}):s},dH=e=>{let{baseline:t,current:s,outputFilename:n}=e,[r,i]=(0,w.useState)(),[l,a]=(0,w.useState)([]),[d,c]=(0,w.useState)([]),[u,h]=(0,w.useState)(dA.Size),[p,m]=(0,w.useState)(null),[f,j]=(0,w.useState)(null),{assets:y}=t.chunkGraph,{assets:v}=s.chunkGraph,A=(0,w.useMemo)(()=>{let e={};return p&&f?e.choose={alias:`${p}
|
|
94
|
-
${f}`,current:v.find(e=>e.path===f),baseline:y.find(e=>e.path===p)}:(y.forEach(t=>{let s=eS.formatAssetName(t.path,n);e[s]?console.warn("[Baseline Asset Exists]: ",t,e):e[s]={alias:s,baseline:t}}),v.forEach(t=>{let s=eS.formatAssetName(t.path,n);e[s]||(e[s]={alias:s}),e[s].current=t})),Object.values(e)},[y,v,p,f]),b=(0,w.useMemo)(()=>{let e=A.slice();if(r&&(e=e.filter(e=>e.alias.indexOf(r)>-1)),l.length){let t=l.map(e=>dG[e]).flat(),s=l.indexOf("Others")>-1;e=e.filter(e=>{let n=e.baseline||e.current;return!!eS.isAssetMatchExtensions(n,t)||!!s&&!eS.isAssetMatchExtensions(n,dK)})}if(d.length&&(e=e.filter(e=>e.baseline&&!e.current?d.includes(dv.Deleted):!e.baseline&&e.current?d.includes(dv.New):!!e.baseline&&!!e.current&&(e.baseline.size===e.current.size?d.includes(dv.NotChanged):d.includes(dv.Changed)))),u)if(u===dA.Name)e.sort((e,t)=>e.alias.localeCompare(t.alias));else{let{prev:r,others:i}=e.reduce((e,t)=>(t.current?t.baseline?e.prev.unshift(t):e.prev.push(t):e.others.push(t),e),{prev:[],others:[]});e=[...r.sort((e,r)=>{if(r.current&&e.current){if(u===dA.Delta){let{percent:i}=eS.diffAssetsByExtensions(t.chunkGraph,s.chunkGraph,t=>eS.formatAssetName(t.path,n)===e.alias),{percent:l}=eS.diffAssetsByExtensions(t.chunkGraph,s.chunkGraph,e=>eS.formatAssetName(e.path,n)===r.alias);return l-i}return r.current.size-e.current.size}return -1}),...i]}return e},[A,r,l,d,u]),S=(0,w.useMemo)(()=>(0,r4.A)(b,e=>e.current?e.current.size:0)||0,[b]),C=(0,w.useMemo)(()=>(0,r4.A)(b,e=>e.baseline?e.baseline.size:0)||0,[b]);return(0,o.jsxs)(r7.A,{gutter:[x.BasePadding,x.BasePadding],children:[(0,o.jsxs)(r9.A,{span:24,children:[(0,o.jsxs)(sN.A,{wrap:!0,children:[(0,o.jsx)(la,{icon:(0,o.jsx)(oy.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by file name",onChange:e=>{i(e)}}),(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by file type",style:{width:250},options:Object.keys(dG).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{a(e)}}),(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by file changed type",style:{width:200},options:Object.values(dv).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{c(e)}}),(0,o.jsx)(lh.A,{suffixIcon:(0,o.jsx)(dF.A,{}),options:Object.values(dA).map(e=>({label:e,value:e})),value:u,onChange:e=>{h(e)}})]}),(0,o.jsxs)(r7.A,{style:{marginTop:10},gutter:[6,6],children:[(0,o.jsx)(r9.A,{children:(0,o.jsx)(rH.Ay,{children:"Select Baseline Asset and Current Asset to Diff "})}),(0,o.jsx)(r9.A,{children:(0,o.jsx)(lh.A,{allowClear:!0,placeholder:"select baseline assets",showSearch:!0,style:{width:300},options:Object.values(t.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>m(e)})}),(0,o.jsx)(r9.A,{children:(0,o.jsx)(lh.A,{allowClear:!0,placeholder:"select current assets",showSearch:!0,style:{width:300},options:Object.values(s.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>j(e)})})]})]}),(0,o.jsx)(r9.A,{span:24,children:(0,o.jsx)(lQ.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:b,rowKey:e=>e.alias,expandable:{expandedRowRender:e=>(0,o.jsx)("div",{style:{margin:x.BasePadding/3},children:(0,o.jsx)(dM,{data:e,baseline:t,current:s})}),columnTitle:(0,o.jsx)(rR.A,{title:"Click to expand row to see the modules which the chunk contains",placement:"left",children:(0,o.jsx)(d$.A,{style:{cursor:"pointer"}})})},columns:[{title:(0,o.jsxs)(rR.A,{title:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["filtered assets is ",b.length]}),(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["total assets is ",A.length]})]}),children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Assets"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[b.length,"/",A.length]}),(0,o.jsx)(ii.A,{})]}),render:(e,t)=>(0,o.jsx)(dW,{data:t})},{title:()=>{let e=rv(S),t=eS.diffSize(C,S);return(0,o.jsxs)(rR.A,{title:`Current size is ${e}, Delta is ${rA(t.percent)}`,children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Current"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:[(0,o.jsx)(rT.A.Text,{style:{fontSize:"inherit",marginRight:8},children:e}),(0,o.jsx)(rF,{fontSize:"inherit",baseline:C,current:S}),db(C,S,C>S?X.Client.RsdoctorClientDiffState.Down:X.Client.RsdoctorClientDiffState.Up,{fontSize:10,fontWeight:400,marginLeft:4})]}),(0,o.jsx)(ii.A,{})]})},render:(e,r)=>{if(r.current){let{percent:e,state:i}=eS.diffAssetsByExtensions(t.chunkGraph,s.chunkGraph,e=>eS.formatAssetName(e.path,n)===r.alias),l=eS.isInitialAsset(r.current,s.chunkGraph.chunks);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:rv(r.current.size)}),(0,o.jsx)(r$,{percent:e,state:i}),l?(0,o.jsx)(rP.A,{color:g.Blue,children:"initial"}):null]})}return"-"}},{title:()=>{let e=rv(C);return(0,o.jsxs)(rR.A,{title:`Baseline size is ${e}`,children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Baseline"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:e}),(0,o.jsx)(ii.A,{})]})},render:(e,s)=>{if(s.baseline){let e=eS.isInitialAsset(s.baseline,t.chunkGraph.chunks);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:rv(s.baseline.size)}),e?(0,o.jsx)(rP.A,{color:g.Blue,children:"initial"}):null]})}return"-"}},{title:"Actions",key:"actions",render:(e,t)=>{var s,n;return(0,o.jsx)(dy,{file:t.alias,data:[{baseline:null==(s=t.baseline)?void 0:s.content,current:null==(n=t.current)?void 0:n.content,group:"assets"}]})}}]})})]})},dq=e=>{var t;let{api:s,body:n,children:r,manifests:i}=e,[l,a]=(null==(t=s7()[X.Client.RsdoctorClientUrlQuery.BundleDiffFiles])?void 0:t.split(","))||[];return(null==i?void 0:i.length)?(0,o.jsx)(o.Fragment,{children:r(i[0].data,i[1].data)}):(0,o.jsx)(ix,{api:s,body:n,manifestLoader:l?()=>sC(l):void 0,children:e=>(0,o.jsx)(ix,{api:s,body:n,manifestLoader:a?()=>sC(a):void 0,children:t=>r(e,t)})})},dU=e=>{let{manifests:t}=e;return(0,w.useEffect)(()=>{console.log("BundleDiff Manifests: ",t)},[t]),(0,o.jsx)(dq,{api:X.SDK.ServerAPI.API.GetBundleDiffSummary,manifests:t,children:(e,t)=>{let s=e.chunkGraph===t.chunkGraph,n=e.chunkGraph,r=s?n:t.chunkGraph,i=eS.getAssetsDiffResult(n,r);return(0,o.jsxs)("div",{children:[(0,o.jsxs)(ld.A.Group,{children:[(0,o.jsx)(rR.A,{placement:"leftBottom",title:(0,o.jsx)(sN.A,{direction:"vertical",children:[{title:"Baseline",data:e},{title:"Current",data:t}].map(e=>{let{title:t,data:s}=e;return(0,o.jsx)(r_.A,{size:"small",children:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:t}),(0,o.jsxs)(sN.A,{style:{fontSize:10},children:[(0,o.jsx)(rT.A.Text,{style:{fontSize:"inherit",width:30,display:"inline-block"},children:"Hash"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{type:"secondary",style:{fontSize:"inherit"},children:s.hash||"-"})]}),s.cloudManifestUrl?(0,o.jsx)(rH.Ay,{type:"link",size:"small",style:{padding:0,fontSize:10},onClick:()=>window.open(s.cloudManifestUrl),children:"Open File"}):null]})},t)})}),children:(0,o.jsx)(ld.A,{icon:(0,o.jsx)(ii.A,{})})}),(0,o.jsx)(dm.A,{title:(0,o.jsxs)(rT.A.Text,{children:["Are you sure to",(0,o.jsx)(rT.A.Text,{strong:!0,children:" re-upload "}),"json files for bundle diff?"]}),onConfirm:()=>{},okText:"Yes",cancelText:"Cancel",placement:"topLeft",trigger:"hover",children:(0,o.jsx)(ld.A,{icon:(0,o.jsx)(df.A,{})})}),(0,o.jsx)(ld.A.BackTop,{})]}),(0,o.jsx)(dT,{baseline:e,current:t,onlyBaseline:s,assetsDiffResult:i}),(0,o.jsx)(rI.A,{defaultActiveKey:"Overview",tabBarStyle:{marginBottom:x.BasePadding/3},items:[{label:"Overview",key:"Overview",children:(0,o.jsx)(dR,{assetsDiffResult:i})},{label:"Assets",key:"Assets",children:(0,o.jsx)(dH,{outputFilename:e.outputFilename,baseline:e,current:t})},{label:"Modules",key:"Modules",children:(0,o.jsx)(dP,{baseline:e,current:t,onlyBaseline:s,assetsDiffResult:i})},{label:"Packages",key:"Packages",children:(0,o.jsx)(d_,{baseline:e.packageGraph,current:t.packageGraph})}].map(e=>({...e,label:(0,o.jsx)(rT.A.Text,{strong:!0,children:e.label})}))})]})}})},dV=X.Client.RsdoctorClientRoutes.BundleDiff,dJ=()=>(0,o.jsx)(dU,{manifests:[]});var dY=s(68338),dZ=s(16984);let dQ=[X.Manifest.RsdoctorManifestClientRoutes.Overall,X.Manifest.RsdoctorManifestClientRoutes.BundleSize],dX=(e,t)=>{window[X.Constants.WINDOW_RSDOCTOR_TAG]=e,window[X.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes=t;let s=(e=>{let t=`//${location.host}${location.pathname}#/overall`,s=e&&e.length>0?`?${X.Client.RsdoctorClientUrlQuery.EnableRoutes}=${encodeURIComponent(JSON.stringify(e))}`:"";return`${t}${s}`})(t);location.href=s,sI.Ay.success("JSON data loaded successfully!")},d0=async e=>{try{let t=await rD([e]);if(t&&t[0])dX(t[0].data,dQ);else throw Error("Invalid manifest data")}catch(t){let e=t instanceof Error?t.message:"Unknown error";throw sI.Ay.error(`Failed to load Rspack stats: ${e}`),t}},d1=X.Client.RsdoctorClientRoutes.Uploader,d5=()=>{let[e,t]=(0,w.useState)(!1),s=async e=>{if(e){t(!0);try{let t=await new Promise((t,s)=>{let n=new FileReader;n.onloadend=()=>{let{result:e}=n;console.log("reader result: ",e);try{let s=JSON.parse(e.toString());t(s)}catch(e){sI.Ay.error("json parse error"),s(e)}},n.onerror=()=>{let e="upload json file error, please try again.";sI.Ay.error(e),s(Error(e))},n.readAsText(e.originFileObj||e)});if(!t||"object"!=typeof t)throw Error("Invalid JSON format");if(t.hash&&(0,rk.A)(t.assets)&&(0,rk.A)(t.chunks)&&(0,rk.A)(t.modules))await d0(t);else{try{let e=t.clientRoutes||dQ;dX(t.data,e)}catch(t){let e=t instanceof Error?t.message:"Unknown error";sI.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";sI.Ay.error(`Upload failed: ${e}`),console.error("Upload error:",t)}finally{t(!1)}}};return(0,o.jsx)(ip.A,{spinning:e,tip:"uploading...",children:(0,o.jsxs)(dZ.A.Dragger,{multiple:!1,showUploadList:!1,accept:".json",onChange:e=>{let{file:t}=e;s(t)},style:{width:"100%"},beforeUpload:()=>!1,children:[(0,o.jsx)("p",{className:"ant-upload-drag-icon",children:(0,o.jsx)(dY.A,{})}),(0,o.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,o.jsxs)("p",{className:"ant-upload-hint",children:["The rsdoctor's rsdoctor-data.json is in brief mode, and use the file type: ['json'].",(0,o.jsx)("a",{href:"https://rsdoctor.rs/zh/config/options/output#mode-brief",target:"_blank",rel:"noopener noreferrer",children:"Check the details."})]}),(0,o.jsx)("p",{className:"ant-upload-hint",children:"By default, Rsdoctor will emit the rsdoctor-data.json to the output folder."})]})})},d2="Compile Analysis",d4={overall:(0,o.jsx)(e=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,o.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,o.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.781 3.5c.277 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478M6.615 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479M9.448 4.833c.276 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479",clipRule:"evenodd"}),(0,o.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),webpack:(0,o.jsx)(e=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,o.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,o.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.241 6.212 2.895 5.014 4.24 3.815M8.97 6.212l1.347-1.198-1.346-1.199M5.96 7.014l1.363-4"}),(0,o.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),bundle:(0,o.jsx)(e=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,o.jsx)("path",{fill:"#5E6673",fillRule:"evenodd",d:"M6.44.672a1 1 0 0 0-.977.013L.578 3.505l5.36 2.83 5.327-3.044zm-.992 12.777V7.206L.175 4.423v5.404a1 1 0 0 0 .5.866z",clipRule:"evenodd"}),(0,o.jsx)("path",{fill:"#5E6673",fillOpacity:.5,fillRule:"evenodd",d:"m5.466.683-.003.002L.658 3.459l.017-.01L5.448.693zM5.448 13.45V7.206L.175 4.423l5.273 2.783zm1-6.254 5.265-3.009q.009.064.009.13v5.511a1 1 0 0 1-.5.866L6.448 13.45z",clipRule:"evenodd"})]}),{})},d6=ig({api:X.SDK.ServerAPI.API.GetClientRoutes,responsePropName:"routes",Component:e=>{let{t}=s6(),{pathname:s}=(0,s2.zy)(),n=(0,s2.Zp)(),[r,i]=(0,w.useState)(d4),{routes:l}=e,a=sy(),d=l&&l.length>0?l:a||[];(0,w.useEffect)(()=>{s.includes("webpack")?i({...d4,webpack:(0,o.jsx)(lb,{})}):s.includes("overall")||"/"===s?i({...d4,overall:(0,o.jsx)(lA,{})}):s.includes("bundle")&&i({...d4,bundle:(0,o.jsx)(lS,{})})},[s]);let c={color:"rgba(96, 102, 114)"},u=[];d.includes(X.Manifest.RsdoctorManifestClientRoutes.Overall)&&u.push({label:t("Overall"),key:lv,icon:r.overall,children:[],onTitleClick(e){n(e.key)}}),(d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.ModuleResolve)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackPlugins))&&u.push({label:t(d2),key:d2,icon:r.webpack,children:[d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t("Loaders Timeline"),key:oP,icon:(0,o.jsx)(lm.A,{style:c})},d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t("Loaders Analysis"),key:oG,icon:(0,o.jsx)(lf.A,{style:c})},d.includes(X.Manifest.RsdoctorManifestClientRoutes.ModuleResolve)&&{label:t("ModuleResolve"),key:o0,icon:(0,o.jsx)(lx.A,{style:c})},d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackPlugins)&&{label:t("Plugins Analysis"),key:oU,icon:(0,o.jsx)(lg.A,{style:c})}].filter(e=>!!e)}),(d.includes(X.Manifest.RsdoctorManifestClientRoutes.BundleSize)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.ModuleGraph)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.TreeShaking))&&u.push({label:t(of),key:of,icon:r.bundle,children:[],onTitleClick(){n(ox)}});let h=(0,o.jsx)(ly.A,{items:u,mode:"horizontal",onClick:e=>{e.keyPath.includes("builder-switcher")||n(e.key)},overflowedIndicator:(0,o.jsx)(lj.A,{}),style:{height:x.NavBarHeight,lineHeight:`${x.NavBarHeight}px`,minWidth:0,justifyContent:"flex-end",...e.style},selectedKeys:["/"===s?lv:s]},d.join(""));return(0,o.jsx)("div",{style:{marginLeft:"30px"},children:h})},fallbackComponent:()=>null,showSkeleton:!1}),d3=e=>{let{enableRoutes:t}=e,{i18n:s}=s6(),n=(0,s2.Zp)(),{isLight:r}=rj(),i=[{value:f.Cn,label:"中文"},{value:f.En,label:"English"}];return(0,o.jsx)(lo.A.Header,{style:{height:x.NavBarHeight,padding:0,paddingLeft:x.BasePadding,paddingRight:x.BasePadding,position:"fixed",zIndex:999,width:"100%",backgroundColor:r?"#fff":"#141414",transition:"none"},children:(0,o.jsxs)(r7.A,{justify:"space-between",align:"middle",style:{height:x.NavBarHeight},wrap:!1,children:[(0,o.jsx)(r9.A,{style:{height:x.NavBarHeight,lineHeight:`${x.NavBarHeight+2}px`},children:(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"100%"},children:[(0,o.jsx)("img",{src:"https://assets.rspack.rs/rsdoctor/rsdoctor-title-logo.png",className:"rsdoctor-logo",alt:"logo",onClick:()=>{location.hash.includes(X.Client.RsdoctorClientRoutes.Uploader)&&location.pathname.includes("/preview")?location.href="http://rsdoctor.rs":n(X.Client.RsdoctorClientRoutes.Home)}}),(0,o.jsx)(lp,{})]})}),(0,o.jsx)(d6,{style:{transition:"none"}},t?JSON.stringify(t):"default"),(0,o.jsx)(r9.A,{flex:1,children:(0,o.jsxs)(r7.A,{align:"middle",justify:"end",style:{height:x.NavBarHeight},wrap:!1,gutter:[x.BasePadding/3,0],children:[(0,o.jsx)(r9.A,{children:(0,o.jsx)(i4,{})}),(0,o.jsx)(r9.A,{children:(0,o.jsx)(lu.A,{overlayStyle:{zIndex:1e3},menu:{items:i.map(e=>({label:e.label,key:e.value,onClick(){s.changeLanguage(e.value)}})),selectedKeys:[s.language]},children:(0,o.jsx)(lc.A,{className:"header-icon",style:{display:"inline-block",fontSize:20,textAlign:"center",verticalAlign:"middle",cursor:"pointer",width:30,transition:"all 0.3s ease"}})})})]})})]})})},d7=ig({api:X.SDK.ServerAPI.APIExtends.GetCompileProgress,responsePropName:"progress",Component:e=>{let{progress:t}=e;if(!t)return null;let{percentage:s=1,message:n}=t;if(s>=1)return null;let r=+(100*s).toFixed(1);return(0,o.jsx)(r7.A,{wrap:!0,style:{width:"100%",position:"fixed",top:x.NavBarHeight,left:1,zIndex:99},children:(0,o.jsx)(r9.A,{span:Math.min(Math.floor(24*s),24),children:(0,o.jsx)(lK.A,{percent:100,status:"active",size:"small",format:()=>(0,o.jsx)(rT.A.Text,{style:{fontSize:12},type:"secondary",children:`${r}% ${n}`})})})})},fallbackComponent:()=>null,showSkeleton:!1}),d9=e=>{let t=(0,w.useContext)(rg).locale,{i18n:s}=s6(),{children:n}=e,r=s7(),[i,l]=(0,w.useState)(()=>sy()||void 0);(0,w.useEffect)(()=>{let e=t;if(!v("FIRST_VISIT")){var n;A("FIRST_VISIT","1");let t="cn"===(n=window.navigator.language.split("-")[0])||"zh"===n?f.Cn:f.En;Object.values(f).includes(t)&&(e=t)}s.language!==e&&s.changeLanguage(e)},[t]),(0,w.useEffect)(()=>{l(sy()||void 0)},[r]);let a=(0,w.useContext)(rg);return(0,o.jsxs)(lo.A,{children:[a.embedded?null:(0,o.jsx)(d3,{enableRoutes:i}),(0,o.jsx)(d7,{}),(0,o.jsxs)(lo.A.Content,{style:{height:"100%",minHeight:"100vh",padding:x.BasePadding,marginTop:a.embedded?0:x.NavBarHeight,background:y},children:[n,(0,o.jsx)(ld.A.BackTop,{})]})]})};var d8=s(95121),ce=s(67409),ct=s(65691);function cs(){let e=[{path:ox,element:(0,o.jsx)(og,{})},{path:oG,element:(0,o.jsx)(oW,{})},{path:oU,element:(0,o.jsx)(oV,{})},{path:o0,element:(0,o.jsx)(o1,{})},{path:oP,element:(0,o.jsx)(oz,{})},{path:o2,element:(0,o.jsx)(o4,{})},{path:dh,element:(0,o.jsx)(dp,{})}].filter(e=>!!e);return(0,o.jsxs)(s2.BV,{children:[(0,o.jsx)(s2.qh,{path:"/",element:(0,o.jsx)(ar,{})}),(0,o.jsx)(s2.qh,{path:lv,element:(0,o.jsx)(ar,{})}),e.map(e=>(0,o.jsx)(s2.qh,{path:e.path,element:e.element},e.path)),(0,o.jsx)(s2.qh,{path:dV,element:(0,o.jsx)(dJ,{})}),(0,o.jsx)(s2.qh,{path:d1,element:(0,o.jsx)(d5,{})})]})}let{jK:cn,Sx:cr}=a;var ci=s(58997);let cl=document.getElementById("root");ci.createRoot(cl).render((0,o.jsx)(()=>{let e=!!("https:"===window.location.protocol&&window.location.href.indexOf("ide-proxy")>0),[t,s]=(0,w.useState)(cn.Success),[n,r]=(0,w.useState)({...rx.viewMode}),[i,l]=(0,w.useState)(),[a,d]=(0,w.useState)(rx.theme);return t===h.Fail?(0,o.jsxs)(sN.A,{direction:"vertical",style:{padding:14},children:[(0,o.jsx)(rT.A.Text,{strong:!0,style:{fontSize:16},children:"load json file of Rsdoctor failed."}),(0,o.jsxs)(rT.A.Text,{children:["try to use ",(0,o.jsx)(rT.A.Text,{keyboard:!0,children:"command + r"})," to refresh page."]}),null,(0,o.jsx)(r5.A,{}),(0,o.jsx)(sN.A,{direction:"vertical",style:{width:"100%"},children:(0,o.jsxs)(rT.A.Text,{style:{fontSize:16},children:["you can",(0,o.jsx)(rT.A.Text,{strong:!0,style:{fontSize:"inherit"},children:"upload a file"}),"in the area below to analyze your project."]})}),(0,o.jsx)(r5.A,{}),null]}):(0,o.jsx)(ct.I9,{children:(0,o.jsx)(rg.Provider,{value:{...rx,theme:a,setTheme:e=>{d(e),A("THEME",e)},pageState:t,json:i,viewMode:n,setManifest:l,setPageState:s,setViewMode(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s={...n,...e};r(s),t&&A("VIEWMODE",JSON.stringify(s))}},children:(0,o.jsx)(rg.Consumer,{children:s=>(0,o.jsx)(iU.Ay,{locale:nl(s.locale),theme:{algorithm:a===cr.Dark?sO.A.darkAlgorithm:sO.A.defaultAlgorithm,token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)",fontFamily:"var(--font-family-code)"}},children:(0,o.jsx)(d9,{children:(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(is.A,{message:"Warning",description:(0,o.jsx)("a",{href:window.location.href.replace(/https/,"http"),children:`Please jump to\u{FF1A}${window.location.href.replace(/https/,"http")}`}),type:"warning",showIcon:!0,closable:!0}),(0,o.jsx)(ce.tH,{FallbackComponent:e=>{let{error:s,resetErrorBoundary:n}=e;return(0,o.jsx)(d8.Ay,{status:"error",title:"Sorry, something went wrong.",extra:(0,o.jsx)(rH.Ay,{type:"primary",onClick:n,loading:t===cn.Pending,children:"Reload"}),children:(0,o.jsxs)(rT.A.Paragraph,{children:[(0,o.jsx)(rT.A.Title,{level:3,children:"Error Stack"}),(0,o.jsx)("pre",{children:s.stack||s.message})]})})},onReset:()=>{window.location.reload()},children:(0,o.jsx)(cs,{})})]})})})})})})},{}));let ca=document.createElement("link");ca.setAttribute("type","image/x-icon"),ca.setAttribute("rel","icon"),ca.setAttribute("href","https://assets.rspack.rs/rsdoctor/rsdoctor-logo-960x960.png"),document.head.appendChild(ca)},8769:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},35230:function(e,t){var s,n,r,i,l,a;Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorClientDiffState=t.RsdoctorClientRoutes=t.RsdoctorClientUrlQuery=void 0,(i=s||(t.RsdoctorClientUrlQuery=s={})).BundleDiffFiles="__bundle_files__",i.ManifestFile="manifest",i.EnableRoutes="enableRoutes",(l=n||(t.RsdoctorClientRoutes=n={})).Home="/",l.Overall="/overall",l.WebpackLoaderOverall="/webpack/loaders/overall",l.WebpackLoaderAnalysis="/webpack/loaders/analysis",l.ModuleResolve="/module/resolve",l.WebpackPlugins="/webpack/plugins",l.BundleSize="/bundle/size",l.ModuleAnalyze="/module/analyze",l.TreeShaking="/treeshaking",l.BundleDiff="/resources/bundle/diff",l.RuleIndex="/resources/rules",l.Uploader="/resources/uploader",l.EmoCheck="/emo/check",(a=r||(t.RsdoctorClientDiffState=r={})).Equal="-",a.Up="UP",a.Down="DOWN"},39076:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},68583:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},79452:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WINDOW_RSDOCTOR_TAG=t.RsdoctorClientUrl=t.RsdoctorProcessEnvDebugKey=t.RsdoctorMonitorDocBId=t.RsdoctorMonitorWebBId=t.RsdoctorMonitorNodeBId=t.StatsFilePath=t.RsdoctorOutputManifestPath=t.RsdoctorOutputManifest=t.RsdoctorOutputFolder=t.MapExtensions=t.FontExtensions=t.MediaExtensions=t.ImgExtensions=t.HtmlExtension=t.CSSExtension=t.JSExtension=void 0,t.JSExtension=".js",t.CSSExtension=".css",t.HtmlExtension=".html",t.ImgExtensions=[".png",".jpg",".svg",".webp",".jpeg",".gif",".bmp"],t.MediaExtensions=[".mp3",".mp4",".avi",".wav",".flv",".mov",".mpg",".mpeg"],t.FontExtensions=[".ttf",".fnt",".fon",".otf",".woff",".woff2"],t.MapExtensions=[".js.map",".css.map",".ts.map",".LICENSE.txt"],t.RsdoctorOutputFolder=".rsdoctor",t.RsdoctorOutputManifest="manifest.json",t.RsdoctorOutputManifestPath=`${t.RsdoctorOutputFolder}/${t.RsdoctorOutputManifest}`,t.StatsFilePath="dist/stats.json",t.RsdoctorMonitorNodeBId="Rsdoctor",t.RsdoctorMonitorWebBId="Rsdoctor-Client",t.RsdoctorMonitorDocBId="Rsdoctor-Doc",t.RsdoctorProcessEnvDebugKey="rsdoctor",t.RsdoctorClientUrl="",t.WINDOW_RSDOCTOR_TAG="__RSDOCTOR__"},5263:function(e,t){var s,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLevel=void 0,(n=s||(t.ErrorLevel=s={}))[n.Ignore=0]="Ignore",n[n.Warn=1]="Warn",n[n.Error=2]="Error"},40209:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},83397:function(e,t,s){var n,r=this&&this.__createBinding||(Object.create?function(e,t,s,n){void 0===n&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){void 0===n&&(n=s),e[n]=t[s]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||(n=function(e){return(n=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[t.length]=s);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s=n(e),l=0;l<s.length;l++)"default"!==s[l]&&r(t,e,s[l]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.Plugin=t.Constants=t.Client=t.Thirdparty=t.Rule=t.Linter=t.Modules=t.SDK=t.Logger=t.Err=t.Common=t.Babel=t.Esbuild=t.Manifest=void 0,t.Manifest=l(s(97260)),t.Esbuild=l(s(40209)),t.Babel=l(s(8769)),t.Common=l(s(39076)),t.Err=l(s(5263)),t.Logger=l(s(56157)),t.SDK=l(s(79338)),t.Modules=l(s(75960)),t.Linter=l(s(8220)),t.Rule=l(s(2616)),t.Thirdparty=l(s(14442)),t.Client=l(s(35230)),t.Constants=l(s(79452)),t.Plugin=l(s(90558)),t.Config=l(s(68583))},21957:function(e,t,s){Object.defineProperty(t,"__esModule",{value:!0}),t.Severity=void 0;var n=s(5263);Object.defineProperty(t,"Severity",{enumerable:!0,get:function(){return n.ErrorLevel}})},8220:function(e,t,s){var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){void 0===n&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){void 0===n&&(n=s),e[n]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(21957),t),r(s(37060),t)},37060:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},56157:function(e,t){var s,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(n=s||(t.LogLevel=s={}))[n.Silent=0]="Silent",n[n.Error=1]="Error",n[n.Warning=2]="Warning",n[n.Info=3]="Info",n[n.Debug=4]="Debug",n[n.Verbose=5]="Verbose"},97260:function(e,t){var s,n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorManifestClientConstant=t.RsdoctorManifestClientRoutes=void 0,(r=s||(t.RsdoctorManifestClientRoutes=s={})).Overall="Overall",r.WebpackLoaders="Compile.WebpackLoaders",r.ModuleResolve="Compile.ModuleResolve",r.WebpackPlugins="Compile.WebpackPlugins",r.BundleSize="Bundle.BundleSize",r.ModuleGraph="Bundle.ModuleGraph",r.TreeShaking="Bundle.TreeShaking",(n||(t.RsdoctorManifestClientConstant=n={})).WindowPropertyForManifestUrl="__DEVTOOLS_MANIFEST_URL__"},75960:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},64141:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},37115:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},76469:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},90558:function(e,t,s){var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){void 0===n&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){void 0===n&&(n=s),e[n]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(64141),t),r(s(76469),t),r(s(32814),t),r(s(37115),t),r(s(53035),t),r(s(24570),t),r(s(94110),t)},24570:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},32814:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},53035:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},94110:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},83085:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1001",t.message={code:t.code,title:"Duplicate Packages",type:"markdown",category:"bundle",description:`
|
|
94
|
+
${f}`,current:v.find(e=>e.path===f),baseline:y.find(e=>e.path===p)}:(y.forEach(t=>{let s=eS.formatAssetName(t.path,n);e[s]?console.warn("[Baseline Asset Exists]: ",t,e):e[s]={alias:s,baseline:t}}),v.forEach(t=>{let s=eS.formatAssetName(t.path,n);e[s]||(e[s]={alias:s}),e[s].current=t})),Object.values(e)},[y,v,p,f]),b=(0,w.useMemo)(()=>{let e=A.slice();if(r&&(e=e.filter(e=>e.alias.indexOf(r)>-1)),l.length){let t=l.map(e=>dG[e]).flat(),s=l.indexOf("Others")>-1;e=e.filter(e=>{let n=e.baseline||e.current;return!!eS.isAssetMatchExtensions(n,t)||!!s&&!eS.isAssetMatchExtensions(n,dK)})}if(d.length&&(e=e.filter(e=>e.baseline&&!e.current?d.includes(dv.Deleted):!e.baseline&&e.current?d.includes(dv.New):!!e.baseline&&!!e.current&&(e.baseline.size===e.current.size?d.includes(dv.NotChanged):d.includes(dv.Changed)))),u)if(u===dA.Name)e.sort((e,t)=>e.alias.localeCompare(t.alias));else{let{prev:r,others:i}=e.reduce((e,t)=>(t.current?t.baseline?e.prev.unshift(t):e.prev.push(t):e.others.push(t),e),{prev:[],others:[]});e=[...r.sort((e,r)=>{if(r.current&&e.current){if(u===dA.Delta){let{percent:i}=eS.diffAssetsByExtensions(t.chunkGraph,s.chunkGraph,t=>eS.formatAssetName(t.path,n)===e.alias),{percent:l}=eS.diffAssetsByExtensions(t.chunkGraph,s.chunkGraph,e=>eS.formatAssetName(e.path,n)===r.alias);return l-i}return r.current.size-e.current.size}return -1}),...i]}return e},[A,r,l,d,u]),S=(0,w.useMemo)(()=>(0,r4.A)(b,e=>e.current?e.current.size:0)||0,[b]),C=(0,w.useMemo)(()=>(0,r4.A)(b,e=>e.baseline?e.baseline.size:0)||0,[b]);return(0,o.jsxs)(r7.A,{gutter:[x.BasePadding,x.BasePadding],children:[(0,o.jsxs)(r9.A,{span:24,children:[(0,o.jsxs)(sN.A,{wrap:!0,children:[(0,o.jsx)(la,{icon:(0,o.jsx)(oy.A,{}),label:"",labelStyle:{width:45},placeholder:"Search by file name",onChange:e=>{i(e)}}),(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by file type",style:{width:250},options:Object.keys(dG).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{a(e)}}),(0,o.jsx)(lh.A,{mode:"multiple",placeholder:"Filter by file changed type",style:{width:200},options:Object.values(dv).map(e=>({label:e,value:e})),allowClear:!0,onChange:e=>{c(e)}}),(0,o.jsx)(lh.A,{suffixIcon:(0,o.jsx)(dF.A,{}),options:Object.values(dA).map(e=>({label:e,value:e})),value:u,onChange:e=>{h(e)}})]}),(0,o.jsxs)(r7.A,{style:{marginTop:10},gutter:[6,6],children:[(0,o.jsx)(r9.A,{children:(0,o.jsx)(rH.Ay,{children:"Select Baseline Asset and Current Asset to Diff "})}),(0,o.jsx)(r9.A,{children:(0,o.jsx)(lh.A,{allowClear:!0,placeholder:"select baseline assets",showSearch:!0,style:{width:300},options:Object.values(t.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>m(e)})}),(0,o.jsx)(r9.A,{children:(0,o.jsx)(lh.A,{allowClear:!0,placeholder:"select current assets",showSearch:!0,style:{width:300},options:Object.values(s.chunkGraph.assets).map(e=>({label:e.path,value:e.path})),onChange:e=>j(e)})})]})]}),(0,o.jsx)(r9.A,{span:24,children:(0,o.jsx)(lQ.A,{bordered:!0,sticky:{offsetHeader:54},pagination:{pageSize:20,size:"small"},dataSource:b,rowKey:e=>e.alias,expandable:{expandedRowRender:e=>(0,o.jsx)("div",{style:{margin:x.BasePadding/3},children:(0,o.jsx)(dM,{data:e,baseline:t,current:s})}),columnTitle:(0,o.jsx)(rR.A,{title:"Click to expand row to see the modules which the chunk contains",placement:"left",children:(0,o.jsx)(d$.A,{style:{cursor:"pointer"}})})},columns:[{title:(0,o.jsxs)(rR.A,{title:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["filtered assets is ",b.length]}),(0,o.jsxs)(rT.A.Text,{style:{color:"inherit"},children:["total assets is ",A.length]})]}),children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Assets"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{type:"secondary",style:{fontSize:10,fontWeight:400,marginRight:4},children:[b.length,"/",A.length]}),(0,o.jsx)(ii.A,{})]}),render:(e,t)=>(0,o.jsx)(dW,{data:t})},{title:()=>{let e=rv(S),t=eS.diffSize(C,S);return(0,o.jsxs)(rR.A,{title:`Current size is ${e}, Delta is ${rA(t.percent)}`,children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Current"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsxs)(rT.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:[(0,o.jsx)(rT.A.Text,{style:{fontSize:"inherit",marginRight:8},children:e}),(0,o.jsx)(rF,{fontSize:"inherit",baseline:C,current:S}),db(C,S,C>S?X.Client.RsdoctorClientDiffState.Down:X.Client.RsdoctorClientDiffState.Up,{fontSize:10,fontWeight:400,marginLeft:4})]}),(0,o.jsx)(ii.A,{})]})},render:(e,r)=>{if(r.current){let{percent:e,state:i}=eS.diffAssetsByExtensions(t.chunkGraph,s.chunkGraph,e=>eS.formatAssetName(e.path,n)===r.alias),l=eS.isInitialAsset(r.current,s.chunkGraph.chunks);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:rv(r.current.size)}),(0,o.jsx)(r$,{percent:e,state:i}),l?(0,o.jsx)(rP.A,{color:g.Blue,children:"initial"}):null]})}return"-"}},{title:()=>{let e=rv(C);return(0,o.jsxs)(rR.A,{title:`Baseline size is ${e}`,children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:"Baseline"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{style:{fontSize:10,fontWeight:400,marginRight:4},children:e}),(0,o.jsx)(ii.A,{})]})},render:(e,s)=>{if(s.baseline){let e=eS.isInitialAsset(s.baseline,t.chunkGraph.chunks);return(0,o.jsxs)(sN.A,{children:[(0,o.jsx)(rT.A.Text,{children:rv(s.baseline.size)}),e?(0,o.jsx)(rP.A,{color:g.Blue,children:"initial"}):null]})}return"-"}},{title:"Actions",key:"actions",render:(e,t)=>{var s,n;return(0,o.jsx)(dy,{file:t.alias,data:[{baseline:null==(s=t.baseline)?void 0:s.content,current:null==(n=t.current)?void 0:n.content,group:"assets"}]})}}]})})]})},dq=e=>{var t;let{api:s,body:n,children:r,manifests:i}=e,[l,a]=(null==(t=s7()[X.Client.RsdoctorClientUrlQuery.BundleDiffFiles])?void 0:t.split(","))||[];return(null==i?void 0:i.length)?(0,o.jsx)(o.Fragment,{children:r(i[0].data,i[1].data)}):(0,o.jsx)(ix,{api:s,body:n,manifestLoader:l?()=>sC(l):void 0,children:e=>(0,o.jsx)(ix,{api:s,body:n,manifestLoader:a?()=>sC(a):void 0,children:t=>r(e,t)})})},dU=e=>{let{manifests:t}=e;return(0,w.useEffect)(()=>{console.log("BundleDiff Manifests: ",t)},[t]),(0,o.jsx)(dq,{api:X.SDK.ServerAPI.API.GetBundleDiffSummary,manifests:t,children:(e,t)=>{let s=e.chunkGraph===t.chunkGraph,n=e.chunkGraph,r=s?n:t.chunkGraph,i=eS.getAssetsDiffResult(n,r);return(0,o.jsxs)("div",{children:[(0,o.jsxs)(ld.A.Group,{children:[(0,o.jsx)(rR.A,{placement:"leftBottom",title:(0,o.jsx)(sN.A,{direction:"vertical",children:[{title:"Baseline",data:e},{title:"Current",data:t}].map(e=>{let{title:t,data:s}=e;return(0,o.jsx)(r_.A,{size:"small",children:(0,o.jsxs)(sN.A,{direction:"vertical",children:[(0,o.jsx)(rT.A.Text,{strong:!0,children:t}),(0,o.jsxs)(sN.A,{style:{fontSize:10},children:[(0,o.jsx)(rT.A.Text,{style:{fontSize:"inherit",width:30,display:"inline-block"},children:"Hash"}),(0,o.jsx)(r5.A,{type:"vertical"}),(0,o.jsx)(rT.A.Text,{type:"secondary",style:{fontSize:"inherit"},children:s.hash||"-"})]}),s.cloudManifestUrl?(0,o.jsx)(rH.Ay,{type:"link",size:"small",style:{padding:0,fontSize:10},onClick:()=>window.open(s.cloudManifestUrl),children:"Open File"}):null]})},t)})}),children:(0,o.jsx)(ld.A,{icon:(0,o.jsx)(ii.A,{})})}),(0,o.jsx)(dm.A,{title:(0,o.jsxs)(rT.A.Text,{children:["Are you sure to",(0,o.jsx)(rT.A.Text,{strong:!0,children:" re-upload "}),"json files for bundle diff?"]}),onConfirm:()=>{},okText:"Yes",cancelText:"Cancel",placement:"topLeft",trigger:"hover",children:(0,o.jsx)(ld.A,{icon:(0,o.jsx)(df.A,{})})}),(0,o.jsx)(ld.A.BackTop,{})]}),(0,o.jsx)(dT,{baseline:e,current:t,onlyBaseline:s,assetsDiffResult:i}),(0,o.jsx)(rI.A,{defaultActiveKey:"Overview",tabBarStyle:{marginBottom:x.BasePadding/3},items:[{label:"Overview",key:"Overview",children:(0,o.jsx)(dR,{assetsDiffResult:i})},{label:"Assets",key:"Assets",children:(0,o.jsx)(dH,{outputFilename:e.outputFilename,baseline:e,current:t})},{label:"Modules",key:"Modules",children:(0,o.jsx)(dP,{baseline:e,current:t,onlyBaseline:s,assetsDiffResult:i})},{label:"Packages",key:"Packages",children:(0,o.jsx)(d_,{baseline:e.packageGraph,current:t.packageGraph})}].map(e=>({...e,label:(0,o.jsx)(rT.A.Text,{strong:!0,children:e.label})}))})]})}})},dV=X.Client.RsdoctorClientRoutes.BundleDiff,dJ=()=>(0,o.jsx)(dU,{manifests:[]});var dY=s(68338),dZ=s(16984);let dQ=[X.Manifest.RsdoctorManifestClientRoutes.Overall,X.Manifest.RsdoctorManifestClientRoutes.BundleSize],dX=(e,t)=>{window[X.Constants.WINDOW_RSDOCTOR_TAG]=e,window[X.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes=t;let s=(e=>{let t=`//${location.host}${location.pathname}#/overall`,s=e&&e.length>0?`?${X.Client.RsdoctorClientUrlQuery.EnableRoutes}=${encodeURIComponent(JSON.stringify(e))}`:"";return`${t}${s}`})(t);location.href=s,sI.Ay.success("JSON data loaded successfully!")},d0=async e=>{try{let t=await rD([e]);if(t&&t[0])dX(t[0].data,dQ);else throw Error("Invalid manifest data")}catch(t){let e=t instanceof Error?t.message:"Unknown error";throw sI.Ay.error(`Failed to load Rspack stats: ${e}`),t}},d1=X.Client.RsdoctorClientRoutes.Uploader,d5=()=>{let[e,t]=(0,w.useState)(!1),s=async e=>{if(e){t(!0);try{let t=await new Promise((t,s)=>{let n=new FileReader;n.onloadend=()=>{let{result:e}=n;console.log("reader result: ",e);try{let s=JSON.parse(e.toString());t(s)}catch(e){sI.Ay.error("json parse error"),s(e)}},n.onerror=()=>{let e="upload json file error, please try again.";sI.Ay.error(e),s(Error(e))},n.readAsText(e.originFileObj||e)});if(!t||"object"!=typeof t)throw Error("Invalid JSON format");if((0,rk.A)(t.assets)&&(0,rk.A)(t.chunks))await d0(t);else{try{let e=t.clientRoutes||dQ;dX(t.data,e)}catch(t){let e=t instanceof Error?t.message:"Unknown error";sI.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";sI.Ay.error(`Upload failed: ${e}`),console.error("Upload error:",t)}finally{t(!1)}}};return(0,o.jsx)(ip.A,{spinning:e,tip:"uploading...",children:(0,o.jsxs)(dZ.A.Dragger,{multiple:!1,showUploadList:!1,accept:".json",onChange:e=>{let{file:t}=e;s(t)},style:{width:"100%"},beforeUpload:()=>!1,children:[(0,o.jsx)("p",{className:"ant-upload-drag-icon",children:(0,o.jsx)(dY.A,{})}),(0,o.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,o.jsxs)("p",{className:"ant-upload-hint",children:["The rsdoctor's rsdoctor-data.json is in brief mode, and use the file type: ['json'].",(0,o.jsx)("a",{href:"https://rsdoctor.rs/zh/config/options/output#mode-brief",target:"_blank",rel:"noopener noreferrer",children:"Check the details."})]}),(0,o.jsx)("p",{className:"ant-upload-hint",children:"By default, Rsdoctor will emit the rsdoctor-data.json to the output folder."})]})})},d2="Compile Analysis",d4={overall:(0,o.jsx)(e=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,o.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,o.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.781 3.5c.277 0 .5.214.5.478v3.044a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478V3.978a.49.49 0 0 1 .5-.478M6.615 1.833c.276 0 .5.214.5.479v4.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-4.71a.49.49 0 0 1 .5-.479M9.448 4.833c.276 0 .5.214.5.479v1.71a.49.49 0 0 1-.5.478.49.49 0 0 1-.5-.478v-1.71a.49.49 0 0 1 .5-.479",clipRule:"evenodd"}),(0,o.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),webpack:(0,o.jsx)(e=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:13,height:12,fill:"none",viewBox:"0 0 13 12",...e,children:[(0,o.jsx)("rect",{width:12,height:9.333,x:.615,y:.167,fill:"#5E6673",rx:1}),(0,o.jsx)("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.241 6.212 2.895 5.014 4.24 3.815M8.97 6.212l1.347-1.198-1.346-1.199M5.96 7.014l1.363-4"}),(0,o.jsx)("rect",{width:6,height:1.333,x:3.615,y:10.5,fill:"#5E6673",fillOpacity:.5,rx:.667})]}),{}),bundle:(0,o.jsx)(e=>(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:12,height:14,fill:"none",viewBox:"0 0 12 14",...e,children:[(0,o.jsx)("path",{fill:"#5E6673",fillRule:"evenodd",d:"M6.44.672a1 1 0 0 0-.977.013L.578 3.505l5.36 2.83 5.327-3.044zm-.992 12.777V7.206L.175 4.423v5.404a1 1 0 0 0 .5.866z",clipRule:"evenodd"}),(0,o.jsx)("path",{fill:"#5E6673",fillOpacity:.5,fillRule:"evenodd",d:"m5.466.683-.003.002L.658 3.459l.017-.01L5.448.693zM5.448 13.45V7.206L.175 4.423l5.273 2.783zm1-6.254 5.265-3.009q.009.064.009.13v5.511a1 1 0 0 1-.5.866L6.448 13.45z",clipRule:"evenodd"})]}),{})},d6=ig({api:X.SDK.ServerAPI.API.GetClientRoutes,responsePropName:"routes",Component:e=>{let{t}=s6(),{pathname:s}=(0,s2.zy)(),n=(0,s2.Zp)(),[r,i]=(0,w.useState)(d4),{routes:l}=e,a=sy(),d=l&&l.length>0?l:a||[];(0,w.useEffect)(()=>{s.includes("webpack")?i({...d4,webpack:(0,o.jsx)(lb,{})}):s.includes("overall")||"/"===s?i({...d4,overall:(0,o.jsx)(lA,{})}):s.includes("bundle")&&i({...d4,bundle:(0,o.jsx)(lS,{})})},[s]);let c={color:"rgba(96, 102, 114)"},u=[];d.includes(X.Manifest.RsdoctorManifestClientRoutes.Overall)&&u.push({label:t("Overall"),key:lv,icon:r.overall,children:[],onTitleClick(e){n(e.key)}}),(d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.ModuleResolve)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackPlugins))&&u.push({label:t(d2),key:d2,icon:r.webpack,children:[d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t("Loaders Timeline"),key:oP,icon:(0,o.jsx)(lm.A,{style:c})},d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackLoaders)&&{label:t("Loaders Analysis"),key:oG,icon:(0,o.jsx)(lf.A,{style:c})},d.includes(X.Manifest.RsdoctorManifestClientRoutes.ModuleResolve)&&{label:t("ModuleResolve"),key:o0,icon:(0,o.jsx)(lx.A,{style:c})},d.includes(X.Manifest.RsdoctorManifestClientRoutes.WebpackPlugins)&&{label:t("Plugins Analysis"),key:oU,icon:(0,o.jsx)(lg.A,{style:c})}].filter(e=>!!e)}),(d.includes(X.Manifest.RsdoctorManifestClientRoutes.BundleSize)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.ModuleGraph)||d.includes(X.Manifest.RsdoctorManifestClientRoutes.TreeShaking))&&u.push({label:t(of),key:of,icon:r.bundle,children:[],onTitleClick(){n(ox)}});let h=(0,o.jsx)(ly.A,{items:u,mode:"horizontal",onClick:e=>{e.keyPath.includes("builder-switcher")||n(e.key)},overflowedIndicator:(0,o.jsx)(lj.A,{}),style:{height:x.NavBarHeight,lineHeight:`${x.NavBarHeight}px`,minWidth:0,justifyContent:"flex-end",...e.style},selectedKeys:["/"===s?lv:s]},d.join(""));return(0,o.jsx)("div",{style:{marginLeft:"30px"},children:h})},fallbackComponent:()=>null,showSkeleton:!1}),d3=e=>{let{enableRoutes:t}=e,{i18n:s}=s6(),n=(0,s2.Zp)(),{isLight:r}=rj(),i=[{value:f.Cn,label:"中文"},{value:f.En,label:"English"}];return(0,o.jsx)(lo.A.Header,{style:{height:x.NavBarHeight,padding:0,paddingLeft:x.BasePadding,paddingRight:x.BasePadding,position:"fixed",zIndex:999,width:"100%",backgroundColor:r?"#fff":"#141414",transition:"none"},children:(0,o.jsxs)(r7.A,{justify:"space-between",align:"middle",style:{height:x.NavBarHeight},wrap:!1,children:[(0,o.jsx)(r9.A,{style:{height:x.NavBarHeight,lineHeight:`${x.NavBarHeight+2}px`},children:(0,o.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"100%"},children:[(0,o.jsx)("img",{src:"https://assets.rspack.rs/rsdoctor/rsdoctor-title-logo.png",className:"rsdoctor-logo",alt:"logo",onClick:()=>{location.hash.includes(X.Client.RsdoctorClientRoutes.Uploader)&&location.pathname.includes("/preview")?location.href="http://rsdoctor.rs":n(X.Client.RsdoctorClientRoutes.Home)}}),(0,o.jsx)(lp,{})]})}),(0,o.jsx)(d6,{style:{transition:"none"}},t?JSON.stringify(t):"default"),(0,o.jsx)(r9.A,{flex:1,children:(0,o.jsxs)(r7.A,{align:"middle",justify:"end",style:{height:x.NavBarHeight},wrap:!1,gutter:[x.BasePadding/3,0],children:[(0,o.jsx)(r9.A,{children:(0,o.jsx)(i4,{})}),(0,o.jsx)(r9.A,{children:(0,o.jsx)(lu.A,{overlayStyle:{zIndex:1e3},menu:{items:i.map(e=>({label:e.label,key:e.value,onClick(){s.changeLanguage(e.value)}})),selectedKeys:[s.language]},children:(0,o.jsx)(lc.A,{className:"header-icon",style:{display:"inline-block",fontSize:20,textAlign:"center",verticalAlign:"middle",cursor:"pointer",width:30,transition:"all 0.3s ease"}})})})]})})]})})},d7=ig({api:X.SDK.ServerAPI.APIExtends.GetCompileProgress,responsePropName:"progress",Component:e=>{let{progress:t}=e;if(!t)return null;let{percentage:s=1,message:n}=t;if(s>=1)return null;let r=+(100*s).toFixed(1);return(0,o.jsx)(r7.A,{wrap:!0,style:{width:"100%",position:"fixed",top:x.NavBarHeight,left:1,zIndex:99},children:(0,o.jsx)(r9.A,{span:Math.min(Math.floor(24*s),24),children:(0,o.jsx)(lK.A,{percent:100,status:"active",size:"small",format:()=>(0,o.jsx)(rT.A.Text,{style:{fontSize:12},type:"secondary",children:`${r}% ${n}`})})})})},fallbackComponent:()=>null,showSkeleton:!1}),d9=e=>{let t=(0,w.useContext)(rg).locale,{i18n:s}=s6(),{children:n}=e,r=s7(),[i,l]=(0,w.useState)(()=>sy()||void 0);(0,w.useEffect)(()=>{let e=t;if(!v("FIRST_VISIT")){var n;A("FIRST_VISIT","1");let t="cn"===(n=window.navigator.language.split("-")[0])||"zh"===n?f.Cn:f.En;Object.values(f).includes(t)&&(e=t)}s.language!==e&&s.changeLanguage(e)},[t]),(0,w.useEffect)(()=>{l(sy()||void 0)},[r]);let a=(0,w.useContext)(rg);return(0,o.jsxs)(lo.A,{children:[a.embedded?null:(0,o.jsx)(d3,{enableRoutes:i}),(0,o.jsx)(d7,{}),(0,o.jsxs)(lo.A.Content,{style:{height:"100%",minHeight:"100vh",padding:x.BasePadding,marginTop:a.embedded?0:x.NavBarHeight,background:y},children:[n,(0,o.jsx)(ld.A.BackTop,{})]})]})};var d8=s(95121),ce=s(67409),ct=s(65691);function cs(){let e=[{path:ox,element:(0,o.jsx)(og,{})},{path:oG,element:(0,o.jsx)(oW,{})},{path:oU,element:(0,o.jsx)(oV,{})},{path:o0,element:(0,o.jsx)(o1,{})},{path:oP,element:(0,o.jsx)(oz,{})},{path:o2,element:(0,o.jsx)(o4,{})},{path:dh,element:(0,o.jsx)(dp,{})}].filter(e=>!!e);return(0,o.jsxs)(s2.BV,{children:[(0,o.jsx)(s2.qh,{path:"/",element:(0,o.jsx)(ar,{})}),(0,o.jsx)(s2.qh,{path:lv,element:(0,o.jsx)(ar,{})}),e.map(e=>(0,o.jsx)(s2.qh,{path:e.path,element:e.element},e.path)),(0,o.jsx)(s2.qh,{path:dV,element:(0,o.jsx)(dJ,{})}),(0,o.jsx)(s2.qh,{path:d1,element:(0,o.jsx)(d5,{})})]})}let{jK:cn,Sx:cr}=a;var ci=s(58997);let cl=document.getElementById("root");ci.createRoot(cl).render((0,o.jsx)(()=>{let e=!!("https:"===window.location.protocol&&window.location.href.indexOf("ide-proxy")>0),[t,s]=(0,w.useState)(cn.Success),[n,r]=(0,w.useState)({...rx.viewMode}),[i,l]=(0,w.useState)(),[a,d]=(0,w.useState)(rx.theme);return t===h.Fail?(0,o.jsxs)(sN.A,{direction:"vertical",style:{padding:14},children:[(0,o.jsx)(rT.A.Text,{strong:!0,style:{fontSize:16},children:"load json file of Rsdoctor failed."}),(0,o.jsxs)(rT.A.Text,{children:["try to use ",(0,o.jsx)(rT.A.Text,{keyboard:!0,children:"command + r"})," to refresh page."]}),null,(0,o.jsx)(r5.A,{}),(0,o.jsx)(sN.A,{direction:"vertical",style:{width:"100%"},children:(0,o.jsxs)(rT.A.Text,{style:{fontSize:16},children:["you can",(0,o.jsx)(rT.A.Text,{strong:!0,style:{fontSize:"inherit"},children:"upload a file"}),"in the area below to analyze your project."]})}),(0,o.jsx)(r5.A,{}),null]}):(0,o.jsx)(ct.I9,{children:(0,o.jsx)(rg.Provider,{value:{...rx,theme:a,setTheme:e=>{d(e),A("THEME",e)},pageState:t,json:i,viewMode:n,setManifest:l,setPageState:s,setViewMode(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],s={...n,...e};r(s),t&&A("VIEWMODE",JSON.stringify(s))}},children:(0,o.jsx)(rg.Consumer,{children:s=>(0,o.jsx)(iU.Ay,{locale:nl(s.locale),theme:{algorithm:a===cr.Dark?sO.A.darkAlgorithm:sO.A.defaultAlgorithm,token:{padding:16,colorText:"rgba(0, 0, 0, 0.85)",fontFamily:"var(--font-family-code)"}},children:(0,o.jsx)(d9,{children:(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)(is.A,{message:"Warning",description:(0,o.jsx)("a",{href:window.location.href.replace(/https/,"http"),children:`Please jump to\u{FF1A}${window.location.href.replace(/https/,"http")}`}),type:"warning",showIcon:!0,closable:!0}),(0,o.jsx)(ce.tH,{FallbackComponent:e=>{let{error:s,resetErrorBoundary:n}=e;return(0,o.jsx)(d8.Ay,{status:"error",title:"Sorry, something went wrong.",extra:(0,o.jsx)(rH.Ay,{type:"primary",onClick:n,loading:t===cn.Pending,children:"Reload"}),children:(0,o.jsxs)(rT.A.Paragraph,{children:[(0,o.jsx)(rT.A.Title,{level:3,children:"Error Stack"}),(0,o.jsx)("pre",{children:s.stack||s.message})]})})},onReset:()=>{window.location.reload()},children:(0,o.jsx)(cs,{})})]})})})})})})},{}));let ca=document.createElement("link");ca.setAttribute("type","image/x-icon"),ca.setAttribute("rel","icon"),ca.setAttribute("href","https://assets.rspack.rs/rsdoctor/rsdoctor-logo-960x960.png"),document.head.appendChild(ca)},8769:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},35230:function(e,t){var s,n,r,i,l,a;Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorClientDiffState=t.RsdoctorClientRoutes=t.RsdoctorClientUrlQuery=void 0,(i=s||(t.RsdoctorClientUrlQuery=s={})).BundleDiffFiles="__bundle_files__",i.ManifestFile="manifest",i.EnableRoutes="enableRoutes",(l=n||(t.RsdoctorClientRoutes=n={})).Home="/",l.Overall="/overall",l.WebpackLoaderOverall="/webpack/loaders/overall",l.WebpackLoaderAnalysis="/webpack/loaders/analysis",l.ModuleResolve="/module/resolve",l.WebpackPlugins="/webpack/plugins",l.BundleSize="/bundle/size",l.ModuleAnalyze="/module/analyze",l.TreeShaking="/treeshaking",l.BundleDiff="/resources/bundle/diff",l.RuleIndex="/resources/rules",l.Uploader="/resources/uploader",l.EmoCheck="/emo/check",(a=r||(t.RsdoctorClientDiffState=r={})).Equal="-",a.Up="UP",a.Down="DOWN"},39076:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},68583:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},79452:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.WINDOW_RSDOCTOR_TAG=t.RsdoctorClientUrl=t.RsdoctorProcessEnvDebugKey=t.RsdoctorMonitorDocBId=t.RsdoctorMonitorWebBId=t.RsdoctorMonitorNodeBId=t.StatsFilePath=t.RsdoctorOutputManifestPath=t.RsdoctorOutputManifest=t.RsdoctorOutputFolder=t.MapExtensions=t.FontExtensions=t.MediaExtensions=t.ImgExtensions=t.HtmlExtension=t.CSSExtension=t.JSExtension=void 0,t.JSExtension=".js",t.CSSExtension=".css",t.HtmlExtension=".html",t.ImgExtensions=[".png",".jpg",".svg",".webp",".jpeg",".gif",".bmp"],t.MediaExtensions=[".mp3",".mp4",".avi",".wav",".flv",".mov",".mpg",".mpeg"],t.FontExtensions=[".ttf",".fnt",".fon",".otf",".woff",".woff2"],t.MapExtensions=[".js.map",".css.map",".ts.map",".LICENSE.txt"],t.RsdoctorOutputFolder=".rsdoctor",t.RsdoctorOutputManifest="manifest.json",t.RsdoctorOutputManifestPath=`${t.RsdoctorOutputFolder}/${t.RsdoctorOutputManifest}`,t.StatsFilePath="dist/stats.json",t.RsdoctorMonitorNodeBId="Rsdoctor",t.RsdoctorMonitorWebBId="Rsdoctor-Client",t.RsdoctorMonitorDocBId="Rsdoctor-Doc",t.RsdoctorProcessEnvDebugKey="rsdoctor",t.RsdoctorClientUrl="",t.WINDOW_RSDOCTOR_TAG="__RSDOCTOR__"},5263:function(e,t){var s,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLevel=void 0,(n=s||(t.ErrorLevel=s={}))[n.Ignore=0]="Ignore",n[n.Warn=1]="Warn",n[n.Error=2]="Error"},40209:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},83397:function(e,t,s){var n,r=this&&this.__createBinding||(Object.create?function(e,t,s,n){void 0===n&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){void 0===n&&(n=s),e[n]=t[s]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||(n=function(e){return(n=Object.getOwnPropertyNames||function(e){var t=[];for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[t.length]=s);return t})(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var s=n(e),l=0;l<s.length;l++)"default"!==s[l]&&r(t,e,s[l]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.Config=t.Plugin=t.Constants=t.Client=t.Thirdparty=t.Rule=t.Linter=t.Modules=t.SDK=t.Logger=t.Err=t.Common=t.Babel=t.Esbuild=t.Manifest=void 0,t.Manifest=l(s(97260)),t.Esbuild=l(s(40209)),t.Babel=l(s(8769)),t.Common=l(s(39076)),t.Err=l(s(5263)),t.Logger=l(s(56157)),t.SDK=l(s(79338)),t.Modules=l(s(75960)),t.Linter=l(s(8220)),t.Rule=l(s(2616)),t.Thirdparty=l(s(14442)),t.Client=l(s(35230)),t.Constants=l(s(79452)),t.Plugin=l(s(90558)),t.Config=l(s(68583))},21957:function(e,t,s){Object.defineProperty(t,"__esModule",{value:!0}),t.Severity=void 0;var n=s(5263);Object.defineProperty(t,"Severity",{enumerable:!0,get:function(){return n.ErrorLevel}})},8220:function(e,t,s){var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){void 0===n&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){void 0===n&&(n=s),e[n]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(21957),t),r(s(37060),t)},37060:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},56157:function(e,t){var s,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(n=s||(t.LogLevel=s={}))[n.Silent=0]="Silent",n[n.Error=1]="Error",n[n.Warning=2]="Warning",n[n.Info=3]="Info",n[n.Debug=4]="Debug",n[n.Verbose=5]="Verbose"},97260:function(e,t){var s,n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.RsdoctorManifestClientConstant=t.RsdoctorManifestClientRoutes=void 0,(r=s||(t.RsdoctorManifestClientRoutes=s={})).Overall="Overall",r.WebpackLoaders="Compile.WebpackLoaders",r.ModuleResolve="Compile.ModuleResolve",r.WebpackPlugins="Compile.WebpackPlugins",r.BundleSize="Bundle.BundleSize",r.ModuleGraph="Bundle.ModuleGraph",r.TreeShaking="Bundle.TreeShaking",(n||(t.RsdoctorManifestClientConstant=n={})).WindowPropertyForManifestUrl="__DEVTOOLS_MANIFEST_URL__"},75960:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},64141:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},37115:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},76469:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},90558:function(e,t,s){var n=this&&this.__createBinding||(Object.create?function(e,t,s,n){void 0===n&&(n=s);var r=Object.getOwnPropertyDescriptor(t,s);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[s]}}),Object.defineProperty(e,n,r)}:function(e,t,s,n){void 0===n&&(n=s),e[n]=t[s]}),r=this&&this.__exportStar||function(e,t){for(var s in e)"default"===s||Object.prototype.hasOwnProperty.call(t,s)||n(t,e,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s(64141),t),r(s(76469),t),r(s(32814),t),r(s(37115),t),r(s(53035),t),r(s(24570),t),r(s(94110),t)},24570:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},32814:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},53035:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},94110:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},83085:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.message=t.code=void 0,t.code="E1001",t.message={code:t.code,title:"Duplicate Packages",type:"markdown",category:"bundle",description:`
|
|
95
95
|
#### Description
|
|
96
96
|
|
|
97
97
|
There is a same name package which is bundled in multiple versions in your application.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/client",
|
|
3
|
-
"version": "1.3.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"main": "dist/index.html",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"sirv": "2.0.4",
|
|
30
30
|
"source-map-loader": "^5.0.0",
|
|
31
31
|
"typescript": "^5.9.2",
|
|
32
|
-
"@rsdoctor/components": "1.3.0
|
|
33
|
-
"@rsdoctor/types": "1.3.0
|
|
32
|
+
"@rsdoctor/components": "1.3.0",
|
|
33
|
+
"@rsdoctor/types": "1.3.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public",
|