@nuxt/devtools 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/module-main.mjs +1 -1
  3. package/dist/client/200.html +2 -2
  4. package/dist/client/404.html +2 -2
  5. package/dist/client/__inspecting/index.html +2 -2
  6. package/dist/client/_nuxt/{Badge.bd9688d4.js → Badge.0ce662e4.js} +1 -1
  7. package/dist/client/_nuxt/{CodeSnippets.vue.c6839222.js → CodeSnippets.vue.63e1babe.js} +1 -1
  8. package/dist/client/_nuxt/{DrawerRight.vue.d8660e34.js → DrawerRight.vue.eb026405.js} +1 -1
  9. package/dist/client/_nuxt/{DurationDisplay.vue.f895ca51.js → DurationDisplay.vue.9fa7b27d.js} +1 -1
  10. package/dist/client/_nuxt/{FilepathItem.vue.1c96e6cc.js → FilepathItem.vue.7eb51d4e.js} +1 -1
  11. package/dist/client/_nuxt/{HelpFab.vue.748cc95d.js → HelpFab.vue.ebcc1356.js} +1 -1
  12. package/dist/client/_nuxt/{LaunchPage.vue.b71fffc3.js → LaunchPage.vue.63709998.js} +1 -1
  13. package/dist/client/_nuxt/{NCheckbox.vue.96f7ae1a.js → NCheckbox.vue.a470be6e.js} +1 -1
  14. package/dist/client/_nuxt/{NCodeBlock.vue.d5603a1f.js → NCodeBlock.vue.3fea7f9d.js} +1 -1
  15. package/dist/client/_nuxt/{NIconButton.vue.d0a9a760.js → NIconButton.vue.13275ce3.js} +1 -1
  16. package/dist/client/_nuxt/{NIconTitle.vue.c8b7e265.js → NIconTitle.vue.811968a5.js} +1 -1
  17. package/dist/client/_nuxt/{NLink.vue.404a4f6c.js → NLink.vue.8becbaf2.js} +1 -1
  18. package/dist/client/_nuxt/{NMarkdown.vue.4d74a5d5.js → NMarkdown.vue.f8a61172.js} +1 -1
  19. package/dist/client/_nuxt/{NPanelGrids.7b5efdc5.js → NPanelGrids.afa6e237.js} +1 -1
  20. package/dist/client/_nuxt/{NSectionBlock.5d6e9b8e.js → NSectionBlock.4824dc31.js} +1 -1
  21. package/dist/client/_nuxt/{NSelect.vue.e5de3a65.js → NSelect.vue.2f75a7b4.js} +1 -1
  22. package/dist/client/_nuxt/{NSwitch.vue.25cba5a5.js → NSwitch.vue.ae05571e.js} +1 -1
  23. package/dist/client/_nuxt/{NTextInput.vue.fc99730b.js → NTextInput.vue.efd43a47.js} +1 -1
  24. package/dist/client/_nuxt/{NTip.vue.3c4f8e2d.js → NTip.vue.6c00393e.js} +1 -1
  25. package/dist/client/_nuxt/{Navbar.vue.f2b7b652.js → Navbar.vue.76f856f0.js} +1 -1
  26. package/dist/client/_nuxt/{NpmVersionCheck.vue.06d8aff2.js → NpmVersionCheck.vue.9ff03721.js} +1 -1
  27. package/dist/client/_nuxt/{PanelLeftRight.vue.8eda640c.js → PanelLeftRight.vue.9e8aa6b8.js} +1 -1
  28. package/dist/client/_nuxt/{StateEditor.vue.544a7d41.js → StateEditor.vue.b9b04885.js} +1 -1
  29. package/dist/client/_nuxt/{__inspecting.fb15a5b2.js → __inspecting.689fc045.js} +1 -1
  30. package/dist/client/_nuxt/{analyze-build.1984767c.js → analyze-build.8d6d1198.js} +1 -1
  31. package/dist/client/_nuxt/{assets.fe704899.js → assets.b6f9866b.js} +1 -1
  32. package/dist/client/_nuxt/{client.b1955e54.js → client.ce74bb6b.js} +1 -1
  33. package/dist/client/_nuxt/{components.31fd2c9a.js → components.212338f5.js} +1 -1
  34. package/dist/client/_nuxt/{custom-_name_.424ca200.js → custom-_name_.87eb6297.js} +1 -1
  35. package/dist/client/_nuxt/{default.4fda98d6.js → default.b5c163f2.js} +1 -1
  36. package/dist/client/_nuxt/{editor.02d33c7f.js → editor.6dcc09c7.js} +1 -1
  37. package/dist/client/_nuxt/entry.3c854225.js +19 -0
  38. package/dist/client/_nuxt/{entry.f90d2a3f.css → entry.5cc961cc.css} +1 -1
  39. package/dist/client/_nuxt/{error-404.39541df6.js → error-404.67a51e0c.js} +1 -1
  40. package/dist/client/_nuxt/{error-500.6d8c1090.js → error-500.811aab1a.js} +1 -1
  41. package/dist/client/_nuxt/{error-component.d86d2bc0.js → error-component.74964985.js} +2 -2
  42. package/dist/client/_nuxt/{full.e465e0f9.js → full.1ccd4009.js} +1 -1
  43. package/dist/client/_nuxt/hooks.310738c8.js +1 -0
  44. package/dist/client/_nuxt/{imports.6c4842e1.js → imports.ccc44d22.js} +1 -1
  45. package/dist/client/_nuxt/{index.6feef59a.js → index.5d80161c.js} +1 -1
  46. package/dist/client/_nuxt/{index.8ae957ed.js → index.a86d9a7f.js} +1 -1
  47. package/dist/client/_nuxt/{json-editor-vue.2379a5ec.js → json-editor-vue.cb8f6785.js} +47 -47
  48. package/dist/client/_nuxt/{middleware.4b7f7a54.js → middleware.c10051f6.js} +1 -1
  49. package/dist/client/_nuxt/modules.9cc1fa1d.js +4 -0
  50. package/dist/client/_nuxt/{none.94eb9e94.js → none.1d054cdf.js} +1 -1
  51. package/dist/client/_nuxt/{open-graph.9ad8c33f.js → open-graph.4ea7bb24.js} +1 -1
  52. package/dist/client/_nuxt/{overview.88b9ee1d.js → overview.9f34e07f.js} +1 -1
  53. package/dist/client/_nuxt/{pages.196c3253.js → pages.a55d4866.js} +1 -1
  54. package/dist/client/_nuxt/{payload.b786d84c.js → payload.4878fb79.js} +1 -1
  55. package/dist/client/_nuxt/{plugins.06f4e6ce.js → plugins.92e36c4c.js} +1 -1
  56. package/dist/client/_nuxt/{runtime-configs.bfbdafdb.js → runtime-configs.c13ac314.js} +1 -1
  57. package/dist/client/_nuxt/{server-routes.477b8c10.js → server-routes.dae9cba0.js} +1 -1
  58. package/dist/client/_nuxt/settings.fcb97906.js +1 -0
  59. package/dist/client/_nuxt/{storage.20802247.js → storage.d543849f.js} +1 -1
  60. package/dist/client/_nuxt/{terminals.ab54a064.js → terminals.dcdca739.js} +1 -1
  61. package/dist/client/_nuxt/{unocss-runtime.83acba48.js → unocss-runtime.cfd98600.js} +1 -1
  62. package/dist/client/_nuxt/{virtual-files.35133aa6.js → virtual-files.3a24df07.js} +1 -1
  63. package/dist/client/index.html +2 -2
  64. package/dist/client/modules/analyze-build/index.html +2 -2
  65. package/dist/client/modules/assets/index.html +2 -2
  66. package/dist/client/modules/components/index.html +2 -2
  67. package/dist/client/modules/hooks/index.html +2 -2
  68. package/dist/client/modules/imports/index.html +2 -2
  69. package/dist/client/modules/middleware/index.html +2 -2
  70. package/dist/client/modules/modules/index.html +2 -2
  71. package/dist/client/modules/open-graph/index.html +2 -2
  72. package/dist/client/modules/overview/index.html +2 -2
  73. package/dist/client/modules/pages/index.html +2 -2
  74. package/dist/client/modules/payload/index.html +2 -2
  75. package/dist/client/modules/plugins/index.html +2 -2
  76. package/dist/client/modules/runtime-configs/index.html +2 -2
  77. package/dist/client/modules/server-routes/index.html +2 -2
  78. package/dist/client/modules/storage/index.html +2 -2
  79. package/dist/client/modules/terminals/index.html +2 -2
  80. package/dist/client/modules/virtual-files/index.html +2 -2
  81. package/dist/client/settings/index.html +2 -2
  82. package/dist/module.json +1 -1
  83. package/package.json +21 -21
  84. package/dist/client/_nuxt/entry.5024288d.js +0 -19
  85. package/dist/client/_nuxt/hooks.700e3ecc.js +0 -1
  86. package/dist/client/_nuxt/modules.0c194e4b.js +0 -4
  87. package/dist/client/_nuxt/settings.ffb64330.js +0 -1
@@ -1 +1 @@
1
- import{a as e,h as a,o as n}from"./entry.5024288d.js";const s=e({__name:"middleware",setup(o){return(t,r)=>(n(),a("div",null," WIP "))}});export{s as default};
1
+ import{a as e,h as a,o as n}from"./entry.3c854225.js";const s=e({__name:"middleware",setup(o){return(t,r)=>(n(),a("div",null," WIP "))}});export{s as default};
@@ -0,0 +1,4 @@
1
+ import{_ as Be}from"./FilepathItem.vue.7eb51d4e.js";import{a as P,p as B,o as h,c as M,w as x,f as d,V as A,u as m,l as I,t as N,h as $,s as U,v as C,i as b,F as R,q as W,H as le,a3 as we,an as Ae,r as Z,aa as De,k as ae,ao as ke,ap as Re,y as he,aq as Ie,ar as ze,as as Pe,at as Fe,af as Se,au as je,av as He,aw as Ue,a4 as qe,ax as We,z as Ke,a8 as _e,ac as Ye,ay as Ge,P as Je,az as Xe,G as Ze,a0 as Qe,aA as et,R as tt,I as nt,ab as ve}from"./entry.3c854225.js";import{_ as it}from"./NpmVersionCheck.vue.9ff03721.js";import{u as Ce}from"./editor.6dcc09c7.js";import{_ as ot}from"./NSectionBlock.4824dc31.js";import{_ as Me}from"./NIconButton.vue.13275ce3.js";import{_ as st}from"./NIconTitle.vue.811968a5.js";import{_ as rt}from"./NTextInput.vue.efd43a47.js";import{_ as lt}from"./Badge.0ce662e4.js";import{F as at}from"./fuse.esm.88e2763d.js";import{_ as Te}from"./NCodeBlock.vue.3fea7f9d.js";import{_ as ut}from"./NLink.vue.8becbaf2.js";import{_ as ct}from"./NTip.vue.6c00393e.js";import{_ as dt}from"./HelpFab.vue.ebcc1356.js";import"./NCheckbox.vue.a470be6e.js";import"./client.ce74bb6b.js";const ft={flex:"~ col gap2","flex-auto":"","of-hidden":"",px1:""},mt={"gap-1t":"",flex:"","items-center":"","text-ellipsis":"","ws-nowrap":"","text-lg":""},pt={key:2},ht=d("div",{"flex-auto":""},null,-1),_t={key:1,flex:"~ gap-2",title:"Documentation"},vt=d("span",{"i-carbon-link":"","text-lg":"",op50:""},null,-1),yt={key:2,flex:"~ gap-2"},gt=d("span",{"i-carbon-logo-github":"","text-lg":"",op50:""},null,-1),bt={flex:"~ col","items-end":""},xt={key:0,"h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p4:""},$t=["src","alt"],wt=d("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),kt={key:1,flex:"~",mt2:"","flex-auto":"","items-end":"","justify-end":""},It=["src"],zt=d("div",{"flex-auto":""},null,-1),St={flex:"","justify-end":""},Ct="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",Mt="https://api.nuxtjs.org/api/ipx/s_44,f_webp/gh_avatar/",Tt="https://github.com/",Ot="https://www.npmjs.com/package/",ue=P({__name:"ModuleItemBase",props:{mod:null,info:null,compact:{type:Boolean},maintainers:{type:Boolean,default:!0}},setup(e){const t=e,n=B(()=>({...t.mod?.meta,...t.mod,...t.info})),i=Ce();return(o,s)=>{const l=le,a=we;return h(),M(a,{p4:"",flex:"~ gap2"},{default:x(()=>[d("div",ft,[A(o.$slots,"main",{},()=>[d("div",mt,[e.mod.isPackageModule?(h(),M(l,{key:0,to:Ot+(m(n).npm||m(n).name),target:"_blank",hover:"underline text-primary"},{default:x(()=>[I(N(m(n).name),1)]),_:1},8,["to"])):e.mod.entryPath?(h(),$("button",{key:1,role:"button",hover:"underline text-primary",onClick:s[0]||(s[0]=r=>m(i)(e.mod.entryPath))},N(m(n).name),1)):(h(),$("span",pt,N(m(n).name),1)),A(o.$slots,"badge")]),m(n).description?(h(),$("div",{key:0,class:U(e.compact?"ws-nowrap of-hidden truncate":"line-clamp-2"),"mt--1":"","text-sm":"",op50:""},N(m(n).description),3)):C("",!0),ht,m(n).website?(h(),$("div",_t,[vt,b(l,{to:m(n).website,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:x(()=>[I(N(m(n).website.replace(/^https?:\/\//,"")),1)]),_:1},8,["to"])])):C("",!0),m(n).github?(h(),$("div",yt,[gt,b(l,{to:m(n).github,target:"_blank","of-hidden":"",truncate:"","ws-nowrap":"","text-sm":"",op50:"",hover:"op100 underline text-primary"},{default:x(()=>[I(N(m(n).github.replace(/^https?:\/\/github.com\//,"")),1)]),_:1},8,["to"])])):C("",!0)]),A(o.$slots,"items")]),d("div",bt,[m(n).icon||e.mod.isPackageModule?(h(),$("div",xt,[m(n).icon?(h(),$("img",{key:0,src:Ct+m(n).icon,alt:e.mod.name,ma:""},null,8,$t)):C("",!0),wt])):C("",!0),m(n).maintainers?.length&&e.maintainers?(h(),$("div",kt,[(h(!0),$(R,null,W(m(n).maintainers,r=>(h(),M(l,{key:r.name,target:"_blank",to:Tt+r.github,title:r.name},{default:x(()=>[d("img",{src:Mt+r.github,"h-6":"","w-6":"","rounded-full":""},null,8,It)]),_:2},1032,["to","title"]))),128))])):C("",!0),o.$slots.actions?(h(),$(R,{key:2},[zt,d("div",St,[A(o.$slots,"actions")])],64)):C("",!0)])]),_:3})}}}),Nt={key:0,flex:"~ gap-2",title:"Open on filesystem"},Vt=d("span",{"i-carbon-folder-move-to":"","text-lg":"",op50:""},null,-1),Lt=d("span",{"i-carbon-circle-dash":"","animate-spin":"","text-lg":"",op50:""},null,-1),Et=d("code",{"text-sm":"",op50:""},"Upgrading...",-1),Bt={key:1,"mx--2":""},At=["onClick"],Dt=d("span",{"i-carbon-intent-request-active":"","text-lg":"","text-primary":""},null,-1),Rt=d("code",{"text-xs":""},"Update installed, click to restart",-1),Pt=[Dt,Rt],Ft={key:2,"mx--2":""},jt=["onClick"],Ht=d("span",{"i-carbon-intent-request-upgrade":"","text-lg":"",op50:""},null,-1),Ut={op50:""},qt=d("div",{"i-carbon-arrow-right":"",op50:""},null,-1),Wt={"text-green":""},Kt={key:3,flex:"~ gap-2","items-center":"",title:"NPM"},Yt=d("span",{"i-carbon-cube":"","text-lg":"",op50:""},null,-1),Gt={"text-sm":"",op50:""},Jt=P({__name:"ModuleItem",props:{mod:null},setup(e){const t=e,n=B(()=>t.mod.info),i=B(()=>({...t.mod?.meta,...t.mod,...n.value}));return(o,s)=>{const l=Be,a=le,r=it,u=ue;return h(),M(u,{mod:e.mod,info:m(n)},{items:x(()=>[e.mod.entryPath?(h(),$("div",Nt,[Vt,b(l,{filepath:e.mod.entryPath,"text-sm":"",op50:"",hover:"text-primary op100"},null,8,["filepath"])])):C("",!0),m(i).npm?(h(),M(r,{key:m(i).npm,"package-name":m(i).npm,options:{dev:!0}},{default:x(({info:f,update:_,state:v,id:w,restart:k})=>[v==="running"?(h(),M(a,{key:0,flex:"~ gap-2","animate-pulse":"","items-center":"",to:w?`/modules/terminals?id=${encodeURIComponent(w)}`:void 0},{default:x(()=>[Lt,Et]),_:2},1032,["to"])):v==="updated"?(h(),$("div",Bt,[d("button",{flex:"~ gap-2",hover:"bg-primary/20","items-center":"",rounded:"","bg-primary:10":"",px2:"","text-sm":"","text-primary":"",onClick:k},Pt,8,At)])):f?.needsUpdate?(h(),$("div",Ft,[d("button",{flex:"~ gap-2",title:"Click to upgrade","items-center":"",rounded:"",px2:"","text-sm":"",hover:"bg-active",onClick:p=>_()},[Ht,d("code",Ut,"v"+N(f.current),1),qt,d("code",Wt,"v"+N(f.latest),1)],8,jt)])):f?.latest?(h(),$("div",Kt,[Yt,d("code",Gt,"v"+N(f.current),1)])):C("",!0)]),_:1},8,["package-name"])):C("",!0)]),_:1},8,["mod","info"])}}}),Xt=P({__name:"NDropdown",props:{modelValue:{type:Boolean}},emits:[],setup(e,{emit:t}){const i=Ae(e,"modelValue",t,{passive:!0}),o=Z();return De(o,()=>{i.value=!1}),(s,l)=>{const a=ae;return h(),$("div",{ref_key:"el",ref:o,class:"relative"},[A(s.$slots,"trigger",{enabled:m(i),click:()=>i.value=!m(i)},()=>[b(a,{onClick:l[0]||(l[0]=r=>i.value=!m(i))},{default:x(()=>[I(" Dropdown ")]),_:1})]),d("div",{class:U(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[m(i)?"op-100":"op0 pointer-events-none -translate-y-1"]])},[A(s.$slots,"default")],2)],512)}}}),Zt=P({__name:"ModuleItemInstall",props:{item:null},emits:["start"],setup(e,{emit:t}){const n=e,i=ke(),o=B(()=>i.value.find(u=>u.name===n.item.npm)),s=B(()=>o.value&&o.value.isPackageModule),l=B(()=>o.value&&o.value.isPackageModule&&o.value.isUninstallable);async function a(u,f){const _=f==="install"?he.installNuxtModule:he.uninstallNuxtModule,v=await _(u.npm,!0);v.commands&&await Ie.start(u,v,f)&&(ze.value.push({name:u.npm,info:u,processId:v.processId}),t("start"),await _(u.npm,!1))}const r={};return(u,f)=>{const _=lt,v=Me,w=ae,k=Xt,p=ue;return h(),M(p,{mod:r,role:m(s)?"":"button",info:e.item,mb2:"","h-full":"",class:U(m(s)?"border-dashed op75":"hover:bg-active!"),compact:!0,onClick:f[1]||(f[1]=c=>m(s)?null:a(e.item,"install"))},Re({_:2},[m(s)?{name:"badge",fn:x(()=>[b(_,{"bg-green-400:10":"","text-green-400":""},{default:x(()=>[I(" Installed ")]),_:1}),m(l)?(h(),M(k,{key:0,n:"sm green"},{trigger:x(({click:c})=>[b(v,{icon:"carbon-overflow-menu-vertical",onClick:V=>c()},null,8,["onClick"])]),default:x(()=>[b(w,{icon:"carbon-trash-can",n:"red",onClick:f[0]||(f[0]=c=>a(e.item,"uninstall"))},{default:x(()=>[I(" Uninstall ")]),_:1})]),_:1})):C("",!0)]),key:"0"}:void 0]),1032,["role","info","class"])}}});function Qt(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let G;function te(){te.init||(te.init=!0,G=Qt()!==-1)}var Q={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){te(),Se(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",G&&this.$el.appendChild(e),e.data="about:blank",G||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!G&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const en=je();Pe("data-v-b329ee4c");const tn={class:"resize-observer",tabindex:"-1"};Fe();const nn=en((e,t,n,i,o,s)=>(h(),M("div",tn)));Q.render=nn;Q.__scopeId="data-v-b329ee4c";Q.__file="src/components/ResizeObserver.vue";function J(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?J=function(t){return typeof t}:J=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(e)}function on(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ye(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function sn(e,t,n){return t&&ye(e.prototype,t),n&&ye(e,n),e}function ge(e){return rn(e)||ln(e)||an(e)||un()}function rn(e){if(Array.isArray(e))return ne(e)}function ln(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function an(e,t){if(e){if(typeof e=="string")return ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ne(e,t)}}function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function un(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cn(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function dn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,s,l=function(r){for(var u=arguments.length,f=new Array(u>1?u-1:0),_=1;_<u;_++)f[_-1]=arguments[_];if(s=f,!(i&&r===o)){var v=n.leading;typeof v=="function"&&(v=v(r,o)),(!i||r!==o)&&v&&e.apply(void 0,[r].concat(ge(s))),o=r,clearTimeout(i),i=setTimeout(function(){e.apply(void 0,[r].concat(ge(s))),i=0},t)}};return l._clear=function(){clearTimeout(i),i=null},l}function Oe(e,t){if(e===t)return!0;if(J(e)==="object"){for(var n in e)if(!Oe(e[n],t[n]))return!1;return!0}return!1}var fn=function(){function e(t,n,i){on(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,i)}return sn(e,[{key:"createObserver",value:function(n,i){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=cn(n),this.callback=function(a,r){o.options.callback(a,r),a&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},l=s.leading;this.callback=dn(this.callback,this.options.throttle,{leading:function(r){return l==="both"||l==="visible"&&r||l==="hidden"&&!r}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var r=a[0];if(a.length>1){var u=a.find(function(_){return _.isIntersecting});u&&(r=u)}if(o.callback){var f=r.isIntersecting&&r.intersectionRatio>=o.threshold;if(f===o.oldResult)return;o.oldResult=f,o.callback(f,r)}},this.options.intersection),Se(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function Ne(e,t,n){var i=t.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new fn(e,i,n);e._vue_visibilityState=o}}function mn(e,t,n){var i=t.value,o=t.oldValue;if(!Oe(i,o)){var s=e._vue_visibilityState;if(!i){Ve(e);return}s?s.createObserver(i,n):Ne(e,{value:i},n)}}function Ve(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var pn={beforeMount:Ne,updated:mn,unmounted:Ve},hn={itemsLimit:1e3},_n=/(auto|scroll)/;function Le(e,t){return e.parentNode===null?t:Le(e.parentNode,t.concat([e]))}var ee=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},vn=function(t){return ee(t,"overflow")+ee(t,"overflow-y")+ee(t,"overflow-x")},yn=function(t){return _n.test(vn(t))};function be(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=Le(e.parentNode,[]),n=0;n<t.length;n+=1)if(yn(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function ie(e){"@babel/helpers - typeof";return ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(e)}var gn={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function bn(){return this.items.length&&ie(this.items[0])!=="object"}var oe=!1;if(typeof window<"u"){oe=!1;try{var xn=Object.defineProperty({},"passive",{get:function(){oe=!0}});window.addEventListener("test",null,xn)}catch{}}let $n=0;var ce={name:"RecycleScroller",components:{ResizeObserver:Q},directives:{ObserveVisibility:pn},props:{...gn,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,i=this.minItemSize;let o=1e4,s=0,l;for(let a=0,r=t.length;a<r;a++)l=t[a][n]||i,l<o&&(o=l),s+=l,e[a]={accumulator:s,size:l};return this.$_computedMinItemSize=o,e}return[]},simpleArray:bn,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let i=0,o=t.length;i<o;i++)n[t[i][e]]=i;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,i,o){const s=He({id:$n++,index:t,used:!0,key:i,type:o}),l=Ue({item:n,position:0,nr:s});return e.push(l),l},unuseView(e,t=!1){const n=this.$_unusedViews,i=e.nr.type;let o=n.get(i);o||(o=[],n.set(i,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,i=this.gridItems||1,o=this.itemSecondarySize||n,s=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,r=this.items,u=r.length,f=this.sizes,_=this.$_views,v=this.$_unusedViews,w=this.pool,k=this.itemIndexByKey;let p,c,V,z,O;if(!u)p=c=z=O=V=0;else if(this.$_prerender)p=z=0,c=O=Math.min(this.prerender,r.length),V=null;else{const g=this.getScroll();if(t){let T=g.start-this.$_lastUpdateScrollPosition;if(T<0&&(T=-T),n===null&&T<s||T<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=g.start;const L=this.buffer;g.start-=L,g.end+=L;let S=0;if(this.$refs.before&&(S=this.$refs.before.scrollHeight,g.start-=S),this.$refs.after){const T=this.$refs.after.scrollHeight;g.end+=T}if(n===null){let T,q=0,me=u-1,E=~~(u/2),pe;do pe=E,T=f[E].accumulator,T<g.start?q=E:E<u-1&&f[E+1].accumulator>g.start&&(me=E),E=~~((q+me)/2);while(E!==pe);for(E<0&&(E=0),p=E,V=f[u-1].accumulator,c=E;c<u&&f[c].accumulator<g.end;c++);for(c===-1?c=r.length-1:(c++,c>u&&(c=u)),z=p;z<u&&S+f[z].accumulator<g.start;z++);for(O=z;O<u&&S+f[O].accumulator<g.end;O++);}else{p=~~(g.start/n*i);const T=p%i;p-=T,c=Math.ceil(g.end/n*i),z=Math.max(0,Math.floor((g.start-S)/n*i)),O=Math.floor((g.end-S)/n*i),p<0&&(p=0),c>u&&(c=u),z<0&&(z=0),O>u&&(O=u),V=Math.ceil(u/i)*n}}c-p>hn.itemsLimit&&this.itemsLimitError(),this.totalSize=V;let y;const j=p<=this.$_endIndex&&c>=this.$_startIndex;if(j)for(let g=0,L=w.length;g<L;g++)y=w[g],y.nr.used&&(e&&(y.nr.index=k[y.item[a]]),(y.nr.index==null||y.nr.index<p||y.nr.index>=c)&&this.unuseView(y));const fe=j?null:new Map;let H,D,Y;for(let g=p;g<c;g++){H=r[g];const L=a?H[a]:H;if(L==null)throw new Error(`Key is ${L} on item (keyField is '${a}')`);if(y=_.get(L),!n&&!f[g].size){y&&this.unuseView(y);continue}D=H[l];let S=v.get(D),T=!1;if(!y)j?S&&S.length?y=S.pop():y=this.addView(w,g,H,L,D):(Y=fe.get(D)||0,(!S||Y>=S.length)&&(y=this.addView(w,g,H,L,D),this.unuseView(y,!0),S=v.get(D)),y=S[Y],fe.set(D,Y+1)),_.delete(y.nr.key),y.nr.used=!0,y.nr.index=g,y.nr.key=L,y.nr.type=D,_.set(L,y),T=!0;else if(!y.nr.used&&(y.nr.used=!0,T=!0,S)){const q=S.indexOf(y);q!==-1&&S.splice(q,1)}y.item=H,T&&(g===r.length-1&&this.$emit("scroll-end"),g===0&&this.$emit("scroll-start")),n===null?(y.position=f[g-1].accumulator,y.offset=0):(y.position=Math.floor(g/i)*n,y.offset=g%i*o)}return this.$_startIndex=p,this.$_endIndex=c,this.emitUpdate&&this.$emit("update",p,c,z,O),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:j}},getListenerTarget(){let e=be(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let i;if(this.pageMode){const o=e.getBoundingClientRect(),s=n?o.height:o.width;let l=-(n?o.top:o.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>s&&(a=s-l),i={start:l,end:l+a}}else n?i={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:i={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,oe?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,i,o;if(this.pageMode){const s=be(this.$el),l=s.tagName==="HTML"?0:s[t.scroll],a=s.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-a[t.start];n=s,i=t.scroll,o=e+l+u}else n=this.$el,i=t.scroll,o=e;n[i]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const wn={key:0,ref:"before",class:"vue-recycle-scroller__slot"},kn={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function In(e,t,n,i,o,s){const l=qe("ResizeObserver"),a=We("observe-visibility");return Ke((h(),$("div",{class:U(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...r)=>s.handleScroll&&s.handleScroll(...r))},[e.$slots.before?(h(),$("div",wn,[A(e.$slots,"before")],512)):C("v-if",!0),(h(),M(_e(n.listTag),{ref:"wrapper",style:Je({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:U(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:x(()=>[(h(!0),$(R,null,W(o.pool,r=>(h(),M(_e(n.itemTag),Ye({key:r.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${r.position}px) translate${e.direction==="vertical"?"X":"Y"}(${r.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===r.nr.key}]]},Ge(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=r.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:x(()=>[A(e.$slots,"default",{item:r.item,index:r.nr.index,active:r.nr.used})]),_:2},1040,["style","class"]))),128)),A(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(h(),$("div",kn,[A(e.$slots,"after")],512)):C("v-if",!0),b(l,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[a,s.handleVisibilityChange]])}ce.render=In;ce.__file="src/components/RecycleScroller.vue";const zn={"h-full":"",flex:"~ col gap-4"},Sn={"flex-auto":"","of-auto":"",flex:"~ col gap-2",pl6:"",pr4:""},Cn=P({__name:"ModuleInstallList",emits:["close"],setup(e,{emit:t}){const n=Xe(),i=Z(""),o=B(()=>new at(n.value||[],{keys:["name","description","npm","category"]})),s=B(()=>i.value?o.value.search(i.value).map(l=>l.item):n.value);return(l,a)=>{const r=st,u=rt,f=Zt;return h(),$("div",zn,[b(r,{mx6:"",mt6:"","text-xl":"",op75:"",icon:"i-carbon-intent-request-create",text:"Install Module"}),b(u,{modelValue:m(i),"onUpdate:modelValue":a[0]||(a[0]=_=>Ze(i)?i.value=_:null),placeholder:"Search...",icon:"carbon-search",n:"primary",mx6:"","px-5":"","py-2":""},null,8,["modelValue"]),d("div",Sn,[b(m(ce),{class:"scroller",items:m(s),"item-size":160,"key-field":"name"},{default:x(({item:_})=>[b(f,{item:_,onStart:a[1]||(a[1]=v=>t("close"))},null,8,["item"])]),_:1},8,["items"])])])}}});function F(){}F.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.callback;typeof i=="function"&&(o=i,i={}),this.options=i;var s=this;function l(p){return o?(setTimeout(function(){o(void 0,p)},0),!0):p}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,r=t.length,u=1,f=a+r;i.maxEditLength&&(f=Math.min(f,i.maxEditLength));var _=[{newPos:-1,components:[]}],v=this.extractCommon(_[0],n,t,0);if(_[0].newPos+1>=a&&v+1>=r)return l([{value:this.join(n),count:n.length}]);function w(){for(var p=-1*u;p<=u;p+=2){var c=void 0,V=_[p-1],z=_[p+1],O=(z?z.newPos:0)-p;V&&(_[p-1]=void 0);var y=V&&V.newPos+1<a,j=z&&0<=O&&O<r;if(!y&&!j){_[p]=void 0;continue}if(!y||j&&V.newPos<z.newPos?(c=Tn(z),s.pushComponent(c.components,void 0,!0)):(c=V,c.newPos++,s.pushComponent(c.components,!0,void 0)),O=s.extractCommon(c,n,t,p),c.newPos+1>=a&&O+1>=r)return l(Mn(s,c.components,n,t,s.useLongestToken));_[p]=c}u++}if(o)(function p(){setTimeout(function(){if(u>f)return o();w()||p()},0)})();else for(;u<=f;){var k=w();if(k)return k}},pushComponent:function(t,n,i){var o=t[t.length-1];o&&o.added===n&&o.removed===i?t[t.length-1]={count:o.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,o){for(var s=n.length,l=i.length,a=t.newPos,r=a-o,u=0;a+1<s&&r+1<l&&this.equals(n[a+1],i[r+1]);)a++,r++,u++;return u&&t.components.push({count:u}),t.newPos=a,r},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function Mn(e,t,n,i,o){for(var s=0,l=t.length,a=0,r=0;s<l;s++){var u=t[s];if(u.removed){if(u.value=e.join(i.slice(r,r+u.count)),r+=u.count,s&&t[s-1].added){var _=t[s-1];t[s-1]=t[s],t[s]=_}}else{if(!u.added&&o){var f=n.slice(a,a+u.count);f=f.map(function(w,k){var p=i[r+k];return p.length>w.length?p:w}),u.value=e.join(f)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(r+=u.count)}}var v=t[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[l-2].value+=v.value,t.pop()),t}function Tn(e){return{newPos:e.newPos,components:e.components.slice(0)}}var xe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,$e=/\S/,Ee=new F;Ee.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!$e.test(e)&&!$e.test(t)};Ee.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&xe.test(t[n])&&xe.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var de=new F;de.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var o=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};function On(e,t,n){return de.diff(e,t,n)}var Nn=new F;Nn.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Vn=new F;Vn.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function X(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(t){return typeof t}:X=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(e)}var Ln=Object.prototype.toString,K=new F;K.useLongestToken=!0;K.tokenize=de.tokenize;K.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,o=i===void 0?function(s,l){return typeof l>"u"?n:l}:i;return typeof e=="string"?e:JSON.stringify(se(e,null,null,o),o," ")};K.equals=function(e,t){return F.prototype.equals.call(K,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function se(e,t,n,i,o){t=t||[],n=n||[],i&&(e=i(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var l;if(Ln.call(e)==="[object Array]"){for(t.push(e),l=new Array(e.length),n.push(l),s=0;s<e.length;s+=1)l[s]=se(e[s],t,n,i,o);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),X(e)==="object"&&e!==null){t.push(e),l={},n.push(l);var a=[],r;for(r in e)e.hasOwnProperty(r)&&a.push(r);for(a.sort(),s=0;s<a.length;s+=1)r=a[s],l[r]=se(e[r],t,n,i,r);t.pop(),n.pop()}else l=e;return l}var re=new F;re.tokenize=function(e){return e.slice()};re.join=re.removeEmpty=function(e){return e};const En=P({__name:"CodeDiff",props:{from:null,to:null,lang:null},setup(e){const t=e;function n(a,r){const u=On(a.trim(),r.trim()),f=[],_=[],v=[];for(const w of u){const k=w.value.trimEnd().split(`
3
+ `);for(const p of k)w.added?(f.push(v.length),v.push(p)):(w.removed&&_.push(v.length),v.push(p))}return{added:f,removed:_,result:v.join(`
4
+ `)}}const i=B(()=>n(t.from,t.to));function o(a){let r=0;return a.replace(/class="shiki/,'class="shiki diff').replace(/class="line"/g,u=>(r++,i.value.added.includes(r-1)?'class="line line-added"':i.value.removed.includes(r-1)?'class="line line-removed"':u))}const s=Z();Qe(l);function l(){const a=et(s);a&&a.querySelector(".line-added,.line-removed")?.scrollIntoView()}return(a,r)=>{const u=Te;return h(),M(u,{ref_key:"elRef",ref:s,code:m(i).result,lang:e.lang,"transform-rendered":o,onLoaded:l},null,8,["code","lang"])}}}),Bn={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},An={capitalize:""},Dn=d("p",{op50:""}," Following command will be executed in your terminal: ",-1),Rn={op50:""},Pn=d("p",null,[d("span",{op50:""},"After that, Nuxt will "),d("span",{"text-orange":""},"restart automatically"),I(". ")],-1),Fn={flex:"~ gap-3",mt2:"","justify-end":""},jn=P({__name:"ModuleActionDialog",setup(e){const t=tt(),n=Ce(),i={};return(o,s)=>{const l=ue,a=Te,r=ut,u=En,f=ct,_=ae,v=nt;return h(),M(m(Ie),null,{default:x(({resolve:w,args:k})=>[b(v,{"model-value":!0,onClose:p=>w(!1)},{default:x(()=>[b(l,{mod:i,info:k[0],border:"none","w-150":"","n-panel-grids":""},null,8,["info"]),d("div",Bn,[d("h2",{"text-xl":"",class:U(k[2]==="install"?"text-primary":"text-red")},[d("span",An,N(k[2]),1),I(),d("code",null,N(k[0].name),1),I("? ")],2),Dn,b(a,{code:k[1].commands.join(" "),lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),d("p",Rn,[I(" Then your "),b(r,{role:"button",n:"primary",onClick:s[0]||(s[0]=p=>m(n)(m(t)?._nuxtConfigFile)),textContent:"Nuxt config"}),I(" will be updated as: ")]),b(u,{from:k[1].configOriginal,to:k[1].configGenerated,"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Pn,d("div",Fn,[b(f,{n:"sm purple","flex-auto":"",icon:"carbon-chemistry"},{default:x(()=>[I(" Experimental. Backup your project first. ")]),_:1}),b(_,{onClick:p=>w(!1)},{default:x(()=>[I(" Cancel ")]),_:2},1032,["onClick"]),b(_,{n:"solid",capitalize:"",class:U(k[2]==="install"?"n-primary":"n-red"),onClick:p=>w(!0)},{default:x(()=>[I(N(k[2]),1)]),_:2},1032,["class","onClick"])])])]),_:2},1032,["onClose"])]),_:1})}}}),Hn={class:"markdown-body"},Un=d("h1",null,"Modules",-1),qn=d("p",null,[I("Nuxt provides a module system to extend the framework core and simplify integrations. You don’t need to develop everything from scratch or maintain boilerplate if there is already a Nuxt module for it. Adding Nuxt modules is possible using "),d("code",null,"nuxt.config"),I(".")],-1),Wn=d("p",null,[I("You can explore the list of modules on "),d("a",{href:"https://nuxt.com/modules",target:"_blank",rel:"noopener"},"nuxt.com/modules"),I(" or install them directly inside the DevTools.")],-1),Kn=d("p",null,[d("a",{href:"https://nuxt.com/docs/guide/concepts/modules",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Yn=[Un,qn,Wn,Kn],Gn={__name:"modules",setup(e,{expose:t}){return t({frontmatter:{}}),(i,o)=>(h(),$("div",Hn,Yn))}},Jn={"h-full":"","w-full":"","of-auto":""},Xn={relative:"","h-20":"","w-20":"",flex:"","flex-none":"",rounded:"","bg-gray:3":"",p3:""},Zn=["src","alt"],Qn=d("div",{"i-carbon-cube":"",ma:"","text-4xl":"",op30:""},null,-1),ei={"text-lg":"","group-hover":"text-primary",transition:"",flex:"~ gap-2 items-center"},ti=d("div",{"i-carbon-circle-dash":"","animate-spin":"","text-xl":"",op75:""},null,-1),ni={op75:""},ii=d("div",{"i-carbon-intent-request-create":"","text-4xl":"",op40:"","group-hover":"op75 text-primary",transition:""},null,-1),oi=d("div",{"text-lg":"",op40:"","group-hover":"op75 text-primary",transition:""}," Install New Module ",-1),si={key:0,border:"l base",pos:"fixed bottom-0 right-0 top-0","z-200":"","w-150":"","bg-base":""},ri="https://api.nuxtjs.org/api/ipx/s_80,f_webp/gh/nuxt/modules/main/icons/",wi=P({__name:"modules",setup(e){const t=Z(!1),n=ke(),i=B(()=>n.value.filter(s=>s.isPackageModule)),o=B(()=>n.value.filter(s=>!s.isPackageModule));return(s,l)=>{const a=Jt,r=we,u=le,f=ot,_=Me,v=Cn,w=jn,k=Gn,p=dt;return h(),$(R,null,[d("div",Jn,[b(f,{icon:"carbon-3d-mpr-toggle",text:"Installed Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${m(i).length}`},{default:x(()=>[(h(!0),$(R,null,W(m(i),c=>(h(),M(a,{key:c.name,mod:c},null,8,["mod"]))),128)),(h(!0),$(R,null,W("installingModules"in s?s.installingModules:m(ze),c=>(h(),M(u,{key:c.processId,block:"","min-h-30":"",to:`/modules/terminals?id=${encodeURIComponent(c.processId)}`},{default:x(()=>[b(r,{border:"1.5 dashed","h-full":"","animate-pulse":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-1 items-center justify-center",role:"button",class:"group"},{default:x(()=>[d("div",Xn,[d("img",{src:ri+c.info.icon,alt:c.info.name,ma:""},null,8,Zn),Qn]),d("div",ei,[ti,d("span",ni,"Installing "+N(c.name)+"...",1)])]),_:2},1024)]),_:2},1032,["to"]))),128)),b(r,{border:"1.5 dashed","min-h-30":"",p4:"",transition:"",hover:"border-primary",flex:"~ col gap-2 items-center justify-center",role:"button",class:"group",onClick:l[0]||(l[0]=c=>t.value=!0)},{default:x(()=>[ii,oi]),_:1})]),_:1},8,["description"]),m(o).length?(h(),M(f,{key:0,icon:"carbon-3d-mpr-toggle",text:"User Modules","container-class":"grid grid-cols-minmax-400px gap3 px4",padding:!1,description:`Total modules: ${m(o).length}`},{default:x(()=>[(h(!0),$(R,null,W(m(o),c=>(h(),$(R,{key:c.meta?.name||c.entryPath},[c.meta?.name||c.entryPath?(h(),M(a,{key:0,mod:c},null,8,["mod"])):C("",!0)],64))),128))]),_:1},8,["description"])):C("",!0),b(ve,{name:"fade-in"},{default:x(()=>[m(t)?(h(),$("div",{key:0,class:"fixed bottom-0 left-0 right-0 top-0 z-100","bg-black:20":"","backdrop-blur-2":"",onClick:l[1]||(l[1]=c=>t.value=!1)})):C("",!0)]),_:1}),b(ve,{name:"slide-in"},{default:x(()=>[m(t)?(h(),$("div",si,[b(_,{icon:"carbon-close",pos:"absolute top-3 right-3","rounded-full":"","text-xl":"",onClick:l[2]||(l[2]=c=>t.value=!1)}),b(v,{onClose:l[3]||(l[3]=c=>t.value=!1)})])):C("",!0)]),_:1}),b(w)]),b(p,null,{default:x(()=>[b(k)]),_:1})],64)}}});export{wi as default};
@@ -1 +1 @@
1
- import{aU as r,V as n}from"./entry.5024288d.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
1
+ import{aU as r,V as n}from"./entry.3c854225.js";const t={};function o(e,s){return n(e.$slots,"default")}const c=r(t,[["render",o]]);export{c as default};
@@ -1,3 +1,3 @@
1
- import{_ as Z}from"./NTextInput.vue.fc99730b.js";import{_ as ee}from"./NIconButton.vue.d0a9a760.js";import{_ as te}from"./Navbar.vue.f2b7b652.js";import{_ as oe}from"./NLink.vue.404a4f6c.js";import{a as C,o,c as N,w as g,V as ne,h as a,v as x,n as ae,g as se,a8 as re,p as T,aB as ie,r as I,u as e,f as t,q as R,s as M,t as _,F as $,i as d,l as k,a3 as V,k as ce,P as B,aC as j,aD as le,aE as de,Q as pe,aF as me,aG as ue,aH as ge,aI as P,af as he,G as _e,aJ as fe}from"./entry.5024288d.js";import{_ as z}from"./NSectionBlock.5d6e9b8e.js";import{_ as ve}from"./NCodeBlock.vue.d5603a1f.js";import{a as be,u as D}from"./editor.02d33c7f.js";import{_ as we}from"./HelpFab.vue.748cc95d.js";import"./NIconTitle.vue.c8b7e265.js";import"./client.b1955e54.js";const xe={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},J=C({__name:"NTextExternalLink",props:{link:null},setup(n){return(m,i)=>(o(),N(re(n.link?oe:"div"),ae(se(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:g(()=>[ne(m.$slots,"default"),n.link?(o(),a("div",xe)):x("",!0)]),_:3},16))}}),H=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e=t("div",{border:"b base","flex-auto":""},null,-1),Te={key:0,"x-divider":""},Ce={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",px4:"",py2:""},Ne=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Me={"w-full":"",p2:"",op75:""},Oe={key:1,m4:"",flex:"~ col gap-2"},Ae={flex:"~ gap-1 wrap items-center"},Ie={key:1},Re={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Be=C({__name:"OpenGraphMissingTabs",props:{tags:null,matchedRouteFilepath:null},setup(n){const m=n,i=T(()=>H.filter(c=>!m.tags?.some(p=>p.name===c.name))),l=T(()=>{let c={};const p={};i.value.forEach(h=>{h.seoMeta?Object.assign(p,h.seoMeta):c=ie(c,h.head)});const b=[];if(Object.keys(p).length){const h=JSON.stringify(p,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${h})`)}if(Object.keys(c).length){const h=JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${h})`)}return b.join(`
1
+ import{_ as Z}from"./NTextInput.vue.efd43a47.js";import{_ as ee}from"./NIconButton.vue.13275ce3.js";import{_ as te}from"./Navbar.vue.76f856f0.js";import{_ as oe}from"./NLink.vue.8becbaf2.js";import{a as C,o,c as N,w as g,V as ne,h as a,v as x,n as ae,g as se,a8 as re,p as T,aB as ie,r as I,u as e,f as t,q as R,s as M,t as _,F as $,i as d,l as k,a3 as V,k as ce,P as B,aC as j,aD as le,aE as de,Q as pe,aF as me,aG as ue,aH as ge,aI as P,af as he,G as _e,aJ as fe}from"./entry.3c854225.js";import{_ as z}from"./NSectionBlock.4824dc31.js";import{_ as ve}from"./NCodeBlock.vue.3fea7f9d.js";import{a as be,u as D}from"./editor.6dcc09c7.js";import{_ as we}from"./HelpFab.vue.ebcc1356.js";import"./NIconTitle.vue.811968a5.js";import"./client.ce74bb6b.js";const xe={key:0,"i-carbon:arrow-up-right":"","translate-y--1":"","text-xs":"",op50:""},J=C({__name:"NTextExternalLink",props:{link:null},setup(n){return(m,i)=>(o(),N(re(n.link?oe:"div"),ae(se(n.link?{href:n.link,target:"_blank",rel:"noopener noreferrer"}:{})),{default:g(()=>[ne(m.$slots,"default"),n.link?(o(),a("div",xe)):x("",!0)]),_:3},16))}}),H=[{name:"title",suggestion:"required",head:{title:"[title]"},seoMeta:{title:"[title]"},docs:"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title",description:"A concise and descriptive title for the browser that accurately summarizes the content of the page."},{name:"description",suggestion:"required",head:{meta:[{name:"description",content:"[description]"}]},seoMeta:{description:"[description]"},description:"A one to two sentence summary for search engines that includes relevant keywords to improve visibility in search results."},{name:"icon",suggestion:"recommended",head:{link:[{rel:"icon",type:"image/png",href:"/favicon.png"}]},description:"A small image that appears in the browser tab and bookmark menu to help users easily identify the page."},{name:"lang",suggestion:"recommended",head:{htmlAttrs:{lang:"en"}},description:"The primary language of the page to help search engines and browsers understand the content."},{name:"og:title",suggestion:"recommended",head:{meta:[{property:"og:title",content:"[og:title]"}]},seoMeta:{ogTitle:"[og:title]"},docs:"https://ogp.me/#metadata",description:"A title for the link preview used by social media platforms."},{name:"og:description",suggestion:"recommended",head:{meta:[{property:"og:description",content:"[og:description]"}]},seoMeta:{ogDescription:"[og:description]"},docs:"https://ogp.me/#metadata",description:"A description for the link preview used by social media platforms."},{name:"og:image",suggestion:"recommended",head:{meta:[{property:"og:image",content:"[og:image]"}]},seoMeta:{ogImage:"[og:image]"},docs:"https://ogp.me/#metadata",description:"An image for the link preview used by social media platforms."},{name:"og:url",suggestion:"recommended",head:{meta:[{property:"og:url",content:"[og:url]"}]},seoMeta:{ogUrl:"[og:url]"},docs:"https://ogp.me/#metadata",description:"A canonical URL for the link preview used to specify the preferred URL to display in search engine results and social media previews when multiple URLs may point to the same page."},{name:"twitter:title",suggestion:"recommended",head:{meta:[{name:"twitter:title",content:"[twitter:title]"}]},seoMeta:{twitterTitle:"[twitter:title]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A title for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:description",suggestion:"recommended",head:{meta:[{name:"twitter:description",content:"[twitter:description]"}]},seoMeta:{twitterDescription:"[twitter:description]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"A description for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:image",suggestion:"recommended",head:{meta:[{name:"twitter:image",content:"[twitter:image]"}]},seoMeta:{twitterImage:"[twitter:image]"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"An image for the Twitter card used to provide a preview of the content shared on the page."},{name:"twitter:card",suggestion:"recommended",head:{meta:[{name:"twitter:card",content:"summary"}]},seoMeta:{twitterCard:"summary"},docs:"https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards",description:"The type of Twitter card to use, which determines the type of card to display in link previews on Twitter."}],ye={flex:"~ wrap","mt--2":"","w-full":"","flex-none":""},ke=["onClick"],$e=t("div",{border:"b base","flex-auto":""},null,-1),Te={key:0,"x-divider":""},Ce={key:1,"x-divider":""},Se={flex:"~ gap-1 items-center",px4:"",py2:""},Ne=t("div",{"i-carbon-warning":"","text-orange":""},null,-1),Me={"w-full":"",p2:"",op75:""},Oe={key:1,m4:"",flex:"~ col gap-2"},Ae={flex:"~ gap-1 wrap items-center"},Ie={key:1},Re={flex:"~ gap-2",n:"sm primary",absolute:"","right-2":"","top-2":""},Be=C({__name:"OpenGraphMissingTabs",props:{tags:null,matchedRouteFilepath:null},setup(n){const m=n,i=T(()=>H.filter(c=>!m.tags?.some(p=>p.name===c.name))),l=T(()=>{let c={};const p={};i.value.forEach(h=>{h.seoMeta?Object.assign(p,h.seoMeta):c=ie(c,h.head)});const b=[];if(Object.keys(p).length){const h=JSON.stringify(p,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useSeoMeta(${h})`)}if(Object.keys(c).length){const h=JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:").replace(/"/g,"'");b.push(`useHead(${h})`)}return b.join(`
2
2
 
3
3
  `)}),u=be(),O=D(),y=["Missing Tags","Code Snippet"],f=I(y[0]);return(c,p)=>{const b=J,h=V,S=ce,A=ve,E=z;return e(i).length?(o(),N(E,{key:0,text:"Missing Tags",description:`${e(i).length} missing tags`,icon:"carbon:warning-other","header-class":"text-orange op100! [[open]_&]:text-inherit",padding:!1},{default:g(()=>[t("div",ye,[(o(),a($,null,R(y,(s,r)=>t("button",{key:r,px4:"",py2:"",border:"r t base",hover:"bg-active",class:M(s===e(f)?"":"border-b"),onClick:v=>f.value=s},[t("div",{class:M(s===e(f)?"":"op30"),capitalize:""},_(s),3)],10,ke)),64)),$e]),e(f)===y[0]?(o(),N(h,{key:0,grid:"~ cols-[max-content_1fr]",m4:"","items-center":"","justify-between":"","of-hidden":""},{default:g(()=>[(o(!0),a($,null,R(e(i),(s,r)=>(o(),a($,{key:r},[r?(o(),a("div",Te)):x("",!0),r?(o(),a("div",Ce)):x("",!0),t("div",Se,[Ne,d(b,{op50:"",link:s.docs,n:"orange"},{default:g(()=>[k(_(s.name),1)]),_:2},1032,["link"])]),t("div",Me,_(s.description),1)],64))),128))]),_:1})):(o(),a("div",Oe,[t("p",Ae,[d(S,{icon:"carbon-copy",n:"xs","px-2":"",onClick:p[0]||(p[0]=s=>e(u)(e(l)))},{default:g(()=>[k(" Copy ")]),_:1}),k(" the following code snippet and paste it into your "),n.matchedRouteFilepath?(o(),N(S,{key:0,icon:"carbon-launch",n:"xs","px-2":"",onClick:p[1]||(p[1]=s=>e(O)(n.matchedRouteFilepath))},{default:g(()=>[k(" page component ")]),_:1})):(o(),a("span",Ie,"page component")),k(" to full fill the missing tags. ")]),d(h,{relative:"","n-code-block":""},{default:g(()=>[d(A,{code:e(l),lang:"ts",lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code"]),t("div",Re,[d(S,{icon:"carbon-copy",onClick:p[2]||(p[2]=s=>e(u)(e(l)))},{default:g(()=>[k(" Copy ")]),_:1})])]),_:1})]))]),_:1},8,["description"])):x("",!0)}}}),Ee={class:"max-w-[524px] min-w-[524px] cursor-pointer bg-base"},Le={class:"break-words border border-base px-[12px] py-[10px] antialiased"},Fe={class:"overflow-hidden truncate whitespace-nowrap text-[12px] leading-[11px] uppercase op50"},Ge={class:"block h-[46px] max-h-[46px] border-separate select-none overflow-hidden break-words text-left",style:{"border-spacing":"0px"}},Pe={class:"mt-[3px] truncate pt-[2px] text-[16px] font-semibold leading-[20px]"},Ve={class:"mt-[3px] block h-[18px] max-h-[80px] border-separate select-none overflow-hidden truncate whitespace-nowrap break-words text-left text-[14px] leading-[20px] op50",style:{"-webkit-line-clamp":"1","border-spacing":"0px","-webkit-box-orient":"vertical"}},je=C({__name:"SocialFacebook",props:{card:null},setup(n){return(m,i)=>(o(),a("div",Ee,[t("div",{class:"h-[274px] border border-b-0 border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Le,[t("div",Fe,_(n.card.url),1),t("div",Ge,[t("div",Pe,_(n.card.title),1),t("div",Ve,_(n.card.description),1)])])]))}}),ze={class:"max-w-[438px] min-w-[438px] border border-base rounded-[0.85714em] bg-base -outline-offset-1"},De={class:"break-words border-base p-[0.75em] antialiased",flex:"~ col justify-center gap-1"},Je={class:"mt-[0.32333em] overflow-hidden truncate whitespace-nowrap text-[14px] leading-[18px] lowercase op50"},He={class:"m-0 truncate text-[14px] font-semibold leading-[19px]"},Ue={class:"line-clamp-2 block select-none overflow-hidden break-words text-left text-[14px] leading-[18px] op50"},qe=C({__name:"SocialTwitter",props:{tags:null},setup(n){const m=n,i=T(()=>j(m.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"twitter:image"},{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"twitter:image:alt"}],description:[{tag:"meta",name:"twitter:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]})),l=T(()=>i.value.image?m.tags.find(u=>u.tag==="meta"&&u.name==="twitter:card")?.value||"summary_large_image":"summary");return(u,O)=>(o(),a("div",ze,[t("div",{class:M(["cursor-pointer overflow-hidden leading-[1.3em]",e(l)==="summary_large_image"?"":"flex"]),hover:"bg-[#88888805]"},[e(l)==="summary_large_image"?(o(),a("div",{key:0,class:"h-[220px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(i).image)})`})},null,4)):(o(),a("div",{key:1,class:"h-[122px] w-[122px] flex-none border-r border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(e(i).image)})`})},null,4)),t("div",De,[t("div",Je,_(e(i).url),1),t("div",He,_(e(i).title),1),t("div",Ue,_(e(i).description),1)])],2)]))}}),Ke={class:"max-w-[520px] min-w-[520px] cursor-pointer overflow-hidden border border-base rounded-[2px] shadow-md bg-base"},Qe={class:"break-words p-[10px] antialiased"},We={class:"block h-auto max-h-[50px] border-separate select-none break-words text-left",style:{"border-spacing":"0px"}},Ye={class:"pb-[2px] text-[16px] font-semibold leading-[24px]"},Xe={class:"overflow-hidden truncate whitespace-nowrap text-xs font-normal uppercase op85"},Ze=C({__name:"SocialLinkedin",props:{card:null},setup(n){return(m,i)=>(o(),a("div",Ke,[t("div",{class:"h-[270px] border-b border-base bg-cover bg-center bg-no-repeat",style:B({backgroundImage:`url(${JSON.stringify(n.card.image)})`})},null,4),t("div",Qe,[t("div",We,[t("div",Ye,_(n.card.title),1),t("div",Xe,_(n.card.url),1)])])]))}}),et={"h-full":"","w-520":"",flex:"~ col"},tt={flex:"~ wrap","w-full":"","flex-none":""},ot=["onClick"],nt=t("div",{border:"b base","flex-auto":""},null,-1),at={flex:"~ items-center justify-center","flex-auto":"",p4:"","n-panel-grids":""},st={key:0},rt={key:1},it={key:2},ct=C({__name:"SocialPreviewGroup",props:{tags:null},setup(n){const m=n,i=["twitter","facebook","linkedin"],l=I(i[0]),u=T(()=>j(m.tags,{title:[{tag:"title"}],image:[{tag:"meta",name:"og:image"}],imageAlt:[{tag:"meta",name:"og:image:alt"}],description:[{tag:"meta",name:"og:description"},{tag:"meta",name:"description"}],favicon:[{tag:"link",name:"icon"}]}));return(O,y)=>{const f=je,c=qe,p=Ze;return o(),a("div",et,[t("div",tt,[(o(),a($,null,R(i,(b,h)=>t("button",{key:h,px4:"",py2:"",border:"r base",hover:"bg-active",class:M(b===e(l)?"":"border-b"),onClick:S=>l.value=b},[t("div",{class:M(b===e(l)?"":"op30"),capitalize:""},_(b),3)],10,ot)),64)),nt]),t("div",at,[e(l)==="facebook"?(o(),a("div",st,[d(f,{card:e(u)},null,8,["card"])])):e(l)==="twitter"?(o(),a("div",rt,[d(c,{tags:n.tags},null,8,["tags"])])):e(l)==="linkedin"?(o(),a("div",it,[d(p,{card:e(u)},null,8,["card"])])):x("",!0)])])}}}),lt={class:"markdown-body"},dt=le('<h1>Open Graph</h1><p>Nuxt provides several different ways to manage your meta tags using <a href="https://unhead.harlanzw.com/" target="_blank" rel="noopener"><code>unhead</code></a>. Improve your Nuxt app’s SEO with powerful head config, composables and components.</p><p><a href="https://nuxt.com/docs/getting-started/seo-meta" target="_blank" rel="noopener">Learn more on the documentation</a></p><hr><p>You can also find how open graph specs are defined in:</p><ul><li><a href="https://ogp.me/" target="_blank" rel="noopener">The Open Graph protocol</a></li><li><a href="https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started" target="_blank" rel="noopener">Twitter Cards</a></li></ul>',6),pt=[dt],mt={__name:"open-graph",setup(n,{expose:m}){return m({frontmatter:{}}),(l,u)=>(o(),a("div",lt,pt))}},ut={flex:"~","h-full":"","w-full":"","of-hidden":""},gt={"h-full":"","flex-auto":"","of-auto":""},ht={"flex-none":"",flex:"~ gap2 items-center"},_t={flex:"~ col"},ft={key:0,"x-divider":""},vt={key:1,"x-divider":""},bt={mr2:"",px4:"",py2:""},At=C({__name:"open-graph",setup(n){const m=I(0),i=de(),l=pe(async()=>(m.value,(await i.value?.resolveTags()).map(r=>{const v=r.props||{};return r.tag==="htmlAttrs"&&v.lang?{tag:"html",name:"lang",value:v.lang}:v.charset?{tag:"meta",name:"charset",value:v.charset}:{tag:r.tag,name:v.property??v.name??v.rel??r.tag,value:v.content??v.href??r.textContent??JSON.stringify(v)}})),[]),u=I(!0);function O(){m.value+=1}const y=me(),f=ue(),c=I(""),p=ge(),b=D();async function h(){c.value!==f.value.path&&y.value.push(c.value||"/")}const S=T(()=>c.value===f.value.path?[]:y.value.resolve(c.value||"/").matched),A=T(()=>{const s=p.value.find(r=>r.path===f.value?.matched?.[0]?.path);return s?.file||s?.meta?.file});function E(s){return H.find(r=>r.name===s.name)?.docs}return P(f).toBeTruthy().then(s=>{c.value=s.path}),P(y).toBeTruthy().then(s=>{s.afterEach(()=>{he(()=>{c.value=f.value.path})})}),(s,r)=>{const v=Z,L=ee,U=te,G=J,q=V,K=z,Q=Be,W=ct,Y=mt,X=we;return o(),a($,null,[t("div",ut,[t("div",gt,[d(U,null,{search:g(()=>[d(v,{modelValue:e(c),"onUpdate:modelValue":r[0]||(r[0]=w=>_e(c)?c.value=w:null),placeholder:"Route",icon:"carbon-direction-right-01 scale-y--100",n:"primary","flex-auto":"","font-mono":"",class:M(["px-5 py-2",e(f).path===e(c)?"":e(S).length?"text-green":"text-orange"]),onKeydown:fe(h,["enter"])},null,8,["modelValue","class","onKeydown"])]),actions:g(()=>[t("div",ht,[e(A)?(o(),N(L,{key:0,"text-lg":"",icon:"carbon:launch",title:"Open file in editor",onClick:r[1]||(r[1]=w=>e(b)(e(A)))})):x("",!0),d(L,{"text-lg":"",icon:"carbon:reset",title:"Refresh Data",onClick:O}),d(L,{"text-lg":"",icon:e(u)?"carbon:side-panel-open":"carbon:open-panel-right",title:"Toggle Preview",onClick:r[2]||(r[2]=w=>u.value=!e(u))},null,8,["icon"])])]),_:1}),t("div",_t,[d(K,{text:"Tags",icon:"carbon:tag-group"},{default:g(()=>[d(q,{grid:"~ cols-[max-content_1fr]","items-center":"","justify-between":"","of-hidden":""},{default:g(()=>[(o(!0),a($,null,R(e(l),(w,F)=>(o(),a($,{key:F},[F?(o(),a("div",ft)):x("",!0),F?(o(),a("div",vt)):x("",!0),t("div",bt,[d(G,{op50:"",link:E(w),n:"primary"},{default:g(()=>[k(_(w.name),1)]),_:2},1032,["link"])]),d(G,{link:w.value.match(/^https?:\/\//)?w.value:void 0,"w-full":"",p2:"","font-mono":"",n:"primary"},{default:g(()=>[k(_(w.value),1)]),_:2},1032,["link"])],64))),128))]),_:1})]),_:1}),d(Q,{tags:e(l),"matched-route-filepath":e(A)},null,8,["tags","matched-route-filepath"])])]),e(u)&&e(l)?.length?(o(),N(W,{key:0,tags:e(l),border:"l base","w-540px":"","flex-none":""},null,8,["tags"])):x("",!0)]),d(X,null,{default:g(()=>[d(Y)]),_:1})],64)}}});export{At as default};
@@ -1 +1 @@
1
- import{a as V,b as j,R as D,a7 as I,al as R,aK as A,aL as L,D as M,p as T,c,w as o,o as s,u as e,h as d,f as t,i as l,t as r,v as a,F as p,aM as $,l as n,j as F,m as O,H as P,k as W}from"./entry.5024288d.js";import{_ as G}from"./Badge.bd9688d4.js";import{_ as H}from"./NpmVersionCheck.vue.06d8aff2.js";import{_ as E}from"./NTip.vue.3c4f8e2d.js";import{_ as K}from"./NPanelGrids.7b5efdc5.js";import"./NCodeBlock.vue.d5603a1f.js";import"./client.b1955e54.js";import"./NCheckbox.vue.96f7ae1a.js";const U="0.5.1",q={key:0},z={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p8:"",px20:""},J=t("div",{"flex-auto":""},null,-1),Q={flex:"~ col","mt-20":"","items-center":""},X={flex:"~","mt--10":"","items-center":"","justify-center":""},Y={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1"},Z=t("span",{op40:""}," Nuxt DevTools ",-1),tt={op40:""},et={flex:"~ gap2 wrap"},ot={p4:"","theme-card-green":"",flex:"~ col auto"},nt=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),st={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),it=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),at=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),ct=t("div",{"carbon-function":"","text-3xl":""},null,-1),rt=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),ut=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={flex:"~ col gap2"},dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},pt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),n(" Star on GitHub ")],-1),mt=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),n(" Ideas & Suggestions ")],-1),ht=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),n(" Project Roadmap ")],-1),xt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),n(" Bug Reports ")],-1),ft=t("div",{"i-carbon-settings":""},null,-1),gt=t("div",{"flex-auto":""},null,-1),vt={flex:"~ gap-1","items-center":"","justify-center":"","text-sm":"",op40:""},bt=t("span",null,"+",-1),kt=t("span",null,"+",-1),wt=t("span",null,"+",-1),yt=t("span",null,"+",-1),Lt=V({__name:"overview",setup(Ct){const m=j(),i=D(),v=I(),h=R(),b=A(),k=L(),w=M();function y(){F.value=!0,w.push("/")}const x=T(()=>m.value?.nuxt.vueApp.version);return(f,Nt)=>{const C=O,N=G,g=H,u=P,S=E,_=W,B=K;return s(),c(B,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(i)?(s(),d("div",z,[J,t("div",Q,[t("div",X,[l(C,{"h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:y},[l(N,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",Y,[Z,t("code",tt,"v"+r(e(U)),1),l(g,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",et,[t("div",ot,[nt,l(g,{"package-name":"nuxt",options:{dev:!0}})]),e(x)?(s(),d("div",st,[lt,t("code",null,"v"+r(e(x)),1)])):a("",!0),e(i)?(s(),d(p,{key:1},[e(i)&&e(i).pages&&e(m)?(s(),c(u,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[it,t("div",null,r(e(b).length)+" pages",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[at,t("div",null,r(e(v).length)+" components",1)]),_:1})):a("",!0),e(i)&&e(h)?(s(),c(u,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[ct,t("div",null,r(e(h).imports.length)+" imports",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[rt,t("div",null,r(e(i)._installedModules.length)+" modules",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[ut,t("div",null,r(e(i).plugins.length)+" plugins",1)]),_:1})):a("",!0)],64)):a("",!0)]),t("div",_t,[("showConnectionWarning"in f?f.showConnectionWarning:e($))?(s(),c(S,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[n(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):a("",!0)]),t("div",dt,[pt,mt,ht,xt,l(u,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[ft,n(" Settings ")]),_:1})]),gt,t("div",vt,[n(" Press "),e(k)?(s(),d(p,{key:0},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),bt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),kt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)):(s(),d(p,{key:1},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Shift ")]),_:1}),wt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Alt ")]),_:1}),yt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)),n(" to toggle DevTools ")])])):(s(),d("div",q," Loading... "))]),_:1})}}});export{Lt as default};
1
+ import{a as V,b as j,R as D,a7 as I,al as R,aK as A,aL as L,D as M,p as T,c,w as o,o as s,u as e,h as d,f as t,i as l,t as r,v as a,F as p,aM as $,l as n,j as F,m as O,H as P,k as W}from"./entry.3c854225.js";import{_ as G}from"./Badge.0ce662e4.js";import{_ as H}from"./NpmVersionCheck.vue.9ff03721.js";import{_ as E}from"./NTip.vue.6c00393e.js";import{_ as K}from"./NPanelGrids.afa6e237.js";import"./NCodeBlock.vue.3fea7f9d.js";import"./client.ce74bb6b.js";import"./NCheckbox.vue.a470be6e.js";const U="0.5.3",q={key:0},z={key:1,flex:"~ col gap2",ma:"","h-full":"","max-w-300":"","w-full":"",p8:"",px20:""},J=t("div",{"flex-auto":""},null,-1),Q={flex:"~ col","mt-20":"","items-center":""},X={flex:"~","mt--10":"","items-center":"","justify-center":""},Y={mb6:"","mt--1":"","text-center":"","text-sm":"",flex:"~ gap-1"},Z=t("span",{op40:""}," Nuxt DevTools ",-1),tt={op40:""},et={flex:"~ gap2 wrap"},ot={p4:"","theme-card-green":"",flex:"~ col auto"},nt=t("div",{"logos-nuxt-icon":"","text-3xl":""},null,-1),st={key:0,p4:"","theme-card-green":"",flex:"~ col auto"},lt=t("div",{"logos-vue":"","text-3xl":""},null,-1),it=t("div",{"carbon-tree-view-alt":"","text-3xl":""},null,-1),at=t("div",{"i-carbon-assembly-cluster":"","text-3xl":""},null,-1),ct=t("div",{"carbon-function":"","text-3xl":""},null,-1),rt=t("div",{"carbon-3d-mpr-toggle":"","text-3xl":""},null,-1),ut=t("div",{"carbon-plug":"","text-3xl":""},null,-1),_t={flex:"~ col gap2"},dt={flex:"~ gap-6 wrap","mt-5":"","items-center":"","justify-center":""},pt=t("a",{href:"https://github.com/nuxt/devtools",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-blue",transition:""},[t("div",{"i-carbon-star":""}),n(" Star on GitHub ")],-1),mt=t("a",{href:"https://github.com/nuxt/devtools/discussions/29",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-yellow",transition:""},[t("div",{"i-carbon-data-enrichment":""}),n(" Ideas & Suggestions ")],-1),ht=t("a",{href:"https://github.com/nuxt/devtools/discussions/31",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-lime",transition:""},[t("div",{"i-carbon-plan":""}),n(" Project Roadmap ")],-1),xt=t("a",{href:"https://github.com/nuxt/devtools/issues",target:"_blank",flex:"~ gap1","items-center":"",op50:"",hover:"op100 text-rose",transition:""},[t("div",{"i-carbon-debug":""}),n(" Bug Reports ")],-1),ft=t("div",{"i-carbon-settings":""},null,-1),gt=t("div",{"flex-auto":""},null,-1),vt={flex:"~ gap-1","items-center":"","justify-center":"","text-sm":"",op40:""},bt=t("span",null,"+",-1),kt=t("span",null,"+",-1),wt=t("span",null,"+",-1),yt=t("span",null,"+",-1),Lt=V({__name:"overview",setup(Ct){const m=j(),i=D(),v=I(),h=R(),b=A(),k=L(),w=M();function y(){F.value=!0,w.push("/")}const x=T(()=>m.value?.nuxt.vueApp.version);return(f,Nt)=>{const C=O,N=G,g=H,u=P,S=E,_=W,B=K;return s(),c(B,{"h-screen":"","w-full":"",flex:""},{default:o(()=>[e(i)?(s(),d("div",z,[J,t("div",Q,[t("div",X,[l(C,{"h-18":""}),t("button",{"mr--16":"","mt--6":"",onClick:y},[l(N,{"bg-green-400:10":"","text-green-400":"",title:"preview",textContent:"preview"})])]),t("div",Y,[Z,t("code",tt,"v"+r(e(U)),1),l(g,{"package-name":"@nuxt/devtools",options:{dev:!0},"show-version":!1})])]),t("div",et,[t("div",ot,[nt,l(g,{"package-name":"nuxt",options:{dev:!0}})]),e(x)?(s(),d("div",st,[lt,t("code",null,"v"+r(e(x)),1)])):a("",!0),e(i)?(s(),d(p,{key:1},[e(i)&&e(i).pages&&e(m)?(s(),c(u,{key:0,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/pages"},{default:o(()=>[it,t("div",null,r(e(b).length)+" pages",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:1,"min-w-40":"",p4:"","theme-card-lime":"",flex:"~ col auto",to:"/modules/components"},{default:o(()=>[at,t("div",null,r(e(v).length)+" components",1)]),_:1})):a("",!0),e(i)&&e(h)?(s(),c(u,{key:2,"min-w-40":"",p4:"","theme-card-yellow":"",flex:"~ col auto",to:"/modules/imports"},{default:o(()=>[ct,t("div",null,r(e(h).imports.length)+" imports",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:3,"min-w-40":"",p4:"","theme-card-purple":"",flex:"~ col auto",to:"/modules/modules"},{default:o(()=>[rt,t("div",null,r(e(i)._installedModules.length)+" modules",1)]),_:1})):a("",!0),e(i)?(s(),c(u,{key:4,"min-w-40":"",p4:"","theme-card-teal":"",flex:"~ col auto",to:"/modules/plugins"},{default:o(()=>[ut,t("div",null,r(e(i).plugins.length)+" plugins",1)]),_:1})):a("",!0)],64)):a("",!0)]),t("div",_t,[("showConnectionWarning"in f?f.showConnectionWarning:e($))?(s(),c(S,{key:0,n:"yellow5",icon:"carbon-unlink","justify-center":""},{default:o(()=>[n(" Not connected to the client app, showing server-side data only. Use the embedded mode for full features. ")]),_:1})):a("",!0)]),t("div",dt,[pt,mt,ht,xt,l(u,{to:"/settings",flex:"~ gap1","inline-block":"","items-center":"",op50:"","hover:op80":""},{default:o(()=>[ft,n(" Settings ")]),_:1})]),gt,t("div",vt,[n(" Press "),e(k)?(s(),d(p,{key:0},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⇧ Shift ")]),_:1}),bt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" ⌥ Option ")]),_:1}),kt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)):(s(),d(p,{key:1},[l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Shift ")]),_:1}),wt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" Alt ")]),_:1}),yt,l(_,{n:"xs",class:"px2"},{default:o(()=>[n(" D ")]),_:1})],64)),n(" to toggle DevTools ")])])):(s(),d("div",q," Loading... "))]),_:1})}}});export{Lt as default};
@@ -1 +1 @@
1
- import{_ as T}from"./NTextInput.vue.fc99730b.js";import{_ as M}from"./Badge.bd9688d4.js";import{a as B,r as F,p as R,aP as j,a4 as q,u as t,o,h as s,f as e,t as $,c as g,w as k,aQ as G,F as h,q as I,v,i as p,l as V,s as L,k as H,aR as S,aF as J,aG as W,R as Q,Y,aH as X,aI as E,af as Z,G as ee,aJ as te,y as oe}from"./entry.5024288d.js";import{_ as A}from"./FilepathItem.vue.1c96e6cc.js";import{u as ne}from"./editor.02d33c7f.js";import{_ as ae}from"./NSectionBlock.5d6e9b8e.js";import{_ as se}from"./LaunchPage.vue.b71fffc3.js";import{_ as re}from"./HelpFab.vue.748cc95d.js";import"./NIconTitle.vue.c8b7e265.js";import"./NMarkdown.vue.4d74a5d5.js";import"./client.b1955e54.js";import"./NPanelGrids.7b5efdc5.js";import"./NIconButton.vue.d0a9a760.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","font-mono":"","text-sm":""},pe={key:1},_e=B({__name:"RoutePathItem",props:{route:null},emits:["navigate"],setup(c,{emit:u}){const l=c,_=F([]),f=R(()=>{const n=j(l.route.path);return _.value=Array.from({length:n.length},()=>""),n}),y=R(()=>f.value.map((n,m)=>n[0]===":"?_.value[m]:n).join("").replace(/\/+/g,"/")),x=R(()=>l.route.path.includes(":"));function i(){u("navigate",y.value)}return(n,m)=>{const d=T,w=H,a=q("VDropdown");return t(x)?(o(),g(a,{key:1},{popper:k(({hide:r})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:G(()=>{i(),r()},["prevent"])},[t(x)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,I(t(f),(b,C)=>(o(),s(h,{key:C},[b[0]===":"?(o(),g(d,{key:0,modelValue:t(_)[C],"onUpdate:modelValue":P=>t(_)[C]=P,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(b),1))],64))),128))])],64)):v("",!0),p(w,{block:"",n:"primary"},{default:k(()=>[V(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,I(t(f),(r,b)=>(o(),s("span",{key:b,class:L(r[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(r[0]===":"?r.slice(1):r),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:i},[e("code",null,$(c.route.path),1)]))}}}),me={"w-full":""},he=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},be=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","font-mono":"","text-sm":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","font-mono":"","text-sm":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","font-mono":"","text-sm":""},Re={key:0},Pe=["onClick"],Ve=B({__name:"RoutesTable",props:{pages:null,layouts:null,matched:null,matchedPending:null},emits:["navigate"],setup(c){const u=c,l=ne(),_=S(),f=R(()=>[...u.pages].sort((i,n)=>i.path.localeCompare(n.path)));function y(i){const n=u.layouts.find(m=>m.name===i);n&&l(n.file)}function x(i){if(typeof i=="string")return _.value?.middleware.find(n=>n.name===i)?.path}return(i,n)=>{const m=M,d=_e,w=A;return o(),s("div",null,[e("table",me,[he,e("tbody",null,[(o(!0),s(h,null,I(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[c.matched.find(r=>r.name===a.name)?(o(),g(m,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):v("",!0),c.matchedPending.find(r=>r.name===a.name)?(o(),g(m,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):v("",!0)])]),e("td",ve,[e("div",ye,[p(d,{route:a,class:L(c.matched.find(r=>r.name===a.name)?"text-primary":c.matchedPending.find(r=>r.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=r=>i.$emit("navigate",r))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:r=>t(l)(a.file||a.meta?.file)},$e,8,be)):v("",!0)])])]),e("td",we,$(a.name),1),e("td",Ce,[p(w,{filepath:x(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[a.meta.layout===!1?(o(),s("span",Re,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:r=>y(a.meta.layout)},$(a.meta.layout),9,Pe)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=r=>y("default"))}," (default) "))])]))),128))])])])}}}),Ie={class:"markdown-body"},Be=e("h1",null,"Pages",-1),Le=e("p",null,[V("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),V(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Te=e("hr",null,null,-1),Me=e("h1",null,"Middlewares",-1),Fe=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),Se=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ae=[Be,Le,Ee,Te,Me,Fe,Se],De={__name:"pages",setup(c,{expose:u}){return u({frontmatter:{}}),(_,f)=>(o(),s("div",Ie,Ae))}},Ue={key:0,"h-full":"","of-auto":""},ze={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},je=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},Ge=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},We={"w-full":""},Qe=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ye={mr1:""},dt=B({__name:"pages",setup(c){const u=J(),l=W(),_=Q(),f=S(),y=Y(),x=X(),i=R(()=>f.value?.middleware||[]),n=F("");E(l).toBeTruthy().then(a=>{n.value=a.path}),E(u).toBeTruthy().then(a=>{a.afterEach(()=>{Z(()=>{n.value=l.value.path})})});async function m(){n.value!==l.value.path&&u.value.push(n.value||"/")}const d=R(()=>n.value===l.value.path?[]:u.value.resolve(n.value||"/").matched);function w(a){u.value.push(a)}return(a,r)=>{const b=T,C=Ve,P=ae,D=M,U=A,z=se,K=De,O=re;return o(),s(h,null,[t(_)?.pages&&t(u)?(o(),s("div",Ue,[e("div",ze,[e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ke,e("span",Oe,$(t(l).path),1),je],64)):(o(),s("span",qe,"Current route"))]),p(b,{modelValue:t(n),"onUpdate:modelValue":r[0]||(r[0]=N=>ee(n)?n.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(t(l).path===t(n)?"":t(d).length?"text-green":"text-orange"),onKeydown:te(m,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ge,t(d).length?v("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),t(d).length?(o(),g(P,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(C,{pages:t(d),layouts:t(y)||[],matched:[],"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched-pending"])]),_:1})):v("",!0),p(P,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(x).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(C,{pages:t(x),layouts:t(y)||[],matched:t(l).matched,"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(i).length?(o(),g(P,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(i).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",We,[Qe,(o(!0),s(h,null,I(t(i),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ye,$(N.name),1),N.global?(o(),g(D,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):v("",!0)]),e("td",null,[p(U,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):v("",!0)])):(o(),g(z,{key:1,icon:"carbon-tree-view-alt",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",handle(){return("rpc"in a?a.rpc:t(oe)).runWizard("enablePages")}}]},null,8,["actions"])),p(O,null,{default:k(()=>[p(K)]),_:1})],64)}}});export{dt as default};
1
+ import{_ as T}from"./NTextInput.vue.efd43a47.js";import{_ as M}from"./Badge.0ce662e4.js";import{a as B,r as F,p as R,aP as j,a4 as q,u as t,o,h as s,f as e,t as $,c as g,w as k,aQ as G,F as h,q as I,v,i as p,l as V,s as L,k as H,aR as S,aF as J,aG as W,R as Q,Y,aH as X,aI as E,af as Z,G as ee,aJ as te,y as oe}from"./entry.3c854225.js";import{_ as A}from"./FilepathItem.vue.7eb51d4e.js";import{u as ne}from"./editor.6dcc09c7.js";import{_ as ae}from"./NSectionBlock.4824dc31.js";import{_ as se}from"./LaunchPage.vue.63709998.js";import{_ as re}from"./HelpFab.vue.ebcc1356.js";import"./NIconTitle.vue.811968a5.js";import"./NMarkdown.vue.f8a61172.js";import"./client.ce74bb6b.js";import"./NPanelGrids.afa6e237.js";import"./NIconButton.vue.13275ce3.js";const le={block:"","cursor-pointer":""},ie={p2:""},ue=["onSubmit"],ce=e("div",{px2:"","text-sm":"",op50:""}," Fill params and navigate: ",-1),de={flex:"~","items-center":"",p2:"","font-mono":"","text-sm":""},pe={key:1},_e=B({__name:"RoutePathItem",props:{route:null},emits:["navigate"],setup(c,{emit:u}){const l=c,_=F([]),f=R(()=>{const n=j(l.route.path);return _.value=Array.from({length:n.length},()=>""),n}),y=R(()=>f.value.map((n,m)=>n[0]===":"?_.value[m]:n).join("").replace(/\/+/g,"/")),x=R(()=>l.route.path.includes(":"));function i(){u("navigate",y.value)}return(n,m)=>{const d=T,w=H,a=q("VDropdown");return t(x)?(o(),g(a,{key:1},{popper:k(({hide:r})=>[e("div",ie,[e("form",{flex:"~ col",onSubmit:G(()=>{i(),r()},["prevent"])},[t(x)?(o(),s(h,{key:0},[ce,e("div",de,[(o(!0),s(h,null,I(t(f),(b,C)=>(o(),s(h,{key:C},[b[0]===":"?(o(),g(d,{key:0,modelValue:t(_)[C],"onUpdate:modelValue":P=>t(_)[C]=P,"w-20":"","n-sm":"",placeholder:b.slice(1)},null,8,["modelValue","onUpdate:modelValue","placeholder"])):(o(),s("span",pe,$(b),1))],64))),128))])],64)):v("",!0),p(w,{block:"",n:"primary"},{default:k(()=>[V(" Navigate ")]),_:1})],40,ue)])]),default:k(()=>[e("code",le,[(o(!0),s(h,null,I(t(f),(r,b)=>(o(),s("span",{key:b,class:L(r[0]===":"?"text-gray border border-dashed rounded border-gray:50 px1":"")},$(r[0]===":"?r.slice(1):r),3))),128))])]),_:1})):(o(),s("button",{key:0,onClick:i},[e("code",null,$(c.route.path),1)]))}}}),me={"w-full":""},he=e("thead",{border:"b base"},[e("tr",null,[e("th",{"text-left":""}),e("th",{"text-left":""}," Route Path "),e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Middleware "),e("th",null," Layout ")])],-1),fe={"w-20":"","pr-1":""},ge={flex:"","items-center":"","justify-end":""},ve={"text-sm":""},ye={flex:"inline gap3","items-center":""},xe={op0:"","group-hover:op100":"",flex:"~ gap1"},be=["onClick"],ke=e("div",{"i-carbon-script-reference":""},null,-1),$e=[ke],we={"w-0":"","ws-nowrap":"","pr-1":"","text-left":"","font-mono":"","text-sm":"",op50:""},Ce={"w-0":"","ws-nowrap":"","pr-1":"","text-center":"","font-mono":"","text-sm":"",op50:""},Ne={"w-0":"","ws-nowrap":"","text-center":"","font-mono":"","text-sm":""},Re={key:0},Pe=["onClick"],Ve=B({__name:"RoutesTable",props:{pages:null,layouts:null,matched:null,matchedPending:null},emits:["navigate"],setup(c){const u=c,l=ne(),_=S(),f=R(()=>[...u.pages].sort((i,n)=>i.path.localeCompare(n.path)));function y(i){const n=u.layouts.find(m=>m.name===i);n&&l(n.file)}function x(i){if(typeof i=="string")return _.value?.middleware.find(n=>n.name===i)?.path}return(i,n)=>{const m=M,d=_e,w=A;return o(),s("div",null,[e("table",me,[he,e("tbody",null,[(o(!0),s(h,null,I(t(f),a=>(o(),s("tr",{key:a.name,class:"group","h-7":"",border:"b dashed transparent hover:base"},[e("td",fe,[e("div",ge,[c.matched.find(r=>r.name===a.name)?(o(),g(m,{key:0,"bg-green-400:10":"","text-green-400":"",title:"active",textContent:"active"})):v("",!0),c.matchedPending.find(r=>r.name===a.name)?(o(),g(m,{key:1,"bg-teal-400:10":"","text-teal-400":"",title:"next",textContent:"next"})):v("",!0)])]),e("td",ve,[e("div",ye,[p(d,{route:a,class:L(c.matched.find(r=>r.name===a.name)?"text-primary":c.matchedPending.find(r=>r.name===a.name)?"text-teal":""),onNavigate:n[0]||(n[0]=r=>i.$emit("navigate",r))},null,8,["route","class"]),e("div",xe,[a.file||a.meta?.file?(o(),s("button",{key:0,"text-sm":"",op40:"",hover:"op100 text-primary",title:"Open in editor",onClick:r=>t(l)(a.file||a.meta?.file)},$e,8,be)):v("",!0)])])]),e("td",we,$(a.name),1),e("td",Ce,[p(w,{filepath:x(a.meta.middleware),override:`${a.meta.middleware||"-"}`},null,8,["filepath","override"])]),e("td",Ne,[a.meta.layout===!1?(o(),s("span",Re,"-")):a.meta.layout?(o(),s("button",{key:1,onClick:r=>y(a.meta.layout)},$(a.meta.layout),9,Pe)):(o(),s("button",{key:2,"text-sm":"",op15:"",onClick:n[1]||(n[1]=r=>y("default"))}," (default) "))])]))),128))])])])}}}),Ie={class:"markdown-body"},Be=e("h1",null,"Pages",-1),Le=e("p",null,[V("One core feature of Nuxt is the file system router. Every Vue file inside the "),e("code",null,"pages/"),V(" directory creates a corresponding URL (or route) that displays the contents of the file. By using dynamic imports for each page, Nuxt leverages code-splitting to ship the minimum amount of JavaScript for the requested route.")],-1),Ee=e("p",null,[e("a",{href:"https://nuxt.com/docs/getting-started/routing",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Te=e("hr",null,null,-1),Me=e("h1",null,"Middlewares",-1),Fe=e("p",null,"Nuxt provides a customizable route middleware framework you can use throughout your application, ideal for extracting code that you want to run before navigating to a particular route.",-1),Se=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/middleware",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),Ae=[Be,Le,Ee,Te,Me,Fe,Se],De={__name:"pages",setup(c,{expose:u}){return u({frontmatter:{}}),(_,f)=>(o(),s("div",Ie,Ae))}},Ue={key:0,"h-full":"","of-auto":""},ze={border:"b base",flex:"~ col gap1",px4:"",py3:"","navbar-glass":""},Ke=e("span",{op50:""},"Navigate from ",-1),Oe={"font-mono":""},je=e("span",{op50:""}," to ",-1),qe={key:1,op50:""},Ge=e("span",null,[V("Press "),e("b",{"font-bold":""},"Enter"),V(" to navigate")],-1),He={key:0,"text-orange":"",op75:""},Je={key:1,op50:""},We={"w-full":""},Qe=e("thead",{border:"b base","h-7":""},[e("tr",null,[e("th",{"text-left":""}," Name "),e("th",{"text-left":""}," Path ")])],-1),Ye={mr1:""},dt=B({__name:"pages",setup(c){const u=J(),l=W(),_=Q(),f=S(),y=Y(),x=X(),i=R(()=>f.value?.middleware||[]),n=F("");E(l).toBeTruthy().then(a=>{n.value=a.path}),E(u).toBeTruthy().then(a=>{a.afterEach(()=>{Z(()=>{n.value=l.value.path})})});async function m(){n.value!==l.value.path&&u.value.push(n.value||"/")}const d=R(()=>n.value===l.value.path?[]:u.value.resolve(n.value||"/").matched);function w(a){u.value.push(a)}return(a,r)=>{const b=T,C=Ve,P=ae,D=M,U=A,z=se,K=De,O=re;return o(),s(h,null,[t(_)?.pages&&t(u)?(o(),s("div",Ue,[e("div",ze,[e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ke,e("span",Oe,$(t(l).path),1),je],64)):(o(),s("span",qe,"Current route"))]),p(b,{modelValue:t(n),"onUpdate:modelValue":r[0]||(r[0]=N=>ee(n)?n.value=N:null),"font-mono":"",icon:"carbon-direction-right-01 scale-y--100",class:L(t(l).path===t(n)?"":t(d).length?"text-green":"text-orange"),onKeydown:te(m,["enter"])},null,8,["modelValue","class","onKeydown"]),e("div",null,[t(l).path!==t(n)?(o(),s(h,{key:0},[Ge,t(d).length?v("",!0):(o(),s("span",He," (no match)"))],64)):(o(),s("span",Je,"Edit path above to navigate"))])]),t(d).length?(o(),g(P,{key:0,icon:"carbon-tree-view",text:"Matched Routes",padding:!1},{default:k(()=>[p(C,{pages:t(d),layouts:t(y)||[],matched:[],"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched-pending"])]),_:1})):v("",!0),p(P,{icon:"carbon-tree-view-alt",text:"All Routes",description:`${t(x).length} routes registered in your application`,padding:"pr5"},{default:k(()=>[p(C,{pages:t(x),layouts:t(y)||[],matched:t(l).matched,"matched-pending":t(d),onNavigate:w},null,8,["pages","layouts","matched","matched-pending"])]),_:1},8,["description"]),t(i).length?(o(),g(P,{key:1,icon:"carbon:ibm-watson-studio",text:"Middleware",description:`${t(i).length} middleware registered in your application`,padding:"px13"},{default:k(()=>[e("table",We,[Qe,(o(!0),s(h,null,I(t(i),N=>(o(),s("tr",{key:N.path,"h-7":""},[e("td",null,[e("span",Ye,$(N.name),1),N.global?(o(),g(D,{key:0,"bg-green-400:10":"","text-green-400":"",title:"Registered at runtime as a global component",textContent:"global"})):v("",!0)]),e("td",null,[p(U,{filepath:N.path},null,8,["filepath"])])]))),128))])]),_:1},8,["description"])):v("",!0)])):(o(),g(z,{key:1,icon:"carbon-tree-view-alt",title:"Nuxt Routing",description:"Create `./pages/index.vue` to enable routing",actions:[{label:"Learn more",src:"https://nuxt.com/docs/getting-started/routing",attrs:{n:"primary"}},{label:"Enable Routing",handle(){return("rpc"in a?a.rpc:t(oe)).runWizard("enablePages")}}]},null,8,["actions"])),p(O,null,{default:k(()=>[p(K)]),_:1})],64)}}});export{dt as default};
@@ -1 +1 @@
1
- import{_ as x}from"./StateEditor.vue.544a7d41.js";import{a as y,o as t,h as r,F as k,q as B,c as f,w as a,V as C,n as D,g as V,f as $,b as w,p as F,u as i,i as e,v as m,l as O,k as P}from"./entry.5024288d.js";import{_ as E}from"./NSectionBlock.5d6e9b8e.js";import{_ as R}from"./NIconButton.vue.d0a9a760.js";import{_ as j}from"./HelpFab.vue.748cc95d.js";import"./json-editor-vue.2379a5ec.js";import"./NIconTitle.vue.c8b7e265.js";const A={key:0,flex:"~ col gap-1"},G={key:1,mt2:"",px4:"",italic:"",op35:""},H=y({__name:"StateGroup",props:{state:null,prefix:{default:""}},setup(n){return(o,s)=>{const l=x;return t(),r("div",null,[n.state&&Object.keys(n.state).length>0?(t(),r("div",A,[(t(!0),r(k,null,B(n.state,(_,c)=>(t(),f(l,{key:c,state:_,name:c.startsWith(n.prefix)?c.slice(n.prefix.length):c},{actions:a(u=>[C(o.$slots,"actions",D(V(u)))]),_:2},1032,["state","name"]))),128))])):(t(),r("div",G," No data "))])}}}),K={class:"markdown-body"},T=$("h1",null,"State & Async Data",-1),q=$("p",null,"// TODO",-1),z=[T,q],I={__name:"payload",setup(n,{expose:o}){return o({frontmatter:{}}),(l,_)=>(t(),r("div",K,z))}},L={key:0},tt=y({__name:"payload",setup(n){const o=w(),s=F(()=>o.value?.nuxt.payload);async function l(_){await o.value?.nuxt.hooks.callHookParallel("app:data:refresh",_)}return(_,c)=>{const u=H,d=E,b=P,v=R,S=x,g=I,N=j;return t(),r(k,null,[i(o)?(t(),r("div",L,[e(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[e(u,{state:i(s).state,prefix:"$s"},null,8,["state"])]),_:1}),e(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[e(b,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=h=>l())},{default:a(()=>[O(" Re-fetch all data ")]),_:1})]),default:a(()=>[e(u,{state:i(s).data},{actions:a(({isOpen:h,name:p})=>[h&&p?(t(),f(v,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",onClick:W=>l([p])},null,8,["title","onClick"])):m("",!0)]),_:1},8,["state"])]),_:1}),i(s).functions&&Object.keys(i(s).functions).length?(t(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:a(()=>[e(S,{"ml--6":"",state:i(s).functions},null,8,["state"])]),_:1})):m("",!0)])):m("",!0),e(N,null,{default:a(()=>[e(g)]),_:1})],64)}}});export{tt as default};
1
+ import{_ as x}from"./StateEditor.vue.b9b04885.js";import{a as y,o as t,h as r,F as k,q as B,c as f,w as a,V as C,n as D,g as V,f as $,b as w,p as F,u as i,i as e,v as m,l as O,k as P}from"./entry.3c854225.js";import{_ as E}from"./NSectionBlock.4824dc31.js";import{_ as R}from"./NIconButton.vue.13275ce3.js";import{_ as j}from"./HelpFab.vue.ebcc1356.js";import"./json-editor-vue.cb8f6785.js";import"./NIconTitle.vue.811968a5.js";const A={key:0,flex:"~ col gap-1"},G={key:1,mt2:"",px4:"",italic:"",op35:""},H=y({__name:"StateGroup",props:{state:null,prefix:{default:""}},setup(n){return(o,s)=>{const l=x;return t(),r("div",null,[n.state&&Object.keys(n.state).length>0?(t(),r("div",A,[(t(!0),r(k,null,B(n.state,(_,c)=>(t(),f(l,{key:c,state:_,name:c.startsWith(n.prefix)?c.slice(n.prefix.length):c},{actions:a(u=>[C(o.$slots,"actions",D(V(u)))]),_:2},1032,["state","name"]))),128))])):(t(),r("div",G," No data "))])}}}),K={class:"markdown-body"},T=$("h1",null,"State & Async Data",-1),q=$("p",null,"// TODO",-1),z=[T,q],I={__name:"payload",setup(n,{expose:o}){return o({frontmatter:{}}),(l,_)=>(t(),r("div",K,z))}},L={key:0},tt=y({__name:"payload",setup(n){const o=w(),s=F(()=>o.value?.nuxt.payload);async function l(_){await o.value?.nuxt.hooks.callHookParallel("app:data:refresh",_)}return(_,c)=>{const u=H,d=E,b=P,v=R,S=x,g=I,N=j;return t(),r(k,null,[i(o)?(t(),r("div",L,[e(d,{icon:"carbon-data-set",text:"State",description:"Keyed state from `useState`",padding:!1},{default:a(()=>[e(u,{state:i(s).state,prefix:"$s"},null,8,["state"])]),_:1}),e(d,{icon:"carbon-data-blob",text:"Data",description:"Keyed state from `useAsyncData`",padding:!1},{actions:a(()=>[e(b,{n:"xs primary","self-start":"",icon:"i-carbon-recycle",onClick:c[0]||(c[0]=h=>l())},{default:a(()=>[O(" Re-fetch all data ")]),_:1})]),default:a(()=>[e(u,{state:i(s).data},{actions:a(({isOpen:h,name:p})=>[h&&p?(t(),f(v,{key:0,title:`Re-fetch '${p}'`,icon:"carbon-recycle",onClick:W=>l([p])},null,8,["title","onClick"])):m("",!0)]),_:1},8,["state"])]),_:1}),i(s).functions&&Object.keys(i(s).functions).length?(t(),f(d,{key:0,icon:"carbon-function",text:"Functions",description:"State for functions (experimental)"},{default:a(()=>[e(S,{"ml--6":"",state:i(s).functions},null,8,["state"])]),_:1})):m("",!0)])):m("",!0),e(N,null,{default:a(()=>[e(g)]),_:1})],64)}}});export{tt as default};
@@ -1 +1 @@
1
- import{_ as S}from"./FilepathItem.vue.1c96e6cc.js";import{_ as D}from"./Badge.bd9688d4.js";import{_ as k}from"./DurationDisplay.vue.f895ca51.js";import{a as v,R as B,p as x,aT as V,o as n,h as _,f as e,t as P,i as l,u as f,c as u,v as d,a4 as M,V as T,M as F,aU as H,w as h,l as y,aR as I,b as E,F as C,q as R,s as W}from"./entry.5024288d.js";import{_ as L}from"./NSectionBlock.5d6e9b8e.js";import{_ as j}from"./HelpFab.vue.748cc95d.js";import"./editor.02d33c7f.js";import"./NIconTitle.vue.c8b7e265.js";import"./NIconButton.vue.d0a9a760.js";const q={flex:"~ gap2","items-center":""},z={w8:"","text-right":"","text-sm":"",op25:""},A={key:0,"flex-auto":"","text-right":""},U=v({__name:"PluginItem",props:{plugin:null,index:null},setup(t){const i=t,a=B(),r=x(()=>V(i.plugin.src,a.value?.rootDir||"").path);return(m,c)=>{const p=S,o=D,s=k;return n(),_("div",q,[e("div",z,P(t.index),1),l(p,{filepath:i.plugin.src,subpath:!0},null,8,["filepath"]),e("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),t.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),t.plugin.metric?.duration!=null?(n(),_("div",A,[l(s,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},G={flex:"~ items-center gap-1","font-bold":""},J=v({__name:"HelpTip",props:{title:null,icon:null},setup(t){return(i,a)=>{const r=F,m=M("ContentSlot");return n(),_("div",Y,[e("div",G,[t.icon?(n(),u(r,{key:0,icon:t.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),e("div",null,P(t.title),1)]),e("div",null,[T(i.$slots,"default",{},()=>[l(m,{use:i.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),K={};function O(t,i){const a=J;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[T(t.$slots,"default")]),_:3})}const Q=H(K,[["render",O]]),X={class:"markdown-body"},Z=e("h1",null,"Plugins",-1),tt=e("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),e("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(t,{expose:i}){return i({frontmatter:{}}),(r,m)=>{const c=Q;return n(),_("div",X,[Z,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-end","mt-3":""},it=e("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=e("span",{op50:""},"Total execution time:",-1),gt=v({__name:"plugins",setup(t){const i=I(),a=E(),r=x(()=>{const c=i.value?.plugins||[],p=a.value?.getClientPluginMetrics()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:p.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),m=x(()=>{const c=a.value?.getClientPluginMetrics()||[],p=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-p});return(c,p)=>{const o=U,s=k,g=L,w=nt,N=j;return n(),_(C,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[e("div",ot,[(n(!0),_(C,null,R(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:W(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),e("div",st,[it,at,l(s,{duration:f(m),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:h(()=>[l(w)]),_:1})],64)}}});export{gt as default};
1
+ import{_ as S}from"./FilepathItem.vue.7eb51d4e.js";import{_ as D}from"./Badge.0ce662e4.js";import{_ as k}from"./DurationDisplay.vue.9fa7b27d.js";import{a as v,R as B,p as x,aT as V,o as n,h as _,f as e,t as P,i as l,u as f,c as u,v as d,a4 as M,V as T,M as F,aU as H,w as h,l as y,aR as I,b as E,F as C,q as R,s as W}from"./entry.3c854225.js";import{_ as L}from"./NSectionBlock.4824dc31.js";import{_ as j}from"./HelpFab.vue.ebcc1356.js";import"./editor.6dcc09c7.js";import"./NIconTitle.vue.811968a5.js";import"./NIconButton.vue.13275ce3.js";const q={flex:"~ gap2","items-center":""},z={w8:"","text-right":"","text-sm":"",op25:""},A={key:0,"flex-auto":"","text-right":""},U=v({__name:"PluginItem",props:{plugin:null,index:null},setup(t){const i=t,a=B(),r=x(()=>V(i.plugin.src,a.value?.rootDir||"").path);return(m,c)=>{const p=S,o=D,s=k;return n(),_("div",q,[e("div",z,P(t.index),1),l(p,{filepath:i.plugin.src,subpath:!0},null,8,["filepath"]),e("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,"bg-rose-400:10":"","text-rose":"",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,"bg-gray-400:10":"","text-gray":"",textContent:"module"})),t.plugin.mode==="server"?(n(),u(o,{key:2,"bg-teal-400:10":"","text-teal-400":"",textContent:"server"})):d("",!0),t.plugin.mode==="client"?(n(),u(o,{key:3,"bg-orange-400:10":"","text-orange-400":"",textContent:"client"})):d("",!0)]),t.plugin.metric?.duration!=null?(n(),_("div",A,[l(s,{duration:t.plugin.metric?.duration,factor:10},null,8,["duration"])])):d("",!0)])}}}),Y={class:"n-tip n-tip-base",flex:"~ col items-start","mx--4":"",px4:"",py4:""},G={flex:"~ items-center gap-1","font-bold":""},J=v({__name:"HelpTip",props:{title:null,icon:null},setup(t){return(i,a)=>{const r=F,m=M("ContentSlot");return n(),_("div",Y,[e("div",G,[t.icon?(n(),u(r,{key:0,icon:t.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),e("div",null,P(t.title),1)]),e("div",null,[T(i.$slots,"default",{},()=>[l(m,{use:i.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),K={};function O(t,i){const a=J;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:h(()=>[T(t.$slots,"default")]),_:3})}const Q=H(K,[["render",O]]),X={class:"markdown-body"},Z=e("h1",null,"Plugins",-1),tt=e("p",null,[y("Nuxt plugins allows you to extend the functionality of Nuxt runtime and the Vue instance. You can add plugins to the "),e("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more on the documentation")],-1),nt={__name:"plugins",setup(t,{expose:i}){return i({frontmatter:{}}),(r,m)=>{const c=Q;return n(),_("div",X,[Z,tt,l(c,null,{default:h(()=>[y(" Plugins runs before your application at runtime, the time each plugin cost will directly affect your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-end","mt-3":""},it=e("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=e("span",{op50:""},"Total execution time:",-1),gt=v({__name:"plugins",setup(t){const i=I(),a=E(),r=x(()=>{const c=i.value?.plugins||[],p=a.value?.getClientPluginMetrics()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:p.find(g=>g.src===s.src||g.src.startsWith(s.src))}})}),m=x(()=>{const c=a.value?.getClientPluginMetrics()||[],p=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-p});return(c,p)=>{const o=U,s=k,g=L,w=nt,N=j;return n(),_(C,null,[l(g,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:h(()=>[e("div",ot,[(n(!0),_(C,null,R(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:W(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),e("div",st,[it,at,l(s,{duration:f(m),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(N,null,{default:h(()=>[l(w)]),_:1})],64)}}});export{gt as default};
@@ -1 +1 @@
1
- import{_ as C}from"./StateEditor.vue.544a7d41.js";import{_ as h}from"./NSectionBlock.5d6e9b8e.js";import{o as c,h as r,f as m,a as v,b as x,R as b,p as u,u as o,i as e,w as s,v as y,F as R}from"./entry.5024288d.js";import{_ as k}from"./HelpFab.vue.748cc95d.js";import"./NIconButton.vue.d0a9a760.js";import"./json-editor-vue.2379a5ec.js";import"./NIconTitle.vue.c8b7e265.js";const B={class:"markdown-body"},N=m("h1",null,"Runtime Configs",-1),$=m("p",null,"// TODO:",-1),w=[N,$],D={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,w))}},F={key:0},j=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=u(()=>t.value?.nuxt.payload),p=u(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,S)=>{const a=C,i=h,f=D,g=k;return c(),r(R,null,[o(t)?(c(),r("div",F,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(t).appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(l).config?.public},null,8,["state"])]),_:1}),e(i,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:s(()=>[e(a,{state:o(p),readonly:""},null,8,["state"])]),_:1})])):y("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{j as default};
1
+ import{_ as C}from"./StateEditor.vue.b9b04885.js";import{_ as h}from"./NSectionBlock.4824dc31.js";import{o as c,h as r,f as m,a as v,b as x,R as b,p as u,u as o,i as e,w as s,v as y,F as R}from"./entry.3c854225.js";import{_ as k}from"./HelpFab.vue.ebcc1356.js";import"./NIconButton.vue.13275ce3.js";import"./json-editor-vue.cb8f6785.js";import"./NIconTitle.vue.811968a5.js";const B={class:"markdown-body"},N=m("h1",null,"Runtime Configs",-1),$=m("p",null,"// TODO:",-1),w=[N,$],D={__name:"runtime-configs",setup(d,{expose:t}){return t({frontmatter:{}}),(l,p)=>(c(),r("div",B,w))}},F={key:0},j=v({__name:"runtime-configs",setup(d){const t=x(),_=b(),l=u(()=>t.value?.nuxt.payload),p=u(()=>{const n={..._.value?.runtimeConfig};return delete n.public,delete n.app,n});return(n,S)=>{const a=C,i=h,f=D,g=k;return c(),r(R,null,[o(t)?(c(),r("div",F,[e(i,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:s(()=>[e(a,{state:o(t).appConfig},null,8,["state"])]),_:1}),e(i,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:s(()=>[e(a,{state:o(l).config?.public},null,8,["state"])]),_:1}),e(i,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:s(()=>[e(a,{state:o(p),readonly:""},null,8,["state"])]),_:1})])):y("",!0),e(g,null,{default:s(()=>[e(f)]),_:1})],64)}}});export{j as default};
@@ -1,4 +1,4 @@
1
- import{_ as ie}from"./Navbar.vue.f2b7b652.js";import{_ as Y}from"./Badge.bd9688d4.js";import{a as Z,R as ce,ad as de,p,r as k,o as a,h as m,f as i,c as x,w as l,l as h,t as y,u as e,s as b,aW as G,F as j,q as W,G as ee,i as s,v as $,k as pe,M as me,aX as fe,E as _e,aY as ve,aZ as he,H as ye,a3 as ge}from"./entry.5024288d.js";import{_ as xe}from"./NSelect.vue.e5de3a65.js";import{_ as be}from"./NTextInput.vue.fc99730b.js";import{_ as Ce}from"./CodeSnippets.vue.c6839222.js";import{_ as te}from"./NPanelGrids.7b5efdc5.js";import{_ as ke}from"./NCodeBlock.vue.d5603a1f.js";import{u as $e}from"./editor.02d33c7f.js";import{C as X}from"./constants.d7bcda3c.js";import{_ as Re}from"./PanelLeftRight.vue.8eda640c.js";import{F as Te}from"./fuse.esm.88e2763d.js";import"./client.b1955e54.js";const qe={"h-full":"","w-full":"",flex:"~ col"},je={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Se={flex:"~ gap2"},Ve={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},we=i("div",{"flex-auto":""},null,-1),Ee={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ne={"text-right":"","font-mono":""},Ue={key:1,relative:""},Pe={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Be={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Me=i("div",null,"Response",-1),Oe={key:1,"text-xs":"",op50:""},Le=i("div",{"flex-auto":""},null,-1),De=i("div",{op50:""}," Request finished in ",-1),Fe=Z({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(P){const B=P,R=ce(),u=de({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),q=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),w=k(0),C=k(!1),E=k(!1),A=$e(),M=p(()=>B.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),S=p(()=>M.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),g=k(B.route.method||"GET"),N=k({}),U=k([{key:"",value:""}]),V=k([{key:"",value:""}]),f=k([{key:"Content-Type",value:"application/json"}]),z=p(()=>V.value.filter(({key:o})=>o).length),J=p(()=>f.value.filter(({key:o})=>o).length),H=p(()=>{const o={};for(let t=0;t<U.value.length;t++){const{key:n,value:c}=U.value[t];o[n]=c}return Object.keys(o)[0]?o:null}),oe=p(()=>{let o=R.value?.devServer.url||"http://localhost";o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1));const t=R.value?.devServer.port||3e3;return o.includes(`:${t}`)?o:`${o}:${t}`}),O=p(()=>{let o=new URLSearchParams(Object.fromEntries(V.value.filter(({key:c})=>c).map(({key:c,value:_})=>[c,_]))).toString();o&&(o=`?${o}`);const t=(M.value?.map(c=>(c.startsWith(":")||c.startsWith("**:"))&&N.value[c]||c).join("")||"")+o;let n=R.value?.app.baseURL||"";return(n==="./"||n===".")&&(n=""),n.endsWith("/")&&(n=n.slice(0,-1)),n+t}),ne=p(()=>oe.value+O.value);async function K(){E.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const o=Date.now();try{u.data=await $fetch(ne.value,{method:g.value.toUpperCase(),headers:Object.fromEntries(f.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),query:Object.fromEntries(V.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),body:H.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,w.value=Date.now()-o}const Q=p(()=>{const o=[],t=[],n=f.value.filter(({key:_,value:v})=>_&&v&&!(_==="Content-Type"&&v==="application/json")).map(({key:_,value:v})=>` '${_}': '${v}'`).join(`,
1
+ import{_ as ie}from"./Navbar.vue.76f856f0.js";import{_ as Y}from"./Badge.0ce662e4.js";import{a as Z,R as ce,ad as de,p,r as k,o as a,h as m,f as i,c as x,w as l,l as h,t as y,u as e,s as b,aW as G,F as j,q as W,G as ee,i as s,v as $,k as pe,M as me,aX as fe,E as _e,aY as ve,aZ as he,H as ye,a3 as ge}from"./entry.3c854225.js";import{_ as xe}from"./NSelect.vue.2f75a7b4.js";import{_ as be}from"./NTextInput.vue.efd43a47.js";import{_ as Ce}from"./CodeSnippets.vue.63e1babe.js";import{_ as te}from"./NPanelGrids.afa6e237.js";import{_ as ke}from"./NCodeBlock.vue.3fea7f9d.js";import{u as $e}from"./editor.6dcc09c7.js";import{C as X}from"./constants.d7bcda3c.js";import{_ as Re}from"./PanelLeftRight.vue.9e8aa6b8.js";import{F as Te}from"./fuse.esm.88e2763d.js";import"./client.ce74bb6b.js";const qe={"h-full":"","w-full":"",flex:"~ col"},je={flex:"~ col gap-2","flex-none":"",p4:"","navbar-glass":""},Se={flex:"~ gap2"},Ve={flex:"~ gap2","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},we=i("div",{"flex-auto":""},null,-1),Ee={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ne={"text-right":"","font-mono":""},Ue={key:1,relative:""},Pe={key:2,px4:"",py2:"",flex:"~ col gap-2",border:"b base"},Be={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},Me=i("div",null,"Response",-1),Oe={key:1,"text-xs":"",op50:""},Le=i("div",{"flex-auto":""},null,-1),De=i("div",{op50:""}," Request finished in ",-1),Fe=Z({__name:"ServerRouteDetails",props:{route:{type:Object,required:!0}},setup(P){const B=P,R=ce(),u=de({contentType:"text/plain",data:"",statusCode:200,error:void 0}),T=p(()=>u.contentType.includes("application/json")?"json":u.contentType.includes("text/html")?"html":u.contentType.includes("text/css")?"css":u.contentType.includes("text/javascript")?"javascript":u.contentType.includes("text/xml")||u.contentType.includes("application/xml")?"xml":"text"),q=p(()=>T.value==="json"?JSON.stringify(u.data,null,2):u.data),w=k(0),C=k(!1),E=k(!1),A=$e(),M=p(()=>B.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),S=p(()=>M.value?.filter(o=>o.startsWith(":")||o.startsWith("**:"))||[]),g=k(B.route.method||"GET"),N=k({}),U=k([{key:"",value:""}]),V=k([{key:"",value:""}]),f=k([{key:"Content-Type",value:"application/json"}]),z=p(()=>V.value.filter(({key:o})=>o).length),J=p(()=>f.value.filter(({key:o})=>o).length),H=p(()=>{const o={};for(let t=0;t<U.value.length;t++){const{key:n,value:c}=U.value[t];o[n]=c}return Object.keys(o)[0]?o:null}),oe=p(()=>{let o=R.value?.devServer.url||"http://localhost";o.charAt(o.length-1)==="/"&&(o=o.slice(0,-1));const t=R.value?.devServer.port||3e3;return o.includes(`:${t}`)?o:`${o}:${t}`}),O=p(()=>{let o=new URLSearchParams(Object.fromEntries(V.value.filter(({key:c})=>c).map(({key:c,value:_})=>[c,_]))).toString();o&&(o=`?${o}`);const t=(M.value?.map(c=>(c.startsWith(":")||c.startsWith("**:"))&&N.value[c]||c).join("")||"")+o;let n=R.value?.app.baseURL||"";return(n==="./"||n===".")&&(n=""),n.endsWith("/")&&(n=n.slice(0,-1)),n+t}),ne=p(()=>oe.value+O.value);async function K(){E.value=!0,C.value=!0,Object.assign(u,{lang:"text",contentType:"",data:"",content:"",error:void 0});const o=Date.now();try{u.data=await $fetch(ne.value,{method:g.value.toUpperCase(),headers:Object.fromEntries(f.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),query:Object.fromEntries(V.value.filter(({key:t,value:n})=>t&&n).map(({key:t,value:n})=>[t,n])),body:H.value,onResponse({response:t}){u.contentType=(t.headers.get("content-type")||"").toString().toLowerCase().trim(),u.statusCode=t.status},onResponseError(t){u.error=t.response._data,u.data=t.response._data}})}catch{}C.value=!1,w.value=Date.now()-o}const Q=p(()=>{const o=[],t=[],n=f.value.filter(({key:_,value:v})=>_&&v&&!(_==="Content-Type"&&v==="application/json")).map(({key:_,value:v})=>` '${_}': '${v}'`).join(`,
2
2
  `);g.value.toUpperCase()!=="GET"&&t.push(`method: '${g.value.toUpperCase()}'`),n&&t.push(`headers: {
3
3
  ${n}
4
4
  }`),H.value&&t.push(`body: ${JSON.stringify(H.value,null,2)}`);const c=t.length?`, {
@@ -0,0 +1 @@
1
+ import{_ as j}from"./NIconTitle.vue.811968a5.js";import{_ as O}from"./NSwitch.vue.ae05571e.js";import{a as z,bb as F,aj as I,h as d,i as s,f as e,F as m,q as h,u as a,w as n,G as y,a2 as L,bc as A,o as i,s as k,t as f,c as H,v as q,l as E,aS as G,k as R}from"./entry.3c854225.js";import{_ as J}from"./NSelect.vue.2f75a7b4.js";import{_ as K}from"./NCheckbox.vue.a470be6e.js";const M={px6:"",py6:""},P={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},Q={flex:"~ col gap-1",py3:""},W=e("h3",{mb1:"","text-lg":""}," Tabs ",-1),X={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},Y={capitalize:"",op75:""},Z={flex:"~ col gap-1",border:"~ base rounded",py3:"",pl4:"",pr2:""},ee={py3:"",flex:"~ col gap-1",border:"b base"},oe=e("h3",{mb1:"","text-lg":""}," Appearance ",-1),te=e("div",{"carbon-sun":"","dark:carbon-moon":"","translate-y--1px":""},null,-1),le={py3:"",flex:"~ col gap-1",border:"b base"},se=e("h3",{mb1:"","text-lg":""}," UI Scale ",-1),ae=["value"],ne={py3:"",flex:"~ col gap-1"},ie=e("h3",{mb1:"","text-lg":""}," Features ",-1),ce=e("span",null,"Close DevTools when clicking outside",-1),de=e("span",null,"Show help buttons",-1),ge=z({__name:"settings",setup(re){const{interactionCloseOnOutsideClick:g,showHelpButtons:v,scale:x,hiddenTabs:r,hiddenTabCategories:u}=L(),T=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],C=F(I());function N(c,t){t?r.value=r.value.filter(p=>p!==c):r.value.push(c)}function w(c,t){t?u.value=u.value.filter(p=>p!==c):u.value.push(c)}return(c,t)=>{const p=j,b=O,S=G,U=R,$=A,B=J,V=K;return i(),d("div",M,[s(p,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",P,[e("div",Q,[W,(i(!0),d(m,null,h(a(C),([o,_])=>(i(),d(m,{key:o},[_.length?(i(),d("div",{key:0,flex:"~ col gap-1","mx--1":"",class:k(a(u).includes(o)?"op50 grayscale":""),"pt-2":""},[s(b,{flex:"~ row-reverse",px2:"",py1:"","n-lime":"","model-value":!a(u).includes(o),"onUpdate:modelValue":l=>w(o,l)},{default:n(()=>[e("div",X,[e("span",Y,f(o),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),e("div",Z,[(i(!0),d(m,null,h(_,l=>(i(),H(b,{key:l.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!a(r).includes(l.name),"onUpdate:modelValue":D=>N(l.name,D)},{default:n(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"",class:k(a(r).includes(l.name)?"op25":"")},[s(S,{"text-xl":"",icon:l.icon,title:l.title},null,8,["icon","title"]),e("span",null,f(l.title),1)],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))])],2)):q("",!0)],64))),128))]),e("div",null,[e("div",ee,[oe,e("div",null,[s($,null,{default:n(({toggle:o,isDark:_})=>[s(U,{n:"primary",onClick:o},{default:n(()=>[te,E(" "+f(_.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})])]),e("div",le,[se,s(B,{modelValue:a(x),"onUpdate:modelValue":t[0]||(t[0]=o=>y(x)?x.value=o:null),n:"primary"},{default:n(()=>[(i(),d(m,null,h(T,o=>e("option",{key:o[0],value:o[1]},f(o[0]),9,ae)),64))]),_:1},8,["modelValue"])]),e("div",ne,[ie,s(V,{modelValue:a(g),"onUpdate:modelValue":t[1]||(t[1]=o=>y(g)?g.value=o:null),"n-primary":""},{default:n(()=>[ce]),_:1},8,["modelValue"]),s(V,{modelValue:a(v),"onUpdate:modelValue":t[2]||(t[2]=o=>y(v)?v.value=o:null),"n-primary":""},{default:n(()=>[de]),_:1},8,["modelValue"])])])])])}}});export{ge as default};
@@ -1 +1 @@
1
- import{_ as ne}from"./NIconButton.vue.d0a9a760.js";import{_ as oe}from"./NSelect.vue.e5de3a65.js";import{_ as ae}from"./NTextInput.vue.fc99730b.js";import{a as se,a$ as re,D as le,r as I,p as S,E,b0 as R,ah as ue,a1 as ie,ag as de,e as ce,y as p,u as n,c as _,w as u,b1 as z,o as r,f as l,i as d,h as c,q as U,t as v,F as x,G as j,l as i,s as F,aJ as q,v as P,ac as me,z as pe,b2 as _e,aQ as fe,H as ye,M as ve,k as ge,a3 as he}from"./entry.5024288d.js";import{_ as ke}from"./NLink.vue.404a4f6c.js";import{_ as be}from"./NPanelGrids.7b5efdc5.js";import{_ as xe}from"./PanelLeftRight.vue.8eda640c.js";import{_ as we}from"./FilepathItem.vue.1c96e6cc.js";import{U as Ke}from"./json-editor-vue.2379a5ec.js";import"./editor.02d33c7f.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ve={class:"w-full text-sm"},Ne=["value"],$e=l("div",{"x-divider":""},null,-1),Ie={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Se={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},je={key:1},qe=["onKeyup"],Le=l("br",null,null,-1),Me={key:0,op50:""},Be={key:1},De=l("code",null,"nitro.storage",-1),Ae=l("br",null,null,-1),Ee={"font-bold":""},Re=l("br",null,null,-1),ze={"text-sm":""},Fe=l("br",null,null,-1),tt=se({__name:"storage",async setup(Pe){let m,g;const T=re(),h=le(),k=I(""),y=I(""),a=S({get(){return E().query?.storage},set(t){h.replace({query:{storage:t}})}}),e=I(),b=S(()=>E().query?.key),{data:w}=([m,g]=R(()=>z("storageMounts",()=>p.getStorageMounts())),m=await m,g(),m),{data:K,refresh:L}=([m,g]=R(async()=>z("storageKeys",async()=>a.value?await p.getStorageKeys(a.value):[])),m=await m,g(),m),G=T.hook("storage:key:update",async(t,s)=>{if(!(!a.value||t.split(":")[0]!==a.value)&&(await L(),b.value===t)){if(s==="remove")return h.replace({query:{storage:a.value}});await V(b.value)}});ue(G),ie(a,L),de(async()=>{if(!b.value){e.value=null;return}V(b.value)}),ce("keydown",t=>{t.key==="s"&&(t.ctrlKey||t.metaKey)&&(N(),t.preventDefault())});function C(t){return t.replace(`${a.value}:`,"")}const H=S(()=>K.value?K.value.filter(t=>t.includes(k.value)):[]);async function V(t){const s=await p.getStorageItem(t);e.value={key:t,updatedKey:C(t),editingKey:!1,content:s,updatedContent:s}}async function J(){if(!y.value||!a.value)return;const t=`${a.value}:${y.value}`;K.value?.includes(t)||await p.setStorageItem(t,""),h.replace({query:{storage:a.value,key:t}}),y.value=""}async function N(){e.value&&(await p.setStorageItem(e.value.key,e.value.updatedContent),await V(e.value.key))}async function O(){!e.value||!a.value||(await p.removeStorageItem(e.value.key),e.value=null)}async function Q(){if(!e.value||!a.value)return;const t=`${a.value}:${e.value.updatedKey}`;await p.setStorageItem(t,e.value.updatedContent),await p.removeStorageItem(e.value.key),h.replace({query:{storage:a.value,key:t}})}return(t,s)=>{const W=ne,X=oe,$=ae,Y=ye,Z=ve,M=ge,B=ke,D=he,A=be,ee=xe,te=we;return n(a)?(r(),_(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[l("div",Ce,[d(W,{icon:"carbon-chevron-left","ml--1":"",onClick:s[0]||(s[0]=o=>a.value="")}),l("div",Ve,[d(X,{modelValue:n(a),"onUpdate:modelValue":s[1]||(s[1]=o=>j(a)?a.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(r(!0),c(x,null,U(n(w),(o,f)=>(r(),c("option",{key:f,value:f},v(f),9,Ne))),128))]),_:1},8,["modelValue"])])]),d($,{modelValue:n(k),"onUpdate:modelValue":s[2]||(s[2]=o=>j(k)?k.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),c(x,null,U(n(H),o=>(r(),c(x,{key:o},[d(Y,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:o,storage:n(a)}},class:F(o===n(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:u(()=>[i(v(C(o)),1)]),_:2},1032,["to","class"]),$e],64))),128)),d($,{modelValue:n(y),"onUpdate:modelValue":s[3]||(s[3]=o=>j(y)?y.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:q(J,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[n(e)?.key?(r(),c("div",Ie,[l("div",Se,[l("div",Ue,[n(e).editingKey?(r(),_($,{key:0,modelValue:n(e).updatedKey,"onUpdate:modelValue":s[4]||(s[4]=o=>n(e).updatedKey=o),onKeyup:q(Q,["enter"])},null,8,["modelValue","onKeyup"])):(r(),c("code",je,[i(v(C(n(e).key))+" ",1),d(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:s[5]||(s[5]=o=>n(e).editingKey=!0)})])),n(e).editingKey?P("",!0):(r(),_(M,{key:2,n:"green xs",disabled:n(e).content===n(e).updatedContent,class:F({"border-green":n(e).content!==n(e).updatedContent}),onClick:N},{default:u(()=>[i(" Save ")]),_:1},8,["disabled","class"]))]),l("div",null,[d(M,{n:"red xs",onClick:O},{default:u(()=>[i(" Delete ")]),_:1})])]),typeof n(e).content=="object"?(r(),_(n(Ke),me({key:0,modelValue:n(e).updatedContent,"onUpdate:modelValue":s[6]||(s[6]=o=>n(e).updatedContent=o),class:[[t.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},t.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):pe((r(),c("textarea",{key:1,"onUpdate:modelValue":s[7]||(s[7]=o=>n(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:q(fe(N,["ctrl"]),["enter"])},null,40,qe)),[[_e,n(e).updatedContent]])])):(r(),_(A,{key:1},{default:u(()=>[d(D,{px6:"",py4:""},{default:u(()=>[i(" Select one key to start."),Le,i("Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),_(A,{key:1},{default:u(()=>[Object.keys(n(w)).length?(r(),c("p",Me," Select one storage to start: ")):(r(),c("p",Be,[i(" No custom storage defined in "),De,i("."),Ae,i(" Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})])),(r(!0),c(x,null,U(n(w),(o,f)=>(r(),_(D,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Te=>a.value=f},{default:u(()=>[l("span",Ee,v(f),1),Re,l("span",ze,v(o.driver)+" driver",1),Fe,o.base?(r(),_(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):P("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}});export{tt as default};
1
+ import{_ as ne}from"./NIconButton.vue.13275ce3.js";import{_ as oe}from"./NSelect.vue.2f75a7b4.js";import{_ as ae}from"./NTextInput.vue.efd43a47.js";import{a as se,a$ as re,D as le,r as I,p as S,E,b0 as R,ah as ue,a1 as ie,ag as de,e as ce,y as p,u as n,c as _,w as u,b1 as z,o as r,f as l,i as d,h as c,q as U,t as v,F as x,G as j,l as i,s as F,aJ as q,v as P,ac as me,z as pe,b2 as _e,aQ as fe,H as ye,M as ve,k as ge,a3 as he}from"./entry.3c854225.js";import{_ as ke}from"./NLink.vue.8becbaf2.js";import{_ as be}from"./NPanelGrids.afa6e237.js";import{_ as xe}from"./PanelLeftRight.vue.9e8aa6b8.js";import{_ as we}from"./FilepathItem.vue.7eb51d4e.js";import{U as Ke}from"./json-editor-vue.cb8f6785.js";import"./editor.6dcc09c7.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ve={class:"w-full text-sm"},Ne=["value"],$e=l("div",{"x-divider":""},null,-1),Ie={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Se={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},Ue={class:"flex items-center gap-4"},je={key:1},qe=["onKeyup"],Le=l("br",null,null,-1),Me={key:0,op50:""},Be={key:1},De=l("code",null,"nitro.storage",-1),Ae=l("br",null,null,-1),Ee={"font-bold":""},Re=l("br",null,null,-1),ze={"text-sm":""},Fe=l("br",null,null,-1),tt=se({__name:"storage",async setup(Pe){let m,g;const T=re(),h=le(),k=I(""),y=I(""),a=S({get(){return E().query?.storage},set(t){h.replace({query:{storage:t}})}}),e=I(),b=S(()=>E().query?.key),{data:w}=([m,g]=R(()=>z("storageMounts",()=>p.getStorageMounts())),m=await m,g(),m),{data:K,refresh:L}=([m,g]=R(async()=>z("storageKeys",async()=>a.value?await p.getStorageKeys(a.value):[])),m=await m,g(),m),G=T.hook("storage:key:update",async(t,s)=>{if(!(!a.value||t.split(":")[0]!==a.value)&&(await L(),b.value===t)){if(s==="remove")return h.replace({query:{storage:a.value}});await V(b.value)}});ue(G),ie(a,L),de(async()=>{if(!b.value){e.value=null;return}V(b.value)}),ce("keydown",t=>{t.key==="s"&&(t.ctrlKey||t.metaKey)&&(N(),t.preventDefault())});function C(t){return t.replace(`${a.value}:`,"")}const H=S(()=>K.value?K.value.filter(t=>t.includes(k.value)):[]);async function V(t){const s=await p.getStorageItem(t);e.value={key:t,updatedKey:C(t),editingKey:!1,content:s,updatedContent:s}}async function J(){if(!y.value||!a.value)return;const t=`${a.value}:${y.value}`;K.value?.includes(t)||await p.setStorageItem(t,""),h.replace({query:{storage:a.value,key:t}}),y.value=""}async function N(){e.value&&(await p.setStorageItem(e.value.key,e.value.updatedContent),await V(e.value.key))}async function O(){!e.value||!a.value||(await p.removeStorageItem(e.value.key),e.value=null)}async function Q(){if(!e.value||!a.value)return;const t=`${a.value}:${e.value.updatedKey}`;await p.setStorageItem(t,e.value.updatedContent),await p.removeStorageItem(e.value.key),h.replace({query:{storage:a.value,key:t}})}return(t,s)=>{const W=ne,X=oe,$=ae,Y=ye,Z=ve,M=ge,B=ke,D=he,A=be,ee=xe,te=we;return n(a)?(r(),_(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[l("div",Ce,[d(W,{icon:"carbon-chevron-left","ml--1":"",onClick:s[0]||(s[0]=o=>a.value="")}),l("div",Ve,[d(X,{modelValue:n(a),"onUpdate:modelValue":s[1]||(s[1]=o=>j(a)?a.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(r(!0),c(x,null,U(n(w),(o,f)=>(r(),c("option",{key:f,value:f},v(f),9,Ne))),128))]),_:1},8,["modelValue"])])]),d($,{modelValue:n(k),"onUpdate:modelValue":s[2]||(s[2]=o=>j(k)?k.value=o:null),icon:"carbon-search",placeholder:"Search...",n:"primary sm",border:"y x-none base! rounded-0",class:"w-full py2 ring-0!"},null,8,["modelValue"]),(r(!0),c(x,null,U(n(H),o=>(r(),c(x,{key:o},[d(Y,{block:"",truncate:"",px2:"",py1:"","font-mono":"","text-sm":"",to:{query:{key:o,storage:n(a)}},class:F(o===n(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover")},{default:u(()=>[i(v(C(o)),1)]),_:2},1032,["to","class"]),$e],64))),128)),d($,{modelValue:n(y),"onUpdate:modelValue":s[3]||(s[3]=o=>j(y)?y.value=o:null),icon:"carbon-add",placeholder:"key",n:"sm",border:"t-none x-none base! rounded-0",class:"w-full py2 font-mono ring-0!",onKeyup:q(J,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[n(e)?.key?(r(),c("div",Ie,[l("div",Se,[l("div",Ue,[n(e).editingKey?(r(),_($,{key:0,modelValue:n(e).updatedKey,"onUpdate:modelValue":s[4]||(s[4]=o=>n(e).updatedKey=o),onKeyup:q(Q,["enter"])},null,8,["modelValue","onKeyup"])):(r(),c("code",je,[i(v(C(n(e).key))+" ",1),d(Z,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:s[5]||(s[5]=o=>n(e).editingKey=!0)})])),n(e).editingKey?P("",!0):(r(),_(M,{key:2,n:"green xs",disabled:n(e).content===n(e).updatedContent,class:F({"border-green":n(e).content!==n(e).updatedContent}),onClick:N},{default:u(()=>[i(" Save ")]),_:1},8,["disabled","class"]))]),l("div",null,[d(M,{n:"red xs",onClick:O},{default:u(()=>[i(" Delete ")]),_:1})])]),typeof n(e).content=="object"?(r(),_(n(Ke),me({key:0,modelValue:n(e).updatedContent,"onUpdate:modelValue":s[6]||(s[6]=o=>n(e).updatedContent=o),class:[[t.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},t.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):pe((r(),c("textarea",{key:1,"onUpdate:modelValue":s[7]||(s[7]=o=>n(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 font-mono text-sm outline-none",onKeyup:q(fe(N,["ctrl"]),["enter"])},null,40,qe)),[[_e,n(e).updatedContent]])])):(r(),_(A,{key:1},{default:u(()=>[d(D,{px6:"",py4:""},{default:u(()=>[i(" Select one key to start."),Le,i("Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(r(),_(A,{key:1},{default:u(()=>[Object.keys(n(w)).length?(r(),c("p",Me," Select one storage to start: ")):(r(),c("p",Be,[i(" No custom storage defined in "),De,i("."),Ae,i(" Learn more about "),d(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[i(" Nitro storage ")]),_:1})])),(r(!0),c(x,null,U(n(w),(o,f)=>(r(),_(D,{key:f,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:Te=>a.value=f},{default:u(()=>[l("span",Ee,v(f),1),Re,l("span",ze,v(o.driver)+" driver",1),Fe,o.base?(r(),_(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):P("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}});export{tt as default};
@@ -1,4 +1,4 @@
1
- import{a as le,r as ae,a$ as pe,a0 as me,e as Se,y as se,h as re,f as te,i as Ce,u as J,c as ie,v as oe,t as ne,F as de,o as Q,b7 as be,E as ye,D as we,p as Ee,ag as Le,q as ke,l as he,w as Re,s as ce,aQ as De,M as Ae,H as xe}from"./entry.5024288d.js";import{_ as _e}from"./NIconButton.vue.d0a9a760.js";var ue={exports:{}};(function(ee,Z){(function(Y,X){ee.exports=X()})(self,function(){return(()=>{var Y={4567:(B,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const h=a(9042),u=a(6114),d=a(9924),_=a(3656),g=a(844),v=a(5596),c=a(9631);class e extends g.Disposable{constructor(n,t){super(),this._terminal=n,this._renderService=t,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityTreeRoot=document.createElement("div"),this._accessibilityTreeRoot.classList.add("xterm-accessibility"),this._accessibilityTreeRoot.tabIndex=0,this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let r=0;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);if(this._topBoundaryFocusListener=r=>this._handleBoundaryFocus(r,0),this._bottomBoundaryFocusListener=r=>this._handleBoundaryFocus(r,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityTreeRoot.appendChild(this._rowContainer),this._renderRowsDebouncer=new d.TimeBasedDebouncer(this._renderRows.bind(this)),this._refreshRows(),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityTreeRoot.appendChild(this._liveRegion),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityTreeRoot),this.register(this._renderRowsDebouncer),this.register(this._terminal.onResize(r=>this._handleResize(r.rows))),this.register(this._terminal.onRender(r=>this._refreshRows(r.start,r.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(r=>this._handleChar(r))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
1
+ import{a as le,r as ae,a$ as pe,a0 as me,e as Se,y as se,h as re,f as te,i as Ce,u as J,c as ie,v as oe,t as ne,F as de,o as Q,b7 as be,E as ye,D as we,p as Ee,ag as Le,q as ke,l as he,w as Re,s as ce,aQ as De,M as Ae,H as xe}from"./entry.3c854225.js";import{_ as _e}from"./NIconButton.vue.13275ce3.js";var ue={exports:{}};(function(ee,Z){(function(Y,X){ee.exports=X()})(self,function(){return(()=>{var Y={4567:(B,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.AccessibilityManager=void 0;const h=a(9042),u=a(6114),d=a(9924),_=a(3656),g=a(844),v=a(5596),c=a(9631);class e extends g.Disposable{constructor(n,t){super(),this._terminal=n,this._renderService=t,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityTreeRoot=document.createElement("div"),this._accessibilityTreeRoot.classList.add("xterm-accessibility"),this._accessibilityTreeRoot.tabIndex=0,this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let r=0;r<this._terminal.rows;r++)this._rowElements[r]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[r]);if(this._topBoundaryFocusListener=r=>this._handleBoundaryFocus(r,0),this._bottomBoundaryFocusListener=r=>this._handleBoundaryFocus(r,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityTreeRoot.appendChild(this._rowContainer),this._renderRowsDebouncer=new d.TimeBasedDebouncer(this._renderRows.bind(this)),this._refreshRows(),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityTreeRoot.appendChild(this._liveRegion),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityTreeRoot),this.register(this._renderRowsDebouncer),this.register(this._terminal.onResize(r=>this._handleResize(r.rows))),this.register(this._terminal.onRender(r=>this._refreshRows(r.start,r.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(r=>this._handleChar(r))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
2
2
  `))),this.register(this._terminal.onA11yTab(r=>this._handleTab(r))),this.register(this._terminal.onKey(r=>this._handleKey(r.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new v.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,_.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this.register((0,g.toDisposable)(()=>{(0,c.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0}))}_handleBoundaryFocus(n,t){const r=n.target,l=this._rowElements[t===0?1:this._rowElements.length-2];if(r.getAttribute("aria-posinset")===(t===0?"1":`${this._terminal.buffer.lines.length}`)||n.relatedTarget!==l)return;let f,S;if(t===0?(f=r,S=this._rowElements.pop(),this._rowContainer.removeChild(S)):(f=this._rowElements.shift(),S=r,this._rowContainer.removeChild(f)),f.removeEventListener("focus",this._topBoundaryFocusListener),S.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){const o=this._createAccessibilityTreeNode();this._rowElements.unshift(o),this._rowContainer.insertAdjacentElement("afterbegin",o)}else{const o=this._createAccessibilityTreeNode();this._rowElements.push(o),this._rowContainer.appendChild(o)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),n.preventDefault(),n.stopImmediatePropagation()}_handleResize(n){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>n;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const n=document.createElement("div");return n.setAttribute("role","listitem"),n.tabIndex=-1,this._refreshRowDimensions(n),n}_handleTab(n){for(let t=0;t<n;t++)this._handleChar(" ")}_handleChar(n){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==n&&(this._charsToAnnounce+=n):this._charsToAnnounce+=n,n===`
3
3
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),u.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityTreeRoot.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,u.isMac&&(0,c.removeElementFromParent)(this._liveRegion)}_handleKey(n){this._clearLiveRegion(),/\p{Control}/u.test(n)||this._charsToConsume.push(n)}_refreshRows(n,t){this._renderRowsDebouncer.refresh(n,t,this._terminal.rows)}_renderRows(n,t){const r=this._terminal.buffer,l=r.lines.length.toString();for(let f=n;f<=t;f++){const S=r.translateBufferLineToString(r.ydisp+f,!0),o=(r.ydisp+f+1).toString(),p=this._rowElements[f];p&&(S.length===0?p.innerText=" ":p.textContent=S,p.setAttribute("aria-posinset",o),p.setAttribute("aria-setsize",l))}this._announceCharacters()}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityTreeRoot.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let n=0;n<this._terminal.rows;n++)this._refreshRowDimensions(this._rowElements[n])}}_refreshRowDimensions(n){n.style.height=`${this._renderService.dimensions.css.cell.height}px`}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}}i.AccessibilityManager=e},3614:(B,i)=>{function a(_){return _.replace(/\r?\n/g,"\r")}function h(_,g){return g?"\x1B[200~"+_+"\x1B[201~":_}function u(_,g,v){_=h(_=a(_),v.decPrivateModes.bracketedPasteMode),v.triggerDataEvent(_,!0),g.value=""}function d(_,g,v){const c=v.getBoundingClientRect(),e=_.clientX-c.left-10,s=_.clientY-c.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${e}px`,g.style.top=`${s}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(i,"__esModule",{value:!0}),i.rightClickHandler=i.moveTextAreaUnderMouseCursor=i.paste=i.handlePasteEvent=i.copyHandler=i.bracketTextForPaste=i.prepareTextForTerminal=void 0,i.prepareTextForTerminal=a,i.bracketTextForPaste=h,i.copyHandler=function(_,g){_.clipboardData&&_.clipboardData.setData("text/plain",g.selectionText),_.preventDefault()},i.handlePasteEvent=function(_,g,v){_.stopPropagation(),_.clipboardData&&u(_.clipboardData.getData("text/plain"),g,v)},i.paste=u,i.moveTextAreaUnderMouseCursor=d,i.rightClickHandler=function(_,g,v,c,e){d(_,g,v),e&&c.rightClickSelect(_),g.value=c.selectionText,g.select()}},7239:(B,i,a)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.ColorContrastCache=void 0;const h=a(1505);i.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(u,d,_){this._css.set(u,d,_)}getCss(u,d){return this._css.get(u,d)}setColor(u,d,_){this._color.set(u,d,_)}getColor(u,d){return this._color.get(u,d)}clear(){this._color.clear(),this._css.clear()}}},9631:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.removeElementFromParent=void 0,i.removeElementFromParent=function(...a){var h;for(const u of a)(h=u?.parentElement)===null||h===void 0||h.removeChild(u)}},3656:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.addDisposableDomListener=void 0,i.addDisposableDomListener=function(a,h,u,d){a.addEventListener(h,u,d);let _=!1;return{dispose:()=>{_||(_=!0,a.removeEventListener(h,u,d))}}}},6465:function(B,i,a){var h=this&&this.__decorate||function(e,s,n,t){var r,l=arguments.length,f=l<3?s:t===null?t=Object.getOwnPropertyDescriptor(s,n):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(e,s,n,t);else for(var S=e.length-1;S>=0;S--)(r=e[S])&&(f=(l<3?r(f):l>3?r(s,n,f):r(s,n))||f);return l>3&&f&&Object.defineProperty(s,n,f),f},u=this&&this.__param||function(e,s){return function(n,t){s(n,t,e)}};Object.defineProperty(i,"__esModule",{value:!0}),i.Linkifier2=void 0;const d=a(2585),_=a(8460),g=a(844),v=a(3656);let c=class extends g.Disposable{constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)(()=>{this._lastMouseEvent=void 0}))}get currentLink(){return this._currentLink}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,n){this._element=e,this._mouseService=s,this._renderService=n,this.register((0,v.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,v.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,v.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,v.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const n=e.composedPath();for(let t=0;t<n.length;t++){const r=n[t];if(r.classList.contains("xterm"))break;if(r.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var n,t;this._activeProviderReplies&&s||((n=this._activeProviderReplies)===null||n===void 0||n.forEach(l=>{l?.forEach(f=>{f.link.dispose&&f.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(const[l,f]of this._linkProviders.entries())s?!((t=this._activeProviderReplies)===null||t===void 0)&&t.get(l)&&(r=this._checkLinkProviderResult(l,e,r)):f.provideLinks(e.y,S=>{var o,p;if(this._isMouseOut)return;const C=S?.map(y=>({link:y}));(o=this._activeProviderReplies)===null||o===void 0||o.set(l,C),r=this._checkLinkProviderResult(l,e,r),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const n=new Set;for(let t=0;t<s.size;t++){const r=s.get(t);if(r)for(let l=0;l<r.length;l++){const f=r[l],S=f.link.range.start.y<e?0:f.link.range.start.x,o=f.link.range.end.y>e?this._bufferService.cols:f.link.range.end.x;for(let p=S;p<=o;p++){if(n.has(p)){r.splice(l--,1);break}n.add(p)}}}}_checkLinkProviderResult(e,s,n){var t;if(!this._activeProviderReplies)return n;const r=this._activeProviderReplies.get(e);let l=!1;for(let f=0;f<e;f++)this._activeProviderReplies.has(f)&&!this._activeProviderReplies.get(f)||(l=!0);if(!l&&r){const f=r.find(S=>this._linkAtPosition(S.link,s));f&&(n=!0,this._handleNewLink(f))}if(this._activeProviderReplies.size===this._linkProviders.length&&!n)for(let f=0;f<this._activeProviderReplies.size;f++){const S=(t=this._activeProviderReplies.get(f))===null||t===void 0?void 0:t.find(o=>this._linkAtPosition(o.link,s));if(S){n=!0,this._handleNewLink(S);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var n,t;return(t=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||t===void 0?void 0:t.decorations.pointerCursor},set:n=>{var t,r;!((t=this._currentLink)===null||t===void 0)&&t.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&((r=this._element)===null||r===void 0||r.classList.toggle("xterm-cursor-pointer",n)))}},underline:{get:()=>{var n,t;return(t=(n=this._currentLink)===null||n===void 0?void 0:n.state)===null||t===void 0?void 0:t.decorations.underline},set:n=>{var t,r,l;!((t=this._currentLink)===null||t===void 0)&&t.state&&((l=(r=this._currentLink)===null||r===void 0?void 0:r.state)===null||l===void 0?void 0:l.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,n))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{const t=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,r=this._currentLink?this._lastMouseEvent:void 0;if(this._clearCurrentLink(t,n.end+1+this._bufferService.buffer.ydisp),r&&this._element){const l=this._positionFromMouseEvent(r,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,n){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(n,s.text)}_fireUnderlineEvent(e,s){const n=e.range,t=this._bufferService.buffer.ydisp,r=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-t-1,n.end.x,n.end.y-t-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(r)}_linkLeave(e,s,n){var t;!((t=this._currentLink)===null||t===void 0)&&t.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(n,s.text)}_linkAtPosition(e,s){const n=e.range.start.y*this._bufferService.cols+e.range.start.x,t=e.range.end.y*this._bufferService.cols+e.range.end.x,r=s.y*this._bufferService.cols+s.x;return n<=r&&r<=t}_positionFromMouseEvent(e,s,n){const t=n.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(t)return{x:t[0],y:t[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,n,t,r){return{x1:e,y1:s,x2:n,y2:t,cols:this._bufferService.cols,fg:r}}};c=h([u(0,d.IBufferService)],c),i.Linkifier2=c},9042:(B,i)=>{Object.defineProperty(i,"__esModule",{value:!0}),i.tooMuchOutput=i.promptLabel=void 0,i.promptLabel="Terminal input",i.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,i,a){var h=this&&this.__decorate||function(c,e,s,n){var t,r=arguments.length,l=r<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(c,e,s,n);else for(var f=c.length-1;f>=0;f--)(t=c[f])&&(l=(r<3?t(l):r>3?t(e,s,l):t(e,s))||l);return r>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(c,e){return function(s,n){e(s,n,c)}};Object.defineProperty(i,"__esModule",{value:!0}),i.OscLinkProvider=void 0;const d=a(511),_=a(2585);let g=class{constructor(c,e,s){this._bufferService=c,this._optionsService=e,this._oscLinkService=s}provideLinks(c,e){var s;const n=this._bufferService.buffer.lines.get(c-1);if(!n)return void e(void 0);const t=[],r=this._optionsService.rawOptions.linkHandler,l=new d.CellData,f=n.getTrimmedLength();let S=-1,o=-1,p=!1;for(let C=0;C<f;C++)if(o!==-1||n.hasContent(C)){if(n.loadCell(C,l),l.hasExtendedAttrs()&&l.extended.urlId){if(o===-1){o=C,S=l.extended.urlId;continue}p=l.extended.urlId!==S}else o!==-1&&(p=!0);if(p||o!==-1&&C===f-1){const y=(s=this._oscLinkService.getLinkData(S))===null||s===void 0?void 0:s.uri;if(y){const w={start:{x:o+1,y:c},end:{x:C+(p||C!==f-1?0:1),y:c}};let D=!1;if(!r?.allowNonHttpProtocols)try{const x=new URL(y);["http:","https:"].includes(x.protocol)||(D=!0)}catch{D=!0}D||t.push({text:y,range:w,activate:(x,I)=>r?r.activate(x,I,w):v(0,I),hover:(x,I)=>{var H;return(H=r?.hover)===null||H===void 0?void 0:H.call(r,x,I,w)},leave:(x,I)=>{var H;return(H=r?.leave)===null||H===void 0?void 0:H.call(r,x,I,w)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(o=C,S=l.extended.urlId):(o=-1,S=-1)}}e(t)}};function v(c,e){if(confirm(`Do you want to navigate to ${e}?
4
4