@nuxt/devtools-nightly 3.0.1-29370252.f3266f0 → 3.1.0-29380644.75a814f

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 (88) hide show
  1. package/dist/chunks/module-main.mjs +22 -6
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/__blank-jhf8n41f.js +1 -0
  5. package/dist/client/_nuxt/{analyze-build-oe5r2n9t.js → analyze-build-oqpgv2ad.js} +1 -1
  6. package/dist/client/_nuxt/{assets-ntgzu9in.js → assets-gwkvq1qj.js} +1 -1
  7. package/dist/client/_nuxt/builds/latest.json +1 -1
  8. package/dist/client/_nuxt/builds/meta/93e5690c-f5d8-4c17-bb47-efbb3252eb09.json +1 -0
  9. package/dist/client/_nuxt/{client-miiq4qin.js → client-c7ye0k5n.js} +1 -1
  10. package/dist/client/_nuxt/{code-diff-ojhnq7lb.js → code-diff-injlkjgq.js} +1 -1
  11. package/dist/client/_nuxt/{code-snippets-io8vjgte.js → code-snippets-m6659svv.js} +1 -1
  12. package/dist/client/_nuxt/{components-lkamgq9x.js → components-j9k9gnq5.js} +1 -1
  13. package/dist/client/_nuxt/{composable-item-de2qbj5y.js → composable-item-fx38xsht.js} +1 -1
  14. package/dist/client/_nuxt/{custom-_name_-k891izff.js → custom-_name_-dcs88k11.js} +1 -1
  15. package/dist/client/_nuxt/{data-schema-button-hqryewml.js → data-schema-button-n4i5g8zd.js} +1 -1
  16. package/dist/client/_nuxt/{data-schema-drawer-kae79wen.js → data-schema-drawer-jl777ghs.js} +1 -1
  17. package/dist/client/_nuxt/{debug-fgaph4wa.js → debug-no085bbm.js} +1 -1
  18. package/dist/client/_nuxt/{default-bu22g8rc.js → default-bfbnrsq7.js} +1 -1
  19. package/dist/client/_nuxt/{duration-display-cjpkh71u.js → duration-display-jckntkny.js} +1 -1
  20. package/dist/client/_nuxt/{entry.css-dxneg9ww.css → entry.css-isd0m9wk.css} +1 -1
  21. package/dist/client/_nuxt/{error-404-odqix7df.js → error-404-bzvygsk0.js} +1 -1
  22. package/dist/client/_nuxt/error-404.css-comgjw6y.css +1 -0
  23. package/dist/client/_nuxt/{error-500-nxyyvxuo.js → error-500-l4uqt5om.js} +1 -1
  24. package/dist/client/_nuxt/error-500.css-mrt4j707.css +1 -0
  25. package/dist/client/_nuxt/{error-ntceple0.js → error-nv4do73a.js} +1 -1
  26. package/dist/client/_nuxt/f1vjkvp8.js +5 -0
  27. package/dist/client/_nuxt/{filepath-item-owlv864w.js → filepath-item-i5bipy7o.js} +1 -1
  28. package/dist/client/_nuxt/{full-jwu2wh2y.js → full-gze3nw3m.js} +1 -1
  29. package/dist/client/_nuxt/{help-fab-chg6ox1v.js → help-fab-9epbigv8.js} +1 -1
  30. package/dist/client/_nuxt/{hooks-n044szfl.js → hooks-jfgb41bi.js} +1 -1
  31. package/dist/client/_nuxt/{imports-mmcpk4yu.js → imports-im6tcx8h.js} +1 -1
  32. package/dist/client/_nuxt/{index-kfj644lq.js → index-n8u3ke0o.js} +1 -1
  33. package/dist/client/_nuxt/{launch-page-l87i7ewv.js → launch-page-hs2f7bb3.js} +1 -1
  34. package/dist/client/_nuxt/{modules-nhr2xnn0.js → modules-f23f2n0s.js} +1 -1
  35. package/dist/client/_nuxt/{nbadge-d24jlq2b.js → nbadge-b5jyufiz.js} +1 -1
  36. package/dist/client/_nuxt/{ncheckbox-eijyrwcq.js → ncheckbox-dhpz73wm.js} +1 -1
  37. package/dist/client/_nuxt/{ncode-block-pcw3yh3u.js → ncode-block-j34pr9ay.js} +1 -1
  38. package/dist/client/_nuxt/{ndrawer-ele5003c.js → ndrawer-drb8l4me.js} +1 -1
  39. package/dist/client/_nuxt/{ndropdown-jcnxkt1n.js → ndropdown-nmlejt8k.js} +1 -1
  40. package/dist/client/_nuxt/{nicon-title-he6hzgyb.js → nicon-title-d35s6mci.js} +1 -1
  41. package/dist/client/_nuxt/{nlink-fgjzhevk.js → nlink-c419gh8c.js} +1 -1
  42. package/dist/client/_nuxt/{nmarkdown-n6zsr15e.js → nmarkdown-nigjp7j4.js} +1 -1
  43. package/dist/client/_nuxt/{nnavbar-b4ap0r8w.js → nnavbar-l4xos9kw.js} +1 -1
  44. package/dist/client/_nuxt/{none-mz8h35k9.js → none-j493k6wm.js} +1 -1
  45. package/dist/client/_nuxt/{nsection-block-je23gs2w.js → nsection-block-egbswicp.js} +1 -1
  46. package/dist/client/_nuxt/{nselect-nvb1idpm.js → nselect-ioi0seuc.js} +1 -1
  47. package/dist/client/_nuxt/{nselect-tabs-fwdas30r.js → nselect-tabs-g53jlfar.js} +1 -1
  48. package/dist/client/_nuxt/{nswitch-ls95gzk4.js → nswitch-fe63il2r.js} +1 -1
  49. package/dist/client/_nuxt/{open-graph-e6wr9uqe.js → open-graph-c3v2g568.js} +1 -1
  50. package/dist/client/_nuxt/{overview-etz3y408.js → overview-kqlq2sz0.js} +1 -1
  51. package/dist/client/_nuxt/{pages-iubcr60c.js → pages-h5eaurpw.js} +1 -1
  52. package/dist/client/_nuxt/{payload-m9e323cd.js → payload-c8ikq1pb.js} +1 -1
  53. package/dist/client/_nuxt/pinia-hq7l4jea.js +1 -0
  54. package/dist/client/_nuxt/{plugins-kmy0sy6y.js → plugins-gmwa9k7w.js} +1 -1
  55. package/dist/client/_nuxt/{render-tree-depae72u.js → render-tree-jmtremgq.js} +1 -1
  56. package/dist/client/_nuxt/{runtime-configs-mmqwaa6s.js → runtime-configs-o3d6fqb4.js} +1 -1
  57. package/dist/client/_nuxt/{server-discovery-mjag1532.js → server-discovery-eo8vtqum.js} +1 -1
  58. package/dist/client/_nuxt/{server-route-inputs-e42a8bs5.js → server-route-inputs-b67yt8gz.js} +1 -1
  59. package/dist/client/_nuxt/{server-routes-g3nea2v8.js → server-routes-y5ufvi3u.js} +1 -1
  60. package/dist/client/_nuxt/{server-tasks-lrnz581v.js → server-tasks-kftsm9m7.js} +1 -1
  61. package/dist/client/_nuxt/{settings-hapu4is5.js → settings-l695ogca.js} +1 -1
  62. package/dist/client/_nuxt/{stacktrace-list-gp6s7nwa.js → stacktrace-list-bcj6vnom.js} +1 -1
  63. package/dist/client/_nuxt/{state-components-8k7sf46m.js → state-components-fc2pwsp2.js} +1 -1
  64. package/dist/client/_nuxt/{state-editor-kisl1jyp.js → state-editor-dk0l27xr.js} +1 -1
  65. package/dist/client/_nuxt/{state-modules-lzveckmy.js → state-modules-kznlrvp3.js} +1 -1
  66. package/dist/client/_nuxt/{storage-f2s67rns.js → storage-id6742p7.js} +1 -1
  67. package/dist/client/_nuxt/{terminals-mvgp8t5a.js → terminals-nkedy5k4.js} +1 -1
  68. package/dist/client/_nuxt/{timeline-oeagkh8k.js → timeline-wtko8gaq.js} +1 -1
  69. package/dist/client/_nuxt/{unocss-runtime-l38qoh5h.js → unocss-runtime-nd3zi5ym.js} +1 -1
  70. package/dist/client/_nuxt/vendor/{json-editor-vue-ikjc812x.js → json-editor-vue-gjlsq8io.js} +99 -134
  71. package/dist/client/_nuxt/vendor/{quicktype-core-i0qughny.js → quicktype-core-bmjj6ua7.js} +5 -57
  72. package/dist/client/_nuxt/vendor/{shiki-hpfujfi3.js → shiki-g7cm1eew.js} +12 -12
  73. package/dist/client/_nuxt/vendor/unocss-cmdaz4ot.js +3 -0
  74. package/dist/client/_nuxt/vendor/{vis-bs03k74b.js → vis-lxvjz9wh.js} +3 -61
  75. package/dist/client/_nuxt/{virtual-files-f297srwe.js → virtual-files-hzqpbnf8.js} +1 -1
  76. package/dist/client/_nuxt/vue-devtools-f6dfrqr1.js +2 -0
  77. package/dist/client/_nuxt/{vue-virtual-scroller.esm-b0ym3ct8.js → vue-virtual-scroller.esm-uia1jucn.js} +1 -1
  78. package/dist/client/index.html +1 -1
  79. package/dist/module.json +1 -1
  80. package/package.json +26 -26
  81. package/dist/client/_nuxt/__blank-dhzpxa9h.js +0 -1
  82. package/dist/client/_nuxt/builds/meta/748654cb-cf7c-463c-b0a9-cd67a30a6ae2.json +0 -1
  83. package/dist/client/_nuxt/error-404.css-da6qbpbu.css +0 -1
  84. package/dist/client/_nuxt/error-500.css-npck1tpq.css +0 -1
  85. package/dist/client/_nuxt/mp2i8ssm.js +0 -19
  86. package/dist/client/_nuxt/pinia-l1qdcrhg.js +0 -1
  87. package/dist/client/_nuxt/vendor/unocss-mh8fijzd.js +0 -3
  88. package/dist/client/_nuxt/vue-devtools-hb1vi95m.js +0 -2
@@ -1 +1 @@
1
- import{v as j,_ as H,w as J,x as F,a as X,b as Y,y as Z,z as G,A as Q,B as ee,C as te,D as ne,r as oe,E as ae}from"#entry";import{_ as S}from"./nbadge-d24jlq2b.js";import{p as D,k as A,q as k,Z as se,J as o,X as w,Y as t,a3 as e,ab as N,$ as C,F as g,ah as T,a7 as L,am as re,a4 as R,a1 as v,ac as I,u as c,D as le,a6 as ue}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as z}from"./filepath-item-owlv864w.js";import{_ as ie}from"./nsection-block-je23gs2w.js";import{_ as de}from"./launch-page-l87i7ewv.js";import{_ as pe}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./nicon-title-he6hzgyb.js";import"./nmarkdown-n6zsr15e.js";import"./client-miiq4qin.js";const ce={block:"","cursor-pointer":""},me={p2:""},_e=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},fe=D({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(m,{emit:l}){const h=m,V=l,y=A([]),f=k(()=>{const r=$(h.route.path);return y.value=Array.from({length:r.length},()=>""),r});function $(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(p=>p[0]===":"?p.replace(/\(\)$/,"?"):p)}const x=k(()=>f.value.map((r,p)=>r[0]===":"?y.value[p]:r).join("").replace(/\/+/g,"/")),a=k(()=>h.route.path.includes(":"));function s(){V("navigate",x.value)}return(r,p)=>{const _=j,n=H,u=se("VDropdown");return a.value?(t(),w(u,{key:1},{popper:C(({hide:b})=>[e("div",me,[e("form",{flex:"~ col",onSubmit:re(()=>{s(),b()},["prevent"])},[a.value?(t(),o(g,{key:0},[p[0]||(p[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),o(g,null,T(f.value,(i,d)=>(t(),o(g,{key:d},[i[0]===":"?(t(),w(_,{key:0,modelValue:y.value[d],"onUpdate:modelValue":B=>y.value[d]=B,"w-20":"","n-sm":"",placeholder:i.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),o("span",he,N(i),1))],64))),128))])],64)):R("",!0),v(n,{type:"submit",block:"",n:"primary"},{default:C(()=>[...p[1]||(p[1]=[I(" Navigate ",-1)])]),_:1})],40,_e)])]),default:C(()=>[e("code",ce,[(t(!0),o(g,null,T(f.value,(b,i)=>(t(),o("span",{key:i,class:L(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},N(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),o("button",{key:0,onClick:s},[e("code",null,N(m.route.path),1)]))}}}),ge=Object.assign(fe,{__name:"RoutePathItem"}),ye={"max-w-full":"","of-auto":""},xe={"w-full":""},be={"w-20":"","pr-1":""},ke={flex:"","items-center":"","justify-end":""},we={"text-sm":""},$e={flex:"inline gap3","items-center":""},Ce={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},Ne=["onClick"],Re=["onClick"],Pe={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ie={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Te={key:0},Be=["onClick"],Ee=D({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(m){const l=m,h=J(),V=F(),y=X(),f=k(()=>[...l.pages].sort((a,s)=>a.path.localeCompare(s.path)));function $(a){const s=l.layouts.find(r=>r.name===a);s&&h(s.file)}function x(a){if(typeof a=="string")return V.value?.middleware.find(s=>s.name===a)?.path}return(a,s)=>{const r=S,p=ge,_=z;return t(),o("div",ye,[e("table",xe,[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),o(g,null,T(f.value,n=>(t(),o("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",be,[e("div",ke,[m.matched.find(u=>u.name===n.name)?(t(),w(r,{key:0,n:"green",title:"active",textContent:"active"})):m.matchedPending.find(u=>u.name===n.name)?(t(),w(r,{key:1,n:"teal",title:"next",textContent:"next"})):R("",!0)])]),e("td",we,[e("div",$e,[v(p,{route:n,class:L(m.matched.find(u=>u.name===n.name)?"text-primary":m.matchedPending.find(u=>u.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=u=>a.$emit("navigate",u))},null,8,["route","class"]),e("div",Ce,[n.file||n.meta?.file?(t(),o("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:u=>c(h)(n.file||n.meta?.file)},[...s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)])],8,Ne)):R("",!0),n.file||n.meta?.file?(t(),o("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:u=>c(y)(n.file||n.meta?.file)},[...s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)])],8,Re)):R("",!0)])])]),e("td",Pe,N(n.name),1),e("td",Ve,[v(_,{filepath:x(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ie,[n.meta.layout===!1?(t(),o("span",Te,"-")):n.meta.layout?(t(),o("button",{key:1,onClick:u=>$(n.meta.layout)},N(n.meta.layout),9,Be)):(t(),o("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=u=>$("default"))}," (default) "))])]))),128))])])])}}}),Ae=Object.assign(Ee,{__name:"RoutesTable"}),De={},Le={class:"markdown-body"};function Me(m,l){return t(),o("div",Le,[...l[0]||(l[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Pages"),e("p",null,[I("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",{"v-pre":""},"~/pages/"),I(" directory.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")]),e("hr"),e("h1",null,"Middlewares"),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."),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const je=Y(De,[["render",Me]]),Fe={key:0,"h-full":"","of-auto":""},Se={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},ze={"font-mono":""},Oe={key:1,op50:""},Ue={key:0,"text-orange":"",op75:""},Ke={key:1,op50:""},We={"min-h-14":""},qe={key:1,class:"py-4 text-center"},He={"w-full":""},Je={mr1:""},lt=D({__name:"pages",setup(m){const l=Z(),h=G(),V=Q(),y=F(),f=ee(),$=te(),x=k(()=>y.value?.middleware||[]),a=A(""),s=A(0),r=k(()=>(x.value,a.value,f.value,s.value,l.value?.currentRoute?.value?.path));le(()=>{h.value&&(a.value=l.value?.currentRoute?.value?.path),l.value?.beforeEach(i=>{a.value=i.fullPath}),l.value?.afterEach(i=>{a.value=i.fullPath})});async function p(){a.value!==l.value?.currentRoute?.value?.path&&l.value.push(a.value||"/")}const _=k(()=>l.value.resolve(a.value||"/").matched);function n(i){l.value.push(i),a.value=i}const u=ne(),b=k(()=>`./${u===4?"app/":""}pages/index.vue`);return(i,d)=>{const B=j,M=Ae,E=ie,O=S,U=z,K=de,W=je,q=pe;return t(),o(g,null,[c(V)?.pages&&c(l)?(t(),o("div",Fe,[e("div",Se,[e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[1]||(d[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",ze,N(r.value),1),d[2]||(d[2]=e("span",{op50:""}," to ",-1))],64)):(t(),o("span",Oe,"Current route"))]),v(B,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=P=>a.value=P),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(r.value===a.value?"":_.value.length?"text-green":"text-orange"),onKeydown:ue(p,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[3]||(d[3]=e("span",null,[I("Press "),e("b",{"font-bold":""},"Enter"),I(" to navigate")],-1)),_.value.length?R("",!0):(t(),o("span",Ue," (no match)"))],64)):(t(),o("span",Ke,"Edit path above to navigate"))])]),v(E,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:C(()=>[e("div",We,[_.value.length?(t(),w(M,{key:0,pages:_.value,layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),o("div",qe,[...d[4]||(d[4]=[e("span",{op50:""},"No routes matched",-1)])]))])]),_:1}),v(E,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c($).length} routes registered in your application`,padding:"pr5"},{default:C(()=>[v(M,{pages:c($),layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),x.value.length?(t(),w(E,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${x.value.length} middleware registered in your application`,padding:"px13"},{default:C(()=>[e("table",He,[d[5]||(d[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),o(g,null,T(x.value,P=>(t(),o("tr",{key:P.path,"h-7":""},[e("td",null,[e("span",Je,N(P.name),1),P.global?(t(),w(O,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):R("",!0)]),e("td",null,[v(U,{filepath:P.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):R("",!0)])):(t(),w(K,{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 i?i.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in i?i.ensureDevAuthToken:c(ae))(),"enablePages")}}]},null,8,["description","actions"])),v(q,null,{default:C(()=>[v(W)]),_:1})],64)}}});export{lt as default};
1
+ import{v as j,_ as H,w as J,x as F,a as X,b as Y,y as Z,z as G,A as Q,B as ee,C as te,D as ne,r as oe,E as ae}from"#entry";import{_ as S}from"./nbadge-b5jyufiz.js";import{p as D,k as A,q as k,Z as se,J as o,X as w,Y as t,a3 as e,ab as N,$ as C,F as g,ah as T,a7 as L,am as re,a4 as R,a1 as v,ac as I,u as c,D as le,a6 as ue}from"./vendor/json-editor-vue-gjlsq8io.js";import{_ as z}from"./filepath-item-i5bipy7o.js";import{_ as ie}from"./nsection-block-egbswicp.js";import{_ as de}from"./launch-page-hs2f7bb3.js";import{_ as pe}from"./help-fab-9epbigv8.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";import"./nicon-title-d35s6mci.js";import"./nmarkdown-nigjp7j4.js";import"./client-c7ye0k5n.js";const ce={block:"","cursor-pointer":""},me={p2:""},_e=["onSubmit"],ve={flex:"~","items-center":"",p2:"","text-sm":"","font-mono":""},he={key:1},fe=D({__name:"RoutePathItem",props:{route:{}},emits:["navigate"],setup(m,{emit:l}){const h=m,V=l,y=A([]),f=k(()=>{const r=$(h.route.path);return y.value=Array.from({length:r.length},()=>""),r});function $(r){return r.split(/(:\w+[?*]?(?:\(\))?)/).filter(Boolean).map(p=>p[0]===":"?p.replace(/\(\)$/,"?"):p)}const x=k(()=>f.value.map((r,p)=>r[0]===":"?y.value[p]:r).join("").replace(/\/+/g,"/")),a=k(()=>h.route.path.includes(":"));function s(){V("navigate",x.value)}return(r,p)=>{const _=j,n=H,u=se("VDropdown");return a.value?(t(),w(u,{key:1},{popper:C(({hide:b})=>[e("div",me,[e("form",{flex:"~ col",onSubmit:re(()=>{s(),b()},["prevent"])},[a.value?(t(),o(g,{key:0},[p[0]||(p[0]=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1)),e("div",ve,[(t(!0),o(g,null,T(f.value,(i,d)=>(t(),o(g,{key:d},[i[0]===":"?(t(),w(_,{key:0,modelValue:y.value[d],"onUpdate:modelValue":B=>y.value[d]=B,"w-20":"","n-sm":"",placeholder:i.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(t(),o("span",he,N(i),1))],64))),128))])],64)):R("",!0),v(n,{type:"submit",block:"",n:"primary"},{default:C(()=>[...p[1]||(p[1]=[I(" Navigate ",-1)])]),_:1})],40,_e)])]),default:C(()=>[e("code",ce,[(t(!0),o(g,null,T(f.value,(b,i)=>(t(),o("span",{key:i,class:L(b[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},N(b[0]===":"?b.slice(1):b),3))),128))])]),_:1})):(t(),o("button",{key:0,onClick:s},[e("code",null,N(m.route.path),1)]))}}}),ge=Object.assign(fe,{__name:"RoutePathItem"}),ye={"max-w-full":"","of-auto":""},xe={"w-full":""},be={"w-20":"","pr-1":""},ke={flex:"","items-center":"","justify-end":""},we={"text-sm":""},$e={flex:"inline gap3","items-center":""},Ce={flex:"~ gap1",pr2:"",op0:"","group-hover:op100":""},Ne=["onClick"],Re=["onClick"],Pe={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","text-sm":"","font-mono":"",op50:""},Ve={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","text-sm":"","font-mono":"",op50:""},Ie={"w-0":"","ws-nowrap":"","text-center":"","text-sm":"","font-mono":""},Te={key:0},Be=["onClick"],Ee=D({__name:"RoutesTable",props:{pages:{},layouts:{},matched:{},matchedPending:{}},emits:["navigate"],setup(m){const l=m,h=J(),V=F(),y=X(),f=k(()=>[...l.pages].sort((a,s)=>a.path.localeCompare(s.path)));function $(a){const s=l.layouts.find(r=>r.name===a);s&&h(s.file)}function x(a){if(typeof a=="string")return V.value?.middleware.find(s=>s.name===a)?.path}return(a,s)=>{const r=S,p=ge,_=z;return t(),o("div",ye,[e("table",xe,[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),o(g,null,T(f.value,n=>(t(),o("tr",{key:n.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",be,[e("div",ke,[m.matched.find(u=>u.name===n.name)?(t(),w(r,{key:0,n:"green",title:"active",textContent:"active"})):m.matchedPending.find(u=>u.name===n.name)?(t(),w(r,{key:1,n:"teal",title:"next",textContent:"next"})):R("",!0)])]),e("td",we,[e("div",$e,[v(p,{route:n,class:L(m.matched.find(u=>u.name===n.name)?"text-primary":m.matchedPending.find(u=>u.name===n.name)?"text-teal":""),"ws-nowrap":"",onNavigate:s[0]||(s[0]=u=>a.$emit("navigate",u))},null,8,["route","class"]),e("div",Ce,[n.file||n.meta?.file?(t(),o("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:u=>c(h)(n.file||n.meta?.file)},[...s[2]||(s[2]=[e("div",{"i-carbon-script-reference":""},null,-1)])],8,Ne)):R("",!0),n.file||n.meta?.file?(t(),o("button",{key:1,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Copy path",onClick:u=>c(y)(n.file||n.meta?.file)},[...s[3]||(s[3]=[e("div",{"i-carbon-copy":""},null,-1)])],8,Re)):R("",!0)])])]),e("td",Pe,N(n.name),1),e("td",Ve,[v(_,{filepath:x(n.meta.middleware),override:`${n.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ie,[n.meta.layout===!1?(t(),o("span",Te,"-")):n.meta.layout?(t(),o("button",{key:1,onClick:u=>$(n.meta.layout)},N(n.meta.layout),9,Be)):(t(),o("button",{key:2,"text-sm":"",op15:"",onClick:s[1]||(s[1]=u=>$("default"))}," (default) "))])]))),128))])])])}}}),Ae=Object.assign(Ee,{__name:"RoutesTable"}),De={},Le={class:"markdown-body"};function Me(m,l){return t(),o("div",Le,[...l[0]||(l[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Pages"),e("p",null,[I("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",{"v-pre":""},"~/pages/"),I(" directory.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more in the documentation")]),e("hr"),e("h1",null,"Middlewares"),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."),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const je=Y(De,[["render",Me]]),Fe={key:0,"h-full":"","of-auto":""},Se={border:"b base",flex:"~ col gap1","n-navbar-glass":"",px4:"",py3:""},ze={"font-mono":""},Oe={key:1,op50:""},Ue={key:0,"text-orange":"",op75:""},Ke={key:1,op50:""},We={"min-h-14":""},qe={key:1,class:"py-4 text-center"},He={"w-full":""},Je={mr1:""},lt=D({__name:"pages",setup(m){const l=Z(),h=G(),V=Q(),y=F(),f=ee(),$=te(),x=k(()=>y.value?.middleware||[]),a=A(""),s=A(0),r=k(()=>(x.value,a.value,f.value,s.value,l.value?.currentRoute?.value?.path));le(()=>{h.value&&(a.value=l.value?.currentRoute?.value?.path),l.value?.beforeEach(i=>{a.value=i.fullPath}),l.value?.afterEach(i=>{a.value=i.fullPath})});async function p(){a.value!==l.value?.currentRoute?.value?.path&&l.value.push(a.value||"/")}const _=k(()=>l.value.resolve(a.value||"/").matched);function n(i){l.value.push(i),a.value=i}const u=ne(),b=k(()=>`./${u===4?"app/":""}pages/index.vue`);return(i,d)=>{const B=j,M=Ae,E=ie,O=S,U=z,K=de,W=je,q=pe;return t(),o(g,null,[c(V)?.pages&&c(l)?(t(),o("div",Fe,[e("div",Se,[e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[1]||(d[1]=e("span",{op50:""},"Navigate from ",-1)),e("span",ze,N(r.value),1),d[2]||(d[2]=e("span",{op50:""}," to ",-1))],64)):(t(),o("span",Oe,"Current route"))]),v(B,{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=P=>a.value=P),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(r.value===a.value?"":_.value.length?"text-green":"text-orange"),onKeydown:ue(p,["enter"])},null,8,["modelValue","class"]),e("div",null,[r.value!==a.value?(t(),o(g,{key:0},[d[3]||(d[3]=e("span",null,[I("Press "),e("b",{"font-bold":""},"Enter"),I(" to navigate")],-1)),_.value.length?R("",!0):(t(),o("span",Ue," (no match)"))],64)):(t(),o("span",Ke,"Edit path above to navigate"))])]),v(E,{icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:C(()=>[e("div",We,[_.value.length?(t(),w(M,{key:0,pages:_.value,layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])):(t(),o("div",qe,[...d[4]||(d[4]=[e("span",{op50:""},"No routes matched",-1)])]))])]),_:1}),v(E,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${c($).length} routes registered in your application`,padding:"pr5"},{default:C(()=>[v(M,{pages:c($),layouts:c(f)||[],matched:c(h).matched,"matched-pending":_.value,onNavigate:n},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),x.value.length?(t(),w(E,{key:0,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${x.value.length} middleware registered in your application`,padding:"px13"},{default:C(()=>[e("table",He,[d[5]||(d[5]=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1)),(t(!0),o(g,null,T(x.value,P=>(t(),o("tr",{key:P.path,"h-7":""},[e("td",null,[e("span",Je,N(P.name),1),P.global?(t(),w(O,{key:0,n:"green",title:"Registered at runtime as a global component",textContent:"global"})):R("",!0)]),e("td",null,[v(U,{filepath:P.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):R("",!0)])):(t(),w(K,{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 i?i.rpc:c(oe)).runWizard(await("ensureDevAuthToken"in i?i.ensureDevAuthToken:c(ae))(),"enablePages")}}]},null,8,["description","actions"])),v(q,null,{default:C(()=>[v(W)]),_:1})],64)}}});export{lt as default};
@@ -1 +1 @@
1
- import{_ as h}from"./state-editor-kisl1jyp.js";import{p as k,J as i,Y as t,F as $,ah as N,X as f,$ as a,a0 as B,a2 as w,a3 as d,q as b,aj as O,a4 as m,a1 as n,u as j,ad as F,ac as V}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as E}from"./nsection-block-je23gs2w.js";import{b as G,f as P,_ as R}from"#entry";import{_ as A}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";const H={key:0,flex:"~ col gap-1"},K={key:1,mt2:"",px4:"",italic:"",op35:""},T=k({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(o){return(e,r)=>{const l=h;return t(),i("div",null,[o.state&&Object.keys(o.state).length>0?(t(),i("div",H,[(t(!0),i($,null,N(o.state,(u,s)=>(t(),f(l,{key:s,revision:o.revision,state:u,name:s.startsWith(o.prefix)?s.slice(o.prefix.length):s},{actions:a(c=>[B(e.$slots,"actions",w({ref_for:!0},c))]),_:3},8,["revision","state","name"]))),128))])):(t(),i("div",K," No data "))])}}}),q=Object.assign(T,{__name:"StateGroup"}),J={},L={class:"markdown-body"};function W(o,e){return t(),i("div",L,[...e[0]||(e[0]=[d("template",null,[d("div",{class:"markdown-body"},[d("h1",null,"State & Async Data"),d("p",null,"// TODO")])],-1)])])}const X=G(J,[["render",W]]),Y={key:0},at=k({__name:"payload",setup(o){const e=P(),r=b(()=>e.value?.nuxt.payload),l=b(()=>e.value?.revision.value);async function u(s){await e.value?.nuxt.hooks.callHookParallel("app:data:refresh",s)}return(s,c)=>{const v=q,p=E,x=R,S=h,g=X,D=A,C=O("tooltip");return t(),i($,null,[j(e)?(t(),i("div",Y,[n(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[n(v,{state:r.value.state,revision:l.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),n(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[n(x,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=y=>u())},{default:a(()=>[...c[1]||(c[1]=[V(" Re-fetch all data ",-1)])]),_:1})]),default:a(()=>[n(v,{state:r.value.data,revision:l.value},{actions:a(({isOpen:y,name:_})=>[y&&_?F((t(),f(x,{key:0,title:`Re-fetch '${_}'`,icon:"carbon-recycle",border:!1,onClick:z=>u([_])},null,8,["title","onClick"])),[[C,`Re-fetch '${_}'`,void 0,{bottom:!0}]]):m("",!0)]),_:1},8,["state","revision"])]),_:1}),r.value.functions&&Object.keys(r.value.functions).length?(t(),f(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[n(S,{"ml--6":"",state:r.value.functions,revision:l.value},null,8,["state","revision"])]),_:1})):m("",!0)])):m("",!0),n(D,null,{default:a(()=>[n(g)]),_:1})],64)}}});export{at as default};
1
+ import{_ as h}from"./state-editor-dk0l27xr.js";import{p as k,J as i,Y as t,F as $,ah as N,X as f,$ as a,a0 as B,a2 as w,a3 as d,q as b,aj as O,a4 as m,a1 as n,u as j,ad as F,ac as V}from"./vendor/json-editor-vue-gjlsq8io.js";import{_ as E}from"./nsection-block-egbswicp.js";import{b as G,f as P,_ as R}from"#entry";import{_ as A}from"./help-fab-9epbigv8.js";import"./data-schema-button-n4i5g8zd.js";import"./nicon-title-d35s6mci.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";const H={key:0,flex:"~ col gap-1"},K={key:1,mt2:"",px4:"",italic:"",op35:""},T=k({__name:"StateGroup",props:{state:{},revision:{},prefix:{default:""}},setup(o){return(e,r)=>{const l=h;return t(),i("div",null,[o.state&&Object.keys(o.state).length>0?(t(),i("div",H,[(t(!0),i($,null,N(o.state,(u,s)=>(t(),f(l,{key:s,revision:o.revision,state:u,name:s.startsWith(o.prefix)?s.slice(o.prefix.length):s},{actions:a(c=>[B(e.$slots,"actions",w({ref_for:!0},c))]),_:3},8,["revision","state","name"]))),128))])):(t(),i("div",K," No data "))])}}}),q=Object.assign(T,{__name:"StateGroup"}),J={},L={class:"markdown-body"};function W(o,e){return t(),i("div",L,[...e[0]||(e[0]=[d("template",null,[d("div",{class:"markdown-body"},[d("h1",null,"State & Async Data"),d("p",null,"// TODO")])],-1)])])}const X=G(J,[["render",W]]),Y={key:0},at=k({__name:"payload",setup(o){const e=P(),r=b(()=>e.value?.nuxt.payload),l=b(()=>e.value?.revision.value);async function u(s){await e.value?.nuxt.hooks.callHookParallel("app:data:refresh",s)}return(s,c)=>{const v=q,p=E,x=R,S=h,g=X,D=A,C=O("tooltip");return t(),i($,null,[j(e)?(t(),i("div",Y,[n(p,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[n(v,{state:r.value.state,revision:l.value,prefix:"$s"},null,8,["state","revision"])]),_:1}),n(p,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[n(x,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=y=>u())},{default:a(()=>[...c[1]||(c[1]=[V(" Re-fetch all data ",-1)])]),_:1})]),default:a(()=>[n(v,{state:r.value.data,revision:l.value},{actions:a(({isOpen:y,name:_})=>[y&&_?F((t(),f(x,{key:0,title:`Re-fetch '${_}'`,icon:"carbon-recycle",border:!1,onClick:z=>u([_])},null,8,["title","onClick"])),[[C,`Re-fetch '${_}'`,void 0,{bottom:!0}]]):m("",!0)]),_:1},8,["state","revision"])]),_:1}),r.value.functions&&Object.keys(r.value.functions).length?(t(),f(p,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions"},{default:a(()=>[n(S,{"ml--6":"",state:r.value.functions,revision:l.value},null,8,["state","revision"])]),_:1})):m("",!0)])):m("",!0),n(D,null,{default:a(()=>[n(g)]),_:1})],64)}}});export{at as default};
@@ -0,0 +1 @@
1
+ import{F as r}from"#entry";import{u as c,y as p}from"./vue-devtools-f6dfrqr1.js";import{p as i,J as m,Y as e,X as o,u as n,$ as _,ac as u}from"./vendor/json-editor-vue-gjlsq8io.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";import"./vue-virtual-scroller.esm-uia1jucn.js";const l={class:"h-full w-full"},h=i({__name:"pinia",setup(f){const{connected:s}=c();return(d,t)=>{const a=r;return e(),m("div",l,[n(s)?(e(),o(n(p),{key:0})):(e(),o(a,{key:1},{default:_(()=>[...t[0]||(t[0]=[u(" Connecting.... ",-1)])]),_:1}))])}}});export{h as default};
@@ -1 +1 @@
1
- import{_ as S}from"./nbadge-d24jlq2b.js";import{_ as D}from"./filepath-item-owlv864w.js";import{_ as k}from"./duration-display-cjpkh71u.js";import{A as B,a3 as H,I,b as P,x as V,f as j}from"#entry";import{p as v,q as h,J as m,Y as s,a3 as n,a1 as l,a4 as _,ab as C,$ as d,X as u,Z as F,a0 as T,ac as x,F as b,ah as E,a7 as O}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as W}from"./nsection-block-je23gs2w.js";import{_ as A}from"./help-fab-chg6ox1v.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./nicon-title-he6hzgyb.js";const L={flex:"~ gap2","items-center":""},M={w8:"","text-right":"","text-sm":"",op25:""},Y={key:0,"flex-auto":"","text-right":""},q=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(e){const t=e,a=B(),c=h(()=>H(t.plugin.src,a.value?.rootDir||"").path);return(f,p)=>{const o=S,r=D,i=k;return s(),m("div",L,[n("div",M,C(e.index),1),l(r,{filepath:t.plugin.src,subpath:!0},{default:d(()=>[n("div",null,[c.value.startsWith("#")?(s(),u(o,{key:0,n:"rose",textContent:"virtual"})):c.value.startsWith(".")?_("",!0):(s(),u(o,{key:1,n:"gray",textContent:"module"})),e.plugin.mode==="server"?(s(),u(o,{key:2,n:"teal",textContent:"server"})):_("",!0),e.plugin.mode==="client"?(s(),u(o,{key:3,n:"orange",textContent:"client"})):_("",!0)])]),_:1},8,["filepath"]),e.plugin.metric?.duration!=null?(s(),m("div",Y,[l(i,{duration:e.plugin.metric?.duration,factor:10},null,8,["duration"])])):_("",!0)])}}}),z=Object.assign(q,{__name:"PluginItem"}),J={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},R={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(e){return(t,a)=>{const c=I,f=F("ContentSlot");return s(),m("div",J,[n("div",R,[e.icon?(s(),u(c,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):_("",!0),n("div",null,C(e.title),1)]),n("div",null,[T(t.$slots,"default",{},()=>[l(f,{use:t.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z=Object.assign(X,{__name:"HelpTip"}),G={};function K(e,t){const a=Z;return s(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:d(()=>[T(e.$slots,"default")]),_:3})}const Q=Object.assign(P(G,[["render",K]]),{__name:"HelpTipPerformance"}),U={},tt={class:"markdown-body"},nt={class:"markdown-body"};function et(e,t){const a=Q;return s(),m("div",tt,[n("template",null,[n("div",nt,[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",{"v-pre":""},"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),l(a,null,{default:d(()=>[...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)])]),_:1}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])])])}const ot=P(U,[["render",et]]),st={pt4:""},it={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},gt=v({__name:"plugins",setup(e){const t=V(),a=j(),c=h(()=>{const p=t.value?.plugins||[],o=a.value?.metrics.clientPlugins()||[];return p.map(r=>{const i=typeof r=="string"?{src:r}:r;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),f=h(()=>{const p=a.value?.metrics.clientPlugins()||[],o=Math.min(...p.map(i=>i.start));return Math.max(...p.map(i=>i.end))-o});return(p,o)=>{const r=z,i=k,g=W,w=ot,N=A;return s(),m(b,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${c.value.length}`},{default:d(()=>[n("div",st,[(s(!0),m(b,null,E(c.value,(y,$)=>(s(),u(r,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:O($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",it,[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)),l(i,{duration:f.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:d(()=>[l(w)]),_:1})],64)}}});export{gt as default};
1
+ import{_ as S}from"./nbadge-b5jyufiz.js";import{_ as D}from"./filepath-item-i5bipy7o.js";import{_ as k}from"./duration-display-jckntkny.js";import{A as B,a3 as H,I,b as P,x as V,f as j}from"#entry";import{p as v,q as h,J as m,Y as s,a3 as n,a1 as l,a4 as _,ab as C,$ as d,X as u,Z as F,a0 as T,ac as x,F as b,ah as E,a7 as O}from"./vendor/json-editor-vue-gjlsq8io.js";import{_ as W}from"./nsection-block-egbswicp.js";import{_ as A}from"./help-fab-9epbigv8.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";import"./nicon-title-d35s6mci.js";const L={flex:"~ gap2","items-center":""},M={w8:"","text-right":"","text-sm":"",op25:""},Y={key:0,"flex-auto":"","text-right":""},q=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(e){const t=e,a=B(),c=h(()=>H(t.plugin.src,a.value?.rootDir||"").path);return(f,p)=>{const o=S,r=D,i=k;return s(),m("div",L,[n("div",M,C(e.index),1),l(r,{filepath:t.plugin.src,subpath:!0},{default:d(()=>[n("div",null,[c.value.startsWith("#")?(s(),u(o,{key:0,n:"rose",textContent:"virtual"})):c.value.startsWith(".")?_("",!0):(s(),u(o,{key:1,n:"gray",textContent:"module"})),e.plugin.mode==="server"?(s(),u(o,{key:2,n:"teal",textContent:"server"})):_("",!0),e.plugin.mode==="client"?(s(),u(o,{key:3,n:"orange",textContent:"client"})):_("",!0)])]),_:1},8,["filepath"]),e.plugin.metric?.duration!=null?(s(),m("div",Y,[l(i,{duration:e.plugin.metric?.duration,factor:10},null,8,["duration"])])):_("",!0)])}}}),z=Object.assign(q,{__name:"PluginItem"}),J={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},R={flex:"~ items-center gap-1","font-bold":""},X=v({__name:"HelpTip",props:{title:{},icon:{}},setup(e){return(t,a)=>{const c=I,f=F("ContentSlot");return s(),m("div",J,[n("div",R,[e.icon?(s(),u(c,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):_("",!0),n("div",null,C(e.title),1)]),n("div",null,[T(t.$slots,"default",{},()=>[l(f,{use:t.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),Z=Object.assign(X,{__name:"HelpTip"}),G={};function K(e,t){const a=Z;return s(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:d(()=>[T(e.$slots,"default")]),_:3})}const Q=Object.assign(P(G,[["render",K]]),{__name:"HelpTipPerformance"}),U={},tt={class:"markdown-body"},nt={class:"markdown-body"};function et(e,t){const a=Q;return s(),m("div",tt,[n("template",null,[n("div",nt,[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",{"v-pre":""},"plugins/"),x(" directory and they will be automatically imported and registered.")],-1)),l(a,null,{default:d(()=>[...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)])]),_:1}),t[3]||(t[3]=n("p",null,[n("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1))])])])}const ot=P(U,[["render",et]]),st={pt4:""},it={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},gt=v({__name:"plugins",setup(e){const t=V(),a=j(),c=h(()=>{const p=t.value?.plugins||[],o=a.value?.metrics.clientPlugins()||[];return p.map(r=>{const i=typeof r=="string"?{src:r}:r;return{...i,metric:o.find(g=>g.src===i.src||g.src.startsWith(i.src))}})}),f=h(()=>{const p=a.value?.metrics.clientPlugins()||[],o=Math.min(...p.map(i=>i.start));return Math.max(...p.map(i=>i.end))-o});return(p,o)=>{const r=z,i=k,g=W,w=ot,N=A;return s(),m(b,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${c.value.length}`},{default:d(()=>[n("div",st,[(s(!0),m(b,null,E(c.value,(y,$)=>(s(),u(r,{key:y.src,plugin:y,index:$+1,"ml--4":"","border-base":"",py2:"",class:O($?"border-t":"")},null,8,["plugin","index","class"]))),128)),n("div",it,[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)),l(i,{duration:f.value,factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:d(()=>[l(w)]),_:1})],64)}}});export{gt as default};
@@ -1 +1 @@
1
- import{f as m,w as c,F as d}from"#entry";import{u as f,f as _}from"./vue-devtools-hb1vi95m.js";import{p as v,J as C,Y as n,X as l,u as o,$ as E,ac as I}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./vue-virtual-scroller.esm-b0ym3ct8.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:a}=f(),t=m(),p=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=d;return n(),C("div",k,[o(a)?(n(),l(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(),l(i,{key:1},{default:E(()=>[...e[2]||(e[2]=[I(" Connecting.... ",-1)])]),_:1}))])}}});export{N as default};
1
+ import{f as m,w as c,F as d}from"#entry";import{u as f,C as _}from"./vue-devtools-f6dfrqr1.js";import{p as v,J as C,Y as n,X as l,u as o,$ as E,ac as I}from"./vendor/json-editor-vue-gjlsq8io.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";import"./vue-virtual-scroller.esm-uia1jucn.js";const k={class:"h-full w-full"},N=v({__name:"render-tree",setup(x){const{connected:a}=f(),t=m(),p=c();function s(r){r?t.value.devtools.open():t.value.devtools.close()}return(r,e)=>{const i=d;return n(),C("div",k,[o(a)?(n(),l(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(),l(i,{key:1},{default:E(()=>[...e[2]||(e[2]=[I(" Connecting.... ",-1)])]),_:1}))])}}});export{N as default};
@@ -1 +1 @@
1
- import{_ as x}from"./state-editor-kisl1jyp.js";import{_ as b}from"./nsection-block-je23gs2w.js";import{b as y,f as C,bn as k}from"#entry";import{J as u,Y as l,a3 as e,ac as p,p as w,q as c,a4 as N,a1 as t,u as m,$ as i,F as R}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as T}from"./help-fab-chg6ox1v.js";import"./data-schema-button-hqryewml.js";import"./nicon-title-he6hzgyb.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";const B={},V={class:"markdown-body"};function D(d,n){return l(),u("div",V,[...n[0]||(n[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Runtime Configs"),e("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."),e("p",null,[p("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 "),e("code",{"v-pre":""},"nuxt.config.js"),p(" file, or check more details in the documentation.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const F=y(B,[["render",D]]),P={key:0},Y=w({__name:"runtime-configs",setup(d){const n=C(),_=k(),f=c(()=>n.value?.nuxt.payload),a=c(()=>n.value?.revision.value),v=c(()=>{const o={..._.value};return delete o.public,delete o.app,o});return(o,S)=>{const s=x,r=b,g=F,h=T;return l(),u(R,null,[m(n)?(l(),u("div",P,[t(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:i(()=>[t(s,{state:m(n).app.appConfig,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:i(()=>[t(s,{state:f.value.config?.public,revision:a.value},null,8,["state","revision"])]),_:1}),t(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:i(()=>[t(s,{state:v.value,revision:a.value,readonly:""},null,8,["state","revision"])]),_:1})])):N("",!0),t(h,null,{default:i(()=>[t(g)]),_:1})],64)}}});export{Y as default};
1
+ import{_ as x}from"./state-editor-dk0l27xr.js";import{_ as b}from"./nsection-block-egbswicp.js";import{b as y,f as C,bn as k}from"#entry";import{J as u,Y as l,a3 as e,ac as p,p as w,q as c,a4 as N,a1 as t,u as m,$ as i,F as R}from"./vendor/json-editor-vue-gjlsq8io.js";import{_ as T}from"./help-fab-9epbigv8.js";import"./data-schema-button-n4i5g8zd.js";import"./nicon-title-d35s6mci.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";const B={},V={class:"markdown-body"};function D(d,n){return l(),u("div",V,[...n[0]||(n[0]=[e("template",null,[e("div",{class:"markdown-body"},[e("h1",null,"Runtime Configs"),e("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."),e("p",null,[p("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 "),e("code",{"v-pre":""},"nuxt.config.js"),p(" file, or check more details in the documentation.")]),e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")])])],-1)])])}const F=y(B,[["render",D]]),P={key:0},Y=w({__name:"runtime-configs",setup(d){const n=C(),_=k(),f=c(()=>n.value?.nuxt.payload),a=c(()=>n.value?.revision.value),v=c(()=>{const o={..._.value};return delete o.public,delete o.app,o});return(o,S)=>{const s=x,r=b,g=F,h=T;return l(),u(R,null,[m(n)?(l(),u("div",P,[t(r,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:i(()=>[t(s,{state:m(n).app.appConfig,revision:a.value},null,8,["state","revision"])]),_:1}),t(r,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:i(()=>[t(s,{state:f.value.config?.public,revision:a.value},null,8,["state","revision"])]),_:1}),t(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:i(()=>[t(s,{state:v.value,revision:a.value,readonly:""},null,8,["state","revision"])]),_:1})])):N("",!0),t(h,null,{default:i(()=>[t(g)]),_:1})],64)}}});export{Y as default};
@@ -1 +1 @@
1
- import{b8 as S,r as k,E as M,bo as P}from"#entry";import{p as A,aE as R,D as L,M as C,J as U,Y as T,u as x}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.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"&&typeof s!="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 Y=["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,Y))}});export{ee as default};
1
+ import{b8 as S,r as k,E as M,bo as P}from"#entry";import{p as A,aE as R,D as L,M as C,J as U,Y as T,u as x}from"./vendor/json-editor-vue-gjlsq8io.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.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"&&typeof s!="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 Y=["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,Y))}});export{ee as default};
@@ -1 +1 @@
1
- import{_ as D}from"./ncheckbox-eijyrwcq.js";import{H as F,v as O,_ as R,I as T}from"#entry";import{_ as A}from"./nselect-nvb1idpm.js";import{p as E,q as C,x as L,J as r,Y as o,a4 as m,a0 as y,F as v,ah as x,X as i,a7 as b,a1 as V,$ as g,a3 as S,ab as q,u as c,ac as $}from"./vendor/json-editor-vue-ikjc812x.js";const z={p4:"",flex:"~ col gap-4"},H={key:1,ml2:"",flex:""},J=["value"],K={key:0,flex:"","gap-4":""},M=E({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(n,{emit:U}){const _=n,d=F(_,"modelValue",U,{passive:!0}),N=C(()=>[..._.keys,"active","key","value","type"]),I=C(()=>{const t={};for(const e of N.value)t[e]=_.default[e]||"";return t}),w=["string","number","boolean","file","date","time","datetime-local"];function B(t,e){const u=e.target;if(u.files&&u.files[0]){const p=u.files[0],f=new FileReader;f.readAsDataURL(p),f.onload=()=>{d.value[t].value=f.result}}}return L(()=>d,t=>{t.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const u=Number.parseFloat(e.value);e.value=Number.isNaN(u)?0:u}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"}),(t,e)=>{const u=D,p=O,f=A,j=T,h=R;return o(),r("div",z,[(o(!0),r(v,null,x(c(d),(l,k)=>(o(),r("div",{key:k,flex:"~ gap-2","justify-around":""},[y(t.$slots,"input",{item:l}),(o(!0),r(v,null,x(N.value,s=>(o(),r(v,{key:s},[l.type!==null&&s==="active"?(o(),i(u,{key:0,modelValue:l[s],"onUpdate:modelValue":a=>l[s]=a,n:"sm primary",disabled:n.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):m("",!0),l.type!==null&&s==="key"?(o(),i(p,{key:1,modelValue:l[s],"onUpdate:modelValue":a=>l[s]=a,placeholder:s,"flex-1":"","font-mono":"",n:"sm primary",disabled:n.disabled,class:b(n.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):s==="value"?(o(),r(v,{key:2},[l.type==="file"?(o(),i(p,{key:0,type:"file",disabled:n.disabled,class:b(n.disabled?"op75":""),onChange:a=>B(k,a)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(o(),r("div",H,[V(u,{modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,placeholder:"Value",n:"green lg",disabled:n.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(o(),i(p,{key:2,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:n.disabled,class:b(n.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):s==="type"?(o(),i(f,{key:3,modelValue:l.type,"onUpdate:modelValue":a=>l.type=a,n:"sm green",class:b(n.disabled?"op75":""),disabled:n.disabled},{default:g(()=>[(o(),r(v,null,x(w,a=>S("option",{key:a,value:a},q(a),9,J)),64))]),_:1},8,["modelValue","onUpdate:modelValue","class","disabled"])):m("",!0)],64))),128)),y(t.$slots,"input-actions",{},()=>[V(h,{n:"red",disabled:n.disabled,class:b(n.disabled?"op0!":""),onClick:s=>c(d).splice(k,1)},{default:g(()=>[V(j,{icon:"carbon:trash-can"})]),_:1},8,["disabled","class","onClick"])])]))),128)),n.disabled?m("",!0):(o(),r("div",K,[y(t.$slots,"actions",{params:c(d)},()=>[V(h,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=l=>c(d).push({...I.value}))},{default:g(()=>[...e[2]||(e[2]=[$(" Add ",-1)])]),_:1}),e[4]||(e[4]=S("div",{"flex-auto":""},null,-1)),c(d).length?(o(),i(h,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=l=>c(d).splice(0,c(d).length))},{default:g(()=>[...e[3]||(e[3]=[$(" Remove All ",-1)])]),_:1})):m("",!0)])])),y(t.$slots,"default")])}}}),W=Object.assign(M,{__name:"ServerRouteInputs"});export{W as _};
1
+ import{_ as D}from"./ncheckbox-dhpz73wm.js";import{H as F,v as O,_ as R,I as T}from"#entry";import{_ as A}from"./nselect-ioi0seuc.js";import{p as E,q as C,x as L,J as r,Y as o,a4 as m,a0 as y,F as v,ah as x,X as i,a7 as b,a1 as V,$ as g,a3 as S,ab as q,u as c,ac as $}from"./vendor/json-editor-vue-gjlsq8io.js";const z={p4:"",flex:"~ col gap-4"},H={key:1,ml2:"",flex:""},J=["value"],K={key:0,flex:"","gap-4":""},M=E({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(n,{emit:U}){const _=n,d=F(_,"modelValue",U,{passive:!0}),N=C(()=>[..._.keys,"active","key","value","type"]),I=C(()=>{const t={};for(const e of N.value)t[e]=_.default[e]||"";return t}),w=["string","number","boolean","file","date","time","datetime-local"];function B(t,e){const u=e.target;if(u.files&&u.files[0]){const p=u.files[0],f=new FileReader;f.readAsDataURL(p),f.onload=()=>{d.value[t].value=f.result}}}return L(()=>d,t=>{t.value.forEach(e=>{if(e.type==="number"&&typeof e.value!="number"){const u=Number.parseFloat(e.value);e.value=Number.isNaN(u)?0:u}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"}),(t,e)=>{const u=D,p=O,f=A,j=T,h=R;return o(),r("div",z,[(o(!0),r(v,null,x(c(d),(l,k)=>(o(),r("div",{key:k,flex:"~ gap-2","justify-around":""},[y(t.$slots,"input",{item:l}),(o(!0),r(v,null,x(N.value,s=>(o(),r(v,{key:s},[l.type!==null&&s==="active"?(o(),i(u,{key:0,modelValue:l[s],"onUpdate:modelValue":a=>l[s]=a,n:"sm primary",disabled:n.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):m("",!0),l.type!==null&&s==="key"?(o(),i(p,{key:1,modelValue:l[s],"onUpdate:modelValue":a=>l[s]=a,placeholder:s,"flex-1":"","font-mono":"",n:"sm primary",disabled:n.disabled,class:b(n.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):s==="value"?(o(),r(v,{key:2},[l.type==="file"?(o(),i(p,{key:0,type:"file",disabled:n.disabled,class:b(n.disabled?"op75":""),onChange:a=>B(k,a)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(o(),r("div",H,[V(u,{modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,placeholder:"Value",n:"green lg",disabled:n.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(o(),i(p,{key:2,modelValue:l.value,"onUpdate:modelValue":a=>l.value=a,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:n.disabled,class:b(n.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):s==="type"?(o(),i(f,{key:3,modelValue:l.type,"onUpdate:modelValue":a=>l.type=a,n:"sm green",class:b(n.disabled?"op75":""),disabled:n.disabled},{default:g(()=>[(o(),r(v,null,x(w,a=>S("option",{key:a,value:a},q(a),9,J)),64))]),_:1},8,["modelValue","onUpdate:modelValue","class","disabled"])):m("",!0)],64))),128)),y(t.$slots,"input-actions",{},()=>[V(h,{n:"red",disabled:n.disabled,class:b(n.disabled?"op0!":""),onClick:s=>c(d).splice(k,1)},{default:g(()=>[V(j,{icon:"carbon:trash-can"})]),_:1},8,["disabled","class","onClick"])])]))),128)),n.disabled?m("",!0):(o(),r("div",K,[y(t.$slots,"actions",{params:c(d)},()=>[V(h,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:e[0]||(e[0]=l=>c(d).push({...I.value}))},{default:g(()=>[...e[2]||(e[2]=[$(" Add ",-1)])]),_:1}),e[4]||(e[4]=S("div",{"flex-auto":""},null,-1)),c(d).length?(o(),i(h,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:e[1]||(e[1]=l=>c(d).splice(0,c(d).length))},{default:g(()=>[...e[3]||(e[3]=[$(" Remove All ",-1)])]),_:1})):m("",!0)])])),y(t.$slots,"default")])}}}),W=Object.assign(M,{__name:"ServerRouteInputs"});export{W as _};
@@ -1,4 +1,4 @@
1
- import{bg as $e,I as Ee,b6 as se,bh as Ke,bi as Qe,b4 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as je,ay as ot,b5 as nt,a as at,_ as De,v as lt,i as Re,F as st,M as rt,bj as it,S as ut,n as ct,a8 as dt}from"#entry";import{_ as pt}from"./nnavbar-b4ap0r8w.js";import{_ as Ve}from"./nbadge-d24jlq2b.js";import{p as ye,k as P,J as x,Y as r,a3 as u,a0 as ft,a4 as N,a7 as M,X as E,ab as U,u as _,ac as K,a5 as vt,F as L,ah as H,E as me,x as Ie,d as Oe,C as mt,z as yt,r as ve,q as R,w as ht,aj as Ue,a1 as v,$ as T,ad as Z,a2 as gt,aw as _t,K as bt}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as xt}from"./nselect-nvb1idpm.js";import{_ as Ne}from"./server-route-inputs-e42a8bs5.js";import{_ as kt}from"./code-snippets-io8vjgte.js";import{_ as wt}from"./data-schema-button-hqryewml.js";import{_ as Ct}from"./ncode-block-pcw3yh3u.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-je23gs2w.js";import{_ as Tt}from"./ndrawer-ele5003c.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./ncheckbox-eijyrwcq.js";import"./client-miiq4qin.js";import"./nicon-title-he6hzgyb.js";const $t=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),o=$e();return(n,m)=>{const f=Ee,c=Ve,b=Pe;return r(),x("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":_(o)===e.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,o.value=e.item.filepath})},[u("div",{class:M({"w-12":!e.item.routes}),"flex-none":"","text-left":""},[e.item.type==="collection"?(r(),E(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),E(c,{key:1,class:M(_(se)(e.item.method||"*")),textContent:U((e.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":e.item.routes}),"text-sm":"","font-mono":""},[e.item.type==="collection"?(r(),E(f,{key:0,title:`${e.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+U(e.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(n.$slots,"default",{key:0},()=>[(r(!0),x(L,null,H(e.item.routes,h=>(r(),E(b,{key:h.filepath,item:h,index:e.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),Pe=Object.assign($t,{__name:"ServerRouteListItem"});function Et(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const o={},n=s||{},m=n.decode||jt;let f=0;for(;f<e.length;){const c=e.indexOf("=",f);if(c===-1)break;let b=e.indexOf(";",f);if(b===-1)b=e.length;else if(b<c){f=e.lastIndexOf(";",c-1)+1;continue}const h=e.slice(f,c).trim();if(n?.filter&&!n?.filter(h)){f=b+1;continue}if(o[h]===void 0){let i=e.slice(c+1,b).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),o[h]=Dt(i,m)}f=b+1}return o}function jt(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,o){const n=o||{},m=n.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 c=e+"="+f;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ae.test(n.domain))throw new TypeError("option domain is invalid");c+="; Domain="+n.domain}if(n.path){if(!ae.test(n.path))throw new TypeError("option path is invalid");c+="; Path="+n.path}if(n.expires){if(!Rt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(c+="; HttpOnly"),n.secure&&(c+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{c+="; Priority=Low";break}case"medium":{c+="; Priority=Medium";break}case"high":{c+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{c+="; SameSite=Strict";break}case"lax":{c+="; SameSite=Lax";break}case"strict":{c+="; SameSite=Strict";break}case"none":{c+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(c+="; Partitioned"),c}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,o,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){o=new e.constructor;for(s in e)e.hasOwnProperty(s)&&o[s]!==e[s]&&(o[s]=A(e[s]))}else{o={};for(s in e)s==="__proto__"?Object.defineProperty(o,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):o[s]=A(e[s])}return o}if(n==="[object Array]"){for(s=e.length,o=Array(s);s--;)o[s]=A(e[s]);return o}return n==="[object Set]"?(o=new Set,e.forEach(function(m){o.add(A(m))}),o):n==="[object Map]"?(o=new Map,e.forEach(function(m,f){o.set(A(f),A(m))}),o):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(o=new RegExp(e.source,e.flags),o.lastIndex=e.lastIndex,o):n==="[object DataView]"?new e.constructor(A(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=globalThis.cookieStore;function It(e,s){const o={...Vt,...s};o.filter??=i=>i===e;const n=Se(o)||{};let m;o.maxAge!==void 0?m=o.maxAge*1e3:o.expires&&(m=o.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,c=f||n[e]===void 0||n[e]===null,b=A(f?void 0:n[e]??o.default?.()),h=m&&!f?Nt(b,m,o.watch&&o.watch!=="shallow"):P(b);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const j=(k=!1)=>{!k&&(o.readonly||Qe(h.value,n[e]))||(Ut(e,h.value,o),n[e]=A(h.value),i?.postMessage({value:o.encode(h.value)}))},I=k=>{const y=k.refresh?Se(o)?.[e]:o.decode(k.value);B=!0,h.value=y,n[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Oe();if(J&&me(()=>{B=!0,j(),i?.close()}),le){const k=y=>{const O=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);O&&I({value:O.value}),g&&I({value:null})};le.addEventListener("change",k),J&&me(()=>le.removeEventListener("change",k))}else i&&(i.onmessage=({data:k})=>I(k));o.watch&&Ie(h,()=>{B||j()},{deep:o.watch!=="shallow"}),c&&j(c)}return h}function Se(e={}){return Et(document.cookie,e)}function Ot(e,s,o={}){return s==null?Ce(e,s,{...o,maxAge:-1}):Ce(e,s,o)}function Ut(e,s,o={}){document.cookie=Ot(e,s,o)}const Te=2147483647;function Nt(e,s,o){let n,m,f=0;const c=o?P(e):{value:e};return Oe()&&me(()=>{m?.(),clearTimeout(n)}),mt((b,h)=>{o&&(m=Ie(c,h));function i(){f=0,clearTimeout(n);const j=s-f,I=j<Te?j:Te;n=setTimeout(()=>{if(f+=I,f<s)return i();c.value=void 0,h()},I)}return{get(){return b(),c.value},set(j){i(),c.value=j,h()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},At={flex:"~ gap2 items-center"},Bt={relative:"","w-full":""},qt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Qt={key:3,border:"b base",relative:"","n-code-block":""},Xt={flex:"~ wrap","w-full":""},Yt=["onClick"],Zt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},eo={key:1,"text-xs":"",op50:""},to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],ao={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},so=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const o=e,n=s,[m,f]=Xe(),c=Ye(),b=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=R(()=>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=R(()=>{if(j.value==="json")return JSON.stringify(i.data,null,2);if(j.value==="media"||j.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),k=tt(),y=R(()=>o.route.route?.split(/((?:\*\*)?:\w+)/g)),O=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(o.route.method||"GET"),C=P({}),w=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:S,sendFrom:F}=je("serverRoutes"),Q=R(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=R(()=>ie.includes(g.value.toUpperCase())),d=P(),te=["input","json"],G=P(te[0]),ue=R({get:()=>w[d.value],set:a=>{w[d.value]=a}}),he=R(()=>({...W(S.value.query),...W(w.query)})),ge=R(()=>({...W(S.value.headers),...W(w.headers)})),ce=R(()=>ee.value?G.value==="json"?{...W(S.value.body),...V.value}:{...W(S.value.body),...W(w.body)}:void 0),Ae=R(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=R(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&C.value[D]||D).join("")||"")+a;let p=b.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),_e=R(()=>Ae.value+oe.value);function W(a=[]){const t=Object.fromEntries(a.filter(({active:p,key:D,value:$})=>p&&D&&$!==void 0).map(({key:p,value:D})=>[p,D]));return Object.entries(t).length?t:void 0}async function be(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;rt("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(_e.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:ce.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 xe=R(()=>{const a=[],t=[],p=Object.entries(ge.value).filter(([$,q])=>$&&q&&!($==="Content-Type"&&q==="application/json")).map(([$,q])=>` '${$}': '${q}'`).join(`,
1
+ import{bg as $e,I as Ee,b6 as se,bh as Ke,bi as Qe,b4 as Xe,a4 as Ye,A as Ze,f as et,w as tt,g as je,ay as ot,b5 as nt,a as at,_ as De,v as lt,i as Re,F as st,M as rt,bj as it,S as ut,n as ct,a8 as dt}from"#entry";import{_ as pt}from"./nnavbar-l4xos9kw.js";import{_ as Ve}from"./nbadge-b5jyufiz.js";import{p as ye,k as P,J as x,Y as r,a3 as u,a0 as ft,a4 as N,a7 as M,X as E,ab as U,u as _,ac as K,a5 as vt,F as L,ah as H,E as me,x as Ie,d as Oe,C as mt,z as yt,r as ve,q as R,w as ht,aj as Ue,a1 as v,$ as T,ad as Z,a2 as gt,aw as _t,K as bt}from"./vendor/json-editor-vue-gjlsq8io.js";import{_ as xt}from"./nselect-ioi0seuc.js";import{_ as Ne}from"./server-route-inputs-b67yt8gz.js";import{_ as kt}from"./code-snippets-m6659svv.js";import{_ as wt}from"./data-schema-button-n4i5g8zd.js";import{_ as Ct}from"./ncode-block-j34pr9ay.js";import{C as we,S as Le}from"./constants-b32h69zq.js";import{_ as St}from"./nsection-block-egbswicp.js";import{_ as Tt}from"./ndrawer-drb8l4me.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";import"./ncheckbox-dhpz73wm.js";import"./client-c7ye0k5n.js";import"./nicon-title-d35s6mci.js";const $t=ye({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(e){const s=P(!0),o=$e();return(n,m)=>{const f=Ee,c=Ve,b=Pe;return r(),x("div",null,[u("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:M([{"bg-active":_(o)===e.item.filepath}]),style:vt({paddingLeft:`calc(0.5rem + ${e.index*1.5}em)`}),onClick:m[0]||(m[0]=h=>{s.value=!s.value,o.value=e.item.filepath})},[u("div",{class:M({"w-12":!e.item.routes}),"flex-none":"","text-left":""},[e.item.type==="collection"?(r(),E(f,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":s.value?90:0,transition:""},null,8,["transform-rotate"])):(r(),E(c,{key:1,class:M(_(se)(e.item.method||"*")),textContent:U((e.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),u("span",{class:M({"flex items-center":e.item.routes}),"text-sm":"","font-mono":""},[e.item.type==="collection"?(r(),E(f,{key:0,title:`${e.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):N("",!0),K(" "+U(e.item.route),1)],2)],6),m[1]||(m[1]=u("div",{"x-divider":""},null,-1)),s.value?ft(n.$slots,"default",{key:0},()=>[(r(!0),x(L,null,H(e.item.routes,h=>(r(),E(b,{key:h.filepath,item:h,index:e.index+1},null,8,["item","index"]))),128))]):N("",!0)])}}}),Pe=Object.assign($t,{__name:"ServerRouteListItem"});function Et(e,s){if(typeof e!="string")throw new TypeError("argument str must be a string");const o={},n=s||{},m=n.decode||jt;let f=0;for(;f<e.length;){const c=e.indexOf("=",f);if(c===-1)break;let b=e.indexOf(";",f);if(b===-1)b=e.length;else if(b<c){f=e.lastIndexOf(";",c-1)+1;continue}const h=e.slice(f,c).trim();if(n?.filter&&!n?.filter(h)){f=b+1;continue}if(o[h]===void 0){let i=e.slice(c+1,b).trim();i.codePointAt(0)===34&&(i=i.slice(1,-1)),o[h]=Dt(i,m)}f=b+1}return o}function jt(e){return e.includes("%")?decodeURIComponent(e):e}function Dt(e,s){try{return s(e)}catch{return e}}const ae=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function Ce(e,s,o){const n=o||{},m=n.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 c=e+"="+f;if(n.maxAge!==void 0&&n.maxAge!==null){const b=n.maxAge-0;if(Number.isNaN(b)||!Number.isFinite(b))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(b)}if(n.domain){if(!ae.test(n.domain))throw new TypeError("option domain is invalid");c+="; Domain="+n.domain}if(n.path){if(!ae.test(n.path))throw new TypeError("option path is invalid");c+="; Path="+n.path}if(n.expires){if(!Rt(n.expires)||Number.isNaN(n.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(c+="; HttpOnly"),n.secure&&(c+="; Secure"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():n.priority){case"low":{c+="; Priority=Low";break}case"medium":{c+="; Priority=Medium";break}case"high":{c+="; Priority=High";break}default:throw new TypeError("option priority is invalid")}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:{c+="; SameSite=Strict";break}case"lax":{c+="; SameSite=Lax";break}case"strict":{c+="; SameSite=Strict";break}case"none":{c+="; SameSite=None";break}default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(c+="; Partitioned"),c}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,o,n=Object.prototype.toString.call(e);if(n==="[object Object]"){if(e.constructor!==Object&&typeof e.constructor=="function"){o=new e.constructor;for(s in e)e.hasOwnProperty(s)&&o[s]!==e[s]&&(o[s]=A(e[s]))}else{o={};for(s in e)s==="__proto__"?Object.defineProperty(o,s,{value:A(e[s]),configurable:!0,enumerable:!0,writable:!0}):o[s]=A(e[s])}return o}if(n==="[object Array]"){for(s=e.length,o=Array(s);s--;)o[s]=A(e[s]);return o}return n==="[object Set]"?(o=new Set,e.forEach(function(m){o.add(A(m))}),o):n==="[object Map]"?(o=new Map,e.forEach(function(m,f){o.set(A(f),A(m))}),o):n==="[object Date]"?new Date(+e):n==="[object RegExp]"?(o=new RegExp(e.source,e.flags),o.lastIndex=e.lastIndex,o):n==="[object DataView]"?new e.constructor(A(e.buffer)):n==="[object ArrayBuffer]"?e.slice(0):n.slice(-6)==="Array]"?new e.constructor(e):e}const Vt={path:"/",watch:!0,decode:e=>Ke(decodeURIComponent(e)),encode:e=>encodeURIComponent(typeof e=="string"?e:JSON.stringify(e))},le=globalThis.cookieStore;function It(e,s){const o={...Vt,...s};o.filter??=i=>i===e;const n=Se(o)||{};let m;o.maxAge!==void 0?m=o.maxAge*1e3:o.expires&&(m=o.expires.getTime()-Date.now());const f=m!==void 0&&m<=0,c=f||n[e]===void 0||n[e]===null,b=A(f?void 0:n[e]??o.default?.()),h=m&&!f?Nt(b,m,o.watch&&o.watch!=="shallow"):P(b);{let i=null;try{!le&&typeof BroadcastChannel<"u"&&(i=new BroadcastChannel(`nuxt:cookies:${e}`))}catch{}const j=(k=!1)=>{!k&&(o.readonly||Qe(h.value,n[e]))||(Ut(e,h.value,o),n[e]=A(h.value),i?.postMessage({value:o.encode(h.value)}))},I=k=>{const y=k.refresh?Se(o)?.[e]:o.decode(k.value);B=!0,h.value=y,n[e]=A(y),yt(()=>{B=!1})};let B=!1;const J=!!Oe();if(J&&me(()=>{B=!0,j(),i?.close()}),le){const k=y=>{const O=y.changed.find(C=>C.name===e),g=y.deleted.find(C=>C.name===e);O&&I({value:O.value}),g&&I({value:null})};le.addEventListener("change",k),J&&me(()=>le.removeEventListener("change",k))}else i&&(i.onmessage=({data:k})=>I(k));o.watch&&Ie(h,()=>{B||j()},{deep:o.watch!=="shallow"}),c&&j(c)}return h}function Se(e={}){return Et(document.cookie,e)}function Ot(e,s,o={}){return s==null?Ce(e,s,{...o,maxAge:-1}):Ce(e,s,o)}function Ut(e,s,o={}){document.cookie=Ot(e,s,o)}const Te=2147483647;function Nt(e,s,o){let n,m,f=0;const c=o?P(e):{value:e};return Oe()&&me(()=>{m?.(),clearTimeout(n)}),mt((b,h)=>{o&&(m=Ie(c,h));function i(){f=0,clearTimeout(n);const j=s-f,I=j<Te?j:Te;n=setTimeout(()=>{if(f+=I,f<s)return i();c.value=void 0,h()},I)}return{get(){return b(),c.value},set(j){i(),c.value=j,h()}}})}const Lt={"h-full":"","w-full":"",flex:"~ col"},Pt={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},At={flex:"~ gap2 items-center"},Bt={relative:"","w-full":""},qt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},Mt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Ft={class:"hidden md:block"},zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Jt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Wt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt={key:2},Qt={key:3,border:"b base",relative:"","n-code-block":""},Xt={flex:"~ wrap","w-full":""},Yt=["onClick"],Zt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},eo={key:1,"text-xs":"",op50:""},to={key:0,"flex-auto":"","overflow-auto":""},oo={border:"~ base","h-full":"","w-full":"",rounded:""},no=["data"],ao={key:2,"flex-auto":"","overflow-auto":"",p4:""},lo={border:"~ base",rounded:""},so=["src"],ro={key:1,controls:"",rounded:""},io=["src"],uo=ye({__name:"ServerRouteDetails",props:{route:{}},emits:["openDefaultInput"],setup(e,{emit:s}){const o=e,n=s,[m,f]=Xe(),c=Ye(),b=Ze(),h=et(),i=ve({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),j=R(()=>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=R(()=>{if(j.value==="json")return JSON.stringify(i.data,null,2);if(j.value==="media"||j.value==="pdf"){const a=new Blob([i.data],{type:i.contentType});return URL.createObjectURL(a)}return i.data}),B=P(!1),J=P(!1),k=tt(),y=R(()=>o.route.route?.split(/((?:\*\*)?:\w+)/g)),O=R(()=>y.value?.filter(a=>a.startsWith(":")||a.startsWith("**:"))||[]),g=P(o.route.method||"GET"),C=P({}),w=ve({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),V=P({}),{inputDefaults:S,sendFrom:F}=je("serverRoutes"),Q=R(()=>h?.value?.app?.$fetch?F.value:"devtools"),re=["GET","POST","PUT","PATCH","DELETE","HEAD"],ie=["PATCH","POST","PUT","DELETE"],ee=R(()=>ie.includes(g.value.toUpperCase())),d=P(),te=["input","json"],G=P(te[0]),ue=R({get:()=>w[d.value],set:a=>{w[d.value]=a}}),he=R(()=>({...W(S.value.query),...W(w.query)})),ge=R(()=>({...W(S.value.headers),...W(w.headers)})),ce=R(()=>ee.value?G.value==="json"?{...W(S.value.body),...V.value}:{...W(S.value.body),...W(w.body)}:void 0),Ae=R(()=>{let a=window?.location.origin;return a.charAt(a.length-1)==="/"&&(a=a.slice(0,-1)),a}),oe=R(()=>{let a=new URLSearchParams(he.value).toString();a&&(a=`?${a}`);const t=(y.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&C.value[D]||D).join("")||"")+a;let p=b.value?.app.baseURL||"";return(p==="./"||p===".")&&(p=""),p.endsWith("/")&&(p=p.slice(0,-1)),p+t}),_e=R(()=>Ae.value+oe.value);function W(a=[]){const t=Object.fromEntries(a.filter(({active:p,key:D,value:$})=>p&&D&&$!==void 0).map(({key:p,value:D})=>[p,D]));return Object.entries(t).length?t:void 0}async function be(){J.value=!0,B.value=!0;const a=Date.now(),t=Q.value==="app"?h.value.app.$fetch:$fetch;rt("server-routes:fetch",{method:g.value,sendFrom:Q.value});try{i.data=await t(_e.value,{method:g.value.toUpperCase(),headers:ge.value,query:he.value,body:ce.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 xe=R(()=>{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
  }`),ce.value&&t.push(`body: ${JSON.stringify(ce.value,null,2)}`);const D=t.length?`, {
@@ -1 +1 @@
1
- import{b3 as re,I as oe,g as le,b4 as ke,a4 as Oe,A as Te,w as Se,ay as we,b5 as Xe,a as Ee,_ as ce,b6 as De,v as Ce,i as fe,F as Me,M as Ie,b7 as $e,S as Le,n as Re,a8 as Ue}from"#entry";import{_ as Ae}from"./nnavbar-b4ap0r8w.js";import{_ as de}from"./nbadge-d24jlq2b.js";import{a as Ne,p as K,k as q,q as L,J as I,Y as g,a3 as m,a4 as H,a1 as k,ab as N,F as W,ah as Z,a7 as z,u as w,r as se,w as je,aj as pe,X as j,ad as G,$ as M,ac as Y,a2 as Ve,aw as He,a0 as We,a5 as Be,K as Fe}from"./vendor/json-editor-vue-ikjc812x.js";import{_ as ve}from"./server-route-inputs-e42a8bs5.js";import{_ as qe}from"./ncode-block-pcw3yh3u.js";import{S as he}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-je23gs2w.js";import{_ as Ye}from"./ndrawer-ele5003c.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";import"./ncheckbox-eijyrwcq.js";import"./nselect-nvb1idpm.js";import"./client-miiq4qin.js";import"./nicon-title-he6hzgyb.js";var ne={exports:{}},ue;function ze(){return ue||(ue=1,(function(E,U){(function(R,T){E.exports=T()})(globalThis,()=>(()=>{var A={949:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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/,""),p=h;return e.dayOfWeekStartIndexZero?h=="7"&&(p="0"):p=(parseInt(h)-1).toString(),l.replace(h,p)}),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/,""),p=h;return e.monthStartIndexZero&&(p=(parseInt(h)+1).toString()),l.replace(h,p)});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})();d.CronParser=v}),333:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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,p=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,B=C===void 0?null:C,V=r.logicalAndDayFields,S=V===void 0?!1:V,F={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:p,use24HourTimeFormat:$,locale:B,logicalAndDayFields:S};F.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var ee=new t(e,F);return ee.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e,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),p=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(p);break;case"2":l=e.i18n.second(p);break;case"3":l=e.i18n.third(p);break;case"4":l=e.i18n.fourth(p);break;case"5":l=e.i18n.fifth(p);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]!="*";f?e.options.logicalAndDayFields?u=e.i18n.commaOnlyOnX0(n):u=e.i18n.commaAndOnX0():u=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 p=e.split(","),$="",C=0;C<p.length;C++)if(C>0&&p.length>2&&($+=",",C<p.length-1&&($+=" ")),C>0&&p.length>1&&(C==p.length-1||p.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),p[C].indexOf("/")>-1||p[C].indexOf("-")>-1){var B=p[C].indexOf("-")>-1&&p[C].indexOf("/")==-1,V=this.getSegmentDescription(p[C],a,r,n,B?this.i18n.commaX0ThroughX1:u,i);B&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(p[C],a,r,n,u,i):$+=r(p[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var p=e.split("/");if(s=o.StringUtilities.format(n(p[1]),p[1]),p[0].indexOf("-")>-1){var S=this.generateRangeSegmentDescription(p[0],u,r);S.indexOf(", ")!=0&&(s+=", "),s+=S}else if(p[0].indexOf("*")==-1){var F=o.StringUtilities.format(i(p[0]),r(p[0]));F=F.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),F)}}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})();d.ExpressionDescriptor=y}),747:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.enLocaleLoader=void 0;var o=_(486),v=(function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y})();d.enLocaleLoader=v}),486:((b,d)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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})();d.en=_}),515:((b,d)=>{Object.defineProperty(d,"__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})();d.default=o}),823:((b,d)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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})();d.StringUtilities=_})},R={};function T(b){var d=R[b];if(d!==void 0)return d.exports;var _=R[b]={exports:{}};return A[b](_,_.exports,T),_.exports}var D={};return(()=>{var b=D;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var d=T(333),_=T(747);d.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=d.ExpressionDescriptor;var o=d.ExpressionDescriptor.toString;b.toString=o})(),D})())})(ne)),ne.exports}var Ge=ze();const Ze=Ne(Ge),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(E){const U=E,A=re(),R=q(!0),T=L(()=>Ze.toString(U.collection.cron));return(D,b)=>{const d=oe,_=de;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:T.value,onClick:b[0]||(b[0]=o=>R.value=!R.value)},[m("div",Qe,[k(d,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":R.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[k(_,{class:"font-mono n-primary",textContent:N(E.collection.cron)},null,8,["textContent"]),m("span",et,N(T.value),1),m("span",tt,"("+N(E.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),R.value?(g(),I("ul",nt,[(g(!0),I(W,null,Z(E.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","pl-9":"","font-mono":"","hover-bg-active":"",class:z([{"bg-active":w(A)===o}]),onClick:v=>A.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):H("",!0)])}}}),at=Object.assign(ot,{__name:"CronCollection"}),it={"h-full":"","w-full":"",flex:"~ col"},st={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},ut={flex:"~ gap2 items-center"},lt={relative:"","w-full":""},ct={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},dt={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},vt={key:0,border:"b base",relative:"","n-code-block":""},ht={flex:"~ wrap","w-full":""},mt=["onClick"],yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},gt={key:1,"text-xs":"",op50:""},_t=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(E,{emit:U}){const A=E,R=U,T=q({payload:{}}),{inputDefaults:D}=le("serverRoutes"),[b,d]=ke(),_=Oe(),o=Te(),v=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=L(()=>JSON.stringify(v.data,null,2)),t=L(()=>v.contentType.includes("application/json")?"json":"text"),e=q(!1),a=q(!1),r=Se(),n=q(),u=["json"],i=q(u[0]),s=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=L({get:()=>s[n.value],set:x=>{s[n.value]=x}}),l=L(()=>({...S(D.value.query),...S(s.query)})),h=L(()=>({...S(D.value.headers)})),p=L(()=>Object.keys(T.value?.payload??{}).length?{...T.value}:void 0),$=L(()=>p.value?"POST":"GET"),C=L(()=>{let x=window?.location.origin;return x.charAt(x.length-1)==="/"&&(x=x.slice(0,-1)),x}),B=L(()=>{let x=new URLSearchParams(l.value).toString();x&&(x=`?${x}`);const c=`/_nitro/tasks/${A.task.name}${x}`;let X=o.value?.app.baseURL||"";return(X==="./"||X===".")&&(X=""),X.endsWith("/")&&(X=X.slice(0,-1)),X+c}),V=L(()=>C.value+B.value);function S(x=[]){const c=Object.fromEntries(x.filter(({active:X,key:P,value:J})=>X&&P&&J!==void 0).map(({key:X,value:P})=>[X,P]));return Object.entries(c).length?c:void 0}async function F(){a.value=!0,e.value=!0;const x=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:p.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()-x}const ee=L(()=>{const x=[];return x.push({name:"Query",slug:"query",length:s.query.length}),x.push({name:"Body",slug:"body",length:s.body.length}),x});je(()=>{if(i.value==="json"&&typeof T.value=="string")try{T.value=JSON.parse(T.value)}catch{}});const ae=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const x=ae.value?.find(c=>c.task===A.task.name);if(x){n.value||(n.value=x.tab),x.tab!==n.value&&(x.tab=n.value);const{body:c,query:X,headers:P}=x.inputs;Object.assign(s,{body:c,query:X,headers:P})}else{const c={task:A.task.name,tab:"query",inputs:s};ae.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(x,c)=>{const X=ce,P=Ce,J=oe,ie=ve,ge=fe,_e=Me,te=de,be=qe,Q=pe("tooltip");return g(),I("div",it,[m("div",st,[m("div",ut,[G((g(),I("div",null,[k(X,{class:z(["n-badge-base n-sm",w(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[Y(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",lt,[k(P,{"model-value":B.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",ct,[G(k(X,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=O=>w(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(k(X,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=O=>w(r)(E.task.handler))},null,512),[[Q,"Open in Editor"]])])]),k(X,{"h-full":"",n:"primary solid",onClick:F},{default:M(()=>[k(J,{icon:"carbon:send"})]),_:1})])]),m("div",ft,[(g(!0),I(W,null,Z(ee.value,O=>G((g(),j(X,{key:O.slug,class:z(n.value===O.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:xe=>n.value=O.slug},{default:M(()=>[k(J,{icon:w(he)[O.slug]},null,8,["icon"]),m("div",dt,[Y(N(O.name)+" "+N(O?.length?`(${O.length})`:"")+" ",1),m("span",null,N(w(D)[O.slug]?.length?`(${w(D)[O.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,O.name]])),128))]),k(w(b),null,{default:M(()=>[k(ie,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=O=>f.value=O),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[w(D)[n.value]?.length?(g(),I(W,{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)),k(X,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=O=>R("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),k(ie,{modelValue:w(D)[n.value],"onUpdate:modelValue":c[3]||(c[3]=O=>w(D)[n.value]=O),disabled:"",p0:""},null,8,["modelValue"])],64)):H("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",vt,[n.value==="body"?(g(),I(W,{key:0},[m("div",ht,[(g(),I(W,null,Z(u,O=>m("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:z({"border-b":O!==i.value}),onClick:xe=>i.value=O},[m("div",{class:z({op30:O!==i.value}),"font-mono":""},N(O),3)],10,mt)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),j(w(d),{key:0})):i.value==="json"?(g(),j(w(He),Ve({key:1,modelValue:T.value,"onUpdate:modelValue":c[5]||(c[5]=O=>T.value=O),class:[w(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},x.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):H("",!0)],64)):(g(),j(w(d),{key:1}))])):H("",!0),a.value?e.value?(g(),j(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>[...c[11]||(c[11]=[Y(" Running... ",-1)])]),_:1})):(g(),I(W,{key:3},[m("div",yt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),j(te,{key:0,n:"red"},{default:M(()=>[...c[12]||(c[12]=[Y(" Error ",-1)])]),_:1})):H("",!0),k(te,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",gt,N(v.contentType),1)):H("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),k(te,{n:"green"},{default:M(()=>[Y(N(v.fetchTime)+" ms ",1)]),_:1})]),k(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),j(ge,{key:1},{default:M(()=>[k(X,{n:"primary",onClick:F},{default:M(()=>[k(J,{icon:"carbon:send"}),c[10]||(c[10]=Y(" Run task ",-1))]),_:1})]),_:1}))])}}}),bt=Object.assign(_t,{__name:"ServerTaskDetails"}),xt={"flex-none":"","text-left":""},kt={flex:"","items-center":"","text-sm":"","font-mono":""},Ot=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(E){const U=q(!0),A=re();return(R,T)=>{const D=oe,b=me;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:z([{"bg-active":w(A)===E.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${E.index*1.5}em)`}),onClick:T[0]||(T[0]=d=>{U.value=!U.value,A.value=E.item.name})},[m("div",xt,[E.item.type==="collection"?(g(),j(D,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):H("",!0)]),m("span",kt,[E.item.type==="collection"?(g(),j(D,{key:0,title:`${E.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),j(D,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+N(E.item.name),1)])],6),T[1]||(T[1]=m("div",{"x-divider":""},null,-1)),U.value?We(R.$slots,"default",{key:0},()=>[(g(!0),I(W,null,Z(E.item.tasks,d=>(g(),j(b,{key:d.name,item:d,index:E.index+1},null,8,["item","index"]))),128))]):H("",!0)])}}}),me=Object.assign(Ot,{__name:"ServerTaskListItem"}),Tt={flex:"~ gap1","text-sm":""},St={key:0,op50:""},wt={op50:""},Wt=K({__name:"server-tasks",setup(E){const U=q(!1),A=$e(),R=L(()=>Object.keys(A.value?.tasks??{}).map(r=>({name:r,...A.value.tasks[r],type:"task"}))),T=L(()=>Object.entries(A.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),D=re(),{view:b,selectedTask:d,inputDefaults:_}=le("serverTasks"),o=L(()=>{!D.value&&d.value&&(D.value=d.value.name);const r=R.value.find(n=>n.name===D.value);return D.value!==d.value?.name&&r&&(d.value=r),r}),v=q(""),y=L(()=>new Le(R.value,{keys:["key","description"],shouldSort:!0})),t=L(()=>v.value?y.value.search(v.value).map(n=>n.item):R.value),e=L(()=>{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(p=>{s=u(p,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=ce,i=Ae,s=at,f=Ue,l=bt,h=Re,p=fe,$=ve,C=Pe,B=Ye,V=pe("tooltip");return g(),I(W,null,[k(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[k(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[k(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=S=>v.value=S),pb2:""},{actions:M(()=>[G(k(u,{"text-lg":"",icon:w(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(k(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=S=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",Tt,[v.value?(g(),I("span",St,N(t.value.length)+" matched · ",1)):H("",!0),m("span",wt,N(R.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(W,null,Z(w(b)==="tree"?e.value:t.value,S=>(g(),j(me,{key:S.name,item:S},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(W,null,Z(T.value,S=>(g(),I("li",{key:S.cron},[k(s,{collection:S},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),j(Fe,{max:10},[o.value?(g(),j(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=S=>U.value=!0)},null,8,["task"])):H("",!0)],1024)),o.value?H("",!0):(g(),j(p,{key:0},{default:M(()=>[k(h,{px6:"",py2:""},{default:M(()=>[...n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])]),_:1})]),_:1}))]),_:1}),k(B,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=S=>U.value=S),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=S=>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)),k(C,{text:`Query ${w(_).query?.length?`(${w(_).query.length})`:""}`,padding:!1,icon:w(he).query},{default:M(()=>[k($,{modelValue:w(_).query,"onUpdate:modelValue":n[3]||(n[3]=S=>w(_).query=S),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Wt as default};
1
+ import{b3 as re,I as oe,g as le,b4 as ke,a4 as Oe,A as Te,w as Se,ay as we,b5 as Xe,a as Ee,_ as ce,b6 as De,v as Ce,i as fe,F as Me,M as Ie,b7 as $e,S as Le,n as Re,a8 as Ue}from"#entry";import{_ as Ae}from"./nnavbar-l4xos9kw.js";import{_ as de}from"./nbadge-b5jyufiz.js";import{a as Ne,p as K,k as q,q as L,J as I,Y as g,a3 as m,a4 as H,a1 as k,ab as N,F as W,ah as Z,a7 as z,u as w,r as se,w as je,aj as pe,X as j,ad as G,$ as M,ac as Y,a2 as Ve,aw as He,a0 as We,a5 as Be,K as Fe}from"./vendor/json-editor-vue-gjlsq8io.js";import{_ as ve}from"./server-route-inputs-b67yt8gz.js";import{_ as qe}from"./ncode-block-j34pr9ay.js";import{S as he}from"./constants-b32h69zq.js";import{_ as Pe}from"./nsection-block-egbswicp.js";import{_ as Ye}from"./ndrawer-drb8l4me.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";import"./ncheckbox-dhpz73wm.js";import"./nselect-ioi0seuc.js";import"./client-c7ye0k5n.js";import"./nicon-title-d35s6mci.js";var ne={exports:{}},ue;function ze(){return ue||(ue=1,(function(E,U){(function(R,T){E.exports=T()})(globalThis,()=>(()=>{var A={949:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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/,""),p=h;return e.dayOfWeekStartIndexZero?h=="7"&&(p="0"):p=(parseInt(h)-1).toString(),l.replace(h,p)}),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/,""),p=h;return e.monthStartIndexZero&&(p=(parseInt(h)+1).toString()),l.replace(h,p)});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})();d.CronParser=v}),333:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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,p=h===void 0?!1:h,$=r.use24HourTimeFormat,C=r.locale,B=C===void 0?null:C,V=r.logicalAndDayFields,S=V===void 0?!1:V,F={throwExceptionOnParseError:u,verbose:s,dayOfWeekStartIndexZero:l,monthStartIndexZero:p,use24HourTimeFormat:$,locale:B,logicalAndDayFields:S};F.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var ee=new t(e,F);return ee.getFullDescription()},t.initialize=function(e,a){a===void 0&&(a="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=a,e.load(t.locales)},t.prototype.getFullDescription=function(){var e,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),p=n.substring(0,n.indexOf("#"));switch(h){case"1":l=e.i18n.first(p);break;case"2":l=e.i18n.second(p);break;case"3":l=e.i18n.third(p);break;case"4":l=e.i18n.fourth(p);break;case"5":l=e.i18n.fifth(p);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]!="*";f?e.options.logicalAndDayFields?u=e.i18n.commaOnlyOnX0(n):u=e.i18n.commaAndOnX0():u=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 p=e.split(","),$="",C=0;C<p.length;C++)if(C>0&&p.length>2&&($+=",",C<p.length-1&&($+=" ")),C>0&&p.length>1&&(C==p.length-1||p.length==2)&&($+="".concat(this.i18n.spaceAnd()," ")),p[C].indexOf("/")>-1||p[C].indexOf("-")>-1){var B=p[C].indexOf("-")>-1&&p[C].indexOf("/")==-1,V=this.getSegmentDescription(p[C],a,r,n,B?this.i18n.commaX0ThroughX1:u,i);B&&(V=V.replace(", ","")),$+=V}else f?$+=this.getSegmentDescription(p[C],a,r,n,u,i):$+=r(p[C]);f?s=$:s=o.StringUtilities.format(i(e),$)}else if(f){var p=e.split("/");if(s=o.StringUtilities.format(n(p[1]),p[1]),p[0].indexOf("-")>-1){var S=this.generateRangeSegmentDescription(p[0],u,r);S.indexOf(", ")!=0&&(s+=", "),s+=S}else if(p[0].indexOf("*")==-1){var F=o.StringUtilities.format(i(p[0]),r(p[0]));F=F.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),F)}}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})();d.ExpressionDescriptor=y}),747:((b,d,_)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.enLocaleLoader=void 0;var o=_(486),v=(function(){function y(){}return y.prototype.load=function(t){t.en=new o.en},y})();d.enLocaleLoader=v}),486:((b,d)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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})();d.en=_}),515:((b,d)=>{Object.defineProperty(d,"__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})();d.default=o}),823:((b,d)=>{Object.defineProperty(d,"__esModule",{value:!0}),d.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})();d.StringUtilities=_})},R={};function T(b){var d=R[b];if(d!==void 0)return d.exports;var _=R[b]={exports:{}};return A[b](_,_.exports,T),_.exports}var D={};return(()=>{var b=D;Object.defineProperty(b,"__esModule",{value:!0}),b.toString=void 0;var d=T(333),_=T(747);d.ExpressionDescriptor.initialize(new _.enLocaleLoader),b.default=d.ExpressionDescriptor;var o=d.ExpressionDescriptor.toString;b.toString=o})(),D})())})(ne)),ne.exports}var Ge=ze();const Ze=Ne(Ge),Je=["title"],Qe={"flex-none":"","text-left":""},Ke={flex:"~ gap-2","min-w-0":"","items-center":"","text-sm":""},et={class:"truncate"},tt={"text-xs":"",op50:""},nt={key:0},rt=["onClick"],ot=K({__name:"CronCollection",props:{collection:{}},setup(E){const U=E,A=re(),R=q(!0),T=L(()=>Ze.toString(U.collection.cron));return(D,b)=>{const d=oe,_=de;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",p2:"","hover-bg-active":"",title:T.value,onClick:b[0]||(b[0]=o=>R.value=!R.value)},[m("div",Qe,[k(d,{icon:"carbon:chevron-right","mb0.5":"","transform-rotate":R.value?90:0,transition:""},null,8,["transform-rotate"])]),m("span",Ke,[k(_,{class:"font-mono n-primary",textContent:N(E.collection.cron)},null,8,["textContent"]),m("span",et,N(T.value),1),m("span",tt,"("+N(E.collection.tasks.length)+")",1)])],8,Je),b[2]||(b[2]=m("div",{"x-divider":""},null,-1)),R.value?(g(),I("ul",nt,[(g(!0),I(W,null,Z(E.collection.tasks,o=>(g(),I("li",{key:o},[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","pl-9":"","font-mono":"","hover-bg-active":"",class:z([{"bg-active":w(A)===o}]),onClick:v=>A.value=o},N(o),11,rt),b[1]||(b[1]=m("div",{"x-divider":""},null,-1))]))),128))])):H("",!0)])}}}),at=Object.assign(ot,{__name:"CronCollection"}),it={"h-full":"","w-full":"",flex:"~ col"},st={flex:"~ col gap-2","n-navbar-glass":"","flex-none":"",p4:""},ut={flex:"~ gap2 items-center"},lt={relative:"","w-full":""},ct={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},ft={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},dt={class:"hidden md:block"},pt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},vt={key:0,border:"b base",relative:"","n-code-block":""},ht={flex:"~ wrap","w-full":""},mt=["onClick"],yt={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},gt={key:1,"text-xs":"",op50:""},_t=K({__name:"ServerTaskDetails",props:{task:{}},emits:["openDefaultInput"],setup(E,{emit:U}){const A=E,R=U,T=q({payload:{}}),{inputDefaults:D}=le("serverRoutes"),[b,d]=ke(),_=Oe(),o=Te(),v=se({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),y=L(()=>JSON.stringify(v.data,null,2)),t=L(()=>v.contentType.includes("application/json")?"json":"text"),e=q(!1),a=q(!1),r=Se(),n=q(),u=["json"],i=q(u[0]),s=se({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[]}),f=L({get:()=>s[n.value],set:x=>{s[n.value]=x}}),l=L(()=>({...S(D.value.query),...S(s.query)})),h=L(()=>({...S(D.value.headers)})),p=L(()=>Object.keys(T.value?.payload??{}).length?{...T.value}:void 0),$=L(()=>p.value?"POST":"GET"),C=L(()=>{let x=window?.location.origin;return x.charAt(x.length-1)==="/"&&(x=x.slice(0,-1)),x}),B=L(()=>{let x=new URLSearchParams(l.value).toString();x&&(x=`?${x}`);const c=`/_nitro/tasks/${A.task.name}${x}`;let X=o.value?.app.baseURL||"";return(X==="./"||X===".")&&(X=""),X.endsWith("/")&&(X=X.slice(0,-1)),X+c}),V=L(()=>C.value+B.value);function S(x=[]){const c=Object.fromEntries(x.filter(({active:X,key:P,value:J})=>X&&P&&J!==void 0).map(({key:X,value:P})=>[X,P]));return Object.entries(c).length?c:void 0}async function F(){a.value=!0,e.value=!0;const x=Date.now();Ie("server-tasks:run",{method:$.value});try{v.data=await $fetch(V.value,{method:"POST",headers:h.value,query:l.value,body:p.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()-x}const ee=L(()=>{const x=[];return x.push({name:"Query",slug:"query",length:s.query.length}),x.push({name:"Body",slug:"body",length:s.body.length}),x});je(()=>{if(i.value==="json"&&typeof T.value=="string")try{T.value=JSON.parse(T.value)}catch{}});const ae=we("nuxt-devtools:server-tasks:inputs",()=>[],{window:window.parent});Xe([s,n],()=>{const x=ae.value?.find(c=>c.task===A.task.name);if(x){n.value||(n.value=x.tab),x.tab!==n.value&&(x.tab=n.value);const{body:c,query:X,headers:P}=x.inputs;Object.assign(s,{body:c,query:X,headers:P})}else{const c={task:A.task.name,tab:"query",inputs:s};ae.value.push(c),n.value||(n.value=c.tab)}},{immediate:!0,deep:!0,debounce:500});const ye=Ee();return(x,c)=>{const X=ce,P=Ce,J=oe,ie=ve,ge=fe,_e=Me,te=de,be=qe,Q=pe("tooltip");return g(),I("div",it,[m("div",st,[m("div",ut,[G((g(),I("div",null,[k(X,{class:z(["n-badge-base n-sm",w(De)($.value)]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:M(()=>[Y(N($.value),1)]),_:1},8,["class"])])),[[Q,`Method is ${$.value} as ${$.value==="GET"?"no":""} json body is sent`]]),m("div",lt,[k(P,{"model-value":B.value,readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),m("div",ct,[G(k(X,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:c[0]||(c[0]=O=>w(ye)(V.value,"server-task-url"))},null,512),[[Q,"Copy URL"]]),G(k(X,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:c[1]||(c[1]=O=>w(r)(E.task.handler))},null,512),[[Q,"Open in Editor"]])])]),k(X,{"h-full":"",n:"primary solid",onClick:F},{default:M(()=>[k(J,{icon:"carbon:send"})]),_:1})])]),m("div",ft,[(g(!0),I(W,null,Z(ee.value,O=>G((g(),j(X,{key:O.slug,class:z(n.value===O.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:xe=>n.value=O.slug},{default:M(()=>[k(J,{icon:w(he)[O.slug]},null,8,["icon"]),m("div",dt,[Y(N(O.name)+" "+N(O?.length?`(${O.length})`:"")+" ",1),m("span",null,N(w(D)[O.slug]?.length?`(${w(D)[O.slug].length})`:""),1)])]),_:2},1032,["class","onClick"])),[[Q,O.name]])),128))]),k(w(b),null,{default:M(()=>[k(ie,{modelValue:f.value,"onUpdate:modelValue":c[4]||(c[4]=O=>f.value=O),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:M(()=>[w(D)[n.value]?.length?(g(),I(W,{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)),k(X,{icon:"i-carbon-edit",border:!1,onClick:c[2]||(c[2]=O=>R("openDefaultInput"))}),c[8]||(c[8]=m("div",{"x-divider":""},null,-1))]),k(ie,{modelValue:w(D)[n.value],"onUpdate:modelValue":c[3]||(c[3]=O=>w(D)[n.value]=O),disabled:"",p0:""},null,8,["modelValue"])],64)):H("",!0)]),_:1},8,["modelValue"])]),_:1}),f.value?(g(),I("div",vt,[n.value==="body"?(g(),I(W,{key:0},[m("div",ht,[(g(),I(W,null,Z(u,O=>m("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:z({"border-b":O!==i.value}),onClick:xe=>i.value=O},[m("div",{class:z({op30:O!==i.value}),"font-mono":""},N(O),3)],10,mt)),64)),c[9]||(c[9]=m("div",{border:"b base","flex-auto":""},null,-1))]),i.value==="input"?(g(),j(w(d),{key:0})):i.value==="json"?(g(),j(w(He),Ve({key:1,modelValue:T.value,"onUpdate:modelValue":c[5]||(c[5]=O=>T.value=O),class:[w(_)==="dark"?"jse-theme-dark":"light","json-editor-vue of-auto text-sm outline-none"]},x.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):H("",!0)],64)):(g(),j(w(d),{key:1}))])):H("",!0),a.value?e.value?(g(),j(_e,{key:2,"z-10":"","flex-auto":"","backdrop-blur":""},{default:M(()=>[...c[11]||(c[11]=[Y(" Running... ",-1)])]),_:1})):(g(),I(W,{key:3},[m("div",yt,[c[13]||(c[13]=m("div",null,"Result",-1)),v.error?(g(),j(te,{key:0,n:"red"},{default:M(()=>[...c[12]||(c[12]=[Y(" Error ",-1)])]),_:1})):H("",!0),k(te,{n:v.error?"orange":"green",textContent:N(v.statusCode)},null,8,["n","textContent"]),v.contentType?(g(),I("code",gt,N(v.contentType),1)):H("",!0),c[14]||(c[14]=m("div",{"flex-auto":""},null,-1)),c[15]||(c[15]=m("div",{op50:""}," Tasks finished in ",-1)),k(te,{n:"green"},{default:M(()=>[Y(N(v.fetchTime)+" ms ",1)]),_:1})]),k(be,{"flex-auto":"","overflow-auto":"","py-2":"",code:y.value,lang:t.value},null,8,["code","lang"])],64)):(g(),j(ge,{key:1},{default:M(()=>[k(X,{n:"primary",onClick:F},{default:M(()=>[k(J,{icon:"carbon:send"}),c[10]||(c[10]=Y(" Run task ",-1))]),_:1})]),_:1}))])}}}),bt=Object.assign(_t,{__name:"ServerTaskDetails"}),xt={"flex-none":"","text-left":""},kt={flex:"","items-center":"","text-sm":"","font-mono":""},Ot=K({__name:"ServerTaskListItem",props:{item:{},index:{default:0}},setup(E){const U=q(!0),A=re();return(R,T)=>{const D=oe,b=me;return g(),I("div",null,[m("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"",px2:"",py1:"","hover-bg-active":"",class:z([{"bg-active":w(A)===E.item.name}]),style:Be({paddingLeft:`calc(0.5rem + ${E.index*1.5}em)`}),onClick:T[0]||(T[0]=d=>{U.value=!U.value,A.value=E.item.name})},[m("div",xt,[E.item.type==="collection"?(g(),j(D,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":U.value?90:0,transition:""},null,8,["transform-rotate"])):H("",!0)]),m("span",kt,[E.item.type==="collection"?(g(),j(D,{key:0,title:`${E.item.tasks?.length} tasks`,icon:"carbon:folder",mr1:""},null,8,["title"])):(g(),j(D,{key:1,icon:"carbon:play",ml3:"",mr1:""})),Y(" "+N(E.item.name),1)])],6),T[1]||(T[1]=m("div",{"x-divider":""},null,-1)),U.value?We(R.$slots,"default",{key:0},()=>[(g(!0),I(W,null,Z(E.item.tasks,d=>(g(),j(b,{key:d.name,item:d,index:E.index+1},null,8,["item","index"]))),128))]):H("",!0)])}}}),me=Object.assign(Ot,{__name:"ServerTaskListItem"}),Tt={flex:"~ gap1","text-sm":""},St={key:0,op50:""},wt={op50:""},Wt=K({__name:"server-tasks",setup(E){const U=q(!1),A=$e(),R=L(()=>Object.keys(A.value?.tasks??{}).map(r=>({name:r,...A.value.tasks[r],type:"task"}))),T=L(()=>Object.entries(A.value?.scheduledTasks??{}).map(([r,n])=>({cron:r,tasks:n}))),D=re(),{view:b,selectedTask:d,inputDefaults:_}=le("serverTasks"),o=L(()=>{!D.value&&d.value&&(D.value=d.value.name);const r=R.value.find(n=>n.name===D.value);return D.value!==d.value?.name&&r&&(d.value=r),r}),v=q(""),y=L(()=>new Le(R.value,{keys:["key","description"],shouldSort:!0})),t=L(()=>v.value?y.value.search(v.value).map(n=>n.item):R.value),e=L(()=>{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(p=>{s=u(p,s)}),s?n(s,f):r.push(f)}),r});function a(){b.value=b.value==="tree"?"list":"tree"}return(r,n)=>{const u=ce,i=Ae,s=at,f=Ue,l=bt,h=Re,p=fe,$=ve,C=Pe,B=Ye,V=pe("tooltip");return g(),I(W,null,[k(f,{"storage-key":"tab-server-tasks"},{left:M(()=>[k(f,{horizontal:"","storage-key":"tab-server-tasks-split"},{left:M(()=>[k(i,{search:v.value,"onUpdate:search":n[1]||(n[1]=S=>v.value=S),pb2:""},{actions:M(()=>[G(k(u,{"text-lg":"",icon:w(b)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:a},null,8,["icon"]),[[V,"Toggle View"]]),G(k(u,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:n[0]||(n[0]=S=>U.value=!U.value)},null,512),[[V,"Default Inputs"]])]),default:M(()=>[m("div",Tt,[v.value?(g(),I("span",St,N(t.value.length)+" matched · ",1)):H("",!0),m("span",wt,N(R.value?.length)+" tasks in total",1)])]),_:1},8,["search"]),(g(!0),I(W,null,Z(w(b)==="tree"?e.value:t.value,S=>(g(),j(me,{key:S.name,item:S},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(W,null,Z(T.value,S=>(g(),I("li",{key:S.cron},[k(s,{collection:S},null,8,["collection"])]))),128))])])]),_:1})]),right:M(()=>[(g(),j(Fe,{max:10},[o.value?(g(),j(l,{key:o.value.name,task:o.value,onOpenDefaultInput:n[2]||(n[2]=S=>U.value=!0)},null,8,["task"])):H("",!0)],1024)),o.value?H("",!0):(g(),j(p,{key:0},{default:M(()=>[k(h,{px6:"",py2:""},{default:M(()=>[...n[7]||(n[7]=[m("span",{op75:""},"Select a task to start",-1)])]),_:1})]),_:1}))]),_:1}),k(B,{modelValue:U.value,"onUpdate:modelValue":n[4]||(n[4]=S=>U.value=S),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:n[5]||(n[5]=S=>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)),k(C,{text:`Query ${w(_).query?.length?`(${w(_).query.length})`:""}`,padding:!1,icon:w(he).query},{default:M(()=>[k($,{modelValue:w(_).query,"onUpdate:modelValue":n[3]||(n[3]=S=>w(_).query=S),py0:"",default:{active:!0,type:"string"}},null,8,["modelValue"])]),_:1},8,["text","icon"])])]),_:1},8,["modelValue"])],64)}}});export{Wt as default};
@@ -1 +1 @@
1
- import{_ as h}from"./nicon-title-he6hzgyb.js";import{_ as ee}from"./nswitch-ls95gzk4.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,o as ie,t as A,r as ue}from"#entry";import{_ as de}from"./nselect-nvb1idpm.js";import{_ as re}from"./ncheckbox-eijyrwcq.js";import{_ as pe}from"./nlink-fgjzhevk.js";import{p as me,w as P,J as m,Y as d,a1 as n,a3 as o,F as v,ah as k,X as F,a4 as M,$ as t,u as a,ab as b,a7 as R,ac as U,j as p}from"./vendor/json-editor-vue-ikjc812x.js";import"./vendor/shiki-hpfujfi3.js";import"./vendor/unocss-mh8fijzd.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},xe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},be={capitalize:"",op75:""},_e={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ye={flex:"~ col gap-2"},ce=["value"],Ve=["value"],ke=["value"],Ce={flex:"~ gap-2"},we={flex:"~ gap-2"},$e=me({__name:"settings",setup(Se){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:z,scale:D,hiddenTabs:_,pinnedTabs:u,hiddenTabCategories:y,minimizePanelInactive:w,sidebarExpanded:S,sidebarScrollable:E}=j("ui"),{openInEditor:B}=j("behavior"),c=le(),W=[["Auto",void 0],["VS Code","vscode"],["VS Code Insider","vscode-insider"],["Cursor","cursor"],["Zed","zed"],["WebStorm","webstorm"],["Sublime Text","sublime"],["Atom","atom"],["Windsurf","windsurf"]],H=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],J=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],X=oe(ne());function Y(s,e){e?_.value=_.value.filter(r=>r!==s):_.value.push(s)}function Z(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function q(s){u.value.includes(s)?u.value=u.value.filter(e=>e!==s):u.value.push(s)}function L(s,e){const r=u.value.indexOf(s);if(r===-1)return;const g=r+e;if(g<0||g>=u.value.length)return;const V=[...u.value];V.splice(r,1),V.splice(g,0,s),u.value=V}async function G(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await ue.clearOptions(),c.value?.app?.reload?.(),window.location.reload())}return P(()=>{c.value&&(c.value.app.frameState.value.closeOnOutsideClick=C.value)}),P(()=>{c.value&&(c.value.app.frameState.value.minimizePanelInactive=w.value)}),(s,e)=>{const r=h,g=ee,V=te,f=ae,T=se,K=ie,$=de,x=re,Q=pe;return d(),m("div",fe,[n(r,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),o("div",ve,[o("div",ge,[e[10]||(e[10]=o("h3",{"text-lg":""}," Tabs ",-1)),(d(!0),m(v,null,k(a(X),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(a(y).includes(l)?"op50 grayscale":"")},{default:t(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!a(y).includes(l),"onUpdate:modelValue":i=>Z(l,i)},{default:t(()=>[o("div",xe,[o("span",be,b(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e[9]||(e[9]=o("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),(d(!0),m(v,null,k(O,i=>(d(),F(g,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!a(_).includes(i.name),"onUpdate:modelValue":N=>Y(i.name,N)},{default:t(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(a(_).includes(i.name)?"op25":"")},[n(V,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",_e,b(i.title),1),a(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:a(u).indexOf(i.name)===0,border:!1,onClick:N=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:a(u).indexOf(i.name)===a(u).length-1,border:!1,onClick:N=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:a(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:N=>q(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):M("",!0)],64))),128))]),o("div",ye,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[o("div",null,[n(K,null,{default:t(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:t(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),U(" "+b(O.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),e[14]||(e[14]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[15]||(e[15]=o("p",null,"UI Scale",-1)),n($,{modelValue:a(D),"onUpdate:modelValue":e[0]||(e[0]=l=>p(D)?D.value=l:null),n:"primary"},{default:t(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,ce)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(x,{modelValue:a(S),"onUpdate:modelValue":e[1]||(e[1]=l=>p(S)?S.value=l:null),"n-primary":""},{default:t(()=>[...e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(E),"onUpdate:modelValue":e[2]||(e[2]=l=>p(E)?E.value=l:null),disabled:a(S),"n-primary":""},{default:t(()=>[...e[13]||(e[13]=[o("span",null," Scrollable Sidebar ",-1)])]),_:1},8,["modelValue","disabled"])]),_:1}),e[30]||(e[30]=o("h3",{mt2:"","text-lg":""}," Features ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[n(x,{modelValue:a(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:t(()=>[...e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(z),"onUpdate:modelValue":e[4]||(e[4]=l=>p(z)?z.value=l:null),"n-primary":""},{default:t(()=>[...e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:t(()=>[...e[19]||(e[19]=[o("span",null,"Show the floating panel",-1)])]),_:1},8,["modelValue"]),e[20]||(e[20]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[21]||(e[21]=o("p",null,"Minimize floating panel on inactive",-1)),n($,{modelValue:a(w),"onUpdate:modelValue":e[6]||(e[6]=l=>p(w)?w.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:t(()=>[(d(),m(v,null,k(J,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,Ve)),64))]),_:1},8,["modelValue"]),e[22]||(e[22]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[23]||(e[23]=o("p",null,"Open In Editor",-1)),n($,{modelValue:a(B),"onUpdate:modelValue":e[7]||(e[7]=l=>p(B)?B.value=l:null),"n-primary":""},{default:t(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,ke)),64))]),_:1},8,["modelValue"])]),_:1}),e[31]||(e[31]=o("h3",{mt2:"","text-lg":""}," Feedback ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[n(x,{modelValue:a(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:t(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Q,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),e[27]||(e[27]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),o("div",Ce,[n(f,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:t(()=>[...e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),U(" Ideas & Suggestions ",-1)])]),_:1}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:t(()=>[...e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),U(" Bug Reports ",-1)])]),_:1})])]),_:1}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",we,[n(f,{n:"orange",onClick:G},{default:t(()=>[...e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),U(" Reset Local Settings & State ",-1)])]),_:1})])])])])}}});export{$e as default};
1
+ import{_ as h}from"./nicon-title-d35s6mci.js";import{_ as ee}from"./nswitch-fe63il2r.js";import{g as j,f as le,k as oe,l as ne,m as te,_ as ae,n as se,o as ie,t as A,r as ue}from"#entry";import{_ as de}from"./nselect-ioi0seuc.js";import{_ as re}from"./ncheckbox-dhpz73wm.js";import{_ as pe}from"./nlink-c419gh8c.js";import{p as me,w as P,J as m,Y as d,a1 as n,a3 as o,F as v,ah as k,X as F,a4 as M,$ as t,u as a,ab as b,a7 as R,ac as U,j as p}from"./vendor/json-editor-vue-gjlsq8io.js";import"./vendor/shiki-g7cm1eew.js";import"./vendor/unocss-cmdaz4ot.js";const fe={px8:"",py6:""},ve={grid:"~ lg:cols-2 gap-x-10 gap-y-3","max-w-300":""},ge={flex:"~ col gap-2"},xe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},be={capitalize:"",op75:""},_e={"flex-auto":"","overflow-hidden":"","text-ellipsis":"","ws-nowrap":""},ye={flex:"~ col gap-2"},ce=["value"],Ve=["value"],ke=["value"],Ce={flex:"~ gap-2"},we={flex:"~ gap-2"},$e=me({__name:"settings",setup(Se){const{interactionCloseOnOutsideClick:C,showPanel:I,showHelpButtons:z,scale:D,hiddenTabs:_,pinnedTabs:u,hiddenTabCategories:y,minimizePanelInactive:w,sidebarExpanded:S,sidebarScrollable:E}=j("ui"),{openInEditor:B}=j("behavior"),c=le(),W=[["Auto",void 0],["VS Code","vscode"],["VS Code Insider","vscode-insider"],["Cursor","cursor"],["Zed","zed"],["WebStorm","webstorm"],["Sublime Text","sublime"],["Atom","atom"],["Windsurf","windsurf"]],H=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],J=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],X=oe(ne());function Y(s,e){e?_.value=_.value.filter(r=>r!==s):_.value.push(s)}function Z(s,e){e?y.value=y.value.filter(r=>r!==s):y.value.push(s)}function q(s){u.value.includes(s)?u.value=u.value.filter(e=>e!==s):u.value.push(s)}function L(s,e){const r=u.value.indexOf(s);if(r===-1)return;const g=r+e;if(g<0||g>=u.value.length)return;const V=[...u.value];V.splice(r,1),V.splice(g,0,s),u.value=V}async function G(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await ue.clearOptions(),c.value?.app?.reload?.(),window.location.reload())}return P(()=>{c.value&&(c.value.app.frameState.value.closeOnOutsideClick=C.value)}),P(()=>{c.value&&(c.value.app.frameState.value.minimizePanelInactive=w.value)}),(s,e)=>{const r=h,g=ee,V=te,f=ae,T=se,K=ie,$=de,x=re,Q=pe;return d(),m("div",fe,[n(r,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),o("div",ve,[o("div",ge,[e[10]||(e[10]=o("h3",{"text-lg":""}," Tabs ",-1)),(d(!0),m(v,null,k(a(X),([l,O])=>(d(),m(v,{key:l},[O.length?(d(),F(T,{key:0,p3:"",flex:"~ col gap-1",class:R(a(y).includes(l)?"op50 grayscale":"")},{default:t(()=>[n(g,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!a(y).includes(l),"onUpdate:modelValue":i=>Z(l,i)},{default:t(()=>[o("div",xe,[o("span",be,b(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e[9]||(e[9]=o("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),(d(!0),m(v,null,k(O,i=>(d(),F(g,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!a(_).includes(i.name),"onUpdate:modelValue":N=>Y(i.name,N)},{default:t(()=>[o("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","of-hidden":"","pr-4":"",class:R(a(_).includes(i.name)?"op25":"")},[n(V,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),o("span",_e,b(i.title),1),a(u).includes(i.name)?(d(),m(v,{key:0},[n(f,{icon:"i-carbon-caret-up",disabled:a(u).indexOf(i.name)===0,border:!1,onClick:N=>L(i.name,-1)},null,8,["disabled","onClick"]),n(f,{icon:"i-carbon-caret-down",disabled:a(u).indexOf(i.name)===a(u).length-1,border:!1,onClick:N=>L(i.name,1)},null,8,["disabled","onClick"])],64)):M("",!0),n(f,{icon:a(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:N=>q(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):M("",!0)],64))),128))]),o("div",ye,[e[29]||(e[29]=o("h3",{"text-lg":""}," Appearance ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[o("div",null,[n(K,null,{default:t(({toggle:l,isDark:O})=>[n(f,{n:"primary",onClick:l},{default:t(()=>[e[11]||(e[11]=o("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1)),U(" "+b(O.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),e[14]||(e[14]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[15]||(e[15]=o("p",null,"UI Scale",-1)),n($,{modelValue:a(D),"onUpdate:modelValue":e[0]||(e[0]=l=>p(D)?D.value=l:null),n:"primary"},{default:t(()=>[(d(),m(v,null,k(H,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,ce)),64))]),_:1},8,["modelValue"]),e[16]||(e[16]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),n(x,{modelValue:a(S),"onUpdate:modelValue":e[1]||(e[1]=l=>p(S)?S.value=l:null),"n-primary":""},{default:t(()=>[...e[12]||(e[12]=[o("span",null," Expand Sidebar ",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(E),"onUpdate:modelValue":e[2]||(e[2]=l=>p(E)?E.value=l:null),disabled:a(S),"n-primary":""},{default:t(()=>[...e[13]||(e[13]=[o("span",null," Scrollable Sidebar ",-1)])]),_:1},8,["modelValue","disabled"])]),_:1}),e[30]||(e[30]=o("h3",{mt2:"","text-lg":""}," Features ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[n(x,{modelValue:a(C),"onUpdate:modelValue":e[3]||(e[3]=l=>p(C)?C.value=l:null),"n-primary":""},{default:t(()=>[...e[17]||(e[17]=[o("span",null,"Close DevTools when clicking outside",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(z),"onUpdate:modelValue":e[4]||(e[4]=l=>p(z)?z.value=l:null),"n-primary":""},{default:t(()=>[...e[18]||(e[18]=[o("span",null,"Show help buttons",-1)])]),_:1},8,["modelValue"]),n(x,{modelValue:a(I),"onUpdate:modelValue":e[5]||(e[5]=l=>p(I)?I.value=l:null),"n-primary":""},{default:t(()=>[...e[19]||(e[19]=[o("span",null,"Show the floating panel",-1)])]),_:1},8,["modelValue"]),e[20]||(e[20]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[21]||(e[21]=o("p",null,"Minimize floating panel on inactive",-1)),n($,{modelValue:a(w),"onUpdate:modelValue":e[6]||(e[6]=l=>p(w)?w.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:t(()=>[(d(),m(v,null,k(J,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,Ve)),64))]),_:1},8,["modelValue"]),e[22]||(e[22]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),e[23]||(e[23]=o("p",null,"Open In Editor",-1)),n($,{modelValue:a(B),"onUpdate:modelValue":e[7]||(e[7]=l=>p(B)?B.value=l:null),"n-primary":""},{default:t(()=>[(d(),m(v,null,k(W,l=>o("option",{key:l[0],value:l[1]},b(l[0]),9,ke)),64))]),_:1},8,["modelValue"])]),_:1}),e[31]||(e[31]=o("h3",{mt2:"","text-lg":""}," Feedback ",-1)),n(T,{p4:"",flex:"~ col gap-2"},{default:t(()=>[n(x,{modelValue:a(A),"onUpdate:modelValue":e[8]||(e[8]=l=>p(A)?A.value=l:null),"n-primary":""},{default:t(()=>[e[24]||(e[24]=o("span",null,"Send anonymous statistics, help us improving DevTools",-1)),n(Q,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),e[27]||(e[27]=o("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1)),o("div",Ce,[n(f,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:t(()=>[...e[25]||(e[25]=[o("div",{"i-carbon-data-enrichment":""},null,-1),U(" Ideas & Suggestions ",-1)])]),_:1}),n(f,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:t(()=>[...e[26]||(e[26]=[o("div",{"i-carbon-debug":""},null,-1),U(" Bug Reports ",-1)])]),_:1})])]),_:1}),e[32]||(e[32]=o("h3",{mt2:"","text-lg":""}," Debug ",-1)),o("div",we,[n(f,{n:"orange",onClick:G},{default:t(()=>[...e[28]||(e[28]=[o("div",{"i-carbon-breaking-change":""},null,-1),U(" Reset Local Settings & State ",-1)])]),_:1})])])])])}}});export{$e as default};