@vitejs/devtools-vite 0.0.0-alpha.1

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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/dist/dirs-Z7VQHyIZ.js +7 -0
  3. package/dist/dirs.d.ts +4 -0
  4. package/dist/dirs.js +3 -0
  5. package/dist/index.d.ts +118 -0
  6. package/dist/index.js +1463 -0
  7. package/dist/nitro.json +15 -0
  8. package/dist/public/200.html +1 -0
  9. package/dist/public/404.html +1 -0
  10. package/dist/public/_nuxt/B1Vd6rqS.js +1 -0
  11. package/dist/public/_nuxt/B2YLpys2.js +1 -0
  12. package/dist/public/_nuxt/B2fBtupD.js +1 -0
  13. package/dist/public/_nuxt/BBRXmiYk.js +1 -0
  14. package/dist/public/_nuxt/BL9XEsp7.js +1 -0
  15. package/dist/public/_nuxt/BO9hKuA-.js +1 -0
  16. package/dist/public/_nuxt/BQ-NBLhA.js +1 -0
  17. package/dist/public/_nuxt/BcAccMwu.js +1 -0
  18. package/dist/public/_nuxt/BdGMcGSQ.js +1 -0
  19. package/dist/public/_nuxt/BdSZoQls.js +1 -0
  20. package/dist/public/_nuxt/BjbaCuBE.js +1 -0
  21. package/dist/public/_nuxt/Bjr51Ks8.js +1 -0
  22. package/dist/public/_nuxt/BvuqupwD.js +1 -0
  23. package/dist/public/_nuxt/C2X_oPur.js +1 -0
  24. package/dist/public/_nuxt/C5J04JCq.js +1 -0
  25. package/dist/public/_nuxt/CQNn9qP2.js +1 -0
  26. package/dist/public/_nuxt/CS0-317H.js +1 -0
  27. package/dist/public/_nuxt/CciM0jEL.js +1 -0
  28. package/dist/public/_nuxt/CcwEApAr.js +1 -0
  29. package/dist/public/_nuxt/Ci9NHG69.js +1 -0
  30. package/dist/public/_nuxt/D1yk44lc.js +1 -0
  31. package/dist/public/_nuxt/DKn-LAPX.js +11 -0
  32. package/dist/public/_nuxt/DS2MKblJ.js +1 -0
  33. package/dist/public/_nuxt/DSjlpmm-.js +1 -0
  34. package/dist/public/_nuxt/DZeYNBxL.js +1 -0
  35. package/dist/public/_nuxt/D_Sk_I-u.js +1 -0
  36. package/dist/public/_nuxt/Dl8iHwQo.js +2 -0
  37. package/dist/public/_nuxt/DnpfwSMy.js +1 -0
  38. package/dist/public/_nuxt/IrMnfQaU.js +1 -0
  39. package/dist/public/_nuxt/VirtualList.lGV_3v2U.css +1 -0
  40. package/dist/public/_nuxt/Z5tyTJaP.js +1 -0
  41. package/dist/public/_nuxt/_session_.B0BbH92J.css +1 -0
  42. package/dist/public/_nuxt/builds/latest.json +1 -0
  43. package/dist/public/_nuxt/builds/meta/6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f.json +1 -0
  44. package/dist/public/_nuxt/cRQbgMUp.js +1 -0
  45. package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +10 -0
  46. package/dist/public/_nuxt/entry.Dufqy7qJ.css +1 -0
  47. package/dist/public/_nuxt/error-404.yUUAZDjV.css +1 -0
  48. package/dist/public/_nuxt/error-500.BHZzZRS-.css +1 -0
  49. package/dist/public/_nuxt/l47FwQA-.js +1 -0
  50. package/dist/public/_nuxt/pXptjyzi.js +1 -0
  51. package/dist/public/_nuxt/rwBDQBzn.js +1 -0
  52. package/dist/public/_nuxt/tS5wJZMm.js +1 -0
  53. package/dist/public/_nuxt/yfNgynAH.js +33 -0
  54. package/dist/public/_nuxt/z9pSC1xM.js +1 -0
  55. package/dist/public/dot-grid-dark.png +0 -0
  56. package/dist/public/dot-grid-light.png +0 -0
  57. package/dist/public/favicon.svg +15 -0
  58. package/dist/public/index.html +1 -0
  59. package/dist/public/vite-devtools.svg +17 -0
  60. package/package.json +90 -0
@@ -0,0 +1,15 @@
1
+ {
2
+ "date": "2025-10-01T03:54:22.140Z",
3
+ "preset": "static",
4
+ "framework": {
5
+ "name": "nuxt",
6
+ "version": "4.1.2"
7
+ },
8
+ "versions": {
9
+ "nitro": "2.12.6"
10
+ },
11
+ "commands": {
12
+ "preview": "npx serve public"
13
+ },
14
+ "config": {}
15
+ }
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__vite_devtools_vite__/_nuxt/DKn-LAPX.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/__vite_devtools_vite__/_nuxt/entry.Dufqy7qJ.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/DKn-LAPX.js"><link rel="prefetch" as="style" crossorigin href="/__vite_devtools_vite__/_nuxt/error-404.yUUAZDjV.css"><link rel="prefetch" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/C2X_oPur.js"><link rel="prefetch" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/Bjr51Ks8.js"><link rel="prefetch" as="style" crossorigin href="/__vite_devtools_vite__/_nuxt/error-500.BHZzZRS-.css"><link rel="prefetch" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/BL9XEsp7.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/__vite_devtools_vite__/_nuxt/DKn-LAPX.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1759290862094,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__vite_devtools_vite__/",buildId:"6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -0,0 +1 @@
1
+ <!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__vite_devtools_vite__/_nuxt/DKn-LAPX.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/__vite_devtools_vite__/_nuxt/entry.Dufqy7qJ.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/DKn-LAPX.js"><link rel="prefetch" as="style" crossorigin href="/__vite_devtools_vite__/_nuxt/error-404.yUUAZDjV.css"><link rel="prefetch" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/C2X_oPur.js"><link rel="prefetch" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/Bjr51Ks8.js"><link rel="prefetch" as="style" crossorigin href="/__vite_devtools_vite__/_nuxt/error-500.BHZzZRS-.css"><link rel="prefetch" as="script" crossorigin href="/__vite_devtools_vite__/_nuxt/BL9XEsp7.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/__vite_devtools_vite__/_nuxt/DKn-LAPX.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1759290862094,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__vite_devtools_vite__/",buildId:"6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
@@ -0,0 +1 @@
1
+ import{Ft as e,bt as t,ft as n,gt as r,ht as i,jt as a,mt as o,on as s,pt as c,qt as l,sn as u,un as d,ut as f,vt as p,yt as m}from"#entry";import{t as h}from"./Bjr51Ks8.js";import"./Ci9NHG69.js";import"./CQNn9qP2.js";import"./BO9hKuA-.js";import{r as g,t as _}from"./BQ-NBLhA.js";import{t as v}from"./BvuqupwD.js";import{t as y}from"./DZeYNBxL.js";import{t as b}from"./cRQbgMUp.js";var x={flex:`~ col gap-2`,p6:``},S={flex:`~ gap-2`},C={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_160px_2fr] gap-2 items-center`},w={"font-mono":``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ gap-2`},k=t({__name:`index`,props:{session:{}},setup(t){let k=t,A=n(()=>[{title:`Build ID`,value:k.session.id,icon:`i-ph-hash-duotone`},{title:`Created At`,value:new Date(k.session.meta.timestamp),icon:`i-ph-clock-duotone`},{title:`Build Duration`,value:k.session.buildDuration,icon:`i-ph-timer-duotone`,type:`duration`},{title:`Directory`,value:k.session.meta.cwd,icon:`i-ph-folder-duotone`},{title:`Total Modules`,value:k.session.modulesList.length,icon:`i-ph-files-duotone`},{title:`Plugins`,value:k.session.meta.plugins.length,icon:`i-ph-plugs-duotone`},{title:`Platform`,value:k.session.meta.platform,icon:`i-ph-cpu-duotone`,type:`badge`},{title:`Format`,value:k.session.meta.format,icon:`i-ph-file-duotone`,type:`badge`}]);return(n,j)=>{let M=h,N=g,P=y,F=b,I=_;return a(),r(`div`,x,[c(`div`,S,[m(M,{"btn-action":``,to:{path:`/`}},{default:l(()=>[...j[0]||=[c(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),p(` Re-select Session `,-1)]]),_:1})]),j[1]||=c(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),c(`div`,C,[(a(!0),r(f,null,e(A.value,e=>(a(),r(f,{key:e.title},[c(`div`,{class:u(e.icon)},null,2),c(`div`,null,d(e.title),1),c(`div`,w,[e.value instanceof Date?(a(),r(`time`,{key:0,datetime:e.value.toISOString()},d(e.value.toLocaleString()),9,T)):e.type===`badge`?(a(),o(N,{key:1,text:String(e.value),py1:``},null,8,[`text`])):e.type===`duration`?(a(),o(P,{key:2,duration:+e.value},null,8,[`duration`])):typeof e.value==`number`?(a(),o(F,{key:3,number:e.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(a(),r(`span`,E,d(e.value),1))])],64))),128))]),j[2]||=c(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),c(`div`,D,[(a(!0),r(f,null,e(k.session.meta.inputs,e=>(a(),r(f,{key:e},[m(N,{text:e.name||``},null,8,[`text`]),m(I,{id:e.filename||``,session:t.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=c(`div`,{op50:``,"mt-4":``},` Views `,-1),c(`div`,O,[(a(!0),r(f,null,e(s(v),e=>(a(),r(f,{key:e.to},[e.category===`session`?(a(),o(M,{key:0,"btn-action":``,to:{path:e.to},flex:`~ col`,"min-w-40":``,p4:``},{default:l(()=>[c(`div`,{class:u(e.icon),"text-2xl":``},null,2),p(` `+d(e.title),1)]),_:2},1032,[`to`])):i(``,!0)],64))),128))])])}}});export{k as default};
@@ -0,0 +1 @@
1
+ import{Ft as e,Kt as t,O as n,T as r,bt as i,en as a,ft as o,gt as s,ht as c,jt as l,mt as u,on as d,pt as f,qt as p,sn as m,un as h,ut as g,vt as _,yt as v,zt as y}from"#entry";import{t as b}from"./Bjr51Ks8.js";import{t as x}from"./DSjlpmm-.js";import"./CQNn9qP2.js";import"./BO9hKuA-.js";import{r as S,t as C}from"./BQ-NBLhA.js";import{t as w}from"./tS5wJZMm.js";import"./DnpfwSMy.js";import{t as T}from"./BdGMcGSQ.js";var E={flex:`~ col gap-2`},D={flex:`~ gap-1 items-center`,"font-mono":``,op50:``,"text-sm":``},O={"font-mono":``,"font-sm":``},k={key:0,flex:`~ gap-1 items-center`},A={key:0,op50:``,"text-xs":``,border:`~ base rounded-md`,px1:``,"font-mono":``},j=i({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n;function a(e){return T(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let x=o(()=>{let e=r.selectedSessions?.[0];return e?a(e):``});function j(e){return x.value&&x.value!==a(e)}function M(e){r.sessionMode===`compare`&&!j(e)&&i(`select`,e)}return(n,r)=>{let i=C,a=S,o=w;return l(),s(`div`,E,[(l(!0),s(g,null,e(t.sessions,e=>(l(),s(`div`,{key:e.id,flex:`~ row gap-2`,relative:``},[(l(),u(y(t.sessionMode===`list`?d(b):`div`),{to:`/session/${e.id}`,border:`~ rounded-md`,class:m(t.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[t.selectedSessionIds.includes(e.id)?`border-active`:`border-base`,j(e)||t.selectedSessions.length===2&&!t.selectedSessionIds.includes(e.id)?`op50`:`hover:bg-active`]),flex:`~ col gap-1`,px4:``,py3:``,onClick:t=>M(e)},{default:p(()=>[f(`div`,D,[r[0]||=f(`div`,{"i-ph-hash-duotone":``},null,-1),_(` `+h(e.id),1)]),f(`div`,O,h(e.meta.cwd),1),e.meta.inputs[0]?(l(),s(`div`,k,[v(i,{id:e.meta.inputs[0].filename,cwd:e.meta.cwd},null,8,[`id`,`cwd`]),v(a,{text:e.meta.inputs[0].name||`entry`},null,8,[`text`]),e.meta.inputs.length>1?(l(),s(`span`,A,` +`+h(e.meta.inputs.length-1),1)):c(``,!0)])):c(``,!0),v(o,{timestamp:e.timestamp,pt2:``,"text-sm":``,op50:``},null,8,[`timestamp`])]),_:2},1032,[`to`,`class`,`onClick`]))]))),128))])}}}),M=Object.assign(j,{__name:`PanelSessionSelector`}),N={p4:``,flex:`~ col gap-4`,"items-center":``,"justify-center":``,relative:``},P={op50:``},F={relative:``,flex:`~ col gap3 items-center`},I={fixed:``,"top-5":``,"right-5":``,flex:`~ col gap2`},L={flex:`~ row justify-around`,w20:``,h8:``,border:`~ base rounded-8`,"of-hidden":``},R=[`title`,`onClick`],z={key:0,fixed:``,"bottom-5":``,"right-5":``,border:`~ base rounded-2`,w100:``,"max-lg:w85":``,"bg-glass":``,"z-panel-content":``},B={flex:`~ justify-center`,p2:``},V={key:1,op80:``,"text-sm":``},H=i({__name:`index`,async setup(i){let y,S,C=a(`list`),w=[{label:`Session List`,icon:`i-carbon-list`,value:`list`},{label:`Session Compare`,icon:`i-carbon-compare`,value:`compare`}],T=a([]),E=o(()=>T.value.map(e=>e.id).sort()),D=o(()=>[...T.value].sort((e,t)=>e.timestamp-t.timestamp).map((e,t)=>({...e,createdAt:new Date(e.timestamp),title:t===0?`Session A`:`Session B`}))),O=r(),k=([y,S]=t(()=>O.value[`vite:rolldown:list-sessions`]()),y=await y,S(),y);function A(e){E.value.includes(e.id)?T.value=T.value.filter(t=>t.id!==e.id):T.value=[...T.value,e]}return(t,r)=>{let i=n,a=M,o=x,y=b;return l(),s(`div`,N,[v(i),f(`p`,P,h(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1),f(`div`,F,[v(a,{"session-mode":C.value,sessions:d(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),f(`div`,I,[f(`div`,L,[(l(),s(g,null,e(w,e=>f(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:m({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[f(`span`,{class:m([e.icon,`text-sm`])},null,2)],10,R)),64))])]),T.value.length>0&&C.value===`compare`?(l(),s(`div`,z,[v(o,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),f(`div`,B,[T.value.length===2?(l(),u(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:p(()=>[...r[0]||=[_(` Compare `,-1)]]),_:1},8,[`to`])):(l(),s(`div`,V,` Select one more session to compare. `))])])):c(``,!0)])}}});export{H as default};
@@ -0,0 +1 @@
1
+ import{It as e,bt as t,ft as n,gt as r,ht as i,jt as a,pt as o,sn as s,un as c,vt as l}from"#entry";import{t as u}from"./Ci9NHG69.js";var d={"text-xs":``,op75:``,"ml-0.4":``},f={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},p=1024,m=t({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(t){let m=t,h=p**2,g=[[80*p,`color-scale-neutral`],[500*p,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=n(()=>{if(!m.colorize)return g[0];let e=m.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=n(()=>m.total?(m.bytes||0)*100/m.total:0),y=n(()=>u(m.bytes||0,m.digits));return(n,u)=>t.bytes?(a(),r(`div`,{key:0,class:s([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[t.icon?(a(),r(`div`,{key:0,class:s([t.icon,`mr-1`])},null,2)):i(``,!0),l(` `+c(y.value[0]),1),o(`span`,d,c(y.value[1]),1),e(n.$slots,`after`,{},()=>[t.percent&&v.value>t.percentRatio?(a(),r(`span`,f,c(+v.value.toFixed(1))+`%`,1)):i(``,!0)])],2)):i(``,!0)}}),h=Object.assign(m,{__name:`DisplayFileSizeBadge`});export{h as t};
@@ -0,0 +1 @@
1
+ import{Ct as e,bt as t,jt as n,mt as r,zt as i}from"#entry";import{r as a}from"./CQNn9qP2.js";var o=t({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(t){let o=t,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let t=o.compact?c:s;for(let n of t)if(o.name.startsWith(n))return o.compact?e(`span`,o.name.slice(n.length)):e(`span`,[e(`span`,{class:`op50`},n),e(`span`,o.name.slice(n.length))]);let n=o.name.split(`:`);return n.length>1?e(`span`,[e(`span`,{style:{color:a(n[0])}},`${n[0]}:`),e(`span`,n.slice(1).join(`:`))]):e(`span`,o.name)}return(e,t)=>(n(),r(i(l)))}}),s=Object.assign(o,{__name:`DisplayPluginName`});export{s as t};
@@ -0,0 +1 @@
1
+ import{gt as e,jt as t,k as n,pt as r,q as i,un as a}from"#entry";var o={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d={__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:500},statusMessage:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(n){let d=n;return i({title:`${d.statusCode} - ${d.statusMessage} | ${d.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,d)=>(t(),e(`div`,o,[r(`div`,s,[r(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:a(n.statusCode)},null,8,c),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:a(n.statusMessage)},null,8,l),r(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:a(n.description)},null,8,u)])]))}},f=n(d,[[`__scopeId`,`data-v-289a8b59`]]);export{f as default};
@@ -0,0 +1 @@
1
+ import{Ct as e,bt as t,ft as n,gt as r,jt as i,sn as a}from"#entry";import{r as o,s}from"./CQNn9qP2.js";var c=[`title`],l=t({__name:`FileIcon`,props:{filename:{}},setup(e){let t=e,o=n(()=>s(t.filename));return(e,t)=>(i(),r(`div`,{"flex-none":``,"icon-catppuccin":``,title:o.value.description||o.value.name,class:a([o.value.icon])},null,10,c))}}),u=Object.assign(l,{__name:`DisplayFileIcon`}),d=t({name:`HighlightedPath`,props:{path:{type:String,required:!0},minimal:{type:Boolean,default:!1}},setup(t){return()=>{let n=t.path.split(/([?/&:=])/g),r=`path`,i=n.map(()=>[]),a=n.map(()=>[]),s=n.map(t=>e(`span`,{class:``},t)),c=new Set;return n.forEach((e,l)=>{if(e===`?`&&(r=`query`),r===`path`){if(e.match(/^\.+$/)||e===`/`?i[l]?.push(`op50`):(e===`node_modules`||e===`dist`||e===`lib`||e.match(/^\.\w/))&&i[l]?.push(`op60`),e===`node_modules`&&t.minimal)for(let e=0;e<l+2;e++)c.add(e);if(e===`.pnpm`&&(s[l]&&(s[l].children=`~`,i[l]?.push(`op25!`),i[l-1]?.push(`op25!`)),c.add(l+1),c.add(l+2),i[l+3]?.push(`op25!`),s[l+4]?.children===`node_modules`&&(c.add(l+3),c.add(l+4),i[l+5]?.push(`op25!`))),e===`:`&&(s[l-1]&&a[l-1]?.push(`color: ${o(n[l-1])}`),i[l]?.push(`op50`)),n[l-2]===`node_modules`&&!e.startsWith(`.`)){let t=`color: ${o(n[l])}`;a[l]?.push(t),e.startsWith(`@`)&&(a[l+1]?.push(t),a[l+2]?.push(t))}}r===`query`&&(e===`?`?i[l]?.push(`text-red-500 dark:text-red-400`):e===`&`&&i[l]?.push(`text-orange-500 dark:text-orange-400`),e===`=`?i[l]?.push(`text-orange-900 dark:text-orange-200 op50`):n[l+1]===`=`?i[l]?.push(`text-amber-900 dark:text-amber-200`):i[l]?.push(`text-orange-900 dark:text-orange-200`))}),s.forEach((e,t)=>{e.props&&(e.props.class=i[t]?.join(` `)??``,e.props.style=a[t]?.join(`;`)??``)}),Array.from(c).sort((e,t)=>t-e).forEach(e=>{s.splice(e,1)}),s}}});export{u as n,d as t};
@@ -0,0 +1 @@
1
+ import{It as e,X as t,bt as n,ft as r,gt as i,ht as a,j as o,jt as s,ln as c,mt as l,on as u,pt as d,qt as f,sn as p,un as m,yt as h,zt as g}from"#entry";import{t as _}from"./Bjr51Ks8.js";import{n as v,t as y}from"./CQNn9qP2.js";import{n as b,t as x}from"./BO9hKuA-.js";var S=[`textContent`],C=n({__name:`Badge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(t){let n=t,i=r(()=>!n.text||n.color===!1?{}:{color:typeof n.color==`number`?v(n.color):y(n.text),background:typeof n.color==`number`?v(n.color,.1):y(n.text,.1)}),a=r(()=>{switch(n.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(r,o)=>(s(),l(g(t.as||`span`),{"ws-nowrap":``,rounded:``,class:p(a.value),style:c(i.value)},{default:f(()=>[e(r.$slots,`default`,{},()=>[d(`span`,{textContent:m(n.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=Object.assign(C,{__name:`DisplayBadge`}),T=/^[A-Za-z]:\//;function E(e=``){return e&&e.replace(/\\/g,`/`).replace(T,e=>e.toUpperCase())}var D=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,O=/^\/([A-Za-z]:)?$/;function k(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var A=function(...e){e=e.map(e=>E(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:k();!i||i.length===0||(t=`${i}/${t}`,n=M(i))}return t=j(t,!n),n&&!M(t)?`/${t}`:t.length>0?t:`.`};function j(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}var M=function(e){return D.test(e)},N=function(e,t){let n=A(e).replace(O,`$1`).split(`/`),r=A(t).replace(O,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},P={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},F={"font-mono":``,"text-sm":``},I=n({__name:`ModuleId`,props:{id:{},badges:{type:Boolean},icon:{type:Boolean,default:!0},link:{type:[Boolean,String]},minimal:{type:Boolean},kind:{},session:{},cwd:{},disableTooltip:{type:Boolean,default:!1}},setup(n){let c=n,v=t(),y=window.location,S=r(()=>{if(!c.id)return``;let e=c.id.replace(/%2F/g,`/`),t=c.cwd||c.session.meta.cwd,n=t?N(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||n.match(/^(?:\.\.\/){1,3}[^.]/)?n:e}),C=r(()=>`flex items-center`);return(t,r)=>{let T=b,E=x,D=w;return s(),l(g(n.link?u(_):`div`),{to:n.link?typeof n.link==`string`?n.link:{path:u(v).path,query:{...u(v).query,module:n.id,chunk:void 0},hash:u(y).hash}:void 0},{default:f(()=>[h(u(o),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:n.disableTooltip||(c.id?.length||0)<30,placement:`bottom-start`},{popper:f(()=>[d(`span`,F,m(c.id),1)]),default:f(()=>[n.id?(s(),i(`div`,{key:0,class:p(C.value)},[n.icon?(s(),l(T,{key:0,filename:n.id,"mr1.5":``},null,8,[`filename`])):a(``,!0),d(`span`,P,[h(E,{path:S.value,minimal:n.minimal},null,8,[`path`,`minimal`])]),e(t.$slots,`default`),n.kind?(s(),l(D,{key:1,class:`ml1`,text:n.kind},null,8,[`text`])):a(``,!0)],2)):a(``,!0),d(`div`,null,[e(t.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),L=Object.assign(I,{__name:`DisplayModuleId`});export{N as n,w as r,L as t};
@@ -0,0 +1 @@
1
+ import{Ft as e,Tt as t,Vt as n,X as r,bt as i,gt as a,ht as o,jt as s,ln as c,mt as l,on as u,pt as d,qt as f,sn as p,ut as m,yt as h,zt as g}from"#entry";import{t as _}from"./Bjr51Ks8.js";import{n as v,t as y}from"./BO9hKuA-.js";var b=[`open`],x={"font-mono":``},S={"font-mono":``},C=i({__name:`TreeNode`,props:t({node:{},icon:{default:`i-catppuccin:folder icon-catppuccin`},iconOpen:{default:`i-catppuccin:folder-open icon-catppuccin`},link:{type:[String,Boolean]},linkQueryKey:{default:`module`},padding:{default:0},open:{type:Boolean}},{open:{type:Boolean,required:!1,default:!0},openModifiers:{}}),emits:t([`select`],[`update:open`]),setup(t,{emit:i}){let C=t,T=i,E=n(t,`open`),D=r(),O=window.location;function k(e){C.link||T(`select`,e)}return(n,r)=>{let i=y,C=w,T=v;return s(),a(`details`,{open:E.value,onToggle:r[0]||=e=>E.value=e.target?.open},[d(`summary`,{"cursor-default":``,"select-none":``,"text-sm":``,truncate:``,style:c({paddingLeft:`${t.padding+.5}rem`}),flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active `},[d(`div`,{class:p([`i-ph:caret-right-duotone transition op50`,E.value?`rotate-90`:``])},null,2),d(`div`,{class:p(E.value&&t.iconOpen||t.icon),"inline-block":``,"vertical-text-bottom":``},null,2),d(`div`,x,[h(i,{path:t.node.name||``},null,8,[`path`])])],4),E.value?(s(),a(m,{key:0},[(s(!0),a(m,null,e(Object.entries(t.node.children),e=>(s(),l(C,{key:e[0],node:e[1],link:t.link,padding:t.padding+1,"link-query-key":t.linkQueryKey,onSelect:k},null,8,[`node`,`link`,`padding`,`link-query-key`]))),128)),(s(!0),a(m,null,e(t.node.items,e=>(s(),l(g(t.link?u(_):`div`),{key:e.full,to:t.link?typeof t.link==`string`?t.link:{path:u(D).path,query:{...u(D).query,[t.linkQueryKey]:e.full},hash:u(O).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:c({paddingLeft:`${t.padding+2.7}rem`}),onClick:t=>k(e)},{default:f(()=>[h(T,{filename:e.full},null,8,[`filename`]),d(`div`,S,[h(i,{path:e.path.split(`/`).pop()||``},null,8,[`path`])])]),_:2},1032,[`to`,`style`,`onClick`]))),128))],64)):o(``,!0)],40,b)}}}),w=Object.assign(C,{__name:`DisplayTreeNode`});export{w as t};
@@ -0,0 +1 @@
1
+ import{u as e}from"./CQNn9qP2.js";import{n as t}from"./BQ-NBLhA.js";import{n,t as r}from"./DnpfwSMy.js";function i(e){let t=e.match(/.*\/node_modules\/(.*)$/)?.[1];if(t)return t}const a=e((e,a)=>{let o=e.replace(/%2F/g,`/`).replace(/\\/g,`/`);if(n(o)||o.match(/^\w+:/)&&!e.match(/^[a-z]:\\/i))return{moduleName:o,path:o};let s=r(o),c=i(o);if(s&&c)return{moduleName:s,path:c};try{let e=t(a,o);return!e.startsWith(`./`)&&!e.startsWith(`../`)&&(e=`./${e}`),e.startsWith(`./.nuxt/`)&&(e=`#build${e.slice(7)}`),{path:e}}catch{return{path:o}}});export{a as t};
@@ -0,0 +1 @@
1
+ import{D as e,Et as t,Ft as n,T as r,X as i,bt as a,en as o,ft as s,gt as c,jt as l,kt as u,mt as d,pt as f,qt as p,sn as m,un as h,ut as g,vt as _,yt as v}from"#entry";import{t as y}from"./Bjr51Ks8.js";import{t as b}from"./DSjlpmm-.js";import{t as x}from"./Ci9NHG69.js";var S=a({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,n=s(()=>t.previous===t.current),r=s(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(n.value?0:2)),i=s(()=>n.value?``:t.current>t.previous?`+`:`-`),a=s(()=>n.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(l(),c(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:m(a.value)},h(i.value)+h(r.value)+`% `,3))}}),C=Object.assign(S,{__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=a({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,n=s(()=>t.format===`bytes`?x(t.current):t.current);return(t,r)=>{let i=C;return l(),c(g,null,[f(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[f(`div`,{class:m([e.icon,`text-xl`])},null,2),_(` `+h(e.name),1)],8,w),f(`div`,T,[e.format===`bytes`?(l(),c(`div`,E,[f(`span`,D,h(n.value[0]),1),f(`span`,O,h(n.value[1]),1)])):(l(),c(`div`,k,[f(`span`,A,h(n.value),1)])),v(i,{current:e.current,previous:e.previous},null,8,[`current`,`previous`])])],64)}}}),M=Object.assign(j,{__name:`CompareMetricCard`}),N={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},P={flex:`~ gap-2`},F={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},I={grid:`~ cols-4 gap5`,"w-full":``,pt3:``},L=a({__name:`index`,setup(a){let h=o(!1),x=i().params,S=r(),C=o([]);u(async()=>{h.value=!0,C.value=await S.value[`vite:rolldown:get-session-compare-summary`]({sessions:x.sessions.split(`,`)}),h.value=!1});let w=s(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),T=s(()=>{let[e,t]=w.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:`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(r,i)=>{let a=e,o=y,s=b,u=M;return h.value?(l(),d(a,{key:0})):(l(),c(`div`,N,[f(`div`,P,[v(o,{"btn-action":``,to:{path:`/`}},{default:p(()=>[...i[0]||=[f(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),_(` Re-select Session `,-1)]]),_:1})]),f(`div`,F,[i[1]||=f(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),v(s,{sessions:w.value},null,8,[`sessions`]),f(`div`,I,[(l(!0),c(g,null,n(T.value,(e,n)=>(l(),c(`div`,{key:e.name,class:m(n<2?`col-span-2`:`col-span-1`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[v(u,t({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{L as default};
@@ -0,0 +1 @@
1
+ import{Et as e,Ft as t,It as n,Jt as r,Rt as i,Wt as a,bt as o,cn as s,en as c,gt as l,ht as u,jt as d,kt as f,ln as p,lt as m,mt as h,on as g,ot as _,pt as v,qt as y,sn as b,un as x,ut as S,yt as C}from"#entry";import{a as w,i as T,n as E,o as ee,r as D,s as O}from"./IrMnfQaU.js";var k=o({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(t){let n=c(!1),r=null;return a(()=>t.content,()=>{r&&clearTimeout(r),n.value=!0,r=setTimeout(()=>{n.value=!1},t.hideInterval)}),(r,i)=>(d(),h(_,{"enter-active-class":`transition-opacity duration-200 ease-in`,"leave-active-class":`transition-opacity duration-500 ease-out`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:y(()=>[n.value?(d(),l(`div`,s(e({key:0},r.$attrs)),x(t.content),17)):u(``,!0)]),_:1}))}}),A=Object.assign(k,{__name:`DisplayTimeoutView`}),j=[`width`,`height`],M=[`d`],N={class:`w-4`},P=[`disabled`,`title`,`onClick`],F={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},I={"w-10":``,flex:`~ items-center justify-center`},L={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},R=[`disabled`],z=[`disabled`],B=[`disabled`],V=[`disabled`],H=o({__name:`ModuleGraph`,props:{modules:{},session:{}},setup(e){let o=e,{isFirstCalculateGraph:s,childToParentMap:c,collapsedNodes:h,calculateGraph:_,container:y,width:x,height:k,scale:H,nodes:U,links:W,spacing:G,nodesRefMap:K}=ee(),{isGrabbing:q,init:J}=T(),{zoomIn:Y,zoomOut:X,ZOOM_MIN:Z,ZOOM_MAX:Q}=w(),{isGraphNodeToggling:$,toggleNode:te,expandAll:ne,collapseAll:re}=O({modules:o.modules});return f(()=>{J(),a(()=>o.modules,()=>{s.value=!0,h.clear(),c.clear(),_()},{immediate:!0})}),(e,a)=>{let o=A,s=i(`tooltip`);return d(),l(`div`,{ref_key:`container`,ref:y,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:b(g(q)?`cursor-grabbing`:``)},[v(`div`,{style:p({width:`${g(x)*g(H)}px`,height:`${g(k)*g(H)}px`})},[v(`div`,{flex:`~ items-center justify-center`,style:p({transform:`scale(${g(H)})`,transformOrigin:`0 0`})},[v(`div`,{absolute:``,"left-0":``,"top-0":``,style:p({width:`${g(x)}px`,height:`${g(k)}px`}),class:`bg-dots`},null,4),(d(),l(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:g(x),height:g(k)},[v(`g`,null,[(d(!0),l(S,null,t(g(W),t=>n(e.$slots,`link`,{key:t.id,link:t,d:g(E)(t,g(G)),linkClass:g(D)(t)},()=>[(d(),l(`path`,{key:t.id,d:g(E)(t,g(G)),class:b(g(D)(t)),fill:`none`},null,10,M))])),128))])],8,j)),(d(!0),l(S,null,t(g(U),t=>(d(),l(S,{key:t.data.module.id},[t.data.module.id===`~root`?u(``,!0):(d(),l(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:p({left:`${t.x}px`,top:`${t.y}px`,transform:`translate(-50%, -50%)`})},[v(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:p({minWidth:`${g(g(G).width)}px`,maxWidth:`${g(g(G).width)}px`,maxHeight:`${g(g(G).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[n(e.$slots,`default`,{node:t,nodesRefMap:g(K)})],4),v(`div`,N,[t.data.hasChildren?(d(),l(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:b([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":g($),"hover:bg-active":!g($)}]),disabled:g($),title:t.data.expanded?`Collapse`:`Expand`,onClick:m(e=>g(te)(t.data.module.id),[`stop`])},[v(`div`,{class:b([`text-primary h-4`,[t.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,P)):u(``,!0)])],4))],64))),128))],4)],4),v(`div`,F,[v(`div`,I,[C(o,{content:`${Math.round(g(H)*100)}%`,class:`text-sm`},null,8,[`content`])]),v(`div`,L,[r((d(),l(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:g($),class:b({"op50 cursor-not-allowed":g($),"hover:bg-active":!g($)}),title:`Expand All`,onClick:a[0]||=e=>g(ne)()},[...a[4]||=[v(`div`,{class:`i-carbon:expand-categories`},null,-1)]],10,R)),[[s,`Expand All`,void 0,{left:!0}]]),r((d(),l(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:g($),class:b({"op50 cursor-not-allowed":g($),"hover:bg-active":!g($)}),title:`Collapse All`,onClick:a[1]||=e=>g(re)()},[...a[5]||=[v(`div`,{class:`i-carbon:collapse-categories`},null,-1)]],10,z)),[[s,`Collapse All`,void 0,{left:!0}]]),a[8]||=v(`div`,{border:`t base`,my1:``},null,-1),r((d(),l(`button`,{disabled:g(H)>=g(Q),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom In (Ctrl + =)`,onClick:a[2]||=e=>g(Y)()},[...a[6]||=[v(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,B)),[[s,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),r((d(),l(`button`,{disabled:g(H)<=g(Z),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom Out (Ctrl + -)`,onClick:a[3]||=e=>g(X)()},[...a[7]||=[v(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,V)),[[s,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),U=Object.assign(H,{__name:`DisplayModuleGraph`});export{U as t};
@@ -0,0 +1 @@
1
+ import{$ as e,Ct as t,G as n,H as r,J as i,K as a,Lt as o,Ot as s,Q as c,U as l,W as u,Y as d,Z as f,at as p,bt as m,en as h,et as g,ft as _,it as v,kt as y,nn as b,nt as x,rt as S,tt as C}from"#entry";var w=(...e)=>e.find(e=>e!==void 0);function T(a){let p=a.componentName||`NuxtLink`;function g(e){return typeof e==`string`&&e.startsWith(`#`)}function v(e,t,n){let r=n??a.trailingSlash;if(!e||r!==`append`&&r!==`remove`)return e;if(typeof e==`string`)return D(e,r);let i=`path`in e&&e.path!==void 0?e.path:t(e).path;return{...e,name:void 0,path:D(i,r)}}function T(t){let n=f(),r=e(),s=_(()=>!!t.target&&t.target!==`_self`),c=_(()=>{let e=t.to||t.href||``;return typeof e==`string`&&C(e,{acceptRelative:!0})}),l=o(`RouterLink`),u=l&&typeof l!=`string`?l.useLink:void 0,p=_(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||c.value}),m=_(()=>{let e=t.to||t.href||``;return p.value?e:v(e,n.resolve,t.trailingSlash)}),h=p.value?void 0:u?.({...t,to:m}),y=_(()=>{let e=t.trailingSlash??a.trailingSlash;if(!m.value||c.value||g(m.value))return m.value;if(p.value){let t=typeof m.value==`object`&&`path`in m.value?d(m.value):m.value,r=typeof t==`object`?n.resolve(t).href:t;return D(r,e)}return typeof m.value==`object`?n.resolve(m.value)?.href??null:D(x(r.app.baseURL,m.value),e)});return{to:m,hasTarget:s,isAbsoluteUrl:c,isExternal:p,href:y,isActive:h?.isActive??_(()=>m.value===n.currentRoute.value.path),isExactActive:h?.isExactActive??_(()=>m.value===n.currentRoute.value.path),route:h?.route??_(()=>n.resolve(m.value)),async navigate(e){await i(y.value,{replace:t.replace,external:p.value||s.value})}}}return m({name:p,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:T,setup(e,{slots:i}){let p=f(),{to:m,href:_,navigate:v,isExternal:x,hasTarget:C,isAbsoluteUrl:E}=T(e),D=b(!1),k=h(null),j=t=>{k.value=e.custom?t?.$el?.nextElementSibling:t?.$el};function M(t){return!D.value&&(typeof e.prefetchOn==`string`?e.prefetchOn===t:e.prefetchOn?.[t]??a.prefetchOn?.[t])&&(e.prefetch??a.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!==`_blank`&&!A()}async function N(e=c()){if(D.value)return;D.value=!0;let t=typeof m.value==`string`?m.value:x.value?d(m.value):p.resolve(m.value).fullPath,n=x.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n).catch(()=>{}),!x.value&&!C.value&&r(m.value,p).catch(()=>{})])}if(M(`visibility`)){let e=c(),t,r=null;y(()=>{let i=O();l(()=>{t=n(()=>{k?.value?.tagName&&(r=i.observe(k.value,async()=>{r?.(),r=null,await N(e)}))})})}),s(()=>{t&&u(t),r?.(),r=null})}return()=>{if(!x.value&&!C.value&&!g(m.value)){let n={ref:j,to:m.value,activeClass:e.activeClass||a.activeClass,exactActiveClass:e.exactActiveClass||a.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(M(`interaction`)&&(n.onPointerenter=N.bind(null,void 0),n.onFocus=N.bind(null,void 0)),D.value&&(n.class=e.prefetchedClass||a.prefetchedClass),n.rel=e.rel||void 0),t(o(`RouterLink`),n,i.default)}let n=e.target||null,r=w(e.noRel?``:e.rel,a.externalRelAttribute,E.value||C.value?`noopener noreferrer`:``)||null;return e.custom?i.default?i.default({href:_.value,navigate:v,prefetch:N,get route(){if(!_.value)return;let e=new URL(_.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return S(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:_.value}},rel:r,target:n,isExternal:x.value||C.value,isActive:!1,isExactActive:!1}):null:t(`a`,{ref:k,href:_.value||null,rel:r,target:n,onClick:t=>{if(!(x.value||C.value))return t.preventDefault(),e.replace?p.replace(_.value):p.push(_.value)}},i.default?.())}}})}var E=T(g);function D(e,t){let n=t===`append`?v:p;return C(e)&&!e.startsWith(`http`)?e:n(e,!0)}function O(){let e=c();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 k=/2g/;function A(){let e=navigator.connection;return!!(e&&(e.saveData||k.test(e.effectiveType)))}export{E as t};
@@ -0,0 +1 @@
1
+ import{$t as e,Qt as t,Wt as n,ft as r,rn as i}from"#entry";var a=0,o=e(new Map);const s=r(()=>Array.from(o.values()).flat());function c(e){let r=i(e),s=()=>{};function c(e){s();let t=a++;return o.set(t,e),s=()=>{o.delete(t)},t}return n(r,e=>{c(e)},{immediate:!0}),t(()=>{s()}),()=>{s()}}export{c as n,s as t};
@@ -0,0 +1 @@
1
+ import{gt as e,jt as t,k as n,pt as r,q as i,qt as a,un as o,vt as s,yt as c}from"#entry";import{t as l}from"./Bjr51Ks8.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g={__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:404},statusMessage:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(n){let g=n;return i({title:`${g.statusCode} - ${g.statusMessage} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,g)=>{let _=l;return t(),e(`div`,u,[r(`div`,d,[r(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:o(n.statusCode)},null,8,f),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:o(n.statusMessage)},null,8,p),r(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:o(n.description)},null,8,m),r(`div`,h,[c(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:a(()=>[s(o(n.backHome),1)]),_:1})])])])}}},_=n(g,[[`__scopeId`,`data-v-a8693205`]]);export{_ as default};
@@ -0,0 +1 @@
1
+ import{D as e,Dt as t,Ft as n,T as r,X as i,bt as a,ft as o,gt as s,ht as c,jt as l,mt as u,on as d,pt as f,qt as p,s as m,sn as h,un as g,ut as _,vt as v,yt as y}from"#entry";import{t as b}from"./Bjr51Ks8.js";import"./CQNn9qP2.js";import"./BO9hKuA-.js";import{r as x}from"./BQ-NBLhA.js";import{t as S}from"./pXptjyzi.js";import{t as C}from"./D_Sk_I-u.js";import{t as w}from"./IrMnfQaU.js";import{t as T}from"./BjbaCuBE.js";var E={op50:``,"font-mono":``,w12:``},D=[`title`],O={flex:`~ gap-1 items-center`},k=a({__name:`Graph`,props:{session:{},chunks:{}},setup(e){let n=e,r=o(()=>n.chunks),a=i();return w({modules:r,spacing:{width:320,height:55,linkOffset:15,margin:120,gap:80},generateGraph:e=>{let{isFirstCalculateGraph:n,scale:i,spacing:a,tree:o,hierarchy:s,collapsedNodes:c,container:l,modulesMap:u,nodes:f,links:p,nodesMap:m,linksMap:h,width:g,height:_,childToParentMap:v}=e;return()=>{g.value=window.innerWidth,_.value=window.innerHeight;let e=s({module:{id:`~root`}},e=>`${e.module?.id}`==`~root`?(r.value.forEach(e=>{n.value&&v.set(e.id,`~root`)}),r.value.map(e=>({module:e,expanded:!c.has(e.id),hasChildren:!1}))):c.has(`${e.module?.id}`)||e.end?[]:e.module.imports.map(t=>{let r=u.value.get(`${t.chunk_id}`);if(r)return n.value&&v.set(r.id,e.module.id),{module:r,import:t,expanded:!c.has(r.id),hasChildren:!1,end:!0}}).filter(e=>e!==void 0));n.value&&=!1,o().nodeSize([d(a.height),d(a.width)+d(a.gap)])(e);let y=e.descendants();for(let e of y)[e.x,e.y]=[e.y-d(a.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports.length>0&&!e.data.end);let b=Math.min(...y.map(e=>e.x)),x=Math.min(...y.map(e=>e.y));if(b<d(a.margin))for(let e of y)e.x+=Math.abs(b)+d(a.margin);if(x<d(a.margin))for(let e of y)e.y+=Math.abs(x)+d(a.margin);f.value=y,m.clear();for(let e of y)m.set(`${e.data.module.id}`,e);let S=e.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));h.clear();for(let e of S)h.set(e.id,e);p.value=S,t(()=>{g.value=l.value.scrollWidth/i.value+d(a.margin),_.value=l.value.scrollHeight/i.value+d(a.margin)})}}}),(t,n)=>{let i=x,o=b,s=T;return l(),u(s,{session:e.session,modules:r.value},{default:p(({node:e})=>[y(o,{class:`flex items-center`,to:{path:d(a).path,query:{chunk:e.data.module.chunk_id}}},{default:p(()=>[f(`span`,E,`#`+g(e.data.module.id),1),f(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[n[0]||=f(`div`,{"i-ph-shapes-duotone":``},null,-1),f(`div`,null,g(e.data.module.name||`[unnamed]`),1),y(i,{text:e.data.module.reason},null,8,[`text`])],8,D),n[2]||=f(`div`,{"flex-auto":``},null,-1),f(`div`,O,[n[1]||=f(`div`,{"i-ph-package-duotone":``},null,-1),v(` `+g(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),A=Object.assign(k,{__name:`ChunksGraph`}),j={key:1,relative:``,"max-h-screen":``,"of-hidden":``},M={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},N={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},P=[`onClick`],F={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},I=a({__name:`chunks`,props:{session:{}},setup(t){let i=t,a=[{label:`List`,value:`list`,icon:`i-carbon-list`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],p=r(),{state:y,isLoading:b}=m(async()=>await p.value[`vite:rolldown:get-chunks-graph`]?.({session:i.session.id}),null),x=o(()=>y.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function w(e){C.value.chunkViewType=e}return(r,i)=>{let o=e,p=S,m=A;return d(b)?(l(),u(o,{key:0})):(l(),s(`div`,j,[f(`div`,M,[f(`div`,N,[i[0]||=f(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(l(),s(_,null,n(a,e=>f(`button`,{key:e.value,"btn-action":``,class:h(d(C).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>w(e.value)},[f(`div`,{class:h(e.icon)},null,2),v(` `+g(e.label),1)],10,P)),64))])]),d(C).chunkViewType===`list`?(l(),s(`div`,F,[(l(!0),s(_,null,n(d(y),e=>(l(),u(p,{key:e.id,border:`~ base rounded-lg`,p3:``,chunk:e,session:t.session},null,8,[`chunk`,`session`]))),128))])):d(C).chunkViewType===`graph`?(l(),u(m,{key:1,session:t.session,chunks:x.value},null,8,[`session`,`chunks`])):c(``,!0)]))}}});export{I as default};
@@ -0,0 +1 @@
1
+ import{t as e}from"#entry";var t;(class{static{t=Symbol.toStringTag}constructor(){this[t]=`MaybeWeakMap`,this._map=new Map,this._weakMap=new WeakMap}delete(e){return this._weakMap.has(e)?this._weakMap.delete(e):this._map.delete(e)}has(e){return this._weakMap.has(e)?!0:this._map.has(e)}set(e,t){return this._weakMap.has(e)?this._weakMap.set(e,t):this._map.set(e,t),this}get(e){return this._weakMap.has(e)?this._weakMap.get(e):this._map.get(e)}clear(){this._map.clear()}});var n=class{constructor(e){this.length=e,this._mapTree=new Map}_getLastMap(e){let t=this._mapTree;for(let n of e.slice(0,-1))t.has(n)||t.set(n,new Map),t=t.get(n);return t}set(e,t){if(e.length!==this.length)throw Error(`Expect tuple of length ${this.length}, got ${e.length}`);return this._getLastMap(e).set(e[e.length-1],t),this}get(e){return this._getLastMap(e).get(e[e.length-1])}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e[e.length-1])}get size(){return this._mapTree.size}*_traverseMap(){function*e(t,n,r){if(r===0)yield{keys:n,map:t};else for(let[i,a]of t.entries())yield*e(a,[...n,i],r-1)}yield*e(this._mapTree,[],this.length)}},r=class{constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,t){let r=e.length,i=this._lengthMap.get(r);return i||(i=new n(r),this._lengthMap.set(r,i)),i.set(e,t),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function i(e){let t=new r,n=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return n.cache=t,n}const a=[{match:/[\\/]node_modules[\\/]/i,name:`node_modules`,description:`Node Modules`,icon:`i-catppuccin-npm`},{match:/virtual:|^\0/,name:`virtual`,description:`Virtual`,icon:`i-catppuccin-symlink`},{match:/^@?[\w-]+\/?/,name:`package`,description:`Package`,icon:`i-catppuccin-java-class-abstract`},{match:/\.vue$/i,name:`vue`,description:`Vue`,icon:`i-catppuccin-vue`},{match:/\.[cm]?[tj]sx$/i,name:`jsx`,description:`JavaScript React`,icon:`i-catppuccin-javascript-react`},{match:/\.[cm]?ts$/i,name:`ts`,description:`TypeScript`,icon:`i-catppuccin-typescript`},{match:/\.[cm]?js$/i,name:`js`,description:`JavaScript`,icon:`i-catppuccin-javascript`},{match:/\.svelte$/i,name:`svelte`,description:`Svelte`,icon:`i-catppuccin-svelte`},{match:/\.mdx$/i,name:`mdx`,description:`MDX`,icon:`i-catppuccin-mdx`},{match:/\.md$/i,name:`md`,description:`Markdown`,icon:`i-catppuccin-markdown`},{match:/\.astro$/i,name:`astro`,description:`Astro`,icon:`i-catppuccin-astro`},{match:/\.angular$/i,name:`angular`,description:`Angular`,icon:`i-catppuccin-angular`},{match:/\.html?$/i,name:`html`,description:`HTML`,icon:`i-catppuccin-html`},{match:/\.(css|scss|less|postcss)$/i,name:`css`,description:`CSS`,icon:`i-catppuccin-css`},{match:/\.json[c5]?$/i,name:`json`,description:`JSON`,icon:`i-catppuccin-json`},{match:/\.(yaml|yml)$/i,name:`yaml`,description:`YAML`,icon:`i-catppuccin-yaml`},{match:/\.toml$/i,name:`toml`,description:`TOML`,icon:`i-catppuccin-toml`},{match:/\.svg$/i,name:`svg`,description:`SVG`,icon:`i-catppuccin-svg`}],o=[{match:/^(replace|define|alias)$/,name:`rollup`,description:`Rollup`,icon:`i-catppuccin-rollup`},{match:/^vite:/i,name:`vite`,description:`Vite`,icon:`i-catppuccin-vite`},{match:/^unocss:/i,name:`unocss`,description:`Unocss`,icon:`i-catppuccin-unocss`},{match:/^nuxt:/i,name:`nuxt`,description:`Nuxt`,icon:`i-catppuccin-nuxt`},{match:/^builtin:/i,name:`builtin`,description:`Builtin`,icon:`i-catppuccin-folder-prisma`}],s={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},c={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function l(e){return a.find(t=>t.name===e)??s}const u=i(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of a)if(t.match.test(e))return t;return s}),d=i(e=>{for(let t of o)if(t.match.test(e))return t;return c});function f(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);let r=n%360;return p(r,t)}function p(t,n=1){let r=e.value?50:65,i=e.value?60:40;return`hsla(${t}, ${r}%, ${i}%, ${n})`}const m={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,virtual:160,nuxt:140};function h(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in m){let n=m[e];if(typeof n==`number`)return p(n,t);{if(t===1)return n;let e=Math.floor(t*255).toString(16).padStart(2,`0`);return n+e}}return f(e,t)}export{a,l as c,c as i,d as l,p as n,o,h as r,u as s,f as t,i as u};
@@ -0,0 +1 @@
1
+ import{B as e,F as t,I as n,It as r,L as i,N as a,P as o,R as s,Ut as c,V as l,Wt as u,bt as d,dt as f,en as p,in as m,jt as h,ln as g,mt as _,pt as v,z as y}from"#entry";function b(){return typeof window<`u`}function x(e){return ee(e)?(e.nodeName||``).toLowerCase():`#document`}function S(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function C(e){return((ee(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ee(e){return b()?e instanceof Node||e instanceof S(e).Node:!1}function w(e){return b()?e instanceof Element||e instanceof S(e).Element:!1}function T(e){return b()?e instanceof HTMLElement||e instanceof S(e).HTMLElement:!1}function te(e){return!b()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}var ne=new Set([`inline`,`contents`]);function E(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=A(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ne.has(i)}var re=new Set([`table`,`td`,`th`]);function ie(e){return re.has(x(e))}var ae=[`:popover-open`,`:modal`];function D(e){return ae.some(t=>{try{return e.matches(t)}catch{return!1}})}var oe=[`transform`,`translate`,`scale`,`rotate`,`perspective`],se=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],ce=[`paint`,`layout`,`strict`,`content`];function O(e){let t=ue(),n=w(e)?A(e):e;return oe.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||se.some(e=>(n.willChange||``).includes(e))||ce.some(e=>(n.contain||``).includes(e))}function le(e){let t=M(e);for(;T(t)&&!k(t);){if(O(t))return t;if(D(t))return null;t=M(t)}return null}function ue(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var de=new Set([`html`,`body`,`#document`]);function k(e){return de.has(x(e))}function A(e){return S(e).getComputedStyle(e)}function j(e){return w(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function M(e){if(x(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||te(e)&&e.host||C(e);return te(t)?t.host:t}function fe(e){let t=M(e);return k(t)?e.ownerDocument?e.ownerDocument.body:e.body:T(t)&&E(t)?t:fe(t)}function N(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fe(e),i=r===e.ownerDocument?.body,a=S(r);if(i){let e=P(a);return t.concat(a,a.visualViewport||[],E(r)?r:[],e&&n?N(e):[])}return t.concat(r,N(r,[],n))}function P(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pe(e){let t=A(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=T(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=l(n)!==a||l(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function me(e){return w(e)?e:e.contextElement}function F(e){let t=me(e);if(!T(t))return i(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=pe(t),s=(o?l(n.width):n.width)/r,c=(o?l(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var he=i(0);function ge(e){let t=S(e);return!ue()||!t.visualViewport?he:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==S(e)?!1:t}function I(t,n,r,a){n===void 0&&(n=!1),r===void 0&&(r=!1);let o=t.getBoundingClientRect(),s=me(t),c=i(1);n&&(a?w(a)&&(c=F(a)):c=F(t));let l=_e(s,r,a)?ge(s):i(0),u=(o.left+l.x)/c.x,d=(o.top+l.y)/c.y,f=o.width/c.x,p=o.height/c.y;if(s){let e=S(s),t=a&&w(a)?S(a):a,n=e,r=P(n);for(;r&&a&&t!==n;){let e=F(r),t=r.getBoundingClientRect(),i=A(r),a=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;u*=e.x,d*=e.y,f*=e.x,p*=e.y,u+=a,d+=o,n=S(r),r=P(n)}}return e({width:f,height:p,x:u,y:d})}function L(e,t){let n=j(e).scrollLeft;return t?t.left+n:I(C(e)).left+n}function ve(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-L(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function ye(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e,o=a===`fixed`,s=C(r),c=t?D(t.floating):!1;if(r===s||c&&o)return n;let l={scrollLeft:0,scrollTop:0},u=i(1),d=i(0),f=T(r);if((f||!f&&!o)&&((x(r)!==`body`||E(s))&&(l=j(r)),T(r))){let e=I(r);u=F(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=s&&!f&&!o?ve(s,l):i(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function be(e){return Array.from(e.getClientRects())}function xe(e){let t=C(e),n=j(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+L(e),c=-n.scrollTop;return A(r).direction===`rtl`&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}var Se=25;function Ce(e,t){let n=S(e),r=C(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ue();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=L(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Se&&(a-=o)}else l<=Se&&(a+=l);return{width:a,height:o,x:s,y:c}}var we=new Set([`absolute`,`fixed`]);function Te(e,t){let n=I(e,!0,t===`fixed`),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=T(e)?F(e):i(1),s=e.clientWidth*o.x,c=e.clientHeight*o.y,l=a*o.x,u=r*o.y;return{width:s,height:c,x:l,y:u}}function Ee(t,n,r){let i;if(n===`viewport`)i=Ce(t,r);else if(n===`document`)i=xe(C(t));else if(w(n))i=Te(n,r);else{let e=ge(t);i={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return e(i)}function De(e,t){let n=M(e);return n===t||!w(n)||k(n)?!1:A(n).position===`fixed`||De(n,t)}function Oe(e,t){let n=t.get(e);if(n)return n;let r=N(e,[],!1).filter(e=>w(e)&&x(e)!==`body`),i=null,a=A(e).position===`fixed`,o=a?M(e):e;for(;w(o)&&!k(o);){let t=A(o),n=O(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&we.has(i.position)||E(o)&&!n&&De(e,o))?r=r.filter(e=>e!==o):i=t,o=M(o)}return t.set(e,r),r}function ke(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?D(t)?[]:Oe(t,this._c):[].concat(n),r],o=a[0],c=a.reduce((e,n)=>{let r=Ee(t,n,i);return e.top=s(r.top,e.top),e.right=y(r.right,e.right),e.bottom=y(r.bottom,e.bottom),e.left=s(r.left,e.left),e},Ee(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ae(e){let{width:t,height:n}=pe(e);return{width:t,height:n}}function je(e,t,n){let r=T(t),a=C(t),o=n===`fixed`,s=I(e,!0,o,t),c={scrollLeft:0,scrollTop:0},l=i(0);function u(){l.x=L(a)}if(r||!r&&!o)if((x(t)!==`body`||E(a))&&(c=j(t)),r){let e=I(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&u();o&&!r&&a&&u();let d=a&&!r&&!o?ve(a,c):i(0),f=s.left+c.scrollLeft-l.x-d.x,p=s.top+c.scrollTop-l.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function R(e){return A(e).position===`static`}function Me(e,t){if(!T(e)||A(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return C(e)===n&&(n=n.ownerDocument.body),n}function Ne(e,t){let n=S(e);if(D(e))return n;if(!T(e)){let t=M(e);for(;t&&!k(t);){if(w(t)&&!R(t))return t;t=M(t)}return n}let r=Me(e,t);for(;r&&ie(r)&&R(r);)r=Me(r,t);return r&&k(r)&&R(r)&&!O(r)?n:r||le(e)||n}var Pe=async function(e){let t=this.getOffsetParent||Ne,n=this.getDimensions,r=await n(e.floating);return{reference:je(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fe(e){return A(e).direction===`rtl`}var Ie={convertOffsetParentRelativeRectToViewportRelativeRect:ye,getDocumentElement:C,getClippingRect:ke,getOffsetParent:Ne,getElementRects:Pe,getClientRects:be,getDimensions:Ae,getScale:F,isElement:w,isRTL:Fe},Le=t,Re=n,ze=o,Be=(e,t,n)=>{let r=new Map,i={platform:Ie,...n},o={...i.platform,_c:r};return a(e,t,{...i,platform:o})},Ve=d({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=m(e),i=c(`hoverElement`),a=p(0),o=p(0);return u([t,n],([e,t])=>{Be({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},i.value,{placement:`right-start`,middleware:[ze(),Re(),Le({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,o.value=t})}),(e,t)=>(h(),_(f,{to:`body`},[v(`div`,{ref_key:`hoverElement`,ref:i,fixed:``,"z-panel-content":``,style:g({left:`${a.value}px`,top:`${o.value}px`})},[r(e.$slots,`default`)],4)]))}}),He=Object.assign(Ve,{__name:`DisplayGraphHoverView`});function Ue(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var We,Ge,Ke,z,B,V=1,H;function U(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(We!==t||Ge!==a||Ke!==i){let n=Math.round(64*a)/64;V=i,V=Math.log2(V),V-=Math.floor(V);let r=V,o=Math.min(1,8*r);V=2**V;let s=8*Math.SQRT2/V;We=t,Ge=a,Ke=i,z||=document.createElement(`canvas`),B||=z.getContext(`2d`),z.width=z.height=Math.round(64*n),B.scale(n,n),B.fillStyle=e[0],B.fillRect(0,0,64,64),B.globalAlpha=.25,B.fillStyle=e[1],B.fillRect(0,0,64,64),B.globalAlpha=.67,B.strokeStyle=e[1],B.beginPath();for(let e=0;e<=64;e+=16)B.moveTo(e-32,e+32),B.lineTo(e+32,e-32);if(B.lineWidth=s*(1-(o-r)/2),B.stroke(),o+r>0){B.beginPath();for(let e=8;e<64;e+=16)B.moveTo(e-32,e+32),B.lineTo(e+32,e-32);B.lineWidth=s*(o+r)/2,B.stroke()}H=t.createPattern(z,`repeat`),V/=n}return n/=64*V*a,n-=Math.floor(n),n*=64*V*a,H.setTransform(new DOMMatrix([V,0,0,V,n,r])),H}function qe(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function Je(e){return t=>t.id&&e[t.id]||t.color}function Ye(e,t=1,n=1){let r={};return Xe(r,e,0,Math.PI*2,t,n),Je(r)}function Xe(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ue(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;Xe(e,s,n,t,i,a),n+=t}}var Ze=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Qe(e=16,t=Ze){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function $e(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=Qe(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>$e(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function et(e){return e.children.length===0?1:Math.max(...e.children.map(e=>et(e)))+1}var tt=/\bFirefox\//.test(navigator.userAgent),W;function nt(e){return W?W.format(e):`${e}`}function G(){return(window.performance||Date).now()}function K(e){let t=e.toFixed(1).split(`.`,2);return`${nt(+t[0])}.${t[1]}`}function rt(e){return e===1?`1 byte`:e<1024?`${nt(e)} bytes`:e<1024*1024?`${K(e/1024)} kb`:e<1024*1024*1024?`${K(e/(1024*1024))} mb`:`${K(e/(1024*1024*1024))} gb`}function it(e,t,n,r,i,a){if(tt){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function at(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function ot(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{W=new Intl.NumberFormat}catch{}var st=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),q={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ct={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},lt=46,J=`14px sans-serif`,ut=`bold ${J}`,dt=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...q,...t};let{getColor:n=Ye(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ct,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=et(e),this.disposables=[],this.events=st(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(J),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(lt)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},Y=24,ft=5,pt=.01,mt=1e3,ht=class extends dt{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(at(e=>{let t=e.deltaX,n=e.deltaY,r=G(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ot(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(G()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??q.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*pt),r=Math.min(this.totalBytes,r+e.size*pt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??q.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-mt>>1,this.zoomedOutWidth=this.zoomedOutMin+mt,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+ft,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=U(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,Y,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(ut)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,Y),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,Y),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(J),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+Y,n,y,i&-2),n+=r.size;return i&1||it(this.c,this.palette.stroke,o+.5,t+.5,l,Y),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+Y&&e.id)return e;if(r>=t+Y)for(let r of e.children){let e=a(r,t+Y,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=G():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function gt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function _t(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;_t(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var vt={};function yt(e){return vt[e]||(vt[e]=400*Math.log(1+Math.log(1+e/8))),vt[e]}var X=-Math.PI/2,bt=class extends dt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ot(()=>this.resize())),this.disposables.push(at(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(yt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(ut),this.c.textAlign=`center`,this.c.fillText(rt(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=U(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(G()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return yt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=G()),gt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};_t(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(gt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};_t(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},Z=4,Q=20,xt=2*Z,$=Q+Z;function St(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>xt&&y>$?St(t.children,g+Z,_+Q,v-xt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var Ct=class extends dt{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(at(e=>this.updateHover(e))),this.disposables.push(ot(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=o*(30*e),this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(G()-this.animationStart)/(this.options.animateDuration??q.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=St([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=(r===this.hoveredNode?1:0)|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=U(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(it(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-xt,r=i+Math.round($/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=St([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=G(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}};export{Ye as a,qe as i,bt as n,$e as o,Ct as r,He as s,ht as t};
@@ -0,0 +1 @@
1
+ import{bt as e,ft as t,gt as n,ht as r,jt as i,on as a,pt as o,qt as s,ut as c,yt as l}from"#entry";import{n as u}from"./Ci9NHG69.js";import{t as d}from"./DZeYNBxL.js";import{t as f}from"./B2fBtupD.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=e({__name:`BuildMetrics`,props:{metrics:{}},setup(e){let h=e,g=t(()=>{let e=h.metrics,t=e?.resolve_ids.reduce((e,t)=>(e+=t.duration,e),0),n=e?.loads?.reduce((e,t)=>(e+=t.duration,e),0),r=e?.transforms.reduce((e,t)=>(e+=t.duration,e),0),i=t+n+r;return{resolveIds:t,loads:n,transforms:r,total:i}}),_=t(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=t(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(e,t)=>{let h=d,y=f;return i(),n(`div`,p,[l(h,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${a(u)(g.value.resolveIds,!0)}`},{default:s(()=>[...t[0]||=[o(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),l(h,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${a(u)(g.value.loads,!0)}`},{default:s(()=>[...t[1]||=[o(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),l(h,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${a(u)(g.value.transforms,!0)}`},{default:s(()=>[...t[2]||=[o(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),t[6]||=o(`span`,{op40:``},`|`,-1),l(h,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${a(u)(g.value.total,!0)}`},{default:s(()=>[...t[3]||=[o(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(i(),n(c,{key:0},[t[5]||=o(`span`,{op40:``},`|`,-1),o(`div`,m,[l(y,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),t[4]||=o(`span`,{"i-carbon-arrow-right":``,op50:``},null,-1),l(y,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):r(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
@@ -0,0 +1 @@
1
+ import{C as e,X as t,Z as n,bt as r,en as i,ft as a,gt as o,jt as s,m as c,on as l,pt as u,qt as d,un as f,yt as p}from"#entry";import{t as m}from"./Bjr51Ks8.js";import{i as h,l as g,o as _}from"./CQNn9qP2.js";import{t as v}from"./BBRXmiYk.js";import{n as y,t as b}from"./Dl8iHwQo.js";import{t as x}from"./Z5tyTJaP.js";import{n as S,t as C}from"./l47FwQA-.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=r({__name:`FlatList`,props:{plugins:{}},setup(e){let n=t();return(t,r)=>{let i=v,a=m,c=b;return s(),o(`div`,w,[p(c,{items:e.plugins,"key-prop":`plugin_id`},{default:d(({item:e})=>[u(`div`,T,[p(a,{to:{path:l(n).path,query:{plugin:e.plugin_id}},"font-mono":``,border:`~ rounded base`,"w-full":``,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{default:d(()=>[u(`div`,E,` #`+f(e.plugin_id),1),u(`span`,D,[p(i,{name:e.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`])])}}}),k=Object.assign(O,{__name:`PluginsFlatList`}),A={relative:``,"max-h-screen":``,"of-hidden":``},j={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},M={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},N={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},P={op50:``},F=r({__name:`plugins`,props:{session:{}},setup(r){let l=r,d=t(),m=n(),v=i({search:d.query.search||``,selected:d.query.plugin_types?S(d.query.plugin_types):null}),b=a(()=>[..._.filter(e=>l.session?.meta?.plugins?.some(t=>e.match.test(t.name))),h]),w=a(()=>{let e=l.session?.meta?.plugins;return v.value.selected&&(e=e.filter(e=>{let t=g(e.name);return v.value.selected.includes(t.name)})),e}),T=c(()=>w.value,()=>new x(w.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),E=a(()=>v.value.search?T.value.search(v.value.search).map(e=>e.item):w.value);return e(v.value,e=>{let t={...d.query,search:e.search||void 0,plugin_types:e.selected||void 0};m.replace({query:C(t)})},{debounce:500}),(e,t)=>{let n=y,i=k;return s(),o(`div`,A,[u(`div`,j,[p(n,{modelValue:v.value,"onUpdate:modelValue":t[0]||=e=>v.value=e,rules:b.value},null,8,[`modelValue`,`rules`])]),u(`div`,M,[p(i,{plugins:E.value??[]},null,8,[`plugins`]),u(`div`,N,[u(`span`,P,f(E.value.length)+` of `+f(r.session?.meta?.plugins?.length||0),1)])])])}}});export{F as default};
@@ -0,0 +1 @@
1
+ function e(e,t=2){let n=[`Bytes`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(1024));return r===0?[e,`B`]:[(+(e/1024**r).toFixed(t)).toLocaleString(),n[r]]}function t(e,t){let n={name:t,children:{},items:[]};function r(e,t,i=n){if(!e)return;if(t.length<=1){i.items.push(e);return}let a=t.shift();i.children[a]||(i.children[a]={name:a,children:{},items:[]}),r(e,t,i.children[a])}e.forEach(e=>{let t=e.path.split(/\//g).filter(Boolean);r(e,t)});function i(e){if(!e)return;let t=Object.values(e.children);if(t.length===1&&!e.items.length){let n=t[0];e.name=e.name?`${e.name}/${n.name}`:n.name,e.items=n.items,e.children=n.children,i(e)}else t.forEach(i)}return Object.values(n.children).forEach(i),n}function n(e){return new Date(e).toLocaleString(void 0,{hour12:!1,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function r(e,t){let n=[];return n=e==null?[``,`-`]:e<1?[`<1`,`ms`]:e<1e3?[e.toFixed(0),`ms`]:e<1e3*60?[(e/1e3).toFixed(1),`s`]:[(e/1e3/60).toFixed(1),`min`],t?n.join(` `):n}export{t as i,r as n,n as r,e as t};
@@ -0,0 +1 @@
1
+ import{$t as e,At as t,D as n,Dt as r,Ft as i,Gt as a,Jt as o,Rt as s,T as c,Ut as l,Wt as u,X as d,Z as f,bt as p,en as m,f as h,ft as g,gt as _,ht as v,jt as y,ln as b,m as ee,mt as x,nn as S,on as C,pt as w,qt as T,s as te,sn as E,t as D,un as O,ut as k,vt as A,yt as j}from"#entry";import{t as M}from"./Bjr51Ks8.js";import{i as N,t as P}from"./Ci9NHG69.js";import"./CQNn9qP2.js";import{n as F}from"./BO9hKuA-.js";import{t as I}from"./B2fBtupD.js";import{t as L}from"./D_Sk_I-u.js";import{a as ne,i as R,n as re,r as ie,s as ae,t as z}from"./CS0-317H.js";import{n as B,t as V}from"./Dl8iHwQo.js";import{t as H}from"./BcAccMwu.js";import{t as oe}from"./Z5tyTJaP.js";var U={flex:`~ gap-1`},W={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},G=p({__name:`ListItem`,props:{asset:{}},setup(e){return(t,n)=>{let r=F,i=M;return y(),x(i,{to:{query:{asset:e.asset.filename}},"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`},{default:T(()=>[w(`div`,U,[j(r,{filename:e.asset.filename},null,8,[`filename`]),w(`span`,W,O(e.asset.filename),1)])]),_:1},8,[`to`])}}}),K=Object.assign(G,{__name:`AssetsListItem`}),q={p4:``},J={flex:``,pb2:``},Y=p({__name:`List`,props:{assets:{}},setup(e){return(t,n)=>{let r=K,i=V;return y(),_(`div`,q,[j(i,{items:e.assets,"key-prop":`filename`},{default:T(({item:e})=>[w(`div`,J,[j(r,{asset:e},null,8,[`asset`])])]),_:1},8,[`items`])])}}}),se=Object.assign(Y,{__name:`AssetsList`}),X={flex:`~ gap-2`,p4:``},Z=p({__name:`Folder`,props:{assets:{},session:{}},setup(e){let t=e,n=g(()=>{let e=[];return t.assets.forEach(t=>{e.push({full:t.filename,path:t.filename})}),N(e,`Project`)});return(t,r)=>{let i=H;return y(),_(`div`,X,[e.assets?.length?(y(),x(i,{key:0,"flex-1":``,node:n.value,icon:`i-catppuccin:folder-dist catppuccin`,"icon-open":`i-catppuccin:folder-dist-open catppuccin`,link:!0,"link-query-key":`asset`},null,8,[`node`])):v(``,!0)])}}}),ce=Object.assign(Z,{__name:`AssetsFolder`}),le={flex:`~ gap-1 items-center wrap`},ue={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},de=[`onClick`],fe=p({__name:`AssetNavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,a=g(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(y(),_(`div`,le,[(y(!0),_(k,null,i(a.value,(e,t)=>(y(),_(k,{key:e.id},[t>0?(y(),_(`div`,ue)):v(``,!0),w(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>r(`select`,e)},[w(`span`,null,O(e.text||e.id),1)],8,de)],64))),128))]))}}),Q=Object.assign(fe,{__name:`ChartAssetNavBreadcrumb`}),pe={class:`px4`,flex:`~ col gap2`},me=p({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=l(`el`);return a(()=>i.value?.append(n.graph.el)),(t,n)=>{let a=Q;return y(),_(`div`,pe,[j(a,{border:`b base`,py2:``,"min-h-10":``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>r(`select`,e)},null,8,[`selected`,`options`]),w(`div`,{ref_key:`el`,ref:i},null,512)])}}}),he=Object.assign(me,{__name:`AssetsTreemap`}),ge={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},_e={flex:`~ col gap-4`},ve={key:0,grid:`~ cols-[250px_1fr] gap-1`},ye=[`onClick`],be={key:0,"text-primary":``},xe={key:1},Se=[`onClick`],Ce=[`title`],we=p({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,c=l(`el`);return a(()=>c.value?.append(n.graph.el)),(t,n)=>{let a=Q,l=I,u=s(`tooltip`);return y(),_(`div`,ge,[w(`div`,{ref_key:`el`,ref:c,"w-500px":``},null,512),w(`div`,_e,[j(a,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>r(`select`,e)},null,8,[`selected`,`options`]),e.selected?(y(),_(`div`,ve,[(y(!0),_(k,null,i(e.selected.children,t=>(y(),_(k,{key:t.id},[w(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>r(`select`,t)},[t.meta&&t.meta===e.selected?.meta?(y(),_(`span`,be,`(self)`)):(y(),_(`span`,xe,O(t.id),1))],8,ye),w(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>r(`select`,t)},[w(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:b({background:C(R)(e.graph.options.getColor?.(t)||`#000`),width:`${t.size/e.selected.size*100}%`})},null,4),j(l,{"text-xs":``,bytes:t.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),t.children.length>0?o((y(),_(`div`,{key:0,title:`${t.children.length} dependencies`,"text-xs":``,"op-fade":``},[A(` (`+O(t.children.length)+`) `,1)],8,Ce)),[[u,`${t.children.length} dependencies`]]):v(``,!0)],8,Se)],64))),128))])):v(``,!0)])])}}}),Te=Object.assign(we,{__name:`AssetsSunburst`}),Ee=p({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=l(`el`);return a(()=>n.value?.append(t.graph.el)),(e,t)=>(y(),_(`div`,{ref_key:`el`,ref:n},null,512))}}),$=Object.assign(Ee,{__name:`AssetsFlamegraph`}),De={key:1,relative:``,"max-h-screen":``,"of-hidden":``},Oe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},ke={flex:`~ gap-2 items-center`,p2:``,border:`t base`},Ae=[`onClick`],je={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},Me={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},Ne={op50:``},Pe={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},Fe={flex:`~ gap-1 items-center`},Ie={flex:`~ gap-1 items-center`},Le=p({__name:`assets`,props:{session:{}},setup(a){let o=a,s=e(h()),l=S(void 0),p=S(void 0),b=S(void 0),M=m(void 0),N=m({search:``}),F=f(),R=d(),V=[{label:`List`,value:`list`,icon:`i-ph-list-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],H=c(),{state:U,isLoading:W}=te(async()=>await H.value[`vite:rolldown:get-assets-list`]?.({session:o.session.id}),null),G=ee(()=>U.value,()=>new oe(U.value,{includeScore:!0,keys:[`filename`],ignoreLocation:!0,threshold:.4})),K=g(()=>N.value.search?G.value.search(N.value.search).map(e=>e.item):U.value);function q(e){L.value.assetViewType=e}let J=g(()=>{let e=K.value,t=new Map,n=0,r={id:`~root`,text:`Project`,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:t,root:r,maxDepth:n};let i=[];i.unshift(()=>{r.size+=r.children.reduce((e,t)=>e+t.size,0),r.subtext=P(r.size).join(` `),r.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function a(e,r,a,o,s){if(t.has(r))return t.get(r);s>n&&(n=s);let c={id:r,text:a,size:0,sizeSelf:0,children:[],meta:{chunk_id:0,content:``,filename:``,size:0,path:a,type:`folder`},parent:o};return t.set(r,c),o.children.push(c),i.unshift(()=>{let t=c.sizeSelf;c.size+=c.children.reduce((e,t)=>e+t.size,0),c.subtext=P(c.size).join(` `),c.children.length&&t/c.size>.1&&c.children.push({id:`${c.id}-self`,text:``,size:t,sizeSelf:t,subtext:P(t).join(` `),children:[],meta:{...e,path:``,type:`file`},parent:c}),c.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),c}function o(e){let n=e.filename.split(`/`).filter(Boolean),i=r,o=``,s=0;n.forEach((r,c)=>{if(o+=(o?`/`:``)+r,s++,c===n.length-1){let n={id:e.filename,text:r,size:e.size,sizeSelf:e.size,subtext:P(e.size).join(` `),children:[],meta:{...e,path:r,type:`file`}};i.children.push(n),t.set(e.filename,n)}else i=a(e,o,r,i,s)})}return e.forEach(o),i.forEach(e=>e()),{map:t,root:r,maxDepth:n}}),Y,X=g(()=>({onClick(e){e&&(p.value=e),e.meta?.type===`file`&&(M.value=e.meta,F.replace({query:{asset:e.meta.filename}}))},onHover(e){e&&!R.query.asset&&(p.value=e),e===null&&(p.value=void 0)},onLeave(){p.value=void 0},onSelect(e){b.value=e||J.value.root,M.value=e?.meta},animate:L.value.chartAnimation,palette:{stroke:D.value?`#222`:`#555`,fg:D.value?`#fff`:`#000`,bg:D.value?`#111`:`#fff`},getColor:ne(J.value.root,D.value?.8:.9,D.value?1:1.1),getSubtext:e=>e.subtext}));function Z(e,t){M.value=e?.meta,e?.children.length||(e=e?.parent||null),l.value?.select(e,t)}return u(()=>[L.value.assetViewType,J.value,X.value],()=>{switch(Y?.(),b.value=J.value.root,L.value.assetViewType){case`sunburst`:l.value=new re(J.value.root,X.value);break;case`treemap`:l.value=new ie(J.value.root,{...X.value,selectedPaddingRatio:0});break;default:l.value=new z(J.value.root,X.value)}r(()=>{let e=M.value&&J.value.map.get(M.value.filename)||null;e&&Z(e,!1)}),Y=()=>{l.value?.dispose(),l.value=void 0}},{deep:!0,immediate:!0}),t(()=>{Y?.()}),(e,t)=>{let r=n,o=B,c=se,u=ce,d=he,f=Te,m=$,h=I,g=ae;return C(W)?(y(),x(r,{key:0})):(y(),_(`div`,De,[w(`div`,Oe,[j(o,{modelValue:N.value,"onUpdate:modelValue":t[0]||=e=>N.value=e,rules:[]},{default:T(()=>[w(`div`,ke,[t[3]||=w(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(y(),_(k,null,i(V,e=>w(`button`,{key:e.value,"btn-action":``,class:E(C(L).assetViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>q(e.value)},[w(`div`,{class:E(e.icon)},null,2),A(` `+O(e.label),1)],10,Ae)),64))])]),_:1},8,[`modelValue`])]),w(`div`,je,[C(L).assetViewType===`list`?(y(),_(k,{key:0},[K.value?.length?(y(),x(c,{key:0,assets:K.value,session:a.session},null,8,[`assets`,`session`])):v(``,!0),w(`div`,Me,[w(`span`,Ne,O(K.value.length)+` of `+O(C(U)?.length||0),1)])],64)):C(L).assetViewType===`folder`?(y(),_(k,{key:1},[K.value?.length?(y(),x(u,{key:0,assets:K.value,session:a.session},null,8,[`assets`,`session`])):v(``,!0)],64)):C(L).assetViewType===`treemap`?(y(),_(k,{key:2},[l.value?(y(),x(d,{key:0,graph:l.value,selected:b.value,onSelect:t[1]||=e=>Z(e)},null,8,[`graph`,`selected`])):v(``,!0)],64)):C(L).assetViewType===`sunburst`?(y(),_(k,{key:3},[l.value?(y(),x(f,{key:0,graph:l.value,selected:b.value,onSelect:t[2]||=e=>Z(e)},null,8,[`graph`,`selected`])):v(``,!0)],64)):C(L).assetViewType===`flamegraph`?(y(),_(k,{key:4},[l.value?(y(),x(m,{key:0,graph:l.value},null,8,[`graph`])):v(``,!0)],64)):v(``,!0)]),j(g,{"hover-x":s.x,"hover-y":s.y},{default:T(()=>[p.value?.meta?(y(),_(`div`,Pe,[w(`div`,Fe,O(p.value.text),1),w(`div`,Ie,[j(h,{bytes:p.value.size,percent:!1},null,8,[`bytes`])])])):v(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Le as default};