@nuxt/devtools 1.0.0-beta.2 → 1.0.0
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.
- package/README.md +25 -31
- package/dist/chunks/module-main.mjs +20 -14
- package/dist/chunks/vscode.mjs +1 -1
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/__blank/index.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.b74b0167.js → CodeDiff.vue.436985c7.js} +1 -1
- package/dist/client/_nuxt/{ComposableItem.vue.66a98e20.js → ComposableItem.vue.2d6f2884.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.b30dcd6f.js → DataSchemaButton.vue.42a3718a.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.d00941d6.js → DataSchemaDrawer.edc189c2.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.5b7cc04d.js → DurationDisplay.vue.719ab95f.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.6dd69314.js → FilepathItem.vue.7fdda51b.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.314bc83b.js → HelpFab.vue.891b009b.js} +1 -1
- package/dist/client/_nuxt/LaunchPage.vue.289a5cb3.js +1 -0
- package/dist/client/_nuxt/{NBadge.e849763e.js → NBadge.83bd8b90.js} +1 -1
- package/dist/client/_nuxt/NCheckbox.vue.5a0973a7.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.882d562f.js → NCodeBlock.vue.2de294a4.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.a4010d93.js → NDrawer.vue.9614b581.js} +1 -1
- package/dist/client/_nuxt/NDropdown.vue.26dc3926.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.71113a3f.js → NIconTitle.vue.eb974cf8.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.a09685db.js → NLink.vue.31c2cbc4.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.13c5f0c3.js → NMarkdown.vue.4b221360.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.d9a029e0.js → NNavbar.vue.5fed0fd7.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.d6290e19.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.08628a3f.js +1 -0
- package/dist/client/_nuxt/NSelectTabs.vue.30a856a4.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.1b79756d.js +1 -0
- package/dist/client/_nuxt/{NTip.vue.3f5fb5a1.js → NTip.vue.1a1ff991.js} +1 -1
- package/dist/client/_nuxt/StateEditor.vue.9646c347.js +1 -0
- package/dist/client/_nuxt/{__blank.f49c5a73.js → __blank.176c8119.js} +1 -1
- package/dist/client/_nuxt/{analyze-build.988e7c9e.js → analyze-build.d636dfd0.js} +1 -1
- package/dist/client/_nuxt/assets.29a152c5.js +16 -0
- package/dist/client/_nuxt/client.f2b385ce.js +1 -0
- package/dist/client/_nuxt/components.7bfa06b8.js +98 -0
- package/dist/client/_nuxt/{custom-_name_.0e141ac3.js → custom-_name_.3fb62165.js} +1 -1
- package/dist/client/_nuxt/{default.a50dad07.js → default.2a08c996.js} +1 -1
- package/dist/client/_nuxt/entry.12ac938b.js +27 -0
- package/dist/client/_nuxt/entry.aac067b6.css +1 -0
- package/dist/client/_nuxt/{error-404.429edf81.js → error-404.a171614a.js} +1 -1
- package/dist/client/_nuxt/{error-500.9e83b20b.js → error-500.3ea59bbe.js} +1 -1
- package/dist/client/_nuxt/{full.c90b8ab9.js → full.76f6dd31.js} +1 -1
- package/dist/client/_nuxt/{hooks.40588927.js → hooks.a236b60f.js} +1 -1
- package/dist/client/_nuxt/{imports.7b590e48.js → imports.67d68271.js} +1 -1
- package/dist/client/_nuxt/{index.8013a14e.js → index.64ca7e84.js} +1 -1
- package/dist/client/_nuxt/index.dbe03c05.js +1 -0
- package/dist/client/_nuxt/{json-editor-vue.465dc720.js → json-editor-vue.cf7b17c9.js} +1 -1
- package/dist/client/_nuxt/modules.798949c3.js +2 -0
- package/dist/client/_nuxt/{none.ab2b300f.js → none.cad56a7a.js} +1 -1
- package/dist/client/_nuxt/open-graph.484b1a77.css +1 -0
- package/dist/client/_nuxt/open-graph.8ebd5e58.js +3 -0
- package/dist/client/_nuxt/overview.0d62f8aa.js +1 -0
- package/dist/client/_nuxt/{pages.7f7e1a57.js → pages.1e1baa5d.js} +1 -1
- package/dist/client/_nuxt/payload.83b598a3.js +1 -0
- package/dist/client/_nuxt/{plugins.1f073986.js → plugins.0e90c1cf.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.6d4dd513.js → runtime-configs.ae0bd008.js} +1 -1
- package/dist/client/_nuxt/server-routes.6a4e23d0.js +9 -0
- package/dist/client/_nuxt/settings.82aae3ea.js +1 -0
- package/dist/client/_nuxt/{state-components.c2be3414.js → state-components.c06dd56d.js} +1 -1
- package/dist/client/_nuxt/state-modules.7616c62e.js +1 -0
- package/dist/client/_nuxt/storage-options.2141006e.js +1 -0
- package/dist/client/_nuxt/{storage.8cd70b69.js → storage.fe3db05a.js} +1 -1
- package/dist/client/_nuxt/{terminals.ce3bbf0e.js → terminals.f6a3d365.js} +1 -1
- package/dist/client/_nuxt/timeline.ba2f1a0c.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.41db0d67.js → unocss-runtime.0346eeb6.js} +1 -1
- package/dist/client/_nuxt/virtual-files.3a2a25a2.js +1 -0
- package/dist/client/index.html +17 -17
- package/dist/client/modules/analyze-build/index.html +17 -17
- package/dist/client/modules/assets/index.html +17 -17
- package/dist/client/modules/components/index.html +17 -17
- package/dist/client/modules/hooks/index.html +17 -17
- package/dist/client/modules/imports/index.html +17 -17
- package/dist/client/modules/modules/index.html +17 -17
- package/dist/client/modules/open-graph/index.html +17 -17
- package/dist/client/modules/overview/index.html +17 -17
- package/dist/client/modules/pages/index.html +17 -17
- package/dist/client/modules/payload/index.html +17 -17
- package/dist/client/modules/plugins/index.html +17 -17
- package/dist/client/modules/runtime-configs/index.html +17 -17
- package/dist/client/modules/server-routes/index.html +17 -17
- package/dist/client/modules/storage/index.html +17 -17
- package/dist/client/modules/terminals/index.html +17 -17
- package/dist/client/modules/timeline/index.html +17 -17
- package/dist/client/modules/virtual-files/index.html +17 -17
- package/dist/client/settings/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/view/client.mjs +1 -1
- package/dist/shared/{devtools.d18bab28.mjs → devtools.ca660ec5.mjs} +31 -1
- package/package.json +7 -7
- package/dist/client/_nuxt/LaunchPage.vue.017c62ce.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.cf7e1e9d.js +0 -1
- package/dist/client/_nuxt/NDropdown.vue.3b1768f5.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.7f41e147.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.e7f8c81a.js +0 -1
- package/dist/client/_nuxt/NSelectTabs.vue.ddc009ff.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.8d3010b0.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.162475d5.js +0 -1
- package/dist/client/_nuxt/assets.2b649247.js +0 -16
- package/dist/client/_nuxt/client.253674ec.js +0 -1
- package/dist/client/_nuxt/components.7583b49c.js +0 -98
- package/dist/client/_nuxt/entry.3dd66f35.js +0 -27
- package/dist/client/_nuxt/entry.960c025a.css +0 -1
- package/dist/client/_nuxt/index.90ae56cb.js +0 -1
- package/dist/client/_nuxt/middleware.72aa446e.js +0 -1
- package/dist/client/_nuxt/modules.d997669f.js +0 -2
- package/dist/client/_nuxt/open-graph.1cc10683.js +0 -3
- package/dist/client/_nuxt/overview.014aea35.js +0 -1
- package/dist/client/_nuxt/payload.58a8bb6b.js +0 -1
- package/dist/client/_nuxt/server-routes.b5fc14db.js +0 -9
- package/dist/client/_nuxt/settings.04d1166d.js +0 -1
- package/dist/client/_nuxt/state-modules.5bf4563c.js +0 -1
- package/dist/client/_nuxt/storage-options.2224e06b.js +0 -1
- package/dist/client/_nuxt/timeline.23647b38.js +0 -29
- package/dist/client/_nuxt/virtual-files.bc5e9072.js +0 -1
- package/dist/client/modules/middleware/index.html +0 -42
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as S}from"./FilepathItem.vue.
|
|
1
|
+
import{_ as S}from"./FilepathItem.vue.7fdda51b.js";import{_ as D}from"./NBadge.83bd8b90.js";import{_ as C}from"./DurationDisplay.vue.719ab95f.js";import{d as v,aa as B,a as x,bc as V,o as n,m,k as t,t as P,i as l,f,h as u,p as d,an as F,a8 as N,a4 as H,q as I,j as g,v as y,be as E,as as W,F as k,n as j,G as L}from"./entry.12ac938b.js";import{_ as M}from"./NSectionBlock.d6290e19.js";import{_ as q}from"./HelpFab.vue.891b009b.js";import"./NIconTitle.vue.eb974cf8.js";const z={flex:"~ gap2","items-center":""},A={w8:"","text-right":"","text-sm":"",op25:""},G={key:0,"flex-auto":"","text-right":""},R=v({__name:"PluginItem",props:{plugin:{},index:{}},setup(p){const e=p,a=B(),r=x(()=>V(e.plugin.src,a.value?.rootDir||"").path);return(i,c)=>{const _=S,o=D,s=C;return n(),m("div",z,[t("div",A,P(i.index),1),l(_,{filepath:e.plugin.src,subpath:!0},null,8,["filepath"]),t("div",null,[f(r).startsWith("#")?(n(),u(o,{key:0,n:"rose",textContent:"virtual"})):f(r).startsWith(".")?d("",!0):(n(),u(o,{key:1,n:"gray",textContent:"module"})),i.plugin.mode==="server"?(n(),u(o,{key:2,n:"teal",textContent:"server"})):d("",!0),i.plugin.mode==="client"?(n(),u(o,{key:3,n:"orange",textContent:"client"})):d("",!0)]),i.plugin.metric?.duration!=null?(n(),m("div",G,[l(s,{duration:i.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:""},J={flex:"~ items-center gap-1","font-bold":""},K=v({__name:"HelpTip",props:{title:{},icon:{}},setup(p){return(e,a)=>{const r=H,i=F("ContentSlot");return n(),m("div",Y,[t("div",J,[e.icon?(n(),u(r,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):d("",!0),t("div",null,P(e.title),1)]),t("div",null,[N(e.$slots,"default",{},()=>[l(i,{use:e.$slots.default,unwrap:"p"},null,8,["use"])])])])}}}),O={};function Q(p,e){const a=K;return n(),u(a,{title:"Performance Tip",icon:"carbon-meter",n:"lime6 dark:lime5"},{default:g(()=>[N(p.$slots,"default")]),_:3})}const U=I(O,[["render",Q]]),X={class:"markdown-body"},Z=t("h1",null,"Plugins",-1),tt=t("p",null,[y("Nuxt plugins allow you to extend the functionality of the Nuxt runtime and the Vue instance. You can add plugins to the "),t("code",null,"plugins/"),y(" directory and they will be automatically imported and registered.")],-1),et=t("p",null,[t("a",{href:"https://nuxt.com/docs/guide/directory-structure/plugins",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),nt={__name:"plugins",setup(p,{expose:e}){return e({frontmatter:{}}),(r,i)=>{const c=U;return n(),m("div",X,[Z,tt,l(c,null,{default:g(()=>[y(" Plugins always run before your application's runtime. The loading time of each plugin will directly impact your application's initial loading time. ")]),_:1}),et])}}},ot={pt4:""},st={class:"text-sm",flex:"~ gap-1 items-center justify-start","mt-3":""},it=t("div",{"i-carbon-timer":"","text-lg":"",op75:""},null,-1),at=t("span",{op50:""},"Total execution time:",-1),dt=v({__name:"plugins",setup(p){const e=E(),a=W(),r=x(()=>{const c=e.value?.plugins||[],_=a.value?.metrics.clientPlugins()||[];return c.map(o=>{const s=typeof o=="string"?{src:o}:o;return{...s,metric:_.find(h=>h.src===s.src||h.src.startsWith(s.src))}})}),i=x(()=>{const c=a.value?.metrics.clientPlugins()||[],_=Math.min(...c.map(s=>s.start));return Math.max(...c.map(s=>s.end))-_});return(c,_)=>{const o=R,s=C,h=M,T=nt,w=q;return n(),m(k,null,[l(h,{icon:"carbon-plug",text:"Plugins",description:`Total plugins: ${f(r).length}`},{default:g(()=>[t("div",ot,[(n(!0),m(k,null,j(f(r),($,b)=>(n(),u(o,{key:$.src,plugin:$,index:b+1,"ml--4":"","border-base":"",py2:"",class:L(b?"border-t":"")},null,8,["plugin","index","class"]))),128)),t("div",st,[it,at,l(s,{duration:f(i),factor:10},null,8,["duration"])])])]),_:1},8,["description"]),l(w,null,{default:g(()=>[l(T)]),_:1})],64)}}});export{dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as v}from"./StateEditor.vue.
|
|
1
|
+
import{_ as v}from"./StateEditor.vue.9646c347.js";import{_ as x}from"./NSectionBlock.d6290e19.js";import{o as r,m as u,k as e,v as m,d as y,as as b,bh as C,a as d,f as i,i as t,j as a,p as k,F as w}from"./entry.12ac938b.js";import{_ as N}from"./HelpFab.vue.891b009b.js";import"./DataSchemaButton.vue.42a3718a.js";import"./json-editor-vue.cf7b17c9.js";import"./NIconTitle.vue.eb974cf8.js";const R={class:"markdown-body"},T=e("h1",null,"Runtime Configs",-1),B=e("p",null,"Nuxt provides a runtime config API to expose configuration within your application and server routes, with the ability to update it at runtime by setting environment variables.",-1),V=e("p",null,[m("In Nuxt DevTools, the editor allows you to edit the runtime config temporarily to see how the changes affect your application. To update them, you might want to update your "),e("code",null,"nuxt.config.js"),m(" file, or check more details in the documentation.")],-1),$=e("p",null,[e("a",{href:"https://nuxt.com/docs/guide/going-further/runtime-config",target:"_blank",rel:"noopener"},"Learn more in the documentation")],-1),D=[T,B,V,$],F={__name:"runtime-configs",setup(f,{expose:o}){return o({frontmatter:{}}),(p,_)=>(r(),u("div",R,D))}},P={key:0},z=y({__name:"runtime-configs",setup(f){const o=b(),l=C(),p=d(()=>o.value?.nuxt.payload),_=d(()=>{const n={...l.value};return delete n.public,delete n.app,n});return(n,S)=>{const s=v,c=x,g=F,h=N;return r(),u(w,null,[i(o)?(r(),u("div",P,[t(c,{icon:"carbon-settings-services",text:"App Config",padding:!1},{default:a(()=>[t(s,{state:i(o).app.appConfig},null,8,["state"])]),_:1}),t(c,{icon:"carbon-settings",text:"Public Runtime Config",padding:!1},{default:a(()=>[t(s,{state:i(p).config?.public},null,8,["state"])]),_:1}),t(c,{icon:"i-carbon-code-signing-service",text:"Private Runtime Config",open:!1,padding:!1,description:"These values are not exposed to the client. Readonly in the DevTools."},{default:a(()=>[t(s,{state:i(_),readonly:""},null,8,["state"])]),_:1})])):k("",!0),t(h,null,{default:a(()=>[t(g)]),_:1})],64)}}});export{z as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as P,bk as Fe,ay as ze,aw as He,w as xe,bl as We,bm as Ge,d as ae,bn as we,o as t,m as v,k as d,G as j,h as k,f as e,bo as se,t as E,p as U,v as H,a7 as Je,a8 as ee,F as N,n as A,a4 as ce,Y as Ke,a as V,i as m,j as x,W as $e,_ as fe,bp as Qe,aa as Ye,as as Xe,au as pe,a9 as Ze,ax as et,e as tt,a0 as Se,l as X,I as le,ar as ot,U as nt,A as Ve,bq as st,br as lt,af as at,S as rt,bs as it,am as ut}from"./entry.12ac938b.js";import{_ as dt}from"./NNavbar.vue.5fed0fd7.js";import{_ as Te}from"./NBadge.83bd8b90.js";import{_ as Re}from"./NSelect.vue.08628a3f.js";import{_ as pt}from"./NCheckbox.vue.5a0973a7.js";import{u as Ue,_ as ct}from"./storage-options.2141006e.js";import{_ as ft}from"./DataSchemaButton.vue.42a3718a.js";import{_ as mt}from"./NCodeBlock.vue.2de294a4.js";import{C as ke,S as Ne}from"./constants.2cc6e981.js";import{U as vt}from"./json-editor-vue.cf7b17c9.js";import{_ as ht}from"./NSectionBlock.d6290e19.js";import{_ as yt}from"./NDrawer.vue.9614b581.js";import"./client.f2b385ce.js";import"./NIconTitle.vue.eb974cf8.js";const ne=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/;function _t(u,y){if(typeof u!="string")throw new TypeError("argument str must be a string");const h={},$=(y||{}).decode||kt;let g=0;for(;g<u.length;){const c=u.indexOf("=",g);if(c===-1)break;let s=u.indexOf(";",g);if(s===-1)s=u.length;else if(s<c){g=u.lastIndexOf(";",c-1)+1;continue}const i=u.slice(g,c).trim();if(h[i]===void 0){let r=u.slice(c+1,s).trim();r.codePointAt(0)===34&&(r=r.slice(1,-1)),h[i]=bt(r,$)}g=s+1}return h}function Ce(u,y,h){const o=h||{},$=o.encode||Ct;if(typeof $!="function")throw new TypeError("option encode is invalid");if(!ne.test(u))throw new TypeError("argument name is invalid");const g=$(y);if(g&&!ne.test(g))throw new TypeError("argument val is invalid");let c=u+"="+g;if(o.maxAge!==void 0&&o.maxAge!==null){const s=o.maxAge-0;if(Number.isNaN(s)||!Number.isFinite(s))throw new TypeError("option maxAge is invalid");c+="; Max-Age="+Math.floor(s)}if(o.domain){if(!ne.test(o.domain))throw new TypeError("option domain is invalid");c+="; Domain="+o.domain}if(o.path){if(!ne.test(o.path))throw new TypeError("option path is invalid");c+="; Path="+o.path}if(o.expires){if(!gt(o.expires)||Number.isNaN(o.expires.valueOf()))throw new TypeError("option expires is invalid");c+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(c+="; HttpOnly"),o.secure&&(c+="; Secure"),o.priority)switch(typeof o.priority=="string"?o.priority.toLowerCase():o.priority){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c}function gt(u){return Object.prototype.toString.call(u)==="[object Date]"||u instanceof Date}function bt(u,y){try{return y(u)}catch{return u}}function kt(u){return u.includes("%")?decodeURIComponent(u):u}function Ct(u){return encodeURIComponent(u)}const xt={path:"/",watch:!0,decode:u=>We(decodeURIComponent(u)),encode:u=>encodeURIComponent(typeof u=="string"?u:JSON.stringify(u))};function wt(u,y){const h={...xt,...y},o=$t(h)||{},$=P(o[u]??h.default?.());{const g=typeof BroadcastChannel>"u"?null:new BroadcastChannel(`nuxt:cookies:${u}`);Fe()&&ze(()=>{g?.close()});const c=()=>{Vt(u,$.value,h),g?.postMessage(Ge($.value))};let s=!1;g&&(g.onmessage=i=>{s=!0,$.value=i.data,He(()=>{s=!1})}),h.watch?xe($,()=>{s||c()},{deep:h.watch!=="shallow"}):c()}return $}function $t(u={}){return _t(document.cookie,u)}function St(u,y,h={}){return y==null?Ce(u,y,{...h,maxAge:-1}):Ce(u,y,h)}function Vt(u,y,h={}){document.cookie=St(u,y,h)}const Tt=d("div",{"x-divider":""},null,-1),Ie=ae({__name:"ServerRouteListItem",props:{item:{},index:{default:0}},setup(u){const y=P(!0),h=we();return(o,$)=>{const g=ce,c=Te,s=Ie;return t(),v("div",null,[d("button",{flex:"~ gap-2","w-full":"","items-start":"","items-center":"","hover-bg-active":"",px2:"",py1:"",class:j([{"bg-active":e(h)===o.item.filepath}]),style:Je({paddingLeft:`calc(0.5rem + ${o.index*1.5}em)`}),onClick:$[0]||($[0]=i=>{y.value=!e(y),h.value=o.item.filepath})},[d("div",{class:j({"w-12":!o.item.routes}),"flex-none":"","text-left":""},[o.item.type==="collection"?(t(),k(g,{key:0,icon:"carbon:chevron-right","mb0.5":"","transform-rotate":e(y)?90:0,transition:""},null,8,["transform-rotate"])):(t(),k(c,{key:1,class:j(("getRequestMethodClass"in o?o.getRequestMethodClass:e(se))(o.item.method||"*")),textContent:E((o.item.method||"*").toUpperCase())},null,8,["class","textContent"]))],2),d("span",{class:j({"flex items-center":o.item.routes}),"text-sm":"","font-mono":""},[o.item.type==="collection"?(t(),k(g,{key:0,title:`${o.item.routes?.length} routes`,icon:"carbon:folder",mr1:""},null,8,["title"])):U("",!0),H(" "+E(o.item.route),1)],2)],6),Tt,e(y)?ee(o.$slots,"default",{key:0},()=>[(t(!0),v(N,null,A(o.item.routes,i=>(t(),k(s,{key:i.filepath,item:i,index:o.index+1},null,8,["item","index"]))),128))]):U("",!0)])}}}),Rt={p4:"",flex:"~ col gap-4"},Ut={key:1,ml2:"",flex:""},Nt=["value"],It={key:0,flex:"","gap-4":""},Dt=d("div",{"flex-auto":""},null,-1),De=ae({__name:"ServerRouteInputs",props:{modelValue:{},keys:{default:()=>[]},default:{default:()=>({})},disabled:{type:Boolean,default:!1}},setup(u,{emit:y}){const h=u,o=Ke(h,"modelValue",y,{passive:!0}),$=V(()=>[...h.keys,"active","key","value","type"]),g=V(()=>{const i={};for(const r of $.value)i[r]=h.default[r]||"";return i}),c=["string","number","boolean","file","date","time","datetime-local"];function s(i,r){const I=r.target;if(I.files&&I.files[0]){const M=I.files[0],z=new FileReader;z.readAsDataURL(M),z.onload=()=>{o.value[i].value=z.result}}}return xe(()=>o,i=>{i.value.forEach(r=>{if(r.type==="number"&&typeof r.value!="number"){const I=Number.parseFloat(r.value);r.value=Number.isNaN(I)?0:I}else r.type==="boolean"&&typeof r.value!="boolean"?r.value=!0:r.type==="file"&&typeof r.value!="object"?r.value="":r.type==="date"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}$/)?r.value=new Date().toISOString().slice(0,10):r.type==="time"&&typeof r.value=="string"&&!r.value.match(/^\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(11,16):r.type==="datetime-local"&&typeof r.value=="string"&&!r.value.match(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/)?r.value=new Date().toISOString().slice(0,16):r.type==="string"&&(r.value=r.value.toString())})},{deep:!0,immediate:!0,flush:"sync"}),(i,r)=>{const I=pt,M=$e,z=Re,J=ce,C=fe;return t(),v("div",Rt,[(t(!0),v(N,null,A(e(o),(l,S)=>(t(),v("div",{key:S,flex:"~ gap-2","justify-around":""},[ee(i.$slots,"input",{item:l}),(t(!0),v(N,null,A(e($),b=>(t(),v(N,{key:b},[l.type!==null&&b==="active"?(t(),k(I,{key:0,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,n:"sm primary",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])):U("",!0),l.type!==null&&b==="key"?(t(),k(M,{key:1,modelValue:l[b],"onUpdate:modelValue":_=>l[b]=_,placeholder:b,"flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op50":"")},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled","class"])):b==="value"?(t(),v(N,{key:2},[l.type==="file"?(t(),k(M,{key:0,type:"file",disabled:i.disabled,class:j(i.disabled?"op75":""),onChange:_=>s(S,_)},null,8,["disabled","class","onChange"])):l.type==="boolean"?(t(),v("div",Ut,[m(I,{modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,placeholder:"Value",n:"green lg",disabled:i.disabled},null,8,["modelValue","onUpdate:modelValue","disabled"])])):(t(),k(M,{key:2,modelValue:l.value,"onUpdate:modelValue":_=>l.value=_,type:l.type,placeholder:"Value","flex-1":"","font-mono":"",n:"sm primary",disabled:i.disabled,class:j(i.disabled?"op75":"")},null,8,["modelValue","onUpdate:modelValue","type","disabled","class"]))],64)):b==="type"?(t(),k(z,{key:3,modelValue:l.type,"onUpdate:modelValue":_=>l.type=_,n:"sm green",class:j(i.disabled?"op75":""),disabled:i.disabled},{default:x(()=>[(t(),v(N,null,A(c,_=>d("option",{key:_,value:_},E(_),9,Nt)),64))]),_:2},1032,["modelValue","onUpdate:modelValue","class","disabled"])):U("",!0)],64))),128)),ee(i.$slots,"input-actions",{},()=>[m(C,{n:"red",disabled:i.disabled,class:j(i.disabled?"op0!":""),onClick:b=>e(o).splice(S,1)},{default:x(()=>[m(J,{icon:"carbon:trash-can"})]),_:2},1032,["disabled","class","onClick"])])]))),128)),i.disabled?U("",!0):(t(),v("div",It,[ee(i.$slots,"actions",{params:e(o)},()=>[m(C,{icon:"carbon-add",n:"sm primary",my1:"","px-3":"",onClick:r[0]||(r[0]=l=>e(o).push({...e(g)}))},{default:x(()=>[H(" Add ")]),_:1}),Dt,e(o).length?(t(),k(C,{key:0,icon:"carbon-trash-can",n:"sm red",my1:"","px-3":"",onClick:r[1]||(r[1]=l=>o.value=[])},{default:x(()=>[H(" Remove All ")]),_:1})):U("",!0)])])),ee(i.$slots,"default")])}}}),Et={"h-full":"","w-full":"",flex:"~ col"},jt={flex:"~ col gap-2","flex-none":"",p4:"","n-navbar-glass":""},Ot={flex:"~ gap2 items-center"},Lt={relative:"","w-full":""},Pt={absolute:"","right-2":"","top-1.5":"",flex:"~ gap-1"},qt={flex:"~ gap2 wrap","w-full":"","items-center":"",px4:"",pb2:"","text-center":"","text-sm":"",border:"b base"},Bt=d("div",{"flex-auto":""},null,-1),At=d("div",{"text-xs":"",op50:""}," Send from ",-1),Mt=d("option",{value:"app"}," App ",-1),Ft=d("option",{value:"devtools"}," DevTools ",-1),zt={key:0,border:"b base","items-center":"",px4:"",py2:"",grid:"~ cols-[max-content_1fr] gap-2"},Ht={"text-right":"","font-mono":""},Wt={key:1,border:"b base",p4:"",flex:"~ col gap-4","font-mono":""},Gt={flex:"~ gap-4"},Jt={flex:"~ gap2","mb--2":"","items-center":"",op50:""},Kt=d("div",{"w-5":"","x-divider":""},null,-1),Qt=d("div",{"flex-none":""}," Default Inputs ",-1),Yt=d("div",{"x-divider":""},null,-1),Xt={key:2},Zt={key:3,border:"b base",relative:"","n-code-block":""},eo={flex:"~ wrap","w-full":""},to=["onClick"],oo=d("div",{border:"b base","flex-auto":""},null,-1),no={border:"b base",flex:"~ gap2","items-center":"",px4:"",py2:""},so=d("div",null,"Response",-1),lo={key:1,"text-xs":"",op50:""},ao=d("div",{"flex-auto":""},null,-1),ro=d("div",{op50:""}," Request finished in ",-1),io={key:0,"flex-auto":"","overflow-auto":""},uo={border:"~ base","h-full":"","w-full":"",rounded:""},po=["data"],co={key:2,"flex-auto":"","overflow-auto":"",p4:""},fo={border:"~ base",rounded:""},mo=["src"],vo={key:1,controls:"",rounded:""},ho=["src"],yo=ae({__name:"ServerRouteDetails",props:{route:{}},emits:["open-default-input"],setup(u,{emit:y}){const h=u,[o,$]=Qe(),g=Ye(),c=Xe(),s=pe({contentType:"text/plain",data:"",statusCode:200,error:void 0,fetchTime:0}),i=V(()=>s.contentType.includes("application/json")?"json":s.contentType.includes("text/html")?"html":s.contentType.includes("text/css")?"css":s.contentType.includes("text/javascript")?"javascript":s.contentType.includes("image")||s.contentType.includes("video")?"media":s.contentType.includes("text/xml")||s.contentType.includes("application/xml")?"xml":s.contentType.includes("application/pdf")?"pdf":"text"),r=V(()=>{if(i.value==="json")return JSON.stringify(s.data,null,2);if(i.value==="media"||i.value==="pdf"){const n=new Blob([s.data],{type:s.contentType});return URL.createObjectURL(n)}return s.data}),I=P(!1),M=P(!1),z=Ze(),J=V(()=>h.route.route?.split(/((?:\*\*)?:[\w_]+)/g)),C=V(()=>J.value?.filter(n=>n.startsWith(":")||n.startsWith("**:"))||[]),l=P(h.route.method||"GET"),S=P({}),b=pe({query:[{active:!0,key:"",value:"",type:"string"}],body:[{active:!0,key:"",value:"",type:"string"}],headers:[{active:!0,key:"Content-Type",value:"application/json",type:"string"}]}),_=P({}),{inputDefaults:T,sendFrom:q}=Ue("serverRoutes"),O=V(()=>c?.value?.app?.$fetch?q.value:"devtools"),B=["GET","POST","PUT","PATCH","DELETE","HEAD"],re=["PATCH","POST","PUT","DELETE"],te=V(()=>re.includes(l.value.toUpperCase())),L=P(C.value.length?"params":"query"),Z=["input","json"],w=P(Z[0]),K=V({get:()=>b[L.value],set:n=>{b[L.value]=n}}),me=V(()=>({...G(T.value.query),...G(b.query)})),ve=V(()=>({...G(T.value.headers),...G(b.headers)})),ie=V(()=>te.value?w.value==="json"?{...G(T.value.body),..._.value}:{...G(T.value.body),...G(b.body)}:void 0),Ee=V(()=>{let n=window?.location.origin;return n.charAt(n.length-1)==="/"&&(n=n.slice(0,-1)),n}),oe=V(()=>{let n=new URLSearchParams(me.value).toString();n&&(n=`?${n}`);const p=(J.value?.map(D=>(D.startsWith(":")||D.startsWith("**:"))&&S.value[D]||D).join("")||"")+n;let f=g.value?.app.baseURL||"";return(f==="./"||f===".")&&(f=""),f.endsWith("/")&&(f=f.slice(0,-1)),f+p}),he=V(()=>Ee.value+oe.value);function G(n){const p=Object.fromEntries(n.filter(({active:f,key:D,value:R})=>f&&D&&R!==void 0).map(({key:f,value:D})=>[f,D]));return Object.entries(p).length?p:void 0}async function ye(){M.value=!0,I.value=!0;const n=Date.now(),p=O.value==="app"?c.value.app.$fetch:$fetch;nt("server-routes:fetch",{method:l.value,sendFrom:O.value});try{s.data=await p(he.value,{method:l.value.toUpperCase(),headers:ve.value,query:me.value,body:ie.value,onResponse({response:f}){s.contentType=(f.headers.get("content-type")||"").toString().toLowerCase().trim(),s.statusCode=f.status,s.error=void 0},onResponseError(f){s.error=f.response._data,s.data=f.response._data}})}catch{}I.value=!1,s.fetchTime=Date.now()-n}const _e=V(()=>{const n=[],p=[],f=Object.entries(ve.value).filter(([R,F])=>R&&F&&!(R==="Content-Type"&&F==="application/json")).map(([R,F])=>` '${R}': '${F}'`).join(`,
|
|
2
|
+
`);l.value.toUpperCase()!=="GET"&&p.push(`method: '${l.value.toUpperCase()}'`),f&&p.push(`headers: {
|
|
3
|
+
${f}
|
|
4
|
+
}`),ie.value&&p.push(`body: ${JSON.stringify(ie.value,null,2)}`);const D=p.length?`, {
|
|
5
|
+
${p.join(`,
|
|
6
|
+
`).split(`
|
|
7
|
+
`).map(R=>` ${R}`).join(`
|
|
8
|
+
`)}
|
|
9
|
+
}`:"";return n.push({name:"useFetch",lang:"javascript",docs:ke.nuxt.useFetch,code:`const { data, pending, error, refresh } = useFetch('${oe.value}'${D})`}),n.push({name:"$fetch",lang:"javascript",docs:ke.nuxt.$fetch,code:`await $fetch('${oe.value}'${D})`}),n}),Q=P(Oe()),W=pe({key:"",value:""}),je=V(()=>{const n=[];return C.value.length&&n.push({name:"Params",slug:"params",length:C.value.length}),n.push({name:"Query",slug:"query",length:b.query.length}),te.value&&n.push({name:"Body",slug:"body",length:b.body.length}),n.push({name:"Headers",slug:"headers",length:b.headers.length}),n.push({name:"Cookies",slug:"cookies",length:Q.value.length}),n.push({name:"Snippets",slug:"snippet"}),n});function Oe(){return document.cookie.split("; ").map(n=>{const[p,f]=n.split("=");return{key:p,value:f}}).filter(n=>n.key)}function ue(n,p){if(!n)return;const f=Q.value.find(R=>R.key===n),D=wt(n);f!==void 0?p===void 0&&(Q.value=Q.value.filter(R=>R.key!==n)):(Q.value.push({key:n,value:p}),W.key="",W.value=""),D.value=p}et(()=>{w.value==="json"&&typeof _.value=="string"&&(_.value=JSON.parse(_.value))});const Le=tt();return(n,p)=>{const f=fe,D=Re,R=$e,F=ce,ge=De,Pe=ct,qe=Ve,Be=st,de=Te,Ae=ft,Me=mt,be=Se("tooltip");return t(),v("div",Et,[d("div",jt,[d("div",Ot,[n.route.method?(t(),k(f,{key:0,class:j(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(l))]),"pointer-events-none":"","font-mono":"",tabindex:"-1"},{default:x(()=>[H(E(e(l).toUpperCase()),1)]),_:1},8,["class"])):(t(),k(D,{key:1,modelValue:e(l),"onUpdate:modelValue":p[0]||(p[0]=a=>X(l)?l.value=a:null),class:j(["n-badge-base n-sm",("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(e(l))])},{default:x(()=>[(t(),v(N,null,A(B,a=>d("option",{key:a,class:j(("getRequestMethodClass"in n?n.getRequestMethodClass:e(se))(a))},E(a.toUpperCase()),3)),64))]),_:1},8,["modelValue","class"])),d("div",Lt,[m(R,{"model-value":e(oe),readonly:"","flex-auto":"","font-mono":"",p:"x5 y2",n:"sm"},null,8,["model-value"]),d("div",Pt,[le(m(f,{title:"Copy URL",n:"xs blue",icon:"carbon:copy",border:!1,onClick:p[1]||(p[1]=a=>e(Le)(e(he),"server-route-url"))},null,512),[[be,"Copy URL"]]),le(m(f,{title:"Open in Editor",icon:"carbon-launch",n:"xs blue",border:!1,onClick:p[2]||(p[2]=a=>e(z)(n.route.filepath))},null,512),[[be,"Open in Editor"]])])]),m(f,{"h-full":"",n:"primary solid",onClick:ye},{default:x(()=>[m(F,{icon:"carbon:send"})]),_:1})])]),d("div",qt,[(t(!0),v(N,null,A(e(je),a=>(t(),k(f,{key:a.slug,class:j(e(L)===a.slug?"text-primary n-primary":"border-transparent shadow-none"),onClick:Y=>L.value=a.slug},{default:x(()=>[m(F,{icon:("ServerRouteTabIcons"in n?n.ServerRouteTabIcons:e(Ne))[a.slug]},null,8,["icon"]),H(" "+E(a.name)+" "+E(a?.length?`(${a.length})`:"")+" ",1),d("span",null,E(e(T)[a.slug]?.length?`(${e(T)[a.slug].length})`:""),1)]),_:2},1032,["class","onClick"]))),128)),Bt,At,m(D,{modelValue:e(O),"onUpdate:modelValue":p[3]||(p[3]=a=>X(O)?O.value=a:null),class:"n-xs",disabled:!e(c)?.app?.$fetch},{default:x(()=>[Mt,Ft]),_:1},8,["modelValue","disabled"])]),e(L)==="params"?(t(),v("div",zt,[(t(!0),v(N,null,A(e(C),a=>(t(),v(N,{key:a},[d("div",Ht,E(a),1),m(R,{modelValue:e(S)[a],"onUpdate:modelValue":Y=>e(S)[a]=Y,placeholder:a,"flex-1":""},null,8,["modelValue","onUpdate:modelValue","placeholder"])],64))),128))])):U("",!0),e(L)==="cookies"?(t(),v("div",Wt,[(t(!0),v(N,null,A(e(Q),a=>(t(),v("div",{key:a.key,flex:"~ gap-4 items-center"},[m(R,{placeholder:"Key...","model-value":a.key,disabled:"","op-70":""},null,8,["model-value"]),m(R,{placeholder:"Value...","model-value":a.value,"flex-1":"",n:"primary",onInput:Y=>ue(a.key,Y.target?.value)},null,8,["model-value","onInput"]),m(f,{title:"Delete",n:"red",onClick:Y=>ue(a.key,void 0)},{default:x(()=>[m(F,{icon:"i-carbon-trash-can"})]),_:2},1032,["onClick"])]))),128)),d("div",Gt,[m(R,{modelValue:e(W).key,"onUpdate:modelValue":p[4]||(p[4]=a=>e(W).key=a),placeholder:"Key",n:"primary","flex-1":""},null,8,["modelValue"]),m(R,{modelValue:e(W).value,"onUpdate:modelValue":p[5]||(p[5]=a=>e(W).value=a),placeholder:"Value",n:"primary","flex-1":""},null,8,["modelValue"]),m(f,{title:"Add",n:"primary",onClick:p[6]||(p[6]=a=>ue(e(W).key,e(W).value))},{default:x(()=>[m(F,{icon:"i-carbon-save"})]),_:1})])])):U("",!0),m(e(o),null,{default:x(()=>[m(ge,{modelValue:e(K),"onUpdate:modelValue":p[9]||(p[9]=a=>X(K)?K.value=a:null),default:{active:!0,type:"string"},"max-h-xs":"","of-auto":""},{default:x(()=>[e(T)[e(L)]?.length?(t(),v(N,{key:0},[d("div",Jt,[Kt,Qt,m(f,{icon:"i-carbon-edit",border:!1,onClick:p[7]||(p[7]=a=>y("open-default-input"))}),Yt]),m(ge,{modelValue:e(T)[e(L)],"onUpdate:modelValue":p[8]||(p[8]=a=>e(T)[e(L)]=a),disabled:"",p0:""},null,8,["modelValue"])],64)):U("",!0)]),_:1},8,["modelValue"])]),_:1}),e(L)==="snippet"?(t(),v("div",Xt,[e(_e).length?(t(),k(Pe,{key:0,"code-snippets":e(_e)},null,8,["code-snippets"])):U("",!0)])):e(K)?(t(),v("div",Zt,[e(L)==="body"?(t(),v(N,{key:0},[d("div",eo,[(t(),v(N,null,A(Z,a=>d("button",{key:a,px4:"",py2:"",border:"r base",hover:"bg-active",class:j({"border-b":a!==e(w)}),onClick:Y=>w.value=a},[d("div",{class:j({op30:a!==e(w)}),"font-mono":""},E(a),3)],10,to)),64)),oo]),e(w)==="input"?(t(),k(e($),{key:0})):e(w)==="json"?(t(),k(e(vt),ot({key:1,modelValue:e(_),"onUpdate:modelValue":p[10]||(p[10]=a=>X(_)?_.value=a:null),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):U("",!0)],64)):(t(),k(e($),{key:1}))])):U("",!0),e(M)?e(I)?(t(),k(Be,{key:5,"z-10":"","flex-auto":"","backdrop-blur":""},{default:x(()=>[H(" Fetching... ")]),_:1})):(t(),v(N,{key:6},[d("div",no,[so,e(s).error?(t(),k(de,{key:0,n:"red"},{default:x(()=>[H(" Error ")]),_:1})):U("",!0),m(de,{n:e(s).error?"orange":"green",textContent:E(e(s).statusCode)},null,8,["n","textContent"]),e(s).contentType?(t(),v("code",lo,E(e(s).contentType),1)):U("",!0),e(s).contentType==="application/json"?(t(),k(Ae,{key:2,getter:()=>({input:e(r)})},null,8,["getter"])):U("",!0),ao,ro,m(de,{n:"green"},{default:x(()=>[H(E(e(s).fetchTime)+" ms ",1)]),_:1})]),e(i)==="pdf"?(t(),v("div",io,[d("div",uo,[d("object",{data:e(r),type:"application/pdf","flex-auto":"",width:"100%",height:"100%",rounded:""},null,8,po)])])):e(i)!=="media"?(t(),k(Me,{key:1,"flex-auto":"","overflow-auto":"","py-2":"",code:e(r),lang:e(i)},null,8,["code","lang"])):(t(),v("div",co,[d("div",fo,[e(s).contentType.includes("image")?(t(),v("img",{key:0,rounded:"",src:e(r)},null,8,mo)):(t(),v("video",vo,[d("source",{src:e(r),type:"video/mp4"},null,8,ho)]))])]))],64)):(t(),k(qe,{key:4},{default:x(()=>[m(f,{n:"primary",onClick:ye},{default:x(()=>[m(F,{icon:"carbon:send"}),H(" Send request ")]),_:1})]),_:1}))])}}}),_o={flex:"~ gap1","text-sm":""},go={key:0,op50:""},bo={op50:""},ko=d("span",{op75:""},"Select a route to start",-1),Co=d("div",{p4:"",border:"b base"},[d("span",{"text-lg":""},"Default Inputs"),d("br"),d("span",{"text-white":"",op50:""},"Merged as default for every request in DevTools")],-1),Lo=ae({__name:"server-routes",setup(u){const y=P(!1),h=lt(),o=we(),{selectedRoute:$,view:g,inputDefaults:c}=Ue("serverRoutes"),s=V(()=>{!o.value&&$.value&&(o.value=$.value.filepath);const C=h.value?.find(l=>l.filepath===o.value);return o.value!==$.value?.filepath&&C&&($.value=C),C}),i=P(""),r=V(()=>new at(h.value||[],{keys:["method","route"],shouldSort:!0})),I=V(()=>h.value?i.value?r.value.search(i.value).map(l=>l.item):h.value:[]),M=V(()=>{const C=[],l=(S,b)=>{S.routes=S.routes||[],S.routes.push(b)};return I.value.forEach(S=>{const b=S.filepath.split("/"),_=b.slice(b.indexOf("server")+1);_.length>0&&_[_.length-1].includes(".")&&_.pop();let T=null;if(_.forEach(q=>{const O=T?T.routes?.find(B=>B.route===q):C.find(B=>B.route===q);if(O)T=O;else{const B={route:q,filepath:q.replace(/\W/g,"-").toLowerCase(),type:"collection",routes:[]};T?l(T,B):C.push(B),T=B}}),S.type==="runtime"){const q=C.find(O=>O.route==="runtime");if(q)l(q,S);else{const O={route:"runtime",filepath:"runtime",type:"collection",routes:[S]};C.push(O)}}else T?l(T,S):C.push(S)}),C});function z(){g.value=g.value==="tree"?"list":"tree"}function J(C){return C.charAt(0).toUpperCase()+C.slice(1)}return(C,l)=>{const S=fe,b=dt,_=Ie,T=yo,q=ut,O=Ve,B=rt,re=De,te=ht,L=yt,Z=Se("tooltip");return t(),v(N,null,[m(B,{"storage-key":"tab-server-routes"},{left:x(()=>[m(b,{search:e(i),"onUpdate:search":l[1]||(l[1]=w=>X(i)?i.value=w:null),pb2:""},{actions:x(()=>[le(m(S,{"text-lg":"",icon:e(g)==="list"?"i-carbon-list":"i-carbon-tree-view-alt",title:"Toggle view",border:!1,onClick:z},null,8,["icon"]),[[Z,"Toggle View"]]),le(m(S,{"text-lg":"",icon:"i-carbon-cics-sit-overrides",title:"Default Inputs",border:!1,onClick:l[0]||(l[0]=w=>y.value=!e(y))},null,512),[[Z,"Default Inputs"]])]),default:x(()=>[d("div",_o,[e(i)?(t(),v("span",go,E(e(I).length)+" matched · ",1)):U("",!0),d("span",bo,E(e(h)?.length)+" routes in total",1)])]),_:1},8,["search"]),(t(!0),v(N,null,A(e(g)==="tree"?e(M):e(I),w=>(t(),k(_,{key:w.filepath,item:w},null,8,["item"]))),128))]),right:x(()=>[(t(),k(it,{max:10},[e(s)?(t(),k(T,{key:e(s).filepath,route:e(s),onOpenDefaultInput:l[2]||(l[2]=w=>y.value=!0)},null,8,["route"])):U("",!0)],1024)),e(s)?U("",!0):(t(),k(O,{key:0},{default:x(()=>[m(q,{px6:"",py2:""},{default:x(()=>[ko]),_:1})]),_:1}))]),_:1}),m(L,{modelValue:e(y),"onUpdate:modelValue":l[3]||(l[3]=w=>X(y)?y.value=w:null),"auto-close":"","max-w-xl":"","min-w-xl":"",onClose:l[4]||(l[4]=w=>y.value=!1)},{default:x(()=>[d("div",null,[Co,(t(!0),v(N,null,A(Object.keys(e(c)),w=>(t(),k(te,{key:w,text:`${J(w)} ${e(c)[w].length?`(${e(c)[w].length})`:""}`,padding:!1,icon:("ServerRouteTabIcons"in C?C.ServerRouteTabIcons:e(Ne))[w]},{default:x(()=>[m(re,{modelValue:e(c)[w],"onUpdate:modelValue":K=>e(c)[w]=K,py0:"",default:{active:!0,type:"string"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["text","icon"]))),128))])]),_:1},8,["modelValue"])],64)}}});export{Lo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as Q}from"./NIconTitle.vue.eb974cf8.js";import{_ as X}from"./NSwitch.vue.1b79756d.js";import{d as Y,as as Z,bJ as ee,aB as le,ax as L,m,i as n,k as e,F as v,n as N,f as t,j as a,K as oe,_ as ne,am as te,o as r,h as j,t as y,G as A,p as P,v as U,l as c,C as D,B as ae,bD as se,bK as ie}from"./entry.12ac938b.js";import{_ as ue}from"./NSelect.vue.08628a3f.js";import{_ as de}from"./NCheckbox.vue.5a0973a7.js";import{_ as re}from"./NLink.vue.31c2cbc4.js";const ce={px8:"",py6:""},pe={grid:"~ md:cols-2 gap-x-10 gap-y-3","max-w-300":""},me={flex:"~ col gap-2"},_e=e("h3",{"text-lg":""}," Tabs ",-1),fe={flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":""},ve={capitalize:"",op75:""},ge=e("div",{"mx--1":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),he=e("div",{"flex-auto":""},null,-1),xe={flex:"~ col gap-2"},be=e("h3",{"text-lg":""}," Appearance ",-1),ye=e("div",{"i-carbon-sun":"","dark:i-carbon-moon":"","translate-y--1px":""},null,-1),ke=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Ve=e("p",null,"UI Scale",-1),Ce=["value"],we=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Te=e("span",null," Expand Sidebar ",-1),Se=e("span",null," Scrollable Sidebar ",-1),Ne=e("h3",{mt2:"","text-lg":""}," Features ",-1),Ue=e("span",null,"Close DevTools when clicking outside",-1),Oe=e("span",null,"Show help buttons",-1),$e=e("span",null,"Always show the floating panel",-1),Ie=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),Be=e("p",null,"Minimize floating panel on inactive",-1),De=["value"],ze=e("h3",{mt2:"","text-lg":""}," Feedback ",-1),Ee=e("span",null,"Send anonymous statistics, help us improving DevTools",-1),Le=e("div",{"mx--2":"",my1:"","h-1px":"",border:"b base",op75:""},null,-1),je={flex:"~ gap-2"},Ae=e("div",{"i-carbon-data-enrichment":""},null,-1),Pe=e("div",{"i-carbon-debug":""},null,-1),Fe=e("h3",{mt2:"","text-lg":""}," Debug ",-1),Me={flex:"~ gap-2"},Re=e("div",{"i-carbon-breaking-change":""},null,-1),Xe=Y({__name:"settings",setup(He){const{interactionCloseOnOutsideClick:k,showPanel:O,showHelpButtons:$,scale:I,hiddenTabs:g,pinnedTabs:u,hiddenTabCategories:h,minimizePanelInactive:V,sidebarExpanded:C,sidebarScrollable:B}=ae(),x=Z(),F=[["Tiny",12/15],["Small",14/15],["Normal",1],["Large",16/15],["Huge",18/15]],M=[["Always",0],["1s",1e3],["2s",2e3],["5s",5e3],["10s",1e4],["Never",-1]],R=ee(le());function H(s,o){o?g.value=g.value.filter(d=>d!==s):g.value.push(s)}function K(s,o){o?h.value=h.value.filter(d=>d!==s):h.value.push(s)}function G(s){u.value.includes(s)?u.value=u.value.filter(o=>o!==s):u.value.push(s)}function z(s,o){const d=u.value.indexOf(s);if(d===-1)return;const _=d+o;if(_<0||_>=u.value.length)return;const b=[...u.value];b.splice(d,1),b.splice(_,0,s),u.value=b}async function J(){confirm("Are you sure you to reset all local settings & state? The app will reload.")&&(Object.keys(localStorage).forEach(s=>{s.startsWith("nuxt-devtools-")&&localStorage.removeItem(s)}),await oe.clearOptions(),x.value?.app?.reload?.(),window.location.reload())}return L(()=>{x.value&&(x.value.app.frameState.value.closeOnOutsideClick=k.value)}),L(()=>{x.value&&(x.value.app.frameState.value.minimizePanelInactive=V.value)}),(s,o)=>{const d=Q,_=X,b=se,p=ne,w=te,W=ie,E=ue,f=de,q=re;return r(),m("div",ce,[n(d,{class:"mb-5 text-xl op75",icon:"i-carbon-settings-adjust",text:"DevTools Settings"}),e("div",pe,[e("div",me,[_e,(r(!0),m(v,null,N(t(R),([l,T])=>(r(),m(v,{key:l},[T.length?(r(),j(w,{key:0,p3:"",flex:"~ col gap-1",class:A(t(h).includes(l)?"op50 grayscale":"")},{default:a(()=>[n(_,{flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-lime":"","model-value":!t(h).includes(l),"onUpdate:modelValue":i=>K(l,i)},{default:a(()=>[e("div",fe,[e("span",ve,y(l),1)])]),_:2},1032,["model-value","onUpdate:modelValue"]),ge,(r(!0),m(v,null,N(T,i=>(r(),j(_,{key:i.name,flex:"~ row-reverse",py1:"",pl2:"",pr1:"","n-primary":"","model-value":!t(g).includes(i.name),"onUpdate:modelValue":S=>H(i.name,S)},{default:a(()=>[e("div",{flex:"~ gap-2","flex-auto":"","items-center":"","justify-start":"","pr-4":"",class:A(t(g).includes(i.name)?"op25":"")},[n(b,{"text-xl":"",icon:i.icon,title:i.title},null,8,["icon","title"]),e("span",null,y(i.title),1),he,t(u).includes(i.name)?(r(),m(v,{key:0},[n(p,{icon:"i-carbon-caret-up",disabled:t(u).indexOf(i.name)===0,border:!1,onClick:S=>z(i.name,-1)},null,8,["disabled","onClick"]),n(p,{icon:"i-carbon-caret-down",disabled:t(u).indexOf(i.name)===t(u).length-1,border:!1,onClick:S=>z(i.name,1)},null,8,["disabled","onClick"])],64)):P("",!0),n(p,{icon:t(u).includes(i.name)?" i-carbon-pin-filled rotate--45":" i-carbon-pin op50",border:!1,onClick:S=>G(i.name)},null,8,["icon","onClick"])],2)]),_:2},1032,["model-value","onUpdate:modelValue"]))),128))]),_:2},1032,["class"])):P("",!0)],64))),128))]),e("div",xe,[be,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[e("div",null,[n(W,null,{default:a(({toggle:l,isDark:T})=>[n(p,{n:"primary",onClick:l},{default:a(()=>[ye,U(" "+y(T.value?"Dark":"Light"),1)]),_:2},1032,["onClick"])]),_:1})]),ke,Ve,n(E,{modelValue:t(I),"onUpdate:modelValue":o[0]||(o[0]=l=>c(I)?I.value=l:null),n:"primary"},{default:a(()=>[(r(),m(v,null,N(F,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,Ce)),64))]),_:1},8,["modelValue"]),we,n(f,{modelValue:t(C),"onUpdate:modelValue":o[1]||(o[1]=l=>c(C)?C.value=l:null),"n-primary":""},{default:a(()=>[Te]),_:1},8,["modelValue"]),n(f,{modelValue:t(B),"onUpdate:modelValue":o[2]||(o[2]=l=>c(B)?B.value=l:null),disabled:t(C),"n-primary":""},{default:a(()=>[Se]),_:1},8,["modelValue","disabled"])]),_:1}),Ne,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(k),"onUpdate:modelValue":o[3]||(o[3]=l=>c(k)?k.value=l:null),"n-primary":""},{default:a(()=>[Ue]),_:1},8,["modelValue"]),n(f,{modelValue:t($),"onUpdate:modelValue":o[4]||(o[4]=l=>c($)?$.value=l:null),"n-primary":""},{default:a(()=>[Oe]),_:1},8,["modelValue"]),n(f,{modelValue:t(O),"onUpdate:modelValue":o[5]||(o[5]=l=>c(O)?O.value=l:null),"n-primary":""},{default:a(()=>[$e]),_:1},8,["modelValue"]),Ie,Be,n(E,{modelValue:t(V),"onUpdate:modelValue":o[6]||(o[6]=l=>c(V)?V.value=l:null),modelModifiers:{number:!0},"n-primary":""},{default:a(()=>[(r(),m(v,null,N(M,l=>e("option",{key:l[0],value:l[1]},y(l[0]),9,De)),64))]),_:1},8,["modelValue"])]),_:1}),ze,n(w,{p4:"",flex:"~ col gap-2"},{default:a(()=>[n(f,{modelValue:t(D),"onUpdate:modelValue":o[7]||(o[7]=l=>c(D)?D.value=l:null),"n-primary":""},{default:a(()=>[Ee,n(q,{href:"https://github.com/nuxt/devtools#anonymous-usage-analytics",target:"_blank",ml1:"",op50:"",textContent:"Learn more"})]),_:1},8,["modelValue"]),Le,e("div",je,[n(p,{n:"blue",to:"https://github.com/nuxt/devtools/discussions/29",target:"_blank"},{default:a(()=>[Ae,U(" Ideas & Suggestions ")]),_:1}),n(p,{n:"orange",to:"https://github.com/nuxt/devtools/issues",target:"_blank"},{default:a(()=>[Pe,U(" Bug Reports ")]),_:1})])]),_:1}),Fe,e("div",Me,[n(p,{n:"orange",onClick:J},{default:a(()=>[Re,U(" Reset Local Settings & State ")]),_:1})])])])])}}});export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{as as m,b8 as n,a as s,K as o}from"./entry.12ac938b.js";function u(){const p=m(),t=n("getComponents",()=>o.getComponents()),l=s(()=>Object.entries(p.value?.nuxt?.vueApp._context.components||{}).map(([e])=>({pascalName:e,global:!0})).filter(e=>!/^Lazy[A-Z]/.test(e.pascalName)).filter(e=>!(t.value||[]).find(a=>a.pascalName===e.pascalName)));return s(()=>[...l.value,...t.value||[]].sort((e,a)=>e.pascalName.localeCompare(a.pascalName)))}function r(){return n("getComponentsRelationships",()=>o.getComponentsRelationships())}export{r as a,u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as F}from"./NBadge.83bd8b90.js";import{_ as L}from"./NCodeBlock.vue.2de294a4.js";import{_ as q}from"./NCheckbox.vue.5a0973a7.js";import{_ as A}from"./NTip.vue.1a1ff991.js";import{d as E,O as G,b9 as O,r as V,ba as Q,M as W,Q as X,o as m,m as g,a8 as z,f as a,t as $,p as w,F as M,i as s,h as H,j as u,k as h,l as B,v as p,U as J,_ as K,X as Y,bb as Z,aa as ee,a as te,ap as ae,aq as ne,bc as se,b8 as oe}from"./entry.12ac938b.js";const le={key:0},re={p4:"",flex:"~ col gap-1"},ue={class:"text-lg font-medium leading-6"},ie=h("p",{op50:""}," The following command will be executed in your terminal: ",-1),ce={flex:"~ gap-3",mt2:"","justify-end":""},ge=E({__name:"NpmVersionCheck",props:{packageName:{},options:{},showVersion:{type:Boolean,default:!0}},setup(l){const t=l,e=G(),{info:n,update:i,state:y,processId:k,restart:d}=O(t.packageName,t.options),f=V(!0),_=V(!0),D=Q(),b=W(),R=X();async function N(){const r=await i(async o=>b.start(o));J("npm:update",{packageName:t.packageName,oldVersion:n.value?.current}),r&&_.value&&D.value.push({id:r,message:`${t.packageName} has been updated. Do you want to restart the Nuxt server now?`}),r&&f.value&&(R.value=r,e.push("/modules/terminals"))}return(r,o)=>{const C=F,S=L,x=q,T=A,P=K,I=Y;return m(),g(M,null,[z(r.$slots,"default",{id:a(k),info:a(n),update:N,state:a(y),restart:a(d)},()=>[a(n)&&r.showVersion?(m(),g("code",le,$(`v${a(n).current}`),1)):w("",!0),a(n)?.latest?(m(),g(M,{key:1},[a(n).needsUpdate?(m(),g("button",{key:0,onClick:o[0]||(o[0]=v=>N())},[s(C,{n:"green",title:"updates available",textContent:"updates available"})])):(m(),H(C,{key:1,n:"gray",title:"latest",textContent:"latest"}))],64)):w("",!0)]),s(a(b),null,{default:u(({resolve:v,args:j})=>[s(I,{"model-value":!0,onClose:c=>v(!1)},{default:u(()=>[h("div",re,[h("h3",ue," Update "+$(t.packageName)+"? ",1),ie,s(S,{code:j[0],lang:"bash",my3:"",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),s(x,{modelValue:a(f),"onUpdate:modelValue":o[1]||(o[1]=c=>B(f)?f.value=c:null),n:"primary"},{default:u(()=>[p(" Navigate to terminal ")]),_:1},8,["modelValue"]),s(x,{modelValue:a(_),"onUpdate:modelValue":o[2]||(o[2]=c=>B(_)?_.value=c:null),n:"primary"},{default:u(()=>[p(" Restart Nuxt server after update ")]),_:1},8,["modelValue"]),h("div",ce,[s(T,{n:"sm amber","flex-auto":"",icon:"i-carbon-data-backup"},{default:u(()=>[p(" Please make sure to backup your project first. ")]),_:1}),s(P,{onClick:c=>v(!1)},{default:u(()=>[p(" Cancel ")]),_:2},1032,["onClick"]),s(P,{n:"solid primary",onClick:c=>v(!0)},{default:u(()=>[p(" Update ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)}}}),U=["pages","meta","components","imports","nuxt-config-schema","@nuxt/devtools","@nuxt/telemetry"];function de(){return oe("getModulesList",async()=>(await $fetch("https://api.nuxt.com/modules?version=3")).modules.filter(t=>!U.includes(t.npm)&&t.compatibility.nuxt.includes("^3")))}function he(){return Z("installed-modules",()=>{const l=ee(),t=de();return te(()=>(l.value?._installedModules||[]).map(e=>{if(!e.entryPath)return;const n=e.entryPath&&ae(e.entryPath),i=e.meta?.name?e.meta?.name:e.entryPath?n?ne(e.entryPath):l.value?.rootDir?se(e.entryPath,l.value?.rootDir).path:void 0:void 0,y=l.value?.modules?.includes(i),k=t.value?.find(d=>d.npm===i)||t.value?.find(d=>d.name===i);return{name:i,isPackageModule:n,isUninstallable:y,info:k,...e}}).filter(e=>e&&(!e.name||!U.includes(e.name))))})}export{ge as _,de as a,he as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as B}from"./NCodeBlock.vue.2de294a4.js";import{d as N,bt as R,e as $,a as D,ax as T,o as n,m as a,k as c,F as f,n as V,G as m,f as t,t as E,i as _,j as v,v as b,h as F,p as l,_ as L,r as y,K as p,bu as k,bv as g}from"./entry.12ac938b.js";const W={key:0,relative:"","n-code-block":""},j={flex:"~ wrap","w-full":""},z=["onClick"],G=c("div",{border:"b base","flex-auto":""},null,-1),K={flex:"~ gap-2",px3:"",pb3:"",n:"sm primary"},P=N({__name:"CodeSnippets",props:{codeSnippets:{},eventType:{}},setup(s){const r=s,e=R(r.codeSnippets[0]),x=$(),w=D(()=>e.value?.lang||"text");return T(()=>{r.codeSnippets.includes(e.value)||(e.value=r.codeSnippets[0])}),(i,d)=>{const S=B,u=L;return i.codeSnippets.length?(n(),a("div",W,[c("div",j,[(n(!0),a(f,null,V(i.codeSnippets,(o,O)=>(n(),a("button",{key:O,px4:"",py2:"",border:"r base",hover:"bg-active",class:m(o===t(e)?"":"border-b"),onClick:I=>e.value=o},[c("div",{class:m(o===t(e)?"":"op30"),"font-mono":""},E(o.name),3)],10,z))),128)),G]),t(e)?(n(),a(f,{key:0},[_(S,{code:t(e).code,lang:t(w),lines:!1,"w-full":"","of-auto":"",p3:""},null,8,["code","lang"]),c("div",K,[_(u,{icon:"carbon-copy",onClick:d[0]||(d[0]=o=>t(x)(t(e).code,i.eventType||`code-snippet-${t(e).name}`))},{default:v(()=>[b(" Copy ")]),_:1}),t(e)?.docs?(n(),F(u,{key:0,to:t(e).docs,target:"_blank",icon:"carbon-catalog"},{default:v(()=>[b(" Docs ")]),_:1},8,["to"])):l("",!0)])],64)):l("",!0)])):l("",!0)}}}),h=y(await p.getOptions("assets")),q=k(h);g(h,async s=>{p.updateOptions("assets",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const C=y(await p.getOptions("serverRoutes")),A=k(C);g(C,async s=>{p.updateOptions("serverRoutes",s)},{deep:!0,flush:"post",debounce:500,maxWait:1e3});const H={serverRoutes:A,assets:q};function Q(s){return H[s]}export{P as _,Q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as G,O as ne,r as
|
|
1
|
+
import{d as G,O as ne,r as U,P as E,bw as T,ay as ae,w as oe,ax as se,Z as le,a as re,K as f,L as k,f as t,o as l,h as m,j as u,k as r,i as c,l as D,m as i,F as w,n as A,t as b,G as F,ac as L,v as d,p as R,ar as ue,I as ie,bd as de,ad as ce,bx as pe,by as z,_ as me,W as _e,a4 as fe,am as ve,A as ye,S as ge,aE as he}from"./entry.12ac938b.js";import{_ as ke}from"./NSelect.vue.08628a3f.js";import{_ as be}from"./NLink.vue.31c2cbc4.js";import{_ as xe}from"./FilepathItem.vue.7fdda51b.js";import{U as we}from"./json-editor-vue.cf7b17c9.js";const Ce={class:"h-[48px] flex items-center justify-between gap1 px-3"},Ke={class:"w-full text-sm"},Se=["value"],Ve=["onClick"],$e=r("div",{"x-divider":""},null,-1),Ne={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Ie={border:"b base",class:"h-[49px] flex flex-none items-center justify-between px-4 text-sm"},je={class:"flex items-center gap-4"},Ue={key:1},De=["onKeyup"],Ae=r("br",null,null,-1),Le={key:0,op50:""},Me={key:1},Be=r("code",null,"nitro.storage",-1),Pe=r("br",null,null,-1),qe={"font-bold":""},Ee=r("br",null,null,-1),Te={"text-sm":""},Fe=r("br",null,null,-1),Re=G({__name:"StorageDetails",async setup(O){let p,g;const C=pe(),h=ne(),x=U(""),v=U(""),s=E("storage:current",""),e=U(),y=E("storage:file:state",""),{data:K}=([p,g]=T(()=>z("storageMounts",()=>f.getStorageMounts())),p=await p,g(),p),{data:S,refresh:M}=([p,g]=T(async()=>z("storageKeys",async()=>s.value?await f.getStorageKeys(s.value):[])),p=await p,g(),p),W=C.hook("storage:key:update",async(n,a)=>{if(!(!s.value||n.split(":")[0]!==s.value)&&(await M(),y.value===n)){if(a==="remove")return h.replace({query:{storage:s.value}});await $(y.value)}});ae(W),oe(s,()=>{M(),y.value=""}),se(async()=>{if(!y.value){e.value=null;return}$(y.value)}),le("keydown",n=>{n.key==="s"&&(n.ctrlKey||n.metaKey)&&(N(),n.preventDefault())});function V(n){return n.replace(`${s.value}:`,"")}const Z=re(()=>S.value?S.value.filter(n=>n.includes(x.value)):[]);async function $(n){const a=await f.getStorageItem(await k(),n);e.value={key:n,updatedKey:V(n),editingKey:!1,content:a,updatedContent:a}}async function H(){if(!v.value||!s.value)return;const n=`${s.value}:${v.value}`;S.value?.includes(n)||await f.setStorageItem(await k(),n,""),h.replace({query:{storage:s.value,key:n}}),v.value=""}async function N(){e.value&&(await f.setStorageItem(await k(),e.value.key,e.value.updatedContent),await $(e.value.key))}async function J(){!e.value||!s.value||(await f.removeStorageItem(await k(),e.value.key),e.value=null)}async function Q(){if(!e.value||!s.value)return;const n=`${s.value}:${e.value.updatedKey}`,a=await k();await f.setStorageItem(a,n,e.value.updatedContent),await f.removeStorageItem(a,e.value.key),h.replace({query:{storage:s.value,key:n}})}return(n,a)=>{const I=me,X=ke,j=_e,Y=fe,B=be,P=ve,q=ye,ee=ge,te=xe;return t(s)?(l(),m(ee,{key:0,"storage-key":"tab-storage"},{left:u(()=>[r("div",Ce,[c(I,{icon:"carbon-chevron-left","ml--1":"",border:!1,onClick:a[0]||(a[0]=o=>s.value="")}),r("div",Ke,[c(X,{modelValue:t(s),"onUpdate:modelValue":a[1]||(a[1]=o=>D(s)?s.value=o:null),n:"primary",icon:"carbon-data-base"},{default:u(()=>[(l(!0),i(w,null,A(t(K),(o,_)=>(l(),i("option",{key:_,value:_},b(_),9,Se))),128))]),_:1},8,["modelValue"])])]),c(j,{modelValue:t(x),"onUpdate:modelValue":a[2]||(a[2]=o=>D(x)?x.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"]),(l(!0),i(w,null,A(t(Z),o=>(l(),i(w,{key:o},[r("button",{block:"","w-full":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:F(o===t(e)?.key?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:_=>y.value=o},b(V(o)),11,Ve),$e],64))),128)),c(j,{modelValue:t(v),"onUpdate:modelValue":a[3]||(a[3]=o=>D(v)?v.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:L(H,["enter"])},null,8,["modelValue","onKeyup"])]),right:u(()=>[t(e)?.key?(l(),i("div",Ne,[r("div",Ie,[r("div",je,[t(e).editingKey?(l(),m(j,{key:0,modelValue:t(e).updatedKey,"onUpdate:modelValue":a[4]||(a[4]=o=>t(e).updatedKey=o),onKeyup:L(Q,["enter"])},null,8,["modelValue","onKeyup"])):(l(),i("code",Ue,[d(b(V(t(e).key))+" ",1),c(Y,{icon:"carbon-edit",class:"cursor-pointer op50 hover:op100",onClick:a[5]||(a[5]=o=>t(e).editingKey=!0)})])),t(e).editingKey?R("",!0):(l(),m(I,{key:2,n:"green xs",disabled:t(e).content===t(e).updatedContent,class:F({"border-green":t(e).content!==t(e).updatedContent}),onClick:N},{default:u(()=>[d(" Save ")]),_:1},8,["disabled","class"]))]),r("div",null,[c(I,{n:"red xs",onClick:J},{default:u(()=>[d(" Delete ")]),_:1})])]),typeof t(e).content=="object"?(l(),m(t(we),ue({key:0,modelValue:t(e).updatedContent,"onUpdate:modelValue":a[6]||(a[6]=o=>t(e).updatedContent=o),class:[[n.$colorMode.value==="dark"?"jse-theme-dark":"light"],"json-editor-vue h-full of-auto text-sm outline-none"]},n.$attrs,{mode:"text","navigation-bar":!1,indentation:2,"tab-size":2}),null,16,["modelValue","class"])):ie((l(),i("textarea",{key:1,"onUpdate:modelValue":a[7]||(a[7]=o=>t(e).updatedContent=o),placeholder:"Item value...",class:"h-full of-auto p-4 text-sm font-mono outline-none",onKeyup:L(de(N,["ctrl"]),["enter"])},null,40,De)),[[ce,t(e).updatedContent]])])):(l(),m(q,{key:1},{default:u(()=>[c(P,{px6:"",py4:""},{default:u(()=>[d(" Select one key to start."),Ae,d("Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})]),_:1})]),_:1}))]),_:1})):(l(),m(q,{key:1},{default:u(()=>[Object.keys(t(K)).length?(l(),i("p",Le," Select one storage to start: ")):(l(),i("p",Me,[d(" No custom storage defined in "),Be,d("."),Pe,d(" Learn more about "),c(B,{href:"https://nitro.unjs.io/guide/storage",n:"orange",target:"_blank"},{default:u(()=>[d(" Nitro storage ")]),_:1})])),(l(!0),i(w,null,A(t(K),(o,_)=>(l(),m(P,{key:_,"min-w-80":"","cursor-pointer":"","p-4":"","text-left":"",hover:"border-green",onClick:ze=>s.value=_},{default:u(()=>[r("span",qe,b(_),1),Ee,r("span",Te,b(o.driver)+" driver",1),Fe,o.base?(l(),m(te,{key:0,"text-xs":"",filepath:o.base},null,8,["filepath"])):R("",!0)]),_:2},1032,["onClick"]))),128))]),_:1}))}}}),Je=G({__name:"storage",setup(O){return(p,g)=>{const C=Re,h=he;return l(),m(h,null,{default:u(()=>[c(C)]),_:1})}}});export{Je as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Ee,r as ke,
|
|
1
|
+
import{d as Ee,r as ke,al as Pe,Z as Ie,K as fe,L as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,bx as He,_ as Ae,bz as Fe,Q as We,a as Ue,ax as Ne,n as $e,G as Le,bd as je,v as De,a4 as ze,j as Ke,aE as qe}from"./entry.12ac938b.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new _.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a<i;a++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),/\p{Control}/u.test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([u(1,e.IRenderService)],t)},3614:(P,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function u(d,f,g,_){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const _=g.getBoundingClientRect(),e=d.clientX-_.left-10,s=d.clientY-_.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,_){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),f,g,_)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,_,e){n(d,f,g),e&&_.rightClickSelect(d),f.value=_.selectionText,f.select()}},7239:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,u,n){o.addEventListener(c,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,u,n))}}}},6465:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},u=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let _=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.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 t=e.composedPath();for(let i=0;i<t.length;i++){const a=t[i];if(a.classList.contains("xterm"))break;if(a.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||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var t,i;this._activeProviderReplies&&s||((t=this._activeProviderReplies)===null||t===void 0||t.forEach(l=>{l?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m?.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;i<s.size;i++){const a=s.get(i);if(a)for(let l=0;l<a.length;l++){const v=a[l],m=v.link.range.start.y<e?0:v.link.range.start.x,h=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(l=!0);if(!l&&a){const v=a.find(m=>this._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;v<this._activeProviderReplies.size;v++){const m=(i=this._activeProviderReplies.get(v))===null||i===void 0?void 0:i.find(h=>this._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_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,f.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 t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.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(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.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(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=_=c([u(0,g.IBufferService)],_)},9042:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(P,r,o){var c=this&&this.__decorate||function(_,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(_,e,s,t);else for(var v=_.length-1;v>=0;v--)(i=_[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(_,e){return function(s,t){e(s,t,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(_,e,s){this._bufferService=_,this._optionsService=e,this._oscLinkService=s}provideLinks(_,e){var s;const t=this._bufferService.buffer.lines.get(_-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;b<v;b++)if(h!==-1||t.hasContent(b)){if(t.loadCell(b,l),l.hasExtendedAttrs()&&l.extended.urlId){if(h===-1){h=b,m=l.extended.urlId;continue}p=l.extended.urlId!==m}else h!==-1&&(p=!0);if(p||h!==-1&&b===v-1){const L=(s=this._oscLinkService.getLinkData(m))===null||s===void 0?void 0:s.uri;if(L){const y={start:{x:h+1,y:_},end:{x:b+(p||b!==v-1?0:1),y:_}};let k=!1;if(!a?.allowNonHttpProtocols)try{const x=new URL(L);["http:","https:"].includes(x.protocol)||(k=!0)}catch{k=!0}k||i.push({text:L,range:y,activate:(x,T)=>a?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var O;return(O=a?.hover)===null||O===void 0?void 0:O.call(a,x,T,y)},leave:(x,T)=>{var O;return(O=a?.leave)===null||O===void 0?void 0:O.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(_,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{d as w,a as T,aF as W,o as n,m as i,k as s,a7 as N,f as a,t as k,ab as j,F as h,n as E,h as b,r as B,w as U,aw as Y,Z as V,bA as Z,p as x,i as m,G as O,q,e as K,an as R,j as g,ar as X,v as F,_ as z,aa as H,aH as Q,as as ee,aZ as se,bB as te,M as ne,a9 as oe,A as ae,K as G,a3 as le,X as ie}from"./entry.12ac938b.js";import{_ as M}from"./DurationDisplay.vue.719ab95f.js";import{_ as P}from"./NBadge.83bd8b90.js";import{_ as re}from"./ComposableItem.vue.2d6f2884.js";import{U as ce}from"./json-editor-vue.cf7b17c9.js";import{_ as pe}from"./FilepathItem.vue.7fdda51b.js";import{_ as de}from"./NDrawer.vue.9614b581.js";import{_ as ue}from"./LaunchPage.vue.289a5cb3.js";import{_ as me}from"./NLink.vue.31c2cbc4.js";import{_ as ke}from"./CodeDiff.vue.436985c7.js";import{_ as _e}from"./HelpFab.vue.891b009b.js";import"./NMarkdown.vue.4b221360.js";import"./client.f2b385ce.js";import"./constants.2cc6e981.js";import"./NCodeBlock.vue.2de294a4.js";const he=w({__name:"TimelineItemFunction",props:{item:{}},setup(_){const p=_,c=T(()=>W(p.item.name,50,60,"_op_")),e=T(()=>c.value.replace(/_op_/,"1")),o=T(()=>W(p.item.name,50,40)),r=T(()=>c.value.replace(/_op_/,"0.2"));return(u,t)=>(n(),i("button",{class:"group",style:N({color:a(e),borderLeft:`2px solid ${a(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[s("div",{style:N({backgroundColor:a(r)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),s("div",{style:N({color:a(o),"--c":a(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(u.item.name),5)],4))}}),fe={relative:"","h-full":""},ye={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},ve=w({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=j(()=>c.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:o=>o,future:o=>o,invalid:"-",second:o=>o?`${o}s`:"",minute:o=>`${o}m`,hour:o=>`${o}h`,week:o=>`${o}w`,day:o=>`${o}d`,month:o=>`${o}mo`,year:o=>`${o}y`}});return(o,r)=>{const u=he;return n(),i("div",fe,[s("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:r[0]||(r[0]=t=>o.segment.route?p("select",o.segment.route):void 0)},k(o.segment.route?.event.to),1),s("div",ye,k(a(e))+" ago ",1),s("div",null,[(n(!0),i(h,null,E(o.segment.functions,(t,l)=>(n(),b(u,{key:l,item:t.event,style:N({position:"absolute",minWidth:`${t.relativeWidth*100}%`,maxWidth:`${t.relativeWidth*100}%`,top:`${4+t.layer*1.6}em`,left:`${t.relativeStart*100}%`}),onClick:d=>p("select",t)},null,8,["item","style","onClick"]))),128))])])}}}),be=3e3,ge=50;function xe(_){const p=[];let c={start:0,end:0,events:[],functions:[],duration:0};for(const e of _){const o=e.end||e.start;(e.start-c.end>be||e.type==="route")&&(c={start:e.start,end:o,events:[],functions:[],duration:0},p.push(c)),c.events.push(e),c.end=o+ge}return p.forEach((e,o)=>{const r=e.end-e.start,u=[];e.duration=r,e.previousGap=o>0?e.start-p[o-1].end:0,e.events.forEach(t=>{const l=t.end||t.start;let d=0;t.type!=="route"&&(d=u.findIndex($=>$<=t.start),d===-1?(d=u.length,u.push(l+1e3)):u[d]=l+1e3);const f={event:t,segment:e,relativeStart:(t.start-e.start)/r,relativeWidth:(l-t.start)/r,layer:d};t.type==="function"?e.functions.push(f):e.route=f})}),p}const $e={relative:""},Ae={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},De=w({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(_,{emit:p}){const c=_,e=B(),o=B(),r=B(),u=B(),t=B(!0),l=B(1.5),d=T(()=>xe(c.data.events)),f=T(()=>(c.data.events.length,e.value?.scrollWidth||window.innerWidth));function $(){u.value&&(u.value.style.width=`${f.value}px`)}function I(){t.value&&e.value&&(e.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}),r.value.scrollTo({left:e.value.scrollWidth-e.value.clientWidth,behavior:"smooth"}))}return U(()=>c.data.events.length,async()=>{await Y(),$(),I()},{flush:"post"}),V(e,"scroll",()=>{r.value.scrollLeft!==e.value.scrollLeft&&($(),r.value.scrollLeft=e.value.scrollLeft,t.value=e.value.scrollLeft>=e.value.scrollWidth-e.value.clientWidth)}),V(r,"scroll",()=>{r.value.scrollLeft!==e.value.scrollLeft&&($(),e.value.scrollLeft=r.value.scrollLeft)}),V(e,"wheel",A=>{A.altKey?(l.value=Z(l.value+A.deltaY/200,.5,3),$()):e.value.scrollLeft+=A.deltaY}),(A,S)=>{const D=M,y=ve;return n(),i(h,null,[s("div",$e,[s("div",{ref_key:"minimap",ref:o,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(n(!0),i(h,null,E(a(d),(v,L)=>(n(),i("div",{key:L,relative:"","h-full":"","flex-inline":"",style:N({width:`${Math.max(100,v.duration/10)/a(f)*100}%`})},[(n(!0),i(h,null,E(v.functions,(C,J)=>(n(),i("div",{key:J,"h-3px":"",rounded:"",style:N({width:`max(${C.relativeWidth*100}%, 10px)`,position:"absolute",top:`${C.layer*4}px`,left:`${C.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in A?A.getHashColorFromString:a(W))(C.event.name,50,60)})},null,4))),128)),v.route?(n(),i("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:N({left:`${v.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),s("div",{ref_key:"minimapScroller",ref:r,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[s("div",{ref_key:"minimapScrollerInner",ref:u,"h-1px":""},null,512)],512)]),s("div",{ref_key:"scroller",ref:e,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(n(!0),i(h,null,E(a(d),(v,L)=>(n(),i(h,{key:L},[v.previousGap&&v.previousGap>=200?(n(),i("div",Ae,[m(D,{op50:"",duration:v.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(y,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:O(L===a(d).length-1?"border-r border-base":""),segment:v,style:N({width:`${Math.max(50,v.duration/10)*a(l)}px`}),onSelect:S[0]||(S[0]=C=>p("select",C))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Ce=q(De,[["__scopeId","data-v-a2c475c0"]]),Be={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},we=["onClick"],Te=s("div",{"i-carbon-function":"",op50:""},null,-1),Ne={flex:"~","ml--1":"","font-mono":""},Se=s("div",{op30:""}," ( ",-1),Fe={key:0,mr2:"",op30:""},Ee={op75:""},Ie=s("div",{op30:""}," ) ",-1),Le=s("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[s("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},Me={"text-xs":"","font-mono":"",op30:""},Ve={"font-bold":"","font-mono":"","text-green":""},je=s("div",{"flex-auto":""},null,-1),Oe=s("div",{"min-h-100":""},null,-1),ze=w({__name:"TimelineList",props:{data:{}},emits:["select"],setup(_,{emit:p}){return(c,e)=>{const o=M;return n(),i("div",Be,[(n(!0),i(h,null,E(c.data.events,(r,u)=>(n(),i("button",{key:u,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:t=>p("select",r)},[r.type==="function"?(n(),i(h,{key:0},[Te,s("div",{"font-mono":"",style:N({color:r.type==="function"?("getHashColorFromString"in c?c.getHashColorFromString:a(W))(r.name,50,60):""})},k(r.name),5),s("div",Ne,[Se,(n(!0),i(h,null,E(r.args,(t,l)=>(n(),i(h,{key:l},[l?(n(),i("div",Fe," , ")):x("",!0),s("div",Ee,k(t===null?"null":t===void 0?"undefined":typeof t=="function"?"[function]":Array.isArray(t)?"[Array]":typeof t=="object"?"[object]":JSON.stringify(t)),1)],64))),128)),Ie])],64)):(n(),i(h,{key:1},[Le,s("div",We,[s("div",Me,k(r.from),1),s("div",Ve,k(r.to),1)])],64)),je,r.end?(n(),b(o,{key:2,duration:r.end-r.start,color:r.type==="function"},null,8,["duration","color"])):x("",!0)],8,we))),128)),Oe])}}}),Ge={key:0,"text-blue":""},Re={key:1,"text-purple":""},He={key:2,"text-green":""},Pe={key:3,"text-gray":""},Je={key:4,"text-gray":""},Ue={key:5,"text-gray":""},Ye={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},qe={p2:"","text-sm":"",border:"t base"},Ke=w({__name:"TimelineArgumentView",props:{value:{}},setup(_){const p=_,c=B(),e=B();function o(){try{c.value=JSON.parse(JSON.stringify(p.value))}catch(t){console.error(t),e.value=t}}const r=w({emits:["setup"],setup(t,{emit:l}){return l("setup"),()=>null}}),u=K();return(t,l)=>{const d=z,f=R("VMenu");return typeof t.value=="string"?(n(),i("div",Ge,k(JSON.stringify(t.value)),1)):typeof t.value=="number"?(n(),i("div",Re,k(t.value),1)):typeof t.value=="boolean"?(n(),i("div",He,k(t.value),1)):typeof t.value>"u"?(n(),i("div",Pe," undefined ")):typeof t.value=="function"?(n(),i("div",Je," [Function"+k(t.value.name?`: ${t.value.name}`:"")+"] ",1)):t.value===null?(n(),i("div",Ue," null ")):(n(),b(f,{key:6,placement:"top"},{popper:g(()=>[m(a(r),{onSetup:o}),a(e)?(n(),i("div",Ye," Failed to display object: "+k(a(e)),1)):a(c)?(n(),i("div",Ze,[m(a(ce),X({"model-value":a(c)},t.$attrs,{class:["json-editor-vue",[t.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),s("div",qe,[m(d,{title:"Copy to clipboard",icon:"carbon-copy",onClick:l[0]||(l[0]=$=>a(u)(JSON.stringify(a(c),null,2),"timeline-argument"))},{default:g(()=>[F(" Copy ")]),_:1})])])):x("",!0)]),default:g(()=>[s("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:O([Array.isArray(t.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(t.value)?`[Array(${t.value.length})]`:"[Object]"),3)]),_:1}))}}}),Xe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},Qe={"mx--1":""},es={flex:"~ gap-1","font-mono":""},ss={key:1},ts=s("span",{ml1:"",op30:""},"(",-1),ns={key:0,op30:""},os=s("span",{op30:""},")",-1),as={flex:"~ gap-1","text-sm":""},ls=s("span",{mx1:"",op50:""},"·",-1),is={class:"text-sm text-gray-400"},rs={key:0,class:"text-xs text-gray-400",mt2:"",grid:"~ cols-[max-content_1fr] gap-x-4","font-mono":""},cs={"text-right":""},ps={"ws-nowrap":""},ds=w({__name:"TimelineDetailsFunction",props:{record:{}},setup(_){const p=_,c=H(),e=j(()=>p.record.start,{showSecond:!0});function o(l){let d=new URL(l).pathname;return d.startsWith("/_nuxt/")&&(d=d.slice(6)),d.startsWith("/@id/virtual:nuxt:")?`#build/${d.split("/.nuxt/")[1]}`.replace(/\.m?js$/,""):d.includes("/@fs/")?`/${d.split("/@fs/")[1]}`:(c.value?.rootDir||"")+d}const r=Q(),u=T(()=>r.value?.metadata),t=T(()=>r.value?.imports.find(l=>l.as===p.record.name));return(l,d)=>{const f=P,$=re,I=Ke,A=M,S=pe;return l.record?(n(),i("div",Xe,[s("div",Qe,[m(f,{n:"yellow",textContent:"Function call"})]),s("div",es,[a(t)?(n(),b($,{key:0,item:a(t),metadata:a(u),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(n(),i("span",ss,k(l.record.name),1)),ts,(n(!0),i(h,null,E(l.record.args,(D,y)=>(n(),i(h,{key:y},[y?(n(),i("span",ns,", ")):x("",!0),m(I,{value:D},null,8,["value"])],64))),128)),os]),s("div",as,[l.record.end?(n(),b(A,{key:0,duration:l.record.end-l.record.start},null,8,["duration"])):x("",!0),ls,s("div",is,k(a(e)),1)]),l.record.stacktrace?(n(),i("div",rs,[(n(!0),i(h,null,E(l.record.stacktrace,(D,y)=>(n(),i(h,{key:y},[s("div",cs,k(D.functionName||"(anonymous)"),1),s("div",ps,[D.fileName?(n(),b(S,{key:0,filepath:`${o(D.fileName)}:${D.lineNumber}:${D.columnNumber}`,subpath:""},null,8,["filepath"])):x("",!0)])],64))),128))])):x("",!0)])):x("",!0)}}}),us={key:0,"p-4":"",flex:"~ col gap-2"},ms={"mx--1":""},ks={flex:"~ gap-1 items-center","font-mono":""},_s={op50:""},hs=s("span",{"i-carbon-arrow-right":"",op50:""},null,-1),fs={flex:"~ gap-1","text-sm":""},ys=s("span",{mx1:"",op50:""},"·",-1),vs={class:"text-sm text-gray-400"},bs=w({__name:"TimelineDetailsRoute",props:{record:{}},setup(_){const p=_,c=j(()=>p.record.start,{showSecond:!0});return(e,o)=>{const r=P,u=M;return e.record?(n(),i("div",us,[s("div",ms,[m(r,{n:"green",textContent:"Route Change"})]),s("div",ks,[s("span",_s,k(e.record.from),1),hs,s("span",null,k(e.record.to),1)]),s("div",fs,[e.record.end?(n(),b(u,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),ys,s("div",vs,k(a(c)),1)])])):x("",!0)}}}),gs={key:0,"h-screen":"","of-hidden":""},xs={"h-screen":"","w-full":"",flex:"","flex-col":""},$s={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},As={"text-sm":""},Ds=s("div",{"flex-auto":""},null,-1),Cs={"min-h-50":"",px3:"",py2:""},Bs=w({__name:"TimelineView",setup(_){const p=ee(),c=B("table"),e=B(),o=T(()=>p.value?.metrics.clientTimeline());function r(){o.value&&(o.value.events=[])}function u(){c.value=c.value==="table"?"list":"table"}return(t,l)=>{const d=R("VTooltip"),f=z,$=Ce,I=ze,A=ds,S=bs,D=de;return a(o)?(n(),i("div",gs,[s("div",xs,[s("div",$s,[m(d,{flex:""},{popper:g(()=>[s("div",As,k(a(o).options.enabled?"Recording...":"Paused"),1)]),default:g(()=>[s("div",{"text-lg":"",class:O(a(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),a(o).options.enabled?(n(),b(f,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:l[1]||(l[1]=y=>a(o).options.enabled=!1)},{default:g(()=>[F(" Stop Tracking ")]),_:1})):(n(),b(f,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:l[0]||(l[0]=y=>a(o).options.enabled=!0)},{default:g(()=>[F(" Start Tracking ")]),_:1})),Ds,m(f,{icon:a(c)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:u},null,8,["icon"]),m(f,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:r})]),a(c)==="table"?(n(),b($,{key:0,data:{...a(o)},onSelect:l[2]||(l[2]=y=>e.value=y.event)},null,8,["data"])):(n(),b(I,{key:1,data:{...a(o)},onSelect:l[3]||(l[3]=y=>e.value=y)},null,8,["data"]))]),m(D,{"model-value":!!a(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:l[4]||(l[4]=y=>e.value=void 0)},{default:g(()=>[s("div",Cs,[a(e)?.type==="function"?(n(),b(A,{key:0,record:a(e)},null,8,["record"])):a(e)?.type==="route"?(n(),b(S,{key:1,record:a(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),ws={class:"markdown-body"},Ts=s("h1",null,"Timeline",-1),Ns=s("p",null,[s("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ss=se(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
3
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
4
|
+
<span class="line"></span>
|
|
5
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
6
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
7
|
+
<span class="line"></span>
|
|
8
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
9
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#393A34;--shiki-dark:#DBD7CAEE;"> </span></span>
|
|
10
|
+
<span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
|
|
11
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
12
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
13
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
14
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
15
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
16
|
+
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
17
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
18
|
+
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
19
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
20
|
+
<span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
21
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
22
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
23
|
+
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
24
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
|
|
25
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
26
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
27
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
29
|
+
<span class="line"></span></code></pre>`,6),Fs=[Ts,Ns,Ss],Es={__name:"timeline",setup(_,{expose:p}){return p({frontmatter:{}}),(e,o)=>(n(),i("div",ws,Fs))}},Is={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Ls=s("h2",{"text-xl":""},[s("span",{capitalize:""},"Enable Timeline?")],-1),Ws={op50:""},Ms=s("p",null,[s("span",{op50:""},"Then Nuxt will "),s("span",{"text-orange":""},"restart automatically"),F(". ")],-1),Vs={flex:"~ gap-3",mt2:"","justify-end":""},et=w({__name:"timeline",setup(_){const p=te(),c=H(),e=ne(),o=oe();async function r(){try{const[u,t]=await G.enableTimeline(!0);if(!await e.start(u,t))return;await G.enableTimeline(!1)}catch{le({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(u,t)=>{const l=Bs,d=ue,f=ae,$=me,I=ke,A=z,S=ie,D=Es,y=_e;return n(),i(h,null,[a(p)?.timeline?.enabled?(n(),b(l,{key:0})):(n(),i(h,{key:1},[m(f,null,{default:g(()=>[m(d,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:r})]),_:1}),m(a(e),null,{default:g(({resolve:v,args:L})=>[m(S,{"model-value":!0,onClose:C=>v(!1)},{default:g(()=>[s("div",Is,[Ls,s("p",Ws,[F(" Your "),m($,{role:"button",n:"primary",underline:"",onClick:t[0]||(t[0]=C=>a(o)(a(c)?._nuxtConfigFile)),textContent:"Nuxt config"}),F(" will be updated as: ")]),m(I,{from:L[0],to:L[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Ms,s("div",Vs,[m(A,{onClick:C=>v(!1)},{default:g(()=>[F(" Cancel ")]),_:2},1032,["onClick"]),m(A,{n:"solid primary",capitalize:"",onClick:C=>v(!0)},{default:g(()=>[F(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(y,null,{default:g(()=>[m(D)]),_:1})],64)}}});export{et as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as Se}from"./entry.3dd66f35.js";const xe=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ue=Object.freeze({...xe,...U}),$e=Object.freeze({...ue,body:"",hidden:!1}),_e=Object.freeze({width:null,height:null}),he=Object.freeze({..._e,...U});function Ce(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function J(t,e){const n=Ce(t,e);for(const s in $e)s in U?s in t&&!(s in n)&&(n[s]=U[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function Ae(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const c=s[o]&&s[o].parent,f=c&&i(c);f&&(r[o]=[c].concat(f))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function Q(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(c){i=J(s[c]||r[c],i)}return o(e),n.forEach(o),J(t,i)}function Oe(t,e){if(t.icons[e])return Q(t,e,[]);const n=Ae(t,[e])[e];return n?Q(t,e,n):null}const Me=/(-?[0-9.]*[0-9]+[0-9.]*)/g,je=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ee(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(Me);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=je.test(i);for(;;){if(o){const c=parseFloat(i);isNaN(c)?r.push(i):r.push(Math.ceil(c*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function Ee(t){let e="";const n=t.indexOf("<defs");for(;n>=0;){const s=t.indexOf(">",n),r=t.indexOf("</defs");if(s===-1||r===-1)break;const i=t.indexOf(">",r);if(i===-1)break;e+=t.slice(s+1,r).trim(),t=t.slice(0,n).trim()+t.slice(i+1)}return{defs:e,content:t}}function ke(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Pe(t,e,n){const s=Ee(t);return ke(s.defs,e+s.content+n)}const Z=t=>t==="unset"||t==="undefined"||t==="none";function Le(t,e){const n={...ue,...t},s={...he,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(p=>{const d=[],x=p.hFlip,w=p.vFlip;let S=p.rotate;x?w?S+=2:(d.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),d.push("scale(-1 1)"),r.top=r.left=0):w&&(d.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),d.push("scale(1 -1)"),r.top=r.left=0);let l;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:l=r.height/2+r.top,d.unshift("rotate(90 "+l.toString()+" "+l.toString()+")");break;case 2:d.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:l=r.width/2+r.left,d.unshift("rotate(-90 "+l.toString()+" "+l.toString()+")");break}S%2===1&&(r.left!==r.top&&(l=r.left,r.left=r.top,r.top=l),r.width!==r.height&&(l=r.width,r.width=r.height,r.height=l)),d.length&&(i=Pe(i,'<g transform="'+d.join(" ")+'">',"</g>"))});const o=s.width,c=s.height,f=r.width,u=r.height;let a,h;o===null?(h=c===null?"1em":c==="auto"?u:c,a=ee(h,f/u)):(a=o==="auto"?f:o,h=c===null?ee(a,u/f):c==="auto"?u:c);const m={},g=(p,d)=>{Z(d)||(m[p]=d.toString())};g("width",a),g("height",h);const _=[r.left,r.top,f,u];return m.viewBox=_.join(" "),{attributes:m,viewBox:_,body:i}}function ze(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').trim()}const Te=/\swidth\s*=\s*["'](\w+)["']/,Ie=/\sheight\s*=\s*["'](\w+)["']/,G=/<svg\s+/;function Fe(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const c=o.exec(s),f=c!=null,u=e[i];return!u&&!Z(u)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):c&&(e[i]=c[1])),f};return[r("width",Te),r("height",Ie)]}async function de(t,e,n,s,r,i){const{scale:o,addXmlNs:c=!1}=s??{},{additionalProps:f={},iconCustomizer:u}=s?.customizations??{},a=await r?.()??{};await u?.(e,n,a),Object.keys(f).forEach(p=>{const d=f[p];d!=null&&(a[p]=d)}),i?.(a);const[h,m]=Fe(t,a,o);c&&(!t.includes("xmlns=")&&!a.xmlns&&(a.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!a["xmlns:xlink"]&&(a["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const g=Object.keys(a).map(p=>p==="width"&&h||p==="height"&&m?null:`${p}="${a[p]}"`).filter(p=>p!=null);if(g.length&&(t=t.replace(G,`<svg ${g.join(" ")} `)),s){const{defaultStyle:p,defaultClass:d}=s;d&&!t.includes("class=")&&(t=t.replace(G,`<svg class="${d}" `)),p&&!t.includes("style=")&&(t=t.replace(G,`<svg style="${p}" `))}const _=s?.usedProps;return _&&(Object.keys(f).forEach(p=>{const d=a[p];d!=null&&(_[p]=d)}),typeof a.width<"u"&&a.width!==null&&(_.width=a.width),typeof a.height<"u"&&a.height!==null&&(_.height=a.height)),t}async function te(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await de(s?.customizations?.trimCustomSvg===!0?ze(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function pe(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=Oe(t,o),r){let c={...he};typeof i=="function"&&(c=i(c));const{attributes:{width:f,height:u,...a},body:h}=Le(r,c),m=s?.scale;return await de(`<svg >${h}</svg>`,e,o,s,()=>({...a}),g=>{const _=(p,d)=>{const x=g[p];let w;if(!Z(x)){if(x)return;typeof m=="number"?m&&(w=`${m}em`):w=d}w?g[p]=w:delete g[p]};_("width",f),_("height",u)})}}const me=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await te(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await pe(r,t,i,n)}}}else return await te(s,t,e,n)};function Re(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ne=["academicons","akar-icons","ant-design","arcticons","basil","bi","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols","mdi-light","mdi","medical-icon","memory","mi","mingcute","mono-icons","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const Ve=Re(Ne);function De(t){const e=new Map;function n(s){if(Ve.includes(s))return e.has(s)||e.set(s,Se(`${t}@iconify-json/${s}/icons.json`)),e.get(s)}return async(s,r,i)=>{let o=await me(s,r,i);if(o)return o;const c=await n(s);if(c){const f=[r,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r.replace(/([a-z])(\d+)/g,"$1-$2")];o=await pe(c,s,f,i)}return o}}function Be(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const W=Be;function k(t=[]){return Array.isArray(t)?t:[t]}function H(t){return Array.from(new Set(t))}function Ue(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function O(t){return typeof t=="string"}function R(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function He(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>R(e)):[t]:[R(t)]}function Ge(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function Y(t){return t==null?"":Ge(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function V(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return V(s)&&V(r)&&Object.keys(r).forEach(o=>{V(s[o])&&V(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ge(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function B(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:B(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}return t}function We(t){return O(t[0])}function Ye(t){return O(t[0])}const ne="$$shortcut-no-merge";function qe(t){return typeof t=="function"?{match:t}:t}function re(t){return t.length===3}function Ke(t){return t!=null}function Xe(){}var Ze=Object.defineProperty,Je=(t,e,n)=>e in t?Ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qe=(t,e,n)=>(Je(t,typeof e!="symbol"?e+"":e,n),n);class et{constructor(){Qe(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}var tt=Object.defineProperty,nt=(t,e,n)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rt=(t,e,n)=>(nt(t,typeof e!="symbol"?e+"":e,n),n);class ye extends Set{constructor(e){super(e),rt(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(this._map=new Map),this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,n){return this._map.set(e,n),super.add(e)}}function q(t){return t instanceof ye}const D={};function st(t=["-",":"]){const e=t.join("|");return D[e]||(D[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),D[e].lastIndex=0,D[e]}function it(t,e=["-",":"],n=5){const s=st(e);let r,i=t.toString();const o=new Set,c=new Map;do r=!1,i=i.replace(s,(u,a,h,m,g)=>{if(!e.includes(h))return u;r=!0,o.add(a+h);const _=g+a.length+h.length+1,p={length:u.length,items:[]};c.set(g,p);for(const d of[...m.matchAll(/\S+/g)]){const x=_+d.index;let w=c.get(x)?.items;w?c.delete(x):w=[{offset:x,length:d[0].length,className:d[0]}];for(const S of w)S.className=S.className==="~"?a:S.className.replace(/^(!?)(.*)/,`$1${a}${h}$2`),p.items.push(S)}return"$".repeat(u.length)}),n-=1;while(r&&n);let f;if(typeof t=="string"){f="";let u=0;for(const[a,h]of c)f+=t.slice(u,a),f+=h.items.map(m=>m.className).join(" "),u=a+h.length;f+=t.slice(u)}else{f=t;for(const[u,a]of c)f.overwrite(u,u+a.length,a.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:c,get expanded(){return f.toString()}}}function ot(t,e=["-",":"],n=5){const s=it(t,e,n);return typeof t=="string"?s.expanded:t}const se=new Set;function we(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}const at=/[\\:]?[\s'"`;{}]+/g;function ct(t){return t.split(at)}const lt={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return ct(t)}};function ft(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const K="default",X="preflights",ut="shortcuts",ht="imports",dt={[ht]:-200,[X]:-100,[ut]:-10,[K]:0};function ve(t){return k(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function pt(t){let e=typeof t=="function"?t():t;if(ie in e)return e;e={...e},Object.defineProperty(e,ie,{value:!0,enumerable:!1});const n=e.shortcuts?ve(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=k(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function be(t){const e=pt(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(k).flatMap(be);return[e,...n]}function oe(t={},e={}){const n=Object.assign({},e,t),s=Ue((n.presets||[]).flatMap(k).flatMap(be),(l,v)=>l.name===v.name),r=[...s.filter(l=>l.enforce==="pre"),...s.filter(l=>!l.enforce),...s.filter(l=>l.enforce==="post")],i=[...r,n],o=[...i].reverse(),c=Object.assign({},dt,...i.map(l=>l.layers));function f(l){return H(i.flatMap(v=>k(v[l]||[])))}const u=f("extractors");let a=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;a===void 0&&(a=lt),a&&!u.includes(a)&&u.unshift(a),u.sort((l,v)=>(l.order||0)-(v.order||0));const h=f("rules"),m={},g=h.length,_=h.map((l,v)=>{if(We(l)){k(l[2]?.prefix||"").forEach(A=>{m[A+l[0]]=[v,l[1],l[2],l]});return}return[v,...l]}).filter(Boolean).reverse();let p=mt(i.map(l=>l.theme));const d=f("extendTheme");for(const l of d)p=l(p)||p;const x={templates:H(i.flatMap(l=>k(l.autocomplete?.templates))),extractors:i.flatMap(l=>k(l.autocomplete?.extractors)).sort((l,v)=>(l.order||0)-(v.order||0)),shorthands:gt(i.map(l=>l.autocomplete?.shorthands||{}))};let w=f("separators");w.length||(w=[":","-"]);const S={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:l=>l,...n,presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:c,theme:p,rulesSize:g,rulesDynamic:_,rulesStaticMap:m,preprocess:f("preprocess"),postprocess:f("postprocess"),preflights:f("preflights"),autocomplete:x,variants:f("variants").map(qe).sort((l,v)=>(l.order||0)-(v.order||0)),shortcuts:ve(f("shortcuts")).reverse(),extractors:u,safelist:f("safelist"),separators:w,details:n.details??n.envMode==="dev"};for(const l of i)l?.configResolved?.(S);return S}function mt(t){return t.map(e=>e?B(e):{}).reduce((e,n)=>ge(e,n),{})}function gt(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}const yt="0.56.5";var wt=Object.defineProperty,vt=(t,e,n)=>e in t?wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e,n)=>(vt(t,typeof e!="symbol"?e+"":e,n),n);class bt{constructor(e={},n={}){this.userConfig=e,this.defaults=n,F(this,"version",yt),F(this,"_cache",new Map),F(this,"config"),F(this,"blocked",new Set),F(this,"parentOrders",new Map),F(this,"events",ft()),this.config=oe(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=oe(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(q(o)&&q(s))for(const c of o)s.setCount(c,s.getCount(c)+o.getCount(c));else for(const c of o)s.add(c)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const u of this.config.preprocess)r=u(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const c=await this.expandShortcut(o.currentSelector,o),f=c?await this.stringifyShortcuts(o.variantMatch,o,c[0],c[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(Ke);if(f?.length)return this._cache.set(s,f),f;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:c=!1,extendedInfo:f=!1}=n,u=O(e)?await this.applyExtractors(e,s,f?new ye:new Set):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(l=>{u.has(l)||u.add(l)});const a=c?"":`
|
|
1
|
+
import{$ as Se}from"./entry.12ac938b.js";const xe=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ue=Object.freeze({...xe,...U}),$e=Object.freeze({...ue,body:"",hidden:!1}),_e=Object.freeze({width:null,height:null}),he=Object.freeze({..._e,...U});function Ce(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function J(t,e){const n=Ce(t,e);for(const s in $e)s in U?s in t&&!(s in n)&&(n[s]=U[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function Ae(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const c=s[o]&&s[o].parent,f=c&&i(c);f&&(r[o]=[c].concat(f))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function Q(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(c){i=J(s[c]||r[c],i)}return o(e),n.forEach(o),J(t,i)}function Oe(t,e){if(t.icons[e])return Q(t,e,[]);const n=Ae(t,[e])[e];return n?Q(t,e,n):null}const Me=/(-?[0-9.]*[0-9]+[0-9.]*)/g,je=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ee(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(Me);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=je.test(i);for(;;){if(o){const c=parseFloat(i);isNaN(c)?r.push(i):r.push(Math.ceil(c*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function Ee(t){let e="";const n=t.indexOf("<defs");for(;n>=0;){const s=t.indexOf(">",n),r=t.indexOf("</defs");if(s===-1||r===-1)break;const i=t.indexOf(">",r);if(i===-1)break;e+=t.slice(s+1,r).trim(),t=t.slice(0,n).trim()+t.slice(i+1)}return{defs:e,content:t}}function ke(t,e){return t?"<defs>"+t+"</defs>"+e:e}function Pe(t,e,n){const s=Ee(t);return ke(s.defs,e+s.content+n)}const Z=t=>t==="unset"||t==="undefined"||t==="none";function Le(t,e){const n={...ue,...t},s={...he,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(p=>{const d=[],x=p.hFlip,w=p.vFlip;let S=p.rotate;x?w?S+=2:(d.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),d.push("scale(-1 1)"),r.top=r.left=0):w&&(d.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),d.push("scale(1 -1)"),r.top=r.left=0);let l;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:l=r.height/2+r.top,d.unshift("rotate(90 "+l.toString()+" "+l.toString()+")");break;case 2:d.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:l=r.width/2+r.left,d.unshift("rotate(-90 "+l.toString()+" "+l.toString()+")");break}S%2===1&&(r.left!==r.top&&(l=r.left,r.left=r.top,r.top=l),r.width!==r.height&&(l=r.width,r.width=r.height,r.height=l)),d.length&&(i=Pe(i,'<g transform="'+d.join(" ")+'">',"</g>"))});const o=s.width,c=s.height,f=r.width,u=r.height;let a,h;o===null?(h=c===null?"1em":c==="auto"?u:c,a=ee(h,f/u)):(a=o==="auto"?f:o,h=c===null?ee(a,u/f):c==="auto"?u:c);const m={},g=(p,d)=>{Z(d)||(m[p]=d.toString())};g("width",a),g("height",h);const _=[r.left,r.top,f,u];return m.viewBox=_.join(" "),{attributes:m,viewBox:_,body:i}}function ze(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').trim()}const Te=/\swidth\s*=\s*["'](\w+)["']/,Ie=/\sheight\s*=\s*["'](\w+)["']/,G=/<svg\s+/;function Fe(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const c=o.exec(s),f=c!=null,u=e[i];return!u&&!Z(u)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):c&&(e[i]=c[1])),f};return[r("width",Te),r("height",Ie)]}async function de(t,e,n,s,r,i){const{scale:o,addXmlNs:c=!1}=s??{},{additionalProps:f={},iconCustomizer:u}=s?.customizations??{},a=await r?.()??{};await u?.(e,n,a),Object.keys(f).forEach(p=>{const d=f[p];d!=null&&(a[p]=d)}),i?.(a);const[h,m]=Fe(t,a,o);c&&(!t.includes("xmlns=")&&!a.xmlns&&(a.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!a["xmlns:xlink"]&&(a["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const g=Object.keys(a).map(p=>p==="width"&&h||p==="height"&&m?null:`${p}="${a[p]}"`).filter(p=>p!=null);if(g.length&&(t=t.replace(G,`<svg ${g.join(" ")} `)),s){const{defaultStyle:p,defaultClass:d}=s;d&&!t.includes("class=")&&(t=t.replace(G,`<svg class="${d}" `)),p&&!t.includes("style=")&&(t=t.replace(G,`<svg style="${p}" `))}const _=s?.usedProps;return _&&(Object.keys(f).forEach(p=>{const d=a[p];d!=null&&(_[p]=d)}),typeof a.width<"u"&&a.width!==null&&(_.width=a.width),typeof a.height<"u"&&a.height!==null&&(_.height=a.height)),t}async function te(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await de(s?.customizations?.trimCustomSvg===!0?ze(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function pe(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=Oe(t,o),r){let c={...he};typeof i=="function"&&(c=i(c));const{attributes:{width:f,height:u,...a},body:h}=Le(r,c),m=s?.scale;return await de(`<svg >${h}</svg>`,e,o,s,()=>({...a}),g=>{const _=(p,d)=>{const x=g[p];let w;if(!Z(x)){if(x)return;typeof m=="number"?m&&(w=`${m}em`):w=d}w?g[p]=w:delete g[p]};_("width",f),_("height",u)})}}const me=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await te(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await pe(r,t,i,n)}}}else return await te(s,t,e,n)};function Re(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ne=["academicons","akar-icons","ant-design","arcticons","basil","bi","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols","mdi-light","mdi","medical-icon","memory","mi","mingcute","mono-icons","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const Ve=Re(Ne);function De(t){const e=new Map;function n(s){if(Ve.includes(s))return e.has(s)||e.set(s,Se(`${t}@iconify-json/${s}/icons.json`)),e.get(s)}return async(s,r,i)=>{let o=await me(s,r,i);if(o)return o;const c=await n(s);if(c){const f=[r,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r.replace(/([a-z])(\d+)/g,"$1-$2")];o=await pe(c,s,f,i)}return o}}function Be(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const W=Be;function k(t=[]){return Array.isArray(t)?t:[t]}function H(t){return Array.from(new Set(t))}function Ue(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function O(t){return typeof t=="string"}function R(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function He(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>R(e)):[t]:[R(t)]}function Ge(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function Y(t){return t==null?"":Ge(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function V(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ge(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return V(s)&&V(r)&&Object.keys(r).forEach(o=>{V(s[o])&&V(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ge(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function B(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:B(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}return t}function We(t){return O(t[0])}function Ye(t){return O(t[0])}const ne="$$shortcut-no-merge";function qe(t){return typeof t=="function"?{match:t}:t}function re(t){return t.length===3}function Ke(t){return t!=null}function Xe(){}var Ze=Object.defineProperty,Je=(t,e,n)=>e in t?Ze(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qe=(t,e,n)=>(Je(t,typeof e!="symbol"?e+"":e,n),n);class et{constructor(){Qe(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}var tt=Object.defineProperty,nt=(t,e,n)=>e in t?tt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rt=(t,e,n)=>(nt(t,typeof e!="symbol"?e+"":e,n),n);class ye extends Set{constructor(e){super(e),rt(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(this._map=new Map),this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,n){return this._map.set(e,n),super.add(e)}}function q(t){return t instanceof ye}const D={};function st(t=["-",":"]){const e=t.join("|");return D[e]||(D[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),D[e].lastIndex=0,D[e]}function it(t,e=["-",":"],n=5){const s=st(e);let r,i=t.toString();const o=new Set,c=new Map;do r=!1,i=i.replace(s,(u,a,h,m,g)=>{if(!e.includes(h))return u;r=!0,o.add(a+h);const _=g+a.length+h.length+1,p={length:u.length,items:[]};c.set(g,p);for(const d of[...m.matchAll(/\S+/g)]){const x=_+d.index;let w=c.get(x)?.items;w?c.delete(x):w=[{offset:x,length:d[0].length,className:d[0]}];for(const S of w)S.className=S.className==="~"?a:S.className.replace(/^(!?)(.*)/,`$1${a}${h}$2`),p.items.push(S)}return"$".repeat(u.length)}),n-=1;while(r&&n);let f;if(typeof t=="string"){f="";let u=0;for(const[a,h]of c)f+=t.slice(u,a),f+=h.items.map(m=>m.className).join(" "),u=a+h.length;f+=t.slice(u)}else{f=t;for(const[u,a]of c)f.overwrite(u,u+a.length,a.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:c,get expanded(){return f.toString()}}}function ot(t,e=["-",":"],n=5){const s=it(t,e,n);return typeof t=="string"?s.expanded:t}const se=new Set;function we(t){se.has(t)||(console.warn("[unocss]",t),se.add(t))}const at=/[\\:]?[\s'"`;{}]+/g;function ct(t){return t.split(at)}const lt={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return ct(t)}};function ft(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const K="default",X="preflights",ut="shortcuts",ht="imports",dt={[ht]:-200,[X]:-100,[ut]:-10,[K]:0};function ve(t){return k(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const ie="_uno_resolved";function pt(t){let e=typeof t=="function"?t():t;if(ie in e)return e;e={...e},Object.defineProperty(e,ie,{value:!0,enumerable:!1});const n=e.shortcuts?ve(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=k(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function be(t){const e=pt(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(k).flatMap(be);return[e,...n]}function oe(t={},e={}){const n=Object.assign({},e,t),s=Ue((n.presets||[]).flatMap(k).flatMap(be),(l,v)=>l.name===v.name),r=[...s.filter(l=>l.enforce==="pre"),...s.filter(l=>!l.enforce),...s.filter(l=>l.enforce==="post")],i=[...r,n],o=[...i].reverse(),c=Object.assign({},dt,...i.map(l=>l.layers));function f(l){return H(i.flatMap(v=>k(v[l]||[])))}const u=f("extractors");let a=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;a===void 0&&(a=lt),a&&!u.includes(a)&&u.unshift(a),u.sort((l,v)=>(l.order||0)-(v.order||0));const h=f("rules"),m={},g=h.length,_=h.map((l,v)=>{if(We(l)){k(l[2]?.prefix||"").forEach(A=>{m[A+l[0]]=[v,l[1],l[2],l]});return}return[v,...l]}).filter(Boolean).reverse();let p=mt(i.map(l=>l.theme));const d=f("extendTheme");for(const l of d)p=l(p)||p;const x={templates:H(i.flatMap(l=>k(l.autocomplete?.templates))),extractors:i.flatMap(l=>k(l.autocomplete?.extractors)).sort((l,v)=>(l.order||0)-(v.order||0)),shorthands:gt(i.map(l=>l.autocomplete?.shorthands||{}))};let w=f("separators");w.length||(w=[":","-"]);const S={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:l=>l,...n,presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:c,theme:p,rulesSize:g,rulesDynamic:_,rulesStaticMap:m,preprocess:f("preprocess"),postprocess:f("postprocess"),preflights:f("preflights"),autocomplete:x,variants:f("variants").map(qe).sort((l,v)=>(l.order||0)-(v.order||0)),shortcuts:ve(f("shortcuts")).reverse(),extractors:u,safelist:f("safelist"),separators:w,details:n.details??n.envMode==="dev"};for(const l of i)l?.configResolved?.(S);return S}function mt(t){return t.map(e=>e?B(e):{}).reduce((e,n)=>ge(e,n),{})}function gt(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}const yt="0.56.5";var wt=Object.defineProperty,vt=(t,e,n)=>e in t?wt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e,n)=>(vt(t,typeof e!="symbol"?e+"":e,n),n);class bt{constructor(e={},n={}){this.userConfig=e,this.defaults=n,F(this,"version",yt),F(this,"_cache",new Map),F(this,"config"),F(this,"blocked",new Set),F(this,"parentOrders",new Map),F(this,"events",ft()),this.config=oe(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=oe(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(q(o)&&q(s))for(const c of o)s.setCount(c,s.getCount(c)+o.getCount(c));else for(const c of o)s.add(c)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const u of this.config.preprocess)r=u(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const c=await this.expandShortcut(o.currentSelector,o),f=c?await this.stringifyShortcuts(o.variantMatch,o,c[0],c[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(Ke);if(f?.length)return this._cache.set(s,f),f;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:c=!1,extendedInfo:f=!1}=n,u=O(e)?await this.applyExtractors(e,s,f?new ye:new Set):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(l=>{u.has(l)||u.add(l)});const a=c?"":`
|
|
2
2
|
`,h=new Set([K]),m=f?new Map:new Set,g=new Map;let _={};const p=Array.from(u).map(async l=>{if(m.has(l))return;const v=await this.parseToken(l);if(v!=null){m instanceof Map?m.set(l,{data:v,count:q(u)?u.getCount(l):-1}):m.add(l);for(const C of v){const A=C[3]||"",j=C[4]?.layer;g.has(A)||g.set(A,[]),g.get(A).push(C),j&&h.add(j)}}});await Promise.all(p),await(async()=>{if(!i)return;const l={generator:this,theme:this.config.theme},v=new Set([]);this.config.preflights.forEach(({layer:C=X})=>{h.add(C),v.add(C)}),_=Object.fromEntries(await Promise.all(Array.from(v).map(async C=>{const j=(await Promise.all(this.config.preflights.filter(L=>(L.layer||X)===C).map(async L=>await L.getCSS(l)))).filter(Boolean).join(a);return[C,j]})))})();const d=this.config.sortLayers(Array.from(h).sort((l,v)=>(this.config.layers[l]??0)-(this.config.layers[v]??0)||l.localeCompare(v))),x={},w=l=>{if(x[l])return x[l];let v=Array.from(g).sort((A,j)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(j[0])??0)||A[0]?.localeCompare(j[0]||"")||0).map(([A,j])=>{const L=j.length,I=j.filter(y=>(y[4]?.layer||K)===l).sort((y,$)=>y[0]-$[0]||(y[4]?.sort||0)-($[4]?.sort||0)||y[5]?.currentSelector?.localeCompare($[5]?.currentSelector??"")||y[1]?.localeCompare($[1]||"")||y[2]?.localeCompare($[2]||"")||0).map(([,y,$,,M,,E])=>[[[(y&&_t(y,r))??"",M?.sort??0]],$,!!(E??M?.noMerge)]);if(!I.length)return;const N=I.reverse().map(([y,$,M],E)=>{if(!M&&this.config.mergeSelectors)for(let T=E+1;T<L;T++){const P=I[T];if(P&&!P[2]&&(y&&P[0]||y==null&&P[0]==null)&&P[1]===$)return y&&P[0]&&P[0].push(...y),null}const z=y?H(y.sort((T,P)=>T[1]-P[1]||T[0]?.localeCompare(P[0]||"")||0).map(T=>T[0]).filter(Boolean)):[];return z.length?`${z.join(`,${a}`)}{${$}}`:$}).filter(Boolean).reverse().join(a);if(!A)return N;const b=A.split(" $$ ");return`${b.join("{")}{${a}${N}${a}${"}".repeat(b.length)}`}).filter(Boolean).join(a);i&&(v=[_[l],v].filter(Boolean).join(a));const C=c?"":`/* layer: ${l} */${a}`;return x[l]=v?C+v:""},S=(l=d,v)=>l.filter(C=>!v?.includes(C)).map(C=>w(C)||"").filter(Boolean).join(a);return{get css(){return S()},layers:d,matched:m,getLayers:S,getLayer:w}}async matchVariants(e,n){const s=new Set,r=[];let i=n||e,o=!0;const c={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(const f of this.config.variants){if(!f.multiPass&&s.has(f))continue;let u=await f.match(i,c);if(u){if(O(u)){if(u===i)continue;u={matcher:u}}i=u.matcher,r.unshift(u),s.add(f),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,r,s]}applyVariants(e,n=e[4],s=e[1]){const i=n.slice().sort((u,a)=>(u.order||0)-(a.order||0)).reduceRight((u,a)=>h=>{const m=a.body?.(h.entries)||h.entries,g=Array.isArray(a.parent)?a.parent:[a.parent,void 0];return(a.handle??At)({...h,entries:m,selector:a.selector?.(h.selector,m)||h.selector,parent:g[0]||h.parent,parentOrder:g[1]||h.parentOrder,layer:a.layer||h.layer,sort:a.sort||h.sort},u)},u=>u)({prefix:"",selector:Ct(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:c}=i;o!=null&&c!=null&&this.parentOrders.set(o,c);const f={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const u of this.config.postprocess)u(f);return f}constructCustomCSS(e,n,s){const r=R(n);if(O(r))return r;const{selector:i,entries:o,parent:c}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),f=`${i}{${Y(o)}}`;return c?`${c}{${f}}`:f}async parseUtil(e,n,s=!1,r){const[i,o,c]=O(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const f=this.config.rulesStaticMap[o];if(f&&f[1]&&(s||!f[2]?.internal)){this.config.details&&n.rules.push(f[3]);const a=f[0],h=R(f[1]),m=f[2];return O(h)?[[a,h,m]]:[[a,i,h,m,c]]}n.variantHandlers=c;const{rulesDynamic:u}=this.config;for(const[a,h,m,g]of u){if(g?.internal&&!s)continue;let _=o;if(g?.prefix){const w=k(g.prefix);if(r){const S=k(r);if(!w.some(l=>S.includes(l)))continue}else{const S=w.find(l=>o.startsWith(l));if(S==null)continue;_=o.slice(S.length)}}const p=_.match(h);if(!p)continue;const d=await m(p,n);if(!d)continue;this.config.details&&n.rules.push([h,m,g]);const x=He(d).filter(w=>w.length);if(x.length)return x.map(w=>O(w)?[a,w,g]:[a,i,w,g,c])}}stringifyUtil(e,n){if(!e)return;if(re(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?n:void 0,void 0];const{selector:s,entries:r,parent:i,layer:o,sort:c,noMerge:f}=this.applyVariants(e),u=Y(r);if(!u)return;const{layer:a,sort:h,...m}=e[3]??{},g={...m,layer:o??a,sort:c??h};return[e[0],s,u,i,g,this.config.details?n:void 0,f]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?c=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(c)}:Xe;let i,o;for(const c of this.config.shortcuts){let f=e;if(c[2]?.prefix){const a=k(c[2].prefix).find(h=>e.startsWith(h));if(a==null)continue;f=e.slice(a.length)}if(Ye(c)){if(c[0]===f){i=i||c[2],o=c[1],r(c);break}}else{const u=f.match(c[0]);if(u&&(o=c[1](u,n)),o){i=i||c[2],r(c);break}}}if(O(o)&&(o=ot(o.trim()).split(/\s+/g)),!o){const[c,f]=O(e)?await this.matchVariants(e):e;if(c!==f){const u=await this.expandShortcut(f,n,s-1);u&&(o=u[0].map(a=>O(a)?c.replace(f,a):a))}}if(o)return[(await Promise.all(o.map(async c=>(O(c)?(await this.expandShortcut(c,n,s-1))?.[0]:void 0)||[c]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,n,s,r={layer:this.config.shortcutsLayer}){const i=new et,o=(await Promise.all(H(s).map(async a=>{const h=O(a)?await this.parseUtil(a,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",R(a),void 0,[]]];return!h&&this.config.warn&&we(`unmatched utility "${a}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((a,h)=>a[0]-h[0]),[c,,f]=e,u=[];for(const a of o){if(re(a)){u.push([a[0],void 0,a[1],void 0,a[2],n,void 0]);continue}const{selector:h,entries:m,parent:g,sort:_,noMerge:p}=this.applyVariants(a,[...a[4],...f],c);i.getFallback(h,g,[[],a[0]])[0].push([m,!!(p??a[3]?.noMerge),_??0])}return u.concat(i.map(([a,h],m,g)=>{const _=(d,x,w)=>{const S=Math.max(...w.map(v=>v[1])),l=w.map(v=>v[0]);return(d?[l.flat(1)]:l).map(v=>{const C=Y(v);if(C)return[h,m,C,g,{...r,noMerge:x,sort:S},n,void 0]})};return[[a.filter(([,d])=>d).map(([d,,x])=>[d,x]),!0],[a.filter(([,d])=>!d).map(([d,,x])=>[d,x]),!1]].map(([d,x])=>[..._(!1,x,d.filter(([w])=>w.some(S=>S[0]===ne))),..._(!0,x,d.filter(([w])=>w.every(S=>S[0]!==ne)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(n=>typeof n=="function"?n(e):O(n)?n===e:n.test(e))}}function St(t,e){return new bt(t,e)}const xt=/\s\$\$\s+/g;function $t(t){return t.match(/\s\$\$\s/)}function _t(t,e){return $t(t)?t.replace(xt,e?` ${e} `:" "):e?`${e} ${t}`:t}const ae=/^\[(.+?)(~?=)"(.*)"\]$/;function Ct(t){return ae.test(t)?t.replace(ae,(e,n,s,r)=>`[${W(n)}${s}"${W(r)}"]`):`.${W(t)}`}function At(t,e){return e(t)}function Ot(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Mt(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),Ot(e)}const jt=3;function Et(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:c={},customizations:f={},autoInstall:u=!1,layer:a="icons",unit:h}=e,m={addXmlNs:!0,scale:n,customCollections:o,autoInstall:u,warn:void 0,customizations:{...f,additionalProps:{...c},trimCustomSvg:!0,async iconCustomizer(_,p,d){await f.iconCustomizer?.(_,p,d),h&&(d.width||(d.width=`${n}${h}`),d.height||(d.height=`${n}${h}`))}}};let g;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([_,p,d=s])=>{let x="",w="",S;g=g||await t(e);const l={};if(p.includes(":"))[x,w]=p.split(":"),S=await g(x,w,{...m,usedProps:l});else{const C=p.split(/-/g);for(let A=jt;A>=1&&(x=C.slice(0,A).join("-"),w=C.slice(A).join("-"),S=await g(x,w,{...m,usedProps:l}),!S);A--);}if(!S){i&&we(`failed to load icon "${_}"`);return}const v=`url("data:image/svg+xml;utf8,${Mt(S)}")`;return d==="auto"&&(d=S.includes("currentColor")?"mask":"bg"),d==="mask"?{"--un-icon":v,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...l}:{background:`${v} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...l}},{layer:a,prefix:r}]]}}}const kt=Et(async t=>{const{cdn:e}=t;return e?De(e):me});function Pt(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function ce(t){return t.charAt(0).toUpperCase()+t.slice(1)}function le(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var fe=["Webkit","Moz","ms"];function Lt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=Pt(s);if(i!=="filter"&&i in t)return e[s]=le(i);i=ce(i);for(let o=0;o<fe.length;o++){const c=`${fe[o]}${i}`;if(c in t)return e[s]=le(ce(c))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function zt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function Tt(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,n=window.document,s=()=>n.documentElement,r=e.__unocss||{},i=Object.assign({},t,r.runtime),o=i.defaults||{},c=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=k(o.postprocess)).unshift(Lt(n.createElement("div").style)),i.configResolved?.(r,o);const f=St(r,o),u=b=>i.inject?i.inject(b):s().prepend(b),a=new Map;let h=!0,m=new Set,g,_,p=[];const d=()=>new Promise(b=>{p.push(b),_!=null&&clearTimeout(_),_=setTimeout(()=>S().then(()=>{const y=p;p=[],y.forEach($=>$())}),0)});function x(b){if(b.nodeType!==1)return;const y=b;y.hasAttribute(c)&&y.removeAttribute(c),y.querySelectorAll(`[${c}]`).forEach($=>{$.removeAttribute(c)})}function w(b,y){let $=a.get(b);if(!$)if($=n.createElement("style"),$.setAttribute("data-unocss-runtime-layer",b),a.set(b,$),y==null)u($);else{const M=w(y),E=M.parentNode;E?E.insertBefore($,M.nextSibling):u($)}return $}async function S(){const b=await f.generate(m);return b.layers.reduce((y,$)=>(w($,y).innerHTML=b.getLayer($)??"",$),void 0),m=b.matched,{...b,getStyleElement:y=>a.get(y),getStyleElements:()=>a}}async function l(b){const y=m.size;await f.applyExtractors(b,void 0,m),y!==m.size&&await d()}async function v(){const b=n.body,y=b&&b.outerHTML;y&&(await l(`${y} ${zt(y)}`),x(s()),x(b))}const C=new MutationObserver(b=>{h||b.forEach(async y=>{if(y.target.nodeType!==1)return;const $=y.target;for(const M of a)if($===M[1])return;if(y.type==="childList")y.addedNodes.forEach(async M=>{if(M.nodeType!==1)return;const E=M;g&&!g(E)||(await l(E.outerHTML),x(E))});else{if(g&&!g($))return;if(y.attributeName!==c){const M=Array.from($.attributes).map(z=>z.value?`${z.name}="${z.value}"`:z.name).join(" "),E=`<${$.tagName.toLowerCase()} ${M}>`;await l(E)}$.hasAttribute(c)&&$.removeAttribute(c)}})});let A=!1;function j(){if(A)return;const b=i.observer?.target?i.observer.target():s()||n.body;b&&(C.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),A=!0)}function L(){i.bypassDefined&&It(f.blocked),v(),j()}function I(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",L):L()}const N=e.__unocss_runtime=e.__unocss_runtime={version:f.version,uno:f,async extract(b){O(b)||(b.forEach(y=>m.add(y)),b=""),await l(b)},extractAll:v,inspect(b){g=b},toggleObserver(b){b===void 0?h=!h:h=!!b,!A&&!h&&I()},update:S};i.ready?.(N)!==!1&&(h=!1,I())}function It(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets[e];let s;try{if(s=n.cssRules||n.rules,!s)continue;Array.from(s).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),t.add(r))})}catch{continue}}return t}Tt({defaults:{presets:[kt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as D}from"./NNavbar.vue.5fed0fd7.js";import{_ as S}from"./NCodeBlock.vue.2de294a4.js";import{o as c,m as _,k as s,d as B,r as v,bG as j,bH as G,ax as P,a as p,af as E,i as l,j as u,F as f,S as H,f as i,l as I,n as R,t as h,G as U,h as W,am as z,A}from"./entry.12ac938b.js";import{_ as L}from"./HelpFab.vue.891b009b.js";import"./client.f2b385ce.js";const q={class:"markdown-body"},J=s("h1",null,"Virtual Files",-1),K=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[J,K],O={__name:"virtual-files",setup(x,{expose:n}){return n({frontmatter:{}}),(d,a)=>(c(),_("div",q,M))}},Q=["onClick"],T=s("div",{"x-divider":""},null,-1),X={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},Z=s("span",{op75:""},"Select a file to start",-1),re=B({__name:"virtual-files",setup(x){const n=v(""),o=j(),d=G(),a=v();P(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function y(e){if(o.value?.rootDir)return e.startsWith(o.value?.rootDir)?e.slice(o.value.rootDir.length):e}const m=p(()=>o.value?o.value.entries.filter(e=>!e.id.startsWith(`${o.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=p(()=>new E(m.value,{keys:["id","path"]})),b=p(()=>n.value?k.value.search(n.value).map(e=>e.item):m.value);return(e,t)=>{const g=D,$=S,C=z,F=A,N=H,V=O,w=L;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(g,{search:i(n),"onUpdate:search":t[0]||(t[0]=r=>I(n)?n.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,R(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:U(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:ee=>d.value=r.id},h(y(r.id)),11,Q),T],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",X,[s("div",Y,[s("code",null,h(i(a).id),1)]),l($,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),W(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[Z]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{re as default};
|