@nuxt/devtools 1.2.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/chunks/module-main.mjs +2 -35
  2. package/dist/chunks/vscode.mjs +1 -0
  3. package/dist/client/200.html +21 -21
  4. package/dist/client/404.html +21 -21
  5. package/dist/client/_nuxt/{CFcWLH5V.js → -qWogbxp.js} +1 -1
  6. package/dist/client/_nuxt/{D8i82D0r.js → 2rHQ-89_.js} +1 -1
  7. package/dist/client/_nuxt/5Viy9mJZ.js +1 -0
  8. package/dist/client/_nuxt/{ooCcziGQ.js → 5rat9AfN.js} +3 -3
  9. package/dist/client/_nuxt/{8vVaiFyN.js → 66lAmVWa.js} +1 -1
  10. package/dist/client/_nuxt/{D_pwdbKS.js → B1WwrPQO.js} +2 -2
  11. package/dist/client/_nuxt/{CYIc81Hh.js → B4a1LB7w.js} +2 -2
  12. package/dist/client/_nuxt/{CQwJxTyO.js → B5LBktAa.js} +2 -2
  13. package/dist/client/_nuxt/{D2TLnKEp.js → B7vUcbNk.js} +1 -1
  14. package/dist/client/_nuxt/{Bm01LnY_.js → BBiSxoA1.js} +1 -1
  15. package/dist/client/_nuxt/{BvY_Q6Ny.js → BEabNaD3.js} +1 -1
  16. package/dist/client/_nuxt/BGq4KZyx.js +1 -0
  17. package/dist/client/_nuxt/{DrouHJc_.js → BL23Bc6O.js} +1 -1
  18. package/dist/client/_nuxt/BMbUeBqv.js +74 -0
  19. package/dist/client/_nuxt/{Dlh-yUDi.js → BNIC4eZE.js} +1 -1
  20. package/dist/client/_nuxt/{BluVLImH.js → BNSBUDhB.js} +1 -1
  21. package/dist/client/_nuxt/{C_6aSAC7.js → BOBmlKb6.js} +1 -1
  22. package/dist/client/_nuxt/BWnGocWo.js +1 -0
  23. package/dist/client/_nuxt/BYVFCOjE.js +1 -0
  24. package/dist/client/_nuxt/BZfs-ost.js +1 -0
  25. package/dist/client/_nuxt/{DM7LQm-O.js → B_Ym5JKn.js} +1 -1
  26. package/dist/client/_nuxt/{Cgy-yYrX.js → BbqA4Ggc.js} +1 -1
  27. package/dist/client/_nuxt/{ClFBqw1c.js → BcobmRlA.js} +1 -1
  28. package/dist/client/_nuxt/BiWblMbN.js +505 -0
  29. package/dist/client/_nuxt/{Dbt1lqd7.js → BkK_qJ34.js} +1 -1
  30. package/dist/client/_nuxt/{Cr5Lt2Bh.js → BlDdoh7Z.js} +1 -1
  31. package/dist/client/_nuxt/{3yXnKq4C.js → BlKdmH9f.js} +1 -1
  32. package/dist/client/_nuxt/{CauQWwFB.js → Br0oqAKP.js} +1 -1
  33. package/dist/client/_nuxt/{DVpEqQtB.js → Bs6Xt_hm.js} +1 -1
  34. package/dist/client/_nuxt/{CE1aCf8a.js → Bx439kud.js} +1 -1
  35. package/dist/client/_nuxt/{DlQNtCxN.js → C0doa8lg.js} +1 -1
  36. package/dist/client/_nuxt/CDjZ2Pwm.js +99 -0
  37. package/dist/client/_nuxt/{CYUk1Phb.js → CGdFtN3I.js} +1 -1
  38. package/dist/client/_nuxt/CHuuZgn4.js +699 -0
  39. package/dist/client/_nuxt/{E3u_JT2d.js → CLKMZBSj.js} +1 -1
  40. package/dist/client/_nuxt/{D8hnvtQ7.js → CLVJ1qFH.js} +1 -1
  41. package/dist/client/_nuxt/{DnNA5yXt.js → CQ4DIexe.js} +1 -1
  42. package/dist/client/_nuxt/{BKROsu9M.js → CQfzcXIu.js} +1 -1
  43. package/dist/client/_nuxt/CSxKs2xg.js +48 -0
  44. package/dist/client/_nuxt/CWDIGLyg.js +1 -0
  45. package/dist/client/_nuxt/Cdv1FpqM.js +20 -0
  46. package/dist/client/_nuxt/{BNbY1jCQ.js → CgdhjF_I.js} +1 -1
  47. package/dist/client/_nuxt/{Dow1QcrX.js → CgvvXsvn.js} +1 -1
  48. package/dist/client/_nuxt/{DrTLrgyX.js → CiwDa1gT.js} +1 -1
  49. package/dist/client/_nuxt/D0LPR03l.js +1 -0
  50. package/dist/client/_nuxt/D4dWpejW.js +2 -0
  51. package/dist/client/_nuxt/{CoH69PTx.js → DCvec3a_.js} +1 -1
  52. package/dist/client/_nuxt/{DjE-sQMX.js → DCzXkWpZ.js} +1 -1
  53. package/dist/client/_nuxt/DDnrbwm6.js +2002 -0
  54. package/dist/client/_nuxt/{TDzLXguC.js → DE_Uwlru.js} +1 -1
  55. package/dist/client/_nuxt/DHFOa8tC.js +200 -0
  56. package/dist/client/_nuxt/DO3F8Knp.js +1 -0
  57. package/dist/client/_nuxt/{HezyzoNS.js → DQFmACZp.js} +1 -1
  58. package/dist/client/_nuxt/{BwcgHM_R.js → DQS-rzez.js} +1 -1
  59. package/dist/client/_nuxt/{QUVBuzQ1.js → DRuHuqMZ.js} +1 -1
  60. package/dist/client/_nuxt/DRzmYdLW.js +1 -0
  61. package/dist/client/_nuxt/{DPywwtwa.js → DTnMHt2b.js} +1 -1
  62. package/dist/client/_nuxt/{ylHKncut.js → DW3jphl9.js} +1 -1
  63. package/dist/client/_nuxt/DdJKusQR.js +1 -0
  64. package/dist/client/_nuxt/{BZMq3h7l.js → DgR63EN_.js} +155 -155
  65. package/dist/client/_nuxt/{CwLZOs-U.js → DjVyxknR.js} +1 -1
  66. package/dist/client/_nuxt/{Dpi9Vpa4.js → DnhEYZMs.js} +1 -1
  67. package/dist/client/_nuxt/{DzJVEN15.js → Dw5Tt5gJ.js} +1 -1
  68. package/dist/client/_nuxt/HBr8xMzr.js +1 -0
  69. package/dist/client/_nuxt/{D0GIdZjD.js → J3djixjQ.js} +1 -1
  70. package/dist/client/_nuxt/JkOP3KoO.js +1 -0
  71. package/dist/client/_nuxt/{DXyT_6cw.js → K0tfU50F.js} +1 -1
  72. package/dist/client/_nuxt/{gY9iaHZB.js → LKwhzCVp.js} +1 -1
  73. package/dist/client/_nuxt/NSectionBlock.DF4F_onM.css +1 -0
  74. package/dist/client/_nuxt/Q9LIRUci.js +25 -0
  75. package/dist/client/_nuxt/{Cd6DbZRp.js → Tw6nDHWX.js} +1 -1
  76. package/dist/client/_nuxt/V_y36BGi.js +1 -0
  77. package/dist/client/_nuxt/{Cykwuu7C.js → Zl399FYQ.js} +1 -1
  78. package/dist/client/_nuxt/_ECCzcZq.js +666 -0
  79. package/dist/client/_nuxt/builds/latest.json +1 -1
  80. package/dist/client/_nuxt/builds/meta/24abe175-04a3-492b-88f5-fff7ea90b9c1.json +1 -0
  81. package/dist/client/_nuxt/entry.CyP5HdOH.css +1 -0
  82. package/dist/client/_nuxt/{DFXWDr_U.js → f1qyuWhx.js} +1 -1
  83. package/dist/client/_nuxt/index.BeOv1PgR.css +1 -0
  84. package/dist/client/_nuxt/jeEj0LFC.js +1 -0
  85. package/dist/client/_nuxt/tYBohD88.js +1 -0
  86. package/dist/client/index.html +21 -21
  87. package/dist/module.json +5 -1
  88. package/dist/runtime/plugins/view/FrameBox.vue +3 -1
  89. package/dist/runtime/plugins/view/Main.vue +11 -1
  90. package/dist/runtime/plugins/view/client.mjs +4 -2
  91. package/package.json +30 -30
  92. package/dist/client/_nuxt/BX_yun5E.js +0 -2
  93. package/dist/client/_nuxt/B_ROKca0.js +0 -1
  94. package/dist/client/_nuxt/Bbe7V3sH.js +0 -1
  95. package/dist/client/_nuxt/C5RWud-q.js +0 -99
  96. package/dist/client/_nuxt/C6_5TE6z.js +0 -1
  97. package/dist/client/_nuxt/CmQBHnO5.js +0 -1
  98. package/dist/client/_nuxt/Cm_JFd_X.js +0 -1
  99. package/dist/client/_nuxt/DUvGfBHy.js +0 -1
  100. package/dist/client/_nuxt/DptAiT3z.js +0 -2
  101. package/dist/client/_nuxt/NSectionBlock.BrczCkLG.css +0 -1
  102. package/dist/client/_nuxt/VE_JCmIg.js +0 -1
  103. package/dist/client/_nuxt/builds/meta/99d3dbae-7b79-44d1-9122-56d8f78db12b.json +0 -1
  104. package/dist/client/_nuxt/entry.CKLgeA_k.css +0 -1
  105. package/dist/client/_nuxt/pinia.zSt3sP7_.css +0 -1
  106. package/dist/client/_nuxt/qlO0zMWA.js +0 -48
  107. package/dist/client/_nuxt/tVhGyT2d.js +0 -1
@@ -1 +1 @@
1
- import{d as s,a as u,o as d,m as f,v as p,t as o,f as n,k as c,G as m}from"./qlO0zMWA.js";const x={"ml-1":"","text-xs":"",op50:""},g=s({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(a){const t=a;function i(r){return t.color?r?(r=r*t.factor,r<.5?"text-gray:50":r>1e3?"text-red-400":r>500?"text-orange-400":r>200?"text-yellow-400":""):"text-gray-400":""}const e=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(r,l)=>(d(),f("div",{class:m(i(r.duration))},[p(o(n(e)[0]),1),c("span",x,o(n(e)[1]),1)],2))}});export{g as _};
1
+ import{d as s,a as u,o as d,m as f,v as p,t as o,f as n,k as c,G as m}from"./CSxKs2xg.js";const x={"ml-1":"","text-xs":"",op50:""},g=s({__name:"DurationDisplay",props:{duration:{},factor:{default:1},color:{type:Boolean,default:!0}},setup(a){const t=a;function i(r){return t.color?r?(r=r*t.factor,r<.5?"text-gray:50":r>1e3?"text-red-400":r>500?"text-orange-400":r>200?"text-yellow-400":""):"text-gray-400":""}const e=u(()=>!t.duration||t.duration<1?["<1","ms"]:t.duration<1e3?[t.duration.toFixed(0),"ms"]:t.duration<1e3*60?[(t.duration/1e3).toFixed(1),"s"]:[(t.duration/1e3/60).toFixed(1),"min"]);return(r,l)=>(d(),f("div",{class:m(i(r.duration))},[p(o(n(e)[0]),1),c("span",x,o(n(e)[1]),1)],2))}});export{g as _};
@@ -1 +1 @@
1
- import{d as p,a0 as m,o,m as l,aa as n,h as f,p as t,I as b,c4 as h,f as v,k,t as y,l as V,G as d,a6 as B}from"./qlO0zMWA.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},C=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=m(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),f(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{C as _};
1
+ import{d as p,a0 as m,o,m as l,aa as n,h as f,p as t,I as b,c4 as h,f as v,k,t as y,l as V,G as d,a6 as B}from"./CSxKs2xg.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},C=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=m(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),f(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{C as _};
@@ -1,4 +1,4 @@
1
- import{d as g,av as N,a as m,m as u,f as a,i as E,j as x,k as p,t as d,p as v,h as y,Y as C,o as l,v as b}from"./qlO0zMWA.js";import{_ as S}from"./DPywwtwa.js";import"./DVpEqQtB.js";const R=/(^|@)\S+:\d+/,h=/^\s*at .*(\S+:\d+|\(native\))/m,$=/^(eval@)?(\[native code])?$/;function _(n){if(typeof n.stacktrace<"u"||typeof n["opera#sourceloc"]<"u")return A(n);if(n.stack&&n.stack.match(h))return O(n);if(n.stack)return w(n);throw new Error("Cannot parse given Error object")}function f(n){if(!n.includes(":"))return[n];const e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(n.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]}function O(n){return n.stack.split(`
1
+ import{d as g,al as N,a as m,m as u,f as a,i as E,j as x,k as p,t as d,p as v,h as y,Y as C,o as l,v as b}from"./CSxKs2xg.js";import{_ as S}from"./DTnMHt2b.js";import"./Bs6Xt_hm.js";const R=/(^|@)\S+:\d+/,h=/^\s*at .*(\S+:\d+|\(native\))/m,$=/^(eval@)?(\[native code])?$/;function _(n){if(typeof n.stacktrace<"u"||typeof n["opera#sourceloc"]<"u")return A(n);if(n.stack&&n.stack.match(h))return O(n);if(n.stack)return w(n);throw new Error("Cannot parse given Error object")}function f(n){if(!n.includes(":"))return[n];const e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(n.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]}function O(n){return n.stack.split(`
2
2
  `).filter(e=>!!e.match(h)).map(e=>{e.includes("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const t=s.match(/ (\(.+\)$)/);s=t?s.replace(t[0],""):s;const r=f(t?t[1]:s),o=t&&s||void 0,i=["eval","<anonymous>"].includes(r[0])?void 0:r[0];return{functionName:o,fileName:i,lineNumber:r[1]?+r[1]:void 0,columnNumber:r[2]?+r[2]:void 0,source:e}})}function w(n){return n.stack.split(`
3
3
  `).filter(e=>!e.match($)).map(e=>{if(e.includes(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!e.includes("@")&&!e.includes(":"))return{functionName:e};{const s=/((.*".+"[^@]*)?[^@]*)(?:@)/,t=e.match(s),r=t&&t[1]?t[1]:void 0,o=f(e.replace(s,""));return{functionName:r,fileName:o[0],lineNumber:o[1]?+o[1]:void 0,columnNumber:o[2]?+o[2]:void 0,source:e}}})}function A(n){return!n.stacktrace||n.message.includes(`
4
4
  `)&&n.message.split(`
@@ -0,0 +1 @@
1
+ import{d as q,an as $,r as A,a as g,ay as j,az as B,aq as D,aA as E,aB as b,aC as M,aD as N,m as I,o as s,aE as L,P,aF as V,aG as C,aH as W,f as a,h as c,j as y,ax as O,A as R,k as u,v as w,t as T,L as S,i as F,ar as U,aI as G}from"./CSxKs2xg.js";import{_ as z}from"./5Viy9mJZ.js";import"./BcobmRlA.js";import"./f1qyuWhx.js";const x=new Map,H=q({__name:"IframeView",props:{tab:{}},setup(f){const m=f,r=$(),v=A(),i=g(()=>m.tab.name),e=A(),t=j(B(v));D(()=>{const n=m.tab.view,l=n.persistent!==!1,h=["clipboard-write","clipboard-read"];if(x.get(i.value)&&l)e.value=x.get(i.value),e.value.style.visibility="visible";else{e.value=document.createElement("iframe"),e.value.setAttribute("allow",h.join("; ")),e.value.setAttribute("aria-label","Nuxt Devtools"),l&&x.set(i.value,e.value),e.value.src=n.src;try{e.value.style.opacity="0.01",e.value.onload=()=>{d(),o(),e.value.style.opacity="1"}}catch{e.value.style.opacity="1"}document.body.appendChild(e.value),E(_)}setTimeout(o,100)}),b(_),b(o),b(d),M(()=>{e.value&&(e.value.style.visibility="hidden")});function o(){if(!(!e.value||!e.value.contentWindow))try{const n=e.value.contentWindow.document.querySelector("html");n?.classList.toggle("dark",r.value==="dark"),n?.classList.toggle("light",r.value==="dark"),new MutationObserver(()=>{r.value=e.value?.contentWindow?.document.querySelector("html")?.classList.contains("dark")?"dark":"light"}).observe(n,{attributes:!0,attributeFilter:["class"]})}catch{}}const p=N();function d(){if(!(!e.value||!e.value.contentWindow))try{e.value.contentWindow.__NUXT_DEVTOOLS__=p.value}catch{}}function _(){e.value&&Object.assign(e.value.style,{position:"fixed",left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`,outline:"none"})}return(n,l)=>(s(),I("div",{ref_key:"anchor",ref:v,"h-full":"","w-full":""},null,512))}}),X={flex:"~ col gap2",mxa:"","items-center":""},J=u("div",{"i-carbon-queued":"",mb2:"","text-5xl":"",op50:""},null,-1),K={"text-xl":""},Q={"text-rose":""},Y=u("p",{op50:""}," It might because the module contributing this tab is not installed or enabled ",-1),Z=u("p",{mt8:"","animate-pulse":""}," Redirecting to overview page... ",-1),oe=q({__name:"custom-[name]",props:{name:{}},setup(f){const m=f,r=L(),v=P(),i=g(()=>m.name??r.params.name),e=V(),t=g(()=>e.value.find(o=>o.name===i.value));return D(()=>{t.value?t.value.requireAuth&&!C.value&&W():setTimeout(()=>{t.value||v.push("/modules/overview")},2e3)}),(o,p)=>{const d=R,_=G,n=H,l=z,h=U;return a(t)?a(t).requireAuth&&!("isDevAuthed"in o?o.isDevAuthed:a(C))?(s(),c(_,{key:1})):a(t).view.type==="iframe"?(s(),c(n,{key:2,tab:a(t)},null,8,["tab"])):a(t).view.type==="vnode"?(s(),c(O(a(t).view.vnode),{key:3})):a(t).view.type==="launch"?(s(),c(l,{key:4,name:`custom-${a(t).name}`,icon:a(t).view.icon||a(t).icon,title:a(t).view.title||a(t).title,description:a(t).view.description,actions:a(t).view.actions,onAction:p[0]||(p[0]=k=>("rpc"in o?o.rpc:a(S)).customTabAction(a(t).name,k))},null,8,["name","icon","title","description","actions"])):(s(),c(d,{key:5},{default:y(()=>[F(h,{flex:"~ col","h-full":"","items-center":"","justify-center":""},{default:y(()=>[w(" Unknown tab type "+T(a(t).view),1)]),_:1})]),_:1})):(s(),c(d,{key:0},{default:y(()=>[u("div",X,[J,u("p",K,[w(" Tab "),u("code",Q,T(a(i)),1),w(" not found ")]),Y,Z])]),_:1}))}}});export{oe as default};
@@ -0,0 +1,2 @@
1
+ import{$ as Ce}from"./CSxKs2xg.js";function Ae(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const Y=Ae;function L(t=[]){return Array.isArray(t)?t:[t]}function G(t){return Array.from(new Set(t))}function Oe(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function E(t){return typeof t=="string"}function D(t){return E(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Me(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>D(e)):[t]:[D(t)]}function Ee(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function q(t){return t==null?"":Ee(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function V(t){return t&&typeof t=="object"&&!Array.isArray(t)}function de(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return V(s)&&V(r)&&Object.keys(r).forEach(o=>{V(s[o])&&V(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=de(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function U(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?U(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:U(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?U(s):s;return n}return t}function ke(t){return E(t[0])}function je(t){return E(t[0])}const Q="$$shortcut-no-merge";function Le(t){return typeof t=="function"?{match:t}:t}function ee(t){return t.length===3}function Pe(t){return t!=null}function Te(){}var ze=Object.defineProperty,Fe=(t,e,n)=>e in t?ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ie=(t,e,n)=>(Fe(t,e+"",n),n);class Ne{constructor(){Ie(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}class Re extends Map{getFallback(e,n){const s=this.get(e);return s===void 0?(this.set(e,n),n):s}map(e){const n=[];return this.forEach((s,r)=>{n.push(e(s,r))}),n}flatMap(e){const n=[];return this.forEach((s,r)=>{n.push(...e(s,r))}),n}}var De=Object.defineProperty,Ve=(t,e,n)=>e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Be=(t,e,n)=>(Ve(t,e+"",n),n);class pe extends Set{constructor(e){super(e),Be(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(this._map=new Map),this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,n){return this._map.set(e,n),super.add(e)}}function K(t){return t instanceof pe}const B={};function Ue(t=["-",":"]){const e=t.join("|");return B[e]||(B[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),B[e].lastIndex=0,B[e]}function He(t,e=["-",":"],n=5){const s=Ue(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(f,c,h,y,v)=>{if(!e.includes(h))return f;r=!0,o.add(c+h);const _=v+c.length+h.length+1,p={length:f.length,items:[]};a.set(v,p);for(const m of[...y.matchAll(/\S+/g)]){const O=_+m.index;let g=a.get(O)?.items;g?a.delete(O):g=[{offset:O,length:m[0].length,className:m[0]}];for(const w of g)w.className=w.className==="~"?c:w.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),p.items.push(w)}return"$".repeat(f.length)}),n-=1;while(r&&n);let l;if(typeof t=="string"){l="";let f=0;for(const[c,h]of a)l+=t.slice(f,c),l+=h.items.map(y=>y.className).join(" "),f=c+h.length;l+=t.slice(f)}else{l=t;for(const[f,c]of a)l.overwrite(f,f+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return l.toString()}}}function Ge(t,e=["-",":"],n=5){const s=He(t,e,n);return typeof t=="string"?s.expanded:t}const te=new Set;function me(t){te.has(t)||(console.warn("[unocss]",t),te.add(t))}const We=/[\\:]?[\s'"`;{}]+/g;function Ye(t){return t.split(We)}const qe={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ye(t)}};function Ke(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const H="default",Z="preflights",Xe="shortcuts",Ze="imports",Je={[Ze]:-200,[Z]:-100,[Xe]:-10,[H]:0};function ge(t){return L(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ne="_uno_resolved";function Qe(t){let e=typeof t=="function"?t():t;if(ne in e)return e;e={...e},Object.defineProperty(e,ne,{value:!0,enumerable:!1});const n=e.shortcuts?ge(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=L(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function ye(t){const e=Qe(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(L).flatMap(ye);return[e,...n]}function re(t={},e={}){const n=Object.assign({},e,t),s=Oe((n.presets||[]).flatMap(L).flatMap(ye),(u,d)=>u.name===d.name),r=[...s.filter(u=>u.enforce==="pre"),...s.filter(u=>!u.enforce),...s.filter(u=>u.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},Je,...i.map(u=>u.layers));function l(u){return G(i.flatMap(d=>L(d[u]||[])))}const f=l("extractors");let c=o.find(u=>u.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=qe),c&&!f.includes(c)&&f.unshift(c),f.sort((u,d)=>(u.order||0)-(d.order||0));const h=l("rules"),y={},v=h.length,_=h.map((u,d)=>{if(ke(u)){L(u[2]?.prefix||"").forEach(C=>{y[C+u[0]]=[d,u[1],u[2],u]});return}return[d,...u]}).filter(Boolean).reverse();let p=et(i.map(u=>u.theme));const m=l("extendTheme");for(const u of m)p=u(p)||p;const O={templates:G(i.flatMap(u=>L(u.autocomplete?.templates))),extractors:i.flatMap(u=>L(u.autocomplete?.extractors)).sort((u,d)=>(u.order||0)-(d.order||0)),shorthands:tt(i.map(u=>u.autocomplete?.shorthands||{}))};let g=l("separators");g.length||(g=[":","-"]);const w={mergeSelectors:!0,warn:!0,sortLayers:u=>u,...n,blocklist:l("blocklist"),presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:p,rulesSize:v,rulesDynamic:_,rulesStaticMap:y,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:O,variants:l("variants").map(Le).sort((u,d)=>(u.order||0)-(d.order||0)),shortcuts:ge(l("shortcuts")).reverse(),extractors:f,safelist:l("safelist"),separators:g,details:n.details??n.envMode==="dev"};for(const u of i)u?.configResolved?.(w);return w}function et(t){return t.map(e=>e?U(e):{}).reduce((e,n)=>de(e,n),{})}function tt(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}const nt="0.60.0";var rt=Object.defineProperty,st=(t,e,n)=>e in t?rt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R=(t,e,n)=>(st(t,typeof e!="symbol"?e+"":e,n),n);class it{constructor(e={},n={}){this.userConfig=e,this.defaults=n,R(this,"version",nt),R(this,"_cache",new Map),R(this,"config"),R(this,"blocked",new Set),R(this,"parentOrders",new Map),R(this,"events",Ke()),this.config=re(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=re(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(K(o)&&K(s))for(const a of o)s.setCount(a,s.getCount(a)+o.getCount(a));else for(const a of o)s.add(a)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const f of this.config.preprocess)r=f(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const a=await this.expandShortcut(o.currentSelector,o),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(f=>this.stringifyUtil(f,o)).filter(Pe);if(l?.length)return this._cache.set(s,l),l;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=n,f=this.config.outputToCssLayers,c=E(e)?await this.applyExtractors(e,s,l?new pe:new Set):Array.isArray(e)?new Set(e):e;if(o){const d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(x=>typeof x=="function"?x(d):x).forEach(x=>{c.has(x)||c.add(x)})}const h=a?"":`
2
+ `,y=new Set([H]),v=l?new Map:new Set,_=new Map;let p={};const m=Array.from(c).map(async d=>{if(v.has(d))return;const x=await this.parseToken(d);if(x!=null){v instanceof Map?v.set(d,{data:x,count:K(c)?c.getCount(d):-1}):v.add(d);for(const C of x){const A=C[3]||"",M=C[4]?.layer;_.has(A)||_.set(A,[]),_.get(A).push(C),M&&y.add(M)}}});await Promise.all(m),await(async()=>{if(!i)return;const d={generator:this,theme:this.config.theme},x=new Set([]);this.config.preflights.forEach(({layer:C=Z})=>{y.add(C),x.add(C)}),p=Object.fromEntries(await Promise.all(Array.from(x).map(async C=>{const M=(await Promise.all(this.config.preflights.filter(P=>(P.layer||Z)===C).map(async P=>await P.getCSS(d)))).filter(Boolean).join(h);return[C,M]})))})();const O=this.config.sortLayers(Array.from(y).sort((d,x)=>(this.config.layers[d]??0)-(this.config.layers[x]??0)||d.localeCompare(x))),g={},w=(d=H)=>{if(g[d])return g[d];let x=Array.from(_).sort((A,M)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(M[0])??0)||A[0]?.localeCompare(M[0]||"")||0).map(([A,M])=>{const P=M.length,z=M.filter(b=>(b[4]?.layer||H)===d).sort((b,$)=>b[0]-$[0]||(b[4]?.sort||0)-($[4]?.sort||0)||b[5]?.currentSelector?.localeCompare($[5]?.currentSelector??"")||b[1]?.localeCompare($[1]||"")||b[2]?.localeCompare($[2]||"")||0).map(([,b,$,,k,,j])=>[[[(b&&ct(b,r))??"",k?.sort??0]],$,!!(j??k?.noMerge)]);if(!z.length)return;const F=z.reverse().map(([b,$,k],j)=>{if(!k&&this.config.mergeSelectors)for(let N=j+1;N<P;N++){const T=z[N];if(T&&!T[2]&&(b&&T[0]||b==null&&T[0]==null)&&T[1]===$)return b&&T[0]&&T[0].push(...b),null}const I=b?G(b.sort((N,T)=>N[1]-T[1]||N[0]?.localeCompare(T[0]||"")||0).map(N=>N[0]).filter(Boolean)):[];return I.length?`${I.join(`,${h}`)}{${$}}`:$}).filter(Boolean).reverse().join(h);if(!A)return F;const S=A.split(" $$ ");return`${S.join("{")}{${h}${F}${h}${"}".repeat(S.length)}`}).filter(Boolean).join(h);if(i&&(x=[p[d],x].filter(Boolean).join(h)),f&&x){let A=typeof f=="object"?f.cssLayerName?.(d):void 0;A!==null&&(A||(A=d),x=`@layer ${A}{${h}${x}${h}}`)}const C=a?"":`/* layer: ${d} */${h}`;return g[d]=x?C+x:""},u=(d=O,x)=>d.filter(C=>!x?.includes(C)).map(C=>w(C)||"").filter(Boolean).join(h);return{get css(){return u()},layers:O,matched:v,getLayers:u,getLayer:w}}async matchVariants(e,n){const s=new Set,r=[];let i=n||e,o=!0;const a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(const l of this.config.variants){if(!l.multiPass&&s.has(l))continue;let f=await l.match(i,a);if(f){if(E(f)){if(f===i)continue;f={matcher:f}}i=f.matcher,r.unshift(f),s.add(l),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,r,s]}applyVariants(e,n=e[4],s=e[1]){const i=n.slice().sort((f,c)=>(f.order||0)-(c.order||0)).reduceRight((f,c)=>h=>{const y=c.body?.(h.entries)||h.entries,v=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??ft)({...h,entries:y,selector:c.selector?.(h.selector,y)||h.selector,parent:v[0]||h.parent,parentOrder:v[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},f)},f=>f)({prefix:"",selector:lt(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const f of this.config.postprocess)f(l);return l}constructCustomCSS(e,n,s){const r=D(n);if(E(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),l=`${i}{${q(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,n,s=!1,r){const[i,o,a]=E(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const l=this.config.rulesStaticMap[o];if(l&&l[1]&&(s||!l[2]?.internal)){this.config.details&&n.rules.push(l[3]);const c=l[0],h=D(l[1]),y=l[2];return E(h)?[[c,h,y]]:[[c,i,h,y,a]]}n.variantHandlers=a;const{rulesDynamic:f}=this.config;for(const[c,h,y,v]of f){if(v?.internal&&!s)continue;let _=o;if(v?.prefix){const g=L(v.prefix);if(r){const w=L(r);if(!g.some(u=>w.includes(u)))continue}else{const w=g.find(u=>o.startsWith(u));if(w==null)continue;_=o.slice(w.length)}}const p=_.match(h);if(!p)continue;const m=await y(p,n);if(!m)continue;this.config.details&&n.rules.push([h,y,v]);const O=Me(m).filter(g=>g.length);if(O.length)return O.map(g=>E(g)?[c,g,v]:[c,i,g,v,a])}}stringifyUtil(e,n){if(!e)return;if(ee(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?n:void 0,void 0];const{selector:s,entries:r,parent:i,layer:o,sort:a,noMerge:l}=this.applyVariants(e),f=q(r);if(!f)return;const{layer:c,sort:h,...y}=e[3]??{},v={...y,layer:o??c,sort:a??h};return[e[0],s,f,i,v,this.config.details?n:void 0,l]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:Te;let i,o;for(const a of this.config.shortcuts){let l=e;if(a[2]?.prefix){const c=L(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;l=e.slice(c.length)}if(je(a)){if(a[0]===l){i=i||a[2],o=a[1],r(a);break}}else{const f=l.match(a[0]);if(f&&(o=a[1](f,n)),o){i=i||a[2],r(a);break}}}if(E(o)&&(o=Ge(o.trim()).split(/\s+/g)),!o){const[a,l]=E(e)?await this.matchVariants(e):e;if(a!==l){const f=await this.expandShortcut(l,n,s-1);f&&(o=f[0].map(c=>E(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(E(a)?(await this.expandShortcut(a,n,s-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,n,s,r={layer:this.config.shortcutsLayer}){const i=new Re,o=(await Promise.all(G(s).map(async c=>{const h=E(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",D(c),void 0,[]]];return!h&&this.config.warn&&me(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,l]=e,f=[];for(const c of o){if(ee(c)){f.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:y,parent:v,sort:_,noMerge:p,layer:m}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(m??r.layer,new Ne).getFallback(h,v,[[],c[0]])[0].push([y,!!(p??c[3]?.noMerge),_??0])}return f.concat(i.flatMap((c,h)=>c.map(([y,v],_,p)=>{const m=(g,w,u)=>{const d=Math.max(...u.map(C=>C[1])),x=u.map(C=>C[0]);return(g?[x.flat(1)]:x).map(C=>{const A=q(C);if(A)return[v,_,A,p,{...r,noMerge:w,sort:d,layer:h},n,void 0]})};return[[y.filter(([,g])=>g).map(([g,,w])=>[g,w]),!0],[y.filter(([,g])=>!g).map(([g,,w])=>[g,w]),!1]].map(([g,w])=>[...m(!1,w,g.filter(([u])=>u.some(d=>d[0]===Q))),...m(!0,w,g.filter(([u])=>u.every(d=>d[0]!==Q)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.some(n=>typeof n=="function"?n(e):E(n)?n===e:n.test(e))}}function ot(t,e){return new it(t,e)}const we=/\s\$\$\s+/g;function at(t){return we.test(t)}function ct(t,e){return at(t)?t.replace(we,e?` ${e} `:" "):e?`${e} ${t}`:t}const se=/^\[(.+?)(~?=)"(.*)"\]$/;function lt(t){return se.test(t)?t.replace(se,(e,n,s,r)=>`[${Y(n)}${s}"${Y(r)}"]`):`.${Y(t)}`}function ft(t,e){return e(t)}var ie={};const ut=Object.freeze({left:0,top:0,width:16,height:16}),W=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ve=Object.freeze({...ut,...W}),ht=Object.freeze({...ve,body:"",hidden:!1}),dt=Object.freeze({width:null,height:null}),be=Object.freeze({...dt,...W});function pt(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function oe(t,e){const n=pt(t,e);for(const s in ht)s in W?s in t&&!(s in n)&&(n[s]=W[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function mt(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const a=s[o]&&s[o].parent,l=a&&i(a);l&&(r[o]=[a].concat(l))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ae(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=oe(s[a]||r[a],i)}return o(e),n.forEach(o),oe(t,i)}function gt(t,e){if(t.icons[e])return ae(t,e,[]);const n=mt(t,[e])[e];return n?ae(t,e,n):null}const yt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,wt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ce(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(yt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=wt.test(i);for(;;){if(o){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function vt(t,e="defs"){let n="";const s=t.indexOf("<"+e);for(;s>=0;){const r=t.indexOf(">",s),i=t.indexOf("</"+e);if(r===-1||i===-1)break;const o=t.indexOf(">",i);if(o===-1)break;n+=t.slice(r+1,i).trim(),t=t.slice(0,s).trim()+t.slice(o+1)}return{defs:n,content:t}}function bt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function St(t,e,n){const s=vt(t);return bt(s.defs,e+s.content+n)}const J=t=>t==="unset"||t==="undefined"||t==="none";function xt(t,e){const n={...ve,...t},s={...be,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(p=>{const m=[],O=p.hFlip,g=p.vFlip;let w=p.rotate;O?g?w+=2:(m.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),m.push("scale(-1 1)"),r.top=r.left=0):g&&(m.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),m.push("scale(1 -1)"),r.top=r.left=0);let u;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:u=r.height/2+r.top,m.unshift("rotate(90 "+u.toString()+" "+u.toString()+")");break;case 2:m.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:u=r.width/2+r.left,m.unshift("rotate(-90 "+u.toString()+" "+u.toString()+")");break}w%2===1&&(r.left!==r.top&&(u=r.left,r.left=r.top,r.top=u),r.width!==r.height&&(u=r.width,r.width=r.height,r.height=u)),m.length&&(i=St(i,'<g transform="'+m.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,l=r.width,f=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?f:a,c=ce(h,l/f)):(c=o==="auto"?l:o,h=a===null?ce(c,f/l):a==="auto"?f:a);const y={},v=(p,m)=>{J(m)||(y[p]=m.toString())};v("width",c),v("height",h);const _=[r.left,r.top,l,f];return y.viewBox=_.join(" "),{attributes:y,viewBox:_,body:i}}function $t(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function _t(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" ')),$t(e)}function Ct(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,'="').replace(/(\s)+\/>/g,"/>").trim()}const At=/\swidth\s*=\s*["']([\w.]+)["']/,Ot=/\sheight\s*=\s*["']([\w.]+)["']/,X=/<svg\s+/;function Mt(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),l=a!=null,f=e[i];return!f&&!J(f)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):a&&(e[i]=a[1])),l};return[r("width",At),r("height",Ot)]}async function Se(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:l={},iconCustomizer:f}=s?.customizations??{},c=await r?.()??{};await f?.(e,n,c),Object.keys(l).forEach(p=>{const m=l[p];m!=null&&(c[p]=m)}),i?.(c);const[h,y]=Mt(t,c,o);a&&(!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(p=>p==="width"&&h||p==="height"&&y?null:`${p}="${c[p]}"`).filter(p=>p!=null);if(v.length&&(t=t.replace(X,`<svg ${v.join(" ")} `)),s){const{defaultStyle:p,defaultClass:m}=s;m&&!t.includes("class=")&&(t=t.replace(X,`<svg class="${m}" `)),p&&!t.includes("style=")&&(t=t.replace(X,`<svg style="${p}" `))}const _=s?.usedProps;return _&&(Object.keys(l).forEach(p=>{const m=c[p];m!=null&&(_[p]=m)}),typeof c.width<"u"&&c.width!==null&&(_.width=c.width),typeof c.height<"u"&&c.height!==null&&(_.height=c.height)),t}async function le(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await Se(s?.customizations?.trimCustomSvg===!0?Ct(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function xe(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=gt(t,o),r){let a={...be};typeof i=="function"&&(a=i(a));const{attributes:{width:l,height:f,...c},body:h}=xt(r,a),y=s?.scale;return await Se(`<svg >${h}</svg>`,e,o,s,()=>({...c}),v=>{const _=(p,m)=>{const O=v[p];let g;if(!J(O)){if(O)return;typeof y=="number"?y&&(g=`${y}em`):g=m}g?v[p]=g:delete v[p]};_("width",l),_("height",f)})}}const $e=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await le(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await xe(r,t,i,n)}}}else return await le(s,t,e,n)};function Et(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var kt=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","cbi","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","f7","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","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","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","lets-icons","line-md","logos","ls","lucide","mage","majesticons","maki","map","marketeq","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","oui","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","tdesign","teenyicons","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const jt=Et(kt),Lt=3;function Pt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:l={},autoInstall:f=!1,collectionsNodeResolvePath:c,layer:h="icons",unit:y,processor:v}=e,_=Tt(),p={addXmlNs:!0,scale:n,customCollections:o,autoInstall:f,cwd:c,warn:void 0,customizations:{...l,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(O,g,w){await l.iconCustomizer?.(O,g,w),y&&(w.width||(w.width=`${n}${y}`),w.height||(w.height=`${n}${y}`))}}};let m;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async O=>{let[g,w,u=s]=O,d="",x="",C;m=m||await t(e);const A={};if(w.includes(":"))[d,x]=w.split(":"),C=await m(d,x,{...p,usedProps:A});else{const z=w.split(/-/g);for(let F=Lt;F>=1&&(d=z.slice(0,F).join("-"),x=z.slice(F).join("-"),C=await m(d,x,{...p,usedProps:A}),!C);F--);}if(!C){i&&!_.isESLint&&me(`failed to load icon "${g}"`);return}let M;const P=`url("data:image/svg+xml;utf8,${_t(C)}")`;return u==="auto"&&(u=C.includes("currentColor")?"mask":"bg"),u==="mask"?M={"--un-icon":P,"-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",...A}:M={background:`${P} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...A},v?.(M,{collection:d,icon:x,svg:C,mode:u}),M},{layer:h,prefix:r}]]}}}function _e(t,e){const n=new Map;function s(r){if(jt.includes(r))return n.has(r)||n.set(r,t(`${e}@iconify-json/${r}/icons.json`)),n.get(r)}return async(r,i,o)=>{let a=await $e(r,i,o);if(a)return a;const l=await s(r);if(l){const f=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await xe(l,r,f,o)}return a}}function Tt(){const t=typeof process<"u"&&process.stdout&&!process.versions.deno,e=t&&!!ie.VSCODE_CWD,n=t&&!!ie.ESLINT;return{isNode:t,isVSCode:e,isESLint:n}}function zt(t){return _e(Ce,t)}const Ft=Pt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?_e(e,n):n?zt(n):$e});function It(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function fe(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ue(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var he=["Webkit","Moz","ms"];function Nt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=It(s);if(i!=="filter"&&i in t)return e[s]=ue(i);i=fe(i);for(let o=0;o<he.length;o++){const a=`${he[o]}${i}`;if(a in t)return e[s]=ue(fe(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Rt(t){return t.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}function Dt(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,n=window.document,s=()=>n.documentElement,r=e.__unocss||{},i=Object.assign({},t,r.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=L(o.postprocess)).unshift(Nt(n.createElement("div").style)),i.configResolved?.(r,o);const l=ot(r,o),f=S=>i.inject?i.inject(S):s().prepend(S),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let y=!0,v=new Set,_,p,m=[];const O=()=>new Promise(S=>{m.push(S),p!=null&&clearTimeout(p),p=setTimeout(()=>u().then(()=>{const b=m;m=[],b.forEach($=>$())}),0)});function g(S){if(S.nodeType!==1)return;const b=S;b.hasAttribute(a)&&b.removeAttribute(a),b.querySelectorAll(`[${a}]`).forEach($=>{$.removeAttribute(a)})}function w(S,b){let $=h.get(S);if(!$)if($=n.createElement("style"),$.setAttribute("data-unocss-runtime-layer",S),h.set(S,$),b==null)f($);else{const k=w(b),j=k.parentNode;j?j.insertBefore($,k.nextSibling):f($)}return $}async function u(){const S=await l.generate(v);return S.layers.reduce((b,$)=>(w($,b).innerHTML=S.getLayer($)??"",$),void 0),v=S.matched,{...S,getStyleElement:b=>h.get(b),getStyleElements:()=>h}}async function d(S){const b=v.size;await l.applyExtractors(S,void 0,v),b!==v.size&&await O()}async function x(S=c()){const b=S&&S.outerHTML;b&&(await d(`${b} ${Rt(b)}`),g(s()),g(S))}const C=new MutationObserver(S=>{y||S.forEach(async b=>{if(b.target.nodeType!==1)return;const $=b.target;for(const k of h)if($===k[1])return;if(b.type==="childList")b.addedNodes.forEach(async k=>{if(k.nodeType!==1)return;const j=k;_&&!_(j)||(await d(j.outerHTML),g(j))});else{if(_&&!_($))return;if(b.attributeName!==a){const k=Array.from($.attributes).map(I=>I.value?`${I.name}="${I.value}"`:I.name).join(" "),j=`<${$.tagName.toLowerCase()} ${k}>`;await d(j)}$.hasAttribute(a)&&$.removeAttribute(a)}})});let A=!1;function M(){if(A)return;const S=i.observer?.target?i.observer.target():c();S&&(C.observe(S,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),A=!0)}function P(){i.bypassDefined&&Vt(l.blocked),x(),M()}function z(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",P):P()}const F=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(S){E(S)||(S.forEach(b=>v.add(b)),S=""),await d(S)},extractAll:x,inspect(S){_=S},toggleObserver(S){S===void 0?y=!y:y=!!S,!A&&!y&&z()},update:u,presets:e.__unocss_runtime?.presets??{}};i.ready?.(F)!==!1&&(y=!1,z())}function Vt(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets[e];let s;try{if(s=n.cssRules||n.rules,!s)continue;Array.from(s).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),t.add(r))})}catch{continue}}return t}Dt({defaults:{presets:[Ft({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
@@ -1,4 +1,4 @@
1
- import{d as B,a as w,aI as W,o as t,m as c,k as s,a9 as T,f as l,t as k,ad as z,F as f,n as E,h as y,r as C,w as Y,az as q,a1 as j,bU as U,p as x,i as m,G as O,q as K,e as Z,aq as P,j as v,au as X,v as F,_ as G,aK as Q,av as ee,b0 as se,bV as te,ab as ne,N as oe,ac as ae,A as le,L as R,a5 as ie,Z as re}from"./qlO0zMWA.js";import{_ as M}from"./BNbY1jCQ.js";import{_ as H}from"./D2TLnKEp.js";import{_ as ce}from"./Cm_JFd_X.js";import{N as pe}from"./C5RWud-q.js";import{_ as de}from"./DPywwtwa.js";import{_ as ue}from"./CFcWLH5V.js";import{_ as me}from"./VE_JCmIg.js";import{_ as ke}from"./DM7LQm-O.js";import{_ as he}from"./ooCcziGQ.js";import{_ as _e}from"./D8i82D0r.js";import"./ClFBqw1c.js";import"./DFXWDr_U.js";import"./DVpEqQtB.js";import"./BcJws1i5.js";import"./CwLZOs-U.js";const fe=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const d=_,p=w(()=>W(d.item.name,50,60,"_op_")),e=w(()=>p.value.replace(/_op_/,"1")),o=w(()=>W(d.item.name,50,40)),i=w(()=>p.value.replace(/_op_/,"0.2"));return(n,a)=>(t(),c("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[s("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),s("div",{style:T({color:l(o),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(n.item.name),5)],4))}}),ye={relative:"","h-full":""},ve={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},be=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:d}){const p=_,e=d,o=z(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,n)=>{const a=fe;return t(),c("div",ye,[s("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:n[0]||(n[0]=r=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),s("div",ve,k(l(o))+" ago ",1),s("div",null,[(t(!0),c(f,null,E(i.segment.functions,(r,u)=>(t(),y(a,{key:u,item:r.event,style:T({position:"absolute",minWidth:`${r.relativeWidth*100}%`,maxWidth:`${r.relativeWidth*100}%`,top:`${4+r.layer*1.6}em`,left:`${r.relativeStart*100}%`}),onClick:h=>e("select",r)},null,8,["item","style","onClick"]))),128))])])}}}),ge=3e3,xe=50;function $e(_){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const o=e.end||e.start;(e.start-p.end>ge||e.type==="route")&&(p={start:e.start,end:o,events:[],functions:[],duration:0},d.push(p)),p.events.push(e),p.end=o+xe}return d.forEach((e,o)=>{const i=e.end-e.start,n=[];e.duration=i,e.previousGap=o>0?e.start-d[o-1].end:0,e.events.forEach(a=>{const r=a.end||a.start;let u=0;a.type!=="route"&&(u=n.findIndex($=>$<=a.start),u===-1?(u=n.length,n.push(r+1e3)):n[u]=r+1e3);const h={event:a,segment:e,relativeStart:(a.start-e.start)/i,relativeWidth:(r-a.start)/i,layer:u};a.type==="function"?e.functions.push(h):e.route=h})}),d}const Ae={relative:""},De={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":""},Ce=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:d}){const p=_,e=d,o=C(),i=C(),n=C(),a=C(),r=C(!0),u=C(1.5),h=w(()=>$e(p.data.events)),$=w(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function A(){a.value&&(a.value.style.width=`${$.value}px`)}function S(){r.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),n.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return Y(()=>p.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(o,"scroll",()=>{n.value.scrollLeft!==o.value.scrollLeft&&(A(),n.value.scrollLeft=o.value.scrollLeft,r.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),j(n,"scroll",()=>{n.value.scrollLeft!==o.value.scrollLeft&&(A(),o.value.scrollLeft=n.value.scrollLeft)}),j(o,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):o.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=M,V=be;return t(),c(f,null,[s("div",Ae,[s("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),c(f,null,E(l(h),(g,N)=>(t(),c("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(t(!0),c(f,null,E(g.functions,(I,J)=>(t(),c("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(W))(I.event.name,50,60)})},null,4))),128)),g.route?(t(),c("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),s("div",{ref_key:"minimapScroller",ref:n,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[s("div",{ref_key:"minimapScrollerInner",ref:a,"h-1px":""},null,512)],512)]),s("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),c(f,null,E(l(h),(g,N)=>(t(),c(f,{key:N},[g.previousGap&&g.previousGap>=200?(t(),c("div",De,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(V,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:O(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),Be=K(Ce,[["__scopeId","data-v-27e8fb2d"]]),we={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Te=["onClick"],Se=s("div",{"i-carbon-function":"",op50:""},null,-1),Ne={flex:"~","ml--1":"","font-mono":""},Fe=s("div",{op30:""}," ( ",-1),Ee={key:0,mr2:"",op30:""},Le={op75:""},Ie=s("div",{op30:""}," ) ",-1),Ve=s("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[s("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},Me={"text-xs":"","font-mono":"",op30:""},je={"text-green":"","font-bold":"","font-mono":""},ze=s("div",{"flex-auto":""},null,-1),Oe=s("div",{"min-h-100":""},null,-1),Ge=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:d}){const p=d;return(e,o)=>{const i=M;return t(),c("div",we,[(t(!0),c(f,null,E(e.data.events,(n,a)=>(t(),c("button",{key:a,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:r=>p("select",n)},[n.type==="function"?(t(),c(f,{key:0},[Se,s("div",{"font-mono":"",style:T({color:n.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(W))(n.name,50,60):""})},k(n.name),5),s("div",Ne,[Fe,(t(!0),c(f,null,E(n.args,(r,u)=>(t(),c(f,{key:u},[u?(t(),c("div",Ee," , ")):x("",!0),s("div",Le,k(r===null?"null":r===void 0?"undefined":typeof r=="function"?"[function]":Array.isArray(r)?"[Array]":typeof r=="object"?"[object]":JSON.stringify(r)),1)],64))),128)),Ie])],64)):(t(),c(f,{key:1},[Ve,s("div",We,[s("div",Me,k(n.from),1),s("div",je,k(n.to),1)])],64)),ze,n.end?(t(),y(i,{key:2,duration:n.end-n.start,color:n.type==="function"},null,8,["duration","color"])):x("",!0)],8,Te))),128)),Oe])}}}),Re={key:0,"text-blue":""},Pe={key:1,"text-purple":""},He={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},qe={key:5,"text-gray":""},Ue={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ke={key:1},Ze={p2:"","text-sm":"",border:"t base"},Xe=B({__name:"TimelineArgumentView",props:{value:{}},setup(_){const d=_,p=C(),e=C();function o(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(a){console.error(a),e.value=a}}const i=B({emits:["setup"],setup(a,{emit:r}){return r("setup"),()=>null}}),n=Z();return(a,r)=>{const u=G,h=P("VMenu");return typeof a.value=="string"?(t(),c("div",Re,k(JSON.stringify(a.value)),1)):typeof a.value=="number"?(t(),c("div",Pe,k(a.value),1)):typeof a.value=="boolean"?(t(),c("div",He,k(a.value),1)):typeof a.value>"u"?(t(),c("div",Je," undefined ")):typeof a.value=="function"?(t(),c("div",Ye," [Function"+k(a.value.name?`: ${a.value.name}`:"")+"] ",1)):a.value===null?(t(),c("div",qe," null ")):(t(),y(h,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:o}),l(e)?(t(),c("div",Ue," Failed to display object: "+k(l(e)),1)):l(p)?(t(),c("div",Ke,[m(l(pe),X({"model-value":l(p)},a.$attrs,{class:["json-editor-vue",[a.$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"]),s("div",Ze,[m(u,{title:"Copy to clipboard",icon:"carbon-copy",onClick:r[0]||(r[0]=$=>l(n)(JSON.stringify(l(p),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[s("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:O([Array.isArray(a.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(a.value)?`[Array(${a.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},es={"mx--1":""},ss={flex:"~ gap-1","font-mono":""},ts={key:1},ns=s("span",{ml1:"",op30:""},"(",-1),os={key:0,op30:""},as=s("span",{op30:""},")",-1),ls={flex:"~ gap-1","text-sm":""},is=s("span",{mx1:"",op50:""},"·",-1),rs={class:"text-sm text-gray-400"},cs=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const d=_,p=z(()=>d.record.start,{showSecond:!0}),e=Q(),o=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(n=>n.as===d.record.name));return(n,a)=>{const r=H,u=ce,h=Xe,$=M,A=de;return n.record?(t(),c("div",Qe,[s("div",es,[m(r,{n:"yellow",textContent:"Function call"})]),s("div",ss,[l(i)?(t(),y(u,{key:0,item:l(i),metadata:l(o),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),c("span",ts,k(n.record.name),1)),ns,(t(!0),c(f,null,E(n.record.args,(S,b)=>(t(),c(f,{key:b},[b?(t(),c("span",os,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),as]),s("div",ls,[n.record.end?(t(),y($,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),is,s("div",rs,k(l(p)),1)]),n.record.stacktrace?(t(),y(A,{key:0,stacktrace:n.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ps={key:0,"p-4":"",flex:"~ col gap-2"},ds={"mx--1":""},us={flex:"~ gap-1 items-center","font-mono":""},ms={op50:""},ks=s("span",{"i-carbon-arrow-right":"",op50:""},null,-1),hs={flex:"~ gap-1","text-sm":""},_s=s("span",{mx1:"",op50:""},"·",-1),fs={class:"text-sm text-gray-400"},ys=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const d=_,p=z(()=>d.record.start,{showSecond:!0});return(e,o)=>{const i=H,n=M;return e.record?(t(),c("div",ps,[s("div",ds,[m(i,{n:"green",textContent:"Route Change"})]),s("div",us,[s("span",ms,k(e.record.from),1),ks,s("span",null,k(e.record.to),1)]),s("div",hs,[e.record.end?(t(),y(n,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),_s,s("div",fs,k(l(p)),1)])])):x("",!0)}}}),vs={key:0,"h-screen":"","of-hidden":""},bs={"h-screen":"","w-full":"",flex:"","flex-col":""},gs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},xs={"text-sm":""},$s=s("div",{"flex-auto":""},null,-1),As={"min-h-50":"",px3:"",py2:""},Ds=B({__name:"TimelineView",setup(_){const d=ee(),p=C("table"),e=C(),o=w(()=>d.value?.metrics.clientTimeline());function i(){o.value&&(o.value.events=[])}function n(){p.value=p.value==="table"?"list":"table"}return(a,r)=>{const u=P("VTooltip"),h=G,$=Be,A=Ge,S=cs,b=ys,L=ue;return l(o)?(t(),c("div",vs,[s("div",bs,[s("div",gs,[m(u,{flex:""},{popper:v(()=>[s("div",xs,k(l(o).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[s("div",{"text-lg":"",class:O(l(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(o).options.enabled?(t(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:r[1]||(r[1]=D=>l(o).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(t(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:r[0]||(r[0]=D=>l(o).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),$s,m(h,{icon:l(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:n},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(p)==="table"?(t(),y($,{key:0,data:{...l(o)},onSelect:r[2]||(r[2]=D=>e.value=D.event)},null,8,["data"])):(t(),y(A,{key:1,data:{...l(o)},onSelect:r[3]||(r[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:r[4]||(r[4]=D=>e.value=void 0)},{default:v(()=>[s("div",As,[l(e)?.type==="function"?(t(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(t(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Cs={class:"markdown-body"},Bs=s("h1",null,"Timeline",-1),ws=s("p",null,[s("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ts=se(`<p>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.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from &#39;#imports&#39;</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;">&lt;</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">&gt;</span></span>
1
+ import{d as B,a as w,aJ as W,o as t,m as c,k as s,a9 as T,f as l,t as k,ad as O,F as f,n as E,h as y,r as C,w as Y,aA as q,a1 as j,bV as U,p as x,i as m,G as z,q as Z,e as K,as as P,j as v,aw as X,v as F,_ as G,aL as Q,al as ee,b1 as se,bW as te,ab as ne,N as oe,ac as ae,A as le,L as R,a5 as ie,Z as re}from"./CSxKs2xg.js";import{_ as M}from"./CgdhjF_I.js";import{_ as H}from"./B7vUcbNk.js";import{_ as ce}from"./DO3F8Knp.js";import{e as pe}from"./CDjZ2Pwm.js";import{_ as de}from"./DTnMHt2b.js";import{_ as ue}from"./-qWogbxp.js";import{_ as me}from"./5Viy9mJZ.js";import{_ as ke}from"./B_Ym5JKn.js";import{_ as he}from"./5rat9AfN.js";import{_ as _e}from"./2rHQ-89_.js";import"./BcobmRlA.js";import"./f1qyuWhx.js";import"./Bs6Xt_hm.js";import"./BcJws1i5.js";import"./DjVyxknR.js";const fe=B({__name:"TimelineItemFunction",props:{item:{}},setup(_){const d=_,p=w(()=>W(d.item.name,50,60,"_op_")),e=w(()=>p.value.replace(/_op_/,"1")),o=w(()=>W(d.item.name,50,40)),i=w(()=>p.value.replace(/_op_/,"0.2"));return(n,a)=>(t(),c("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[s("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),s("div",{style:T({color:l(o),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(n.item.name),5)],4))}}),ye={relative:"","h-full":""},ve={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},be=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:d}){const p=_,e=d,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,n)=>{const a=fe;return t(),c("div",ye,[s("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:n[0]||(n[0]=r=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),s("div",ve,k(l(o))+" ago ",1),s("div",null,[(t(!0),c(f,null,E(i.segment.functions,(r,u)=>(t(),y(a,{key:u,item:r.event,style:T({position:"absolute",minWidth:`${r.relativeWidth*100}%`,maxWidth:`${r.relativeWidth*100}%`,top:`${4+r.layer*1.6}em`,left:`${r.relativeStart*100}%`}),onClick:h=>e("select",r)},null,8,["item","style","onClick"]))),128))])])}}}),ge=3e3,xe=50;function $e(_){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const o=e.end||e.start;(e.start-p.end>ge||e.type==="route")&&(p={start:e.start,end:o,events:[],functions:[],duration:0},d.push(p)),p.events.push(e),p.end=o+xe}return d.forEach((e,o)=>{const i=e.end-e.start,n=[];e.duration=i,e.previousGap=o>0?e.start-d[o-1].end:0,e.events.forEach(a=>{const r=a.end||a.start;let u=0;a.type!=="route"&&(u=n.findIndex($=>$<=a.start),u===-1?(u=n.length,n.push(r+1e3)):n[u]=r+1e3);const h={event:a,segment:e,relativeStart:(a.start-e.start)/i,relativeWidth:(r-a.start)/i,layer:u};a.type==="function"?e.functions.push(h):e.route=h})}),d}const Ae={relative:""},De={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":""},Ce=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:d}){const p=_,e=d,o=C(),i=C(),n=C(),a=C(),r=C(!0),u=C(1.5),h=w(()=>$e(p.data.events)),$=w(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function A(){a.value&&(a.value.style.width=`${$.value}px`)}function S(){r.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),n.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return Y(()=>p.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(o,"scroll",()=>{n.value.scrollLeft!==o.value.scrollLeft&&(A(),n.value.scrollLeft=o.value.scrollLeft,r.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),j(n,"scroll",()=>{n.value.scrollLeft!==o.value.scrollLeft&&(A(),o.value.scrollLeft=n.value.scrollLeft)}),j(o,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):o.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=M,V=be;return t(),c(f,null,[s("div",Ae,[s("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),c(f,null,E(l(h),(g,N)=>(t(),c("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(t(!0),c(f,null,E(g.functions,(I,J)=>(t(),c("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(W))(I.event.name,50,60)})},null,4))),128)),g.route?(t(),c("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),s("div",{ref_key:"minimapScroller",ref:n,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[s("div",{ref_key:"minimapScrollerInner",ref:a,"h-1px":""},null,512)],512)]),s("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),c(f,null,E(l(h),(g,N)=>(t(),c(f,{key:N},[g.previousGap&&g.previousGap>=200?(t(),c("div",De,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(V,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(h).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),Be=Z(Ce,[["__scopeId","data-v-27e8fb2d"]]),we={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Te=["onClick"],Se=s("div",{"i-carbon-function":"",op50:""},null,-1),Ne={flex:"~","ml--1":"","font-mono":""},Fe=s("div",{op30:""}," ( ",-1),Ee={key:0,mr2:"",op30:""},Le={op75:""},Ie=s("div",{op30:""}," ) ",-1),Ve=s("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[s("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},Me={"text-xs":"","font-mono":"",op30:""},je={"text-green":"","font-bold":"","font-mono":""},Oe=s("div",{"flex-auto":""},null,-1),ze=s("div",{"min-h-100":""},null,-1),Ge=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:d}){const p=d;return(e,o)=>{const i=M;return t(),c("div",we,[(t(!0),c(f,null,E(e.data.events,(n,a)=>(t(),c("button",{key:a,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:r=>p("select",n)},[n.type==="function"?(t(),c(f,{key:0},[Se,s("div",{"font-mono":"",style:T({color:n.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(W))(n.name,50,60):""})},k(n.name),5),s("div",Ne,[Fe,(t(!0),c(f,null,E(n.args,(r,u)=>(t(),c(f,{key:u},[u?(t(),c("div",Ee," , ")):x("",!0),s("div",Le,k(r===null?"null":r===void 0?"undefined":typeof r=="function"?"[function]":Array.isArray(r)?"[Array]":typeof r=="object"?"[object]":JSON.stringify(r)),1)],64))),128)),Ie])],64)):(t(),c(f,{key:1},[Ve,s("div",We,[s("div",Me,k(n.from),1),s("div",je,k(n.to),1)])],64)),Oe,n.end?(t(),y(i,{key:2,duration:n.end-n.start,color:n.type==="function"},null,8,["duration","color"])):x("",!0)],8,Te))),128)),ze])}}}),Re={key:0,"text-blue":""},Pe={key:1,"text-purple":""},He={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},qe={key:5,"text-gray":""},Ue={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(_){const d=_,p=C(),e=C();function o(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(a){console.error(a),e.value=a}}const i=B({emits:["setup"],setup(a,{emit:r}){return r("setup"),()=>null}}),n=K();return(a,r)=>{const u=G,h=P("VMenu");return typeof a.value=="string"?(t(),c("div",Re,k(JSON.stringify(a.value)),1)):typeof a.value=="number"?(t(),c("div",Pe,k(a.value),1)):typeof a.value=="boolean"?(t(),c("div",He,k(a.value),1)):typeof a.value>"u"?(t(),c("div",Je," undefined ")):typeof a.value=="function"?(t(),c("div",Ye," [Function"+k(a.value.name?`: ${a.value.name}`:"")+"] ",1)):a.value===null?(t(),c("div",qe," null ")):(t(),y(h,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:o}),l(e)?(t(),c("div",Ue," Failed to display object: "+k(l(e)),1)):l(p)?(t(),c("div",Ze,[m(l(pe),X({"model-value":l(p)},a.$attrs,{class:["json-editor-vue",[a.$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"]),s("div",Ke,[m(u,{title:"Copy to clipboard",icon:"carbon-copy",onClick:r[0]||(r[0]=$=>l(n)(JSON.stringify(l(p),null,2),"timeline-argument"))},{default:v(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[s("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(a.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(a.value)?`[Array(${a.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},es={"mx--1":""},ss={flex:"~ gap-1","font-mono":""},ts={key:1},ns=s("span",{ml1:"",op30:""},"(",-1),os={key:0,op30:""},as=s("span",{op30:""},")",-1),ls={flex:"~ gap-1","text-sm":""},is=s("span",{mx1:"",op50:""},"·",-1),rs={class:"text-sm text-gray-400"},cs=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const d=_,p=O(()=>d.record.start,{showSecond:!0}),e=Q(),o=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(n=>n.as===d.record.name));return(n,a)=>{const r=H,u=ce,h=Xe,$=M,A=de;return n.record?(t(),c("div",Qe,[s("div",es,[m(r,{n:"yellow",textContent:"Function call"})]),s("div",ss,[l(i)?(t(),y(u,{key:0,item:l(i),metadata:l(o),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),c("span",ts,k(n.record.name),1)),ns,(t(!0),c(f,null,E(n.record.args,(S,b)=>(t(),c(f,{key:b},[b?(t(),c("span",os,", ")):x("",!0),m(h,{value:S},null,8,["value"])],64))),128)),as]),s("div",ls,[n.record.end?(t(),y($,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),is,s("div",rs,k(l(p)),1)]),n.record.stacktrace?(t(),y(A,{key:0,stacktrace:n.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ps={key:0,"p-4":"",flex:"~ col gap-2"},ds={"mx--1":""},us={flex:"~ gap-1 items-center","font-mono":""},ms={op50:""},ks=s("span",{"i-carbon-arrow-right":"",op50:""},null,-1),hs={flex:"~ gap-1","text-sm":""},_s=s("span",{mx1:"",op50:""},"·",-1),fs={class:"text-sm text-gray-400"},ys=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const d=_,p=O(()=>d.record.start,{showSecond:!0});return(e,o)=>{const i=H,n=M;return e.record?(t(),c("div",ps,[s("div",ds,[m(i,{n:"green",textContent:"Route Change"})]),s("div",us,[s("span",ms,k(e.record.from),1),ks,s("span",null,k(e.record.to),1)]),s("div",hs,[e.record.end?(t(),y(n,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),_s,s("div",fs,k(l(p)),1)])])):x("",!0)}}}),vs={key:0,"h-screen":"","of-hidden":""},bs={"h-screen":"","w-full":"",flex:"","flex-col":""},gs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},xs={"text-sm":""},$s=s("div",{"flex-auto":""},null,-1),As={"min-h-50":"",px3:"",py2:""},Ds=B({__name:"TimelineView",setup(_){const d=ee(),p=C("table"),e=C(),o=w(()=>d.value?.metrics.clientTimeline());function i(){o.value&&(o.value.events=[])}function n(){p.value=p.value==="table"?"list":"table"}return(a,r)=>{const u=P("VTooltip"),h=G,$=Be,A=Ge,S=cs,b=ys,L=ue;return l(o)?(t(),c("div",vs,[s("div",bs,[s("div",gs,[m(u,{flex:""},{popper:v(()=>[s("div",xs,k(l(o).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[s("div",{"text-lg":"",class:z(l(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(o).options.enabled?(t(),y(h,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:r[1]||(r[1]=D=>l(o).options.enabled=!1)},{default:v(()=>[F(" Stop Tracking ")]),_:1})):(t(),y(h,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:r[0]||(r[0]=D=>l(o).options.enabled=!0)},{default:v(()=>[F(" Start Tracking ")]),_:1})),$s,m(h,{icon:l(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:n},null,8,["icon"]),m(h,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(p)==="table"?(t(),y($,{key:0,data:{...l(o)},onSelect:r[2]||(r[2]=D=>e.value=D.event)},null,8,["data"])):(t(),y(A,{key:1,data:{...l(o)},onSelect:r[3]||(r[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:r[4]||(r[4]=D=>e.value=void 0)},{default:v(()=>[s("div",As,[l(e)?.type==="function"?(t(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(t(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Cs={class:"markdown-body"},Bs=s("h1",null,"Timeline",-1),ws=s("p",null,[s("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ts=se(`<p>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.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from &#39;#imports&#39;</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;">&lt;</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">&gt;</span></span>
2
2
  <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
3
3
  <span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">&#39;</span></span>
4
4
  <span class="line"></span>
@@ -1 +1 @@
1
- import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./qlO0zMWA.js";import{_ as ce}from"./DVpEqQtB.js";import{_ as me}from"./CwLZOs-U.js";import{_ as _e}from"./DXyT_6cw.js";import{_ as pe}from"./D8i82D0r.js";import"./DFXWDr_U.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Ze=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Je=e("p",{op50:""}," Enter the name of the build: ",-1),Qe=e("div",{my3:"","x-divider":""},null,-1),Xe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},an=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ee,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Ze,Je,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Qe,Xe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{an as default};
1
+ import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as X,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,Z as ue,A as de}from"./CSxKs2xg.js";import{_ as ce}from"./Bs6Xt_hm.js";import{_ as me}from"./DjVyxknR.js";import{_ as _e}from"./K0tfU50F.js";import{_ as pe}from"./2rHQ-89_.js";import"./f1qyuWhx.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${X().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=ce,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Ze=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Je=e("p",{op50:""}," Enter the name of the build: ",-1),Qe=e("div",{my3:"","x-divider":""},null,-1),Xe=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},an=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=de,H=ie,K=ae,M=re,W=me,Y=_e,Z=ue,J=Ee,Q=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(Z,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Ze,Je,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Qe,Xe,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(Q,null,{default:r(()=>[u(J)]),_:1})],64)}}});export{an as default};