fix(xboard theme): add root path redirection to dashboard

This commit is contained in:
xboard committed 2025-01-26 12:50:40 +08:00
1 parent 97fbdc01c0
commit 8a5a1f60f5
3 files changed
+1 -1

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ var d3=Object.defineProperty;var f3=(e,t,n)=>t in e?d3(e,t,{enumerable:!0,config
* vue-router v4.4.3
* (c) 2024 Eduardo San Martin Morote
* @license MIT
*/const cs=typeof document<"u";function UP(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Ut=Object.assign;function Sd(e,t){const n={};for(const o in t){const r=t[o];n[o]=$o(r)?r.map(e):e(r)}return n}const ka=()=>{},$o=Array.isArray,_x=/#/g,qP=/&/g,KP=/\//g,GP=/=/g,YP=/\?/g,Sx=/\+/g,XP=/%5B/g,ZP=/%5D/g,kx=/%5E/g,JP=/%60/g,Px=/%7B/g,QP=/%7C/g,Tx=/%7D/g,eT=/%20/g;function pp(e){return encodeURI(""+e).replace(QP,"|").replace(XP,"[").replace(ZP,"]")}function tT(e){return pp(e).replace(Px,"{").replace(Tx,"}").replace(kx,"^")}function Lf(e){return pp(e).replace(Sx,"%2B").replace(eT,"+").replace(_x,"%23").replace(qP,"%26").replace(JP,"`").replace(Px,"{").replace(Tx,"}").replace(kx,"^")}function nT(e){return Lf(e).replace(GP,"%3D")}function oT(e){return pp(e).replace(_x,"%23").replace(YP,"%3F")}function rT(e){return e==null?"":oT(e).replace(KP,"%2F")}function Ua(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const iT=/\/$/,sT=e=>e.replace(iT,"");function kd(e,t,n="/"){let o,r={},i="",s="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),r=e(i)),a>-1&&(o=o||t.slice(0,a),s=t.slice(a,t.length)),o=uT(o??t,n),{fullPath:o+(i&&"?")+i+s,path:o,query:r,hash:Ua(s)}}function aT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Fg(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lT(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ks(t.matched[o],n.matched[r])&&Rx(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ks(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Rx(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!cT(e[n],t[n]))return!1;return!0}function cT(e,t){return $o(e)?Bg(e,t):$o(t)?Bg(t,e):e===t}function Bg(e,t){return $o(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function uT(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,s,a;for(s=0;s<o.length;s++)if(a=o[s],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(s).join("/")}const _r={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var qa;(function(e){e.pop="pop",e.push="push"})(qa||(qa={}));var Pa;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Pa||(Pa={}));function dT(e){if(!e)if(cs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),sT(e)}const fT=/^[^#]+#/;function hT(e,t){return e.replace(fT,"#")+t}function pT(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const iu=()=>({left:window.scrollX,top:window.scrollY});function mT(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=pT(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ng(e,t){return(history.state?history.state.position-t:-1)+e}const Ff=new Map;function gT(e,t){Ff.set(e,t)}function vT(e){const t=Ff.get(e);return Ff.delete(e),t}let bT=()=>location.protocol+"//"+location.host;function Ex(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let a=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Fg(l,"")}return Fg(n,e)+o+r}function yT(e,t,n,o){let r=[],i=[],s=null;const a=({state:f})=>{const h=Ex(e,location),p=n.value,m=t.value;let g=0;if(f){if(n.value=h,t.value=f,s&&s===p){s=null;return}g=m?f.position-m.position:0}else o(h);r.forEach(b=>{b(n.value,p,{delta:g,type:qa.pop,direction:g?g>0?Pa.forward:Pa.back:Pa.unknown})})};function l(){s=n.value}function c(f){r.push(f);const h=()=>{const p=r.indexOf(f);p>-1&&r.splice(p,1)};return i.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(Ut({},f.state,{scroll:iu()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Hg(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?iu():null}}function xT(e){const{history:t,location:n}=window,o={value:Ex(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))Line truncated
*/const cs=typeof document<"u";function UP(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const Ut=Object.assign;function Sd(e,t){const n={};for(const o in t){const r=t[o];n[o]=$o(r)?r.map(e):e(r)}return n}const ka=()=>{},$o=Array.isArray,_x=/#/g,qP=/&/g,KP=/\//g,GP=/=/g,YP=/\?/g,Sx=/\+/g,XP=/%5B/g,ZP=/%5D/g,kx=/%5E/g,JP=/%60/g,Px=/%7B/g,QP=/%7C/g,Tx=/%7D/g,eT=/%20/g;function pp(e){return encodeURI(""+e).replace(QP,"|").replace(XP,"[").replace(ZP,"]")}function tT(e){return pp(e).replace(Px,"{").replace(Tx,"}").replace(kx,"^")}function Lf(e){return pp(e).replace(Sx,"%2B").replace(eT,"+").replace(_x,"%23").replace(qP,"%26").replace(JP,"`").replace(Px,"{").replace(Tx,"}").replace(kx,"^")}function nT(e){return Lf(e).replace(GP,"%3D")}function oT(e){return pp(e).replace(_x,"%23").replace(YP,"%3F")}function rT(e){return e==null?"":oT(e).replace(KP,"%2F")}function Ua(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const iT=/\/$/,sT=e=>e.replace(iT,"");function kd(e,t,n="/"){let o,r={},i="",s="";const a=t.indexOf("#");let l=t.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(o=t.slice(0,l),i=t.slice(l+1,a>-1?a:t.length),r=e(i)),a>-1&&(o=o||t.slice(0,a),s=t.slice(a,t.length)),o=uT(o??t,n),{fullPath:o+(i&&"?")+i+s,path:o,query:r,hash:Ua(s)}}function aT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Fg(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function lT(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ks(t.matched[o],n.matched[r])&&Rx(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ks(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Rx(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!cT(e[n],t[n]))return!1;return!0}function cT(e,t){return $o(e)?Bg(e,t):$o(t)?Bg(t,e):e===t}function Bg(e,t){return $o(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function uT(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,s,a;for(s=0;s<o.length;s++)if(a=o[s],a!==".")if(a==="..")i>1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(s).join("/")}const _r={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var qa;(function(e){e.pop="pop",e.push="push"})(qa||(qa={}));var Pa;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Pa||(Pa={}));function dT(e){if(!e)if(cs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),sT(e)}const fT=/^[^#]+#/;function hT(e,t){return e.replace(fT,"#")+t}function pT(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const iu=()=>({left:window.scrollX,top:window.scrollY});function mT(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=pT(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Ng(e,t){return(history.state?history.state.position-t:-1)+e}const Ff=new Map;function gT(e,t){Ff.set(e,t)}function vT(e){const t=Ff.get(e);return Ff.delete(e),t}let bT=()=>location.protocol+"//"+location.host;function Ex(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let a=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(a);return l[0]!=="/"&&(l="/"+l),Fg(l,"")}return Fg(n,e)+o+r}function yT(e,t,n,o){let r=[],i=[],s=null;const a=({state:f})=>{const h=Ex(e,location),p=n.value,m=t.value;let g=0;if(f){if(n.value=h,t.value=f,s&&s===p){s=null;return}g=m?f.position-m.position:0}else o(h);r.forEach(b=>{b(n.value,p,{delta:g,type:qa.pop,direction:g?g>0?Pa.forward:Pa.back:Pa.unknown})})};function l(){s=n.value}function c(f){r.push(f);const h=()=>{const p=r.indexOf(f);p>-1&&r.splice(p,1)};return i.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(Ut({},f.state,{scroll:iu()}),"")}function d(){for(const f of i)f();i=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Hg(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?iu():null}}function xT(e){const{history:t,location:n}=window,o={value:Ex(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,c,u){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))Line truncated
* pinia v2.2.2
* (c) 2024 Eduardo San Martin Morote
* @license MIT
Binary file not shown.
Binary file not shown.