@nuxt/devtools 0.7.1 → 0.7.3
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.
- package/dist/chunks/module-main.mjs +43 -32
- package/dist/chunks/vscode.mjs +3 -3
- package/dist/client/200.html +2 -2
- package/dist/client/404.html +2 -2
- package/dist/client/__blank/index.html +2 -2
- package/dist/client/_nuxt/{AuthRequiredPanel.vue.17c2a7bd.js → AuthRequiredPanel.vue.8365f094.js} +1 -1
- package/dist/client/_nuxt/{Badge.8d650e3b.js → Badge.6a68ac78.js} +1 -1
- package/dist/client/_nuxt/{CodeDiff.vue.cc3f76a7.js → CodeDiff.vue.0fc21e08.js} +1 -1
- package/dist/client/_nuxt/{CodeSnippets.vue.b4698473.js → CodeSnippets.vue.dc4d9439.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.6d7b799a.js → ComposableItem.vue.2b804916.js} +1 -1
- package/dist/client/_nuxt/DrawerRight.vue.76906913.js +1 -0
- package/dist/client/_nuxt/{DurationDisplay.vue.aba5fa70.js → DurationDisplay.vue.ae436800.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.84aa0a31.js → FilepathItem.vue.c12140f3.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.a8d95bd1.js → HelpFab.vue.d8b5b257.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.00d3a484.js → LaunchPage.vue.7ca11100.js} +1 -1
- package/dist/client/_nuxt/{NCheckbox.vue.63949e52.js → NCheckbox.vue.4cf6f83b.js} +1 -1
- package/dist/client/_nuxt/{NCodeBlock.vue.77e54b2e.js → NCodeBlock.vue.cd2d281d.js} +1 -1
- package/dist/client/_nuxt/{NIconTitle.vue.0a904b99.js → NIconTitle.vue.2bd823c1.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.ec1f69e3.js → NLink.vue.b78c8d55.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.a74698d6.js → NMarkdown.vue.5af3ba6b.js} +1 -1
- package/dist/client/_nuxt/{NSectionBlock.b074e0b8.js → NSectionBlock.36261208.js} +1 -1
- package/dist/client/_nuxt/{NSelect.vue.9556d6e0.js → NSelect.vue.5b8827ac.js} +1 -1
- package/dist/client/_nuxt/{NSwitch.vue.6c2556d0.js → NSwitch.vue.f9054ae3.js} +1 -1
- package/dist/client/_nuxt/{NTip.vue.861372f7.js → NTip.vue.cf493c45.js} +1 -1
- package/dist/client/_nuxt/{Navbar.vue.1a2a587f.js → Navbar.vue.f3d9c7e0.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.0146462c.js +1 -0
- package/dist/client/_nuxt/{__blank.3f7b27a6.js → __blank.59338a05.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.c314de67.js → analyze-build.901f5150.js} +1 -1
- package/dist/client/_nuxt/assets.75544131.js +16 -0
- package/dist/client/_nuxt/{client.ece13385.js → client.1d68892a.js} +1 -1
- package/dist/client/_nuxt/{components.27bdfae4.js → components.705d48d8.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_.95a8297c.js → custom-_name_.dfe8f1a7.js} +1 -1
- package/dist/client/_nuxt/{default.7e3f9818.js → default.5ca90489.js} +1 -1
- package/dist/client/_nuxt/entry.331cb74a.js +21 -0
- package/dist/client/_nuxt/entry.b258ed6f.css +1 -0
- package/dist/client/_nuxt/{error-404.66ff8897.js → error-404.82a24486.js} +1 -1
- package/dist/client/_nuxt/{error-500.34984f69.js → error-500.540bdb82.js} +1 -1
- package/dist/client/_nuxt/{full.748a1c93.js → full.84bf4dc2.js} +1 -1
- package/dist/client/_nuxt/{hooks.3ec974a8.js → hooks.9324197d.js} +1 -1
- package/dist/client/_nuxt/{imports.8485b75c.js → imports.daf39689.js} +1 -1
- package/dist/client/_nuxt/{index.7ae8a638.js → index.0a4e7275.js} +1 -1
- package/dist/client/_nuxt/{index.5152a001.js → index.1da213bf.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.bbdad521.js → json-editor-vue.f57c50c1.js} +1 -1
- package/dist/client/_nuxt/{middleware.3c73e553.js → middleware.a6cf7e42.js} +1 -1
- package/dist/client/_nuxt/{modules.67fd6240.js → modules.882302f4.js} +1 -1
- package/dist/client/_nuxt/{none.2f8cf810.js → none.91495c5f.js} +1 -1
- package/dist/client/_nuxt/{open-graph.79a7c77c.js → open-graph.e5c037bf.js} +1 -1
- package/dist/client/_nuxt/{overview.d953fa7e.js → overview.0f0f3fdf.js} +1 -1
- package/dist/client/_nuxt/{pages.7b386c55.js → pages.012c646d.js} +1 -1
- package/dist/client/_nuxt/{payload.f36f4355.js → payload.3247eb06.js} +1 -1
- package/dist/client/_nuxt/{plugins.1c37e55d.js → plugins.17878408.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.67f4f0b3.js → runtime-configs.42aec493.js} +1 -1
- package/dist/client/_nuxt/{server-routes.64373863.js → server-routes.e57e617b.js} +1 -1
- package/dist/client/_nuxt/{settings.b7df1779.js → settings.1e99e54a.js} +1 -1
- package/dist/client/_nuxt/{state-components.cd34df16.js → state-components.a65979c8.js} +1 -1
- package/dist/client/_nuxt/{state-modules.c2527930.js → state-modules.5120fd20.js} +1 -1
- package/dist/client/_nuxt/{storage.13c667f3.js → storage.9d4df500.js} +1 -1
- package/dist/client/_nuxt/{terminals.1c5a4ee9.js → terminals.2787fb0b.js} +1 -1
- package/dist/client/_nuxt/{timeline.741d9e72.js → timeline.587165be.js} +1 -1
- package/dist/client/_nuxt/unocss-runtime.54140029.js +2 -0
- package/dist/client/_nuxt/{virtual-files.4e8316be.js → virtual-files.a7391947.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/modules/analyze-build/index.html +2 -2
- package/dist/client/modules/assets/index.html +2 -2
- package/dist/client/modules/components/index.html +2 -2
- package/dist/client/modules/hooks/index.html +2 -2
- package/dist/client/modules/imports/index.html +2 -2
- package/dist/client/modules/middleware/index.html +2 -2
- package/dist/client/modules/modules/index.html +2 -2
- package/dist/client/modules/open-graph/index.html +2 -2
- package/dist/client/modules/overview/index.html +2 -2
- package/dist/client/modules/pages/index.html +2 -2
- package/dist/client/modules/payload/index.html +2 -2
- package/dist/client/modules/plugins/index.html +2 -2
- package/dist/client/modules/runtime-configs/index.html +2 -2
- package/dist/client/modules/server-routes/index.html +2 -2
- package/dist/client/modules/storage/index.html +2 -2
- package/dist/client/modules/terminals/index.html +2 -2
- package/dist/client/modules/timeline/index.html +2 -2
- package/dist/client/modules/virtual-files/index.html +2 -2
- package/dist/client/settings/index.html +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/view/Main.vue +1 -0
- package/package.json +21 -21
- package/dist/client/_nuxt/DrawerRight.vue.3ab85e5b.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.05c4fc16.js +0 -1
- package/dist/client/_nuxt/assets.722939b7.js +0 -16
- package/dist/client/_nuxt/entry.6507cb32.js +0 -21
- package/dist/client/_nuxt/entry.6f7d64f9.css +0 -1
- package/dist/client/_nuxt/unocss-runtime.d07b0096.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as I,r as E,m as R,ae as j,s as t,o,c as s,a as e,t as $,h as v,w as k,a$ as q,F as h,n as B,v as y,b as p,d as V,q as L,M,k as W,Z as H,b0 as D,aN as J,aO as Q,a1 as Z,a9 as G,aP as X,aQ as A,al as Y,L as ee,aR as te,A as oe,B as ne}from"./entry.
|
|
1
|
+
import{g as I,r as E,m as R,ae as j,s as t,o,c as s,a as e,t as $,h as v,w as k,a$ as q,F as h,n as B,v as y,b as p,d as V,q as L,M,k as W,Z as H,b0 as D,aN as J,aO as Q,a1 as Z,a9 as G,aP as X,aQ as A,al as Y,L as ee,aR as te,A as oe,B as ne}from"./entry.331cb74a.js";import{_ as S}from"./Badge.6a68ac78.js";import{_ as F}from"./FilepathItem.vue.c12140f3.js";import{_ as ae}from"./NSectionBlock.36261208.js";import{_ as se}from"./LaunchPage.vue.7ca11100.js";import{_ as re}from"./HelpFab.vue.d8b5b257.js";import"./NIconTitle.vue.2bd823c1.js";import"./NMarkdown.vue.5af3ba6b.js";import"./client.1d68892a.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},pe={key:1},_e=I({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(P,{emit:d}){const i=P,_=E([]),m=R(()=>{const u=b(i.route.path);return _.value=Array.from({length:u.length},()=>""),u});function b(u){return u.split(/(:\w+[\?\*]?(?:\(\))?)/).filter(Boolean).map(c=>c[0]===":"?c.replace(/\(\)$/,"?"):c)}const w=R(()=>m.value.map((u,c)=>u[0]===":"?_.value[c]:u).join("").replace(/\/+/g,"/")),r=R(()=>i.route.path.includes(":"));function a(){d("navigate",w.value)}return(u,c)=>{const C=M,n=W,l=j("VDropdown");return t(r)?(o(),v(l,{key:1},{popper:k(({hide:f})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:q(()=>{a(),f()},["prevent"])},[t(r)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,B(t(m),(g,x)=>(o(),s(h,{key:x},[g[0]===":"?(o(),v(C,{key:0,modelValue:t(_)[x],"onUpdate:modelValue":T=>t(_)[x]=T,"w-20":"","n-sm":"",placeholder:g.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(g),1))],64))),128))])],64)):y("",!0),p(n,{block:"",n:"primary"},{default:k(()=>[V(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,B(t(m),(f,g)=>(o(),s("span",{key:g,class:L(f[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(f[0]===":"?f.slice(1):f),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:a},[e("code",null,$(u.route.path),1)]))}}}),he={"w-full":""},me=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},be={op0:"","group-hover:op100":"",flex:"~ gap1"},xe=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Re={key:0},Pe=["onClick"],Ve=I({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const d=P,i=H(),_=D(),m=R(()=>[...d.pages].sort((r,a)=>r.path.localeCompare(a.path)));function b(r){const a=d.layouts.find(u=>u.name===r);a&&i(a.file)}function w(r){if(typeof r=="string")return _.value?.middleware.find(a=>a.name===r)?.path}return(r,a)=>{const u=S,c=_e,C=F;return o(),s("div",null,[e("table",he,[me,e("tbody",null,[(o(!0),s(h,null,B(t(m),n=>(o(),s("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[r.matched.find(l=>l.name===n.name)?(o(),v(u,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):y("",!0),r.matchedPending.find(l=>l.name===n.name)?(o(),v(u,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):y("",!0)])]),e("td",ve,[e("div",ye,[p(c,{route:n,class:L(r.matched.find(l=>l.name===n.name)?"text-primary":r.matchedPending.find(l=>l.name===n.name)?"text-teal":""),onNavigate:a[0]||(a[0]=l=>r.$emit("navigate",l))},null,8,["route","class"]),e("div",be,[n.file||n.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>t(i)(n.file||n.meta?.file)},$e,8,xe)):y("",!0)])])]),e("td",we,$(n.name),1),e("td",Ce,[p(C,{filepath:w(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[n.meta.layout===!1?(o(),s("span",Re,"-")):n.meta.layout?(o(),s("button",{key:1,onClick:l=>b(n.meta.layout)},$(n.meta.layout),9,Pe)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:a[1]||(a[1]=l=>b("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te=e("h1",null,"Pages",-1),Ie=e("p",null,[V("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),V(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Le=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ae=e("hr",null,null,-1),Ee=e("h1",null,"Middlewares",-1),Me=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),De=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Se=[Te,Ie,Le,Ae,Ee,Me,De],Fe={__name:"pages",setup(P,{expose:d}){return d({frontmatter:{}}),(_,m)=>(o(),s("div",Be,Se))}},Oe={key:0,"h-full":"","of-auto":""},Ue={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},ze=e("span",{op50:""},"Navigate from ",-1),Ke={"font-mono":""},je=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},We=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},Qe={"w-full":""},Ze=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ge={mr1:""},lt=I({__name:"pages",setup(P){const d=J(),i=Q(),_=Z(),m=D(),b=G(),w=X(),r=R(()=>m.value?.middleware||[]),a=E("");A(i).toBeTruthy().then(n=>{a.value=n.path}),A(d).toBeTruthy().then(n=>{n.afterEach(()=>{Y(()=>{a.value=i.value.path})})});async function u(){a.value!==i.value.path&&d.value.push(a.value||"/")}const c=R(()=>a.value===i.value.path?[]:d.value.resolve(a.value||"/").matched);function C(n){d.value.push(n)}return(n,l)=>{const f=M,g=Ve,x=ae,T=S,O=F,U=se,z=Fe,K=re;return o(),s(h,null,[t(_)?.pages&&t(d)?(o(),s("div",Oe,[e("div",Ue,[e("div",null,[t(i).path!==t(a)?(o(),s(h,{key:0},[ze,e("span",Ke,$(t(i).path),1),je],64)):(o(),s("span",qe,"Current route"))]),p(f,{modelValue:t(a),"onUpdate:modelValue":l[0]||(l[0]=N=>ee(a)?a.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(t(i).path===t(a)?"":t(c).length?"text-green":"text-orange"),onKeydown:te(u,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(i).path!==t(a)?(o(),s(h,{key:0},[We,t(c).length?y("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),t(c).length?(o(),v(x,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(g,{pages:t(c),layouts:t(b)||[],matched:[],"matched-pending":t(c),onNavigate:C},null,8,["pages","layouts","matched-pending"])]),_:1})):y("",!0),p(x,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(w).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(g,{pages:t(w),layouts:t(b)||[],matched:t(i).matched,"matched-pending":t(c),onNavigate:C},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(r).length?(o(),v(x,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(r).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",Qe,[Ze,(o(!0),s(h,null,B(t(r),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ge,$(N.name),1),N.global?(o(),v(T,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):y("",!0)]),e("td",null,[p(O,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):y("",!0)])):(o(),v(U,{key:1,icon:"carbon-tree-view-alt",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in n?n.rpc:t(oe)).runWizard(await("ensureDevAuthToken"in n?n.ensureDevAuthToken:t(ne))(),"enablePages")}}]},null,8,["actions"])),p(K,null,{default:k(()=>[p(z)]),_:1})],64)}}});export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as y}from"./StateEditor.vue.
|
|
1
|
+
import{_ as y}from"./StateEditor.vue.0146462c.js";import{g as k,o as e,c,F as x,n as B,h as m,w as o,Y as C,aH as D,aI as w,a as $,ah as F,m as O,s as r,b as a,v as u,d as P,k as V,S as E}from"./entry.331cb74a.js";import{_ as H}from"./NSectionBlock.36261208.js";import{_ as R}from"./HelpFab.vue.d8b5b257.js";import"./json-editor-vue.f57c50c1.js";import"./NIconTitle.vue.2bd823c1.js";const j={key:0,flex:"~ col gap-1"},A={key:1,mt2:"",px4:"",italic:"",op35:""},G=k({__name:"StateGroup",props:{state:{},prefix:{default:""}},setup(f){return(t,n)=>{const i=y;return e(),c("div",null,[t.state&&Object.keys(t.state).length>0?(e(),c("div",j,[(e(!0),c(x,null,B(t.state,(l,s)=>(e(),m(i,{key:s,state:l,name:s.startsWith(t.prefix)?s.slice(t.prefix.length):s},{actions:o(_=>[C(t.$slots,"actions",D(w(_)))]),_:2},1032,["state","name"]))),128))])):(e(),c("div",A," No data "))])}}}),I={class:"markdown-body"},K=$("h1",null,"State & Async Data",-1),T=$("p",null,"// TODO",-1),z=[K,T],L={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(i,l)=>(e(),c("div",I,z))}},W={key:0},Z=k({__name:"payload",setup(f){const t=F(),n=O(()=>t.value?.nuxt.payload);async function i(l){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",l)}return(l,s)=>{const _=G,p=H,b=V,v=E,S=y,g=L,N=R;return e(),c(x,null,[r(t)?(e(),c("div",W,[a(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:o(()=>[a(_,{state:r(n).state,prefix:"$s"},null,8,["state"])]),_:1}),a(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:o(()=>[a(b,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:s[0]||(s[0]=h=>i())},{default:o(()=>[P(" Re-fetch all data ")]),_:1})]),default:o(()=>[a(_,{state:r(n).data},{actions:o(({isOpen:h,name:d})=>[h&&d?(e(),m(v,{key:0,title:`Re-fetch '${d}'`,icon:"carbon-recycle",onClick:Y=>i([d])},null,8,["title","onClick"])):u("",!0)]),_:1},8,["state"])]),_:1}),r(n).functions&&Object.keys(r(n).functions).length?(e(),m(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:o(()=>[a(S,{"ml--6":"",state:r(n).functions},null,8,["state"])]),_:1})):u("",!0)])):u("",!0),a(N,null,{default:o(()=>[a(g)]),_:1})],64)}}});export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./FilepathItem.vue.
|
|
1
|
+
import{_ as S}from"./FilepathItem.vue.c12140f3.js";import{_ as D}from"./Badge.6a68ac78.js";import{_ as C}from"./DurationDisplay.vue.ae436800.js";import{g as v,a1 as B,m as x,a_ as V,o as n,c as m,a as t,t as P,b as l,s as f,h as u,v as d,ae as F,Y as T,T as H,_ as I,w as h,d as y,b0 as M,ah as E,F as k,n as W,q as L}from"./entry.331cb74a.js";import{_ as Y}from"./NSectionBlock.36261208.js";import{_ as j}from"./HelpFab.vue.d8b5b257.js";import"./NIconTitle.vue.2bd823c1.js";const q={flex:"~ gap2","items-center":""},z={w8:"","text-right":"","text-sm":"",op25:""},A={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",q,[t("div",z,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",A,[l(s,{duration:i.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),G={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",G,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[T(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[T(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=M(),a=E(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.clientPluginMetrics||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.clientPluginMetrics||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,g=Y,w=nt,N=j;return n(),m(k,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[t("div",ot,[(n(!0),m(k,null,W(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:h(()=>[l(w)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as C}from"./StateEditor.vue.
|
|
1
|
+
import{_ as C}from"./StateEditor.vue.0146462c.js";import{_ as h}from"./NSectionBlock.36261208.js";import{o as c,c as r,a as m,g as v,ah as x,a1 as b,m as u,s as o,b as e,w as s,v as y,F as k}from"./entry.331cb74a.js";import{_ as R}from"./HelpFab.vue.d8b5b257.js";import"./json-editor-vue.f57c50c1.js";import"./NIconTitle.vue.2bd823c1.js";const B={class:"markdown-body"},N=m("h1",null,"Runtime Configs",-1),$=m("p",null,"// TODO:",-1),w=[N,$],D={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,w))}},F={key:0},H=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=u(()=>t.value?.nuxt.payload),p=u(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,S)=>{const a=C,i=h,f=D,g=R;return c(),r(k,null,[o(t)?(c(),r("div",F,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(t).appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(l).config?.public},null,8,["state"])]),_:1}),e(i,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:s(()=>[e(a,{state:o(p),readonly:""},null,8,["state"])]),_:1})])):y("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{H as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as O,b3 as Le,an as Be,al as Ae,ab as he,b4 as Me,b5 as Fe,b6 as We,g as le,b7 as ye,o as n,c as p,a as c,q as E,h as C,s as e,b8 as se,t as j,v as D,d as B,W as ze,Y,F as V,n as A,T as de,X as He,m as R,b as f,w as k,M as ge,k as _e,A as be,b9 as Je,ba as Ge,bb as Ke,a1 as Qe,aj as ie,Z as Xe,am as Ye,L as Z,aE as Ze,S as ke,i as xe,bc as et,bd as tt,a5 as ot,J as nt,be as st,ad as lt}from"./entry.6507cb32.js";import{_ as at}from"./Navbar.vue.1a2a587f.js";import{_ as Ce}from"./Badge.8d650e3b.js";import{_ as we}from"./NSelect.vue.9556d6e0.js";import{_ as rt}from"./NCheckbox.vue.63949e52.js";import{_ as ut}from"./CodeSnippets.vue.b4698473.js";import{_ as it}from"./NCodeBlock.vue.77e54b2e.js";import{C as me,S as $e}from"./constants.4e5eba24.js";import{U as dt}from"./json-editor-vue.bbdad521.js";import{_ as ct}from"./NSectionBlock.b074e0b8.js";import{_ as pt}from"./DrawerRight.vue.3ab85e5b.js";import"./client.ece13385.js";import"./NIconTitle.vue.0a904b99.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function ft(l,h){if(typeof l!="string")throw new TypeError("argument str must be a string");const m={},w=(h||{}).decode||ht;let _=0;for(;_<l.length;){const t=l.indexOf("=",_);if(t===-1)break;let y=l.indexOf(";",_);if(y===-1)y=l.length;else if(y<t){_=l.lastIndexOf(";",t-1)+1;continue}const r=l.slice(_,t).trim();if(m[r]===void 0){let a=l.slice(t+1,y).trim();a.codePointAt(0)===34&&(a=a.slice(1,-1)),m[r]=vt(a,w)}_=y+1}return m}function ve(l,h,m){const o=m||{},w=o.encode||yt;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!ne.test(l))throw new TypeError("argument name is invalid");const _=w(h);if(_&&!ne.test(_))throw new TypeError("argument val is invalid");let t=l+"="+_;if(o.maxAge!==void 0&&o.maxAge!==null){const y=o.maxAge-0;if(Number.isNaN(y)||!Number.isFinite(y))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(y)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");t+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");t+="; Path="+o.path}if(o.expires){if(!mt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");t+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(t+="; HttpOnly"),o.secure&&(t+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":t+="; Priority=Low";break;case"medium":t+="; Priority=Medium";break;case"high":t+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:t+="; SameSite=Strict";break;case"lax":t+="; SameSite=Lax";break;case"strict":t+="; SameSite=Strict";break;case"none":t+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return t}function mt(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}function vt(l,h){try{return h(l)}catch{return l}}function ht(l){return l.includes("%")?decodeURIComponent(l):l}function yt(l){return encodeURIComponent(l)}const gt={path:"/",watch:!0,decode:l=>Fe(decodeURIComponent(l)),encode:l=>encodeURIComponent(typeof l=="string"?l:JSON.stringify(l))};function _t(l,h){const m={...gt,...h},o=bt(m)||{},w=O(o[l]??m.default?.());{const _=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${l}`);Le()&&Be(()=>{_?.close()});const t=()=>{xt(l,w.value,m),_?.postMessage(We(w.value))};let y=!1;_&&(_.onmessage=r=>{y=!0,w.value=r.data,Ae(()=>{y=!1})}),m.watch?he(w,(r,a)=>{y||Me(r,a)||t()},{deep:m.watch!=="shallow"}):t()}return w}function bt(l={}){return ft(document.cookie,l)}function kt(l,h,m={}){return h==null?ve(l,h,{...m,maxAge:-1}):ve(l,h,m)}function xt(l,h,m={}){document.cookie=kt(l,h,m)}const Ct=c("div",{"x-divider":""},null,-1),Se=le({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(l){const h=O(!0),m=ye();return(o,w)=>{const _=de,t=Ce,y=Se;return n(),p("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:E([{"bg-active":e(m)===o.item.filepath}]),style:ze({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:w[0]||(w[0]=r=>{h.value=!e(h),m.value=o.item.filepath})},[c("div",{class:E({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(n(),C(_,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(h)?90:0,transition:""},null,8,["transform-rotate"])):(n(),C(t,{key:1,class:E(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:j((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:E({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(n(),C(_,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),B(" "+j(o.item.route),1)],2)],6),Ct,e(h)?Y(o.$slots,"default",{key:0},()=>[(n(!0),p(V,null,A(o.item.routes,r=>(n(),C(y,{key:r.filepath,item:r,index:o.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),wt={p4:"",flex:"~ col gap-4"},$t={key:1,ml2:"",flex:""},St=["value"],Tt={key:0,flex:"","gap-4":""},Rt=c("div",{"flex-auto":""},null,-1),Te=le({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(l,{emit:h}){const m=l,o=He(m,"modelValue",h,{passive:!0}),w=R(()=>[...m.keys,"key","value","type"]),_=R(()=>{const r={};for(const a of w.value)r[a]=m.default[a]||"";return r}),t=["string","number","boolean","file","date","time","datetime-local"];function y(r,a){const U=a.target;if(U.files&&U.files[0]){const J=U.files[0],M=new FileReader;M.readAsDataURL(J),M.onload=()=>{o.value[r].value=M.result}}}return he(()=>o,r=>{r.value.forEach(a=>{if(a.type==="number"&&typeof a.value!="number"){const U=Number.parseFloat(a.value);a.value=Number.isNaN(U)?0:U}else a.type==="boolean"&&typeof a.value!="boolean"?a.value=!0:a.type==="file"&&typeof a.value!="object"?a.value="":a.type==="date"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}$/)?a.value=new Date().toISOString().slice(0,10):a.type==="time"&&typeof a.value=="string"&&!a.value.match(/^\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(11,16):a.type==="datetime-local"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(0,16):a.type==="string"&&(a.value=a.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(r,a)=>{const U=ge,J=rt,M=we,z=de,v=_e;return n(),p("div",wt,[(n(!0),p(V,null,A(e(o),(d,x)=>(n(),p("div",{key:x,flex:"~ gap-2","justify-around":""},[Y(r.$slots,"input",{item:d}),(n(!0),p(V,null,A(e(w),$=>(n(),p(V,{key:$},[d.type!==null&&$==="key"?(n(),C(U,{key:0,modelValue:d[$],"onUpdate:modelValue":g=>d[$]=g,placeholder:$,"flex-1":"","font-mono":"",n:"sm primary",disabled:r.disabled,class:E(r.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):$==="value"?(n(),p(V,{key:1},[d.type==="file"?(n(),C(U,{key:0,type:"file",disabled:r.disabled,class:E(r.disabled?"op75":""),onChange:g=>y(x,g)},null,8,["disabled","class","onChange"])):d.type==="boolean"?(n(),p("div",$t,[f(J,{modelValue:d.value,"onUpdate:modelValue":g=>d.value=g,placeholder:"Value",n:"green lg",disabled:r.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(n(),C(U,{key:2,modelValue:d.value,"onUpdate:modelValue":g=>d.value=g,type:d.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:r.disabled,class:E(r.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):$==="type"?(n(),C(M,{key:2,modelValue:d.type,"onUpdate:modelValue":g=>d.type=g,n:"sm green",class:E(r.disabled?"op75":""),disabled:r.disabled},{default:k(()=>[(n(),p(V,null,A(t,g=>c("option",{key:g,value:g},j(g),9,St)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),Y(r.$slots,"input-actions",{},()=>[f(v,{n:"red",disabled:r.disabled,class:E(r.disabled?"op0!":""),onClick:$=>e(o).splice(x,1)},{default:k(()=>[f(z,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),r.disabled?D("",!0):(n(),p("div",Tt,[Y(r.$slots,"actions",{params:e(o)},()=>[f(v,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=d=>e(o).push({...e(_)}))},{default:k(()=>[B(" Add ")]),_:1}),Rt,e(o).length?(n(),C(v,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=d=>o.value=[])},{default:k(()=>[B(" Remove All ")]),_:1})):D("",!0)])])),Y(r.$slots,"default")])}}}),Re=O(await be.getOptions("serverRoutes")),Vt=Je(Re),Ut={serverRoutes:Vt};function Ve(l){return Ut[l]}Ge(Re,async l=>{be.updateOptions("serverRoutes",l)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const It={"h-full":"","w-full":"",flex:"~ col"},Nt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Dt={flex:"~ gap2"},Et={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},jt=c("div",{"flex-auto":""},null,-1),Ot={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Pt={"text-right":"","font-mono":""},qt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Lt={flex:"~ gap-4"},Bt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},At=c("div",{"w-5":"","x-divider":""},null,-1),Mt=c("div",{"flex-none":""}," Default Inputs ",-1),Ft=c("div",{"x-divider":""},null,-1),Wt={key:2},zt={key:3,border:"b base",relative:"","n-code-block":""},Ht={flex:"~ wrap","w-full":""},Jt=["onClick"],Gt=c("div",{border:"b base","flex-auto":""},null,-1),Kt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Qt=c("div",null,"Response",-1),Xt={key:1,"text-xs":"",op50:""},Yt=c("div",{"flex-auto":""},null,-1),Zt=c("div",{op50:""}," Request finished in ",-1),eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},so={border:"~ base",rounded:""},lo=["src"],ao={key:1,controls:"",rounded:""},ro=["src"],uo=le({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(l,{emit:h}){const m=l,[o,w]=Ke(),_=Qe(),t=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>t.contentType.includes("application/json")?"json":t.contentType.includes("text/html")?"html":t.contentType.includes("text/css")?"css":t.contentType.includes("text/javascript")?"javascript":t.contentType.includes("image")||t.contentType.includes("video")?"media":t.contentType.includes("text/xml")||t.contentType.includes("application/xml")?"xml":t.contentType.includes("application/pdf")?"pdf":"text"),r=R(()=>{if(y.value==="json")return JSON.stringify(t.data,null,2);if(y.value==="media"||y.value==="pdf"){const s=new Blob([t.data],{type:t.contentType});return URL.createObjectURL(s)}return t.data}),a=O(!1),U=O(!1),J=Xe(),M=R(()=>m.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),z=R(()=>M.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),v=O(m.route.method||"GET"),d=O({}),x=ie({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),$=O({}),{inputDefaults:g}=Ve("serverRoutes"),P=["GET","POST","PUT","PATCH","DELETE","HEAD"],q=["PATCH","POST","PUT","DELETE"],L=R(()=>q.includes(v.value.toUpperCase())),S=O(z.value.length?"params":"query"),ee=["input","json"],W=O(ee[0]),K=R({get:()=>x[S.value],set:s=>{x[S.value]=s}}),T=R(()=>({...G(g.value.query),...G(x.query)})),te=R(()=>({...G(g.value.headers),...G(x.headers)})),ae=R(()=>L.value?W.value==="json"?{...G(g.value.body),...$.value}:{...G(g.value.body),...G(x.body)}:void 0),Ue=R(()=>{let s=_.value?.devServer.url||"http://localhost";s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1));const i=_.value?.devServer.port||3e3;return s.includes(`:${i}`)?s:`${s}:${i}`}),oe=R(()=>{let s=new URLSearchParams(T.value).toString();s&&(s=`?${s}`);const i=(M.value?.map(N=>(N.startsWith(":")||N.startsWith("**:"))&&d.value[N]||N).join("")||"")+s;let b=_.value?.app.baseURL||"";return(b==="./"||b===".")&&(b=""),b.endsWith("/")&&(b=b.slice(0,-1)),b+i}),Ie=R(()=>Ue.value+oe.value);function G(s){const i=Object.fromEntries(s.filter(({key:b,value:N})=>b&&N!==void 0).map(({key:b,value:N})=>[b,N]));return Object.entries(i).length?i:void 0}async function ce(){U.value=!0,a.value=!0;const s=Date.now();try{t.data=await $fetch(Ie.value,{method:v.value.toUpperCase(),headers:te.value,query:T.value,body:ae.value,onResponse({response:i}){t.contentType=(i.headers.get("content-type")||"").toString().toLowerCase().trim(),t.statusCode=i.status},onResponseError(i){t.error=i.response._data,t.data=i.response._data}})}catch{}a.value=!1,t.fetchTime=Date.now()-s}const pe=R(()=>{const s=[],i=[],b=Object.entries(te.value).filter(([I,F])=>I&&F&&!(I==="Content-Type"&&F==="application/json")).map(([I,F])=>` '${I}': '${F}'`).join(`,
|
|
1
|
+
import{r as O,b3 as Le,an as Be,al as Ae,ab as he,b4 as Me,b5 as Fe,b6 as We,g as le,b7 as ye,o as n,c as p,a as c,q as E,h as C,s as e,b8 as se,t as j,v as D,d as B,W as ze,Y,F as V,n as A,T as de,X as He,m as R,b as f,w as k,M as ge,k as _e,A as be,b9 as Je,ba as Ge,bb as Ke,a1 as Qe,aj as ie,Z as Xe,am as Ye,L as Z,aE as Ze,S as ke,i as xe,bc as et,bd as tt,a5 as ot,J as nt,be as st,ad as lt}from"./entry.331cb74a.js";import{_ as at}from"./Navbar.vue.f3d9c7e0.js";import{_ as Ce}from"./Badge.6a68ac78.js";import{_ as we}from"./NSelect.vue.5b8827ac.js";import{_ as rt}from"./NCheckbox.vue.4cf6f83b.js";import{_ as ut}from"./CodeSnippets.vue.dc4d9439.js";import{_ as it}from"./NCodeBlock.vue.cd2d281d.js";import{C as me,S as $e}from"./constants.4e5eba24.js";import{U as dt}from"./json-editor-vue.f57c50c1.js";import{_ as ct}from"./NSectionBlock.36261208.js";import{_ as pt}from"./DrawerRight.vue.76906913.js";import"./client.1d68892a.js";import"./NIconTitle.vue.2bd823c1.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function ft(l,h){if(typeof l!="string")throw new TypeError("argument str must be a string");const m={},w=(h||{}).decode||ht;let _=0;for(;_<l.length;){const t=l.indexOf("=",_);if(t===-1)break;let y=l.indexOf(";",_);if(y===-1)y=l.length;else if(y<t){_=l.lastIndexOf(";",t-1)+1;continue}const r=l.slice(_,t).trim();if(m[r]===void 0){let a=l.slice(t+1,y).trim();a.codePointAt(0)===34&&(a=a.slice(1,-1)),m[r]=vt(a,w)}_=y+1}return m}function ve(l,h,m){const o=m||{},w=o.encode||yt;if(typeof w!="function")throw new TypeError("option encode is invalid");if(!ne.test(l))throw new TypeError("argument name is invalid");const _=w(h);if(_&&!ne.test(_))throw new TypeError("argument val is invalid");let t=l+"="+_;if(o.maxAge!==void 0&&o.maxAge!==null){const y=o.maxAge-0;if(Number.isNaN(y)||!Number.isFinite(y))throw new TypeError("option maxAge is invalid");t+="; Max-Age="+Math.floor(y)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");t+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");t+="; Path="+o.path}if(o.expires){if(!mt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");t+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(t+="; HttpOnly"),o.secure&&(t+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":t+="; Priority=Low";break;case"medium":t+="; Priority=Medium";break;case"high":t+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:t+="; SameSite=Strict";break;case"lax":t+="; SameSite=Lax";break;case"strict":t+="; SameSite=Strict";break;case"none":t+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return t}function mt(l){return Object.prototype.toString.call(l)==="[object Date]"||l instanceof Date}function vt(l,h){try{return h(l)}catch{return l}}function ht(l){return l.includes("%")?decodeURIComponent(l):l}function yt(l){return encodeURIComponent(l)}const gt={path:"/",watch:!0,decode:l=>Fe(decodeURIComponent(l)),encode:l=>encodeURIComponent(typeof l=="string"?l:JSON.stringify(l))};function _t(l,h){const m={...gt,...h},o=bt(m)||{},w=O(o[l]??m.default?.());{const _=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${l}`);Le()&&Be(()=>{_?.close()});const t=()=>{xt(l,w.value,m),_?.postMessage(We(w.value))};let y=!1;_&&(_.onmessage=r=>{y=!0,w.value=r.data,Ae(()=>{y=!1})}),m.watch?he(w,(r,a)=>{y||Me(r,a)||t()},{deep:m.watch!=="shallow"}):t()}return w}function bt(l={}){return ft(document.cookie,l)}function kt(l,h,m={}){return h==null?ve(l,h,{...m,maxAge:-1}):ve(l,h,m)}function xt(l,h,m={}){document.cookie=kt(l,h,m)}const Ct=c("div",{"x-divider":""},null,-1),Se=le({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(l){const h=O(!0),m=ye();return(o,w)=>{const _=de,t=Ce,y=Se;return n(),p("div",null,[c("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:E([{"bg-active":e(m)===o.item.filepath}]),style:ze({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:w[0]||(w[0]=r=>{h.value=!e(h),m.value=o.item.filepath})},[c("div",{class:E({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(n(),C(_,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(h)?90:0,transition:""},null,8,["transform-rotate"])):(n(),C(t,{key:1,class:E(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:j((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),c("span",{class:E({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(n(),C(_,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):D("",!0),B(" "+j(o.item.route),1)],2)],6),Ct,e(h)?Y(o.$slots,"default",{key:0},()=>[(n(!0),p(V,null,A(o.item.routes,r=>(n(),C(y,{key:r.filepath,item:r,index:o.index+1},null,8,["item","index"]))),128))]):D("",!0)])}}}),wt={p4:"",flex:"~ col gap-4"},$t={key:1,ml2:"",flex:""},St=["value"],Tt={key:0,flex:"","gap-4":""},Rt=c("div",{"flex-auto":""},null,-1),Te=le({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(l,{emit:h}){const m=l,o=He(m,"modelValue",h,{passive:!0}),w=R(()=>[...m.keys,"key","value","type"]),_=R(()=>{const r={};for(const a of w.value)r[a]=m.default[a]||"";return r}),t=["string","number","boolean","file","date","time","datetime-local"];function y(r,a){const U=a.target;if(U.files&&U.files[0]){const J=U.files[0],M=new FileReader;M.readAsDataURL(J),M.onload=()=>{o.value[r].value=M.result}}}return he(()=>o,r=>{r.value.forEach(a=>{if(a.type==="number"&&typeof a.value!="number"){const U=Number.parseFloat(a.value);a.value=Number.isNaN(U)?0:U}else a.type==="boolean"&&typeof a.value!="boolean"?a.value=!0:a.type==="file"&&typeof a.value!="object"?a.value="":a.type==="date"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}$/)?a.value=new Date().toISOString().slice(0,10):a.type==="time"&&typeof a.value=="string"&&!a.value.match(/^\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(11,16):a.type==="datetime-local"&&typeof a.value=="string"&&!a.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?a.value=new Date().toISOString().slice(0,16):a.type==="string"&&(a.value=a.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(r,a)=>{const U=ge,J=rt,M=we,z=de,v=_e;return n(),p("div",wt,[(n(!0),p(V,null,A(e(o),(d,x)=>(n(),p("div",{key:x,flex:"~ gap-2","justify-around":""},[Y(r.$slots,"input",{item:d}),(n(!0),p(V,null,A(e(w),$=>(n(),p(V,{key:$},[d.type!==null&&$==="key"?(n(),C(U,{key:0,modelValue:d[$],"onUpdate:modelValue":g=>d[$]=g,placeholder:$,"flex-1":"","font-mono":"",n:"sm primary",disabled:r.disabled,class:E(r.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):$==="value"?(n(),p(V,{key:1},[d.type==="file"?(n(),C(U,{key:0,type:"file",disabled:r.disabled,class:E(r.disabled?"op75":""),onChange:g=>y(x,g)},null,8,["disabled","class","onChange"])):d.type==="boolean"?(n(),p("div",$t,[f(J,{modelValue:d.value,"onUpdate:modelValue":g=>d.value=g,placeholder:"Value",n:"green lg",disabled:r.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(n(),C(U,{key:2,modelValue:d.value,"onUpdate:modelValue":g=>d.value=g,type:d.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:r.disabled,class:E(r.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):$==="type"?(n(),C(M,{key:2,modelValue:d.type,"onUpdate:modelValue":g=>d.type=g,n:"sm green",class:E(r.disabled?"op75":""),disabled:r.disabled},{default:k(()=>[(n(),p(V,null,A(t,g=>c("option",{key:g,value:g},j(g),9,St)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):D("",!0)],64))),128)),Y(r.$slots,"input-actions",{},()=>[f(v,{n:"red",disabled:r.disabled,class:E(r.disabled?"op0!":""),onClick:$=>e(o).splice(x,1)},{default:k(()=>[f(z,{icon:"carbon:delete"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),r.disabled?D("",!0):(n(),p("div",Tt,[Y(r.$slots,"actions",{params:e(o)},()=>[f(v,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:a[0]||(a[0]=d=>e(o).push({...e(_)}))},{default:k(()=>[B(" Add ")]),_:1}),Rt,e(o).length?(n(),C(v,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:a[1]||(a[1]=d=>o.value=[])},{default:k(()=>[B(" Remove All ")]),_:1})):D("",!0)])])),Y(r.$slots,"default")])}}}),Re=O(await be.getOptions("serverRoutes")),Vt=Je(Re),Ut={serverRoutes:Vt};function Ve(l){return Ut[l]}Ge(Re,async l=>{be.updateOptions("serverRoutes",l)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const It={"h-full":"","w-full":"",flex:"~ col"},Nt={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Dt={flex:"~ gap2"},Et={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},jt=c("div",{"flex-auto":""},null,-1),Ot={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Pt={"text-right":"","font-mono":""},qt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Lt={flex:"~ gap-4"},Bt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},At=c("div",{"w-5":"","x-divider":""},null,-1),Mt=c("div",{"flex-none":""}," Default Inputs ",-1),Ft=c("div",{"x-divider":""},null,-1),Wt={key:2},zt={key:3,border:"b base",relative:"","n-code-block":""},Ht={flex:"~ wrap","w-full":""},Jt=["onClick"],Gt=c("div",{border:"b base","flex-auto":""},null,-1),Kt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Qt=c("div",null,"Response",-1),Xt={key:1,"text-xs":"",op50:""},Yt=c("div",{"flex-auto":""},null,-1),Zt=c("div",{op50:""}," Request finished in ",-1),eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},so={border:"~ base",rounded:""},lo=["src"],ao={key:1,controls:"",rounded:""},ro=["src"],uo=le({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(l,{emit:h}){const m=l,[o,w]=Ke(),_=Qe(),t=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>t.contentType.includes("application/json")?"json":t.contentType.includes("text/html")?"html":t.contentType.includes("text/css")?"css":t.contentType.includes("text/javascript")?"javascript":t.contentType.includes("image")||t.contentType.includes("video")?"media":t.contentType.includes("text/xml")||t.contentType.includes("application/xml")?"xml":t.contentType.includes("application/pdf")?"pdf":"text"),r=R(()=>{if(y.value==="json")return JSON.stringify(t.data,null,2);if(y.value==="media"||y.value==="pdf"){const s=new Blob([t.data],{type:t.contentType});return URL.createObjectURL(s)}return t.data}),a=O(!1),U=O(!1),J=Xe(),M=R(()=>m.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),z=R(()=>M.value?.filter(s=>s.startsWith(":")||s.startsWith("**:"))||[]),v=O(m.route.method||"GET"),d=O({}),x=ie({query:[{key:"",value:"",type:"string"}],body:[{key:"",value:"",type:"string"}],headers:[{key:"Content-Type",value:"application/json",type:"string"}]}),$=O({}),{inputDefaults:g}=Ve("serverRoutes"),P=["GET","POST","PUT","PATCH","DELETE","HEAD"],q=["PATCH","POST","PUT","DELETE"],L=R(()=>q.includes(v.value.toUpperCase())),S=O(z.value.length?"params":"query"),ee=["input","json"],W=O(ee[0]),K=R({get:()=>x[S.value],set:s=>{x[S.value]=s}}),T=R(()=>({...G(g.value.query),...G(x.query)})),te=R(()=>({...G(g.value.headers),...G(x.headers)})),ae=R(()=>L.value?W.value==="json"?{...G(g.value.body),...$.value}:{...G(g.value.body),...G(x.body)}:void 0),Ue=R(()=>{let s=_.value?.devServer.url||"http://localhost";s.charAt(s.length-1)==="/"&&(s=s.slice(0,-1));const i=_.value?.devServer.port||3e3;return s.includes(`:${i}`)?s:`${s}:${i}`}),oe=R(()=>{let s=new URLSearchParams(T.value).toString();s&&(s=`?${s}`);const i=(M.value?.map(N=>(N.startsWith(":")||N.startsWith("**:"))&&d.value[N]||N).join("")||"")+s;let b=_.value?.app.baseURL||"";return(b==="./"||b===".")&&(b=""),b.endsWith("/")&&(b=b.slice(0,-1)),b+i}),Ie=R(()=>Ue.value+oe.value);function G(s){const i=Object.fromEntries(s.filter(({key:b,value:N})=>b&&N!==void 0).map(({key:b,value:N})=>[b,N]));return Object.entries(i).length?i:void 0}async function ce(){U.value=!0,a.value=!0;const s=Date.now();try{t.data=await $fetch(Ie.value,{method:v.value.toUpperCase(),headers:te.value,query:T.value,body:ae.value,onResponse({response:i}){t.contentType=(i.headers.get("content-type")||"").toString().toLowerCase().trim(),t.statusCode=i.status},onResponseError(i){t.error=i.response._data,t.data=i.response._data}})}catch{}a.value=!1,t.fetchTime=Date.now()-s}const pe=R(()=>{const s=[],i=[],b=Object.entries(te.value).filter(([I,F])=>I&&F&&!(I==="Content-Type"&&F==="application/json")).map(([I,F])=>` '${I}': '${F}'`).join(`,
|
|
2
2
|
`);v.value.toUpperCase()!=="GET"&&i.push(`method: '${v.value.toUpperCase()}'`),b&&i.push(`headers: {
|
|
3
3
|
${b}
|
|
4
4
|
}`),ae.value&&i.push(`body: ${JSON.stringify(ae.value,null,2)}`);const N=i.length?`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as F}from"./NIconTitle.vue.
|
|
1
|
+
import{_ as F}from"./NIconTitle.vue.2bd823c1.js";import{_ as q}from"./NSwitch.vue.f9054ae3.js";import{g as A,bw as H,aq as P,c as u,b as i,a as e,F as v,n as T,s as a,w as r,L as V,ac as E,bx as M,o as d,q as $,t as h,h as R,v as U,d as G,br as J,S as K,k as Q}from"./entry.331cb74a.js";import{_ as W}from"./NSelect.vue.5b8827ac.js";import{_ as X}from"./NCheckbox.vue.4cf6f83b.js";const Y={px6:"",py6:""},Z={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},ee={flex:"~ col gap-1",py3:""},ne=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),oe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},le={capitalize:"",op75:""},te={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},se=e("div",{"flex-auto":""},null,-1),ae={py3:"",flex:"~ col gap-1",border:"b base"},ie=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),ce=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),de={py3:"",flex:"~ col gap-1",border:"b base"},ue=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),re=["value"],pe={py3:"",flex:"~ col gap-1"},_e=e("h3",{mb1:"","text-lg":""}," Features ",-1),me=e("span",null,"Close DevTools when clicking outside",-1),fe=e("span",null,"Show help buttons",-1),ke=A({__name:"settings",setup(ve){const{interactionCloseOnOutsideClick:b,showHelpButtons:y,scale:k,hiddenTabs:_,pinnedTabs:t,hiddenTabCategories:m}=E(),S=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],B=H(P());function O(s,l){l?_.value=_.value.filter(c=>c!==s):_.value.push(s)}function D(s,l){l?m.value=m.value.filter(c=>c!==s):m.value.push(s)}function I(s){t.value.includes(s)?t.value=t.value.filter(l=>l!==s):t.value.push(s)}function w(s,l){const c=t.value.indexOf(s);if(c===-1)return;const p=c+l;if(p<0||p>=t.value.length)return;const f=[...t.value];f.splice(c,1),f.splice(p,0,s),t.value=f}return(s,l)=>{const c=F,p=q,f=J,C=K,L=Q,j=M,z=W,N=X;return d(),u("div",Y,[i(c,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",Z,[e("div",ee,[ne,(d(!0),u(v,null,T(a(B),([n,g])=>(d(),u(v,{key:n},[g.length?(d(),u("div",{key:0,flex:"~ col gap-1","mx--1":"",class:$(a(m).includes(n)?"op50 grayscale":""),"pt-2":""},[i(p,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!a(m).includes(n),"onUpdate:modelValue":o=>D(n,o)},{default:r(()=>[e("div",oe,[e("span",le,h(n),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",te,[(d(!0),u(v,null,T(g,o=>(d(),R(p,{key:o.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!a(_).includes(o.name),"onUpdate:modelValue":x=>O(o.name,x)},{default:r(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:$(a(_).includes(o.name)?"op25":"")},[i(f,{"text-xl":"",icon:o.icon,title:o.title},null,8,["icon","title"]),e("span",null,h(o.title),1),se,a(t).includes(o.name)?(d(),u(v,{key:0},[i(C,{icon:"i-carbon-caret-up",disabled:a(t).indexOf(o.name)===0,onClick:x=>w(o.name,-1)},null,8,["disabled","onClick"]),i(C,{icon:"i-carbon-caret-down",disabled:a(t).indexOf(o.name)===a(t).length-1,onClick:x=>w(o.name,1)},null,8,["disabled","onClick"])],64)):U("",!0),i(C,{icon:a(t).includes(o.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",onClick:x=>I(o.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):U("",!0)],64))),128))]),e("div",null,[e("div",ae,[ie,e("div",null,[i(j,null,{default:r(({toggle:n,isDark:g})=>[i(L,{n:"primary",onClick:n},{default:r(()=>[ce,G(" "+h(g.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",de,[ue,i(z,{modelValue:a(k),"onUpdate:modelValue":l[0]||(l[0]=n=>V(k)?k.value=n:null),n:"primary"},{default:r(()=>[(d(),u(v,null,T(S,n=>e("option",{key:n[0],value:n[1]},h(n[0]),9,re)),64))]),_:1},8,["modelValue"])]),e("div",pe,[_e,i(N,{modelValue:a(b),"onUpdate:modelValue":l[1]||(l[1]=n=>V(b)?b.value=n:null),"n-primary":""},{default:r(()=>[me]),_:1},8,["modelValue"]),i(N,{modelValue:a(y),"onUpdate:modelValue":l[2]||(l[2]=n=>V(y)?y.value=n:null),"n-primary":""},{default:r(()=>[fe]),_:1},8,["modelValue"])])])])])}}});export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ah as m,aW as n,m as s,A as o}from"./entry.
|
|
1
|
+
import{ah as m,aW as n,m as s,A as o}from"./entry.331cb74a.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{u as a,r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as E}from"./Badge.
|
|
1
|
+
import{_ as E}from"./Badge.6a68ac78.js";import{_ as F}from"./NCodeBlock.vue.cd2d281d.js";import{_ as L}from"./NCheckbox.vue.4cf6f83b.js";import{_ as W}from"./NTip.vue.cf493c45.js";import{g as Y,E as A,aX as G,r as V,aY as H,C as X,H as Z,o as m,c as v,Y as q,s as t,t as $,v as w,F as B,b as s,h as z,w as u,a as h,L as M,d as p,k as J,N as K,aZ as O,a1 as Q,m as ee,af as te,ag as ae,a_ as se,aW as ne}from"./entry.331cb74a.js";const oe={key:0},le={p4:"",flex:"~ col gap-1"},re={class:"text-lg font-medium leading-6"},ue=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ie={flex:"~ gap-3",mt2:"","justify-end":""},ge=Y({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const a=l,e=A(),{info:n,update:i,state:y,processId:k,restart:c}=G(a.packageName,a.options),f=V(!0),_=V(!0),U=H(),x=X(),R=Z();async function C(){const r=await i(async o=>x.start(o));r&&_.value&&U.value.push({id:r,message:`${a.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const N=E,S=F,b=L,T=W,P=J,I=K;return m(),v(B,null,[q(r.$slots,"default",{id:t(k),info:t(n),update:C,state:t(y),restart:t(c)},()=>[t(n)&&r.showVersion?(m(),v("code",oe,$(`v${t(n).current}`),1)):w("",!0),t(n)?.latest?(m(),v(B,{key:1},[t(n).needsUpdate?(m(),v("button",{key:0,onClick:o[0]||(o[0]=g=>C())},[s(N,{"bg-green-400:10":"","text-green-400":"",title:"updates available",textContent:"updates available"})])):(m(),z(N,{key:1,"bg-gray-400:10":"","text-gray-400":"",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(t(x),null,{default:u(({resolve:g,args:j})=>[s(I,{"model-value":!0,onClose:d=>g(!1)},{default:u(()=>[h("div",le,[h("h3",re," Update "+$(a.packageName)+"? ",1),ue,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(b,{modelValue:t(f),"onUpdate:modelValue":o[1]||(o[1]=d=>M(f)?f.value=d:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(b,{modelValue:t(_),"onUpdate:modelValue":o[2]||(o[2]=d=>M(_)?_.value=d:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ie,[s(T,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:u(()=>[p(" Experimental feature. Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:d=>g(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:d=>g(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),D=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return ne("getModulesList",async()=>(await $fetch("https://cdn.jsdelivr.net/npm/@nuxt/modules@latest/modules.json")).filter(a=>!D.includes(a.npm)&&a.compatibility.nuxt.includes("^3")))}function ve(){return O("installed-modules",()=>{const l=Q(),a=de();return ee(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&te(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ae(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=a.value?.find(c=>c.npm===i)||a.value?.find(c=>c.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!D.includes(e.name))))})}export{ge as _,de as a,ve as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as G,E as ae,r as j,G as R,bh as T,an as oe,ab as se,am as re,O as le,m as ue,A as f,B as k,s as t,o as r,h as _,w as u,a as l,b as d,L as U,c as i,F as w,n as D,t as b,q as P,aR as A,d as c,v as F,aE as ie,y as ce,a$ as de,bi as me,bj as _e,bk as z,S as pe,M as fe,T as ve,k as ye,ad as ge,i as he,J as ke}from"./entry.
|
|
1
|
+
import{g as G,E as ae,r as j,G as R,bh as T,an as oe,ab as se,am as re,O as le,m as ue,A as f,B as k,s as t,o as r,h as _,w as u,a as l,b as d,L as U,c as i,F as w,n as D,t as b,q as P,aR as A,d as c,v as F,aE as ie,y as ce,a$ as de,bi as me,bj as _e,bk as z,S as pe,M as fe,T as ve,k as ye,ad as ge,i as he,J as ke}from"./entry.331cb74a.js";import{_ as be}from"./NSelect.vue.5b8827ac.js";import{_ as xe}from"./NLink.vue.b78c8d55.js";import{_ as we}from"./FilepathItem.vue.c12140f3.js";import{U as Ce}from"./json-editor-vue.f57c50c1.js";import{_ as Ke}from"./AuthRequiredPanel.vue.8365f094.js";const Se={class:"h-[48px] flex items-center justify-between gap1 px-3"},$e={class:"w-full text-sm"},Ve=["value"],Ne=["onClick"],Ie=l("div",{"x-divider":""},null,-1),je={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ue={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},De={class:"flex items-center gap-4"},Ae={key:1},Be=["onKeyup"],Le=l("br",null,null,-1),Me={key:0,op50:""},qe={key:1},Ee=l("code",null,"nitro.storage",-1),Re=l("br",null,null,-1),Te={"font-bold":""},Pe=l("br",null,null,-1),Fe={"text-sm":""},ze=l("br",null,null,-1),Ge=G({__name:"StorageDetails",async setup(O){let m,g;const C=_e(),h=ae(),x=j(""),v=j(""),s=R("storage:current",""),e=j(),y=R("storage:file:state",""),{data:K}=([m,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),m=await m,g(),m),{data:S,refresh:B}=([m,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),m=await m,g(),m),J=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await B(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await V(y.value)}});oe(J),se(s,()=>{B(),y.value=""}),re(async()=>{if(!y.value){e.value=null;return}V(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function $(n){return n.replace(`${s.value}:`,"")}const W=ue(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function V(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:$(n),editingKey:!1,content:a,updatedContent:a}}async function H(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await V(e.value.key))}async function Q(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function X(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const Y=pe,Z=be,I=fe,ee=ve,L=ye,M=xe,q=ge,E=he,te=ke,ne=we;return t(s)?(r(),_(te,{key:0,"storage-key":"tab-storage"},{left:u(()=>[l("div",Se,[d(Y,{icon:"carbon-chevron-left","ml--1":"",onClick:a[0]||(a[0]=o=>s.value="")}),l("div",$e,[d(Z,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>U(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(r(!0),i(w,null,D(t(K),(o,p)=>(r(),i("option",{key:p,value:p},b(p),9,Ve))),128))]),_:1},8,["modelValue"])])]),d(I,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>U(x)?x.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),i(w,null,D(t(W),o=>(r(),i(w,{key:o},[l("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:P(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:p=>y.value=o},b($(o)),11,Ne),Ie],64))),128)),d(I,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>U(v)?v.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:A(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(r(),i("div",je,[l("div",Ue,[l("div",De,[t(e).editingKey?(r(),_(I,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:A(X,["enter"])},null,8,["modelValue","onKeyup"])):(r(),i("code",Ae,[c(b($(t(e).key))+" ",1),d(ee,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?F("",!0):(r(),_(L,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:P({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[c(" Save ")]),_:1},8,["disabled","class"]))]),l("div",null,[d(L,{n:"red xs",onClick:Q},{default:u(()=>[c(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(r(),_(t(Ce),ie({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ce((r(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:A(de(N,["ctrl"]),["enter"])},null,40,Be)),[[me,t(e).updatedContent]])])):(r(),_(E,{key:1},{default:u(()=>[d(q,{px6:"",py4:""},{default:u(()=>[c(" Select one key to start."),Le,c("Learn more about "),d(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[c(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),_(E,{key:1},{default:u(()=>[Object.keys(t(K)).length?(r(),i("p",Me," Select one storage to start: ")):(r(),i("p",qe,[c(" No custom storage defined in "),Ee,c("."),Re,c(" Learn more about "),d(M,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[c(" Nitro storage ")]),_:1})])),(r(!0),i(w,null,D(t(K),(o,p)=>(r(),_(q,{key:p,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Oe=>s.value=p},{default:u(()=>[l("span",Te,b(p),1),Pe,l("span",Fe,b(o.driver)+" driver",1),ze,o.base?(r(),_(ne,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):F("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Ze=G({__name:"storage",setup(O){return(m,g)=>{const C=Ge,h=Ke;return r(),_(h,null,{default:u(()=>[d(C)]),_:1})}}});export{Ze as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as ae,r as he,aa as Se,O as me,A as re,B as Ce,o as Q,c as ie,a as te,b as de,s as J,h as se,v as oe,t as ne,F as _e,bj as be,S as ue,bl as ye,H as we,m as Ee,am as Le,n as ke,q as ce,a$ as Re,d as le,T as De,w as Ae}from"./entry.
|
|
1
|
+
import{g as ae,r as he,aa as Se,O as me,A as re,B as Ce,o as Q,c as ie,a as te,b as de,s as J,h as se,v as oe,t as ne,F as _e,bj as be,S as ue,bl as ye,H as we,m as Ee,am as Le,n as ke,q as ce,a$ as Re,d as le,T as De,w as Ae}from"./entry.331cb74a.js";import{_ as xe}from"./AuthRequiredPanel.vue.8365f094.js";var fe={exports:{}};(function(ee,Z){(function(X,q){ee.exports=q()})(self,()=>(()=>{var X={4567:function(M,s,a){var h=this&&this.__decorate||function(t,n,c,v){var g,o=arguments.length,S=o<3?n:v===null?v=Object.getOwnPropertyDescriptor(n,c):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(t,n,c,v);else for(var C=t.length-1;C>=0;C--)(g=t[C])&&(S=(o<3?g(S):o>3?g(n,c,S):g(n,c))||S);return o>3&&S&&Object.defineProperty(n,c,S),S},u=this&&this.__param||function(t,n){return function(c,v){n(c,v,t)}};Object.defineProperty(s,"__esModule",{value:!0}),s.AccessibilityManager=void 0;const d=a(9042),_=a(6114),p=a(9924),f=a(844),l=a(5596),e=a(4725),r=a(3656);let i=class extends f.Disposable{constructor(t,n){super(),this._terminal=t,this._renderService=n,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let c=0;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);if(this._topBoundaryFocusListener=c=>this._handleBoundaryFocus(c,0),this._bottomBoundaryFocusListener=c=>this._handleBoundaryFocus(c,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._announceCharacters.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._liveRegionDebouncer),this.register(this._terminal.onResize(c=>this._handleResize(c.rows))),this.register(this._terminal.onRender(c=>this._refreshRows(c.start,c.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(c=>this._handleChar(c))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(c=>this._handleTab(c))),this.register(this._terminal.onKey(c=>this._handleKey(c.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new l.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,r.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,f.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(t){for(let n=0;n<t;n++)this._handleChar(" ")}_handleChar(t){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==t&&(this._charsToAnnounce+=t):this._charsToAnnounce+=t,t===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.tooMuchOutput)),_.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,_.isMac&&this._liveRegion.remove()}_handleKey(t){this._clearLiveRegion(),/\p{Control}/u.test(t)||this._charsToConsume.push(t)}_refreshRows(t,n){this._liveRegionDebouncer.refresh(t,n,this._terminal.rows)}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(t,n){const c=t.target,v=this._rowElements[n===0?1:this._rowElements.length-2];if(c.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||t.relatedTarget!==v)return;let g,o;if(n===0?(g=c,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(g=this._rowElements.shift(),o=c,this._rowContainer.removeChild(g)),g.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),t.preventDefault(),t.stopImmediatePropagation()}_handleResize(t){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const t=document.createElement("div");return t.setAttribute("role","listitem"),t.tabIndex=-1,this._refreshRowDimensions(t),t}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let t=0;t<this._terminal.rows;t++)this._refreshRowDimensions(this._rowElements[t])}}_refreshRowDimensions(t){t.style.height=`${this._renderService.dimensions.css.cell.height}px`}};i=h([u(1,e.IRenderService)],i),s.AccessibilityManager=i},3614:(M,s)=>{function a(_){return _.replace(/\r?\n/g,"\r")}function h(_,p){return p?"\x1B[200~"+_+"\x1B[201~":_}function u(_,p,f){_=h(_=a(_),f.decPrivateModes.bracketedPasteMode),f.triggerDataEvent(_,!0),p.value=""}function d(_,p,f){const l=f.getBoundingClientRect(),e=_.clientX-l.left-10,r=_.clientY-l.top-10;p.style.width="20px",p.style.height="20px",p.style.left=`${e}px`,p.style.top=`${r}px`,p.style.zIndex="1000",p.focus()}Object.defineProperty(s,"__esModule",{value:!0}),s.rightClickHandler=s.moveTextAreaUnderMouseCursor=s.paste=s.handlePasteEvent=s.copyHandler=s.bracketTextForPaste=s.prepareTextForTerminal=void 0,s.prepareTextForTerminal=a,s.bracketTextForPaste=h,s.copyHandler=function(_,p){_.clipboardData&&_.clipboardData.setData("text/plain",p.selectionText),_.preventDefault()},s.handlePasteEvent=function(_,p,f){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),p,f)},s.paste=u,s.moveTextAreaUnderMouseCursor=d,s.rightClickHandler=function(_,p,f,l,e){d(_,p,f),e&&l.rightClickSelect(_),p.value=l.selectionText,p.select()}},7239:(M,s,a)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ColorContrastCache=void 0;const h=a(1505);s.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(u,d,_){this._css.set(u,d,_)}getCss(u,d){return this._css.get(u,d)}setColor(u,d,_){this._color.set(u,d,_)}getColor(u,d){return this._color.get(u,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.addDisposableDomListener=void 0,s.addDisposableDomListener=function(a,h,u,d){a.addEventListener(h,u,d);let _=!1;return{dispose:()=>{_||(_=!0,a.removeEventListener(h,u,d))}}}},6465:function(M,s,a){var h=this&&this.__decorate||function(e,r,i,t){var n,c=arguments.length,v=c<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,i):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,r,i,t);else for(var g=e.length-1;g>=0;g--)(n=e[g])&&(v=(c<3?n(v):c>3?n(r,i,v):n(r,i))||v);return c>3&&v&&Object.defineProperty(r,i,v),v},u=this&&this.__param||function(e,r){return function(i,t){r(i,t,e)}};Object.defineProperty(s,"__esModule",{value:!0}),s.Linkifier2=void 0;const d=a(2585),_=a(8460),p=a(844),f=a(3656);let l=class extends p.Disposable{constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,p.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,p.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}get currentLink(){return this._currentLink}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const r=this._linkProviders.indexOf(e);r!==-1&&this._linkProviders.splice(r,1)}}}attachToDom(e,r,i){this._element=e,this._mouseService=r,this._renderService=i,this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!r)return;this._isMouseOut=!1;const i=e.composedPath();for(let t=0;t<i.length;t++){const n=i[t];if(n.classList.contains("xterm"))break;if(n.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._handleHover(r),this._lastBufferCell=r)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,r){var i,t;this._activeProviderReplies&&r||((i=this._activeProviderReplies)===null||i===void 0||i.forEach(c=>{c?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let n=!1;for(const[c,v]of this._linkProviders.entries())r?!((t=this._activeProviderReplies)===null||t===void 0)&&t.get(c)&&(n=this._checkLinkProviderResult(c,e,n)):v.provideLinks(e.y,g=>{var o,S;if(this._isMouseOut)return;const C=g?.map(w=>({link:w}));(o=this._activeProviderReplies)===null||o===void 0||o.set(c,C),n=this._checkLinkProviderResult(c,e,n),((S=this._activeProviderReplies)===null||S===void 0?void 0:S.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,r){const i=new Set;for(let t=0;t<r.size;t++){const n=r.get(t);if(n)for(let c=0;c<n.length;c++){const v=n[c],g=v.link.range.start.y<e?0:v.link.range.start.x,o=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let S=g;S<=o;S++){if(i.has(S)){n.splice(c--,1);break}i.add(S)}}}}_checkLinkProviderResult(e,r,i){var t;if(!this._activeProviderReplies)return i;const n=this._activeProviderReplies.get(e);let c=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(c=!0);if(!c&&n){const v=n.find(g=>this._linkAtPosition(g.link,r));v&&(i=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!i)for(let v=0;v<this._activeProviderReplies.size;v++){const g=(t=this._activeProviderReplies.get(v))===null||t===void 0?void 0:t.find(o=>this._linkAtPosition(o.link,r));if(g){i=!0,this._handleNewLink(g);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,p.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const r=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);r&&this._linkAtPosition(e.link,r)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,t;return(t=(i=this._currentLink)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.decorations.pointerCursor},set:i=>{var t,n;!((t=this._currentLink)===null||t===void 0)&&t.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&((n=this._element)===null||n===void 0||n.classList.toggle("xterm-cursor-pointer",i)))}},underline:{get:()=>{var i,t;return(t=(i=this._currentLink)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.decorations.underline},set:i=>{var t,n,c;!((t=this._currentLink)===null||t===void 0)&&t.state&&((c=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||c===void 0?void 0:c.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;const t=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=t&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(t,n),this._lastMouseEvent&&this._element)){const c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._askForLink(c,!1)}})))}_linkHover(e,r,i){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(i,r.text)}_fireUnderlineEvent(e,r){const i=e.range,t=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-t-1,i.end.x,i.end.y-t-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)}_linkLeave(e,r,i){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(i,r.text)}_linkAtPosition(e,r){const i=e.range.start.y*this._bufferService.cols+e.range.start.x,t=e.range.end.y*this._bufferService.cols+e.range.end.x,n=r.y*this._bufferService.cols+r.x;return i<=n&&n<=t}_positionFromMouseEvent(e,r,i){const t=i.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(t)return{x:t[0],y:t[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,r,i,t,n){return{x1:e,y1:r,x2:i,y2:t,cols:this._bufferService.cols,fg:n}}};l=h([u(0,d.IBufferService)],l),s.Linkifier2=l},9042:(M,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.tooMuchOutput=s.promptLabel=void 0,s.promptLabel="Terminal input",s.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,s,a){var h=this&&this.__decorate||function(l,e,r,i){var t,n=arguments.length,c=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,r):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(l,e,r,i);else for(var v=l.length-1;v>=0;v--)(t=l[v])&&(c=(n<3?t(c):n>3?t(e,r,c):t(e,r))||c);return n>3&&c&&Object.defineProperty(e,r,c),c},u=this&&this.__param||function(l,e){return function(r,i){e(r,i,l)}};Object.defineProperty(s,"__esModule",{value:!0}),s.OscLinkProvider=void 0;const d=a(511),_=a(2585);let p=class{constructor(l,e,r){this._bufferService=l,this._optionsService=e,this._oscLinkService=r}provideLinks(l,e){var r;const i=this._bufferService.buffer.lines.get(l-1);if(!i)return void e(void 0);const t=[],n=this._optionsService.rawOptions.linkHandler,c=new d.CellData,v=i.getTrimmedLength();let g=-1,o=-1,S=!1;for(let C=0;C<v;C++)if(o!==-1||i.hasContent(C)){if(i.loadCell(C,c),c.hasExtendedAttrs()&&c.extended.urlId){if(o===-1){o=C,g=c.extended.urlId;continue}S=c.extended.urlId!==g}else o!==-1&&(S=!0);if(S||o!==-1&&C===v-1){const w=(r=this._oscLinkService.getLinkData(g))===null||r===void 0?void 0:r.uri;if(w){const y={start:{x:o+1,y:l},end:{x:C+(S||C!==v-1?0:1),y:l}};let D=!1;if(!n?.allowNonHttpProtocols)try{const B=new URL(w);["http:","https:"].includes(B.protocol)||(D=!0)}catch{D=!0}D||t.push({text:w,range:y,activate:(B,H)=>n?n.activate(B,H,y):f(0,H),hover:(B,H)=>{var O;return(O=n?.hover)===null||O===void 0?void 0:O.call(n,B,H,y)},leave:(B,H)=>{var O;return(O=n?.leave)===null||O===void 0?void 0:O.call(n,B,H,y)}})}S=!1,c.hasExtendedAttrs()&&c.extended.urlId?(o=C,g=c.extended.urlId):(o=-1,g=-1)}}e(t)}};function f(l,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as B,m as T,as as L,o as l,c as i,a as e,W as N,s as a,t as f,a3 as O,F as A,n as F,h as D,r as x,ab as q,al as Z,O as V,bo as K,v as b,b as m,q as j,_ as X,a2 as Q,ae as G,w as h,aE as P,d as s,k as z,a1 as H,au as ee,aw as oe,Y as se,aG as te,S as J,ah as le,bp as ne,C as ae,Z as re,i as ce,A as R,N as ie}from"./entry.6507cb32.js";import{_ as W}from"./DurationDisplay.vue.aba5fa70.js";import{_ as Y}from"./Badge.8d650e3b.js";import{_ as pe}from"./ComposableItem.vue.6d7b799a.js";import{U as ue}from"./json-editor-vue.bbdad521.js";import{_ as ye}from"./FilepathItem.vue.84aa0a31.js";import{_ as de}from"./LaunchPage.vue.00d3a484.js";import{_ as me}from"./NLink.vue.ec1f69e3.js";import{_ as _e}from"./CodeDiff.vue.cc3f76a7.js";import{_ as fe}from"./HelpFab.vue.a8d95bd1.js";import"./NMarkdown.vue.a74698d6.js";import"./client.ece13385.js";import"./constants.4e5eba24.js";import"./NCodeBlock.vue.77e54b2e.js";const ve=B({__name:"TimelineItemFunction",props:{item:{}},setup(v){const u=v,p=T(()=>L(u.item.name,50,60,"_op_")),o=T(()=>p.value.replace(/_op_/,"1")),n=T(()=>L(u.item.name,50,40)),r=T(()=>p.value.replace(/_op_/,"0.2"));return(y,t)=>(l(),i("button",{class:"group",style:N({color:a(o),borderLeft:`2px solid ${a(o)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[e("div",{style:N({backgroundColor:a(r)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),e("div",{style:N({color:a(n),"--c":a(o)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},f(y.item.name),5)],4))}}),he={relative:"","h-full":""},Ae={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},De=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(v,{emit:u}){const p=v,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:n=>n,future:n=>n,invalid:"-",second:n=>n?`${n}s`:"",minute:n=>`${n}m`,hour:n=>`${n}h`,week:n=>`${n}w`,day:n=>`${n}d`,month:n=>`${n}mo`,year:n=>`${n}y`}});return(n,r)=>{const y=ve;return l(),i("div",he,[e("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=t=>n.segment.route?u("select",n.segment.route):void 0)},f(n.segment.route?.event.to),1),e("div",Ae,f(a(o))+" ago ",1),e("div",null,[(l(!0),i(A,null,F(n.segment.functions,(t,c)=>(l(),D(y,{key:c,item:t.event,style:N({position:"absolute",minWidth:`${t.relativeWidth*100}%`,maxWidth:`${t.relativeWidth*100}%`,top:`${4+t.layer*1.6}em`,left:`${t.relativeStart*100}%`}),onClick:d=>u("select",t)},null,8,["item","style","onClick"]))),128))])])}}}),be=3e3,ge=50;function Ee(v){const u=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const o of v){const n=o.end||o.start;(o.start-p.end>be||o.type==="route")&&(p={start:o.start,end:n,events:[],functions:[],duration:0},u.push(p)),p.events.push(o),p.end=n+ge}return u.forEach((o,n)=>{const r=o.end-o.start,y=[];o.duration=r,o.previousGap=n>0?o.start-u[n-1].end:0,o.events.forEach(t=>{const c=t.end||t.start;let d=0;t.type!=="route"&&(d=y.findIndex(E=>E<=t.start),d===-1?(d=y.length,y.push(c+1e3)):y[d]=c+1e3);const g={event:t,segment:o,relativeStart:(t.start-o.start)/r,relativeWidth:(c-t.start)/r,layer:d};t.type==="function"?o.functions.push(g):o.route=g})}),u}const Ce={relative:""},$e={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},xe=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(v,{emit:u}){const p=v,o=x(),n=x(),r=x(),y=x(),t=x(!0),c=x(1.5),d=T(()=>Ee(p.data.events)),g=T(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function E(){y.value&&(y.value.style.width=`${g.value}px`)}function I(){t.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return q(()=>p.data.events.length,async()=>{await Z(),E(),I()},{flush:"post"}),V(o,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(E(),r.value.scrollLeft=o.value.scrollLeft,t.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),V(r,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(E(),o.value.scrollLeft=r.value.scrollLeft)}),V(o,"wheel",C=>{C.altKey?(c.value=K(c.value+C.deltaY/200,.5,3),E()):o.value.scrollLeft+=C.deltaY}),(C,S)=>{const $=W,k=De;return l(),i(A,null,[e("div",Ce,[e("div",{ref_key:"minimap",ref:n,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(l(!0),i(A,null,F(a(d),(_,M)=>(l(),i("div",{key:M,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,_.duration/10)/a(g)*100}%`})},[(l(!0),i(A,null,F(_.functions,(w,U)=>(l(),i("div",{key:U,"h-3px":"",rounded:"",style:N({width:`max(${w.relativeWidth*100}%, 10px)`,position:"absolute",top:`${w.layer*4}px`,left:`${w.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in C?C.getHashColorFromString:a(L))(w.event.name,50,60)})},null,4))),128)),_.route?(l(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${_.route.relativeStart*100}%`})},null,4)):b("",!0)],4))),128))],512),e("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[e("div",{ref_key:"minimapScrollerInner",ref:y,"h-1px":""},null,512)],512)]),e("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(l(!0),i(A,null,F(a(d),(_,M)=>(l(),i(A,{key:M},[_.previousGap&&_.previousGap>=200?(l(),i("div",$e,[m($,{op50:"",duration:_.previousGap,color:!1},null,8,["duration"])])):b("",!0),m(k,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:j(M===a(d).length-1?"border-r border-base":""),segment:_,style:N({width:`${Math.max(50,_.duration/10)*a(c)}px`}),onSelect:S[0]||(S[0]=w=>u("select",w))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Be=X(xe,[["__scopeId","data-v-a2c475c0"]]),ke={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},we=["onClick"],Te=e("div",{"i-carbon-function":"",op50:""},null,-1),Ne={flex:"~","font-mono":""},Se=e("div",{op30:""}," ( ",-1),Fe={key:0,mr2:"",op30:""},Ie={op75:""},Me=e("div",{op30:""}," ) ",-1),Le=e("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[e("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},Ve={"text-xs":"","font-mono":"",op30:""},Oe={"font-bold":"","font-mono":"","text-green":""},je=e("div",{"flex-auto":""},null,-1),ze=e("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(v,{emit:u}){return(p,o)=>{const n=W;return l(),i("div",ke,[(l(!0),i(A,null,F(p.data.events,(r,y)=>(l(),i("button",{key:y,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:t=>u("select",r)},[r.type==="function"?(l(),i(A,{key:0},[Te,e("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in p?p.getHashColorFromString:a(L))(r.name,50,60):""})},f(r.name),5),e("div",Ne,[Se,(l(!0),i(A,null,F(r.args,(t,c)=>(l(),i(A,{key:c},[y?(l(),i("div",Fe," , ")):b("",!0),e("div",Ie,f(t===null?"null":t===void 0?"undefined":typeof t=="function"?"[function]":Array.isArray(t)?"[Array]":typeof t=="object"?"[object]":JSON.stringify(t)),1)],64))),128)),Me])],64)):(l(),i(A,{key:1},[Le,e("div",We,[e("div",Ve,f(r.from),1),e("div",Oe,f(r.to),1)])],64)),je,r.end?(l(),D(n,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):b("",!0)],8,we))),128)),ze])}}}),Ge={key:0,"text-blue":""},Pe={key:1,"text-purple":""},He={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},Ue={key:5,"text-gray":""},qe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Ke={p2:"","text-sm":"",border:"t base"},Xe=B({__name:"TimelineArgumentView",props:{value:{}},setup(v){const u=v,p=x(),o=x();function n(){try{p.value=JSON.parse(JSON.stringify(u.value))}catch(t){console.error(t),o.value=t}}const r=B({emits:["setup"],setup(t,{emit:c}){return c("setup"),()=>null}}),y=Q();return(t,c)=>{const d=z,g=G("VMenu");return typeof t.value=="string"?(l(),i("div",Ge,f(JSON.stringify(t.value)),1)):typeof t.value=="number"?(l(),i("div",Pe,f(t.value),1)):typeof t.value=="boolean"?(l(),i("div",He,f(t.value),1)):typeof t.value>"u"?(l(),i("div",Je," undefined ")):typeof t.value=="function"?(l(),i("div",Ye," [Function"+f(t.value.name?`: ${t.value.name}`:"")+"] ",1)):t.value===null?(l(),i("div",Ue," null ")):(l(),D(g,{key:6,placement:"top"},{popper:h(()=>[m(a(r),{onSetup:n}),a(o)?(l(),i("div",qe," Failed to display object: "+f(a(o)),1)):a(p)?(l(),i("div",Ze,[m(a(ue),P({"model-value":a(p)},t.$attrs,{class:["json-editor-vue",[t.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),e("div",Ke,[m(d,{title:"Copy to clipboard",icon:"carbon-copy",onClick:c[0]||(c[0]=E=>a(y)(JSON.stringify(a(p),null,2)))},{default:h(()=>[s(" Copy ")]),_:1})])])):b("",!0)]),default:h(()=>[e("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:j([Array.isArray(t.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},f(Array.isArray(t.value)?`[Array(${t.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},eo={"mx--1":""},oo={flex:"~ gap-1","font-mono":""},so={key:1},to=e("span",{ml1:"",op30:""},"(",-1),lo={key:0,op30:""},no=e("span",{op30:""},")",-1),ao={flex:"~ gap-1","text-sm":""},ro=e("span",{mx1:"",op50:""},"·",-1),co={class:"text-sm text-gray-400"},io={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},po={"text-right":""},uo={"ws-nowrap":""},yo=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(v){const u=v,p=H(),o=O(()=>u.record.start,{showSecond:!0});function n(c){let d=new URL(c).pathname;return d.startsWith("/_nuxt/")&&(d=d.slice(6)),d.startsWith("/@id/virtual:nuxt:")?`#build/${d.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):d.includes("/@fs/")?`/${d.split("/@fs/")[1]}`:(p.value?.rootDir||"")+d}const r=ee(),y=T(()=>r.value?.metadata),t=T(()=>r.value?.imports.find(c=>c.as===u.record.name));return(c,d)=>{const g=Y,E=pe,I=Xe,C=W,S=ye;return c.record?(l(),i("div",Qe,[e("div",eo,[m(g,{"bg-yellow-600:10":"","text-yellow-600":"",op75:""},{default:h(()=>[s(" Function call ")]),_:1})]),e("div",oo,[a(t)?(l(),D(E,{key:0,item:a(t),metadata:a(y),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(l(),i("span",so,f(c.record.name),1)),to,(l(!0),i(A,null,F(c.record.args,($,k)=>(l(),i(A,{key:k},[k?(l(),i("span",lo,", ")):b("",!0),m(I,{value:$},null,8,["value"])],64))),128)),no]),e("div",ao,[c.record.end?(l(),D(C,{key:0,duration:c.record.end-c.record.start},null,8,["duration"])):b("",!0),ro,e("div",co,f(a(o)),1)]),c.record.stacktrace?(l(),i("div",io,[(l(!0),i(A,null,F(c.record.stacktrace,($,k)=>(l(),i(A,{key:k},[e("div",po,f($.functionName||"(anonymous)"),1),e("div",uo,[$.fileName?(l(),D(S,{key:0,filepath:`${n($.fileName)}:${$.lineNumber}:${$.columnNumber}`,subpath:""},null,8,["filepath"])):b("",!0)])],64))),128))])):b("",!0)])):b("",!0)}}}),mo={key:0,"p-4":"",flex:"~ col gap-2"},_o={"mx--1":""},fo={flex:"~ gap-1 items-center","font-mono":""},vo={op50:""},ho=e("span",{"i-carbon-arrow-right":"",op50:""},null,-1),Ao={flex:"~ gap-1","text-sm":""},Do=e("span",{mx1:"",op50:""},"·",-1),bo={class:"text-sm text-gray-400"},go=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(v){const u=v,p=O(()=>u.record.start,{showSecond:!0});return(o,n)=>{const r=Y,y=W;return o.record?(l(),i("div",mo,[e("div",_o,[m(r,{"bg-green-400:10":"","text-green-400":"",op50:""},{default:h(()=>[s(" Route Change ")]),_:1})]),e("div",fo,[e("span",vo,f(o.record.from),1),ho,e("span",null,f(o.record.to),1)]),e("div",Ao,[o.record.end?(l(),D(y,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):b("",!0),Do,e("div",bo,f(a(p)),1)])])):b("",!0)}}}),Eo={relative:"","h-full":"","w-full":"","of-auto":""},Co={inheritAttrs:!1},$o=B({...Co,__name:"DrawerBottom",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(v,{emit:u}){const p=v,o=x();oe(o,()=>{p.modelValue&&p.autoClose&&u("close")},{ignore:["a","button","summary"]});const n=document.querySelector("#nuxt-devtools-side-nav")?.getBoundingClientRect().width;return(r,y)=>{const t=J;return l(),D(te,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-y-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-y-1/1"},{default:h(()=>[r.modelValue?(l(),i("div",P({key:0,ref_key:"el",ref:o,border:"t base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{left:`${a(n)}px`}},r.$attrs),[m(t,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:y[0]||(y[0]=c=>r.$emit("close"))}),e("div",Eo,[se(r.$slots,"default")])],16)):b("",!0)]),_:3})}}}),xo={key:0,"h-screen":"","of-hidden":""},Bo={"h-screen":"","w-full":"",flex:"","flex-col":""},ko={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},wo={"text-sm":""},To=e("div",{"flex-auto":""},null,-1),No={"min-h-50":"",px3:"",py2:""},So=B({__name:"TimelineView",setup(v){const u=le(),p=x("table"),o=x(),n=T(()=>u.value?.clientTimelineMetrics);function r(){n.value&&(n.value.events=[])}function y(){p.value=p.value==="table"?"list":"table"}return(t,c)=>{const d=G("VTooltip"),g=z,E=J,I=Be,C=Re,S=yo,$=go,k=$o;return a(n)?(l(),i("div",xo,[e("div",Bo,[e("div",ko,[m(d,{flex:""},{popper:h(()=>[e("div",wo,f(a(n).options.enabled?"Recording...":"Paused"),1)]),default:h(()=>[e("div",{"text-lg":"",class:j(a(n).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),a(n).options.enabled?(l(),D(g,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:c[1]||(c[1]=_=>a(n).options.enabled=!1)},{default:h(()=>[s(" Stop Tracking ")]),_:1})):(l(),D(g,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:c[0]||(c[0]=_=>a(n).options.enabled=!0)},{default:h(()=>[s(" Start Tracking ")]),_:1})),To,m(E,{icon:a(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",onClick:y},null,8,["icon"]),m(E,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",onClick:r})]),a(p)==="table"?(l(),D(I,{key:0,data:{...a(n)},onSelect:c[2]||(c[2]=_=>o.value=_.event)},null,8,["data"])):(l(),D(C,{key:1,data:{...a(n)},onSelect:c[3]||(c[3]=_=>o.value=_)},null,8,["data"]))]),m(k,{"model-value":!!a(o),"auto-close":"",onClose:c[4]||(c[4]=_=>o.value=void 0)},{default:h(()=>[e("div",No,[a(o)?.type==="function"?(l(),D(S,{key:0,record:a(o)},null,8,["record"])):a(o)?.type==="route"?(l(),D($,{key:1,record:a(o)},null,8,["record"])):b("",!0)])]),_:1},8,["model-value"])])):b("",!0)}}}),Fo={class:"markdown-body"},Io=e("h1",null,"Timeline",-1),Mo=e("p",null,[e("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Lo=e("p",null,"Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.",-1),Wo=e("h2",null,"Function calls",-1),Vo=e("p",null,[s("Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through "),e("code",null,"import {} from '#imports'"),s(".")],-1),Oo=e("pre",null,[e("code",{class:"language-html"},[e("div",{class:"shiki-container"},[e("pre",{class:"shiki vitesse-dark",style:{"background-color":"#121212"},tabindex:"0"},[e("code",{"v-pre":""},[e("span",{class:"line"},[e("span",{style:{color:"#666666"}},"<"),e("span",{style:{color:"#4D9375"}},"script"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#BD976A"}},"setup"),e("span",{style:{color:"#666666"}},">")]),s(`
|
|
1
|
+
import{g as B,m as T,as as L,o as l,c as i,a as e,W as N,s as a,t as f,a3 as O,F as A,n as F,h as D,r as x,ab as q,al as Z,O as V,bo as K,v as b,b as m,q as j,_ as X,a2 as Q,ae as G,w as h,aE as P,d as s,k as z,a1 as H,au as ee,aw as oe,Y as se,aG as te,S as J,ah as le,bp as ne,C as ae,Z as re,i as ce,A as R,N as ie}from"./entry.331cb74a.js";import{_ as W}from"./DurationDisplay.vue.ae436800.js";import{_ as Y}from"./Badge.6a68ac78.js";import{_ as pe}from"./ComposableItem.vue.2b804916.js";import{U as ue}from"./json-editor-vue.f57c50c1.js";import{_ as ye}from"./FilepathItem.vue.c12140f3.js";import{_ as de}from"./LaunchPage.vue.7ca11100.js";import{_ as me}from"./NLink.vue.b78c8d55.js";import{_ as _e}from"./CodeDiff.vue.0fc21e08.js";import{_ as fe}from"./HelpFab.vue.d8b5b257.js";import"./NMarkdown.vue.5af3ba6b.js";import"./client.1d68892a.js";import"./constants.4e5eba24.js";import"./NCodeBlock.vue.cd2d281d.js";const ve=B({__name:"TimelineItemFunction",props:{item:{}},setup(v){const u=v,p=T(()=>L(u.item.name,50,60,"_op_")),o=T(()=>p.value.replace(/_op_/,"1")),n=T(()=>L(u.item.name,50,40)),r=T(()=>p.value.replace(/_op_/,"0.2"));return(y,t)=>(l(),i("button",{class:"group",style:N({color:a(o),borderLeft:`2px solid ${a(o)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[e("div",{style:N({backgroundColor:a(r)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),e("div",{style:N({color:a(n),"--c":a(o)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},f(y.item.name),5)],4))}}),he={relative:"","h-full":""},Ae={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},De=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(v,{emit:u}){const p=v,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:n=>n,future:n=>n,invalid:"-",second:n=>n?`${n}s`:"",minute:n=>`${n}m`,hour:n=>`${n}h`,week:n=>`${n}w`,day:n=>`${n}d`,month:n=>`${n}mo`,year:n=>`${n}y`}});return(n,r)=>{const y=ve;return l(),i("div",he,[e("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=t=>n.segment.route?u("select",n.segment.route):void 0)},f(n.segment.route?.event.to),1),e("div",Ae,f(a(o))+" ago ",1),e("div",null,[(l(!0),i(A,null,F(n.segment.functions,(t,c)=>(l(),D(y,{key:c,item:t.event,style:N({position:"absolute",minWidth:`${t.relativeWidth*100}%`,maxWidth:`${t.relativeWidth*100}%`,top:`${4+t.layer*1.6}em`,left:`${t.relativeStart*100}%`}),onClick:d=>u("select",t)},null,8,["item","style","onClick"]))),128))])])}}}),be=3e3,ge=50;function Ee(v){const u=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const o of v){const n=o.end||o.start;(o.start-p.end>be||o.type==="route")&&(p={start:o.start,end:n,events:[],functions:[],duration:0},u.push(p)),p.events.push(o),p.end=n+ge}return u.forEach((o,n)=>{const r=o.end-o.start,y=[];o.duration=r,o.previousGap=n>0?o.start-u[n-1].end:0,o.events.forEach(t=>{const c=t.end||t.start;let d=0;t.type!=="route"&&(d=y.findIndex(E=>E<=t.start),d===-1?(d=y.length,y.push(c+1e3)):y[d]=c+1e3);const g={event:t,segment:o,relativeStart:(t.start-o.start)/r,relativeWidth:(c-t.start)/r,layer:d};t.type==="function"?o.functions.push(g):o.route=g})}),u}const Ce={relative:""},$e={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},xe=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(v,{emit:u}){const p=v,o=x(),n=x(),r=x(),y=x(),t=x(!0),c=x(1.5),d=T(()=>Ee(p.data.events)),g=T(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function E(){y.value&&(y.value.style.width=`${g.value}px`)}function I(){t.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return q(()=>p.data.events.length,async()=>{await Z(),E(),I()},{flush:"post"}),V(o,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(E(),r.value.scrollLeft=o.value.scrollLeft,t.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),V(r,"scroll",()=>{r.value.scrollLeft!==o.value.scrollLeft&&(E(),o.value.scrollLeft=r.value.scrollLeft)}),V(o,"wheel",C=>{C.altKey?(c.value=K(c.value+C.deltaY/200,.5,3),E()):o.value.scrollLeft+=C.deltaY}),(C,S)=>{const $=W,k=De;return l(),i(A,null,[e("div",Ce,[e("div",{ref_key:"minimap",ref:n,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(l(!0),i(A,null,F(a(d),(_,M)=>(l(),i("div",{key:M,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,_.duration/10)/a(g)*100}%`})},[(l(!0),i(A,null,F(_.functions,(w,U)=>(l(),i("div",{key:U,"h-3px":"",rounded:"",style:N({width:`max(${w.relativeWidth*100}%, 10px)`,position:"absolute",top:`${w.layer*4}px`,left:`${w.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in C?C.getHashColorFromString:a(L))(w.event.name,50,60)})},null,4))),128)),_.route?(l(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${_.route.relativeStart*100}%`})},null,4)):b("",!0)],4))),128))],512),e("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[e("div",{ref_key:"minimapScrollerInner",ref:y,"h-1px":""},null,512)],512)]),e("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(l(!0),i(A,null,F(a(d),(_,M)=>(l(),i(A,{key:M},[_.previousGap&&_.previousGap>=200?(l(),i("div",$e,[m($,{op50:"",duration:_.previousGap,color:!1},null,8,["duration"])])):b("",!0),m(k,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:j(M===a(d).length-1?"border-r border-base":""),segment:_,style:N({width:`${Math.max(50,_.duration/10)*a(c)}px`}),onSelect:S[0]||(S[0]=w=>u("select",w))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Be=X(xe,[["__scopeId","data-v-a2c475c0"]]),ke={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},we=["onClick"],Te=e("div",{"i-carbon-function":"",op50:""},null,-1),Ne={flex:"~","font-mono":""},Se=e("div",{op30:""}," ( ",-1),Fe={key:0,mr2:"",op30:""},Ie={op75:""},Me=e("div",{op30:""}," ) ",-1),Le=e("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[e("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},Ve={"text-xs":"","font-mono":"",op30:""},Oe={"font-bold":"","font-mono":"","text-green":""},je=e("div",{"flex-auto":""},null,-1),ze=e("div",{"min-h-100":""},null,-1),Re=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(v,{emit:u}){return(p,o)=>{const n=W;return l(),i("div",ke,[(l(!0),i(A,null,F(p.data.events,(r,y)=>(l(),i("button",{key:y,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:t=>u("select",r)},[r.type==="function"?(l(),i(A,{key:0},[Te,e("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in p?p.getHashColorFromString:a(L))(r.name,50,60):""})},f(r.name),5),e("div",Ne,[Se,(l(!0),i(A,null,F(r.args,(t,c)=>(l(),i(A,{key:c},[y?(l(),i("div",Fe," , ")):b("",!0),e("div",Ie,f(t===null?"null":t===void 0?"undefined":typeof t=="function"?"[function]":Array.isArray(t)?"[Array]":typeof t=="object"?"[object]":JSON.stringify(t)),1)],64))),128)),Me])],64)):(l(),i(A,{key:1},[Le,e("div",We,[e("div",Ve,f(r.from),1),e("div",Oe,f(r.to),1)])],64)),je,r.end?(l(),D(n,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):b("",!0)],8,we))),128)),ze])}}}),Ge={key:0,"text-blue":""},Pe={key:1,"text-purple":""},He={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},Ue={key:5,"text-gray":""},qe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Ke={p2:"","text-sm":"",border:"t base"},Xe=B({__name:"TimelineArgumentView",props:{value:{}},setup(v){const u=v,p=x(),o=x();function n(){try{p.value=JSON.parse(JSON.stringify(u.value))}catch(t){console.error(t),o.value=t}}const r=B({emits:["setup"],setup(t,{emit:c}){return c("setup"),()=>null}}),y=Q();return(t,c)=>{const d=z,g=G("VMenu");return typeof t.value=="string"?(l(),i("div",Ge,f(JSON.stringify(t.value)),1)):typeof t.value=="number"?(l(),i("div",Pe,f(t.value),1)):typeof t.value=="boolean"?(l(),i("div",He,f(t.value),1)):typeof t.value>"u"?(l(),i("div",Je," undefined ")):typeof t.value=="function"?(l(),i("div",Ye," [Function"+f(t.value.name?`: ${t.value.name}`:"")+"] ",1)):t.value===null?(l(),i("div",Ue," null ")):(l(),D(g,{key:6,placement:"top"},{popper:h(()=>[m(a(r),{onSetup:n}),a(o)?(l(),i("div",qe," Failed to display object: "+f(a(o)),1)):a(p)?(l(),i("div",Ze,[m(a(ue),P({"model-value":a(p)},t.$attrs,{class:["json-editor-vue",[t.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),e("div",Ke,[m(d,{title:"Copy to clipboard",icon:"carbon-copy",onClick:c[0]||(c[0]=E=>a(y)(JSON.stringify(a(p),null,2)))},{default:h(()=>[s(" Copy ")]),_:1})])])):b("",!0)]),default:h(()=>[e("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:j([Array.isArray(t.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},f(Array.isArray(t.value)?`[Array(${t.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},eo={"mx--1":""},oo={flex:"~ gap-1","font-mono":""},so={key:1},to=e("span",{ml1:"",op30:""},"(",-1),lo={key:0,op30:""},no=e("span",{op30:""},")",-1),ao={flex:"~ gap-1","text-sm":""},ro=e("span",{mx1:"",op50:""},"·",-1),co={class:"text-sm text-gray-400"},io={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},po={"text-right":""},uo={"ws-nowrap":""},yo=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(v){const u=v,p=H(),o=O(()=>u.record.start,{showSecond:!0});function n(c){let d=new URL(c).pathname;return d.startsWith("/_nuxt/")&&(d=d.slice(6)),d.startsWith("/@id/virtual:nuxt:")?`#build/${d.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):d.includes("/@fs/")?`/${d.split("/@fs/")[1]}`:(p.value?.rootDir||"")+d}const r=ee(),y=T(()=>r.value?.metadata),t=T(()=>r.value?.imports.find(c=>c.as===u.record.name));return(c,d)=>{const g=Y,E=pe,I=Xe,C=W,S=ye;return c.record?(l(),i("div",Qe,[e("div",eo,[m(g,{"bg-yellow-600:10":"","text-yellow-600":"",op75:""},{default:h(()=>[s(" Function call ")]),_:1})]),e("div",oo,[a(t)?(l(),D(E,{key:0,item:a(t),metadata:a(y),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(l(),i("span",so,f(c.record.name),1)),to,(l(!0),i(A,null,F(c.record.args,($,k)=>(l(),i(A,{key:k},[k?(l(),i("span",lo,", ")):b("",!0),m(I,{value:$},null,8,["value"])],64))),128)),no]),e("div",ao,[c.record.end?(l(),D(C,{key:0,duration:c.record.end-c.record.start},null,8,["duration"])):b("",!0),ro,e("div",co,f(a(o)),1)]),c.record.stacktrace?(l(),i("div",io,[(l(!0),i(A,null,F(c.record.stacktrace,($,k)=>(l(),i(A,{key:k},[e("div",po,f($.functionName||"(anonymous)"),1),e("div",uo,[$.fileName?(l(),D(S,{key:0,filepath:`${n($.fileName)}:${$.lineNumber}:${$.columnNumber}`,subpath:""},null,8,["filepath"])):b("",!0)])],64))),128))])):b("",!0)])):b("",!0)}}}),mo={key:0,"p-4":"",flex:"~ col gap-2"},_o={"mx--1":""},fo={flex:"~ gap-1 items-center","font-mono":""},vo={op50:""},ho=e("span",{"i-carbon-arrow-right":"",op50:""},null,-1),Ao={flex:"~ gap-1","text-sm":""},Do=e("span",{mx1:"",op50:""},"·",-1),bo={class:"text-sm text-gray-400"},go=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(v){const u=v,p=O(()=>u.record.start,{showSecond:!0});return(o,n)=>{const r=Y,y=W;return o.record?(l(),i("div",mo,[e("div",_o,[m(r,{"bg-green-400:10":"","text-green-400":"",op50:""},{default:h(()=>[s(" Route Change ")]),_:1})]),e("div",fo,[e("span",vo,f(o.record.from),1),ho,e("span",null,f(o.record.to),1)]),e("div",Ao,[o.record.end?(l(),D(y,{key:0,duration:o.record.end-o.record.start},null,8,["duration"])):b("",!0),Do,e("div",bo,f(a(p)),1)])])):b("",!0)}}}),Eo={relative:"","h-full":"","w-full":"","of-auto":""},Co={inheritAttrs:!1},$o=B({...Co,__name:"DrawerBottom",props:{modelValue:{type:Boolean},navbar:{},autoClose:{type:Boolean}},emits:["close"],setup(v,{emit:u}){const p=v,o=x();oe(o,()=>{p.modelValue&&p.autoClose&&u("close")},{ignore:["a","button","summary"]});const n=document.querySelector("#nuxt-devtools-side-nav")?.getBoundingClientRect().width;return(r,y)=>{const t=J;return l(),D(te,{"enter-active-class":"duration-200 ease-in","enter-from-class":"transform translate-y-1/1","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-out","leave-from-class":"opacity-100","leave-to-class":"transform translate-y-1/1"},{default:h(()=>[r.modelValue?(l(),i("div",P({key:0,ref_key:"el",ref:o,border:"t base",flex:"~ col gap-1",absolute:"","bottom-0":"","right-0":"","z-10":"","z-20":"","of-auto":"","text-sm":"","glass-effect":"",style:{left:`${a(n)}px`}},r.$attrs),[m(t,{absolute:"","right-2":"","top-2":"","z-20":"","text-xl":"",icon:"carbon-close",onClick:y[0]||(y[0]=c=>r.$emit("close"))}),e("div",Eo,[se(r.$slots,"default")])],16)):b("",!0)]),_:3})}}}),xo={key:0,"h-screen":"","of-hidden":""},Bo={"h-screen":"","w-full":"",flex:"","flex-col":""},ko={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},wo={"text-sm":""},To=e("div",{"flex-auto":""},null,-1),No={"min-h-50":"",px3:"",py2:""},So=B({__name:"TimelineView",setup(v){const u=le(),p=x("table"),o=x(),n=T(()=>u.value?.clientTimelineMetrics);function r(){n.value&&(n.value.events=[])}function y(){p.value=p.value==="table"?"list":"table"}return(t,c)=>{const d=G("VTooltip"),g=z,E=J,I=Be,C=Re,S=yo,$=go,k=$o;return a(n)?(l(),i("div",xo,[e("div",Bo,[e("div",ko,[m(d,{flex:""},{popper:h(()=>[e("div",wo,f(a(n).options.enabled?"Recording...":"Paused"),1)]),default:h(()=>[e("div",{"text-lg":"",class:j(a(n).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),a(n).options.enabled?(l(),D(g,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:c[1]||(c[1]=_=>a(n).options.enabled=!1)},{default:h(()=>[s(" Stop Tracking ")]),_:1})):(l(),D(g,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:c[0]||(c[0]=_=>a(n).options.enabled=!0)},{default:h(()=>[s(" Start Tracking ")]),_:1})),To,m(E,{icon:a(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",onClick:y},null,8,["icon"]),m(E,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",onClick:r})]),a(p)==="table"?(l(),D(I,{key:0,data:{...a(n)},onSelect:c[2]||(c[2]=_=>o.value=_.event)},null,8,["data"])):(l(),D(C,{key:1,data:{...a(n)},onSelect:c[3]||(c[3]=_=>o.value=_)},null,8,["data"]))]),m(k,{"model-value":!!a(o),"auto-close":"",onClose:c[4]||(c[4]=_=>o.value=void 0)},{default:h(()=>[e("div",No,[a(o)?.type==="function"?(l(),D(S,{key:0,record:a(o)},null,8,["record"])):a(o)?.type==="route"?(l(),D($,{key:1,record:a(o)},null,8,["record"])):b("",!0)])]),_:1},8,["model-value"])])):b("",!0)}}}),Fo={class:"markdown-body"},Io=e("h1",null,"Timeline",-1),Mo=e("p",null,[e("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Lo=e("p",null,"Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.",-1),Wo=e("h2",null,"Function calls",-1),Vo=e("p",null,[s("Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through "),e("code",null,"import {} from '#imports'"),s(".")],-1),Oo=e("pre",null,[e("code",{class:"language-html"},[e("div",{class:"shiki-container"},[e("pre",{class:"shiki vitesse-dark",style:{"background-color":"#121212"},tabindex:"0"},[e("code",{"v-pre":""},[e("span",{class:"line"},[e("span",{style:{color:"#666666"}},"<"),e("span",{style:{color:"#4D9375"}},"script"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#BD976A"}},"setup"),e("span",{style:{color:"#666666"}},">")]),s(`
|
|
2
2
|
`),e("span",{class:"line"},[e("span",{style:{color:"#4D9375"}},"import"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#666666"}},"{"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#BD976A"}},"useNuxtApp"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#666666"}},"}"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#4D9375"}},"from"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#C98A7D99"}},"'"),e("span",{style:{color:"#C98A7D"}},"#imports"),e("span",{style:{color:"#C98A7D99"}},"'")]),s(`
|
|
3
3
|
`),e("span",{class:"line"},[e("span",{style:{color:"#4D9375"}},"import"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#666666"}},"{"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#BD976A"}},"useMouse"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#666666"}},"}"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#4D9375"}},"from"),e("span",{style:{color:"#DBD7CAEE"}}," "),e("span",{style:{color:"#C98A7D99"}},"'"),e("span",{style:{color:"#C98A7D"}},"@vueuse/core"),e("span",{style:{color:"#C98A7D99"}},"'")]),s(`
|
|
4
4
|
`),e("span",{class:"line"}),s(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$ as be}from"./entry.331cb74a.js";const K=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ue=Object.freeze({...K,...U}),ve=Object.freeze({...ue,body:"",hidden:!1}),Se=Object.freeze({width:null,height:null}),fe=Object.freeze({...Se,...U});function xe(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}function Z(t,e){const r=xe(t,e);for(const i in ve)i in U?i in t&&!(i in r)&&(r[i]=U[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function ke(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);function o(a){if(r[a])return n[a]=[];if(!(a in n)){n[a]=null;const l=i[a]&&i[a].parent,u=l&&o(l);u&&(n[a]=[l].concat(u))}return n[a]}return(e||Object.keys(r).concat(Object.keys(i))).forEach(o),n}function J(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let o={};function a(l){o=Z(i[l]||n[l],o)}return a(e),r.forEach(a),Z(t,o)}function $e(t,e){if(t.icons[e])return J(t,e,[]);const r=ke(t,[e])[e];return r?J(t,e,r):null}({...K});Object.keys(K).concat(["provider"]);const Ae=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ce=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Q(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const i=t.split(Ae);if(i===null||!i.length)return t;const n=[];let o=i.shift(),a=Ce.test(o);for(;;){if(a){const l=parseFloat(o);isNaN(l)?n.push(o):n.push(Math.ceil(l*e*r)/r)}else n.push(o);if(o=i.shift(),o===void 0)return n.join("");a=!a}}const X=t=>t==="unset"||t==="undefined"||t==="none";function Oe(t,e){const r={...ue,...t},i={...fe,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach($=>{const g=[],m=$.hFlip,S=$.vFlip;let y=$.rotate;m?S?y+=2:(g.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),g.push("scale(-1 1)"),n.top=n.left=0):S&&(g.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),g.push("scale(1 -1)"),n.top=n.left=0);let p;switch(y<0&&(y-=Math.floor(y/4)*4),y=y%4,y){case 1:p=n.height/2+n.top,g.unshift("rotate(90 "+p.toString()+" "+p.toString()+")");break;case 2:g.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:p=n.width/2+n.left,g.unshift("rotate(-90 "+p.toString()+" "+p.toString()+")");break}y%2===1&&(n.left!==n.top&&(p=n.left,n.left=n.top,n.top=p),n.width!==n.height&&(p=n.width,n.width=n.height,n.height=p)),g.length&&(o='<g transform="'+g.join(" ")+'">'+o+"</g>")});const a=i.width,l=i.height,u=n.width,f=n.height;let c,d;a===null?(d=l===null?"1em":l==="auto"?f:l,c=Q(d,u/f)):(c=a==="auto"?u:a,d=l===null?Q(c,f/u):l==="auto"?f:l);const w={},v=($,g)=>{X(g)||(w[$]=g.toString())};return v("width",c),v("height",d),w.viewBox=n.left.toString()+" "+n.top.toString()+" "+u.toString()+" "+f.toString(),{attributes:w,body:o}}""+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);function je(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').trim()}function s(t,e){const r="rgb",i=e[0],n=e.length;n>1&&e[1],n>2&&e[2],n>3&&e[3]}s("silver",[192]);s("gray",[128]);s("white",[255]);s("maroon",[128,0,0]);s("red",[255,0,0]);s("purple",[128,0]);s("fuchsia",[255,0]);s("green",[0,128]);s("lime",[0,255]);s("olive",[128,128,0]);s("yellow",[255,255,0]);s("navy",[0,0,128]);s("blue",[0,0,255]);s("teal",[0,128,128]);s("aqua",[0,255,255]);s("aliceblue",[240,248,255]);s("antiquewhite",[250,235,215]);s("aqua",[0,255,255]);s("aquamarine",[127,255,212]);s("azure",[240,255,255]);s("beige",[245,245,220]);s("bisque",[255,228,196]);s("black",[0]);s("blanchedalmond",[255,235,205]);s("blue",[0,0,255]);s("blueviolet",[138,43,226]);s("brown",[165,42,42]);s("burlywood",[222,184,135]);s("cadetblue",[95,158,160]);s("chartreuse",[127,255,0]);s("chocolate",[210,105,30]);s("coral",[255,127,80]);s("cornflowerblue",[100,149,237]);s("cornsilk",[255,248,220]);s("crimson",[220,20,60]);s("cyan",[0,255,255]);s("darkblue",[0,0,139]);s("darkcyan",[0,139,139]);s("darkgoldenrod",[184,134,11]);s("darkgray",[169]);s("darkgreen",[0,100]);s("darkgrey",[169]);s("darkkhaki",[189,183,107]);s("darkmagenta",[139,0]);s("darkolivegreen",[85,107,47]);s("darkorange",[255,140,0]);s("darkorchid",[153,50,204]);s("darkred",[139,0,0]);s("darksalmon",[233,150,122]);s("darkseagreen",[143,188]);s("darkslateblue",[72,61,139]);s("darkslategray",[47,79,79]);s("darkslategrey",[47,79,79]);s("darkturquoise",[0,206,209]);s("darkviolet",[148,0,211]);s("deeppink",[255,20,147]);s("deepskyblue",[0,191,255]);s("dimgray",[105]);s("dimgrey",[105]);s("dodgerblue",[30,144,255]);s("firebrick",[178,34,34]);s("floralwhite",[255,250,240]);s("forestgreen",[34,139]);s("fuchsia",[255,0]);s("gainsboro",[220]);s("ghostwhite",[248,248,255]);s("gold",[255,215,0]);s("goldenrod",[218,165,32]);s("gray",[128]);s("green",[0,128]);s("greenyellow",[173,255,47]);s("grey",[128]);s("honeydew",[240,255]);s("hotpink",[255,105,180]);s("indianred",[205,92,92]);s("indigo",[75,0,130]);s("ivory",[255,255,240]);s("khaki",[240,230,140]);s("lavender",[230,230,250]);s("lavenderblush",[255,240,245]);s("lawngreen",[124,252,0]);s("lemonchiffon",[255,250,205]);s("lightblue",[173,216,230]);s("lightcoral",[240,128,128]);s("lightcyan",[224,255,255]);s("lightgoldenrodyellow",[250,250,210]);s("lightgray",[211]);s("lightgreen",[144,238]);s("lightgrey",[211]);s("lightpink",[255,182,193]);s("lightsalmon",[255,160,122]);s("lightseagreen",[32,178,170]);s("lightskyblue",[135,206,250]);s("lightslategray",[119,136,153]);s("lightslategrey",[119,136,153]);s("lightsteelblue",[176,196,222]);s("lightyellow",[255,255,224]);s("lime",[0,255]);s("limegreen",[50,205]);s("linen",[250,240,230]);s("magenta",[255,0]);s("maroon",[128,0,0]);s("mediumaquamarine",[102,205,170]);s("mediumblue",[0,0,205]);s("mediumorchid",[186,85,211]);s("mediumpurple",[147,112,219]);s("mediumseagreen",[60,179,113]);s("mediumslateblue",[123,104,238]);s("mediumspringgreen",[0,250,154]);s("mediumturquoise",[72,209,204]);s("mediumvioletred",[199,21,133]);s("midnightblue",[25,25,112]);s("mintcream",[245,255,250]);s("mistyrose",[255,228,225]);s("moccasin",[255,228,181]);s("navajowhite",[255,222,173]);s("navy",[0,0,128]);s("oldlace",[253,245,230]);s("olive",[128,128,0]);s("olivedrab",[107,142,35]);s("orange",[255,165,0]);s("orangered",[255,69,0]);s("orchid",[218,112,214]);s("palegoldenrod",[238,232,170]);s("palegreen",[152,251]);s("paleturquoise",[175,238,238]);s("palevioletred",[219,112,147]);s("papayawhip",[255,239,213]);s("peachpuff",[255,218,185]);s("peru",[205,133,63]);s("pink",[255,192,203]);s("plum",[221,160]);s("powderblue",[176,224,230]);s("purple",[128,0]);s("rebeccapurple",[102,51,153]);s("red",[255,0,0]);s("rosybrown",[188,143,143]);s("royalblue",[65,105,225]);s("saddlebrown",[139,69,19]);s("salmon",[250,128,114]);s("sandybrown",[244,164,96]);s("seagreen",[46,139,87]);s("seashell",[255,245,238]);s("sienna",[160,82,45]);s("silver",[192]);s("skyblue",[135,206,235]);s("slateblue",[106,90,205]);s("slategray",[112,128,144]);s("slategrey",[112,128,144]);s("snow",[255,250,250]);s("springgreen",[0,255,127]);s("steelblue",[70,130,180]);s("tan",[210,180,140]);s("teal",[0,128,128]);s("thistle",[216,191]);s("tomato",[255,99,71]);s("turquoise",[64,224,208]);s("violet",[238,130]);s("wheat",[245,222,179]);s("white",[255]);s("whitesmoke",[245]);s("yellow",[255,255,0]);s("yellowgreen",[154,205,50]);const Ee=/\swidth\s*=\s*["'](\w+)["']/,Me=/\sheight\s*=\s*["'](\w+)["']/,H=/<svg\s+/;function _e(t,e,r){const i=t.slice(0,t.indexOf(">")),n=(o,a)=>{const l=a.exec(i),u=l!=null,f=e[o];return!f&&!X(f)&&(typeof r=="number"?r>0&&(e[o]=`${r}em`):l&&(e[o]=l[1])),u};return[n("width",Ee),n("height",Me)]}async function he(t,e,r,i,n,o){const{scale:a,addXmlNs:l=!1}=i??{},{additionalProps:u={},iconCustomizer:f}=i?.customizations??{},c=await n?.()??{};await f?.(e,r,c),Object.keys(u).forEach(g=>{const m=u[g];m!=null&&(c[g]=m)}),o?.(c);const[d,w]=_e(t,c,a);l&&(!t.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const v=Object.keys(c).map(g=>g==="width"&&d||g==="height"&&w?null:`${g}="${c[g]}"`).filter(g=>g!=null);if(v.length&&(t=t.replace(H,`<svg ${v.join(" ")} `)),i){const{defaultStyle:g,defaultClass:m}=i;m&&!t.includes("class=")&&(t=t.replace(H,`<svg class="${m}" `)),g&&!t.includes("style=")&&(t=t.replace(H,`<svg style="${g}" `))}const $=i?.usedProps;return $&&(Object.keys(u).forEach(g=>{const m=c[g];m!=null&&($[g]=m)}),typeof c.width<"u"&&c.width!==null&&($.width=c.width),typeof c.height<"u"&&c.height!==null&&($.height=c.height)),t}async function ee(t,e,r,i){let n;if(typeof t=="function")n=await t(r);else{const o=t[r];n=typeof o=="function"?await o():o}if(n){const o=n.indexOf("<svg");o>0&&(n=n.slice(o));const{transform:a}=i?.customizations??{};return n=typeof a=="function"?await a(n,e,r):n,n.startsWith("<svg")?await he(i?.customizations?.trimCustomSvg===!0?je(n):n,e,r,i,void 0):(console.warn(`Custom icon "${r}" in "${e}" is not a valid SVG`),n)}}async function de(t,e,r,i){let n;const{customize:o}=i?.customizations??{};for(const a of r)if(n=$e(t,a),n){let l={...fe};typeof o=="function"&&(l=o(l));const{attributes:{width:u,height:f,...c},body:d}=Oe(n,l),w=i?.scale;return await he(`<svg >${d}</svg>`,e,a,i,()=>({...c}),v=>{const $=(g,m)=>{const S=v[g];let y;if(!X(S)){if(S)return;typeof w=="number"?w&&(y=`${w}em`):y=m}y?v[g]=y:delete v[g]};$("width",u),$("height",f)})}}const pe=async(t,e,r)=>{const i=r?.customCollections?.[t];if(i)if(typeof i=="function"){const n=await i(e);if(n){if(typeof n=="string")return await ee(()=>n,t,e,r);if("icons"in n){const o=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await de(n,t,o,r)}}}else return await ee(i,t,e,r)};var ze=["academicons","akar-icons","ant-design","arcticons","basil","bi","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols","mdi-light","mdi","medical-icon","memory","mi","mingcute","mono-icons","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];function Le(t){const e=new Map;function r(i){if(ze.includes(i))return e.has(i)||e.set(i,be(`${t}@iconify-json/${i}/icons.json`)),e.get(i)}return async(i,n,o)=>{let a=await pe(i,n,o);if(a)return a;const l=await r(i);if(l){const u=[n,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),n.replace(/([a-z])(\d+)/g,"$1-$2")];a=await de(l,i,u,o)}return a}}function Te(t){const e=t.length;let r=-1,i,n="";const o=t.charCodeAt(0);for(;++r<e;){if(i=t.charCodeAt(r),i===0){n+="�";continue}if(i===44){n+="\\,";continue}if(i>=1&&i<=31||i===127||r===0&&i>=48&&i<=57||r===1&&i>=48&&i<=57&&o===45){n+=`\\${i.toString(16)} `;continue}if(r===0&&e===1&&i===45){n+=`\\${t.charAt(r)}`;continue}if(i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122){n+=t.charAt(r);continue}n+=`\\${t.charAt(r)}`}return n}const q=Te;function z(t=[]){return Array.isArray(t)?t:[t]}function R(t){return Array.from(new Set(t))}function j(t){return typeof t=="string"}function F(t){return j(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ie(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>F(e)):[t]:[F(t)]}function Pe(t){return t.filter(([e,r],i)=>{if(e.startsWith("$$"))return!1;for(let n=i-1;n>=0;n--)if(t[n][0]===e&&t[n][1]===r)return!1;return!0})}function G(t){return t==null?"":Pe(t).map(([e,r])=>r!=null?`${e}:${r};`:void 0).filter(Boolean).join("")}function D(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(t,e,r=!1){const i=t,n=e;if(Array.isArray(n))return r&&Array.isArray(n)?[...i,...n]:[...n];const o={...i};return D(i)&&D(n)&&Object.keys(n).forEach(a=>{D(i[a])&&D(n[a])||Array.isArray(i[a])&&Array.isArray(n[a])?o[a]=ge(i[a],n[a],r):Object.assign(o,{[a]:n[a]})}),o}function B(t){let e,r,i;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(i=t[e])&&typeof i=="object"?B(i):i;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:B(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(i=t[e])&&typeof i=="object"?B(i):i;return r}return t}function Re(t){return j(t[0])}function Fe(t){return j(t[0])}const te="$$shortcut-no-merge";function Ve(t){return typeof t=="function"?{match:t}:t}function ne(t){return t.length===3}function De(t){return t!=null}function Ne(){}class Be{constructor(){this._map=new Map}get(e,r){const i=this._map.get(e);if(i)return i.get(r)}getFallback(e,r,i){let n=this._map.get(e);return n||(n=new Map,this._map.set(e,n)),n.has(r)||n.set(r,i),n.get(r)}set(e,r,i){let n=this._map.get(e);return n||(n=new Map,this._map.set(e,n)),n.set(r,i),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,i])=>Array.from(i.entries()).map(([n,o])=>e(o,r,n)))}}const N={};function Ue(t=["-",":"]){const e=t.join("|");return N[e]||(N[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),N[e].lastIndex=0,N[e]}function He(t,e=["-",":"],r=5){const i=Ue(e);let n,o=t.toString();const a=new Set,l=new Map;do n=!1,o=o.replace(i,(f,c,d,w,v)=>{if(!e.includes(d))return f;n=!0,a.add(c+d);const $=v+c.length+d.length+1,g={length:f.length,items:[]};l.set(v,g);for(const m of[...w.matchAll(/\S+/g)]){const S=$+m.index;let y=l.get(S)?.items;y?l.delete(S):y=[{offset:S,length:m[0].length,className:m[0]}];for(const p of y)p.className=p.className==="~"?c:p.className.replace(/^(!?)(.*)/,`$1${c}${d}$2`),g.items.push(p)}return"$".repeat(f.length)}),r-=1;while(n&&r);let u;if(typeof t=="string"){u="";let f=0;for(const[c,d]of l)u+=t.slice(f,c),u+=d.items.map(w=>w.className).join(" "),f=c+d.length;u+=t.slice(f)}else{u=t;for(const[f,c]of l)u.overwrite(f,f+c.length,c.items.map(d=>d.className).join(" "))}return{prefixes:Array.from(a),hasChanged:n,groupsByOffset:l,get expanded(){return u.toString()}}}function qe(t,e=["-",":"],r=5){const i=He(t,e,r);return typeof t=="string"?i.expanded:t}const re=new Set;function me(t){re.has(t)||(console.warn("[unocss]",t),re.add(t))}const Ge=/[\\:]?[\s'"`;{}]+/g;function We(t){return[...new Set(t.split(Ge))]}const Ye={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return We(t)}};function Ke(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}const W="default",Y="preflights",Xe="shortcuts",Ze="imports",Je={[Ze]:-200,[Y]:-100,[Xe]:-10,[W]:0};function ye(t){return z(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function Qe(t){if(ie in t)return t;t={...t},Object.defineProperty(t,ie,{value:!0,enumerable:!1});const e=t.shortcuts?ye(t.shortcuts):void 0;if(t.shortcuts=e,t.prefix||t.layer){const r=i=>{i[2]||(i[2]={});const n=i[2];n.prefix==null&&t.prefix&&(n.prefix=z(t.prefix)),n.layer==null&&t.layer&&(n.layer=t.layer)};e?.forEach(r),t.rules?.forEach(r)}return t}function we(t){const e=Qe(t);if(!e.presets)return[e];const r=(e.presets||[]).flatMap(z).flatMap(we);return[e,...r]}function se(t={},e={}){const r=Object.assign({},e,t),i=R((r.presets||[]).flatMap(z).flatMap(we)),n=[...i.filter(h=>h.enforce==="pre"),...i.filter(h=>!h.enforce),...i.filter(h=>h.enforce==="post")],o=[...n,r],a=[...o].reverse(),l=Object.assign({},Je,...o.map(h=>h.layers));function u(h){return R(o.flatMap(x=>z(x[h]||[])))}const f=u("extractors");let c=a.find(h=>h.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Ye),c&&!f.includes(c)&&f.unshift(c),f.sort((h,x)=>(h.order||0)-(x.order||0));const d=u("rules"),w={},v=d.length,$=d.map((h,x)=>{if(Re(h)){z(h[2]?.prefix||"").forEach(O=>{w[O+h[0]]=[x,h[1],h[2],h]});return}return[x,...h]}).filter(Boolean).reverse();let g=et(o.map(h=>h.theme));const m=u("extendTheme");for(const h of m)g=h(g)||g;const S={templates:R(o.flatMap(h=>z(h.autocomplete?.templates))),extractors:o.flatMap(h=>z(h.autocomplete?.extractors)).sort((h,x)=>(h.order||0)-(x.order||0)),shorthands:tt(o.map(h=>h.autocomplete?.shorthands||{}))};let y=u("separators");y.length||(y=[":","-"]);const p={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:h=>h,...r,presets:n,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:g,rulesSize:v,rulesDynamic:$,rulesStaticMap:w,preprocess:u("preprocess"),postprocess:u("postprocess"),preflights:u("preflights"),autocomplete:S,variants:u("variants").map(Ve).sort((h,x)=>(h.order||0)-(x.order||0)),shortcuts:ye(u("shortcuts")).reverse(),extractors:f,safelist:u("safelist"),separators:y};for(const h of o)h?.configResolved?.(p);return p}function et(t){return t.map(e=>e?B(e):{}).reduce((e,r)=>ge(e,r),{})}function tt(t){return t.reduce((e,r)=>{const i={};for(const n in r){const o=r[n];Array.isArray(o)?i[n]=`(${o.join("|")})`:i[n]=o}return{...e,...i}},{})}const nt="0.54.1";class rt{constructor(e={},r={}){this.userConfig=e,this.defaults=r,this.version=nt,this._cache=new Map,this.blocked=new Set,this.parentOrders=new Map,this.events=Ke(),this.config=se(e,r),this.events.emit("config",this.config)}setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=se(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,i=new Set){const n={original:e,code:e,id:r,extracted:i};for(const o of this.config.extractors){const a=await o.extract?.(n);if(a)for(const l of a)i.add(l)}return i}makeContext(e,r){const i={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,variantHandlers:r[2],constructCSS:(...n)=>this.constructCustomCSS(i,...n),variantMatch:r};return i}async parseToken(e,r){if(this.blocked.has(e))return;const i=`${e}${r?` ${r}`:""}`;if(this._cache.has(i))return this._cache.get(i);let n=e;for(const f of this.config.preprocess)n=f(e);if(this.isBlocked(n)){this.blocked.add(e),this._cache.set(i,null);return}const o=await this.matchVariants(e,n);if(!o||this.isBlocked(o[1])){this.blocked.add(e),this._cache.set(i,null);return}const a=this.makeContext(e,[r||o[0],o[1],o[2],o[3]]);this.config.details&&(a.variants=[...o[3]]);const l=await this.expandShortcut(a.currentSelector,a),u=l?await this.stringifyShortcuts(a.variantMatch,a,l[0],l[1]):(await this.parseUtil(a.variantMatch,a))?.map(f=>this.stringifyUtil(f,a)).filter(De);if(u?.length)return this._cache.set(i,u),u;this._cache.set(i,null)}async generate(e,r={}){const{id:i,scope:n,preflights:o=!0,safelist:a=!0,minify:l=!1}=r,u=j(e)?await this.applyExtractors(e,i):Array.isArray(e)?new Set(e):e;a&&this.config.safelist.forEach(p=>u.add(p));const f=l?"":`
|
|
2
|
+
`,c=new Set([W]),d=new Set,w=new Map;let v={};const $=Array.from(u).map(async p=>{if(d.has(p))return;const h=await this.parseToken(p);if(h!=null){d.add(p);for(const x of h){const C=x[3]||"",O=x[4]?.layer;w.has(C)||w.set(C,[]),w.get(C).push(x),O&&c.add(O)}}});await Promise.all($),await(async()=>{if(!o)return;const p={generator:this,theme:this.config.theme},h=new Set([]);this.config.preflights.forEach(({layer:x=Y})=>{c.add(x),h.add(x)}),v=Object.fromEntries(await Promise.all(Array.from(h).map(async x=>{const O=(await Promise.all(this.config.preflights.filter(M=>(M.layer||Y)===x).map(async M=>await M.getCSS(p)))).filter(Boolean).join(f);return[x,O]})))})();const g=this.config.sortLayers(Array.from(c).sort((p,h)=>(this.config.layers[p]??0)-(this.config.layers[h]??0)||p.localeCompare(h))),m={},S=p=>{if(m[p])return m[p];let h=Array.from(w).sort((C,O)=>(this.parentOrders.get(C[0])??0)-(this.parentOrders.get(O[0])??0)||C[0]?.localeCompare(O[0]||"")||0).map(([C,O])=>{const M=O.length,P=O.filter(b=>(b[4]?.layer||W)===p).sort((b,A)=>b[0]-A[0]||(b[4]?.sort||0)-(A[4]?.sort||0)||b[5]?.currentSelector?.localeCompare(A[5]?.currentSelector??"")||b[1]?.localeCompare(A[1]||"")||b[2]?.localeCompare(A[2]||"")||0).map(([,b,A,,E,,_])=>[[[(b&&at(b,n))??"",E?.sort??0]],A,!!(_??E?.noMerge)]);if(!P.length)return;const V=P.reverse().map(([b,A,E],_)=>{if(!E&&this.config.mergeSelectors)for(let I=_+1;I<M;I++){const L=P[I];if(L&&!L[2]&&(b&&L[0]||b==null&&L[0]==null)&&L[1]===A)return b&&L[0]&&L[0].push(...b),null}const T=b?R(b.sort((I,L)=>I[1]-L[1]||I[0]?.localeCompare(L[0]||"")||0).map(I=>I[0]).filter(Boolean)):[];return T.length?`${T.join(`,${f}`)}{${A}}`:A}).filter(Boolean).reverse().join(f);if(!C)return V;const k=C.split(" $$ ");return`${k.join("{")}{${f}${V}${f}}${k.map(b=>"").join("}")}`}).filter(Boolean).join(f);o&&(h=[v[p],h].filter(Boolean).join(f));const x=l?"":`/* layer: ${p} */${f}`;return m[p]=h?x+h:""},y=(p=g,h)=>p.filter(x=>!h?.includes(x)).map(x=>S(x)||"").filter(Boolean).join(f);return{get css(){return y()},layers:g,matched:d,getLayers:y,getLayer:S}}async matchVariants(e,r){const i=new Set,n=[];let o=r||e,a=!1;const l={rawSelector:e,theme:this.config.theme,generator:this};for(;;){a=!1;for(const u of this.config.variants){if(!u.multiPass&&i.has(u))continue;let f=await u.match(o,l);if(f){if(j(f)){if(f===o)continue;f={matcher:f}}o=f.matcher,n.unshift(f),i.add(u),a=!0;break}}if(!a)break;if(n.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,o,n,i]}applyVariants(e,r=e[4],i=e[1]){const o=r.slice().sort((f,c)=>(f.order||0)-(c.order||0)).reduceRight((f,c)=>d=>{const w=c.body?.(d.entries)||d.entries,v=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??lt)({...d,entries:w,selector:c.selector?.(d.selector,w)||d.selector,parent:v[0]||d.parent,parentOrder:v[1]||d.parentOrder,layer:c.layer||d.layer,sort:c.sort||d.sort},f)},f=>f)({prefix:"",selector:ct(i),pseudo:"",entries:e[2]}),{parent:a,parentOrder:l}=o;a!=null&&l!=null&&this.parentOrders.set(a,l);const u={selector:[o.prefix,o.selector,o.pseudo].join(""),entries:o.entries,parent:a,layer:o.layer,sort:o.sort,noMerge:o.noMerge};for(const f of this.config.postprocess)f(u);return u}constructCustomCSS(e,r,i){const n=F(r);if(j(n))return n;const{selector:o,entries:a,parent:l}=this.applyVariants([0,i||e.rawSelector,n,void 0,e.variantHandlers]),u=`${o}{${G(a)}}`;return l?`${l}{${u}}`:u}async parseUtil(e,r,i=!1,n){const[o,a,l]=j(e)?await this.matchVariants(e):e;this.config.details&&(r.rules=r.rules??[]);const u=this.config.rulesStaticMap[a];if(u&&u[1]&&(i||!u[2]?.internal)){this.config.details&&r.rules.push(u[3]);const c=u[0],d=F(u[1]),w=u[2];return j(d)?[[c,d,w]]:[[c,o,d,w,l]]}r.variantHandlers=l;const{rulesDynamic:f}=this.config;for(const[c,d,w,v]of f){if(v?.internal&&!i)continue;let $=a;if(v?.prefix){const y=z(v.prefix);if(n){const p=z(n);if(!y.some(h=>p.includes(h)))continue}else{const p=y.find(h=>a.startsWith(h));if(p==null)continue;$=a.slice(p.length)}}const g=$.match(d);if(!g)continue;const m=await w(g,r);if(!m)continue;this.config.details&&r.rules.push([d,w,v]);const S=Ie(m).filter(y=>y.length);if(S.length)return S.map(y=>j(y)?[c,y,v]:[c,o,y,v,l])}}stringifyUtil(e,r){if(!e)return;if(ne(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];const{selector:i,entries:n,parent:o,layer:a,sort:l,noMerge:u}=this.applyVariants(e),f=G(n);if(!f)return;const{layer:c,sort:d,...w}=e[3]??{},v={...w,layer:a??c,sort:l??d};return[e[0],i,f,o,v,this.config.details?r:void 0,u]}async expandShortcut(e,r,i=5){if(i===0)return;const n=this.config.details?l=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(l)}:Ne;let o,a;for(const l of this.config.shortcuts){let u=e;if(l[2]?.prefix){const c=z(l[2].prefix).find(d=>e.startsWith(d));if(c==null)continue;u=e.slice(c.length)}if(Fe(l)){if(l[0]===u){o=o||l[2],a=l[1],n(l);break}}else{const f=u.match(l[0]);if(f&&(a=l[1](f,r)),a){o=o||l[2],n(l);break}}}if(j(a)&&(a=qe(a.trim()).split(/\s+/g)),!a){const[l,u]=j(e)?await this.matchVariants(e):e;if(l!==u){const f=await this.expandShortcut(u,r,i-1);f&&(a=f[0].map(c=>j(c)?l.replace(u,c):c))}}if(a)return[(await Promise.all(a.map(async l=>(j(l)?(await this.expandShortcut(l,r,i-1))?.[0]:void 0)||[l]))).flat(1).filter(Boolean),o]}async stringifyShortcuts(e,r,i,n={layer:this.config.shortcutsLayer}){const o=new Be,a=(await Promise.all(R(i).map(async c=>{const d=j(c)?await this.parseUtil(c,r,!0,n.prefix):[[Number.POSITIVE_INFINITY,"{inline}",F(c),void 0,[]]];return d||me(`unmatched utility "${c}" in shortcut "${e[1]}"`),d||[]}))).flat(1).filter(Boolean).sort((c,d)=>c[0]-d[0]),[l,,u]=e,f=[];for(const c of a){if(ne(c)){f.push([c[0],void 0,c[1],void 0,c[2],r,void 0]);continue}const{selector:d,entries:w,parent:v,sort:$,noMerge:g}=this.applyVariants(c,[...c[4],...u],l);o.getFallback(d,v,[[],c[0]])[0].push([w,!!(g??c[3]?.noMerge),$??0])}return f.concat(o.map(([c,d],w,v)=>{const $=(m,S,y)=>{const p=Math.max(...y.map(x=>x[1])),h=y.map(x=>x[0]);return(m?[h.flat(1)]:h).map(x=>{const C=G(x);if(C)return[d,w,C,v,{...n,noMerge:S,sort:p},r,void 0]})};return[[c.filter(([,m])=>m).map(([m,,S])=>[m,S]),!0],[c.filter(([,m])=>!m).map(([m,,S])=>[m,S]),!1]].map(([m,S])=>[...$(!1,S,m.filter(([y])=>y.some(p=>p[0]===te))),...$(!0,S,m.filter(([y])=>y.every(p=>p[0]!==te)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(r=>j(r)?r===e:r.test(e))}}function it(t,e){return new rt(t,e)}const st=/\s\$\$\s+/g;function ot(t){return t.match(/\s\$\$\s/)}function at(t,e){return ot(t)?t.replace(st,e?` ${e} `:" "):e?`${e} ${t}`:t}const oe=/^\[(.+?)(~?=)"(.*)"\]$/;function ct(t){return oe.test(t)?t.replace(oe,(e,r,i,n)=>`[${q(r)}${i}"${q(n)}"]`):`.${q(t)}`}function lt(t,e){return e(t)}function ut(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ft(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),ut(e)}const ht=3;function dt(t){return function(r={}){const{scale:i=1,mode:n="auto",prefix:o="i-",warn:a=!1,collections:l,extraProperties:u={},customizations:f={},autoInstall:c=!1,layer:d="icons",unit:w}=r,v={addXmlNs:!0,scale:i,customCollections:l,autoInstall:c,warn:void 0,customizations:{...f,additionalProps:{...u},trimCustomSvg:!0,async iconCustomizer(g,m,S){await f.iconCustomizer?.(g,m,S),w&&(S.width||(S.width=`${i}${w}`),S.height||(S.height=`${i}${w}`))}}};let $;return{name:"@unocss/preset-icons",enforce:"pre",options:r,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([g,m,S=n])=>{let y="",p="",h;$=$||await t(r);const x={};if(m.includes(":"))[y,p]=m.split(":"),h=await $(y,p,{...v,usedProps:x});else{const O=m.split(/-/g);for(let M=ht;M>=1&&(y=O.slice(0,M).join("-"),p=O.slice(M).join("-"),h=await $(y,p,{...v,usedProps:x}),!h);M--);}if(!h){a&&me(`failed to load icon "${g}"`);return}const C=`url("data:image/svg+xml;utf8,${ft(h)}")`;return S==="auto"&&(S=h.includes("currentColor")?"mask":"bg"),S==="mask"?{"--un-icon":C,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...x}:{background:`${C} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...x}},{layer:d,prefix:o}]]}}}const pt=dt(async t=>{const{cdn:e}=t;return e?Le(e):pe});function gt(t){return t.replace(/-(\w)/g,(e,r)=>r?r.toUpperCase():"")}function ae(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ce(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var le=["Webkit","Moz","ms"];function mt(t){const e={};function r(i){const n=e[i];if(n)return n;let o=gt(i);if(o!=="filter"&&o in t)return e[i]=ce(o);o=ae(o);for(let a=0;a<le.length;a++){const l=`${le[a]}${o}`;if(l in t)return e[i]=ce(ae(l))}return i}return({entries:i})=>i.forEach(n=>{n[0].startsWith("--")||(n[0]=r(n[0]))})}function yt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function wt(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,r=window.document,i=()=>r.documentElement,n=e.__unocss||{},o=Object.assign({},t,n.runtime),a=o.defaults||{},l=o.cloakAttribute??"un-cloak";o.autoPrefix&&(a.postprocess=z(a.postprocess)).unshift(mt(r.createElement("div").style)),o.configResolved?.(n,a);const u=it(n,a),f=new Map;let c=!0,d=new Set,w,v,$=[];const g=()=>new Promise(k=>{$.push(k),v!=null&&clearTimeout(v),v=setTimeout(()=>y().then(()=>{const b=$;$=[],b.forEach(A=>A())}),0)});function m(k){if(k.nodeType!==1)return;const b=k;b.hasAttribute(l)&&b.removeAttribute(l),b.querySelectorAll(`[${l}]`).forEach(A=>{A.removeAttribute(l)})}function S(k,b){let A=f.get(k);if(!A)if(A=r.createElement("style"),A.setAttribute("data-unocss-runtime-layer",k),f.set(k,A),b==null)i().prepend(A);else{const E=S(b),_=E.parentNode;_?_.insertBefore(A,E.nextSibling):i().prepend(A)}return A}async function y(){const k=await u.generate(d);return k.layers.reduce((b,A)=>(S(A,b).innerHTML=k.getLayer(A)??"",A),void 0),d=k.matched,{...k,getStyleElement:b=>f.get(b),getStyleElements:()=>f}}async function p(k){const b=d.size;await u.applyExtractors(k,void 0,d),b!==d.size&&await g()}async function h(){const k=r.body,b=k&&k.outerHTML;b&&(await p(`${b} ${yt(b)}`),m(i()),m(k))}const x=new MutationObserver(k=>{c||k.forEach(async b=>{if(b.target.nodeType!==1)return;const A=b.target;for(const E of f)if(A===E[1])return;if(b.type==="childList")b.addedNodes.forEach(async E=>{if(E.nodeType!==1)return;const _=E;w&&!w(_)||(await p(_.outerHTML),m(_))});else{if(w&&!w(A))return;if(b.attributeName!==l){const E=Array.from(A.attributes).map(T=>T.value?`${T.name}="${T.value}"`:T.name).join(" "),_=`<${A.tagName.toLowerCase()} ${E}>`;await p(_)}A.hasAttribute(l)&&A.removeAttribute(l)}})});let C=!1;function O(){if(C)return;const k=i()||r.body;k&&(x.observe(k,{childList:!0,subtree:!0,attributes:!0}),C=!0)}function M(){o.bypassDefined&&bt(u.blocked),h(),O()}function P(){r.readyState==="loading"?e.addEventListener("DOMContentLoaded",M):M()}const V=e.__unocss_runtime=e.__unocss_runtime={version:u.version,uno:u,async extract(k){j(k)||(k.forEach(b=>d.add(b)),k=""),await p(k)},extractAll:h,inspect(k){w=k},toggleObserver(k){k===void 0?c=!c:c=!!k,!C&&!c&&P()},update:y};o.ready?.(V)!==!1&&(c=!1,P())}function bt(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const r=document.styleSheets[e];let i;try{if(i=r.cssRules||r.rules,!i)continue;Array.from(i).flatMap(n=>n.selectorText?.split(/,/g)||[]).forEach(n=>{n&&(n=n.trim(),n.startsWith(".")&&(n=n.slice(1)),t.add(n))})}catch{continue}}return t}wt({defaults:{presets:[pt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|