UNPKG

hirsun-vuepress-theme-hope-plus

Version:
951 lines (933 loc) 31.6 kB
import { H as HopeIcon, D as DropTransition, A as AutoLink, M as MarkdownContent, a as ArticleInfoType, u as useSidebarItems, b as useNavigate, r as resolveLinkInfo, c as usePageInfo, P as PageInfo, d as useDarkmode, T as TOC, e as useWindowSize, S as SkipLink, C as CommonWrapper } from './SkipLink-29f804a8.js'; export { i as injectDarkmode, s as setupDarkmode, f as setupSidebarItems } from './SkipLink-29f804a8.js'; import { withBase, usePageFrontmatter, useSiteLocaleData, usePageData, useRouteLocale, ClientOnly } from '@vuepress/client'; import { h, defineComponent, computed, shallowRef, onMounted, watch, resolveComponent } from 'vue'; import { removeEndingSlash, isLinkExternal, isArray, isString as isString$1, isPlainObject, isLinkHttp, removeLeadingSlash } from '@vuepress/shared'; import { VPLink, isString, isLinkExternal as isLinkExternal$1, resolveRouteWithRedirect, resolveRepoType, IconBase, hasGlobalComponent, RenderDefault } from 'vuepress-shared/client'; import { u as usePure, a as useThemeLocaleData, b as useThemeData } from './themeData-51227756.js'; import { useRouter, useLink } from 'vue-router'; import { useEventListener } from '@vueuse/core'; import { F as FadeSlideY } from './FadeSlideY-2f12d3e9.js'; export { u as useScrollPromise } from './FadeSlideY-2f12d3e9.js'; import 'vuepress-plugin-reading-time2/client'; import 'vuepress-shared/noopModule'; import '@vuepress/plugin-external-link-icon/client'; import './styles/variables.module.scss?module'; import '@temp/theme-hope/sidebar'; import 'balloon-css/balloon.css'; import '@vuepress/plugin-theme-data/client'; const getAncestorLinks = (path, routeLocale) => { const routePaths = path.replace(routeLocale, "/").split("/"); const result = []; let link = removeEndingSlash(routeLocale); routePaths.forEach((name, index) => { if (index !== routePaths.length - 1) { link += `${name}/`; result.push({ link, name: name || "Home" }); } else if (name !== "") { link += name; result.push({ link, name }); } }); return result; }; const FeaturePanel = (props, { slots }) => { var _a, _b; const { bgImage, bgImageDark, bgImageStyle, color, description, image, imageDark, header, features = [] } = props; return h( "div", { class: "vp-feature-wrapper" }, [ bgImage ? h("div", { class: ["vp-feature-bg", { light: bgImageDark }], style: [{ "background-image": `url(${bgImage})` }, bgImageStyle] }) : null, bgImageDark ? h("div", { class: "vp-feature-bg dark", style: [ { "background-image": `url(${bgImageDark})` }, bgImageStyle ] }) : null, h( "div", { class: "vp-feature", style: color ? { color } : {} }, [ ((_a = slots.image) == null ? void 0 : _a.call(slots, props)) || [ image ? h("img", { class: ["vp-feature-image", { light: imageDark }], src: withBase(image), alt: header }) : null, imageDark ? h("img", { class: "vp-feature-image dark", src: withBase(imageDark), alt: header }) : null ], ((_b = slots.info) == null ? void 0 : _b.call(slots, props)) || [ header ? h("h2", { class: "vp-feature-header" }, header) : null, description ? h("p", { class: "vp-feature-description", innerHTML: description }) : null ], features.length ? h( "div", { class: "vp-features" }, features.map(({ icon, title, details, link }) => { const children = [ h("h3", { class: "vp-feature-title" }, [ h(HopeIcon, { icon }), h("span", { innerHTML: title }) ]), h("p", { class: "vp-feature-details", innerHTML: details }) ]; return link ? isLinkExternal(link) ? h( "a", { class: "vp-feature-item link", href: link, role: "navigation", "aria-label": title, target: "_blank" }, children ) : h( VPLink, { class: "vp-feature-item link", to: link, role: "navigation", "aria-label": title }, () => children ) : h("div", { class: "vp-feature-item" }, children); }) ) : null ] ) ] ); }; FeaturePanel.displayName = "FeaturePanel"; var FeaturePanel$1 = FeaturePanel; var HeroInfo = defineComponent({ name: "HeroInfo", slots: Object, setup(_props, { slots }) { const frontmatter = usePageFrontmatter(); const siteLocale = useSiteLocaleData(); const isFullScreen = computed( () => frontmatter.value.heroFullScreen ?? false ); const heroInfo = computed(() => { const { heroText, tagline } = frontmatter.value; return { text: heroText ?? siteLocale.value.title ?? "Hello", tagline: tagline ?? siteLocale.value.description ?? "", isFullScreen: isFullScreen.value }; }); const heroImage = computed(() => { const { heroText, heroImage: heroImage2, heroImageDark, heroAlt, heroImageStyle } = frontmatter.value; return { image: heroImage2 ? withBase(heroImage2) : null, imageDark: heroImageDark ? withBase(heroImageDark) : null, heroStyle: heroImageStyle, alt: heroAlt || heroText || "hero image", isFullScreen: isFullScreen.value }; }); const bgInfo = computed(() => { const { bgImage, bgImageDark, bgImageStyle } = frontmatter.value; return { image: isString(bgImage) ? withBase(bgImage) : null, imageDark: isString(bgImageDark) ? withBase(bgImageDark) : null, bgStyle: bgImageStyle, isFullScreen: isFullScreen.value }; }); const actions = computed(() => frontmatter.value.actions ?? []); return () => { var _a, _b, _c; return h( "header", { class: ["vp-hero-info-wrapper", { fullscreen: isFullScreen.value }] }, [ ((_a = slots.heroBg) == null ? void 0 : _a.call(slots, bgInfo.value)) || [ bgInfo.value.image ? h("div", { class: ["vp-hero-mask", { light: bgInfo.value.imageDark }], style: [ { "background-image": `url(${bgInfo.value.image})` }, bgInfo.value.bgStyle ] }) : null, bgInfo.value.imageDark ? h("div", { class: "vp-hero-mask dark", style: [ { "background-image": `url(${bgInfo.value.imageDark})` }, bgInfo.value.bgStyle ] }) : null ], h("div", { class: "vp-hero-info" }, [ ((_b = slots.heroImage) == null ? void 0 : _b.call(slots, heroImage.value)) || h(DropTransition, { appear: true, type: "group" }, () => [ heroImage.value.image ? h("img", { key: "light", class: [ "vp-hero-image", { light: heroImage.value.imageDark } ], style: heroImage.value.heroStyle, src: heroImage.value.image, alt: heroImage.value.alt }) : null, heroImage.value.imageDark ? h("img", { key: "dark", class: "vp-hero-image dark", style: heroImage.value.heroStyle, src: heroImage.value.imageDark, alt: heroImage.value.alt }) : null ]), ((_c = slots.heroInfo) == null ? void 0 : _c.call(slots, heroInfo.value)) ?? h("div", { class: "vp-hero-infos" }, [ heroInfo.value.text ? h( DropTransition, { appear: true, delay: 0.04 }, () => h("h1", { id: "main-title" }, heroInfo.value.text) ) : null, heroInfo.value.tagline ? h( DropTransition, { appear: true, delay: 0.08 }, () => h("p", { class: "vp-description", innerHTML: heroInfo.value.tagline }) ) : null, actions.value.length ? h( DropTransition, { appear: true, delay: 0.12 }, () => h( "p", { class: "vp-actions" }, actions.value.map( (action) => h(AutoLink, { class: ["vp-action", action.type || "default"], config: action, noExternalLinkIcon: true }) ) ) ) : null ]) ]) ] ); }; } }); const HighlightPanel = (props, { slots }) => { var _a, _b, _c; const { bgImage, bgImageDark, bgImageStyle, color, description, image, imageDark, header, highlights = [], type = "un-order" } = props; return h( "div", { class: "vp-highlight-wrapper", style: color ? { color } : {} }, [ bgImage ? h("div", { class: ["vp-highlight-bg", { light: bgImageDark }], style: [{ "background-image": `url(${bgImage})` }, bgImageStyle] }) : null, bgImageDark ? h("div", { class: "vp-highlight-bg dark", style: [ { "background-image": `url(${bgImageDark})` }, bgImageStyle ] }) : null, h("div", { class: "vp-highlight" }, [ ((_a = slots.image) == null ? void 0 : _a.call(slots, props)) || [ image ? h("img", { class: ["vp-highlight-image", { light: imageDark }], src: withBase(image), alt: header }) : null, imageDark ? h("img", { class: "vp-highlight-image dark", src: withBase(imageDark), alt: header }) : null ], ((_b = slots.info) == null ? void 0 : _b.call(slots, props)) || [ h( "div", { class: "vp-highlight-info-wrapper" }, h("div", { class: "vp-highlight-info" }, [ header ? h("h2", { class: "vp-highlight-header", innerHTML: header }) : null, description ? h("p", { class: "vp-highlight-description", innerHTML: description }) : null, ((_c = slots.highlights) == null ? void 0 : _c.call(slots, highlights)) || h( type === "order" ? "ol" : type === "no-order" ? "dl" : "ul", { class: "vp-highlights" }, highlights.map(({ icon, title, details, link }) => { const children = [ h( type === "no-order" ? "dt" : "h3", { class: "vp-highlight-title" }, [ icon ? h(HopeIcon, { class: "vp-highlight-icon", icon }) : null, h("span", { innerHTML: title }) ] ), details ? h(type === "no-order" ? "dd" : "p", { class: "vp-highlight-details", innerHTML: details }) : null ]; return h( type === "no-order" ? "div" : "li", { class: ["vp-highlight-item-wrapper", { link }] }, link ? isLinkExternal$1(link) ? h( "a", { class: "vp-highlight-item link", href: link, role: "navigation", "aria-label": title, target: "_blank" }, children ) : h( VPLink, { class: "vp-highlight-item link", to: link, role: "navigation", "aria-label": title }, () => children ) : h("div", { class: "vp-highlight-item" }, children) ); }) ) ]) ) ] ]) ] ); }; HighlightPanel.displayName = "HighlightPanel"; var HighlightPanel$1 = HighlightPanel; var HomePage = defineComponent({ name: "HomePage", slots: Object, setup(_props, { slots }) { const pure = usePure(); const frontmatter = usePageFrontmatter(); const features = computed(() => { const { features: features2 } = frontmatter.value; return isArray(features2) ? features2 : null; }); const highlights = computed(() => { const { highlights: highlights2 } = frontmatter.value; if (isArray(highlights2)) return highlights2; return null; }); return () => { var _a, _b, _c, _d; return h( "main", { id: "main-content", class: ["vp-project-home ", { pure: pure.value }], "aria-labelledby": frontmatter.value.heroText === null ? "" : "main-title" }, [ (_a = slots.top) == null ? void 0 : _a.call(slots), h(HeroInfo), ((_b = highlights.value) == null ? void 0 : _b.map( (highlight) => "features" in highlight ? h(FeaturePanel$1, highlight) : h(HighlightPanel$1, highlight) )) || (features.value ? h( DropTransition, { appear: true, delay: 0.24 }, () => h(FeaturePanel$1, { features: features.value }) ) : null), (_c = slots.center) == null ? void 0 : _c.call(slots), h( DropTransition, { appear: true, delay: 0.32 }, () => h(MarkdownContent) ), (_d = slots.bottom) == null ? void 0 : _d.call(slots) ] ); }; } }); var BreadCrumb = defineComponent({ name: "BreadCrumb", setup() { const router = useRouter(); const page = usePageData(); const routeLocale = useRouteLocale(); const frontmatter = usePageFrontmatter(); const themeLocale = useThemeLocaleData(); const config = shallowRef([]); const enable = computed( () => (frontmatter.value.breadcrumb || frontmatter.value.breadcrumb !== false && themeLocale.value.breadcrumb !== false) && config.value.length > 1 ); const iconEnable = computed( () => frontmatter.value.breadcrumbIcon || frontmatter.value.breadcrumbIcon !== false && themeLocale.value.breadcrumbIcon !== false ); const getBreadCrumbConfig = () => { const routes = router.getRoutes(); const breadcrumbConfig = getAncestorLinks( page.value.path, routeLocale.value ).map(({ link, name }) => { const route = routes.find((route2) => route2.path === link); if (route) { const { meta, path } = resolveRouteWithRedirect(router, route.path); return { title: meta[ArticleInfoType.shortTitle] || meta[ArticleInfoType.title] || name, icon: meta[ArticleInfoType.icon], path }; } return null; }).filter((item) => item !== null); if (breadcrumbConfig.length > 1) config.value = breadcrumbConfig; }; onMounted(() => { getBreadCrumbConfig(); watch(() => page.value.path, getBreadCrumbConfig); }); return () => h( "nav", { class: ["vp-breadcrumb", { disable: !enable.value }] }, enable.value ? h( "ol", { vocab: "https://schema.org/", typeof: "BreadcrumbList" }, config.value.map( (item, index) => h( "li", { class: { "is-active": config.value.length - 1 === index }, property: "itemListElement", typeof: "ListItem" }, [ h( VPLink, { to: item.path, property: "item", typeof: "WebPage" }, () => [ // icon iconEnable.value ? h(HopeIcon, { icon: item.icon }) : null, // text h( "span", { property: "name" }, item.title || "Unknown" ) ] ), // meta h("meta", { property: "position", content: index + 1 }) ] ) ) ) : [] ); } }); const resolveFromFrontmatterConfig = (conf) => { const router = useRouter(); if (conf === false) return false; if (isString$1(conf)) return resolveLinkInfo(router, conf, true); if (isPlainObject(conf)) return conf; return null; }; const resolveFromSidebarItems = (sidebarItems, currentPath, offset) => { const index = sidebarItems.findIndex((item) => item.link === currentPath); if (index !== -1) { const targetItem = sidebarItems[index + offset]; if (!(targetItem == null ? void 0 : targetItem.link)) return null; return targetItem; } for (const item of sidebarItems) if (item.children) { const childResult = resolveFromSidebarItems( item.children, currentPath, offset ); if (childResult) return childResult; } return null; }; var PageNav = defineComponent({ name: "PageNav", setup() { const themeLocale = useThemeLocaleData(); const frontmatter = usePageFrontmatter(); const sidebarItems = useSidebarItems(); const page = usePageData(); const navigate = useNavigate(); const prevNavLink = computed(() => { const prevConfig = resolveFromFrontmatterConfig(frontmatter.value.prev); return prevConfig === false ? null : prevConfig || (themeLocale.value.prevLink === false ? null : resolveFromSidebarItems( sidebarItems.value, page.value.path, -1 )); }); const nextNavLink = computed(() => { const nextConfig = resolveFromFrontmatterConfig(frontmatter.value.next); return nextConfig === false ? null : nextConfig || (themeLocale.value.nextLink === false ? null : resolveFromSidebarItems( sidebarItems.value, page.value.path, 1 )); }); useEventListener("keydown", (event) => { if (event.altKey) { if (event.key === "ArrowRight") { if (nextNavLink.value) { navigate(nextNavLink.value.link); event.preventDefault(); } } else if (event.key === "ArrowLeft") { if (prevNavLink.value) { navigate(prevNavLink.value.link); event.preventDefault(); } } } }); return () => prevNavLink.value || nextNavLink.value ? h("nav", { class: "vp-page-nav" }, [ prevNavLink.value ? h( AutoLink, { class: "prev", config: prevNavLink.value }, () => { var _a, _b; return [ h("div", { class: "hint" }, [ h("span", { class: "arrow start" }), themeLocale.value.metaLocales.prev ]), h("div", { class: "link" }, [ h(HopeIcon, { icon: (_a = prevNavLink.value) == null ? void 0 : _a.icon }), (_b = prevNavLink.value) == null ? void 0 : _b.text ]) ]; } ) : null, nextNavLink.value ? h( AutoLink, { class: "next", config: nextNavLink.value }, () => { var _a, _b; return [ h("div", { class: "hint" }, [ themeLocale.value.metaLocales.next, h("span", { class: "arrow end" }) ]), h("div", { class: "link" }, [ (_a = nextNavLink.value) == null ? void 0 : _a.text, h(HopeIcon, { icon: (_b = nextNavLink.value) == null ? void 0 : _b.icon }) ]) ]; } ) : null ]) : null; } }); const editLinkPatterns = { GitHub: ":repo/edit/:branch/:path", GitLab: ":repo/-/edit/:branch/:path", Gitee: ":repo/edit/:branch/:path", Bitbucket: ":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default" }; const resolveEditLink = ({ docsRepo, docsBranch, docsDir, filePathRelative, editLinkPattern }) => { if (!filePathRelative) return null; const repoType = resolveRepoType(docsRepo); let pattern; if (editLinkPattern) pattern = editLinkPattern; else if (repoType !== null) pattern = editLinkPatterns[repoType]; if (!pattern) return null; return pattern.replace( /:repo/, isLinkHttp(docsRepo) ? docsRepo : `https://github.com/${docsRepo}` ).replace(/:branch/, docsBranch).replace( /:path/, removeLeadingSlash(`${removeEndingSlash(docsDir)}/${filePathRelative}`) ); }; const useEditLink = () => { const themeLocale = useThemeLocaleData(); const page = usePageData(); const frontmatter = usePageFrontmatter(); return computed(() => { const { repo, docsRepo = repo, docsBranch = "main", docsDir = "", editLink, editLinkPattern = "" } = themeLocale.value; const showEditLink = frontmatter.value.editLink ?? editLink ?? true; if (!showEditLink) return null; if (!docsRepo) return null; const link = resolveEditLink({ docsRepo, docsBranch, docsDir, editLinkPattern, filePathRelative: page.value.filePathRelative }); if (!link) return null; return { text: themeLocale.value.metaLocales.editLink, link }; }); }; const useUpdateTime = () => { const siteLocale = useSiteLocaleData(); const themeLocale = useThemeLocaleData(); const page = usePageData(); const frontmatter = usePageFrontmatter(); return computed(() => { var _a, _b; const showLastUpdated = frontmatter.value.lastUpdated ?? themeLocale.value.lastUpdated ?? true; if (!showLastUpdated) return null; if (!((_a = page.value.git) == null ? void 0 : _a.updatedTime)) return null; const updatedDate = new Date((_b = page.value.git) == null ? void 0 : _b.updatedTime); return updatedDate.toLocaleString(siteLocale.value.lang); }); }; const useContributors = () => { const themeLocale = useThemeLocaleData(); const page = usePageData(); const frontmatter = usePageFrontmatter(); return computed(() => { var _a; const showContributors = frontmatter.value.contributors ?? themeLocale.value.contributors ?? true; if (!showContributors) return null; return ((_a = page.value.git) == null ? void 0 : _a.contributors) ?? null; }); }; var PageTitle = defineComponent({ name: "PageTitle", setup() { const page = usePageData(); const frontmatter = usePageFrontmatter(); const themeLocale = useThemeLocaleData(); const { info, items } = usePageInfo(); return () => h("div", { class: "vp-page-title" }, [ h("h1", [ themeLocale.value.titleIcon === false ? null : h(HopeIcon, { icon: frontmatter.value.icon }), page.value.title ]), h(PageInfo, { info: info.value, ...items.value === null ? {} : { items: items.value } }), h("hr") ]); } }); const EditIcon = () => h(IconBase, { name: "edit" }, () => [ h("path", { d: "M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z" }), h("path", { d: "M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z" }) ]); EditIcon.displayName = "EditIcon"; var PageMeta = defineComponent({ name: "PageMeta", setup() { const themeLocale = useThemeLocaleData(); const editLink = useEditLink(); const updateTime = useUpdateTime(); const contributors = useContributors(); return () => { const { metaLocales } = themeLocale.value; return h("footer", { class: "page-meta" }, [ editLink.value ? h( "div", { class: "meta-item edit-link" }, h( AutoLink, { class: "label", config: editLink.value }, { before: () => h(EditIcon) } ) ) : null, h("div", { class: "meta-item git-info" }, [ updateTime.value ? h("div", { class: "update-time" }, [ h("span", { class: "label" }, `${metaLocales.lastUpdated}: `), h( ClientOnly, () => h("span", { class: "info" }, updateTime.value) ) ]) : null, contributors.value && contributors.value.length ? h("div", { class: "contributors" }, [ h("span", { class: "label" }, `${metaLocales.contributors}: `), contributors.value.map(({ email, name }, index) => [ h( "span", { class: "contributor", title: `email: ${email}` }, name ), index !== contributors.value.length - 1 ? "," : "" ]) ]) : null ]) ]); }; } }); var NormalPage = defineComponent({ name: "NormalPage", slots: Object, setup(_props, { slots }) { const frontmatter = usePageFrontmatter(); const page = usePageData(); const { isDarkmode } = useDarkmode(); const themeLocale = useThemeLocaleData(); const tocEnable = computed( () => frontmatter.value.toc || frontmatter.value.toc !== false && themeLocale.value.toc !== false ); return () => h( "main", { id: "main-content", class: "vp-page" }, h( hasGlobalComponent("LocalEncrypt") ? resolveComponent("LocalEncrypt") : RenderDefault, () => { var _a, _b, _c, _d; return [ (_a = slots.top) == null ? void 0 : _a.call(slots), frontmatter.value.cover ? h("img", { class: "page-cover", src: withBase(frontmatter.value.cover), alt: page.value.title, "no-view": "" }) : null, h(BreadCrumb), h(PageTitle), tocEnable.value ? h( TOC, { headerDepth: frontmatter.value.headerDepth ?? themeLocale.value.headerDepth ?? 2 }, { before: () => { var _a2; return (_a2 = slots.tocBefore) == null ? void 0 : _a2.call(slots); }, after: () => { var _a2; return (_a2 = slots.tocAfter) == null ? void 0 : _a2.call(slots); } } ) : null, (_b = slots.contentBefore) == null ? void 0 : _b.call(slots), h(MarkdownContent), (_c = slots.contentAfter) == null ? void 0 : _c.call(slots), h(PageMeta), h(PageNav), hasGlobalComponent("CommentService") ? h(resolveComponent("CommentService"), { darkmode: isDarkmode.value }) : null, (_d = slots.bottom) == null ? void 0 : _d.call(slots) ]; } ) ); } }); var Layout = defineComponent({ // eslint-disable-next-line vue/multi-word-component-names name: "Layout", setup() { const themeData = useThemeData(); const themeLocale = useThemeLocaleData(); const page = usePageData(); const frontmatter = usePageFrontmatter(); const { isMobile } = useWindowSize(); const sidebarDisplay = computed( () => { var _a, _b; return ENABLE_BLOG ? ((_a = themeLocale.value.blog) == null ? void 0 : _a.sidebarDisplay) || ((_b = themeData.value.blog) == null ? void 0 : _b.sidebarDisplay) || "mobile" : "none"; } ); return () => [ h(SkipLink), h( CommonWrapper, {}, { default: () => frontmatter.value.home ? h(HomePage) : h(FadeSlideY, () => h(NormalPage, { key: page.value.path })), ...sidebarDisplay.value !== "none" ? { navScreenBottom: () => h(resolveComponent("BloggerInfo")) } : {}, ...!isMobile.value && sidebarDisplay.value === "always" ? { sidebar: () => h(resolveComponent("BloggerInfo")) } : {} } ) ]; } }); var NotFoundHint = defineComponent({ name: "NotFoundHint", setup() { const themeLocale = useThemeLocaleData(); const getMsg = () => { const messages = themeLocale.value.routeLocales["notFoundMsg"]; return messages[Math.floor(Math.random() * messages.length)]; }; return () => h("div", { class: "not-found-hint" }, [ h("p", { class: "error-code" }, "404"), h( "h1", { class: "error-title" }, themeLocale.value.routeLocales["notFoundTitle"] ), h("p", { class: "error-hint" }, getMsg()) ]); } }); var NotFound = defineComponent({ name: "NotFound", slots: Object, setup(_props, { slots }) { const routeLocale = useRouteLocale(); const themeLocale = useThemeLocaleData(); const { navigate } = useLink({ to: themeLocale.value.home ?? routeLocale.value }); return () => [ h(SkipLink), h( CommonWrapper, { noSidebar: true }, () => { var _a; return h( "main", { id: "main-content", class: "vp-page not-found" }, ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [ h(NotFoundHint), h("div", { class: "actions" }, [ h( "button", { type: "button", class: "action-button", onClick: () => { window.history.go(-1); } }, themeLocale.value.routeLocales.back ), h( "button", { type: "button", class: "action-button", onClick: () => navigate() }, themeLocale.value.routeLocales.home ) ]) ] ); } ) ]; } }); export { HopeIcon, Layout, NotFound }; //# sourceMappingURL=export.js.map