Files
zhamao-framework/assets/js/3.07fc018e.js

1 line
6.5 KiB
JavaScript
Raw Normal View History

2024-09-19 08:29:13 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[3,17],{664:function(e,t,n){"use strict";n.d(t,"d",(function(){return r})),n.d(t,"a",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"h",(function(){return p})),n.d(t,"i",(function(){return d})),n.d(t,"c",(function(){return h})),n.d(t,"g",(function(){return f}));n(391);const r=/#.*$/,i=/\.(md|html)$/,s=/\/$/,a=/^[a-z]+:/i;function o(e){return decodeURI(e).replace(r,"").replace(i,"")}function l(e){return a.test(e)}function c(e){if(l(e))return e;const t=e.match(r),n=t?t[0]:"",i=o(e);return s.test(i)?e:i+".html"+n}function u(e,t){const n=e.hash,i=function(e){const t=e.match(r);if(t)return t[0]}(t);if(i&&n!==i)return!1;return o(e.path)===o(t)}function p(e,t,n){if(l(t))return{type:"external",path:t};n&&(t=function(e,t,n){const r=e.charAt(0);if("/"===r)return e;if("?"===r||"#"===r)return t+e;const i=t.split("/");n&&i[i.length-1]||i.pop();const s=e.replace(/^\//,"").split("/");for(let e=0;e<s.length;e++){const t=s[e];".."===t?i.pop():"."!==t&&i.push(t)}""!==i[0]&&i.unshift("");return i.join("/")}(t,n));const r=o(t);for(let t=0;t<e.length;t++)if(o(e[t].regularPath)===r)return Object.assign({},e[t],{type:"page",path:c(e[t].path)});return console.error(`[vuepress] No matching page found for sidebar item "${t}"`),{}}function d(e,t,n,r){const{pages:i,themeConfig:s}=n,a=r&&s.locales&&s.locales[r]||s;if("auto"===(e.frontmatter.sidebar||a.sidebar||s.sidebar))return function(e){const t=h(e.headers||[]);return[{type:"group",collapsable:!1,title:e.title,path:null,children:t.map(t=>({type:"auto",title:t.title,basePath:e.path,path:e.path+"#"+t.slug,children:t.children||[]}))}]}(e);const o=a.sidebar||s.sidebar;if(o){const{base:e,config:n}=function(e,t){if(Array.isArray(t))return{base:"/",config:t};for(const r in t)if(0===(n=e,/(\.html|\/)$/.test(n)?n:n+"/").indexOf(encodeURI(r)))return{base:r,config:t[r]};var n;return{}}(t,o);return n?n.map(t=>function e(t,n,r,i=1){if("string"==typeof t)return p(n,t,r);if(Array.isArray(t))return Object.assign(p(n,t[0],r),{title:t[1]});{i>3&&console.error("[vuepress] detected a too deep nested sidebar group.");const s=t.children||[];return 0===s.length&&t.path?Object.assign(p(n,t.path,r),{title:t.title}):{type:"group",path:t.path,title:t.title,sidebarDepth:t.sidebarDepth,children:s.map(t=>e(t,n,r,i+1)),collapsable:!1!==t.collapsable}}}(t,i,e)):[]}return[]}function h(e){let t;return(e=e.map(e=>Object.assign({},e))).forEach(e=>{2===e.level?t=e:t&&(t.children||(t.children=[])).push(e)}),e.filter(e=>2===e.level)}function f(e){return Object.assign(e,{type:e.items&&e.items.length?"links":"link"})}},666:function(e,t,n){},668:function(e,t,n){},674:function(e,t,n){"use strict";n(666)},675:function(e,t,n){"use strict";n.r(t);var r=n(690),i=n(677),s=n(664);function a(e,t){return"group"===t.type&&t.children.some(t=>"group"===t.type?a(e,t):"page"===t.type&&Object(s.e)(e,t.path))}var o={name:"SidebarLinks",components:{SidebarGroup:r.default,SidebarLink:i.default},props:["items","depth","sidebarDepth"],data:()=>({openGroupIndex:0}),watch:{$route(){this.refreshIndex()}},created(){this.refreshIndex()},methods:{refreshIndex(){const e=function(e,t){for(let n=0;n<t.length;n++){const r=t[n];if(a(e,r))return n}return-1}(this.$route,this.items);e>-1&&(this.openGroupIndex=e)},toggleGroup(e){this.openGroupIndex=e===this.openGroupIndex?-1:e},isActive(e){return Object(s.e)(this.$route,e.regularPath)}}},l=n(84),c=Object(l.a)(o,(function(){var e=this,t=e._self._c;return e.items.length?t("ul",{staticClass:"sidebar-links"},e._l(e.items,(function(n,r){return t("li",{key:r},["group"===n.type?t("SidebarGroup",{attrs:{item:n,open:r===e.openGroupIndex,collapsable:n.collapsable||n.collapsible,depth:e.depth},on:{toggle:function(t){return e.toggleGroup(r)}}}):t("SidebarLink",{attrs:{"sidebar-depth":e.sidebarDepth,item:n}})],1)})),0):e._e()}),[],!1,null,null,null);t.default=c.exports},677:function(e,t,n){"use strict";n.r(t);var r=n(664);function i(e,t,n,r,i){const s={props:{to:t,activeClass:"",exactActiveClass:""}