@vitejs/devtools-rolldown 0.1.15 → 0.1.17

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 (76) hide show
  1. package/dist/index.mjs +8 -0
  2. package/dist/nitro.json +3 -3
  3. package/dist/public/200.html +1 -1
  4. package/dist/public/404.html +1 -1
  5. package/dist/public/_nuxt/-w-An_zz.js +1 -0
  6. package/dist/public/_nuxt/3TymDptH.js +1 -0
  7. package/dist/public/_nuxt/8kHoufi2.js +1 -0
  8. package/dist/public/_nuxt/{BtFAY2HJ.js → A14j6IXQ.js} +2 -2
  9. package/dist/public/_nuxt/B2NMBmj_.js +1 -0
  10. package/dist/public/_nuxt/{CJmfH1zY.js → BE1TLHgg.js} +1 -1
  11. package/dist/public/_nuxt/{EWiwEEMI.js → BQl8ArzK.js} +1 -1
  12. package/dist/public/_nuxt/BSjCyhkj2.js +1 -0
  13. package/dist/public/_nuxt/{BPvXWYcE.js → BYXvfkhc.js} +1 -1
  14. package/dist/public/_nuxt/{D0nH_IG_.js → Bc5RWlzj.js} +1 -1
  15. package/dist/public/_nuxt/{BodOO8Ge.js → BhOKQpS-.js} +1 -1
  16. package/dist/public/_nuxt/BtpeuWVj2.js +1 -0
  17. package/dist/public/_nuxt/C--RKQDq.js +3 -0
  18. package/dist/public/_nuxt/C8iXMxN52.js +1 -0
  19. package/dist/public/_nuxt/CA0N7And.js +1 -0
  20. package/dist/public/_nuxt/CAonW3eZ.js +1 -0
  21. package/dist/public/_nuxt/CFOnv7GG2.js +1 -0
  22. package/dist/public/_nuxt/{CqNyqKYk.js → COiP6LWy.js} +1 -1
  23. package/dist/public/_nuxt/CXhLP-Vi2.js +1 -0
  24. package/dist/public/_nuxt/Cdb7S98v.js +1 -0
  25. package/dist/public/_nuxt/{5SREwa_J.js → CnkQlf-T.js} +1 -1
  26. package/dist/public/_nuxt/{CjvJJTNy.js → D-KdwVBL.js} +1 -1
  27. package/dist/public/_nuxt/{CsPVvMxF.js → D2AP-caS.js} +1 -1
  28. package/dist/public/_nuxt/{CzCoBrqM.js → D8Se1EWj.js} +1 -1
  29. package/dist/public/_nuxt/DCPELPdh.js +1 -0
  30. package/dist/public/_nuxt/DCcvbzkD.js +1 -0
  31. package/dist/public/_nuxt/{Dab8rtPt.js → DGOkTiBT.js} +1 -1
  32. package/dist/public/_nuxt/D_gteVIt.js +1 -0
  33. package/dist/public/_nuxt/{CfHRbb-n.js → D_zbH50i.js} +1 -1
  34. package/dist/public/_nuxt/DataVirtualList.B_Uggh0w.css +1 -0
  35. package/dist/public/_nuxt/DeejVvnS.js +1 -0
  36. package/dist/public/_nuxt/Dg9zMuGl2.js +1 -0
  37. package/dist/public/_nuxt/Dlysmnsb.js +1 -0
  38. package/dist/public/_nuxt/DpW0qpWn.js +4 -0
  39. package/dist/public/_nuxt/{DlEGTOj9.js → DvZ2T9qR.js} +1 -1
  40. package/dist/public/_nuxt/RFQ9kWkc.js +2 -0
  41. package/dist/public/_nuxt/{hY2iPUYh.js → XfS7e3PM.js} +1 -1
  42. package/dist/public/_nuxt/builds/latest.json +1 -1
  43. package/dist/public/_nuxt/builds/meta/487734a3-c1e0-44c3-9357-8fb7b7d8180b.json +1 -0
  44. package/dist/public/_nuxt/{entry.bUxZ6pRq.css → entry.D_S9xWBM.css} +1 -1
  45. package/dist/public/_nuxt/{DM5zgFwu.js → erfZtSN7.js} +1 -1
  46. package/dist/public/_nuxt/error-404.DkiWPM7Q.css +1 -0
  47. package/dist/public/_nuxt/error-500.Wfu13SYC.css +1 -0
  48. package/dist/public/_nuxt/jJY8e3xp.js +1 -0
  49. package/dist/public/index.html +1 -1
  50. package/package.json +6 -6
  51. package/dist/public/_nuxt/B5QvmzNX.js +0 -4
  52. package/dist/public/_nuxt/BA4aNJdc.js +0 -1
  53. package/dist/public/_nuxt/BRHdn2TP2.js +0 -1
  54. package/dist/public/_nuxt/BYcqRSer.js +0 -1
  55. package/dist/public/_nuxt/Bt8oNIjq.js +0 -1
  56. package/dist/public/_nuxt/C1f8uPlQ.js +0 -1
  57. package/dist/public/_nuxt/C9-K8SRH.js +0 -1
  58. package/dist/public/_nuxt/CJzuZNT1.js +0 -2
  59. package/dist/public/_nuxt/CL3oUTGS2.js +0 -1
  60. package/dist/public/_nuxt/CRfXUi3G.js +0 -3
  61. package/dist/public/_nuxt/CVZqt4yY2.js +0 -1
  62. package/dist/public/_nuxt/CorBKXDd.js +0 -1
  63. package/dist/public/_nuxt/CpTuuES2.js +0 -1
  64. package/dist/public/_nuxt/DEctdyhd.js +0 -1
  65. package/dist/public/_nuxt/DWUsdlci.js +0 -1
  66. package/dist/public/_nuxt/D_58kiGa.js +0 -1
  67. package/dist/public/_nuxt/DataVirtualList.Co38wNF1.css +0 -1
  68. package/dist/public/_nuxt/DmctoHT82.js +0 -1
  69. package/dist/public/_nuxt/DyCHFg1-2.js +0 -1
  70. package/dist/public/_nuxt/bh0jgFfK.js +0 -1
  71. package/dist/public/_nuxt/builds/meta/325e31f5-a39f-4526-a997-a203cd2d5c81.json +0 -1
  72. package/dist/public/_nuxt/error-404.CcKyMNIP.css +0 -1
  73. package/dist/public/_nuxt/error-500.Bsd8omR1.css +0 -1
  74. package/dist/public/_nuxt/jSaCY0lI2.js +0 -1
  75. package/dist/public/_nuxt/lNa1kApa.js +0 -1
  76. package/dist/public/_nuxt/mLM3LnKH.js +0 -1
@@ -0,0 +1 @@
1
+ import{A as e,B as t,C as n,D as r,M as i,Ot as a,S as o,Wt as s,Z as c,b as l,h as u,k as d,lt as f,q as p,qt as m,w as h,x as g,xt as _}from"./C--RKQDq.js";import{C as v,w as y}from"./B2NMBmj_.js";import{g as b,v as x}from"./BE1TLHgg.js";import{r as S}from"./CqfNwh25.js";import{a as C,s as w}from"./CnkQlf-T.js";import{t as T}from"./D-KdwVBL.js";import{t as E}from"./BhOKQpS-.js";import{t as D}from"./BYXvfkhc.js";import{t as O}from"./Bc5RWlzj.js";import{n as k}from"./DvZ2T9qR.js";import{n as ee,r as A,t as j}from"./-w-An_zz.js";import{t as M}from"./erfZtSN7.js";import{t as N}from"./DCcvbzkD.js";import{n as P,r as F,t as I}from"./DCPELPdh.js";import{n as L,t as R}from"./qIAw3Eg02.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=Object.assign(i({__name:`FlatList`,props:{session:{},modules:{},disableTooltip:{type:Boolean,default:!1},link:{type:Boolean,default:!0}},emits:[`select`],setup(t,{emit:n}){let r=n;return(n,i)=>{let a=T;return p(),h(`div`,z,[e(j,{items:t.modules,"key-prop":`id`},{default:f(({item:n})=>[g(`div`,{flex:``,pb2:``,onClick:e=>r(`select`,n)},[e(a,{id:n.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:t.link,"disable-tooltip":t.disableTooltip},null,8,[`id`,`session`,`link`,`disable-tooltip`])],8,B)]),_:1},8,[`items`])])}}}),{__name:`ModulesFlatList`}),H={flex:`~ col gap-2`,p4:``},U={flex:``,pb2:``},W={flex:`~ gap-1 wrap`,"text-xs":``},G={flex:`~ auto text-xs wrap`},K={key:0,flex:`~ items-center`},q={key:0,op20:``},J={flex:`~ none gap-1 wrap justify-end`},Y=Object.assign(i({__name:`DetailedList`,props:{session:{},modules:{}},setup(t){let r=t,i=l(()=>{let e=new Map;for(let t of r.modules){let n=t.buildMetrics?.transforms.filter(e=>e.source_code_size!==e.transformed_code_size).filter(e=>e.transformed_code_size);e.set(t.id,n)}return e});return(r,a)=>{let s=M,l=O,d=T;return p(),h(`div`,H,[e(j,{items:t.modules,"key-prop":`id`},{default:f(({item:r})=>[g(`div`,U,[e(d,{id:r.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:f(()=>[g(`div`,W,[g(`ul`,G,[(p(!0),h(u,null,c(i.value.get(r.id),(t,a)=>(p(),h(u,{key:a},[t.source_code_size!==t.transformed_code_size&&t.transformed_code_size?(p(),h(`li`,K,[e(s,{name:t.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),a===i.value.get(r.id).length-1?n(``,!0):(p(),h(`span`,q,`|`))])):n(``,!0)],64))),128))]),a[0]||=g(`div`,{flex:`~ auto gap-1`,"of-hidden":``},null,-1),g(`div`,J,[g(`span`,null,[r.buildMetrics?(p(),o(l,{key:0,metrics:r.buildMetrics},null,8,[`metrics`])):n(``,!0)])])])]),_:2},1032,[`id`,`session`])])]),_:1},8,[`items`])])}}}),{__name:`ModulesDetailedList`}),X=[`d`,`stroke-dasharray`],Z=Object.assign(i({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,i=l(()=>r.modules);return k({modules:i,spacing:{width:400,height:55,linkOffset:20,margin:800,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:n,scale:r,spacing:o,tree:s,hierarchy:c,collapsedNodes:u,container:d,modulesMap:f,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=e,x=l(()=>i.value.filter(e=>e.importers.length===0));return(e=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let i=new Set,l=c({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{i.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!u.has(e.id),hasChildren:!1}))):u.has(e.module.id)?[]:e.module.imports.map(t=>{let r=f.value.get(t.module_id);if(r&&!i.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return i.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!u.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,s().nodeSize([a(o.height),a(o.width)+a(o.gap)])(l);let S=l.descendants();for(let e of S)[e.x,e.y]=[e.y-a(o.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports?.filter(t=>y.get(t.module_id)===e.data.module.id).length>0);let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<a(o.margin))for(let e of S)e.x+=Math.abs(C)+a(o.margin);if(w<a(o.margin))for(let e of S)e.y+=Math.abs(w)+a(o.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=l.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}`}));g.clear();for(let e of T)g.set(e.id,e);m.value=T,t(()=>{_.value=d.value.scrollWidth/r.value+a(o.margin),v.value=d.value.scrollHeight/r.value+a(o.margin);let n=x.value?.[0]?.id;e&&n&&t(()=>{b(n,!1)})})}}}),(t,r)=>{let a=T,c=I;return p(),o(c,{session:n.session,modules:i.value},{default:f(({node:t,nodesRefMap:r})=>[e(a,{id:t.data.module.id,ref:e=>r.set(t.data.module.id,e?.$el),link:!0,session:n.session,minimal:!0,flex:`1`},null,8,[`id`,`session`])]),link:f(({link:e,d:t,linkClass:n})=>[g(`path`,{d:t,class:s(n),"stroke-dasharray":e.import?.kind===`dynamic-import`?`3 6`:void 0,fill:`none`},null,10,X)]),_:1},8,[`session`,`modules`])}}}),{__name:`ModulesGraph`}),Q={"of-auto":``,"max-h-screen":``,relative:``},te={flex:`~ col gap-2`,p4:``},ne=Object.assign(i({__name:`Folder`,props:{session:{},modules:{}},setup(t){let r=t,i=l(()=>{if(!r.session.modulesList.length)return{workspace:{children:{},items:[]},nodeModules:{children:{},items:[]},virtual:{children:{},items:[]}};let e=[],t=[],n=[];return r.modules.map(e=>({full:e.id,path:e.path})).forEach(i=>{i.full.startsWith(r.session.meta.cwd)?(i.path.startsWith(`../`)||(i.path=i.full.slice(r.session.meta.cwd.length+1)),e.push(i)):i.full.includes(`node_modules`)?t.push({full:i.full,path:i.full}):i.full.startsWith(`virtual:`)&&n.push(i)}),{workspace:S(e,`Project Root`),nodeModules:S(t,`Node Modules`),virtual:S(n,`Virtual Modules`)}});return(t,r)=>{let a=N;return p(),h(`div`,Q,[g(`div`,te,[Object.keys(i.value.workspace.children).length?(p(),o(a,{key:0,node:i.value.workspace,p:`l3`,icon:`i-catppuccin:folder-dist icon-catppuccin`,"icon-open":`i-catppuccin:folder-dist-open icon-catppuccin`,link:!0},null,8,[`node`])):n(``,!0),Object.keys(i.value.nodeModules.children).length?(p(),h(u,{key:1},[r[0]||=g(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),e(a,{node:i.value.nodeModules,p:`l3`,icon:`i-catppuccin:folder-node icon-catppuccin`,"icon-open":`i-catppuccin:folder-node-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):n(``,!0),Object.keys(i.value.virtual.children).length?(p(),h(u,{key:2},[r[1]||=g(`div`,{"w-full":``,"h-1px":``,border:`t base`},null,-1),e(a,{node:i.value.virtual,p:`l3`,icon:`i-catppuccin:folder-components icon-catppuccin`,"icon-open":`i-catppuccin:folder-components-open icon-catppuccin`,link:!0,open:!1},null,8,[`node`])],64)):n(``,!0)])])}}}),{__name:`ModulesFolder`}),re={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},ie={key:0,h10:``,mr2:``,flex:`~ items-center`},$={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ae=[`onClick`],oe={key:4,fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},se={op50:``},ce=i({__name:`index`,props:{session:{}},setup(t){let i=t,S=v(),O=y(),k=_({search:S.query.search||``,selected:S.query.file_types?L(S.query.file_types):null,node_modules:S.query.node_modules?L(S.query.node_modules):null}),j=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`}];x(k.value,e=>{let t={...S.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};O.replace({query:R(t)})},{debounce:500});let M=l(()=>i.session.modulesList.map(e=>({mod:e,path:E(e.id,i.session.meta.cwd),type:w(e.id)}))),N=l(()=>C.filter(e=>M.value.some(t=>e.match.test(t.mod.id)))),I=l(()=>{let e=M.value;return k.value.selected&&(e=e.filter(e=>{let t=w(e.mod.id);return k.value.selected.includes(t.name)})),k.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&k.value.node_modules.includes(e.path.moduleName))),e.map(e=>({...e.mod,path:e.path.path}))}),{pathSelectorVisible:z,selectPathNodes:B,togglePathSelector:H,normalizedGraph:U}=F({onToggle:e=>{k.value.search=e?!1:``},dataMap:l(()=>new Map(i.session.modulesList.map(e=>[e.id,e]))),list:I,importIdKey:`module_id`}),W=b(()=>I.value,()=>new A(I.value,{includeScore:!0,keys:[`id`],ignoreLocation:!0,threshold:.4})),G=l(()=>k.value.search?W.value.search(k.value.search).map(e=>e.item):I.value);function K(e){S.query.module&&O.replace({query:{...S.query,module:void 0}}),D.value.moduleGraphViewType=e}return(i,l)=>{let _=V,v=T,y=P,b=ee,x=Y,S=Z,C=ne;return p(),h(`div`,{relative:``,class:s({"max-h-screen of-hidden":a(D).moduleGraphViewType===`graph`})},[g(`div`,re,[e(b,{modelValue:k.value,"onUpdate:modelValue":l[2]||=e=>k.value=e,rules:N.value},r({"search-end":f(()=>[a(D).moduleGraphViewType===`graph`?(p(),h(`div`,ie,[g(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:l[1]||=e=>a(H)(!0)},[...l[3]||=[g(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):n(``,!0)]),default:f(()=>[g(`div`,$,[l[4]||=g(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(p(),h(u,null,c(j,e=>g(`button`,{key:e.value,"btn-action":``,class:s(a(D).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>K(e.value)},[g(`div`,{class:s(e.icon)},null,2),d(` `+m(e.label),1)],10,ae)),64))])]),_:2},[a(z)?{name:`search`,fn:f(()=>[e(y,{session:t.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:a(B),onClose:l[0]||=e=>a(H)(!1)},{list:f(({select:e,data:r})=>[r?.length?(p(),o(_,{key:0,session:t.session,modules:r,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):n(``,!0)]),item:f(({id:n})=>[e(v,{id:n,session:t.session,block:``,"text-nowrap":``,link:!1,"disable-tooltip":!0},null,8,[`id`,`session`])]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`,`rules`])]),a(D).moduleGraphViewType===`list`?(p(),o(_,{key:0,session:t.session,modules:G.value},null,8,[`session`,`modules`])):a(D).moduleGraphViewType===`detailed-list`?(p(),o(x,{key:1,session:t.session,modules:G.value},null,8,[`session`,`modules`])):a(D).moduleGraphViewType===`graph`?(p(),o(S,{key:2,session:t.session,modules:a(U)},null,8,[`session`,`modules`])):(p(),o(C,{key:3,session:t.session,modules:G.value},null,8,[`session`,`modules`])),a(D).moduleGraphViewType===`list`||a(D).moduleGraphViewType===`detailed-list`?(p(),h(`div`,oe,[g(`span`,se,m(G.value.length)+` of `+m(t.session.modulesList.length),1)])):n(``,!0)],2)}}});export{ce as default};
@@ -1 +1 @@
1
- import{B as e,C as t,Ct as n,Dt as r,Gt as i,K as a,Kt as o,M as s,Q as c,S as l,Tt as u,Z as d,at as f,b as p,h as m,ot as h,q as g,v as _,w as v,x as y,xt as ee}from"./CRfXUi3G.js";import{a as b,c as x,d as S,f as C,i as te,l as w,o as ne,r as re,u as ie}from"./5tvbNeKa.js";import{t as T}from"./CJmfH1zY.js";import{t as E}from"./CqfNwh25.js";import{t as ae}from"./BPvXWYcE.js";function D(){return typeof window<`u`}function O(e){return oe(e)?(e.nodeName||``).toLowerCase():`#document`}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){return((oe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oe(e){return D()?e instanceof Node||e instanceof k(e).Node:!1}function j(e){return D()?e instanceof Element||e instanceof k(e).Element:!1}function M(e){return D()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function se(e){return!D()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ce(e){return/^(table|td|th)$/.test(O(e))}function P(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var le=/transform|translate|scale|rotate|perspective|filter/,ue=/paint|layout|strict|content/,F=e=>!!e&&e!==`none`,de;function fe(e){let t=j(e)?L(e):e;return F(t.transform)||F(t.translate)||F(t.scale)||F(t.rotate)||F(t.perspective)||!me()&&(F(t.backdropFilter)||F(t.filter))||le.test(t.willChange||``)||ue.test(t.contain||``)}function pe(e){let t=z(e);for(;M(t)&&!I(t);){if(fe(t))return t;if(P(t))return null;t=z(t)}return null}function me(){return de??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),de}function I(e){return/^(html|body|#document)$/.test(O(e))}function L(e){return k(e).getComputedStyle(e)}function R(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if(O(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||se(e)&&e.host||A(e);return se(t)?t.host:t}function he(e){let t=z(e);return I(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&N(t)?t:he(t)}function ge(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=he(e),i=r===e.ownerDocument?.body,a=k(r);if(i){let e=_e(a);return t.concat(a,a.visualViewport||[],N(r)?r:[],e&&n?ge(e):[])}else return t.concat(r,ge(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){let t=L(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=C(n)!==a||C(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ye(e){return j(e)?e:e.contextElement}function B(e){let t=ye(e);if(!M(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ve(t),o=(a?C(n.width):n.width)/r,s=(a?C(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var be=x(0);function xe(e){let t=k(e);return!me()||!t.visualViewport?be:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Se(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ye(e),o=x(1);t&&(r?j(r)&&(o=B(r)):o=B(e));let s=Se(a,n,r)?xe(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=k(a),t=r&&j(r)?k(r):r,n=e,i=_e(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=L(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=k(i),i=_e(n)}}return S({width:u,height:d,x:c,y:l})}function H(e,t){let n=R(e).scrollLeft;return t?t.left+n:V(A(e)).left+n}function Ce(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function we(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=A(r),s=t?P(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=M(r);if((d||!d&&!a)&&((O(r)!==`body`||N(o))&&(c=R(r)),d)){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ce(o,c):x(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Te(e){return Array.from(e.getClientRects())}function Ee(e){let t=A(e),n=R(e),r=e.ownerDocument.body,i=w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=w(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var De=25;function Oe(e,t){let n=k(e),r=A(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(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<=De&&(a-=o)}else l<=De&&(a+=l);return{width:a,height:o,x:s,y:c}}function ke(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=M(e)?B(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ae(e,t,n){let r;if(t===`viewport`)r=Oe(e,n);else if(t===`document`)r=Ee(A(e));else if(j(t))r=ke(t,n);else{let n=xe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function je(e,t){let n=z(e);return n===t||!j(n)||I(n)?!1:L(n).position===`fixed`||je(n,t)}function Me(e,t){let n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(e=>j(e)&&O(e)!==`body`),i=null,a=L(e).position===`fixed`,o=a?z(e):e;for(;j(o)&&!I(o);){let t=L(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||N(o)&&!n&&je(e,o))?r=r.filter(e=>e!==o):i=t,o=z(o)}return t.set(e,r),r}function Ne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?P(t)?[]:Me(t,this._c):[].concat(n),r],o=Ae(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ae(t,a[e],i);s=w(n.top,s),c=ie(n.right,c),l=ie(n.bottom,l),u=w(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pe(e){let{width:t,height:n}=ve(e);return{width:t,height:n}}function Fe(e,t,n){let r=M(t),i=A(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=H(i)}if(r||!r&&!a)if((O(t)!==`body`||N(i))&&(s=R(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ce(i,s):x(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function U(e){return L(e).position===`static`}function Ie(e,t){if(!M(e)||L(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function Le(e,t){let n=k(e);if(P(e))return n;if(!M(e)){let t=z(e);for(;t&&!I(t);){if(j(t)&&!U(t))return t;t=z(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&U(r);)r=Ie(r,t);return r&&I(r)&&U(r)&&!fe(r)?n:r||pe(e)||n}var Re=async function(e){let t=this.getOffsetParent||Le,n=this.getDimensions,r=await n(e.floating);return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ze(e){return L(e).direction===`rtl`}var Be={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:A,getClippingRect:Ne,getOffsetParent:Le,getElementRects:Re,getClientRects:Te,getDimensions:Pe,getScale:B,isElement:j,isRTL:ze},Ve=b,He=ne,Ue=te,We=(e,t,n)=>{let r=new Map,i={platform:Be,...n},a={...i.platform,_c:r};return re(e,t,{...i,platform:a})},Ge=Object.assign(s({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=u(e),r=f(`hoverElement`),a=ee(0),o=ee(0);return h([t,n],([e,t])=>{We({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},r.value,{placement:`right-start`,middleware:[Ue(),He(),Ve({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,o.value=t})}),(e,t)=>(g(),l(_,{to:`body`},[y(`div`,{ref_key:`hoverElement`,ref:r,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:i({left:`${a.value}px`,top:`${o.value}px`})},[c(e.$slots,`default`)],4)]))}}),{__name:`DisplayGraphHoverView`});function Ke(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 qe,Je,Ye,W,G,K=1,Xe;function Ze(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(qe!==t||Je!==a||Ye!==i){let n=Math.round(64*a)/64;K=i,K=Math.log2(K),K-=Math.floor(K);let r=K,o=Math.min(1,8*r);K=2**K;let s=8*Math.SQRT2/K;qe=t,Je=a,Ye=i,W||=document.createElement(`canvas`),G||=W.getContext(`2d`),W.width=W.height=Math.round(64*n),G.scale(n,n),G.fillStyle=e[0],G.fillRect(0,0,64,64),G.globalAlpha=.25,G.fillStyle=e[1],G.fillRect(0,0,64,64),G.globalAlpha=.67,G.strokeStyle=e[1],G.beginPath();for(let e=0;e<=64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);if(G.lineWidth=s*(1-(o-r)/2),G.stroke(),o+r>0){G.beginPath();for(let e=8;e<64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);G.lineWidth=s*(o+r)/2,G.stroke()}Xe=t.createPattern(W,`repeat`),K/=n}return n/=64*K*a,n-=Math.floor(n),n*=64*K*a,Xe.setTransform(new DOMMatrix([K,0,0,K,n,r])),Xe}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 $e(e){return t=>t.id&&e[t.id]||t.color}function et(e,t=1,n=1){let r={};return tt(r,e,0,Math.PI*2,t,n),$e(r)}function tt(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ke(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;tt(e,s,n,t,i,a),n+=t}}var nt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rt(e=16,t=nt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function it(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=rt(),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=>it(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 at(e){return e.children.length===0?1:Math.max(...e.children.map(e=>at(e)))+1}var ot=/\bFirefox\//.test(navigator.userAgent),st;function ct(e){return st?st.format(e):`${e}`}function q(){return(window.performance||Date).now()}function lt(e){let t=e.toFixed(1).split(`.`,2);return`${ct(+t[0])}.${t[1]}`}function ut(e){return e===1?`1 byte`:e<1024?`${ct(e)} bytes`:e<1024*1024?`${lt(e/1024)} kb`:e<1024*1024*1024?`${lt(e/(1024*1024))} mb`:`${lt(e/(1024*1024*1024))} gb`}function dt(e,t,n,r,i,a){if(ot){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 ft(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function pt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{st=new Intl.NumberFormat}catch{}var mt=()=>({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)}}}),J={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ht={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},gt=46,_t=`14px sans-serif`,vt=`bold ${_t}`,yt=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={...J,...t};let{getColor:n=et(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ht,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=at(e),this.disposables=[],this.events=mt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(_t),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(gt)}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,bt=5,xt=.01,St=1e3,Ct=class extends yt{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(ft(e=>{let t=e.deltaX,n=e.deltaY,r=q(),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(pt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.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??J.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*xt),r=Math.min(this.totalBytes,r+e.size*xt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??J.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-St>>1,this.zoomedOutWidth=this.zoomedOutMin+St,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)+bt,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Ze(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(vt)):(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(_t),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||dt(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=q():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function wt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Tt(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Tt(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 Et={};function Dt(e){return Et[e]||(Et[e]=400*Math.log(1+Math.log(1+e/8))),Et[e]}var X=-Math.PI/2,Ot=class extends yt{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(pt(()=>this.resize())),this.disposables.push(ft(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(Dt(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(vt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??ut(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=Ze(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=(q()-this.animationStart)/(this.options.animateDuration??J.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 Dt(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=q()),wt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Tt(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(wt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Tt(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,kt=2*Z,$=Q+Z;function At(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>kt&&y>$?At(t.children,g+Z,_+Q,v-kt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var jt=class extends yt{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(ft(e=>this.updateHover(e))),this.disposables.push(pt(()=>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=30*e*o,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=(q()-this.animationStart)/(this.options.animateDuration??J.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=At([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|(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=Ze(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(dt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-kt,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=At([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=q(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Mt={flex:`~ gap-1 items-center wrap`},Nt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},Pt=[`onClick`],Ft=Object.assign(s({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,a=p(()=>{let e=[],t=r.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,n)=>(g(),v(`div`,Mt,[(g(!0),v(m,null,d(a.value,(e,n)=>(g(),v(m,{key:e.id},[n>0?(g(),v(`div`,Nt)):t(``,!0),y(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>i(`select`,e)},[y(`span`,null,o(e.text||e.id),1)],8,Pt)],64))),128))]))}}),{__name:`ChartNavBreadcrumb`});function It(t){let{data:i,nameKey:o,sizeKey:s,rootText:c,nodeType:l,graphOptions:u,onUpdate:d}=t,f=n(void 0),m=n(void 0),g=ee(void 0),_=n(void 0),v,y=p(()=>{if(t.tree)return t.tree.value;let e=r(i),n=new Map,a=0,u={id:`~root`,text:c,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:n,root:u,maxDepth:a};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=E(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,r,i,o){if(n.has(t))return n.get(t);o>a&&(a=o);let s={id:t,text:r,size:0,sizeSelf:0,children:[],meta:{...e,path:r,type:`folder`},parent:i};return n.set(t,s),i.children.push(s),d.unshift(()=>{let t=s.sizeSelf;s.size+=s.children.reduce((e,t)=>e+t.size,0),s.subtext=E(s.size).join(` `),s.children.length&&t/s.size>.1&&s.children.push({id:`${s.id}-self`,text:``,size:t,sizeSelf:t,subtext:E(t).join(` `),children:[],meta:{...e,path:``,type:l},parent:s}),s.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),s}function p(e){let t=e[o].split(`/`).filter(Boolean),r=u,i=``,a=0;t.forEach((c,u)=>{if(i+=(i?`/`:``)+c,a++,u===t.length-1){let t={id:e[o],text:c,size:e[s],sizeSelf:e[s],subtext:E(e[s]).join(` `),children:[],meta:{...e,path:c,type:l}};r.children.push(t),n.set(e[o],t)}else r=f(e,i,c,r,a)})}return e.forEach(p),d.forEach(e=>e()),{map:n,root:u,maxDepth:a}}),b=p(()=>({animate:ae.value.chartAnimation,palette:{stroke:T.value?`#222`:`#555`,fg:T.value?`#fff`:`#000`,bg:T.value?`#111`:`#fff`},getColor:et(y.value.root,T.value?.8:.9,T.value?1:1.1),getSubtext:e=>e.subtext,...u}));function x(e,t){g.value=e?.meta,e?.children.length||(e=e?.parent),_.value?.select(e,t)}function S(){v?.(),m.value=y.value.root,d?.(),e(()=>{let e=g.value&&y.value.map.get(g.value[o])||null;e&&x(e,!1)}),v=()=>{_.value?.dispose(),_.value=void 0,g.value=void 0}}return e(()=>{h(()=>[y.value,b.value],()=>{S()},{deep:!0,immediate:!1}),S()}),a(()=>{v?.()}),{tree:y,graph:_,chartOptions:b,nodeHover:f,nodeSelected:m,selectedNode:g,selectNode:x,buildGraph:S}}export{jt as a,Ge as c,Ot as i,Ft as n,Qe as o,Ct as r,it as s,It as t};
1
+ import{B as e,C as t,Ct as n,K as r,Kt as i,M as a,Ot as o,Q as s,S as c,Tt as l,Z as u,at as d,b as f,h as p,ot as m,q as h,qt as g,v as _,w as v,x as y,xt as ee}from"./C--RKQDq.js";import{a as b,c as x,d as S,f as C,i as te,l as w,o as ne,r as re,u as ie}from"./5tvbNeKa.js";import{t as T}from"./BE1TLHgg.js";import{t as E}from"./CqfNwh25.js";import{t as ae}from"./BYXvfkhc.js";function D(){return typeof window<`u`}function O(e){return oe(e)?(e.nodeName||``).toLowerCase():`#document`}function k(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function A(e){return((oe(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function oe(e){return D()?e instanceof Node||e instanceof k(e).Node:!1}function j(e){return D()?e instanceof Element||e instanceof k(e).Element:!1}function M(e){return D()?e instanceof HTMLElement||e instanceof k(e).HTMLElement:!1}function se(e){return!D()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof k(e).ShadowRoot}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ce(e){return/^(table|td|th)$/.test(O(e))}function P(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var le=/transform|translate|scale|rotate|perspective|filter/,ue=/paint|layout|strict|content/,F=e=>!!e&&e!==`none`,de;function fe(e){let t=j(e)?L(e):e;return F(t.transform)||F(t.translate)||F(t.scale)||F(t.rotate)||F(t.perspective)||!me()&&(F(t.backdropFilter)||F(t.filter))||le.test(t.willChange||``)||ue.test(t.contain||``)}function pe(e){let t=z(e);for(;M(t)&&!I(t);){if(fe(t))return t;if(P(t))return null;t=z(t)}return null}function me(){return de??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),de}function I(e){return/^(html|body|#document)$/.test(O(e))}function L(e){return k(e).getComputedStyle(e)}function R(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function z(e){if(O(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||se(e)&&e.host||A(e);return se(t)?t.host:t}function he(e){let t=z(e);return I(t)?e.ownerDocument?e.ownerDocument.body:e.body:M(t)&&N(t)?t:he(t)}function ge(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=he(e),i=r===e.ownerDocument?.body,a=k(r);if(i){let e=_e(a);return t.concat(a,a.visualViewport||[],N(r)?r:[],e&&n?ge(e):[])}else return t.concat(r,ge(r,[],n))}function _e(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ve(e){let t=L(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=C(n)!==a||C(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ye(e){return j(e)?e:e.contextElement}function B(e){let t=ye(e);if(!M(t))return x(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ve(t),o=(a?C(n.width):n.width)/r,s=(a?C(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var be=x(0);function xe(e){let t=k(e);return!me()||!t.visualViewport?be:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Se(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==k(e)?!1:t}function V(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ye(e),o=x(1);t&&(r?j(r)&&(o=B(r)):o=B(e));let s=Se(a,n,r)?xe(a):x(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=k(a),t=r&&j(r)?k(r):r,n=e,i=_e(n);for(;i&&r&&t!==n;){let e=B(i),t=i.getBoundingClientRect(),r=L(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=k(i),i=_e(n)}}return S({width:u,height:d,x:c,y:l})}function H(e,t){let n=R(e).scrollLeft;return t?t.left+n:V(A(e)).left+n}function Ce(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function we(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=A(r),s=t?P(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=x(1),u=x(0),d=M(r);if((d||!d&&!a)&&((O(r)!==`body`||N(o))&&(c=R(r)),d)){let e=V(r);l=B(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ce(o,c):x(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Te(e){return Array.from(e.getClientRects())}function Ee(e){let t=A(e),n=R(e),r=e.ownerDocument.body,i=w(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=w(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=w(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var De=25;function Oe(e,t){let n=k(e),r=A(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=me();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(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<=De&&(a-=o)}else l<=De&&(a+=l);return{width:a,height:o,x:s,y:c}}function ke(e,t){let n=V(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=M(e)?B(e):x(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ae(e,t,n){let r;if(t===`viewport`)r=Oe(e,n);else if(t===`document`)r=Ee(A(e));else if(j(t))r=ke(t,n);else{let n=xe(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return S(r)}function je(e,t){let n=z(e);return n===t||!j(n)||I(n)?!1:L(n).position===`fixed`||je(n,t)}function Me(e,t){let n=t.get(e);if(n)return n;let r=ge(e,[],!1).filter(e=>j(e)&&O(e)!==`body`),i=null,a=L(e).position===`fixed`,o=a?z(e):e;for(;j(o)&&!I(o);){let t=L(o),n=fe(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||N(o)&&!n&&je(e,o))?r=r.filter(e=>e!==o):i=t,o=z(o)}return t.set(e,r),r}function Ne(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?P(t)?[]:Me(t,this._c):[].concat(n),r],o=Ae(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ae(t,a[e],i);s=w(n.top,s),c=ie(n.right,c),l=ie(n.bottom,l),u=w(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Pe(e){let{width:t,height:n}=ve(e);return{width:t,height:n}}function Fe(e,t,n){let r=M(t),i=A(t),a=n===`fixed`,o=V(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=x(0);function l(){c.x=H(i)}if(r||!r&&!a)if((O(t)!==`body`||N(i))&&(s=R(t)),r){let e=V(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ce(i,s):x(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function U(e){return L(e).position===`static`}function Ie(e,t){if(!M(e)||L(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return A(e)===n&&(n=n.ownerDocument.body),n}function Le(e,t){let n=k(e);if(P(e))return n;if(!M(e)){let t=z(e);for(;t&&!I(t);){if(j(t)&&!U(t))return t;t=z(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&U(r);)r=Ie(r,t);return r&&I(r)&&U(r)&&!fe(r)?n:r||pe(e)||n}var Re=async function(e){let t=this.getOffsetParent||Le,n=this.getDimensions,r=await n(e.floating);return{reference:Fe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ze(e){return L(e).direction===`rtl`}var Be={convertOffsetParentRelativeRectToViewportRelativeRect:we,getDocumentElement:A,getClippingRect:Ne,getOffsetParent:Le,getElementRects:Re,getClientRects:Te,getDimensions:Pe,getScale:B,isElement:j,isRTL:ze},Ve=b,He=ne,Ue=te,We=(e,t,n)=>{let r=new Map,i={platform:Be,...n},a={...i.platform,_c:r};return re(e,t,{...i,platform:a})},Ge=Object.assign(a({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=l(e),r=d(`hoverElement`),a=ee(0),o=ee(0);return m([t,n],([e,t])=>{We({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},r.value,{placement:`right-start`,middleware:[Ue(),He(),Ve({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,o.value=t})}),(e,t)=>(h(),c(_,{to:`body`},[y(`div`,{ref_key:`hoverElement`,ref:r,fixed:``,"z-panel-content":``,"pointer-events-none":``,style:i({left:`${a.value}px`,top:`${o.value}px`})},[s(e.$slots,`default`)],4)]))}}),{__name:`DisplayGraphHoverView`});function Ke(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 qe,Je,Ye,W,G,K=1,Xe;function Ze(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(qe!==t||Je!==a||Ye!==i){let n=Math.round(64*a)/64;K=i,K=Math.log2(K),K-=Math.floor(K);let r=K,o=Math.min(1,8*r);K=2**K;let s=8*Math.SQRT2/K;qe=t,Je=a,Ye=i,W||=document.createElement(`canvas`),G||=W.getContext(`2d`),W.width=W.height=Math.round(64*n),G.scale(n,n),G.fillStyle=e[0],G.fillRect(0,0,64,64),G.globalAlpha=.25,G.fillStyle=e[1],G.fillRect(0,0,64,64),G.globalAlpha=.67,G.strokeStyle=e[1],G.beginPath();for(let e=0;e<=64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);if(G.lineWidth=s*(1-(o-r)/2),G.stroke(),o+r>0){G.beginPath();for(let e=8;e<64;e+=16)G.moveTo(e-32,e+32),G.lineTo(e+32,e-32);G.lineWidth=s*(o+r)/2,G.stroke()}Xe=t.createPattern(W,`repeat`),K/=n}return n/=64*K*a,n-=Math.floor(n),n*=64*K*a,Xe.setTransform(new DOMMatrix([K,0,0,K,n,r])),Xe}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 $e(e){return t=>t.id&&e[t.id]||t.color}function et(e,t=1,n=1){let r={};return tt(r,e,0,Math.PI*2,t,n),$e(r)}function tt(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ke(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;tt(e,s,n,t,i,a),n+=t}}var nt=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function rt(e=16,t=nt){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function it(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=rt(),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=>it(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 at(e){return e.children.length===0?1:Math.max(...e.children.map(e=>at(e)))+1}var ot=/\bFirefox\//.test(navigator.userAgent),st;function ct(e){return st?st.format(e):`${e}`}function q(){return(window.performance||Date).now()}function lt(e){let t=e.toFixed(1).split(`.`,2);return`${ct(+t[0])}.${t[1]}`}function ut(e){return e===1?`1 byte`:e<1024?`${ct(e)} bytes`:e<1024*1024?`${lt(e/1024)} kb`:e<1024*1024*1024?`${lt(e/(1024*1024))} mb`:`${lt(e/(1024*1024*1024))} gb`}function dt(e,t,n,r,i,a){if(ot){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 ft(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function pt(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{st=new Intl.NumberFormat}catch{}var mt=()=>({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)}}}),J={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ht={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},gt=46,_t=`14px sans-serif`,vt=`bold ${_t}`,yt=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={...J,...t};let{getColor:n=et(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ht,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=at(e),this.disposables=[],this.events=mt(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(_t),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(gt)}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,bt=5,xt=.01,St=1e3,Ct=class extends yt{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(ft(e=>{let t=e.deltaX,n=e.deltaY,r=q(),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(pt(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(q()-this.animationStart)/(this.options.animateDuration??J.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??J.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*xt),r=Math.min(this.totalBytes,r+e.size*xt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??J.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-St>>1,this.zoomedOutWidth=this.zoomedOutMin+St,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)+bt,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=Ze(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(vt)):(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(_t),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||dt(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=q():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function wt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function Tt(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;Tt(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 Et={};function Dt(e){return Et[e]||(Et[e]=400*Math.log(1+Math.log(1+e/8))),Et[e]}var X=-Math.PI/2,Ot=class extends yt{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(pt(()=>this.resize())),this.disposables.push(ft(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(Dt(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(vt),this.c.textAlign=`center`,this.c.fillText(this.getSubtext(this.targetNode)??ut(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=Ze(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=(q()-this.animationStart)/(this.options.animateDuration??J.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 Dt(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=q()),wt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};Tt(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(wt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};Tt(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,kt=2*Z,$=Q+Z;function At(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>kt&&y>$?At(t.children,g+Z,_+Q,v-kt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var jt=class extends yt{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(ft(e=>this.updateHover(e))),this.disposables.push(pt(()=>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=30*e*o,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=(q()-this.animationStart)/(this.options.animateDuration??J.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=At([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|(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=Ze(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(dt(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-kt,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=At([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=q(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}},Mt={flex:`~ gap-1 items-center wrap`},Nt={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},Pt=[`onClick`],Ft=Object.assign(a({__name:`NavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:n}){let r=e,i=n,a=f(()=>{let e=[],t=r.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,n)=>(h(),v(`div`,Mt,[(h(!0),v(p,null,u(a.value,(e,n)=>(h(),v(p,{key:e.id},[n>0?(h(),v(`div`,Nt)):t(``,!0),y(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>i(`select`,e)},[y(`span`,null,g(e.text||e.id),1)],8,Pt)],64))),128))]))}}),{__name:`ChartNavBreadcrumb`});function It(t){let{data:i,nameKey:a,sizeKey:s,rootText:c,nodeType:l,graphOptions:u,onUpdate:d}=t,p=n(void 0),h=n(void 0),g=ee(void 0),_=n(void 0),v,y=f(()=>{if(t.tree)return t.tree.value;let e=o(i),n=new Map,r=0,u={id:`~root`,text:c,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:n,root:u,maxDepth:r};let d=[];d.unshift(()=>{u.size+=u.children.reduce((e,t)=>e+t.size,0),u.subtext=E(u.size).join(` `),u.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function f(e,t,i,a,o){if(n.has(t))return n.get(t);o>r&&(r=o);let s={id:t,text:i,size:0,sizeSelf:0,children:[],meta:{...e,path:i,type:`folder`},parent:a};return n.set(t,s),a.children.push(s),d.unshift(()=>{let t=s.sizeSelf;s.size+=s.children.reduce((e,t)=>e+t.size,0),s.subtext=E(s.size).join(` `),s.children.length&&t/s.size>.1&&s.children.push({id:`${s.id}-self`,text:``,size:t,sizeSelf:t,subtext:E(t).join(` `),children:[],meta:{...e,path:``,type:l},parent:s}),s.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),s}function p(e){let t=e[a].split(`/`).filter(Boolean),r=u,i=``,o=0;t.forEach((c,u)=>{if(i+=(i?`/`:``)+c,o++,u===t.length-1){let t={id:e[a],text:c,size:e[s],sizeSelf:e[s],subtext:E(e[s]).join(` `),children:[],meta:{...e,path:c,type:l}};r.children.push(t),n.set(e[a],t)}else r=f(e,i,c,r,o)})}return e.forEach(p),d.forEach(e=>e()),{map:n,root:u,maxDepth:r}}),b=f(()=>({animate:ae.value.chartAnimation,palette:{stroke:T.value?`#222`:`#555`,fg:T.value?`#fff`:`#000`,bg:T.value?`#111`:`#fff`},getColor:et(y.value.root,T.value?.8:.9,T.value?1:1.1),getSubtext:e=>e.subtext,...u}));function x(e,t){g.value=e?.meta,e?.children.length||(e=e?.parent),_.value?.select(e,t)}function S(){v?.(),h.value=y.value.root,d?.(),e(()=>{let e=g.value&&y.value.map.get(g.value[a])||null;e&&x(e,!1)}),v=()=>{_.value?.dispose(),_.value=void 0,g.value=void 0}}return e(()=>{m(()=>[y.value,b.value],()=>{S()},{deep:!0,immediate:!1}),S()}),r(()=>{v?.()}),{tree:y,graph:_,chartOptions:b,nodeHover:p,nodeSelected:h,selectedNode:g,selectNode:x,buildGraph:S}}export{jt as a,Ge as c,Ot as i,Ft as n,Qe as o,Ct as r,it as s,It as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./DpW0qpWn.js";import{A as t,B as n,C as r,D as i,Kt as a,M as o,Ot as s,S as c,Wt as l,Z as u,at as d,b as f,et as p,h as m,k as h,lt as g,ot as _,q as v,qt as y,st as b,ut as x,w as S,x as C,xt as w,yt as T}from"./C--RKQDq.js";import{C as E}from"./B2NMBmj_.js";import{c as D,g as O,p as k}from"./BE1TLHgg.js";import{n as ee}from"#entry";import{t as A}from"./jJY8e3xp.js";import{r as j}from"./D-KdwVBL.js";import{r as M,t as N}from"./BYXvfkhc.js";import{i as P,t as te}from"./CA0N7And.js";import{n as F}from"./DvZ2T9qR.js";import{n as I,r as ne,t as L}from"./-w-An_zz.js";import{a as re,c as ie,i as ae,n as R,o as z,r as oe,t as se}from"./COiP6LWy.js";import{t as ce}from"./D2AP-caS.js";import{n as le,r as ue,t as B}from"./DCPELPdh.js";var V=[`onClick`],de=Object.assign(o({__name:`FlatList`,props:{chunks:{},session:{},link:{type:Boolean,default:!0},basic:{type:Boolean,default:!1}},emits:[`select`],setup(e,{emit:n}){let i=n;return(n,a)=>{let o=P;return v(),c(L,{items:e.chunks,"key-prop":`chunk_id`},{default:g(({item:n})=>[C(`div`,{flex:``,pb2:``,onClick:e=>i(`select`,n)},[t(o,{chunk:n,basic:e.basic,link:e.link,"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{"left-after":g(()=>[n.is_initial?(v(),c(j,{key:0,text:`initial`})):r(``,!0)]),_:2},1032,[`chunk`,`basic`,`link`])],8,V)]),_:1},8,[`items`])}}}),{__name:`ChunksFlatList`}),H={op50:``,"font-mono":``,w12:``},U=[`title`],W={flex:`~ gap-1 items-center`},fe=Object.assign(o({__name:`Graph`,props:{session:{},chunks:{},entryId:{default:``}},setup(e){let i=e,a=f(()=>i.chunks),o=E();return F({modules:a,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:r,spacing:o,tree:c,hierarchy:l,collapsedNodes:u,container:d,modulesMap:f,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y}=e;return()=>{_.value=window.innerWidth,v.value=window.innerHeight;let e=a.value.filter(e=>i.entryId?e.id===i.entryId:e.reason===`entry`),b=new Set,x=l({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{b.add(e),t.value&&y.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!u.has(e.id),hasChildren:!1}))):u.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=f.value.get(`${e.chunk_id}`);if(!(!r||b.has(r)))return t.value&&y.set(r.id,n.module.id),b.add(r),{module:r,expanded:!u.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,c().nodeSize([s(o.height),s(o.width)+s(o.gap)])(x);let S=x.descendants();for(let e of S)[e.x,e.y]=[e.y-s(o.width),e.x];let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<s(o.margin))for(let e of S)e.x+=Math.abs(C)+s(o.margin);if(w<s(o.margin))for(let e of S)e.y+=Math.abs(w)+s(o.margin);p.value=S,h.clear();for(let e of S)h.set(`${e.data.module.id}`,e);let T=x.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),E=a.value.flatMap(e=>e.imports.filter(t=>!T.some(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:h.get(`${e.chunk_id}`),target:h.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),D=[...T,...E];g.clear();for(let e of D)g.set(e.id,e);m.value=D,n(()=>{_.value=d.value.scrollWidth/r.value+s(o.margin),v.value=d.value.scrollHeight/r.value+s(o.margin)})}}}),(n,i)=>{let l=A,u=B;return v(),c(u,{session:e.session,modules:a.value,"expand-controls":!1},{default:g(({node:e})=>[t(l,{class:`flex items-center`,to:{path:s(o).path,query:{chunk:e.data.module.chunk_id}}},{default:g(()=>[C(`span`,H,`#`+y(e.data.module.id),1),C(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[C(`div`,null,y(e.data.module.name||`[unnamed]`),1),t(j,{text:e.data.module.reason},null,8,[`text`]),e.data.module.is_initial?(v(),c(j,{key:0,text:`initial`})):r(``,!0)],8,U),i[1]||=C(`div`,{"flex-auto":``},null,-1),C(`div`,W,[i[0]||=C(`div`,{"i-ph-package-duotone":``},null,-1),h(` `+y(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),{__name:`ChunksGraph`}),G={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},K={flex:`~ col gap-4`},q={key:0,grid:`~ cols-[250px_1fr] gap-1`},J=[`onClick`],Y={key:0,"text-primary":``},X={key:1},Z=[`onClick`],Q=[`title`],pe=Object.assign(o({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:n}){let i=e,o=n,c=d(`el`);return b(()=>c.value?.append(i.graph.el)),(n,i)=>{let l=R,d=M,f=p(`tooltip`);return v(),S(`div`,G,[C(`div`,{ref_key:`el`,ref:c,"w-500px":``},null,512),C(`div`,K,[t(l,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>o(`select`,e)},null,8,[`selected`,`options`]),e.selected?(v(),S(`div`,q,[(v(!0),S(m,null,u(e.selected.children,n=>(v(),S(m,{key:n.id},[C(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>o(`select`,n)},[n.meta&&n.meta===e.selected?.meta?(v(),S(`span`,Y,`(self)`)):(v(),S(`span`,X,y(n.meta?.name||n.id),1))],8,J),C(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>o(`select`,n)},[C(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:a({background:s(z)(e.graph.options.getColor?.(n)||`#000`),width:`${n.size/e.selected.size*100}%`})},null,4),t(d,{"text-xs":``,bytes:n.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),n.children.length>0?x((v(),S(`div`,{key:0,title:`${n.children.length} modules`,"text-xs":``,"op-fade":``},[h(` (`+y(n.children.length)+`) `,1)],8,Q)),[[f,`${n.children.length} modules`]]):r(``,!0)],8,Z)],64))),128))])):r(``,!0)])])}}}),{__name:`ChunksSunburst`}),me=Object.assign(o({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=d(`el`);return b(()=>n.value?.append(t.graph.el)),(e,t)=>(v(),S(`div`,{ref_key:`el`,ref:n},null,512))}}),{__name:`ChunksFlamegraph`}),he={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},ge={key:0,h10:``,mr2:``,flex:`~ items-center`},_e={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ve=[`onClick`],ye={key:0,class:`px5 pt-4`,flex:`~ col gap-4`},be={key:1,class:`px5 pt-4`,flex:`~ col gap-4`},xe={key:3,flex:`~ col gap-2`},Se={key:4,flex:`~ col gap-2`,"pt-4":``},Ce={key:5,flex:`~ col gap-2`,"pt-4":``},we={key:0,border:`~ base rounded-lg`,"bg-base":``,p2:``,flex:`~ col gap-2`,"min-w-50":``,"shadow-lg":``},Te={flex:`~ gap-2 items-center`},Ee={truncate:``},De={flex:`~ gap-2 items-center`},Oe={key:0,flex:`~ gap-2 items-center`},ke={"text-xs":``},Ae={key:1,flex:`~ gap-2 items-center`},$=o({__name:`chunks`,props:{session:{}},setup(n){let a=n,o=T(k()),d=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-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`}],p=w({search:``}),b=e(),{state:x,isLoading:E}=D(async()=>await b.value.call(`vite:rolldown:get-chunks-graph`,{session:a.session.id}),null),A=f(()=>{let e=new Map;return x.value?.forEach(t=>{e.set(`${t.chunk_id}`,t)}),e}),P=f(()=>x.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]),F=O(()=>P.value,()=>new ne(P.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),L=f(()=>p.value.search?F.value.search(p.value.search).map(e=>e.item):P.value),{pathSelectorVisible:z,pathNodes:B,selectPathNodes:V,togglePathSelector:H,normalizedGraph:U}=ue({onToggle:e=>{p.value.search=e?!1:``},dataMap:f(()=>A.value),list:f(()=>L.value),importIdKey:`chunk_id`});function W(e){N.value.chunkViewType=e}let G=f(()=>{let e=new Map;for(let t of a.session.modulesList)e.set(t.id,t);return e});function K(e){return e.asset?.size?e.asset.size:e.modules.reduce((e,t)=>{let n=G.value.get(t);return!n||!n.buildMetrics?.transforms?.length?e:e+n.buildMetrics.transforms.at(-1).transformed_code_size},0)}let{tree:q,chartOptions:J,graph:Y,nodeHover:X,nodeSelected:Z,selectedNode:Q,selectNode:$,buildGraph:je}=se({data:f(()=>L.value.map(e=>({...e,filename:e.name||`chunk-${e.chunk_id}`,size:K(e)}))),nameKey:`filename`,sizeKey:`size`,rootText:`Chunks`,nodeType:`chunk`,graphOptions:{onClick(e){e&&(X.value=e)},onHover(e){e&&(X.value=e),e===null&&(X.value=void 0)},onLeave(){X.value=void 0},onSelect(e){Z.value=e||q.value.root,Q.value=e?.meta}},onUpdate(){switch(N.value.chunkViewType){case`sunburst`:Y.value=new ae(q.value.root,J.value);break;case`treemap`:Y.value=new re(q.value.root,{...J.value,selectedPaddingRatio:0});break;case`flamegraph`:Y.value=new oe(q.value.root,J.value);break}}});return _(()=>N.value.chunkViewType,()=>{[`treemap`,`sunburst`,`flamegraph`].includes(N.value.chunkViewType)&&je()}),(e,a)=>{let f=ee,_=de,b=le,x=I,w=te,T=fe,D=R,O=pe,k=me,P=M,F=ie;return s(E)?(v(),c(f,{key:0})):(v(),S(`div`,{key:1,relative:``,class:l({"max-h-screen of-hidden":s(N).chunkViewType===`graph`})},[C(`div`,he,[t(x,{modelValue:p.value,"onUpdate:modelValue":a[2]||=e=>p.value=e,rules:[]},i({"search-end":g(()=>[s(N).chunkViewType===`graph`?(v(),S(`div`,ge,[C(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:a[1]||=e=>s(H)(!0)},[...a[5]||=[C(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):r(``,!0)]),default:g(()=>[C(`div`,_e,[a[6]||=C(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(v(),S(m,null,u(d,e=>C(`button`,{key:e.value,"btn-action":``,class:l(s(N).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>W(e.value)},[C(`div`,{class:l(e.icon)},null,2),h(` `+y(e.label),1)],10,ve)),64))])]),_:2},[s(z)?{name:`search`,fn:g(()=>[t(b,{session:n.session,data:L.value,"import-id-key":`chunk_id`,"search-keys":[`name`],onSelect:s(V),onClose:a[0]||=e=>s(H)(!1)},{list:g(({select:e,data:r})=>[t(_,{session:n.session,chunks:r,link:!1,basic:!0,onSelect:e},null,8,[`session`,`chunks`,`onSelect`])]),item:g(({id:e})=>[h(y(A.value.get(e)?.name||`[unnamed]`),1)]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`])]),s(N).chunkViewType===`list`?(v(),S(`div`,ye,[t(_,{session:n.session,chunks:L.value},null,8,[`session`,`chunks`])])):r(``,!0),s(N).chunkViewType===`detailed-list`?(v(),S(`div`,be,[(v(!0),S(m,null,u(L.value,e=>(v(),c(w,{key:e.id,border:`~ base rounded-lg`,p3:``,chunk:e,chunks:L.value,session:n.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):s(N).chunkViewType===`graph`?(v(),c(T,{key:2,class:`pt32`,session:n.session,chunks:s(U),"entry-id":s(B).start},null,8,[`session`,`chunks`,`entry-id`])):s(N).chunkViewType===`treemap`?(v(),S(`div`,xe,[s(Y)?(v(),c(ce,{key:0,graph:s(Y),selected:s(Z),onSelect:a[3]||=e=>s($)(e)},{default:g(({selected:e,options:n,onSelect:r})=>[t(D,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:n,onSelect:r},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):r(``,!0)])):s(N).chunkViewType===`sunburst`?(v(),S(`div`,Se,[s(Y)?(v(),c(O,{key:0,graph:s(Y),selected:s(Z),onSelect:a[4]||=e=>s($)(e)},null,8,[`graph`,`selected`])):r(``,!0)])):s(N).chunkViewType===`flamegraph`?(v(),S(`div`,Ce,[s(Y)?(v(),c(k,{key:0,graph:s(Y)},null,8,[`graph`])):r(``,!0)])):r(``,!0),t(F,{"hover-x":o.x,"hover-y":o.y},{default:g(()=>[s(X)?.meta?(v(),S(`div`,we,[C(`div`,Te,[a[7]||=C(`i`,{"i-ph-shapes-duotone":``,"flex-none":``},null,-1),C(`span`,Ee,y(s(X).meta.name||`[unnamed]`),1)]),C(`div`,De,[a[8]||=C(`span`,{op50:``,"text-xs":``},`Size:`,-1),t(P,{bytes:s(X).meta.size,"text-xs":``},null,8,[`bytes`])]),s(X).meta.modules?.length?(v(),S(`div`,Oe,[a[9]||=C(`span`,{op50:``,"text-xs":``},`Modules:`,-1),C(`span`,ke,y(s(X).meta.modules?.length),1)])):r(``,!0),s(X).meta.is_initial?(v(),S(`div`,Ae,[t(j,{text:`initial`})])):r(``,!0)])):r(``,!0)]),_:1},8,[`hover-x`,`hover-y`])],2))}}});export{$ as default};
@@ -0,0 +1 @@
1
+ import{M as e,Q as t,S as n,Wt as r,b as i,lt as a,q as o,qt as s,w as c,x as l}from"./C--RKQDq.js";function u(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}var d={"ml-0.4":``,"text-xs":``,op75:``},f=e({__name:`DisplayNumberWithUnit`,props:{number:{},unit:{}},setup(e){return(n,r)=>(o(),c(`div`,null,[t(n.$slots,`default`),l(`span`,null,s(e.number),1),l(`span`,d,s(e.unit),1)]))}}),p=e({__name:`DisplayDuration`,props:{duration:{},factor:{default:1},unit:{default:`ms`},color:{type:Boolean,default:!0}},setup(e){let s=e,c=i(()=>{if(s.duration!=null)return s.unit===`ns`?s.duration/1e3:s.duration});function l(e){return!s.color||e==null?``:(e*=s.factor,e<1?`op50`:e>1e4?`color-scale-critical`:e>1e3?`color-scale-high`:e>500?`color-scale-medium`:e>200?`color-scale-low`:`color-scale-neutral`)}let d=i(()=>u(c.value));return(e,i)=>(o(),n(f,{class:r(l(c.value)),number:d.value[0],unit:d.value[1]},{default:a(()=>[t(e.$slots,`default`)]),_:3},8,[`class`,`number`,`unit`]))}});export{u as n,p as t};
@@ -1 +1 @@
1
- import{t as e}from"./CJmfH1zY.js";var t=class{_mapTree;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.at(-1),t),this}get(e){return this._getLastMap(e).get(e.at(-1))}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e.at(-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)}},n=class{_lengthMap;constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,n){let r=e.length,i=this._lengthMap.get(r);return i||(i=new t(r),this._lengthMap.set(r,i)),i.set(e,n),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function r(e){let t=new n,r=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return r.cache=t,r}var i=[{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`}],a=[{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`}],o={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},s={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function c(e){return i.find(t=>t.name===e)??o}var l=r(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of i)if(t.match.test(e))return t;return o}),u=r(e=>{for(let t of a)if(t.match.test(e))return t;return s});function d(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return f(n%360,t)}function f(t,n=1){return`hsla(${t}, ${e.value?50:65}%, ${e.value?60:40}%, ${n})`}var p={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,rolldown:18,virtual:160,nuxt:140};function m(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in p){let n=p[e];return typeof n==`number`?f(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return d(e,t)}export{i as a,c,s as i,u as l,d as n,a as o,f as r,l as s,m as t,r as u};
1
+ import{t as e}from"./BE1TLHgg.js";var t=class{_mapTree;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.at(-1),t),this}get(e){return this._getLastMap(e).get(e.at(-1))}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e.at(-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)}},n=class{_lengthMap;constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,n){let r=e.length,i=this._lengthMap.get(r);return i||(i=new t(r),this._lengthMap.set(r,i)),i.set(e,n),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function r(e){let t=new n,r=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return r.cache=t,r}var i=[{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`}],a=[{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`}],o={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},s={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function c(e){return i.find(t=>t.name===e)??o}var l=r(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of i)if(t.match.test(e))return t;return o}),u=r(e=>{for(let t of a)if(t.match.test(e))return t;return s});function d(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return f(n%360,t)}function f(t,n=1){return`hsla(${t}, ${e.value?50:65}%, ${e.value?60:40}%, ${n})`}var p={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,rolldown:18,virtual:160,nuxt:140};function m(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in p){let n=p[e];return typeof n==`number`?f(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return d(e,t)}export{i as a,c,s as i,u as l,d as n,a as o,f as r,l as s,m as t,r as u};
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,Gt as r,Kt as i,M as a,Q as o,S as s,Ut as c,b as l,lt as u,q as d,tt as f,w as p,x as m}from"./CRfXUi3G.js";import{C as h}from"./CpTuuES2.js";import{a as g}from"#entry";import{t as _}from"./DWUsdlci.js";import{n as v,r as y}from"./5SREwa_J.js";import{n as b,t as x}from"./hY2iPUYh.js";var S=[`textContent`],C=a({__name:`DisplayBadge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(e){let t=e,n=l(()=>!t.text||t.color===!1?{}:{color:typeof t.color==`number`?y(t.color):v(t.text),background:typeof t.color==`number`?y(t.color,.1):v(t.text,.1)}),a=l(()=>{switch(t.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(l,p)=>(d(),s(f(e.as||`span`),{"ws-nowrap":``,rounded:``,class:c(a.value),style:r(n.value)},{default:u(()=>[o(l.$slots,`default`,{},()=>[m(`span`,{textContent:i(t.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=/^[A-Za-z]:\//;function T(e=``){return e&&e.replace(/\\/g,`/`).replace(w,e=>e.toUpperCase())}var E=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,D=/^\/([A-Za-z]:)?$/;function O(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var k=function(...e){e=e.map(e=>T(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:O();!i||i.length===0||(t=`${i}/${t}`,n=j(i))}return t=A(t,!n),n&&!j(t)?`/${t}`:t.length>0?t:`.`};function A(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 j=function(e){return E.test(e)},M=function(e,t){let n=k(e).replace(D,`$1`).split(`/`),r=k(t).replace(D,`$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(`/`)},N={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},P={"font-mono":``,"text-sm":``},F=Object.assign(a({__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(r){let a=r,v=h(),y=window.location,S=l(()=>{if(!a.id)return``;let e=a.id.replace(/%2F/g,`/`),t=a.cwd||a.session.meta.cwd,n=t?M(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||/^(?:\.\.\/){1,3}[^.]/.test(n)?n:e}),w=l(()=>`flex items-center`);return(l,h)=>{let T=b,E=x;return d(),s(f(r.link?n(_):`div`),{to:r.link?typeof r.link==`string`?r.link:{path:n(v).path,query:{...n(v).query,module:r.id,chunk:void 0},hash:n(y).hash}:void 0},{default:u(()=>[e(n(g),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:r.disableTooltip||(a.id?.length||0)<30,placement:`bottom-start`},{popper:u(()=>[m(`span`,P,i(a.id),1)]),default:u(()=>[r.id?(d(),p(`div`,{key:0,class:c(w.value)},[r.icon?(d(),s(T,{key:0,filename:r.id,"mr1.5":``},null,8,[`filename`])):t(``,!0),m(`span`,N,[e(E,{path:S.value,minimal:r.minimal},null,8,[`path`,`minimal`])]),o(l.$slots,`default`),r.kind?(d(),s(C,{key:1,class:`ml1`,text:r.kind},null,8,[`text`])):t(``,!0)],2)):t(``,!0),m(`div`,null,[o(l.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),{__name:`DisplayModuleId`});export{M as n,C as r,F as t};
1
+ import{A as e,C as t,Kt as n,M as r,Ot as i,Q as a,S as o,Wt as s,b as c,lt as l,q as u,qt as d,tt as f,w as p,x as m}from"./C--RKQDq.js";import{C as h}from"./B2NMBmj_.js";import{a as g}from"#entry";import{t as _}from"./jJY8e3xp.js";import{n as v,r as y}from"./CnkQlf-T.js";import{n as b,t as x}from"./XfS7e3PM.js";var S=[`textContent`],C=r({__name:`DisplayBadge`,props:{text:{},color:{type:[Boolean,Number],default:!0},as:{},size:{}},setup(e){let t=e,r=c(()=>!t.text||t.color===!1?{}:{color:typeof t.color==`number`?y(t.color):v(t.text),background:typeof t.color==`number`?y(t.color,.1):v(t.text,.1)}),i=c(()=>{switch(t.size||`sm`){case`sm`:return`px-1.5 text-11px leading-1.6em`}return``});return(c,p)=>(u(),o(f(e.as||`span`),{"ws-nowrap":``,rounded:``,class:s(i.value),style:n(r.value)},{default:l(()=>[a(c.$slots,`default`,{},()=>[m(`span`,{textContent:d(t.text)},null,8,S)])]),_:3},8,[`class`,`style`]))}}),w=/^[A-Za-z]:\//;function T(e=``){return e&&e.replace(/\\/g,`/`).replace(w,e=>e.toUpperCase())}var E=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,D=/^\/([A-Za-z]:)?$/;function O(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}var k=function(...e){e=e.map(e=>T(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:O();!i||i.length===0||(t=`${i}/${t}`,n=j(i))}return t=A(t,!n),n&&!j(t)?`/${t}`:t.length>0?t:`.`};function A(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 j=function(e){return E.test(e)},M=function(e,t){let n=k(e).replace(D,`$1`).split(`/`),r=k(t).replace(D,`$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(`/`)},N={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},P={"font-mono":``,"text-sm":``},F=Object.assign(r({__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 r=n,v=h(),y=window.location,S=c(()=>{if(!r.id)return``;let e=r.id.replace(/%2F/g,`/`),t=r.cwd||r.session.meta.cwd,n=t?M(t,e):e;return n.startsWith(`.`)||(n=`./${n}`),n.startsWith(`./`)||/^(?:\.\.\/){1,3}[^.]/.test(n)?n:e}),w=c(()=>`flex items-center`);return(c,h)=>{let T=b,E=x;return u(),o(f(n.link?i(_):`div`),{to:n.link?typeof n.link==`string`?n.link:{path:i(v).path,query:{...i(v).query,module:n.id,chunk:void 0},hash:i(y).hash}:void 0},{default:l(()=>[e(i(g),{"my-auto":``,"text-sm":``,"font-mono":``,block:``,"w-full":``,triggers:[`hover`],delay:1200,disabled:n.disableTooltip||(r.id?.length||0)<30,placement:`bottom-start`},{popper:l(()=>[m(`span`,P,d(r.id),1)]),default:l(()=>[n.id?(u(),p(`div`,{key:0,class:s(w.value)},[n.icon?(u(),o(T,{key:0,filename:n.id,"mr1.5":``},null,8,[`filename`])):t(``,!0),m(`span`,N,[e(E,{path:S.value,minimal:n.minimal},null,8,[`path`,`minimal`])]),a(c.$slots,`default`),n.kind?(u(),o(C,{key:1,class:`ml1`,text:n.kind},null,8,[`text`])):t(``,!0)],2)):t(``,!0),m(`div`,null,[a(c.$slots,`detail`)])]),_:3},8,[`disabled`])]),_:3},8,[`to`])}}}),{__name:`DisplayModuleId`});export{M as n,C as r,F as t};
@@ -1 +1 @@
1
- import{M as e,Q as t,at as n,q as r,st as i,w as a,x as o}from"./CRfXUi3G.js";var s={class:`px4`,flex:`~ col gap2`},c=Object.assign(e({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:c}){let l=e,u=c,d=n(`el`);return i(()=>d.value?.append(l.graph.el)),(n,i)=>(r(),a(`div`,s,[t(n.$slots,`default`,{selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>u(`select`,e)},()=>[i[1]||=o(`div`,{border:`b base`,py2:``,"min-h-10":``},null,-1)]),o(`div`,{ref_key:`el`,ref:d},null,512)]))}}),{__name:`ChartTreemap`});export{c as t};
1
+ import{M as e,Q as t,at as n,q as r,st as i,w as a,x as o}from"./C--RKQDq.js";var s={class:`px4`,flex:`~ col gap2`},c=Object.assign(e({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:c}){let l=e,u=c,d=n(`el`);return i(()=>d.value?.append(l.graph.el)),(n,i)=>(r(),a(`div`,s,[t(n.$slots,`default`,{selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>u(`select`,e)},()=>[i[1]||=o(`div`,{border:`b base`,py2:``,"min-h-10":``},null,-1)]),o(`div`,{ref_key:`el`,ref:d},null,512)]))}}),{__name:`ChartTreemap`});export{c as t};
@@ -1 +1 @@
1
- import{Kt as e,q as t,w as n,x as r}from"./CRfXUi3G.js";import{c as i}from"#entry";import{t as a}from"./BUwCbG2W.js";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=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return i({title:`${d.status} - ${d.statusText} | ${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(),n(`div`,o,[r(`div`,s,[r(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:e(a.status)},null,8,c),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:e(a.statusText)},null,8,l),r(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:e(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-d9556456`]]);export{d as default};
1
+ import{q as e,qt as t,w as n,x as r}from"./C--RKQDq.js";import{c as i}from"#entry";import{t as a}from"./BUwCbG2W.js";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=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return i({title:`${d.status} - ${d.statusText} | ${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)=>(e(),n(`div`,o,[r(`div`,s,[r(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:t(a.status)},null,8,c),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:t(a.statusText)},null,8,l),r(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:t(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-3f2b1973`]]);export{d as default};
@@ -0,0 +1 @@
1
+ import{A as e,C as t,G as n,Gt as r,Kt as i,M as a,Ot as o,Q as s,R as c,S as l,Wt as u,Z as d,b as f,et as p,h as m,lt as h,ot as g,q as _,qt as v,rt as y,ut as b,w as x,x as S,xt as C,z as w}from"./C--RKQDq.js";import{G as T,H as E,z as D}from"./B2NMBmj_.js";import{g as O}from"./BE1TLHgg.js";import{i as k,r as A}from"#entry";import{a as j,c as M,i as N,o as P,r as F,s as ee,t as I}from"./DvZ2T9qR.js";import{r as L}from"./-w-An_zz.js";var R={"flex-1":``,"w-0":``,"h-full":``},z={key:0,"w-full":``,"overflow-hidden":``,flex:`~ items-center`,border:`~ base rounded`,p1:``,relative:``},B={"overflow-hidden":``,"text-ellipsis":``,pr6:``,"w-0":``,"flex-1":``},V=[`placeholder`],H={class:`p2 w100`,flex:`~ col gap2`},U=Object.assign(a({__name:`PathSelectorItem`,props:c({selector:{},placeholder:{},session:{},data:{default:void 0},emptyStateText:{default:void 0},onClear:{type:Function,default:void 0}},{search:{required:!0},searchModifiers:{}}),emits:c([`clear`],[`update:search`]),setup(e,{emit:t}){let n=t,r=y(e,`search`);return(t,i)=>(_(),x(`div`,R,[e.selector.state.value.selected?(_(),x(`div`,z,[S(`div`,B,[s(t.$slots,`item`)]),S(`button`,{"i-carbon-clean":``,"text-4":``,hover:`op100`,op50:``,title:`Clear`,absolute:``,"right-2":``,onClick:i[0]||=e=>n(`clear`)})])):(_(),l(o(A),{key:1,distance:15,triggers:[`click`],"auto-hide":!1,delay:{show:300,hide:150},class:`h-full`},{popper:h(()=>[S(`div`,H,[e.data?.length?s(t.$slots,`list`,{key:0}):s(t.$slots,`empty`,{key:1})])]),default:h(()=>[b(S(`input`,{"onUpdate:modelValue":i[1]||=e=>r.value=e,py1:``,px4:``,"w-full":``,"h-full":``,border:`~ base rounded-1`,style:{outline:`none`},placeholder:e.placeholder,onBlur:i[2]||=(...e)=>o(k)&&o(k)(...e)},null,40,V),[[E,r.value]])]),_:3}))]))}}),{__name:`DataPathSelectorItem`});function W(e){let t=C({search:``,selected:null}),n=C(),r=f(e.getModules);function i(t){n.value=O(t,()=>new L(t.value,{includeScore:!0,keys:e.searchKeys||[`id`],ignoreLocation:!0,threshold:.4}))}function a(e){t.value.selected=e.id,t.value.search=``}function o(){t.value.selected=null}return{state:t,modules:r,fuse:n,initSelector:i,select:a,clear:o}}function G(e){let{onToggle:t,dataMap:n,list:r,importIdKey:i}=e,a=C(!1),o=C({start:``,end:``});function s(e){a.value=e??!a.value,t?.(a.value)}function c(e){o.value={start:e.start,end:e.end}}return{pathSelectorVisible:a,togglePathSelector:s,pathNodes:o,selectPathNodes:c,normalizedGraph:f(()=>{let{start:e,end:t}=o.value;if(!e&&!t)return r.value;let a=new Set,s=(e,t,n)=>{let r=[e],i=new Set,o=new Map([[`${e}`,[`${e}`]]]);for(;r.length>0;){let e=r.shift();i.has(e)||(i.add(e),n?e===n&&o.get(e)?.forEach(e=>a.add(e)):a.add(e),(!n||e!==n)&&t(e).forEach(t=>{i.has(`${t}`)||(r.push(`${t}`),n&&o.set(`${t}`,[...o.get(e)||[],`${t}`]))}))}};return e&&t?s(e,e=>n.value.get(e)?.imports.map(e=>e[i])||[],t):e&&s(e,e=>n.value.get(e)?.imports.map(e=>e[i])||[]),r.value.filter(e=>a.has(e.id)).map(t=>t.id===e?{...t,importers:[]}:t)})}}var K={h10:``,px4:``,p1:``,relative:``,flex:`~ gap2 items-center`},q={flex:`~ items-center gap2`,class:`flex-1 h-full`,"min-w-0":``},J={flex:`~ items-center justify-center`,"w-full":``,"h-20":``},Y={italic:``,op50:``},X=Object.assign(a({__name:`PathSelector`,props:{session:{},data:{},importIdKey:{},searchKeys:{}},emits:[`close`,`select`],setup(t,{emit:n}){let r=t,i=n,a=f(()=>{let e=new Map;return r.data.forEach(t=>{e.set(t.id,t)}),e}),c=W({searchKeys:r.searchKeys,getModules:()=>c.state.value.search?c.fuse.value.value?.search(c.state.value.search).map(e=>e.item)??[]:r.data});c.initSelector(f(()=>r.data));function l(e,t=new Set){if(t.has(e))return[];t.add(e);let n=a.value.get(e);if(!n?.imports?.length)return[];let i=[];for(let e of n.imports){let n=a.value.get(`${e[r.importIdKey]}`);n&&(t.has(n.id)||(i.push(n),i.push(...l(n.id,t))))}return i}let u=W({searchKeys:r.searchKeys,getModules:()=>c.state.value.selected?l(c.state.value.selected):[]});u.initSelector(u.modules);let d=f(()=>u.state.value.search?u.fuse.value.value?.search(u.state.value.search).map(e=>e.item)??[]:u.modules.value);g([()=>c.state.value.selected,()=>u.state.value.selected],()=>{i(`select`,{start:c.state.value.selected??``,end:u.state.value.selected??``})});function p(){i(`select`,{start:``,end:``}),i(`close`)}return(n,r)=>{let i=U;return _(),x(`div`,K,[S(`div`,q,[e(i,{search:o(c).state.value.search,"onUpdate:search":r[0]||=e=>o(c).state.value.search=e,placeholder:`Start`,selector:o(c),session:t.session,data:o(c).modules.value,onClear:r[1]||=()=>{o(c).clear(),o(u).clear()}},{list:h(()=>[s(n.$slots,`list`,{select:o(c).select,data:o(c).modules.value})]),item:h(()=>[s(n.$slots,`item`,{id:o(c).state.value.selected})]),_:3},8,[`search`,`selector`,`session`,`data`]),r[3]||=S(`div`,{class:`i-carbon-arrow-right op50`,"flex-shrink-0":``},null,-1),e(i,{search:o(u).state.value.search,"onUpdate:search":r[2]||=e=>o(u).state.value.search=e,placeholder:`End`,selector:o(u),session:t.session,data:d.value,onClear:o(u).clear},{list:h(()=>[s(n.$slots,`list`,{select:o(u).select,data:d.value})]),item:h(()=>[s(n.$slots,`item`,{id:o(u).state.value.selected})]),empty:h(()=>[S(`div`,J,[S(`span`,Y,v(o(c).state.value.selected?`No modules`:`Select a start module to get end modules`),1)])]),_:3},8,[`search`,`selector`,`session`,`data`,`onClear`])]),e(I,{class:`mr--2`,onClick:p})])}}}),{__name:`DataPathSelector`}),Z=Object.assign(a({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(e){let n=C(!1),i=null;return g(()=>e.content,()=>{i&&clearTimeout(i),n.value=!0,i=setTimeout(()=>{n.value=!1},e.hideInterval)}),(i,a)=>(_(),l(D,{"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:h(()=>[n.value?(_(),x(`div`,r(w({key:0},i.$attrs)),v(e.content),17)):t(``,!0)]),_:1}))}}),{__name:`DisplayTimeoutView`}),Q=[`width`,`height`],te=[`d`],ne={class:`w-4`},re=[`disabled`,`title`,`onClick`],ie={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},ae={"w-10":``,flex:`~ items-center justify-center`},oe={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},$=[`disabled`],se=[`disabled`],ce=[`disabled`],le=[`disabled`],ue=Object.assign(a({__name:`ModuleGraph`,props:{modules:{},session:{},expandControls:{type:Boolean,default:!0}},setup(r){let a=r,{isFirstCalculateGraph:c,childToParentMap:l,collapsedNodes:f,calculateGraph:h,container:v,width:y,height:C,scale:w,nodes:E,links:D,spacing:O,nodesRefMap:k}=ee(),{isGrabbing:A,init:I}=j(),{zoomIn:L,zoomOut:R,ZOOM_MIN:z,ZOOM_MAX:B}=P(),{isGraphNodeToggling:V,toggleNode:H,expandAll:U,collapseAll:W}=M({modules:a.modules});return n(()=>{I(),g(()=>a.modules,()=>{c.value=!0,f.clear(),l.clear(),h()},{immediate:!0})}),(n,a)=>{let c=Z,l=p(`tooltip`);return _(),x(`div`,{ref_key:`container`,ref:v,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:u(o(A)?`cursor-grabbing`:``)},[S(`div`,{style:i({width:`${o(y)*o(w)}px`,height:`${o(C)*o(w)}px`})},[S(`div`,{flex:`~ items-center justify-center`,style:i({transform:`scale(${o(w)})`,transformOrigin:`0 0`})},[S(`div`,{absolute:``,"left-0":``,"top-0":``,style:i({width:`${o(y)}px`,height:`${o(C)}px`}),class:`bg-dots`},null,4),(_(),x(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:o(y),height:o(C)},[S(`g`,null,[(_(!0),x(m,null,d(o(D),e=>(_(),x(m,{key:e.id},[e.target?s(n.$slots,`link`,{key:0,link:e,d:o(F)(e,o(O)),linkClass:o(N)(e)},()=>[(_(),x(`path`,{key:e.id,d:o(F)(e,o(O)),class:u(o(N)(e)),fill:`none`},null,10,te))]):t(``,!0)],64))),128))])],8,Q)),(_(!0),x(m,null,d(o(E),e=>(_(),x(m,{key:e.data.module.id},[e.data.module.id===`~root`?t(``,!0):(_(),x(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:i({left:`${e.x}px`,top:`${e.y}px`,transform:`translate(-50%, -50%)`})},[S(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:i({minWidth:`${o(o(O).width)}px`,maxWidth:`${o(o(O).width)}px`,maxHeight:`${o(o(O).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[s(n.$slots,`default`,{node:e,nodesRefMap:o(k)})],4),S(`div`,ne,[e.data.hasChildren?(_(),x(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:u([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":o(V),"hover:bg-active":!o(V)}]),disabled:o(V),title:e.data.expanded?`Collapse`:`Expand`,onClick:T(t=>o(H)(e.data.module.id),[`stop`])},[S(`div`,{class:u([`text-primary h-4`,[e.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,re)):t(``,!0)])],4))],64))),128))],4)],4),S(`div`,ie,[S(`div`,ae,[e(c,{content:`${Math.round(o(w)*100)}%`,class:`text-sm`},null,8,[`content`])]),S(`div`,oe,[r.expandControls?(_(),x(m,{key:0},[b((_(),x(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:o(V),class:u({"op50 cursor-not-allowed":o(V),"hover:bg-active":!o(V)}),title:`Expand All`,onClick:a[0]||=e=>o(U)()},[...a[4]||=[S(`div`,{class:`i-ph-arrows-out-simple-duotone`},null,-1)]],10,$)),[[l,`Expand All`,void 0,{left:!0}]]),b((_(),x(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:o(V),class:u({"op50 cursor-not-allowed":o(V),"hover:bg-active":!o(V)}),title:`Collapse All`,onClick:a[1]||=e=>o(W)()},[...a[5]||=[S(`div`,{class:`i-ph-arrows-in-simple-duotone`},null,-1)]],10,se)),[[l,`Collapse All`,void 0,{left:!0}]]),a[6]||=S(`div`,{border:`t base`,my1:``},null,-1)],64)):t(``,!0),b((_(),x(`button`,{disabled:o(w)>=o(B),"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=>o(L)()},[...a[7]||=[S(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,ce)),[[l,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),b((_(),x(`button`,{disabled:o(w)<=o(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=>o(R)()},[...a[8]||=[S(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,le)),[[l,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),{__name:`DisplayModuleGraph`});export{X as n,G as r,ue as t};
@@ -0,0 +1 @@
1
+ import{A as e,C as t,Kt as n,M as r,Ot as i,Q as a,R as o,S as s,Wt as c,Z as l,h as u,lt as d,q as f,rt as p,tt as m,w as h,x as g}from"./C--RKQDq.js";import{C as _}from"./B2NMBmj_.js";import{t as v}from"./jJY8e3xp.js";import{n as y,t as b}from"./XfS7e3PM.js";var x=[`open`],S={"font-mono":``},C={"font-mono":``},w=Object.assign(r({__name:`TreeNode`,props:o({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:o([`select`],[`update:open`]),setup(r,{emit:o}){let T=r,E=o,D=p(r,`open`),O=_(),k=window.location;function A(e){T.link||E(`select`,e)}return(o,p)=>{let _=b,T=w,E=y;return f(),h(`details`,{open:D.value,onToggle:p[0]||=e=>D.value=e.target?.open},[g(`summary`,{"cursor-default":``,"select-none":``,"text-sm":``,truncate:``,style:n({paddingLeft:`${r.padding+.5}rem`}),flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active `},[g(`div`,{class:c([`i-ph-caret-right-duotone transition op50`,D.value?`rotate-90`:``])},null,2),g(`div`,{class:c(D.value&&r.iconOpen||r.icon),"inline-block":``,"vertical-text-bottom":``},null,2),g(`div`,S,[e(_,{path:r.node.name||``},null,8,[`path`])])],4),D.value?(f(),h(u,{key:0},[(f(!0),h(u,null,l(Object.entries(r.node.children),e=>(f(),s(T,{key:e[0],node:e[1],link:r.link,padding:r.padding+1,"link-query-key":r.linkQueryKey,onSelect:A},{extra:d(({node:e})=>[a(o.$slots,`extra`,{node:e})]),_:3},8,[`node`,`link`,`padding`,`link-query-key`]))),128)),(f(!0),h(u,null,l(r.node.items,t=>(f(),s(m(r.link?i(v):`div`),{key:t.full,to:r.link?typeof r.link==`string`?r.link:{path:i(O).path,query:{...i(O).query,[r.linkQueryKey]:t.full},hash:i(k).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:n({paddingLeft:`${r.padding+2.7}rem`}),onClick:e=>A(t)},{default:d(()=>[e(E,{filename:t.full},null,8,[`filename`]),g(`div`,C,[e(_,{path:t.path.split(`/`).pop()||``},null,8,[`path`]),a(o.$slots,`extra`,{node:t})])]),_:2},1032,[`to`,`style`,`onClick`]))),128))],64)):t(``,!0)],40,x)}}}),{__name:`DisplayTreeNode`});export{w as t};
@@ -1 +1 @@
1
- import{b as e,ot as t,vt as n,wt as r,yt as i}from"./CRfXUi3G.js";var a=0,o=i(new Map),s=e(()=>Array.from(o.values()).flat());function c(e){let i=r(e),s=()=>{};function c(e){s();let t=a++;o.set(t,e),s=()=>{o.delete(t)}}return t(i,e=>{c(e)},{immediate:!0}),n(()=>{s()}),()=>{s()}}export{c as n,s as t};
1
+ import{b as e,ot as t,vt as n,wt as r,yt as i}from"./C--RKQDq.js";var a=0,o=i(new Map),s=e(()=>Array.from(o.values()).flat());function c(e){let i=r(e),s=()=>{};function c(e){s();let t=a++;o.set(t,e),s=()=>{o.delete(t)}}return t(i,e=>{c(e)},{immediate:!0}),n(()=>{s()}),()=>{s()}}export{c as n,s as t};
@@ -0,0 +1 @@
1
+ import{C as e,M as t,Ot as n,q as r,qt as i,w as a}from"./C--RKQDq.js";import{i as o}from"./BE1TLHgg.js";var s={key:0,"font-mono":``},c=t({__name:`DisplayTimestamp`,props:{timestamp:{}},setup(t){let c=t;return(l,u)=>t.timestamp?(r(),a(`span`,s,i(n(o)(new Date(c.timestamp))),1)):e(``,!0)}});export{c as t};
@@ -1 +1 @@
1
- import{A as e,Kt as t,k as n,lt as r,q as i,w as a,x as o}from"./CRfXUi3G.js";import{c as s}from"#entry";import{t as c}from"./DWUsdlci.js";import{t as l}from"./BUwCbG2W.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=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{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(l){let g=l;return s({title:`${g.status} - ${g.statusText} | ${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: }`}]}),(s,g)=>{let _=c;return i(),a(`div`,u,[o(`div`,d,[o(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:t(l.status)},null,8,f),o(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:t(l.statusText)},null,8,p),o(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:t(l.description)},null,8,m),o(`div`,h,[e(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:r(()=>[n(t(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-ef604f91`]]);export{g as default};
1
+ import{A as e,k as t,lt as n,q as r,qt as i,w as a,x as o}from"./C--RKQDq.js";import{c as s}from"#entry";import{t as c}from"./jJY8e3xp.js";import{t as l}from"./BUwCbG2W.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=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{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(l){let g=l;return s({title:`${g.status} - ${g.statusText} | ${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: }`}]}),(s,g)=>{let _=c;return r(),a(`div`,u,[o(`div`,d,[o(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:i(l.status)},null,8,f),o(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:i(l.statusText)},null,8,p),o(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:i(l.description)},null,8,m),o(`div`,h,[e(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:n(()=>[t(i(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-ba200554`]]);export{g as default};
@@ -0,0 +1 @@
1
+ .vue-recycle-scroller__resize-observer[data-v-08cc04ab]{bottom:0;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:0;z-index:-1}.vue-recycle-scroller{position:relative}.vue-recycle-scroller.flow-mode{overflow-anchor:none}.vue-recycle-scroller.direction-vertical:not(.page-mode){overflow-y:auto}.vue-recycle-scroller.direction-horizontal:not(.page-mode){overflow-x:auto}.vue-recycle-scroller.grid-mode:not(.page-mode){overflow:auto}.vue-recycle-scroller.direction-horizontal{display:-webkit-box;display:-ms-flexbox;display:flex}.vue-recycle-scroller__slot{-webkit-box-flex:1;-ms-flex:auto 0 0px;flex:auto 0 0}.vue-recycle-scroller__item-wrapper{-webkit-box-flex:1;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex:1;flex:1;overflow:hidden;position:relative}.vue-recycle-scroller.flow-mode .vue-recycle-scroller__item-wrapper{overflow:visible;overflow-anchor:none}.vue-recycle-scroller.ready .vue-recycle-scroller__item-view{left:0;position:absolute;top:0;will-change:transform}.vue-recycle-scroller.ready.flow-mode .vue-recycle-scroller__item-view{left:auto;overflow-anchor:none;position:static;top:auto;will-change:auto}.vue-recycle-scroller.direction-vertical .vue-recycle-scroller__item-wrapper{width:100%}.vue-recycle-scroller.direction-horizontal .vue-recycle-scroller__item-wrapper{height:100%}.vue-recycle-scroller.ready.direction-vertical .vue-recycle-scroller__item-view{width:100%}.vue-recycle-scroller.ready.direction-horizontal .vue-recycle-scroller__item-view{height:100%}.vue-recycle-scroller__item-spacer{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-flex:0;border:0;-ms-flex:0 0 auto;flex:0 0 auto;margin:0;overflow-anchor:none;padding:0;pointer-events:none;visibility:hidden}
@@ -0,0 +1 @@
1
+ import{i as e,r as t}from"./DpW0qpWn.js";import{A as n,C as r,M as i,Ot as a,S as o,Wt as s,Z as c,b as l,ct as u,h as d,k as f,lt as p,q as m,qt as h,tt as g,w as _,x as v,xt as y,z as b}from"./C--RKQDq.js";import{t as x}from"./jJY8e3xp.js";import{t as S}from"./8kHoufi2.js";import{r as C,t as w}from"./D-KdwVBL.js";import{t as T}from"./D_gteVIt.js";import{t as E}from"./BhOKQpS-.js";var D={flex:`~ col gap-2`},O={flex:`~ gap-1 items-center`,"font-mono":``,op50:``,"text-sm":``},k={"font-mono":``,"font-sm":``},A={key:0,flex:`~ gap-1 items-center`},j={key:0,op50:``,"text-xs":``,border:`~ base rounded-md`,px1:``,"font-mono":``},M=Object.assign(i({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(e,{emit:t}){let i=e,s=t;function u(e){return E(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let y=l(()=>{let e=i.selectedSessions?.[0];return e?u(e):``});function S(e){return y.value&&y.value!==u(e)}function M(e){i.sessionMode===`compare`&&!S(e)&&s(`select`,e)}return(t,i)=>{let s=w;return m(),_(`div`,D,[(m(!0),_(d,null,c(e.sessions,t=>(m(),_(`div`,{key:t.id,flex:`~ row gap-2`,relative:``},[(m(),o(g(e.sessionMode===`list`?a(x):`button`),b({to:`/session/${t.id}`},{ref_for:!0},e.sessionMode===`list`?{}:{type:`button`},{"aria-label":`Session ${t.id}`,border:`~ rounded-md`,class:e.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[e.selectedSessionIds.includes(t.id)?`border-active`:`border-base`,S(t)||e.selectedSessions.length===2&&!e.selectedSessionIds.includes(t.id)?`op50`:`hover:bg-active`],"appearance-none":``,"bg-transparent":``,"color-base":``,"text-left":``,flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(t)}),{default:p(()=>[v(`div`,O,[i[0]||=v(`div`,{"i-ph-hash-duotone":``},null,-1),f(` `+h(t.id),1)]),v(`div`,k,h(t.meta.cwd),1),t.meta.inputs[0]?(m(),_(`div`,A,[n(s,{id:t.meta.inputs[0].filename,cwd:t.meta.cwd},null,8,[`id`,`cwd`]),n(C,{text:t.meta.inputs[0].name||`entry`},null,8,[`text`]),t.meta.inputs.length>1?(m(),_(`span`,j,` +`+h(t.meta.inputs.length-1),1)):r(``,!0)])):r(``,!0),n(T,{timestamp:t.timestamp,pt2:``,"text-sm":``,op50:``},null,8,[`timestamp`])]),_:2},1040,[`to`,`aria-label`,`class`,`onClick`]))]))),128))])}}}),{__name:`PanelSessionSelector`}),N={p4:``,flex:`~ col gap-4`,"items-center":``,"justify-center":``,relative:``},P={key:0,op50:``},F={key:1,op50:``},I={relative:``,flex:`~ col gap3 items-center`},L={key:2,fixed:``,"top-5":``,"right-5":``,flex:`~ col gap2`},R={flex:`~ row justify-around`,w20:``,h8:``,border:`~ base rounded-8`,"of-hidden":``},z=[`title`,`onClick`],B={key:3,fixed:``,"bottom-5":``,"right-5":``,border:`~ base rounded-2`,w100:``,"max-lg:w85":``,"bg-glass":``,"z-panel-content":``},V={flex:`~ justify-center`,p2:``},H={key:1,op80:``,"text-sm":``},U=i({__name:`index`,async setup(i){let g,b,C=y(`list`),w=[{label:`Session List`,icon:`i-ph-list-bullets-duotone`,value:`list`},{label:`Session Compare`,icon:`i-ph-git-diff-duotone`,value:`compare`}],T=y([]),E=l(()=>T.value.map(e=>e.id).sort()),D=l(()=>T.value.toSorted((e,t)=>e.timestamp-t.timestamp).map((e,t)=>({...e,createdAt:new Date(e.timestamp),title:t===0?`Session A`:`Session B`}))),O=t(),k=([g,b]=u(()=>O.value.call(`vite:rolldown:list-sessions`)),g=await g,b(),g);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,i)=>{let l=e,u=M,g=S,y=x;return m(),_(`div`,N,[n(l),a(k).length?(m(),_(`p`,P,h(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1)):(m(),_(`p`,F,` No sessions yet, run a build to get started. `)),v(`div`,I,[n(u,{"session-mode":C.value,sessions:a(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),a(k).length?(m(),_(`div`,L,[v(`div`,R,[(m(),_(d,null,c(w,e=>v(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:s({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[v(`span`,{class:s([e.icon,`text-sm`])},null,2)],10,z)),64))])])):r(``,!0),T.value.length>0&&C.value===`compare`?(m(),_(`div`,B,[n(g,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),v(`div`,V,[T.value.length===2?(m(),o(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:p(()=>[...i[0]||=[f(` Compare `,-1)]]),_:1},8,[`to`])):(m(),_(`div`,H,` Select one more session to compare. `))])])):r(``,!0)])}}});export{U as default};
@@ -0,0 +1 @@
1
+ import{r as e}from"./DpW0qpWn.js";import{$ as t,A as n,C as r,M as i,Ot as a,S as o,Wt as s,Z as c,b as l,h as u,k as d,lt as f,ot as p,q as m,qt as h,w as g,x as _,xt as v,yt as y}from"./C--RKQDq.js";import{C as b,w as x}from"./B2NMBmj_.js";import{c as S,g as C,l as w,p as ee}from"./BE1TLHgg.js";import{a as T,n as te,r as E}from"#entry";import{t as D}from"./jJY8e3xp.js";import{r as O,t as k}from"./D-KdwVBL.js";import{r as A,t as j}from"./BYXvfkhc.js";import{n as M,r as N,t as P}from"./-w-An_zz.js";import{a as ne,c as F,n as re,t as ie}from"./COiP6LWy.js";import{t as I}from"./BQl8ArzK.js";import{t as L}from"./D2AP-caS.js";var R={flex:`~ row gap-1`,"of-hidden":``},z={key:0,flex:`~ row gap-1`,"ws-nowrap":``},B={key:1},V={p2:``,flex:`~ col gap-1`},H=Object.assign(i({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let i=e,a=l(()=>{let e=new Map;return i.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(i.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(i,s)=>{let l=k,d=t(`VMenu`);return m(),g(`div`,R,[a.value[0]?(m(),g(`div`,z,[n(l,{id:a.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),a.value[0].version&&e.showVersion?(m(),o(O,{key:0,text:a.value[0].version,as:`span`},null,8,[`text`])):r(``,!0)])):(m(),g(`span`,B,` - `)),a.value.length>1?(m(),o(d,{key:2,delay:{show:200,hide:0},"flex-none":``},{popper:f(()=>[_(`div`,V,[(m(!0),g(u,null,c(a.value,t=>(m(),g(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[n(l,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(m(),o(O,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):r(``,!0)]))),128))])]),default:f(()=>[n(O,{text:`+${a.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):r(``,!0)])}}}),{__name:`PackagesImporters`}),U={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},W={role:`row`,class:`border-b border-base`,flex:`~ row`},G=[`title`],K={key:0,"font-mono":``},q={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},J={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},Y={key:0,role:`cell`,"font-mono":``,"flex-none":``,w80:``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``,"overflow-hidden":``,truncate:``},X={"font-mono":``,"text-sm":``},Z={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},ae={p2:``,flex:`~ col gap-1`},oe={w24:``,"inline-flex":``},se={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},ce={key:1},Q=Object.assign(i({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(e){let t=b(),{state:i,next:l}=w([``,`desc`,`asc`],{initialValue:j.value.packageSizeSortType});function p(){l(),j.value.packageSizeSortType=i.value}return(l,v)=>{let y=I,b=A,x=k,S=H,C=D;return m(),g(`div`,U,[_(`div`,W,[_(`div`,{title:e.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:s([e.groupView?`min-w40`:`min-w80`])},[e.groupView?(m(),g(`div`,K,[n(y,{name:e.packages?.[0]?.name},null,8,[`name`])])):(m(),g(u,{key:1},[d(` Package `)],64))],10,G),e.groupView?r(``,!0):(m(),g(`div`,q,` Version `)),_(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:s([e.groupView?`px2`:`pl2`])},[_(`button`,J,[v[0]||=d(` Size `,-1),e.disableSizeSort?r(``,!0):(m(),g(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:p},[_(`i`,{"text-xs":``,class:s([a(i)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,a(i)?`op100 text-primary`:`op50`])},null,2)]))])],2),v[1]||=_(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),e.packages.length?(m(),o(P,{key:0,role:`rowgroup`,items:e.packages,"key-prop":`dir`},{default:f(({item:i,index:o})=>[n(C,{role:`row`,flex:`~ row`,class:s([`border-base border-b-1 border-dashed`,[o===e.packages.length-1?`border-b-0`:``]]),to:{path:a(t).path,query:{package:`${i.name}@${i.version}`}}},{default:f(()=>[n(a(T),{triggers:[`hover`],delay:1200,disabled:i.name.length<30},{popper:f(()=>[_(`span`,X,h(i.name),1)]),default:f(()=>[e.groupView?r(``,!0):(m(),g(`div`,Y,[n(y,{name:i.name},null,8,[`name`])]))]),_:2},1032,[`disabled`]),_(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:s({"text-primary":i.duplicated})},h(i.version),3),_(`div`,Z,[n(a(E),{delay:{show:200,hide:0}},{popper:f(()=>[_(`div`,ae,[(m(!0),g(u,null,c(i.files.filter(e=>!!e.transformedCodeSize),t=>(m(),g(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[_(`span`,oe,[n(b,{bytes:t.transformedCodeSize},null,8,[`bytes`])]),n(x,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:i.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:f(()=>[n(b,{bytes:i.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),_(`div`,se,[n(S,{package:i,session:e.session,"show-version":e.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(m(),g(`div`,ce,[...v[2]||=[_(`div`,{p4:``},[_(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[_(`p`,null,` No data `)])],-1)]]))])}}}),{__name:`PackagesTable`}),le={key:1,p4:``},ue=Object.assign(i({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,r=l(()=>t.packages.filter(e=>e.duplicated)),i=l(()=>r.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,a)=>{let o=Q;return r.value.length?(m(!0),g(u,{key:0},c(i.value,(t,r)=>(m(),g(`div`,{key:r},[n(o,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(m(),g(`div`,le,[...a[0]||=[_(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),{__name:`PackagesDuplicated`}),de={key:1,relative:``},$={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},fe={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},pe=[`onClick`],me={flex:`~ col gap-2`,pt4:``,px4:``,pb4:``,"overflow-x-auto":``},he={fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ge={op50:``},_e={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},ve={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},ye={flex:`~ gap-1 items-center`},be={flex:`~ gap-1 items-center`},xe=i({__name:`packages`,props:{session:{}},setup(t){let i=t,w=y(ee()),T=b(),E=x(),D=[{match:/.*/,name:`direct`,description:`Direct Dependencies`,icon:`i-octicon:package-dependencies-24 light:filter-invert-30!`},{match:/.*/,name:`transitive`,description:`Transitive Dependencies`,icon:`i-octicon:package-24 light:filter-invert-30!`}],O=e(),k=v({search:``,selected:[`direct`,`transitive`]}),{state:P,isLoading:I}=S(async()=>await O.value.call(`vite:rolldown:get-packages`,{session:i.session.id}),null),R=C(()=>P.value,()=>new N(P.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=l(()=>P.value?Object.values(P.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=l(()=>[{label:`Table`,value:`table`,icon:`i-ph-table-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Duplicate Packages${z.value>0?` (${z.value})`:``}`,value:`duplicate-packages`,icon:`i-ph-package-duotone`}]),V=l(()=>k.value.search?R.value.search(k.value.search).map(e=>e.item):[...P.value||[]]),H=l(()=>{let e=j.value.packageSizeSortType,t=V.value.toSorted((e,t)=>(e.name||``).localeCompare(t.name||``));return(e?t.sort((t,n)=>e===`asc`?t.transformedCodeSize-n.transformedCodeSize:n.transformedCodeSize-t.transformedCodeSize):t).filter(e=>!k.value.selected||k.value.selected.some(t=>t.match(e.type)))});function U(e){j.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=ie({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!T.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&E.replace({query:{...T.query,package:`${e.meta?.name}@${e.meta?.version}`}})},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){j.value.packageViewType===`treemap`&&(K.value=new ne(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return p(()=>j.value.packageViewType,()=>{Z()}),(e,i)=>{let l=te,p=M,v=Q,y=re,b=ue,x=A,S=F;return a(I)?(m(),o(l,{key:0})):(m(),g(`div`,de,[_(`div`,$,[n(p,{modelValue:k.value,"onUpdate:modelValue":i[0]||=e=>k.value=e,rules:D},{default:f(()=>[_(`div`,fe,[i[2]||=_(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(m(!0),g(u,null,c(B.value,e=>(m(),g(`button`,{key:e.value,"btn-action":``,class:s(a(j).packageViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[_(`div`,{class:s(e.icon)},null,2),d(` `+h(e.label),1)],10,pe))),128))])]),_:1},8,[`modelValue`])]),_(`div`,me,[a(j).packageViewType===`table`?(m(),g(u,{key:0},[n(v,{packages:H.value,session:t.session},null,8,[`packages`,`session`]),_(`div`,he,[_(`span`,ge,h(V.value.length)+` of `+h(a(P)?.length||0),1)])],64)):a(j).packageViewType===`treemap`?(m(),g(u,{key:1},[a(K)&&H.value.length?(m(),o(L,{key:0,graph:a(K),selected:a(J),onSelect:i[1]||=e=>a(X)(e)},{default:f(({selected:e,options:t,onSelect:r})=>[n(y,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:r},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(m(),g(`span`,_e,` No Data `))],64)):a(j).packageViewType===`duplicate-packages`?(m(),o(b,{key:2,packages:H.value,session:t.session},null,8,[`packages`,`session`])):r(``,!0)]),n(S,{"hover-x":w.x,"hover-y":w.y},{default:f(()=>[a(q)?.meta?(m(),g(`div`,ve,[_(`div`,ye,h(a(q).text),1),_(`div`,be,[n(x,{bytes:a(q).size,percent:!1},null,8,[`bytes`])])])):r(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{xe as default};
@@ -0,0 +1 @@
1
+ import{C as e,M as t,Q as n,Wt as r,b as i,k as a,q as o,qt as s,w as c}from"./C--RKQDq.js";var l=t({__name:`DisplayNumberBadge`,props:{number:{},color:{default:`badge-color-gray op75`},icon:{},prefix:{},suffix:{},format:{default:`locale`}},setup(t){let l=t,u=i(()=>l.format===`percent`?Number(l.number).toLocaleString(void 0,{style:`percent`,minimumFractionDigits:2,maximumFractionDigits:2}):Number(l.number).toLocaleString());return(i,l)=>(o(),c(`div`,{class:r([t.color,`px-0.4em py-0.2em font-mono line-height-none flex items-center`])},[t.icon?(o(),c(`div`,{key:0,class:r([t.icon,`mr-1`])},null,2)):e(``,!0),a(` `+s(t.prefix||``)+s(u.value)+s(t.suffix||``)+` `,1),n(i.$slots,`after`)],2))}});export{l as t};