@nuxt/devtools-nightly 2.3.2-29076815.a873199 → 2.4.0-29076820.77ef5ce

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 (109) hide show
  1. package/dist/chunks/module-main.mjs +4 -2
  2. package/dist/client/200.html +22 -22
  3. package/dist/client/404.html +22 -22
  4. package/dist/client/_nuxt/__blank-catci4by.js +1 -0
  5. package/dist/client/_nuxt/{analyze-build-eh88jp9h.js → analyze-build-htq015xe.js} +1 -1
  6. package/dist/client/_nuxt/{assets-gmtng6l6.js → assets-6zlewzlg.js} +3 -3
  7. package/dist/client/_nuxt/builds/latest.json +1 -1
  8. package/dist/client/_nuxt/builds/meta/6f27ba33-461c-4c49-bc16-c728920dbe3e.json +1 -0
  9. package/dist/client/_nuxt/{client-bqg1k5yt.js → client-jvnhv8ra.js} +1 -1
  10. package/dist/client/_nuxt/{code-diff.vue-buhgkcn1.js → code-diff.vue-fq49u5ys.js} +2 -2
  11. package/dist/client/_nuxt/{code-snippets.vue-c2qehp6m.js → code-snippets.vue-fd7f71b4.js} +1 -1
  12. package/dist/client/_nuxt/{components-fuyz0qkj.js → components-he8hskpf.js} +1 -1
  13. package/dist/client/_nuxt/composable-item.vue-emb6bo2v.js +1 -0
  14. package/dist/client/_nuxt/custom-_name_-e3h9nkbf.js +1 -0
  15. package/dist/client/_nuxt/{data-schema-button.vue-fwxrv7x1.js → data-schema-button.vue-k5b1sg93.js} +1 -1
  16. package/dist/client/_nuxt/data-schema-drawer-okewg4bl.js +2 -0
  17. package/dist/client/_nuxt/{debug-ec2y7308.js → debug-o7mqrf08.js} +1 -1
  18. package/dist/client/_nuxt/{default-kkw32tz5.js → default-vcnoa56y.js} +1 -1
  19. package/dist/client/_nuxt/duration-display.vue-hy8s2ai6.js +1 -0
  20. package/dist/client/_nuxt/error-404-bg1xrxck.js +1 -0
  21. package/dist/client/_nuxt/error-404.css-itl1ee4a.css +1 -0
  22. package/dist/client/_nuxt/error-500-kogxhgx8.js +1 -0
  23. package/dist/client/_nuxt/error-500.css-biq96mi6.css +1 -0
  24. package/dist/client/_nuxt/{error-dhl74i8e.js → error-obfmn72w.js} +3 -3
  25. package/dist/client/_nuxt/{filepath-item.vue-dhjvbmak.js → filepath-item.vue-ctzpaoq2.js} +1 -1
  26. package/dist/client/_nuxt/full-flmbd7rs.js +1 -0
  27. package/dist/client/_nuxt/{help-fab.vue-k9dgnqs9.js → help-fab.vue-ocjwejqw.js} +1 -1
  28. package/dist/client/_nuxt/hooks-b3ixs3wm.js +1 -0
  29. package/dist/client/_nuxt/{imports-lldeqgdh.js → imports-k9r019ie.js} +1 -1
  30. package/dist/client/_nuxt/{index-ecvh63d2.js → index-gs7l1dwr.js} +1 -1
  31. package/dist/client/_nuxt/iq4jktzn.js +15 -0
  32. package/dist/client/_nuxt/{launch-page.vue-ly8wg6qx.js → launch-page.vue-mt5s952y.js} +1 -1
  33. package/dist/client/_nuxt/{modules-pcqjpjes.js → modules-lf32o2fx.js} +1 -1
  34. package/dist/client/_nuxt/nbadge-o71ofupc.js +1 -0
  35. package/dist/client/_nuxt/ncheckbox.vue-o76f31rv.js +1 -0
  36. package/dist/client/_nuxt/{ncode-block.vue-h2q9yyre.js → ncode-block.vue-8qivpy1q.js} +1 -1
  37. package/dist/client/_nuxt/{ndrawer.vue-hy3weod1.js → ndrawer.vue-j6sn120g.js} +1 -1
  38. package/dist/client/_nuxt/{ndropdown.vue-f9irja81.js → ndropdown.vue-bkl8mxyw.js} +1 -1
  39. package/dist/client/_nuxt/{nicon-title.vue-oyhtd7jm.js → nicon-title.vue-m2ftlsrz.js} +1 -1
  40. package/dist/client/_nuxt/{nlink.vue-kw0dg8qe.js → nlink.vue-k8oq6v3c.js} +1 -1
  41. package/dist/client/_nuxt/nmarkdown.vue-hrdikzmp.js +1 -0
  42. package/dist/client/_nuxt/nnavbar.vue-kt2cr0ku.js +1 -0
  43. package/dist/client/_nuxt/none-mx6td3lj.js +1 -0
  44. package/dist/client/_nuxt/{nsection-block-o6e0gew7.js → nsection-block-m7fz9si8.js} +1 -1
  45. package/dist/client/_nuxt/nselect-tabs.vue-c5332j4f.js +1 -0
  46. package/dist/client/_nuxt/{nselect.vue-bm3fwbn0.js → nselect.vue-klxbcgw6.js} +1 -1
  47. package/dist/client/_nuxt/{nswitch.vue-fl7pkx4a.js → nswitch.vue-n63sh5rf.js} +1 -1
  48. package/dist/client/_nuxt/{open-graph-j9sonkua.js → open-graph-ewkyyghk.js} +2 -2
  49. package/dist/client/_nuxt/{overview-chwsshtk.js → overview-n8yolg1y.js} +1 -1
  50. package/dist/client/_nuxt/{pages-ls34ar7k.js → pages-l3mklhkd.js} +1 -1
  51. package/dist/client/_nuxt/{payload-ihymrlnc.js → payload-kyswwhv3.js} +1 -1
  52. package/dist/client/_nuxt/pinia-me703l26.js +1 -0
  53. package/dist/client/_nuxt/plugins-bi1kiflp.js +1 -0
  54. package/dist/client/_nuxt/render-tree-izuhn9c5.js +1 -0
  55. package/dist/client/_nuxt/{runtime-configs-gq802ays.js → runtime-configs-leusuwys.js} +1 -1
  56. package/dist/client/_nuxt/{server-discovery-iggf5q8n.js → server-discovery-lvb1gbwu.js} +1 -1
  57. package/dist/client/_nuxt/{server-route-inputs.vue-nb9ikq9z.js → server-route-inputs.vue-fu36idaq.js} +1 -1
  58. package/dist/client/_nuxt/server-routes-fxs0a4sv.js +9 -0
  59. package/dist/client/_nuxt/server-tasks-bxdgyia7.js +1 -0
  60. package/dist/client/_nuxt/{settings-k79ppszq.js → settings-brpeivab.js} +1 -1
  61. package/dist/client/_nuxt/stacktrace-list.vue-b5w5dd09.js +1 -0
  62. package/dist/client/_nuxt/{state-components-ih9flzyx.js → state-components-l6lnc48a.js} +1 -1
  63. package/dist/client/_nuxt/{state-editor.vue-em7fq5xs.js → state-editor.vue-mmwb2w2b.js} +1 -1
  64. package/dist/client/_nuxt/{state-modules-i1nv7evk.js → state-modules-h0solttr.js} +1 -1
  65. package/dist/client/_nuxt/{storage-k0ubqadg.js → storage-dzfhursq.js} +1 -1
  66. package/dist/client/_nuxt/terminals-k3tujt3v.js +1 -0
  67. package/dist/client/_nuxt/timeline-2btb6dbh.js +31 -0
  68. package/dist/client/_nuxt/{unocss-runtime-bag0aauk.js → unocss-runtime-kct8zzpi.js} +1 -1
  69. package/dist/client/_nuxt/vendor/json-editor-vue-exjsfanq.js +3872 -0
  70. package/dist/client/_nuxt/vendor/{quicktype-core-klbd9u2j.js → quicktype-core-d6crrn92.js} +1 -1
  71. package/dist/client/_nuxt/vendor/{shiki-jv02kgzv.js → shiki-hjrnbayr.js} +14 -14
  72. package/dist/client/_nuxt/vendor/unocss-n30bmhn8.js +2 -0
  73. package/dist/client/_nuxt/virtual-files-iwpaa1s5.js +1 -0
  74. package/dist/client/_nuxt/vue-devtools-jcpqztau.js +2 -0
  75. package/dist/client/_nuxt/{vue-virtual-scroller.esm-bjuzk3oj.js → vue-virtual-scroller.esm-iodr444e.js} +2 -2
  76. package/dist/client/index.html +22 -22
  77. package/dist/module.json +1 -1
  78. package/package.json +19 -19
  79. package/dist/client/_nuxt/__blank-mlfs714t.js +0 -1
  80. package/dist/client/_nuxt/builds/meta/cb7853f0-97e3-4461-9500-3410fbff9c5c.json +0 -1
  81. package/dist/client/_nuxt/composable-item.vue-b6mzxoba.js +0 -1
  82. package/dist/client/_nuxt/custom-_name_-nfwyawwv.js +0 -1
  83. package/dist/client/_nuxt/data-schema-drawer-ohh76w1v.js +0 -2
  84. package/dist/client/_nuxt/duration-display.vue-lb5nc1xj.js +0 -1
  85. package/dist/client/_nuxt/error-404-jms6b2op.js +0 -1
  86. package/dist/client/_nuxt/error-404.css-lr4x8rvs.css +0 -1
  87. package/dist/client/_nuxt/error-500-ky27dyto.js +0 -1
  88. package/dist/client/_nuxt/error-500.css-k7guqst3.css +0 -1
  89. package/dist/client/_nuxt/full-wym03uuz.js +0 -1
  90. package/dist/client/_nuxt/hooks-fr4s6rkf.js +0 -1
  91. package/dist/client/_nuxt/nbadge-o5kc9sv8.js +0 -1
  92. package/dist/client/_nuxt/ncheckbox.vue-kwe3k58j.js +0 -1
  93. package/dist/client/_nuxt/nmarkdown.vue-io3ubke7.js +0 -1
  94. package/dist/client/_nuxt/nnavbar.vue-cuxn5zlw.js +0 -1
  95. package/dist/client/_nuxt/none-fj4hb5hg.js +0 -1
  96. package/dist/client/_nuxt/nselect-tabs.vue-nszv941o.js +0 -1
  97. package/dist/client/_nuxt/ocdy9hhm.js +0 -15
  98. package/dist/client/_nuxt/pinia-noimss7s.js +0 -1
  99. package/dist/client/_nuxt/plugins-o8kqyy5x.js +0 -1
  100. package/dist/client/_nuxt/render-tree-dg1igwyx.js +0 -1
  101. package/dist/client/_nuxt/server-routes-kq0mbsko.js +0 -9
  102. package/dist/client/_nuxt/server-tasks-fyfiwcfc.js +0 -1
  103. package/dist/client/_nuxt/stacktrace-list.vue-dgji7gu0.js +0 -1
  104. package/dist/client/_nuxt/terminals-38i35l3o.js +0 -1
  105. package/dist/client/_nuxt/timeline-fg5ui3xs.js +0 -31
  106. package/dist/client/_nuxt/vendor/json-editor-vue-huf8dypo.js +0 -3846
  107. package/dist/client/_nuxt/vendor/unocss-e7oqigho.js +0 -2
  108. package/dist/client/_nuxt/virtual-files-moo8mlys.js +0 -1
  109. package/dist/client/_nuxt/vue-devtools-c8myfb0e.js +0 -2
@@ -1 +0,0 @@
1
- import{F as r}from"./ocdy9hhm.js";import{u as c,v as i}from"./vue-devtools-c8myfb0e.js";import{q as m,O as p,a0 as e,R as o,v as n,a1 as _,a8 as l}from"./vendor/json-editor-vue-huf8dypo.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./vue-virtual-scroller.esm-bjuzk3oj.js";const u={class:"h-full w-full"},h=m({__name:"pinia",setup(f){const{connected:a}=c();return(d,t)=>{const s=r;return e(),p("div",u,[n(a)?(e(),o(n(i),{key:0})):(e(),o(s,{key:1},{default:_(()=>t[0]||(t[0]=[l(" Connecting.... ")])),_:1}))])}}});export{h as default};
@@ -1 +0,0 @@
1
- import{_ as T}from"./nbadge-o5kc9sv8.js";import{_ as w}from"./filepath-item.vue-dhjvbmak.js";import{_ as k}from"./duration-display.vue-lb5nc1xj.js";import{A as D,a3 as B,I,b as V,x as F,f as H}from"./ocdy9hhm.js";import{q as v,u as h,O as _,a0 as s,P as n,a2 as c,Q as d,a7 as C,a1 as f,R as p,X as W,S as P,a8 as x,F as b,ad as E,W as A}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as L}from"./nsection-block-o6e0gew7.js";import{_ as M}from"./help-fab.vue-k9dgnqs9.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./nicon-title.vue-oyhtd7jm.js";const R={flex:"~ gap2","items-center":""},j={w8:"","text-right":"","text-sm":"",op25:""},q={key:0,"flex-auto":"","text-right":""},z=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(m){const e=m,r=D(),a=h(()=>B(e.plugin.src,r.value?.rootDir||"").path);return(t,l)=>{const o=T,u=w,i=k;return s(),_("div",R,[n("div",j,C(t.index),1),c(u,{filepath:e.plugin.src,subpath:!0},{default:f(()=>[n("div",null,[a.value.startsWith("#")?(s(),p(o,{key:0,n:"rose",textContent:"virtual"})):a.value.startsWith(".")?d("",!0):(s(),p(o,{key:1,n:"gray",textContent:"module"})),t.plugin.mode==="server"?(s(),p(o,{key:2,n:"teal",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(s(),p(o,{key:3,n:"orange",textContent:"client"})):d("",!0)])]),_:1},8,["filepath"]),t.plugin.metric?.duration!=null?(s(),_("div",q,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),O={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},Q={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,r)=>{const a=I,t=W("ContentSlot");return s(),_("div",O,[n("div",Q,[e.icon?(s(),p(a,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),n("div",null,C(e.title),1)]),n("div",null,[P(e.$slots,"default",{},()=>[c(t,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Y={};function G(m,e){const r=X;return s(),p(r,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:f(()=>[P(m.$slots,"default")]),_:3})}const J=V(Y,[["render",G]]),K={class:"markdown-body"},U={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(a,t)=>{const l=J;return s(),_("div",K,[t[1]||(t[1]=n("h1",null,"Plugins",-1)),t[2]||(t[2]=n("p",null,[x("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),n("code",null,"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),c(l,null,{default:f(()=>t[0]||(t[0]=[x(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")])),_:1}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])}}},Z={pt4:""},tt={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},pt=v({__name:"plugins",setup(m){const e=F(),r=H(),a=h(()=>{const l=e.value?.plugins||[],o=r.value?.metrics.clientPlugins()||[];return l.map(u=>{const i=typeof u=="string"?{src:u}:u;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),t=h(()=>{const l=r.value?.metrics.clientPlugins()||[],o=Math.min(...l.map(i=>i.start));return Math.max(...l.map(i=>i.end))-o});return(l,o)=>{const u=z,i=k,g=L,N=U,S=M;return s(),_(b,null,[c(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${a.value.length}`},{default:f(()=>[n("div",Z,[(s(!0),_(b,null,E(a.value,(y,$)=>(s(),p(u,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:A($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",tt,[o[0]||(o[0]=n("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1)),o[1]||(o[1]=n("span",{op50:""},"Total execution time:",-1)),c(i,{duration:t.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),c(S,null,{default:f(()=>[c(N)]),_:1})],64)}}});export{pt as default};
@@ -1 +0,0 @@
1
- import{f as m,w as d,F as c}from"./ocdy9hhm.js";import{u as f,p as _}from"./vue-devtools-c8myfb0e.js";import{q as v,O as C,a0 as n,R as a,v as o,a1 as E,a8 as I}from"./vendor/json-editor-vue-huf8dypo.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./vue-virtual-scroller.esm-bjuzk3oj.js";const O={class:"h-full w-full"},S=v({__name:"render-tree",setup(k){const{connected:l}=f(),t=m(),p=d();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=c;return n(),C("div",O,[o(l)?(n(),a(o(_),{key:0,onOnInspectComponentStart:e[0]||(e[0]=u=>s(!1)),onOnInspectComponentEnd:e[1]||(e[1]=u=>s(!0)),onOpenInEditor:o(p)},null,8,["onOpenInEditor"])):(n(),a(i,{key:1},{default:E(()=>e[2]||(e[2]=[I(" Connecting.... ")])),_:1}))])}}});export{S as default};
@@ -1,9 +0,0 @@
1
- import{bh as $e,I as Ee,b7 as le,bi as Ke,b5 as Qe,a4 as Xe,A as Ye,f as Ze,w as et,g as De,ay as tt,b6 as ot,a as nt,_ as Re,v as at,i as je,F as st,M as lt,bj as rt,S as it,n as ut,a8 as dt}from"./ocdy9hhm.js";import{_ as ct}from"./nnavbar.vue-cuxn5zlw.js";import{_ as Ve}from"./nbadge-o5kc9sv8.js";import{q as ye,k as P,O as k,a0 as r,P as u,S as pt,Q as O,W as M,R as $,a7 as U,v as b,a8 as K,U as ft,F as L,ad as W,C as me,y as Ie,b as Ue,B as vt,p as mt,r as ve,u as j,w as yt,af as Oe,a2 as v,a1 as C,a9 as Z,a3 as ht,as as gt,K as bt}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as _t}from"./nselect.vue-bm3fwbn0.js";import{_ as Ne}from"./server-route-inputs.vue-nb9ikq9z.js";import{_ as kt}from"./code-snippets.vue-c2qehp6m.js";import{_ as wt}from"./data-schema-button.vue-fwxrv7x1.js";import{_ as xt}from"./ncode-block.vue-h2q9yyre.js";import{d as Ct}from"./vendor/unocss-e7oqigho.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-o6e0gew7.js";import{_ as Tt}from"./ndrawer.vue-hy3weod1.js";import"./vendor/shiki-jv02kgzv.js";import"./ncheckbox.vue-kwe3k58j.js";import"./client-bqg1k5yt.js";import"./nicon-title.vue-oyhtd7jm.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const l=P(!0),n=$e();return(o,y)=>{const f=Ee,d=Ve,m=Pe;return r(),k("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:M([{"bg-active":b(n)===o.item.filepath}]),style:ft({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:y[0]||(y[0]=g=>{l.value=!l.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),$(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":l.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),$(d,{key:1,class:M(b(le)(o.item.method||"*")),textContent:U((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(r(),$(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):O("",!0),K(" "+U(o.item.route),1)],2)],6),y[1]||(y[1]=u("div",{"x-divider":""},null,-1)),l.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,W(o.item.routes,g=>(r(),$(m,{key:g.filepath,item:g,index:o.index+1},null,8,["item","index"]))),128))]):O("",!0)])}}});function $t(e,l){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=l||{},y=o.decode||Et;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let m=e.indexOf(";",f);if(m===-1)m=e.length;else if(m<d){f=e.lastIndexOf(";",d-1)+1;continue}const g=e.slice(f,d).trim();if(o?.filter&&!o?.filter(g)){f=m+1;continue}if(n[g]===void 0){let i=e.slice(d+1,m).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[g]=Dt(i,y)}f=m+1}return n}function Et(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,l){try{return l(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,l,n){const o=n||{},y=o.encode||encodeURIComponent;if(typeof y!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=y(l);if(f&&!ae.test(f))throw new TypeError("argument val is invalid");let d=e+"="+f;if(o.maxAge!==void 0&&o.maxAge!==null){const m=o.maxAge-0;if(Number.isNaN(m)||!Number.isFinite(m))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(m)}if(o.domain){if(!ae.test(o.domain))throw new TypeError("option domain is invalid");d+="; Domain="+o.domain}if(o.path){if(!ae.test(o.path))throw new TypeError("option path is invalid");d+="; Path="+o.path}if(o.expires){if(!Rt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");d+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(d+="; HttpOnly"),o.secure&&(d+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":{d+="; Priority=Low";break}case"medium":{d+="; Priority=Medium";break}case"high":{d+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:{d+="; SameSite=Strict";break}case"lax":{d+="; SameSite=Lax";break}case"strict":{d+="; SameSite=Strict";break}case"none":{d+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(d+="; Partitioned"),d}function Rt(e){return Object.prototype.toString.call(e)==="[object Date]"||e instanceof Date}function B(e){if(typeof e!="object")return e;var l,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(l in e)e.hasOwnProperty(l)&&n[l]!==e[l]&&(n[l]=B(e[l]))}else{n={};for(l in e)l==="__proto__"?Object.defineProperty(n,l,{value:B(e[l]),configurable:!0,enumerable:!0,writable:!0}):n[l]=B(e[l])}return n}if(o==="[object Array]"){for(l=e.length,n=Array(l);l--;)n[l]=B(e[l]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(y){n.add(B(y))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(y,f){n.set(B(f),B(y))}),n):o==="[object Date]"?new Date(+e):o==="[object RegExp]"?(n=new RegExp(e.source,e.flags),n.lastIndex=e.lastIndex,n):o==="[object DataView]"?new e.constructor(B(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const jt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},se=window.cookieStore;function Vt(e,l){const n={...jt,...l};n.filter??=g=>g===e;const o=Se(n)||{};let y;n.maxAge!==void 0?y=n.maxAge*1e3:n.expires&&(y=n.expires.getTime()-Date.now());const f=y!==void 0&&y<=0,d=B(f?void 0:o[e]??n.default?.()),m=y&&!f?Ot(d,y,n.watch&&n.watch!=="shallow"):P(d);{let g=null;try{!se&&typeof BroadcastChannel<"u"&&(g=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const i=()=>{n.readonly||Ke(m.value,o[e])||(Ut(e,m.value,n),o[e]=B(m.value),g?.postMessage({value:n.encode(m.value)}))},E=A=>{const S=A.refresh?Se(n)?.[e]:n.decode(A.value);I=!0,m.value=S,o[e]=B(S),mt(()=>{I=!1})};let I=!1;const F=!!Ue();if(F&&me(()=>{I=!0,i(),g?.close()}),se){const A=S=>{const _=S.changed.find(h=>h.name===e),N=S.deleted.find(h=>h.name===e);_&&E({value:_.value}),N&&E({value:null})};se.addEventListener("change",A),F&&me(()=>se.removeEventListener("change",A))}else g&&(g.onmessage=({data:A})=>E(A));n.watch?Ie(m,()=>{I||i()},{deep:n.watch!=="shallow"}):i()}return m}function Se(e={}){return $t(document.cookie,e)}function It(e,l,n={}){return l==null?Ce(e,l,{...n,maxAge:-1}):Ce(e,l,n)}function Ut(e,l,n={}){document.cookie=It(e,l,n)}const Te=2147483647;function Ot(e,l,n){let o,y,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{y?.(),clearTimeout(o)}),vt((m,g)=>{n&&(y=Ie(d,g));function i(){f=0,clearTimeout(o);const E=l-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<l)return i();d.value=void 0,g()},I)}return{get(){return m(),d.value},set(E){i(),d.value=E,g()}}})}const Nt={"h-full":"","w-full":"",flex:"~ col"},Lt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Pt={flex:"~ gap2 items-center"},At={relative:"","w-full":""},Bt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Mt={class:"hidden md:block"},Ft={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},zt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Wt={flex:"~ gap-4"},Gt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Jt={key:2},Kt={key:3,border:"b base",relative:"","n-code-block":""},Qt={flex:"~ wrap","w-full":""},Xt=["onClick"],Yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Zt={key:1,"text-xs":"",op50:""},eo={key:0,"flex-auto":"","overflow-auto":""},to={border:"~ base","h-full":"","w-full":"",rounded:""},oo=["data"],no={key:2,"flex-auto":"","overflow-auto":"",p4:""},ao={border:"~ base",rounded:""},so=["src"],lo={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:l}){const n=e,o=l,[y,f]=Qe(),d=Xe(),m=Ye(),g=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=j(()=>i.contentType.includes("application/json")?"json":i.contentType.includes("text/html")?"html":i.contentType.includes("text/css")?"css":i.contentType.includes("text/javascript")?"javascript":i.contentType.includes("image")||i.contentType.includes("video")?"media":i.contentType.includes("text/xml")||i.contentType.includes("application/xml")?"xml":i.contentType.includes("application/pdf")?"pdf":"text"),I=j(()=>{if(E.value==="json")return JSON.stringify(i.data,null,2);if(E.value==="media"||E.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),F=P(!1),A=P(!1),S=et(),_=j(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),N=j(()=>_.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),h=P(n.route.method||"GET"),D=P({}),w=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:x,sendFrom:H}=De("serverRoutes"),Q=j(()=>g?.value?.app?.$fetch?H.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=j(()=>ie.includes(h.value.toUpperCase())),c=P(),te=["input","json"],G=P(te[0]),ue=j({get:()=>w[c.value],set:a=>{w[c.value]=a}}),he=j(()=>({...J(x.value.query),...J(w.query)})),ge=j(()=>({...J(x.value.headers),...J(w.headers)})),de=j(()=>ee.value?G.value==="json"?{...J(x.value.body),...V.value}:{...J(x.value.body),...J(w.body)}:void 0),Ae=j(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=j(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(_.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&D.value[R]||R).join("")||"")+a;let p=m.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=j(()=>Ae.value+oe.value);function J(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:T})=>p&&R&&T!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){A.value=!0,F.value=!0;const a=Date.now(),t=Q.value==="app"?g.value.app.$fetch:$fetch;lt("server-routes:fetch",{method:h.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:h.value.toUpperCase(),headers:ge.value,query:he.value,body:de.value,onResponse({response:p}){i.contentType=(p.headers.get("content-type")||"").toString().toLowerCase().trim(),i.statusCode=p.status,i.error=void 0},onResponseError(p){i.error=p.response._data,i.data=p.response._data}})}catch{}F.value=!1,i.fetchTime=Date.now()-a}const ke=j(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([T,q])=>T&&q&&!(T==="Content-Type"&&q==="application/json")).map(([T,q])=>` '${T}': '${q}'`).join(`,
2
- `);h.value.toUpperCase()!=="GET"&&t.push(`method: '${h.value.toUpperCase()}'`),p&&t.push(`headers: {
3
- ${p}
4
- }`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const R=t.length?`, {
5
- ${t.join(`,
6
- `).split(`
7
- `).map(T=>` ${T}`).join(`
8
- `)}
9
- }`:"";return a.push({name:"useFetch",lang:"javascript",docs:xe.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${R})`}),a.push({name:"$fetch",lang:"javascript",docs:xe.nuxt.$fetch,code:`await $fetch('${oe.value}'${R})`}),a}),X=P(qe()),z=ve({key:"",value:""}),Be=j(()=>{const a=[];return N.value.length&&a.push({name:"Params",slug:"params",length:N.value.length}),a.push({name:"Query",slug:"query",length:w.query.length}),ee.value&&a.push({name:"Body",slug:"body",length:w.body.length}),a.push({name:"Headers",slug:"headers",length:w.headers.length}),a.push({name:"Cookies",slug:"cookies",length:X.value.length}),a.push({name:"Snippets",slug:"snippet"}),a});function qe(){return document.cookie.split("; ").map(a=>{const[t,p]=a.split("=");return{key:t,value:p}}).filter(a=>a.key)}function ce(a,t){if(!a)return;const p=X.value.find(T=>T.key===a),R=Vt(a);p!==void 0?t===void 0&&(X.value=X.value.filter(T=>T.key!==a)):(X.value.push({key:a,value:t}),z.key="",z.value=""),R.value=t}yt(()=>{G.value==="json"&&typeof V.value=="string"&&(V.value=JSON.parse(V.value))});const pe=tt("nuxt-devtools:server-routes:inputs",()=>[],{window:window.parent});ot([w,c],()=>{const a=pe.value?.find(t=>t.path===n.route.filepath);if(a){c.value||(c.value=a.tab),a.tab!==c.value&&(a.tab=c.value);const{body:t,query:p,headers:R,params:T}=a.inputs;Object.assign(w,{body:t,query:p,headers:R}),D.value=T}else{const t={path:n.route.filepath,tab:N.value.length?"params":"query",inputs:{...w,...N.value.length?{params:D.value}:{}}};pe.value.push(t),c.value||(c.value=t.tab)}},{immediate:!0,deep:!0,debounce:500});function Me(){pe.value=[],w.body=[],w.query=[],w.headers=[],D.value={},c.value=N.value.length?"params":"query"}const Fe=nt();return(a,t)=>{const p=Re,R=_t,T=at,q=Ee,we=Ne,He=kt,ze=je,We=st,fe=Ve,Ge=wt,Je=xt,ne=Oe("tooltip");return r(),k("div",Nt,[u("div",Lt,[u("div",Pt,[a.route.method?(r(),$(p,{key:0,class:M(["n-badge-base n-sm",b(le)(h.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:C(()=>[K(U(h.value.toUpperCase()),1)]),_:1},8,["class"])):(r(),$(R,{key:1,modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=s=>h.value=s),class:M(["n-badge-base n-sm",b(le)(h.value)])},{default:C(()=>[(r(),k(L,null,W(re,s=>u("option",{key:s,class:M(b(le)(s))},U(s.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),u("div",At,[v(T,{"model-value":oe.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),u("div",Bt,[Z(v(p,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:t[1]||(t[1]=s=>b(Fe)(be.value,"server-route-url"))},null,512),[[ne,"Copy URL"]]),Z(v(p,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:t[2]||(t[2]=s=>b(S)(a.route.filepath))},null,512),[[ne,"Open in Editor"]])])]),v(p,{"h-full":"",n:"primary solid",onClick:_e},{default:C(()=>[v(q,{icon:"carbon:send"})]),_:1})])]),u("div",qt,[(r(!0),k(L,null,W(Be.value,s=>Z((r(),$(p,{key:s.slug,class:M(c.value===s.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>c.value=s.slug},{default:C(()=>[v(q,{icon:b(Le)[s.slug]},null,8,["icon"]),u("div",Mt,[K(U(s.name)+" "+U(s?.length?`(${s.length})`:"")+" ",1),u("span",null,U(b(x)[s.slug]?.length?`(${b(x)[s.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[ne,s.name]])),128)),t[12]||(t[12]=u("div",{"flex-auto":""},null,-1)),t[13]||(t[13]=u("div",{"text-xs":"",op50:""}," Send from ",-1)),v(R,{modelValue:Q.value,"onUpdate:modelValue":t[3]||(t[3]=s=>Q.value=s),class:"n-xs",disabled:!b(g)?.app?.$fetch},{default:C(()=>t[11]||(t[11]=[u("option",{value:"app"}," App ",-1),u("option",{value:"devtools"}," DevTools ",-1)])),_:1},8,["modelValue","disabled"]),Z(v(p,{n:"orange",class:"p-3",icon:"i-carbon-clean",onClick:Me},null,512),[[ne,"Clear Inputs Saved Cache"]])]),c.value==="params"?(r(),k("div",Ft,[(r(!0),k(L,null,W(N.value,s=>(r(),k(L,{key:s},[u("div",Ht,U(s),1),v(T,{modelValue:D.value[s],"onUpdate:modelValue":Y=>D.value[s]=Y,placeholder:s,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):O("",!0),c.value==="cookies"?(r(),k("div",zt,[(r(!0),k(L,null,W(X.value,s=>(r(),k("div",{key:s.key,flex:"~ gap-4 items-center"},[v(T,{placeholder:"Key...","model-value":s.key,disabled:"","op-70":""},null,8,["model-value"]),v(T,{placeholder:"Value...","model-value":s.value,"flex-1":"",n:"primary",onInput:Y=>ce(s.key,Y.target?.value)},null,8,["model-value","onInput"]),v(p,{title:"Delete",n:"red",onClick:Y=>ce(s.key,void 0)},{default:C(()=>[v(q,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),u("div",Wt,[v(T,{modelValue:z.key,"onUpdate:modelValue":t[4]||(t[4]=s=>z.key=s),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),v(T,{modelValue:z.value,"onUpdate:modelValue":t[5]||(t[5]=s=>z.value=s),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),v(p,{title:"Add",n:"primary",onClick:t[6]||(t[6]=s=>ce(z.key,z.value))},{default:C(()=>[v(q,{icon:"i-carbon-save"})]),_:1})])])):O("",!0),v(b(y),null,{default:C(()=>[v(we,{modelValue:ue.value,"onUpdate:modelValue":t[9]||(t[9]=s=>ue.value=s),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:C(()=>[b(x)[c.value]?.length?(r(),k(L,{key:0},[u("div",Gt,[t[14]||(t[14]=u("div",{"w-5":"","x-divider":""},null,-1)),t[15]||(t[15]=u("div",{"flex-none":""}," Default Inputs ",-1)),v(p,{icon:"i-carbon-edit",border:!1,onClick:t[7]||(t[7]=s=>o("openDefaultInput"))}),t[16]||(t[16]=u("div",{"x-divider":""},null,-1))]),v(we,{modelValue:b(x)[c.value],"onUpdate:modelValue":t[8]||(t[8]=s=>b(x)[c.value]=s),disabled:"",p0:""},null,8,["modelValue"])],64)):O("",!0)]),_:1},8,["modelValue"])]),_:1}),c.value==="snippet"?(r(),k("div",Jt,[ke.value.length?(r(),$(He,{key:0,"code-snippets":ke.value},null,8,["code-snippets"])):O("",!0)])):ue.value?(r(),k("div",Kt,[c.value==="body"?(r(),k(L,{key:0},[u("div",Qt,[(r(),k(L,null,W(te,s=>u("button",{key:s,px4:"",py2:"",border:"r base",hover:"bg-active",class:M({"border-b":s!==G.value}),onClick:Y=>G.value=s},[u("div",{class:M({op30:s!==G.value}),"font-mono":""},U(s),3)],10,Xt)),64)),t[17]||(t[17]=u("div",{border:"b base","flex-auto":""},null,-1))]),G.value==="input"?(r(),$(b(f),{key:0})):G.value==="json"?(r(),$(b(gt),ht({key:1,modelValue:V.value,"onUpdate:modelValue":t[10]||(t[10]=s=>V.value=s),class:[b(d)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},a.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):O("",!0)],64)):(r(),$(b(f),{key:1}))])):O("",!0),A.value?F.value?(r(),$(We,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:C(()=>t[19]||(t[19]=[K(" Fetching... ")])),_:1})):(r(),k(L,{key:6},[u("div",Yt,[t[21]||(t[21]=u("div",null,"Response",-1)),i.error?(r(),$(fe,{key:0,n:"red"},{default:C(()=>t[20]||(t[20]=[K(" Error ")])),_:1})):O("",!0),v(fe,{n:i.error?"orange":"green",textContent:U(i.statusCode)},null,8,["n","textContent"]),i.contentType?(r(),k("code",Zt,U(i.contentType),1)):O("",!0),i.contentType==="application/json"?(r(),$(Ge,{key:2,getter:()=>({input:I.value})},null,8,["getter"])):O("",!0),t[22]||(t[22]=u("div",{"flex-auto":""},null,-1)),t[23]||(t[23]=u("div",{op50:""}," Request finished in ",-1)),v(fe,{n:"green"},{default:C(()=>[K(U(i.fetchTime)+" ms ",1)]),_:1})]),E.value==="pdf"?(r(),k("div",eo,[u("div",to,[u("object",{data:I.value,type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,oo)])])):E.value!=="media"?(r(),$(Je,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:I.value,lang:E.value},null,8,["code","lang"])):(r(),k("div",no,[u("div",ao,[i.contentType.includes("image")?(r(),k("img",{key:0,rounded:"",src:I.value},null,8,so)):(r(),k("video",lo,[u("source",{src:I.value,type:"video/mp4"},null,8,ro)]))])]))],64)):(r(),$(ze,{key:4},{default:C(()=>[v(p,{n:"primary",onClick:_e},{default:C(()=>[v(q,{icon:"carbon:send"}),t[18]||(t[18]=K(" Send request "))]),_:1})]),_:1}))])}}}),uo={flex:"~ gap1","text-sm":""},co={key:0,op50:""},po={op50:""},Ro=ye({__name:"server-routes",setup(e){const l=P(!1),n=rt(),o=$e(),{selectedRoute:y,view:f,inputDefaults:d}=De("serverRoutes"),m=j(()=>{!o.value&&y.value&&(o.value=y.value.filepath);const S=n.value?.find(_=>_.filepath===o.value);return o.value!==y.value?.filepath&&S&&(y.value=S),S}),g=P(""),i=j(()=>new it(n.value||[],{keys:["method","route"],shouldSort:!0})),E=j(()=>n.value?g.value?i.value.search(g.value).map(_=>_.item):n.value:[]),I=j(()=>{const S=[],_=(h,D)=>{h.routes=h.routes||[],h.routes.push(D)},N=(h,D)=>{const w=D?D.routes?.find(x=>x.route===h):S.find(x=>x.route===h);if(w)return w;const V={route:h,filepath:h.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};return D?_(D,V):S.push(V),V};return E.value.forEach(h=>{let D,w;const V=h.filepath.split("/"),x=V.slice(V.indexOf("server")+1);if(h.type==="runtime"){x[0]="runtime";const H=V.indexOf("dist");H!==-1&&(D=V[H-1],D&&x.splice(1,0,D))}x.length>0&&x[x.length-1].includes(".")&&x.pop(),x.forEach(H=>{w=N(H,w)}),w?_(w,h):S.push(h)}),S});function F(){f.value=f.value==="tree"?"list":"tree"}function A(S){return S.charAt(0).toUpperCase()+S.slice(1)}return(S,_)=>{const N=Re,h=ct,D=Pe,w=io,V=ut,x=je,H=dt,Q=Ne,re=St,ie=Tt,ee=Oe("tooltip");return r(),k(L,null,[v(H,{"storage-key":"tab-server-routes"},{left:C(()=>[v(h,{search:g.value,"onUpdate:search":_[1]||(_[1]=c=>g.value=c),pb2:""},{actions:C(()=>[Z(v(N,{"text-lg":"",icon:b(f)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:F},null,8,["icon"]),[[ee,"Toggle View"]]),Z(v(N,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:_[0]||(_[0]=c=>l.value=!l.value)},null,512),[[ee,"Default Inputs"]])]),default:C(()=>[u("div",uo,[g.value?(r(),k("span",co,U(E.value.length)+" matched · ",1)):O("",!0),u("span",po,U(b(n)?.length)+" routes in total",1)])]),_:1},8,["search"]),(r(!0),k(L,null,W(b(f)==="tree"?I.value:E.value,c=>(r(),$(D,{key:c.filepath,item:c},null,8,["item"]))),128))]),right:C(()=>[(r(),$(bt,{max:10},[m.value?(r(),$(w,{key:m.value.filepath,route:m.value,onOpenDefaultInput:_[2]||(_[2]=c=>l.value=!0)},null,8,["route"])):O("",!0)],1024)),m.value?O("",!0):(r(),$(x,{key:0},{default:C(()=>[v(V,{px6:"",py2:""},{default:C(()=>_[5]||(_[5]=[u("span",{op75:""},"Select a route to start",-1)])),_:1})]),_:1}))]),_:1}),v(ie,{modelValue:l.value,"onUpdate:modelValue":_[3]||(_[3]=c=>l.value=c),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:_[4]||(_[4]=c=>l.value=!1)},{default:C(()=>[u("div",null,[_[6]||(_[6]=u("div",{p4:"",border:"b base"},[u("span",{"text-lg":""},"Default Inputs"),u("br"),u("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1)),(r(!0),k(L,null,W(Object.keys(b(d)),c=>(r(),$(re,{key:c,text:`${A(c)} ${b(d)[c].length?`(${b(d)[c].length})`:""}`,padding:!1,icon:b(Le)[c]},{default:C(()=>[v(Q,{modelValue:b(d)[c],"onUpdate:modelValue":te=>b(d)[c]=te,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Ro as default};
@@ -1 +0,0 @@
1
- import{b4 as re,I as oe,g as le,b5 as ke,a4 as xe,A as Te,w as Se,ay as we,b6 as Xe,a as Ee,_ as ce,b7 as De,v as Ce,i as fe,F as Me,M as Ie,b8 as $e,S as Ue,n as Le,a8 as Ne}from"./ocdy9hhm.js";import{_ as Ae}from"./nnavbar.vue-cuxn5zlw.js";import{_ as pe}from"./nbadge-o5kc9sv8.js";import{a as Re,q as K,k as F,u as U,O as $,a0 as g,P as v,Q as j,a2 as k,a7 as A,F as W,ad as Z,W as Y,v as D,r as se,w as Ve,af as de,R,a9 as G,a1 as I,a8 as P,a3 as je,as as We,S as Be,U as He,K as Fe}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as ve}from"./server-route-inputs.vue-nb9ikq9z.js";import{_ as ze}from"./ncode-block.vue-h2q9yyre.js";import{S as he}from"./constants-b32h69zq.js";import{_ as qe}from"./nsection-block-o6e0gew7.js";import{_ as Pe}from"./ndrawer.vue-hy3weod1.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./ncheckbox.vue-kwe3k58j.js";import"./nselect.vue-bm3fwbn0.js";import"./client-bqg1k5yt.js";import"./nicon-title.vue-oyhtd7jm.js";var ne={exports:{}},ue;function Ye(){return ue||(ue=1,function(z,L){(function(x,w){z.exports=w()})(globalThis,()=>(()=>{var N={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),d=function(){function y(t,e,a){e===void 0&&(e=!0),a===void 0&&(a=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=a}return y.prototype.parse=function(){var t,e,a=(t=this.expression)!==null&&t!==void 0?t:"";if(a.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},y.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},a=e[t];if(!a)throw new Error("Unknown special expression.");return a},y.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),a=0;a<e.length;a++)if(e[a].includes(",")){var r=e[a].split(",").map(function(s){return s.trim()}).filter(function(s){return s!==""}).map(function(s){return isNaN(Number(s))?s:Number(s)}).filter(function(s){return s!==null&&s!==""});r.length===0&&r.push("*"),r.sort(function(s,i){return s!==null&&i!==null?s-i:0}),e[a]=r.map(function(s){return s!==null?s.toString():""}).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(e.length==1?"":"s",". At least 5 parts are required."));if(e.length==5)e.unshift(""),e.push("");else if(e.length==6){var n=/\d{4}$/.test(e[5])||e[4]=="?"||e[2]=="?";n?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},y.prototype.normalize=function(t){var e=this;if(t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),t[0].indexOf("0/")==0&&(t[0]=t[0].replace("0/","*/")),t[1].indexOf("0/")==0&&(t[1]=t[1].replace("0/","*/")),t[2].indexOf("0/")==0&&(t[2]=t[2].replace("0/","*/")),t[3].indexOf("1/")==0&&(t[3]=t[3].replace("1/","*/")),t[4].indexOf("1/")==0&&(t[4]=t[4].replace("1/","*/")),t[6].indexOf("1/")==0&&(t[6]=t[6].replace("1/","*/")),t[5]=t[5].replace(/(^\d)|([^#/\s]\d)/g,function(c){var m=c.replace(/\D/,""),f=m;return e.dayOfWeekStartIndexZero?m=="7"&&(f="0"):f=(parseInt(m)-1).toString(),c.replace(m,f)}),t[5]=="L"&&(t[5]="6"),t[3]=="?"&&(t[3]="*"),t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||t[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var a={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var r in a)t[5]=t[5].replace(new RegExp(r,"gi"),a[r].toString());t[4]=t[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(c){var m=c.replace(/\D/,""),f=m;return e.monthStartIndexZero&&(f=(parseInt(m)+1).toString()),c.replace(m,f)});var n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in n)t[4]=t[4].replace(new RegExp(s,"gi"),n[s].toString());t[0]=="0"&&(t[0]=""),!/\*|\-|\,|\//.test(t[2])&&(/\*|\//.test(t[1])||/\*|\//.test(t[0]))&&(t[2]+="-".concat(t[2]));for(var i=0;i<t.length;i++)if(t[i].indexOf(",")!=-1&&(t[i]=t[i].split(",").filter(function(c){return c!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var u=null;switch(i){case 4:u="12";break;case 5:u="6";break;case 6:u="9999";break;default:u=null;break}if(u!==null){var h=t[i].split("/");t[i]="".concat(h[0],"-").concat(u,"/").concat(h[1])}}},y.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},y.prototype.validateAnyRanges=function(t){o.default.secondRange(t[0]),o.default.minuteRange(t[1]),o.default.hourRange(t[2]),o.default.dayOfMonthRange(t[3]),o.default.monthRange(t[4],this.monthStartIndexZero),o.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},y.prototype.validateOnlyExpectedCharactersFound=function(t,e){var a=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(a&&a.length)throw new Error("Expression contains invalid values: '".concat(a.toString(),"'"))},y}();p.CronParser=d},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),d=_(949),y=function(){function t(e,a){if(this.expression=e,this.options=a,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],a.use24HourTimeFormat===void 0&&(a.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,a){var r=a===void 0?{}:a,n=r.throwExceptionOnParseError,s=n===void 0?!0:n,i=r.verbose,u=i===void 0?!1:i,h=r.dayOfWeekStartIndexZero,c=h===void 0?!0:h,m=r.monthStartIndexZero,f=m===void 0?!1:m,M=r.use24HourTimeFormat,T=r.locale,B=T===void 0?null:T,V=r.tzOffset,E=V===void 0?0:V,H={throwExceptionOnParseError:s,verbose:u,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:M,locale:B,tzOffset:E};H.tzOffset&&console.warn("'tzOffset' option has been deprecated and will be removed in a future release.");var ee=new t(e,H);return ee.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e="";try{var a=new d.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=a.parse();var r=this.getTimeOfDayDescription(),n=this.getDayOfMonthDescription(),s=this.getMonthDescription(),i=this.getDayOfWeekDescription(),u=this.getYearDescription();e+=r+n+i+s+u,e=this.transformVerbosity(e,!!this.options.verbose),e=e.charAt(0).toLocaleUpperCase()+e.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return e},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],a=this.expressionParts[1],r=this.expressionParts[2],n="";if(!o.StringUtilities.containsAny(a,t.specialCharacters)&&!o.StringUtilities.containsAny(r,t.specialCharacters)&&!o.StringUtilities.containsAny(e,t.specialCharacters))n+=this.i18n.atSpace()+this.formatTime(r,a,e);else if(!e&&a.indexOf("-")>-1&&!(a.indexOf(",")>-1)&&!(a.indexOf("/")>-1)&&!o.StringUtilities.containsAny(r,t.specialCharacters)){var s=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,s[0],""),this.formatTime(r,s[1],""))}else if(!e&&r.indexOf(",")>-1&&r.indexOf("-")==-1&&r.indexOf("/")==-1&&!o.StringUtilities.containsAny(a,t.specialCharacters)){var i=r.split(",");n+=this.i18n.at();for(var u=0;u<i.length;u++)n+=" ",n+=this.formatTime(i[u],a,""),u<i.length-2&&(n+=","),u==i.length-2&&(n+=this.i18n.spaceAnd())}else{var h=this.getSecondsDescription(),c=this.getMinutesDescription(),m=this.getHoursDescription();if(n+=h,n&&c&&(n+=", "),n+=c,c===m)return n;n&&m&&(n+=", "),n+=m}return n},t.prototype.getSecondsDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(r){return r},function(r){return o.StringUtilities.format(e.i18n.everyX0Seconds(r),r)},function(r){return e.i18n.secondsX0ThroughX1PastTheMinute()},function(r){return r=="0"?"":parseInt(r)<20?e.i18n.atX0SecondsPastTheMinute(r):e.i18n.atX0SecondsPastTheMinuteGt20()||e.i18n.atX0SecondsPastTheMinute(r)});return a},t.prototype.getMinutesDescription=function(){var e=this,a=this.expressionParts[0],r=this.expressionParts[2],n=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(s){return s},function(s){return o.StringUtilities.format(e.i18n.everyX0Minutes(s),s)},function(s){return e.i18n.minutesX0ThroughX1PastTheHour()},function(s){try{return s=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(s)<20?e.i18n.atX0MinutesPastTheHour(s):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(s)}catch{return e.i18n.atX0MinutesPastTheHour(s)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=this.getSegmentDescription(a,this.i18n.everyHour(),function(i){return e.formatTime(i,"0","")},function(i){return o.StringUtilities.format(e.i18n.everyX0Hours(i),i)},function(i){return e.i18n.betweenX0AndX1()},function(i){return e.i18n.atX0()});if(r&&a.includes("-")&&this.expressionParts[1]!="0"){var n=Array.from(r.matchAll(/:00/g));if(n.length>1){var s=n[n.length-1].index;r=r.substring(0,s)+":59"+r.substring(s+3)}}return r},t.prototype.getDayOfWeekDescription=function(){var e=this,a=this.i18n.daysOfTheWeek(),r=null;return this.expressionParts[5]=="*"?r="":r=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(n,s){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var u=parseInt(i);if(e.options.tzOffset){var h=e.expressionParts[2],c=parseInt(h)+(e.options.tzOffset?e.options.tzOffset:0);c>=24?u++:c<0&&u--,u>6?u=0:u<0&&(u=6)}var m=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(s)[u]:a[u];if(n.indexOf("#")>-1){var f=null,M=n.substring(n.indexOf("#")+1),T=n.substring(0,n.indexOf("#"));switch(M){case"1":f=e.i18n.first(T);break;case"2":f=e.i18n.second(T);break;case"3":f=e.i18n.third(T);break;case"4":f=e.i18n.fourth(T);break;case"5":f=e.i18n.fifth(T);break}m=f+" "+m}return m},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var s=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(s):e.i18n.commaX0ThroughX1(s)},function(n){var s=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),u=n.substring(0,n.indexOf("#"));s=e.i18n.commaOnThe(i,u).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)s=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var h=e.expressionParts[3]!="*";s=h?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return s}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,s){return s&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(s)[parseInt(n)-1]:a[parseInt(n)-1]},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0Months(n),n)},function(n){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()},function(n){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()});return r},t.prototype.getDayOfMonthDescription=function(){var e=this,a=null,r=this.expressionParts[3];switch(r){case"L":a=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":a=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var n=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(n){var s=parseInt(n[0].replace("W","")),i=s==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var u=r.match(/L-(\d{1,2})/);if(u){var h=u[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(h),h);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(c){return c=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),c):c},function(c){return c=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(c)},function(c){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(c)},function(c){return e.i18n.commaOnDayX0OfTheMonth(c)})}break}}return a},t.prototype.getYearDescription=function(){var e=this,a=this.getSegmentDescription(this.expressionParts[6],"",function(r){return/^\d+$/.test(r)?new Date(parseInt(r),1).getFullYear().toString():r},function(r){return o.StringUtilities.format(e.i18n.commaEveryX0Years(r),r)},function(r){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()},function(r){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()});return a},t.prototype.getSegmentDescription=function(e,a,r,n,s,i){var u=null,h=e.indexOf("/")>-1,c=e.indexOf("-")>-1,m=e.indexOf(",")>-1;if(!e)u="";else if(e==="*")u=a;else if(!h&&!c&&!m)u=o.StringUtilities.format(i(e),r(e));else if(m){for(var f=e.split(","),M="",T=0;T<f.length;T++)if(T>0&&f.length>2&&(M+=",",T<f.length-1&&(M+=" ")),T>0&&f.length>1&&(T==f.length-1||f.length==2)&&(M+="".concat(this.i18n.spaceAnd()," ")),f[T].indexOf("/")>-1||f[T].indexOf("-")>-1){var B=f[T].indexOf("-")>-1&&f[T].indexOf("/")==-1,V=this.getSegmentDescription(f[T],a,r,n,B?this.i18n.commaX0ThroughX1:s,i);B&&(V=V.replace(", ","")),M+=V}else h?M+=this.getSegmentDescription(f[T],a,r,n,s,i):M+=r(f[T]);h?u=M:u=o.StringUtilities.format(i(e),M)}else if(h){var f=e.split("/");if(u=o.StringUtilities.format(n(f[1]),f[1]),f[0].indexOf("-")>-1){var E=this.generateRangeSegmentDescription(f[0],s,r);E.indexOf(", ")!=0&&(u+=", "),u+=E}else if(f[0].indexOf("*")==-1){var H=o.StringUtilities.format(i(f[0]),r(f[0]));H=H.replace(", ",""),u+=o.StringUtilities.format(this.i18n.commaStartingX0(),H)}}else c&&(u=this.generateRangeSegmentDescription(e,s,r));return u},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",s=e.split("-"),i=r(s[0],1),u=r(s[1],2),h=a(e);return n+=o.StringUtilities.format(h,i,u),n},t.prototype.formatTime=function(e,a,r){var n=0,s=0;this.options.tzOffset&&(n=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),s=parseFloat((this.options.tzOffset%1).toFixed(2)),s!=0&&(s*=60));var i=parseInt(e)+n,u=parseInt(a)+s;u>=60?(u-=60,i+=1):u<0&&(u+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var h="",c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),h=c?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var m="";return r&&(m=":".concat(("00"+r).substring(r.length))),"".concat(c?h:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+u.toString()).substring(u.toString().length)).concat(m).concat(c?"":h)},t.prototype.transformVerbosity=function(e,a){return a||(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),e=e.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),e=e.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),e=e.replace(/\, ?$/,"")),e},t.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();p.ExpressionDescriptor=y},747:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=_(486),d=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=d},486:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var _=function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(d,y){if(!d)throw new Error(y)}var o=function(){function d(){}return d.secondRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"seconds part must be >= 0 and <= 59")}},d.minuteRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=59,"minutes part must be >= 0 and <= 59")}},d.hourRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=0&&a<=23,"hours part must be >= 0 and <= 23")}},d.dayOfMonthRange=function(y){for(var t=y.split(","),e=0;e<t.length;e++)if(!isNaN(parseInt(t[e],10))){var a=parseInt(t[e],10);_(a>=1&&a<=31,"DOM part must be >= 1 and <= 31")}},d.monthRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=1&&r<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},d.dayOfWeekRange=function(y,t){for(var e=y.split(","),a=0;a<e.length;a++)if(!isNaN(parseInt(e[a],10))){var r=parseInt(e[a],10);_(r>=0&&r<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},d}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(d){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return d.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(d,y){return y.some(function(t){return d.indexOf(t)>-1})},o}();p.StringUtilities=_}},x={};function w(b){var p=x[b];if(p!==void 0)return p.exports;var _=x[b]={exports:{}};return N[b](_,_.exports,w),_.exports}var X={};return(()=>{var b=X;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=w(333),_=w(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),X})())}(ne)),ne.exports}var Ge=Ye();const Ze=Re(Ge),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(z){const L=z,N=re(),x=F(!0),w=U(()=>Ze.toString(L.collection.cron));return(X,b)=>{const p=oe,_=pe;return g(),$("div",null,[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:w.value,onClick:b[0]||(b[0]=o=>x.value=!x.value)},[v("div",Qe,[k(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":x.value?90:0,transition:""},null,8,["transform-rotate"])]),v("span",Ke,[k(_,{class:"font-mono n-primary",textContent:A(X.collection.cron)},null,8,["textContent"]),v("span",et,A(w.value),1),v("span",tt,"("+A(X.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=v("div",{"x-divider":""},null,-1)),x.value?(g(),$("ul",nt,[(g(!0),$(W,null,Z(X.collection.tasks,o=>(g(),$("li",{key:o},[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:Y([{"bg-active":D(N)===o}]),onClick:d=>N.value=o},A(o),11,rt),b[1]||(b[1]=v("div",{"x-divider":""},null,-1))]))),128))])):j("",!0)])}}}),at={"h-full":"","w-full":"",flex:"~ col"},it={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},st={flex:"~ gap2 items-center"},ut={relative:"","w-full":""},lt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ct={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},ft={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},dt={key:0,border:"b base",relative:"","n-code-block":""},vt={flex:"~ wrap","w-full":""},ht=["onClick"],mt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},yt={key:1,"text-xs":"",op50:""},gt=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(z,{emit:L}){const N=z,x=L,w=F({payload:{}}),{inputDefaults:X}=le("serverRoutes"),[b,p]=ke(),_=xe(),o=Te(),d=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=U(()=>JSON.stringify(d.data,null,2)),t=U(()=>d.contentType.includes("application/json")?"json":"text"),e=F(!1),a=F(!1),r=Se(),n=F(),s=["json"],i=F(s[0]),u=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),h=U({get:()=>u[n.value],set:O=>{u[n.value]=O}}),c=U(()=>({...E(X.value.query),...E(u.query)})),m=U(()=>({...E(X.value.headers)})),f=U(()=>Object.keys(w.value?.payload??{}).length?{...w.value}:void 0),M=U(()=>f.value?"POST":"GET"),T=U(()=>{let O=window?.location.origin;return O.charAt(O.length-1)==="/"&&(O=O.slice(0,-1)),O}),B=U(()=>{let O=new URLSearchParams(c.value).toString();O&&(O=`?${O}`);const l=`/_nitro/tasks/${N.task.name}${O}`;let C=o.value?.app.baseURL||"";return(C==="./"||C===".")&&(C=""),C.endsWith("/")&&(C=C.slice(0,-1)),C+l}),V=U(()=>T.value+B.value);function E(O){const l=Object.fromEntries(O.filter(({active:C,key:q,value:J})=>C&&q&&J!==void 0).map(({key:C,value:q})=>[C,q]));return Object.entries(l).length?l:void 0}async function H(){a.value=!0,e.value=!0;const O=Date.now();Ie("server-tasks:run",{method:M.value});try{d.data=await $fetch(V.value,{method:"POST",headers:m.value,query:c.value,body:f.value,onResponse({response:l}){d.contentType=(l.headers.get("content-type")||"").toString().toLowerCase().trim(),d.statusCode=l.status,d.error=void 0},onResponseError(l){d.error=l.response._data,d.data=l.response._data}})}catch{}e.value=!1,d.fetchTime=Date.now()-O}const ee=U(()=>{const O=[];return O.push({name:"Query",slug:"query",length:u.query.length}),O.push({name:"Body",slug:"body",length:u.body.length}),O});Ve(()=>{if(i.value==="json"&&typeof w.value=="string")try{w.value=JSON.parse(w.value)}catch{}});const ae=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([u,n],()=>{const O=ae.value?.find(l=>l.task===N.task.name);if(O){n.value||(n.value=O.tab),O.tab!==n.value&&(O.tab=n.value);const{body:l,query:C,headers:q}=O.inputs;Object.assign(u,{body:l,query:C,headers:q})}else{const l={task:N.task.name,tab:"query",inputs:u};ae.value.push(l),n.value||(n.value=l.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(O,l)=>{const C=ce,q=Ce,J=oe,ie=ve,ge=fe,_e=Me,te=pe,be=ze,Q=de("tooltip");return g(),$("div",at,[v("div",it,[v("div",st,[G((g(),$("div",null,[k(C,{class:Y(["n-badge-base n-sm",D(De)(M.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:I(()=>[P(A(M.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${M.value} as ${M.value==="GET"?"no":""} json body is sent`]]),v("div",ut,[k(q,{"model-value":B.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),v("div",lt,[G(k(C,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:l[0]||(l[0]=S=>D(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(k(C,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:l[1]||(l[1]=S=>D(r)(O.task.handler))},null,512),[[Q,"Open in Editor"]])])]),k(C,{"h-full":"",n:"primary solid",onClick:H},{default:I(()=>[k(J,{icon:"carbon:send"})]),_:1})])]),v("div",ct,[(g(!0),$(W,null,Z(ee.value,S=>G((g(),R(C,{key:S.slug,class:Y(n.value===S.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Oe=>n.value=S.slug},{default:I(()=>[k(J,{icon:D(he)[S.slug]},null,8,["icon"]),v("div",ft,[P(A(S.name)+" "+A(S?.length?`(${S.length})`:"")+" ",1),v("span",null,A(D(X)[S.slug]?.length?`(${D(X)[S.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,S.name]])),128))]),k(D(b),null,{default:I(()=>[k(ie,{modelValue:h.value,"onUpdate:modelValue":l[4]||(l[4]=S=>h.value=S),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:I(()=>[D(X)[n.value]?.length?(g(),$(W,{key:0},[v("div",pt,[l[6]||(l[6]=v("div",{"w-5":"","x-divider":""},null,-1)),l[7]||(l[7]=v("div",{"flex-none":""}," Default Inputs ",-1)),k(C,{icon:"i-carbon-edit",border:!1,onClick:l[2]||(l[2]=S=>x("openDefaultInput"))}),l[8]||(l[8]=v("div",{"x-divider":""},null,-1))]),k(ie,{modelValue:D(X)[n.value],"onUpdate:modelValue":l[3]||(l[3]=S=>D(X)[n.value]=S),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),h.value?(g(),$("div",dt,[n.value==="body"?(g(),$(W,{key:0},[v("div",vt,[(g(),$(W,null,Z(s,S=>v("button",{key:S,px4:"",py2:"",border:"r base",hover:"bg-active",class:Y({"border-b":S!==i.value}),onClick:Oe=>i.value=S},[v("div",{class:Y({op30:S!==i.value}),"font-mono":""},A(S),3)],10,ht)),64)),l[9]||(l[9]=v("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),R(D(p),{key:0})):i.value==="json"?(g(),R(D(We),je({key:1,modelValue:w.value,"onUpdate:modelValue":l[5]||(l[5]=S=>w.value=S),class:[D(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},O.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),R(D(p),{key:1}))])):j("",!0),a.value?e.value?(g(),R(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:I(()=>l[11]||(l[11]=[P(" Running... ")])),_:1})):(g(),$(W,{key:3},[v("div",mt,[l[13]||(l[13]=v("div",null,"Result",-1)),d.error?(g(),R(te,{key:0,n:"red"},{default:I(()=>l[12]||(l[12]=[P(" Error ")])),_:1})):j("",!0),k(te,{n:d.error?"orange":"green",textContent:A(d.statusCode)},null,8,["n","textContent"]),d.contentType?(g(),$("code",yt,A(d.contentType),1)):j("",!0),l[14]||(l[14]=v("div",{"flex-auto":""},null,-1)),l[15]||(l[15]=v("div",{op50:""}," Tasks finished in ",-1)),k(te,{n:"green"},{default:I(()=>[P(A(d.fetchTime)+" ms ",1)]),_:1})]),k(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),R(ge,{key:1},{default:I(()=>[k(C,{n:"primary",onClick:H},{default:I(()=>[k(J,{icon:"carbon:send"}),l[10]||(l[10]=P(" Run task "))]),_:1})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},me=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(z){const L=F(!0),N=re();return(x,w)=>{const X=oe,b=me;return g(),$("div",null,[v("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:Y([{"bg-active":D(N)===x.item.name}]),style:He({paddingLeft:`calc(0.5rem + ${x.index*1.5}em)`}),onClick:w[0]||(w[0]=p=>{L.value=!L.value,N.value=x.item.name})},[v("div",_t,[x.item.type==="collection"?(g(),R(X,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":L.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),v("span",bt,[x.item.type==="collection"?(g(),R(X,{key:0,title:`${x.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),R(X,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+A(x.item.name),1)])],6),w[1]||(w[1]=v("div",{"x-divider":""},null,-1)),L.value?Be(x.$slots,"default",{key:0},()=>[(g(!0),$(W,null,Z(x.item.tasks,p=>(g(),R(b,{key:p.name,item:p,index:x.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),Ot={flex:"~ gap1","text-sm":""},kt={key:0,op50:""},xt={op50:""},Vt=K({__name:"server-tasks",setup(z){const L=F(!1),N=$e(),x=U(()=>Object.keys(N.value?.tasks??{}).map(r=>({name:r,...N.value.tasks[r],type:"task"}))),w=U(()=>Object.entries(N.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),X=re(),{view:b,selectedTask:p,inputDefaults:_}=le("serverTasks"),o=U(()=>{!X.value&&p.value&&(X.value=p.value.name);const r=x.value.find(n=>n.name===X.value);return X.value!==p.value?.name&&r&&(p.value=r),r}),d=F(""),y=U(()=>new Ue(x.value,{keys:["key","description"],shouldSort:!0})),t=U(()=>d.value?y.value.search(d.value).map(n=>n.item):x.value),e=U(()=>{const r=[],n=(i,u)=>{i.tasks||=[],i.tasks.push(u)},s=(i,u)=>{const h=u?u.tasks?.find(m=>m.name===i):r.find(m=>m.name===i);if(h)return{...h,type:"collection"};const c={name:i,handler:i,description:"",type:"collection",tasks:[]};return u?n(u,c):r.push(c),c};return t.value.forEach(i=>{let u;const h={...i,type:"task"},m=i.name.split(":").concat();m.length>0&&m[m.length-1].includes(".")&&m.pop(),m.forEach(f=>{u=s(f,u)}),u?n(u,h):r.push(h)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const s=ce,i=Ae,u=ot,h=Ne,c=gt,m=Le,f=fe,M=ve,T=qe,B=Pe,V=de("tooltip");return g(),$(W,null,[k(h,{"storage-key":"tab-server-tasks"},{left:I(()=>[k(h,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:I(()=>[k(i,{search:d.value,"onUpdate:search":n[1]||(n[1]=E=>d.value=E),pb2:""},{actions:I(()=>[G(k(s,{"text-lg":"",icon:D(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(k(s,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=E=>L.value=!L.value)},null,512),[[V,"Default Inputs"]])]),default:I(()=>[v("div",Ot,[d.value?(g(),$("span",kt,A(t.value.length)+" matched · ",1)):j("",!0),v("span",xt,A(x.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),$(W,null,Z(D(b)==="tree"?e.value:t.value,E=>(g(),R(me,{key:E.name,item:E},null,8,["item"]))),128))]),right:I(()=>[n[6]||(n[6]=v("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),v("div",null,[v("ul",null,[(g(!0),$(W,null,Z(w.value,E=>(g(),$("li",{key:E.cron},[k(u,{collection:E},null,8,["collection"])]))),128))])])]),_:1})]),right:I(()=>[(g(),R(Fe,{max:10},[o.value?(g(),R(c,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=E=>L.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),R(f,{key:0},{default:I(()=>[k(m,{px6:"",py2:""},{default:I(()=>n[7]||(n[7]=[v("span",{op75:""},"Select a task to start",-1)])),_:1})]),_:1}))]),_:1}),k(B,{modelValue:L.value,"onUpdate:modelValue":n[4]||(n[4]=E=>L.value=E),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=E=>L.value=!1)},{default:I(()=>[v("div",null,[n[8]||(n[8]=v("div",{p4:"",border:"b base"},[v("span",{"text-lg":""},"Default Inputs"),v("br"),v("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),k(T,{text:`Query ${D(_).query.length?`(${D(_).query.length})`:""}`,padding:!1,icon:D(he).query},{default:I(()=>[k(M,{modelValue:D(_).query,"onUpdate:modelValue":n[3]||(n[3]=E=>D(_).query=E),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};
@@ -1 +0,0 @@
1
- import{_ as m}from"./filepath-item.vue-dhjvbmak.js";import{A as p}from"./ocdy9hhm.js";import{q as f,O as r,a0 as n,F as s,ad as _,P as o,a7 as d,R as h,Q as k}from"./vendor/json-editor-vue-huf8dypo.js";const g={mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},x={"text-right":""},N={"ws-nowrap":""},B=f({__name:"StacktraceList",props:{stacktrace:{}},setup($){const i=p();function c(a){try{let t=new URL(a).pathname;return t.startsWith("/_nuxt/")&&(t=t.slice(6)),t.startsWith("/@id/virtual:nuxt:")?`#build/${t.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):t.includes("/@fs/")?`/${t.split("/@fs/")[1]}`:(i.value?.rootDir||"")+t}catch{return a}}return(a,t)=>{const l=m;return n(),r("div",g,[(n(!0),r(s,null,_(a.stacktrace,(e,u)=>(n(),r(s,{key:u},[o("div",x,d(e.functionName||"(anonymous)"),1),o("div",N,[e.fileName?(n(),h(l,{key:0,filepath:`${c(e.fileName)}:${e.lineNumber}:${e.columnNumber}`,subpath:""},null,8,["filepath"])):k("",!0)])],64))),128))])}}});export{B as _};
@@ -1 +0,0 @@
1
- import{a5 as E,H as B,r as f,E as _,_ as $,ap as V,Z as D,I as F,aa as I}from"./ocdy9hhm.js";import{x as P,a as R}from"./vendor/xterm-dbpzgj7s.js";import{q as y,k as g,D as M,O as d,a0 as t,F as A,P as c,a2 as N,R as m,Q as v,a7 as p,u as q,w as z,v as w,ad as L,a8 as C,W as h,ai as j,a1 as H}from"./vendor/json-editor-vue-huf8dypo.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";const O={border:"t base",flex:"~ gap-2","items-center":"",p2:""},Q={"text-sm":"",op50:""},S=y({__name:"TerminalView",props:{id:{}},setup(b){const n=b,i=g(),r=E(),o=g();let a;M(async()=>{a=new P.Terminal({convertEol:!0,cols:80,screenReaderMode:!0});const u=new R.FitAddon;a.loadAddon(u),a.open(i.value),u.fit(),B(window,"resize",()=>{u.fit()}),o.value=await f.getTerminalDetail(await _(),n.id),o.value?.buffer&&a.write(o.value.buffer),r.hook("devtools:terminal:data",({id:e,data:l})=>{e===n.id&&a.write(l)})});async function s(){f.runTerminalAction(await _(),n.id,"clear"),a?.clear()}async function k(){f.runTerminalAction(await _(),n.id,"restart")}async function x(){f.runTerminalAction(await _(),n.id,"terminate")}return(u,e)=>{const l=$;return t(),d(A,null,[c("div",{ref_key:"container",ref:i,"h-full":"","w-full":"","of-auto":"","bg-black":""},null,512),c("div",O,[N(l,{title:"Clear",icon:"i-carbon-clean",border:!1,onClick:e[0]||(e[0]=T=>s())}),o.value?.restartable?(t(),m(l,{key:0,title:"Restart",icon:"carbon-renew",border:!1,onClick:e[1]||(e[1]=T=>k())})):v("",!0),o.value?.terminatable?(t(),m(l,{key:1,title:"Terminate",icon:"carbon-delete",border:!1,onClick:e[2]||(e[2]=T=>x())})):v("",!0),c("span",Q,p(o.value?.description),1)])],64)}}}),W={key:0,"h-full":"","w-full":"","of-hidden":"",grid:"~ rows-[max-content_1fr_max-content]"},Z={flex:"~",border:"b base","flex-1":"","items-center":"","n-navbar-glass":""},G=["onClick"],J={key:1,p10:""},K={key:1,"h-full":"",flex:"","items-center":"","justify-center":""},U=y({__name:"TerminalPage",setup(b){const n=V(),i=D(),r=q(()=>n.value?.find(a=>a.id===i.value));async function o(a){f.runTerminalAction(await _(),a,"remove")}return z(()=>{!i.value&&n.value?.length&&(i.value=n.value[0].id)}),(a,s)=>{const k=F,x=$,u=S;return w(n)?.length?(t(),d("div",W,[c("div",Z,[(t(!0),d(A,null,L(w(n),e=>(t(),d("button",{key:e.id,border:"r base",flex:"~ gap-2","items-center":"",px3:"",py2:"",class:h(e.id===r.value?.id?"bg-active":""),onClick:l=>i.value=e.id},[e.icon?(t(),m(k,{key:0,icon:e.icon},null,8,["icon"])):v("",!0),c("span",{class:h(e.id===r.value?.id?"":"op50")},p(e.name)+p(e.isTerminated?" (terminated)":""),3),e.isTerminated?(t(),m(x,{key:1,icon:"carbon-close","mx--2":"",border:!1,onClick:j(l=>o(e.id),["stop"])},null,8,["onClick"])):v("",!0)],10,G))),128))]),r.value?(t(),m(u,{id:r.value.id,key:r.value.id},null,8,["id"])):(t(),d("div",J,[s[0]||(s[0]=C(" Terminal ")),c("code",null,p(w(i)),1),s[1]||(s[1]=C(" not found "))]))])):(t(),d("div",K,s[2]||(s[2]=[c("em",{op50:""},"No terminal attached",-1)])))}}}),ae=y({__name:"terminals",setup(b){return(n,i)=>{const r=U,o=I;return t(),m(o,null,{default:H(()=>[N(r)]),_:1})}}});export{ae as default};
@@ -1,31 +0,0 @@
1
- import{P as H,H as j,am as Y,b as U,a4 as q,a as Q,_ as O,V as X,f as K,an as Z,A as ee,aj as se,w as ne,i as oe,Q as te,r as R,J as ae}from"./ocdy9hhm.js";import{_ as M}from"./duration-display.vue-lb5nc1xj.js";import{g as W}from"./color-mt9xuhgy.js";import{q as B,u as w,O as i,a0 as t,U as T,P as o,a7 as m,v as g,F as f,ad as E,R as v,k as C,y as le,p as re,Q as x,a2 as u,W as z,X as P,a1 as h,as as ie,a3 as pe,a8 as F,aj as ce}from"./vendor/json-editor-vue-huf8dypo.js";import{_ as G}from"./nbadge-o5kc9sv8.js";import{_ as de}from"./composable-item.vue-b6mzxoba.js";import{_ as ue}from"./stacktrace-list.vue-dgji7gu0.js";import{_ as me}from"./ndrawer.vue-hy3weod1.js";import{_ as ke}from"./launch-page.vue-ly8wg6qx.js";import{_ as ye}from"./nlink.vue-kw0dg8qe.js";import{_ as fe}from"./code-diff.vue-buhgkcn1.js";import{_ as ve}from"./help-fab.vue-k9dgnqs9.js";import"./vendor/unocss-e7oqigho.js";import"./vendor/shiki-jv02kgzv.js";import"./nmarkdown.vue-io3ubke7.js";import"./client-bqg1k5yt.js";import"./filepath-item.vue-dhjvbmak.js";import"./index-jc4yj4to.js";import"./constants-b32h69zq.js";import"./ncode-block.vue-h2q9yyre.js";const he=B({__name:"TimelineItemFunction",props:{item:{}},setup(y){const d=y,p=w(()=>W(d.item.name,50,60,"_op_")),n=w(()=>p.value.replace(/_op_/,"1")),e=w(()=>W(d.item.name,50,40)),l=w(()=>p.value.replace(/_op_/,"0.2"));return(a,r)=>(t(),i("button",{class:"group",style:T({color:n.value,borderLeft:`2px solid ${n.value}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[o("div",{style:T({backgroundColor:l.value}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),o("div",{style:T({color:e.value,"--c":n.value}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},m(a.item.name),5)],4))}}),_e={relative:"","h-full":""},be={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ge=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(y,{emit:d}){const p=y,n=d,e=H(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,controls:!1,messages:{justNow:"",past:l=>l,future:l=>l,invalid:"-",second:l=>l?`${l}s`:"",minute:l=>`${l}m`,hour:l=>`${l}h`,week:l=>`${l}w`,day:l=>`${l}d`,month:l=>`${l}mo`,year:l=>`${l}y`}});return(l,a)=>{const r=he;return t(),i("div",_e,[o("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","text-green6":"","font-mono":"",onClick:a[0]||(a[0]=s=>l.segment.route?n("select",l.segment.route):void 0)},m(l.segment.route?.event.to),1),o("div",be,m(g(e))+" ago ",1),o("div",null,[(t(!0),i(f,null,E(l.segment.functions,(s,c)=>(t(),v(r,{key:c,item:s.event,style:T({position:"absolute",minWidth:`${s.relativeWidth*100}%`,maxWidth:`${s.relativeWidth*100}%`,top:`${4+s.layer*1.6}em`,left:`${s.relativeStart*100}%`}),onClick:k=>n("select",s)},null,8,["item","style","onClick"]))),128))])])}}}),xe=3e3,De=50;function Ae(y){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const n of y){const e=n.end||n.start;(n.start-p.end>xe||n.type==="route")&&(p={start:n.start,end:e,events:[],functions:[],duration:0},d.push(p)),p.events.push(n),p.end=e+De}return d.forEach((n,e)=>{const l=n.end-n.start,a=[];n.duration=l,n.previousGap=e>0?n.start-d[e-1].end:0,n.events.forEach(r=>{const s=r.end||r.start;let c=0;r.type!=="route"&&(c=a.findIndex(D=>D<=r.start),c===-1?(c=a.length,a.push(s+1e3)):a[c]=s+1e3);const k={event:r,segment:n,relativeStart:(r.start-n.start)/l,relativeWidth:(s-r.start)/l,layer:c};r.type==="function"?n.functions.push(k):n.route=k})}),d}const $e={relative:""},Ce={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":""},Be=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=y,n=d,e=C(),l=C(),a=C(),r=C(),s=C(!0),c=C(1.5),k=w(()=>Ae(p.data.events)),D=w(()=>(p.data.events.length,e.value?.scrollWidth||window.innerWidth));function A(){r.value&&(r.value.style.width=`${D.value}px`)}function S(){s.value&&e.value&&(e.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}),a.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}))}return le(()=>p.data.events.length,async()=>{await re(),A(),S()},{flush:"post"}),j(e,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),a.value.scrollLeft=e.value.scrollLeft,s.value=e.value.scrollLeft>=e.value.scrollWidth-e.value.clientWidth)}),j(a,"scroll",()=>{a.value.scrollLeft!==e.value.scrollLeft&&(A(),e.value.scrollLeft=a.value.scrollLeft)}),j(e,"wheel",_=>{_.altKey?(c.value=Y(c.value+_.deltaY/200,.5,3),A()):e.value.scrollLeft+=_.deltaY}),(_,L)=>{const $=M,V=ge;return t(),i(f,null,[o("div",$e,[o("div",{ref_key:"minimap",ref:l,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,b.duration/10)/D.value*100}%`})},[(t(!0),i(f,null,E(b.functions,(I,J)=>(t(),i("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:("getHslColorFromStringHash"in _?_.getHslColorFromStringHash:g(W))(I.event.name,50,60)})},null,4))),128)),b.route?(t(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${b.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),o("div",{ref_key:"minimapScroller",ref:a,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[o("div",{ref_key:"minimapScrollerInner",ref:r,"h-1px":""},null,512)],512)]),o("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),i(f,null,E(k.value,(b,N)=>(t(),i(f,{key:N},[b.previousGap&&b.previousGap>=200?(t(),i("div",Ce,[u($,{op50:"",duration:b.previousGap,color:!1},null,8,["duration"])])):x("",!0),u(V,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===k.value.length-1?"border-r border-base":""),segment:b,style:T({width:`${Math.max(50,b.duration/10)*c.value}px`}),onSelect:L[0]||(L[0]=I=>n("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}}),we=U(Be,[["__scopeId","data-v-a2053141"]]),Te={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Se=["onClick"],Ne={flex:"~","ml--1":"","font-mono":""},Fe={key:0,mr2:"",op30:""},Ee={op75:""},Le={flex:"~ col items-start"},Ie={"text-xs":"","font-mono":"",op30:""},Ve={"text-green":"","font-bold":"","font-mono":""},We=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(y,{emit:d}){const p=d;return(n,e)=>{const l=M;return t(),i("div",Te,[(t(!0),i(f,null,E(n.data.events,(a,r)=>(t(),i("button",{key:r,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:s=>p("select",a)},[a.type==="function"?(t(),i(f,{key:0},[e[2]||(e[2]=o("div",{"i-carbon-function":"",op50:""},null,-1)),o("div",{"font-mono":"",style:T({color:a.type==="function"?("getHslColorFromStringHash"in n?n.getHslColorFromStringHash:g(W))(a.name,50,60):""})},m(a.name),5),o("div",Ne,[e[0]||(e[0]=o("div",{op30:""}," ( ",-1)),(t(!0),i(f,null,E(a.args,(s,c)=>(t(),i(f,{key:c},[c?(t(),i("div",Fe," , ")):x("",!0),o("div",Ee,m(s===null?"null":s===void 0?"undefined":typeof s=="function"?"[function]":Array.isArray(s)?"[Array]":typeof s=="object"?"[object]":JSON.stringify(s)),1)],64))),128)),e[1]||(e[1]=o("div",{op30:""}," ) ",-1))])],64)):(t(),i(f,{key:1},[e[3]||(e[3]=o("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[o("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1)),o("div",Le,[o("div",Ie,m(a.from),1),o("div",Ve,m(a.to),1)])],64)),e[4]||(e[4]=o("div",{"flex-auto":""},null,-1)),a.end?(t(),v(l,{key:2,duration:a.end-a.start,color:a.type==="function"},null,8,["duration","color"])):x("",!0)],8,Se))),128)),e[5]||(e[5]=o("div",{"min-h-100":""},null,-1))])}}}),Me={key:0,"text-blue":""},je={key:1,"text-purple":""},He={key:2,"text-green":""},Oe={key:3,"text-gray":""},ze={key:4,"text-gray":""},Re={key:5,"text-gray":""},Pe={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ge={key:1},Je={p2:"","text-sm":"",border:"t base"},Ye=B({__name:"TimelineArgumentView",props:{value:{}},setup(y){const d=y,p=C(),n=C();function e(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(s){console.error(s),n.value=s}}const l=B({emits:["setup"],setup(s,{emit:c}){return c("setup"),()=>null}}),a=q(),r=Q();return(s,c)=>{const k=O,D=P("VMenu");return typeof s.value=="string"?(t(),i("div",Me,m(JSON.stringify(s.value)),1)):typeof s.value=="number"?(t(),i("div",je,m(s.value),1)):typeof s.value=="boolean"?(t(),i("div",He,m(s.value),1)):typeof s.value>"u"?(t(),i("div",Oe," undefined ")):typeof s.value=="function"?(t(),i("div",ze," [Function"+m(s.value.name?`: ${s.value.name}`:"")+"] ",1)):s.value===null?(t(),i("div",Re," null ")):(t(),v(D,{key:6,placement:"top"},{popper:h(()=>[u(g(l),{onSetup:e}),n.value?(t(),i("div",Pe," Failed to display object: "+m(n.value),1)):p.value?(t(),i("div",Ge,[u(g(ie),pe({"model-value":p.value},s.$attrs,{class:["json-editor-vue",[g(a)==="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"]),o("div",Je,[u(k,{title:"Copy to clipboard",icon:"carbon-copy",onClick:c[0]||(c[0]=A=>g(r)(JSON.stringify(p.value,null,2),"timeline-argument"))},{default:h(()=>c[1]||(c[1]=[F(" Copy ")])),_:1})])])):x("",!0)]),default:h(()=>[o("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(s.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},m(Array.isArray(s.value)?`[Array(${s.value.length})]`:"[Object]"),3)]),_:1}))}}}),Ue={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},qe={"mx--1":""},Qe={flex:"~ gap-1","font-mono":""},Xe={key:1},Ke={key:0,op30:""},Ze={flex:"~ gap-1","text-sm":""},es={class:"text-sm text-gray-400"},ss=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(y){const d=y,p=H(()=>d.record.start,{showSecond:!0}),n=X(),e=w(()=>n.value?.metadata),l=w(()=>n.value?.imports.find(a=>a.as===d.record.name));return(a,r)=>{const s=G,c=de,k=Ye,D=M,A=ue;return a.record?(t(),i("div",Ue,[o("div",qe,[u(s,{n:"yellow",textContent:"Function call"})]),o("div",Qe,[l.value?(t(),v(c,{key:0,item:l.value,metadata:e.value,counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),i("span",Xe,m(a.record.name),1)),r[0]||(r[0]=o("span",{ml1:"",op30:""},"(",-1)),(t(!0),i(f,null,E(a.record.args,(S,_)=>(t(),i(f,{key:_},[_?(t(),i("span",Ke,", ")):x("",!0),u(k,{value:S},null,8,["value"])],64))),128)),r[1]||(r[1]=o("span",{op30:""},")",-1))]),o("div",Ze,[a.record.end?(t(),v(D,{key:0,duration:a.record.end-a.record.start},null,8,["duration"])):x("",!0),r[2]||(r[2]=o("span",{mx1:"",op50:""},"·",-1)),o("div",es,m(g(p)),1)]),a.record.stacktrace?(t(),v(A,{key:0,stacktrace:a.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ns={key:0,"p-4":"",flex:"~ col gap-2"},os={"mx--1":""},ts={flex:"~ gap-1 items-center","font-mono":""},as={op50:""},ls={flex:"~ gap-1","text-sm":""},rs={class:"text-sm text-gray-400"},is=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(y){const d=y,p=H(()=>d.record.start,{showSecond:!0});return(n,e)=>{const l=G,a=M;return n.record?(t(),i("div",ns,[o("div",os,[u(l,{n:"green",textContent:"Route Change"})]),o("div",ts,[o("span",as,m(n.record.from),1),e[0]||(e[0]=o("span",{"i-carbon-arrow-right":"",op50:""},null,-1)),o("span",null,m(n.record.to),1)]),o("div",ls,[n.record.end?(t(),v(a,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),e[1]||(e[1]=o("span",{mx1:"",op50:""},"·",-1)),o("div",rs,m(g(p)),1)])])):x("",!0)}}}),ps={key:0,"h-screen":"","of-hidden":""},cs={"h-screen":"","w-full":"",flex:"","flex-col":""},ds={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},us={"text-sm":""},ms={"min-h-50":"",px3:"",py2:""},ks=B({__name:"TimelineView",setup(y){const d=K(),p=C("table"),n=C(),e=w(()=>d.value?.metrics.clientTimeline());function l(){e.value&&(e.value.events=[])}function a(){p.value=p.value==="table"?"list":"table"}return(r,s)=>{const c=P("VTooltip"),k=O,D=we,A=We,S=ss,_=is,L=me;return e.value?(t(),i("div",ps,[o("div",cs,[o("div",ds,[u(c,{flex:""},{popper:h(()=>[o("div",us,m(e.value.options.enabled?"Recording...":"Paused"),1)]),default:h(()=>[o("div",{"text-lg":"",class:z(e.value.options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),e.value.options.enabled?(t(),v(k,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:s[1]||(s[1]=$=>e.value.options.enabled=!1)},{default:h(()=>s[6]||(s[6]=[F(" Stop Tracking ")])),_:1})):(t(),v(k,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:s[0]||(s[0]=$=>e.value.options.enabled=!0)},{default:h(()=>s[5]||(s[5]=[F(" Start Tracking ")])),_:1})),s[7]||(s[7]=o("div",{"flex-auto":""},null,-1)),u(k,{icon:p.value==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:a},null,8,["icon"]),u(k,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:l})]),p.value==="table"?(t(),v(D,{key:0,data:{...e.value},onSelect:s[2]||(s[2]=$=>n.value=$.event)},null,8,["data"])):(t(),v(A,{key:1,data:{...e.value},onSelect:s[3]||(s[3]=$=>n.value=$)},null,8,["data"]))]),u(L,{"model-value":!!n.value,"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:s[4]||(s[4]=$=>n.value=void 0)},{default:h(()=>[o("div",ms,[n.value?.type==="function"?(t(),v(S,{key:0,record:n.value},null,8,["record"])):n.value?.type==="route"?(t(),v(_,{key:1,record:n.value},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),ys={class:"markdown-body"},fs={__name:"timeline",setup(y,{expose:d}){return d({frontmatter:{}}),(n,e)=>(t(),i("div",ys,e[0]||(e[0]=[o("h1",null,"Timeline",-1),o("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ",-1),ce(`<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
- <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;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#app/composables/router</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">&#39;</span></span>
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:#B5695977;--shiki-dark:#C98A7D77;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">&#39;</span></span>
4
- <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:#B5695977;--shiki-dark:#C98A7D77;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">&#39;</span></span>
5
- <span class="line"></span>
6
- <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
7
- <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
8
- <span class="line"></span>
9
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it&#39;s directly imported</span></span>
10
- <span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span></span>
11
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;">&lt;/</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#999999;--shiki-dark:#666666;">&gt;</span></span>
12
- <span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</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:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
13
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
14
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
15
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
16
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
17
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
18
- <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">&#39;</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
19
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
20
- <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
21
- <span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
22
- <span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =&gt;</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">&#39;</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
23
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
24
- <span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
25
- <span class="line"><span style="color:#B5695977;--shiki-dark:#C98A7D77;"> &#39;</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695977;--shiki-dark:#C98A7D77;">&#39;</span></span>
26
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
27
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
28
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
29
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
30
- <span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
31
- <span class="line"></span></code></pre>`,6)])))}},vs={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},hs={op50:""},_s={flex:"~ gap-3",mt2:"","justify-end":""},Hs=B({__name:"timeline",setup(y){const d=Z(),p=ee(),n=se(),e=ne();async function l(){try{const[a,r]=await R.enableTimeline(!0);if(!await n.start(a,r))return;await R.enableTimeline(!1)}catch{ae({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(a,r)=>{const s=ks,c=ke,k=oe,D=ye,A=fe,S=O,_=te,L=fs,$=ve;return t(),i(f,null,[g(d)?.timeline?.enabled?(t(),v(s,{key:0})):(t(),i(f,{key:1},[u(k,null,{default:h(()=>[u(c,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:l})]),_:1}),u(g(n),null,{default:h(({resolve:V,args:b})=>[u(_,{"model-value":!0,onClose:N=>V(!1)},{default:h(()=>[o("div",vs,[r[5]||(r[5]=o("h2",{"text-xl":""},[o("span",{capitalize:""},"Enable Timeline?")],-1)),o("p",hs,[r[1]||(r[1]=F(" Your ")),u(D,{role:"button",n:"primary",underline:"",onClick:r[0]||(r[0]=N=>g(e)(g(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),r[2]||(r[2]=F(" will be updated as: "))]),u(A,{from:b[0],to:b[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),r[6]||(r[6]=o("p",null,[o("span",{op50:""},"Then Nuxt will "),o("span",{"text-orange":""},"restart automatically"),F(". ")],-1)),o("div",_s,[u(S,{onClick:N=>V(!1)},{default:h(()=>r[3]||(r[3]=[F(" Cancel ")])),_:2},1032,["onClick"]),u(S,{n:"solid primary",capitalize:"",onClick:N=>V(!0)},{default:h(()=>r[4]||(r[4]=[F(" Enable ")])),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),u($,null,{default:h(()=>[u(L)]),_:1})],64)}}});export{Hs as default};