import{C as e,E as t,Qt as n,W as r,X as i,Y as a,Z as o,_ as s,c,dt as l,g as u,h as d,m as f,tn as p,v as m,w as h}from"./vendor/json-editor-vue-eojr4v24.js";import"./ready-dadbdj5i.js";import{C as g,u as _,w as v}from"./utils-jupbrzo6.js";import{r as y}from"./client-nwyjxodt.js";import"./dev-auth-he0eye7r.js";import"./vendor/shiki-lqo1hg2n.js";import"./storage-options-nzog3hhp.js";import"./nuxt-link-bumooa9d.js";import{t as b}from"./_plugin-vue_export-helper-n58akrbk.js";import{t as x}from"./nicon-m1crov2l.js";import"./nbutton-gygn07c2.js";import"./state-routes-jownks2o.js";import"./telemetry-c77tnag3.js";import{t as S}from"./composables-b2ccklz4.js";import{t as C}from"./filepath-item-h3i1tz3s.js";import{t as w}from"./help-fab-oeo4c53s.js";import"./nicon-title-kbrt9te7.js";import{t as T}from"./nsection-block-ibsk9arc.js";import{t as E}from"./nbadge-f1bvtlf5.js";import{t as D}from"./duration-display-h5sffkps.js";var O={flex:`~ gap2`,"items-center":``},k={w8:``,"text-right":``,"text-sm":``,op25:``},A={key:0,"flex-auto":``,"text-right":``},j=t({__name:`PluginItem`,props:{plugin:{},index:{}},setup(e){let t=e,n=v(),i=f(()=>_(t.plugin.src,n.value?.rootDir||``).path);return(n,a)=>{let o=E,c=C,f=D;return r(),m(`div`,O,[d(`div`,k,p(e.index),1),h(c,{filepath:t.plugin.src,subpath:!0},{default:l(()=>[d(`div`,null,[i.value.startsWith(`#`)?(r(),u(o,{key:0,n:`rose`,textContent:`virtual`})):i.value.startsWith(`.`)?s(``,!0):(r(),u(o,{key:1,n:`gray`,textContent:`module`})),e.plugin.mode===`server`?(r(),u(o,{key:2,n:`teal`,textContent:`server`})):s(``,!0),e.plugin.mode===`client`?(r(),u(o,{key:3,n:`orange`,textContent:`client`})):s(``,!0)])]),_:1},8,[`filepath`]),e.plugin.metric?.duration==null?s(``,!0):(r(),m(`div`,A,[h(f,{duration:e.plugin.metric?.duration,factor:10},null,8,[`duration`])]))])}}}),M=Object.assign(j,{__name:`PluginItem`}),N={class:`n-tip n-tip-base`,flex:`~ col items-start`,"mx--4":``,px4:``,py4:``},P={flex:`~ items-center gap-1`,"font-bold":``},F=t({__name:`HelpTip`,props:{title:{},icon:{}},setup(e){return(t,n)=>{let a=x,c=o(`ContentSlot`);return r(),m(`div`,N,[d(`div`,P,[e.icon?(r(),u(a,{key:0,icon:e.icon,class:`n-tip-icon`},null,8,[`icon`])):s(``,!0),d(`div`,null,p(e.title),1)]),d(`div`,null,[i(t.$slots,`default`,{},()=>[h(c,{use:t.$slots.default,unwrap:`p`},null,8,[`use`])])])])}}}),I=Object.assign(F,{__name:`HelpTip`}),L={};function R(e,t){let n=I;return r(),u(n,{title:`Performance Tip`,icon:`carbon-meter`,n:`lime6 dark:lime5`},{default:l(()=>[i(e.$slots,`default`)]),_:3})}var z=Object.assign(b(L,[[`render`,R]]),{__name:`HelpTipPerformance`}),B={},V={class:`markdown-body`},H={class:`markdown-body`};function U(t,n){let i=z;return r(),m(`div`,V,[d(`template`,null,[d(`div`,H,[n[1]||=d(`h1`,null,`Plugins`,-1),n[2]||=d(`p`,null,[e(`Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the `),d(`code`,{"v-pre":``},`plugins/`),e(` directory and they will be automatically imported and registered.`)],-1),h(i,null,{default:l(()=>[...n[0]||=[e(` Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. `,-1)]]),_:1}),n[3]||=d(`p`,null,[d(`a`,{href:`https://nuxt.com/docs/guide/directory-structure/plugins`,target:`_blank`,rel:`noopener`},`Learn more in the documentation`)],-1)])])])}var W=b(B,[[`render`,U]]),G={pt4:``},K={class:`text-sm`,flex:`~ gap-1 items-center justify-start`,"mt-3":``},q=t({__name:`plugins`,setup(e){S({icon:`carbon-plug`,title:`Plugins`,category:`analyze`});let t=g(),i=y(),o=f(()=>{let e=t.value?.plugins||[],n=i.value?.metrics.clientPlugins()||[];return e.map(e=>{let t=typeof e==`string`?{src:e}:e;return{...t,metric:n.find(e=>e.src===t.src||e.src.startsWith(t.src))}})}),s=f(()=>{let e=i.value?.metrics.clientPlugins()||[],t=Math.min(...e.map(e=>e.start));return Math.max(...e.map(e=>e.end))-t});return(e,t)=>{let i=M,f=D,p=T,g=W,_=w;return r(),m(c,null,[h(p,{icon:`carbon-plug`,text:`Plugins`,description:`Total plugins: ${o.value.length}`},{default:l(()=>[d(`div`,G,[(r(!0),m(c,null,a(o.value,(e,t)=>(r(),u(i,{key:e.src,plugin:e,index:t+1,"ml--4":``,"border-base":``,py2:``,class:n(t?`border-t`:``)},null,8,[`plugin`,`index`,`class`]))),128)),d(`div`,K,[t[0]||=d(`div`,{"i-carbon-timer":``,"text-lg":``,op75:``},null,-1),t[1]||=d(`span`,{op50:``},`Total execution time:`,-1),h(f,{duration:s.value,factor:10},null,8,[`duration`])])])]),_:1},8,[`description`]),h(_,null,{default:l(()=>[h(g)]),_:1})],64)}}});export{q as default};