@vitejs/devtools-rolldown 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/index.mjs +3 -711
  2. package/dist/nitro.json +1 -1
  3. package/dist/public/200.html +1 -1
  4. package/dist/public/404.html +1 -1
  5. package/dist/public/_nuxt/{Tr_XYnUk.js → 5SREwa_J.js} +1 -1
  6. package/dist/public/_nuxt/B5QvmzNX.js +4 -0
  7. package/dist/public/_nuxt/{CumoT9Yv.js → BA4aNJdc.js} +1 -1
  8. package/dist/public/_nuxt/{D4jlwaNB.js → BPvXWYcE.js} +1 -1
  9. package/dist/public/_nuxt/BRHdn2TP2.js +1 -0
  10. package/dist/public/_nuxt/{DbWf6qhI.js → BodOO8Ge.js} +1 -1
  11. package/dist/public/_nuxt/{DleERjsP.js → Bt8oNIjq.js} +1 -1
  12. package/dist/public/_nuxt/{C02RviGn.js → BtFAY2HJ.js} +5 -5
  13. package/dist/public/_nuxt/C9-K8SRH.js +1 -0
  14. package/dist/public/_nuxt/CJzuZNT1.js +2 -0
  15. package/dist/public/_nuxt/CL3oUTGS2.js +1 -0
  16. package/dist/public/_nuxt/CVZqt4yY2.js +1 -0
  17. package/dist/public/_nuxt/CfHRbb-n.js +1 -0
  18. package/dist/public/_nuxt/CjvJJTNy.js +1 -0
  19. package/dist/public/_nuxt/{T-TsUncA.js → CorBKXDd.js} +1 -1
  20. package/dist/public/_nuxt/{DSoAPWwt.js → CqNyqKYk.js} +1 -1
  21. package/dist/public/_nuxt/CzCoBrqM.js +1 -0
  22. package/dist/public/_nuxt/{DTdHAjiB.js → D0nH_IG_.js} +1 -1
  23. package/dist/public/_nuxt/{CJcWOi7f2.js → DEctdyhd.js} +1 -1
  24. package/dist/public/_nuxt/{CamH1KH0.js → DM5zgFwu.js} +1 -1
  25. package/dist/public/_nuxt/D_58kiGa.js +1 -0
  26. package/dist/public/_nuxt/{D4E2wny2.js → DlEGTOj9.js} +1 -1
  27. package/dist/public/_nuxt/DmctoHT82.js +1 -0
  28. package/dist/public/_nuxt/{us8qIYFu2.js → DyCHFg1-2.js} +1 -1
  29. package/dist/public/_nuxt/{CAxq65JE.js → EWiwEEMI.js} +1 -1
  30. package/dist/public/_nuxt/bh0jgFfK.js +1 -0
  31. package/dist/public/_nuxt/builds/latest.json +1 -1
  32. package/dist/public/_nuxt/builds/meta/325e31f5-a39f-4526-a997-a203cd2d5c81.json +1 -0
  33. package/dist/public/_nuxt/{entry.CbbdWxzq.css → entry.bUxZ6pRq.css} +1 -1
  34. package/dist/public/_nuxt/error-404.CcKyMNIP.css +1 -0
  35. package/dist/public/_nuxt/error-500.Bsd8omR1.css +1 -0
  36. package/dist/public/_nuxt/{CFObDroh.js → hY2iPUYh.js} +1 -1
  37. package/dist/public/_nuxt/{BeQJpPc92.js → jSaCY0lI2.js} +1 -1
  38. package/dist/public/_nuxt/mLM3LnKH.js +1 -0
  39. package/dist/public/index.html +1 -1
  40. package/package.json +5 -8
  41. package/dist/public/_nuxt/3BR2rGwa2.js +0 -1
  42. package/dist/public/_nuxt/7rrIsy642.js +0 -1
  43. package/dist/public/_nuxt/B5xLZRxY.js +0 -1
  44. package/dist/public/_nuxt/B6OHrQeC2.js +0 -1
  45. package/dist/public/_nuxt/BThj2MnF2.js +0 -1
  46. package/dist/public/_nuxt/BnfqOA1X.js +0 -1
  47. package/dist/public/_nuxt/C40OUFSo.js +0 -1
  48. package/dist/public/_nuxt/C4yBgUNR2.js +0 -1
  49. package/dist/public/_nuxt/C7Lq8IPO2.js +0 -1
  50. package/dist/public/_nuxt/CG8firEW.js +0 -1
  51. package/dist/public/_nuxt/D4DSKOxi.js +0 -1
  52. package/dist/public/_nuxt/DOojupaZ.js +0 -1
  53. package/dist/public/_nuxt/Da-Cy6_f.js +0 -1
  54. package/dist/public/_nuxt/Ddjd19f0.js +0 -1
  55. package/dist/public/_nuxt/Doipuu3T.js +0 -4
  56. package/dist/public/_nuxt/FqP4tEhK.js +0 -2
  57. package/dist/public/_nuxt/X2CLGAe8.js +0 -1
  58. package/dist/public/_nuxt/builds/meta/c208083b-bacd-45d3-b548-439e861d4853.json +0 -1
  59. package/dist/public/_nuxt/error-404.BeKtb6Ri.css +0 -1
  60. package/dist/public/_nuxt/error-500.DRkk-cad.css +0 -1
  61. /package/dist/public/_nuxt/{D4aX0j39.js → 5tvbNeKa.js} +0 -0
  62. /package/dist/public/_nuxt/{XAUaDDss.js → BUwCbG2W.js} +0 -0
  63. /package/dist/public/_nuxt/{DIkh4Ihm.js → BYcqRSer.js} +0 -0
  64. /package/dist/public/_nuxt/{dT0PHReP.js → C1f8uPlQ.js} +0 -0
  65. /package/dist/public/_nuxt/{CvIcovUx.js → CJmfH1zY.js} +0 -0
  66. /package/dist/public/_nuxt/{CKJSqDo0.js → CqfNwh25.js} +0 -0
  67. /package/dist/public/_nuxt/{IXT41VJR2.js → CsPVvMxF.js} +0 -0
  68. /package/dist/public/_nuxt/{I4lEnjGE.js → DWUsdlci.js} +0 -0
  69. /package/dist/public/_nuxt/{BjZ7VsBs.js → Dab8rtPt.js} +0 -0
  70. /package/dist/public/_nuxt/{Cvg1SSG2.js → DoJ6DaKu.js} +0 -0
  71. /package/dist/public/_nuxt/{Cqm3ivh3.js → lNa1kApa.js} +0 -0
  72. /package/dist/public/_nuxt/{CB2VayxA2.js → qIAw3Eg02.js} +0 -0
@@ -0,0 +1 @@
1
+ import{r as e}from"./B5QvmzNX.js";import{A as t,C as n,Dt as r,Gt as i,Kt as a,M as o,S as s,Ut as c,Z as l,at as u,b as d,et as f,h as p,k as m,lt as h,ot as g,q as _,st as v,ut as y,w as b,x,xt as S,yt as C}from"./CRfXUi3G.js";import{C as w,w as T}from"./CpTuuES2.js";import{c as E,g as D,p as ee}from"./CJmfH1zY.js";import{n as O}from"#entry";import{t as k}from"./DWUsdlci.js";import{r as A}from"./CqfNwh25.js";import{n as j}from"./hY2iPUYh.js";import{r as M,t as N}from"./BPvXWYcE.js";import{n as te,r as P,t as F}from"./BA4aNJdc.js";import{a as I,c as L,i as R,n as z,o as B,r as ne,t as re}from"./CqNyqKYk.js";import{t as V}from"./DEctdyhd.js";import{t as H}from"./CsPVvMxF.js";var U={flex:`~ gap-1`},W={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},G={op50:``},K=Object.assign(o({__name:`ListItem`,props:{asset:{}},setup(e){return(n,r)=>{let i=j,o=k;return _(),s(o,{to:{query:{asset:e.asset.filename}},"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`},{default:h(()=>[x(`div`,U,[t(i,{filename:e.asset.filename},null,8,[`filename`]),x(`span`,W,[m(a(e.asset.filename)+` `,1),x(`span`,G,` (`+a(e.asset.chunk?.name?.replace(/[\[\]]/g,``))+`) `,1)])])]),_:1},8,[`to`])}}}),{__name:`AssetsListItem`}),q={p4:``},J={flex:``,pb2:``},Y=Object.assign(o({__name:`List`,props:{assets:{}},setup(e){return(n,r)=>{let i=K;return _(),b(`div`,q,[t(F,{items:e.assets,"key-prop":`filename`},{default:h(({item:e})=>[x(`div`,J,[t(i,{asset:e},null,8,[`asset`])])]),_:1},8,[`items`])])}}}),{__name:`AssetsList`}),X={flex:`~ gap-2`,p4:``},Z={op50:``},ie=Object.assign(o({__name:`Folder`,props:{assets:{},session:{}},setup(e){let t=e,r=d(()=>{let e=[];return t.assets.forEach(t=>{e.push({full:t.filename,path:t.filename})}),A(e,`Project`)}),i=d(()=>new Map(t.assets.map(e=>[e.filename,e])));return(t,o)=>{let c=V;return _(),b(`div`,X,[e.assets?.length?(_(),s(c,{key:0,"flex-1":``,node:r.value,icon:`i-catppuccin:folder-dist catppuccin`,"icon-open":`i-catppuccin:folder-dist-open catppuccin`,link:!0,"link-query-key":`asset`},{extra:h(({node:e})=>[x(`span`,Z,` (`+a(i.value.get(e.full)?.chunk?.name?.replace(/[\[\]]/g,``))+`) `,1)]),_:1},8,[`node`])):n(``,!0)])}}}),{__name:`AssetsFolder`}),Q={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},ae={flex:`~ col gap-4`},oe={key:0,grid:`~ cols-[250px_1fr] gap-1`},se=[`onClick`],ce={key:0,"text-primary":``},le={key:1},ue=[`onClick`],de=[`title`],fe=Object.assign(o({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:o}){let s=e,c=o,d=u(`el`);return v(()=>d.value?.append(s.graph.el)),(o,s)=>{let u=z,h=M,g=f(`tooltip`);return _(),b(`div`,Q,[x(`div`,{ref_key:`el`,ref:d,"w-500px":``},null,512),x(`div`,ae,[t(u,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:s[0]||=e=>c(`select`,e)},null,8,[`selected`,`options`]),e.selected?(_(),b(`div`,oe,[(_(!0),b(p,null,l(e.selected.children,o=>(_(),b(p,{key:o.id},[x(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>c(`select`,o)},[o.meta&&o.meta===e.selected?.meta?(_(),b(`span`,ce,`(self)`)):(_(),b(`span`,le,a(o.id),1))],8,se),x(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>c(`select`,o)},[x(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:i({background:r(B)(e.graph.options.getColor?.(o)||`#000`),width:`${o.size/e.selected.size*100}%`})},null,4),t(h,{"text-xs":``,bytes:o.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),o.children.length>0?y((_(),b(`div`,{key:0,title:`${o.children.length} dependencies`,"text-xs":``,"op-fade":``},[m(` (`+a(o.children.length)+`) `,1)],8,de)),[[g,`${o.children.length} dependencies`]]):n(``,!0)],8,ue)],64))),128))])):n(``,!0)])])}}}),{__name:`AssetsSunburst`}),pe=Object.assign(o({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=u(`el`);return v(()=>n.value?.append(t.graph.el)),(e,t)=>(_(),b(`div`,{ref_key:`el`,ref:n},null,512))}}),{__name:`AssetsFlamegraph`}),$={key:1,relative:``},me={sticky:``,"left-4":``,"right-4":``,"top-4":``,"z-panel-nav":``,"p-4":``},he={flex:`~ wrap gap-2 items-center`,p2:``,border:`t base`},ge=[`onClick`],_e={fixed:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ve={op50:``},ye={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},be={flex:`~ gap-1 items-center`},xe={flex:`~ gap-1 items-center`},Se=o({__name:`assets`,props:{session:{}},setup(i){let o=i,u=C(ee()),f=S({search:``}),v=T(),y=w(),k=[{label:`List`,value:`list`,icon:`i-ph-list-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],A=e(),{state:j,isLoading:F}=E(async()=>await A.value.call(`vite:rolldown:get-assets-list`,{session:o.session.id}),null),B=D(()=>j.value,()=>new P(j.value,{includeScore:!0,keys:[`filename`],ignoreLocation:!0,threshold:.4})),V=d(()=>f.value.search?B.value.search(f.value.search).map(e=>e.item):j.value);function U(e){N.value.assetViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:X,selectNode:Z,buildGraph:Q}=re({data:V,nameKey:`filename`,sizeKey:`size`,rootText:`Project`,nodeType:`file`,graphOptions:{onClick(e){e&&(q.value=e),e.meta?.type===`file`&&(X.value=e.meta,v.replace({query:{asset:e.meta.filename}}))},onHover(e){e&&!y.query.asset&&(q.value=e),e===null&&(q.value=void 0)},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,X.value=e?.meta}},onUpdate(){switch(N.value.assetViewType){case`sunburst`:K.value=new R(W.value.root,G.value);break;case`treemap`:K.value=new I(W.value.root,{...G.value,selectedPaddingRatio:0});break;default:K.value=new ne(W.value.root,G.value)}}});return g(()=>N.value.assetViewType,()=>{Q()}),(e,o)=>{let d=O,g=te,v=Y,y=ie,S=z,C=fe,w=pe,T=M,E=L;return r(F)?(_(),s(d,{key:0})):(_(),b(`div`,$,[x(`div`,me,[t(g,{modelValue:f.value,"onUpdate:modelValue":o[0]||=e=>f.value=e,rules:[]},{default:h(()=>[x(`div`,he,[o[3]||=x(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(_(),b(p,null,l(k,e=>x(`button`,{key:e.value,"btn-action":``,class:c(r(N).assetViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[x(`div`,{class:c(e.icon)},null,2),m(` `+a(e.label),1)],10,ge)),64))])]),_:1},8,[`modelValue`])]),r(N).assetViewType===`list`?(_(),b(p,{key:0},[V.value?.length?(_(),s(v,{key:0,assets:V.value,session:i.session},null,8,[`assets`,`session`])):n(``,!0),x(`div`,_e,[x(`span`,ve,a(V.value.length)+` of `+a(r(j)?.length||0),1)])],64)):r(N).assetViewType===`folder`?(_(),b(p,{key:1},[V.value?.length?(_(),s(y,{key:0,assets:V.value,session:i.session},null,8,[`assets`,`session`])):n(``,!0)],64)):r(N).assetViewType===`treemap`?(_(),b(p,{key:2},[r(K)?(_(),s(H,{key:0,graph:r(K),selected:r(J),onSelect:o[1]||=e=>r(Z)(e)},{default:h(({selected:e,options:n,onSelect:r})=>[t(S,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:n,onSelect:r},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):n(``,!0)],64)):r(N).assetViewType===`sunburst`?(_(),b(p,{key:3},[r(K)?(_(),s(C,{key:0,graph:r(K),selected:r(J),onSelect:o[2]||=e=>r(Z)(e)},null,8,[`graph`,`selected`])):n(``,!0)],64)):r(N).assetViewType===`flamegraph`?(_(),b(p,{key:4},[r(K)?(_(),s(w,{key:0,graph:r(K)},null,8,[`graph`])):n(``,!0)],64)):n(``,!0),t(E,{"hover-x":u.x,"hover-y":u.y},{default:h(()=>[r(q)?.meta?(_(),b(`div`,ye,[x(`div`,be,a(r(q).text),1),x(`div`,xe,[t(T,{bytes:r(q).size,percent:!1},null,8,[`bytes`])])])):n(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Se as default};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D_58kiGa.js","./B5QvmzNX.js","./CRfXUi3G.js","./CJmfH1zY.js","./CpTuuES2.js","./DWUsdlci.js","./lNa1kApa.js","./CqfNwh25.js","./BtFAY2HJ.js","./BUwCbG2W.js","./CqNyqKYk.js","./5tvbNeKa.js","./BPvXWYcE.js","./DlEGTOj9.js","./BA4aNJdc.js","./DataVirtualList.Co38wNF1.css","./CjvJJTNy.js","./hY2iPUYh.js","./5SREwa_J.js","./bh0jgFfK.js","./BYcqRSer.js","./EWiwEEMI.js","./DoJ6DaKu.js","./DM5zgFwu.js","./D0nH_IG_.js","./C1f8uPlQ.js","./BodOO8Ge.js","./Dab8rtPt.js","./_session_.Dk6Grde1.css","./C9-K8SRH.js","./CsPVvMxF.js","./DEctdyhd.js","./CL3oUTGS2.js","./mLM3LnKH.js","./CVZqt4yY2.js","./qIAw3Eg02.js","./DmctoHT82.js","./DyCHFg1-2.js","./BRHdn2TP2.js","./Bt8oNIjq.js","./jSaCY0lI2.js","./CorBKXDd.js","./CfHRbb-n.js","./error-404.CcKyMNIP.css","./CzCoBrqM.js","./error-500.Bsd8omR1.css"])))=>i.map(i=>d[i]);
2
+ import{i as e,n as t,t as n}from"./B5QvmzNX.js";import{$ as r,A as i,B as a,C as o,Ct as s,Dt as c,Et as l,F as u,Gt as d,H as f,I as p,J as m,Kt as h,L as g,M as _,N as ee,P as v,Q as y,S as b,St as te,U as ne,Ut as re,V as ie,W as ae,Wt as oe,X as se,Y as ce,_ as le,a as ue,d as x,dt as de,f as fe,g as pe,gt as me,h as he,ht as ge,i as S,j as _e,l as ve,lt as C,n as ye,ot as be,q as w,r as T,s as xe,st as Se,t as Ce,tt as we,u as Te,w as E,x as D,xt as O,yt as Ee,z as De}from"./CRfXUi3G.js";import{A as Oe,B as ke,C as Ae,D as je,E as Me,I as Ne,N as Pe,O as Fe,P as Ie,R as Le,T as Re,V as ze,W as Be,_ as k,c as Ve,f as He,g as Ue,h as A,j as We,k as Ge,l as Ke,m as qe,o as j,p as Je,r as Ye,s as Xe,t as Ze,u as Qe,v as $e,w as M,y as et}from"./CpTuuES2.js";import{a as tt,d as nt,i as rt,n as it,o as at,r as ot,s as st,t as ct}from"./5tvbNeKa.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var lt=class extends Error{constructor(e,t){super(e,t),this.name=`FetchError`,t?.cause&&!this.cause&&(this.cause=t.cause)}};function ut(e){let t=e.error?.message||e.error?.toString()||``,n=e.request?.method||e.options?.method||`GET`,r=e.request?.url||String(e.request)||`/`,i=new lt(`${`[${n}] ${JSON.stringify(r)}`}: ${e.response?`${e.response.status} ${e.response.statusText}`:`<no response>`}${t?` ${t}`:``}`,e.error?{cause:e.error}:void 0);for(let t of[`request`,`options`,`response`])Object.defineProperty(i,t,{get(){return e[t]}});for(let[t,n]of[[`data`,`_data`],[`status`,`status`],[`statusCode`,`status`],[`statusText`,`statusText`],[`statusMessage`,`statusText`]])Object.defineProperty(i,t,{get(){return e.response&&e.response[n]}});return i}var dt=new Set(Object.freeze([`PATCH`,`POST`,`PUT`,`DELETE`]));function ft(e=`GET`){return dt.has(e.toUpperCase())}function pt(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer||e instanceof FormData||e instanceof URLSearchParams?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}var mt=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]),ht=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function gt(e=``){if(!e)return`json`;let t=e.split(`;`).shift()||``;return ht.test(t)?`json`:t===`text/event-stream`?`stream`:mt.has(t)||t.startsWith(`text/`)?`text`:`blob`}function _t(e,t,n,r){let i=vt(t?.headers??e?.headers,n?.headers,r),a;return(n?.query||n?.params||t?.params||t?.query)&&(a={...n?.params,...n?.query,...t?.params,...t?.query}),{...n,...t,query:a,params:a,headers:i}}function vt(e,t,n){if(!t)return new n(e);let r=new n(t);if(e)for(let[t,i]of Symbol.iterator in e||Array.isArray(e)?e:new n(e))r.set(t,i);return r}async function yt(e,t){if(t)if(Array.isArray(t))for(let n of t)await n(e);else await t(e)}var bt=new Set([408,409,425,429,500,502,503,504]),xt=new Set([101,204,205,304]);function St(e={}){let{fetch:t=globalThis.fetch,Headers:n=globalThis.Headers,AbortController:r=globalThis.AbortController}=e;async function i(e){let t=e.error&&e.error.name===`AbortError`&&!e.options.timeout||!1;if(e.options.retry!==!1&&!t){let t;t=typeof e.options.retry==`number`?e.options.retry:+!ft(e.options.method);let n=e.response&&e.response.status||500;if(t>0&&(Array.isArray(e.options.retryStatusCodes)?e.options.retryStatusCodes.includes(n):bt.has(n))){let n=typeof e.options.retryDelay==`function`?e.options.retryDelay(e):e.options.retryDelay||0;return n>0&&await new Promise(e=>setTimeout(e,n)),a(e.request,{...e.options,retry:t-1})}}let n=ut(e);throw Error.captureStackTrace&&Error.captureStackTrace(n,a),n}let a=async function(a,o={}){let s={request:a,options:_t(a,o,e.defaults,n),response:void 0,error:void 0};if(s.options.method&&(s.options.method=s.options.method.toUpperCase()),s.options.onRequest&&(await yt(s,s.options.onRequest),s.options.headers instanceof n||(s.options.headers=new n(s.options.headers||{}))),typeof s.request==`string`&&(s.options.baseURL&&(s.request=Pe(s.request,s.options.baseURL)),s.options.query&&(s.request=Ie(s.request,s.options.query),delete s.options.query),`query`in s.options&&delete s.options.query,`params`in s.options&&delete s.options.params),s.options.body&&ft(s.options.method))if(pt(s.options.body)){let e=s.options.headers.get(`content-type`);typeof s.options.body!=`string`&&(s.options.body=e===`application/x-www-form-urlencoded`?new URLSearchParams(s.options.body).toString():JSON.stringify(s.options.body)),e||s.options.headers.set(`content-type`,`application/json`),s.options.headers.has(`accept`)||s.options.headers.set(`accept`,`application/json`)}else (`pipeTo`in s.options.body&&typeof s.options.body.pipeTo==`function`||typeof s.options.body.pipe==`function`)&&(`duplex`in s.options||(s.options.duplex=`half`));let c;if(!s.options.signal&&s.options.timeout){let e=new r;c=setTimeout(()=>{let t=Error(`[TimeoutError]: The operation was aborted due to timeout`);t.name=`TimeoutError`,t.code=23,e.abort(t)},s.options.timeout),s.options.signal=e.signal}try{s.response=await t(s.request,s.options)}catch(e){return s.error=e,s.options.onRequestError&&await yt(s,s.options.onRequestError),await i(s)}finally{c&&clearTimeout(c)}if((s.response.body||s.response._bodyInit)&&!xt.has(s.response.status)&&s.options.method!==`HEAD`){let e=(s.options.parseResponse?`json`:s.options.responseType)||gt(s.response.headers.get(`content-type`)||``);switch(e){case`json`:{let e=await s.response.text(),t=s.options.parseResponse||Le;s.response._data=t(e);break}case`stream`:s.response._data=s.response.body||s.response._bodyInit;break;default:s.response._data=await s.response[e]()}}return s.options.onResponse&&await yt(s,s.options.onResponse),!s.options.ignoreResponseError&&s.response.status>=400&&s.response.status<600?(s.options.onResponseError&&await yt(s,s.options.onResponseError),await i(s)):s.response},o=async function(e,t){return(await a(e,t))._data};return o.raw=a,o.native=(...e)=>t(...e),o.create=(t={},n={})=>St({...e,...n,defaults:{...e.defaults,...n.defaults,...t}}),o}var Ct=(function(){if(typeof globalThis<`u`)return globalThis;if(typeof self<`u`)return self;if(typeof window<`u`)return window;if(typeof globalThis<`u`)return globalThis;throw Error(`unable to locate global object`)})(),wt=Ct.fetch?(...e)=>Ct.fetch(...e):()=>Promise.reject(Error(`[ofetch] global.fetch is not supported!`)),Tt=Ct.Headers,Et=Ct.AbortController,Dt=St({fetch:wt,Headers:Tt,AbortController:Et}),Ot=()=>window?.__NUXT__?.config||window?.useNuxtApp?.().payload?.config,kt=()=>Ot().app,At=()=>kt().baseURL,jt=()=>kt().buildAssetsDir,Mt=(...e)=>Oe(Nt(),jt(),...e),Nt=(...e)=>{let t=kt(),n=t.cdnURL||t.baseURL;return e.length?Oe(n,...e):n};globalThis.__buildAssetsURL=Mt,globalThis.__publicAssetsURL=Nt,globalThis.$fetch||(globalThis.$fetch=Dt.create({baseURL:At()})),`global`in globalThis||(globalThis.global=globalThis);function Pt(e){let t=It(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let e=0;e<n.byteLength;e++)r.setUint8(e,t.charCodeAt(e));return n}var Ft=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`;function It(e){e.length%4==0&&(e=e.replace(/==?$/,``));let t=``,n=0,r=0;for(let i=0;i<e.length;i++)n<<=6,n|=Ft.indexOf(e[i]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}function Lt(e,t){return Rt(JSON.parse(e),t)}function Rt(e,t){if(typeof e==`number`)return a(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let n=e,r=Array(n.length),i=null;function a(e,o=!1){if(e===-1)return;if(e===-3)return NaN;if(e===-4)return 1/0;if(e===-5)return-1/0;if(e===-6)return-0;if(o||typeof e!=`number`)throw Error(`Invalid input`);if(e in r)return r[e];let s=n[e];if(!s||typeof s!=`object`)r[e]=s;else if(Array.isArray(s))if(typeof s[0]==`string`){let o=s[0],c=t&&Object.hasOwn(t,o)?t[o]:void 0;if(c){let t=s[1];if(typeof t!=`number`&&(t=n.push(s[1])-1),i??=new Set,i.has(t))throw Error(`Invalid circular reference`);return i.add(t),r[e]=c(a(t)),i.delete(t),r[e]}switch(o){case`Date`:r[e]=new Date(s[1]);break;case`Set`:let t=new Set;r[e]=t;for(let e=1;e<s.length;e+=1)t.add(a(s[e]));break;case`Map`:let i=new Map;r[e]=i;for(let e=1;e<s.length;e+=2)i.set(a(s[e]),a(s[e+1]));break;case`RegExp`:r[e]=new RegExp(s[1],s[2]);break;case`Object`:let c=Object(s[1]);if(Object.hasOwn(c,`__proto__`))throw Error("Cannot parse an object with a `__proto__` property");r[e]=c;break;case`BigInt`:r[e]=BigInt(s[1]);break;case`null`:let l=Object.create(null);r[e]=l;for(let e=1;e<s.length;e+=2){if(s[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");l[s[e]]=a(s[e+1])}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:{if(n[s[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=globalThis[o],i=new t(a(s[1]));r[e]=s[2]===void 0?i:i.subarray(s[2],s[3]);break}case`ArrayBuffer`:{let t=s[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);r[e]=Pt(t);break}case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:{let t=o.slice(9);r[e]=Temporal[t].from(s[1]);break}case`URL`:r[e]=new URL(s[1]);break;case`URLSearchParams`:r[e]=new URLSearchParams(s[1]);break;default:throw Error(`Unknown type ${o}`)}}else if(s[0]===-7){let t=s[1];if(!Number.isInteger(t)||t<0)throw Error(`Invalid input`);let n=Array(t);r[e]=n;for(let e=2;e<s.length;e+=2){let r=s[e];if(!Number.isInteger(r)||r<0||r>=t)throw Error(`Invalid input`);n[r]=a(s[e+1])}}else{let t=Array(s.length);r[e]=t;for(let e=0;e<s.length;e+=1){let n=s[e];n!==-2&&(t[e]=a(n))}}else{let t={};r[e]=t;for(let e of Object.keys(s)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");let n=s[e];t[e]=a(n)}}return r[e]}return a(0)}var zt=new Set([`link`,`style`,`script`,`noscript`]),Bt=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),Vt=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),Ht=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),Ut=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),Wt=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),Gt=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),Kt=new Set([`theme-color`,`google-site-verification`,`og`,`article`,`book`,`profile`,`twitter`,`author`]),qt=[`name`,`property`,`http-equiv`],Jt=new Set([`viewport`,`description`,`keywords`,`robots`]);function Yt(e){let t=e.split(`:`);return t.length?Kt.has(t[1]):!1}function Xt(e){let{props:t,tag:n}=e;if(Ut.has(n))return n;if(n===`link`&&t.rel===`canonical`)return`canonical`;if(n===`link`&&t.rel===`alternate`){let e=t.hreflang||t.type;if(e)return`alternate:${e}`}if(t.charset)return`charset`;if(e.tag===`meta`){for(let r of qt)if(t[r]!==void 0){let i=t[r],a=i&&typeof i==`string`&&i.includes(`:`),o=i&&Jt.has(i);return`${n}:${i}${!(a||o)&&e.key?`:key:${e.key}`:``}`}}if(e.key)return`${n}:key:${e.key}`;if(t.id)return`${n}:id:${t.id}`;if(n===`link`&&t.rel===`alternate`)return`alternate:${t.href||``}`;if(Bt.has(n)){let t=e.textContent||e.innerHTML;if(t)return`${n}:content:${t}`}}function Zt(e){return e._h||e._d||e.textContent||e.innerHTML||`${e.tag}:${Object.entries(e.props).map(([e,t])=>`${e}:${String(t)}`).join(`,`)}`}function Qt(e,t,n){typeof e==`function`&&(!n||n!==`titleTemplate`&&!(n[0]===`o`&&n[1]===`n`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r))return r.map(e=>Qt(e,t));if(r?.constructor===Object){let e={};for(let n of Object.keys(r))e[n]=Qt(r[n],t,n);return e}return r}function $t(e,t){let n=e===`style`?new Map:new Set;function r(t){if(t==null||t===void 0)return;let r=String(t).trim();if(r)if(e===`style`){let[e,...t]=r.split(`:`).map(e=>e?e.trim():``);e&&t.length&&n.set(e,t.join(`:`))}else r.split(` `).filter(Boolean).forEach(e=>n.add(e))}return typeof t==`string`?e===`style`?t.split(`;`).forEach(r):r(t):Array.isArray(t)?t.forEach(e=>r(e)):t&&typeof t==`object`&&Object.entries(t).forEach(([t,i])=>{i&&i!==`false`&&(e===`style`?n.set(String(t).trim(),String(i)):r(t))}),n}function en(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=Vt.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;return Object.entries(t).forEach(([r,i])=>{if(r===`__proto__`||r===`constructor`||r===`prototype`)return;if(i===null){e.props[r]=null;return}if(r===`class`||r===`style`){e.props[r]=$t(r,i);return}if(Wt.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof i==`object`){let n=t.type;if(t.type||(n=`application/json`),!n?.endsWith(`json`)&&n!==`speculationrules`)return;t.type=n,e.props.type=n,e[r]=JSON.stringify(i)}else e[r]=i;return}let a=r.startsWith(`data-`),o=n&&!a?r.toLowerCase():r,s=String(i),c=e.tag===`meta`&&o===`content`;s===`true`||s===``?e.props[o]=a||c?s:!0:!i&&a&&s===`false`?e.props[o]=`false`:i!==void 0&&(e.props[o]=i)}),e}function tn(e,t){let n=en({tag:e,props:{}},typeof t==`object`&&typeof t!=`function`?t:{[e===`script`||e===`noscript`||e===`style`?`innerHTML`:`textContent`]:t});return n.key&&zt.has(n.tag)&&(n.props[`data-hid`]=n._h=n.key),n.tag===`script`&&typeof n.innerHTML==`object`&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||`application/json`),Array.isArray(n.props.content)?n.props.content.map(e=>({...n,props:{...n.props,content:e}})):n}function nn(e,t){if(!e)return[];typeof e==`function`&&(e=e());let n=(e,n)=>{for(let r=0;r<t.length;r++)n=t[r](e,n);return n};e=n(void 0,e);let r=[];return e=Qt(e,n),Object.entries(e||{}).forEach(([e,t])=>{if(t!==void 0)for(let n of Array.isArray(t)?t:[t])r.push(tn(e,n))}),r.flat()}var rn=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,an={base:-10,title:10},on={critical:-8,high:-1,low:2},sn={meta:{"content-security-policy":-30,charset:-20,viewport:-15},link:{preconnect:20,stylesheet:60,preload:70,modulepreload:70,prefetch:90,"dns-prefetch":90,prerender:90},script:{async:30,defer:80,sync:50},style:{imported:40,sync:60}},cn=/@import/,N=e=>e===``||e===!0;function ln(e,t){if(typeof t.tagPriority==`number`)return t.tagPriority;let n=100,r=on[t.tagPriority]||0,i=e.resolvedOptions.disableCapoSorting?{link:{},script:{},style:{}}:sn;if(t.tag in an)n=an[t.tag];else if(t.tag===`meta`){let e=t.props[`http-equiv`]===`content-security-policy`?`content-security-policy`:t.props.charset?`charset`:t.props.name===`viewport`?`viewport`:null;e&&(n=sn.meta[e])}else if(t.tag===`link`&&t.props.rel)n=i.link[t.props.rel];else if(t.tag===`script`){let e=String(t.props.type);N(t.props.async)?n=i.script.async:t.props.src&&!N(t.props.defer)&&!N(t.props.async)&&e!==`module`&&!e.endsWith(`json`)||t.innerHTML&&!e.endsWith(`json`)?n=i.script.sync:(N(t.props.defer)&&t.props.src&&!N(t.props.async)||e===`module`)&&(n=i.script.defer)}else t.tag===`style`&&(n=t.innerHTML&&cn.test(t.innerHTML)?i.style.imported:i.style.sync);return(n||100)+r}function un(e,t){let n=typeof t==`function`?t(e):t,r=n.key||String(e.plugins.size+1);e.plugins.get(r)||(e.plugins.set(r,n),e.hooks.addHooks(n.hooks||{}))}function dn(e={}){let t=fe();t.addHooks(e.hooks||{});let n=!e.document,r=new Map,i=new Map,a=new Set,o={_entryCount:1,plugins:i,dirty:!1,resolvedOptions:e,hooks:t,ssr:n,entries:r,headEntries(){return[...r.values()]},use:e=>un(o,e),push(e,i){let s={...i||{}};delete s.head;let c=s._index??o._entryCount++,l={_i:c,input:e,options:s},u={_poll(e=!1){o.dirty=!0,!e&&a.add(c),t.callHook(`entries:updated`,o)},dispose(){r.delete(c)&&o.invalidate()},patch(e){(!s.mode||s.mode===`server`&&n||s.mode===`client`&&!n)&&(l.input=e,r.set(c,l),u._poll())}};return u.patch(e),u},async resolveTags(){let n={tagMap:new Map,tags:[],entries:[...o.entries.values()]};for(await t.callHook(`entries:resolve`,n);a.size;){let n=a.values().next().value;a.delete(n);let i=r.get(n);if(i){let n={tags:nn(i.input,e.propResolvers||[]).map(e=>Object.assign(e,i.options)),entry:i};await t.callHook(`entries:normalize`,n),i._tags=n.tags.map((e,t)=>(e._w=ln(o,e),e._p=(i._i<<10)+t,e._d=Xt(e),e._d||(e._h=Zt(e)),e))}}let i=!1;n.entries.flatMap(e=>(e._tags||[]).map(e=>({...e,props:{...e.props}}))).sort(rn).reduce((e,t)=>{let n=t._d||t._h;if(!e.has(n))return e.set(n,t);let r=e.get(n);if((t?.tagDuplicateStrategy||(Gt.has(t.tag)?`merge`:null)||(t.key&&t.key===r.key?`merge`:null))===`merge`){let i={...r.props};Object.entries(t.props).forEach(([e,t])=>i[e]=e===`style`?new Map([...r.props.style||new Map,...t]):e===`class`?new Set([...r.props.class||new Set,...t]):t),e.set(n,{...t,props:i})}else t._p>>10==r._p>>10&&t.tag===`meta`&&Yt(n)?(e.set(n,Object.assign([...Array.isArray(r)?r:[r],t],t)),i=!0):(t._w===r._w?t._p>r._p:t?._w<r?._w)&&e.set(n,t);return e},n.tagMap);let s=n.tagMap.get(`title`),c=n.tagMap.get(`titleTemplate`);if(o._title=s?.textContent,c){let e=c?.textContent;if(o._titleTemplate=e,e){let t=typeof e==`function`?e(s?.textContent):e;typeof t==`string`&&!o.plugins.has(`template-params`)&&(t=t.replace(`%s`,s?.textContent||``)),s?t===null?n.tagMap.delete(`title`):n.tagMap.set(`title`,{...s,textContent:t}):(c.tag=`title`,c.textContent=t)}}n.tags=Array.from(n.tagMap.values()),i&&(n.tags=n.tags.flat().sort(rn)),await t.callHook(`tags:beforeResolve`,n),await t.callHook(`tags:resolve`,n),await t.callHook(`tags:afterResolve`,n);let l=[];for(let e of n.tags){let{innerHTML:t,tag:n,props:r}=e;Ht.has(n)&&(Object.keys(r).length===0&&!e.innerHTML&&!e.textContent||n===`meta`&&!r.content&&!r[`http-equiv`]&&!r.charset||(n===`script`&&t&&(String(r.type).endsWith(`json`)?e.innerHTML=(typeof t==`string`?t:JSON.stringify(t)).replace(/</g,`\\u003C`):typeof t==`string`&&(e.innerHTML=t.replace(RegExp(`</${n}`,`g`),`<\\/${n}`)),e._d=Xt(e)),l.push(e)))}return l},invalidate(){for(let e of r.values())a.add(e._i);o.dirty=!0,t.callHook(`entries:updated`,o)}};return(e?.plugins||[]).forEach(e=>un(o,e)),o.hooks.callHook(`init`,o),e.init?.forEach(e=>e&&o.push(e)),o}var fn=(e,t)=>me(t)?l(t):t,pn=`usehead`;function mn(e){return{install(t){t.config.globalProperties.$unhead=e,t.config.globalProperties.$head=e,t.provide(pn,e)}}.install}function hn(){if(p()){let e=g(pn);if(e)return e}throw Error(`useHead() was called without provide context, ensure you call it through the setup() function.`)}function gn(e,t={}){let n=t.head||hn();return n.ssr?n.push(e||{},t):_n(n,e,t)}function _n(e,t,n={}){let r=O(!1),i;return Se(()=>{let a=r.value?{}:Qt(t,fn);i?i.patch(a):i=e.push(a,n)}),ee()&&(f(()=>{i.dispose()}),ne(()=>{r.value=!0}),ie(()=>{r.value=!1})),i}function vn(e){let t=e||S();return t.ssrContext?.head||t.runWithContext(()=>{if(p()){let e=g(`usehead`);if(!e)throw Error(`[nuxt] [unhead] Missing Unhead instance.`);return e}})}function yn(e,t={}){return gn(e,{head:t.head||vn(t.nuxt),...t})}var bn=(()=>{let e={prerender:!0},t={prerender:!1};return(n,r)=>{let i=[];r.charCodeAt(r.length-1)===47&&(r=r.slice(0,-1)||`/`),(r===`/`||r===`/200.html`||r===`/404.html`)&&i.unshift({data:e});let a=r.split(`/`);return a.length,i.unshift({data:t,params:{_:a.slice(1).join(`/`)}}),i}})(),xn=e=>je({},...bn(``,e).map(e=>e.data).reverse()),Sn=`modulepreload`,Cn=function(e,t){return new URL(e,t).href},wn={},P=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Cn(t,n),t in wn)return;wn[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Sn,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Tn=xn,En;function Dn(){return En=$fetch(Mt(`builds/meta/${ue().app.buildId}.json`),{responseType:`json`}),En.catch(e=>{console.error(`[nuxt] Error fetching app manifest.`,e)}),En}function On(){return En||Dn()}function kn(e){let t=typeof e==`string`?e:e.path;try{return Tn(t)}catch(e){return console.error(`[nuxt] Error matching route rules.`,e),{}}}async function An(e){return null}var F=null;async function jn(){if(F)return F;let e=document.getElementById(`__NUXT_DATA__`);if(!e)return{};let t=await Mn(e.textContent||``),n=e.dataset.src?await An(e.dataset.src):void 0;return F={...t,...n,...window.__NUXT__},F.config?.public&&(F.config.public=Ee(F.config.public)),F}async function Mn(e){return await Lt(e,S()._payloadRevivers)}function Nn(e,t){S()._payloadRevivers[e]=t}function Pn(e){try{return JSON.parse(e)}catch{return e}}var Fn=[[`NuxtError`,e=>A(e)],[`EmptyShallowRef`,e=>s(e===`_`?void 0:e===`0n`?BigInt(0):Pn(e))],[`EmptyRef`,e=>O(e===`_`?void 0:e===`0n`?BigInt(0):Pn(e))],[`ShallowRef`,e=>s(e)],[`ShallowReactive`,e=>te(e)],[`Ref`,e=>O(e)],[`Reactive`,e=>Ee(e)]],In=T({name:`nuxt:revive-payload:client`,order:-30,async setup(e){let t,n;for(let[e,t]of Fn)Nn(e,t);Object.assign(e.payload,([t,n]=x(()=>e.runWithContext(jn)),t=await t,n(),t)),delete window.__NUXT__}},1);async function Ln(e,t={}){let n=t.document||e.resolvedOptions.document;if(!n||!e.dirty)return;let r={shouldRender:!0,tags:[]};if(await e.hooks.callHook(`dom:beforeRender`,r),r.shouldRender)return e._domUpdatePromise||=new Promise(async t=>{let r=new Map,i=new Promise(t=>{e.resolveTags().then(e=>{t(e.map(e=>{let t=r.get(e._d)||0,n={tag:e,id:(t?`${e._d}:${t}`:e._d)||e._h,shouldRender:!0};return e._d&&Yt(e._d)&&r.set(e._d,t+1),n}))})}),a=e._dom;if(!a){a={title:n.title,elMap:new Map().set(`htmlAttrs`,n.documentElement).set(`bodyAttrs`,n.body)};for(let e of[`body`,`head`]){let t=n[e]?.children;for(let e of t){let t=e.tagName.toLowerCase();if(!Vt.has(t))continue;let n=en({tag:t,props:{}},{innerHTML:e.innerHTML,...e.getAttributeNames().reduce((t,n)=>(t[n]=e.getAttribute(n),t),{})||{}});if(n.key=e.getAttribute(`data-hid`)||void 0,n._d=Xt(n)||Zt(n),a.elMap.has(n._d)){let t=1,r=n._d;for(;a.elMap.has(r);)r=`${n._d}:${t++}`;a.elMap.set(r,e)}else a.elMap.set(n._d,e)}}}a.pendingSideEffects={...a.sideEffects},a.sideEffects={};function o(e,t,n){let r=`${e}:${t}`;a.sideEffects[r]=n,delete a.pendingSideEffects[r]}function s({id:e,$el:t,tag:r}){let i=r.tag.endsWith(`Attrs`);a.elMap.set(e,t),i||(r.textContent&&r.textContent!==t.textContent&&(t.textContent=r.textContent),r.innerHTML&&r.innerHTML!==t.innerHTML&&(t.innerHTML=r.innerHTML),o(e,`el`,()=>{t?.remove(),a.elMap.delete(e)}));for(let a in r.props){if(!Object.prototype.hasOwnProperty.call(r.props,a))continue;let s=r.props[a];if(a.startsWith(`on`)&&typeof s==`function`){let e=t?.dataset;if(e&&e[`${a}fired`]){let e=a.slice(0,-5);s.call(t,new Event(e.substring(2)))}t.getAttribute(`data-${a}`)!==``&&((r.tag===`bodyAttrs`?n.defaultView:t).addEventListener(a.substring(2),s.bind(t)),t.setAttribute(`data-${a}`,``));continue}let c=`attr:${a}`;if(a===`class`){if(!s)continue;for(let n of s)i&&o(e,`${c}:${n}`,()=>t.classList.remove(n)),!t.classList.contains(n)&&t.classList.add(n)}else if(a===`style`){if(!s)continue;for(let[n,r]of s)o(e,`${c}:${n}`,()=>{t.style.removeProperty(n)}),t.style.setProperty(n,r)}else s!==!1&&s!==null&&(t.getAttribute(a)!==s&&t.setAttribute(a,s===!0?``:String(s)),i&&o(e,c,()=>t.removeAttribute(a)))}}let c=[],l={bodyClose:void 0,bodyOpen:void 0,head:void 0},u=await i;for(let e of u){let{tag:t,shouldRender:r,id:i}=e;if(r){if(t.tag===`title`){n.title=t.textContent,o(`title`,``,()=>n.title=a.title);continue}e.$el=e.$el||a.elMap.get(i),e.$el?s(e):Vt.has(t.tag)&&c.push(e)}}for(let e of c){let t=e.tag.tagPosition||`head`;e.$el=n.createElement(e.tag.tag),s(e),l[t]=l[t]||n.createDocumentFragment(),l[t].appendChild(e.$el)}for(let t of u)await e.hooks.callHook(`dom:renderTag`,t,n,o);l.head&&n.head.appendChild(l.head),l.bodyOpen&&n.body.insertBefore(l.bodyOpen,n.body.firstChild),l.bodyClose&&n.body.appendChild(l.bodyClose);for(let e in a.pendingSideEffects)a.pendingSideEffects[e]();e._dom=a,await e.hooks.callHook(`dom:rendered`,{renders:u}),t()}).finally(()=>{e._domUpdatePromise=void 0,e.dirty=!1}),e._domUpdatePromise}function Rn(e={}){let t=e.domOptions?.render||Ln;e.document=e.document||(typeof window<`u`?document:void 0);let n=e.document?.head.querySelector(`script[id="unhead:payload"]`)?.innerHTML||!1;return dn({...e,plugins:[...e.plugins||[],{key:`client`,hooks:{"entries:updated":t}}],init:[n?JSON.parse(n):!1,...e.init||[]]})}function zn(e,t){let n=0;return()=>{let r=++n;t(()=>{n===r&&e()})}}function Bn(e={}){let t=Rn({domOptions:{render:zn(()=>Ln(t),e=>setTimeout(e,0))},...e});return t.install=mn(t),t}var Vn={disableDefaults:!0},Hn=T({name:`nuxt:head`,enforce:`pre`,setup(e){let t=Bn(Vn);e.vueApp.use(t);{let n=!0,r=async()=>{n=!1,await Ln(t)};t.hooks.hook(`dom:beforeRender`,e=>{e.shouldRender=!n}),e.hooks.hook(`page:start`,()=>{n=!0}),e.hooks.hook(`page:finish`,()=>{e.isHydrating||r()}),e.hooks.hook(`app:error`,r),e.hooks.hook(`app:suspense:resolve`,r)}}}),Un=/(:\w+)\([^)]+\)/g,Wn=/(:\w+)[?+*]/g,Gn=/:\w+/g,Kn=(e,t)=>t.path.replace(Un,`$1`).replace(Wn,`$1`).replace(Gn,t=>e.params[t.slice(1)]?.toString()||``),qn=(e,t)=>{let n=e.route.matched.find(t=>t.components?.default===e.Component.type),r=t??n?.meta.key??(n&&Kn(e.route,n));return typeof r==`function`?r(e.route):r},Jn=(e,t)=>({default:()=>e?u(pe,e===!0?{}:e,t):t});function Yn(e){return Array.isArray(e)?e:[e]}var Xn=[{name:`compare-sessions`,path:`/compare/:sessions()`,component:()=>P(()=>import(`./D_58kiGa.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)},{name:void 0,path:`/session/:session()`,component:()=>P(()=>import(`./BtFAY2HJ.js`),__vite__mapDeps([8,9,1,2,3,10,11,12,7,4,13,14,15,5,16,17,18,19,20,21,22,23,24,25,26,27,28]),import.meta.url),children:[{name:`session-session-assets`,path:`assets`,component:()=>P(()=>import(`./C9-K8SRH.js`),__vite__mapDeps([29,1,2,3,10,11,12,7,4,14,15,5,30,17,18,31]),import.meta.url)},{name:`session-session-chunks`,path:`chunks`,component:()=>P(()=>import(`./CL3oUTGS2.js`),__vite__mapDeps([32,1,2,3,10,11,12,7,4,13,9,14,15,5,16,17,18,19,20,30,33]),import.meta.url)},{name:`session-session-graph`,path:`graph`,component:()=>P(()=>import(`./CVZqt4yY2.js`),__vite__mapDeps([34,35,2,4,3,13,9,14,15,16,5,17,18,33,12,7,23,31,24,25,26,22]),import.meta.url)},{name:`session-session-packages`,path:`packages`,component:()=>P(()=>import(`./DmctoHT82.js`),__vite__mapDeps([36,1,2,3,10,11,12,7,4,14,15,5,16,17,18,30,21,22]),import.meta.url)},{name:`session-session-plugins`,path:`plugins`,component:()=>P(()=>import(`./DyCHFg1-2.js`),__vite__mapDeps([37,35,2,4,3,14,15,5,23,18]),import.meta.url)},{name:`session-session-raw`,path:`raw`,component:()=>P(()=>import(`./BRHdn2TP2.js`),__vite__mapDeps([38,1,2,3,4,16,5,17,18,23,39]),import.meta.url)},{name:`session-session`,path:``,component:()=>P(()=>import(`./jSaCY0lI2.js`),__vite__mapDeps([40,2,5,4,16,17,18,3,25,20,27]),import.meta.url)}]},{name:`index`,path:`/`,component:()=>P(()=>import(`./CorBKXDd.js`),__vite__mapDeps([41,1,2,3,5,4,16,17,18,6,26,22,39]),import.meta.url)}],Zn=[et(async(e,t)=>{let n,r;if(!e.meta?.validate)return;let i=([n,r]=x(()=>Promise.resolve(e.meta.validate(e))),n=await n,r(),n);if(i===!0)return;let a=A({fatal:!0,status:i&&(i.status||i.statusCode)||404,statusText:i&&(i.statusText||i.statusMessage)||`Page Not Found: ${e.fullPath}`,data:{path:e.fullPath}});return typeof window<`u`&&window.history.pushState({},``,t.fullPath),a},1),et(e=>{let t=kn({path:e.path});if(t.redirect){let n=t.redirect.includes(`#`)?t.redirect:t.redirect+e.hash;return Fe(n,{acceptRelative:!0})?(window.location.href=n,!1):n}})],Qn={};function $n(e,t,n){let{pathname:r,search:i,hash:a}=t,o=e.indexOf(`#`);if(o>-1){let t=a.includes(e.slice(o))?e.slice(o).length:1,n=a.slice(t);return n[0]!==`/`&&(n=`/`+n),Ne(n,``)}let s=Ne(r,e),c=!n||Ge(s,n)?s:n;return c+(c.includes(`?`)?``:i)+a}var er=T({name:`nuxt:router`,enforce:`pre`,async setup(e){let t,n,r=ue().app.baseURL,i=j.history?.(r)??He(r),a=j.routes?([t,n]=x(()=>j.routes(Xn)),t=await t,n(),t)??Xn:Xn,o,c=Qe({...j,scrollBehavior:(e,t,n)=>{if(t===Je){o=n;return}if(j.scrollBehavior){if(c.options.scrollBehavior=j.scrollBehavior,`scrollRestoration`in window.history){let e=c.beforeEach(()=>{e(),window.history.scrollRestoration=`manual`})}return j.scrollBehavior(e,Je,o||n)}},history:i,routes:a});`scrollRestoration`in window.history&&(window.history.scrollRestoration=`auto`),e.vueApp.use(c);let l=s(c.currentRoute.value);c.afterEach((e,t)=>{l.value=t}),Object.defineProperty(e.vueApp.config.globalProperties,`previousRoute`,{get:()=>l.value});let u=$n(r,window.location,e.payload.path),d=s(c.currentRoute.value),f=()=>{d.value=c.currentRoute.value};c.afterEach((e,t)=>{e.matched.at(-1)?.components?.default===t.matched.at(-1)?.components?.default&&f()});let p={sync:f};for(let e in d.value)Object.defineProperty(p,e,{get:()=>d.value[e],enumerable:!0});e._route=te(p),e._middleware||={global:[],named:{}};let m=$e();c.afterEach(async(t,n,r)=>{delete e._processingMiddleware,!e.isHydrating&&m.value&&await e.runWithContext(qe),r&&await e.callHook(`page:loading:end`)});try{[t,n]=x(()=>c.isReady()),await t,n()}catch(r){[t,n]=x(()=>e.runWithContext(()=>k(r))),await t,n()}let h=u===c.currentRoute.value.fullPath?c.currentRoute.value:c.resolve(u),g=e.isHydrating&&e.payload.prerenderedAt&&e.payload.path&&u!==e.payload.path&&Ge(c.currentRoute.value.path,e.payload.path);f();let _=e.payload.state._layout;return c.beforeEach(async(t,n)=>{await e.callHook(`page:loading:start`),t.meta=Ee(t.meta),e.isHydrating&&_&&!ge(t.meta.layout)&&(t.meta.layout=_),e._processingMiddleware=!0;{let r=new Set([...Zn,...e._middleware.global]);for(let e of t.matched){let t=e.meta.middleware;if(t)for(let e of Yn(t))r.add(e)}let i=kn({path:t.path});if(i.appMiddleware)for(let e in i.appMiddleware)i.appMiddleware[e]?r.add(e):r.delete(e);for(let i of r){let r=typeof i==`string`?e._middleware.named[i]||await Qn[i]?.().then(e=>e.default||e):i;if(!r)throw Error(`Unknown route middleware: '${i}'.`);try{let i=await e.runWithContext(()=>r(t,n));if(!e.payload.serverRendered&&e.isHydrating&&(i===!1||i instanceof Error)){let t=i||A({status:404,statusText:`Page Not Found: ${u}`});return await e.runWithContext(()=>k(t)),!1}if(i===!0)continue;if(i===!1)return i;if(i)return Ue(i)&&i.fatal&&await e.runWithContext(()=>k(i)),i}catch(t){let n=A(t);return n.fatal&&await e.runWithContext(()=>k(n)),n}}}}),c.onError(async()=>{delete e._processingMiddleware,await e.callHook(`page:loading:end`)}),c.afterEach(t=>{if(t.matched.length===0&&!m.value)return e.runWithContext(()=>k(A({status:404,fatal:!1,statusText:`Page not found: ${t.fullPath}`,data:{path:t.fullPath}})))}),e.hooks.hookOnce(`app:created`,async()=>{try{if(`name`in h&&(h.name=void 0),g){let t=c.resolve(e.payload.path);`name`in t&&(t.name=void 0),await c.replace({...t,force:!0}),e.hooks.hookOnce(`app:suspense:resolve`,async()=>{await c.replace({...h,force:!0})})}else await c.replace({...h,force:!0});c.options.scrollBehavior=j.scrollBehavior}catch(t){await e.runWithContext(()=>k(t))}}),{provide:{router:c}}}},1),tr=T(()=>{let e=M();Ye(()=>{e.beforeResolve(async()=>{await new Promise(e=>{setTimeout(e,100),requestAnimationFrame(()=>{setTimeout(e,0)})})})})}),nr=T(e=>{let t;async function n(){let r;try{r=await On()}catch(e){let t=e;if(!(`status`in t&&(t.status===404||t.status===403)))throw t}t&&clearTimeout(t),t=setTimeout(n,ve);try{let n=await $fetch(Mt(`builds/latest.json`)+`?${Date.now()}`);n.id!==r?.id&&(e.hooks.callHook(`app:manifest:update`,n),t&&clearTimeout(t))}catch{}}Ye(()=>{t=setTimeout(n,ve)})});function rr(e={}){let t=e.path||window.location.pathname,n={};try{n=JSON.parse(sessionStorage.getItem(`nuxt:reload`)||`{}`)}catch{}if(e.force||n?.path!==t||n?.expires<Date.now()){try{sessionStorage.setItem(`nuxt:reload`,JSON.stringify({path:t,expires:Date.now()+(e.ttl??1e4)}))}catch{}if(e.persistState)try{sessionStorage.setItem(`nuxt:reload:state`,JSON.stringify({state:S().payload.state}))}catch{}window.location.pathname===t?window.location.reload():window.location.href=t}}var ir=T({name:`nuxt:chunk-reload`,setup(e){let t=M(),n=ue(),r=new Set;t.beforeEach(()=>{r.clear()}),e.hook(`app:chunkError`,({error:e})=>{r.add(e)});function i(e){rr({path:We(n.app.baseURL,e.fullPath),persistState:!0})}e.hook(`app:manifest:update`,()=>{t.beforeResolve(i)}),t.onError((e,t)=>{r.has(e)&&i(t)})}}),ar=T({name:`nuxt:global-components`}),or={},sr=T({name:`nuxt:prefetch`,setup(e){let t=M();e.hooks.hook(`app:mounted`,()=>{t.beforeEach(async e=>{let t=e?.meta?.layout;t&&typeof or[t]==`function`&&await or[t]()})}),e.hooks.hook(`link:prefetch`,e=>{if(Fe(e))return;let n=t.resolve(e);if(!n)return;let r=n.meta.layout,i=Yn(n.meta.middleware);i=i.filter(e=>typeof e==`string`);for(let e of i)typeof Qn[e]==`function`&&Qn[e]();typeof r==`string`&&r in or&&Ze(or[r])})}}),cr=T(()=>{});function I(e){return e.ownerDocument?.defaultView||window}function L(e){return I(e).getComputedStyle(e)}var lr=Math.min,R=Math.max,ur=Math.round;function dr(e){let t=L(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=ur(n)!==i||ur(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function z(e){return mr(e)?(e.nodeName||``).toLowerCase():``}var fr;function pr(){if(fr)return fr;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(fr=e.brands.map((e=>e.brand+`/`+e.version)).join(` `),fr):navigator.userAgent}function B(e){return e instanceof I(e).HTMLElement}function V(e){return e instanceof I(e).Element}function mr(e){return e instanceof I(e).Node}function hr(e){return typeof ShadowRoot>`u`?!1:e instanceof I(e).ShadowRoot||e instanceof ShadowRoot}function gr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=L(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function _r(e){return[`table`,`td`,`th`].includes(z(e))}function vr(e){let t=/firefox/i.test(pr()),n=L(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some((e=>n.willChange.includes(e)))||[`paint`,`layout`,`strict`,`content`].some((e=>{let t=n.contain;return t!=null&&t.includes(e)}))}function yr(){return!/^((?!chrome|android).)*safari/i.test(pr())}function br(e){return[`html`,`body`,`#document`].includes(z(e))}function xr(e){return V(e)?e:e.contextElement}var Sr={x:1,y:1};function H(e){let t=xr(e);if(!B(t))return Sr;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=dr(t),o=(a?ur(n.width):n.width)/r,s=(a?ur(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function U(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=xr(e),o=Sr;t&&(r?V(r)&&(o=H(r)):o=H(e));let s=a?I(a):window,c=!yr()&&n,l=(i.left+(c&&s.visualViewport?.offsetLeft||0))/o.x,u=(i.top+(c&&s.visualViewport?.offsetTop||0))/o.y,d=i.width/o.x,f=i.height/o.y;if(a){let e=I(a),t=r&&V(r)?I(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=H(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,l*=e.x,u*=e.y,d*=e.x,f*=e.y,l+=t.x,u+=t.y,n=I(n).frameElement}}return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l,x:l,y:u}}function W(e){return((mr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cr(e){return V(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function wr(e){return U(W(e)).left+Cr(e).scrollLeft}function G(e){if(z(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||hr(e)&&e.host||W(e);return hr(t)?t.host:t}function Tr(e){let t=G(e);return br(t)?t.ownerDocument.body:B(t)&&gr(t)?t:Tr(t)}function Er(e,t){t===void 0&&(t=[]);let n=Tr(e),r=n===e.ownerDocument?.body,i=I(n);return r?t.concat(i,i.visualViewport||[],gr(n)?n:[]):t.concat(n,Er(n))}function Dr(e,t,n){return t===`viewport`?nt(function(e,t){let n=I(e),r=W(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=yr();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):V(t)?nt(function(e,t){let n=U(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=B(e)?H(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):nt(function(e){let t=W(e),n=Cr(e),r=e.ownerDocument.body,i=R(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=R(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wr(e),s=-n.scrollTop;return L(r).direction===`rtl`&&(o+=R(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(W(e)))}function Or(e){return B(e)&&L(e).position!==`fixed`?e.offsetParent:null}function kr(e){let t=I(e),n=Or(e);for(;n&&_r(n)&&L(n).position===`static`;)n=Or(n);return n&&(z(n)===`html`||z(n)===`body`&&L(n).position===`static`&&!vr(n))?t:n||function(e){let t=G(e);for(;B(t)&&!br(t);){if(vr(t))return t;t=G(t)}return null}(e)||t}function Ar(e,t,n){let r=B(t),i=W(t),a=U(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`)if((z(t)!==`body`||gr(i))&&(o=Cr(t)),B(t)){let e=U(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=wr(i));return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}var jr={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Er(e).filter((e=>V(e)&&z(e)!==`body`)),i=null,a=L(e).position===`fixed`,o=a?G(e):e;for(;V(o)&&!br(o);){let e=L(o),t=vr(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter((e=>e!==o)),o=G(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=a[0],s=a.reduce(((e,n)=>{let r=Dr(t,n,i);return e.top=R(r.top,e.top),e.right=lr(r.right,e.right),e.bottom=lr(r.bottom,e.bottom),e.left=R(r.left,e.left),e}),Dr(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=B(n),a=W(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((z(n)!==`body`||gr(a))&&(o=Cr(n)),B(n))){let e=U(n);s=H(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:V,getDimensions:function(e){return B(e)?dr(e):e.getBoundingClientRect()},getOffsetParent:kr,getDocumentElement:W,getScale:H,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||kr,a=this.getDimensions;return{reference:Ar(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>L(e).direction===`rtl`},Mr=(e,t,n)=>{let r=new Map,i={platform:jr,...n},a={...i.platform,_c:r};return ot(e,t,{...i,platform:a})};function Nr(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]==`object`&&e[n]?Nr(e[n],t[n]):e[n]=t[n])}var K={disabled:!1,distance:5,skidding:0,container:`body`,boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:`absolute`,preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:`top`,triggers:[`hover`,`focus`,`touch`],hideTriggers:e=>[...e,`click`],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:`...`},dropdown:{placement:`bottom`,triggers:[`click`],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:`dropdown`,triggers:[`hover`,`focus`],popperTriggers:[`hover`],delay:{show:0,hide:400}}}};function q(e,t){let n=K.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=K.themes[n.$extend]||{}:(n=null,r=K[t]):n=null;while(n);return r}function Pr(e){let t=[e],n=K.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=K.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Fr(e){let t=[e],n=K.themes[e]||{};do n.$extend?(t.push(n.$extend),n=K.themes[n.$extend]||{}):n=null;while(n);return t}var J=!1;if(typeof window<`u`){J=!1;try{let e=Object.defineProperty({},`passive`,{get(){J=!0}});window.addEventListener(`test`,null,e)}catch{}}var Ir=!1;typeof window<`u`&&typeof navigator<`u`&&(Ir=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var Lr=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Rr={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},zr={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function Br(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Vr(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Y=[],X=null,Hr={};function Ur(e){let t=Hr[e];return t||=Hr[e]=[],t}var Wr=function(){};typeof window<`u`&&(Wr=window.Element);function Z(e){return function(t){return q(t.theme,e)}}var Gr=`__floating-vue__popper`,Kr=()=>_({name:`VPopper`,provide(){return{[Gr]:{parentPopper:this}}},inject:{[Gr]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Z(`disabled`)},positioningDisabled:{type:Boolean,default:Z(`positioningDisabled`)},placement:{type:String,default:Z(`placement`),validator:e=>Lr.includes(e)},delay:{type:[String,Number,Object],default:Z(`delay`)},distance:{type:[Number,String],default:Z(`distance`)},skidding:{type:[Number,String],default:Z(`skidding`)},triggers:{type:Array,default:Z(`triggers`)},showTriggers:{type:[Array,Function],default:Z(`showTriggers`)},hideTriggers:{type:[Array,Function],default:Z(`hideTriggers`)},popperTriggers:{type:Array,default:Z(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:Z(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:Z(`popperHideTriggers`)},container:{type:[String,Object,Wr,Boolean],default:Z(`container`)},boundary:{type:[String,Wr],default:Z(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:Z(`strategy`)},autoHide:{type:[Boolean,Function],default:Z(`autoHide`)},handleResize:{type:Boolean,default:Z(`handleResize`)},instantMove:{type:Boolean,default:Z(`instantMove`)},eagerMount:{type:Boolean,default:Z(`eagerMount`)},popperClass:{type:[String,Array,Object],default:Z(`popperClass`)},computeTransformOrigin:{type:Boolean,default:Z(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:Z(`autoMinSize`)},autoSize:{type:[Boolean,String],default:Z(`autoSize`)},autoMaxSize:{type:Boolean,default:Z(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:Z(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:Z(`preventOverflow`)},overflowPadding:{type:[Number,String],default:Z(`overflowPadding`)},arrowPadding:{type:[Number,String],default:Z(`arrowPadding`)},arrowOverflow:{type:Boolean,default:Z(`arrowOverflow`)},flip:{type:Boolean,default:Z(`flip`)},shift:{type:Boolean,default:Z(`shift`)},shiftCrossAxis:{type:Boolean,default:Z(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:Z(`noAutoFocus`)},disposeTimeout:{type:Number,default:Z(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:``,strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join(`_`)}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId==null?this.randomId:this.ariaId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide==`function`?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){return this[Gr]?.parentPopper},hasPopperShowTriggerHover(){return this.popperTriggers?.includes(`hover`)||this.popperShowTriggers?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:`$_refreshListeners`,deep:!0},positioningDisabled:`$_refreshListeners`,...[`placement`,`distance`,`skidding`,`boundary`,`strategy`,`overflowPadding`,`arrowPadding`,`preventOverflow`,`shift`,`shiftCrossAxis`,`flip`].reduce((e,t)=>(e[t]=`$_computePosition`,e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var r;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(this.parentPopper?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e=null,skipDelay:t=!1}={}){if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}this.parentPopper?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=this.referenceNode?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(tt({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(it({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(at({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(rt({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(ct({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(st({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await Mr(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),X&&this.instantMove&&X.instantMove&&X!==this.parentPopper){X.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(X=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Vr(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Er(this.$_referenceNode),...Er(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n<Y.length;n++)t=Y[n],t.showGroup!==e&&(t.hide(),t.$emit(`close-group`))}Y.push(this),document.body.classList.add(`v-popper--some-open`);for(let e of Fr(this.theme))Ur(e).push(this),document.body.classList.add(`v-popper--some-open--${e}`);this.$emit(`apply-show`),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Vr(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Br(Y,this),Y.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Fr(this.theme)){let t=Ur(e);Br(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}X===this&&(X=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners(`scroll`),this.$emit(`apply-hide`),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Vr(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e==`string`?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,Rr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Rr,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,zr,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],zr,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,J?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit(`close-directive`):this.$emit(`auto-hide`),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e=this.$_referenceNode.getBoundingClientRect();if(ei>=e.left&&ei<=e.right&&ti>=e.top&&ti<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=ei-Q,n=ti-$,r=e.left+e.width/2-Q+(e.top+e.height/2)-$+e.width+e.height,i=Q+t*r,a=$+n*r;return ni(Q,$,i,a,e.left,e.top,e.left,e.bottom)||ni(Q,$,i,a,e.left,e.top,e.right,e.top)||ni(Q,$,i,a,e.right,e.top,e.right,e.bottom)||ni(Q,$,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Ir){let e=J?{passive:!0,capture:!0}:!0;document.addEventListener(`touchstart`,e=>qr(e,!0),e),document.addEventListener(`touchend`,e=>Jr(e,!0),e)}else window.addEventListener(`mousedown`,e=>qr(e,!1),!0),window.addEventListener(`click`,e=>Jr(e,!1),!0);window.addEventListener(`resize`,Qr)}function qr(e,t){if(K.autoHideOnMousedown)Yr(e,t);else for(let t=0;t<Y.length;t++){let n=Y[t];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Jr(e,t){K.autoHideOnMousedown||Yr(e,t)}function Yr(e,t){let n={};for(let r=Y.length-1;r>=0;r--){let i=Y[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&Xr(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&Xr(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function Xr(e,t,n){return n.closeAllPopover||n.closePopover&&t||Zr(e,n)&&!t}function Zr(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function Qr(){for(let e=0;e<Y.length;e++)Y[e].$_computePosition()}function $r(){for(let e=0;e<Y.length;e++)Y[e].hide()}var Q=0,$=0,ei=0,ti=0;typeof window<`u`&&window.addEventListener(`mousemove`,e=>{Q=ei,$=ti,ei=e.clientX,ti=e.clientY},J?{passive:!0}:void 0);function ni(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}var ri={extends:Kr()},ii=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function ai(e,t,n,r,i,a){return w(),E(`div`,{ref:`reference`,class:re([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[y(e.$slots,`default`,oe(v(e.slotData)))],2)}var oi=ii(ri,[[`render`,ai]]);function si(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var ci;function li(){li.init||(li.init=!0,ci=si()!==-1)}var ui={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){li(),a(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,ci&&this.$el.appendChild(e),e.data=`about:blank`,ci||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ci&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},di=de(`data-v-b329ee4c`);se(`data-v-b329ee4c`);var fi={class:`resize-observer`,tabindex:`-1`};m(),ui.render=di((e,t,n,r,i,a)=>(w(),b(`div`,fi))),ui.__scopeId=`data-v-b329ee4c`,ui.__file=`src/components/ResizeObserver.vue`;var pi=(e=`theme`)=>({computed:{themeClass(){return Pr(this[e])}}}),mi=_({name:`VPopperContent`,components:{ResizeObserver:ui},mixins:[pi()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:[`hide`,`resize`],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),hi=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],gi={ref:`inner`,class:`v-popper__inner`},_i=[D(`div`,{class:`v-popper__arrow-outer`},null,-1),D(`div`,{class:`v-popper__arrow-inner`},null,-1)];function vi(e,t,n,i,a,s){let c=r(`ResizeObserver`);return w(),E(`div`,{id:e.popperId,ref:`popover`,class:re([`v-popper__popper`,[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:d(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?`false`:`true`,tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||=Be(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[D(`div`,{class:`v-popper__backdrop`,onClick:t[0]||=t=>e.autoHide&&e.$emit(`hide`)}),D(`div`,{class:`v-popper__wrapper`,style:d(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[D(`div`,gi,[e.mounted?(w(),E(he,{key:0},[D(`div`,null,[y(e.$slots,`default`)]),e.handleResize?(w(),b(c,{key:0,onNotify:t[1]||=t=>e.$emit(`resize`,t)})):o(``,!0)],64)):o(``,!0)],512),D(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:d(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},_i,4)],4)],46,hi)}var yi=ii(mi,[[`render`,vi]]),bi={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},xi=function(){};typeof window<`u`&&(xi=window.Element);var Si=_({name:`VPopperWrapper`,components:{Popper:oi,PopperContent:yi},mixins:[bi,pi(`finalTheme`)],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,xi,Boolean],default:void 0},boundary:{type:[String,xi],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Ci(e,t,n,a,o,s){let c=r(`PopperContent`),l=r(`Popper`);return w(),b(l,De({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:C(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:a,autoHide:o,show:s,hide:l,handleResize:u,onResize:d,classes:f,result:p})=>[y(e.$slots,`default`,{shown:n,show:s,hide:l}),i(c,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":a,"auto-hide":o,"handle-resize":u,classes:f,result:p,onHide:l,onResize:d},{default:C(()=>[y(e.$slots,`popper`,{shown:n,hide:l})]),_:2},1032,[`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:3},16,[`theme`,`target-nodes`,`popper-node`,`class`])}var wi=ii(Si,[[`render`,Ci]]),Ti={...wi,name:`VDropdown`,vPopperTheme:`dropdown`},Ei={...wi,name:`VMenu`,vPopperTheme:`menu`},Di={...wi,name:`VTooltip`,vPopperTheme:`tooltip`},Oi=_({name:`VTooltipDirective`,components:{Popper:Kr(),PopperContent:yi},mixins:[bi],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>q(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>q(e.theme,`loadingContent`)},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content==`function`},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content==`function`&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),ki=[`innerHTML`],Ai=[`textContent`];function ji(e,t,n,a,o,s){let c=r(`PopperContent`),l=r(`Popper`);return w(),b(l,De({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:C(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:a,autoHide:o,hide:s,handleResize:l,onResize:u,classes:d,result:f})=>[i(c,{ref:`popperContent`,class:re({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":a,"auto-hide":o,"handle-resize":l,classes:d,result:f,onHide:s,onResize:u},{default:C(()=>[e.html?(w(),E(`div`,{key:0,innerHTML:e.finalContent},null,8,ki)):(w(),E(`div`,{key:1,textContent:h(e.finalContent)},null,8,Ai))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}var Mi=ii(Oi,[[`render`,ji]]),Ni=`v-popper--has-tooltip`;function Pi(e,t){let n=e.placement;if(!n&&t)for(let e of Lr)t[e]&&(n=e);return n||=q(e.theme||`tooltip`,`placement`),n}function Fi(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=Pi(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}var Ii,Li,Ri=0;function zi(){if(Ii)return;Li=O([]),Ii=ke({name:`VTooltipDirectiveApp`,setup(){return{directives:Li}},render(){return this.directives.map(e=>u(Mi,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),Ii.mount(e)}function Bi(e,t,n){zi();let r=O(Fi(e,t,n)),i=O(!1),a={id:Ri++,options:r,shown:i};return Li.value.push(a),e.classList&&e.classList.add(Ni),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function Vi(e){if(e.$_popper){let t=Li.value.indexOf(e.$_popper.item);t!==-1&&Li.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ni)}function Hi(e,{value:t,modifiers:n}){let r=Fi(e,t,n);if(!r.content||q(r.theme||`tooltip`,`disabled`))Vi(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=Bi(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var Ui={beforeMount:Hi,updated:Hi,beforeUnmount(e){Vi(e)}};function Wi(e){e.addEventListener(`mousedown`,Ki),e.addEventListener(`click`,Ki),e.addEventListener(`touchstart`,qi,J?{passive:!0}:!1)}function Gi(e){e.removeEventListener(`mousedown`,Ki),e.removeEventListener(`click`,Ki),e.removeEventListener(`touchstart`,qi),e.removeEventListener(`touchend`,Ji),e.removeEventListener(`touchcancel`,Yi)}function Ki(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function qi(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0,t.$_vclosepopover_touchPoint=e.changedTouches[0],t.addEventListener(`touchend`,Ji),t.addEventListener(`touchcancel`,Yi)}}function Ji(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function Yi(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}var Xi={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&Wi(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?Wi(e):Gi(e))},beforeUnmount(e){Gi(e)}},Zi=Ti,Qi=Ei,$i=Di;function ea(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Nr(K,t),e.directive(`tooltip`,Ui),e.directive(`close-popper`,Xi),e.component(`VTooltip`,Di),e.component(`VDropdown`,Ti),e.component(`VMenu`,Ei))}var ta={version:`5.2.2`,install:ea,options:K},na=[In,Hn,er,tr,nr,ir,ar,sr,cr,T(e=>{e.vueApp.use(ta,{overflowPadding:20})})],ra={p10:``,"h-full":``,flex:`~ col`,"items-center":``,"justify-center":``},ia={flex:`~ gap-2`,"animate-pulse":``,"mt--4":``,"items-center":``,"justify-center":``},aa=Object.assign(_({__name:`Loading`,props:{text:{}},setup(t){let n=t;return(t,r)=>(w(),E(`div`,ra,[i(e),D(`div`,ia,[r[0]||=D(`div`,{"i-svg-spinners-8-dots-rotate":``},null,-1),D(`span`,null,h(n.text??`Loading...`),1)])]))}}),{__name:`VisualLoading`}),oa=(e=`RouteProvider`)=>_({name:e,props:{route:{type:Object,required:!0},vnode:Object,vnodeRef:Object,renderKey:String,trackRootNodes:Boolean},setup(e){let t=e.renderKey,n=e.route,r={};for(let i in e.route)Object.defineProperty(r,i,{get:()=>t===e.renderKey?e.route[i]:n[i],enumerable:!0});return ce(Me,te(r)),()=>e.vnode?u(e.vnode,{ref:e.vnodeRef}):e.vnode}}),sa=oa(),ca=new WeakMap,la=_({name:`NuxtPage`,inheritAttrs:!1,props:{name:{type:String},transition:{type:[Boolean,Object],default:void 0},keepalive:{type:[Boolean,Object],default:void 0},route:{type:Object},pageKey:{type:[Function,String],default:null}},setup(e,{attrs:t,slots:n,expose:r}){let i=S(),o=O(),s=g(Me,null),c;r({pageRef:o});let l=g(Re,null),d,p=i.deferHydration(),m=!1,h=0;if(i.isHydrating){let e=i.hooks.hookOnce(`app:error`,p);M().beforeEach(e)}e.pageKey&&be(()=>e.pageKey,(e,t)=>{e!==t&&i.callHook(`page:loading:start`)});let _=!1;{let e=M().beforeResolve(()=>{_=!1});f(()=>{e(),p()})}return()=>u(Ke,{name:e.name,route:e.route,...t},{default:t=>{let r=ua(s,t.route,t.Component),f=s&&s.matched.length===t.route.matched.length;if(!t.Component){if(d&&!f)return d;p();return}if(d&&l&&!l.isCurrent(t.route))return d;if(r&&s&&(!l||l?.isCurrent(s)))return f||d?d:null;let g=qn(t,e.pageKey),ee=da(s,t.route,t.Component);!i.isHydrating&&c===g&&!ee&&a(()=>{_||(_=!0,i.callHook(`page:loading:end`))}),m&&c!==g&&h++,c=g;let v=!!(e.transition??t.route.meta.pageTransition??!1),y=v&&Xe([e.transition,t.route.meta.pageTransition,!1,{onAfterLeave(){i[`~transitionFinish`]?.(),delete i[`~transitionFinish`],delete i[`~transitionPromise`],i.callHook(`page:transition:finish`,t.Component)}}]),b=e.keepalive??t.route.meta.keepalive??!1;return d=Ve(v&&y,Jn(b,u(le,{key:h,suspensible:!0,onPending:()=>{m=!0,v&&!i[`~transitionPromise`]&&(i[`~transitionPromise`]=new Promise(e=>{i[`~transitionFinish`]=e})),i.callHook(`page:start`,t.Component)},onResolve:async()=>{m=!1;try{await a(),i._route.sync?.(),await i.callHook(`page:finish`,t.Component),!_&&!ee&&(_=!0,await i.callHook(`page:loading:end`))}finally{p()}}},{default:()=>{let e={key:g||void 0,vnode:n.default?fa(n.default,t):t.Component,route:t.route,renderKey:g||void 0,trackRootNodes:v,vnodeRef:o};if(!b)return u(sa,e);let r=t.Component.type,i=r,a=ca.get(i);return a||(a=oa(r.name||r.__name),ca.set(i,a)),u(a,e)}}))).default(),d}})}});function ua(e,t,n){if(!e)return!1;let r=t.matched.findIndex(e=>e.components?.default===n?.type);return!r||r===-1?!1:t.matched.slice(0,r).some((t,n)=>t.components?.default!==e.matched[n]?.components?.default)||n&&qn({route:t,Component:n})!==qn({route:e,Component:n})}function da(e,t,n){return e?t.matched.findIndex(e=>e.components?.default===n?.type)<t.matched.length-1:!1}function fa(e,t){let n=e(t);return n.length===1?u(n[0]):u(he,void 0,n)}var pa={key:0,"text-red":``},ma={key:2,"h-vh":``},ha=_({__name:`app`,setup(e){return yn({title:`Rolldown DevTools`}),n(),(e,n)=>{let r=aa,a=la;return c(t).error?(w(),E(`div`,pa,h(c(t).error),1)):c(t).connected?(w(),E(`div`,ma,[i(a)])):(w(),b(r,{key:1,text:`Connecting...`}))}}}),ga={__name:`nuxt-error-page`,props:{error:Object},setup(e){let t=e.error,n=Number(t.statusCode||500),r=n===404,i=t.statusMessage??(r?`Page Not Found`:`Internal Server Error`),a=t.message||t.toString(),o=_e(()=>P(()=>import(`./CfHRbb-n.js`),__vite__mapDeps([42,9,2,5,4,43]),import.meta.url)),s=_e(()=>P(()=>import(`./CzCoBrqM.js`),__vite__mapDeps([44,9,2,45]),import.meta.url)),l=r?o:s;return(e,t)=>(w(),b(c(l),oe(v({status:c(n),statusText:c(i),statusCode:c(n),statusMessage:c(i),description:c(a),stack:c(void 0)})),null,16))}},_a={key:0},va={__name:`nuxt-root`,setup(e){let t=()=>null,n=S(),r=n.deferHydration();if(n.isHydrating){let e=n.hooks.hookOnce(`app:error`,r);M().beforeEach(e)}window.location.pathname,ce(Me,Ae()),n.hooks.callHookWith(e=>e.map(e=>e()),`vue:setup`);let i=$e(),a=/bot\b|chrome-lighthouse|facebookexternalhit|google\b/i;return ae((e,t,r)=>{if(n.hooks.callHook(`vue:error`,e,t,r)?.catch(e=>console.error("[nuxt] Error in `vue:error` hook",e)),a.test(navigator.userAgent))return n.hooks.callHook(`app:error`,e),console.error(`[nuxt] Not rendering error page for bot with user agent \`${navigator.userAgent}\`:`,e),!1;if(Ue(e)&&(e.fatal||e.unhandled))return n.runWithContext(()=>k(e)),!1}),(e,n)=>(w(),b(le,{onResolve:c(r)},{default:C(()=>[c(!1)?(w(),E(`div`,_a)):c(i)?(w(),b(c(ga),{key:1,error:c(i)},null,8,[`error`])):c(!1)?(w(),b(c(t),{key:2,context:c(!1)},null,8,[`context`])):c(!1)?(w(),b(we(c(!1)),{key:3})):(w(),b(c(ha),{key:4}))]),_:1},8,[`onResolve`]))}},ya;{let e;ya=async function(){if(e)return e;let t=!!(window.__NUXT__?.serverRendered??document.getElementById(`__NUXT_DATA__`)?.dataset.ssr===`true`),n=t?ze(va):ke(va),r=ye({vueApp:n});async function i(e){await r.callHook(`app:error`,e),r.payload.error||=A(e)}n.config.errorHandler=i,r.hook(`app:suspense:resolve`,()=>{n.config.errorHandler===i&&(n.config.errorHandler=void 0)}),!t&&xe.id&&r.hook(`app:suspense:resolve`,()=>{document.getElementById(xe.id)?.remove()});try{await Ce(r,na)}catch(e){i(e)}try{await r.hooks.callHook(`app:created`,n),await r.hooks.callHook(`app:beforeMount`,n),n.mount(Te),await r.hooks.callHook(`app:mounted`,n),await a()}catch(e){i(e)}return n},e=ya().catch(e=>{throw console.error(`Error while mounting app:`,e),e})}export{$i as a,yn as c,$r as i,aa as n,Zi as o,Qi as r,P as s,la as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./B5QvmzNX.js";import{A as t,B as n,C as r,D as i,Dt as a,Gt as o,Kt as s,M as c,S as l,Ut as u,Z as d,at as f,b as p,et as m,h,k as g,lt as _,ot as v,q as y,st as b,ut as x,w as S,x as C,xt as w,yt as T}from"./CRfXUi3G.js";import{C as E}from"./CpTuuES2.js";import{c as D,g as O,p as k}from"./CJmfH1zY.js";import{n as ee}from"#entry";import{t as A}from"./DWUsdlci.js";import{r as j}from"./CjvJJTNy.js";import{r as M,t as N}from"./BPvXWYcE.js";import{i as P,t as te}from"./bh0jgFfK.js";import{n as F}from"./DlEGTOj9.js";import{n as I,r as ne,t as L}from"./BA4aNJdc.js";import{a as re,c as ie,i as ae,n as R,o as z,r as oe,t as se}from"./CqNyqKYk.js";import{t as ce}from"./CsPVvMxF.js";import{n as le,r as ue,t as B}from"./mLM3LnKH.js";var V=[`onClick`],de=Object.assign(c({__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 y(),l(L,{items:e.chunks,"key-prop":`chunk_id`},{default:_(({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":_(()=>[n.is_initial?(y(),l(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(c({__name:`Graph`,props:{session:{},chunks:{},entryId:{default:``}},setup(e){let i=e,o=p(()=>i.chunks),c=E();return F({modules:o,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:r,spacing:s,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=o.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([a(s.height),a(s.width)+a(s.gap)])(x);let S=x.descendants();for(let e of S)[e.x,e.y]=[e.y-a(s.width),e.x];let C=Math.min(...S.map(e=>e.x)),w=Math.min(...S.map(e=>e.y));if(C<a(s.margin))for(let e of S)e.x+=Math.abs(C)+a(s.margin);if(w<a(s.margin))for(let e of S)e.y+=Math.abs(w)+a(s.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=o.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+a(s.margin),v.value=d.value.scrollHeight/r.value+a(s.margin)})}}}),(n,i)=>{let u=A,d=B;return y(),l(d,{session:e.session,modules:o.value,"expand-controls":!1},{default:_(({node:e})=>[t(u,{class:`flex items-center`,to:{path:a(c).path,query:{chunk:e.data.module.chunk_id}}},{default:_(()=>[C(`span`,H,`#`+s(e.data.module.id),1),C(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[C(`div`,null,s(e.data.module.name||`[unnamed]`),1),t(j,{text:e.data.module.reason},null,8,[`text`]),e.data.module.is_initial?(y(),l(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),g(` `+s(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(c({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:n}){let i=e,c=n,l=f(`el`);return b(()=>l.value?.append(i.graph.el)),(n,i)=>{let u=R,f=M,p=m(`tooltip`);return y(),S(`div`,G,[C(`div`,{ref_key:`el`,ref:l,"w-500px":``},null,512),C(`div`,K,[t(u,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:i[0]||=e=>c(`select`,e)},null,8,[`selected`,`options`]),e.selected?(y(),S(`div`,q,[(y(!0),S(h,null,d(e.selected.children,n=>(y(),S(h,{key:n.id},[C(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>c(`select`,n)},[n.meta&&n.meta===e.selected?.meta?(y(),S(`span`,Y,`(self)`)):(y(),S(`span`,X,s(n.meta?.name||n.id),1))],8,J),C(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>c(`select`,n)},[C(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:o({background:a(z)(e.graph.options.getColor?.(n)||`#000`),width:`${n.size/e.selected.size*100}%`})},null,4),t(f,{"text-xs":``,bytes:n.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),n.children.length>0?x((y(),S(`div`,{key:0,title:`${n.children.length} modules`,"text-xs":``,"op-fade":``},[g(` (`+s(n.children.length)+`) `,1)],8,Q)),[[p,`${n.children.length} modules`]]):r(``,!0)],8,Z)],64))),128))])):r(``,!0)])])}}}),{__name:`ChunksSunburst`}),me=Object.assign(c({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=f(`el`);return b(()=>n.value?.append(t.graph.el)),(e,t)=>(y(),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`},$=c({__name:`chunks`,props:{session:{}},setup(n){let o=n,c=T(k()),f=[{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`}],m=w({search:``}),b=e(),{state:x,isLoading:E}=D(async()=>await b.value.call(`vite:rolldown:get-chunks-graph`,{session:o.session.id}),null),A=p(()=>{let e=new Map;return x.value?.forEach(t=>{e.set(`${t.chunk_id}`,t)}),e}),P=p(()=>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=p(()=>m.value.search?F.value.search(m.value.search).map(e=>e.item):P.value),{pathSelectorVisible:z,pathNodes:B,selectPathNodes:V,togglePathSelector:H,normalizedGraph:U}=ue({onToggle:e=>{m.value.search=e?!1:``},dataMap:p(()=>A.value),list:p(()=>L.value),importIdKey:`chunk_id`});function W(e){N.value.chunkViewType=e}let G=p(()=>{let e=new Map;for(let t of o.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:p(()=>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 v(()=>N.value.chunkViewType,()=>{[`treemap`,`sunburst`,`flamegraph`].includes(N.value.chunkViewType)&&je()}),(e,o)=>{let p=ee,v=de,b=le,x=I,w=te,T=fe,D=R,O=pe,k=me,P=M,F=ie;return a(E)?(y(),l(p,{key:0})):(y(),S(`div`,{key:1,relative:``,class:u({"max-h-screen of-hidden":a(N).chunkViewType===`graph`})},[C(`div`,he,[t(x,{modelValue:m.value,"onUpdate:modelValue":o[2]||=e=>m.value=e,rules:[]},i({"search-end":_(()=>[a(N).chunkViewType===`graph`?(y(),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:o[1]||=e=>a(H)(!0)},[...o[5]||=[C(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):r(``,!0)]),default:_(()=>[C(`div`,_e,[o[6]||=C(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(y(),S(h,null,d(f,e=>C(`button`,{key:e.value,"btn-action":``,class:u(a(N).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>W(e.value)},[C(`div`,{class:u(e.icon)},null,2),g(` `+s(e.label),1)],10,ve)),64))])]),_:2},[a(z)?{name:`search`,fn:_(()=>[t(b,{session:n.session,data:L.value,"import-id-key":`chunk_id`,"search-keys":[`name`],onSelect:a(V),onClose:o[0]||=e=>a(H)(!1)},{list:_(({select:e,data:r})=>[t(v,{session:n.session,chunks:r,link:!1,basic:!0,onSelect:e},null,8,[`session`,`chunks`,`onSelect`])]),item:_(({id:e})=>[g(s(A.value.get(e)?.name||`[unnamed]`),1)]),_:1},8,[`session`,`data`,`onSelect`])]),key:`0`}:void 0]),1032,[`modelValue`])]),a(N).chunkViewType===`list`?(y(),S(`div`,ye,[t(v,{session:n.session,chunks:L.value},null,8,[`session`,`chunks`])])):r(``,!0),a(N).chunkViewType===`detailed-list`?(y(),S(`div`,be,[(y(!0),S(h,null,d(L.value,e=>(y(),l(w,{key:e.id,border:`~ base rounded-lg`,p3:``,chunk:e,chunks:L.value,session:n.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):a(N).chunkViewType===`graph`?(y(),l(T,{key:2,class:`pt32`,session:n.session,chunks:a(U),"entry-id":a(B).start},null,8,[`session`,`chunks`,`entry-id`])):a(N).chunkViewType===`treemap`?(y(),S(`div`,xe,[a(Y)?(y(),l(ce,{key:0,graph:a(Y),selected:a(Z),onSelect:o[3]||=e=>a($)(e)},{default:_(({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)])):a(N).chunkViewType===`sunburst`?(y(),S(`div`,Se,[a(Y)?(y(),l(O,{key:0,graph:a(Y),selected:a(Z),onSelect:o[4]||=e=>a($)(e)},null,8,[`graph`,`selected`])):r(``,!0)])):a(N).chunkViewType===`flamegraph`?(y(),S(`div`,Ce,[a(Y)?(y(),l(k,{key:0,graph:a(Y)},null,8,[`graph`])):r(``,!0)])):r(``,!0),t(F,{"hover-x":c.x,"hover-y":c.y},{default:_(()=>[a(X)?.meta?(y(),S(`div`,we,[C(`div`,Te,[o[7]||=C(`i`,{"i-ph-shapes-duotone":``,"flex-none":``},null,-1),C(`span`,Ee,s(a(X).meta.name||`[unnamed]`),1)]),C(`div`,De,[o[8]||=C(`span`,{op50:``,"text-xs":``},`Size:`,-1),t(P,{bytes:a(X).meta.size,"text-xs":``},null,8,[`bytes`])]),a(X).meta.modules?.length?(y(),S(`div`,Oe,[o[9]||=C(`span`,{op50:``,"text-xs":``},`Modules:`,-1),C(`span`,ke,s(a(X).meta.modules?.length),1)])):r(``,!0),a(X).meta.is_initial?(y(),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{A as e,B as t,C as n,D as r,Dt as i,Kt as a,M as o,S as s,Ut as c,Z as l,b as u,h as d,k as f,lt as p,q as m,w as h,x as g,xt as _}from"./CRfXUi3G.js";import{C as v,w as y}from"./CpTuuES2.js";import{g as b,v as x}from"./CJmfH1zY.js";import{r as S}from"./CqfNwh25.js";import{a as C,s as w}from"./5SREwa_J.js";import{t as T}from"./CjvJJTNy.js";import{t as ee}from"./BodOO8Ge.js";import{t as E}from"./BPvXWYcE.js";import{t as D}from"./D0nH_IG_.js";import{n as O}from"./DlEGTOj9.js";import{n as k,r as A,t as j}from"./BA4aNJdc.js";import{t as M}from"./DM5zgFwu.js";import{t as N}from"./DEctdyhd.js";import{n as P,r as F,t as I}from"./mLM3LnKH.js";import{n as L,t as R}from"./qIAw3Eg02.js";var z={flex:`~ col gap-2`,p4:``},B=[`onClick`],V=Object.assign(o({__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 m(),h(`div`,z,[e(j,{items:t.modules,"key-prop":`id`},{default:p(({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(o({__name:`DetailedList`,props:{session:{},modules:{}},setup(t){let r=t,i=u(()=>{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 o=M,c=D,u=T;return m(),h(`div`,H,[e(j,{items:t.modules,"key-prop":`id`},{default:p(({item:r})=>[g(`div`,U,[e(u,{id:r.id,session:t.session,hover:`bg-active`,block:``,px2:``,p1:``,"w-full":``,border:`~ base rounded`,link:!0},{detail:p(()=>[g(`div`,W,[g(`ul`,G,[(m(!0),h(d,null,l(i.value.get(r.id),(t,a)=>(m(),h(d,{key:a},[t.source_code_size!==t.transformed_code_size&&t.transformed_code_size?(m(),h(`li`,K,[e(o,{name:t.plugin_name,class:`font-mono ws-nowrap op-50`},null,8,[`name`]),a===i.value.get(r.id).length-1?n(``,!0):(m(),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?(m(),s(c,{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(o({__name:`Graph`,props:{modules:{},session:{}},setup(n){let r=n,a=u(()=>r.modules);return O({modules:a,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:l,container:d,modulesMap:f,nodes:p,links:m,nodesMap:h,linksMap:g,width:_,height:v,childToParentMap:y,focusOn:b}=e,x=u(()=>a.value.filter(e=>e.importers.length===0));return(e=!0)=>{_.value=window.innerWidth,v.value=window.innerHeight;let a=new Set,u=c({module:{id:`~root`}},e=>e.module.id===`~root`?(x.value.forEach(e=>{a.add(e),n.value&&y.set(e.id,`~root`)}),x.value.map(e=>({module:e,expanded:!l.has(e.id),hasChildren:!1}))):l.has(e.module.id)?[]:e.module.imports.map(t=>{let r=f.value.get(t.module_id);if(r&&!a.has(r)&&!(y.has(r.id)&&y.get(r.id)!==e.module.id))return a.add(r),n.value&&y.set(r.id,e.module.id),{module:r,import:t,expanded:!l.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));n.value&&=!1,s().nodeSize([i(o.height),i(o.width)+i(o.gap)])(u);let S=u.descendants();for(let e of S)[e.x,e.y]=[e.y-i(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<i(o.margin))for(let e of S)e.x+=Math.abs(C)+i(o.margin);if(w<i(o.margin))for(let e of S)e.y+=Math.abs(w)+i(o.margin);p.value=S,h.clear();for(let e of S)h.set(e.data.module.id,e);let T=u.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+i(o.margin),v.value=d.value.scrollHeight/r.value+i(o.margin);let n=x.value?.[0]?.id;e&&n&&t(()=>{b(n,!1)})})}}}),(t,r)=>{let i=T,o=I;return m(),s(o,{session:n.session,modules:a.value},{default:p(({node:t,nodesRefMap:r})=>[e(i,{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:p(({link:e,d:t,linkClass:n})=>[g(`path`,{d:t,class:c(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(o({__name:`Folder`,props:{session:{},modules:{}},setup(t){let r=t,i=u(()=>{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 m(),h(`div`,Q,[g(`div`,te,[Object.keys(i.value.workspace.children).length?(m(),s(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?(m(),h(d,{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?(m(),h(d,{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":``},$={key:0,h10:``,mr2:``,flex:`~ items-center`},ie={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=o({__name:`index`,props:{session:{}},setup(t){let o=t,S=v(),D=y(),O=_({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(O.value,e=>{let t={...S.query,search:e.search||void 0,file_types:e.selected||void 0,node_modules:e.node_modules||void 0};D.replace({query:R(t)})},{debounce:500});let M=u(()=>o.session.modulesList.map(e=>({mod:e,path:ee(e.id,o.session.meta.cwd),type:w(e.id)}))),N=u(()=>C.filter(e=>M.value.some(t=>e.match.test(t.mod.id)))),I=u(()=>{let e=M.value;return O.value.selected&&(e=e.filter(e=>{let t=w(e.mod.id);return O.value.selected.includes(t.name)})),O.value.node_modules&&(e=e.filter(e=>e.path.moduleName&&O.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=>{O.value.search=e?!1:``},dataMap:u(()=>new Map(o.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=u(()=>O.value.search?W.value.search(O.value.search).map(e=>e.item):I.value);function K(e){S.query.module&&D.replace({query:{...S.query,module:void 0}}),E.value.moduleGraphViewType=e}return(o,u)=>{let _=V,v=T,y=P,b=k,x=Y,S=Z,C=ne;return m(),h(`div`,{relative:``,class:c({"max-h-screen of-hidden":i(E).moduleGraphViewType===`graph`})},[g(`div`,re,[e(b,{modelValue:O.value,"onUpdate:modelValue":u[2]||=e=>O.value=e,rules:N.value},r({"search-end":p(()=>[i(E).moduleGraphViewType===`graph`?(m(),h(`div`,$,[g(`button`,{"w-8":``,"h-8":``,"rounded-full":``,flex:``,"items-center":``,"justify-center":``,hover:`bg-active op100`,op50:``,title:`Graph Path Selector`,onClick:u[1]||=e=>i(H)(!0)},[...u[3]||=[g(`i`,{"i-ri:route-line":``,flex:``},null,-1)]])])):n(``,!0)]),default:p(()=>[g(`div`,ie,[u[4]||=g(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(m(),h(d,null,l(j,e=>g(`button`,{key:e.value,"btn-action":``,class:c(i(E).moduleGraphViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>K(e.value)},[g(`div`,{class:c(e.icon)},null,2),f(` `+a(e.label),1)],10,ae)),64))])]),_:2},[i(z)?{name:`search`,fn:p(()=>[e(y,{session:t.session,data:G.value,"import-id-key":`module_id`,"search-keys":[`id`],onSelect:i(B),onClose:u[0]||=e=>i(H)(!1)},{list:p(({select:e,data:r})=>[r?.length?(m(),s(_,{key:0,session:t.session,modules:r,"disable-tooltip":``,link:!1,onSelect:e},null,8,[`session`,`modules`,`onSelect`])):n(``,!0)]),item:p(({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`])]),i(E).moduleGraphViewType===`list`?(m(),s(_,{key:0,session:t.session,modules:G.value},null,8,[`session`,`modules`])):i(E).moduleGraphViewType===`detailed-list`?(m(),s(x,{key:1,session:t.session,modules:G.value},null,8,[`session`,`modules`])):i(E).moduleGraphViewType===`graph`?(m(),s(S,{key:2,session:t.session,modules:i(U)},null,8,[`session`,`modules`])):(m(),s(C,{key:3,session:t.session,modules:G.value},null,8,[`session`,`modules`])),i(E).moduleGraphViewType===`list`||i(E).moduleGraphViewType===`detailed-list`?(m(),h(`div`,oe,[g(`span`,se,a(G.value.length)+` of `+a(t.session.modulesList.length),1)])):n(``,!0)],2)}}});export{ce as default};
@@ -0,0 +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};
@@ -0,0 +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 +1 @@
1
- import{i as e,r as t}from"./Doipuu3T.js";import{A as n,C as r,Dt as i,Kt as a,M as o,S as s,Ut as c,Z as l,b as u,ct as d,h as f,k as p,lt as m,q as h,tt as g,w as _,x as v,xt as y,z as b}from"./CRfXUi3G.js";import{t as x}from"./I4lEnjGE.js";import{t as S}from"./Cqm3ivh3.js";import{r as C,t as w}from"./BnfqOA1X.js";import{t as T}from"./DleERjsP.js";import{t as E}from"./DbWf6qhI.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(o({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(e,{emit:t}){let o=e,c=t;function d(e){return E(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let y=u(()=>{let e=o.selectedSessions?.[0];return e?d(e):``});function S(e){return y.value&&y.value!==d(e)}function M(e){o.sessionMode===`compare`&&!S(e)&&c(`select`,e)}return(t,o)=>{let c=w;return h(),_(`div`,D,[(h(!0),_(f,null,l(e.sessions,t=>(h(),_(`div`,{key:t.id,flex:`~ row gap-2`,relative:``},[(h(),s(g(e.sessionMode===`list`?i(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`],flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(t)}),{default:m(()=>[v(`div`,O,[o[0]||=v(`div`,{"i-ph-hash-duotone":``},null,-1),p(` `+a(t.id),1)]),v(`div`,k,a(t.meta.cwd),1),t.meta.inputs[0]?(h(),_(`div`,A,[n(c,{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?(h(),_(`span`,j,` +`+a(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=o({__name:`index`,async setup(o){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=u(()=>T.value.map(e=>e.id).sort()),D=u(()=>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]=d(()=>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,o)=>{let u=e,d=M,g=S,y=x;return h(),_(`div`,N,[n(u),i(k).length?(h(),_(`p`,P,a(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1)):(h(),_(`p`,F,` No sessions yet, run a build to get started. `)),v(`div`,I,[n(d,{"session-mode":C.value,sessions:i(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),i(k).length?(h(),_(`div`,L,[v(`div`,R,[(h(),_(f,null,l(w,e=>v(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:c({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[v(`span`,{class:c([e.icon,`text-sm`])},null,2)],10,z)),64))])])):r(``,!0),T.value.length>0&&C.value===`compare`?(h(),_(`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?(h(),s(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:m(()=>[...o[0]||=[p(` Compare `,-1)]]),_:1},8,[`to`])):(h(),_(`div`,H,` Select one more session to compare. `))])])):r(``,!0)])}}});export{U as default};
1
+ import{i as e,r as t}from"./B5QvmzNX.js";import{A as n,C as r,Dt as i,Kt as a,M as o,S as s,Ut as c,Z as l,b as u,ct as d,h as f,k as p,lt as m,q as h,tt as g,w as _,x as v,xt as y,z as b}from"./CRfXUi3G.js";import{t as x}from"./DWUsdlci.js";import{t as S}from"./lNa1kApa.js";import{r as C,t as w}from"./CjvJJTNy.js";import{t as T}from"./Bt8oNIjq.js";import{t as E}from"./BodOO8Ge.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(o({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(e,{emit:t}){let o=e,c=t;function d(e){return E(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let y=u(()=>{let e=o.selectedSessions?.[0];return e?d(e):``});function S(e){return y.value&&y.value!==d(e)}function M(e){o.sessionMode===`compare`&&!S(e)&&c(`select`,e)}return(t,o)=>{let c=w;return h(),_(`div`,D,[(h(!0),_(f,null,l(e.sessions,t=>(h(),_(`div`,{key:t.id,flex:`~ row gap-2`,relative:``},[(h(),s(g(e.sessionMode===`list`?i(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`],flex:`~ col gap-1`,px4:``,py3:``,"w-full":``,onClick:e=>M(t)}),{default:m(()=>[v(`div`,O,[o[0]||=v(`div`,{"i-ph-hash-duotone":``},null,-1),p(` `+a(t.id),1)]),v(`div`,k,a(t.meta.cwd),1),t.meta.inputs[0]?(h(),_(`div`,A,[n(c,{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?(h(),_(`span`,j,` +`+a(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=o({__name:`index`,async setup(o){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=u(()=>T.value.map(e=>e.id).sort()),D=u(()=>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]=d(()=>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,o)=>{let u=e,d=M,g=S,y=x;return h(),_(`div`,N,[n(u),i(k).length?(h(),_(`p`,P,a(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1)):(h(),_(`p`,F,` No sessions yet, run a build to get started. `)),v(`div`,I,[n(d,{"session-mode":C.value,sessions:i(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),i(k).length?(h(),_(`div`,L,[v(`div`,R,[(h(),_(f,null,l(w,e=>v(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:c({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[v(`span`,{class:c([e.icon,`text-sm`])},null,2)],10,z)),64))])])):r(``,!0),T.value.length>0&&C.value===`compare`?(h(),_(`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?(h(),s(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:m(()=>[...o[0]||=[p(` Compare `,-1)]]),_:1},8,[`to`])):(h(),_(`div`,H,` Select one more session to compare. `))])])):r(``,!0)])}}});export{U 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"./D4aX0j39.js";import{t as T}from"./CvIcovUx.js";import{t as E}from"./CKJSqDo0.js";import{t as ae}from"./D4jlwaNB.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,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};
@@ -0,0 +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 +1 @@
1
- import{A as e,C as t,Dt as n,M as r,b as i,h as a,lt as o,q as s,w as c,x as l}from"./CRfXUi3G.js";import{r as u}from"./D4jlwaNB.js";import{n as d,t as f}from"./dT0PHReP.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=Object.assign(r({__name:`BuildMetrics`,props:{metrics:{}},setup(r){let h=r,g=i(()=>{let e=h.metrics,t=e?.resolve_ids.reduce((e,t)=>(e+=t.duration,e),0),n=e?.loads?.reduce((e,t)=>(e+=t.duration,e),0),r=e?.transforms.reduce((e,t)=>(e+=t.duration,e),0);return{resolveIds:t,loads:n,transforms:r,total:t+n+r}}),_=i(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=i(()=>(h.metrics?.transforms.filter(e=>e.transformed_code_size)).at(-1)?.transformed_code_size);return(r,i)=>{let h=u;return s(),c(`div`,p,[e(f,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${n(d)(g.value.resolveIds,!0)}`},{default:o(()=>[...i[0]||=[l(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),e(f,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${n(d)(g.value.loads,!0)}`},{default:o(()=>[...i[1]||=[l(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),e(f,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${n(d)(g.value.transforms,!0)}`},{default:o(()=>[...i[2]||=[l(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),i[6]||=l(`span`,{op40:``},`|`,-1),e(f,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${n(d)(g.value.total,!0)}`},{default:o(()=>[...i[3]||=[l(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(s(),c(a,{key:0},[i[5]||=l(`span`,{op40:``},`|`,-1),l(`div`,m,[e(h,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),i[4]||=l(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),e(h,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):t(``,!0)])}}}),{__name:`ModulesBuildMetrics`});export{h as t};
1
+ import{A as e,C as t,Dt as n,M as r,b as i,h as a,lt as o,q as s,w as c,x as l}from"./CRfXUi3G.js";import{r as u}from"./BPvXWYcE.js";import{n as d,t as f}from"./C1f8uPlQ.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=Object.assign(r({__name:`BuildMetrics`,props:{metrics:{}},setup(r){let h=r,g=i(()=>{let e=h.metrics,t=e?.resolve_ids.reduce((e,t)=>(e+=t.duration,e),0),n=e?.loads?.reduce((e,t)=>(e+=t.duration,e),0),r=e?.transforms.reduce((e,t)=>(e+=t.duration,e),0);return{resolveIds:t,loads:n,transforms:r,total:t+n+r}}),_=i(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=i(()=>(h.metrics?.transforms.filter(e=>e.transformed_code_size)).at(-1)?.transformed_code_size);return(r,i)=>{let h=u;return s(),c(`div`,p,[e(f,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${n(d)(g.value.resolveIds,!0)}`},{default:o(()=>[...i[0]||=[l(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),e(f,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${n(d)(g.value.loads,!0)}`},{default:o(()=>[...i[1]||=[l(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),e(f,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${n(d)(g.value.transforms,!0)}`},{default:o(()=>[...i[2]||=[l(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),i[6]||=l(`span`,{op40:``},`|`,-1),e(f,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${n(d)(g.value.total,!0)}`},{default:o(()=>[...i[3]||=[l(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(s(),c(a,{key:0},[i[5]||=l(`span`,{op40:``},`|`,-1),l(`div`,m,[e(h,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),i[4]||=l(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),e(h,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):t(``,!0)])}}}),{__name:`ModulesBuildMetrics`});export{h as t};
@@ -1 +1 @@
1
- import{A as e,C as t,Dt as n,Gt as r,M as i,Q as a,R as o,S as s,Ut 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"./CRfXUi3G.js";import{C as _}from"./CpTuuES2.js";import{t as v}from"./I4lEnjGE.js";import{n as y,t as b}from"./CFObDroh.js";var x=[`open`],S={"font-mono":``},C={"font-mono":``},w=Object.assign(i({__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(i,{emit:o}){let T=i,E=o,D=p(i,`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:r({paddingLeft:`${i.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&&i.iconOpen||i.icon),"inline-block":``,"vertical-text-bottom":``},null,2),g(`div`,S,[e(_,{path:i.node.name||``},null,8,[`path`])])],4),D.value?(f(),h(u,{key:0},[(f(!0),h(u,null,l(Object.entries(i.node.children),e=>(f(),s(T,{key:e[0],node:e[1],link:i.link,padding:i.padding+1,"link-query-key":i.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(i.node.items,t=>(f(),s(m(i.link?n(v):`div`),{key:t.full,to:i.link?typeof i.link==`string`?i.link:{path:n(O).path,query:{...n(O).query,[i.linkQueryKey]:t.full},hash:n(k).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:r({paddingLeft:`${i.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
+ import{A as e,C as t,Dt as n,Gt as r,M as i,Q as a,R as o,S as s,Ut 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"./CRfXUi3G.js";import{C as _}from"./CpTuuES2.js";import{t as v}from"./DWUsdlci.js";import{n as y,t as b}from"./hY2iPUYh.js";var x=[`open`],S={"font-mono":``},C={"font-mono":``},w=Object.assign(i({__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(i,{emit:o}){let T=i,E=o,D=p(i,`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:r({paddingLeft:`${i.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&&i.iconOpen||i.icon),"inline-block":``,"vertical-text-bottom":``},null,2),g(`div`,S,[e(_,{path:i.node.name||``},null,8,[`path`])])],4),D.value?(f(),h(u,{key:0},[(f(!0),h(u,null,l(Object.entries(i.node.children),e=>(f(),s(T,{key:e[0],node:e[1],link:i.link,padding:i.padding+1,"link-query-key":i.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(i.node.items,t=>(f(),s(m(i.link?n(v):`div`),{key:t.full,to:i.link?typeof i.link==`string`?i.link:{path:n(O).path,query:{...n(O).query,[i.linkQueryKey]:t.full},hash:n(k).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:r({paddingLeft:`${i.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{F as e,M as t,S as n,q as r,tt as i}from"./CRfXUi3G.js";import{t as a}from"./Tr_XYnUk.js";var o=Object.assign(t({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(t){let o=t,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let t=o.compact?c:s;for(let n of t)if(o.name.startsWith(n))return o.compact?e(`span`,o.name.slice(n.length)):e(`span`,[e(`span`,{class:`op50`},n),e(`span`,o.name.slice(n.length))]);let n=o.name.split(`:`);return n.length>1?e(`span`,[e(`span`,{style:{color:a(n[0])}},`${n[0]}:`),e(`span`,n.slice(1).join(`:`))]):e(`span`,o.name)}return(e,t)=>(r(),n(i(l)))}}),{__name:`DisplayPluginName`});export{o as t};
1
+ import{F as e,M as t,S as n,q as r,tt as i}from"./CRfXUi3G.js";import{t as a}from"./5SREwa_J.js";var o=Object.assign(t({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(t){let o=t,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let t=o.compact?c:s;for(let n of t)if(o.name.startsWith(n))return o.compact?e(`span`,o.name.slice(n.length)):e(`span`,[e(`span`,{class:`op50`},n),e(`span`,o.name.slice(n.length))]);let n=o.name.split(`:`);return n.length>1?e(`span`,[e(`span`,{style:{color:a(n[0])}},`${n[0]}:`),e(`span`,n.slice(1).join(`:`))]):e(`span`,o.name)}return(e,t)=>(r(),n(i(l)))}}),{__name:`DisplayPluginName`});export{o as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./B5QvmzNX.js";import{A as t,C as n,G as r,Kt as i,M as a,S as o,Ut as s,Z as c,b as l,h as u,k as d,lt as f,q as p,w as m,x as h,xt as g,z as _}from"./CRfXUi3G.js";import{C as v}from"./CpTuuES2.js";import{n as y}from"#entry";import{t as b}from"./DWUsdlci.js";import{t as x}from"./lNa1kApa.js";import{t as S}from"./CqfNwh25.js";var C=Object.assign(a({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,n=l(()=>t.previous===t.current),r=l(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(n.value?0:2)),a=l(()=>n.value?``:t.current>t.previous?`+`:`-`),o=l(()=>n.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(p(),m(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:s(o.value)},i(a.value)+i(r.value)+`% `,3))}}),{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=Object.assign(a({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=l(()=>t.format===`bytes`?S(t.current):t.current);return(t,a)=>{let c=C;return p(),m(u,null,[h(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[h(`div`,{class:s([e.icon,`text-xl`])},null,2),d(` `+i(e.name),1)],8,w),h(`div`,T,[e.format===`bytes`?(p(),m(`div`,E,[h(`span`,D,i(r.value[0]),1),h(`span`,O,i(r.value[1]),1)])):(p(),m(`div`,k,[h(`span`,A,i(r.value),1)])),e.previous>0&&e.current>0?(p(),o(c,{key:2,current:e.current,previous:e.previous},null,8,[`current`,`previous`])):n(``,!0)])],64)}}}),{__name:`CompareMetricCard`}),M={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},N={flex:`~ gap-2`},P={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},F={grid:`~ cols-6 gap5`,"w-full":``,pt3:``},I=a({__name:`index`,setup(n){let i=g(!1),a=v().params,S=e(),C=g([]),w=g([]);async function T(e){let t=await S.value.call(`vite:rolldown:get-packages`,{session:e}),n=t.filter(e=>e.duplicated);return{total:t.length,duplicated:n.length}}r(async()=>{i.value=!0;let e=a.sessions.split(`,`),[t,...n]=await Promise.all([S.value.call(`vite:rolldown:get-session-compare-summary`,{sessions:e}),...e.map(e=>T(e))]);C.value=t,w.value=n,i.value=!1});let E=l(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),D=l(()=>{let[e,t]=E.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph-file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Packages`,description:`Total number of packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.total??0,previous:w.value?.[0]?.total??0},{name:`Duplicated Packages`,description:`Total number of duplicated packages`,icon:`i-ph-package-duotone`,current:w.value?.[1]?.duplicated??0,previous:w.value?.[0]?.duplicated??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(e,n)=>{let r=y,a=b,l=x,g=j;return i.value?(p(),o(r,{key:0})):(p(),m(`div`,M,[h(`div`,N,[t(a,{"btn-action":``,to:{path:`/`}},{default:f(()=>[...n[0]||=[h(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),d(` Re-select Session `,-1)]]),_:1})]),h(`div`,P,[n[1]||=h(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),t(l,{sessions:E.value},null,8,[`sessions`]),h(`div`,F,[(p(!0),m(u,null,c(D.value,(e,n)=>(p(),m(`div`,{key:e.name,class:s(n<2?`col-span-3`:`col-span-2`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[t(g,_({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{I as default};