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-ddj4xtqm.js";import"./vendor/shiki-kunkft64.js";import{It as g,N as _,Tt as v,at as y,j as b,ot as x}from"#entry";import{t as S}from"./composables-g8w9dpc0.js";import{t as C}from"./filepath-item-osqp88cx.js";import{t as w}from"./help-fab-bhtk9hzf.js";import"./nicon-title-hrj2h1mn.js";import{t as T}from"./nsection-block-kp1wt3o4.js";import{t as E}from"./nbadge-ijsj8fjy.js";import{t as D}from"./duration-display-dhj2ifr1.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=x(),i=f(()=>v(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=b,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(_(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,[[`render`,U]]),G={pt4:``},K={class:`text-sm`,flex:`~ gap-1 items-center justify-start`,"mt-3":``},q=t({__name:`plugins`,setup(e){let t=y(),i=g(),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};