@nuxt/devtools-nightly 2.5.0-29150296.0217bec → 2.5.0-29155801.fd01e60

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 (65) hide show
  1. package/dist/chunks/module-main.mjs +1 -1
  2. package/dist/client/200.html +12 -12
  3. package/dist/client/404.html +12 -12
  4. package/dist/client/_nuxt/{analyze-build-mj90jvvz.js → analyze-build-fq8rq8er.js} +1 -1
  5. package/dist/client/_nuxt/{assets-hfrw9k1p.js → assets-lkjkk93b.js} +1 -1
  6. package/dist/client/_nuxt/builds/latest.json +1 -1
  7. package/dist/client/_nuxt/builds/meta/ee8629e0-d2b9-4b92-b704-d87de3f676d8.json +1 -0
  8. package/dist/client/_nuxt/{code-diff.vue-de058bco.js → code-diff.vue-j5ibvtag.js} +1 -1
  9. package/dist/client/_nuxt/{code-snippets.vue-ia2133e8.js → code-snippets.vue-dqmonoji.js} +1 -1
  10. package/dist/client/_nuxt/{components-bxunocj1.js → components-i0ymwspt.js} +1 -1
  11. package/dist/client/_nuxt/{composable-item.vue-defwhged.js → composable-item.vue-gz22y3dg.js} +1 -1
  12. package/dist/client/_nuxt/{custom-_name_-pfrkywc4.js → custom-_name_-ljdgifyg.js} +1 -1
  13. package/dist/client/_nuxt/{ocievbv5.js → damnmj71.js} +4 -4
  14. package/dist/client/_nuxt/{data-schema-button.vue-gqtf82pn.js → data-schema-button.vue-ihlmjbkh.js} +1 -1
  15. package/dist/client/_nuxt/{data-schema-drawer-cfuxtbaz.js → data-schema-drawer-fp7qw2v6.js} +1 -1
  16. package/dist/client/_nuxt/{debug-l2tpivfm.js → debug-fjz4z3m2.js} +1 -1
  17. package/dist/client/_nuxt/{default-g6a9endp.js → default-ktvo889f.js} +1 -1
  18. package/dist/client/_nuxt/{error-404-jru4x8nw.js → error-404-djxabaun.js} +1 -1
  19. package/dist/client/_nuxt/{error-500-dgz3keux.js → error-500-halln8cu.js} +1 -1
  20. package/dist/client/_nuxt/{error-mt4t0jax.js → error-n4dnclk5.js} +1 -1
  21. package/dist/client/_nuxt/{filepath-item.vue-fggir1j5.js → filepath-item.vue-lav6hquu.js} +1 -1
  22. package/dist/client/_nuxt/{full-cwdjbbnp.js → full-ljtvsgta.js} +1 -1
  23. package/dist/client/_nuxt/{help-fab.vue-ntole81s.js → help-fab.vue-bpbfz13b.js} +1 -1
  24. package/dist/client/_nuxt/{hooks-h3obmypt.js → hooks-gjuaw1jl.js} +1 -1
  25. package/dist/client/_nuxt/{imports-fbso960e.js → imports-ne7w8d7n.js} +1 -1
  26. package/dist/client/_nuxt/{index-il1az1q0.js → index-l8noi7n6.js} +1 -1
  27. package/dist/client/_nuxt/{launch-page.vue-f3n506pd.js → launch-page.vue-bz890afe.js} +1 -1
  28. package/dist/client/_nuxt/{modules-co1wrd93.js → modules-nn4kwpfg.js} +1 -1
  29. package/dist/client/_nuxt/{nbadge-ma2ue7lq.js → nbadge-kvv0e7r1.js} +1 -1
  30. package/dist/client/_nuxt/{ncheckbox.vue-nyvh368f.js → ncheckbox.vue-pdwjyitl.js} +1 -1
  31. package/dist/client/_nuxt/{ndrawer.vue-ejnk8ta8.js → ndrawer.vue-erpposo2.js} +1 -1
  32. package/dist/client/_nuxt/{ndropdown.vue-da4d02hh.js → ndropdown.vue-m6lfh1sc.js} +1 -1
  33. package/dist/client/_nuxt/{nlink.vue-n0g0dp2e.js → nlink.vue-eqji2qo6.js} +1 -1
  34. package/dist/client/_nuxt/{nnavbar.vue-d6itxqn2.js → nnavbar.vue-m70bacca.js} +1 -1
  35. package/dist/client/_nuxt/{none-bjhk3xmq.js → none-ig2aj07k.js} +1 -1
  36. package/dist/client/_nuxt/{nsection-block-n9iyw0gw.js → nsection-block-g7pxd8js.js} +1 -1
  37. package/dist/client/_nuxt/{nselect-tabs.vue-o9wx6n7a.js → nselect-tabs.vue-baiep0mn.js} +1 -1
  38. package/dist/client/_nuxt/{nselect.vue-kzbphh36.js → nselect.vue-lhyhzii8.js} +1 -1
  39. package/dist/client/_nuxt/{open-graph-bktpoo1j.js → open-graph-k94lp9f2.js} +1 -1
  40. package/dist/client/_nuxt/{overview-gqszhv8x.js → overview-bmsfd0ug.js} +1 -1
  41. package/dist/client/_nuxt/{pages-kxua4vrw.js → pages-jrjzkvbo.js} +1 -1
  42. package/dist/client/_nuxt/{payload-ifyq7511.js → payload-odslnlpf.js} +1 -1
  43. package/dist/client/_nuxt/{pinia-jdk5my0u.js → pinia-lqw8ecbs.js} +1 -1
  44. package/dist/client/_nuxt/{plugins-fqswts48.js → plugins-bcwgj7sx.js} +1 -1
  45. package/dist/client/_nuxt/{render-tree-cgxpdprc.js → render-tree-btdfiw4x.js} +1 -1
  46. package/dist/client/_nuxt/{runtime-configs-h0luzqr7.js → runtime-configs-lk5q900k.js} +1 -1
  47. package/dist/client/_nuxt/{server-discovery-bkz5i77k.js → server-discovery-gioran56.js} +1 -1
  48. package/dist/client/_nuxt/{server-route-inputs.vue-hjcqwnre.js → server-route-inputs.vue-kkqb96n7.js} +1 -1
  49. package/dist/client/_nuxt/{server-routes-t7si0o8b.js → server-routes-corhg8i6.js} +1 -1
  50. package/dist/client/_nuxt/{server-tasks-c7zcs878.js → server-tasks-b3nqrytp.js} +1 -1
  51. package/dist/client/_nuxt/{settings-mv3zt86n.js → settings-o63imnut.js} +1 -1
  52. package/dist/client/_nuxt/{stacktrace-list.vue-dteu2pt4.js → stacktrace-list.vue-sxkwmtj7.js} +1 -1
  53. package/dist/client/_nuxt/{state-components-kzycbz3a.js → state-components-mc6b5jdp.js} +1 -1
  54. package/dist/client/_nuxt/{state-editor.vue-fpqiayj0.js → state-editor.vue-mosn6mlx.js} +1 -1
  55. package/dist/client/_nuxt/{state-modules-iitf8009.js → state-modules-ipy98348.js} +1 -1
  56. package/dist/client/_nuxt/{storage-nsvjxnnk.js → storage-f5izn1zo.js} +1 -1
  57. package/dist/client/_nuxt/{terminals-oejux4k6.js → terminals-dgnws6ca.js} +1 -1
  58. package/dist/client/_nuxt/{timeline-lzn692ba.js → timeline-f3yqohaf.js} +1 -1
  59. package/dist/client/_nuxt/{virtual-files-c1fldlok.js → virtual-files-m2mrwnx3.js} +1 -1
  60. package/dist/client/_nuxt/{vue-devtools-inarn930.js → vue-devtools-ncogvszl.js} +1 -1
  61. package/dist/client/index.html +12 -12
  62. package/dist/module.json +1 -1
  63. package/dist/webcomponents/index.mjs +1 -1
  64. package/package.json +4 -4
  65. package/dist/client/_nuxt/builds/meta/ea04fff7-532a-454c-8323-dfb62f4f08e9.json +0 -1
@@ -1 +1 @@
1
- import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as $,h as q,ad as g,ae as _,af as G,q as H,ag as K,_ as U,i as J,j as W,E as Q}from"./ocievbv5.js";import{u as X,_ as Y}from"./state-modules-iitf8009.js";import{u as Z}from"./state-components-kzycbz3a.js";import{p as h,q as A,V as v,a3 as s,a4 as n,J as p,u as o,S as e,a5 as i,aa as a,U as u,F as f,ab as l}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./nbadge-ma2ue7lq.js";import"./ncode-block.vue-lge6rogf.js";import"./client-jlcyzfwz.js";import"./ncheckbox.vue-nyvh368f.js";const c="2.5.0-29150296.0217bec",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},Vt=h({__name:"overview",setup(gt){const k=M(),m=z(),D=Z(),b=E(),V=X(),j=O(),y=P(),B=F();function I(){W.value=!0,B.push("/")}const w=A(()=>k.value?.nuxt.vueApp.version),r=A(()=>k.value?.metrics.loading());function L(){Q()}return(S,t)=>{const R=q,x=$,C=Y,N=H,d=U,T=J;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:I},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(c)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1,__:[1]}),w.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(w.value),1)]),_:1,__:[2]})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(k)?(s(),v(x,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"page")),1)]),_:1,__:[3]})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1,__:[4]})):u("",!0),o(m)&&o(b)?(s(),v(x,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(b).imports.length,"import")),1)]),_:1,__:[5]})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(V).length,"module")),1)]),_:1,__:[6]})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1,__:[7]})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(_)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(_)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(_)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(_)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(G)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")])),_:1,__:[13]})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o(K))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ")])),_:1,__:[14]}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ")])),_:1,__:[15]})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1,__:[20]}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1,__:[21]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1,__:[23]}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1,__:[24]})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1,__:[28]}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1,__:[29]}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1,__:[30]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1,__:[33]}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1,__:[34]}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1,__:[35]})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{Vt as default};
1
+ import{f as M,A as z,V as E,ab as O,ac as P,a6 as F,e as $,h as q,ad as g,ae as _,af as G,q as H,ag as K,_ as U,i as J,j as W,E as Q}from"./damnmj71.js";import{u as X,_ as Y}from"./state-modules-ipy98348.js";import{u as Z}from"./state-components-mc6b5jdp.js";import{p as h,q as A,V as v,a3 as s,a4 as n,J as p,u as o,S as e,a5 as i,aa as a,U as u,F as f,ab as l}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./nbadge-kvv0e7r1.js";import"./ncode-block.vue-lge6rogf.js";import"./client-jlcyzfwz.js";import"./ncheckbox.vue-pdwjyitl.js";const c="2.5.0-29155801.fd01e60",tt={key:0},et={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p5:"",px5:"","md:px20":""},ot={flex:"~ col","mt-5":"","items-center":"","md:mt-20":""},nt={op40:""},st={flex:"~ gap2 wrap"},lt={key:5,"pointer-events-none":"","min-w-40":"",p4:"","theme-card-lime":"",flex:"~ auto gap-6"},it={grid:"~ cols-[auto_auto] gap-x-5 items-center"},ut={"text-right":""},rt={"text-right":""},at={"text-right":""},dt={"text-right":""},pt={flex:"~ col gap2"},mt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},xt={flex:"col gap-2",mxa:"",hidden:"","w-100":"","text-sm":"",op50:"","md:flex":""},vt={flex:"~ gap-1","items-center":""},ft={flex:"~ gap-1","items-center":""},Vt=h({__name:"overview",setup(gt){const k=M(),m=z(),D=Z(),b=E(),V=X(),j=O(),y=P(),B=F();function I(){W.value=!0,B.push("/")}const w=A(()=>k.value?.nuxt.vueApp.version),r=A(()=>k.value?.metrics.loading());function L(){Q()}return(S,t)=>{const R=q,x=$,C=Y,N=H,d=U,T=J;return s(),v(T,{"h-screen":"","w-full":"",flex:""},{default:n(()=>[o(m)?(s(),p("div",et,[t[40]||(t[40]=e("div",{"flex-auto":""},null,-1)),e("div",ot,[i(x,{flex:"~","mt--10":"","items-center":"","justify-center":"",to:"https://devtools.nuxt.com/",target:"_blank"},{default:n(()=>[i(R,{"h-10":""})]),_:1}),e("button",{mb6:"",mt3:"","text-center":"","text-sm":"",flex:"~ gap-1 wrap",onClick:I},[t[0]||(t[0]=e("span",{op40:""}," Nuxt DevTools ",-1)),e("code",nt,"v"+a(o(c)),1),i(C,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),e("div",st,[i(x,{to:"https://nuxt.com",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[1]||(t[1]=e("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1)),i(C,{"package-name":"nuxt",options:{dev:!0}})]),_:1,__:[1]}),w.value?(s(),v(x,{key:0,to:"https://vuejs.org",target:"_blank",p4:"","theme-card-green":"",flex:"~ col auto"},{default:n(()=>[t[2]||(t[2]=e("div",{"logos-vue":"","text-3xl":""},null,-1)),e("code",null,"v"+a(w.value),1)]),_:1,__:[2]})):u("",!0),o(m)?(s(),p(f,{key:1},[o(m)&&o(m).pages&&o(k)?(s(),v(x,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:n(()=>[t[3]||(t[3]=e("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(j).length,"page")),1)]),_:1,__:[3]})):u("",!0),o(m)?(s(),v(x,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:n(()=>[t[4]||(t[4]=e("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(D).length,"component")),1)]),_:1,__:[4]})):u("",!0),o(m)&&o(b)?(s(),v(x,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:n(()=>[t[5]||(t[5]=e("div",{"carbon-function":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(b).imports.length,"import")),1)]),_:1,__:[5]})):u("",!0),o(m)?(s(),v(x,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:n(()=>[t[6]||(t[6]=e("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(V).length,"module")),1)]),_:1,__:[6]})):u("",!0),o(m)?(s(),v(x,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:n(()=>[t[7]||(t[7]=e("div",{"carbon-plug":"","text-3xl":""},null,-1)),e("div",null,a(o(g)(o(m).plugins.length,"plugin")),1)]),_:1,__:[7]})):u("",!0),r.value?(s(),p("div",lt,[t[12]||(t[12]=e("div",{"i-carbon-time-plot":"","flex-none":"","text-3xl":""},null,-1)),e("div",it,[r.value.ssrStart?(s(),p(f,{key:0},[t[8]||(t[8]=e("div",{"text-sm":""}," SSR to full load ",-1)),e("div",ut,a(o(_)(r.value.appLoad-r.value.ssrStart)),1)],64)):u("",!0),t[10]||(t[10]=e("div",{"text-sm":""}," Page load ",-1)),e("div",rt,a(o(_)(r.value.appLoad-r.value.appInit)),1),t[11]||(t[11]=e("div",{"text-sm":""}," Navigation ",-1)),e("div",at,a(o(_)(r.value.pageEnd-r.value.pageStart)),1),r.value.hmrStart?(s(),p(f,{key:1},[t[9]||(t[9]=e("div",{"text-sm":""}," HMR ",-1)),e("div",dt,a(o(_)(r.value.hmrEnd-r.value.hmrStart)),1)],64)):u("",!0)])])):u("",!0)],64)):u("",!0)]),e("div",pt,[o(G)?(s(),v(N,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:n(()=>t[13]||(t[13]=[l(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")])),_:1,__:[13]})):u("",!0),e("button",{title:"Authorize",onClick:L},[("isDevAuthed"in S?S.isDevAuthed:o(K))?u("",!0):(s(),v(N,{key:0,n:"orange5",icon:"i-carbon-locked","justify-center":""},{default:n(()=>t[14]||(t[14]=[l(" Access from an untrusted browser, some features are limited. Click to authorize now. ")])),_:1,__:[14]}))])]),e("div",mt,[t[16]||(t[16]=e("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[e("div",{"i-carbon-star":""}),l(" Star on GitHub ")],-1)),t[17]||(t[17]=e("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[e("div",{"i-carbon-data-enrichment":""}),l(" Ideas & Suggestions ")],-1)),t[18]||(t[18]=e("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[e("div",{"i-carbon-plan":""}),l(" Project Roadmap ")],-1)),t[19]||(t[19]=e("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[e("div",{"i-carbon-debug":""}),l(" Bug Reports ")],-1)),i(x,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:n(()=>t[15]||(t[15]=[e("div",{"i-carbon-settings-adjust":""},null,-1),l(" Settings ")])),_:1,__:[15]})]),t[41]||(t[41]=e("div",{"flex-auto":""},null,-1)),e("div",xt,[e("div",vt,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[20]||(t[20]=[l(" ⌘ Cmd ")])),_:1,__:[20]}),t[22]||(t[22]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[21]||(t[21]=[l(" K ")])),_:1,__:[21]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[23]||(t[23]=[l(" Ctrl ")])),_:1,__:[23]}),t[25]||(t[25]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[24]||(t[24]=[l(" K ")])),_:1,__:[24]})],64)),t[26]||(t[26]=e("div",{"flex-auto":""},null,-1)),t[27]||(t[27]=l(" Open Command Palette "))]),e("div",ft,[o(y)?(s(),p(f,{key:0},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[28]||(t[28]=[l(" ⇧ Shift ")])),_:1,__:[28]}),t[31]||(t[31]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[29]||(t[29]=[l(" ⌥ Option ")])),_:1,__:[29]}),t[32]||(t[32]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[30]||(t[30]=[l(" D ")])),_:1,__:[30]})],64)):(s(),p(f,{key:1},[i(d,{n:"xs",class:"px2"},{default:n(()=>t[33]||(t[33]=[l(" Shift ")])),_:1,__:[33]}),t[36]||(t[36]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[34]||(t[34]=[l(" Alt ")])),_:1,__:[34]}),t[37]||(t[37]=e("span",null,"+",-1)),i(d,{n:"xs",class:"px2"},{default:n(()=>t[35]||(t[35]=[l(" D ")])),_:1,__:[35]})],64)),t[38]||(t[38]=e("div",{"flex-auto":""},null,-1)),t[39]||(t[39]=e("div",null,"Toggle DevTools",-1))])])])):(s(),p("div",tt," Loading... "))]),_:1})}}});export{Vt as default};
@@ -1 +1 @@
1
- import{v as S,_ as H,w as J,x as F,a as Y,y as Z,z as G,A as Q,B as X,C as ee,D as te,r as oe,E as ne}from"./ocievbv5.js";import{_ as j}from"./nbadge-ma2ue7lq.js";import{p as L,k as A,q as x,$ as ae,J as a,V as k,a3 as t,S as e,aa as C,a4 as $,F as g,ag as I,Z as M,al as se,U as N,a5 as _,ab as E,u as c,E as re,Y as le}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as z}from"./filepath-item.vue-fggir1j5.js";import{_ as ue}from"./nsection-block-n9iyw0gw.js";import{_ as ie}from"./launch-page.vue-f3n506pd.js";import{_ as pe}from"./help-fab.vue-ntole81s.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./nicon-title.vue-d27ih16g.js";import"./nmarkdown.vue-isat7p33.js";import"./client-jlcyzfwz.js";const de={block:"","cursor-pointer":""},ce={p2:""},me=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},_e=L({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(P,{emit:i}){const v=P,R=i,m=A([]),f=x(()=>{const r=w(v.route.path);return m.value=Array.from({length:r.length},()=>""),r});function w(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const y=x(()=>f.value.map((r,d)=>r[0]===":"?m.value[d]:r).join("").replace(/\/+/g,"/")),o=x(()=>v.route.path.includes(":"));function s(){R("navigate",y.value)}return(r,d)=>{const h=S,n=H,l=ae("VDropdown");return o.value?(t(),k(l,{key:1},{popper:$(({hide:b})=>[e("div",ce,[e("form",{flex:"~ col",onSubmit:se(()=>{s(),b()},["prevent"])},[o.value?(t(),a(g,{key:0},[d[0]||(d[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),a(g,null,I(f.value,(u,p)=>(t(),a(g,{key:p},[u[0]===":"?(t(),k(h,{key:0,modelValue:m.value[p],"onUpdate:modelValue":B=>m.value[p]=B,"w-20":"","n-sm":"",placeholder:u.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),a("span",he,C(u),1))],64))),128))])],64)):N("",!0),_(n,{type:"submit",block:"",n:"primary"},{default:$(()=>d[1]||(d[1]=[E(" Navigate ")])),_:1,__:[1]})],40,me)])]),default:$(()=>[e("code",de,[(t(!0),a(g,null,I(f.value,(b,u)=>(t(),a("span",{key:u,class:M(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},C(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),a("button",{key:0,onClick:s},[e("code",null,C(r.route.path),1)]))}}}),fe={"max-w-full":"","of-auto":""},ge={"w-full":""},ye={"w-20":"","pr-1":""},be={flex:"","items-center":"","justify-end":""},xe={"text-sm":""},ke={flex:"inline gap3","items-center":""},we={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},$e=["onClick"],Ce=["onClick"],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ee=["onClick"],Ie=L({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const i=P,v=J(),R=F(),m=Y(),f=x(()=>[...i.pages].sort((o,s)=>o.path.localeCompare(s.path)));function w(o){const s=i.layouts.find(r=>r.name===o);s&&v(s.file)}function y(o){if(typeof o=="string")return R.value?.middleware.find(s=>s.name===o)?.path}return(o,s)=>{const r=j,d=_e,h=z;return t(),a("div",fe,[e("table",ge,[s[4]||(s[4]=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1)),e("tbody",null,[(t(!0),a(g,null,I(f.value,n=>(t(),a("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ye,[e("div",be,[o.matched.find(l=>l.name===n.name)?(t(),k(r,{key:0,n:"green",title:"active",textContent:"active"})):o.matchedPending.find(l=>l.name===n.name)?(t(),k(r,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",xe,[e("div",ke,[_(d,{route:n,class:M(o.matched.find(l=>l.name===n.name)?"text-primary":o.matchedPending.find(l=>l.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=l=>o.$emit("navigate",l))},null,8,["route","class"]),e("div",we,[n.file||n.meta?.file?(t(),a("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>c(v)(n.file||n.meta?.file)},s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)]),8,$e)):N("",!0),n.file||n.meta?.file?(t(),a("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:l=>c(m)(n.file||n.meta?.file)},s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)]),8,Ce)):N("",!0)])])]),e("td",Ne,C(n.name),1),e("td",Re,[_(h,{filepath:y(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ve,[n.meta.layout===!1?(t(),a("span",Pe,"-")):n.meta.layout?(t(),a("button",{key:1,onClick:l=>w(n.meta.layout)},C(n.meta.layout),9,Ee)):(t(),a("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=l=>w("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te={__name:"pages",setup(P,{expose:i}){return i({frontmatter:{}}),(R,m)=>(t(),a("div",Be,m[0]||(m[0]=[e("h1",null,"Pages",-1),e("p",null,[E("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),E(" directory.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),e("hr",null,null,-1),e("h1",null,"Middlewares",-1),e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Ae={key:0,"h-full":"","of-auto":""},Le={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Me={"font-mono":""},De={key:1,op50:""},Se={key:0,"text-orange":"",op75:""},Fe={key:1,op50:""},je={"min-h-14":""},ze={key:1,class:"py-4 text-center"},Ue={"w-full":""},Ke={mr1:""},ot=L({__name:"pages",setup(P){const i=Z(),v=G(),R=Q(),m=F(),f=X(),w=ee(),y=x(()=>m.value?.middleware||[]),o=A(""),s=A(0),r=x(()=>(y.value,o.value,f.value,s.value,i.value?.currentRoute?.value?.path));re(()=>{v.value&&(o.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(u=>{o.value=u.fullPath}),i.value?.afterEach(u=>{o.value=u.fullPath})});async function d(){o.value!==i.value?.currentRoute?.value?.path&&i.value.push(o.value||"/")}const h=x(()=>i.value.resolve(o.value||"/").matched);function n(u){i.value.push(u),o.value=u}const l=te(),b=x(()=>`./${l===4?"app/":""}pages/index.vue`);return(u,p)=>{const B=S,D=Ie,T=ue,U=j,K=z,O=ie,W=Te,q=pe;return t(),a(g,null,[c(R)?.pages&&c(i)?(t(),a("div",Ae,[e("div",Le,[e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[1]||(p[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",Me,C(r.value),1),p[2]||(p[2]=e("span",{op50:""}," to ",-1))],64)):(t(),a("span",De,"Current route"))]),_(B,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=V=>o.value=V),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(r.value===o.value?"":h.value.length?"text-green":"text-orange"),onKeydown:le(d,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[3]||(p[3]=e("span",null,[E("Press "),e("b",{"font-bold":""},"Enter"),E(" to navigate")],-1)),h.value.length?N("",!0):(t(),a("span",Se," (no match)"))],64)):(t(),a("span",Fe,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:$(()=>[e("div",je,[h.value.length?(t(),k(D,{key:0,pages:h.value,layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),a("div",ze,p[4]||(p[4]=[e("span",{op50:""},"No routes matched",-1)])))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c(w).length} routes registered in your application`,padding:"pr5"},{default:$(()=>[_(D,{pages:c(w),layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),y.value.length?(t(),k(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${y.value.length} middleware registered in your application`,padding:"px13"},{default:$(()=>[e("table",Ue,[p[5]||(p[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),a(g,null,I(y.value,V=>(t(),a("tr",{key:V.path,"h-7":""},[e("td",null,[e("span",Ke,C(V.name),1),V.global?(t(),k(U,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(K,{filepath:V.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(t(),k(O,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:`Create ${b.value} to enable routing`,actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in u?u.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in u?u.ensureDevAuthToken:c(ne))(),"enablePages")}}]},null,8,["description","actions"])),_(q,null,{default:$(()=>[_(W)]),_:1})],64)}}});export{ot as default};
1
+ import{v as S,_ as H,w as J,x as F,a as Y,y as Z,z as G,A as Q,B as X,C as ee,D as te,r as oe,E as ne}from"./damnmj71.js";import{_ as j}from"./nbadge-kvv0e7r1.js";import{p as L,k as A,q as x,$ as ae,J as a,V as k,a3 as t,S as e,aa as C,a4 as $,F as g,ag as I,Z as M,al as se,U as N,a5 as _,ab as E,u as c,E as re,Y as le}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as z}from"./filepath-item.vue-lav6hquu.js";import{_ as ue}from"./nsection-block-g7pxd8js.js";import{_ as ie}from"./launch-page.vue-bz890afe.js";import{_ as pe}from"./help-fab.vue-bpbfz13b.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./nicon-title.vue-d27ih16g.js";import"./nmarkdown.vue-isat7p33.js";import"./client-jlcyzfwz.js";const de={block:"","cursor-pointer":""},ce={p2:""},me=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},_e=L({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(P,{emit:i}){const v=P,R=i,m=A([]),f=x(()=>{const r=w(v.route.path);return m.value=Array.from({length:r.length},()=>""),r});function w(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(d=>d[0]===":"?d.replace(/\(\)$/,"?"):d)}const y=x(()=>f.value.map((r,d)=>r[0]===":"?m.value[d]:r).join("").replace(/\/+/g,"/")),o=x(()=>v.route.path.includes(":"));function s(){R("navigate",y.value)}return(r,d)=>{const h=S,n=H,l=ae("VDropdown");return o.value?(t(),k(l,{key:1},{popper:$(({hide:b})=>[e("div",ce,[e("form",{flex:"~ col",onSubmit:se(()=>{s(),b()},["prevent"])},[o.value?(t(),a(g,{key:0},[d[0]||(d[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),a(g,null,I(f.value,(u,p)=>(t(),a(g,{key:p},[u[0]===":"?(t(),k(h,{key:0,modelValue:m.value[p],"onUpdate:modelValue":B=>m.value[p]=B,"w-20":"","n-sm":"",placeholder:u.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),a("span",he,C(u),1))],64))),128))])],64)):N("",!0),_(n,{type:"submit",block:"",n:"primary"},{default:$(()=>d[1]||(d[1]=[E(" Navigate ")])),_:1,__:[1]})],40,me)])]),default:$(()=>[e("code",de,[(t(!0),a(g,null,I(f.value,(b,u)=>(t(),a("span",{key:u,class:M(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},C(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),a("button",{key:0,onClick:s},[e("code",null,C(r.route.path),1)]))}}}),fe={"max-w-full":"","of-auto":""},ge={"w-full":""},ye={"w-20":"","pr-1":""},be={flex:"","items-center":"","justify-end":""},xe={"text-sm":""},ke={flex:"inline gap3","items-center":""},we={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},$e=["onClick"],Ce=["onClick"],Ne={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Re={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Pe={key:0},Ee=["onClick"],Ie=L({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(P){const i=P,v=J(),R=F(),m=Y(),f=x(()=>[...i.pages].sort((o,s)=>o.path.localeCompare(s.path)));function w(o){const s=i.layouts.find(r=>r.name===o);s&&v(s.file)}function y(o){if(typeof o=="string")return R.value?.middleware.find(s=>s.name===o)?.path}return(o,s)=>{const r=j,d=_e,h=z;return t(),a("div",fe,[e("table",ge,[s[4]||(s[4]=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1)),e("tbody",null,[(t(!0),a(g,null,I(f.value,n=>(t(),a("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",ye,[e("div",be,[o.matched.find(l=>l.name===n.name)?(t(),k(r,{key:0,n:"green",title:"active",textContent:"active"})):o.matchedPending.find(l=>l.name===n.name)?(t(),k(r,{key:1,n:"teal",title:"next",textContent:"next"})):N("",!0)])]),e("td",xe,[e("div",ke,[_(d,{route:n,class:M(o.matched.find(l=>l.name===n.name)?"text-primary":o.matchedPending.find(l=>l.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=l=>o.$emit("navigate",l))},null,8,["route","class"]),e("div",we,[n.file||n.meta?.file?(t(),a("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:l=>c(v)(n.file||n.meta?.file)},s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)]),8,$e)):N("",!0),n.file||n.meta?.file?(t(),a("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:l=>c(m)(n.file||n.meta?.file)},s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)]),8,Ce)):N("",!0)])])]),e("td",Ne,C(n.name),1),e("td",Re,[_(h,{filepath:y(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ve,[n.meta.layout===!1?(t(),a("span",Pe,"-")):n.meta.layout?(t(),a("button",{key:1,onClick:l=>w(n.meta.layout)},C(n.meta.layout),9,Ee)):(t(),a("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=l=>w("default"))}," (default) "))])]))),128))])])])}}}),Be={class:"markdown-body"},Te={__name:"pages",setup(P,{expose:i}){return i({frontmatter:{}}),(R,m)=>(t(),a("div",Be,m[0]||(m[0]=[e("h1",null,"Pages",-1),e("p",null,[E("Nuxt provides a file-based routing to create routes within your web application using Vue Router under the hood. Pages are Vue components and can have any valid extension that Nuxt supports (by default .vue, .js, .jsx, .mjs, .ts or .tsx). Nuxt will automatically create a route for every page in your "),e("code",null,"~/pages/"),E(" directory.")],-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),e("hr",null,null,-1),e("h1",null,"Middlewares",-1),e("p",null,"Nuxt provides a customizable route middleware framework that can be used throughout the application. This is ideal for extracting code that needs to run before navigating to a particular route.",-1),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},Ae={key:0,"h-full":"","of-auto":""},Le={border:"b base",flex:"~ col gap1",px4:"",py3:"","n-navbar-glass":""},Me={"font-mono":""},De={key:1,op50:""},Se={key:0,"text-orange":"",op75:""},Fe={key:1,op50:""},je={"min-h-14":""},ze={key:1,class:"py-4 text-center"},Ue={"w-full":""},Ke={mr1:""},ot=L({__name:"pages",setup(P){const i=Z(),v=G(),R=Q(),m=F(),f=X(),w=ee(),y=x(()=>m.value?.middleware||[]),o=A(""),s=A(0),r=x(()=>(y.value,o.value,f.value,s.value,i.value?.currentRoute?.value?.path));re(()=>{v.value&&(o.value=i.value?.currentRoute?.value?.path),i.value?.beforeEach(u=>{o.value=u.fullPath}),i.value?.afterEach(u=>{o.value=u.fullPath})});async function d(){o.value!==i.value?.currentRoute?.value?.path&&i.value.push(o.value||"/")}const h=x(()=>i.value.resolve(o.value||"/").matched);function n(u){i.value.push(u),o.value=u}const l=te(),b=x(()=>`./${l===4?"app/":""}pages/index.vue`);return(u,p)=>{const B=S,D=Ie,T=ue,U=j,K=z,O=ie,W=Te,q=pe;return t(),a(g,null,[c(R)?.pages&&c(i)?(t(),a("div",Ae,[e("div",Le,[e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[1]||(p[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",Me,C(r.value),1),p[2]||(p[2]=e("span",{op50:""}," to ",-1))],64)):(t(),a("span",De,"Current route"))]),_(B,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=V=>o.value=V),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:M(r.value===o.value?"":h.value.length?"text-green":"text-orange"),onKeydown:le(d,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==o.value?(t(),a(g,{key:0},[p[3]||(p[3]=e("span",null,[E("Press "),e("b",{"font-bold":""},"Enter"),E(" to navigate")],-1)),h.value.length?N("",!0):(t(),a("span",Se," (no match)"))],64)):(t(),a("span",Fe,"Edit path above to navigate"))])]),_(T,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:$(()=>[e("div",je,[h.value.length?(t(),k(D,{key:0,pages:h.value,layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),a("div",ze,p[4]||(p[4]=[e("span",{op50:""},"No routes matched",-1)])))])]),_:1}),_(T,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c(w).length} routes registered in your application`,padding:"pr5"},{default:$(()=>[_(D,{pages:c(w),layouts:c(f)||[],matched:c(v).matched,"matched-pending":h.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),y.value.length?(t(),k(T,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${y.value.length} middleware registered in your application`,padding:"px13"},{default:$(()=>[e("table",Ue,[p[5]||(p[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),a(g,null,I(y.value,V=>(t(),a("tr",{key:V.path,"h-7":""},[e("td",null,[e("span",Ke,C(V.name),1),V.global?(t(),k(U,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):N("",!0)]),e("td",null,[_(K,{filepath:V.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):N("",!0)])):(t(),k(O,{key:1,icon:"carbon-tree-view-alt",name:"wizard-pages",title:"Nuxt Routing",description:`Create ${b.value} to enable routing`,actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",async handle(){return("rpc"in u?u.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in u?u.ensureDevAuthToken:c(ne))(),"enablePages")}}]},null,8,["description","actions"])),_(q,null,{default:$(()=>[_(W)]),_:1})],64)}}});export{ot as default};
@@ -1 +1 @@
1
- import{_ as k}from"./state-editor.vue-fpqiayj0.js";import{p as x,J as i,a3 as e,F as $,ag as N,V as d,a4 as a,W as B,a6 as V,S as b,q as h,ai as w,U as _,a5 as o,u as F,ac as O,ab as E}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as P}from"./nsection-block-n9iyw0gw.js";import{f as R,_ as j}from"./ocievbv5.js";import{_ as A}from"./help-fab.vue-ntole81s.js";import"./data-schema-button.vue-gqtf82pn.js";import"./nicon-title.vue-d27ih16g.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=x({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(f){return(t,n)=>{const c=k;return e(),i("div",null,[t.state&&Object.keys(t.state).length>0?(e(),i("div",G,[(e(!0),i($,null,N(t.state,(s,r)=>(e(),d(c,{key:r,revision:t.revision,state:s,name:r.startsWith(t.prefix)?r.slice(t.prefix.length):r},{actions:a(l=>[B(t.$slots,"actions",V({ref_for:!0},l))]),_:2},1032,["revision","state","name"]))),128))])):(e(),i("div",H," No data "))])}}}),T={class:"markdown-body"},W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(c,s)=>(e(),i("div",T,s[0]||(s[0]=[b("h1",null,"State & Async Data",-1),b("p",null,"// TODO",-1)])))}},q={key:0},tt=x({__name:"payload",setup(f){const t=R(),n=h(()=>t.value?.nuxt.payload),c=h(()=>t.value?.revision.value);async function s(r){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",r)}return(r,l)=>{const m=K,p=P,v=j,S=k,g=W,D=A,C=w("tooltip");return e(),i($,null,[F(t)?(e(),i("div",q,[o(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(m,{state:n.value.state,revision:c.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),o(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(v,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:l[0]||(l[0]=y=>s())},{default:a(()=>l[1]||(l[1]=[E(" Re-fetch all data ")])),_:1,__:[1]})]),default:a(()=>[o(m,{state:n.value.data,revision:c.value},{actions:a(({isOpen:y,name:u})=>[y&&u?O((e(),d(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",border:!1,onClick:J=>s([u])},null,8,["title","onClick"])),[[C,`Re-fetch '${u}'`,void 0,{bottom:!0}]]):_("",!0)]),_:1},8,["state","revision"])]),_:1}),n.value.functions&&Object.keys(n.value.functions).length?(e(),d(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(S,{"ml--6":"",state:n.value.functions,revision:c.value},null,8,["state","revision"])]),_:1})):_("",!0)])):_("",!0),o(D,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{tt as default};
1
+ import{_ as k}from"./state-editor.vue-mosn6mlx.js";import{p as x,J as i,a3 as e,F as $,ag as N,V as d,a4 as a,W as B,a6 as V,S as b,q as h,ai as w,U as _,a5 as o,u as F,ac as O,ab as E}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as P}from"./nsection-block-g7pxd8js.js";import{f as R,_ as j}from"./damnmj71.js";import{_ as A}from"./help-fab.vue-bpbfz13b.js";import"./data-schema-button.vue-ihlmjbkh.js";import"./nicon-title.vue-d27ih16g.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";const G={key:0,flex:"~ col gap-1"},H={key:1,mt2:"",px4:"",italic:"",op35:""},K=x({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(f){return(t,n)=>{const c=k;return e(),i("div",null,[t.state&&Object.keys(t.state).length>0?(e(),i("div",G,[(e(!0),i($,null,N(t.state,(s,r)=>(e(),d(c,{key:r,revision:t.revision,state:s,name:r.startsWith(t.prefix)?r.slice(t.prefix.length):r},{actions:a(l=>[B(t.$slots,"actions",V({ref_for:!0},l))]),_:2},1032,["revision","state","name"]))),128))])):(e(),i("div",H," No data "))])}}}),T={class:"markdown-body"},W={__name:"payload",setup(f,{expose:t}){return t({frontmatter:{}}),(c,s)=>(e(),i("div",T,s[0]||(s[0]=[b("h1",null,"State & Async Data",-1),b("p",null,"// TODO",-1)])))}},q={key:0},tt=x({__name:"payload",setup(f){const t=R(),n=h(()=>t.value?.nuxt.payload),c=h(()=>t.value?.revision.value);async function s(r){await t.value?.nuxt.hooks.callHookParallel("app:data:refresh",r)}return(r,l)=>{const m=K,p=P,v=j,S=k,g=W,D=A,C=w("tooltip");return e(),i($,null,[F(t)?(e(),i("div",q,[o(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[o(m,{state:n.value.state,revision:c.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),o(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[o(v,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:l[0]||(l[0]=y=>s())},{default:a(()=>l[1]||(l[1]=[E(" Re-fetch all data ")])),_:1,__:[1]})]),default:a(()=>[o(m,{state:n.value.data,revision:c.value},{actions:a(({isOpen:y,name:u})=>[y&&u?O((e(),d(v,{key:0,title:`Re-fetch '${u}'`,icon:"carbon-recycle",border:!1,onClick:J=>s([u])},null,8,["title","onClick"])),[[C,`Re-fetch '${u}'`,void 0,{bottom:!0}]]):_("",!0)]),_:1},8,["state","revision"])]),_:1}),n.value.functions&&Object.keys(n.value.functions).length?(e(),d(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[o(S,{"ml--6":"",state:n.value.functions,revision:c.value},null,8,["state","revision"])]),_:1})):_("",!0)])):_("",!0),o(D,null,{default:a(()=>[o(g)]),_:1})],64)}}});export{tt as default};
@@ -1 +1 @@
1
- import{F as r}from"./ocievbv5.js";import{u as m,m as _}from"./vue-devtools-inarn930.js";import{p as c,J as p,a3 as e,V as o,u as n,a4 as i,ab as u}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./vue-virtual-scroller.esm-nuoya9vo.js";const l={class:"h-full w-full"},h=c({__name:"pinia",setup(f){const{connected:a}=m();return(d,t)=>{const s=r;return e(),p("div",l,[n(a)?(e(),o(n(_),{key:0})):(e(),o(s,{key:1},{default:i(()=>t[0]||(t[0]=[u(" Connecting.... ")])),_:1,__:[0]}))])}}});export{h as default};
1
+ import{F as r}from"./damnmj71.js";import{u as m,m as _}from"./vue-devtools-ncogvszl.js";import{p as c,J as p,a3 as e,V as o,u as n,a4 as i,ab as u}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./vue-virtual-scroller.esm-nuoya9vo.js";const l={class:"h-full w-full"},h=c({__name:"pinia",setup(f){const{connected:a}=m();return(d,t)=>{const s=r;return e(),p("div",l,[n(a)?(e(),o(n(_),{key:0})):(e(),o(s,{key:1},{default:i(()=>t[0]||(t[0]=[u(" Connecting.... ")])),_:1,__:[0]}))])}}});export{h as default};
@@ -1 +1 @@
1
- import{_ as T}from"./nbadge-ma2ue7lq.js";import{_ as w}from"./filepath-item.vue-fggir1j5.js";import{_ as k}from"./duration-display.vue-l7hutejt.js";import{A as D,a3 as B,I as V,b as I,x as F,f as H}from"./ocievbv5.js";import{p as v,q as h,J as _,a3 as s,S as n,a5 as c,U as d,aa as C,a4 as f,V as p,$ as W,W as P,ab as x,F as b,ag as E,Z as A}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as L}from"./nsection-block-n9iyw0gw.js";import{_ as M}from"./help-fab.vue-ntole81s.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./nicon-title.vue-d27ih16g.js";const j={flex:"~ gap2","items-center":""},q={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},J=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",j,[n("div",q,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",z,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),R={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},U={flex:"~ items-center gap-1","font-bold":""},Y=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,r)=>{const a=V,t=W("ContentSlot");return s(),_("div",R,[n("div",U,[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"])])])])}}}),Z={};function G(m,e){const r=Y;return s(),p(r,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:f(()=>[P(m.$slots,"default")]),_:3})}const K=I(Z,[["render",G]]),O={class:"markdown-body"},Q={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(a,t)=>{const l=K;return s(),_("div",O,[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,__:[0]}),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))])}}},X={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=J,i=k,g=L,N=Q,S=M;return s(),_(b,null,[c(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${a.value.length}`},{default:f(()=>[n("div",X,[(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
+ import{_ as T}from"./nbadge-kvv0e7r1.js";import{_ as w}from"./filepath-item.vue-lav6hquu.js";import{_ as k}from"./duration-display.vue-l7hutejt.js";import{A as D,a3 as B,I as V,b as I,x as F,f as H}from"./damnmj71.js";import{p as v,q as h,J as _,a3 as s,S as n,a5 as c,U as d,aa as C,a4 as f,V as p,$ as W,W as P,ab as x,F as b,ag as E,Z as A}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as L}from"./nsection-block-g7pxd8js.js";import{_ as M}from"./help-fab.vue-bpbfz13b.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./nicon-title.vue-d27ih16g.js";const j={flex:"~ gap2","items-center":""},q={w8:"","text-right":"","text-sm":"",op25:""},z={key:0,"flex-auto":"","text-right":""},J=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",j,[n("div",q,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",z,[c(i,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),R={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},U={flex:"~ items-center gap-1","font-bold":""},Y=v({__name:"HelpTip",props:{title:{},icon:{}},setup(m){return(e,r)=>{const a=V,t=W("ContentSlot");return s(),_("div",R,[n("div",U,[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"])])])])}}}),Z={};function G(m,e){const r=Y;return s(),p(r,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:f(()=>[P(m.$slots,"default")]),_:3})}const K=I(Z,[["render",G]]),O={class:"markdown-body"},Q={__name:"plugins",setup(m,{expose:e}){return e({frontmatter:{}}),(a,t)=>{const l=K;return s(),_("div",O,[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,__:[0]}),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))])}}},X={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=J,i=k,g=L,N=Q,S=M;return s(),_(b,null,[c(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${a.value.length}`},{default:f(()=>[n("div",X,[(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 +1 @@
1
- import{f as m,w as d,F as f}from"./ocievbv5.js";import{u as c,f as _}from"./vue-devtools-inarn930.js";import{p as v,J as C,a3 as n,V as a,u as o,a4 as E,ab as I}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./vue-virtual-scroller.esm-nuoya9vo.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:l}=c(),t=m(),p=d();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return n(),C("div",k,[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,__:[2]}))])}}});export{N as default};
1
+ import{f as m,w as d,F as f}from"./damnmj71.js";import{u as c,f as _}from"./vue-devtools-ncogvszl.js";import{p as v,J as C,a3 as n,V as a,u as o,a4 as E,ab as I}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./vue-virtual-scroller.esm-nuoya9vo.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:l}=c(),t=m(),p=d();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=f;return n(),C("div",k,[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,__:[2]}))])}}});export{N as default};
@@ -1 +1 @@
1
- import{_ as x}from"./state-editor.vue-fpqiayj0.js";import{_ as b}from"./nsection-block-n9iyw0gw.js";import{J as u,a3 as l,S as o,ab as d,p as y,q as c,U as C,a5 as e,u as f,a4 as a,F as k}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as w}from"./help-fab.vue-ntole81s.js";import{f as N,bk as R}from"./ocievbv5.js";import"./data-schema-button.vue-gqtf82pn.js";import"./nicon-title.vue-d27ih16g.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";const T={class:"markdown-body"},B={__name:"runtime-configs",setup(_,{expose:t}){return t({frontmatter:{}}),(m,n)=>(l(),u("div",T,n[0]||(n[0]=[o("h1",null,"Runtime Configs",-1),o("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),o("p",null,[d("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),o("code",null,"nuxt.config.js"),d(" file, or check more details in the documentation.")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},S={key:0},H=y({__name:"runtime-configs",setup(_){const t=N(),p=R(),m=c(()=>t.value?.nuxt.payload),n=c(()=>t.value?.revision.value),g=c(()=>{const i={...p.value};return delete i.public,delete i.app,i});return(i,V)=>{const s=x,r=b,v=B,h=w;return l(),u(k,null,[f(t)?(l(),u("div",S,[e(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[e(s,{state:f(t).app.appConfig,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[e(s,{state:m.value.config?.public,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[e(s,{state:g.value,revision:n.value,readonly:""},null,8,["state","revision"])]),_:1})])):C("",!0),e(h,null,{default:a(()=>[e(v)]),_:1})],64)}}});export{H as default};
1
+ import{_ as x}from"./state-editor.vue-mosn6mlx.js";import{_ as b}from"./nsection-block-g7pxd8js.js";import{J as u,a3 as l,S as o,ab as d,p as y,q as c,U as C,a5 as e,u as f,a4 as a,F as k}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as w}from"./help-fab.vue-bpbfz13b.js";import{f as N,bk as R}from"./damnmj71.js";import"./data-schema-button.vue-ihlmjbkh.js";import"./nicon-title.vue-d27ih16g.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";const T={class:"markdown-body"},B={__name:"runtime-configs",setup(_,{expose:t}){return t({frontmatter:{}}),(m,n)=>(l(),u("div",T,n[0]||(n[0]=[o("h1",null,"Runtime Configs",-1),o("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),o("p",null,[d("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),o("code",null,"nuxt.config.js"),d(" file, or check more details in the documentation.")],-1),o("p",null,[o("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1)])))}},S={key:0},H=y({__name:"runtime-configs",setup(_){const t=N(),p=R(),m=c(()=>t.value?.nuxt.payload),n=c(()=>t.value?.revision.value),g=c(()=>{const i={...p.value};return delete i.public,delete i.app,i});return(i,V)=>{const s=x,r=b,v=B,h=w;return l(),u(k,null,[f(t)?(l(),u("div",S,[e(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[e(s,{state:f(t).app.appConfig,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[e(s,{state:m.value.config?.public,revision:n.value},null,8,["state","revision"])]),_:1}),e(r,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[e(s,{state:g.value,revision:n.value,readonly:""},null,8,["state","revision"])]),_:1})])):C("",!0),e(h,null,{default:a(()=>[e(v)]),_:1})],64)}}});export{H as default};
@@ -1 +1 @@
1
- import{b6 as S,r as k,E as M,bl as P}from"./ocievbv5.js";import{p as A,aD as R,E as L,M as C,J as U,a3 as T,u as x}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function E(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function I(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||E,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},J=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},V=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},q=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new q(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new V(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=I){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(J)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Z=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Z))}});export{ee as default};
1
+ import{b6 as S,r as k,E as M,bl as P}from"./damnmj71.js";import{p as A,aD as R,E as L,M as C,J as U,a3 as T,u as x}from"./vendor/json-editor-vue-pb6xqf2y.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";var H=class{listeners;constructor(){this.listeners=Object.create(null)}on(t,e){return this.listeners[t]={callback:e,next:this.listeners[t]||null},this}once(t,e){return this.on(t,function s(...a){e.apply(this,a),this.off(t,s)})}off(t,e){let s=this.listeners[t]||null,a=null;for(;s!==null;){if(s.callback===e){s.callback=null,a?a.next=s.next:this.listeners[t]=s.next;break}a=s,s=s.next}return this}emit(t,...e){let s=this.listeners[t]||null,a=!1;for(;s!==null;)typeof s.callback=="function"&&s.callback.apply(this,e),a=!0,s=s.next;return a}},u=class{subscriber;value;constructor(t,e){this.subscriber=null,this.value=t,this.shouldUpdate=typeof e=="function"?e:this.shouldUpdate}get readonly(){let t=this;return{subscribe:this.subscribe.bind(this),subscribeSync:this.subscribeSync.bind(this),unsubscribe:this.unsubscribe.bind(this),get value(){return t.value}}}subscribe(t){return this.subscriber={callback:t,subscriber:this.subscriber},()=>this.unsubscribe(t)}subscribeSync(t){let e=this.subscribe(t);return t(this.value,e),e}unsubscribe(t){let e=this,s=this.subscriber;for(;s!==null;){if(s.callback===t){s.callback=null,e.subscriber=s.subscriber;break}e=s,s=s.subscriber}}shouldUpdate(t,e){return t!==e}set(t){return this.#e(t)!==!1}asyncSet(t){let e=this.#e(t);return e===!1?Promise.resolve(!1):Promise.all(e).then(()=>!0)}#e(t){if(!this.shouldUpdate(t,this.value))return!1;let e=[],s=this.subscriber;for(this.value=t;s!==null;){let{callback:a}=s;a!==null&&e.push(a(t,()=>this.unsubscribe(a))),s=s.subscriber}return e}};function b(){return[performance.timeOrigin.toString(16),(1e4*performance.now()).toString(16),Math.random().toString(16).slice(2)].join("-")}new TextDecoder;var B=typeof Object.hasOwn=="function"?Object.hasOwn:(t,e)=>Object.hasOwnProperty.call(t,e),O={8:"\\b",9:"\\t",10:"\\n",12:"\\f",13:"\\r",34:'\\"',92:"\\\\"};Uint8Array.from({length:2048},(t,e)=>B(O,e)?2:e<32?6:e<128?1:2);new Uint8Array(256).map((t,e)=>{for(let s=0;s<8;s++)t+=e>>s&1;return t});new TextDecoder("utf8",{ignoreBOM:!0});function j(t){try{return new URL(t,location.origin).origin===location.origin}catch{return!1}}function z(t){return t.ok}function D(t){return t.headers.get("x-file-encoded-size")||t.headers.get("content-length")}function E(t){return t.headers.get("x-file-size")||(j(t.url)&&!t.headers.get("content-encoding")?t.headers.get("content-length"):void 0)}function N(t){return t.headers.get("x-file-created-at")||t.headers.get("last-modified")||void 0}function I(t,e){if(t instanceof Response){let s=e?.isResponseOk||z,a=e?.getContentSize||E,n=e?.getContentEncodedSize||D,r=e?.getContentCreatedAt||N;if(s(t))return{type:"url",name:t.url,size:Number(a(t))||null,encodedSize:Number(n(t)),createdAt:r(t)}}if(t instanceof File)return{type:"file",name:t.name,size:t.size,createdAt:t.lastModified};if(t instanceof Blob)return{size:t.size};if(ArrayBuffer.isView(t))return{size:t.byteLength};if(typeof t=="string")return{size:t.length}}function $(t){let e=t;return(typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e&&!(Symbol.iterator in e)&&!(Symbol.asyncIterator in e))&&(e=[e]),e&&Symbol.iterator in e?new Blob(e):t}function _(t){if(t instanceof ReadableStream)return t;if(t instanceof Response){if(t.body===null)throw new Error("Response has no body");return t.body}return t=$(t),t instanceof Blob?t.stream():new ReadableStream({start(){let e=t!==null&&typeof t=="object"&&Symbol.asyncIterator in t?t[Symbol.asyncIterator]:void 0;if(typeof e!="function")throw new Error("Bad value type (can't convert to a stream)");this.iterator=e()},async pull(e){let{value:s,done:a}=await this.iterator.next();a?(this.iterator=null,e.close()):e.enqueue(s)},cancel(){this.iterator=null}})}function W(t,e){let s=globalThis.location,a=[],n=({newURL:r,oldURL:i})=>{let o=new URL(r).hash||"#",c=new URL(i).hash||"#";o!==a.shift()&&(a.length=0,t(o,c))};return addEventListener("hashchange",n),{set(r,i){let o=r||"#";(s.hash||"#")!==o&&(a.push(r),i?s.replace(r):s.hash=r)},dispose(){removeEventListener("hashchange",n)}}}var p="[Discovery/embed-host]",g=()=>{},J=(()=>{try{let t=new ReadableStream;return new MessageChannel().port1.postMessage(t,[t]),!0}catch{return!1}})(),m=class extends H{window;id;actions;dataLoadToken;constructor(t,e,s){super(),this.window=t,this.id=e,this.actions=s,this.dataLoadToken=null}sendMessage(t,e,s){let a={id:this.id,from:"discoveryjs-app",type:t,payload:e||null};this.window.postMessage(a,"*",s)}destroy(){this.destroy=g,this.emit("destroy"),this.dataLoadToken=null,this.window=null,this.sendMessage=g}},V=class y extends m{publicApi;static createPublicApi(e){return Object.freeze({on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),defineAction(s,a){e.actions.set(s,a),e.sendMessage("defineAction",s)},setPageHash(s,a=!1){e.sendMessage("setPageHash",{hash:s,replace:a})},setRouterPreventLocationUpdate(s=!0){e.sendMessage("setRouterPreventLocationUpdate",s)}})}constructor(e,s,a){super(e,s,a),this.publicApi=y.createPublicApi(this)}processMessage(e){switch(e.type){case"loadingState":{this.emit("loadingStateChanged",e.payload);break}}}},q=class w extends m{commandMap;dataLoadToken;pageHash;pageId;pageRef;pageParams;pageAnchor;locationSync;colorScheme;publicApi;static createPublicApi(e){let s={primary:f("primary",e.sendMessage.bind(e),e.commandMap),secondary:f("secondary",e.sendMessage.bind(e),e.commandMap),menu:f("menu",e.sendMessage.bind(e),e.commandMap)};return Object.freeze({pageHash:e.pageHash.readonly,pageId:e.pageId.readonly,pageRef:e.pageRef.readonly,pageAnchor:e.pageAnchor.readonly,pageParams:e.pageParams.readonly,colorScheme:e.colorScheme.readonly,on:e.on.bind(e),once:e.once.bind(e),off:e.off.bind(e),nav:Object.assign(s.secondary,s),notify(a,n){e.sendMessage("notification",{name:a,details:n})},defineAction(a,n){e.actions.set(a,n),e.sendMessage("defineAction",a)},setPageHash(a,n=!1){e.sendMessage("setPageHash",{hash:a,replace:n})},setPageHashState(a,n=!1){e.sendMessage("setPageHashState",{...a,replace:n})},setPageHashStateWithAnchor(a,n=!1){e.sendMessage("setPageHashStateWithAnchor",{...a,replace:n})},setPage(a,n,r,i=!1){e.sendMessage("setPage",{id:a,ref:n,params:r,replace:i})},setPageRef(a,n=!1){e.sendMessage("setPageRef",{ref:a,replace:n})},setPageParams(a,n=!1){e.sendMessage("setPageParams",{params:a,replace:n})},setPageAnchor(a,n=!1){e.sendMessage("setPageAnchor",{anchor:a,replace:n})},setColorSchemeState(a){e.sendMessage("setColorSchemeState",a)},setRouterPreventLocationUpdate(a=!0){e.sendMessage("setRouterPreventLocationUpdate",a)},setLocationSync(a=!0){a&&!e.locationSync?(e.locationSync=W(n=>e.publicApi.setPageHash(n)),e.on("pageHashChanged",e.locationSync.set)):!a&&e.locationSync&&(e.off("pageHashChanged",e.locationSync.set),e.locationSync.dispose(),e.locationSync=null)},unloadData(){e.sendMessage("unloadData",null)},async uploadData(a,n){let r=b();e.dataLoadToken=r;try{return await G(e,a,n)}finally{e.dataLoadToken===r&&(e.dataLoadToken=null)}}})}constructor(e,s,a){super(e,s,a),this.commandMap=new Map,this.dataLoadToken=null,this.pageHash=new u("#"),this.pageId=new u(""),this.pageRef=new u(null),this.pageParams=new u({}),this.pageAnchor=new u(null),this.locationSync=null,this.colorScheme=new u({state:"unknown",value:"unknown"},(n,r)=>n.state!==r.state||n.value!==r.value),this.publicApi=w.createPublicApi(this)}async processMessage(e){switch(e.type){case"destroy":{this.destroy();break}case"action":{let{callId:s,name:a,args:n}=e.payload,r=this.actions.get(a);if(typeof r=="function")try{this.sendMessage("actionResult",{callId:s,value:await r(...n)})}catch(i){this.sendMessage("actionResult",{callId:s,error:i})}else console.warn(`${p} Action "${a}" was not found`);break}case"navMethod":{let s=this.commandMap.get(e.payload);typeof s=="function"?s():console.warn(`${p} Nav command "${e.payload}" was not found`);break}case"pageHashChanged":{let{replace:s,hash:a,id:n,ref:r,params:i,anchor:o}=e.payload||{},c=String(a).startsWith("#")?a:"#"+a;this.pageHash.set(c),this.pageId.set(n),this.pageRef.set(r),this.pageParams.set(i),this.pageAnchor.set(o),this.emit("pageHashChanged",c,s);break}case"colorSchemeChanged":{let s=e.payload;this.colorScheme.set(s),this.emit("colorSchemeChanged",s);break}case"unloadData":{this.emit("unloadData");break}case"data":{this.emit("data");break}case"loadingState":{this.emit("loadingStateChanged",e.payload);break}default:console.error(`${p} Unknown embed message type "${e.type}"`)}}destroy(){this.locationSync&&(this.locationSync.dispose(),this.locationSync=null),super.destroy()}};function F(t,e,s){let a=Object.assign(new Map,{id:""}),n=null,r,i=typeof e=="function"?{onPreinit:void 0,onConnect:e}:{onPreinit:e,onConnect:s};return addEventListener("message",c),()=>{removeEventListener("message",c),o()};function o(){n!==null&&(n.destroy(),typeof r=="function"&&r(),n=null,r=void 0)}async function c(d){let l=d.data||{};if(d.isTrusted&&(d.source===t.contentWindow||d.source===null)&&l.from==="discoveryjs-app"){if(l.type==="ready"){o(),a.id!==l.id&&(a.clear(),a.id=l.id);let{colorScheme:v,page:h}=l.payload;n=new q(t.contentWindow,l.id,a),n.pageHash.set(h.hash),n.pageId.set(h.id),n.pageRef.set(h.ref),n.pageParams.set(h.params),n.pageAnchor.set(h.anchor),n.colorScheme.set(v),n.once("destroy",o),r=i.onConnect(n.publicApi);return}if(l.type==="preinit"){o(),typeof i.onPreinit=="function"&&(a.id!==l.id&&(a.clear(),a.id=l.id),n=new V(t.contentWindow,l.id,a),n.once("destroy",o),r=i.onPreinit(n.publicApi));return}if(n?.id===l.id){n.processMessage(l);return}}}}async function G(t,e,s=I){let a=t.dataLoadToken,n=()=>{if(t?.dataLoadToken!==a)throw new Error("Data upload aborted")};if(!a)throw new Error("No acceptToken specified");let r=typeof e=="function"?await e():await e;n();let i=typeof s=="function"?s(r)||{}:{},o=_(r);if(J)t.sendMessage("dataStream",{stream:o,resource:i},[o]);else{let c=o.getReader();t.sendMessage("startChunkedDataUpload",{acceptToken:a,resource:i});try{for(;;){let{value:d,done:l}=await c.read();if(n(),t.sendMessage("dataChunk",{acceptToken:a,value:d,done:l},typeof d!="string"&&d?.buffer?[d.buffer]:void 0),l)break}}catch(d){throw t.sendMessage("cancelChunkedDataUpload",{acceptToken:a,error:d}),d}finally{c.releaseLock()}}}function f(t,e,s){function a(n){let r=[];return{commands:r,config:JSON.parse(JSON.stringify(n,(i,o)=>{if(typeof o=="function"){let c="nav-command-"+b();return r.push(c),s.set(c,o),c}return o}))}}return{insert(n,r,i){e("changeNavButtons",{section:t,action:"insert",name:i,position:r,...a(n)})},prepend(n){e("changeNavButtons",{section:t,action:"prepend",...a(n)})},append(n){e("changeNavButtons",{section:t,action:"append",...a(n)})},before(n,r){e("changeNavButtons",{section:t,action:"before",name:n,...a(r)})},after(n,r){e("changeNavButtons",{section:t,action:"after",name:n,...a(r)})},replace(n,r){e("changeNavButtons",{section:t,action:"replace",name:n,...a(r)})},remove(n){e("changeNavButtons",{section:t,action:"remove",name:n})}}}const Z=["src"],ee=A({__name:"server-discovery",setup(t){const s=S().app.baseURL,a=R("iframe");return L(()=>{const n=F(a.value,r=>((async()=>{const i=await k.getServerData(await M()),o=`{${Object.entries(i).map(([c,d])=>`"${c}": ${P(d)}`).join(",")}}`;r.uploadData(o)})(),()=>{}));C(()=>{n()})}),(n,r)=>(T(),U("iframe",{ref_key:"iframe",ref:a,src:`${x(s)}discovery/index.html`,"h-full":"","w-full":""},null,8,Z))}});export{ee as default};
@@ -1 +1 @@
1
- import{_ as j}from"./ncheckbox.vue-nyvh368f.js";import{G as O,_ as R,v as T,I as A}from"./ocievbv5.js";import{_ as E}from"./nselect.vue-kzbphh36.js";import{p as L,q as N,x as q,J as u,a3 as s,U as b,W as m,F as c,ag as h,u as r,a5 as y,S as C,V as p,a4 as V,ab as S,Z as v,aa as z}from"./vendor/json-editor-vue-pb6xqf2y.js";const G={p4:"",flex:"~ col gap-4"},J={key:1,ml2:"",flex:""},K=["value"],M={key:0,flex:"","gap-4":""},X=L({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,d=O(g,"modelValue",w,{passive:!0}),$=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const l={};for(const e of $.value)l[e]=g.default[e]||"";return l}),I=["string","number","boolean","file","date","time","datetime-local"];function D(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return q(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=j,i=T,f=E,F=A,_=R;return s(),u("div",G,[(s(!0),u(c,null,h(r(d),(a,k)=>(s(),u("div",{key:k,flex:"~ gap-2","justify-around":""},[m(l.$slots,"input",{item:a}),(s(!0),u(c,null,h($.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):b("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>D(k,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",J,[y(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(I,o=>C("option",{key:o,value:o},z(o),9,K)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):b("",!0)],64))),128)),m(l.$slots,"input-actions",{},()=>[y(_,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice(k,1)},{default:V(()=>[y(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?b("",!0):(s(),u("div",M,[m(l.$slots,"actions",{params:r(d)},()=>[y(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>e[2]||(e[2]=[S(" Add ")])),_:1,__:[2]}),e[4]||(e[4]=C("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>e[3]||(e[3]=[S(" Remove All ")])),_:1,__:[3]})):b("",!0)])])),m(l.$slots,"default")])}}});export{X as _};
1
+ import{_ as j}from"./ncheckbox.vue-pdwjyitl.js";import{G as O,_ as R,v as T,I as A}from"./damnmj71.js";import{_ as E}from"./nselect.vue-lhyhzii8.js";import{p as L,q as N,x as q,J as u,a3 as s,U as b,W as m,F as c,ag as h,u as r,a5 as y,S as C,V as p,a4 as V,ab as S,Z as v,aa as z}from"./vendor/json-editor-vue-pb6xqf2y.js";const G={p4:"",flex:"~ col gap-4"},J={key:1,ml2:"",flex:""},K=["value"],M={key:0,flex:"","gap-4":""},X=L({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(U,{emit:w}){const g=U,d=O(g,"modelValue",w,{passive:!0}),$=N(()=>[...g.keys,"active","key","value","type"]),B=N(()=>{const l={};for(const e of $.value)l[e]=g.default[e]||"";return l}),I=["string","number","boolean","file","date","time","datetime-local"];function D(l,e){const t=e.target;if(t.files&&t.files[0]){const i=t.files[0],f=new FileReader;f.readAsDataURL(i),f.onload=()=>{d.value[l].value=f.result}}}return q(()=>d,l=>{l.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const t=Number.parseFloat(e.value);e.value=Number.isNaN(t)?0:t}else e.type==="boolean"&&typeof e.value!="boolean"?e.value=!0:e.type==="file"&&typeof e.value!="object"?e.value="":e.type==="date"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}$/)?e.value=new Date().toISOString().slice(0,10):e.type==="time"&&typeof e.value=="string"&&!e.value.match(/^\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(11,16):e.type==="datetime-local"&&typeof e.value=="string"&&!e.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?e.value=new Date().toISOString().slice(0,16):e.type==="string"&&(e.value=e.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(l,e)=>{const t=j,i=T,f=E,F=A,_=R;return s(),u("div",G,[(s(!0),u(c,null,h(r(d),(a,k)=>(s(),u("div",{key:k,flex:"~ gap-2","justify-around":""},[m(l.$slots,"input",{item:a}),(s(!0),u(c,null,h($.value,n=>(s(),u(c,{key:n},[a.type!==null&&n==="active"?(s(),p(t,{key:0,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,n:"sm primary",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):b("",!0),a.type!==null&&n==="key"?(s(),p(i,{key:1,modelValue:a[n],"onUpdate:modelValue":o=>a[n]=o,placeholder:n,"flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):n==="value"?(s(),u(c,{key:2},[a.type==="file"?(s(),p(i,{key:0,type:"file",disabled:l.disabled,class:v(l.disabled?"op75":""),onChange:o=>D(k,o)},null,8,["disabled","class","onChange"])):a.type==="boolean"?(s(),u("div",J,[y(t,{modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,placeholder:"Value",n:"green lg",disabled:l.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(s(),p(i,{key:2,modelValue:a.value,"onUpdate:modelValue":o=>a.value=o,type:a.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:l.disabled,class:v(l.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):n==="type"?(s(),p(f,{key:3,modelValue:a.type,"onUpdate:modelValue":o=>a.type=o,n:"sm green",class:v(l.disabled?"op75":""),disabled:l.disabled},{default:V(()=>[(s(),u(c,null,h(I,o=>C("option",{key:o,value:o},z(o),9,K)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):b("",!0)],64))),128)),m(l.$slots,"input-actions",{},()=>[y(_,{n:"red",disabled:l.disabled,class:v(l.disabled?"op0!":""),onClick:n=>r(d).splice(k,1)},{default:V(()=>[y(F,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),l.disabled?b("",!0):(s(),u("div",M,[m(l.$slots,"actions",{params:r(d)},()=>[y(_,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=a=>r(d).push({...B.value}))},{default:V(()=>e[2]||(e[2]=[S(" Add ")])),_:1,__:[2]}),e[4]||(e[4]=C("div",{"flex-auto":""},null,-1)),r(d).length?(s(),p(_,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=a=>r(d).splice(0,r(d).length))},{default:V(()=>e[3]||(e[3]=[S(" Remove All ")])),_:1,__:[3]})):b("",!0)])])),m(l.$slots,"default")])}}});export{X as _};
@@ -1,4 +1,4 @@
1
- import{be as $e,I as De,b4 as se,bf as Ke,b2 as Qe,a4 as Xe,A as Ye,f as Ze,w as et,g as Ee,ay as tt,b3 as ot,a as nt,_ as Re,v as at,i as Ve,F as lt,M as st,bg as rt,S as it,n as ut,a8 as dt}from"./ocievbv5.js";import{_ as ct}from"./nnavbar.vue-d6itxqn2.js";import{_ as je}from"./nbadge-ma2ue7lq.js";import{p as ye,k as P,J as k,a3 as r,S as u,W as pt,U as N,Z as M,V as D,aa as O,u as b,ab as K,X as ft,F as L,ag as H,D as me,x as Ie,b as Ue,C as vt,z as mt,r as ve,q as V,w as yt,ai as Oe,a5 as v,a4 as T,ac as Z,a6 as ht,av as gt,K as bt}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as _t}from"./nselect.vue-kzbphh36.js";import{_ as Ne}from"./server-route-inputs.vue-hjcqwnre.js";import{_ as kt}from"./code-snippets.vue-ia2133e8.js";import{_ as wt}from"./data-schema-button.vue-gqtf82pn.js";import{_ as xt}from"./ncode-block.vue-lge6rogf.js";import{d as Ct}from"./vendor/unocss-k776m6tm.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-n9iyw0gw.js";import{_ as Tt}from"./ndrawer.vue-ejnk8ta8.js";import"./vendor/shiki-hjqm7vcp.js";import"./ncheckbox.vue-nyvh368f.js";import"./client-jlcyzfwz.js";import"./nicon-title.vue-d27ih16g.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),n=$e();return(o,m)=>{const f=De,d=je,_=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:m[0]||(m[0]=h=>{s.value=!s.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),D(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),D(d,{key:1,class:M(b(se)(o.item.method||"*")),textContent:O((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(),D(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+O(o.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,H(o.item.routes,h=>(r(),D(_,{key:h.filepath,item:h,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function $t(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=s||{},m=o.decode||Dt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let _=e.indexOf(";",f);if(_===-1)_=e.length;else if(_<d){f=e.lastIndexOf(";",d-1)+1;continue}const h=e.slice(f,d).trim();if(o?.filter&&!o?.filter(h)){f=_+1;continue}if(n[h]===void 0){let i=e.slice(d+1,_).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[h]=Et(i,m)}f=_+1}return n}function Dt(e){return e.includes("%")?decodeURIComponent(e):e}function Et(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,n){const o=n||{},m=o.encode||encodeURIComponent;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=m(s);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 _=o.maxAge-0;if(Number.isNaN(_)||!Number.isFinite(_))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(_)}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 A(e){if(typeof e!="object")return e;var s,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(s in e)e.hasOwnProperty(s)&&n[s]!==e[s]&&(n[s]=A(e[s]))}else{n={};for(s in e)s==="__proto__"?Object.defineProperty(n,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):n[s]=A(e[s])}return n}if(o==="[object Array]"){for(s=e.length,n=Array(s);s--;)n[s]=A(e[s]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(m){n.add(A(m))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(m,f){n.set(A(f),A(m))}),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(A(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=window.cookieStore;function jt(e,s){const n={...Vt,...s};n.filter??=i=>i===e;const o=Se(n)||{};let m;n.maxAge!==void 0?m=n.maxAge*1e3:n.expires&&(m=n.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,d=f||o[e]===void 0||o[e]===null,_=A(f?void 0:o[e]??n.default?.()),h=m&&!f?Ot(_,m,n.watch&&n.watch!=="shallow"):P(_);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const E=(w=!1)=>{!w&&(n.readonly||Ke(h.value,o[e]))||(Ut(e,h.value,n),o[e]=A(h.value),i?.postMessage({value:n.encode(h.value)}))},I=w=>{const y=w.refresh?Se(n)?.[e]:n.decode(w.value);B=!0,h.value=y,o[e]=A(y),mt(()=>{B=!1})};let B=!1;const J=!!Ue();if(J&&me(()=>{B=!0,E(),i?.close()}),le){const w=y=>{const U=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);U&&I({value:U.value}),g&&I({value:null})};le.addEventListener("change",w),J&&me(()=>le.removeEventListener("change",w))}else i&&(i.onmessage=({data:w})=>I(w));n.watch&&Ie(h,()=>{B||E()},{deep:n.watch!=="shallow"}),d&&E(d)}return h}function Se(e={}){return $t(document.cookie,e)}function It(e,s,n={}){return s==null?Ce(e,s,{...n,maxAge:-1}):Ce(e,s,n)}function Ut(e,s,n={}){document.cookie=It(e,s,n)}const Te=2147483647;function Ot(e,s,n){let o,m,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{m?.(),clearTimeout(o)}),vt((_,h)=>{n&&(m=Ie(d,h));function i(){f=0,clearTimeout(o);const E=s-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<s)return i();d.value=void 0,h()},I)}return{get(){return _(),d.value},set(E){i(),d.value=E,h()}}})}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"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Gt={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:""},lo=["src"],so={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const n=e,o=s,[m,f]=Qe(),d=Xe(),_=Ye(),h=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=V(()=>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=V(()=>{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}),B=P(!1),J=P(!1),w=et(),y=V(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),U=V(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(n.route.method||"GET"),C=P({}),x=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"}]}),j=P({}),{inputDefaults:S,sendFrom:F}=Ee("serverRoutes"),Q=V(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(g.value.toUpperCase())),c=P(),te=["input","json"],W=P(te[0]),ue=V({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=V(()=>({...G(S.value.query),...G(x.query)})),ge=V(()=>({...G(S.value.headers),...G(x.headers)})),de=V(()=>ee.value?W.value==="json"?{...G(S.value.body),...j.value}:{...G(S.value.body),...G(x.body)}:void 0),Ae=V(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=V(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&C.value[R]||R).join("")||"")+a;let p=_.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=V(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:$})=>p&&R&&$!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;st("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:g.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{}B.value=!1,i.fetchTime=Date.now()-a}const ke=V(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
1
+ import{be as $e,I as De,b4 as se,bf as Ke,b2 as Qe,a4 as Xe,A as Ye,f as Ze,w as et,g as Ee,ay as tt,b3 as ot,a as nt,_ as Re,v as at,i as Ve,F as lt,M as st,bg as rt,S as it,n as ut,a8 as dt}from"./damnmj71.js";import{_ as ct}from"./nnavbar.vue-m70bacca.js";import{_ as je}from"./nbadge-kvv0e7r1.js";import{p as ye,k as P,J as k,a3 as r,S as u,W as pt,U as N,Z as M,V as D,aa as O,u as b,ab as K,X as ft,F as L,ag as H,D as me,x as Ie,b as Ue,C as vt,z as mt,r as ve,q as V,w as yt,ai as Oe,a5 as v,a4 as T,ac as Z,a6 as ht,av as gt,K as bt}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as _t}from"./nselect.vue-lhyhzii8.js";import{_ as Ne}from"./server-route-inputs.vue-kkqb96n7.js";import{_ as kt}from"./code-snippets.vue-dqmonoji.js";import{_ as wt}from"./data-schema-button.vue-ihlmjbkh.js";import{_ as xt}from"./ncode-block.vue-lge6rogf.js";import{d as Ct}from"./vendor/unocss-k776m6tm.js";import{C as xe,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-g7pxd8js.js";import{_ as Tt}from"./ndrawer.vue-erpposo2.js";import"./vendor/shiki-hjqm7vcp.js";import"./ncheckbox.vue-pdwjyitl.js";import"./client-jlcyzfwz.js";import"./nicon-title.vue-d27ih16g.js";const Pe=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),n=$e();return(o,m)=>{const f=De,d=je,_=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:m[0]||(m[0]=h=>{s.value=!s.value,n.value=o.item.filepath})},[u("div",{class:M({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(r(),D(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),D(d,{key:1,class:M(b(se)(o.item.method||"*")),textContent:O((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(),D(f,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+O(o.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?pt(o.$slots,"default",{key:0},()=>[(r(!0),k(L,null,H(o.item.routes,h=>(r(),D(_,{key:h.filepath,item:h,index:o.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}});function $t(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const n={},o=s||{},m=o.decode||Dt;let f=0;for(;f<e.length;){const d=e.indexOf("=",f);if(d===-1)break;let _=e.indexOf(";",f);if(_===-1)_=e.length;else if(_<d){f=e.lastIndexOf(";",d-1)+1;continue}const h=e.slice(f,d).trim();if(o?.filter&&!o?.filter(h)){f=_+1;continue}if(n[h]===void 0){let i=e.slice(d+1,_).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),n[h]=Et(i,m)}f=_+1}return n}function Dt(e){return e.includes("%")?decodeURIComponent(e):e}function Et(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,n){const o=n||{},m=o.encode||encodeURIComponent;if(typeof m!="function")throw new TypeError("option encode is invalid");if(!ae.test(e))throw new TypeError("argument name is invalid");const f=m(s);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 _=o.maxAge-0;if(Number.isNaN(_)||!Number.isFinite(_))throw new TypeError("option maxAge is invalid");d+="; Max-Age="+Math.floor(_)}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 A(e){if(typeof e!="object")return e;var s,n,o=Object.prototype.toString.call(e);if(o==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){n=new e.constructor;for(s in e)e.hasOwnProperty(s)&&n[s]!==e[s]&&(n[s]=A(e[s]))}else{n={};for(s in e)s==="__proto__"?Object.defineProperty(n,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):n[s]=A(e[s])}return n}if(o==="[object Array]"){for(s=e.length,n=Array(s);s--;)n[s]=A(e[s]);return n}return o==="[object Set]"?(n=new Set,e.forEach(function(m){n.add(A(m))}),n):o==="[object Map]"?(n=new Map,e.forEach(function(m,f){n.set(A(f),A(m))}),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(A(e.buffer)):o==="[object ArrayBuffer]"?e.slice(0):o.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ct(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=window.cookieStore;function jt(e,s){const n={...Vt,...s};n.filter??=i=>i===e;const o=Se(n)||{};let m;n.maxAge!==void 0?m=n.maxAge*1e3:n.expires&&(m=n.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,d=f||o[e]===void 0||o[e]===null,_=A(f?void 0:o[e]??n.default?.()),h=m&&!f?Ot(_,m,n.watch&&n.watch!=="shallow"):P(_);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const E=(w=!1)=>{!w&&(n.readonly||Ke(h.value,o[e]))||(Ut(e,h.value,n),o[e]=A(h.value),i?.postMessage({value:n.encode(h.value)}))},I=w=>{const y=w.refresh?Se(n)?.[e]:n.decode(w.value);B=!0,h.value=y,o[e]=A(y),mt(()=>{B=!1})};let B=!1;const J=!!Ue();if(J&&me(()=>{B=!0,E(),i?.close()}),le){const w=y=>{const U=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);U&&I({value:U.value}),g&&I({value:null})};le.addEventListener("change",w),J&&me(()=>le.removeEventListener("change",w))}else i&&(i.onmessage=({data:w})=>I(w));n.watch&&Ie(h,()=>{B||E()},{deep:n.watch!=="shallow"}),d&&E(d)}return h}function Se(e={}){return $t(document.cookie,e)}function It(e,s,n={}){return s==null?Ce(e,s,{...n,maxAge:-1}):Ce(e,s,n)}function Ut(e,s,n={}){document.cookie=It(e,s,n)}const Te=2147483647;function Ot(e,s,n){let o,m,f=0;const d=n?P(e):{value:e};return Ue()&&me(()=>{m?.(),clearTimeout(o)}),vt((_,h)=>{n&&(m=Ie(d,h));function i(){f=0,clearTimeout(o);const E=s-f,I=E<Te?E:Te;o=setTimeout(()=>{if(f+=I,f<s)return i();d.value=void 0,h()},I)}return{get(){return _(),d.value},set(E){i(),d.value=E,h()}}})}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"},zt={"text-right":"","font-mono":""},Ht={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Jt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Gt={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:""},lo=["src"],so={key:1,controls:"",rounded:""},ro=["src"],io=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const n=e,o=s,[m,f]=Qe(),d=Xe(),_=Ye(),h=Ze(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),E=V(()=>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=V(()=>{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}),B=P(!1),J=P(!1),w=et(),y=V(()=>n.route.route?.split(/((?:\*\*)?:\w+)/g)),U=V(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(n.route.method||"GET"),C=P({}),x=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"}]}),j=P({}),{inputDefaults:S,sendFrom:F}=Ee("serverRoutes"),Q=V(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=V(()=>ie.includes(g.value.toUpperCase())),c=P(),te=["input","json"],W=P(te[0]),ue=V({get:()=>x[c.value],set:a=>{x[c.value]=a}}),he=V(()=>({...G(S.value.query),...G(x.query)})),ge=V(()=>({...G(S.value.headers),...G(x.headers)})),de=V(()=>ee.value?W.value==="json"?{...G(S.value.body),...j.value}:{...G(S.value.body),...G(x.body)}:void 0),Ae=V(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=V(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(R=>(R.startsWith(":")||R.startsWith("**:"))&&C.value[R]||R).join("")||"")+a;let p=_.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),be=V(()=>Ae.value+oe.value);function G(a){const t=Object.fromEntries(a.filter(({active:p,key:R,value:$})=>p&&R&&$!==void 0).map(({key:p,value:R})=>[p,R]));return Object.entries(t).length?t:void 0}async function _e(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;st("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(be.value,{method:g.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{}B.value=!1,i.fetchTime=Date.now()-a}const ke=V(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
2
2
  `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),p&&t.push(`headers: {
3
3
  ${p}
4
4
  }`),de.value&&t.push(`body: ${JSON.stringify(de.value,null,2)}`);const R=t.length?`, {
@@ -1 +1 @@
1
- import{b1 as ne,I as re,g as ue,b2 as xe,a4 as Oe,A as Te,w as Se,ay as we,b3 as Xe,a as Ee,_ as le,b4 as De,v as Ce,i as ce,F as Me,M as Ie,b5 as $e,S as Re,n as Ue,a8 as Le}from"./ocievbv5.js";import{_ as Ne}from"./nnavbar.vue-d6itxqn2.js";import{_ as fe}from"./nbadge-ma2ue7lq.js";import{a as Ae,p as K,k as B,q as R,J as I,a3 as g,S as m,U as j,a5 as x,aa as N,F as H,ag as G,Z,u as E,r as ie,w as Ve,ai as pe,V as A,ac as z,a4 as M,ab as P,a6 as je,av as He,W as We,X as Be,K as Fe}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as de}from"./server-route-inputs.vue-hjcqwnre.js";import{_ as qe}from"./ncode-block.vue-lge6rogf.js";import{S as ve}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-n9iyw0gw.js";import{_ as Ye}from"./ndrawer.vue-ejnk8ta8.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./ncheckbox.vue-nyvh368f.js";import"./nselect.vue-kzbphh36.js";import"./client-jlcyzfwz.js";import"./nicon-title.vue-d27ih16g.js";var te={exports:{}},se;function Ze(){return se||(se=1,function(F,U){(function(O,S){F.exports=S()})(globalThis,()=>(()=>{var L={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),v=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==="@reboot")return e=["@reboot","","","","","",""],e;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 * * * *","@reboot":"@reboot"},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(u){return u.trim()}).filter(function(u){return u!==""}).map(function(u){return isNaN(Number(u))?u:Number(u)}).filter(function(u){return u!==null&&u!==""});r.length===0&&r.push("*"),r.sort(function(u,i){return u!==null&&i!==null?u-i:0}),e[a]=r.map(function(u){return u!==null?u.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(l){var h=l.replace(/\D/,""),d=h;return e.dayOfWeekStartIndexZero?h=="7"&&(d="0"):d=(parseInt(h)-1).toString(),l.replace(h,d)}),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(l){var h=l.replace(/\D/,""),d=h;return e.monthStartIndexZero&&(d=(parseInt(h)+1).toString()),l.replace(h,d)});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 u in n)t[4]=t[4].replace(new RegExp(u,"gi"),n[u].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(l){return l!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var s=null;switch(i){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var f=t[i].split("/");t[i]="".concat(f[0],"-").concat(s,"/").concat(f[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=v},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),v=_(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,u=n===void 0?!0:n,i=r.verbose,s=i===void 0?!1:i,f=r.dayOfWeekStartIndexZero,l=f===void 0?!0:f,h=r.monthStartIndexZero,d=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,W=C===void 0?null:C,V={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:$,locale:W};V.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var X=new t(e,V);return X.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,a,r="";try{var n=new v.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]==="@reboot")return((a=(e=this.i18n).atReboot)===null||a===void 0?void 0:a.call(e))||"Run once, at startup";var u=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),f=this.getDayOfWeekDescription(),l=this.getYearDescription();r+=u+i+f+s+l,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return r},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 u=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,u[0],""),this.formatTime(r,u[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 s=0;s<i.length;s++)n+=" ",n+=this.formatTime(i[s],a,""),s<i.length-2&&(n+=","),s==i.length-2&&(n+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),l=this.getMinutesDescription(),h=this.getHoursDescription();if(n+=f,n&&l&&(n+=", "),n+=l,l===h)return n;n&&h&&(n+=", "),n+=h}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(u){return u},function(u){return o.StringUtilities.format(e.i18n.everyX0Minutes(u),u)},function(u){return e.i18n.minutesX0ThroughX1PastTheHour()},function(u){try{return u=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(u)<20?e.i18n.atX0MinutesPastTheHour(u):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(u)}catch{return e.i18n.atX0MinutesPastTheHour(u)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=0,n=[];a.split("/")[0].split(",").forEach(function(s){var f=s.split("-");f.length===2&&n.push({value:f[1],index:r+1}),r+=f.length});var u=0,i=this.getSegmentDescription(a,this.i18n.everyHour(),function(s){var f=n.find(function(h){return h.value===s&&h.index===u}),l=f&&e.expressionParts[1]!=="0";return u++,l?e.formatTime(s,"59",""):e.formatTime(s,"0","")},function(s){return o.StringUtilities.format(e.i18n.everyX0Hours(s),s)},function(s){return e.i18n.betweenX0AndX1()},function(s){return e.i18n.atX0()});return i},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,u){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i),f=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(u)[s]:a[s];if(n.indexOf("#")>-1){var l=null,h=n.substring(n.indexOf("#")+1),d=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(d);break;case"2":l=e.i18n.second(d);break;case"3":l=e.i18n.third(d);break;case"4":l=e.i18n.fourth(d);break;case"5":l=e.i18n.fifth(d);break}f=l+" "+f}return f},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var u=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(u):e.i18n.commaX0ThroughX1(u)},function(n){var u=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),s=n.substring(0,n.indexOf("#"));u=e.i18n.commaOnThe(i,s).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)u=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var f=e.expressionParts[3]!="*";u=f?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return u}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,u){return u&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(u)[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 u=parseInt(n[0].replace("W","")),i=u==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),u.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var s=r.match(/L-(\d{1,2})/);if(s){var f=s[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(l){return l=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),l):l},function(l){return l=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(l)},function(l){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(l)},function(l){return e.i18n.commaOnDayX0OfTheMonth(l)})}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,u,i){var s=null,f=e.indexOf("/")>-1,l=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)s="";else if(e==="*")s=a;else if(!f&&!l&&!h)s=o.StringUtilities.format(i(e),r(e));else if(h){for(var d=e.split(","),$="",C=0;C<d.length;C++)if(C>0&&d.length>2&&($+=",",C<d.length-1&&($+=" ")),C>0&&d.length>1&&(C==d.length-1||d.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),d[C].indexOf("/")>-1||d[C].indexOf("-")>-1){var W=d[C].indexOf("-")>-1&&d[C].indexOf("/")==-1,V=this.getSegmentDescription(d[C],a,r,n,W?this.i18n.commaX0ThroughX1:u,i);W&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(d[C],a,r,n,u,i):$+=r(d[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var d=e.split("/");if(s=o.StringUtilities.format(n(d[1]),d[1]),d[0].indexOf("-")>-1){var X=this.generateRangeSegmentDescription(d[0],u,r);X.indexOf(", ")!=0&&(s+=", "),s+=X}else if(d[0].indexOf("*")==-1){var Y=o.StringUtilities.format(i(d[0]),r(d[0]));Y=Y.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),Y)}}else l&&(s=this.generateRangeSegmentDescription(e,u,r));return s},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",u=e.split("-"),i=r(u[0],1),s=r(u[1],2),f=a(e);return n+=o.StringUtilities.format(f,i,s),n},t.prototype.formatTime=function(e,a,r){var n=0,u=0,i=parseInt(e)+n,s=parseInt(a)+u;s>=60?(s-=60,i+=1):s<0&&(s+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var f="",l=!1;this.options.use24HourTimeFormat||(l=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=l?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return r&&(h=":".concat(("00"+r).substring(r.length))),"".concat(l?f:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(h).concat(l?"":f)},t.prototype.transformVerbosity=function(e,a){if(!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(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var r=0,n=Object.entries(this.i18n.conciseVerbosityReplacements());r<n.length;r++){var u=n[r],i=u[0],s=u[1];e=e.replace(new RegExp(i,"g"),s)}return 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),v=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=v},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.prototype.atReboot=function(){return"Run once, at startup"},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(v,y){if(!v)throw new Error(y)}var o=function(){function v(){}return v.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")}},v.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")}},v.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")}},v.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")}},v.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")}},v.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")}},v}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(v){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return v.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(v,y){return y.some(function(t){return v.indexOf(t)>-1})},o}();p.StringUtilities=_}},O={};function S(b){var p=O[b];if(p!==void 0)return p.exports;var _=O[b]={exports:{}};return L[b](_,_.exports,S),_.exports}var w={};return(()=>{var b=w;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=S(333),_=S(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),w})())}(te)),te.exports}var ze=Ze();const Ge=Ae(ze),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(F){const U=F,L=ne(),O=B(!0),S=R(()=>Ge.toString(U.collection.cron));return(w,b)=>{const p=re,_=fe;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:S.value,onClick:b[0]||(b[0]=o=>O.value=!O.value)},[m("div",Qe,[x(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":O.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[x(_,{class:"font-mono n-primary",textContent:N(w.collection.cron)},null,8,["textContent"]),m("span",et,N(S.value),1),m("span",tt,"("+N(w.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),O.value?(g(),I("ul",nt,[(g(!0),I(H,null,G(w.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:Z([{"bg-active":E(L)===o}]),onClick:v=>L.value=o},N(o),11,rt),b[1]||(b[1]=m("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(F,{emit:U}){const L=F,O=U,S=B({payload:{}}),{inputDefaults:w}=ue("serverRoutes"),[b,p]=xe(),_=Oe(),o=Te(),v=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>JSON.stringify(v.data,null,2)),t=R(()=>v.contentType.includes("application/json")?"json":"text"),e=B(!1),a=B(!1),r=Se(),n=B(),u=["json"],i=B(u[0]),s=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=R({get:()=>s[n.value],set:k=>{s[n.value]=k}}),l=R(()=>({...X(w.value.query),...X(s.query)})),h=R(()=>({...X(w.value.headers)})),d=R(()=>Object.keys(S.value?.payload??{}).length?{...S.value}:void 0),$=R(()=>d.value?"POST":"GET"),C=R(()=>{let k=window?.location.origin;return k.charAt(k.length-1)==="/"&&(k=k.slice(0,-1)),k}),W=R(()=>{let k=new URLSearchParams(l.value).toString();k&&(k=`?${k}`);const c=`/_nitro/tasks/${L.task.name}${k}`;let D=o.value?.app.baseURL||"";return(D==="./"||D===".")&&(D=""),D.endsWith("/")&&(D=D.slice(0,-1)),D+c}),V=R(()=>C.value+W.value);function X(k){const c=Object.fromEntries(k.filter(({active:D,key:q,value:J})=>D&&q&&J!==void 0).map(({key:D,value:q})=>[D,q]));return Object.entries(c).length?c:void 0}async function Y(){a.value=!0,e.value=!0;const k=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:d.value,onResponse({response:c}){v.contentType=(c.headers.get("content-type")||"").toString().toLowerCase().trim(),v.statusCode=c.status,v.error=void 0},onResponseError(c){v.error=c.response._data,v.data=c.response._data}})}catch{}e.value=!1,v.fetchTime=Date.now()-k}const me=R(()=>{const k=[];return k.push({name:"Query",slug:"query",length:s.query.length}),k.push({name:"Body",slug:"body",length:s.body.length}),k});Ve(()=>{if(i.value==="json"&&typeof S.value=="string")try{S.value=JSON.parse(S.value)}catch{}});const oe=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const k=oe.value?.find(c=>c.task===L.task.name);if(k){n.value||(n.value=k.tab),k.tab!==n.value&&(k.tab=n.value);const{body:c,query:D,headers:q}=k.inputs;Object.assign(s,{body:c,query:D,headers:q})}else{const c={task:L.task.name,tab:"query",inputs:s};oe.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(k,c)=>{const D=le,q=Ce,J=re,ae=de,ge=ce,_e=Me,ee=fe,be=qe,Q=pe("tooltip");return g(),I("div",at,[m("div",it,[m("div",st,[z((g(),I("div",null,[x(D,{class:Z(["n-badge-base n-sm",E(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[P(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",ut,[x(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",lt,[z(x(D,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=T=>E(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),z(x(D,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=T=>E(r)(k.task.handler))},null,512),[[Q,"Open in Editor"]])])]),x(D,{"h-full":"",n:"primary solid",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"})]),_:1})])]),m("div",ct,[(g(!0),I(H,null,G(me.value,T=>z((g(),A(D,{key:T.slug,class:Z(n.value===T.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=T.slug},{default:M(()=>[x(J,{icon:E(ve)[T.slug]},null,8,["icon"]),m("div",ft,[P(N(T.name)+" "+N(T?.length?`(${T.length})`:"")+" ",1),m("span",null,N(E(w)[T.slug]?.length?`(${E(w)[T.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,T.name]])),128))]),x(E(b),null,{default:M(()=>[x(ae,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=T=>f.value=T),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[E(w)[n.value]?.length?(g(),I(H,{key:0},[m("div",pt,[c[6]||(c[6]=m("div",{"w-5":"","x-divider":""},null,-1)),c[7]||(c[7]=m("div",{"flex-none":""}," Default Inputs ",-1)),x(D,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=T=>O("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),x(ae,{modelValue:E(w)[n.value],"onUpdate:modelValue":c[3]||(c[3]=T=>E(w)[n.value]=T),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",dt,[n.value==="body"?(g(),I(H,{key:0},[m("div",vt,[(g(),I(H,null,G(u,T=>m("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:Z({"border-b":T!==i.value}),onClick:ke=>i.value=T},[m("div",{class:Z({op30:T!==i.value}),"font-mono":""},N(T),3)],10,ht)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(E(p),{key:0})):i.value==="json"?(g(),A(E(He),je({key:1,modelValue:S.value,"onUpdate:modelValue":c[5]||(c[5]=T=>S.value=T),class:[E(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},k.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(E(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>c[11]||(c[11]=[P(" Running... ")])),_:1,__:[11]})):(g(),I(H,{key:3},[m("div",mt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),A(ee,{key:0,n:"red"},{default:M(()=>c[12]||(c[12]=[P(" Error ")])),_:1,__:[12]})):j("",!0),x(ee,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",yt,N(v.contentType),1)):j("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),x(ee,{n:"green"},{default:M(()=>[P(N(v.fetchTime)+" ms ",1)]),_:1})]),x(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:M(()=>[x(D,{n:"primary",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"}),c[10]||(c[10]=P(" Run task "))]),_:1,__:[10]})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},he=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const U=B(!0),L=ne();return(O,S)=>{const w=re,b=he;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:Z([{"bg-active":E(L)===O.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${O.index*1.5}em)`}),onClick:S[0]||(S[0]=p=>{U.value=!U.value,L.value=O.item.name})},[m("div",_t,[O.item.type==="collection"?(g(),A(w,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),m("span",bt,[O.item.type==="collection"?(g(),A(w,{key:0,title:`${O.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(w,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+N(O.item.name),1)])],6),S[1]||(S[1]=m("div",{"x-divider":""},null,-1)),U.value?We(O.$slots,"default",{key:0},()=>[(g(!0),I(H,null,G(O.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:O.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),kt={flex:"~ gap1","text-sm":""},xt={key:0,op50:""},Ot={op50:""},Vt=K({__name:"server-tasks",setup(F){const U=B(!1),L=$e(),O=R(()=>Object.keys(L.value?.tasks??{}).map(r=>({name:r,...L.value.tasks[r],type:"task"}))),S=R(()=>Object.entries(L.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),w=ne(),{view:b,selectedTask:p,inputDefaults:_}=ue("serverTasks"),o=R(()=>{!w.value&&p.value&&(w.value=p.value.name);const r=O.value.find(n=>n.name===w.value);return w.value!==p.value?.name&&r&&(p.value=r),r}),v=B(""),y=R(()=>new Re(O.value,{keys:["key","description"],shouldSort:!0})),t=R(()=>v.value?y.value.search(v.value).map(n=>n.item):O.value),e=R(()=>{const r=[],n=(i,s)=>{i.tasks||=[],i.tasks.push(s)},u=(i,s)=>{const f=s?s.tasks?.find(h=>h.name===i):r.find(h=>h.name===i);if(f)return{...f,type:"collection"};const l={name:i,handler:i,description:"",type:"collection",tasks:[]};return s?n(s,l):r.push(l),l};return t.value.forEach(i=>{let s;const f={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(d=>{s=u(d,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=le,i=Ne,s=ot,f=Le,l=gt,h=Ue,d=ce,$=de,C=Pe,W=Ye,V=pe("tooltip");return g(),I(H,null,[x(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[x(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[x(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=X=>v.value=X),pb2:""},{actions:M(()=>[z(x(u,{"text-lg":"",icon:E(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),z(x(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=X=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",kt,[v.value?(g(),I("span",xt,N(t.value.length)+" matched · ",1)):j("",!0),m("span",Ot,N(O.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(H,null,G(E(b)==="tree"?e.value:t.value,X=>(g(),A(he,{key:X.name,item:X},null,8,["item"]))),128))]),right:M(()=>[n[6]||(n[6]=m("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),m("div",null,[m("ul",null,[(g(!0),I(H,null,G(S.value,X=>(g(),I("li",{key:X.cron},[x(s,{collection:X},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),A(Fe,{max:10},[o.value?(g(),A(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=X=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(d,{key:0},{default:M(()=>[x(h,{px6:"",py2:""},{default:M(()=>n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])),_:1,__:[7]})]),_:1}))]),_:1}),x(W,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=X=>U.value=X),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=X=>U.value=!1)},{default:M(()=>[m("div",null,[n[8]||(n[8]=m("div",{p4:"",border:"b base"},[m("span",{"text-lg":""},"Default Inputs"),m("br"),m("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),x(C,{text:`Query ${E(_).query.length?`(${E(_).query.length})`:""}`,padding:!1,icon:E(ve).query},{default:M(()=>[x($,{modelValue:E(_).query,"onUpdate:modelValue":n[3]||(n[3]=X=>E(_).query=X),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};
1
+ import{b1 as ne,I as re,g as ue,b2 as xe,a4 as Oe,A as Te,w as Se,ay as we,b3 as Xe,a as Ee,_ as le,b4 as De,v as Ce,i as ce,F as Me,M as Ie,b5 as $e,S as Re,n as Ue,a8 as Le}from"./damnmj71.js";import{_ as Ne}from"./nnavbar.vue-m70bacca.js";import{_ as fe}from"./nbadge-kvv0e7r1.js";import{a as Ae,p as K,k as B,q as R,J as I,a3 as g,S as m,U as j,a5 as x,aa as N,F as H,ag as G,Z,u as E,r as ie,w as Ve,ai as pe,V as A,ac as z,a4 as M,ab as P,a6 as je,av as He,W as We,X as Be,K as Fe}from"./vendor/json-editor-vue-pb6xqf2y.js";import{_ as de}from"./server-route-inputs.vue-kkqb96n7.js";import{_ as qe}from"./ncode-block.vue-lge6rogf.js";import{S as ve}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-g7pxd8js.js";import{_ as Ye}from"./ndrawer.vue-erpposo2.js";import"./vendor/unocss-k776m6tm.js";import"./vendor/shiki-hjqm7vcp.js";import"./ncheckbox.vue-pdwjyitl.js";import"./nselect.vue-lhyhzii8.js";import"./client-jlcyzfwz.js";import"./nicon-title.vue-d27ih16g.js";var te={exports:{}},se;function Ze(){return se||(se=1,function(F,U){(function(O,S){F.exports=S()})(globalThis,()=>(()=>{var L={949:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=_(515),v=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==="@reboot")return e=["@reboot","","","","","",""],e;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 * * * *","@reboot":"@reboot"},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(u){return u.trim()}).filter(function(u){return u!==""}).map(function(u){return isNaN(Number(u))?u:Number(u)}).filter(function(u){return u!==null&&u!==""});r.length===0&&r.push("*"),r.sort(function(u,i){return u!==null&&i!==null?u-i:0}),e[a]=r.map(function(u){return u!==null?u.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(l){var h=l.replace(/\D/,""),d=h;return e.dayOfWeekStartIndexZero?h=="7"&&(d="0"):d=(parseInt(h)-1).toString(),l.replace(h,d)}),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(l){var h=l.replace(/\D/,""),d=h;return e.monthStartIndexZero&&(d=(parseInt(h)+1).toString()),l.replace(h,d)});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 u in n)t[4]=t[4].replace(new RegExp(u,"gi"),n[u].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(l){return l!==""}).join(",")||"*"),t[i]=="*/1"&&(t[i]="*"),t[i].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[i])){var s=null;switch(i){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var f=t[i].split("/");t[i]="".concat(f[0],"-").concat(s,"/").concat(f[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=v},333:(b,p,_)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=_(823),v=_(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,u=n===void 0?!0:n,i=r.verbose,s=i===void 0?!1:i,f=r.dayOfWeekStartIndexZero,l=f===void 0?!0:f,h=r.monthStartIndexZero,d=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,W=C===void 0?null:C,V={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:d,use24HourTimeFormat:$,locale:W};V.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var X=new t(e,V);return X.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,a,r="";try{var n=new v.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=n.parse(),this.expressionParts[0]==="@reboot")return((a=(e=this.i18n).atReboot)===null||a===void 0?void 0:a.call(e))||"Run once, at startup";var u=this.getTimeOfDayDescription(),i=this.getDayOfMonthDescription(),s=this.getMonthDescription(),f=this.getDayOfWeekDescription(),l=this.getYearDescription();r+=u+i+f+s+l,r=this.transformVerbosity(r,!!this.options.verbose),r=r.charAt(0).toLocaleUpperCase()+r.substr(1)}catch(h){if(!this.options.throwExceptionOnParseError)r=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(h)}return r},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 u=a.split("-");n+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,u[0],""),this.formatTime(r,u[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 s=0;s<i.length;s++)n+=" ",n+=this.formatTime(i[s],a,""),s<i.length-2&&(n+=","),s==i.length-2&&(n+=this.i18n.spaceAnd())}else{var f=this.getSecondsDescription(),l=this.getMinutesDescription(),h=this.getHoursDescription();if(n+=f,n&&l&&(n+=", "),n+=l,l===h)return n;n&&h&&(n+=", "),n+=h}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(u){return u},function(u){return o.StringUtilities.format(e.i18n.everyX0Minutes(u),u)},function(u){return e.i18n.minutesX0ThroughX1PastTheHour()},function(u){try{return u=="0"&&r.indexOf("/")==-1&&a==""?e.i18n.everyHour():parseInt(u)<20?e.i18n.atX0MinutesPastTheHour(u):e.i18n.atX0MinutesPastTheHourGt20()||e.i18n.atX0MinutesPastTheHour(u)}catch{return e.i18n.atX0MinutesPastTheHour(u)}});return n},t.prototype.getHoursDescription=function(){var e=this,a=this.expressionParts[2],r=0,n=[];a.split("/")[0].split(",").forEach(function(s){var f=s.split("-");f.length===2&&n.push({value:f[1],index:r+1}),r+=f.length});var u=0,i=this.getSegmentDescription(a,this.i18n.everyHour(),function(s){var f=n.find(function(h){return h.value===s&&h.index===u}),l=f&&e.expressionParts[1]!=="0";return u++,l?e.formatTime(s,"59",""):e.formatTime(s,"0","")},function(s){return o.StringUtilities.format(e.i18n.everyX0Hours(s),s)},function(s){return e.i18n.betweenX0AndX1()},function(s){return e.i18n.atX0()});return i},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,u){var i=n;n.indexOf("#")>-1?i=n.substring(0,n.indexOf("#")):n.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i),f=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(u)[s]:a[s];if(n.indexOf("#")>-1){var l=null,h=n.substring(n.indexOf("#")+1),d=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(d);break;case"2":l=e.i18n.second(d);break;case"3":l=e.i18n.third(d);break;case"4":l=e.i18n.fourth(d);break;case"5":l=e.i18n.fifth(d);break}f=l+" "+f}return f},function(n){return parseInt(n)==1?"":o.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(n),n)},function(n){var u=n.substring(0,n.indexOf("-")),i=e.expressionParts[3]!="*";return i?e.i18n.commaAndX0ThroughX1(u):e.i18n.commaX0ThroughX1(u)},function(n){var u=null;if(n.indexOf("#")>-1){var i=n.substring(n.indexOf("#")+1),s=n.substring(0,n.indexOf("#"));u=e.i18n.commaOnThe(i,s).trim()+e.i18n.spaceX0OfTheMonth()}else if(n.indexOf("L")>-1)u=e.i18n.commaOnTheLastX0OfTheMonth(n.replace("L",""));else{var f=e.expressionParts[3]!="*";u=f?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(n)}return u}),r},t.prototype.getMonthDescription=function(){var e=this,a=this.i18n.monthsOfTheYear(),r=this.getSegmentDescription(this.expressionParts[4],"",function(n,u){return u&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(u)[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 u=parseInt(n[0].replace("W","")),i=u==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),u.toString());a=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),i);break}else{var s=r.match(/L-(\d{1,2})/);if(s){var f=s[1];a=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(f),f);break}else{if(r=="*"&&this.expressionParts[5]!="*")return"";a=this.getSegmentDescription(r,this.i18n.commaEveryDay(),function(l){return l=="L"?e.i18n.lastDay():e.i18n.dayX0?o.StringUtilities.format(e.i18n.dayX0(),l):l},function(l){return l=="1"?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(l)},function(l){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(l)},function(l){return e.i18n.commaOnDayX0OfTheMonth(l)})}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,u,i){var s=null,f=e.indexOf("/")>-1,l=e.indexOf("-")>-1,h=e.indexOf(",")>-1;if(!e)s="";else if(e==="*")s=a;else if(!f&&!l&&!h)s=o.StringUtilities.format(i(e),r(e));else if(h){for(var d=e.split(","),$="",C=0;C<d.length;C++)if(C>0&&d.length>2&&($+=",",C<d.length-1&&($+=" ")),C>0&&d.length>1&&(C==d.length-1||d.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),d[C].indexOf("/")>-1||d[C].indexOf("-")>-1){var W=d[C].indexOf("-")>-1&&d[C].indexOf("/")==-1,V=this.getSegmentDescription(d[C],a,r,n,W?this.i18n.commaX0ThroughX1:u,i);W&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(d[C],a,r,n,u,i):$+=r(d[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var d=e.split("/");if(s=o.StringUtilities.format(n(d[1]),d[1]),d[0].indexOf("-")>-1){var X=this.generateRangeSegmentDescription(d[0],u,r);X.indexOf(", ")!=0&&(s+=", "),s+=X}else if(d[0].indexOf("*")==-1){var Y=o.StringUtilities.format(i(d[0]),r(d[0]));Y=Y.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),Y)}}else l&&(s=this.generateRangeSegmentDescription(e,u,r));return s},t.prototype.generateRangeSegmentDescription=function(e,a,r){var n="",u=e.split("-"),i=r(u[0],1),s=r(u[1],2),f=a(e);return n+=o.StringUtilities.format(f,i,s),n},t.prototype.formatTime=function(e,a,r){var n=0,u=0,i=parseInt(e)+n,s=parseInt(a)+u;s>=60?(s-=60,i+=1):s<0&&(s+=60,i-=1),i>=24?i=i-24:i<0&&(i=24+i);var f="",l=!1;this.options.use24HourTimeFormat||(l=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),f=l?"".concat(this.getPeriod(i)," "):" ".concat(this.getPeriod(i)),i>12&&(i-=12),i===0&&(i=12));var h="";return r&&(h=":".concat(("00"+r).substring(r.length))),"".concat(l?f:"").concat(("00"+i.toString()).substring(i.toString().length),":").concat(("00"+s.toString()).substring(s.toString().length)).concat(h).concat(l?"":f)},t.prototype.transformVerbosity=function(e,a){if(!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(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var r=0,n=Object.entries(this.i18n.conciseVerbosityReplacements());r<n.length;r++){var u=n[r],i=u[0],s=u[1];e=e.replace(new RegExp(i,"g"),s)}return 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),v=function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y}();p.enLocaleLoader=v},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.prototype.atReboot=function(){return"Run once, at startup"},o}();p.en=_},515:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0});function _(v,y){if(!v)throw new Error(y)}var o=function(){function v(){}return v.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")}},v.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")}},v.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")}},v.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")}},v.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")}},v.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")}},v}();p.default=o},823:(b,p)=>{Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var _=function(){function o(){}return o.format=function(v){for(var y=[],t=1;t<arguments.length;t++)y[t-1]=arguments[t];return v.replace(/%s/g,function(e){return y.shift()})},o.containsAny=function(v,y){return y.some(function(t){return v.indexOf(t)>-1})},o}();p.StringUtilities=_}},O={};function S(b){var p=O[b];if(p!==void 0)return p.exports;var _=O[b]={exports:{}};return L[b](_,_.exports,S),_.exports}var w={};return(()=>{var b=w;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var p=S(333),_=S(747);p.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;b.toString=o})(),w})())}(te)),te.exports}var ze=Ze();const Ge=Ae(ze),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(F){const U=F,L=ne(),O=B(!0),S=R(()=>Ge.toString(U.collection.cron));return(w,b)=>{const p=re,_=fe;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",p2:"",title:S.value,onClick:b[0]||(b[0]=o=>O.value=!O.value)},[m("div",Qe,[x(p,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":O.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[x(_,{class:"font-mono n-primary",textContent:N(w.collection.cron)},null,8,["textContent"]),m("span",et,N(S.value),1),m("span",tt,"("+N(w.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),O.value?(g(),I("ul",nt,[(g(!0),I(H,null,G(w.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"","pl-9":"","font-mono":"",class:Z([{"bg-active":E(L)===o}]),onClick:v=>L.value=o},N(o),11,rt),b[1]||(b[1]=m("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(F,{emit:U}){const L=F,O=U,S=B({payload:{}}),{inputDefaults:w}=ue("serverRoutes"),[b,p]=xe(),_=Oe(),o=Te(),v=ie({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=R(()=>JSON.stringify(v.data,null,2)),t=R(()=>v.contentType.includes("application/json")?"json":"text"),e=B(!1),a=B(!1),r=Se(),n=B(),u=["json"],i=B(u[0]),s=ie({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=R({get:()=>s[n.value],set:k=>{s[n.value]=k}}),l=R(()=>({...X(w.value.query),...X(s.query)})),h=R(()=>({...X(w.value.headers)})),d=R(()=>Object.keys(S.value?.payload??{}).length?{...S.value}:void 0),$=R(()=>d.value?"POST":"GET"),C=R(()=>{let k=window?.location.origin;return k.charAt(k.length-1)==="/"&&(k=k.slice(0,-1)),k}),W=R(()=>{let k=new URLSearchParams(l.value).toString();k&&(k=`?${k}`);const c=`/_nitro/tasks/${L.task.name}${k}`;let D=o.value?.app.baseURL||"";return(D==="./"||D===".")&&(D=""),D.endsWith("/")&&(D=D.slice(0,-1)),D+c}),V=R(()=>C.value+W.value);function X(k){const c=Object.fromEntries(k.filter(({active:D,key:q,value:J})=>D&&q&&J!==void 0).map(({key:D,value:q})=>[D,q]));return Object.entries(c).length?c:void 0}async function Y(){a.value=!0,e.value=!0;const k=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:d.value,onResponse({response:c}){v.contentType=(c.headers.get("content-type")||"").toString().toLowerCase().trim(),v.statusCode=c.status,v.error=void 0},onResponseError(c){v.error=c.response._data,v.data=c.response._data}})}catch{}e.value=!1,v.fetchTime=Date.now()-k}const me=R(()=>{const k=[];return k.push({name:"Query",slug:"query",length:s.query.length}),k.push({name:"Body",slug:"body",length:s.body.length}),k});Ve(()=>{if(i.value==="json"&&typeof S.value=="string")try{S.value=JSON.parse(S.value)}catch{}});const oe=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const k=oe.value?.find(c=>c.task===L.task.name);if(k){n.value||(n.value=k.tab),k.tab!==n.value&&(k.tab=n.value);const{body:c,query:D,headers:q}=k.inputs;Object.assign(s,{body:c,query:D,headers:q})}else{const c={task:L.task.name,tab:"query",inputs:s};oe.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(k,c)=>{const D=le,q=Ce,J=re,ae=de,ge=ce,_e=Me,ee=fe,be=qe,Q=pe("tooltip");return g(),I("div",at,[m("div",it,[m("div",st,[z((g(),I("div",null,[x(D,{class:Z(["n-badge-base n-sm",E(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[P(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",ut,[x(q,{"model-value":W.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",lt,[z(x(D,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=T=>E(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),z(x(D,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=T=>E(r)(k.task.handler))},null,512),[[Q,"Open in Editor"]])])]),x(D,{"h-full":"",n:"primary solid",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"})]),_:1})])]),m("div",ct,[(g(!0),I(H,null,G(me.value,T=>z((g(),A(D,{key:T.slug,class:Z(n.value===T.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:ke=>n.value=T.slug},{default:M(()=>[x(J,{icon:E(ve)[T.slug]},null,8,["icon"]),m("div",ft,[P(N(T.name)+" "+N(T?.length?`(${T.length})`:"")+" ",1),m("span",null,N(E(w)[T.slug]?.length?`(${E(w)[T.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,T.name]])),128))]),x(E(b),null,{default:M(()=>[x(ae,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=T=>f.value=T),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[E(w)[n.value]?.length?(g(),I(H,{key:0},[m("div",pt,[c[6]||(c[6]=m("div",{"w-5":"","x-divider":""},null,-1)),c[7]||(c[7]=m("div",{"flex-none":""}," Default Inputs ",-1)),x(D,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=T=>O("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),x(ae,{modelValue:E(w)[n.value],"onUpdate:modelValue":c[3]||(c[3]=T=>E(w)[n.value]=T),disabled:"",p0:""},null,8,["modelValue"])],64)):j("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",dt,[n.value==="body"?(g(),I(H,{key:0},[m("div",vt,[(g(),I(H,null,G(u,T=>m("button",{key:T,px4:"",py2:"",border:"r base",hover:"bg-active",class:Z({"border-b":T!==i.value}),onClick:ke=>i.value=T},[m("div",{class:Z({op30:T!==i.value}),"font-mono":""},N(T),3)],10,ht)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),A(E(p),{key:0})):i.value==="json"?(g(),A(E(He),je({key:1,modelValue:S.value,"onUpdate:modelValue":c[5]||(c[5]=T=>S.value=T),class:[E(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},k.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):j("",!0)],64)):(g(),A(E(p),{key:1}))])):j("",!0),a.value?e.value?(g(),A(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>c[11]||(c[11]=[P(" Running... ")])),_:1,__:[11]})):(g(),I(H,{key:3},[m("div",mt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),A(ee,{key:0,n:"red"},{default:M(()=>c[12]||(c[12]=[P(" Error ")])),_:1,__:[12]})):j("",!0),x(ee,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",yt,N(v.contentType),1)):j("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),x(ee,{n:"green"},{default:M(()=>[P(N(v.fetchTime)+" ms ",1)]),_:1})]),x(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),A(ge,{key:1},{default:M(()=>[x(D,{n:"primary",onClick:Y},{default:M(()=>[x(J,{icon:"carbon:send"}),c[10]||(c[10]=P(" Run task "))]),_:1,__:[10]})]),_:1}))])}}}),_t={"flex-none":"","text-left":""},bt={flex:"","items-center":"","text-sm":"","font-mono":""},he=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(F){const U=B(!0),L=ne();return(O,S)=>{const w=re,b=he;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:Z([{"bg-active":E(L)===O.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${O.index*1.5}em)`}),onClick:S[0]||(S[0]=p=>{U.value=!U.value,L.value=O.item.name})},[m("div",_t,[O.item.type==="collection"?(g(),A(w,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):j("",!0)]),m("span",bt,[O.item.type==="collection"?(g(),A(w,{key:0,title:`${O.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),A(w,{key:1,icon:"carbon:play",ml3:"",mr1:""})),P(" "+N(O.item.name),1)])],6),S[1]||(S[1]=m("div",{"x-divider":""},null,-1)),U.value?We(O.$slots,"default",{key:0},()=>[(g(!0),I(H,null,G(O.item.tasks,p=>(g(),A(b,{key:p.name,item:p,index:O.index+1},null,8,["item","index"]))),128))]):j("",!0)])}}}),kt={flex:"~ gap1","text-sm":""},xt={key:0,op50:""},Ot={op50:""},Vt=K({__name:"server-tasks",setup(F){const U=B(!1),L=$e(),O=R(()=>Object.keys(L.value?.tasks??{}).map(r=>({name:r,...L.value.tasks[r],type:"task"}))),S=R(()=>Object.entries(L.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),w=ne(),{view:b,selectedTask:p,inputDefaults:_}=ue("serverTasks"),o=R(()=>{!w.value&&p.value&&(w.value=p.value.name);const r=O.value.find(n=>n.name===w.value);return w.value!==p.value?.name&&r&&(p.value=r),r}),v=B(""),y=R(()=>new Re(O.value,{keys:["key","description"],shouldSort:!0})),t=R(()=>v.value?y.value.search(v.value).map(n=>n.item):O.value),e=R(()=>{const r=[],n=(i,s)=>{i.tasks||=[],i.tasks.push(s)},u=(i,s)=>{const f=s?s.tasks?.find(h=>h.name===i):r.find(h=>h.name===i);if(f)return{...f,type:"collection"};const l={name:i,handler:i,description:"",type:"collection",tasks:[]};return s?n(s,l):r.push(l),l};return t.value.forEach(i=>{let s;const f={...i,type:"task"},h=i.name.split(":").concat();h.length>0&&h[h.length-1].includes(".")&&h.pop(),h.forEach(d=>{s=u(d,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=le,i=Ne,s=ot,f=Le,l=gt,h=Ue,d=ce,$=de,C=Pe,W=Ye,V=pe("tooltip");return g(),I(H,null,[x(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[x(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[x(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=X=>v.value=X),pb2:""},{actions:M(()=>[z(x(u,{"text-lg":"",icon:E(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),z(x(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=X=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",kt,[v.value?(g(),I("span",xt,N(t.value.length)+" matched · ",1)):j("",!0),m("span",Ot,N(O.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(H,null,G(E(b)==="tree"?e.value:t.value,X=>(g(),A(he,{key:X.name,item:X},null,8,["item"]))),128))]),right:M(()=>[n[6]||(n[6]=m("div",{px4:"",py2:"",border:"b base"}," Cron groups ",-1)),m("div",null,[m("ul",null,[(g(!0),I(H,null,G(S.value,X=>(g(),I("li",{key:X.cron},[x(s,{collection:X},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),A(Fe,{max:10},[o.value?(g(),A(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=X=>U.value=!0)},null,8,["task"])):j("",!0)],1024)),o.value?j("",!0):(g(),A(d,{key:0},{default:M(()=>[x(h,{px6:"",py2:""},{default:M(()=>n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])),_:1,__:[7]})]),_:1}))]),_:1}),x(W,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=X=>U.value=X),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=X=>U.value=!1)},{default:M(()=>[m("div",null,[n[8]||(n[8]=m("div",{p4:"",border:"b base"},[m("span",{"text-lg":""},"Default Inputs"),m("br"),m("span",{"text-white":"",op50:""},"Merged as default for every task in DevTools")],-1)),x(C,{text:`Query ${E(_).query.length?`(${E(_).query.length})`:""}`,padding:!1,icon:E(ve).query},{default:M(()=>[x($,{modelValue:E(_).query,"onUpdate:modelValue":n[3]||(n[3]=X=>E(_).query=X),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Vt as default};