@nuxt/devtools 4.0.0-alpha.8 → 4.0.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/analyze-build.mjs +1 -1
  3. package/dist/chunks/code-server.mjs +75 -0
  4. package/dist/chunks/module-main.mjs +29 -8
  5. package/dist/chunks/vite-inspect.mjs +1 -1
  6. package/dist/client/200.html +1 -1
  7. package/dist/client/404.html +1 -1
  8. package/dist/client/_nuxt/__blank-e7n6afwb.js +1 -0
  9. package/dist/client/_nuxt/analyze-build-hl5kov9g.js +1 -0
  10. package/dist/client/_nuxt/assets-mhs93a2v.js +6 -0
  11. package/dist/client/_nuxt/{auth-required-panel-gdnspumn.js → auth-required-panel-fp6njgq4.js} +1 -1
  12. package/dist/client/_nuxt/builds/latest.json +1 -1
  13. package/dist/client/_nuxt/builds/meta/f408df35-fbed-4f67-b31a-84e2dcf7d5f4.json +1 -0
  14. package/dist/client/_nuxt/{client-ngo84kjy.js → client-e4xweo15.js} +1 -1
  15. package/dist/client/_nuxt/client-ox3ztino.js +2 -0
  16. package/dist/client/_nuxt/code-diff-g3koa3wx.js +8 -0
  17. package/dist/client/_nuxt/{code-snippets-hxwvpad4.js → code-snippets-jiqnd4op.js} +1 -1
  18. package/dist/client/_nuxt/components-jjqi3963.js +1 -0
  19. package/dist/client/_nuxt/{composable-item-kchrxdzu.js → composable-item-nslyhu40.js} +1 -1
  20. package/dist/client/_nuxt/{composables-in7qtp0e.js → composables-jsh6xr6n.js} +1 -1
  21. package/dist/client/_nuxt/custom-_name_-nby2wkqs.js +1 -0
  22. package/dist/client/_nuxt/{data-schema-button-jy2w2afg.js → data-schema-button-n858k5no.js} +1 -1
  23. package/dist/client/_nuxt/data-schema-drawer-nd5v2dc8.js +2 -0
  24. package/dist/client/_nuxt/{debug-inf9k7rz.js → debug-iqz97avh.js} +1 -1
  25. package/dist/client/_nuxt/{default-dgqm22gk.js → default-kms351ji.js} +1 -1
  26. package/dist/client/_nuxt/{duration-display-m84jv0cg.js → duration-display-kvy6t3q5.js} +1 -1
  27. package/dist/client/_nuxt/entry.css-hsdbnv92.css +1 -0
  28. package/dist/client/_nuxt/{error-404-eoz73pl9.js → error-404-m7lxn6po.js} +1 -1
  29. package/dist/client/_nuxt/error-404.css-kodsrozu.css +1 -0
  30. package/dist/client/_nuxt/{error-500-h0agvsjp.js → error-500-fa1284ej.js} +1 -1
  31. package/dist/client/_nuxt/error-500.css-mq6ubyvk.css +1 -0
  32. package/dist/client/_nuxt/{error-h5jfp4d9.js → error-dnpxky1s.js} +1 -1
  33. package/dist/client/_nuxt/{filepath-item-b7ye3und.js → filepath-item-elq07qqm.js} +1 -1
  34. package/dist/client/_nuxt/full-muovlha1.js +1 -0
  35. package/dist/client/_nuxt/{help-fab-l6k9jkcj.js → help-fab-mk77l527.js} +1 -1
  36. package/dist/client/_nuxt/hooks-fuegc0zi.js +1 -0
  37. package/dist/client/_nuxt/{imports-ib3kw7ns.js → imports-dxp64giy.js} +1 -1
  38. package/dist/client/_nuxt/launch-page-ldhzltru.js +1 -0
  39. package/dist/client/_nuxt/mbruyqke.js +4 -0
  40. package/dist/client/_nuxt/modules-ip395o4i.js +1 -0
  41. package/dist/client/_nuxt/nbadge-odjar6lb.js +1 -0
  42. package/dist/client/_nuxt/ncheckbox-ecu968cz.js +1 -0
  43. package/dist/client/_nuxt/{ncode-block-jv3jk7c5.js → ncode-block-ivymjiov.js} +1 -1
  44. package/dist/client/_nuxt/ndrawer-fbwc78mp.js +1 -0
  45. package/dist/client/_nuxt/ndropdown-j9whus4q.js +1 -0
  46. package/dist/client/_nuxt/{nicon-title-66kg2f9l.js → nicon-title-lthyup78.js} +1 -1
  47. package/dist/client/_nuxt/{nlink-gej31v24.js → nlink-iv6gnrhx.js} +1 -1
  48. package/dist/client/_nuxt/{nmarkdown-nskcr8pg.js → nmarkdown-mbwbivxu.js} +1 -1
  49. package/dist/client/_nuxt/{nnavbar-bvq6rk5u.js → nnavbar-ivws4py6.js} +1 -1
  50. package/dist/client/_nuxt/none-f6zkixpn.js +1 -0
  51. package/dist/client/_nuxt/npanel-grids-jzjbt8z8.js +1 -0
  52. package/dist/client/_nuxt/nsection-block-xwt9b4fq.js +1 -0
  53. package/dist/client/_nuxt/nselect-efk0r1bm.js +1 -0
  54. package/dist/client/_nuxt/nselect-tabs-o18hum8e.js +1 -0
  55. package/dist/client/_nuxt/nsplit-pane-nl6gqw3a.js +1 -0
  56. package/dist/client/_nuxt/nsplit-pane.css-o64elxn9.css +1 -0
  57. package/dist/client/_nuxt/{ntip-kpuxzuo5.js → ntip-e476flgx.js} +1 -1
  58. package/dist/client/_nuxt/{nuxt-hqfu72u1.js → nuxt-ck1m833g.js} +1 -1
  59. package/dist/client/_nuxt/open-graph-fevqc4qw.js +3 -0
  60. package/dist/client/_nuxt/overview-mov3ns5a.js +1 -0
  61. package/dist/client/_nuxt/pages-hl3ggxo7.js +1 -0
  62. package/dist/client/_nuxt/payload-i1xm1c2a.js +1 -0
  63. package/dist/client/_nuxt/{pinia-dl2li4zl.js → pinia-j5ib0mm9.js} +1 -1
  64. package/dist/client/_nuxt/plugins-dmozf1ud.js +1 -0
  65. package/dist/client/_nuxt/{ready-if1s6ugr.js → ready-mci0xx49.js} +1 -1
  66. package/dist/client/_nuxt/render-tree-ht6m4wvr.js +1 -0
  67. package/dist/client/_nuxt/runtime-configs-lwkz00jf.js +1 -0
  68. package/dist/client/_nuxt/server-route-inputs-oyv7niet.js +1 -0
  69. package/dist/client/_nuxt/server-routes-e2av60g4.js +7 -0
  70. package/dist/client/_nuxt/server-tasks-jdi82ndh.js +1 -0
  71. package/dist/client/_nuxt/settings-nqvn74vj.js +1 -0
  72. package/dist/client/_nuxt/splitpanes.esm-e6jbjw2k.js +1 -0
  73. package/dist/client/_nuxt/{stacktrace-list-epxhdumx.js → stacktrace-list-bw2f6i1o.js} +1 -1
  74. package/dist/client/_nuxt/state-components-frowf3zr.js +1 -0
  75. package/dist/client/_nuxt/state-editor-dnnm0b1r.js +1 -0
  76. package/dist/client/_nuxt/state-modules-b9ourhpx.js +1 -0
  77. package/dist/client/_nuxt/storage-dtuxyb3g.js +1 -0
  78. package/dist/client/_nuxt/storage-options-o7q1mchx.js +1 -0
  79. package/dist/client/_nuxt/timeline-dtcyzchh.js +31 -0
  80. package/dist/client/_nuxt/{unocss-runtime-dh4insrr.js → unocss-runtime-l66gafm5.js} +1 -1
  81. package/dist/client/_nuxt/utils-d9q1xry0.js +1 -0
  82. package/dist/client/_nuxt/vendor/{json-editor-vue-c7zwcfg4.js → json-editor-vue-l1ffxhko.js} +2 -2
  83. package/dist/client/_nuxt/vendor/{unocss-maavuy8p.js → unocss-b56v4bpd.js} +1 -1
  84. package/dist/client/_nuxt/virtual-files-odf1l0xb.js +1 -0
  85. package/dist/client/_nuxt/vue-devtools-bho31pmk.js +4 -0
  86. package/dist/client/_nuxt/{vue-router-mro49nyg.js → vue-router-d5qsebus.js} +1 -1
  87. package/dist/client/index.html +1 -1
  88. package/dist/module.json +1 -1
  89. package/dist/module.mjs +1 -1
  90. package/dist/runtime/plugins/view/client.js +6 -4
  91. package/dist/shared/{devtools.B9TxdMuu.mjs → devtools.CCWq4fFE.mjs} +3 -9
  92. package/package.json +9 -12
  93. package/dist/chunks/vscode.mjs +0 -169
  94. package/dist/client/_nuxt/__blank-mr7fdmv7.js +0 -1
  95. package/dist/client/_nuxt/analyze-build-nemej5kd.js +0 -1
  96. package/dist/client/_nuxt/assets-cl372mus.js +0 -6
  97. package/dist/client/_nuxt/builds/meta/9ec1ff21-8126-4e86-bc50-039a1d3867c9.json +0 -1
  98. package/dist/client/_nuxt/code-diff-lkyoam09.js +0 -8
  99. package/dist/client/_nuxt/components-f9ckplr6.js +0 -1
  100. package/dist/client/_nuxt/custom-_name_-i8pdh231.js +0 -1
  101. package/dist/client/_nuxt/data-schema-drawer-liuhj385.js +0 -2
  102. package/dist/client/_nuxt/entry.css-ivisc4pv.css +0 -1
  103. package/dist/client/_nuxt/error-404.css-i7pin5fo.css +0 -1
  104. package/dist/client/_nuxt/error-500.css-4ikva5xr.css +0 -1
  105. package/dist/client/_nuxt/full-bc145h1r.js +0 -1
  106. package/dist/client/_nuxt/hooks-ce5n3mpx.js +0 -1
  107. package/dist/client/_nuxt/iefeupks.js +0 -4
  108. package/dist/client/_nuxt/launch-page-f3nbtoc4.js +0 -1
  109. package/dist/client/_nuxt/modules-gf4tkhai.js +0 -1
  110. package/dist/client/_nuxt/nbadge-254fd0s4.js +0 -1
  111. package/dist/client/_nuxt/ncheckbox-jr3c6e4e.js +0 -1
  112. package/dist/client/_nuxt/ndrawer-myfvks89.js +0 -1
  113. package/dist/client/_nuxt/ndropdown-jnrvla1s.js +0 -1
  114. package/dist/client/_nuxt/none-fcxnfo1z.js +0 -1
  115. package/dist/client/_nuxt/nsection-block-illvvuef.js +0 -1
  116. package/dist/client/_nuxt/nselect-hlo7a40m.js +0 -1
  117. package/dist/client/_nuxt/nselect-tabs-f47fcdsg.js +0 -1
  118. package/dist/client/_nuxt/nswitch-iey7gi9t.js +0 -1
  119. package/dist/client/_nuxt/open-graph-m35euip2.js +0 -3
  120. package/dist/client/_nuxt/overview-egkv3tit.js +0 -1
  121. package/dist/client/_nuxt/pages-ddqyzugj.js +0 -1
  122. package/dist/client/_nuxt/pages-n0i7aw4m.js +0 -1
  123. package/dist/client/_nuxt/payload-d6h8l8l2.js +0 -1
  124. package/dist/client/_nuxt/plugins-nhvbpqrg.js +0 -1
  125. package/dist/client/_nuxt/render-tree-h0xpx3p4.js +0 -1
  126. package/dist/client/_nuxt/rpc-jaaujnev.js +0 -1
  127. package/dist/client/_nuxt/runtime-configs-o91gwu2q.js +0 -1
  128. package/dist/client/_nuxt/server-route-inputs-ej6h9rh8.js +0 -1
  129. package/dist/client/_nuxt/server-routes-ocltmxje.js +0 -7
  130. package/dist/client/_nuxt/server-tasks-hhkstkby.js +0 -1
  131. package/dist/client/_nuxt/settings-i2ld0c8q.js +0 -1
  132. package/dist/client/_nuxt/state-components-eipbhsbn.js +0 -1
  133. package/dist/client/_nuxt/state-editor-ogobz58w.js +0 -1
  134. package/dist/client/_nuxt/state-modules-egymhwqw.js +0 -1
  135. package/dist/client/_nuxt/storage-cciny388.js +0 -1
  136. package/dist/client/_nuxt/storage-options-g42elkwy.js +0 -1
  137. package/dist/client/_nuxt/timeline-oese6i7t.js +0 -31
  138. package/dist/client/_nuxt/utils-h3uzf8s7.js +0 -2
  139. package/dist/client/_nuxt/virtual-files-pd2s0ff2.js +0 -1
  140. package/dist/client/_nuxt/vue-devtools-bxffe3ae.js +0 -4
@@ -1 +1 @@
1
- import{Ct as e,F as t,K as n,St as r,T as i,Tt as a,bt as o,j as s,jt as c,k as l,p as u,st as d}from"./vendor/json-editor-vue-c7zwcfg4.js";function f(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function p(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&f(e.default)}var m=Object.assign;function h(e,t){let n={};for(let r in t){let i=t[r];n[r]=_(i)?i.map(e):e(i)}return n}var g=()=>{},_=Array.isArray;function v(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var y=Symbol(``);function b(e,t){return m(Error(),{type:e,[y]:!0},t)}function x(e,t){return e instanceof Error&&y in e&&(t==null||!!(e.type&t))}var ee=Symbol(``),S=Symbol(``),te=Symbol(``),C=Symbol(``),ne=Symbol(``);function re(e){return s(C)}var w=typeof document<`u`,T=/#/g,ie=/&/g,E=/\//g,D=/=/g,ae=/\?/g,O=/\+/g,oe=/%5B/g,k=/%5D/g,A=/%5E/g,se=/%60/g,j=/%7B/g,M=/%7C/g,N=/%7D/g,P=/%20/g;function F(e){return e==null?``:encodeURI(``+e).replace(M,`|`).replace(oe,`[`).replace(k,`]`)}function ce(e){return F(e).replace(j,`{`).replace(N,`}`).replace(A,`^`)}function I(e){return F(e).replace(O,`%2B`).replace(P,`+`).replace(T,`%23`).replace(ie,`%26`).replace(se,"`").replace(j,`{`).replace(N,`}`).replace(A,`^`)}function L(e){return I(e).replace(D,`%3D`)}function le(e){return F(e).replace(T,`%23`).replace(ae,`%3F`)}function ue(e){return le(e).replace(E,`%2F`)}function R(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var z=/\/$/,B=e=>e.replace(z,``);function V(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=q(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:R(o)}}function de(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function H(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function fe(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&U(t.matched[r],n.matched[i])&&W(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function W(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!G(e[n],t[n]))return!1;return!0}function G(e,t){return _(e)?K(e,t):_(t)?K(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function K(e,t){return _(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function q(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var J={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function Y(e){if(!e)if(w){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),B(e)}var X=/^[^#]+#/;function pe(e,t){return e.replace(X,`#`)+t}function me(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Z=()=>({left:window.scrollX,top:window.scrollY});function he(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=me(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function ge(e,t){return(history.state?history.state.position-t:-1)+e}var _e=new Map;function ve(e,t){_e.set(e,t)}function ye(e){let t=_e.get(e);return _e.delete(e),t}function be(e){return typeof e==`string`||e&&typeof e==`object`}function xe(e){return typeof e==`string`||typeof e==`symbol`}function Se(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(O,` `),i=r.indexOf(`=`),a=R(i<0?r:r.slice(0,i)),o=i<0?null:R(r.slice(i+1));if(a in t){let e=t[a];_(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Ce(e){let t=``;for(let n in e){let r=e[n];if(n=L(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(_(r)?r.map(e=>e&&I(e)):[r&&I(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function we(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=_(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Q(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(b(4,{from:n,to:t})):e instanceof Error?c(e):be(e)?c(b(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Te(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(f(s)){let c=(s.__vccOpts||s)[t];c&&a.push($(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=p(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&$(c,n,r,o,e,i)()}))}}return a}function Ee(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>U(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>U(e,s))||i.push(s))}return[n,r,i]}var De=()=>location.protocol+`//`+location.host;function Oe(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),H(n,``)}return H(n,e)+r+i}function ke(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Oe(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(m({},e.state,{scroll:Z()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Ae(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Z():null}}function je(e){let{history:t,location:n}=window,r={value:Oe(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:De()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,m({},t.state,Ae(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=m({},i.value,t.state,{forward:e,scroll:Z()});a(o.current,o,!0),a(e,m({},Ae(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Me(e){e=Y(e);let t=je(e),n=ke(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=m({location:``,base:e,go:r,createHref:pe.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Ne(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Me(e)}var Pe={type:0,value:``},Fe=/[a-zA-Z0-9_]/;function Ie(e){if(!e)return[[]];if(e===`/`)return[[Pe]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Fe.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Le=`[^/]+?`,Re={sensitive:!1,strict:!1,start:!0,end:!0},ze=/[.+*?^${}()[\]/\\]/g;function Be(e,t){let n=m({},Re,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(ze,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Le;if(u!==Le){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(_(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=_(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Ve(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function He(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Ve(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Ue(r))return 1;if(Ue(i))return-1}return i.length-r.length}function Ue(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var We={strict:!1,end:!0,sensitive:!1};function Ge(e,t,n){let r=m(Be(Ie(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ke(e,t){let n=[],r=new Map;t=v(We,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Je(e);s.aliasOf=r&&r.record;let l=v(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Je(m({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Ge(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Xe(d)&&o(e.name)),et(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:g}function o(e){if(xe(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Qe(e,n);n.splice(t,0,e),e.record.name&&!Xe(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw b(1,{location:e});s=i.record.name,a=m(qe(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&qe(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw b(1,{location:e,currentLocation:t});s=i.record.name,a=m({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Ze(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function qe(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Je(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ye(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ye(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Xe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ze(e){return e.reduce((e,t)=>m(e,t.meta),{})}function Qe(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;He(e,t[i])<0?r=i:n=i+1}let i=$e(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function $e(e){let t=e;for(;t=t.parent;)if(et(t)&&He(e,t)===0)return t}function et({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tt(e){let t=s(te),n=s(C),r=u(()=>{let n=c(e.to);return t.resolve(n)}),i=u(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(U.bind(null,i));if(o>-1)return o;let s=ot(e[t-2]);return t>1&&ot(i)===s&&a[a.length-1].path!==s?a.findIndex(U.bind(null,e[t-2])):o}),a=u(()=>i.value>-1&&at(n.params,r.value.params)),o=u(()=>i.value>-1&&i.value===n.matched.length-1&&W(n.params,r.value.params));function l(n={}){if(it(n)){let n=t[c(e.replace)?`replace`:`push`](c(e.to)).catch(g);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:u(()=>r.value.href),isActive:a,isExactActive:o,navigate:l}}function nt(e){return e.length===1?e[0]:e}var rt=i({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:tt,setup(e,{slots:t}){let n=o(tt(e)),{options:r}=s(te),i=u(()=>({[st(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[st(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&nt(t.default(n));return e.custom?r:l(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function it(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function at(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!_(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function ot(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var st=(e,t,n)=>e??t??n,ct=i({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){let a=s(ne),o=u(()=>e.route||a.value),f=s(S,0),p=u(()=>{let e=c(f),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),h=u(()=>o.value.matched[p.value]);n(S,u(()=>p.value+1)),n(ee,h),n(ne,o);let g=r();return d(()=>[g.value,h.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!U(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let n=o.value,r=e.name,a=h.value,s=a&&a.components[r];if(!s)return lt(i.default,{Component:s,route:n});let c=a.props[r],u=l(s,m({},c?c===!0?n.params:typeof c==`function`?c(n):c:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[r]=null)},ref:g}));return lt(i.default,{Component:u,route:n})||u}}});function lt(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var ut=ct;function dt(n){let r=Ke(n.routes,n),i=n.parseQuery||Se,o=n.stringifyQuery||Ce,s=n.history,l=Q(),u=Q(),d=Q(),f=a(J),p=J;w&&n.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let v=h.bind(null,e=>``+e),y=h.bind(null,ue),ee=h.bind(null,R);function S(e,t){let n,i;return xe(e)?(n=r.getRecordMatcher(e),i=t):i=e,r.addRoute(i,n)}function re(e){let t=r.getRecordMatcher(e);t&&r.removeRoute(t)}function T(){return r.getRoutes().map(e=>e.record)}function ie(e){return!!r.getRecordMatcher(e)}function E(e,t){if(t=m({},t||f.value),typeof e==`string`){let n=V(i,e,t.path),a=r.resolve({path:n.path},t),o=s.createHref(n.fullPath);return m(n,a,{params:ee(a.params),redirectedFrom:void 0,href:o})}let n;if(e.path!=null)n=m({},e,{path:V(i,e.path,t.path).path});else{let r=m({},e.params);for(let e in r)r[e]??delete r[e];n=m({},e,{params:y(r)}),t.params=y(t.params)}let a=r.resolve(n,t),c=e.hash||``;a.params=v(ee(a.params));let l=de(o,m({},e,{hash:ce(c),path:a.path})),u=s.createHref(l);return m({fullPath:l,hash:c,query:o===Ce?we(e.query):e.query||{}},a,{redirectedFrom:void 0,href:u})}function D(e){return typeof e==`string`?V(i,e,f.value.path):m({},e)}function ae(e,t){if(p!==e)return b(8,{from:t,to:e})}function O(e){return A(e)}function oe(e){return O(m(D(e),{replace:!0}))}function k(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=D(i):{path:i},i.params={}),m({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function A(e,t){let n=p=E(e),r=f.value,i=e.state,a=e.force,s=e.replace===!0,c=k(n,r);if(c)return A(m(D(c),{state:typeof c==`object`?m({},i,c.state):i,force:a,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!a&&fe(o,r,n)&&(u=b(16,{to:l,from:r}),W(r,r,!0,!1)),(u?Promise.resolve(u):M(l,r)).catch(e=>x(e)?x(e,2)?e:U(e):B(e,l,r)).then(e=>{if(e){if(x(e,2))return A(m({replace:s},D(e.to),{state:typeof e.to==`object`?m({},i,e.to.state):i,force:a}),t||l)}else e=P(l,r,!0,s,i);return N(l,r,e),e})}function se(e,t){let n=ae(e,t);return n?Promise.reject(n):Promise.resolve()}function j(e){let t=q.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function M(e,t){let n,[r,i,a]=Ee(e,t);n=Te(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push($(r,e,t))});let o=se.bind(null,e,t);return n.push(o),X(n).then(()=>{n=[];for(let r of l.list())n.push($(r,e,t));return n.push(o),X(n)}).then(()=>{n=Te(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push($(r,e,t))});return n.push(o),X(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(_(r.beforeEnter))for(let i of r.beforeEnter)n.push($(i,e,t));else n.push($(r.beforeEnter,e,t));return n.push(o),X(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Te(a,`beforeRouteEnter`,e,t,j),n.push(o),X(n))).then(()=>{n=[];for(let r of u.list())n.push($(r,e,t));return n.push(o),X(n)}).catch(e=>x(e,8)?e:Promise.reject(e))}function N(e,t,n){d.list().forEach(r=>j(()=>r(e,t,n)))}function P(e,t,n,r,i){let a=ae(e,t);if(a)return a;let o=t===J,c=w?history.state:{};n&&(r||o?s.replace(e.fullPath,m({scroll:o&&c&&c.scroll},i)):s.push(e.fullPath,i)),f.value=e,W(e,t,n,o),U()}let F;function I(){F||=s.listen((e,t,n)=>{if(!Y.listening)return;let r=E(e),i=k(r,Y.currentRoute.value);if(i){A(m(i,{replace:!0,force:!0}),r).catch(g);return}p=r;let a=f.value;w&&ve(ge(a.fullPath,n.delta),Z()),M(r,a).catch(e=>x(e,12)?e:x(e,2)?(A(m(D(e.to),{force:!0}),r).then(e=>{x(e,20)&&!n.delta&&n.type===`pop`&&s.go(-1,!1)}).catch(g),Promise.reject()):(n.delta&&s.go(-n.delta,!1),B(e,r,a))).then(e=>{e||=P(r,a,!1),e&&(n.delta&&!x(e,8)?s.go(-n.delta,!1):n.type===`pop`&&x(e,20)&&s.go(-1,!1)),N(r,a,e)}).catch(g)})}let L=Q(),le=Q(),z;function B(e,t,n){U(e);let r=le.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function H(){return z&&f.value!==J?Promise.resolve():new Promise((e,t)=>{L.add([e,t])})}function U(e){return z||(z=!e,I(),L.list().forEach(([t,n])=>e?n(e):t()),L.reset()),e}function W(e,r,i,a){let{scrollBehavior:o}=n;if(!w||!o)return Promise.resolve();let s=!i&&ye(ge(e.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return t().then(()=>o(e,r,s)).then(t=>e===f.value&&t&&he(t)).catch(t=>e===f.value&&B(t,e,r))}let G=e=>s.go(e),K,q=new Set,Y={currentRoute:f,listening:!0,addRoute:S,removeRoute:re,clearRoutes:r.clearRoutes,hasRoute:ie,getRoutes:T,resolve:E,options:n,push:O,replace:oe,go:G,back:()=>G(-1),forward:()=>G(1),beforeEach:l.add,beforeResolve:u.add,afterEach:d.add,onError:le.add,isReady:H,install(t){t.component(`RouterLink`,rt),t.component(`RouterView`,ut),t.config.globalProperties.$router=Y,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>c(f)}),w&&!K&&f.value===J&&(K=!0,O(s.location).catch(e=>{}));let n={};for(let e in J)Object.defineProperty(n,e,{get:()=>f.value[e],enumerable:!0});t.provide(te,Y),t.provide(C,e(n)),t.provide(ne,f);let r=t.unmount;q.add(t),t.unmount=function(){q.delete(t),q.size<1&&(p=J,F&&F(),F=null,f.value=J,K=!1,z=!1),r()}}};function X(e){return e.reduce((e,t)=>e.then(()=>j(t)),Promise.resolve())}return Y}export{J as a,Me as i,dt as n,re as o,Ne as r,ut as t};
1
+ import{Ct as e,F as t,K as n,St as r,T as i,Tt as a,bt as o,j as s,jt as c,k as l,p as u,st as d}from"./vendor/json-editor-vue-l1ffxhko.js";function f(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function p(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&f(e.default)}var m=Object.assign;function h(e,t){let n={};for(let r in t){let i=t[r];n[r]=_(i)?i.map(e):e(i)}return n}var g=()=>{},_=Array.isArray;function v(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var y=Symbol(``);function b(e,t){return m(Error(),{type:e,[y]:!0},t)}function x(e,t){return e instanceof Error&&y in e&&(t==null||!!(e.type&t))}var ee=Symbol(``),S=Symbol(``),te=Symbol(``),C=Symbol(``),ne=Symbol(``);function re(e){return s(C)}var w=typeof document<`u`,T=/#/g,ie=/&/g,E=/\//g,D=/=/g,ae=/\?/g,O=/\+/g,oe=/%5B/g,k=/%5D/g,A=/%5E/g,se=/%60/g,j=/%7B/g,M=/%7C/g,N=/%7D/g,P=/%20/g;function F(e){return e==null?``:encodeURI(``+e).replace(M,`|`).replace(oe,`[`).replace(k,`]`)}function ce(e){return F(e).replace(j,`{`).replace(N,`}`).replace(A,`^`)}function I(e){return F(e).replace(O,`%2B`).replace(P,`+`).replace(T,`%23`).replace(ie,`%26`).replace(se,"`").replace(j,`{`).replace(N,`}`).replace(A,`^`)}function L(e){return I(e).replace(D,`%3D`)}function le(e){return F(e).replace(T,`%23`).replace(ae,`%3F`)}function ue(e){return le(e).replace(E,`%2F`)}function R(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var z=/\/$/,B=e=>e.replace(z,``);function V(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=q(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:R(o)}}function de(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function H(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function fe(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&U(t.matched[r],n.matched[i])&&W(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function U(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function W(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!G(e[n],t[n]))return!1;return!0}function G(e,t){return _(e)?K(e,t):_(t)?K(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function K(e,t){return _(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function q(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var J={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function Y(e){if(!e)if(w){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),B(e)}var X=/^[^#]+#/;function pe(e,t){return e.replace(X,`#`)+t}function me(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Z=()=>({left:window.scrollX,top:window.scrollY});function he(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=me(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function ge(e,t){return(history.state?history.state.position-t:-1)+e}var _e=new Map;function ve(e,t){_e.set(e,t)}function ye(e){let t=_e.get(e);return _e.delete(e),t}function be(e){return typeof e==`string`||e&&typeof e==`object`}function xe(e){return typeof e==`string`||typeof e==`symbol`}function Se(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(O,` `),i=r.indexOf(`=`),a=R(i<0?r:r.slice(0,i)),o=i<0?null:R(r.slice(i+1));if(a in t){let e=t[a];_(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function Ce(e){let t=``;for(let n in e){let r=e[n];if(n=L(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(_(r)?r.map(e=>e&&I(e)):[r&&I(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function we(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=_(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Q(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function $(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(b(4,{from:n,to:t})):e instanceof Error?c(e):be(e)?c(b(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Te(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(f(s)){let c=(s.__vccOpts||s)[t];c&&a.push($(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=p(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&$(c,n,r,o,e,i)()}))}}return a}function Ee(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>U(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>U(e,s))||i.push(s))}return[n,r,i]}var De=()=>location.protocol+`//`+location.host;function Oe(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),H(n,``)}return H(n,e)+r+i}function ke(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Oe(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(m({},e.state,{scroll:Z()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Ae(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Z():null}}function je(e){let{history:t,location:n}=window,r={value:Oe(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:De()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,m({},t.state,Ae(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=m({},i.value,t.state,{forward:e,scroll:Z()});a(o.current,o,!0),a(e,m({},Ae(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Me(e){e=Y(e);let t=je(e),n=ke(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=m({location:``,base:e,go:r,createHref:pe.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function Ne(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),Me(e)}var Pe={type:0,value:``},Fe=/[a-zA-Z0-9_]/;function Ie(e){if(!e)return[[]];if(e===`/`)return[[Pe]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;)switch(c=e[s++],n){case 0:c===`\\`?(r=n,n=4):c===`/`?(l&&d(),o()):c===`:`?(d(),n=1):f();break;case 4:f(),n=r;break;case 1:c===`(`?n=2:Fe.test(c)?f():(d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case 2:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=3:u+=c;break;case 3:d(),n=0,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var Le=`[^/]+?`,Re={sensitive:!1,strict:!1,start:!0,end:!0},ze=/[.+*?^${}()[\]/\\]/g;function Be(e,t){let n=m({},Re,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[90];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=40+(n.sensitive?.25:0);if(o.type===0)r||(i+=`/`),i+=o.value.replace(ze,`\\$&`),s+=40;else if(o.type===1){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||Le;if(u!==Le){s+=10;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=20,c&&(s+=-8),n&&(s+=-20),u===`.*`&&(s+=-50)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=.7000000000000001}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===0)n+=e.value;else if(e.type===1){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(_(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=_(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Ve(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function He(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Ve(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Ue(r))return 1;if(Ue(i))return-1}return i.length-r.length}function Ue(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var We={strict:!1,end:!0,sensitive:!1};function Ge(e,t,n){let r=m(Be(Ie(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Ke(e,t){let n=[],r=new Map;t=v(We,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Je(e);s.aliasOf=r&&r.record;let l=v(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Je(m({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Ge(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Xe(d)&&o(e.name)),et(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:g}function o(e){if(xe(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Qe(e,n);n.splice(t,0,e),e.record.name&&!Xe(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw b(1,{location:e});s=i.record.name,a=m(qe(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&qe(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw b(1,{location:e,currentLocation:t});s=i.record.name,a=m({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Ze(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function qe(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Je(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ye(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ye(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Xe(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ze(e){return e.reduce((e,t)=>m(e,t.meta),{})}function Qe(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;He(e,t[i])<0?r=i:n=i+1}let i=$e(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function $e(e){let t=e;for(;t=t.parent;)if(et(t)&&He(e,t)===0)return t}function et({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function tt(e){let t=s(te),n=s(C),r=u(()=>{let n=c(e.to);return t.resolve(n)}),i=u(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(U.bind(null,i));if(o>-1)return o;let s=ot(e[t-2]);return t>1&&ot(i)===s&&a[a.length-1].path!==s?a.findIndex(U.bind(null,e[t-2])):o}),a=u(()=>i.value>-1&&at(n.params,r.value.params)),o=u(()=>i.value>-1&&i.value===n.matched.length-1&&W(n.params,r.value.params));function l(n={}){if(it(n)){let n=t[c(e.replace)?`replace`:`push`](c(e.to)).catch(g);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:u(()=>r.value.href),isActive:a,isExactActive:o,navigate:l}}function nt(e){return e.length===1?e[0]:e}var rt=i({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:tt,setup(e,{slots:t}){let n=o(tt(e)),{options:r}=s(te),i=u(()=>({[st(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[st(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&nt(t.default(n));return e.custom?r:l(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function it(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function at(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!_(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function ot(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var st=(e,t,n)=>e??t??n,ct=i({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){let a=s(ne),o=u(()=>e.route||a.value),f=s(S,0),p=u(()=>{let e=c(f),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),h=u(()=>o.value.matched[p.value]);n(S,u(()=>p.value+1)),n(ee,h),n(ne,o);let g=r();return d(()=>[g.value,h.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!U(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let n=o.value,r=e.name,a=h.value,s=a&&a.components[r];if(!s)return lt(i.default,{Component:s,route:n});let c=a.props[r],u=l(s,m({},c?c===!0?n.params:typeof c==`function`?c(n):c:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(a.instances[r]=null)},ref:g}));return lt(i.default,{Component:u,route:n})||u}}});function lt(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var ut=ct;function dt(n){let r=Ke(n.routes,n),i=n.parseQuery||Se,o=n.stringifyQuery||Ce,s=n.history,l=Q(),u=Q(),d=Q(),f=a(J),p=J;w&&n.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let v=h.bind(null,e=>``+e),y=h.bind(null,ue),ee=h.bind(null,R);function S(e,t){let n,i;return xe(e)?(n=r.getRecordMatcher(e),i=t):i=e,r.addRoute(i,n)}function re(e){let t=r.getRecordMatcher(e);t&&r.removeRoute(t)}function T(){return r.getRoutes().map(e=>e.record)}function ie(e){return!!r.getRecordMatcher(e)}function E(e,t){if(t=m({},t||f.value),typeof e==`string`){let n=V(i,e,t.path),a=r.resolve({path:n.path},t),o=s.createHref(n.fullPath);return m(n,a,{params:ee(a.params),redirectedFrom:void 0,href:o})}let n;if(e.path!=null)n=m({},e,{path:V(i,e.path,t.path).path});else{let r=m({},e.params);for(let e in r)r[e]??delete r[e];n=m({},e,{params:y(r)}),t.params=y(t.params)}let a=r.resolve(n,t),c=e.hash||``;a.params=v(ee(a.params));let l=de(o,m({},e,{hash:ce(c),path:a.path})),u=s.createHref(l);return m({fullPath:l,hash:c,query:o===Ce?we(e.query):e.query||{}},a,{redirectedFrom:void 0,href:u})}function D(e){return typeof e==`string`?V(i,e,f.value.path):m({},e)}function ae(e,t){if(p!==e)return b(8,{from:t,to:e})}function O(e){return A(e)}function oe(e){return O(m(D(e),{replace:!0}))}function k(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=D(i):{path:i},i.params={}),m({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function A(e,t){let n=p=E(e),r=f.value,i=e.state,a=e.force,s=e.replace===!0,c=k(n,r);if(c)return A(m(D(c),{state:typeof c==`object`?m({},i,c.state):i,force:a,replace:s}),t||n);let l=n;l.redirectedFrom=t;let u;return!a&&fe(o,r,n)&&(u=b(16,{to:l,from:r}),W(r,r,!0,!1)),(u?Promise.resolve(u):M(l,r)).catch(e=>x(e)?x(e,2)?e:U(e):B(e,l,r)).then(e=>{if(e){if(x(e,2))return A(m({replace:s},D(e.to),{state:typeof e.to==`object`?m({},i,e.to.state):i,force:a}),t||l)}else e=P(l,r,!0,s,i);return N(l,r,e),e})}function se(e,t){let n=ae(e,t);return n?Promise.reject(n):Promise.resolve()}function j(e){let t=q.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function M(e,t){let n,[r,i,a]=Ee(e,t);n=Te(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push($(r,e,t))});let o=se.bind(null,e,t);return n.push(o),X(n).then(()=>{n=[];for(let r of l.list())n.push($(r,e,t));return n.push(o),X(n)}).then(()=>{n=Te(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push($(r,e,t))});return n.push(o),X(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(_(r.beforeEnter))for(let i of r.beforeEnter)n.push($(i,e,t));else n.push($(r.beforeEnter,e,t));return n.push(o),X(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Te(a,`beforeRouteEnter`,e,t,j),n.push(o),X(n))).then(()=>{n=[];for(let r of u.list())n.push($(r,e,t));return n.push(o),X(n)}).catch(e=>x(e,8)?e:Promise.reject(e))}function N(e,t,n){d.list().forEach(r=>j(()=>r(e,t,n)))}function P(e,t,n,r,i){let a=ae(e,t);if(a)return a;let o=t===J,c=w?history.state:{};n&&(r||o?s.replace(e.fullPath,m({scroll:o&&c&&c.scroll},i)):s.push(e.fullPath,i)),f.value=e,W(e,t,n,o),U()}let F;function I(){F||=s.listen((e,t,n)=>{if(!Y.listening)return;let r=E(e),i=k(r,Y.currentRoute.value);if(i){A(m(i,{replace:!0,force:!0}),r).catch(g);return}p=r;let a=f.value;w&&ve(ge(a.fullPath,n.delta),Z()),M(r,a).catch(e=>x(e,12)?e:x(e,2)?(A(m(D(e.to),{force:!0}),r).then(e=>{x(e,20)&&!n.delta&&n.type===`pop`&&s.go(-1,!1)}).catch(g),Promise.reject()):(n.delta&&s.go(-n.delta,!1),B(e,r,a))).then(e=>{e||=P(r,a,!1),e&&(n.delta&&!x(e,8)?s.go(-n.delta,!1):n.type===`pop`&&x(e,20)&&s.go(-1,!1)),N(r,a,e)}).catch(g)})}let L=Q(),le=Q(),z;function B(e,t,n){U(e);let r=le.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function H(){return z&&f.value!==J?Promise.resolve():new Promise((e,t)=>{L.add([e,t])})}function U(e){return z||(z=!e,I(),L.list().forEach(([t,n])=>e?n(e):t()),L.reset()),e}function W(e,r,i,a){let{scrollBehavior:o}=n;if(!w||!o)return Promise.resolve();let s=!i&&ye(ge(e.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return t().then(()=>o(e,r,s)).then(t=>e===f.value&&t&&he(t)).catch(t=>e===f.value&&B(t,e,r))}let G=e=>s.go(e),K,q=new Set,Y={currentRoute:f,listening:!0,addRoute:S,removeRoute:re,clearRoutes:r.clearRoutes,hasRoute:ie,getRoutes:T,resolve:E,options:n,push:O,replace:oe,go:G,back:()=>G(-1),forward:()=>G(1),beforeEach:l.add,beforeResolve:u.add,afterEach:d.add,onError:le.add,isReady:H,install(t){t.component(`RouterLink`,rt),t.component(`RouterView`,ut),t.config.globalProperties.$router=Y,Object.defineProperty(t.config.globalProperties,"$route",{enumerable:!0,get:()=>c(f)}),w&&!K&&f.value===J&&(K=!0,O(s.location).catch(e=>{}));let n={};for(let e in J)Object.defineProperty(n,e,{get:()=>f.value[e],enumerable:!0});t.provide(te,Y),t.provide(C,e(n)),t.provide(ne,f);let r=t.unmount;q.add(t),t.unmount=function(){q.delete(t),q.size<1&&(p=J,F&&F(),F=null,f.value=J,K=!1,z=!1),r()}}};function X(e){return e.reduce((e,t)=>e.then(()=>j(t)),Promise.resolve())}return Y}export{J as a,Me as i,dt as n,re as o,Ne as r,ut as t};
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-ivisc4pv.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-c7zwcfg4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-h3uzf8s7.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-mgsi4s2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rpc-jaaujnev.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-if1s6ugr.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-cwkxp5t4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-hqfu72u1.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-mro49nyg.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hhnji3pn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-maavuy8p.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-in7qtp0e.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-g42elkwy.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/iefeupks.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-cx0uvu2o.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-dgqm22gk.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-bc145h1r.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-fcxnfo1z.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-ivoxtfjk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-liuhj385.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-otmjigaj.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block-jv3jk7c5.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-ngo84kjy.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer-myfvks89.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown-jnrvla1s.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect-hlo7a40m.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nswitch-iey7gi9t.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-dh4insrr.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-4ikva5xr.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-h0agvsjp.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"9ec1ff21-8126-4e86-bc50-039a1d3867c9",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1784773586681,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__NUXT_DEVTOOLS_BASE__/_nuxt/mbruyqke.js"}}</script><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.css-hsdbnv92.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue.css-lb1ewor6.css" crossorigin><link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss.css-flyrgbwp.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/mbruyqke.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/_plugin-vue_export-helper-d9irwgla.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/json-editor-vue-l1ffxhko.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/rolldown-runtime-imbltlrc.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/utils-d9q1xry0.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-ox3ztino.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/shiki-mgsi4s2l.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ready-mci0xx49.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-cwkxp5t4.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-ck1m833g.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-router-d5qsebus.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/dist-hhnji3pn.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/unocss-b56v4bpd.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/composables-jsh6xr6n.js"><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/storage-options-o7q1mchx.js"><script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/mbruyqke.js" crossorigin></script><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/markdown-it-cx0uvu2o.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default-kms351ji.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full-muovlha1.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none-f6zkixpn.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block.css-ivoxtfjk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/data-schema-drawer-nd5v2dc8.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vendor/quicktype-core-otmjigaj.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ncode-block-ivymjiov.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client-e4xweo15.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndrawer-fbwc78mp.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/ndropdown-j9whus4q.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nselect-efk0r1bm.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime-l66gafm5.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.css-mq6ubyvk.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500-fa1284ej.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildId:"f408df35-fbed-4f67-b31a-84e2dcf7d5f4",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1784892383929,false]</script></body></html>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "configKey": "devtools",
4
- "version": "4.0.0-alpha.8",
4
+ "version": "4.0.0-alpha.9",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  import '@nuxt/kit';
2
- export { m as default } from './shared/devtools.B9TxdMuu.mjs';
2
+ export { m as default } from './shared/devtools.CCWq4fFE.mjs';
@@ -9,6 +9,8 @@ import { useAppConfig, useRuntimeConfig } from "#imports";
9
9
  import { initTimelineMetrics } from "../../function-metrics-helpers.js";
10
10
  import { state } from "./state.js";
11
11
  const MULTIPLE_SLASHES_RE = /\/+/g;
12
+ const NUXT_DOCK_GROUP_ID = "nuxt";
13
+ const NUXT_DOCK_ANCHOR_ID = "nuxt:devtools";
12
14
  function getViteDevToolsContext() {
13
15
  return getDevToolsClientContext();
14
16
  }
@@ -34,7 +36,7 @@ export async function setupDevToolsClient({
34
36
  toggle() {
35
37
  const ctx = getViteDevToolsContext();
36
38
  if (ctx)
37
- ctx.docks.toggleEntry("nuxt:devtools");
39
+ ctx.docks.toggleEntry(NUXT_DOCK_GROUP_ID);
38
40
  },
39
41
  close() {
40
42
  const ctx = getViteDevToolsContext();
@@ -45,14 +47,14 @@ export async function setupDevToolsClient({
45
47
  const ctx = getViteDevToolsContext();
46
48
  if (ctx) {
47
49
  ctx.panel.store.value.open = true;
48
- ctx.docks.switchEntry("nuxt:devtools");
50
+ ctx.docks.switchEntry(NUXT_DOCK_GROUP_ID);
49
51
  }
50
52
  },
51
53
  async navigate(path) {
52
54
  const ctx = getViteDevToolsContext();
53
55
  if (ctx) {
54
56
  ctx.panel.store.value.open = true;
55
- ctx.docks.switchEntry("nuxt:devtools");
57
+ ctx.docks.switchEntry(NUXT_DOCK_GROUP_ID);
56
58
  }
57
59
  await client.hooks.callHook("host:action:navigate", path);
58
60
  },
@@ -232,7 +234,7 @@ export async function setupDevToolsClient({
232
234
  let bound;
233
235
  const bind = () => {
234
236
  const ctx = getViteDevToolsContext();
235
- const dockIframe = ctx?.docks?.getStateById?.("nuxt:devtools")?.domElements?.iframe;
237
+ const dockIframe = ctx?.docks?.getStateById?.(NUXT_DOCK_ANCHOR_ID)?.domElements?.iframe;
236
238
  if (!dockIframe || dockIframe === bound)
237
239
  return;
238
240
  bound = dockIframe;
@@ -8,11 +8,8 @@ const defaultOptions = {
8
8
  // determine multiple conditions
9
9
  componentInspector: true,
10
10
  viteInspect: true,
11
- vscode: {
12
- enabled: true,
13
- startOnBoot: false,
14
- port: 3080,
15
- reuseExistingServer: true
11
+ codeServer: {
12
+ enabled: true
16
13
  },
17
14
  disableAuthorization: isSandboxed
18
15
  };
@@ -33,15 +30,12 @@ function createDefaultTabOptions() {
33
30
  componentsGraphShowPages: false,
34
31
  componentsGraphShowLayouts: false,
35
32
  componentsGraphShowWorkspace: true,
36
- interactionCloseOnOutsideClick: false,
37
33
  showExperimentalFeatures: false,
38
34
  showHelpButtons: true,
39
35
  scale: 1,
40
36
  hiddenTabs: [],
41
37
  pinnedTabs: [],
42
- hiddenTabCategories: [],
43
- sidebarExpanded: false,
44
- sidebarScrollable: false
38
+ hiddenTabCategories: []
45
39
  },
46
40
  serverRoutes: {
47
41
  selectedRoute: null,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxt/devtools",
3
3
  "type": "module",
4
- "version": "4.0.0-alpha.8",
4
+ "version": "4.0.0-alpha.9",
5
5
  "description": "The Nuxt DevTools gives you insights and transparency about your Nuxt App.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://devtools.nuxt.com",
@@ -35,10 +35,11 @@
35
35
  "vite": "^8.0.14"
36
36
  },
37
37
  "dependencies": {
38
- "@devframes/plugin-data-inspector": "^0.7.9",
38
+ "@devframes/plugin-code-server": "^0.7.13",
39
+ "@devframes/plugin-data-inspector": "^0.7.13",
39
40
  "@nuxt/kit": "^4.5.0",
40
- "@vitejs/devtools": "^0.4.3",
41
- "@vitejs/devtools-kit": "^0.4.3",
41
+ "@vitejs/devtools": "^0.4.7",
42
+ "@vitejs/devtools-kit": "^0.4.7",
42
43
  "@vue/devtools-core": "^8.1.5",
43
44
  "@vue/devtools-kit": "^8.1.5",
44
45
  "birpc": "^4.0.0",
@@ -47,7 +48,6 @@
47
48
  "diff": "^8.0.4",
48
49
  "error-stack-parser-es": "^2.0.1",
49
50
  "fast-npm-meta": "^2.2.0",
50
- "get-port-please": "^3.2.0",
51
51
  "hookable": "^6.1.1",
52
52
  "image-meta": "^0.2.2",
53
53
  "launch-editor": "^2.14.1",
@@ -65,9 +65,8 @@
65
65
  "verkit": "^0.2.0",
66
66
  "vite-plugin-inspect": "^12.0.2",
67
67
  "vite-plugin-vue-tracer": "^1.4.0",
68
- "which": "^7.0.0",
69
68
  "ws": "^8.21.1",
70
- "@nuxt/devtools-kit": "4.0.0-alpha.8"
69
+ "@nuxt/devtools-kit": "4.0.0-alpha.9"
71
70
  },
72
71
  "devDependencies": {
73
72
  "@antfu/utils": "^9.3.0",
@@ -78,16 +77,14 @@
78
77
  "@iconify-json/ri": "^1.2.10",
79
78
  "@iconify-json/simple-icons": "^1.2.91",
80
79
  "@iconify-json/tabler": "^1.2.37",
81
- "@nuxt/test-utils": "^4.0.3",
82
80
  "@parcel/watcher": "^2.6.0",
83
81
  "@types/markdown-it-link-attributes": "^3.0.5",
84
- "@unhead/schema": "^3.2.1",
82
+ "@unhead/schema": "^3.2.3",
85
83
  "@unocss/nuxt": "^66.7.5",
86
84
  "@unocss/preset-icons": "^66.7.5",
87
85
  "@unocss/preset-uno": "^66.7.5",
88
86
  "@unocss/runtime": "^66.7.5",
89
- "@vitejs/devtools": "^0.4.3",
90
- "@vitest/ui": "^4.1.10",
87
+ "@vitejs/devtools": "^0.4.7",
91
88
  "@vue/devtools-applet": "^8.1.5",
92
89
  "@vueuse/nuxt": "^14.3.0",
93
90
  "cronstrue": "^3.24.0",
@@ -116,7 +113,7 @@
116
113
  "vanilla-jsoneditor": "^3.12.0",
117
114
  "vis-data": "^8.0.4",
118
115
  "vis-network": "^10.1.0",
119
- "vue-tsc": "^3.3.7",
116
+ "vue-tsc": "^3.3.8",
120
117
  "vue-virtual-scroller": "^3.0.4"
121
118
  },
122
119
  "scripts": {
@@ -1,169 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import fs from 'node:fs/promises';
3
- import { hostname } from 'node:os';
4
- import { resolve } from 'node:path';
5
- import { logger } from '@nuxt/kit';
6
- import { checkPort, getPort } from 'get-port-please';
7
- import { x } from 'tinyexec';
8
- import which from 'which';
9
- import { colors } from 'consola/utils';
10
-
11
- const LOG_PREFIX = colors.cyan("Nuxt DevTools:");
12
-
13
- const codeBinaryOptions = {
14
- "ms-code-cli": {
15
- codeBinary: "code",
16
- launchArg: "serve-web",
17
- licenseTermsArg: "--accept-server-license-terms",
18
- connectionTokenArg: "--without-connection-token"
19
- },
20
- "ms-code-server": {
21
- codeBinary: "code-server",
22
- launchArg: "serve-local",
23
- licenseTermsArg: "--accept-server-license-terms",
24
- connectionTokenArg: "--without-connection-token"
25
- },
26
- "coder-code-server": {
27
- codeBinary: "code-server",
28
- launchArg: "serve-local",
29
- licenseTermsArg: "",
30
- connectionTokenArg: ""
31
- }
32
- };
33
- async function setup(ctx) {
34
- const { nuxt, options, openInEditorHooks } = ctx;
35
- const vsOptions = options?.vscode || {};
36
- const codeServer = vsOptions?.codeServer || "ms-code-server";
37
- const { codeBinary, launchArg, licenseTermsArg, connectionTokenArg } = codeBinaryOptions[codeServer];
38
- const installed = !!await which(codeBinary).catch(() => null);
39
- let port = vsOptions?.port || 3080;
40
- let url = `http://localhost:${port}`;
41
- const host = vsOptions?.host ? `--host=${vsOptions.host}` : "--host=127.0.0.1";
42
- let loaded = false;
43
- let promise = null;
44
- const mode = vsOptions?.mode || "local-serve";
45
- const computerHostName = vsOptions.tunnel?.name || hostname().split(".").join("");
46
- const root = nuxt.options.rootDir;
47
- const vscodeServerControllerFile = resolve(root, ".vscode", ".server-controller-port.log");
48
- openInEditorHooks.push(async (file) => {
49
- if (!existsSync(vscodeServerControllerFile))
50
- return false;
51
- try {
52
- const { port: port2 } = JSON.parse(await fs.readFile(vscodeServerControllerFile, "utf-8"));
53
- const url2 = `http://localhost:${port2}/open?path=${encodeURIComponent(`${root}/${file}`)}`;
54
- await fetch(url2);
55
- ctx.devtoolsKit?.rpc.broadcast({ method: "navigateTo", args: ["/modules/custom-builtin-vscode"], event: true });
56
- return true;
57
- } catch (e) {
58
- console.debug(`Failed to open file "${file}" in VS Code Server`);
59
- console.debug(e);
60
- return false;
61
- }
62
- });
63
- async function startCodeServer() {
64
- if (existsSync(vscodeServerControllerFile))
65
- await fs.rm(vscodeServerControllerFile, { force: true });
66
- if (vsOptions?.reuseExistingServer && !await checkPort(port)) {
67
- loaded = true;
68
- url = `http://localhost:${port}/?folder=${encodeURIComponent(root)}`;
69
- logger.info(LOG_PREFIX, `Existing VS Code Server found at port ${port}...`);
70
- return;
71
- }
72
- port = await getPort({ port });
73
- url = `http://localhost:${port}/?folder=${encodeURIComponent(root)}`;
74
- logger.info(LOG_PREFIX, `Starting VS Code Server at ${url} ...`);
75
- x(codeBinary, [
76
- "--install-extension",
77
- "antfu.vscode-server-controller"
78
- ], { nodeOptions: { stdio: ["pipe", "ignore", "inherit"] } });
79
- await ctx.devtoolsKit?.terminals.startChildProcess(
80
- {
81
- command: codeBinary,
82
- args: [
83
- launchArg,
84
- licenseTermsArg,
85
- connectionTokenArg,
86
- `--port=${port}`,
87
- host
88
- ]
89
- },
90
- {
91
- id: "devtools:vscode",
92
- title: "VS Code Server",
93
- icon: "logos-visual-studio-code"
94
- }
95
- );
96
- for (let i = 0; i < 100; i++) {
97
- if (await fetch(url).then((r) => r.ok).catch(() => false))
98
- break;
99
- await new Promise((resolve2) => setTimeout(resolve2, 500));
100
- }
101
- await new Promise((resolve2) => setTimeout(resolve2, 2e3));
102
- loaded = true;
103
- }
104
- async function startCodeTunnel() {
105
- const { stdout: currentDir } = await x("pwd");
106
- url = `https://vscode.dev/tunnel/${computerHostName}${currentDir.trim()}`;
107
- logger.info(LOG_PREFIX, `Starting VS Code tunnel at ${url} ...`);
108
- const command = x("code", [
109
- "tunnel",
110
- "--accept-server-license-terms",
111
- "--name",
112
- `${computerHostName}`
113
- ]);
114
- command.process?.stderr?.pipe(process.stderr);
115
- command.process?.stdout?.pipe(process.stdout);
116
- nuxt.hook("close", () => {
117
- command.kill();
118
- });
119
- for (let i = 0; i < 100; i++) {
120
- if (await fetch(url).then((r) => r.ok).catch(() => false))
121
- break;
122
- await new Promise((resolve2) => setTimeout(resolve2, 500));
123
- }
124
- await new Promise((resolve2) => setTimeout(resolve2, 2e3));
125
- loaded = true;
126
- }
127
- async function start() {
128
- if (mode === "tunnel")
129
- await startCodeTunnel();
130
- else
131
- await startCodeServer();
132
- }
133
- nuxt.hook("devtools:customTabs", (tabs) => {
134
- tabs.push({
135
- name: "builtin-vscode",
136
- title: "VS Code",
137
- icon: "bxl-visual-studio",
138
- category: "modules",
139
- requireAuth: true,
140
- view: !installed && !(vsOptions?.mode === "tunnel") ? {
141
- type: "launch",
142
- title: "Install VS Code Server",
143
- description: `It seems you don't have code-server installed.
144
-
145
- Learn more about it with <a href="https://code.visualstudio.com/blogs/2022/07/07/vscode-server" target="_blank">this guide</a>.
146
- Once installed, restart Nuxt and visit this tab again.`,
147
- actions: []
148
- } : !loaded ? {
149
- type: "launch",
150
- description: "Launch VS Code right in the devtools!",
151
- actions: [{
152
- label: promise ? "Starting..." : "Launch",
153
- pending: !!promise,
154
- handle: () => {
155
- promise = promise || start();
156
- return promise;
157
- }
158
- }]
159
- } : {
160
- type: "iframe",
161
- src: url
162
- }
163
- });
164
- });
165
- if (vsOptions?.startOnBoot)
166
- promise = promise || start();
167
- }
168
-
169
- export { setup };
@@ -1 +0,0 @@
1
- import{T as e,W as t,_ as n}from"./vendor/json-editor-vue-c7zwcfg4.js";import{t as r}from"./composables-ioamscf4.js";var i={"h-screen":``,"w-screen":``,"bg-black":``},a=e({__name:`__blank`,setup(e){return r({layout:`none`}),(e,r)=>(t(),n(`div`,i))}});export{a as default};
@@ -1 +0,0 @@
1
- import{a as e}from"./nuxt-hqfu72u1.js";import{C as t,S as n,St as r,T as i,W as a,Y as o,Zt as s,_ as c,dt as l,en as u,g as d,h as f,jt as p,m,p as h,s as g,ut as _}from"./vendor/json-editor-vue-c7zwcfg4.js";import{I as v}from"./ready-if1s6ugr.js";import{g as y,h as b}from"./utils-h3uzf8s7.js";import{a as x,h as S,m as C}from"./rpc-jaaujnev.js";import{t as w}from"./_plugin-vue_export-helper-d9irwgla.js";import{H as T,O as E,S as D,_ as O,f as k,m as A,p as j,u as M}from"#entry";import{t as N}from"./ncode-block-jv3jk7c5.js";import{t as P}from"./composables-ioamscf4.js";import{t as F}from"./ncheckbox-jr3c6e4e.js";import{t as I}from"./filepath-item-b7ye3und.js";import{t as L}from"./ntip-kpuxzuo5.js";import{t as R}from"./help-fab-l6k9jkcj.js";var z={"h-full":``,grid:`~ rows-[max-content_1fr]`},B={flex:`~ wrap`,"w-full":``},V=[`onClick`],H={key:0,flex:`~ col gap-4 items-center justify-center`,p4:``},U={grid:`~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center`,"w-100":``},W=`/__nuxt_devtools__/client`,G=Object.assign(i({__name:`BuildAnalyzeDetails`,props:{current:{},prev:{}},setup(i){let f=i,y=`${e().app.baseURL.replace(W,`/`)}/__nuxt_devtools__/analyze/`.replace(/\/+/g,`/`),b=h(()=>{let e=[{name:`Overview`,id:`overview`}];return f.current.features.bundleClient&&e.push({name:`Client Bundle`,id:`bundle-client`}),f.current.features.bundleNitro&&e.push({name:`Nitro Bundle`,id:`bundle-nitro`}),f.current.features.viteInspect&&e.push({name:`Vite Inspect`,id:`vite-inspect`}),e}),C=r(b.value[0]);function w(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function T(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/1024/1024).toFixed(1)}MB`:`${(e/1024/1024/1024).toFixed(1)}GB`}async function D(e){return x.clearAnalyzeBuilds([e])}return(e,r)=>{let f=I,h=E;return a(),c(`div`,z,[m(`div`,B,[(a(!0),c(g,null,o(b.value,(e,t)=>(a(),c(`button`,{key:t,px4:``,py2:``,border:`r base`,hover:`bg-active`,class:s(e.id===C.value?.id?``:`border-b`),onClick:t=>C.value=e},[m(`div`,{class:s(e.id===C.value?.id?``:`op30`)},u(e.name),3)],10,V))),128)),r[1]||=m(`div`,{border:`b base`,"flex-auto":``},null,-1)]),C.value?.id===`overview`?(a(),c(`div`,H,[r[15]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,U,[r[10]||=m(`div`,{"i-carbon-commit":``,"text-xl":``},null,-1),m(`div`,null,[r[2]||=m(`div`,{"text-sm":``,op50:``},` Name `,-1),m(`div`,null,u(i.current.name),1)]),r[11]||=m(`div`,{"i-carbon-time":``,"text-xl":``},null,-1),m(`div`,null,[r[3]||=m(`div`,{"text-sm":``,op50:``},` Build duration `,-1),m(`div`,null,u(w(i.current)),1)]),i.current.size?.clientBundle?(a(),c(g,{key:0},[r[5]||=m(`div`,{"i-carbon-cics-program":``,"text-xl":``},null,-1),m(`div`,null,[r[4]||=m(`div`,{"text-sm":``,op50:``},` Client bundle size `,-1),m(`div`,null,u(T(i.current.size.clientBundle)),1)])],64)):d(``,!0),i.current.size?.nitroBundle?(a(),c(g,{key:1},[r[7]||=m(`div`,{"i-carbon-bare-metal-server":``,"text-xl":``},null,-1),m(`div`,null,[r[6]||=m(`div`,{"text-sm":``,op50:``},` Nitro bundle size `,-1),m(`div`,null,u(T(i.current.size.nitroBundle)),1)])],64)):d(``,!0),r[12]||=m(`div`,{"i-carbon-edge-node":``,"text-xl":``},null,-1),m(`div`,null,[r[8]||=m(`div`,{"text-sm":``,op50:``},` Built `,-1),m(`div`,null,u(p(S)(new Date(i.current.endTime))),1)]),r[13]||=m(`div`,{"i-carbon:folder-parent":``,"text-xl":``},null,-1),m(`div`,null,[r[9]||=m(`div`,{"text-sm":``,op50:``},` Report Path `,-1),t(f,{filepath:i.current.analyzeDir},null,8,[`filepath`])])]),r[16]||=m(`div`,{"flex-auto":``},null,-1),t(h,{n:`rose`,icon:`carbon-delete`,onClick:r[0]||=e=>D(i.current.name)},{default:_(()=>[...r[14]||=[n(` Delete this report `,-1)]]),_:1})])):d(``,!0),r._lazyshow1||C.value?.id===`bundle-client`?(r._lazyshow1=!0,a(),c(g,null,[l(m(`iframe`,{src:`${p(y)}${i.current.slug}/client.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,C.value?.id===`bundle-client`]])],64)):d(`v-show-if`,!0),r._lazyshow2||C.value?.id===`bundle-nitro`?(r._lazyshow2=!0,a(),c(g,null,[l(m(`iframe`,{src:`${p(y)}${i.current.slug}/nitro.html`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,C.value?.id===`bundle-nitro`]])],64)):d(`v-show-if`,!0),r._lazyshow3||C.value?.id===`vite-inspect`?(r._lazyshow3=!0,a(),c(g,null,[l(m(`iframe`,{src:`${p(y)}${i.current.slug}/.vite-inspect/`,"h-full":``,"w-full":``},null,8,[`src`]),[[v,C.value?.id===`vite-inspect`]])],64)):d(`v-show-if`,!0)])}}}),{__name:`BuildAnalyzeDetails`}),K={},q={class:`markdown-body`};function J(e,t){return a(),c(`div`,q,[...t[0]||=[m(`template`,null,[m(`div`,{class:`markdown-body`},[m(`h1`,null,`Build Analyze`),m(`p`,null,[n(`DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command `),m(`code`,{"v-pre":``},`nuxt build --analyze`),n(` and present the output data directly in DevTools for easy browsing and comparing.`)])])],-1)]])}var Y=w(K,[[`render`,J]]),X={flex:`~ col`},Z=[`onClick`],Q={flex:`~ gap-1 items-center wrap`,"w-full":``,"text-sm":``,op60:``},$={flex:`~ items-center justify-center wrap`,p4:``},ee={flex:`~ col gap-1`,"w-250":``,p4:``},te={flex:`~ gap-3`,mt2:``,"justify-end":``},ne=i({__name:`analyze-build`,setup(e){P({icon:`carbon-edge-node`,title:`Build Analyze`,layout:`full`,category:`analyze`,show(){return T(`^3.5.0`)}});let i=C(),l=y(),v=b(`analyze-build:slug`,``),w=h(()=>l.value?.builds.find(e=>e.slug===v.value)??l.value?.builds[0]),I=r(!1),z=r(``),B=h(()=>l.value?.builds.some(e=>e.name===z.value.trim()));async function V(){if(z.value=await x.generateAnalyzeBuildName(),!await i.start())return;D(`analyze-build:start`);let e=await x.startAnalyzeBuild(z.value);I.value&&x.revealTerminal(e)}function H(e){return`${((e.endTime-e.startTime)/1e3).toFixed(1)}s`}function U(){l.value?.activeSessionId&&x.revealTerminal(l.value.activeSessionId)}return M(()=>[{id:`action:analyze-build: start`,title:`Start a new analyze build`,icon:`i-carbon-edge-node`,action:V}]),(e,r)=>{let h=E,y=G,b=O,x=A,C=j,T=L,D=N,M=F,P=k,W=Y,K=R;return a(),c(g,null,[t(x,{"left-size":30},{left:_(()=>[m(`div`,X,[(a(!0),c(g,null,o(p(l)?.builds,e=>(a(),c(g,{key:e.slug},[m(`button`,{flex:`~ col gap1`,p3:``,"hover:bg-active":``,class:s(e.slug===w.value?.slug?`text-primary bg-active`:``),onClick:t=>v.value=e.slug},[m(`code`,null,u(e.name),1),m(`div`,Q,[r[4]||=m(`div`,{"i-carbon-time":``},null,-1),m(`span`,null,u(H(e)),1),r[5]||=m(`div`,{"flex-auto":``},null,-1),m(`span`,null,u(p(S)(new Date(e.endTime))),1)])],10,Z),r[6]||=m(`div`,{"x-divider":``},null,-1)],64))),128)),m(`div`,$,[p(l)?.isBuilding?(a(),f(h,{key:1,n:`primary`,icon:`carbon-circle-dash animate-spin`,title:`Open the output in the Terminals dock`,onClick:r[1]||=e=>U()},{default:_(()=>[...r[8]||=[n(` Building... `,-1)]]),_:1})):(a(),f(h,{key:0,n:`primary`,icon:`carbon-edge-node`,onClick:r[0]||=e=>V()},{default:_(()=>[...r[7]||=[n(` Start a new build `,-1)]]),_:1}))])])]),right:_(()=>[w.value?(a(),f(y,{key:0,current:w.value},null,8,[`current`])):(a(),f(b,{key:1}))]),_:1}),t(p(i),null,{default:_(({resolve:e})=>[t(P,{"model-value":!0,onClose:t=>e(!1)},{default:_(()=>[m(`div`,ee,[r[13]||=m(`h3`,{class:`text-lg font-medium leading-6`,mb2:``},` Start analyze build? `,-1),r[14]||=m(`p`,{op50:``},` Enter the name of the build: `,-1),t(C,{modelValue:z.value,"onUpdate:modelValue":r[2]||=e=>z.value=e,placeholder:`Build name`},null,8,[`modelValue`]),B.value?(a(),f(T,{key:0,"n-orange":``},{default:_(()=>[...r[9]||=[n(` A build with the same name already exists, continue would overrides the previous build result. `,-1)]]),_:1})):d(``,!0),r[15]||=m(`div`,{my3:``,"x-divider":``},null,-1),r[16]||=m(`p`,{op50:``},` The following command will be executed in your terminal: `,-1),t(D,{code:`npx nuxi analyze --no-serve --name=${z.value}`,lang:`bash`,px4:``,py2:``,border:`~ base rounded`,lines:!1},null,8,[`code`]),t(M,{modelValue:I.value,"onUpdate:modelValue":r[3]||=e=>I.value=e,mt2:``,n:`primary`},{default:_(()=>[...r[10]||=[n(` Open the Terminals dock `,-1)]]),_:1},8,[`modelValue`]),m(`div`,te,[t(h,{onClick:t=>e(!1)},{default:_(()=>[...r[11]||=[n(` Cancel `,-1)]]),_:1},8,[`onClick`]),t(h,{n:`solid primary`,onClick:t=>e(!0)},{default:_(()=>[...r[12]||=[n(` Start `,-1)]]),_:1},8,[`onClick`])])])]),_:2},1032,[`onClose`])]),_:1}),t(K,null,{default:_(()=>[t(W)]),_:1})],64)}}});export{ne as default};
@@ -1,6 +0,0 @@
1
- import{$t as e,C as t,Q as n,S as r,St as i,T as a,W as o,X as s,Y as c,Zt as l,_ as u,_t as d,dt as f,en as p,g as m,h,jt as g,m as _,p as v,s as y,ut as b}from"./vendor/json-editor-vue-c7zwcfg4.js";import{F as x,L as S}from"./ready-if1s6ugr.js";import{A as C,C as w}from"./utils-h3uzf8s7.js";import{A as T,P as E,_ as D,a as O,d as k,f as A,j,k as M,l as N,w as P}from"./rpc-jaaujnev.js";import{t as F}from"./storage-options-g42elkwy.js";import{A as I,L,O as R,S as z,d as B,f as ee,n as te,p as V,r as ne}from"#entry";import{t as H}from"./ndropdown-jnrvla1s.js";import{t as U}from"./ndrawer-myfvks89.js";import{t as W}from"./composables-ioamscf4.js";import{t as G}from"./ncheckbox-jr3c6e4e.js";import{t as re}from"./filepath-item-b7ye3und.js";import{t as K}from"./nnavbar-bvq6rk5u.js";import{n as q,t as J}from"./code-snippets-hxwvpad4.js";import{t as Y}from"./nsection-block-illvvuef.js";var X={key:0,"h-full":``,"w-full":``,flex:``,"items-center":``,"justify-center":``},ie={for:`drop-zone-input`,"text-3xl":``,hover:`text-green cursor-pointer`,"transition-all":``},ae={key:1,relative:``,"h-full":``,"w-full":``,grid:`~ rows-[max-content_1fr_max-content]`},oe={grid:`~ cols-minmax-8rem gap-8`,"overflow-auto":``,p6:``},se={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,rounded:``,"rounded-t-lg":``,"bg-active":``,"object-cover":``,class:`aspect-1/1`,border:`~ base`},ce=[`src`],le={flex:`~ gap1`,"items-center":``},ue={flex:`~ gap-2`,"items-center":``,"justify-center":``,p8:``},de=Object.assign(a({__name:`AssetDropZone`,props:{modelValue:{type:Boolean,required:!0},folder:{type:String,required:!0}},setup(e){let a=e,s=/\.\w+$/,d=j(a,`modelValue`),p=i(),v=i([]);function x(e){p.value=e.target,d.value=!0}function S(e){e.target===p.value&&(d.value=!1)}function C(e){e.preventDefault()}function w(e){e.preventDefault(),T(e.dataTransfer.files)}function T(e){let t=[...e||[]];if(t.length){let e=[],n=v.value.map(e=>e.name);for(let r of t)if(n.includes(r.name)){let t=1,[i,a]=r.name.split(`.`);for(;n.includes(`${i} (${t}).${a}`);)t++;let o=`${i}-${t}.${a}`,s=new Blob([r],{type:r.type}),c=new File([s],o,{lastModified:Date.now()});e.push(c),n.push(o)}else r.type===``&&L({message:`Folders are not supported yet`,icon:`carbon:face-dissatisfied`,classes:`text-orange`}),e.push(r);v.value=[...v.value,...e]}}async function E(){if(N.value||k.value)return;z(`assets:upload`);let e=[];for(let t of v.value){let n=new FileReader;n.readAsDataURL(t);let r=(await new Promise(e=>{n.onload=()=>e(n.result)})).split(`;base64,`).pop();e.push({path:t.name,encoding:`base64`,content:r})}await O.writeStaticAssets([...e],a.folder).then(()=>{B(),L({message:`Files uploaded successfully!`,icon:`i-carbon:checkmark`})}).catch(e=>{B(),L({message:`Error uploading files: ${e?.message??`unknown`}`,icon:`i-carbon-warning`,classes:`text-red`})}),d.value=!1}function D(e){v.value?.splice(e,1)}function A(e){return URL.createObjectURL(e)}function M(e,t){let[n,r]=e.name.split(`.`),i=t.replace(s,``),a=`${i}.${r}`;return i.length===0?(alert(`File name must be at least 1 characters long`),n):(Object.defineProperty(e,"name",{value:a,writable:!1}),v.value.splice(v.value.indexOf(e),1,e),e)}function F(){v.value=[]}function B(){d.value=!1,F()}return P(`dragenter`,x),P(`dragleave`,S),P(`dragover`,C),P(`drop`,w),(e,i)=>{let a=R,s=I,p=V,x=n(`tooltip`);return o(),u(`div`,{fixed:``,"bottom-0":``,"left-13":``,"right-0":``,"top-0":``,"z-10":``,"backdrop-blur-20":``,"transition-all":``,class:l(g(d)?`opacity-100 visible`:`opacity-0 invisible`)},[f(t(a,{icon:`carbon-close`,title:`Close`,absolute:``,"right-5":``,"top-5":``,"z-20":``,"text-xl":``,border:!1,onClick:B},null,512),[[x,`Close`,void 0,{"bottom-end":!0}]]),v.value?.length?(o(),u(`div`,ae,[i[4]||=_(`div`,{px6:``,py6:``},[_(`h1`,{"text-2xl":``},` Upload `),_(`p`,{"text-sm":``,op50:``},` Drag and drop files to upload `)],-1),_(`div`,oe,[(o(!0),u(y,null,c(v.value,(e,n)=>(o(),u(`div`,{key:e.name,flex:`~ col gap-2`,relative:``,"h-50":``,"w-40":``,"items-center":``},[_(`div`,se,[_(`img`,{"h-full":``,"w-full":``,"rounded-t-lg":``,"object-cover":``,src:A(e)},null,8,ce)]),_(`div`,le,[t(p,{n:`xs`,"h-full":``,"flex-auto":``,"model-value":e.name,"onUpdate:modelValue":t=>M(e,t.target.value)},null,8,[`model-value`,`onUpdate:modelValue`]),t(a,{n:`red`,icon:`carbon-trash-can`,"h-full":``,"flex-none":``,title:`Remove file`,onClick:e=>D(n)},null,8,[`onClick`])])]))),128))]),_(`div`,ue,[v.value.length?(o(),h(a,{key:0,n:`red`,onClick:F},{default:b(()=>[t(s,{icon:`carbon-clean`}),i[2]||=r(` Clear `,-1)]),_:1})):m(``,!0),t(a,{disabled:!v.value.length,n:`primary solid`,onClick:E},{default:b(()=>[t(s,{icon:`carbon-cloud-upload`}),i[3]||=r(` Upload `,-1)]),_:1},8,[`disabled`])])])):(o(),u(`div`,X,[_(`label`,ie,[t(s,{icon:`carbon-cloud-upload`,"mr-2":``}),i[1]||=r(` Drop files here or click to select `,-1)]),_(`input`,{id:`drop-zone-input`,type:`file`,multiple:``,hidden:``,onChange:i[0]||=e=>T(e.target.files)},null,32)]))],2)}}}),{__name:`AssetDropZone`}),fe=Object.assign(a({__name:`AssetFontPreview`,props:{asset:{}},setup(t){let n=t,r=v(()=>`devtools-assets-${q(n.asset)}`);return M(v(()=>`
2
- @font-face {
3
- font-family: '${r.value}';
4
- src: url('${n.asset.publicPath}');
5
- }
6
- `)),(t,n)=>(o(),u(`div`,{"of-hidden":``,style:e({fontFamily:`'${r.value}'`})},` Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz `,4))}}),{__name:`AssetFontPreview`}),pe={flex:``,"items-center":``,"justify-center":``,"of-hidden":``,"bg-active":``,"object-cover":``,p1:``},me=[`src`],he={key:2,"i-carbon-document":``,"text-3xl":``,op20:``},ge={key:3,"w-full":``,"self-start":``,p4:``},_e=[`textContent`],ve={key:4},ye=[`src`,`autoplay`,`controls`],be={key:5},xe={key:0,"i-carbon-volume-up":``,"text-3xl":``,op20:``},Se=[`src`],Ce={key:6,"i-carbon-help":``,"text-3xl":``,op20:``},Z=Object.assign(a({__name:`AssetPreview`,props:{asset:{},textContent:{},detail:{type:Boolean}},setup(e){return(t,n)=>{let r=fe;return o(),u(`div`,pe,[e.asset.type===`image`?(o(),u(`img`,{key:0,src:e.asset.publicPath},null,8,me)):e.asset.type===`font`?(o(),h(r,{key:e.asset.publicPath,asset:e.asset,"self-stretch":``,p2:``,"text-2xl":``},null,8,[`asset`])):e.asset.type===`text`&&!e.textContent?(o(),u(`div`,he)):e.asset.type===`text`&&e.textContent?(o(),u(`div`,ge,[_(`pre`,{"max-h-10rem":``,"of-hidden":``,"text-xs":``,"font-mono":``,textContent:p(e.textContent)},null,8,_e)])):e.asset.type===`video`?(o(),u(`div`,ve,[_(`video`,{src:e.asset.publicPath,autoplay:e.detail,controls:e.detail},null,8,ye)])):e.asset.type===`audio`?(o(),u(`div`,be,[e.detail?(o(),u(`audio`,{key:1,src:e.asset.publicPath,controls:``},null,8,Se)):(o(),u(`div`,xe))])):(o(),u(`div`,Ce))])}}}),{__name:`AssetPreview`}),we={relative:``,flex:`~ col gap-1`,hover:`bg-active`,"items-center":``,"of-hidden":``,rounded:``,p2:``},Te={"w-full":``,"of-hidden":``,truncate:``,"ws-nowrap":``,"text-center":``,"text-xs":``},Ee=Object.assign(a({__name:`AssetGridItem`,props:{asset:{},folder:{}},setup(e){let n=e,r=v(()=>n.folder&&n.asset.path.startsWith(n.folder)?n.asset.path.slice(n.folder.length):n.asset.path);return(n,i)=>{let a=I,s=Z;return o(),u(`button`,we,[e.asset.layer?(o(),h(a,{key:0,icon:`i-carbon-layers`,absolute:``,"right-4":``,"top-4":``,"bg-primary":``})):m(``,!0),t(s,{"h-30":``,"w-30":``,rounded:``,border:`~ base`,asset:e.asset},null,8,[`asset`]),_(`div`,Te,p(r.value),1)])}}}),{__name:`AssetGridItem`}),Q=Object.assign(a({__name:`AssetListItem`,props:{item:{},index:{default:0},modelValue:{}},setup(t,{emit:n}){let a=t,f=j(a,`modelValue`,n,{passive:!0}),b=v(()=>a.item?.children?.length),x=i(!0),S=v(()=>b.value?`i-carbon-folder`:a.item.type===`image`?`i-carbon-image`:a.item.type===`video`?`i-carbon-video`:a.item.type===`audio`?`i-carbon-volume-up`:a.item.type===`font`?`i-carbon-text-small-caps`:a.item.type===`text`?`i-carbon-document`:a.item.type===`json`?`i-carbon-json`:`i-carbon-document-blank`);return(n,i)=>{let a=I,v=Q;return o(),u(`div`,null,[_(`button`,{flex:`~ gap-2`,"w-full":``,"items-center":``,hover:`bg-active`,px4:``,py1:``,style:e({paddingLeft:`calc(1rem + ${t.index*1.5}em)`}),class:l({"bg-active":!b.value&&g(f)?.filePath===t.item?.filePath}),border:`b base`,onClick:i[0]||=e=>b.value?x.value=!x.value:f.value=t.item},[_(`div`,{class:l(S.value)},null,2),_(`span`,{class:l({"flex items-center":b.value}),"flex-auto":``,"text-start":``,"text-sm":``,"font-mono":``},[r(p(t.item.path)+` `,1),t.item.layer?(o(),h(a,{key:0,icon:`i-carbon-layers`,"bg-primary":``})):m(``,!0)],2),b.value?(o(),h(a,{key:0,icon:`carbon:chevron-right`,"transform-rotate":x.value?90:0,transition:``},null,8,[`transform-rotate`])):m(``,!0)],6),x.value?s(n.$slots,`default`,{key:0},()=>[(o(!0),u(y,null,c(t.item?.children,e=>(o(),h(v,{key:e.filepath,modelValue:g(f),"onUpdate:modelValue":i[1]||=e=>d(f)?f.value=e:null,item:e,index:t.index+1},null,8,[`modelValue`,`item`,`index`]))),128))]):m(``,!0)])}}}),{__name:`AssetListItem`}),De={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},Oe={flex:`~`,"items-center":``,"justify-center":``},ke={"max-w-full":``,"w-full":``,"table-fixed":``},Ae={flex:`~ gap-1`,"w-full":``,"items-center":``},je={flex:`~ gap-1`,"w-full":``,"items-center":``,"of-hidden":``},Me={"flex-auto":``,"of-hidden":``,truncate:``,"ws-pre":``,"font-mono":``},Ne={capitalize:``},Pe={key:0},Fe={op70:``},Ie={flex:`~ gap2 wrap`},Le={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Re={flex:`~ gap2 wrap justify-center`},ze={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p8:``},Be={flex:`~ gap2 wrap justify-center`},Ve={flex:`~ col gap-4`,"min-h-full":``,"w-full":``,"of-hidden":``,p4:``},$={flex:``,"justify-end":``,"gap-4":``},He=Object.assign(a({__name:`AssetDetails`,props:{modelValue:{}},setup(e,{emit:a}){let s=j(e,`modelValue`,a,{passive:!0}),c=A(async()=>{if(s.value.type===`image`)return O.getImageMeta(s.value.filePath)}),l=i(!1),d=i(),C=i(0),E=A(async()=>{if(s.value.type!==`text`)return;C.value;let e=await O.getTextAssetContent(s.value.filePath);return d.value=e,e});async function D(){if(E.value!==d.value)try{await O.writeStaticAssets([{path:s.value.path,content:d.value,override:!0}],``),l.value=!1,C.value++,L({message:`Updated`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),L({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let k=w(),M=v(()=>(k.value?._installedModules||[]).some(e=>e.meta?.name===`@nuxt/image`||e.meta?.name===`@nuxt/image-edge`||e.meta?.name===`@nuxt/image-nightly`)),N=v(()=>{let e=[];if(s.value.type===`image`){let t=c.value?.width?`\n width="${c.value.width}"\n height="${c.value.height}" `:` `;return e.push({lang:`vue-html`,code:`<img${t}\n src="${s.value.publicPath}"\n/>`,name:`Plain Image`}),M.value&&e.push({lang:`vue-html`,code:`<NuxtImg${t}\n src="${s.value.publicPath}"\n/>`,name:`Nuxt Img`,docs:`https://image.nuxt.com/usage/nuxt-img`},{lang:`vue-html`,code:`<NuxtPicture${t}\n src="${s.value.publicPath}"\n/>`,name:`Nuxt Picture`,docs:`https://image.nuxt.com/usage/nuxt-picture`}),e}return e.push({lang:`html`,code:`<a download href="${s.value.publicPath}">\n Download ${s.value.path.split(`/`).slice(-1)[0]}\n</a>`,name:`Download link`}),e}),P=te(),F=ne(),I=T(()=>s.value.mtime),z=v(()=>{let e=s.value.size;return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:`${(e/1024/1024).toFixed(2)} MB`}),B=v(()=>{if(!c.value?.width||!c.value?.height)return``;let e=(t,n)=>n?e(n,t%n):t,t=e(c.value.width,c.value.height);return t>3?`${c.value.width/t}:${c.value.height/t}`:``}),H=v(()=>[`image`,`text`,`video`,`audio`,`font`].includes(s.value.type)),U=i(!1);async function W(){try{await O.deleteStaticAsset(s.value.filePath),s.value=void 0,U.value=!1,L({message:`Asset deleted`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),L({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}let G=i(!1),K=i(``);async function q(){let e=s.value.filePath.split(`/`),t=e.slice(-1)[0]?.split(`.`).slice(0,-1).join(`.`);if(!K.value||K.value===t)return L({message:`Please enter a new name`,icon:`i-carbon-warning`,classes:`text-orange`});try{let t=e.slice(-1)[0]?.split(`.`).slice(-1)[0],n=`${e.slice(0,-1).join(`/`)}/${K.value}.${t}`;await O.renameStaticAsset(s.value.filePath,n),s.value=void 0,G.value=!1,L({message:`Asset renamed`,icon:`i-carbon-checkmark`,classes:`text-green`})}catch(e){console.error(e),L({message:`Something went wrong!`,icon:`i-carbon-warning`,classes:`text-red`})}}return(e,i)=>{let a=Z,v=re,C=R,w=J,T=ee,O=V,k=n(`tooltip`);return o(),u(y,null,[_(`div`,De,[H.value?(o(),u(y,{key:0},[i[13]||=_(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[_(`div`,{"x-divider":``}),_(`div`,{"flex-none":``},` Preview `),_(`div`,{"x-divider":``})],-1),_(`div`,Oe,[t(a,{detail:``,"max-h-80":``,"min-h-20":``,"min-w-20":``,"w-auto":``,rounded:``,border:`~ base`,asset:g(s),"text-content":g(E)},null,8,[`asset`,`text-content`])])],64)):m(``,!0),i[25]||=_(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[_(`div`,{"x-divider":``}),_(`div`,{"flex-none":``},` Details `),_(`div`,{"x-divider":``})],-1),_(`table`,ke,[_(`tbody`,null,[_(`tr`,null,[i[14]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Filepath `,-1),_(`td`,null,[_(`div`,Ae,[t(v,{filepath:g(s).filePath,"text-left":``},null,8,[`filepath`]),f(t(C,{"flex-none":``,title:`Open in Editor`,icon:`carbon-launch`,border:!1,onClick:i[0]||=e=>g(F)(g(s).filePath)},null,512),[[k,`Open in Editor`]])])])]),_(`tr`,null,[i[15]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Public Path `,-1),_(`td`,null,[_(`div`,je,[_(`div`,Me,p(g(s).publicPath),1),f(t(C,{"flex-none":``,title:`Copy public path`,icon:`carbon-copy`,border:!1,onClick:i[1]||=e=>g(P)(g(s).publicPath,`assets-public-path`)},null,512),[[k,`Copy public path`]]),f(t(C,{"flex-none":``,to:g(s).publicPath,icon:`carbon-launch`,target:`_blank`,border:!1,title:`Open in browser`},null,8,[`to`]),[[k,`Open in browser`]])])])]),_(`tr`,null,[i[16]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Type `,-1),_(`td`,Ne,p(g(s).type),1)]),g(c)?.width?(o(),u(y,{key:0},[_(`tr`,null,[i[17]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Image Size `,-1),_(`td`,null,p(g(c).width)+` x `+p(g(c).height),1)]),B.value?(o(),u(`tr`,Pe,[i[18]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Aspect Ratio `,-1),_(`td`,null,p(B.value),1)])):m(``,!0)],64)):m(``,!0),_(`tr`,null,[i[19]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` File size `,-1),_(`td`,null,p(z.value),1)]),_(`tr`,null,[i[20]||=_(`td`,{"w-30":``,"ws-nowrap":``,pr5:``,"text-right":``,op50:``},` Last modified `,-1),_(`td`,null,[r(p(new Date(g(s).mtime).toLocaleString())+` `,1),_(`span`,Fe,`(`+p(g(I))+`)`,1)])])])]),i[26]||=_(`div`,{flex:`~ gap2`,"mb--2":``,"items-center":``,op50:``},[_(`div`,{"x-divider":``}),_(`div`,{"flex-none":``},` Actions `),_(`div`,{"x-divider":``})],-1),_(`div`,Ie,[t(C,{to:g(s).publicPath,download:``,target:`_blank`,icon:`carbon-download`,n:`green`},{default:b(()=>[...i[21]||=[r(` Download `,-1)]]),_:1},8,[`to`]),g(s).type===`text`?(o(),h(C,{key:0,icon:`carbon-edit`,n:`cyan`,onClick:i[2]||=e=>l.value=!l.value},{default:b(()=>[...i[22]||=[r(` Edit `,-1)]]),_:1})):m(``,!0),t(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:i[3]||=e=>G.value=!G.value},{default:b(()=>[...i[23]||=[r(` Rename `,-1)]]),_:1}),t(C,{icon:`carbon-delete`,n:`red`,onClick:i[4]||=e=>U.value=!U.value},{default:b(()=>[...i[24]||=[r(` Delete `,-1)]]),_:1})]),i[27]||=_(`div`,{"flex-auto":``},null,-1),N.value.length?(o(),h(w,{key:1,border:`t base`,"mx--4":``,"mb--4":``,"code-snippets":N.value},null,8,[`code-snippets`])):m(``,!0)]),t(T,{modelValue:U.value,"onUpdate:modelValue":i[6]||=e=>U.value=e},{default:b(()=>[_(`div`,Le,[i[30]||=_(`span`,null,` Are you sure you want to delete this asset? `,-1),_(`div`,Re,[t(C,{icon:`carbon-close`,onClick:i[5]||=e=>U.value=!1},{default:b(()=>[...i[28]||=[r(` Cancel `,-1)]]),_:1}),t(C,{icon:`carbon-delete`,n:`red`,onClick:W},{default:b(()=>[...i[29]||=[r(` Delete `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),t(T,{modelValue:G.value,"onUpdate:modelValue":i[9]||=e=>G.value=e},{default:b(()=>[_(`div`,ze,[t(O,{modelValue:K.value,"onUpdate:modelValue":i[7]||=e=>K.value=e,placeholder:`New name`,n:`blue`},null,8,[`modelValue`]),_(`div`,Be,[t(C,{icon:`carbon-close`,onClick:i[8]||=e=>G.value=!1},{default:b(()=>[...i[31]||=[r(` Cancel `,-1)]]),_:1}),t(C,{icon:`carbon-text-annotation-toggle`,n:`blue`,onClick:q},{default:b(()=>[...i[32]||=[r(` Rename `,-1)]]),_:1})])])]),_:1},8,[`modelValue`]),g(s).type===`text`?(o(),h(T,{key:0,modelValue:l.value,"onUpdate:modelValue":i[12]||=e=>l.value=e},{default:b(()=>[_(`div`,Ve,[f(_(`textarea`,{"onUpdate:modelValue":i[10]||=e=>d.value=e,placeholder:`Item value...`,class:`h-lg w-xl of-auto rounded-lg p-4 text-sm font-mono outline-none`,onKeydown:S(D,[`enter`])},null,544),[[x,d.value]]),_(`div`,$,[t(C,{icon:`carbon-close`,onClick:i[11]||=e=>l.value=!1},{default:b(()=>[...i[33]||=[r(` Cancel `,-1)]]),_:1}),t(C,{icon:`carbon:save`,n:`primary`,onClick:D},{default:b(()=>[...i[34]||=[r(` save `,-1)]]),_:1})])])]),_:1},8,[`modelValue`])):m(``,!0)],64)}}}),{__name:`AssetDetails`}),Ue={"h-full":``,"of-auto":``},We={"flex-none":``,flex:`~ gap2 items-center`,"text-lg":``},Ge={flex:`~ items-center justify-center`,absolute:``,"bottom--1":``,"right--1":``,"h-4":``,"w-4":``,"rounded-full":``,"bg-primary:30":``,"text-8px":``},Ke={flex:`~ col`,"w-30":``,"of-auto":``},qe={"text-xs":``,op75:``},Je={op50:``},Ye={key:0},Xe={"mt--4":``,px2:``,grid:`~ cols-minmax-8rem`},Ze={key:1,p2:``,grid:`~ cols-minmax-8rem`},Qe={key:1},$e=a({__name:`assets`,setup(e){W({icon:`carbon-image-copy`,title:`Assets`,layout:`full`});let r=C(),a=i(!1),s=i(``),l=v(()=>new B(r.value||[],{keys:[`path`]})),d=E(()=>{let e=[];for(let t of r.value||[]){let n=t.path.split(`.`).pop();n&&!e.some(e=>e.name===n)&&e.push({name:n,value:!0})}return e}),x=v(()=>(s.value?l.value.search(s.value).map(e=>e.item):r.value||[]).filter(e=>{let t=e.path.split(`.`).pop();return!t||d.some(e=>e.name===t&&e.value)})),S=v(()=>{let e={};for(let t of x.value){let n=`${t.path.split(`/`).slice(0,-1).join(`/`)}/`;e[n]||(e[n]=[]),e[n].push(t)}return Object.entries(e).sort(([e],[t])=>e.localeCompare(t))}),w=v(()=>{let e={path:`public`,children:[]},t=(e,n,r)=>{let[i,...a]=n,o=e.children.find(e=>e.path===i);o||(o={...r,path:i,children:[]},e.children.push(o)),a.length>1?t(o,a,r):a.length===1&&o.children.push({...r,path:a[0]})};return x.value.forEach(n=>{t(e,n.path.split(`/`).filter(e=>e!==``),n)}),e.children}),T=i(),{view:O}=F(`assets`);function k(){O.value=O.value===`list`?`grid`:`list`}D(`Escape`,()=>{T.value=void 0});let A=i();return(e,i)=>{let l=R,v=G,C=H,E=K,D=de,j=Ee,M=Y,N=Q,P=He,F=U,I=n(`tooltip`);return o(),u(`div`,Ue,[t(E,{ref_key:`navbar`,ref:A,search:s.value,"onUpdate:search":i[1]||=e=>s.value=e,pb2:``},{actions:b(()=>[_(`div`,We,[f(t(l,{icon:`carbon:cloud-upload`,title:`File Upload`,border:!1,onClick:i[0]||=e=>a.value=!a.value},null,512),[[I,`File Upload`,void 0,{"bottom-end":!0}]]),g(d).length?(o(),h(C,{key:0,direction:`end`,n:`sm primary`},{trigger:b(({click:e})=>[f(t(l,{icon:`carbon-filter`,border:!1,title:`Filter`,p3:``,"text-lg":``,onClick:t=>e()},null,8,[`onClick`]),[[I,`Filter`,void 0,{"bottom-end":!0}]]),_(`span`,Ge,p(g(d).length),1)]),default:b(()=>[_(`div`,Ke,[(o(!0),u(y,null,c(g(d),e=>(o(),h(v,{key:e.name,modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,flex:`~ gap-2`,rounded:``,px2:``,py2:``},{default:b(()=>[_(`span`,qe,p(e.name),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`]))),128))])]),_:1})):m(``,!0),f(t(l,{"text-lg":``,border:!1,icon:g(O)===`grid`?`i-carbon-list`:`i-carbon-grid`,title:`Toggle view`,onClick:k},null,8,[`icon`]),[[I,`Toggle View`,void 0,{"bottom-end":!0}]])])]),default:b(()=>[_(`div`,Je,[s.value?(o(),u(`span`,Ye,p(x.value.length)+` matched · `,1)):m(``,!0),_(`span`,null,p(g(r)?.length)+` assets in total`,1)])]),_:1},8,[`search`]),t(D,{modelValue:a.value,"onUpdate:modelValue":i[2]||=e=>a.value=e,folder:`/`},null,8,[`modelValue`]),g(O)===`grid`?(o(),u(y,{key:0},[S.value.length>1?(o(!0),u(y,{key:0},c(S.value,([e,t])=>(o(),h(M,{key:e,text:e,description:`${t.length} items`,open:t.length<=g(50),padding:!1},{default:b(()=>[_(`div`,Xe,[(o(!0),u(y,null,c(t,t=>(o(),h(j,{key:t.path,asset:t,folder:e,onClick:e=>T.value=t},null,8,[`asset`,`folder`,`onClick`]))),128))])]),_:2},1032,[`text`,`description`,`open`]))),128)):(o(),u(`div`,Ze,[(o(!0),u(y,null,c(x.value,e=>(o(),h(j,{key:e.path,asset:e,onClick:t=>T.value=e},null,8,[`asset`,`onClick`]))),128))]))],64)):(o(),u(`div`,Qe,[(o(!0),u(y,null,c(w.value,(e,t)=>(o(),h(N,{key:t,modelValue:T.value,"onUpdate:modelValue":i[3]||=e=>T.value=e,item:e},null,8,[`modelValue`,`item`]))),128))])),t(F,{"model-value":!!T.value,"auto-close":``,"w-120":``,top:A.value,onClose:i[5]||=e=>T.value=void 0},{default:b(()=>[T.value?(o(),h(P,{key:0,modelValue:T.value,"onUpdate:modelValue":i[4]||=e=>T.value=e},null,8,[`modelValue`])):m(``,!0)]),_:1},8,[`model-value`,`top`])])}}});export{$e as default};
@@ -1 +0,0 @@
1
- {"id":"9ec1ff21-8126-4e86-bc50-039a1d3867c9","timestamp":1784773549462,"prerendered":[]}
@@ -1,8 +0,0 @@
1
- import{St as e,T as t,V as n,W as r,h as i,p as a}from"./vendor/json-editor-vue-c7zwcfg4.js";import{v as o}from"./rpc-jaaujnev.js";import{t as s}from"./ncode-block-jv3jk7c5.js";var c=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}else return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends c{};function l(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function u(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function d(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function f(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function p(e,t){return d(e,t,``)}function m(e,t){return f(e,t,``)}function h(e,t){return t.slice(0,g(e,t))}function g(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function _(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function v(e,t){if(t)return b(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function y(e,t){if(t)return b(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function b(e,t){if(!t)return[y(e),v(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=_(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var x=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,S=RegExp(`[${x}]+|\\s+|[^${x}]`,`ug`);new class extends c{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=_(e,r)}else n=e.match(S)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&C(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&C(n,i,r,null,t.intlSegmenter),e}};function C(e,t,n,r,i){if(t&&n){let[a,o]=b(t.value,i),[s,c]=b(n.value,i);if(e){let r=l(a,s);e.value=f(e.value,s,r),t.value=p(t.value,r),n.value=p(n.value,r)}if(r){let e=u(o,c);r.value=d(r.value,c,e),t.value=m(t.value,e),n.value=m(n.value,e)}}else if(n){if(e){let e=y(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=y(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=y(r.value,i),[a,o]=b(t.value,i),s=l(n,a);t.value=p(t.value,s);let c=u(p(n,s),o);t.value=m(t.value,c),r.value=d(r.value,n,c),e.value=f(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=y(r.value,i),n=h(v(t.value,i),e);t.value=m(t.value,n)}else if(e){let n=h(v(e.value,i),y(t.value,i));t.value=p(t.value,n)}}new class extends c{tokenize(e){let t=RegExp(`(\\r?\\n)|[${x}]+|[^\\S\\n\\r]+|[^${x}]`,`ug`);return e.match(t)||[]}};var w=new class extends c{constructor(){super(...arguments),this.tokenize=E}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
3
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
4
- `)&&(e=e.slice(0,-1)),t.endsWith(`
5
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function T(e,t,n){return w.diff(e,t,n)}function E(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
6
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function D(e){return e==`.`||e==`!`||e==`?`}new class extends c{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(D(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends c{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends c{constructor(){super(...arguments),this.tokenize=E}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(O(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function O(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=O(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=O(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends c{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var k=Object.assign(t({__name:`CodeDiff`,props:{from:{},to:{},lang:{}},setup(t){let c=t,l=/class="shiki/,u=/class="line"/g;function d(e,t){let n=T(e.trim(),t.trim()),r=[],i=[],a=[];for(let e of n){let t=e.value.trimEnd().split(`
7
- `);for(let n of t)e.added?(r.push(a.length),a.push(n)):(e.removed&&i.push(a.length),a.push(n))}return{added:r,removed:i,result:a.join(`
8
- `)}}let f=a(()=>d(c.from,c.to));function p(e){let t=0;return e.replace(l,`class="shiki diff`).replace(u,e=>(t++,f.value.added.includes(t-1)?`class="line line-added"`:f.value.removed.includes(t-1)?`class="line line-removed"`:e))}let m=e();n(h);function h(){let e=o(m);e&&e.querySelector(`.line-added,.line-removed`)?.scrollIntoView()}return(e,n)=>{let a=s;return r(),i(a,{ref_key:`elRef`,ref:m,code:f.value.result,lang:t.lang,"transform-rendered":p,onLoaded:h},null,8,[`code`,`lang`])}}}),{__name:`CodeDiff`});export{k as t};