@vitejs/devtools-rolldown 0.1.13 → 0.1.15
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.mjs +39 -712
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{BckBWP8Y.js → 5SREwa_J.js} +1 -1
- package/dist/public/_nuxt/B5QvmzNX.js +4 -0
- package/dist/public/_nuxt/BA4aNJdc.js +1 -0
- package/dist/public/_nuxt/{BbMdHIyp.js → BPvXWYcE.js} +1 -1
- package/dist/public/_nuxt/BRHdn2TP2.js +1 -0
- package/dist/public/_nuxt/{YInJexJm.js → BYcqRSer.js} +1 -1
- package/dist/public/_nuxt/{utGBqPQW.js → BodOO8Ge.js} +1 -1
- package/dist/public/_nuxt/Bt8oNIjq.js +1 -0
- package/dist/public/_nuxt/{CljeSbIq.js → BtFAY2HJ.js} +4 -4
- package/dist/public/_nuxt/{r0DxGHyz.js → C1f8uPlQ.js} +1 -1
- package/dist/public/_nuxt/C9-K8SRH.js +1 -0
- package/dist/public/_nuxt/{BrH7MV2S.js → CJmfH1zY.js} +1 -1
- package/dist/public/_nuxt/CJzuZNT1.js +2 -0
- package/dist/public/_nuxt/CL3oUTGS2.js +1 -0
- package/dist/public/_nuxt/CRfXUi3G.js +3 -0
- package/dist/public/_nuxt/CVZqt4yY2.js +1 -0
- package/dist/public/_nuxt/CfHRbb-n.js +1 -0
- package/dist/public/_nuxt/CjvJJTNy.js +1 -0
- package/dist/public/_nuxt/{hkrGm6WL.js → CorBKXDd.js} +1 -1
- package/dist/public/_nuxt/{BpHzZqln.js → CpTuuES2.js} +1 -1
- package/dist/public/_nuxt/{BKnfiF85.js → CqNyqKYk.js} +1 -1
- package/dist/public/_nuxt/{CfMio2JI2.js → CsPVvMxF.js} +1 -1
- package/dist/public/_nuxt/CzCoBrqM.js +1 -0
- package/dist/public/_nuxt/{wJd4eZyr.js → D0nH_IG_.js} +1 -1
- package/dist/public/_nuxt/{BMpbzaZm2.js → DEctdyhd.js} +1 -1
- package/dist/public/_nuxt/{ByozAWPX.js → DM5zgFwu.js} +1 -1
- package/dist/public/_nuxt/{BKUGy95W.js → DWUsdlci.js} +1 -1
- package/dist/public/_nuxt/D_58kiGa.js +1 -0
- package/dist/public/_nuxt/{DxL6khwF.js → Dab8rtPt.js} +1 -1
- package/dist/public/_nuxt/{DdnjLjA0.js → DlEGTOj9.js} +1 -1
- package/dist/public/_nuxt/DmctoHT82.js +1 -0
- package/dist/public/_nuxt/{Bgi9Q5oI2.js → DyCHFg1-2.js} +1 -1
- package/dist/public/_nuxt/{D5gbExwF.js → EWiwEEMI.js} +1 -1
- package/dist/public/_nuxt/{_session_.BcWOaqe_.css → _session_.Dk6Grde1.css} +1 -1
- package/dist/public/_nuxt/bh0jgFfK.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/325e31f5-a39f-4526-a997-a203cd2d5c81.json +1 -0
- package/dist/public/_nuxt/{entry.BbPdpfMZ.css → entry.bUxZ6pRq.css} +1 -1
- package/dist/public/_nuxt/error-404.CcKyMNIP.css +1 -0
- package/dist/public/_nuxt/error-500.Bsd8omR1.css +1 -0
- package/dist/public/_nuxt/{0b3Up9kD.js → hY2iPUYh.js} +1 -1
- package/dist/public/_nuxt/{BoT0VeIE2.js → jSaCY0lI2.js} +1 -1
- package/dist/public/_nuxt/{BJrTj8Zw.js → lNa1kApa.js} +1 -1
- package/dist/public/_nuxt/mLM3LnKH.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +12 -14
- package/dist/public/_nuxt/B78U2q4j.js +0 -1
- package/dist/public/_nuxt/BTLlCOZ3.js +0 -1
- package/dist/public/_nuxt/BfJK_SLU.js +0 -3
- package/dist/public/_nuxt/Bw6oKINi.js +0 -1
- package/dist/public/_nuxt/C3WaG9_l.js +0 -1
- package/dist/public/_nuxt/C6fMHFxG.js +0 -1
- package/dist/public/_nuxt/D1VsDu4A.js +0 -1
- package/dist/public/_nuxt/D8Vpa9yk2.js +0 -1
- package/dist/public/_nuxt/DJz_FUcO.js +0 -1
- package/dist/public/_nuxt/DKF2_lrC2.js +0 -1
- package/dist/public/_nuxt/DZUBLlU02.js +0 -1
- package/dist/public/_nuxt/Db9eNfm22.js +0 -1
- package/dist/public/_nuxt/Dddjvfu6.js +0 -1
- package/dist/public/_nuxt/DvOe6iF7.js +0 -1
- package/dist/public/_nuxt/FPPtwoaF.js +0 -1
- package/dist/public/_nuxt/MX5lF8O0.js +0 -1
- package/dist/public/_nuxt/builds/meta/13cd8559-86c3-48c3-847a-978c5a89a258.json +0 -1
- package/dist/public/_nuxt/error-404.CIXJRNVA.css +0 -1
- package/dist/public/_nuxt/error-500.D6HhFSba.css +0 -1
- package/dist/public/_nuxt/h4IG5O3d.js +0 -2
- package/dist/public/_nuxt/mPjDuzbZ2.js +0 -1
- package/dist/public/_nuxt/qiDKcEVG2.js +0 -1
- package/dist/public/_nuxt/yaHSMaAX.js +0 -1
- /package/dist/public/_nuxt/{D4aX0j39.js → 5tvbNeKa.js} +0 -0
- /package/dist/public/_nuxt/{XAUaDDss.js → BUwCbG2W.js} +0 -0
- /package/dist/public/_nuxt/{CKJSqDo0.js → CqfNwh25.js} +0 -0
- /package/dist/public/_nuxt/{Cvg1SSG2.js → DoJ6DaKu.js} +0 -0
- /package/dist/public/_nuxt/{CB2VayxA2.js → qIAw3Eg02.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,Ct as t,Dt as n,F as r,G as i,H as a,M as o,a as s,b as c,c as l,i as u,xt as d}from"./
|
|
1
|
+
import{$ as e,Ct as t,Dt as n,F as r,G as i,H as a,M as o,a as s,b as c,c as l,i as u,xt as d}from"./CRfXUi3G.js";import{F as f,L as p,M as m,O as h,S as g,a as _,b as v,i as y,j as b,n as x,r as S,w as C,x as w}from"./CpTuuES2.js";var T=(...e)=>e.find(e=>e!==void 0);function E(l){let f=l.componentName||`NuxtLink`;function p(e){return typeof e==`string`&&e.startsWith(`#`)}function E(e,t,n){let r=n??l.trailingSlash;if(!e||r!==`append`&&r!==`remove`)return e;if(typeof e==`string`)return O(e,r);let i=`path`in e&&e.path!==void 0?e.path:t(e).path;return{...e,name:void 0,path:O(i,r)}}function D(t){let r=C(),i=s(),a=c(()=>!!n(t.target)&&n(t.target)!==`_self`),o=c(()=>{let e=n(t.to)||n(t.href)||``;return typeof e==`string`&&h(e,{acceptRelative:!0})}),u=e(`RouterLink`),d=u&&typeof u!=`string`?u.useLink:void 0,f=c(()=>{if(n(t.external))return!0;let e=n(t.to)||n(t.href)||``;return typeof e==`object`?!1:e===``||o.value}),m=c(()=>{let e=n(t.to)||n(t.href)||``;return f.value?e:E(e,r.resolve,n(t.trailingSlash))}),_=f.value?void 0:d?.({...t,to:m,viewTransition:n(t.viewTransition)}),v=c(()=>{let e=n(t.trailingSlash)??l.trailingSlash;if(!m.value||o.value||p(m.value))return m.value;if(f.value){let t=typeof m.value==`object`&&`path`in m.value?g(m.value):m.value;return O(typeof t==`object`?r.resolve(t).href:t,e)}return typeof m.value==`object`?r.resolve(m.value)?.href??null:O(b(i.app.baseURL,m.value),e)});return{to:m,hasTarget:a,isAbsoluteUrl:o,isExternal:f,href:v,isActive:_?.isActive??c(()=>m.value===r.currentRoute.value.path),isExactActive:_?.isExactActive??c(()=>m.value===r.currentRoute.value.path),route:_?.route??c(()=>r.resolve(m.value)),async navigate(e){await w(v.value,{replace:n(t.replace),external:f.value||a.value})}}}return o({name:f,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:D,setup(n,{slots:o}){let s=C(),{to:c,href:f,navigate:h,isExternal:b,hasTarget:w,isAbsoluteUrl:E}=D(n),O=t(!1),A=d(null),M=e=>{A.value=n.custom?e?.$el?.nextElementSibling:e?.$el};function N(e){return!O.value&&(typeof n.prefetchOn==`string`?n.prefetchOn===e:n.prefetchOn?.[e]??l.prefetchOn?.[e])&&(n.prefetch??l.prefetch)!==!1&&n.noPrefetch!==!0&&n.target!==`_blank`&&!j()}async function P(e=u()){if(O.value)return;O.value=!0;let t=typeof c.value==`string`?c.value:b.value?g(c.value):s.resolve(c.value).fullPath,n=b.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n)?.catch(()=>{}),!b.value&&!w.value&&x(c.value,s).catch(()=>{})])}if(N(`visibility`)){let e=u(),t,n=null;i(()=>{let r=k();S(()=>{t=_(()=>{A?.value?.tagName&&(n=r.observe(A.value,async()=>{n?.(),n=null,await P(e)}))})})}),a(()=>{t&&y(t),n?.(),n=null})}return()=>{if(!b.value&&!w.value&&!p(c.value)){let t={ref:M,to:c.value,activeClass:n.activeClass||l.activeClass,exactActiveClass:n.exactActiveClass||l.exactActiveClass,replace:n.replace,ariaCurrentValue:n.ariaCurrentValue,custom:n.custom};return n.custom||(N(`interaction`)&&(t.onPointerenter=P.bind(null,void 0),t.onFocus=P.bind(null,void 0)),O.value&&(t.class=n.prefetchedClass||l.prefetchedClass),t.rel=n.rel||void 0),r(e(`RouterLink`),t,o.default)}let t=n.target||null,i=T(n.noRel?``:n.rel,l.externalRelAttribute,E.value||w.value?`noopener noreferrer`:``)||null;return n.custom?o.default?o.default({href:f.value,navigate:h,prefetch:P,get route(){if(!f.value)return;let e=new URL(f.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return m(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:f.value}},rel:i,target:t,isExternal:b.value||w.value,isActive:!1,isExactActive:!1}):null:r(`a`,{ref:A,href:f.value||null,rel:i,target:t,onClick:async e=>{if(!(b.value||w.value)){e.preventDefault();try{let e=v(f.value);return await(n.replace?s.replace(e):s.push(e))}finally{if(p(c.value)){let e=c.value.slice(1),t=e;try{t=decodeURIComponent(e)}catch{}document.getElementById(t)?.focus()}}}}},o.default?.())}}})}var D=E(l);function O(e,t){let n=t===`append`?f:p;return h(e)&&!e.startsWith(`http`)?e:n(e,!0)}function k(){let e=u();if(e._observer)return e._observer;let t=null,n=new Map;return e._observer={observe:(e,r)=>(t||=new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),n.set(e,r),t.observe(e),()=>{n.delete(e),t?.unobserve(e),n.size===0&&(t?.disconnect(),t=null)})}}var A=/2g/;function j(){let e=navigator.connection;return!!(e&&(e.saveData||A.test(e.effectiveType)))}export{D as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./B5QvmzNX.js";import{A as t,C as n,G as r,Kt as i,M as a,S as o,Ut as s,Z as c,b as l,h as u,k as d,lt as f,q as p,w as m,x as h,xt as g,z as _}from"./CRfXUi3G.js";import{C as v}from"./CpTuuES2.js";import{n as y}from"#entry";import{t as b}from"./DWUsdlci.js";import{t as x}from"./lNa1kApa.js";import{t as S}from"./CqfNwh25.js";var C=Object.assign(a({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,n=l(()=>t.previous===t.current),r=l(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(n.value?0:2)),a=l(()=>n.value?``:t.current>t.previous?`+`:`-`),o=l(()=>n.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(p(),m(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:s(o.value)},i(a.value)+i(r.value)+`% `,3))}}),{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=Object.assign(a({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=l(()=>t.format===`bytes`?S(t.current):t.current);return(t,a)=>{let c=C;return p(),m(u,null,[h(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[h(`div`,{class:s([e.icon,`text-xl`])},null,2),d(` `+i(e.name),1)],8,w),h(`div`,T,[e.format===`bytes`?(p(),m(`div`,E,[h(`span`,D,i(r.value[0]),1),h(`span`,O,i(r.value[1]),1)])):(p(),m(`div`,k,[h(`span`,A,i(r.value),1)])),e.previous>0&&e.current>0?(p(),o(c,{key:2,current:e.current,previous:e.previous},null,8,[`current`,`previous`])):n(``,!0)])],64)}}}),{__name:`CompareMetricCard`}),M={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},N={flex:`~ gap-2`},P={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},F={grid:`~ cols-6 gap5`,"w-full":``,pt3:``},I=a({__name:`index`,setup(n){let i=g(!1),a=v().params,S=e(),C=g([]),w=g([]);async function T(e){let t=await S.value.call(`vite:rolldown:get-packages`,{session:e}),n=t.filter(e=>e.duplicated);return{total:t.length,duplicated:n.length}}r(async()=>{i.value=!0;let e=a.sessions.split(`,`),[t,...n]=await Promise.all([S.value.call(`vite:rolldown:get-session-compare-summary`,{sessions:e}),...e.map(e=>T(e))]);C.value=t,w.value=n,i.value=!1});let E=l(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),D=l(()=>{let[e,t]=E.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph-file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Packages`,description:`Total number of packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.total??0,previous:w.value?.[0]?.total??0},{name:`Duplicated Packages`,description:`Total number of duplicated packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.duplicated??0,previous:w.value?.[0]?.duplicated??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(e,n)=>{let r=y,a=b,l=x,g=j;return i.value?(p(),o(r,{key:0})):(p(),m(`div`,M,[h(`div`,N,[t(a,{"btn-action":``,to:{path:`/`}},{default:f(()=>[...n[0]||=[h(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),d(` Re-select Session `,-1)]]),_:1})]),h(`div`,P,[n[1]||=h(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),t(l,{sessions:E.value},null,8,[`sessions`]),h(`div`,F,[(p(!0),m(u,null,c(D.value,(e,n)=>(p(),m(`div`,{key:e.name,class:s(n<2?`col-span-3`:`col-span-2`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[t(g,_({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e,ot as t,vt as n,wt as r,yt as i}from"./
|
|
1
|
+
import{b as e,ot as t,vt as n,wt as r,yt as i}from"./CRfXUi3G.js";var a=0,o=i(new Map),s=e(()=>Array.from(o.values()).flat());function c(e){let i=r(e),s=()=>{};function c(e){s();let t=a++;o.set(t,e),s=()=>{o.delete(t)}}return t(i,e=>{c(e)},{immediate:!0}),n(()=>{s()}),()=>{s()}}export{c as n,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,Ct as t,Dt as n,Et as r,L as i,St as a,Y as o,b as s,q as c,w as l,x as u,xt as d}from"./BfJK_SLU.js";import{f,s as p,u as m}from"./BrH7MV2S.js";import{t as h}from"./XAUaDDss.js";function g(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function _(){return this.eachAfter(g)}function v(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function y(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function b(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function x(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function S(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function C(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function w(e){for(var t=this,n=T(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function T(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function ee(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function te(){return Array.from(this)}function ne(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function E(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*re(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function D(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=A)):t===void 0&&(t=k);for(var n=new N(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new N(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(M)}function O(){return D(this).eachBefore(j)}function k(e){return e.children}function A(e){return Array.isArray(e)?e[1]:null}function j(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function M(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function N(e){this.data=e,this.depth=this.height=0,this.parent=null}N.prototype=D.prototype={constructor:N,count:_,each:v,eachAfter:b,eachBefore:y,find:x,sum:S,sort:C,path:w,ancestors:ee,descendants:te,leaves:ne,links:E,copy:O,[Symbol.iterator]:re};function P(e,t){return e.parent===t.parent?1:2}function F(e){var t=e.children;return t?t[0]:e.t}function I(e){var t=e.children;return t?t[t.length-1]:e.t}function ie(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ae(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function oe(e,t,n){return e.a.parent===t.parent?e.a:n}function L(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}L.prototype=Object.create(N.prototype);function R(e){for(var t=new L(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new L(a[o],o)),i.parent=n;return(t.parent=new L(null,0)).children=[t],t}function z(){var e=P,t=1,n=1,r=null;function i(i){var s=R(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ae(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=I(o),i=F(i),o&&i;)s=F(s),a=I(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(ie(oe(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!I(a)&&(a.t=o,a.m+=u-l),i&&!F(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function B(e){return function(){return e}}var V=Math.PI,H=2*V,U=1e-6,W=H-U;function G(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function K(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return G;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var q=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?G:K(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>U)if(!(Math.abs(u*s-c*l)>U)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((V-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>U&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>U||Math.abs(this._y1-l)>U)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%H+H),d>W?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>U&&this._append`A${n},${n},0,${+(d>=V)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function se(){return new q}se.prototype=q.prototype;function ce(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new q(t)}var le=Array.prototype.slice;function ue(e){return e[0]}function de(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function fe(e){return new J(e,!0)}function pe(e){return new J(e,!1)}function me(e){return e.source}function he(e){return e.target}function Y(e){let t=me,n=he,r=ue,i=de,a=null,o=null,s=ce(c);function c(){let c,l=le.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:B(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:B(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function ge(){return Y(fe)}function _e(){return Y(pe)}function ve(e,{wheel:t=!0,minScale:n=.5,maxScale:i=2}={}){let a=d(1);function o(t,o,s){let c=r(e);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=o??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=a.value;a.value=Math.max(n,Math.min(i,_+t));let v=a.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function s(e){if(r(t)){e.preventDefault();let t=.2;o(e.deltaY<0?t:t*-1,e.clientX,e.clientY)}else e.ctrlKey&&(e.preventDefault(),o(e.deltaY*.004*-1,e.clientX,e.clientY))}function c(e=.2){o(e)}function l(e=.2){o(e*-1)}return m(e,`wheel`,s),{scale:a,zoom:o,zoomIn:c,zoomOut:l}}var X=Symbol.for(`ViteDevToolsModuleGraphState`),Z=ge().x(e=>e[0]).y(e=>e[1]),Q=_e().x(e=>e[0]).y(e=>e[1]);function ye(e,t){return!e.target||!e.source?null:t?e.target.x<=e.source.x?Q({source:[e.source.x+n(t.width)/2-n(t.linkOffset),e.source.y],target:[e.target.x-n(t.width)/2+n(t.linkOffset),e.target.y]}):Z({source:[e.source.x+n(t.width)/2-n(t.linkOffset),e.source.y],target:[e.target.x-n(t.width)/2+n(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function be(e){return`stroke-#8885`}function xe(e){let n=.4,r=d(),i=d(window.innerWidth),c=d(window.innerHeight),l=a(new Map),u=a(new Set),p=d(!0),m=a(new Map),h=t([]),g=t([]),_=a(new Map),v=a(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=f(),{scale:x,zoomIn:S,zoomOut:C}=ve(r,{wheel:b,minScale:n,maxScale:2});function w(e,t=!0){l.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:D,tree:z,nodesRefMap:l,container:r,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:i,height:c,childToParentMap:m,focusOn:w,collapsedNodes:u,spacing:e.spacing});o(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:r,width:i,height:c,scale:x,nodes:h,links:g,nodesRefMap:l,collapsedNodes:u,childToParentMap:m,ZOOM_MIN:n,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function $(){return i(X)}function Se(t){let{nodesRefMap:r,container:a,calculateGraph:o,collapsedNodes:s}=i(X),c=d(!1);function l(t,n){e(()=>{e(()=>{let e=r.get(t);if(e&&n&&a.value){let t=a.value.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.left-t.left-n.x,o=r.top-t.top-n.y;a.value.scrollLeft+=i,a.value.scrollTop+=o}})})}function u(e){if(c.value)return;c.value=!0;let t=r.get(e),n=null;if(t&&a.value){let e=a.value.getBoundingClientRect(),r=t.getBoundingClientRect();n={x:r.left-e.left,y:r.top-e.top}}s.has(e)?s.delete(e):s.add(e),o(),n&&l(e,n),c.value=!1}function f(){c.value||(c.value=!0,s.clear(),o(),setTimeout(()=>{c.value=!1},300))}function p(){c.value||(c.value=!0,n(t.modules).forEach(e=>{e.imports.length>0&&s.add(e.id)}),o(),setTimeout(()=>{c.value=!1},300))}return{isGraphNodeToggling:c,toggleNode:u,expandAll:f,collapseAll:p}}function Ce(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:a}=i(X);return p([`-`,`_`],e=>{e.ctrlKey&&n()}),p([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:a,scale:e,zoomIn:t,zoomOut:n}}function we(){let{container:e}=i(X),t=d(!1),n=0,r=0;function a(){m(e,`mousedown`,i=>{let a=e.value.getBoundingClientRect(),o=a.right-i.clientX,s=a.bottom-i.clientY;o<=20||s<=20||(t.value=!0,n=e.value.scrollLeft+i.pageX,r=e.value.scrollTop+i.pageY)}),m(e,`contextmenu`,e=>e.preventDefault()),m(`mouseleave`,()=>t.value=!1),m(`mouseup`,()=>t.value=!1),m(`mousemove`,i=>{t.value&&(i.preventDefault(),e.value.scrollLeft=n-i.pageX,e.value.scrollTop=r-i.pageY)})}return{init:a,isGrabbing:t}}var Te={},Ee={type:`button`,"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Close`,"aria-label":`Close`};function De(e,t){return c(),l(`button`,Ee,[...t[0]||=[u(`div`,{"i-ph-x":``},null,-1)]])}var Oe=h(Te,[[`render`,De]]);export{we as a,Se as c,be as i,xe as n,Ce as o,ye as r,$ as s,Oe as t};
|
|
1
|
+
import{B as e,Ct as t,Dt as n,Et as r,L as i,St as a,Y as o,b as s,q as c,w as l,x as u,xt as d}from"./CRfXUi3G.js";import{f,s as p,u as m}from"./CJmfH1zY.js";import{t as h}from"./BUwCbG2W.js";function g(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function _(){return this.eachAfter(g)}function v(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function y(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function b(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function x(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function S(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function C(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function w(e){for(var t=this,n=T(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function T(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function ee(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function te(){return Array.from(this)}function ne(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function E(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*re(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function D(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=A)):t===void 0&&(t=k);for(var n=new N(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new N(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(M)}function O(){return D(this).eachBefore(j)}function k(e){return e.children}function A(e){return Array.isArray(e)?e[1]:null}function j(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function M(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function N(e){this.data=e,this.depth=this.height=0,this.parent=null}N.prototype=D.prototype={constructor:N,count:_,each:v,eachAfter:b,eachBefore:y,find:x,sum:S,sort:C,path:w,ancestors:ee,descendants:te,leaves:ne,links:E,copy:O,[Symbol.iterator]:re};function P(e,t){return e.parent===t.parent?1:2}function F(e){var t=e.children;return t?t[0]:e.t}function I(e){var t=e.children;return t?t[t.length-1]:e.t}function ie(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function ae(e){for(var t=0,n=0,r=e.children,i=r.length,a;--i>=0;)a=r[i],a.z+=t,a.m+=t,t+=a.s+(n+=a.c)}function oe(e,t,n){return e.a.parent===t.parent?e.a:n}function L(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}L.prototype=Object.create(N.prototype);function R(e){for(var t=new L(e,0),n,r=[t],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new L(a[o],o)),i.parent=n;return(t.parent=new L(null,0)).children=[t],t}function z(){var e=P,t=1,n=1,r=null;function i(i){var s=R(i);if(s.eachAfter(a),s.parent.m=-s.z,s.eachBefore(o),r)i.eachBefore(c);else{var l=i,u=i,d=i;i.eachBefore(function(e){e.x<l.x&&(l=e),e.x>u.x&&(u=e),e.depth>d.depth&&(d=e)});var f=l===u?1:e(l,u)/2,p=f-l.x,m=t/(u.x+f+p),h=n/(d.depth||1);i.eachBefore(function(e){e.x=(e.x+p)*m,e.y=e.depth*h})}return i}function a(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n){ae(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=s(t,i,t.parent.A||r[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(t,n,r){if(n){for(var i=t,a=t,o=n,s=i.parent.children[0],c=i.m,l=a.m,u=o.m,d=s.m,f;o=I(o),i=F(i),o&&i;)s=F(s),a=I(a),a.a=t,f=o.z+u-i.z-c+e(o._,i._),f>0&&(ie(oe(o,t,r),t,f),c+=f,l+=f),u+=o.m,c+=i.m,d+=s.m,l+=a.m;o&&!I(a)&&(a.t=o,a.m+=u-l),i&&!F(s)&&(s.t=i,s.m+=c-d,r=t)}return r}function c(e){e.x*=t,e.y=e.depth*n}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(r=!1,t=+e[0],n=+e[1],i):r?null:[t,n]},i.nodeSize=function(e){return arguments.length?(r=!0,t=+e[0],n=+e[1],i):r?[t,n]:null},i}function B(e){return function(){return e}}var V=Math.PI,H=2*V,U=1e-6,W=H-U;function G(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function K(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return G;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var q=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?G:K(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>U)if(!(Math.abs(u*s-c*l)>U)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((V-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>U&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>U||Math.abs(this._y1-l)>U)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%H+H),d>W?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>U&&this._append`A${n},${n},0,${+(d>=V)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function se(){return new q}se.prototype=q.prototype;function ce(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new q(t)}var le=Array.prototype.slice;function ue(e){return e[0]}function de(e){return e[1]}var J=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function fe(e){return new J(e,!0)}function pe(e){return new J(e,!1)}function me(e){return e.source}function he(e){return e.target}function Y(e){let t=me,n=he,r=ue,i=de,a=null,o=null,s=ce(c);function c(){let c,l=le.call(arguments),u=t.apply(this,l),d=n.apply(this,l);if(a??(o=e(c=s())),o.lineStart(),l[0]=u,o.point(+r.apply(this,l),+i.apply(this,l)),l[0]=d,o.point(+r.apply(this,l),+i.apply(this,l)),o.lineEnd(),c)return o=null,c+``||null}return c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(e){return arguments.length?(n=e,c):n},c.x=function(e){return arguments.length?(r=typeof e==`function`?e:B(+e),c):r},c.y=function(e){return arguments.length?(i=typeof e==`function`?e:B(+e),c):i},c.context=function(t){return arguments.length?(t==null?a=o=null:o=e(a=t),c):a},c}function ge(){return Y(fe)}function _e(){return Y(pe)}function ve(e,{wheel:t=!0,minScale:n=.5,maxScale:i=2}={}){let a=d(1);function o(t,o,s){let c=r(e);if(!c)return;let{left:l,top:u,width:d,height:f}=c.getBoundingClientRect(),p=o??l+d/2,m=s??u+f/2,h=p-l,g=m-u,_=a.value;a.value=Math.max(n,Math.min(i,_+t));let v=a.value/_;c.scrollLeft=(c.scrollLeft+h)*v-h,c.scrollTop=(c.scrollTop+g)*v-g}function s(e){if(r(t)){e.preventDefault();let t=.2;o(e.deltaY<0?t:t*-1,e.clientX,e.clientY)}else e.ctrlKey&&(e.preventDefault(),o(e.deltaY*.004*-1,e.clientX,e.clientY))}function c(e=.2){o(e)}function l(e=.2){o(e*-1)}return m(e,`wheel`,s),{scale:a,zoom:o,zoomIn:c,zoomOut:l}}var X=Symbol.for(`ViteDevToolsModuleGraphState`),Z=ge().x(e=>e[0]).y(e=>e[1]),Q=_e().x(e=>e[0]).y(e=>e[1]);function ye(e,t){return!e.target||!e.source?null:t?e.target.x<=e.source.x?Q({source:[e.source.x+n(t.width)/2-n(t.linkOffset),e.source.y],target:[e.target.x-n(t.width)/2+n(t.linkOffset),e.target.y]}):Z({source:[e.source.x+n(t.width)/2-n(t.linkOffset),e.source.y],target:[e.target.x-n(t.width)/2+n(t.linkOffset),e.target.y]}):e.target.x<=e.source.x?Q({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]}):Z({source:[e.source.x,e.source.y],target:[e.target.x,e.target.y]})}function be(e){return`stroke-#8885`}function xe(e){let n=.4,r=d(),i=d(window.innerWidth),c=d(window.innerHeight),l=a(new Map),u=a(new Set),p=d(!0),m=a(new Map),h=t([]),g=t([]),_=a(new Map),v=a(new Map),y=s(()=>{let t=new Map;for(let n of e.modules.value)t.set(n.id,n);return t}),{control:b}=f(),{scale:x,zoomIn:S,zoomOut:C}=ve(r,{wheel:b,minScale:n,maxScale:2});function w(e,t=!0){l.get(e)?.scrollIntoView({block:`center`,inline:`center`,behavior:t?`smooth`:`instant`})}let T=e.generateGraph({isFirstCalculateGraph:p,hierarchy:D,tree:z,nodesRefMap:l,container:r,modulesMap:y,nodes:h,links:g,scale:x,nodesMap:_,linksMap:v,width:i,height:c,childToParentMap:m,focusOn:w,collapsedNodes:u,spacing:e.spacing});o(X,{spacing:e.spacing,calculateGraph:T,isFirstCalculateGraph:p,container:r,width:i,height:c,scale:x,nodes:h,links:g,nodesRefMap:l,collapsedNodes:u,childToParentMap:m,ZOOM_MIN:n,ZOOM_MAX:2,zoomIn:S,zoomOut:C})}function $(){return i(X)}function Se(t){let{nodesRefMap:r,container:a,calculateGraph:o,collapsedNodes:s}=i(X),c=d(!1);function l(t,n){e(()=>{e(()=>{let e=r.get(t);if(e&&n&&a.value){let t=a.value.getBoundingClientRect(),r=e.getBoundingClientRect(),i=r.left-t.left-n.x,o=r.top-t.top-n.y;a.value.scrollLeft+=i,a.value.scrollTop+=o}})})}function u(e){if(c.value)return;c.value=!0;let t=r.get(e),n=null;if(t&&a.value){let e=a.value.getBoundingClientRect(),r=t.getBoundingClientRect();n={x:r.left-e.left,y:r.top-e.top}}s.has(e)?s.delete(e):s.add(e),o(),n&&l(e,n),c.value=!1}function f(){c.value||(c.value=!0,s.clear(),o(),setTimeout(()=>{c.value=!1},300))}function p(){c.value||(c.value=!0,n(t.modules).forEach(e=>{e.imports.length>0&&s.add(e.id)}),o(),setTimeout(()=>{c.value=!1},300))}return{isGraphNodeToggling:c,toggleNode:u,expandAll:f,collapseAll:p}}function Ce(){let{scale:e,zoomIn:t,zoomOut:n,ZOOM_MIN:r,ZOOM_MAX:a}=i(X);return p([`-`,`_`],e=>{e.ctrlKey&&n()}),p([`=`,`+`],e=>{e.ctrlKey&&t()}),{ZOOM_MIN:r,ZOOM_MAX:a,scale:e,zoomIn:t,zoomOut:n}}function we(){let{container:e}=i(X),t=d(!1),n=0,r=0;function a(){m(e,`mousedown`,i=>{let a=e.value.getBoundingClientRect(),o=a.right-i.clientX,s=a.bottom-i.clientY;o<=20||s<=20||(t.value=!0,n=e.value.scrollLeft+i.pageX,r=e.value.scrollTop+i.pageY)}),m(e,`contextmenu`,e=>e.preventDefault()),m(`mouseleave`,()=>t.value=!1),m(`mouseup`,()=>t.value=!1),m(`mousemove`,i=>{t.value&&(i.preventDefault(),e.value.scrollLeft=n-i.pageX,e.value.scrollTop=r-i.pageY)})}return{init:a,isGrabbing:t}}var Te={},Ee={type:`button`,"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Close`,"aria-label":`Close`};function De(e,t){return c(),l(`button`,Ee,[...t[0]||=[u(`div`,{"i-ph-x":``},null,-1)]])}var Oe=h(Te,[[`render`,De]]);export{we as a,Se as c,be as i,xe as n,Ce as o,ye as r,$ as s,Oe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./B5QvmzNX.js";import{$ as t,A as n,C as r,Dt as i,Kt as a,M as o,S as s,Ut as c,Z as l,b as u,h as d,k as f,lt as p,ot as m,q as h,w as g,x as _,xt as v,yt as y}from"./CRfXUi3G.js";import{C as b,w as x}from"./CpTuuES2.js";import{c as S,g as C,l as w,p as ee}from"./CJmfH1zY.js";import{a as T,n as te,r as E}from"#entry";import{t as D}from"./DWUsdlci.js";import{r as O,t as k}from"./CjvJJTNy.js";import{r as A,t as j}from"./BPvXWYcE.js";import{n as M,r as N,t as P}from"./BA4aNJdc.js";import{a as ne,c as F,n as re,t as ie}from"./CqNyqKYk.js";import{t as I}from"./EWiwEEMI.js";import{t as L}from"./CsPVvMxF.js";var R={flex:`~ row gap-1`,"of-hidden":``},z={key:0,flex:`~ row gap-1`,"ws-nowrap":``},B={key:1},V={p2:``,flex:`~ col gap-1`},H=Object.assign(o({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let i=e,a=u(()=>{let e=new Map;return i.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(i.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(i,o)=>{let c=k,u=t(`VMenu`);return h(),g(`div`,R,[a.value[0]?(h(),g(`div`,z,[n(c,{id:a.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),a.value[0].version&&e.showVersion?(h(),s(O,{key:0,text:a.value[0].version,as:`span`},null,8,[`text`])):r(``,!0)])):(h(),g(`span`,B,` - `)),a.value.length>1?(h(),s(u,{key:2,delay:{show:200,hide:0},"flex-none":``},{popper:p(()=>[_(`div`,V,[(h(!0),g(d,null,l(a.value,t=>(h(),g(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[n(c,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(h(),s(O,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):r(``,!0)]))),128))])]),default:p(()=>[n(O,{text:`+${a.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):r(``,!0)])}}}),{__name:`PackagesImporters`}),U={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},W={role:`row`,class:`border-b border-base`,flex:`~ row`},G=[`title`],K={key:0,"font-mono":``},q={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},J={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},Y={key:0,role:`cell`,"font-mono":``,"flex-none":``,w80:``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``,"overflow-hidden":``,truncate:``},X={"font-mono":``,"text-sm":``},Z={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},ae={p2:``,flex:`~ col gap-1`},oe={w24:``,"inline-flex":``},se={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},ce={key:1},Q=Object.assign(o({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(e){let t=b(),{state:o,next:u}=w([``,`desc`,`asc`],{initialValue:j.value.packageSizeSortType});function m(){u(),j.value.packageSizeSortType=o.value}return(u,v)=>{let y=I,b=A,x=k,S=H,C=D;return h(),g(`div`,U,[_(`div`,W,[_(`div`,{title:e.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:c([e.groupView?`min-w40`:`min-w80`])},[e.groupView?(h(),g(`div`,K,[n(y,{name:e.packages?.[0]?.name},null,8,[`name`])])):(h(),g(d,{key:1},[f(` Package `)],64))],10,G),e.groupView?r(``,!0):(h(),g(`div`,q,` Version `)),_(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:c([e.groupView?`px2`:`pl2`])},[_(`button`,J,[v[0]||=f(` Size `,-1),e.disableSizeSort?r(``,!0):(h(),g(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:m},[_(`i`,{"text-xs":``,class:c([i(o)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,i(o)?`op100 text-primary`:`op50`])},null,2)]))])],2),v[1]||=_(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),e.packages.length?(h(),s(P,{key:0,role:`rowgroup`,items:e.packages,"key-prop":`dir`},{default:p(({item:o,index:s})=>[n(C,{role:`row`,flex:`~ row`,class:c([`border-base border-b-1 border-dashed`,[s===e.packages.length-1?`border-b-0`:``]]),to:{path:i(t).path,query:{package:`${o.name}@${o.version}`}}},{default:p(()=>[n(i(T),{triggers:[`hover`],delay:1200,disabled:o.name.length<30},{popper:p(()=>[_(`span`,X,a(o.name),1)]),default:p(()=>[e.groupView?r(``,!0):(h(),g(`div`,Y,[n(y,{name:o.name},null,8,[`name`])]))]),_:2},1032,[`disabled`]),_(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:c({"text-primary":o.duplicated})},a(o.version),3),_(`div`,Z,[n(i(E),{delay:{show:200,hide:0}},{popper:p(()=>[_(`div`,ae,[(h(!0),g(d,null,l(o.files.filter(e=>!!e.transformedCodeSize),t=>(h(),g(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[_(`span`,oe,[n(b,{bytes:t.transformedCodeSize},null,8,[`bytes`])]),n(x,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:o.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:p(()=>[n(b,{bytes:o.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),_(`div`,se,[n(S,{package:o,session:e.session,"show-version":e.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(h(),g(`div`,ce,[...v[2]||=[_(`div`,{p4:``},[_(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[_(`p`,null,` No data `)])],-1)]]))])}}}),{__name:`PackagesTable`}),le={key:1,p4:``},ue=Object.assign(o({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,r=u(()=>t.packages.filter(e=>e.duplicated)),i=u(()=>r.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,a)=>{let o=Q;return r.value.length?(h(!0),g(d,{key:0},l(i.value,(t,r)=>(h(),g(`div`,{key:r},[n(o,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(h(),g(`div`,le,[...a[0]||=[_(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),{__name:`PackagesDuplicated`}),de={key:1,relative:``},$={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},fe={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},pe=[`onClick`],me={flex:`~ col gap-2`,pt4:``,px4:``,pb4:``,"overflow-x-auto":``},he={fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ge={op50:``},_e={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},ve={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},ye={flex:`~ gap-1 items-center`},be={flex:`~ gap-1 items-center`},xe=o({__name:`packages`,props:{session:{}},setup(t){let o=t,w=y(ee()),T=b(),E=x(),D=[{match:/.*/,name:`direct`,description:`Direct Dependencies`,icon:`i-octicon:package-dependencies-24 light:filter-invert-30!`},{match:/.*/,name:`transitive`,description:`Transitive Dependencies`,icon:`i-octicon:package-24 light:filter-invert-30!`}],O=e(),k=v({search:``,selected:[`direct`,`transitive`]}),{state:P,isLoading:I}=S(async()=>await O.value.call(`vite:rolldown:get-packages`,{session:o.session.id}),null),R=C(()=>P.value,()=>new N(P.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=u(()=>P.value?Object.values(P.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=u(()=>[{label:`Table`,value:`table`,icon:`i-ph-table-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Duplicate Packages${z.value>0?` (${z.value})`:``}`,value:`duplicate-packages`,icon:`i-ph-package-duotone`}]),V=u(()=>k.value.search?R.value.search(k.value.search).map(e=>e.item):[...P.value||[]]),H=u(()=>{let e=j.value.packageSizeSortType,t=V.value.toSorted((e,t)=>(e.name||``).localeCompare(t.name||``));return(e?t.sort((t,n)=>e===`asc`?t.transformedCodeSize-n.transformedCodeSize:n.transformedCodeSize-t.transformedCodeSize):t).filter(e=>!k.value.selected||k.value.selected.some(t=>t.match(e.type)))});function U(e){j.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=ie({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!T.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&E.replace({query:{...T.query,package:`${e.meta?.name}@${e.meta?.version}`}})},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){j.value.packageViewType===`treemap`&&(K.value=new ne(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return m(()=>j.value.packageViewType,()=>{Z()}),(e,o)=>{let u=te,m=M,v=Q,y=re,b=ue,x=A,S=F;return i(I)?(h(),s(u,{key:0})):(h(),g(`div`,de,[_(`div`,$,[n(m,{modelValue:k.value,"onUpdate:modelValue":o[0]||=e=>k.value=e,rules:D},{default:p(()=>[_(`div`,fe,[o[2]||=_(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(h(!0),g(d,null,l(B.value,e=>(h(),g(`button`,{key:e.value,"btn-action":``,class:c(i(j).packageViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[_(`div`,{class:c(e.icon)},null,2),f(` `+a(e.label),1)],10,pe))),128))])]),_:1},8,[`modelValue`])]),_(`div`,me,[i(j).packageViewType===`table`?(h(),g(d,{key:0},[n(v,{packages:H.value,session:t.session},null,8,[`packages`,`session`]),_(`div`,he,[_(`span`,ge,a(V.value.length)+` of `+a(i(P)?.length||0),1)])],64)):i(j).packageViewType===`treemap`?(h(),g(d,{key:1},[i(K)&&H.value.length?(h(),s(L,{key:0,graph:i(K),selected:i(J),onSelect:o[1]||=e=>i(X)(e)},{default:p(({selected:e,options:t,onSelect:r})=>[n(y,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:r},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(h(),g(`span`,_e,` No Data `))],64)):i(j).packageViewType===`duplicate-packages`?(h(),s(b,{key:2,packages:H.value,session:t.session},null,8,[`packages`,`session`])):r(``,!0)]),n(S,{"hover-x":w.x,"hover-y":w.y},{default:p(()=>[i(q)?.meta?(h(),g(`div`,ve,[_(`div`,ye,a(i(q).text),1),_(`div`,be,[n(x,{bytes:i(q).size,percent:!1},null,8,[`bytes`])])])):r(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,Dt as t,Kt as n,M as r,b as i,lt as a,q as o,w as s,x as c,xt as l}from"./
|
|
1
|
+
import{A as e,Dt as t,Kt as n,M as r,b as i,lt as a,q as o,w as s,x as c,xt as l}from"./CRfXUi3G.js";import{C as u,w as d}from"./CpTuuES2.js";import{g as f,v as p}from"./CJmfH1zY.js";import{t as m}from"./DWUsdlci.js";import{i as h,l as g,o as _}from"./5SREwa_J.js";import{n as v,r as y,t as b}from"./BA4aNJdc.js";import{t as x}from"./DM5zgFwu.js";import{n as S,t as C}from"./qIAw3Eg02.js";var w={flex:`~ col gap-2`,p4:``},T={flex:``,pb2:``},E={"w-8":``,"text-right":``,"text-xs":``,op50:``},D={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},O=Object.assign(r({__name:`FlatList`,props:{plugins:{}},setup(r){let i=u();return(l,u)=>{let d=x,f=m;return o(),s(`div`,w,[e(b,{items:r.plugins,"key-prop":`plugin_id`},{default:a(({item:r})=>[c(`div`,T,[e(f,{to:{path:t(i).path,query:{plugin:r.plugin_id}},"font-mono":``,border:`~ rounded base`,"w-full":``,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{default:a(()=>[c(`div`,E,` #`+n(r.plugin_id),1),c(`span`,D,[e(d,{name:r.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`])])}}}),{__name:`PluginsFlatList`}),k={relative:``,"min-h-screen":``},A={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},j={fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},M={op50:``},N=r({__name:`plugins`,props:{session:{}},setup(t){let r=t,a=u(),m=d(),b=l({search:a.query.search||``,selected:a.query.plugin_types?S(a.query.plugin_types):null}),x=i(()=>[..._.filter(e=>r.session?.meta?.plugins?.some(t=>e.match.test(t.name))),h]),w=i(()=>{let e=r.session?.meta?.plugins;return b.value.selected&&(e=e.filter(e=>{let t=g(e.name);return b.value.selected.includes(t.name)})),e}),T=f(()=>w.value,()=>new y(w.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),E=i(()=>b.value.search?T.value.search(b.value.search).map(e=>e.item):w.value);return p(b.value,e=>{let t={...a.query,search:e.search||void 0,plugin_types:e.selected||void 0};m.replace({query:C(t)})},{debounce:500}),(r,i)=>{let a=v,l=O;return o(),s(`div`,k,[c(`div`,A,[e(a,{modelValue:b.value,"onUpdate:modelValue":i[0]||=e=>b.value=e,rules:x.value},null,8,[`modelValue`,`rules`])]),e(l,{plugins:E.value??[]},null,8,[`plugins`]),c(`div`,j,[c(`span`,M,n(E.value.length)+` of `+n(t.session?.meta?.plugins?.length||0),1)])])}}});export{N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,M as t}from"./
|
|
1
|
+
import{F as e,M as t}from"./CRfXUi3G.js";import{t as n}from"./5SREwa_J.js";import{n as r}from"./DoJ6DaKu.js";var i=t({name:`HighlightedPackageName`,props:{name:{type:String,required:!0}},setup(t){return()=>{let i=t.name;if(!r(i))return e(`span`,{class:`text-gray-500`},i);let a=n(i);if(i.startsWith(`@`)){let[t,n]=i.split(`/`);return[e(`span`,{style:`color: ${a}`},t),e(`span`,{style:`color: ${a}`,class:`op50`},`/`),e(`span`,{style:`color: ${a}`},n)]}return e(`span`,{style:`color: ${a}`},i)}}});export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.diff-added{background-color:color-mix(in srgb, var(--colors-green-400) 15%, transparent) /* oklch(79.2% 0.209 151.711) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-added{background-color:color-mix(in oklab, var(--colors-green-400) 15%, transparent) /* oklch(79.2% 0.209 151.711) */;}}.diff-removed{background-color:color-mix(in srgb, var(--colors-red-400) 15%, transparent) /* oklch(70.4% 0.191 22.216) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-removed{background-color:color-mix(in oklab, var(--colors-red-400) 15%, transparent) /* oklch(70.4% 0.191 22.216) */;}}.diff-added-inline{background-color:color-mix(in srgb, var(--colors-green-400) 30%, transparent) /* oklch(79.2% 0.209 151.711) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-added-inline{background-color:color-mix(in oklab, var(--colors-green-400) 30%, transparent) /* oklch(79.2% 0.209 151.711) */;}}.diff-removed-inline{background-color:color-mix(in srgb, var(--colors-red-400) 30%, transparent) /* oklch(70.4% 0.191 22.216) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-removed-inline{background-color:color-mix(in oklab, var(--colors-red-400) 30%, transparent) /* oklch(70.4% 0.191 22.216) */;}}.module-flow-splitter>.splitpanes__splitter:before{background-color:transparent}.splitpanes__splitter{pointer-events:auto}
|
|
1
|
+
.diff-added{background-color:color-mix(in srgb, var(--colors-green-400) 15%, transparent) /* oklch(79.2% 0.209 151.711) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-added{background-color:color-mix(in oklab, var(--colors-green-400) 15%, transparent) /* oklch(79.2% 0.209 151.711) */;}}.diff-removed{background-color:color-mix(in srgb, var(--colors-red-400) 15%, transparent) /* oklch(70.4% 0.191 22.216) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-removed{background-color:color-mix(in oklab, var(--colors-red-400) 15%, transparent) /* oklch(70.4% 0.191 22.216) */;}}.diff-added-inline{background-color:color-mix(in srgb, var(--colors-green-400) 30%, transparent) /* oklch(79.2% 0.209 151.711) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-added-inline{background-color:color-mix(in oklab, var(--colors-green-400) 30%, transparent) /* oklch(79.2% 0.209 151.711) */;}}.diff-removed-inline{background-color:color-mix(in srgb, var(--colors-red-400) 30%, transparent) /* oklch(70.4% 0.191 22.216) */;}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}@supports (color: color-mix(in lab, red, red)){.diff-removed-inline{background-color:color-mix(in oklab, var(--colors-red-400) 30%, transparent) /* oklch(70.4% 0.191 22.216) */;}}.module-flow-splitter>.splitpanes__splitter:before{background-color:transparent}.splitpanes__splitter{pointer-events:auto}.plugin-details-table[data-v-52f8a53b] .vue-recycle-scroller__slot{position:sticky;top:0;z-index:10}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./B5QvmzNX.js";import{A as t,C as n,Dt as r,Kt as i,M as a,Q as o,R as s,S as c,Z as l,b as u,h as d,k as f,lt as p,q as m,rt as h,tt as g,w as _,x as v}from"./CRfXUi3G.js";import{C as y}from"./CpTuuES2.js";import{c as b}from"./CJmfH1zY.js";import{n as x}from"#entry";import{t as S}from"./DWUsdlci.js";import{r as C,t as w}from"./CjvJJTNy.js";import{r as T}from"./BPvXWYcE.js";import{t as E}from"./BYcqRSer.js";var D=[`title`],O={key:0,flex:`~ items-center gap-2`},k={op50:``,"font-mono":``},A=[`title`],j=[`title`],M=Object.assign(a({__name:`BaseInfo`,props:{chunk:{},link:{type:Boolean,default:!1},basic:{type:Boolean,default:!1}},setup(e){let a=e,s=y(),l=u(()=>Array.isArray(a.chunk.imports)?a.chunk.imports.length:a.chunk.imports),d=u(()=>Array.isArray(a.chunk.modules)?a.chunk.modules.length:a.chunk.modules);return(a,u)=>(m(),c(g(e.link?r(S):`div`),{to:e.link?typeof e.link==`string`?e.link:{path:r(s).path,query:{chunk:e.chunk.chunk_id}}:void 0,flex:`~ gap-3 items-center`},{default:p(()=>[v(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.chunk.chunk_id}`},[o(a.$slots,`icon`,{},()=>[u[0]||=v(`div`,{"i-ph-shapes-duotone":``},null,-1)]),v(`div`,null,i(e.chunk.name||`[unnamed]`),1),t(C,{text:e.chunk.reason},null,8,[`text`]),o(a.$slots,`left-after`)],8,D),u[3]||=v(`div`,{"flex-auto":``},null,-1),e.basic?n(``,!0):(m(),_(`div`,O,[v(`span`,k,`#`+i(e.chunk.chunk_id),1),v(`div`,{flex:`~ gap-1 items-center`,title:`${l.value} imports`},[u[1]||=v(`div`,{"i-ph-file-arrow-up-duotone":``},null,-1),f(` `+i(l.value),1)],8,A),v(`div`,{flex:`~ gap-1 items-center`,title:`${d.value} modules`},[u[2]||=v(`div`,{"i-ph-package-duotone":``},null,-1),f(` `+i(d.value),1)],8,j)])),o(a.$slots,`default`)]),_:3},8,[`to`]))}}),{__name:`ChunksBaseInfo`}),N={flex:`~ gap-2 items-center`},P=Object.assign(a({__name:`BaseInfo`,props:{asset:{}},setup(e){return(n,r)=>{let a=T;return m(),_(`div`,N,[r[0]||=v(`div`,{"i-catppuccin-java-class-abstract":``},null,-1),v(`div`,null,i(e.asset.filename),1),t(a,{bytes:e.asset.size,"text-sm":``},null,8,[`bytes`]),t(C,{text:e.asset.type},null,8,[`text`])])}}}),{__name:`AssetsBaseInfo`}),F={relative:``},I={key:0,"pointer-events-none":``,absolute:``,"left-0":``,"right-0":``,"bottom-0":``,"bg-gradient-more":``,"h-30":``,flex:`~ justify-center`},L=Object.assign(a({__name:`ExpandableContainer`,props:s({list:{}},{count:{default:20},countModifiers:{}}),emits:[`update:count`],setup(e){let i=e,a=h(e,`count`),s=a.value,c=u(()=>i.list.slice(0,a.value));return(l,u)=>(m(),_(`div`,F,[o(l.$slots,`default`,{items:c.value}),e.list.length>a.value?(m(),_(`div`,I,[v(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:u[0]||=e=>a.value=Math.round(a.value+r(s))},[u[2]||=v(`div`,{"i-ri:arrow-down-double-line":``},null,-1),u[3]||=v(`span`,null,`More`,-1),t(E,{prefix:`+`,number:Math.min(Math.round(r(s)),i.list.length-a.value),"rounded-full":``,"text-sm":``},null,8,[`number`])]),v(`button`,{op35:``,p2:``,pt4:``,mta:``,"pointer-events-auto":``,"hover:op100":``,flex:`~ items-center gap-1 justify-center`,onClick:u[1]||=e=>a.value=i.list.length},[u[4]||=v(`div`,{"i-ph-arrows-out-line-vertical-duotone":``},null,-1),u[5]||=v(`span`,null,`All`,-1),t(E,{number:i.list.length,"rounded-full":``,"text-sm":``},null,8,[`number`])])])):n(``,!0)]))}}),{__name:`DisplayExpandableContainer`}),R={key:0,"i-ph-file-duotone":``},z={key:1,"i-ph-lightning-duotone":``},B=Object.assign(a({__name:`Imports`,props:{imports:{}},setup(e){return(r,i)=>{let a=M,o=L;return m(),c(o,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:e.imports},{default:p(({items:e})=>[(m(!0),_(d,null,l(e,(e,r)=>(m(),_(d,{key:r},[e?(m(),c(a,{key:0,chunk:e,link:``,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},{icon:p(()=>[e.kind===`import-statement`?(m(),_(`div`,R)):n(``,!0),e.kind===`dynamic-import`?(m(),_(`div`,z)):n(``,!0)]),"left-after":p(()=>[t(C,{text:e.kind},null,8,[`text`])]),_:2},1032,[`chunk`])):n(``,!0)],64))),128))]),_:1},8,[`list`])}}}),{__name:`ChunksImports`}),V={flex:`~ col gap-3`},H={key:1,"text-sm":``,op50:``,flex:`~ items-center`,title:`Total size of imports`},U={open:`true`},W={open:`true`},G={op50:``},K={key:0,open:`true`},q={op50:``},J={key:1,open:`true`},Y={op50:``},X=Object.assign(a({__name:`ChunkDetails`,props:{chunk:{},session:{},showDetails:{type:Boolean,default:!0},chunks:{}},setup(a){let s=a,h=u(()=>{let e=new Map;for(let t of s.session.modulesList)e.set(t.id,t);return e});function g(e){return e.reduce((e,t)=>{let n=h.value.get(t);return!n||!n.buildMetrics?.transforms?.length?e:e+n.buildMetrics.transforms.at(-1).transformed_code_size},0)}let E=u(()=>g(s.chunk.modules)),D=y(),O=e(),{state:k,isLoading:A}=b(async()=>{if(!s.chunks)return await O.value.call(`vite:rolldown:get-chunks-graph`,{session:s.session.id})},null),j=u(()=>s.chunks||k.value),N=u(()=>s.chunk.imports.map(e=>{let t=j.value?.find(t=>t.chunk_id===e.chunk_id);return{...e,name:t?.name||`[unnamed]`,reason:t?.reason||`common`,imports:t?.imports.length||0,modules:t?.modules.length||0,size:g(t?.modules||[])}})),F=u(()=>j.value?.filter(e=>e.imports.some(e=>e.chunk_id===s.chunk.chunk_id)).map(e=>({...e.imports.find(e=>e.chunk_id===s.chunk.chunk_id),chunk_id:e.chunk_id,name:e.name||`[unnamed]`,reason:e.reason||`common`,imports:e.imports.length||0,modules:e.modules.length||0}))||[]);return(e,s)=>{let u=T,h=M,g=P,y=S,b=w,O=L,k=x,j=B;return m(),_(`div`,V,[t(h,{chunk:a.chunk},{"left-after":p(()=>[a.chunk.is_initial?(m(),c(C,{key:0,text:`initial`})):n(``,!0),t(u,{bytes:E.value,"text-sm":``,title:`Chunk size`},null,8,[`bytes`]),N.value.length?(m(),_(`div`,H,[s[0]||=f(` (`,-1),t(u,{bytes:N.value.reduce((e,t)=>e+t.size,0)},null,8,[`bytes`]),s[1]||=f(`) `,-1)])):n(``,!0)]),default:p(()=>[o(e.$slots,`default`)]),_:3},8,[`chunk`]),a.showDetails?(m(),_(d,{key:0},[v(`details`,U,[s[2]||=v(`summary`,{op50:``},` Assets `,-1),t(y,{border:`~ base rounded-lg`,px2:``,mt2:``,py1:``,"min-w-fit":``,flex:`~`,to:{path:r(D).path,query:{asset:a.chunk.asset?.filename}}},{default:p(()=>[t(g,{asset:{...a.chunk.asset,type:`asset`}},null,8,[`asset`])]),_:1},8,[`to`])]),v(`details`,W,[v(`summary`,G,[v(`span`,null,`Modules (`+i(a.chunk.modules.length)+`)`,1)]),t(O,{flex:`~ col gap-1`,mt2:``,"ws-nowrap":``,list:a.chunk.modules},{default:p(({items:e})=>[(m(!0),_(d,null,l(e,e=>(m(),c(b,{id:e,key:e,session:a.session,link:!0,minimal:!0,hover:`bg-active`,border:`~ base rounded`,px2:``,py1:``,"w-full":``},null,8,[`id`,`session`]))),128))]),_:1},8,[`list`])]),r(A)?(m(),c(k,{key:0})):(m(),_(d,{key:1},[a.chunk.imports.length?(m(),_(`details`,K,[v(`summary`,q,[v(`span`,null,`Imports (`+i(a.chunk.imports.length)+`)`,1)]),t(j,{imports:N.value},null,8,[`imports`])])):n(``,!0),F.value.length?(m(),_(`details`,J,[v(`summary`,Y,[v(`span`,null,`Importers (`+i(F.value.length)+`)`,1)]),t(j,{imports:F.value},null,8,[`imports`])])):n(``,!0)],64))],64)):n(``,!0)])}}}),{__name:`DataChunkDetails`});export{M as i,L as n,P as r,X as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"325e31f5-a39f-4526-a997-a203cd2d5c81","timestamp":1776824254629}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"325e31f5-a39f-4526-a997-a203cd2d5c81","timestamp":1776824254629,"prerendered":[]}
|