diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 5d126348..00000000 --- a/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# editorconfig.org -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 9f77618a..00000000 --- a/.gitattributes +++ /dev/null @@ -1,12 +0,0 @@ -* text eol=lf -*.txt text eol=crlf - -*.png binary -*.jpg binary -*.jpeg binary -*.ico binary -*.tff binary -*.woff binary -*.woff2 binary - -docs/.vuepress/** -linguist-documentation diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index 400fc670..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Bug Report -description: Create a report to help us improve -title: '[Bug report] ' -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: textarea - id: bug-description - attributes: - label: Description - description: A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem. If you intend to submit a PR for this issue, tell us in the description. Thanks! - placeholder: Bug description - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 3aee83f9..00000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Question & Discussion - url: https://github.com/vuepress/docs/discussions - about: Please ask and answer questions here. diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml deleted file mode 100644 index 25e5232d..00000000 --- a/.github/workflows/check-docs.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: check-docs - -on: - push: - branches: - - main - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - check-docs: - strategy: - fail-fast: false - matrix: - os: - - ubuntu-latest - - windows-latest - - macos-latest - node: - - 20 - - 22 - bundler: - - vite - - webpack - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Lint - run: pnpm lint - - - name: Build docs with ${{ matrix.bundler }} - run: pnpm docs:build - env: - DOCS_BUNDLER: ${{ matrix.bundler }} - - check-docs-result: - if: ${{ always() }} - name: check-docs result - runs-on: ubuntu-latest - needs: - - check-docs - steps: - - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} - run: exit 1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 341b385d..00000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: docs - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - docs: - runs-on: ubuntu-latest - - env: - DOCS_GA_ID: G-CTB8FQ7VMW - NODE_VERSION: '22' - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: pnpm - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build documentation site - run: pnpm docs:build - - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v4 - with: - repo: vuepress/vuepress.github.io - target_branch: main - build_dir: docs/.vuepress/dist - env: - GH_PAT: ${{ secrets.GH_PAGES_TOKEN }} diff --git a/.github/workflows/issue-commented.yml b/.github/workflows/issue-commented.yml deleted file mode 100644 index 1f09e871..00000000 --- a/.github/workflows/issue-commented.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: issue-commented - -on: - issue_comment: - types: - - created - -jobs: - issue-commented: - name: remove stale on commented - if: contains(github.event.issue.labels.*.name, 'stale') - runs-on: ubuntu-latest - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'remove-labels' - token: ${{ secrets.GITHUB_TOKEN }} - labels: 'stale' diff --git a/.github/workflows/issue-daily.yml b/.github/workflows/issue-daily.yml deleted file mode 100644 index 4b51b033..00000000 --- a/.github/workflows/issue-daily.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: issue-daily - -on: - schedule: - - cron: '0 0 * * *' - -jobs: - issue-label-stale: - name: label stale issues - runs-on: ubuntu-latest - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'check-inactive' - token: ${{ secrets.GITHUB_TOKEN }} - inactive-day: 15 - inactive-label: 'stale' - exclude-labels: 'bug, documentation, enhancement, feature, help wanted, need reproduction, need review, stale' - body: | - This issue is marked as `stale` because it has not had recent activity. Issues marked with `stale` will be closed if they have no activity within 7 days. - - issue-close-stale: - name: close stale issues - runs-on: ubuntu-latest - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - token: ${{ secrets.GITHUB_TOKEN }} - labels: 'stale' - inactive-day: 7 - - issue-close-need-reproduction: - name: close need-reproduction issues - runs-on: ubuntu-latest - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issues' - token: ${{ secrets.GITHUB_TOKEN }} - labels: 'need reproduction' - inactive-day: 7 diff --git a/.github/workflows/issue-labeled.yml b/.github/workflows/issue-labeled.yml deleted file mode 100644 index 227d6760..00000000 --- a/.github/workflows/issue-labeled.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: issue-labeled - -on: - issues: - types: [labeled] - -jobs: - issue-invalid: - name: close invalid issue - if: github.event.label.name == 'invalid' - runs-on: ubuntu-latest - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'close-issue, create-comment' - token: ${{ secrets.GITHUB_TOKEN }} - body: | - Hello @${{ github.event.issue.user.login }}. This issue is marked as `invalid` and closed. Please follow the issue template. - - issue-need-reproduction: - name: need reproduction - if: github.event.label.name == 'need reproduction' - runs-on: ubuntu-latest - steps: - - uses: actions-cool/issues-helper@v3 - with: - actions: 'create-comment' - token: ${{ secrets.GITHUB_TOKEN }} - body: | - Hello @${{ github.event.issue.user.login }}. Please provide a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) using a GitHub repository or [vuepress.vuejs.org/new](https://vuepress.vuejs.org/new). Issues marked with `need reproduction` will be closed if they have no activity within 7 days. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 91ed4fba..00000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: release - -on: - push: - tags: - - 'v*' - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Push to release branch - run: git push origin HEAD:release diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e3fdda76..00000000 --- a/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# VuePress files -docs/.vuepress/.temp/ -docs/.vuepress/.cache/ -docs/.vuepress/dist/ - -# Node modules -node_modules/ - -# MacOS Desktop Services Store -.DS_Store - -# Log files -*.log diff --git a/.husky/commit-msg b/.husky/commit-msg deleted file mode 100755 index cfe75101..00000000 --- a/.husky/commit-msg +++ /dev/null @@ -1 +0,0 @@ -pnpm commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit deleted file mode 100755 index 74821141..00000000 --- a/.husky/pre-commit +++ /dev/null @@ -1 +0,0 @@ -pnpm nano-staged diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 88deb460..00000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -message="build: version %s" diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index bd5535a6..00000000 --- a/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -pnpm-lock.yaml diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index adc12201..00000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "recommendations": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "vue.volar" - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 611c9559..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnSave": true, - "editor.insertSpaces": true, - "editor.tabSize": 2, - "files.encoding": "utf8", - "files.eol": "\n", - "files.trimFinalNewlines": true, - "files.trimTrailingWhitespace": true, - "[markdown]": { - "files.trimTrailingWhitespace": false - }, - "typescript.tsdk": "node_modules/typescript/lib", - "eslint.validate": [ - "javascript", - "javascriptreact", - "typescript", - "typescriptreact", - "vue" - ], - "cSpell.words": [ - "bumpp", - "composables", - "devtool", - "docsearch", - "envinfo", - "esbuild", - "frontmatter", - "globby", - "gtag", - "mdit", - "nprogress", - "prefetch", - "preload", - "prismjs", - "shiki", - "shikiji", - "slugify", - "unmount", - "vuejs", - "vuepress", - "vueuse", - "zoomable" - ] -} diff --git a/404.html b/404.html new file mode 100644 index 00000000..a61b7d14 --- /dev/null +++ b/404.html @@ -0,0 +1,41 @@ + + + + + + + + + + VuePress + + + + + +
Skip to main content
+ + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 7a01c18b..00000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -# VuePress Documentation Contributing Guide - -## Overview - -VuePress documentation is powered by VuePress itself, which is built from the source code of this repository. - -All the markdown source files are placed in `docs` directory. We are maintaining two translations: - -- English (en-US) in `/` path -- Chinese (zh-CN) in `/zh/` path - -We have two different deployments: - -- Release deployment powered by [Netlify](https://www.netlify.com). This deployment is built from the latest released version, so users will not see unreleased changes. The domain name is [https://vuepress.vuejs.org](https://vuepress.vuejs.org). -- Developer deployment powered by [GitHub Pages](https://pages.github.com). This deployment is built from the latest commit, so developers could preview the latest changes. The domain name is [https://vuepress.github.io](https://vuepress.github.io). diff --git a/CONTRIBUTING_zh.md b/CONTRIBUTING_zh.md deleted file mode 100644 index 58bafe6a..00000000 --- a/CONTRIBUTING_zh.md +++ /dev/null @@ -1,15 +0,0 @@ -# VuePress 文档贡献指南 - -## 概览 - -VuePress 的文档是由 VuePress 自己驱动的,是由该仓库中的源码构建而来。 - -所有的 Markdown 源文件都放置在 `docs` 目录下。我们维护了两种翻译: - -- 英语 (en-US) 在 `/` 路径下 -- 中文 (zh-CN) 在 `/zh/` 路径下 - -我们部署了两套站点: - -- 在 [Netlify](https://www.netlify.com) 部署的 Release 版本。该站点是从最新发布的版本中构建而来,因此用户不会看到未发布的改动。域名为 [https://vuepress.vuejs.org](https://vuepress.vuejs.org)。 -- 在 [GitHub Pages](https://pages.github.com) 部署的 Developer 版本。该站点是从最新的提交中构建而来,因此开发者可以预览最新的改动。域名为 [https://vuepress.github.io](https://vuepress.github.io)。 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 44387d62..00000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018-present, VuePress Community - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 551f0688..00000000 --- a/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# VuePress Documentation - -[![github check-docs](https://github.com/vuepress/docs/workflows/check-docs/badge.svg)](https://github.com/vuepress/docs/actions/workflows/check-docs.yml) -[![github docs](https://github.com/vuepress/docs/workflows/docs/badge.svg)](https://github.com/vuepress/docs/actions/workflows/docs.yml) -[![license](https://badgen.net/github/license/vuepress/docs)](https://github.com/vuepress/docs/blob/main/LICENSE) - -VuePress documentation repository. - -## Deployments - -- Release deployment: -- Developer deployment: - -## License - -[MIT](https://github.com/vuepress/docs/blob/main/LICENSE) diff --git a/advanced/architecture.html b/advanced/architecture.html new file mode 100644 index 00000000..a9e92dd8 --- /dev/null +++ b/advanced/architecture.html @@ -0,0 +1,41 @@ + + + + + + + + + + Architecture | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/adding-extra-pages.html b/advanced/cookbook/adding-extra-pages.html new file mode 100644 index 00000000..9d2809f2 --- /dev/null +++ b/advanced/cookbook/adding-extra-pages.html @@ -0,0 +1,66 @@ + + + + + + + + + + Adding Extra Pages | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/index.html b/advanced/cookbook/index.html new file mode 100644 index 00000000..2918f141 --- /dev/null +++ b/advanced/cookbook/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + Introduction | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/making-a-theme-extendable.html b/advanced/cookbook/making-a-theme-extendable.html new file mode 100644 index 00000000..ab543591 --- /dev/null +++ b/advanced/cookbook/making-a-theme-extendable.html @@ -0,0 +1,70 @@ + + + + + + + + + + Making a Theme Extendable | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/markdown-and-vue-sfc.html b/advanced/cookbook/markdown-and-vue-sfc.html new file mode 100644 index 00000000..b67c3cf7 --- /dev/null +++ b/advanced/cookbook/markdown-and-vue-sfc.html @@ -0,0 +1,70 @@ + + + + + + + + + + Markdown and Vue SFC | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/passing-data-to-client-code.html b/advanced/cookbook/passing-data-to-client-code.html new file mode 100644 index 00000000..ef99edf9 --- /dev/null +++ b/advanced/cookbook/passing-data-to-client-code.html @@ -0,0 +1,60 @@ + + + + + + + + + + Passing Data to Client Code | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/resolving-routes.html b/advanced/cookbook/resolving-routes.html new file mode 100644 index 00000000..aeea0705 --- /dev/null +++ b/advanced/cookbook/resolving-routes.html @@ -0,0 +1,58 @@ + + + + + + + + + + Resolving Routes | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/cookbook/usage-of-client-config.html b/advanced/cookbook/usage-of-client-config.html new file mode 100644 index 00000000..3ee7a323 --- /dev/null +++ b/advanced/cookbook/usage-of-client-config.html @@ -0,0 +1,118 @@ + + + + + + + + + + Usage of Client Config | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/index.html b/advanced/index.html new file mode 100644 index 00000000..1cbf43d9 --- /dev/null +++ b/advanced/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + Advanced | VuePress + + + + + + + + + diff --git a/advanced/plugin.html b/advanced/plugin.html new file mode 100644 index 00000000..9d204acf --- /dev/null +++ b/advanced/plugin.html @@ -0,0 +1,58 @@ + + + + + + + + + + Writing a Plugin | VuePress + + + + + +
Skip to main content
+ + + diff --git a/advanced/theme.html b/advanced/theme.html new file mode 100644 index 00000000..b430772d --- /dev/null +++ b/advanced/theme.html @@ -0,0 +1,90 @@ + + + + + + + + + + Writing a Theme | VuePress + + + + + +
Skip to main content
+ + + diff --git a/assets/404.html-BxYlFJ7d.js b/assets/404.html-BxYlFJ7d.js new file mode 100644 index 00000000..961dc8f3 --- /dev/null +++ b/assets/404.html-BxYlFJ7d.js @@ -0,0 +1 @@ +import{_ as e}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,b as n,o as r}from"./app-DVsngoLV.js";const a={};function p(s,t){return r(),o("div",null,t[0]||(t[0]=[n("p",null,"404 Not Found",-1)]))}const l=e(a,[["render",p]]),m=JSON.parse('{"path":"/404.html","title":"","lang":"en-US","frontmatter":{"layout":"NotFound","description":"404 Not Found","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"\\",\\"description\\":\\"404 Not Found\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/404.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:description","content":"404 Not Found"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}]]},"git":{},"readingTime":{"minutes":0.01,"words":3},"filePathRelative":null,"autoDesc":true}');export{l as comp,m as data}; diff --git a/assets/NpmBadge-Bgluwknq.js b/assets/NpmBadge-Bgluwknq.js new file mode 100644 index 00000000..b5ab2e80 --- /dev/null +++ b/assets/NpmBadge-Bgluwknq.js @@ -0,0 +1 @@ +import{i as p,j as a,c as r,o as d,b as g}from"./app-DVsngoLV.js";import{_ as l}from"./plugin-vue_export-helper-DlAUqK2U.js";const m=["href","title"],i=["src","alt"],_=p({__name:"NpmBadge",props:{package:{},distTag:{default:"next"}},setup(s){const e=s,n=a(()=>`https://www.npmjs.com/package/${e.package}`),o=a(()=>e.distTag?`${e.package}@${e.distTag}`:e.package),c=a(()=>`https://badgen.net/npm/v/${e.package}/${e.distTag}?label=${encodeURIComponent(o.value)}`);return(t,k)=>(d(),r("a",{class:"npm-badge",href:n.value,title:t.package,target:"_blank",rel:"noopener noreferrer"},[g("img",{src:c.value,alt:t.package},null,8,i)],8,m))}}),b=l(_,[["__scopeId","data-v-95cd33a3"]]);export{b as default}; diff --git a/assets/adding-extra-pages.html-CeDS6Gl0.js b/assets/adding-extra-pages.html-CeDS6Gl0.js new file mode 100644 index 00000000..d27b9c6d --- /dev/null +++ b/assets/adding-extra-pages.html-CeDS6Gl0.js @@ -0,0 +1,26 @@ +import{_ as l}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as h,b as i,a as p,d as a,e as t,w as e,r as k,o as r}from"./app-DVsngoLV.js";const d={};function o(g,s){const n=k("RouteLink");return r(),h("div",null,[s[5]||(s[5]=i("h1",{id:"添加额外页面",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#添加额外页面"},[i("span",null,"添加额外页面")])],-1)),s[6]||(s[6]=i("p",null,"有时你可能希望在不创建 Markdown 文件的情况下添加一些额外的页面。",-1)),i("p",null,[s[2]||(s[2]=a("我们可以借助于 ")),t(n,{to:"/zh/reference/plugin-api.html"},{default:e(()=>s[0]||(s[0]=[a("插件 API")])),_:1}),s[3]||(s[3]=a(" 和 ")),t(n,{to:"/zh/reference/node-api.html"},{default:e(()=>s[1]||(s[1]=[a("Node API")])),_:1}),s[4]||(s[4]=a(" 来轻松实现。"))]),s[7]||(s[7]=p(`

添加默认的主页

作为一个主题作者,你可能不想要求用户必须创建一个 /README.md 文件来作为主页,但是你希望提供一个默认的主页:

import { createPage } from 'vuepress/core'
+
+export default {
+  // 初始化之后,所有的页面已经加载完毕
+  async onInitialized(app) {
+    // 如果主页不存在
+    if (app.pages.every((page) => page.path !== '/')) {
+      // 创建一个主页
+      const homepage = await createPage(app, {
+        path: '/',
+        // 设置 frontmatter
+        frontmatter: {
+          layout: 'Layout',
+        },
+        // 设置 markdown 内容
+        content: \`\\
+# 欢迎来到 \${app.options.title}
+
+这是默认主页
+\`,
+      })
+      // 把它添加到 \`app.pages\`
+      app.pages.push(homepage)
+    }
+  },
+}
`,3))])}const B=l(d,[["render",o]]),c=JSON.parse('{"path":"/zh/advanced/cookbook/adding-extra-pages.html","title":"添加额外页面","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:circle-plus","description":"添加额外页面 有时你可能希望在不创建 Markdown 文件的情况下添加一些额外的页面。 我们可以借助于 和 来轻松实现。 添加默认的主页 作为一个主题作者,你可能不想要求用户必须创建一个 /README.md 文件来作为主页,但是你希望提供一个默认的主页:","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"添加额外页面\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/advanced/cookbook/adding-extra-pages.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"添加额外页面"}],["meta",{"property":"og:description","content":"添加额外页面 有时你可能希望在不创建 Markdown 文件的情况下添加一些额外的页面。 我们可以借助于 和 来轻松实现。 添加默认的主页 作为一个主题作者,你可能不想要求用户必须创建一个 /README.md 文件来作为主页,但是你希望提供一个默认的主页:"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/advanced/cookbook/adding-extra-pages.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.67,"words":200},"filePathRelative":"zh/advanced/cookbook/adding-extra-pages.md","autoDesc":true}');export{B as comp,c as data}; diff --git a/assets/adding-extra-pages.html-DZro9Kg7.js b/assets/adding-extra-pages.html-DZro9Kg7.js new file mode 100644 index 00000000..2e3591b6 --- /dev/null +++ b/assets/adding-extra-pages.html-DZro9Kg7.js @@ -0,0 +1,26 @@ +import{_ as l}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as h,b as s,a as p,d as a,e as t,w as n,r as k,o as d}from"./app-DVsngoLV.js";const r={};function o(g,i){const e=k("RouteLink");return d(),h("div",null,[i[5]||(i[5]=s("h1",{id:"adding-extra-pages",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#adding-extra-pages"},[s("span",null,"Adding Extra Pages")])],-1)),i[6]||(i[6]=s("p",null,"Sometimes you might want to add some extra pages without creating a markdown file in the source directory.",-1)),s("p",null,[i[2]||(i[2]=a("With the help of ")),t(e,{to:"/reference/plugin-api.html"},{default:n(()=>i[0]||(i[0]=[a("Plugin API")])),_:1}),i[3]||(i[3]=a(" and ")),t(e,{to:"/reference/node-api.html"},{default:n(()=>i[1]||(i[1]=[a("Node API")])),_:1}),i[4]||(i[4]=a(", we can do that with ease."))]),i[7]||(i[7]=p(`

Add a Default Homepage

As a theme author, you may not require users to create a /README.md file as the homepage, but you want to provide a default one:

import { createPage } from 'vuepress/core'
+
+export default {
+  // all pages have been loaded after initialization
+  async onInitialized(app) {
+    // if the homepage does not exist
+    if (app.pages.every((page) => page.path !== '/')) {
+      // create a homepage
+      const homepage = await createPage(app, {
+        path: '/',
+        // set frontmatter
+        frontmatter: {
+          layout: 'Layout',
+        },
+        // set markdown content
+        content: \`\\
+# Welcome to \${app.options.title}
+
+This is the default homepage
+\`,
+      })
+      // add it to \`app.pages\`
+      app.pages.push(homepage)
+    }
+  },
+}
`,3))])}const y=l(r,[["render",o]]),m=JSON.parse('{"path":"/advanced/cookbook/adding-extra-pages.html","title":"Adding Extra Pages","lang":"en-US","frontmatter":{"icon":"fa6-solid:circle-plus","description":"Adding Extra Pages Sometimes you might want to add some extra pages without creating a markdown file in the source directory. With the help of and , we can do that with ease. Ad...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Adding Extra Pages\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/advanced/cookbook/adding-extra-pages.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Adding Extra Pages"}],["meta",{"property":"og:description","content":"Adding Extra Pages Sometimes you might want to add some extra pages without creating a markdown file in the source directory. With the help of and , we can do that with ease. Ad..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/advanced/cookbook/adding-extra-pages.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.47,"words":141},"filePathRelative":"advanced/cookbook/adding-extra-pages.md","autoDesc":true}');export{y as comp,m as data}; diff --git a/assets/app-DVsngoLV.js b/assets/app-DVsngoLV.js new file mode 100644 index 00000000..04bed562 --- /dev/null +++ b/assets/app-DVsngoLV.js @@ -0,0 +1,26 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.html-Bf3E0fXo.js","assets/plugin-vue_export-helper-DlAUqK2U.js","assets/architecture.html-D5Z1-dEt.js","assets/vuepress-core-process-C4qfrYlz.js","assets/plugin.html-Dj15nu08.js","assets/theme.html-C_iZfVpi.js","assets/assets.html-CGIhIJTl.js","assets/hero-BNkrhNQ6.js","assets/bundler.html-DHcJhx7E.js","assets/configuration.html-B_xUzcn7.js","assets/deployment.html-ySqYnmHM.js","assets/getting-started.html-DPjQNJnr.js","assets/i18n.html-CIS7iyFP.js","assets/introduction.html-U5lYTjcB.js","assets/markdown.html-DWZg4INF.js","assets/migration.html-14fWaE0S.js","assets/page.html-fNs_eHPf.js","assets/plugin.html-Csj1L5zY.js","assets/theme.html-DCPkD_BW.js","assets/troubleshooting.html-1Wt8ICqR.js","assets/cli.html-BYnU5Row.js","assets/client-api.html-D4ZKAx8U.js","assets/components.html-qQedLS-E.js","assets/config.html-u1PoDrUn.js","assets/frontmatter.html-CA6RnZ0l.js","assets/node-api.html-INp_KTIP.js","assets/plugin-api.html-CHhaDvqy.js","assets/theme-api.html-OLkomApC.js","assets/index.html-DxEsXlbe.js","assets/index.html-DCikbAAD.js","assets/adding-extra-pages.html-DZro9Kg7.js","assets/making-a-theme-extendable.html-DfbNOmbi.js","assets/passing-data-to-client-code.html-fUExCXda.js","assets/resolving-routes.html-C343Q6Pa.js","assets/usage-of-client-config.html-Dzka2dtf.js","assets/vite.html-AFYyhaM0.js","assets/webpack.html-BRfEDV9B.js","assets/architecture.html-Bv0X7fAx.js","assets/plugin.html-BaYtlknC.js","assets/theme.html-z7ljUVsA.js","assets/assets.html-BidmvL9-.js","assets/bundler.html-Cndzc5Ka.js","assets/configuration.html-C67FYR2G.js","assets/deployment.html-Ch-IpzwJ.js","assets/getting-started.html-B-E2ElMp.js","assets/i18n.html-Cz1yWZyl.js","assets/introduction.html-CanvhM2y.js","assets/markdown.html-CacxaVUw.js","assets/migration.html-MK3ssT6m.js","assets/page.html-DPX6yhh3.js","assets/plugin.html-BlBN08hl.js","assets/theme.html-DZxGqwzI.js","assets/troubleshooting.html-ByRJG4kQ.js","assets/cli.html-xEorj72l.js","assets/client-api.html-CV5G7JTh.js","assets/components.html-DRn-dJE5.js","assets/config.html-5XTANjpy.js","assets/frontmatter.html-BvpLSt9a.js","assets/node-api.html-CzJnAdTm.js","assets/plugin-api.html-SCqAp-4S.js","assets/theme-api.html-BSHHjMuo.js","assets/index.html-Bsw-jOL4.js","assets/adding-extra-pages.html-CeDS6Gl0.js","assets/making-a-theme-extendable.html-CGR9U-du.js","assets/passing-data-to-client-code.html-Jxd1u8oV.js","assets/resolving-routes.html-CgGYFxxb.js","assets/usage-of-client-config.html-1s0Oo71q.js","assets/vite.html-CK4WbdqE.js","assets/webpack.html-VDS0ftCt.js","assets/404.html-BxYlFJ7d.js","assets/index.html-Do19UIZ3.js","assets/index.html-_e7kFd1H.js","assets/index.html-5tZDq72T.js","assets/index.html-Dhfuxt_n.js","assets/index.html-Dcah2Vrx.js","assets/index.html-BW43vxYC.js","assets/index.html-C4bSVrZS.js","assets/index.html-itz1aZ3n.js","assets/NpmBadge-Bgluwknq.js"])))=>i.map(i=>d[i]); +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function cl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ge={},xn=[],_t=()=>{},Tu=()=>!1,uo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ul=e=>e.startsWith("onUpdate:"),Me=Object.assign,fl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},ku=Object.prototype.hasOwnProperty,fe=(e,t)=>ku.call(e,t),ee=Array.isArray,Cn=e=>Xo(e)==="[object Map]",xs=e=>Xo(e)==="[object Set]",ne=e=>typeof e=="function",Ce=e=>typeof e=="string",Kt=e=>typeof e=="symbol",be=e=>e!==null&&typeof e=="object",Cs=e=>(be(e)||ne(e))&&ne(e.then)&&ne(e.catch),Ps=Object.prototype.toString,Xo=e=>Ps.call(e),xu=e=>Xo(e).slice(8,-1),As=e=>Xo(e)==="[object Object]",dl=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Pn=cl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Cu=/-(\w)/g,Ue=Zo(e=>e.replace(Cu,(t,n)=>n?n.toUpperCase():"")),Pu=/\B([A-Z])/g,pn=Zo(e=>e.replace(Pu,"-$1").toLowerCase()),fo=Zo(e=>e.charAt(0).toUpperCase()+e.slice(1)),hr=Zo(e=>e?`on${fo(e)}`:""),Ut=(e,t)=>!Object.is(e,t),vr=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Au=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Lu=e=>{const t=Ce(e)?Number(e):NaN;return isNaN(t)?e:t};let ei;const er=()=>ei||(ei=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function pl(e){if(ee(e)){const t={};for(let n=0;n{if(n){const o=n.split(Ou);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function hl(e){let t="";if(Ce(e))t=e;else if(ee(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Nu=e=>Ce(e)?e:e==null?"":ee(e)||be(e)&&(e.toString===Ps||!ne(e.toString))?Os(e)?Nu(e.value):JSON.stringify(e,Is,2):String(e),Is=(e,t)=>Os(t)?Is(e,t.value):Cn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],l)=>(n[mr(o,l)+" =>"]=r,n),{})}:xs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>mr(n))}:Kt(t)?mr(t):be(t)&&!ee(t)&&!As(t)?String(t):t,mr=(e,t="")=>{var n;return Kt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let je;class Hu{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=je,!t&&je&&(this.index=(je.scopes||(je.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(Yn){let t=Yn;for(Yn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Kn;){let t=Kn;for(Kn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Hs(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Vs(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),gl(o),ju(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function Nr(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(js(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function js(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===no))return;e.globalVersion=no;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Nr(e)){e.flags&=-3;return}const n=me,o=ft;me=e,ft=!0;try{Hs(e);const r=e.fn(e._value);(t.version===0||Ut(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{me=n,ft=o,Vs(e),e.flags&=-3}}function gl(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)gl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ju(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ft=!0;const zs=[];function Yt(){zs.push(ft),ft=!1}function Jt(){const e=zs.pop();ft=e===void 0?!0:e}function ti(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=me;me=void 0;try{t()}finally{me=n}}}let no=0;class zu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class tr{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!me||!ft||me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==me)n=this.activeLink=new zu(me,this),me.deps?(n.prevDep=me.depsTail,me.depsTail.nextDep=n,me.depsTail=n):me.deps=me.depsTail=n,Fs(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=me.depsTail,n.nextDep=void 0,me.depsTail.nextDep=n,me.depsTail=n,me.deps===n&&(me.deps=o)}return n}trigger(t){this.version++,no++,this.notify(t)}notify(t){vl();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ml()}}}function Fs(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Fs(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const zo=new WeakMap,rn=Symbol(""),Hr=Symbol(""),oo=Symbol("");function Ne(e,t,n){if(ft&&me){let o=zo.get(e);o||zo.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new tr),r.map=o,r.key=n),r.track()}}function Pt(e,t,n,o,r,l){const i=zo.get(e);if(!i){no++;return}const s=a=>{a&&a.trigger()};if(vl(),t==="clear")i.forEach(s);else{const a=ee(e),c=a&&dl(n);if(a&&n==="length"){const u=Number(o);i.forEach((d,p)=>{(p==="length"||p===oo||!Kt(p)&&p>=u)&&s(d)})}else switch((n!==void 0||i.has(void 0))&&s(i.get(n)),c&&s(i.get(oo)),t){case"add":a?c&&s(i.get("length")):(s(i.get(rn)),Cn(e)&&s(i.get(Hr)));break;case"delete":a||(s(i.get(rn)),Cn(e)&&s(i.get(Hr)));break;case"set":Cn(e)&&s(i.get(rn));break}}ml()}function Fu(e,t){const n=zo.get(e);return n&&n.get(t)}function _n(e){const t=ie(e);return t===e?t:(Ne(t,"iterate",oo),st(e)?t:t.map(He))}function nr(e){return Ne(e=ie(e),"iterate",oo),e}const Bu={__proto__:null,[Symbol.iterator](){return br(this,Symbol.iterator,He)},concat(...e){return _n(this).concat(...e.map(t=>ee(t)?_n(t):t))},entries(){return br(this,"entries",e=>(e[1]=He(e[1]),e))},every(e,t){return St(this,"every",e,t,void 0,arguments)},filter(e,t){return St(this,"filter",e,t,n=>n.map(He),arguments)},find(e,t){return St(this,"find",e,t,He,arguments)},findIndex(e,t){return St(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return St(this,"findLast",e,t,He,arguments)},findLastIndex(e,t){return St(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return St(this,"forEach",e,t,void 0,arguments)},includes(...e){return yr(this,"includes",e)},indexOf(...e){return yr(this,"indexOf",e)},join(e){return _n(this).join(e)},lastIndexOf(...e){return yr(this,"lastIndexOf",e)},map(e,t){return St(this,"map",e,t,void 0,arguments)},pop(){return Bn(this,"pop")},push(...e){return Bn(this,"push",e)},reduce(e,...t){return ni(this,"reduce",e,t)},reduceRight(e,...t){return ni(this,"reduceRight",e,t)},shift(){return Bn(this,"shift")},some(e,t){return St(this,"some",e,t,void 0,arguments)},splice(...e){return Bn(this,"splice",e)},toReversed(){return _n(this).toReversed()},toSorted(e){return _n(this).toSorted(e)},toSpliced(...e){return _n(this).toSpliced(...e)},unshift(...e){return Bn(this,"unshift",e)},values(){return br(this,"values",He)}};function br(e,t,n){const o=nr(e),r=o[t]();return o!==e&&!st(e)&&(r._next=r.next,r.next=()=>{const l=r._next();return l.value&&(l.value=n(l.value)),l}),r}const Wu=Array.prototype;function St(e,t,n,o,r,l){const i=nr(e),s=i!==e&&!st(e),a=i[t];if(a!==Wu[t]){const d=a.apply(e,l);return s?He(d):d}let c=n;i!==e&&(s?c=function(d,p){return n.call(this,He(d),p,e)}:n.length>2&&(c=function(d,p){return n.call(this,d,p,e)}));const u=a.call(i,c,o);return s&&r?r(u):u}function ni(e,t,n,o){const r=nr(e);let l=n;return r!==e&&(st(e)?n.length>3&&(l=function(i,s,a){return n.call(this,i,s,a,e)}):l=function(i,s,a){return n.call(this,i,He(s),a,e)}),r[t](l,...o)}function yr(e,t,n){const o=ie(e);Ne(o,"iterate",oo);const r=o[t](...n);return(r===-1||r===!1)&&bl(n[0])?(n[0]=ie(n[0]),o[t](...n)):r}function Bn(e,t,n=[]){Yt(),vl();const o=ie(e)[t].apply(e,n);return ml(),Jt(),o}const Uu=cl("__proto__,__v_isRef,__isVue"),Bs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Kt));function qu(e){Kt(e)||(e=String(e));const t=ie(this);return Ne(t,"has",e),t.hasOwnProperty(e)}class Ws{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return l;if(n==="__v_raw")return o===(r?l?Js:Ys:l?Ks:Gs).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=ee(t);if(!r){let a;if(i&&(a=Bu[n]))return a;if(n==="hasOwnProperty")return qu}const s=Reflect.get(t,n,Le(t)?t:o);return(Kt(n)?Bs.has(n):Uu(n))||(r||Ne(t,"get",n),l)?s:Le(s)?i&&dl(n)?s:s.value:be(s)?r?po(s):cn(s):s}}class Us extends Ws{constructor(t=!1){super(!1,t)}set(t,n,o,r){let l=t[n];if(!this._isShallow){const a=un(l);if(!st(o)&&!un(o)&&(l=ie(l),o=ie(o)),!ee(t)&&Le(l)&&!Le(o))return a?!1:(l.value=o,!0)}const i=ee(t)&&dl(n)?Number(n)e,xo=e=>Reflect.getPrototypeOf(e);function Qu(e,t,n){return function(...o){const r=this.__v_raw,l=ie(r),i=Cn(l),s=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...o),u=n?Vr:t?jr:He;return!t&&Ne(l,"iterate",a?Hr:rn),{next(){const{value:d,done:p}=c.next();return p?{value:d,done:p}:{value:s?[u(d[0]),u(d[1])]:u(d),done:p}},[Symbol.iterator](){return this}}}}function Co(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Xu(e,t){const n={get(r){const l=this.__v_raw,i=ie(l),s=ie(r);e||(Ut(r,s)&&Ne(i,"get",r),Ne(i,"get",s));const{has:a}=xo(i),c=t?Vr:e?jr:He;if(a.call(i,r))return c(l.get(r));if(a.call(i,s))return c(l.get(s));l!==i&&l.get(r)},get size(){const r=this.__v_raw;return!e&&Ne(ie(r),"iterate",rn),Reflect.get(r,"size",r)},has(r){const l=this.__v_raw,i=ie(l),s=ie(r);return e||(Ut(r,s)&&Ne(i,"has",r),Ne(i,"has",s)),r===s?l.has(r):l.has(r)||l.has(s)},forEach(r,l){const i=this,s=i.__v_raw,a=ie(s),c=t?Vr:e?jr:He;return!e&&Ne(a,"iterate",rn),s.forEach((u,d)=>r.call(l,c(u),c(d),i))}};return Me(n,e?{add:Co("add"),set:Co("set"),delete:Co("delete"),clear:Co("clear")}:{add(r){!t&&!st(r)&&!un(r)&&(r=ie(r));const l=ie(this);return xo(l).has.call(l,r)||(l.add(r),Pt(l,"add",r,r)),this},set(r,l){!t&&!st(l)&&!un(l)&&(l=ie(l));const i=ie(this),{has:s,get:a}=xo(i);let c=s.call(i,r);c||(r=ie(r),c=s.call(i,r));const u=a.call(i,r);return i.set(r,l),c?Ut(l,u)&&Pt(i,"set",r,l):Pt(i,"add",r,l),this},delete(r){const l=ie(this),{has:i,get:s}=xo(l);let a=i.call(l,r);a||(r=ie(r),a=i.call(l,r)),s&&s.call(l,r);const c=l.delete(r);return a&&Pt(l,"delete",r,void 0),c},clear(){const r=ie(this),l=r.size!==0,i=r.clear();return l&&Pt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Qu(r,e,t)}),n}function or(e,t){const n=Xu(e,t);return(o,r,l)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(fe(n,r)&&r in o?n:o,r,l)}const Zu={get:or(!1,!1)},ef={get:or(!1,!0)},tf={get:or(!0,!1)},nf={get:or(!0,!0)},Gs=new WeakMap,Ks=new WeakMap,Ys=new WeakMap,Js=new WeakMap;function of(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function rf(e){return e.__v_skip||!Object.isExtensible(e)?0:of(xu(e))}function cn(e){return un(e)?e:rr(e,!1,Gu,Zu,Gs)}function Qs(e){return rr(e,!1,Yu,ef,Ks)}function po(e){return rr(e,!0,Ku,tf,Ys)}function lf(e){return rr(e,!0,Ju,nf,Js)}function rr(e,t,n,o,r){if(!be(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const l=r.get(e);if(l)return l;const i=rf(e);if(i===0)return e;const s=new Proxy(e,i===2?o:n);return r.set(e,s),s}function ln(e){return un(e)?ln(e.__v_raw):!!(e&&e.__v_isReactive)}function un(e){return!!(e&&e.__v_isReadonly)}function st(e){return!!(e&&e.__v_isShallow)}function bl(e){return e?!!e.__v_raw:!1}function ie(e){const t=e&&e.__v_raw;return t?ie(t):e}function sf(e){return!fe(e,"__v_skip")&&Object.isExtensible(e)&&Ls(e,"__v_skip",!0),e}const He=e=>be(e)?cn(e):e,jr=e=>be(e)?po(e):e;function Le(e){return e?e.__v_isRef===!0:!1}function ae(e){return Xs(e,!1)}function re(e){return Xs(e,!0)}function Xs(e,t){return Le(e)?e:new af(e,t)}class af{constructor(t,n){this.dep=new tr,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ie(t),this._value=n?t:He(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||st(t)||un(t);t=o?t:ie(t),Ut(t,n)&&(this._rawValue=t,this._value=o?t:He(t),this.dep.trigger())}}function qt(e){return Le(e)?e.value:e}function se(e){return ne(e)?e():qt(e)}const cf={get:(e,t,n)=>t==="__v_raw"?e:qt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Le(r)&&!Le(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Zs(e){return ln(e)?e:new Proxy(e,cf)}class uf{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new tr,{get:o,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ea(e){return new uf(e)}class ff{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Fu(ie(this._object),this._key)}}class df{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ho(e,t,n){return Le(e)?e:ne(e)?new df(e):be(e)&&arguments.length>1?pf(e,t,n):ae(e)}function pf(e,t,n){const o=e[t];return Le(o)?o:new ff(e,t,n)}class hf{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new tr(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=no-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&me!==this)return Ns(this,!0),!0}get value(){const t=this.dep.track();return js(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function vf(e,t,n=!1){let o,r;return ne(e)?o=e:(o=e.get,r=e.set),new hf(o,r,n)}const Po={},Fo=new WeakMap;let tn;function mf(e,t=!1,n=tn){if(n){let o=Fo.get(n);o||Fo.set(n,o=[]),o.push(e)}}function gf(e,t,n=ge){const{immediate:o,deep:r,once:l,scheduler:i,augmentJob:s,call:a}=n,c=E=>r?E:st(E)||r===!1||r===0?Wt(E,1):Wt(E);let u,d,p,h,b=!1,y=!1;if(Le(e)?(d=()=>e.value,b=st(e)):ln(e)?(d=()=>c(e),b=!0):ee(e)?(y=!0,b=e.some(E=>ln(E)||st(E)),d=()=>e.map(E=>{if(Le(E))return E.value;if(ln(E))return c(E);if(ne(E))return a?a(E,2):E()})):ne(e)?t?d=a?()=>a(e,2):e:d=()=>{if(p){Yt();try{p()}finally{Jt()}}const E=tn;tn=u;try{return a?a(e,3,[h]):e(h)}finally{tn=E}}:d=_t,t&&r){const E=d,M=r===!0?1/0:r;d=()=>Wt(E(),M)}const w=Ms(),S=()=>{u.stop(),w&&w.active&&fl(w.effects,u)};if(l&&t){const E=t;t=(...M)=>{E(...M),S()}}let _=y?new Array(e.length).fill(Po):Po;const g=E=>{if(!(!(u.flags&1)||!u.dirty&&!E))if(t){const M=u.run();if(r||b||(y?M.some((U,x)=>Ut(U,_[x])):Ut(M,_))){p&&p();const U=tn;tn=u;try{const x=[M,_===Po?void 0:y&&_[0]===Po?[]:_,h];a?a(t,3,x):t(...x),_=M}finally{tn=U}}}else u.run()};return s&&s(g),u=new $s(d),u.scheduler=i?()=>i(g,!1):g,h=E=>mf(E,!1,u),p=u.onStop=()=>{const E=Fo.get(u);if(E){if(a)a(E,4);else for(const M of E)M();Fo.delete(u)}},t?o?g(!0):_=u.run():i?i(g.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function Wt(e,t=1/0,n){if(t<=0||!be(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,Le(e))Wt(e.value,t,n);else if(ee(e))for(let o=0;o{Wt(o,t,n)});else if(As(e)){for(const o in e)Wt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Wt(e[o],t,n)}return e}/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function vo(e,t,n,o){try{return o?e(...o):e()}catch(r){mo(r,t,n)}}function dt(e,t,n,o){if(ne(e)){const r=vo(e,t,n,o);return r&&Cs(r)&&r.catch(l=>{mo(l,t,n)}),r}if(ee(e)){const r=[];for(let l=0;l>>1,r=ze[o],l=ro(r);l=ro(n)?ze.push(e):ze.splice(yf(t),0,e),e.flags|=1,na()}}function na(){Bo||(Bo=ta.then(oa))}function _f(e){ee(e)?An.push(...e):jt&&e.id===-1?jt.splice(En+1,0,e):e.flags&1||(An.push(e),e.flags|=1),na()}function oi(e,t,n=bt+1){for(;nro(n)-ro(o));if(An.length=0,jt){jt.push(...t);return}for(jt=t,En=0;Ene.id==null?e.flags&2?-1:1/0:e.id;function oa(e){try{for(bt=0;bt{o._d&&vi(-1);const l=Uo(t);let i;try{i=e(...r)}finally{Uo(l),o._d&&vi(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function yt(e,t,n,o){const r=e.dirs,l=t&&t.dirs;for(let i=0;ie.__isTeleport,zt=Symbol("_leaveCb"),Ao=Symbol("_enterCb");function ia(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pe(()=>{e.isMounted=!0}),El(()=>{e.isUnmounting=!0}),e}const ot=[Function,Array],sa={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ot,onEnter:ot,onAfterEnter:ot,onEnterCancelled:ot,onBeforeLeave:ot,onLeave:ot,onAfterLeave:ot,onLeaveCancelled:ot,onBeforeAppear:ot,onAppear:ot,onAfterAppear:ot,onAppearCancelled:ot},aa=e=>{const t=e.subTree;return t.component?aa(t.component):t},Sf={name:"BaseTransition",props:sa,setup(e,{slots:t}){const n=Hn(),o=ia();return()=>{const r=t.default&&_l(t.default(),!0);if(!r||!r.length)return;const l=ca(r),i=ie(e),{mode:s}=i;if(o.isLeaving)return _r(l);const a=ri(l);if(!a)return _r(l);let c=lo(a,i,o,n,d=>c=d);a.type!==Xe&&fn(a,c);let u=n.subTree&&ri(n.subTree);if(u&&u.type!==Xe&&!nn(a,u)&&aa(n).type!==Xe){let d=lo(u,i,o,n);if(fn(u,d),s==="out-in"&&a.type!==Xe)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},_r(l);s==="in-out"&&a.type!==Xe?d.delayLeave=(p,h,b)=>{const y=ua(o,u);y[String(u.key)]=u,p[zt]=()=>{h(),p[zt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{b(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return l}}};function ca(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Xe){t=n;break}}return t}const Tf=Sf;function ua(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function lo(e,t,n,o,r){const{appear:l,mode:i,persisted:s=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:b,onLeaveCancelled:y,onBeforeAppear:w,onAppear:S,onAfterAppear:_,onAppearCancelled:g}=t,E=String(e.key),M=ua(n,e),U=(L,H)=>{L&&dt(L,o,9,H)},x=(L,H)=>{const N=H[1];U(L,H),ee(L)?L.every(A=>A.length<=1)&&N():L.length<=1&&N()},B={mode:i,persisted:s,beforeEnter(L){let H=a;if(!n.isMounted)if(l)H=w||a;else return;L[zt]&&L[zt](!0);const N=M[E];N&&nn(e,N)&&N.el[zt]&&N.el[zt](),U(H,[L])},enter(L){let H=c,N=u,A=d;if(!n.isMounted)if(l)H=S||c,N=_||u,A=g||d;else return;let z=!1;const oe=L[Ao]=he=>{z||(z=!0,he?U(A,[L]):U(N,[L]),B.delayedLeave&&B.delayedLeave(),L[Ao]=void 0)};H?x(H,[L,oe]):oe()},leave(L,H){const N=String(e.key);if(L[Ao]&&L[Ao](!0),n.isUnmounting)return H();U(p,[L]);let A=!1;const z=L[zt]=oe=>{A||(A=!0,H(),oe?U(y,[L]):U(b,[L]),L[zt]=void 0,M[N]===e&&delete M[N])};M[N]=e,h?x(h,[L,z]):z()},clone(L){const H=lo(L,t,n,o,r);return r&&r(H),H}};return B}function _r(e){if(go(e))return e=Gt(e),e.children=null,e}function ri(e){if(!go(e))return la(e.type)&&e.children?ca(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ne(n.default))return n.default()}}function fn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,fn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function _l(e,t=!1,n){let o=[],r=0;for(let l=0;l1)for(let l=0;lio(b,t&&(ee(t)?t[y]:t),n,o,r));return}if(Ln(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&io(e,t,n,o.component.subTree);return}const l=o.shapeFlag&4?Cl(o.component):o.el,i=r?null:l,{i:s,r:a}=e,c=t&&t.r,u=s.refs===ge?s.refs={}:s.refs,d=s.setupState,p=ie(d),h=d===ge?()=>!1:b=>fe(p,b);if(c!=null&&c!==a&&(Ce(c)?(u[c]=null,h(c)&&(d[c]=null)):Le(c)&&(c.value=null)),ne(a))vo(a,s,12,[i,u]);else{const b=Ce(a),y=Le(a);if(b||y){const w=()=>{if(e.f){const S=b?h(a)?d[a]:u[a]:a.value;r?ee(S)&&fl(S,l):ee(S)?S.includes(l)||S.push(l):b?(u[a]=[l],h(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else b?(u[a]=i,h(a)&&(d[a]=i)):y&&(a.value=i,e.k&&(u[e.k]=i))};i?(w.id=-1,Je(w,n)):w()}}}let li=!1;const wn=()=>{li||(console.error("Hydration completed but contains mismatches."),li=!0)},kf=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",xf=e=>e.namespaceURI.includes("MathML"),Lo=e=>{if(e.nodeType===1){if(kf(e))return"svg";if(xf(e))return"mathml"}},kn=e=>e.nodeType===8;function Cf(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:l,parentNode:i,remove:s,insert:a,createComment:c}}=e,u=(g,E)=>{if(!E.hasChildNodes()){n(null,g,E),Wo(),E._vnode=g;return}d(E.firstChild,g,null,null,null),Wo(),E._vnode=g},d=(g,E,M,U,x,B=!1)=>{B=B||!!E.dynamicChildren;const L=kn(g)&&g.data==="[",H=()=>y(g,E,M,U,x,L),{type:N,ref:A,shapeFlag:z,patchFlag:oe}=E;let he=g.nodeType;E.el=g,oe===-2&&(B=!1,E.dynamicChildren=null);let Y=null;switch(N){case an:he!==3?E.children===""?(a(E.el=r(""),i(g),g),Y=g):Y=H():(g.data!==E.children&&(wn(),g.data=E.children),Y=l(g));break;case Xe:_(g)?(Y=l(g),S(E.el=g.content.firstChild,g,M)):he!==8||L?Y=H():Y=l(g);break;case Qn:if(L&&(g=l(g),he=g.nodeType),he===1||he===3){Y=g;const Z=!E.children.length;for(let G=0;G{B=B||!!E.dynamicChildren;const{type:L,props:H,patchFlag:N,shapeFlag:A,dirs:z,transition:oe}=E,he=L==="input"||L==="option";if(he||N!==-1){z&&yt(E,null,M,"created");let Y=!1;if(_(g)){Y=Ca(null,oe)&&M&&M.vnode.props&&M.vnode.props.appear;const G=g.content.firstChild;Y&&oe.beforeEnter(G),S(G,g,M),E.el=g=G}if(A&16&&!(H&&(H.innerHTML||H.textContent))){let G=h(g.firstChild,E,g,M,U,x,B);for(;G;){Ro(g,1)||wn();const Te=G;G=G.nextSibling,s(Te)}}else if(A&8){let G=E.children;G[0]===` +`&&(g.tagName==="PRE"||g.tagName==="TEXTAREA")&&(G=G.slice(1)),g.textContent!==G&&(Ro(g,0)||wn(),g.textContent=E.children)}if(H){if(he||!B||N&48){const G=g.tagName.includes("-");for(const Te in H)(he&&(Te.endsWith("value")||Te==="indeterminate")||uo(Te)&&!Pn(Te)||Te[0]==="."||G)&&o(g,Te,null,H[Te],void 0,M)}else if(H.onClick)o(g,"onClick",null,H.onClick,void 0,M);else if(N&4&&ln(H.style))for(const G in H.style)H.style[G]}let Z;(Z=H&&H.onVnodeBeforeMount)&&rt(Z,M,E),z&&yt(E,null,M,"beforeMount"),((Z=H&&H.onVnodeMounted)||z||Y)&&Ma(()=>{Z&&rt(Z,M,E),Y&&oe.enter(g),z&&yt(E,null,M,"mounted")},U)}return g.nextSibling},h=(g,E,M,U,x,B,L)=>{L=L||!!E.dynamicChildren;const H=E.children,N=H.length;for(let A=0;A{const{slotScopeIds:L}=E;L&&(x=x?x.concat(L):L);const H=i(g),N=h(l(g),E,H,M,U,x,B);return N&&kn(N)&&N.data==="]"?l(E.anchor=N):(wn(),a(E.anchor=c("]"),H,N),N)},y=(g,E,M,U,x,B)=>{if(Ro(g.parentElement,1)||wn(),E.el=null,B){const N=w(g);for(;;){const A=l(g);if(A&&A!==N)s(A);else break}}const L=l(g),H=i(g);return s(g),n(null,E,H,L,M,U,Lo(H),x),M&&(M.vnode.el=E.el,Oa(M,E.el)),L},w=(g,E="[",M="]")=>{let U=0;for(;g;)if(g=l(g),g&&kn(g)&&(g.data===E&&U++,g.data===M)){if(U===0)return l(g);U--}return g},S=(g,E,M)=>{const U=E.parentNode;U&&U.replaceChild(g,E);let x=M;for(;x;)x.vnode.el===E&&(x.vnode.el=x.subTree.el=g),x=x.parent},_=g=>g.nodeType===1&&g.tagName==="TEMPLATE";return[u,d]}const ii="data-allow-mismatch",Pf={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ro(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(ii);)e=e.parentElement;const n=e&&e.getAttribute(ii);if(n==null)return!1;if(n==="")return!0;{const o=n.split(",");return t===0&&o.includes("children")?!0:n.split(",").includes(Pf[t])}}er().requestIdleCallback;er().cancelIdleCallback;function Af(e,t){if(kn(e)&&e.data==="["){let n=1,o=e.nextSibling;for(;o;){if(o.nodeType===1){if(t(o)===!1)break}else if(kn(o))if(o.data==="]"){if(--n===0)break}else o.data==="["&&n++;o=o.nextSibling}}else t(e)}const Ln=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function fa(e){ne(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,hydrate:l,timeout:i,suspensible:s=!0,onError:a}=e;let c=null,u,d=0;const p=()=>(d++,c=null,h()),h=()=>{let b;return c||(b=c=t().catch(y=>{if(y=y instanceof Error?y:new Error(String(y)),a)return new Promise((w,S)=>{a(y,()=>w(p()),()=>S(y),d+1)});throw y}).then(y=>b!==c&&c?c:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),u=y,y)))};return K({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(b,y,w){const S=l?()=>{const _=l(w,g=>Af(b,g));_&&(y.bum||(y.bum=[])).push(_)}:w;u?S():h().then(()=>!y.isUnmounted&&S())},get __asyncResolved(){return u},setup(){const b=Re;if(wl(b),u)return()=>wr(u,b);const y=g=>{c=null,mo(g,b,13,!o)};if(s&&b.suspense||In)return h().then(g=>()=>wr(g,b)).catch(g=>(y(g),()=>o?Oe(o,{error:g}):null));const w=ae(!1),S=ae(),_=ae(!!r);return r&&setTimeout(()=>{_.value=!1},r),i!=null&&setTimeout(()=>{if(!w.value&&!S.value){const g=new Error(`Async component timed out after ${i}ms.`);y(g),S.value=g}},i),h().then(()=>{w.value=!0,b.parent&&go(b.parent.vnode)&&b.parent.update()}).catch(g=>{y(g),S.value=g}),()=>{if(w.value&&u)return wr(u,b);if(S.value&&o)return Oe(o,{error:S.value});if(n&&!_.value)return Oe(n)}}})}function wr(e,t){const{ref:n,props:o,children:r,ce:l}=t.vnode,i=Oe(e,o,r);return i.ref=n,i.ce=l,delete t.vnode.ce,i}const go=e=>e.type.__isKeepAlive;function Lf(e,t){da(e,"a",t)}function Rf(e,t){da(e,"da",t)}function da(e,t,n=Re){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(lr(t,o,n),n){let r=n.parent;for(;r&&r.parent;)go(r.parent.vnode)&&Of(o,t,n,r),r=r.parent}}function Of(e,t,n,o){const r=lr(t,e,o,!0);vn(()=>{fl(o[t],r)},n)}function lr(e,t,n=Re,o=!1){if(n){const r=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...i)=>{Yt();const s=bo(n),a=dt(t,n,e,i);return s(),Jt(),a});return o?r.unshift(l):r.push(l),l}}const Rt=e=>(t,n=Re)=>{(!In||e==="sp")&&lr(e,(...o)=>t(...o),n)},If=Rt("bm"),Pe=Rt("m"),Mf=Rt("bu"),pa=Rt("u"),El=Rt("bum"),vn=Rt("um"),$f=Rt("sp"),Df=Rt("rtg"),Nf=Rt("rtc");function Hf(e,t=Re){lr("ec",e,t)}const Vf="components";function Ee(e,t){return zf(Vf,e,!0,t)||e}const jf=Symbol.for("v-ndc");function zf(e,t,n=!0,o=!1){const r=Ze||Re;if(r){const l=r.type;{const s=kd(l,!1);if(s&&(s===t||s===Ue(t)||s===fo(Ue(t))))return l}const i=si(r[e]||l[e],t)||si(r.appContext[e],t);return!i&&o?l:i}}function si(e,t){return e&&(e[t]||e[Ue(t)]||e[fo(Ue(t))])}function W1(e,t,n,o){let r;const l=n,i=ee(e);if(i||Ce(e)){const s=i&&ln(e);let a=!1;s&&(a=!st(e),e=nr(e)),r=new Array(e.length);for(let c=0,u=e.length;ct(s,a,void 0,l));else{const s=Object.keys(e);r=new Array(s.length);for(let a=0,c=s.length;ae?Ha(e)?Cl(e):zr(e.parent):null,Jn=Me(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zr(e.parent),$root:e=>zr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>va(e),$forceUpdate:e=>e.f||(e.f=()=>{yl(e.update)}),$nextTick:e=>e.n||(e.n=hn.bind(e.proxy)),$watch:e=>sd.bind(e)}),Er=(e,t)=>e!==ge&&!e.__isScriptSetup&&fe(e,t),Ff={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:l,accessCache:i,type:s,appContext:a}=e;let c;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return l[t]}else{if(Er(o,t))return i[t]=1,o[t];if(r!==ge&&fe(r,t))return i[t]=2,r[t];if((c=e.propsOptions[0])&&fe(c,t))return i[t]=3,l[t];if(n!==ge&&fe(n,t))return i[t]=4,n[t];Fr&&(i[t]=0)}}const u=Jn[t];let d,p;if(u)return t==="$attrs"&&Ne(e.attrs,"get",""),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==ge&&fe(n,t))return i[t]=4,n[t];if(p=a.config.globalProperties,fe(p,t))return p[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:l}=e;return Er(r,t)?(r[t]=n,!0):o!==ge&&fe(o,t)?(o[t]=n,!0):fe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:l}},i){let s;return!!n[i]||e!==ge&&fe(e,i)||Er(t,i)||(s=l[0])&&fe(s,i)||fe(o,i)||fe(Jn,i)||fe(r.config.globalProperties,i)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:fe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ai(e){return ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Fr=!0;function Bf(e){const t=va(e),n=e.proxy,o=e.ctx;Fr=!1,t.beforeCreate&&ci(t.beforeCreate,e,"bc");const{data:r,computed:l,methods:i,watch:s,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:h,updated:b,activated:y,deactivated:w,beforeDestroy:S,beforeUnmount:_,destroyed:g,unmounted:E,render:M,renderTracked:U,renderTriggered:x,errorCaptured:B,serverPrefetch:L,expose:H,inheritAttrs:N,components:A,directives:z,filters:oe}=t;if(c&&Wf(c,o,null),i)for(const Z in i){const G=i[Z];ne(G)&&(o[Z]=G.bind(n))}if(r){const Z=r.call(n,n);be(Z)&&(e.data=cn(Z))}if(Fr=!0,l)for(const Z in l){const G=l[Z],Te=ne(G)?G.bind(n,n):ne(G.get)?G.get.bind(n,n):_t,Nt=!ne(G)&&ne(G.set)?G.set.bind(n):_t,vt=k({get:Te,set:Nt});Object.defineProperty(o,Z,{enumerable:!0,configurable:!0,get:()=>vt.value,set:Be=>vt.value=Be})}if(s)for(const Z in s)ha(s[Z],o,n,Z);if(a){const Z=ne(a)?a.call(n):a;Reflect.ownKeys(Z).forEach(G=>{Rn(G,Z[G])})}u&&ci(u,e,"c");function Y(Z,G){ee(G)?G.forEach(Te=>Z(Te.bind(n))):G&&Z(G.bind(n))}if(Y(If,d),Y(Pe,p),Y(Mf,h),Y(pa,b),Y(Lf,y),Y(Rf,w),Y(Hf,B),Y(Nf,U),Y(Df,x),Y(El,_),Y(vn,E),Y($f,L),ee(H))if(H.length){const Z=e.exposed||(e.exposed={});H.forEach(G=>{Object.defineProperty(Z,G,{get:()=>n[G],set:Te=>n[G]=Te})})}else e.exposed||(e.exposed={});M&&e.render===_t&&(e.render=M),N!=null&&(e.inheritAttrs=N),A&&(e.components=A),z&&(e.directives=z),L&&wl(e)}function Wf(e,t,n=_t){ee(e)&&(e=Br(e));for(const o in e){const r=e[o];let l;be(r)?"default"in r?l=Ie(r.from||o,r.default,!0):l=Ie(r.from||o):l=Ie(r),Le(l)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>l.value,set:i=>l.value=i}):t[o]=l}}function ci(e,t,n){dt(ee(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function ha(e,t,n,o){let r=o.includes(".")?La(n,o):()=>n[o];if(Ce(e)){const l=t[e];ne(l)&&xe(r,l)}else if(ne(e))xe(r,e.bind(n));else if(be(e))if(ee(e))e.forEach(l=>ha(l,t,n,o));else{const l=ne(e.handler)?e.handler.bind(n):t[e.handler];ne(l)&&xe(r,l,e)}}function va(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:l,config:{optionMergeStrategies:i}}=e.appContext,s=l.get(t);let a;return s?a=s:!r.length&&!n&&!o?a=t:(a={},r.length&&r.forEach(c=>qo(a,c,i,!0)),qo(a,t,i)),be(t)&&l.set(t,a),a}function qo(e,t,n,o=!1){const{mixins:r,extends:l}=t;l&&qo(e,l,n,!0),r&&r.forEach(i=>qo(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const s=Uf[i]||n&&n[i];e[i]=s?s(e[i],t[i]):t[i]}return e}const Uf={data:ui,props:fi,emits:fi,methods:Gn,computed:Gn,beforeCreate:Ve,created:Ve,beforeMount:Ve,mounted:Ve,beforeUpdate:Ve,updated:Ve,beforeDestroy:Ve,beforeUnmount:Ve,destroyed:Ve,unmounted:Ve,activated:Ve,deactivated:Ve,errorCaptured:Ve,serverPrefetch:Ve,components:Gn,directives:Gn,watch:Gf,provide:ui,inject:qf};function ui(e,t){return t?e?function(){return Me(ne(e)?e.call(this,this):e,ne(t)?t.call(this,this):t)}:t:e}function qf(e,t){return Gn(Br(e),Br(t))}function Br(e){if(ee(e)){const t={};for(let n=0;n1)return n&&ne(t)?t.call(o&&o.proxy):t}}function ga(){return!!(Re||Ze||sn)}const ba={},ya=()=>Object.create(ba),_a=e=>Object.getPrototypeOf(e)===ba;function Jf(e,t,n,o=!1){const r={},l=ya();e.propsDefaults=Object.create(null),wa(e,t,r,l);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=o?r:Qs(r):e.type.props?e.props=r:e.props=l,e.attrs=l}function Qf(e,t,n,o){const{props:r,attrs:l,vnode:{patchFlag:i}}=e,s=ie(r),[a]=e.propsOptions;let c=!1;if((o||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[p,h]=Ea(d,t,!0);Me(i,p),h&&s.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!l&&!a)return be(e)&&o.set(e,xn),xn;if(ee(l))for(let u=0;ue[0]==="_"||e==="$stable",Sl=e=>ee(e)?e.map(lt):[lt(e)],Zf=(e,t,n)=>{if(t._n)return t;const o=wf((...r)=>Sl(t(...r)),n);return o._c=!1,o},Ta=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Sa(r))continue;const l=e[r];if(ne(l))t[r]=Zf(r,l,o);else if(l!=null){const i=Sl(l);t[r]=()=>i}}},ka=(e,t)=>{const n=Sl(t);e.slots.default=()=>n},xa=(e,t,n)=>{for(const o in t)(n||o!=="_")&&(e[o]=t[o])},ed=(e,t,n)=>{const o=e.slots=ya();if(e.vnode.shapeFlag&32){const r=t._;r?(xa(o,t,n),n&&Ls(o,"_",r,!0)):Ta(t,o)}else t&&ka(e,t)},td=(e,t,n)=>{const{vnode:o,slots:r}=e;let l=!0,i=ge;if(o.shapeFlag&32){const s=t._;s?n&&s===1?l=!1:xa(r,t,n):(l=!t.$stable,Ta(t,r)),i=t}else t&&(ka(e,t),i={default:1});if(l)for(const s in r)!Sa(s)&&i[s]==null&&delete r[s]},Je=Ma;function nd(e){return od(e,Cf)}function od(e,t){const n=er();n.__VUE__=!0;const{insert:o,remove:r,patchProp:l,createElement:i,createText:s,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:p,setScopeId:h=_t,insertStaticContent:b}=e,y=(v,m,T,R=null,C=null,O=null,j=void 0,V=null,$=!!m.dynamicChildren)=>{if(v===m)return;v&&!nn(v,m)&&(R=P(v),Be(v,C,O,!0),v=null),m.patchFlag===-2&&($=!1,m.dynamicChildren=null);const{type:I,ref:X,shapeFlag:W}=m;switch(I){case an:w(v,m,T,R);break;case Xe:S(v,m,T,R);break;case Qn:v==null&&_(m,T,R,j);break;case Qe:A(v,m,T,R,C,O,j,V,$);break;default:W&1?M(v,m,T,R,C,O,j,V,$):W&6?z(v,m,T,R,C,O,j,V,$):(W&64||W&128)&&I.process(v,m,T,R,C,O,j,V,$,J)}X!=null&&C&&io(X,v&&v.ref,O,m||v,!m)},w=(v,m,T,R)=>{if(v==null)o(m.el=s(m.children),T,R);else{const C=m.el=v.el;m.children!==v.children&&c(C,m.children)}},S=(v,m,T,R)=>{v==null?o(m.el=a(m.children||""),T,R):m.el=v.el},_=(v,m,T,R)=>{[v.el,v.anchor]=b(v.children,m,T,R,v.el,v.anchor)},g=({el:v,anchor:m},T,R)=>{let C;for(;v&&v!==m;)C=p(v),o(v,T,R),v=C;o(m,T,R)},E=({el:v,anchor:m})=>{let T;for(;v&&v!==m;)T=p(v),r(v),v=T;r(m)},M=(v,m,T,R,C,O,j,V,$)=>{m.type==="svg"?j="svg":m.type==="math"&&(j="mathml"),v==null?U(m,T,R,C,O,j,V,$):L(v,m,C,O,j,V,$)},U=(v,m,T,R,C,O,j,V)=>{let $,I;const{props:X,shapeFlag:W,transition:Q,dirs:te}=v;if($=v.el=i(v.type,O,X&&X.is,X),W&8?u($,v.children):W&16&&B(v.children,$,null,R,C,Sr(v,O),j,V),te&&yt(v,null,R,"created"),x($,v,v.scopeId,j,R),X){for(const ve in X)ve!=="value"&&!Pn(ve)&&l($,ve,null,X[ve],O,R);"value"in X&&l($,"value",null,X.value,O),(I=X.onVnodeBeforeMount)&&rt(I,R,v)}te&&yt(v,null,R,"beforeMount");const le=Ca(C,Q);le&&Q.beforeEnter($),o($,m,T),((I=X&&X.onVnodeMounted)||le||te)&&Je(()=>{I&&rt(I,R,v),le&&Q.enter($),te&&yt(v,null,R,"mounted")},C)},x=(v,m,T,R,C)=>{if(T&&h(v,T),R)for(let O=0;O{for(let I=$;I{const V=m.el=v.el;let{patchFlag:$,dynamicChildren:I,dirs:X}=m;$|=v.patchFlag&16;const W=v.props||ge,Q=m.props||ge;let te;if(T&&Xt(T,!1),(te=Q.onVnodeBeforeUpdate)&&rt(te,T,m,v),X&&yt(m,v,T,"beforeUpdate"),T&&Xt(T,!0),(W.innerHTML&&Q.innerHTML==null||W.textContent&&Q.textContent==null)&&u(V,""),I?H(v.dynamicChildren,I,V,T,R,Sr(m,C),O):j||G(v,m,V,null,T,R,Sr(m,C),O,!1),$>0){if($&16)N(V,W,Q,T,C);else if($&2&&W.class!==Q.class&&l(V,"class",null,Q.class,C),$&4&&l(V,"style",W.style,Q.style,C),$&8){const le=m.dynamicProps;for(let ve=0;ve{te&&rt(te,T,m,v),X&&yt(m,v,T,"updated")},R)},H=(v,m,T,R,C,O,j)=>{for(let V=0;V{if(m!==T){if(m!==ge)for(const O in m)!Pn(O)&&!(O in T)&&l(v,O,m[O],null,C,R);for(const O in T){if(Pn(O))continue;const j=T[O],V=m[O];j!==V&&O!=="value"&&l(v,O,V,j,C,R)}"value"in T&&l(v,"value",m.value,T.value,C)}},A=(v,m,T,R,C,O,j,V,$)=>{const I=m.el=v?v.el:s(""),X=m.anchor=v?v.anchor:s("");let{patchFlag:W,dynamicChildren:Q,slotScopeIds:te}=m;te&&(V=V?V.concat(te):te),v==null?(o(I,T,R),o(X,T,R),B(m.children||[],T,X,C,O,j,V,$)):W>0&&W&64&&Q&&v.dynamicChildren?(H(v.dynamicChildren,Q,T,C,O,j,V),(m.key!=null||C&&m===C.subTree)&&Pa(v,m,!0)):G(v,m,T,X,C,O,j,V,$)},z=(v,m,T,R,C,O,j,V,$)=>{m.slotScopeIds=V,v==null?m.shapeFlag&512?C.ctx.activate(m,T,R,j,$):oe(m,T,R,C,O,j,$):he(v,m,$)},oe=(v,m,T,R,C,O,j)=>{const V=v.component=_d(v,R,C);if(go(v)&&(V.ctx.renderer=J),wd(V,!1,j),V.asyncDep){if(C&&C.registerDep(V,Y,j),!v.el){const $=V.subTree=Oe(Xe);S(null,$,m,T)}}else Y(V,v,m,T,C,O,j)},he=(v,m,T)=>{const R=m.component=v.component;if(dd(v,m,T))if(R.asyncDep&&!R.asyncResolved){Z(R,m,T);return}else R.next=m,R.update();else m.el=v.el,R.vnode=m},Y=(v,m,T,R,C,O,j)=>{const V=()=>{if(v.isMounted){let{next:W,bu:Q,u:te,parent:le,vnode:ve}=v;{const Ke=Aa(v);if(Ke){W&&(W.el=ve.el,Z(v,W,j)),Ke.asyncDep.then(()=>{v.isUnmounted||V()});return}}let pe=W,Ge;Xt(v,!1),W?(W.el=ve.el,Z(v,W,j)):W=ve,Q&&vr(Q),(Ge=W.props&&W.props.onVnodeBeforeUpdate)&&rt(Ge,le,W,ve),Xt(v,!0);const De=Tr(v),ct=v.subTree;v.subTree=De,y(ct,De,d(ct.el),P(ct),v,C,O),W.el=De.el,pe===null&&Oa(v,De.el),te&&Je(te,C),(Ge=W.props&&W.props.onVnodeUpdated)&&Je(()=>rt(Ge,le,W,ve),C)}else{let W;const{el:Q,props:te}=m,{bm:le,m:ve,parent:pe,root:Ge,type:De}=v,ct=Ln(m);if(Xt(v,!1),le&&vr(le),!ct&&(W=te&&te.onVnodeBeforeMount)&&rt(W,pe,m),Xt(v,!0),Q&&we){const Ke=()=>{v.subTree=Tr(v),we(Q,v.subTree,v,C,null)};ct&&De.__asyncHydrate?De.__asyncHydrate(Q,v,Ke):Ke()}else{Ge.ce&&Ge.ce._injectChildStyle(De);const Ke=v.subTree=Tr(v);y(null,Ke,T,R,v,C,O),m.el=Ke.el}if(ve&&Je(ve,C),!ct&&(W=te&&te.onVnodeMounted)){const Ke=m;Je(()=>rt(W,pe,Ke),C)}(m.shapeFlag&256||pe&&Ln(pe.vnode)&&pe.vnode.shapeFlag&256)&&v.a&&Je(v.a,C),v.isMounted=!0,m=T=R=null}};v.scope.on();const $=v.effect=new $s(V);v.scope.off();const I=v.update=$.run.bind($),X=v.job=$.runIfDirty.bind($);X.i=v,X.id=v.uid,$.scheduler=()=>yl(X),Xt(v,!0),I()},Z=(v,m,T)=>{m.component=v;const R=v.vnode.props;v.vnode=m,v.next=null,Qf(v,m.props,R,T),td(v,m.children,T),Yt(),oi(v),Jt()},G=(v,m,T,R,C,O,j,V,$=!1)=>{const I=v&&v.children,X=v?v.shapeFlag:0,W=m.children,{patchFlag:Q,shapeFlag:te}=m;if(Q>0){if(Q&128){Nt(I,W,T,R,C,O,j,V,$);return}else if(Q&256){Te(I,W,T,R,C,O,j,V,$);return}}te&8?(X&16&&nt(I,C,O),W!==I&&u(T,W)):X&16?te&16?Nt(I,W,T,R,C,O,j,V,$):nt(I,C,O,!0):(X&8&&u(T,""),te&16&&B(W,T,R,C,O,j,V,$))},Te=(v,m,T,R,C,O,j,V,$)=>{v=v||xn,m=m||xn;const I=v.length,X=m.length,W=Math.min(I,X);let Q;for(Q=0;QX?nt(v,C,O,!0,!1,W):B(m,T,R,C,O,j,V,$,W)},Nt=(v,m,T,R,C,O,j,V,$)=>{let I=0;const X=m.length;let W=v.length-1,Q=X-1;for(;I<=W&&I<=Q;){const te=v[I],le=m[I]=$?Ft(m[I]):lt(m[I]);if(nn(te,le))y(te,le,T,null,C,O,j,V,$);else break;I++}for(;I<=W&&I<=Q;){const te=v[W],le=m[Q]=$?Ft(m[Q]):lt(m[Q]);if(nn(te,le))y(te,le,T,null,C,O,j,V,$);else break;W--,Q--}if(I>W){if(I<=Q){const te=Q+1,le=teQ)for(;I<=W;)Be(v[I],C,O,!0),I++;else{const te=I,le=I,ve=new Map;for(I=le;I<=Q;I++){const Ye=m[I]=$?Ft(m[I]):lt(m[I]);Ye.key!=null&&ve.set(Ye.key,I)}let pe,Ge=0;const De=Q-le+1;let ct=!1,Ke=0;const Fn=new Array(De);for(I=0;I=De){Be(Ye,C,O,!0);continue}let mt;if(Ye.key!=null)mt=ve.get(Ye.key);else for(pe=le;pe<=Q;pe++)if(Fn[pe-le]===0&&nn(Ye,m[pe])){mt=pe;break}mt===void 0?Be(Ye,C,O,!0):(Fn[mt-le]=I+1,mt>=Ke?Ke=mt:ct=!0,y(Ye,m[mt],T,null,C,O,j,V,$),Ge++)}const Xl=ct?rd(Fn):xn;for(pe=Xl.length-1,I=De-1;I>=0;I--){const Ye=le+I,mt=m[Ye],Zl=Ye+1{const{el:O,type:j,transition:V,children:$,shapeFlag:I}=v;if(I&6){vt(v.component.subTree,m,T,R);return}if(I&128){v.suspense.move(m,T,R);return}if(I&64){j.move(v,m,T,J);return}if(j===Qe){o(O,m,T);for(let W=0;W<$.length;W++)vt($[W],m,T,R);o(v.anchor,m,T);return}if(j===Qn){g(v,m,T);return}if(R!==2&&I&1&&V)if(R===0)V.beforeEnter(O),o(O,m,T),Je(()=>V.enter(O),C);else{const{leave:W,delayLeave:Q,afterLeave:te}=V,le=()=>o(O,m,T),ve=()=>{W(O,()=>{le(),te&&te()})};Q?Q(O,le,ve):ve()}else o(O,m,T)},Be=(v,m,T,R=!1,C=!1)=>{const{type:O,props:j,ref:V,children:$,dynamicChildren:I,shapeFlag:X,patchFlag:W,dirs:Q,cacheIndex:te}=v;if(W===-2&&(C=!1),V!=null&&io(V,null,T,v,!0),te!=null&&(m.renderCache[te]=void 0),X&256){m.ctx.deactivate(v);return}const le=X&1&&Q,ve=!Ln(v);let pe;if(ve&&(pe=j&&j.onVnodeBeforeUnmount)&&rt(pe,m,v),X&6)ko(v.component,T,R);else{if(X&128){v.suspense.unmount(T,R);return}le&&yt(v,null,m,"beforeUnmount"),X&64?v.type.remove(v,m,T,J,R):I&&!I.hasOnce&&(O!==Qe||W>0&&W&64)?nt(I,m,T,!1,!0):(O===Qe&&W&384||!C&&X&16)&&nt($,m,T),R&&bn(v)}(ve&&(pe=j&&j.onVnodeUnmounted)||le)&&Je(()=>{pe&&rt(pe,m,v),le&&yt(v,null,m,"unmounted")},T)},bn=v=>{const{type:m,el:T,anchor:R,transition:C}=v;if(m===Qe){yn(T,R);return}if(m===Qn){E(v);return}const O=()=>{r(T),C&&!C.persisted&&C.afterLeave&&C.afterLeave()};if(v.shapeFlag&1&&C&&!C.persisted){const{leave:j,delayLeave:V}=C,$=()=>j(T,O);V?V(v.el,O,$):$()}else O()},yn=(v,m)=>{let T;for(;v!==m;)T=p(v),r(v),v=T;r(m)},ko=(v,m,T)=>{const{bum:R,scope:C,job:O,subTree:j,um:V,m:$,a:I}=v;pi($),pi(I),R&&vr(R),C.stop(),O&&(O.flags|=8,Be(j,v,m,T)),V&&Je(V,m),Je(()=>{v.isUnmounted=!0},m),m&&m.pendingBranch&&!m.isUnmounted&&v.asyncDep&&!v.asyncResolved&&v.suspenseId===m.pendingId&&(m.deps--,m.deps===0&&m.resolve())},nt=(v,m,T,R=!1,C=!1,O=0)=>{for(let j=O;j{if(v.shapeFlag&6)return P(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const m=p(v.anchor||v.el),T=m&&m[Ef];return T?p(T):m};let q=!1;const F=(v,m,T)=>{v==null?m._vnode&&Be(m._vnode,null,null,!0):y(m._vnode||null,v,m,null,null,null,T),m._vnode=v,q||(q=!0,oi(),Wo(),q=!1)},J={p:y,um:Be,m:vt,r:bn,mt:oe,mc:B,pc:G,pbc:H,n:P,o:e};let ce,we;return t&&([ce,we]=t(J)),{render:F,hydrate:ce,createApp:Yf(F,ce)}}function Sr({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Xt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ca(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Pa(e,t,n=!1){const o=e.children,r=t.children;if(ee(o)&&ee(r))for(let l=0;l>1,e[n[s]]0&&(t[o]=n[l-1]),n[l]=o)}}for(l=n.length,i=n[l-1];l-- >0;)n[l]=i,i=t[i];return n}function Aa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Aa(t)}function pi(e){if(e)for(let t=0;tIe(ld);function Tl(e,t){return kl(e,null,t)}function xe(e,t,n){return kl(e,t,n)}function kl(e,t,n=ge){const{immediate:o,deep:r,flush:l,once:i}=n,s=Me({},n),a=t&&o||!t&&l!=="post";let c;if(In){if(l==="sync"){const h=id();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=_t,h.resume=_t,h.pause=_t,h}}const u=Re;s.call=(h,b,y)=>dt(h,u,b,y);let d=!1;l==="post"?s.scheduler=h=>{Je(h,u&&u.suspense)}:l!=="sync"&&(d=!0,s.scheduler=(h,b)=>{b?h():yl(h)}),s.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const p=gf(e,t,s);return In&&(c?c.push(p):a&&p()),p}function sd(e,t,n){const o=this.proxy,r=Ce(e)?e.includes(".")?La(o,e):()=>o[e]:e.bind(o,o);let l;ne(t)?l=t:(l=t.handler,n=t);const i=bo(this),s=kl(r,l.bind(o),n);return i(),s}function La(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ue(t)}Modifiers`]||e[`${pn(t)}Modifiers`];function cd(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||ge;let r=n;const l=t.startsWith("update:"),i=l&&ad(o,t.slice(7));i&&(i.trim&&(r=n.map(u=>Ce(u)?u.trim():u)),i.number&&(r=n.map(Au)));let s,a=o[s=hr(t)]||o[s=hr(Ue(t))];!a&&l&&(a=o[s=hr(pn(t))]),a&&dt(a,e,6,r);const c=o[s+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,dt(c,e,6,r)}}function Ra(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(r!==void 0)return r;const l=e.emits;let i={},s=!1;if(!ne(e)){const a=c=>{const u=Ra(c,t,!0);u&&(s=!0,Me(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!l&&!s?(be(e)&&o.set(e,null),null):(ee(l)?l.forEach(a=>i[a]=null):Me(i,l),be(e)&&o.set(e,i),i)}function ir(e,t){return!e||!uo(t)?!1:(t=t.slice(2).replace(/Once$/,""),fe(e,t[0].toLowerCase()+t.slice(1))||fe(e,pn(t))||fe(e,t))}function Tr(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[l],slots:i,attrs:s,emit:a,render:c,renderCache:u,props:d,data:p,setupState:h,ctx:b,inheritAttrs:y}=e,w=Uo(e);let S,_;try{if(n.shapeFlag&4){const E=r||o,M=E;S=lt(c.call(M,E,u,d,h,p,b)),_=s}else{const E=t;S=lt(E.length>1?E(d,{attrs:s,slots:i,emit:a}):E(d,null)),_=t.props?s:ud(s)}}catch(E){Xn.length=0,mo(E,e,1),S=Oe(Xe)}let g=S;if(_&&y!==!1){const E=Object.keys(_),{shapeFlag:M}=g;E.length&&M&7&&(l&&E.some(ul)&&(_=fd(_,l)),g=Gt(g,_,!1,!0))}return n.dirs&&(g=Gt(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&fn(g,n.transition),S=g,Uo(w),S}const ud=e=>{let t;for(const n in e)(n==="class"||n==="style"||uo(n))&&((t||(t={}))[n]=e[n]);return t},fd=(e,t)=>{const n={};for(const o in e)(!ul(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function dd(e,t,n){const{props:o,children:r,component:l}=e,{props:i,children:s,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?hi(o,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let d=0;de.__isSuspense;function Ma(e,t){t&&t.pendingBranch?ee(e)?t.effects.push(...e):t.effects.push(e):_f(e)}const Qe=Symbol.for("v-fgt"),an=Symbol.for("v-txt"),Xe=Symbol.for("v-cmt"),Qn=Symbol.for("v-stc"),Xn=[];let et=null;function U1(e=!1){Xn.push(et=e?null:[])}function pd(){Xn.pop(),et=Xn[Xn.length-1]||null}let so=1;function vi(e,t=!1){so+=e,e<0&&et&&t&&(et.hasOnce=!0)}function hd(e){return e.dynamicChildren=so>0?et||xn:null,pd(),so>0&&et&&et.push(e),e}function q1(e,t,n,o,r,l){return hd(Da(e,t,n,o,r,l,!0))}function Go(e){return e?e.__v_isVNode===!0:!1}function nn(e,t){return e.type===t.type&&e.key===t.key}const $a=({key:e})=>e??null,Ho=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||Le(e)||ne(e)?{i:Ze,r:e,k:t,f:!!n}:e:null);function Da(e,t=null,n=null,o=0,r=null,l=e===Qe?0:1,i=!1,s=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$a(t),ref:t&&Ho(t),scopeId:ra,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ze};return s?(xl(a,n),l&128&&e.normalize(a)):n&&(a.shapeFlag|=Ce(n)?8:16),so>0&&!i&&et&&(a.patchFlag>0||l&6)&&a.patchFlag!==32&&et.push(a),a}const Oe=vd;function vd(e,t=null,n=null,o=0,r=null,l=!1){if((!e||e===jf)&&(e=Xe),Go(e)){const s=Gt(e,t,!0);return n&&xl(s,n),so>0&&!l&&et&&(s.shapeFlag&6?et[et.indexOf(e)]=s:et.push(s)),s.patchFlag=-2,s}if(xd(e)&&(e=e.__vccOpts),t){t=md(t);let{class:s,style:a}=t;s&&!Ce(s)&&(t.class=hl(s)),be(a)&&(bl(a)&&!ee(a)&&(a=Me({},a)),t.style=pl(a))}const i=Ce(e)?1:Ia(e)?128:la(e)?64:be(e)?4:ne(e)?2:0;return Da(e,t,n,o,r,i,l,!0)}function md(e){return e?bl(e)||_a(e)?Me({},e):e:null}function Gt(e,t,n=!1,o=!1){const{props:r,ref:l,patchFlag:i,children:s,transition:a}=e,c=t?gd(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&$a(c),ref:t&&t.ref?n&&l?ee(l)?l.concat(Ho(t)):[l,Ho(t)]:Ho(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Qe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&fn(u,a.clone(u)),u}function Na(e=" ",t=0){return Oe(an,null,e,t)}function G1(e,t){const n=Oe(Qn,null,e);return n.staticCount=t,n}function lt(e){return e==null||typeof e=="boolean"?Oe(Xe):ee(e)?Oe(Qe,null,e.slice()):Go(e)?Ft(e):Oe(an,null,String(e))}function Ft(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function xl(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ee(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),xl(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!_a(t)?t._ctx=Ze:r===3&&Ze&&(Ze.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ne(t)?(t={default:t,_ctx:Ze},n=32):(t=String(t),o&64?(n=16,t=[Na(t)]):n=8);e.children=t,e.shapeFlag|=n}function gd(...e){const t={};for(let n=0;nRe||Ze;let Ko,Ur;{const e=er(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),l=>{r.length>1?r.forEach(i=>i(l)):r[0](l)}};Ko=t("__VUE_INSTANCE_SETTERS__",n=>Re=n),Ur=t("__VUE_SSR_SETTERS__",n=>In=n)}const bo=e=>{const t=Re;return Ko(e),e.scope.on(),()=>{e.scope.off(),Ko(t)}},mi=()=>{Re&&Re.scope.off(),Ko(null)};function Ha(e){return e.vnode.shapeFlag&4}let In=!1;function wd(e,t=!1,n=!1){t&&Ur(t);const{props:o,children:r}=e.vnode,l=Ha(e);Jf(e,o,l,t),ed(e,r,n);const i=l?Ed(e,t):void 0;return t&&Ur(!1),i}function Ed(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ff);const{setup:o}=n;if(o){Yt();const r=e.setupContext=o.length>1?Td(e):null,l=bo(e),i=vo(o,e,0,[e.props,r]),s=Cs(i);if(Jt(),l(),(s||e.sp)&&!Ln(e)&&wl(e),s){if(i.then(mi,mi),t)return i.then(a=>{gi(e,a)}).catch(a=>{mo(a,e,0)});e.asyncDep=i}else gi(e,i)}else Va(e)}function gi(e,t,n){ne(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:be(t)&&(e.setupState=Zs(t)),Va(e)}function Va(e,t,n){const o=e.type;e.render||(e.render=o.render||_t);{const r=bo(e);Yt();try{Bf(e)}finally{Jt(),r()}}}const Sd={get(e,t){return Ne(e,"get",""),e[t]}};function Td(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Sd),slots:e.slots,emit:e.emit,expose:t}}function Cl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Zs(sf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Jn)return Jn[n](e)},has(t,n){return n in t||n in Jn}})):e.proxy}function kd(e,t=!0){return ne(e)?e.displayName||e.name:e.name||t&&e.__name}function xd(e){return ne(e)&&"__vccOpts"in e}const k=(e,t)=>vf(e,t,In);function f(e,t,n){const o=arguments.length;return o===2?be(t)&&!ee(t)?Go(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Go(n)&&(n=[n]),Oe(e,t,n))}const Cd="3.5.13";/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let qr;const bi=typeof window<"u"&&window.trustedTypes;if(bi)try{qr=bi.createPolicy("vue",{createHTML:e=>e})}catch{}const ja=qr?e=>qr.createHTML(e):e=>e,Pd="http://www.w3.org/2000/svg",Ad="http://www.w3.org/1998/Math/MathML",Ct=typeof document<"u"?document:null,yi=Ct&&Ct.createElement("template"),Ld={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Ct.createElementNS(Pd,e):t==="mathml"?Ct.createElementNS(Ad,e):n?Ct.createElement(e,{is:n}):Ct.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Ct.createTextNode(e),createComment:e=>Ct.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ct.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,l){const i=n?n.previousSibling:t.lastChild;if(r&&(r===l||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===l||!(r=r.nextSibling)););else{yi.innerHTML=ja(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const s=yi.content;if(o==="svg"||o==="mathml"){const a=s.firstChild;for(;a.firstChild;)s.appendChild(a.firstChild);s.removeChild(a)}t.insertBefore(s,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ht="transition",Wn="animation",Mn=Symbol("_vtc"),za={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fa=Me({},sa,za),Rd=e=>(e.displayName="Transition",e.props=Fa,e),$n=Rd((e,{slots:t})=>f(Tf,Ba(e),t)),Zt=(e,t=[])=>{ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},_i=e=>e?ee(e)?e.some(t=>t.length>1):e.length>1:!1;function Ba(e){const t={};for(const A in e)A in za||(t[A]=e[A]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:l=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=i,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,b=Od(r),y=b&&b[0],w=b&&b[1],{onBeforeEnter:S,onEnter:_,onEnterCancelled:g,onLeave:E,onLeaveCancelled:M,onBeforeAppear:U=S,onAppear:x=_,onAppearCancelled:B=g}=t,L=(A,z,oe,he)=>{A._enterCancelled=he,Vt(A,z?u:s),Vt(A,z?c:i),oe&&oe()},H=(A,z)=>{A._isLeaving=!1,Vt(A,d),Vt(A,h),Vt(A,p),z&&z()},N=A=>(z,oe)=>{const he=A?x:_,Y=()=>L(z,A,oe);Zt(he,[z,Y]),wi(()=>{Vt(z,A?a:l),gt(z,A?u:s),_i(he)||Ei(z,o,y,Y)})};return Me(t,{onBeforeEnter(A){Zt(S,[A]),gt(A,l),gt(A,i)},onBeforeAppear(A){Zt(U,[A]),gt(A,a),gt(A,c)},onEnter:N(!1),onAppear:N(!0),onLeave(A,z){A._isLeaving=!0;const oe=()=>H(A,z);gt(A,d),A._enterCancelled?(gt(A,p),Gr()):(Gr(),gt(A,p)),wi(()=>{A._isLeaving&&(Vt(A,d),gt(A,h),_i(E)||Ei(A,o,w,oe))}),Zt(E,[A,oe])},onEnterCancelled(A){L(A,!1,void 0,!0),Zt(g,[A])},onAppearCancelled(A){L(A,!0,void 0,!0),Zt(B,[A])},onLeaveCancelled(A){H(A),Zt(M,[A])}})}function Od(e){if(e==null)return null;if(be(e))return[kr(e.enter),kr(e.leave)];{const t=kr(e);return[t,t]}}function kr(e){return Lu(e)}function gt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Mn]||(e[Mn]=new Set)).add(t)}function Vt(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Mn];n&&(n.delete(t),n.size||(e[Mn]=void 0))}function wi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Id=0;function Ei(e,t,n,o){const r=e._endId=++Id,l=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(l,n);const{type:i,timeout:s,propCount:a}=Wa(e,t);if(!i)return o();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,p),l()},p=h=>{h.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[b]||"").split(", "),r=o(`${Ht}Delay`),l=o(`${Ht}Duration`),i=Si(r,l),s=o(`${Wn}Delay`),a=o(`${Wn}Duration`),c=Si(s,a);let u=null,d=0,p=0;t===Ht?i>0&&(u=Ht,d=i,p=l.length):t===Wn?c>0&&(u=Wn,d=c,p=a.length):(d=Math.max(i,c),u=d>0?i>c?Ht:Wn:null,p=u?u===Ht?l.length:a.length:0);const h=u===Ht&&/\b(transform|all)(,|$)/.test(o(`${Ht}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:h}}function Si(e,t){for(;e.lengthTi(n)+Ti(e[o])))}function Ti(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Gr(){return document.body.offsetHeight}function Md(e,t,n){const o=e[Mn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ki=Symbol("_vod"),$d=Symbol("_vsh"),Dd=Symbol(""),Nd=/(^|;)\s*display\s*:/;function Hd(e,t,n){const o=e.style,r=Ce(n);let l=!1;if(n&&!r){if(t)if(Ce(t))for(const i of t.split(";")){const s=i.slice(0,i.indexOf(":")).trim();n[s]==null&&Vo(o,s,"")}else for(const i in t)n[i]==null&&Vo(o,i,"");for(const i in n)i==="display"&&(l=!0),Vo(o,i,n[i])}else if(r){if(t!==n){const i=o[Dd];i&&(n+=";"+i),o.cssText=n,l=Nd.test(n)}}else t&&e.removeAttribute("style");ki in e&&(e[ki]=l?o.display:"",e[$d]&&(o.display="none"))}const xi=/\s*!important$/;function Vo(e,t,n){if(ee(n))n.forEach(o=>Vo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Vd(e,t);xi.test(n)?e.setProperty(pn(o),n.replace(xi,""),"important"):e[o]=n}}const Ci=["Webkit","Moz","ms"],xr={};function Vd(e,t){const n=xr[t];if(n)return n;let o=Ue(t);if(o!=="filter"&&o in e)return xr[t]=o;o=fo(o);for(let r=0;rCr||(Wd.then(()=>Cr=0),Cr=Date.now());function qd(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;dt(Gd(o,n.value),t,5,[o])};return n.value=e,n.attached=Ud(),n}function Gd(e,t){if(ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>r=>!r._stopped&&o&&o(r))}else return t}const Ii=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Kd=(e,t,n,o,r,l)=>{const i=r==="svg";t==="class"?Md(e,o,i):t==="style"?Hd(e,n,o):uo(t)?ul(t)||Fd(e,t,n,o,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yd(e,t,o,i))?(Li(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ai(e,t,o,i,l,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(o))?Li(e,Ue(t),o,l,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Ai(e,t,o,i))};function Yd(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ii(t)&&ne(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Ii(t)&&Ce(n)?!1:t in e}const Ua=new WeakMap,qa=new WeakMap,Yo=Symbol("_moveCb"),Mi=Symbol("_enterCb"),Jd=e=>(delete e.props.mode,e),Qd=Jd({name:"TransitionGroup",props:Me({},Fa,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Hn(),o=ia();let r,l;return pa(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!tp(r[0].el,n.vnode.el,i))return;r.forEach(Xd),r.forEach(Zd);const s=r.filter(ep);Gr(),s.forEach(a=>{const c=a.el,u=c.style;gt(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Yo]=p=>{p&&p.target!==c||(!p||/transform$/.test(p.propertyName))&&(c.removeEventListener("transitionend",d),c[Yo]=null,Vt(c,i))};c.addEventListener("transitionend",d)})}),()=>{const i=ie(e),s=Ba(i);let a=i.tag||Qe;if(r=[],l)for(let c=0;c{s.split(/\s+/).forEach(a=>a&&o.classList.remove(a))}),n.split(/\s+/).forEach(s=>s&&o.classList.add(s)),o.style.display="none";const l=t.nodeType===1?t:t.parentNode;l.appendChild(o);const{hasTransform:i}=Wa(o);return l.removeChild(o),i}const np=Me({patchProp:Kd},Ld);let Pr,$i=!1;function op(){return Pr=$i?Pr:nd(np),$i=!0,Pr}const rp=(...e)=>{const t=op().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=ip(o);if(r)return n(r,!0,lp(r))},t};function lp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ip(e){return Ce(e)?document.querySelector(e):e}var yo=e=>/^[a-z][a-z0-9+.-]*:/.test(e)||e.startsWith("//"),sp=/.md((\?|#).*)?$/,Pl=(e,t="/")=>yo(e)||e.startsWith("/")&&!e.startsWith(t)&&!sp.test(e),_o=e=>/^(https?:)?\/\//.test(e),Di=e=>{if(!e||e.endsWith("/"))return e;let t=e.replace(/(^|\/)README.md$/i,"$1index.html");return t.endsWith(".md")?t=`${t.substring(0,t.length-3)}.html`:t.endsWith(".html")||(t=`${t}.html`),t.endsWith("/index.html")&&(t=t.substring(0,t.length-10)),t},ap="http://.",cp=(e,t)=>{if(!e.startsWith("/")&&t){const n=t.slice(0,t.lastIndexOf("/"));return Di(new URL(`${n}/${e}`,ap).pathname)}return Di(e)},up=(e,t)=>{const n=Object.keys(e).sort((o,r)=>{const l=r.split("/").length-o.split("/").length;return l!==0?l:r.length-o.length});for(const o of n)if(t.startsWith(o))return o;return"/"},fp=(e,t="/")=>{const n=e.replace(/^(?:https?:)?\/\/[^/]*/,"");return n.startsWith(t)?`/${n.slice(t.length)}`:n},dp=/(#|\?)/,Ka=e=>{const[t,...n]=e.split(dp);return{pathname:t,hashAndQueries:n.join("")}},pp=["link","meta","script","style","noscript","template"],hp=["title","base"],vp=([e,t,n])=>hp.includes(e)?e:pp.includes(e)?e==="meta"&&t.name?`${e}.${t.name}`:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,Object.entries(t).map(([o,r])=>typeof r=="boolean"?r?[o,""]:null:[o,r]).filter(o=>o!=null).sort(([o],[r])=>o.localeCompare(r)),n]):null,mp=e=>{const t=new Set,n=[];return e.forEach(o=>{const r=vp(o);r&&!t.has(r)&&(t.add(r),n.push(o))}),n},gp=e=>e.startsWith("/")?e:`/${e}`,Ya=e=>e.endsWith("/")||e.endsWith(".html")?e:`${e}/`,Al=e=>e.endsWith("/")?e.slice(0,-1):e,Ll=e=>e.startsWith("/")?e.slice(1):e,Vn=e=>Object.prototype.toString.call(e)==="[object Object]",_e=e=>typeof e=="string";const bp="modulepreload",yp=function(e){return"/"+e},Ni={},D=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){let i=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=i(n.map(c=>{if(c=yp(c),c in Ni)return;Ni[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const p=document.createElement("link");if(p.rel=u?"stylesheet":bp,u||(p.as="script"),p.crossOrigin="",p.href=c,a&&p.setAttribute("nonce",a),document.head.appendChild(p),u)return new Promise((h,b)=>{p.addEventListener("load",h),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}function l(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return r.then(i=>{for(const s of i||[])s.status==="rejected"&&l(s.reason);return t().catch(l)})},_p=JSON.parse("{}"),wp=Object.fromEntries([["/",{loader:()=>D(()=>import("./index.html-Bf3E0fXo.js"),__vite__mapDeps([0,1])),meta:{title:"Home",icon:"fa6-solid:house"}}],["/advanced/architecture.html",{loader:()=>D(()=>import("./architecture.html-D5Z1-dEt.js"),__vite__mapDeps([2,3,1])),meta:{title:"Architecture",icon:"fa6-solid:folder-tree"}}],["/advanced/plugin.html",{loader:()=>D(()=>import("./plugin.html-Dj15nu08.js"),__vite__mapDeps([4,1])),meta:{title:"Writing a Plugin",icon:"fa6-solid:plug"}}],["/advanced/theme.html",{loader:()=>D(()=>import("./theme.html-C_iZfVpi.js"),__vite__mapDeps([5,1])),meta:{title:"Writing a Theme",icon:"fa6-solid:palette"}}],["/guide/assets.html",{loader:()=>D(()=>import("./assets.html-CGIhIJTl.js"),__vite__mapDeps([6,7,1])),meta:{title:"Assets",icon:"fa6-solid:photo-film"}}],["/guide/bundler.html",{loader:()=>D(()=>import("./bundler.html-DHcJhx7E.js"),__vite__mapDeps([8,1])),meta:{title:"Bundler",icon:"fa6-solid:boxes-packing"}}],["/guide/configuration.html",{loader:()=>D(()=>import("./configuration.html-B_xUzcn7.js"),__vite__mapDeps([9,1])),meta:{title:"Configuration",icon:"fa6-solid:gear"}}],["/guide/deployment.html",{loader:()=>D(()=>import("./deployment.html-ySqYnmHM.js"),__vite__mapDeps([10,1])),meta:{title:"Deployment",icon:"fa6-solid:rocket"}}],["/guide/getting-started.html",{loader:()=>D(()=>import("./getting-started.html-DPjQNJnr.js"),__vite__mapDeps([11,1])),meta:{title:"Getting Started",icon:"fa6-solid:lightbulb"}}],["/guide/i18n.html",{loader:()=>D(()=>import("./i18n.html-CIS7iyFP.js"),__vite__mapDeps([12,1])),meta:{title:"I18n",icon:"fa6-solid:language"}}],["/guide/introduction.html",{loader:()=>D(()=>import("./introduction.html-U5lYTjcB.js"),__vite__mapDeps([13,1])),meta:{title:"Introduction",icon:"fa6-solid:circle-info"}}],["/guide/markdown.html",{loader:()=>D(()=>import("./markdown.html-DWZg4INF.js"),__vite__mapDeps([14,1])),meta:{title:"Markdown",icon:"fa6-brands:markdown"}}],["/guide/migration.html",{loader:()=>D(()=>import("./migration.html-14fWaE0S.js"),__vite__mapDeps([15,1])),meta:{title:"Migrating from v1",icon:"fa6-solid:code-compare"}}],["/guide/page.html",{loader:()=>D(()=>import("./page.html-fNs_eHPf.js"),__vite__mapDeps([16,1])),meta:{title:"Page",icon:"fa6-solid:file"}}],["/guide/plugin.html",{loader:()=>D(()=>import("./plugin.html-Csj1L5zY.js"),__vite__mapDeps([17,1])),meta:{title:"Plugin",icon:"fa6-solid:plug"}}],["/guide/theme.html",{loader:()=>D(()=>import("./theme.html-DCPkD_BW.js"),__vite__mapDeps([18,1])),meta:{title:"Theme",icon:"fa6-solid:palette"}}],["/guide/troubleshooting.html",{loader:()=>D(()=>import("./troubleshooting.html-1Wt8ICqR.js"),__vite__mapDeps([19,1])),meta:{title:"Troubleshooting",icon:"fa6-solid:circle-question"}}],["/reference/cli.html",{loader:()=>D(()=>import("./cli.html-BYnU5Row.js"),__vite__mapDeps([20,1])),meta:{title:"Command Line Interface",icon:"bi:terminal-fill"}}],["/reference/client-api.html",{loader:()=>D(()=>import("./client-api.html-D4ZKAx8U.js"),__vite__mapDeps([21,1])),meta:{title:"Client API",icon:"fa6-brands:chrome"}}],["/reference/components.html",{loader:()=>D(()=>import("./components.html-qQedLS-E.js"),__vite__mapDeps([22,1])),meta:{title:"Built-in Components",icon:"fa6-solid:puzzle-piece"}}],["/reference/config.html",{loader:()=>D(()=>import("./config.html-u1PoDrUn.js"),__vite__mapDeps([23,1])),meta:{title:"Config",icon:"fa6-solid:gear"}}],["/reference/frontmatter.html",{loader:()=>D(()=>import("./frontmatter.html-CA6RnZ0l.js"),__vite__mapDeps([24,1])),meta:{title:"Frontmatter",icon:"fa-solid:bars"}}],["/reference/node-api.html",{loader:()=>D(()=>import("./node-api.html-INp_KTIP.js"),__vite__mapDeps([25,1])),meta:{title:"Node API",icon:"fa6-brands:node-js"}}],["/reference/plugin-api.html",{loader:()=>D(()=>import("./plugin-api.html-CHhaDvqy.js"),__vite__mapDeps([26,1])),meta:{title:"Plugin API",icon:"fa6-solid:plug"}}],["/reference/theme-api.html",{loader:()=>D(()=>import("./theme-api.html-OLkomApC.js"),__vite__mapDeps([27,1])),meta:{title:"Theme API",icon:"fa6-solid:palette"}}],["/zh/",{loader:()=>D(()=>import("./index.html-DxEsXlbe.js"),__vite__mapDeps([28,1])),meta:{title:"首页",icon:"fa6-solid:house"}}],["/advanced/cookbook/",{loader:()=>D(()=>import("./index.html-DCikbAAD.js"),__vite__mapDeps([29,1])),meta:{title:"Introduction",icon:"fa6-solid:circle-info"}}],["/advanced/cookbook/adding-extra-pages.html",{loader:()=>D(()=>import("./adding-extra-pages.html-DZro9Kg7.js"),__vite__mapDeps([30,1])),meta:{title:"Adding Extra Pages",icon:"fa6-solid:circle-plus"}}],["/advanced/cookbook/making-a-theme-extendable.html",{loader:()=>D(()=>import("./making-a-theme-extendable.html-DfbNOmbi.js"),__vite__mapDeps([31,1])),meta:{title:"Making a Theme Extendable",icon:"fa6-solid:clone"}}],["/advanced/cookbook/markdown-and-vue-sfc.html",{loader:()=>D(()=>import("./markdown-and-vue-sfc.html-CAGydog6.js"),[]),meta:{title:"Markdown and Vue SFC",icon:"fa6-brands:vuejs"}}],["/advanced/cookbook/passing-data-to-client-code.html",{loader:()=>D(()=>import("./passing-data-to-client-code.html-fUExCXda.js"),__vite__mapDeps([32,1])),meta:{title:"Passing Data to Client Code",icon:"fa6-solid:right-to-bracket"}}],["/advanced/cookbook/resolving-routes.html",{loader:()=>D(()=>import("./resolving-routes.html-C343Q6Pa.js"),__vite__mapDeps([33,1])),meta:{title:"Resolving Routes",icon:"fa6-solid:network-wired"}}],["/advanced/cookbook/usage-of-client-config.html",{loader:()=>D(()=>import("./usage-of-client-config.html-Dzka2dtf.js"),__vite__mapDeps([34,1])),meta:{title:"Usage of Client Config",icon:"fa6-solid:gear"}}],["/reference/bundler/vite.html",{loader:()=>D(()=>import("./vite.html-AFYyhaM0.js"),__vite__mapDeps([35,1])),meta:{title:"Vite",icon:"simple-icons:vite"}}],["/reference/bundler/webpack.html",{loader:()=>D(()=>import("./webpack.html-BRfEDV9B.js"),__vite__mapDeps([36,1])),meta:{title:"Webpack",icon:"mdi:webpack"}}],["/zh/advanced/architecture.html",{loader:()=>D(()=>import("./architecture.html-Bv0X7fAx.js"),__vite__mapDeps([37,3,1])),meta:{title:"架构",icon:"fa6-solid:folder-tree"}}],["/zh/advanced/plugin.html",{loader:()=>D(()=>import("./plugin.html-BaYtlknC.js"),__vite__mapDeps([38,1])),meta:{title:"开发插件",icon:"fa6-solid:plug"}}],["/zh/advanced/theme.html",{loader:()=>D(()=>import("./theme.html-z7ljUVsA.js"),__vite__mapDeps([39,1])),meta:{title:"开发主题",icon:"fa6-solid:palette"}}],["/zh/guide/assets.html",{loader:()=>D(()=>import("./assets.html-BidmvL9-.js"),__vite__mapDeps([40,7,1])),meta:{title:"静态资源",icon:"fa6-solid:photo-film"}}],["/zh/guide/bundler.html",{loader:()=>D(()=>import("./bundler.html-Cndzc5Ka.js"),__vite__mapDeps([41,1])),meta:{title:"打包工具",icon:"fa6-solid:boxes-packing"}}],["/zh/guide/configuration.html",{loader:()=>D(()=>import("./configuration.html-C67FYR2G.js"),__vite__mapDeps([42,1])),meta:{title:"配置",icon:"fa6-solid:gear"}}],["/zh/guide/deployment.html",{loader:()=>D(()=>import("./deployment.html-Ch-IpzwJ.js"),__vite__mapDeps([43,1])),meta:{title:"部署",icon:"fa6-solid:rocket"}}],["/zh/guide/getting-started.html",{loader:()=>D(()=>import("./getting-started.html-B-E2ElMp.js"),__vite__mapDeps([44,1])),meta:{title:"快速上手",icon:"fa6-solid:lightbulb"}}],["/zh/guide/i18n.html",{loader:()=>D(()=>import("./i18n.html-Cz1yWZyl.js"),__vite__mapDeps([45,1])),meta:{title:"多语言支持",icon:"fa6-solid:language"}}],["/zh/guide/introduction.html",{loader:()=>D(()=>import("./introduction.html-CanvhM2y.js"),__vite__mapDeps([46,1])),meta:{title:"介绍",icon:"fa6-solid:circle-info"}}],["/zh/guide/markdown.html",{loader:()=>D(()=>import("./markdown.html-CacxaVUw.js"),__vite__mapDeps([47,1])),meta:{title:"Markdown",icon:"fa6-brands:markdown"}}],["/zh/guide/migration.html",{loader:()=>D(()=>import("./migration.html-MK3ssT6m.js"),__vite__mapDeps([48,1])),meta:{title:"从 v1 迁移",icon:"fa6-solid:code-compare"}}],["/zh/guide/page.html",{loader:()=>D(()=>import("./page.html-DPX6yhh3.js"),__vite__mapDeps([49,1])),meta:{title:"页面",icon:"fa6-solid:file"}}],["/zh/guide/plugin.html",{loader:()=>D(()=>import("./plugin.html-BlBN08hl.js"),__vite__mapDeps([50,1])),meta:{title:"插件",icon:"fa6-solid:plug"}}],["/zh/guide/theme.html",{loader:()=>D(()=>import("./theme.html-DZxGqwzI.js"),__vite__mapDeps([51,1])),meta:{title:"主题",icon:"fa6-solid:palette"}}],["/zh/guide/troubleshooting.html",{loader:()=>D(()=>import("./troubleshooting.html-ByRJG4kQ.js"),__vite__mapDeps([52,1])),meta:{title:"常见问题",icon:"fa6-solid:circle-question"}}],["/zh/reference/cli.html",{loader:()=>D(()=>import("./cli.html-xEorj72l.js"),__vite__mapDeps([53,1])),meta:{title:"命令行接口",icon:"bi:terminal-fill"}}],["/zh/reference/client-api.html",{loader:()=>D(()=>import("./client-api.html-CV5G7JTh.js"),__vite__mapDeps([54,1])),meta:{title:"客户端 API",icon:"fa6-brands:chrome"}}],["/zh/reference/components.html",{loader:()=>D(()=>import("./components.html-DRn-dJE5.js"),__vite__mapDeps([55,1])),meta:{title:"内置组件",icon:"fa6-solid:puzzle-piece"}}],["/zh/reference/config.html",{loader:()=>D(()=>import("./config.html-5XTANjpy.js"),__vite__mapDeps([56,1])),meta:{title:"配置",icon:"fa6-solid:gear"}}],["/zh/reference/frontmatter.html",{loader:()=>D(()=>import("./frontmatter.html-BvpLSt9a.js"),__vite__mapDeps([57,1])),meta:{title:"Frontmatter",icon:"fa-solid:bars"}}],["/zh/reference/node-api.html",{loader:()=>D(()=>import("./node-api.html-CzJnAdTm.js"),__vite__mapDeps([58,1])),meta:{title:"Node API",icon:"fa6-brands:node-js"}}],["/zh/reference/plugin-api.html",{loader:()=>D(()=>import("./plugin-api.html-SCqAp-4S.js"),__vite__mapDeps([59,1])),meta:{title:"插件 API",icon:"fa6-solid:plug"}}],["/zh/reference/theme-api.html",{loader:()=>D(()=>import("./theme-api.html-BSHHjMuo.js"),__vite__mapDeps([60,1])),meta:{title:"主题 API",icon:"fa6-solid:palette"}}],["/zh/advanced/cookbook/",{loader:()=>D(()=>import("./index.html-Bsw-jOL4.js"),__vite__mapDeps([61,1])),meta:{title:"介绍",icon:"fa6-solid:circle-info"}}],["/zh/advanced/cookbook/adding-extra-pages.html",{loader:()=>D(()=>import("./adding-extra-pages.html-CeDS6Gl0.js"),__vite__mapDeps([62,1])),meta:{title:"添加额外页面",icon:"fa6-solid:circle-plus"}}],["/zh/advanced/cookbook/making-a-theme-extendable.html",{loader:()=>D(()=>import("./making-a-theme-extendable.html-CGR9U-du.js"),__vite__mapDeps([63,1])),meta:{title:"开发一个可继承的主题",icon:"fa6-solid:clone"}}],["/zh/advanced/cookbook/markdown-and-vue-sfc.html",{loader:()=>D(()=>import("./markdown-and-vue-sfc.html-D_ffHoks.js"),[]),meta:{title:"Markdown 与 Vue SFC",icon:"fa6-brands:vuejs"}}],["/zh/advanced/cookbook/passing-data-to-client-code.html",{loader:()=>D(()=>import("./passing-data-to-client-code.html-Jxd1u8oV.js"),__vite__mapDeps([64,1])),meta:{title:"向客户端代码传递数据",icon:"fa6-solid:right-to-bracket"}}],["/zh/advanced/cookbook/resolving-routes.html",{loader:()=>D(()=>import("./resolving-routes.html-CgGYFxxb.js"),__vite__mapDeps([65,1])),meta:{title:"解析路由",icon:"fa6-solid:network-wired"}}],["/zh/advanced/cookbook/usage-of-client-config.html",{loader:()=>D(()=>import("./usage-of-client-config.html-1s0Oo71q.js"),__vite__mapDeps([66,1])),meta:{title:"客户端配置的使用方法",icon:"fa6-solid:gear"}}],["/zh/reference/bundler/vite.html",{loader:()=>D(()=>import("./vite.html-CK4WbdqE.js"),__vite__mapDeps([67,1])),meta:{title:"Vite",icon:"simple-icons:vite"}}],["/zh/reference/bundler/webpack.html",{loader:()=>D(()=>import("./webpack.html-VDS0ftCt.js"),__vite__mapDeps([68,1])),meta:{title:"Webpack",icon:"mdi:webpack"}}],["/404.html",{loader:()=>D(()=>import("./404.html-BxYlFJ7d.js"),__vite__mapDeps([69,1])),meta:{title:""}}],["/advanced/",{loader:()=>D(()=>import("./index.html-Do19UIZ3.js"),__vite__mapDeps([70,1])),meta:{title:"Advanced"}}],["/guide/",{loader:()=>D(()=>import("./index.html-_e7kFd1H.js"),__vite__mapDeps([71,1])),meta:{title:"Guide"}}],["/reference/",{loader:()=>D(()=>import("./index.html-5tZDq72T.js"),__vite__mapDeps([72,1])),meta:{title:"Reference"}}],["/reference/bundler/",{loader:()=>D(()=>import("./index.html-Dhfuxt_n.js"),__vite__mapDeps([73,1])),meta:{title:"Bundler"}}],["/zh/advanced/",{loader:()=>D(()=>import("./index.html-Dcah2Vrx.js"),__vite__mapDeps([74,1])),meta:{title:"Advanced"}}],["/zh/guide/",{loader:()=>D(()=>import("./index.html-BW43vxYC.js"),__vite__mapDeps([75,1])),meta:{title:"Guide"}}],["/zh/reference/",{loader:()=>D(()=>import("./index.html-C4bSVrZS.js"),__vite__mapDeps([76,1])),meta:{title:"Reference"}}],["/zh/reference/bundler/",{loader:()=>D(()=>import("./index.html-itz1aZ3n.js"),__vite__mapDeps([77,1])),meta:{title:"Bundler"}}]]);/*! + * vue-router v4.5.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */const Sn=typeof document<"u";function Ja(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Ep(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ja(e.default)}const ue=Object.assign;function Ar(e,t){const n={};for(const o in t){const r=t[o];n[o]=pt(r)?r.map(e):e(r)}return n}const Zn=()=>{},pt=Array.isArray,Qa=/#/g,Sp=/&/g,Tp=/\//g,kp=/=/g,xp=/\?/g,Xa=/\+/g,Cp=/%5B/g,Pp=/%5D/g,Za=/%5E/g,Ap=/%60/g,ec=/%7B/g,Lp=/%7C/g,tc=/%7D/g,Rp=/%20/g;function Rl(e){return encodeURI(""+e).replace(Lp,"|").replace(Cp,"[").replace(Pp,"]")}function Op(e){return Rl(e).replace(ec,"{").replace(tc,"}").replace(Za,"^")}function Kr(e){return Rl(e).replace(Xa,"%2B").replace(Rp,"+").replace(Qa,"%23").replace(Sp,"%26").replace(Ap,"`").replace(ec,"{").replace(tc,"}").replace(Za,"^")}function Ip(e){return Kr(e).replace(kp,"%3D")}function Mp(e){return Rl(e).replace(Qa,"%23").replace(xp,"%3F")}function $p(e){return e==null?"":Mp(e).replace(Tp,"%2F")}function ao(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const Dp=/\/$/,Np=e=>e.replace(Dp,"");function Lr(e,t,n="/"){let o,r={},l="",i="";const s=t.indexOf("#");let a=t.indexOf("?");return s=0&&(a=-1),a>-1&&(o=t.slice(0,a),l=t.slice(a+1,s>-1?s:t.length),r=e(l)),s>-1&&(o=o||t.slice(0,s),i=t.slice(s,t.length)),o=zp(o??t,n),{fullPath:o+(l&&"?")+l+i,path:o,query:r,hash:ao(i)}}function Hp(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Hi(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Vp(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Dn(t.matched[o],n.matched[r])&&nc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Dn(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function nc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!jp(e[n],t[n]))return!1;return!0}function jp(e,t){return pt(e)?Vi(e,t):pt(t)?Vi(t,e):e===t}function Vi(e,t){return pt(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function zp(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 l=n.length-1,i,s;for(i=0;i1&&l--;else break;return n.slice(0,l).join("/")+"/"+o.slice(i).join("/")}const xt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var co;(function(e){e.pop="pop",e.push="push"})(co||(co={}));var eo;(function(e){e.back="back",e.forward="forward",e.unknown=""})(eo||(eo={}));function Fp(e){if(!e)if(Sn){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Np(e)}const Bp=/^[^#]+#/;function Wp(e,t){return e.replace(Bp,"#")+t}function Up(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 sr=()=>({left:window.scrollX,top:window.scrollY});function qp(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=Up(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 ji(e,t){return(history.state?history.state.position-t:-1)+e}const Yr=new Map;function Gp(e,t){Yr.set(e,t)}function Kp(e){const t=Yr.get(e);return Yr.delete(e),t}let Yp=()=>location.protocol+"//"+location.host;function oc(e,t){const{pathname:n,search:o,hash:r}=t,l=e.indexOf("#");if(l>-1){let s=r.includes(e.slice(l))?e.slice(l).length:1,a=r.slice(s);return a[0]!=="/"&&(a="/"+a),Hi(a,"")}return Hi(n,e)+o+r}function Jp(e,t,n,o){let r=[],l=[],i=null;const s=({state:p})=>{const h=oc(e,location),b=n.value,y=t.value;let w=0;if(p){if(n.value=h,t.value=p,i&&i===b){i=null;return}w=y?p.position-y.position:0}else o(h);r.forEach(S=>{S(n.value,b,{delta:w,type:co.pop,direction:w?w>0?eo.forward:eo.back:eo.unknown})})};function a(){i=n.value}function c(p){r.push(p);const h=()=>{const b=r.indexOf(p);b>-1&&r.splice(b,1)};return l.push(h),h}function u(){const{history:p}=window;p.state&&p.replaceState(ue({},p.state,{scroll:sr()}),"")}function d(){for(const p of l)p();l=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:a,listen:c,destroy:d}}function zi(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?sr():null}}function Qp(e){const{history:t,location:n}=window,o={value:oc(e,n)},r={value:t.state};r.value||l(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function l(a,c,u){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+a:Yp()+e+a;try{t[u?"replaceState":"pushState"](c,"",p),r.value=c}catch(h){console.error(h),n[u?"replace":"assign"](p)}}function i(a,c){const u=ue({},t.state,zi(r.value.back,a,r.value.forward,!0),c,{position:r.value.position});l(a,u,!0),o.value=a}function s(a,c){const u=ue({},r.value,t.state,{forward:a,scroll:sr()});l(u.current,u,!0);const d=ue({},zi(o.value,a,null),{position:u.position+1},c);l(a,d,!1),o.value=a}return{location:o,state:r,push:s,replace:i}}function Xp(e){e=Fp(e);const t=Qp(e),n=Jp(e,t.state,t.location,t.replace);function o(l,i=!0){i||n.pauseListeners(),history.go(l)}const r=ue({location:"",base:e,go:o,createHref:Wp.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function Zp(e){return typeof e=="string"||e&&typeof e=="object"}function rc(e){return typeof e=="string"||typeof e=="symbol"}const lc=Symbol("");var Fi;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Fi||(Fi={}));function Nn(e,t){return ue(new Error,{type:e,[lc]:!0},t)}function Tt(e,t){return e instanceof Error&&lc in e&&(t==null||!!(e.type&t))}const Bi="[^/]+?",eh={sensitive:!1,strict:!1,start:!0,end:!0},th=/[.+*?^${}()[\]/\\]/g;function nh(e,t){const n=ue({},eh,t),o=[];let r=n.start?"^":"";const l=[];for(const c of e){const u=c.length?[]:[90];n.strict&&!c.length&&(r+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function ic(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const rh={type:0,value:""},lh=/[a-zA-Z0-9_]/;function ih(e){if(!e)return[[]];if(e==="/")return[[rh]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,o=n;const r=[];let l;function i(){l&&r.push(l),l=[]}let s=0,a,c="",u="";function d(){c&&(n===0?l.push({type:0,value:c}):n===1||n===2||n===3?(l.length>1&&(a==="*"||a==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),l.push({type:1,value:c,regexp:u,repeatable:a==="*"||a==="+",optional:a==="*"||a==="?"})):t("Invalid state to consume buffer"),c="")}function p(){c+=a}for(;s{i(g)}:Zn}function i(d){if(rc(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function s(){return n}function a(d){const p=fh(d,n);n.splice(p,0,d),d.record.name&&!Gi(d)&&o.set(d.record.name,d)}function c(d,p){let h,b={},y,w;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw Nn(1,{location:d});w=h.record.name,b=ue(Ui(p.params,h.keys.filter(g=>!g.optional).concat(h.parent?h.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),d.params&&Ui(d.params,h.keys.map(g=>g.name))),y=h.stringify(b)}else if(d.path!=null)y=d.path,h=n.find(g=>g.re.test(y)),h&&(b=h.parse(y),w=h.record.name);else{if(h=p.name?o.get(p.name):n.find(g=>g.re.test(p.path)),!h)throw Nn(1,{location:d,currentLocation:p});w=h.record.name,b=ue({},p.params,d.params),y=h.stringify(b)}const S=[];let _=h;for(;_;)S.unshift(_.record),_=_.parent;return{name:w,path:y,params:b,matched:S,meta:uh(S)}}e.forEach(d=>l(d));function u(){n.length=0,o.clear()}return{addRoute:l,resolve:c,removeRoute:i,clearRoutes:u,getRoutes:s,getRecordMatcher:r}}function Ui(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function qi(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ch(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 ch(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function Gi(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uh(e){return e.reduce((t,n)=>ue(t,n.meta),{})}function Ki(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function fh(e,t){let n=0,o=t.length;for(;n!==o;){const l=n+o>>1;ic(e,t[l])<0?o=l:n=l+1}const r=dh(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function dh(e){let t=e;for(;t=t.parent;)if(sc(t)&&ic(e,t)===0)return t}function sc({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ph(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;rl&&Kr(l)):[o&&Kr(o)]).forEach(l=>{l!==void 0&&(t+=(t.length?"&":"")+n,l!=null&&(t+="="+l))})}return t}function hh(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=pt(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const vh=Symbol(""),Ji=Symbol(""),ar=Symbol(""),Ol=Symbol(""),Jr=Symbol("");function Un(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Bt(e,t,n,o,r,l=i=>i()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((s,a)=>{const c=p=>{p===!1?a(Nn(4,{from:n,to:t})):p instanceof Error?a(p):Zp(p)?a(Nn(2,{from:t,to:p})):(i&&o.enterCallbacks[r]===i&&typeof p=="function"&&i.push(p),s())},u=l(()=>e.call(o&&o.instances[r],t,n,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(p=>a(p))})}function Rr(e,t,n,o,r=l=>l()){const l=[];for(const i of e)for(const s in i.components){let a=i.components[s];if(!(t!=="beforeRouteEnter"&&!i.instances[s]))if(Ja(a)){const u=(a.__vccOpts||a)[t];u&&l.push(Bt(u,n,o,i,s,r))}else{let c=a();l.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${s}" at "${i.path}"`);const d=Ep(u)?u.default:u;i.mods[s]=u,i.components[s]=d;const h=(d.__vccOpts||d)[t];return h&&Bt(h,n,o,i,s,r)()}))}}return l}function Qi(e){const t=Ie(ar),n=Ie(Ol),o=k(()=>{const a=qt(e.to);return t.resolve(a)}),r=k(()=>{const{matched:a}=o.value,{length:c}=a,u=a[c-1],d=n.matched;if(!u||!d.length)return-1;const p=d.findIndex(Dn.bind(null,u));if(p>-1)return p;const h=Xi(a[c-2]);return c>1&&Xi(u)===h&&d[d.length-1].path!==h?d.findIndex(Dn.bind(null,a[c-2])):p}),l=k(()=>r.value>-1&&_h(n.params,o.value.params)),i=k(()=>r.value>-1&&r.value===n.matched.length-1&&nc(n.params,o.value.params));function s(a={}){if(yh(a)){const c=t[qt(e.replace)?"replace":"push"](qt(e.to)).catch(Zn);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:o,href:k(()=>o.value.href),isActive:l,isExactActive:i,navigate:s}}function mh(e){return e.length===1?e[0]:e}const gh=K({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:Qi,setup(e,{slots:t}){const n=cn(Qi(e)),{options:o}=Ie(ar),r=k(()=>({[Zi(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Zi(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const l=t.default&&mh(t.default(n));return e.custom?l:f("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},l)}}}),bh=gh;function yh(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){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function _h(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!pt(r)||r.length!==o.length||o.some((l,i)=>l!==r[i]))return!1}return!0}function Xi(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Zi=(e,t,n)=>e??t??n,wh=K({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=Ie(Jr),r=k(()=>e.route||o.value),l=Ie(Ji,0),i=k(()=>{let c=qt(l);const{matched:u}=r.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),s=k(()=>r.value.matched[i.value]);Rn(Ji,k(()=>i.value+1)),Rn(vh,s),Rn(Jr,r);const a=ae();return xe(()=>[a.value,s.value,e.name],([c,u,d],[p,h,b])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===p&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Dn(u,h)||!p)&&(u.enterCallbacks[d]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=r.value,u=e.name,d=s.value,p=d&&d.components[u];if(!p)return es(n.default,{Component:p,route:c});const h=d.props[u],b=h?h===!0?c.params:typeof h=="function"?h(c):h:null,w=f(p,ue({},b,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(d.instances[u]=null)},ref:a}));return es(n.default,{Component:w,route:c})||w}}});function es(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Eh=wh;function Sh(e){const t=ah(e.routes,e),n=e.parseQuery||ph,o=e.stringifyQuery||Yi,r=e.history,l=Un(),i=Un(),s=Un(),a=re(xt);let c=xt;Sn&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ar.bind(null,P=>""+P),d=Ar.bind(null,$p),p=Ar.bind(null,ao);function h(P,q){let F,J;return rc(P)?(F=t.getRecordMatcher(P),J=q):J=P,t.addRoute(J,F)}function b(P){const q=t.getRecordMatcher(P);q&&t.removeRoute(q)}function y(){return t.getRoutes().map(P=>P.record)}function w(P){return!!t.getRecordMatcher(P)}function S(P,q){if(q=ue({},q||a.value),typeof P=="string"){const m=Lr(n,P,q.path),T=t.resolve({path:m.path},q),R=r.createHref(m.fullPath);return ue(m,T,{params:p(T.params),hash:ao(m.hash),redirectedFrom:void 0,href:R})}let F;if(P.path!=null)F=ue({},P,{path:Lr(n,P.path,q.path).path});else{const m=ue({},P.params);for(const T in m)m[T]==null&&delete m[T];F=ue({},P,{params:d(m)}),q.params=d(q.params)}const J=t.resolve(F,q),ce=P.hash||"";J.params=u(p(J.params));const we=Hp(o,ue({},P,{hash:Op(ce),path:J.path})),v=r.createHref(we);return ue({fullPath:we,hash:ce,query:o===Yi?hh(P.query):P.query||{}},J,{redirectedFrom:void 0,href:v})}function _(P){return typeof P=="string"?Lr(n,P,a.value.path):ue({},P)}function g(P,q){if(c!==P)return Nn(8,{from:q,to:P})}function E(P){return x(P)}function M(P){return E(ue(_(P),{replace:!0}))}function U(P){const q=P.matched[P.matched.length-1];if(q&&q.redirect){const{redirect:F}=q;let J=typeof F=="function"?F(P):F;return typeof J=="string"&&(J=J.includes("?")||J.includes("#")?J=_(J):{path:J},J.params={}),ue({query:P.query,hash:P.hash,params:J.path!=null?{}:P.params},J)}}function x(P,q){const F=c=S(P),J=a.value,ce=P.state,we=P.force,v=P.replace===!0,m=U(F);if(m)return x(ue(_(m),{state:typeof m=="object"?ue({},ce,m.state):ce,force:we,replace:v}),q||F);const T=F;T.redirectedFrom=q;let R;return!we&&Vp(o,J,F)&&(R=Nn(16,{to:T,from:J}),vt(J,J,!0,!1)),(R?Promise.resolve(R):H(T,J)).catch(C=>Tt(C)?Tt(C,2)?C:Nt(C):G(C,T,J)).then(C=>{if(C){if(Tt(C,2))return x(ue({replace:v},_(C.to),{state:typeof C.to=="object"?ue({},ce,C.to.state):ce,force:we}),q||T)}else C=A(T,J,!0,v,ce);return N(T,J,C),C})}function B(P,q){const F=g(P,q);return F?Promise.reject(F):Promise.resolve()}function L(P){const q=yn.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(P):P()}function H(P,q){let F;const[J,ce,we]=Th(P,q);F=Rr(J.reverse(),"beforeRouteLeave",P,q);for(const m of J)m.leaveGuards.forEach(T=>{F.push(Bt(T,P,q))});const v=B.bind(null,P,q);return F.push(v),nt(F).then(()=>{F=[];for(const m of l.list())F.push(Bt(m,P,q));return F.push(v),nt(F)}).then(()=>{F=Rr(ce,"beforeRouteUpdate",P,q);for(const m of ce)m.updateGuards.forEach(T=>{F.push(Bt(T,P,q))});return F.push(v),nt(F)}).then(()=>{F=[];for(const m of we)if(m.beforeEnter)if(pt(m.beforeEnter))for(const T of m.beforeEnter)F.push(Bt(T,P,q));else F.push(Bt(m.beforeEnter,P,q));return F.push(v),nt(F)}).then(()=>(P.matched.forEach(m=>m.enterCallbacks={}),F=Rr(we,"beforeRouteEnter",P,q,L),F.push(v),nt(F))).then(()=>{F=[];for(const m of i.list())F.push(Bt(m,P,q));return F.push(v),nt(F)}).catch(m=>Tt(m,8)?m:Promise.reject(m))}function N(P,q,F){s.list().forEach(J=>L(()=>J(P,q,F)))}function A(P,q,F,J,ce){const we=g(P,q);if(we)return we;const v=q===xt,m=Sn?history.state:{};F&&(J||v?r.replace(P.fullPath,ue({scroll:v&&m&&m.scroll},ce)):r.push(P.fullPath,ce)),a.value=P,vt(P,q,F,v),Nt()}let z;function oe(){z||(z=r.listen((P,q,F)=>{if(!ko.listening)return;const J=S(P),ce=U(J);if(ce){x(ue(ce,{replace:!0,force:!0}),J).catch(Zn);return}c=J;const we=a.value;Sn&&Gp(ji(we.fullPath,F.delta),sr()),H(J,we).catch(v=>Tt(v,12)?v:Tt(v,2)?(x(ue(_(v.to),{force:!0}),J).then(m=>{Tt(m,20)&&!F.delta&&F.type===co.pop&&r.go(-1,!1)}).catch(Zn),Promise.reject()):(F.delta&&r.go(-F.delta,!1),G(v,J,we))).then(v=>{v=v||A(J,we,!1),v&&(F.delta&&!Tt(v,8)?r.go(-F.delta,!1):F.type===co.pop&&Tt(v,20)&&r.go(-1,!1)),N(J,we,v)}).catch(Zn)}))}let he=Un(),Y=Un(),Z;function G(P,q,F){Nt(P);const J=Y.list();return J.length?J.forEach(ce=>ce(P,q,F)):console.error(P),Promise.reject(P)}function Te(){return Z&&a.value!==xt?Promise.resolve():new Promise((P,q)=>{he.add([P,q])})}function Nt(P){return Z||(Z=!P,oe(),he.list().forEach(([q,F])=>P?F(P):q()),he.reset()),P}function vt(P,q,F,J){const{scrollBehavior:ce}=e;if(!Sn||!ce)return Promise.resolve();const we=!F&&Kp(ji(P.fullPath,0))||(J||!F)&&history.state&&history.state.scroll||null;return hn().then(()=>ce(P,q,we)).then(v=>v&&qp(v)).catch(v=>G(v,P,q))}const Be=P=>r.go(P);let bn;const yn=new Set,ko={currentRoute:a,listening:!0,addRoute:h,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:w,getRoutes:y,resolve:S,options:e,push:E,replace:M,go:Be,back:()=>Be(-1),forward:()=>Be(1),beforeEach:l.add,beforeResolve:i.add,afterEach:s.add,onError:Y.add,isReady:Te,install(P){const q=this;P.component("RouterLink",bh),P.component("RouterView",Eh),P.config.globalProperties.$router=q,Object.defineProperty(P.config.globalProperties,"$route",{enumerable:!0,get:()=>qt(a)}),Sn&&!bn&&a.value===xt&&(bn=!0,E(r.location).catch(ce=>{}));const F={};for(const ce in xt)Object.defineProperty(F,ce,{get:()=>a.value[ce],enumerable:!0});P.provide(ar,q),P.provide(Ol,Qs(F)),P.provide(Jr,a);const J=P.unmount;yn.add(P),P.unmount=function(){yn.delete(P),yn.size<1&&(c=xt,z&&z(),z=null,a.value=xt,bn=!1,Z=!1),J()}}};function nt(P){return P.reduce((q,F)=>q.then(()=>L(F)),Promise.resolve())}return ko}function Th(e,t){const n=[],o=[],r=[],l=Math.max(t.matched.length,e.matched.length);for(let i=0;iDn(c,s))?o.push(s):n.push(s));const a=e.matched[i];a&&(t.matched.find(c=>Dn(c,a))||r.push(a))}return[n,o,r]}function mn(){return Ie(ar)}function Ot(e){return Ie(Ol)}var Il=Symbol(""),ht=()=>{const e=Ie(Il);if(!e)throw new Error("useClientData() is called without provider.");return e},kh=()=>ht().pageComponent,It=()=>ht().pageData,Se=()=>ht().pageFrontmatter,xh=()=>ht().pageHead,cr=()=>ht().pageLang,Ch=()=>ht().pageLayout,Et=()=>ht().routeLocale,wo=()=>ht().routePath,ac=()=>ht().routes,Ml=()=>ht().siteData,$l=()=>ht().siteLocaleData,Qr=new Set,Mt=e=>{Qr.add(e),vn(()=>{Qr.delete(e)})},Ph=Symbol(""),Xr=re(_p),On=re(wp),cc=(e,t)=>{const n=cp(e,t);if(On.value[n])return n;const o=encodeURI(n);if(On.value[o])return o;const r=Xr.value[n]||Xr.value[o];return r||n},At=(e,t)=>{const{pathname:n,hashAndQueries:o}=Ka(e),r=cc(n,t),l=r+o;return On.value[r]?{...On.value[r],path:l,notFound:!1}:{...On.value["/404.html"],path:l,notFound:!0}},Ah=(e,t)=>{const{pathname:n,hashAndQueries:o}=Ka(e);return cc(n,t)+o},Lh=e=>{if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget){const t=e.currentTarget.getAttribute("target");if(t!=null&&t.match(/\b_blank\b/i))return}return e.preventDefault(),!0}},ut=K({name:"RouteLink",props:{to:{type:String,required:!0},active:Boolean,activeClass:{type:String,default:"route-link-active"}},slots:Object,setup(e,{slots:t}){const n=mn(),o=Ot(),r=k(()=>e.to.startsWith("#")||e.to.startsWith("?")?e.to:`/${Ah(e.to,o.path).substring(1)}`);return()=>f("a",{class:["route-link",{[e.activeClass]:e.active}],href:r.value,onClick:(l={})=>{Lh(l)&&n.push(e.to).catch()}},t.default())}}),Rh=K({name:"AutoLink",props:{config:{type:Object,required:!0}},slots:Object,setup(e,{slots:t}){const n=ho(e,"config"),o=Ot(),r=Ml(),l=k(()=>yo(n.value.link)),i=k(()=>n.value.target||(l.value?"_blank":void 0)),s=k(()=>i.value==="_blank"),a=k(()=>!l.value&&!s.value),c=k(()=>n.value.rel||(s.value?"noopener noreferrer":null)),u=k(()=>n.value.ariaLabel??n.value.text),d=k(()=>{if(n.value.exact)return!1;const h=Object.keys(r.value.locales);return h.length?h.every(b=>b!==n.value.link):n.value.link!=="/"}),p=k(()=>a.value?n.value.activeMatch?(n.value.activeMatch instanceof RegExp?n.value.activeMatch:new RegExp(n.value.activeMatch,"u")).test(o.path):d.value?o.path.startsWith(n.value.link):o.path===n.value.link:!1);return()=>{const{before:h,after:b,default:y}=t,w=(y==null?void 0:y(n.value))??[h==null?void 0:h(n.value),n.value.text,b==null?void 0:b(n.value)];return a.value?f(ut,{class:"auto-link",to:n.value.link,active:p.value,"aria-label":u.value},()=>w):f("a",{class:"auto-link external-link",href:n.value.link,"aria-label":u.value,rel:c.value,target:i.value},w)}}}),Dl=K({name:"ClientOnly",setup(e,t){const n=ae(!1);return Pe(()=>{n.value=!0}),()=>{var o,r;return n.value?(r=(o=t.slots).default)==null?void 0:r.call(o):null}}}),Oo=e=>{Qr.forEach(t=>t(e))},uc=K({name:"Content",props:{path:{type:String,required:!1,default:""}},setup(e){const t=kh(),n=k(()=>{if(!e.path)return t.value;const r=At(e.path);return fa(async()=>r.loader().then(({comp:l})=>l))}),o=Se();return xe(o,()=>{Oo("updated")},{deep:!0,flush:"post"}),()=>f(n.value,{onVnodeMounted:()=>{Oo("mounted")},onVnodeUpdated:()=>{Oo("updated")},onVnodeBeforeUnmount:()=>{Oo("beforeUnmount")}})}}),Oh="Layout",Ih="en-US",en=cn({resolveLayouts:e=>e.reduce((t,n)=>({...t,...n.layouts}),{}),resolvePageHead:(e,t,n)=>{const o=_e(t.description)?t.description:n.description,r=[...Array.isArray(t.head)?t.head:[],...n.head,["title",{},e],["meta",{name:"description",content:o}]];return mp(r)},resolvePageHeadTitle:(e,t)=>[e.title,t.title].filter(n=>!!n).join(" | "),resolvePageLang:(e,t)=>e.lang||t.lang||Ih,resolvePageLayout:(e,t)=>{const n=_e(e.frontmatter.layout)?e.frontmatter.layout:Oh;if(!t[n])throw new Error(`[vuepress] Cannot resolve layout: ${n}`);return t[n]},resolveRouteLocale:(e,t)=>up(e,decodeURI(t)),resolveSiteLocaleData:({base:e,locales:t,...n},o)=>{var r;return{...n,...t[o],head:[...((r=t[o])==null?void 0:r.head)??[],...n.head]}}}),$t=(e={})=>e,$e=e=>_o(e)?e:`/${Ll(e)}`,Mh=Object.defineProperty,$h=(e,t)=>{for(var n in t)Mh(e,n,{get:t[n],enumerable:!0})},Dh={};$h(Dh,{COMPONENT_STATE_TYPE:()=>Nh,INSPECTOR_ID:()=>Hh,INSPECTOR_LABEL:()=>Vh,INSPECTOR_NODES:()=>jh,INSPECTOR_STATE_SECTION_NAME:()=>zh,PLUGIN_ID:()=>fc,PLUGIN_LABEL:()=>Nl});var fc="org.vuejs.vuepress",Nl="VuePress",Nh=Nl,Hh=fc,Vh=Nl,ts={id:"INTERNAL",label:"Internal",keys:["layouts","routes","redirects"]},ns={id:"SITE",label:"Site",keys:["siteData","siteLocaleData"]},os={id:"ROUTE",label:"Route",keys:["routePath","routeLocale"]},rs={id:"PAGE",label:"Page",keys:["pageData","pageFrontmatter","pageLang","pageHead","pageHeadTitle","pageLayout","pageComponent"]},jh={[ts.id]:ts,[ns.id]:ns,[os.id]:os,[rs.id]:rs},zh="State";const Hl=(e,{slots:t})=>t.default();function gn(e){return Ms()?(Vu(e),!0):!1}const Or=new WeakMap,Fh=(...e)=>{var t;const n=e[0],o=(t=Hn())==null?void 0:t.proxy;if(o==null&&!ga())throw new Error("injectLocal must be called in setup");return o&&Or.has(o)&&n in Or.get(o)?Or.get(o)[n]:Ie(...e)},Eo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Bh=e=>e!=null,Wh=Object.prototype.toString,Uh=e=>Wh.call(e)==="[object Object]",Lt=()=>{},ls=qh();function qh(){var e,t;return Eo&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function dc(...e){if(e.length!==1)return ho(...e);const t=e[0];return typeof t=="function"?po(ea(()=>({get:t,set:Lt}))):ae(t)}function Vl(e,t){function n(...o){return new Promise((r,l)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(l)})}return n}const pc=e=>e();function Gh(e,t={}){let n,o,r=Lt;const l=a=>{clearTimeout(a),r(),r=Lt};let i;return a=>{const c=se(e),u=se(t.maxWait);return n&&l(n),c<=0||u!==void 0&&u<=0?(o&&(l(o),o=null),Promise.resolve(a())):new Promise((d,p)=>{r=t.rejectOnCancel?p:d,i=a,u&&!o&&(o=setTimeout(()=>{n&&l(n),o=null,d(i())},u)),n=setTimeout(()=>{o&&l(o),o=null,d(a())},c)})}}function Kh(...e){let t=0,n,o=!0,r=Lt,l,i,s,a,c;!Le(e[0])&&typeof e[0]=="object"?{delay:i,trailing:s=!0,leading:a=!0,rejectOnCancel:c=!1}=e[0]:[i,s=!0,a=!0,c=!1]=e;const u=()=>{n&&(clearTimeout(n),n=void 0,r(),r=Lt)};return p=>{const h=se(i),b=Date.now()-t,y=()=>l=p();return u(),h<=0?(t=Date.now(),y()):(b>h&&(a||!o)?(t=Date.now(),y()):s&&(l=new Promise((w,S)=>{r=c?S:w,n=setTimeout(()=>{t=Date.now(),o=!0,w(y()),u()},Math.max(0,h-b))})),!a&&!n&&(n=setTimeout(()=>o=!0,h)),o=!1,l)}}function Yh(e=pc,t={}){const{initialState:n="active"}=t,o=dc(n==="active");function r(){o.value=!1}function l(){o.value=!0}const i=(...s)=>{o.value&&e(...s)};return{isActive:po(o),pause:r,resume:l,eventFilter:i}}function Jh(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const o=t;t=void 0,o&&await o},n}function is(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function to(e){return Array.isArray(e)?e:[e]}function hc(e){return Hn()}function vc(e,t=200,n={}){return Vl(Gh(t,n),e)}function mc(e,t=200,n=!1,o=!0,r=!1){return Vl(Kh(t,n,o,r),e)}function Qh(e,t,n={}){const{eventFilter:o=pc,...r}=n;return xe(e,Vl(o,t),r)}function Xh(e,t,n={}){const{eventFilter:o,initialState:r="active",...l}=n,{eventFilter:i,pause:s,resume:a,isActive:c}=Yh(o,{initialState:r});return{stop:Qh(e,t,{...l,eventFilter:i}),pause:s,resume:a,isActive:c}}function So(e,t=!0,n){hc()?Pe(e,n):t?e():hn(e)}function Zh(e,t){hc()&&vn(e,t)}function ev(e,t,n={}){const{immediate:o=!0,immediateCallback:r=!1}=n,l=re(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function a(){l.value=!1,s()}function c(...u){r&&e(),s(),l.value=!0,i=setTimeout(()=>{l.value=!1,i=null,e(...u)},se(t))}return o&&(l.value=!0,Eo&&c()),gn(a),{isPending:lf(l),start:c,stop:a}}function Zr(e=!1,t={}){const{truthyValue:n=!0,falsyValue:o=!1}=t,r=Le(e),l=re(e);function i(s){if(arguments.length)return l.value=s,l.value;{const a=se(n);return l.value=l.value===a?se(o):a,l.value}}return r?i:[l,i]}function wt(e,t,n){return xe(e,t,{...n,immediate:!0})}const Fe=Eo?window:void 0,gc=Eo?window.document:void 0,bc=Eo?window.navigator:void 0;function tt(e){var t;const n=se(e);return(t=n==null?void 0:n.$el)!=null?t:n}function de(...e){const t=[],n=()=>{t.forEach(s=>s()),t.length=0},o=(s,a,c,u)=>(s.addEventListener(a,c,u),()=>s.removeEventListener(a,c,u)),r=k(()=>{const s=to(se(e[0])).filter(a=>a!=null);return s.every(a=>typeof a!="string")?s:void 0}),l=wt(()=>{var s,a;return[(a=(s=r.value)==null?void 0:s.map(c=>tt(c)))!=null?a:[Fe].filter(c=>c!=null),to(se(r.value?e[1]:e[0])),to(qt(r.value?e[2]:e[1])),se(r.value?e[3]:e[2])]},([s,a,c,u])=>{if(n(),!(s!=null&&s.length)||!(a!=null&&a.length)||!(c!=null&&c.length))return;const d=Uh(u)?{...u}:u;t.push(...s.flatMap(p=>a.flatMap(h=>c.map(b=>o(p,h,b,d)))))},{flush:"post"}),i=()=>{l(),n()};return gn(n),i}function tv(){const e=re(!1),t=Hn();return t&&Pe(()=>{e.value=!0},t),e}function jn(e){const t=tv();return k(()=>(t.value,!!e()))}function nv(e,t,n={}){const{window:o=Fe,...r}=n;let l;const i=jn(()=>o&&"MutationObserver"in o),s=()=>{l&&(l.disconnect(),l=void 0)},a=k(()=>{const p=se(e),h=to(p).map(tt).filter(Bh);return new Set(h)}),c=xe(()=>a.value,p=>{s(),i.value&&p.size&&(l=new MutationObserver(t),p.forEach(h=>l.observe(h,r)))},{immediate:!0,flush:"post"}),u=()=>l==null?void 0:l.takeRecords(),d=()=>{c(),s()};return gn(d),{isSupported:i,stop:d,takeRecords:u}}function ov(e,t,n={}){const{window:o=Fe,document:r=o==null?void 0:o.document,flush:l="sync"}=n;if(!o||!r)return Lt;let i;const s=u=>{i==null||i(),i=u},a=Tl(()=>{const u=tt(e);if(u){const{stop:d}=nv(r,p=>{p.map(b=>[...b.removedNodes]).flat().some(b=>b===u||b.contains(u))&&t(p)},{window:o,childList:!0,subtree:!0});s(d)}},{flush:l}),c=()=>{a(),s()};return gn(c),c}const rv=Symbol("vueuse-ssr-width");function lv(){const e=ga()?Fh(rv,null):null;return typeof e=="number"?e:void 0}function jl(e,t={}){const{window:n=Fe,ssrWidth:o=lv()}=t,r=jn(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),l=re(typeof o=="number"),i=re(),s=re(!1),a=c=>{s.value=c.matches};return Tl(()=>{if(l.value){l.value=!r.value;const c=se(e).split(",");s.value=c.some(u=>{const d=u.includes("not all"),p=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),h=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let b=!!(p||h);return p&&b&&(b=o>=is(p[1])),h&&b&&(b=o<=is(h[1])),d?!b:b});return}r.value&&(i.value=n.matchMedia(se(e)),s.value=i.value.matches)}),de(i,"change",a,{passive:!0}),k(()=>s.value)}function ss(e,t={}){const{controls:n=!1,navigator:o=bc}=t,r=jn(()=>o&&"permissions"in o),l=re(),i=typeof e=="string"?{name:e}:e,s=re(),a=()=>{var u,d;s.value=(d=(u=l.value)==null?void 0:u.state)!=null?d:"prompt"};de(l,"change",a,{passive:!0});const c=Jh(async()=>{if(r.value){if(!l.value)try{l.value=await o.permissions.query(i)}catch{l.value=void 0}finally{a()}if(n)return ie(l.value)}});return c(),n?{state:s,isSupported:r,query:c}:s}function iv(e={}){const{navigator:t=bc,read:n=!1,source:o,copiedDuring:r=1500,legacy:l=!1}=e,i=jn(()=>t&&"clipboard"in t),s=ss("clipboard-read"),a=ss("clipboard-write"),c=k(()=>i.value||l),u=re(""),d=re(!1),p=ev(()=>d.value=!1,r,{immediate:!1});async function h(){let _=!(i.value&&S(s.value));if(!_)try{u.value=await t.clipboard.readText()}catch{_=!0}_&&(u.value=w())}c.value&&n&&de(["copy","cut"],h,{passive:!0});async function b(_=se(o)){if(c.value&&_!=null){let g=!(i.value&&S(a.value));if(!g)try{await t.clipboard.writeText(_)}catch{g=!0}g&&y(_),u.value=_,d.value=!0,p.start()}}function y(_){const g=document.createElement("textarea");g.value=_??"",g.style.position="absolute",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove()}function w(){var _,g,E;return(E=(g=(_=document==null?void 0:document.getSelection)==null?void 0:_.call(document))==null?void 0:g.toString())!=null?E:""}function S(_){return _==="granted"||_==="prompt"}return{isSupported:c,text:u,copied:d,copy:b}}const Io=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mo="__vueuse_ssr_handlers__",sv=av();function av(){return Mo in Io||(Io[Mo]=Io[Mo]||{}),Io[Mo]}function cv(e,t){return sv[e]||t}function uv(e){return jl("(prefers-color-scheme: dark)",e)}function fv(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const dv={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},as="vueuse-storage";function ur(e,t,n,o={}){var r;const{flush:l="pre",deep:i=!0,listenToStorageChanges:s=!0,writeDefaults:a=!0,mergeDefaults:c=!1,shallow:u,window:d=Fe,eventFilter:p,onError:h=N=>{console.error(N)},initOnMounted:b}=o,y=(u?re:ae)(typeof t=="function"?t():t),w=k(()=>se(e));if(!n)try{n=cv("getDefaultStorage",()=>{var N;return(N=Fe)==null?void 0:N.localStorage})()}catch(N){h(N)}if(!n)return y;const S=se(t),_=fv(S),g=(r=o.serializer)!=null?r:dv[_],{pause:E,resume:M}=Xh(y,()=>x(y.value),{flush:l,deep:i,eventFilter:p});xe(w,()=>L(),{flush:l}),d&&s&&So(()=>{n instanceof Storage?de(d,"storage",L,{passive:!0}):de(d,as,H),b&&L()}),b||L();function U(N,A){if(d){const z={key:w.value,oldValue:N,newValue:A,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",z):new CustomEvent(as,{detail:z}))}}function x(N){try{const A=n.getItem(w.value);if(N==null)U(A,null),n.removeItem(w.value);else{const z=g.write(N);A!==z&&(n.setItem(w.value,z),U(A,z))}}catch(A){h(A)}}function B(N){const A=N?N.newValue:n.getItem(w.value);if(A==null)return a&&S!=null&&n.setItem(w.value,g.write(S)),S;if(!N&&c){const z=g.read(A);return typeof c=="function"?c(z,S):_==="object"&&!Array.isArray(z)?{...S,...z}:z}else return typeof A!="string"?A:g.read(A)}function L(N){if(!(N&&N.storageArea!==n)){if(N&&N.key==null){y.value=S;return}if(!(N&&N.key!==w.value)){E();try{(N==null?void 0:N.newValue)!==g.write(y.value)&&(y.value=B(N))}catch(A){h(A)}finally{N?hn(M):M()}}}}function H(N){L(N.detail)}return y}function pv(e,t,n={}){const{window:o=Fe,...r}=n;let l;const i=jn(()=>o&&"ResizeObserver"in o),s=()=>{l&&(l.disconnect(),l=void 0)},a=k(()=>{const d=se(e);return Array.isArray(d)?d.map(p=>tt(p)):[tt(d)]}),c=xe(a,d=>{if(s(),i.value&&o){l=new ResizeObserver(t);for(const p of d)p&&l.observe(p,r)}},{immediate:!0,flush:"post"}),u=()=>{s(),c()};return gn(u),{isSupported:i,stop:u}}function hv(e,t={}){const{delayEnter:n=0,delayLeave:o=0,triggerOnRemoval:r=!1,window:l=Fe}=t,i=re(!1);let s;const a=c=>{const u=c?n:o;s&&(clearTimeout(s),s=void 0),u?s=setTimeout(()=>i.value=c,u):i.value=c};return l&&(de(e,"mouseenter",()=>a(!0),{passive:!0}),de(e,"mouseleave",()=>a(!1),{passive:!0}),r&&ov(k(()=>tt(e)),()=>a(!1))),i}function vv(e,t={width:0,height:0},n={}){const{window:o=Fe,box:r="content-box"}=n,l=k(()=>{var d,p;return(p=(d=tt(e))==null?void 0:d.namespaceURI)==null?void 0:p.includes("svg")}),i=re(t.width),s=re(t.height),{stop:a}=pv(e,([d])=>{const p=r==="border-box"?d.borderBoxSize:r==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&l.value){const h=tt(e);if(h){const b=h.getBoundingClientRect();i.value=b.width,s.value=b.height}}else if(p){const h=to(p);i.value=h.reduce((b,{inlineSize:y})=>b+y,0),s.value=h.reduce((b,{blockSize:y})=>b+y,0)}else i.value=d.contentRect.width,s.value=d.contentRect.height},n);So(()=>{const d=tt(e);d&&(i.value="offsetWidth"in d?d.offsetWidth:t.width,s.value="offsetHeight"in d?d.offsetHeight:t.height)});const c=xe(()=>tt(e),d=>{i.value=d?t.width:0,s.value=d?t.height:0});function u(){a(),c()}return{width:i,height:s,stop:u}}const cs=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function fr(e,t={}){const{document:n=gc,autoExit:o=!1}=t,r=k(()=>{var _;return(_=tt(e))!=null?_:n==null?void 0:n.documentElement}),l=re(!1),i=k(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(_=>n&&_ in n||r.value&&_ in r.value)),s=k(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(_=>n&&_ in n||r.value&&_ in r.value)),a=k(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(_=>n&&_ in n||r.value&&_ in r.value)),c=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(_=>n&&_ in n),u=jn(()=>r.value&&n&&i.value!==void 0&&s.value!==void 0&&a.value!==void 0),d=()=>c?(n==null?void 0:n[c])===r.value:!1,p=()=>{if(a.value){if(n&&n[a.value]!=null)return n[a.value];{const _=r.value;if((_==null?void 0:_[a.value])!=null)return!!_[a.value]}}return!1};async function h(){if(!(!u.value||!l.value)){if(s.value)if((n==null?void 0:n[s.value])!=null)await n[s.value]();else{const _=r.value;(_==null?void 0:_[s.value])!=null&&await _[s.value]()}l.value=!1}}async function b(){if(!u.value||l.value)return;p()&&await h();const _=r.value;i.value&&(_==null?void 0:_[i.value])!=null&&(await _[i.value](),l.value=!0)}async function y(){await(l.value?h():b())}const w=()=>{const _=p();(!_||_&&d())&&(l.value=_)},S={capture:!1,passive:!0};return de(n,cs,w,S),de(()=>tt(r),cs,w,S),o&&gn(h),{isSupported:u,isFullscreen:l,enter:b,exit:h,toggle:y}}function Ir(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}const us=1;function mv(e,t={}){const{throttle:n=0,idle:o=200,onStop:r=Lt,onScroll:l=Lt,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:s={capture:!1,passive:!0},behavior:a="auto",window:c=Fe,onError:u=x=>{console.error(x)}}=t,d=re(0),p=re(0),h=k({get(){return d.value},set(x){y(x,void 0)}}),b=k({get(){return p.value},set(x){y(void 0,x)}});function y(x,B){var L,H,N,A;if(!c)return;const z=se(e);if(!z)return;(N=z instanceof Document?c.document.body:z)==null||N.scrollTo({top:(L=se(B))!=null?L:b.value,left:(H=se(x))!=null?H:h.value,behavior:se(a)});const oe=((A=z==null?void 0:z.document)==null?void 0:A.documentElement)||(z==null?void 0:z.documentElement)||z;h!=null&&(d.value=oe.scrollLeft),b!=null&&(p.value=oe.scrollTop)}const w=re(!1),S=cn({left:!0,right:!1,top:!0,bottom:!1}),_=cn({left:!1,right:!1,top:!1,bottom:!1}),g=x=>{w.value&&(w.value=!1,_.left=!1,_.right=!1,_.top=!1,_.bottom=!1,r(x))},E=vc(g,n+o),M=x=>{var B;if(!c)return;const L=((B=x==null?void 0:x.document)==null?void 0:B.documentElement)||(x==null?void 0:x.documentElement)||tt(x),{display:H,flexDirection:N,direction:A}=getComputedStyle(L),z=A==="rtl"?-1:1,oe=L.scrollLeft;_.left=oed.value;const he=Math.abs(oe*z)<=(i.left||0),Y=Math.abs(oe*z)+L.clientWidth>=L.scrollWidth-(i.right||0)-us;H==="flex"&&N==="row-reverse"?(S.left=Y,S.right=he):(S.left=he,S.right=Y),d.value=oe;let Z=L.scrollTop;x===c.document&&!Z&&(Z=c.document.body.scrollTop),_.top=Zp.value;const G=Math.abs(Z)<=(i.top||0),Te=Math.abs(Z)+L.clientHeight>=L.scrollHeight-(i.bottom||0)-us;H==="flex"&&N==="column-reverse"?(S.top=Te,S.bottom=G):(S.top=G,S.bottom=Te),p.value=Z},U=x=>{var B;if(!c)return;const L=(B=x.target.documentElement)!=null?B:x.target;M(L),w.value=!0,E(x),l(x)};return de(e,"scroll",n?mc(U,n,!0,!1):U,s),So(()=>{try{const x=se(e);if(!x)return;M(x)}catch(x){u(x)}}),de(e,"scrollend",g,s),{x:h,y:b,isScrolling:w,arrivedState:S,directions:_,measure(){const x=se(e);c&&x&&M(x)}}}function gv(e,t,n={}){const{window:o=Fe}=n;return ur(e,t,o==null?void 0:o.localStorage,n)}function bv(e={}){const{window:t=Fe}=e;if(!t)return ae(["en"]);const n=t.navigator,o=ae(n.languages);return de(t,"languagechange",()=>{o.value=n.languages},{passive:!0}),o}function yv(e,t=Lt,n={}){const{immediate:o=!0,manual:r=!1,type:l="text/javascript",async:i=!0,crossOrigin:s,referrerPolicy:a,noModule:c,defer:u,document:d=gc,attrs:p={}}=n,h=re(null);let b=null;const y=_=>new Promise((g,E)=>{const M=L=>(h.value=L,g(L),L);if(!d){g(!1);return}let U=!1,x=d.querySelector(`script[src="${se(e)}"]`);x?x.hasAttribute("data-loaded")&&M(x):(x=d.createElement("script"),x.type=l,x.async=i,x.src=se(e),u&&(x.defer=u),s&&(x.crossOrigin=s),c&&(x.noModule=c),a&&(x.referrerPolicy=a),Object.entries(p).forEach(([L,H])=>x==null?void 0:x.setAttribute(L,H)),U=!0);const B={passive:!0};de(x,"error",L=>E(L),B),de(x,"abort",L=>E(L),B),de(x,"load",()=>{x.setAttribute("data-loaded","true"),t(x),M(x)},B),U&&(x=d.head.appendChild(x)),_||M(x)}),w=(_=!0)=>(b||(b=y(_)),b),S=()=>{if(!d)return;b=null,h.value&&(h.value=null);const _=d.querySelector(`script[src="${se(e)}"]`);_&&d.head.removeChild(_)};return o&&!r&&So(w),r||Zh(S),{scriptTag:h,load:w,unload:S}}function yc(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Mr=new WeakMap;function zl(e,t=!1){const n=re(t);let o=null,r="";xe(dc(e),s=>{const a=Ir(se(s));if(a){const c=a;if(Mr.get(c)||Mr.set(c,c.style.overflow),c.style.overflow!=="hidden"&&(r=c.style.overflow),c.style.overflow==="hidden")return n.value=!0;if(n.value)return c.style.overflow="hidden"}},{immediate:!0});const l=()=>{const s=Ir(se(e));!s||n.value||(ls&&(o=de(s,"touchmove",a=>{_v(a)},{passive:!1})),s.style.overflow="hidden",n.value=!0)},i=()=>{const s=Ir(se(e));!s||!n.value||(ls&&(o==null||o()),s.style.overflow=r,Mr.delete(s),n.value=!1)};return gn(i),k({get(){return n.value},set(s){s?l():i()}})}function wv(e,t,n={}){const{window:o=Fe}=n;return ur(e,t,o==null?void 0:o.sessionStorage,n)}function Ev(e={}){const{window:t=Fe,...n}=e;return mv(t,n)}function Sv(e={}){const{window:t=Fe,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:l=!0,type:i="inner"}=e,s=re(n),a=re(o),c=()=>{if(t)if(i==="outer")s.value=t.outerWidth,a.value=t.outerHeight;else if(i==="visual"&&t.visualViewport){const{width:d,height:p,scale:h}=t.visualViewport;s.value=Math.round(d*h),a.value=Math.round(p*h)}else l?(s.value=t.innerWidth,a.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight)};c(),So(c);const u={passive:!0};if(de("resize",c,u),t&&i==="visual"&&t.visualViewport&&de(t.visualViewport,"resize",c,u),r){const d=jl("(orientation: portrait)");xe(d,()=>c())}return{width:s,height:a}}const _c=[...new Array(6)].map((e,t)=>`[vp-content] h${t+1}`).join(","),Tv=(e,t=2)=>{if(t===!1)return[];const[n,o]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t,r=e.filter(i=>i.level>=n&&i.level<=o),l=[];e:for(let i=0;i=0;a--){const c=r[a];if(c.level{let n;if(t.length){const o=e.cloneNode(!0);o.querySelectorAll(t.join(",")).forEach(r=>{r.remove()}),n=o.textContent||""}else n=e.textContent||"";return n.trim()},xv=(e=_c,t=[])=>Array.from(document.querySelectorAll(e)).filter(n=>n.id&&n.hasChildNodes()).map(n=>({element:n,title:kv(n,t),link:`#${n.id}`,slug:n.id,level:Number(n.tagName[1]),children:[]})),Cv=({selector:e=_c,levels:t=2,ignore:n=[]}={})=>Tv(xv(e,n),t),qe=(e,t)=>{var o;const n=(o=(t==null?void 0:t._instance)??Hn())==null?void 0:o.appContext.components;return n?e in n||Ue(e)in n||fo(Ue(e))in n:!1},wc=e=>typeof e<"u",jo=e=>typeof e=="number",{isArray:dn}=Array,Jo=(e,t)=>_e(e)&&e.startsWith(t),Pv=(e,t)=>_e(e)&&e.endsWith(t),{entries:Fl}=Object,{keys:dr}=Object,Av=e=>{if(e){if(typeof e=="number")return new Date(e);const t=Date.parse(e.toString());if(!Number.isNaN(t))return new Date(t)}return null},Bl=e=>Jo(e,"/")&&e[1]!=="/",Lv=(e={})=>{const t=ae([]);return Mt(n=>{t.value=n==="beforeUnmount"?[]:Cv(se(e))}),t},zn=e=>{const t=Et();return k(()=>se(e)[t.value]??{})},Rv=()=>{const e=ac();return k(()=>Object.keys(e.value))},Ec=(e=!0)=>{const t=Se(),n=It();return k(()=>{var o;return t.value.contributors===!1||!se(e)?[]:((o=n.value.git)==null?void 0:o.contributors)??[]})};var fs={"/":{contributors:"Contributors",changelog:"Changelog",timeOn:"on",viewChangelog:"View All Changelog",latestUpdateAt:"Last Updated:"},"/zh/":{contributors:"贡献者",changelog:"更新日志",timeOn:"于",viewChangelog:"查看所有更新日志",latestUpdateAt:"最近更新:"}};const Ov=typeof fs>"u"?{}:fs,Sc=()=>zn(Ov),Iv=(e=!0)=>{const t=cr(),n=Sc(),o=It();return k(()=>{var s,a,c;if(!se(e))return null;const r=((s=o.value.git)==null?void 0:s.updatedTime)??((c=(a=o.value.git)==null?void 0:a.changelog)==null?void 0:c[0].time);if(!r)return null;const l=new Date(r),i=new Intl.DateTimeFormat(t.value,{dateStyle:"short",timeStyle:"short"}).format(r);return{date:l,text:i,iso:l.toISOString(),locale:n.value.latestUpdateAt}})},Mv=({level:e=2,text:t,anchor:n})=>f(`h${e||2}`,{id:n,tabindex:"-1"},f("a",{href:`#${n}`,class:"header-anchor"},f("span",t))),$v=({name:e,url:t,avatar:n})=>f(t?"a":"span",{href:t,target:"_blank",rel:"noreferrer",class:"vp-contributor"},[n?f("img",{src:n,alt:"",class:"vp-contributor-avatar"}):null,f("span",{class:"vp-contributor-name"},e)]),Dv=K({name:"GitContributors",props:{title:String,headerLevel:{type:Number,default:2}},setup(e){const t=Ec(),n=Sc();return()=>t.value.length?[f(Mv,{level:e.headerLevel,anchor:"doc-contributors",text:e.title||n.value.contributors}),f("div",{class:"vp-contributors"},t.value.map(o=>f($v,o)))]:null}}),Nv={enhance:({app:e})=>{e.component("GitContributors",Dv)}},Hv=Object.freeze(Object.defineProperty({__proto__:null,default:Nv},Symbol.toStringTag,{value:"Module"})),Vv=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),jv=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),zv=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Fv=$t({setup(){de("beforeprint",()=>{document.querySelectorAll("details").forEach(e=>{e.open=!0})},{passive:!0})}}),Bv=Object.freeze(Object.defineProperty({__proto__:null,default:Fv},Symbol.toStringTag,{value:"Module"})),Wv="VUEPRESS_CODE_TAB_STORE",$o=ur(Wv,{}),Uv=K({name:"CodeTabs",props:{active:{type:Number,default:0},data:{type:Array,required:!0},id:{type:String,required:!0},tabId:String},slots:Object,setup(e,{slots:t}){const n=ae(e.active),o=re([]),r=()=>{e.tabId&&($o.value[e.tabId]=e.data[n.value].id)},l=(c=n.value)=>{n.value=c{n.value=c>0?c-1:o.value.length-1,o.value[n.value].focus()},s=(c,u)=>{c.key===" "||c.key==="Enter"?(c.preventDefault(),n.value=u):c.key==="ArrowRight"?(c.preventDefault(),l()):c.key==="ArrowLeft"&&(c.preventDefault(),i()),e.tabId&&($o.value[e.tabId]=e.data[n.value].id)},a=()=>{if(e.tabId){const c=e.data.findIndex(({id:u})=>$o.value[e.tabId]===u);if(c!==-1)return c}return e.active};return Pe(()=>{n.value=a(),xe(()=>e.tabId&&$o.value[e.tabId],(c,u)=>{if(e.tabId&&c!==u){const d=e.data.findIndex(({id:p})=>p===c);d!==-1&&(n.value=d)}})}),()=>e.data.length?f("div",{class:"vp-code-tabs"},[f("div",{class:"vp-code-tabs-nav",role:"tablist"},e.data.map(({id:c},u)=>{const d=u===n.value;return f("button",{type:"button",ref:p=>{p&&(o.value[u]=p)},class:["vp-code-tab-nav",{active:d}],role:"tab","aria-controls":`codetab-${e.id}-${u}`,"aria-selected":d,onClick:()=>{n.value=u,r()},onKeydown:p=>{s(p,u)}},t[`title${u}`]({value:c,isActive:d}))})),e.data.map(({id:c},u)=>{const d=u===n.value;return f("div",{class:["vp-code-tab",{active:d}],id:`codetab-${e.id}-${u}`,role:"tabpanel","aria-expanded":d},[f("div",{class:"vp-code-tab-title"},t[`title${u}`]({value:c,isActive:d})),t[`tab${u}`]({value:c,isActive:d})])})]):null}}),qv={enhance:({app:e})=>{e.component("CodeTabs",Uv)}},Gv=Object.freeze(Object.defineProperty({__proto__:null,default:qv},Symbol.toStringTag,{value:"Module"})),Kv=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Yv=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Jv=JSON.parse(`{"encrypt":{},"logo":"/images/hero.png","repo":"vuepress/core","docsRepo":"vuepress/docs","docsDir":"docs","locales":{"/":{"lang":"en-US","navbarLocales":{"langName":"English","selectLangAriaLabel":"Select language"},"metaLocales":{"author":"Author","date":"Writing Date","origin":"Original","views":"Page views","category":"Category","tag":"Tag","readingTime":"Reading Time","words":"Words","toc":"On This Page","prev":"Prev","next":"Next","contributors":"Contributors","editLink":"Edit this page on GitHub","print":"Print"},"outlookLocales":{"themeColor":"Theme Color","darkmode":"Theme Mode","fullscreen":"Full Screen"},"routeLocales":{"skipToContent":"Skip to main content","notFoundTitle":"Page not found","notFoundMsg":["There’s nothing here.","How did we get here?","That’s a Four-Oh-Four.","Looks like we've got some broken links."],"back":"Go back","home":"Take me home"},"navbar":[{"text":"Guide","icon":"fa6-solid:lightbulb","children":["/guide/introduction.md","/guide/getting-started.md","/guide/configuration.md","/guide/page.md","/guide/markdown.md","/guide/assets.md","/guide/i18n.md","/guide/deployment.md","/guide/theme.md","/guide/plugin.md","/guide/bundler.md","/guide/migration.md","/guide/troubleshooting.md"]},{"text":"Reference","icon":"fa6-solid:book","prefix":"/reference/","children":[{"text":"Core","children":[{"text":"CLI","icon":"bi:terminal-fill","link":"cli.html"},"config","frontmatter","components","plugin-api","theme-api","client-api","node-api"]},{"text":"Bundlers","prefix":"bundler/","children":["vite","webpack"]},{"text":"Ecosystem","children":[{"text":"Default Theme","icon":"fa6-solid:palette","link":"https://ecosystem.vuejs.press/themes/default/"},{"text":"Plugins","icon":"fa6-solid:puzzle-piece","link":"https://ecosystem.vuejs.press/plugins/"}]}]},{"text":"Learn More","icon":"fa6-solid:feather","children":[{"text":"Advanced","prefix":"/advanced/","children":["architecture","plugin","theme",{"text":"Cookbook","icon":"fa6-solid:signs-post","link":"cookbook/"}]},{"text":"Resources","children":[{"text":"Ecosystem","icon":"fa6-solid:leaf","link":"https://ecosystem.vuejs.press/"},{"text":"MarketPlace","icon":"fa6-solid:cart-shopping","link":"https://marketplace.vuejs.press"},{"text":"Contributing Guide","icon":"fa6-solid:signs-post","link":"https://github.com/vuepress/core/blob/main/CONTRIBUTING.md"}]}]},{"text":"v2.0.0-rc.22","children":[{"text":"Changelog","icon":"fa6-solid:clock","link":"https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md"},{"text":"v1.x","icon":"fa6-brands:vuejs","link":"https://v1.vuepress.vuejs.org"},{"text":"v0.x","icon":"fa6-brands:vuejs","link":"https://v0.vuepress.vuejs.org"}]}],"sidebar":{"/guide/":["introduction","getting-started","configuration","page","markdown","assets","i18n","deployment","theme","plugin","bundler","migration","troubleshooting"],"/advanced/":[{"text":"Advanced","icon":"fa6-solid:gem","children":["architecture","plugin","theme"]},{"text":"Cookbook","icon":"fa6-solid:signs-post","prefix":"cookbook/","children":["","usage-of-client-config","adding-extra-pages","making-a-theme-extendable","passing-data-to-client-code","markdown-and-vue-sfc","resolving-routes"]}],"/reference/":[{"text":"Core","icon":"fa6-brands:vuejs","collapsible":true,"children":["cli","config","frontmatter","components","plugin-api","theme-api","client-api","node-api"]},{"text":"Bundlers","icon":"fa6-solid:boxes-packing","prefix":"bundler/","collapsible":true,"children":["vite","webpack"]},{"text":"Ecosystem","icon":"fa6-solid:leaf","children":[{"text":"Default Theme","icon":"fa6-solid:palette","link":"https://ecosystem.vuejs.press/themes/default/"},{"text":"Plugins","icon":"fa6-solid:puzzle-piece","link":"https://ecosystem.vuejs.press/plugins/"},{"text":"MarketPlace","icon":"fa6-solid:cart-shopping","link":"https://marketplace.vuejs.press"}]}]},"footer":"Theme by VuePress Theme Hope","copyright":"MIT Licensed | Copyright © 2018-present VuePress Community","displayFooter":true},"/zh/":{"lang":"zh-CN","navbarLocales":{"langName":"简体中文","selectLangAriaLabel":"选择语言"},"metaLocales":{"author":"作者","date":"写作日期","origin":"原创","views":"访问量","category":"分类","tag":"标签","readingTime":"阅读时间","words":"字数","toc":"此页内容","prev":"上一页","next":"下一页","contributors":"贡献者","editLink":"在 GitHub 上编辑此页","print":"打印"},"outlookLocales":{"themeColor":"主题色","darkmode":"外观","fullscreen":"全屏"},"routeLocales":{"skipToContent":"跳至主要內容","notFoundTitle":"页面不存在","notFoundMsg":["这里什么也没有","我们是怎么来到这儿的?","这 是 四 零 四 !","看起来你访问了一个失效的链接"],"back":"返回上一页","home":"带我回家"},"navbar":[{"text":"指南","icon":"fa6-solid:lightbulb","children":["/zh/guide/introduction.md","/zh/guide/getting-started.md","/zh/guide/configuration.md","/zh/guide/page.md","/zh/guide/markdown.md","/zh/guide/assets.md","/zh/guide/i18n.md","/zh/guide/deployment.md","/zh/guide/theme.md","/zh/guide/plugin.md","/zh/guide/bundler.md","/zh/guide/migration.md","/zh/guide/troubleshooting.md"]},{"text":"参考","icon":"fa6-solid:book","prefix":"/zh/reference/","children":[{"text":"核心","children":["cli","config","frontmatter","components","plugin-api","theme-api","client-api","node-api"]},{"text":"打包工具","prefix":"bundler/","children":["vite","webpack"]},{"text":"生态系统","children":[{"text":"默认主题","icon":"fa6-solid:palette","link":"https://ecosystem.vuejs.press/zh/themes/default/"},{"text":"插件","icon":"fa6-solid:puzzle-piece","link":"https://ecosystem.vuejs.press/zh/plugins/"}]}]},{"text":"了解更多","icon":"fa6-solid:feather","children":[{"text":"深入","prefix":"/zh/advanced/","children":["architecture","plugin","theme",{"text":"Cookbook","icon":"fa6-solid:signs-post","link":"cookbook/"}]},{"text":"其他资源","children":[{"text":"生态系统","icon":"fa6-solid:leaf","link":"https://ecosystem.vuejs.press/zh/"},{"text":"市场","icon":"fa6-solid:cart-shopping","link":"https://marketplace.vuejs.press/zh/"},{"text":"贡献指南","icon":"fa6-solid:signs-post","link":"https://github.com/vuepress/core/blob/main/CONTRIBUTING_zh.md"}]}]},{"text":"v2.0.0-rc.22","children":[{"text":"更新日志","icon":"fa6-solid:clock","link":"https://github.com/vuepress/vuepress-next/blob/main/CHANGELOG.md"},{"text":"v1.x","icon":"fa6-brands:vuejs","link":"https://v1.vuepress.vuejs.org/zh/"},{"text":"v0.x","icon":"fa6-brands:vuejs","link":"https://v0.vuepress.vuejs.org/zh/"}]}],"sidebar":{"/zh/guide/":["introduction","getting-started","configuration","page","markdown","assets","i18n","deployment","theme","plugin","bundler","migration","troubleshooting"],"/zh/advanced/":[{"text":"深入","icon":"fa6-solid:gem","children":["architecture","plugin","theme"]},{"text":"Cookbook","icon":"fa6-solid:signs-post","prefix":"cookbook/","children":["","usage-of-client-config","adding-extra-pages","making-a-theme-extendable","passing-data-to-client-code","markdown-and-vue-sfc","resolving-routes"]}],"/zh/reference/":[{"text":"核心","icon":"fa6-brands:vuejs","collapsible":true,"children":["cli","config","frontmatter","components","plugin-api","theme-api","client-api","node-api"]},{"text":"打包工具","icon":"fa6-solid:boxes-packing","prefix":"bundler/","collapsible":true,"children":["vite","webpack"]},{"text":"生态系统","icon":"fa6-solid:leaf","children":[{"text":"默认主题","icon":"fa6-solid:palette","link":"https://ecosystem.vuejs.press/zh/themes/default/"},{"text":"插件","icon":"fa6-solid:puzzle-piece","link":"https://ecosystem.vuejs.press/zh/plugins/"},{"text":"市场","icon":"fa6-solid:cart-shopping","link":"https://marketplace.vuejs.press/zh/"}]}]},"footer":"主题使用 VuePress Theme Hope","copyright":"MIT 协议 | 版权所有 © 2018-至今 VuePress 社区","displayFooter":true}}}`),Qv=ae(Jv),Tc=()=>Qv,kc=Symbol(""),Xv=()=>{const e=Ie(kc);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Zv=(e,t)=>{const{locales:n,...o}=e;return{...o,...n==null?void 0:n[t]}},em=$t({enhance({app:e}){const t=Tc(),n=e._context.provides[Il],o=k(()=>Zv(t.value,n.routeLocale.value));e.provide(kc,o),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return o.value}}})}}),tm=Object.freeze(Object.defineProperty({__proto__:null,default:em},Symbol.toStringTag,{value:"Module"}));var nm={"/":{backToTop:"Back to top"},"/zh/":{backToTop:"返回顶部"}};const om=K({name:"BackToTop",setup(){const e=Se(),t=zn(nm),n=re(),{height:o}=vv(n),{height:r}=Sv(),{y:l}=Ev(),i=k(()=>(e.value.backToTop??!0)&&l.value>100),s=k(()=>l.value/(o.value-r.value)*100);return Pe(()=>{n.value=document.body}),()=>f($n,{name:"fade-in"},()=>i.value?f("button",{type:"button",class:"vp-back-to-top-button","aria-label":t.value.backToTop,onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})}},[f("span",{class:"vp-scroll-progress",role:"progressbar","aria-labelledby":"loadinglabel","aria-valuenow":s.value},f("svg",f("circle",{cx:"26",cy:"26",r:"24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-dasharray":`${Math.PI*s.value*.48} ${Math.PI*(100-s.value)*.48}`}))),f("div",{class:"back-to-top-icon"})]):null)}}),rm=$t({rootComponents:[om]}),lm=Object.freeze(Object.defineProperty({__proto__:null,default:rm},Symbol.toStringTag,{value:"Module"})),im=/language-(shellscript|shell|bash|sh|zsh)/,sm=({selector:e,ignoreSelector:t,inlineSelector:n,duration:o=2e3,locales:r,showInMobile:l,transform:i})=>{const s=jl("(max-width: 419px)"),a=k(()=>!s.value||l),c=zn(r),u=y=>{var S;if(y.hasAttribute("copy-code"))return;const w=document.createElement("button");w.type="button",w.classList.add("vp-copy-code-button"),w.setAttribute("aria-label",c.value.copy),w.setAttribute("data-copied",c.value.copied),(S=y.parentElement)==null||S.insertBefore(w,y),y.setAttribute("copy-code","")},d=()=>{document.body.classList.toggle("no-copy-code",!a.value),a.value&&document.querySelectorAll(e).forEach(u)};wt(a,d,{flush:"post"}),Mt(y=>{y!=="beforeUnmount"&&d()});const{copy:p}=iv({legacy:!0}),h=new WeakMap,b=async(y,w,S)=>{const _=w.cloneNode(!0);i&&i(_);let g=_.textContent||"";if(im.test(y.className)&&(g=g.replace(/^ *(\$|>) /gm,"")),await p(g),o<=0)return;S.classList.add("copied"),clearTimeout(h.get(S));const E=setTimeout(()=>{S.classList.remove("copied"),S.blur(),h.delete(S)},o);h.set(S,E)};de("click",y=>{const w=y.target;if(a.value&&w.matches('div[class*="language-"] > button.vp-copy-code-button')){const S=w.parentElement,_=w.nextElementSibling;if(!S||!_)return;b(S,_,w)}},{passive:!0})};var am={"/":{copy:"Copy code",copied:"Copied"},"/zh/":{copy:"复制代码",copied:"已复制"}};const cm=$t({setup:()=>{sm({selector:'[vp-content] div[class*="language-"] pre',ignoreSelector:"",inlineSelector:"",locales:am,duration:2e3,showInMobile:!1})}}),um=Object.freeze(Object.defineProperty({__proto__:null,default:cm},Symbol.toStringTag,{value:"Module"})),fm=K({name:"VPIcon",props:{type:{type:String,default:"unknown"},prefix:String,icon:String,color:String,size:[String,Number],verticalAlign:String,sizing:{type:String,default:"height"}},setup(e){const t=k(()=>e.icon?_o(e.icon)?e.icon:Bl(e.icon)?$e(e.icon):null:null),n=k(()=>{const r={},l={},{type:i,verticalAlign:s,size:a,sizing:c}=e;return e.color&&(l.color=e.color),a&&(l["--icon-size"]=Number.isNaN(Number(a))?a:`${a}px`),s&&(l["--icon-vertical-align"]=s),i==="iconify"&&(c!=="height"&&(r.width=e.size||"1em"),c!=="width"&&(r.height=e.size||"1em")),e.sizing&&(r.sizing=e.sizing),dr(l).length&&(r.style=l),r}),o=r=>r.includes("fa-")||/^fa.$/.test(r)?r:`fa-${r}`;return()=>{const{type:r,icon:l,prefix:i="",sizing:s}=e;if(!l)return null;if(t.value)return f("img",{class:"vp-icon",src:t.value,alt:"","aria-hidden":"","no-view":"",...n.value});if(r==="iconify")return f("iconify-icon",{key:l,class:"vp-icon",icon:l.includes(":")?l:`${i}${l}`,...n.value});if(r==="fontawesome"){const[a,c]=l.includes(":")?l.split(":",2):["fas",l];return f("i",{key:l,class:["vp-icon",a.length===1?`fa${a}`:o(a),...c.split(" ").map(o),s==="height"?"":"fa-fw"],...n.value})}return f("i",{key:l,class:["vp-icon",l.includes(" ")?l:`${i}${l}`],...n.value})}}}),dm={enhance:({app:e})=>{qe("VPIcon")||e.component("VPIcon",t=>f(fm,{type:"iconify",prefix:"",...t}))},setup:()=>{yv("https://cdn.jsdelivr.net/npm/iconify-icon@2")}},pm=Object.freeze(Object.defineProperty({__proto__:null,default:dm},Symbol.toStringTag,{value:"Module"})),hm=ae({}),xc=Symbol(""),vm=()=>Ie(xc),mm=e=>{e.provide(xc,hm)},Cc=e=>new Promise((t,n)=>{e.complete?t({type:"image",element:e,src:e.src,width:e.naturalWidth,height:e.naturalHeight,alt:e.alt,msrc:e.src}):(e.onload=()=>{t(Cc(e))},e.onerror=()=>{n()})}),gm='
',bm=(e,{download:t=!0,fullscreen:n=!0}={})=>{e.on("uiRegister",()=>{if(e.ui.registerElement({name:"bulletsIndicator",className:"photo-swipe-bullets-indicator",appendTo:"wrapper",onInit:o=>{const r=[];let l=-1;for(let i=0;i{e.goTo(r.indexOf(a.target))},r.push(s),o.appendChild(s)}e.on("change",()=>{l>=0&&r[l].classList.remove("active"),r[e.currIndex].classList.add("active"),l=e.currIndex})}}),n){const{isSupported:o,toggle:r}=fr();o.value&&e.ui.registerElement({name:"fullscreen",order:7,isButton:!0,html:'',onClick:()=>{r()}})}t&&e.ui.registerElement({name:"download",order:8,isButton:!0,tagName:"a",html:{isCustomSVG:!0,inner:'',outlineID:"pswp__icn-download"},onInit:o=>{o.setAttribute("download",""),o.setAttribute("target","_blank"),o.setAttribute("rel","noopener"),e.on("change",()=>{o.setAttribute("href",e.currSlide.data.src)})}})})},ym=({selector:e,locales:t,download:n=!0,fullscreen:o=!0,scrollToClose:r=!0})=>{const l=vm(),i=zn(t),s=Se(),a=k(()=>{const{photoSwipe:h}=s.value;return h===!1?null:_e(h)?h:dn(e)?e.join(", "):e}),c=k(()=>({...l.value,...i.value,download:n,fullscreen:o,scrollToClose:r}));let u=null,d=0,p=null;de("click",async h=>{const b=h.target;if(!a.value||!u||!b.matches(a.value))return;d!==0&&p.destroy();const y=Date.now(),w=await u,S=Array.from(document.querySelectorAll(a.value)),_=S.map(E=>({html:gm,element:E,msrc:E.src})),g=S.findIndex(E=>E===b);p=new w({preloaderDelay:0,showHideAnimationType:"zoom",...c.value,dataSource:_,index:g,...r?{closeOnVerticalDrag:!0,wheelToZoom:!1}:{}}),d=y,bm(p,{download:n,fullscreen:o}),p.init(),p.on("destroy",()=>{p=null,d=0}),S.map((E,M)=>Cc(E).then(U=>{d===y&&(_.splice(M,1,U),p==null||p.refreshSlideContent(M))}))},{passive:!0}),de("wheel",()=>{c.value.scrollToClose&&(p==null||p.close())}),Pe(()=>{("requestIdleCallback"in window?window.requestIdleCallback:setTimeout)(()=>{u=D(async()=>{const{default:h}=await import("./photoswipe.esm-DXWKOczD.js");return{default:h}},[]).then(({default:h})=>h)})}),vn(()=>{p==null||p.destroy()})};var _m={"/":{closeTitle:"Close",downloadTitle:"Download Image",fullscreenTitle:"Switch to fullscreen",zoomTitle:"Zoom in/out",arrowPrevTitle:"Prev (Arrow Left)",arrowNextTitle:"Next (Arrow Right)"},"/zh/":{closeTitle:"关闭",downloadTitle:"下载图片",fullscreenTitle:"切换全屏",zoomTitle:"缩放",arrowPrevTitle:"上一个 (左箭头)",arrowNextTitle:"下一个 (右箭头)"}};const wm="[vp-content] :not(a) > img:not([no-view])",Em=_m,Sm=!0,Tm=!0,km=!0;var xm=$t({enhance:({app:e})=>{mm(e)},setup:()=>{ym({selector:wm,locales:Em,download:Sm,fullscreen:Tm,scrollToClose:km})}});const Cm=Object.freeze(Object.defineProperty({__proto__:null,default:xm},Symbol.toStringTag,{value:"Module"})),Pc=({type:e="info",text:t="",vertical:n,color:o,bgColor:r},{slots:l})=>{var i;return f("span",{class:["vp-badge",e,{diy:!!(o||r)}],style:{backgroundColor:r??!1,color:o??!1,verticalAlign:n??!1}},((i=l.default)==null?void 0:i.call(l))??t)};Pc.displayName="Badge";const Pm={enhance:({app:e})=>{qe("Badge")||e.component("Badge",Pc)},setup:()=>{},rootComponents:[]},Am=Object.freeze(Object.defineProperty({__proto__:null,default:Pm},Symbol.toStringTag,{value:"Module"})),ds=async(e,t)=>{const{path:n,query:o}=e.currentRoute.value,{scrollBehavior:r}=e.options;e.options.scrollBehavior=void 0,await e.replace({path:n,query:o,hash:t}),e.options.scrollBehavior=r},Lm=({headerLinkSelector:e,headerAnchorSelector:t,delay:n,offset:o=5})=>{const r=mn();de("scroll",vc(()=>{var b,y;const i=Math.max(window.scrollY,document.documentElement.scrollTop,document.body.scrollTop);if(Math.abs(i)d.some(S=>S.hash===w.hash));for(let w=0;w=(((b=S.parentElement)==null?void 0:b.offsetTop)??0)-o,E=!_||i<(((y=_.parentElement)==null?void 0:y.offsetTop)??0)-o;if(!(g&&E))continue;const U=decodeURIComponent(r.currentRoute.value.hash),x=decodeURIComponent(S.hash);if(U===x)return;if(u){for(let B=w+1;B_e(e.title)?{title:e.title}:null;const Lc=Symbol(""),Nm=e=>{Ac=e},Hm=()=>Ie(Lc),Vm=e=>{e.provide(Lc,Ac)};var jm={"/":{title:"Catalog",empty:"No catalog"},"/zh/":{title:"目录",empty:"暂无目录"}},zm=K({name:"Catalog",props:{base:String,level:{type:Number,default:3},index:Boolean,hideHeading:Boolean},setup(e){const t=Hm(),n=zn(jm),o=It(),r=ac(),l=Ml(),i=re(Fl(r.value).map(([a,{meta:c}])=>{const u=t(c);if(!u)return null;const d=a.split("/").length;return{level:Pv(a,"/")?d-2:d-1,base:a.replace(/\/[^/]+\/?$/,"/"),path:a,...u}}).filter(a=>Vn(a)&&_e(a.title))),s=k(()=>{const a=e.base?gp(Ya(e.base)):o.value.path.replace(/\/[^/]+$/,"/"),c=a.split("/").length-2,u=[];return i.value.filter(({level:d,path:p})=>{if(!Jo(p,a)||p===a)return!1;if(a==="/"){const h=dr(l.value.locales).filter(b=>b!=="/");if(p==="/404.html"||h.some(b=>Jo(p,b)))return!1}return d-c<=e.level}).sort(({title:d,level:p,order:h},{title:b,level:y,order:w})=>p-y||(jo(h)?jo(w)?h>0?w>0?h-w:-1:w<0?h-w:1:h:jo(w)?w:d.localeCompare(b))).forEach(d=>{var b;const{base:p,level:h}=d;switch(h-c){case 1:{u.push(d);break}case 2:{const y=u.find(w=>w.path===p);y&&(y.children??(y.children=[])).push(d);break}default:{const y=u.find(w=>w.path===p.replace(/\/[^/]+\/$/,"/"));if(y){const w=(b=y.children)==null?void 0:b.find(S=>S.path===p);w&&(w.children??(w.children=[])).push(d)}}}}),u});return()=>{const a=s.value.some(c=>c.children);return f("div",{class:["vp-catalog",{index:e.index}]},[e.hideHeading?null:f("h2",{class:"vp-catalog-main-title"},n.value.title),s.value.length?f(e.index?"ol":"ul",{class:["vp-catalog-list",{deep:a}]},s.value.map(({children:c=[],title:u,path:d,content:p})=>{const h=f(ut,{class:"vp-catalog-title",to:d},()=>p?f(p):u);return f("li",{class:"vp-catalog-item"},a?[f("h3",{id:u,class:["vp-catalog-child-title",{"has-children":c.length}]},[f("a",{href:`#${u}`,class:"vp-catalog-header-anchor","aria-hidden":!0}),h]),c.length?f(e.index?"ol":"ul",{class:"vp-child-catalogs"},c.map(({children:b=[],content:y,path:w,title:S})=>f("li",{class:"vp-child-catalog"},[f("div",{class:["vp-catalog-sub-title",{"has-children":b.length}]},[f("a",{href:`#${S}`,class:"vp-catalog-header-anchor"}),f(ut,{class:"vp-catalog-title",to:w},()=>y?f(y):S)]),b.length?f(e.index?"ol":"div",{class:e.index?"vp-sub-catalogs":"vp-sub-catalogs-wrapper"},b.map(({content:_,path:g,title:E})=>e.index?f("li",{class:"vp-sub-catalog"},f(ut,{to:g},()=>_?f(_):E)):f(ut,{class:"vp-sub-catalog-link",to:g},()=>_?f(_):E))):null]))):null]:f("div",{class:"vp-catalog-child-title"},h))})):f("p",{class:"vp-empty-catalog"},n.value.empty)])}}}),Fm=$t({enhance:({app:e})=>{Vm(e),qe("Catalog",e)||e.component("Catalog",zm)}});const Bm=Object.freeze(Object.defineProperty({__proto__:null,default:Fm},Symbol.toStringTag,{value:"Module"}));/** + * NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress + * @license MIT + */const ps=(e,t)=>{e.classList.add(t)},hs=(e,t)=>{e.classList.remove(t)},Wm=e=>{var t;(t=e==null?void 0:e.parentNode)==null||t.removeChild(e)},$r=(e,t,n)=>en?n:e,vs=e=>(-1+e)*100,Um=(()=>{const e=[],t=()=>{const n=e.shift();n&&n(t)};return n=>{e.push(n),e.length===1&&t()}})(),qm=e=>e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(t,n)=>n.toUpperCase()),Do=(()=>{const e=["Webkit","O","Moz","ms"],t={},n=l=>{const{style:i}=document.body;if(l in i)return l;const s=l.charAt(0).toUpperCase()+l.slice(1);let a=e.length;for(;a--;){const c=`${e[a]}${s}`;if(c in i)return c}return l},o=l=>{const i=qm(l);return t[i]??(t[i]=n(i))},r=(l,i,s)=>{l.style[o(i)]=s};return(l,i)=>{for(const s in i){const a=i[s];Object.hasOwn(i,s)&&wc(a)&&r(l,s,a)}}})(),kt={minimum:.08,easing:"ease",speed:200,trickleRate:.02,trickleSpeed:800,barSelector:'[role="bar"]',parent:"body",template:'
'},ke={percent:null,isRendered:()=>!!document.getElementById("nprogress"),set:e=>{const{speed:t,easing:n}=kt,o=ke.isStarted(),r=$r(e,kt.minimum,1);ke.percent=r===1?null:r;const l=ke.render(!o),i=l.querySelector(kt.barSelector);return l.offsetWidth,Um(s=>{Do(i,{transform:`translate3d(${vs(r)}%,0,0)`,transition:`all ${t}ms ${n}`}),r===1?(Do(l,{transition:"none",opacity:"1"}),l.offsetWidth,setTimeout(()=>{Do(l,{transition:`all ${t}ms linear`,opacity:"0"}),setTimeout(()=>{ke.remove(),s()},t)},t)):setTimeout(()=>{s()},t)}),ke},isStarted:()=>typeof ke.percent=="number",start:()=>{ke.percent||ke.set(0);const e=()=>{setTimeout(()=>{ke.percent&&(ke.trickle(),e())},kt.trickleSpeed)};return e(),ke},done:e=>!e&&!ke.percent?ke:ke.increase(.3+.5*Math.random()).set(1),increase:e=>{let{percent:t}=ke;return t?(t=$r(t+(typeof e=="number"?e:(1-t)*$r(Math.random()*t,.1,.95)),0,.994),ke.set(t)):ke.start()},trickle:()=>ke.increase(Math.random()*kt.trickleRate),render:e=>{if(ke.isRendered())return document.getElementById("nprogress");ps(document.documentElement,"nprogress-busy");const t=document.createElement("div");t.id="nprogress",t.innerHTML=kt.template;const n=t.querySelector(kt.barSelector),o=document.querySelector(kt.parent),r=e?"-100":vs(ke.percent??0);return Do(n,{transition:"all 0 linear",transform:`translate3d(${r}%,0,0)`}),o&&(o!==document.body&&ps(o,"nprogress-custom-parent"),o.appendChild(t)),t},remove:()=>{hs(document.documentElement,"nprogress-busy"),hs(document.querySelector(kt.parent),"nprogress-custom-parent"),Wm(document.getElementById("nprogress"))}},Gm=()=>{Pe(()=>{const e=mn(),t=new Set;t.add(e.currentRoute.value.path),e.beforeEach(n=>{t.has(n.path)||ke.start()}),e.afterEach(n=>{t.add(n.path),ke.done()})})},Km=$t({setup(){Gm()}}),Ym=Object.freeze(Object.defineProperty({__proto__:null,default:Km},Symbol.toStringTag,{value:"Module"}));function Jm(e,t,n){var o,r,l;n===void 0&&(n={});var i=(o=n.isImmediate)!=null&&o,s=(r=n.callback)!=null&&r,a=n.maxWait,c=Date.now(),u=[];function d(){if(a!==void 0){var h=Date.now()-c;if(h+t>=a)return a-h}return t}var p=function(){var h=[].slice.call(arguments),b=this;return new Promise(function(y,w){var S=i&&l===void 0;if(l!==void 0&&clearTimeout(l),l=setTimeout(function(){if(l=void 0,c=Date.now(),!i){var g=e.apply(b,h);s&&s(g),u.forEach(function(E){return(0,E.resolve)(g)}),u=[]}},d()),S){var _=e.apply(b,h);return s&&s(_),y(_)}u.push({resolve:y,reject:w})})};return p.cancel=function(h){l!==void 0&&clearTimeout(l),u.forEach(function(b){return(0,b.reject)(h)}),u=[]},p}var Qm={appId:"34YFD9IUQ2",apiKey:"9a9058b8655746634e01071411c366b8",indexName:"vuepress",searchParameters:{facetFilters:["tags:v2"]},locales:{"/":{},"/zh/":{placeholder:"搜索文档",translations:{button:{buttonText:"搜索文档",buttonAriaLabel:"搜索文档"},modal:{searchBox:{searchInputLabel:"搜索",resetButtonTitle:"清除查询条件",resetButtonAriaLabel:"清除查询条件",cancelButtonText:"取消",cancelButtonAriaLabel:"取消"},startScreen:{recentSearchesTitle:"搜索历史",noRecentSearchesText:"没有搜索历史",saveRecentSearchButtonTitle:"保存至搜索历史",removeRecentSearchButtonTitle:"从搜索历史中移除",favoriteSearchesTitle:"收藏",removeFavoriteSearchButtonTitle:"从收藏中移除"},errorScreen:{titleText:"无法获取结果",helpText:"你可能需要检查你的网络连接"},footer:{selectText:"选择",selectKeyAriaLabel:"选择一个结果",navigateText:"切换",navigateUpKeyAriaLabel:"上箭头",navigateDownKeyAriaLabel:"下箭头",closeText:"关闭",closeKeyAriaLabel:"ESC 键",searchByText:"搜索提供者"},noResultsScreen:{noResultsText:"无法找到相关结果",suggestedQueryText:"你可以尝试查询",reportMissingResultsText:"你认为该查询应该有结果?",reportMissingResultsLinkText:"点击反馈"}}}}}};const Xm=e=>{de("keydown",t=>{const n=t.key==="k"&&(t.ctrlKey||t.metaKey);t.key!=="/"&&!n||(t.preventDefault(),e())},{once:!0})},Zm=()=>{const e=mn();return{transformItems:t=>t.map(n=>({...n,url:`/${Ll(fp(n.url,"/"))}`})),navigator:{navigate:({itemUrl:t})=>{e.push(t.replace("/","/"))}},transformSearchClient:t=>({...t,search:Jm(t.search,500)})}},eg=Qm,tg=ae(eg),Rc=Symbol(""),ng=()=>{const e=Ie(Rc),t=Et();return k(()=>{var n;return{...e.value,...(n=e.value.locales)==null?void 0:n[t.value]}})},og=e=>{e.provide(Rc,po(tg))},rg=(e,t=[])=>[`lang:${e}`,...Array.isArray(t)?t:[t]],lg=({buttonText:e="Search",buttonAriaLabel:t=e}={})=>``,Oc=()=>{if(document.querySelector(".DocSearch-Modal"))return;const e=new Event("keydown");e.key="k",e.metaKey=!0,window.dispatchEvent(e),setTimeout(Oc,16)},ig=e=>{const t="algolia-preconnect";("requestIdleCallback"in window?window.requestIdleCallback:setTimeout)(()=>{if(document.head.querySelector(`#${t}`))return;const n=document.createElement("link");n.id=t,n.rel="preconnect",n.href=`https://${e}-dsn.algolia.net`,n.crossOrigin="",document.head.appendChild(n)})},sg=K({name:"DocSearch",props:{containerId:{type:String,default:"docsearch-container"},options:{type:Object,default:()=>({})}},setup(e){const t=ng(),n=Zm(),o=cr(),r=Et(),l=ae(!1),i=ae(!1),s=k(()=>{const{locales:u={},...d}=e.options;return{...t.value,...d,...u[r.value]}}),a=async()=>{const{default:u}=await D(async()=>{const{default:p}=await import("./index-B-M8YVCw.js");return{default:p}},[]),{searchParameters:d}=s.value;u({...n,...s.value,container:`#${e.containerId}`,searchParameters:{...d,facetFilters:rg(o.value,d==null?void 0:d.facetFilters)}}),l.value=!0},c=()=>{i.value||l.value||(i.value=!0,a(),Oc(),xe(r,a))};return Xm(c),Pe(()=>{ig(s.value.appId)}),()=>{var u;return[f("div",{id:e.containerId,style:{display:l.value?"block":"none"}}),l.value?null:f("div",{onClick:c,innerHTML:lg((u=s.value.translations)==null?void 0:u.button)})]}}}),ag={enhance({app:e}){og(e),e.component("SearchBox",sg)}},cg=Object.freeze(Object.defineProperty({__proto__:null,default:ag},Symbol.toStringTag,{value:"Module"})),Ic="VUEPRESS_REDIRECT_STATUS",ms=gv(Ic,{}),gs=wv(Ic,{}),ug=e=>{const t=bv(),n=Et(),o=Fl(e.config);return k(()=>{if(o.some(([r])=>n.value===r)){for(const r of t.value)for(const[l,i]of o)if(i.includes(r))return l===n.value?null:{lang:r,localePath:l}}return null})};var fg=K({name:"RedirectModal",props:{config:{type:Object,required:!0},locales:{type:Object,required:!0}},setup(e){const t=mn(),n=wo(),o=Et(),r=ug(e.config),l=ae(),i=zl(l),s=ae(!1),a=k(()=>{if(!r.value)return null;const{lang:u,localePath:d}=r.value,p=[e.locales[d],e.locales[o.value]];return{hint:p.map(({hint:h})=>h.replace("$1",u)),switch:p.map(({switch:h})=>h.replace("$1",u)).join(" / "),cancel:p.map(({cancel:h})=>h).join(" / "),remember:p.map(({remember:h})=>h).join(" / ")}}),c=()=>{gs.value[o.value]=!0,s.value&&(ms.value[o.value]=!0),i.value=!1};return xe(n,()=>{i.value=!1}),Pe(async()=>{l.value=document.body,await hn(),r.value&&!gs.value[o.value]&&!ms.value[o.value]&&(i.value=!0)}),El(()=>{i.value=!1}),()=>f(Ga,{name:"fade-in-scale-up"},()=>{var u,d,p,h;return i.value?f("div",{key:"mask",class:"redirect-modal-mask"},f("div",{key:"popup",class:"redirect-modal-wrapper"},[f("div",{class:"redirect-modal-content"},(u=a.value)==null?void 0:u.hint.map(b=>f("p",b))),f("div",{class:"redirect-modal-hint"},[f("input",{id:"remember-redirect",type:"checkbox",value:s.value,onChange:()=>{s.value=!s.value}}),f("label",{for:"remember-redirect"},(d=a.value)==null?void 0:d.remember)]),f("button",{type:"button",class:"redirect-modal-action primary",onClick:()=>{c(),t.replace(n.value.replace(o.value,r.value.localePath))}},(p=a.value)==null?void 0:p.switch),f("button",{type:"button",class:"redirect-modal-action",onClick:()=>{c()}},(h=a.value)==null?void 0:h.cancel)])):null})}}),dg={config:{"/":["en-US"],"/zh/":["zh-CN"]},autoLocale:!1,defaultLocale:"/zh/",localeFallback:!0,defaultBehavior:"defaultLocale"},pg={"/":{name:"English",hint:"Your primary language is $1, do you want to switch to it?",switch:"Switch to $1",cancel:"Cancel",remember:"Remember my choice"},"/zh/":{name:"简体中文",hint:"您的首选语言是 $1,是否切换到该语言?",switch:"切换到 $1",cancel:"取消",remember:"记住我的选择"}};const Mc=dg;var hg=$t({setup(){},rootComponents:[()=>f(fg,{config:Mc,locales:pg})]});const vg=Object.freeze(Object.defineProperty({__proto__:null,config:Mc,default:hg},Symbol.toStringTag,{value:"Module"}));var bs={"/":{word:"About $word words",less1Minute:"Less than 1 minute",time:"About $time min"},"/zh/":{word:"约 $word 字",less1Minute:"小于 1 分钟",time:"大约 $time 分钟"}};const $c=()=>{const e=It();return k(()=>e.value.readingTime??null)},mg=(e,t)=>{const{minutes:n,words:o}=e,{less1Minute:r,word:l,time:i}=t;return{time:n<1?r:i.replace("$time",Math.round(n).toString()),words:l.replace("$word",o.toString())}},ys={words:"",time:""},el=typeof bs>"u"?null:bs,gg=()=>el?zn(el):k(()=>null),bg=()=>{if(el===null)return k(()=>ys);const e=$c(),t=gg();return k(()=>e.value&&t.value?mg(e.value,t.value):ys)},tl=()=>null,Ae=({name:e="",color:t="currentColor",ariaLabel:n},{attrs:o,slots:r})=>f("svg",{xmlns:"http://www.w3.org/2000/svg",class:["icon",`${e}-icon`],viewBox:"0 0 1024 1024",fill:t,"aria-label":n??`${e} icon`,...o},r.default());Ae.displayName="IconBase";const yg=e=>_o(e)?e:`https://github.com/${e}`,Wl=(e="")=>!_o(e)||e.includes("github.com")?"GitHub":e.includes("bitbucket.org")?"Bitbucket":e.includes("gitlab.com")?"GitLab":e.includes("gitee.com")?"Gitee":null,Dc=()=>f(Ae,{name:"github"},()=>f("path",{d:"M511.957 21.333C241.024 21.333 21.333 240.981 21.333 512c0 216.832 140.544 400.725 335.574 465.664 24.49 4.395 32.256-10.07 32.256-23.083 0-11.69.256-44.245 0-85.205-136.448 29.61-164.736-64.64-164.736-64.64-22.315-56.704-54.4-71.765-54.4-71.765-44.587-30.464 3.285-29.824 3.285-29.824 49.195 3.413 75.179 50.517 75.179 50.517 43.776 75.008 114.816 53.333 142.762 40.79 4.523-31.66 17.152-53.377 31.19-65.537-108.971-12.458-223.488-54.485-223.488-242.602 0-53.547 19.114-97.323 50.517-131.67-5.035-12.33-21.93-62.293 4.779-129.834 0 0 41.258-13.184 134.912 50.346a469.803 469.803 0 0 1 122.88-16.554c41.642.213 83.626 5.632 122.88 16.554 93.653-63.488 134.784-50.346 134.784-50.346 26.752 67.541 9.898 117.504 4.864 129.834 31.402 34.347 50.474 78.123 50.474 131.67 0 188.586-114.73 230.016-224.042 242.09 17.578 15.232 33.578 44.672 33.578 90.454v135.85c0 13.142 7.936 27.606 32.854 22.87C862.25 912.597 1002.667 728.747 1002.667 512c0-271.019-219.648-490.667-490.71-490.667z"}));Dc.displayName="GitHubIcon";const Nc=()=>f(Ae,{name:"gitee"},()=>f("path",{d:"M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm242.97-533.34H482.39a23.7 23.7 0 0 0-23.7 23.7l-.03 59.28c0 13.08 10.59 23.7 23.7 23.7h165.96a23.7 23.7 0 0 1 23.7 23.7v11.85a71.1 71.1 0 0 1-71.1 71.1H375.71a23.7 23.7 0 0 1-23.7-23.7V423.11a71.1 71.1 0 0 1 71.1-71.1h331.8a23.7 23.7 0 0 0 23.7-23.7l.06-59.25a23.73 23.73 0 0 0-23.7-23.73H423.11a177.78 177.78 0 0 0-177.78 177.75v331.83c0 13.08 10.62 23.7 23.7 23.7h349.62a159.99 159.99 0 0 0 159.99-159.99V482.33a23.7 23.7 0 0 0-23.7-23.7z"}));Nc.displayName="GiteeIcon";const Hc=()=>f(Ae,{name:"bitbucket"},()=>f("path",{d:"M575.256 490.862c6.29 47.981-52.005 85.723-92.563 61.147-45.714-20.004-45.714-92.562-1.133-113.152 38.29-23.442 93.696 7.424 93.696 52.005zm63.451-11.996c-10.276-81.152-102.29-134.839-177.152-101.156-47.433 21.138-79.433 71.424-77.129 124.562 2.853 69.705 69.157 126.866 138.862 120.576S647.3 548.571 638.708 478.83zm136.558-309.723c-25.161-33.134-67.986-38.839-105.728-45.13-106.862-17.151-216.576-17.7-323.438 1.134-35.438 5.706-75.447 11.996-97.719 43.996 36.572 34.304 88.576 39.424 135.424 45.129 84.553 10.862 171.447 11.447 256 .585 47.433-5.705 99.987-10.276 135.424-45.714zm32.585 591.433c-16.018 55.99-6.839 131.438-66.304 163.986-102.29 56.576-226.304 62.867-338.87 42.862-59.43-10.862-129.135-29.696-161.72-85.723-14.3-54.858-23.442-110.848-32.585-166.84l3.438-9.142 10.276-5.157c170.277 112.567 408.576 112.567 579.438 0 26.844 8.01 6.84 40.558 6.29 60.014zm103.424-549.157c-19.42 125.148-41.728 249.71-63.415 374.272-6.29 36.572-41.728 57.162-71.424 72.558-106.862 53.724-231.424 62.866-348.562 50.286-79.433-8.558-160.585-29.696-225.134-79.433-30.28-23.443-30.28-63.415-35.986-97.134-20.005-117.138-42.862-234.277-57.161-352.585 6.839-51.42 64.585-73.728 107.447-89.71 57.16-21.138 118.272-30.866 178.87-36.571 129.134-12.58 261.157-8.01 386.304 28.562 44.581 13.13 92.563 31.415 122.844 69.705 13.714 17.7 9.143 40.01 6.29 60.014z"}));Hc.displayName="BitbucketIcon";const Vc=()=>f(Ae,{name:"source"},()=>f("path",{d:"M601.92 475.2c0 76.428-8.91 83.754-28.512 99.594-14.652 11.88-43.956 14.058-78.012 16.434-18.81 1.386-40.392 2.97-62.172 6.534-18.612 2.97-36.432 9.306-53.064 17.424V299.772c37.818-21.978 63.36-62.766 63.36-109.692 0-69.894-56.826-126.72-126.72-126.72S190.08 120.186 190.08 190.08c0 46.926 25.542 87.714 63.36 109.692v414.216c-37.818 21.978-63.36 62.766-63.36 109.692 0 69.894 56.826 126.72 126.72 126.72s126.72-56.826 126.72-126.72c0-31.086-11.286-59.598-29.7-81.576 13.266-9.504 27.522-17.226 39.996-19.206 16.038-2.574 32.868-3.762 50.688-5.148 48.312-3.366 103.158-7.326 148.896-44.55 61.182-49.698 74.25-103.158 75.24-187.902V475.2h-126.72zM316.8 126.72c34.848 0 63.36 28.512 63.36 63.36s-28.512 63.36-63.36 63.36-63.36-28.512-63.36-63.36 28.512-63.36 63.36-63.36zm0 760.32c-34.848 0-63.36-28.512-63.36-63.36s28.512-63.36 63.36-63.36 63.36 28.512 63.36 63.36-28.512 63.36-63.36 63.36zM823.68 158.4h-95.04V63.36h-126.72v95.04h-95.04v126.72h95.04v95.04h126.72v-95.04h95.04z"}));Vc.displayName="SourceIcon";const _g=({link:e,type:t=Wl(e??"")})=>{if(!t)return null;const n=t.toLowerCase();return f(n==="bitbucket"?Hc:n==="github"?Dc:n==="gitlab"?"GitLab":n==="gitee"?Nc:Vc)},wg=(e,t=0)=>{let n=3735928559^t,o=1103547991^t;for(let r=0,l;r>>16,2246822507),n^=Math.imul(o^o>>>13,3266489909),o=Math.imul(o^o>>>16,2246822507),o^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&o)+(n>>>0)},jc=(e,t)=>wg(e)%t,zc=/#.*$/u,Eg=e=>{const t=zc.exec(e);return t?t[0]:""},_s=e=>decodeURI(e).replace(zc,"").replace(/\/index\.html$/iu,"/").replace(/\/(README|index)\.md$/iu,"/").replace(/\.(?:html|md)$/iu,""),Fc=(e,t)=>{if(!wc(t))return!1;const n=_s(e.path),o=_s(t),r=Eg(t);return r?r===e.hash&&(!o||n===o):n===o},Sg="719px",Tg="1440px",kg="9",Ul={mobileBreakPoint:Sg,pcBreakPoint:Tg,colorNumber:kg},Bc=()=>{const e=ye();return k(()=>e.value.author)},xg="http://.",ql=()=>{const e=mn(),t=Ot();return n=>{if(!n)return;if(yo(n))return window.open(n);if(Bl(n))return t.fullPath===n?void 0:void e.push(n);const o=t.path.slice(0,t.path.lastIndexOf("/"));return void e.push(new URL(`${o}/${encodeURI(n)}`,xg).pathname)}},Dt=()=>Tc(),ye=()=>Xv(),ws=e=>Vn(e)&&_e(e.name),Es=(e,t=!1)=>e?dn(e)?e.map(n=>_e(n)?{name:n}:ws(n)?n:null).filter(n=>n!==null):_e(e)?[{name:e}]:ws(e)?[e]:(console.error(`Expect "author" to be \`AuthorInfo[] | AuthorInfo | string[] | string ${t?"":"| false"} | undefined\`, but got`,e),[]):[],Wc=(e,t)=>{if(e){if(dn(e)&&e.every(_e))return e;if(_e(e))return[e];console.error(`Expect ${t} to be \`string[] | string | undefined\`, but got`,e)}return[]},Cg=e=>Wc(e,"category"),Pg=e=>Wc(e,"tag"),Uc=()=>{const e=Se(),t=Bc();return k(()=>{const{author:n}=e.value;return n?Es(n):n===!1?[]:Es(t.value,!1)})},Ag=()=>{const e=Se();return k(()=>Cg(e.value.category??e.value.categories).map(t=>({name:t,path:""})))},Lg=()=>{const e=Se();return k(()=>Pg(e.value.tag??e.value.tags).map(t=>({name:t,path:""})))},Rg=()=>{const e=Se(),t=It();return k(()=>{const n=Av(e.value.date);if(n)return n;const{createdTime:o}=t.value.git??{};return o?new Date(o):null})},Og=()=>{const e=ye(),t=Se(),n=Uc(),o=Ag(),r=Lg(),l=Rg(),i=$c(),s=bg(),a=k(()=>({author:n.value,category:o.value,date:l.value,tag:r.value,isOriginal:t.value.isOriginal??!1,readingTime:i.value,readingTimeLocale:s.value,pageview:t.value.pageview??!0})),c=k(()=>t.value.pageInfo??e.value.pageInfo??null);return{info:a,items:c}},at=()=>{const e=Dt();return k(()=>!!e.value.pure)},qc=()=>f(Ae,{name:"author"},()=>f("path",{d:"M649.6 633.6c86.4-48 147.2-144 147.2-249.6 0-160-128-288-288-288s-288 128-288 288c0 108.8 57.6 201.6 147.2 249.6-121.6 48-214.4 153.6-240 288-3.2 9.6 0 19.2 6.4 25.6 3.2 9.6 12.8 12.8 22.4 12.8h704c9.6 0 19.2-3.2 25.6-12.8 6.4-6.4 9.6-16 6.4-25.6-25.6-134.4-121.6-240-243.2-288z"}));qc.displayName="AuthorIcon";const Gc=()=>f(Ae,{name:"calendar"},()=>f("path",{d:"M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z"}));Gc.displayName="CalendarIcon";const Kc=()=>f(Ae,{name:"category"},()=>f("path",{d:"M148.41 106.992h282.176c22.263 0 40.31 18.048 40.31 40.31V429.48c0 22.263-18.047 40.31-40.31 40.31H148.41c-22.263 0-40.311-18.047-40.311-40.31V147.302c0-22.263 18.048-40.31 40.311-40.31zM147.556 553.478H429.73c22.263 0 40.311 18.048 40.311 40.31v282.176c0 22.263-18.048 40.312-40.31 40.312H147.555c-22.263 0-40.311-18.049-40.311-40.312V593.79c0-22.263 18.048-40.311 40.31-40.311zM593.927 106.992h282.176c22.263 0 40.31 18.048 40.31 40.31V429.48c0 22.263-18.047 40.31-40.31 40.31H593.927c-22.263 0-40.311-18.047-40.311-40.31V147.302c0-22.263 18.048-40.31 40.31-40.31zM730.22 920.502H623.926c-40.925 0-74.22-33.388-74.22-74.425V623.992c0-41.038 33.387-74.424 74.425-74.424h222.085c41.038 0 74.424 33.226 74.424 74.067v114.233c0 10.244-8.304 18.548-18.547 18.548s-18.548-8.304-18.548-18.548V623.635c0-20.388-16.746-36.974-37.33-36.974H624.13c-20.585 0-37.331 16.747-37.331 37.33v222.086c0 20.585 16.654 37.331 37.126 37.331H730.22c10.243 0 18.547 8.304 18.547 18.547 0 10.244-8.304 18.547-18.547 18.547z"}));Kc.displayName="CategoryIcon";const Yc=()=>f(Ae,{name:"print"},()=>f("path",{d:"M819.2 364.8h-44.8V128c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v236.8h-44.8C145.067 364.8 96 413.867 96 473.6v192c0 59.733 49.067 108.8 108.8 108.8h44.8V896c0 17.067 14.933 32 32 32h460.8c17.067 0 32-14.933 32-32V774.4h44.8c59.733 0 108.8-49.067 108.8-108.8v-192c0-59.733-49.067-108.8-108.8-108.8zM313.6 160h396.8v204.8H313.6V160zm396.8 704H313.6V620.8h396.8V864zM864 665.6c0 25.6-19.2 44.8-44.8 44.8h-44.8V588.8c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v121.6h-44.8c-25.6 0-44.8-19.2-44.8-44.8v-192c0-25.6 19.2-44.8 44.8-44.8h614.4c25.6 0 44.8 19.2 44.8 44.8v192z"}));Yc.displayName="PrintIcon";const Jc=()=>f(Ae,{name:"tag"},()=>f("path",{d:"M939.902 458.563L910.17 144.567c-1.507-16.272-14.465-29.13-30.737-30.737L565.438 84.098h-.402c-3.215 0-5.726 1.005-7.634 2.913l-470.39 470.39a10.004 10.004 0 000 14.164l365.423 365.424c1.909 1.908 4.42 2.913 7.132 2.913s5.223-1.005 7.132-2.913l470.39-470.39c2.01-2.11 3.014-5.023 2.813-8.036zm-240.067-72.121c-35.458 0-64.286-28.828-64.286-64.286s28.828-64.285 64.286-64.285 64.286 28.828 64.286 64.285-28.829 64.286-64.286 64.286z"}));Jc.displayName="TagIcon";const Qc=()=>f(Ae,{name:"timer"},()=>f("path",{d:"M799.387 122.15c4.402-2.978 7.38-7.897 7.38-13.463v-1.165c0-8.933-7.38-16.312-16.312-16.312H256.33c-8.933 0-16.311 7.38-16.311 16.312v1.165c0 5.825 2.977 10.874 7.637 13.592 4.143 194.44 97.22 354.963 220.201 392.763-122.204 37.542-214.893 196.511-220.2 389.397-4.661 5.049-7.638 11.651-7.638 19.03v5.825h566.49v-5.825c0-7.379-2.849-13.981-7.509-18.9-5.049-193.016-97.867-351.985-220.2-389.527 123.24-37.67 216.446-198.453 220.588-392.892zM531.16 450.445v352.632c117.674 1.553 211.787 40.778 211.787 88.676H304.097c0-48.286 95.149-87.382 213.728-88.676V450.445c-93.077-3.107-167.901-81.297-167.901-177.093 0-8.803 6.99-15.793 15.793-15.793 8.803 0 15.794 6.99 15.794 15.793 0 80.261 63.69 145.635 142.01 145.635s142.011-65.374 142.011-145.635c0-8.803 6.99-15.793 15.794-15.793s15.793 6.99 15.793 15.793c0 95.019-73.789 172.82-165.96 177.093z"}));Qc.displayName="TimerIcon";const Xc=()=>f(Ae,{name:"word"},()=>[f("path",{d:"M518.217 432.64V73.143A73.143 73.143 0 01603.43 1.097a512 512 0 01419.474 419.474 73.143 73.143 0 01-72.046 85.212H591.36a73.143 73.143 0 01-73.143-73.143z"}),f("path",{d:"M493.714 566.857h340.297a73.143 73.143 0 0173.143 85.577A457.143 457.143 0 11371.566 117.76a73.143 73.143 0 0185.577 73.143v339.383a36.571 36.571 0 0036.571 36.571z"})]);Xc.displayName="WordIcon";const Qt=()=>{const e=ye();return k(()=>e.value.metaLocales)};var Ig=K({name:"AuthorInfo",inheritAttrs:!1,props:{author:{type:Array,required:!0}},setup(e){const t=Qt(),n=at();return()=>e.author.length?f("span",{class:"page-author-info","aria-label":`${t.value.author}${n.value?"":"🖊"}`,...n.value?{}:{"data-balloon-pos":"up"}},[f(qc),f("span",e.author.map(o=>o.url?f("a",{class:"page-author-item",href:o.url,target:"_blank",rel:"noopener noreferrer"},o.name):f("span",{class:"page-author-item"},o.name))),f("span",{property:"author",content:e.author.map(o=>o.name).join(", ")})]):null}}),Mg=K({name:"CategoryInfo",inheritAttrs:!1,props:{category:{type:Array,required:!0}},setup(e){const t=Qt(),n=ql(),o=at();return()=>e.category.length?f("span",{class:"page-category-info","aria-label":`${t.value.category}${o.value?"":"🌈"}`,...o.value?{}:{"data-balloon-pos":"up"}},[f(Kc),e.category.map(({name:r,path:l})=>f("span",{class:["page-category-item",{[`color${jc(r,Number(Ul.colorNumber))}`]:!o.value,clickable:l}],role:l?"navigation":"",onClick:()=>{l&&n(l)}},r)),f("meta",{property:"articleSection",content:e.category.map(({name:r})=>r).join(",")})]):null}}),$g=K({name:"DateInfo",inheritAttrs:!1,props:{date:Object},setup(e){const t=cr(),n=Qt(),o=at(),r=k(()=>new Intl.DateTimeFormat(t.value,{dateStyle:"short"})),l=k(()=>e.date?r.value.format(e.date):null);return()=>e.date?f("span",{class:"page-date-info","aria-label":`${n.value.date}${o.value?"":"📅"}`,...o.value?{}:{"data-balloon-pos":"up"}},[f(Gc),f("span",{"data-allow-mismatch":"text"},l.value),f("meta",{property:"datePublished",content:e.date.toISOString()||""})]):null}}),Dg=K({name:"OriginalInfo",inheritAttrs:!1,props:{isOriginal:Boolean},setup(e){const t=Qt();return()=>e.isOriginal?f("span",{class:"page-original-info"},t.value.origin):null}}),Ng=K({name:"ReadingTimeInfo",inheritAttrs:!1,props:{readingTime:Object,readingTimeLocale:Object},setup(e){const t=Qt(),n=at(),o=k(()=>{if(!e.readingTime)return null;const{minutes:r}=e.readingTime;return r<1?"PT1M":`PT${Math.round(r)}M`});return()=>{var r;return(r=e.readingTimeLocale)!=null&&r.time?f("span",{class:"page-reading-time-info","aria-label":`${t.value.readingTime}${n.value?"":"⌛"}`,...n.value?{}:{"data-balloon-pos":"up"}},[f(Qc),f("span",e.readingTimeLocale.time),f("meta",{property:"timeRequired",content:o.value})]):null}}}),Hg=K({name:"TagInfo",inheritAttrs:!1,props:{tag:Array},setup(e){const t=Qt(),n=ql(),o=at();return()=>{var r;return(r=e.tag)!=null&&r.length?f("span",{class:"page-tag-info","aria-label":`${t.value.tag}${o.value?"":"🏷"}`,...o.value?{}:{"data-balloon-pos":"up"}},[f(Jc),e.tag.map(({name:l,path:i})=>f("span",{class:["page-tag-item",{[`color${jc(l,Number(Ul.colorNumber))}`]:!o.value,clickable:i}],role:i?"navigation":"",onClick:()=>{i&&n(i)}},l)),f("meta",{property:"keywords",content:e.tag.map(({name:l})=>l).join(",")})]):null}}}),Vg=K({name:"ReadTimeInfo",inheritAttrs:!1,props:{readingTime:Object,readingTimeLocale:Object},setup(e){const t=Qt(),n=at();return()=>{var o,r;return(o=e.readingTimeLocale)!=null&&o.words?f("span",{class:"page-word-info","aria-label":`${t.value.words}${n.value?"":"🔠"}`,...n.value?{}:{"data-balloon-pos":"up"}},[f(Xc),f("span",e.readingTimeLocale.words),f("meta",{property:"wordCount",content:(r=e.readingTime)==null?void 0:r.words})]):null}}}),jg=K({name:"PageInfo",components:{AuthorInfo:Ig,CategoryInfo:Mg,DateInfo:$g,OriginalInfo:Dg,PageViewInfo:tl,ReadingTimeInfo:Ng,TagInfo:Hg,WordInfo:Vg},props:{items:[Boolean,Array],info:{type:Object,required:!0}},setup(e){const t=at();return()=>{const n=e.items??["Author","Original","Date","PageView","ReadingTime","Category","Tag"];return n?f("div",{class:"page-info"},n.map(o=>f(Ee(`${o}Info`),{...e.info,isPure:t.value}))):null}}});const Gl={},Zc=()=>{const e=Se(),t=ye(),n=k(()=>e.value.changelog??((t.value.changelog??!1)&&!e.value.home)),o=k(()=>{const{contributors:l,home:i}=e.value;return dn(l)?i?!1:t.value.contributors??!0:l??(i?!1:t.value.contributors??!0)}),r=k(()=>e.value.lastUpdated??t.value.lastUpdated??!0);return{changelog:n,contributors:o,lastUpdated:r}},Kl=(e,t)=>t.activeMatch?new RegExp(t.activeMatch,"u").test(e.path):Fc(e,t.link),Yl=(e,t)=>"children"in t?!!t.prefix&&Fc(e,t.prefix)||t.children.some(n=>Yl(e,n)):Kl(e,t),nl=e=>!yo(e)&&!Pl(e),Qo=(e,t=!1,n)=>{const{meta:o,path:r,notFound:l}=At(e,n);return l?{text:r,link:r}:{text:!t&&o.shortTitle?o.shortTitle:o.title||r,link:r,icon:o.icon}},on=(e="",t="")=>yo(t)||Bl(t)?t:`${Ya(e)}${t}`,eu=(e,t)=>{const n=_e(e)?Qo(on(t,e)):e.link?{...e,link:nl(e.link)?At(on(t,e.link)).path:e.link}:e;if("children"in n){const o=on(t,n.prefix),r=n.children==="structure"?Gl[o]:n.children;return{...n,prefix:o,children:r.map(l=>eu(l,o))}}return{...n}},ol=({config:e,prefix:t=""})=>e.map(n=>eu(n,t)),zg=({config:e,routePath:t})=>{const n=dr(e).sort((o,r)=>r.length-o.length);for(const o of n)if(Jo(decodeURI(t),o)){const r=e[o];return ol({config:r==="structure"?Gl[o]:r||[],prefix:o})}return console.warn(`${decodeURI(t)} is missing it's sidebar config.`),[]},Fg=({config:e,routeLocale:t,routePath:n})=>e==="structure"?ol({config:Gl[t],prefix:t}):dn(e)?ol({config:e}):Vn(e)?zg({config:e,routePath:n}):[],tu=Symbol(""),Bg=()=>{const e=Se(),t=ye(),n=Et(),o=wo(),r=k(()=>e.value.home?!1:e.value.sidebar??t.value.sidebar??"structure"),l=k(()=>Fg({config:r.value,routeLocale:n.value,routePath:o.value}));Rn(tu,l)},Jl=()=>{const e=Ie(tu);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},{mobileBreakPoint:Wg,pcBreakPoint:Ug}=Ul,Ss=e=>e.endsWith("px")?Number(e.slice(0,-2)):null,pr=()=>{const e=ae(!1),t=ae(!1),n=()=>{e.value=window.innerWidth<=(Ss(Wg)??719),t.value=window.innerWidth>=(Ss(Ug)??1440)};return de("resize",n,!1),de("orientationchange",n,!1),Pe(()=>{n()}),{isMobile:e,isPC:t}},nu=Symbol(""),To=()=>{const e=Ie(nu);if(!e)throw new Error("useDarkMode() is called without provider.");return e},qg=e=>{const t=uv(),n=Dt(),o=k(()=>n.value.darkmode??"switch"),r=ur("vuepress-theme-hope-scheme","auto"),l=k(()=>{const s=o.value;return s==="disable"?!1:s==="enable"?!0:s==="auto"?t.value:s==="toggle"?r.value==="dark":r.value==="dark"||r.value==="auto"&&t.value}),i=k(()=>{const s=o.value;return s==="switch"||s==="toggle"});e.provide(nu,{canToggle:i,config:o,isDarkMode:l,status:r}),Object.defineProperties(e.config.globalProperties,{$isDarkMode:{get:()=>l.value}})},Gg=()=>{const{config:e,isDarkMode:t,status:n}=To();Tl(()=>{e.value==="disable"?n.value="light":e.value==="enable"?n.value="dark":e.value==="toggle"&&n.value==="auto"&&(n.value="light")}),de("beforeprint",()=>{t.value&&document.documentElement.setAttribute("data-theme","light")}),de("afterprint",()=>{t.value&&document.documentElement.setAttribute("data-theme","dark")}),Pe(()=>{wt(t,o=>{document.documentElement.setAttribute("data-theme",o?"dark":"light")})})};var Kg=K({name:"PageFooter",setup(){const e=Dt(),t=ye(),n=Se(),o=Uc(),r=k(()=>{const{copyright:c,footer:u}=n.value;return u!==!1&&!!(c||u||t.value.displayFooter)}),l=k(()=>{const{footer:c}=n.value;return _e(c)?c:t.value.footer??""}),i=k(()=>o.value.map(({name:c})=>c).join(", ")),s=c=>`Copyright © ${new Date().getFullYear()} ${i.value} ${c?`${c} Licensed`:""}`,a=k(()=>{const{copyright:c,license:u=""}=n.value,{license:d}=e.value,{copyright:p}=t.value;return c??(u?s(u):p??(i.value||d?s(d):!1))});return()=>r.value?f("footer",{class:"vp-footer-wrapper","vp-footer":""},[l.value?f("div",{class:"vp-footer",innerHTML:l.value}):null,a.value?f("div",{class:"vp-copyright",innerHTML:a.value}):null]):null}}),We=K({name:"AutoLink",props:{config:{type:Object,required:!0},iconSizing:{type:String,default:"both"}},emits:["focusout"],slots:Object,setup(e,{emit:t,slots:n}){return()=>{const{icon:o}=e.config;return f(Rh,{...e,onFocusout:()=>{t("focusout")}},{default:n.default,before:n.before??(o?()=>f(Ee("VPIcon"),{icon:o,sizing:e.iconSizing}):null),after:n.after})}}}),ou=K({name:"NavbarDropdown",props:{config:{type:Object,required:!0}},slots:Object,setup(e,{slots:t}){const n=ho(e,"config"),o=k(()=>n.value.ariaLabel??n.value.text),r=ae(!1),l=i=>{i.detail===0&&(r.value=!r.value)};return Mt(()=>{r.value=!1}),()=>{var i;return f("div",{class:["vp-dropdown-wrapper",{open:r.value}]},[f("button",{type:"button",class:"vp-dropdown-title","aria-label":o.value,onClick:l},[((i=t.title)==null?void 0:i.call(t))??[f(Ee("VPIcon"),{icon:n.value.icon}),e.config.text],f("span",{class:"arrow"}),f("ul",{class:"vp-dropdown"},n.value.children.map((s,a)=>{const c=a===n.value.children.length-1;return f("li",{class:"vp-dropdown-item"},"children"in s?[f("h4",{class:"vp-dropdown-subtitle"},s.link?f(We,{config:s,onFocusout:()=>{s.children.length===0&&c&&(r.value=!1)}}):s.text),f("ul",{class:"vp-dropdown-subitems"},s.children.map((u,d)=>f("li",{class:"vp-dropdown-subitem"},f(We,{config:u,onFocusout:()=>{d===s.children.length-1&&c&&(r.value=!1)}}))))]:f(We,{config:s,onFocusout:()=>{c&&(r.value=!1)}}))}))])])}}});const ru=()=>f(Ae,{name:"i18n"},()=>[f("path",{d:"M379.392 460.8 494.08 575.488l-42.496 102.4L307.2 532.48 138.24 701.44l-71.68-72.704L234.496 460.8l-45.056-45.056c-27.136-27.136-51.2-66.56-66.56-108.544h112.64c7.68 14.336 16.896 27.136 26.112 35.84l45.568 46.08 45.056-45.056C382.976 312.32 409.6 247.808 409.6 204.8H0V102.4h256V0h102.4v102.4h256v102.4H512c0 70.144-37.888 161.28-87.04 210.944L378.88 460.8zM576 870.4 512 1024H409.6l256-614.4H768l256 614.4H921.6l-64-153.6H576zM618.496 768h196.608L716.8 532.48 618.496 768z"})]);ru.displayName="I18nIcon";const lu=(e,t="")=>_e(e)?Qo(on(t,e)):"children"in e?{...e,...e.link&&nl(e.link)?{link:At(on(t,e.link)).path}:{},children:e.children.map(n=>lu(n,on(t,e.prefix)))}:{...e,link:nl(e.link)?At(on(t,e.link)).path:e.link},iu=()=>{const e=ye();return k(()=>(e.value.navbar||[]).map(t=>lu(t)))},Yg=()=>{const e=Rv(),t=Ot(),n=Et(),o=Ml(),r=$l(),l=Dt(),i=ye();return k(()=>{const s=dr(o.value.locales),a=Fl(l.value.extraLocales??{});if(s.length<2&&!a.length)return null;const{path:c,fullPath:u}=t,{navbarLocales:d}=i.value;return{text:"",ariaLabel:d.selectLangAriaLabel,children:[...s.map(p=>{const h=o.value.locales[p]??{},b=l.value.locales[p]??{},y=h.lang,w=b.navbarLocales.langName;let S;if(y===r.value.lang)S=u;else{const _=c.replace(n.value,p);S=e.value.some(g=>g===_)?u.replace(c,_):b.home??p}return{text:w,link:S}}),...a.map(([p,h])=>({text:p,link:h.replace(":route",t.fullPath.replace(n.value,""))}))]}})},Jg=()=>{const e=ye(),t=k(()=>e.value.repo),n=k(()=>t.value?yg(t.value):null),o=k(()=>t.value?Wl(t.value):null),r=k(()=>n.value?e.value.repoLabel??o.value??"Source":null);return k(()=>!n.value||!r.value||e.value.repoDisplay===!1?null:{type:o.value??"Source",label:r.value,link:n.value})};var Qg=K({name:"LanguageDropdown",setup(){const e=Yg();return()=>e.value?f("div",{class:"vp-nav-item"},f(ou,{config:e.value},{title:()=>{var t;return f(ru,{"aria-label":(t=e.value)==null?void 0:t.ariaLabel,style:{width:"1rem",height:"1rem",verticalAlign:"middle"}})}})):null}}),Xg=K({name:"NavScreenMenu",props:{config:{type:Object,required:!0}},setup(e){const t=ho(e,"config"),n=k(()=>t.value.ariaLabel??t.value.text),o=ae(!1),r=(l,i)=>i[i.length-1]===l;return Mt(()=>{o.value=!1}),()=>[f("button",{type:"button",class:["vp-nav-screen-menu-title",{active:o.value}],"aria-label":n.value,onClick:()=>{o.value=!o.value}},[f("span",{class:"text"},[f(Ee("VPIcon"),{icon:t.value.icon,sizing:"both"}),e.config.text]),f("span",{class:["arrow",o.value?"down":"end"]})]),f("ul",{class:["vp-nav-screen-menu",{hide:!o.value}]},t.value.children.map(l=>f("li",{class:"vp-nav-screen-menu-item"},"children"in l?[f("h4",{class:"vp-nav-screen-menu-subtitle"},l.link?f(We,{config:l,onFocusout:()=>{r(l,t.value.children)&&l.children.length===0&&(o.value=!1)}}):l.text),f("ul",{class:"vp-nav-screen-menu-subitems"},l.children.map(i=>f("li",{class:"vp-nav-screen-menu-subitem"},f(We,{config:i,onFocusout:()=>{r(i,l.children)&&r(l,t.value.children)&&(o.value=!1)}}))))]:f(We,{config:l,onFocusout:()=>{r(l,t.value.children)&&(o.value=!1)}}))))]}}),Zg=K({name:"NavScreenLinks",setup(){const e=iu();return()=>e.value.length?f("nav",{class:"nav-screen-links"},e.value.map(t=>f("div",{class:"navbar-links-item"},"children"in t?f(Xg,{config:t}):f(We,{config:t})))):null}});const su=()=>f(Ae,{name:"dark"},()=>f("path",{d:"M524.8 938.667h-4.267a439.893 439.893 0 0 1-313.173-134.4 446.293 446.293 0 0 1-11.093-597.334A432.213 432.213 0 0 1 366.933 90.027a42.667 42.667 0 0 1 45.227 9.386 42.667 42.667 0 0 1 10.24 42.667 358.4 358.4 0 0 0 82.773 375.893 361.387 361.387 0 0 0 376.747 82.774 42.667 42.667 0 0 1 54.187 55.04 433.493 433.493 0 0 1-99.84 154.88 438.613 438.613 0 0 1-311.467 128z"}));su.displayName="DarkIcon";const au=()=>f(Ae,{name:"light"},()=>f("path",{d:"M952 552h-80a40 40 0 0 1 0-80h80a40 40 0 0 1 0 80zM801.88 280.08a41 41 0 0 1-57.96-57.96l57.96-58a41.04 41.04 0 0 1 58 58l-58 57.96zM512 752a240 240 0 1 1 0-480 240 240 0 0 1 0 480zm0-560a40 40 0 0 1-40-40V72a40 40 0 0 1 80 0v80a40 40 0 0 1-40 40zm-289.88 88.08-58-57.96a41.04 41.04 0 0 1 58-58l57.96 58a41 41 0 0 1-57.96 57.96zM192 512a40 40 0 0 1-40 40H72a40 40 0 0 1 0-80h80a40 40 0 0 1 40 40zm30.12 231.92a41 41 0 0 1 57.96 57.96l-57.96 58a41.04 41.04 0 0 1-58-58l58-57.96zM512 832a40 40 0 0 1 40 40v80a40 40 0 0 1-80 0v-80a40 40 0 0 1 40-40zm289.88-88.08 58 57.96a41.04 41.04 0 0 1-58 58l-57.96-58a41 41 0 0 1 57.96-57.96z"}));au.displayName="LightIcon";const cu=()=>f(Ae,{name:"auto"},()=>f("path",{d:"M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm0-840c-198.78 0-360 161.22-360 360 0 198.84 161.22 360 360 360s360-161.16 360-360c0-198.78-161.22-360-360-360zm0 660V212c165.72 0 300 134.34 300 300 0 165.72-134.28 300-300 300z"}));cu.displayName="AutoIcon";const uu=()=>f(Ae,{name:"enter-fullscreen"},()=>f("path",{d:"M762.773 90.24h-497.28c-96.106 0-174.4 78.293-174.4 174.4v497.28c0 96.107 78.294 174.4 174.4 174.4h497.28c96.107 0 175.04-78.293 174.4-174.4V264.64c0-96.213-78.186-174.4-174.4-174.4zm-387.2 761.173H215.04c-21.867 0-40.427-17.92-41.067-41.066V649.92c0-22.507 17.92-40.427 40.427-40.427 11.307 0 21.227 4.694 28.48 11.947 7.253 7.253 11.947 17.92 11.947 28.48v62.293l145.28-145.28c15.893-15.893 41.813-15.893 57.706 0 15.894 15.894 15.894 41.814 0 57.707l-145.28 145.28h62.294c22.506 0 40.426 17.92 40.426 40.427s-17.173 41.066-39.68 41.066zM650.24 165.76h160.427c21.866 0 40.426 17.92 41.066 41.067v160.426c0 22.507-17.92 40.427-40.426 40.427-11.307 0-21.227-4.693-28.48-11.947-7.254-7.253-11.947-17.92-11.947-28.48v-62.186L625.6 450.347c-15.893 15.893-41.813 15.893-57.707 0-15.893-15.894-15.893-41.814 0-57.707l145.28-145.28H650.88c-22.507 0-40.427-17.92-40.427-40.427s17.174-41.173 39.787-41.173z"}));uu.displayName="EnterFullScreenIcon";const fu=()=>f(Ae,{name:"cancel-fullscreen"},()=>f("path",{d:"M778.468 78.62H247.922c-102.514 0-186.027 83.513-186.027 186.027V795.08c0 102.514 83.513 186.027 186.027 186.027h530.432c102.514 0 186.71-83.513 186.026-186.027V264.647C964.494 162.02 880.981 78.62 778.468 78.62zM250.88 574.35h171.122c23.324 0 43.122 19.115 43.804 43.805v171.121c0 24.008-19.114 43.122-43.122 43.122-12.06 0-22.641-5.006-30.378-12.743s-12.743-19.115-12.743-30.379V722.83L224.597 877.91c-16.953 16.952-44.6 16.952-61.553 0-16.953-16.954-16.953-44.602 0-61.554L318.009 661.39h-66.446c-24.007 0-43.122-19.114-43.122-43.122 0-24.12 18.432-43.918 42.439-43.918zm521.899-98.873H601.657c-23.325 0-43.122-19.114-43.805-43.804V260.55c0-24.007 19.115-43.122 43.122-43.122 12.06 0 22.642 5.007 30.379 12.743s12.743 19.115 12.743 30.38v66.445l154.965-154.965c16.953-16.953 44.601-16.953 61.554 0 16.953 16.953 16.953 44.6 0 61.554L705.536 388.55h66.446c24.007 0 43.122 19.115 43.122 43.122.114 24.007-18.318 43.804-42.325 43.804z"}));fu.displayName="CancelFullScreenIcon";const du=()=>f(Ae,{name:"outlook"},()=>[f("path",{d:"M224 800c0 9.6 3.2 44.8 6.4 54.4 6.4 48-48 76.8-48 76.8s80 41.6 147.2 0 134.4-134.4 38.4-195.2c-22.4-12.8-41.6-19.2-57.6-19.2C259.2 716.8 227.2 761.6 224 800zM560 675.2l-32 51.2c-51.2 51.2-83.2 32-83.2 32 25.6 67.2 0 112-12.8 128 25.6 6.4 51.2 9.6 80 9.6 54.4 0 102.4-9.6 150.4-32l0 0c3.2 0 3.2-3.2 3.2-3.2 22.4-16 12.8-35.2 6.4-44.8-9.6-12.8-12.8-25.6-12.8-41.6 0-54.4 60.8-99.2 137.6-99.2 6.4 0 12.8 0 22.4 0 12.8 0 38.4 9.6 48-25.6 0-3.2 0-3.2 3.2-6.4 0-3.2 3.2-6.4 3.2-6.4 6.4-16 6.4-16 6.4-19.2 9.6-35.2 16-73.6 16-115.2 0-105.6-41.6-198.4-108.8-268.8C704 396.8 560 675.2 560 675.2zM224 419.2c0-28.8 22.4-51.2 51.2-51.2 28.8 0 51.2 22.4 51.2 51.2 0 28.8-22.4 51.2-51.2 51.2C246.4 470.4 224 448 224 419.2zM320 284.8c0-22.4 19.2-41.6 41.6-41.6 22.4 0 41.6 19.2 41.6 41.6 0 22.4-19.2 41.6-41.6 41.6C339.2 326.4 320 307.2 320 284.8zM457.6 208c0-12.8 12.8-25.6 25.6-25.6 12.8 0 25.6 12.8 25.6 25.6 0 12.8-12.8 25.6-25.6 25.6C470.4 233.6 457.6 220.8 457.6 208zM128 505.6C128 592 153.6 672 201.6 736c28.8-60.8 112-60.8 124.8-60.8-16-51.2 16-99.2 16-99.2l316.8-422.4c-48-19.2-99.2-32-150.4-32C297.6 118.4 128 291.2 128 505.6zM764.8 86.4c-22.4 19.2-390.4 518.4-390.4 518.4-22.4 28.8-12.8 76.8 22.4 99.2l9.6 6.4c35.2 22.4 80 12.8 99.2-25.6 0 0 6.4-12.8 9.6-19.2 54.4-105.6 275.2-524.8 288-553.6 6.4-19.2-3.2-32-19.2-32C777.6 76.8 771.2 80 764.8 86.4z"})]);du.displayName="OutlookIcon";var pu=K({name:"ColorModeSwitch",setup(){const{config:e,isDarkMode:t,status:n}=To(),o=at(),r=()=>{e.value==="switch"?n.value={light:"dark",dark:"auto",auto:"light"}[n.value]:n.value=n.value==="light"?"dark":"light"},l=async i=>{if(!(document.startViewTransition&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!o.value)){r();return}const s=i.clientX,a=i.clientY,c=Math.hypot(Math.max(s,innerWidth-s),Math.max(a,innerHeight-a)),u=t.value;await document.startViewTransition(async()=>{r(),await hn()}).ready,t.value!==u&&document.documentElement.animate({clipPath:t.value?[`circle(${c}px at ${s}px ${a}px)`,`circle(0px at ${s}px ${a}px)`]:[`circle(0px at ${s}px ${a}px)`,`circle(${c}px at ${s}px ${a}px)`]},{duration:400,pseudoElement:t.value?"::view-transition-old(root)":"::view-transition-new(root)"})};return()=>f("button",{type:"button",class:"vp-color-mode-switch",id:"color-mode-switch",onClick:l},[f(cu,{style:{display:n.value==="auto"?"block":"none"}}),f(su,{style:{display:n.value==="dark"?"block":"none"}}),f(au,{style:{display:n.value==="light"?"block":"none"}})])}}),e1=K({name:"ColorMode",setup(){const e=ye(),{canToggle:t}=To(),n=k(()=>e.value.outlookLocales.darkmode);return()=>t.value?f("div",{class:"vp-color-mode"},[f("label",{class:"vp-color-mode-title",for:"color-mode-switch"},n.value),f(pu)]):null}}),hu=K({name:"ToggleFullScreenButton",setup(){const{isSupported:e,isFullscreen:t,toggle:n}=fr();return()=>e.value?f("button",{type:"button",id:"full-screen-switch",class:"full-screen",ariaPressed:t.value,onClick:()=>n()},t.value?f(fu):f(uu)):null}}),t1=K({name:"ToggleFullScreenButton",setup(){const e=ye(),{isSupported:t}=fr(),n=k(()=>e.value.outlookLocales.fullscreen);return()=>t.value?f("div",{class:"full-screen-wrapper"},[f("label",{class:"full-screen-title",for:"full-screen-switch"},n.value),f(hu)]):null}}),vu=K({name:"OutlookSettings",setup(){const e=Dt(),t=at(),n=k(()=>!t.value&&e.value.fullscreen);return()=>f(Dl,()=>[null,f(e1),n.value?f(t1):null])}}),n1=K({name:"NavScreen",props:{show:Boolean},slots:Object,setup(e,{slots:t}){const{isMobile:n}=pr(),o=re(),r=zl(o);return Mt(()=>{r.value=!1}),xe(n,l=>{!l&&e.show&&(r.value=!1)}),Pe(()=>{o.value=document.body}),vn(()=>{r.value=!1}),()=>f($n,{name:"fade-in-down",onEnter:()=>{r.value=!0},onAfterLeave:()=>{r.value=!1}},()=>{var l,i;return e.show?f("div",{id:"nav-screen",class:"vp-nav-screen"},f("div",{class:"vp-nav-screen-container"},[(l=t.before)==null?void 0:l.call(t),f(Zg),f("div",{class:"vp-outlook-wrapper"},f(vu)),(i=t.after)==null?void 0:i.call(t)])):null})}}),o1=K({name:"NavbarBrand",setup(){const e=Et(),t=$l(),n=ye(),o=k(()=>n.value.home??e.value),r=k(()=>t.value.title),l=k(()=>n.value.navbarTitle??r.value),i=k(()=>n.value.logo?$e(n.value.logo):null),s=k(()=>n.value.logoDark?$e(n.value.logoDark):null);return()=>f(ut,{to:o.value,class:"vp-brand","aria-label":n.value.routeLocales.home},()=>[i.value?f("img",{class:["vp-nav-logo",{light:!!s.value}],src:i.value,alt:""}):null,s.value?f("img",{class:["vp-nav-logo dark"],src:s.value,alt:""}):null,l.value?f("span",{class:["vp-site-name",{"hide-in-pad":i.value&&(n.value.hideSiteNameOnMobile??!0)}]},l.value):null])}}),r1=K({name:"NavbarLinks",setup(){const e=iu();return()=>e.value.length?f("nav",{class:"vp-nav-links"},e.value.map(t=>f("div",{class:"vp-nav-item hide-in-mobile"},"children"in t?f(ou,{config:t}):f(We,{config:t,iconSizing:"height"})))):null}}),l1=K({name:"RepoLink",setup(){const e=Jg();return()=>e.value?f("div",{class:"vp-nav-item vp-action"},f("a",{class:"vp-action-link",href:e.value.link,target:"_blank",rel:"noopener noreferrer","aria-label":e.value.label},f(_g,{type:e.value.type,style:{width:"1.25rem",height:"1.25rem",verticalAlign:"middle"}}))):null}});const mu=({active:e=!1},{emit:t})=>f("button",{type:"button",class:["vp-toggle-navbar-button",{"is-active":e}],"aria-label":"Toggle Navbar","aria-expanded":e,"aria-controls":"nav-screen",onClick:()=>{t("toggle")}},f("span",[f("span",{class:"vp-top"}),f("span",{class:"vp-middle"}),f("span",{class:"vp-bottom"})]));mu.displayName="ToggleNavbarButton";const rl=(e,{emit:t})=>f("button",{type:"button",class:"vp-toggle-sidebar-button",title:"Toggle Sidebar",onClick:()=>{t("toggle")}},f("span",{class:"icon"}));rl.displayName="ToggleSidebarButton",rl.emits=["toggle"];var i1=K({name:"OutlookButton",setup(){const e=Dt(),{canToggle:t}=To(),{isSupported:n}=fr(),o=at(),r=ae(!1),l=k(()=>!o.value&&e.value.fullscreen&&n),i=k(()=>t.value||l.value);return Mt(()=>{r.value=!1}),()=>i.value?f("div",{class:"vp-nav-item hide-in-mobile"},t.value&&!l.value?f(pu):l.value&&!t.value?f(hu):f("button",{type:"button",class:["vp-outlook-button",{open:r.value}],tabindex:"-1","aria-hidden":!0},[f(du),f("div",{class:"vp-outlook-dropdown"},f(vu))])):null}}),s1=K({name:"NavBar",emits:["toggleSidebar"],slots:Object,setup(e,{emit:t,slots:n}){const o=ye(),{isMobile:r}=pr(),l=ae(!1),i=k(()=>{const{navbarAutoHide:u="mobile"}=o.value;return u!=="none"&&(u==="always"||r.value)}),s=k(()=>o.value.navbarLayout??{start:["Brand"],center:["Links"],end:["Language","Repo","Outlook","Search"]}),a={Brand:o1,Language:Qg,Links:r1,Repo:l1,Outlook:i1,Search:qe("SearchBox")?Ee("SearchBox"):tl},c=u=>a[u]??(qe(u)?Ee(u):tl);return Mt(()=>{l.value=!1}),xe(r,u=>{u||(l.value=!1)}),()=>{var u,d,p;return[f("header",{key:"navbar",id:"navbar",class:["vp-navbar",{"auto-hide":i.value}],"vp-navbar":""},[f("div",{class:"vp-navbar-start"},[f(rl,{onToggle:()=>{l.value&&(l.value=!1),t("toggleSidebar")}}),(u=s.value.start)==null?void 0:u.map(h=>f(c(h)))]),f("div",{class:"vp-navbar-center"},[(d=s.value.center)==null?void 0:d.map(h=>f(c(h)))]),f("div",{class:"vp-navbar-end"},[(p=s.value.end)==null?void 0:p.map(h=>f(c(h))),f(mu,{active:l.value,onToggle:()=>{l.value=!l.value}})])]),f(n1,{show:l.value},{before:n.screenTop,after:n.screenBottom})]}}}),a1=K({name:"SidebarChild",props:{config:{type:Object,required:!0}},setup(e){const t=Ot();return()=>_e(e.config.link)?f(We,{class:["vp-sidebar-link",{active:Kl(t,e.config)}],config:{...e.config,exact:!0}}):f("p",e,[f(Ee("VPIcon"),{icon:e.config.icon,sizing:"both"}),e.config.text])}}),c1=K({name:"SidebarGroup",props:{config:{type:Object,required:!0},open:{type:Boolean,required:!0}},emits:["toggle"],setup(e,{emit:t}){const n=Ot(),o=ae(!1),r=k(()=>Yl(n,e.config)),l=k(()=>Kl(n,e.config)),i=k(()=>e.open||e.config.expanded&&!o.value);return()=>{const{collapsible:s,children:a=[],icon:c,prefix:u,link:d,text:p}=e.config;return f("section",{class:"vp-sidebar-group"},[f(s?"button":"p",{class:["vp-sidebar-header",{clickable:s||d,exact:l.value,active:r.value}],...s?{type:"button",onClick:()=>{o.value=!0,t("toggle")}}:{}},[f(Ee("VPIcon"),{icon:c,sizing:"both"}),d?f(We,{class:"vp-sidebar-title no-external-link-icon",config:{text:p,link:d}}):f("span",{class:"vp-sidebar-title"},p),s?f("span",{class:["vp-arrow",i.value?"down":"end"]}):null]),i.value||!s?f(gu,{key:u,config:a}):null])}}}),gu=K({name:"SidebarLinks",props:{config:{type:Array,required:!0}},setup(e){const t=Ot(),n=wo(),o=ae(-1),r=l=>{o.value=l===o.value?-1:l};return wt(n,()=>{const l=e.config.findIndex(i=>Yl(t,i));o.value=l},{flush:"post"}),()=>f("ul",{class:"vp-sidebar-links"},e.config.map((l,i)=>f("li","children"in l?f(c1,{config:l,open:i===o.value,onToggle:()=>{r(i)}}):f(a1,{config:l}))))}}),u1=K({name:"SideBar",slots:Object,setup(e,{slots:t}){const n=Ot(),o=Jl(),r=re();return Pe(()=>{wt(()=>n.hash,l=>{const i=document.querySelector(`.vp-sidebar a.vp-sidebar-link[href="${n.path}${l}"]`);if(!i)return;const{top:s,height:a}=r.value.getBoundingClientRect(),{top:c,height:u}=i.getBoundingClientRect();cs+a&&i.scrollIntoView(!1)})}),()=>{var l,i,s;return f("aside",{ref:r,key:"sidebar",id:"sidebar",class:"vp-sidebar","vp-sidebar":""},[(l=t.top)==null?void 0:l.call(t),((i=t.default)==null?void 0:i.call(t))??f(gu,{config:o.value}),(s=t.bottom)==null?void 0:s.call(t)])}}}),bu=K({name:"CommonWrapper",props:{containerClass:String,noNavbar:Boolean,noSidebar:Boolean,noToc:Boolean},slots:Object,setup(e,{slots:t}){const n=Se(),o=Dt(),r=ye(),{isMobile:l,isPC:i}=pr(),s=at(),[a,c]=Zr(!1),[u,d]=Zr(!1),p=Jl(),h=re(),b=zl(h),y=ae(!1),w=k(()=>e.noNavbar||n.value.navbar===!1||r.value.navbar===!1?!1:!!(r.value.logo??r.value.repo??r.value.navbar)),S=k(()=>e.noSidebar?!1:(n.value.sidebar??!0)&&p.value.length!==0&&!n.value.home),_=k(()=>n.value.externalLinkIcon??o.value.externalLinkIcon??!0),g=k(()=>!e.noToc&&!n.value.home&&!!(n.value.toc??r.value.toc??!0)),E={x:0,y:0},M=B=>{E.x=B.changedTouches[0].clientX,E.y=B.changedTouches[0].clientY},U=B=>{const L=B.changedTouches[0].clientX-E.x,H=B.changedTouches[0].clientY-E.y;Math.abs(L)>Math.abs(H)*1.5&&Math.abs(L)>40&&(L>0&&E.x<=80?c(!0):c(!1))};let x=0;return de("scroll",mc(()=>{const B=window.scrollY;B<=58||B{c(!1)}),xe(l,B=>{B||c(!1)}),xe(a,B=>{b.value=B}),Pe(()=>{h.value=document.body}),vn(()=>{b.value=!1}),()=>f(qe("GlobalEncrypt")?Ee("GlobalEncrypt"):Hl,()=>f("div",{class:["theme-container",{"hide-navbar":y.value,"no-navbar":!w.value,"sidebar-collapsed":!l.value&&!i.value&&u.value,"sidebar-open":l.value&&a.value,"no-sidebar":!S.value&&!t.sidebar&&!t.sidebarTop&&!t.sidebarBottom,"external-link-icon":_.value,pure:s.value,"has-toc":g.value},e.containerClass??"",n.value.containerClass??""],"vp-container":"",onTouchStart:M,onTouchEnd:U},[w.value?f(s1,{onToggleSidebar:()=>c()},{screenTop:t.navScreenTop,screenBottom:t.navScreenBottom}):null,f($n,{name:"fade-in"},()=>a.value?f("div",{class:"vp-sidebar-mask",onClick:()=>c(!1)}):null),f($n,{name:"fade-in"},()=>l.value?null:f("div",{class:"toggle-sidebar-wrapper",onClick:()=>d()},f("span",{class:["arrow",u.value?"end":"start"]}))),f(u1,{},{default:t.sidebar,top:t.sidebarTop,bottom:t.sidebarBottom}),t.default(),f(Kg)]))}});const ll=()=>f(Ae,{name:"slide-down"},()=>f("path",{d:"M108.775 312.23c13.553 0 27.106 3.734 39.153 11.806l375.205 250.338 363.641-252.808c32.587-21.624 76.499-12.83 98.123 19.757 21.685 32.467 12.95 76.56-19.576 98.184l-402.854 278.89c-23.733 15.901-54.694 15.962-78.547.12L69.501 442.097c-32.647-21.685-41.441-65.777-19.817-98.304 13.734-20.54 36.201-31.563 59.09-31.563Z"}));ll.displayName="SlideDownIcon";const yu=(e,{emit:t})=>f("button",{type:"button",class:"vp-hero-slide-down-button",onClick:()=>t("click")},[f(ll),f(ll)]);yu.displayName="HeroSlideDownButton";const it=K({name:"DropTransition",props:{delay:{type:Number,default:0},duration:{type:Number,default:.25},group:Boolean,appear:Boolean},slots:Object,setup(e,{slots:t}){const n=r=>{r.style.transition=`transform ${e.duration}s ease-in-out ${e.delay}s, opacity ${e.duration}s ease-in-out ${e.delay}s`,r.style.transform="translateY(-20px)",r.style.opacity="0"},o=r=>{r.style.transform="translateY(0)",r.style.opacity="1"};return()=>{const r={name:"drop",appear:e.appear,onAppear:n,onAfterAppear:o,onEnter:n,onAfterEnter:o,onBeforeLeave:n},l=()=>t.default();return e.group?f(Ga,r,l):f($n,r,l)}}});var Ql=K({name:"MarkdownContent",props:{custom:Boolean},slots:Object,setup(e,{slots:t}){const n=Dt(),{changelog:o,contributors:r}=Zc(),l=ae(),i=hv(l,{delayEnter:jo(n.value.focus)?n.value.focus:1500,delayLeave:0}),s=k(()=>!!(n.value.focus??n.value.pure)&&i.value);return Pe(()=>{const a=document.documentElement;wt(s,c=>{c?a.classList.add("is-focusing"):a.classList.remove("is-focusing")})}),()=>{var a,c;return f("div",{class:{custom:e.custom},"vp-content":""},[(a=t.before)==null?void 0:a.call(t),f(uc,{ref:l,id:"markdown-content"}),(c=t.after)==null?void 0:c.call(t),o.value&&qe("GitChangelog")?f(Ee("GitChangelog")):null,r.value==="content"&&qe("GitContributors")?f(Ee("GitContributors")):null])}}}),f1=K({name:"PrintButton",setup(){const e=Dt(),t=ye();return()=>e.value.print===!1?null:f("button",{type:"button",class:"print-button",title:t.value.metaLocales.print,onClick:()=>{window.print()}},f(Yc))}}),d1=K({name:"TOC",props:{items:Array,options:Object},slots:Object,setup(e,{slots:t}){const n=ho(e,"options"),o=Lv(n),r=Ot(),l=Qt(),[i,s]=Zr(),a=re(),c=ae("-2rem"),u=b=>{var y;(y=a.value)==null||y.scrollTo({top:b,behavior:"smooth"})},d=()=>{if(a.value){const b=document.querySelector(".vp-toc-item.active");b?c.value=`${b.getBoundingClientRect().top-a.value.getBoundingClientRect().top+a.value.scrollTop}px`:c.value="-2rem"}else c.value="-2rem"};Pe(()=>{wt(()=>r.hash,b=>{if(a.value){const y=document.querySelector(`#toc a.vp-toc-link[href$="${b}"]`);if(!y)return;const{top:w,height:S}=a.value.getBoundingClientRect(),{top:_,height:g}=y.getBoundingClientRect();_w+S&&u(a.value.scrollTop+_+g-w-S)}},{flush:"post"}),wt(()=>r.fullPath,d,{flush:"post"})});const p=({title:b,level:y,slug:w})=>f(ut,{to:`#${w}`,class:["vp-toc-link",`level${y}`],onClick:()=>{s()}},()=>b),h=b=>b.length?f("ul",{class:"vp-toc-list"},b.map(y=>{const w=h(y.children);return[f("li",{class:["vp-toc-item",{active:r.hash===`#${y.slug}`}]},p(y)),w?f("li",w):null]})):null;return()=>{var S,_,g;const b=(S=e.items)!=null&&S.length?h(e.items):h(o.value),y=(_=t.before)==null?void 0:_.call(t),w=(g=t.after)==null?void 0:g.call(t);return f(Dl,()=>b||y||w?f("div",{class:"vp-toc-placeholder"},[f("aside",{id:"toc","vp-toc":""},[y,b?[f("div",{class:"vp-toc-header",onClick:()=>{s()}},[l.value.toc,f(f1),f("div",{class:["arrow",i.value?"down":"end"]})]),f("div",{class:["vp-toc-wrapper",i.value?"open":""],ref:a},[b,f("div",{class:"vp-toc-marker",style:{top:c.value}})])]:null,w])]):null)}}}),_u=K({name:"SkipLink",props:{content:{type:String,default:"main-content"}},setup(e){const t=ye(),n=re(),o=({target:r})=>{const l=document.querySelector(r.hash);if(l){const i=()=>{l.removeAttribute("tabindex"),l.removeEventListener("blur",i)};l.setAttribute("tabindex","-1"),l.addEventListener("blur",i),l.focus(),window.scrollTo(0,0)}};return Mt(()=>{var r;(r=n.value)==null||r.focus()}),()=>[f("span",{ref:n,tabindex:"-1"}),f("a",{href:`#${e.content}`,class:"vp-skip-link sr-only",onClick:o},t.value.routeLocales.skipToContent)]}});let Dr=null,qn=null;const il={wait:()=>Dr,pending:()=>{Dr=new Promise(e=>{qn=e})},resolve:()=>{qn==null||qn(),Dr=null,qn=null}},wu=(e,{slots:t})=>f($n,{name:"fade-in-up",mode:"out-in",onBeforeEnter:il.resolve,onBeforeLeave:il.pending},()=>t.default());wu.displayName="FadeInUpTransition";var p1=K({name:"PageTitle",setup(){const e=It(),t=Se(),n=ye(),{info:o,items:r}=Og();return()=>f("div",{class:"vp-page-title"},[f("h1",[n.value.titleIcon===!1?null:f(Ee("VPIcon"),{icon:t.value.icon}),e.value.title]),f(jg,{info:o.value,items:r.value}),f("hr")])}});const h1=(e,t)=>{const n=e.replace(t,"/").split("/"),o=[];let r=Al(t);return n.forEach((l,i)=>{i!==n.length-1?(r+=`${l}/`,o.push({link:r,name:l||"Home"})):l!==""&&(r+=l,o.push({link:r,name:l}))}),o},Ts=(e,t)=>e===!1?e:Vn(e)?{...e,link:Qo(e.link,!0,t).link}:_e(e)?Qo(e,!0,t):null,sl=(e,t,n)=>{const o=e.findIndex(l=>l.link===t);if(o!==-1){if(!e[o+n])return null;const l=e[o+n];return l.link?l:"prefix"in l&&!At(l.prefix).notFound?{...l,link:l.prefix}:null}for(const l of e)if("children"in l){const i=sl(l.children,t,n);if(i)return i}const r=e.findIndex(l=>"prefix"in l&&l.prefix===t);if(r!==-1){if(!e[r+n])return null;const l=e[r+n];return l.link?l:"prefix"in l&&!At(l.prefix).notFound?{...l,link:l.prefix}:null}return null},v1=()=>{const e=Se(),t=ye(),n=Jl(),o=wo(),r=k(()=>{const i=Ts(e.value.prev,o.value);return i===!1?null:i??(t.value.prevLink===!1?null:sl(n.value,o.value,-1))}),l=k(()=>{const i=Ts(e.value.next,o.value);return i===!1?null:i??(t.value.nextLink===!1?null:sl(n.value,o.value,1))});return{prevLink:r,nextLink:l}},al=(e,{slots:t})=>{var d,p;const{bgImage:n,bgImageDark:o,bgImageStyle:r,color:l,description:i,image:s,imageDark:a,header:c,features:u=[]}=e;return f("div",{class:"vp-feature-wrapper"},[n?f("div",{class:["vp-feature-bg",{light:o}],style:[{"background-image":`url(${n})`},r]}):null,o?f("div",{class:"vp-feature-bg dark",style:[{"background-image":`url(${o})`},r]}):null,f("div",{class:"vp-feature",style:l?{color:l}:{}},[((d=t.image)==null?void 0:d.call(t,e))??[s?f("img",{class:["vp-feature-image",{light:a}],src:$e(s),alt:""}):null,a?f("img",{class:"vp-feature-image dark",src:$e(a),alt:""}):null],((p=t.info)==null?void 0:p.call(t,e))??[c?f("h2",{class:"vp-feature-header"},c):null,i?f("p",{class:"vp-feature-description",innerHTML:i}):null],u.length?f("div",{class:"vp-features"},u.map(({icon:h,title:b,details:y,link:w})=>{const S=[f("h3",{class:"vp-feature-title"},[f(Ee("VPIcon"),{icon:h}),f("span",{innerHTML:b})]),f("p",{class:"vp-feature-details",innerHTML:y})];return w?Pl(w)?f("a",{class:"vp-feature-item link",href:w,"aria-label":b,target:"_blank"},S):f(ut,{class:"vp-feature-item link",to:w,"aria-label":b},()=>S):f("div",{class:"vp-feature-item"},S)})):null])])};al.displayName="FeaturePanel";var m1=K({name:"HeroInfo",slots:Object,setup(e,{slots:t}){const n=Se(),o=$l(),r=k(()=>{const{heroText:a,tagline:c,heroStyle:u,heroFullScreen:d=!1}=n.value;return{text:a??(o.value.title||"Hello"),tagline:c??o.value.description,style:u??null,isFullScreen:d}}),l=k(()=>{const{heroImage:a,heroImageDark:c,heroAlt:u,heroImageStyle:d}=n.value;return{image:a?$e(a):null,imageDark:c?$e(c):null,imageStyle:d,alt:u??""}}),i=k(()=>{const{bgImage:a,bgImageDark:c,bgImageStyle:u}=n.value;return{image:_e(a)?$e(a):null,imageDark:_e(c)?$e(c):null,style:u}}),s=k(()=>n.value.actions??[]);return()=>{var a,c,u;return f("header",{class:["vp-hero-info-wrapper",{"hero-fullscreen":r.value.isFullScreen}],style:r.value.style},[((a=t.bg)==null?void 0:a.call(t,i.value))??[i.value.image?f("div",{class:["vp-hero-mask",{light:i.value.imageDark}],style:[{"background-image":`url(${i.value.image})`},i.value.style]}):null,i.value.imageDark?f("div",{class:"vp-hero-mask dark",style:[{"background-image":`url(${i.value.imageDark})`},i.value.style]}):null],f("div",{class:"vp-hero-info"},[((c=t.logo)==null?void 0:c.call(t,l.value))??f(it,{appear:!0,group:!0},()=>{const{image:d,imageDark:p,imageStyle:h,alt:b}=l.value;return[d?f("img",{key:"light",class:["vp-hero-image",{light:p}],style:h,src:d,alt:b}):null,p?f("img",{key:"dark",class:"vp-hero-image dark",style:h,src:p,alt:b}):null]}),((u=t.info)==null?void 0:u.call(t,r.value))??f("div",{class:"vp-hero-infos"},[r.value.text?f(it,{appear:!0,delay:.04},()=>f("h1",{id:"main-title",class:"vp-hero-title"},r.value.text)):null,r.value.tagline?f(it,{appear:!0,delay:.08},()=>f("p",{id:"main-description",innerHTML:r.value.tagline})):null,s.value.length?f(it,{appear:!0,delay:.12},()=>f("p",{class:"vp-hero-actions"},s.value.map(d=>f(We,{class:["vp-hero-action",d.type??"default","no-external-link-icon"],config:d})))):null])]),r.value.isFullScreen?f(yu,{onClick:()=>{var d;return window.scrollTo({top:window.innerHeight-(((d=document.querySelector("[vp-navbar]"))==null?void 0:d.clientHeight)??0),behavior:"smooth"})}}):null])}}});const Eu=(e,{slots:t})=>{var p,h,b;const{bgImage:n,bgImageDark:o,bgImageStyle:r,color:l,description:i,image:s,imageDark:a,header:c,highlights:u=[],type:d="un-order"}=e;return f("div",{class:"vp-highlight-wrapper",style:l?{color:l}:{}},[n?f("div",{class:["vp-highlight-bg",{light:o}],style:[{"background-image":`url(${n})`},r]}):null,o?f("div",{class:"vp-highlight-bg dark",style:[{"background-image":`url(${o})`},r]}):null,f("div",{class:"vp-highlight"},[((p=t.image)==null?void 0:p.call(t,e))??[s?f("img",{class:["vp-highlight-image",{light:a}],src:$e(s),alt:""}):null,a?f("img",{class:"vp-highlight-image dark",src:$e(a),alt:""}):null],((h=t.info)==null?void 0:h.call(t,e))??[f("div",{class:"vp-highlight-info-wrapper"},f("div",{class:"vp-highlight-info"},[c?f("h2",{class:"vp-highlight-header",innerHTML:c}):null,i?f("p",{class:"vp-highlight-description",innerHTML:i}):null,((b=t.highlights)==null?void 0:b.call(t,u))??f(d==="order"?"ol":d==="no-order"?"dl":"ul",{class:"vp-highlights"},u.map(({icon:y,title:w,details:S,link:_})=>{const g=[f(d==="no-order"?"dt":"h3",{class:"vp-highlight-title"},[y?f(Ee("VPIcon"),{class:"vp-highlight-icon",icon:y}):null,f("span",{innerHTML:w})]),S?f(d==="no-order"?"dd":"p",{class:"vp-highlight-details",innerHTML:S}):null];return f(d==="no-order"?"div":"li",{class:["vp-highlight-item-wrapper",{link:_}]},_?Pl(_)?f("a",{class:"vp-highlight-item link",href:_,"aria-label":w,target:"_blank"},g):f(ut,{class:"vp-highlight-item link",to:_,"aria-label":w},()=>g):f("div",{class:"vp-highlight-item"},g))}))]))]])])};Eu.displayName="HighlightPanel";var g1=K({name:"HomePage",slots:Object,setup(e,{slots:t}){const n=Se(),o=k(()=>{const{features:l}=n.value;return dn(l)?l:null}),r=k(()=>{const{highlights:l}=n.value;return dn(l)?l:null});return()=>{var l,i,s,a;return f("main",{id:"main-content",class:"vp-page vp-project-home","aria-labelledby":n.value.heroText===""?"":"main-title"},[(l=t.top)==null?void 0:l.call(t),f(m1),((i=r.value)==null?void 0:i.map(c=>"features"in c?f(al,c):f(Eu,c)))??(o.value?f(it,{appear:!0,delay:.24},()=>f(al,{features:o.value})):null),(s=t.center)==null?void 0:s.call(t),f(it,{appear:!0,delay:.32},()=>f(Ql)),(a=t.bottom)==null?void 0:a.call(t)])}}}),b1=K({name:"BreadCrumb",setup(){const e=It(),t=Et(),n=wo(),o=Se(),r=ye(),l=re([]),i=k(()=>(o.value.breadcrumb??r.value.breadcrumb??!0)&&l.value.length>1),s=k(()=>o.value.breadcrumbIcon??r.value.breadcrumbIcon??!0),a=()=>{const c=h1(e.value.path,t.value).map(({link:u,name:d})=>{const{path:p,meta:h,notFound:b}=At(u);return b||h.breadcrumbExclude?null:{title:h.shortTitle||h.title||d,icon:h.icon,path:p}}).filter(u=>u!==null);c.length>1&&(l.value=c)};return Pe(()=>{wt(n,a)}),()=>f("nav",{class:["vp-breadcrumb",{disable:!i.value}]},i.value?f("ol",{vocab:"https://schema.org/",typeof:"BreadcrumbList"},l.value.map((c,u)=>f("li",{class:{"is-active":l.value.length-1===u},property:"itemListElement",typeof:"ListItem"},[f(ut,{to:c.path,property:"item",typeof:"WebPage"},()=>[s.value?f(Ee("VPIcon"),{icon:c.icon}):null,f("span",{property:"name"},c.title||"Unknown")]),f("meta",{property:"position",content:u+1})]))):[])}}),y1=K({name:"PageNav",setup(){const e=ye(),t=ql(),{prevLink:n,nextLink:o}=v1();return de("keydown",r=>{r.altKey&&(r.key==="ArrowRight"?o.value&&(t(o.value.link),r.preventDefault()):r.key==="ArrowLeft"&&n.value&&(t(n.value.link),r.preventDefault()))}),()=>n.value||o.value?f("nav",{class:"vp-page-nav"},[n.value?f(We,{class:"prev",config:n.value},()=>{var r,l;return[f("div",{class:"hint"},[f("span",{class:"arrow start"}),e.value.metaLocales.prev]),f("div",{class:"link"},[f(Ee("VPIcon"),{icon:(r=n.value)==null?void 0:r.icon}),(l=n.value)==null?void 0:l.text])]}):null,o.value?f(We,{class:"next",config:o.value},()=>{var r,l;return[f("div",{class:"hint"},[e.value.metaLocales.next,f("span",{class:"arrow end"})]),f("div",{class:"link"},[(r=o.value)==null?void 0:r.text,f(Ee("VPIcon"),{icon:(l=o.value)==null?void 0:l.icon})])]}):null]):null}});const _1={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"},w1=({docsRepo:e,docsBranch:t,docsDir:n,filePathRelative:o,editLinkPattern:r})=>{if(!o)return null;const l=Wl(e);let i;return r?i=r:l!==null&&(i=_1[l]),i?i.replace(/:repo/u,_o(e)?e:`https://github.com/${e}`).replace(/:branch/u,t).replace(/:path/u,Ll(`${Al(n)}/${o}`)):null},E1=()=>{const e=ye(),t=It(),n=Se();return k(()=>{const{repo:o,docsRepo:r=o,docsBranch:l="main",docsDir:i="",editLink:s,editLinkPattern:a=""}=e.value;if(!(n.value.editLink??s??!0)||!r)return null;const c=w1({docsRepo:r,docsBranch:l,docsDir:i,editLinkPattern:a,filePathRelative:t.value.filePathRelative});return c?{text:e.value.metaLocales.editLink,link:c}:null})},Su=()=>f(Ae,{name:"edit"},()=>[f("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"}),f("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"})]);Su.displayName="EditIcon";var S1=K({name:"PageMeta",setup(){const e=ye(),t=Zc(),n=Ec(),o=E1(),r=Iv(t.lastUpdated);return()=>f("footer",{class:"vp-page-meta"},[o.value?f("div",{class:"vp-meta-item edit-link"},f(We,{class:"vp-meta-label",config:o.value},{before:()=>f(Su)})):null,f("div",{class:"vp-meta-item git-info"},[(!t.changelog.value||!qe("GitChangelog"))&&r.value?f("div",{class:"update-time"},[f("span",{class:"vp-meta-label"},r.value.locale),f("time",{class:"vp-meta-info",datetime:r.value.iso,"data-allow-mismatch":""},r.value.text)]):null,t.contributors.value&&t.contributors.value!=="content"&&n.value.length?f("div",{class:"contributors"},[f("span",{class:"vp-meta-label"},`${e.value.metaLocales.contributors}: `),n.value.map(({email:l,name:i},s,a)=>[f("span",{class:"vp-meta-info",title:`email: ${l}`},i),s!==a.length-1?",":""])]):null])])}});const ks={selector:[...Array.from({length:6}).map((e,t)=>`#markdown-content > h${t+1}`),"[vp-content] > h2"].join(", "),levels:"deep",ignore:[".vp-badge",".vp-icon"]};var T1=K({name:"NormalPage",slots:Object,setup(e,{slots:t}){const n=Se(),{isDarkMode:o}=To(),r=ye(),l=k(()=>{const i=n.value.toc??r.value.toc;return Vn(i)?{...ks,...i}:i??!0?ks:null});return()=>f("main",{id:"main-content",class:"vp-page"},f(qe("LocalEncrypt")?Ee("LocalEncrypt"):Hl,()=>{var i,s;return[(i=t.top)==null?void 0:i.call(t),n.value.cover?f("div",{class:"page-cover"},f("img",{src:$e(n.value.cover),alt:"","no-view":""})):null,f(b1),f(p1),l.value?f(d1,{options:l.value},{before:t.tocBefore,after:t.tocAfter}):null,f(Ql,{},{before:t.contentBefore,after:t.contentAfter}),f(S1),f(y1),qe("CommentService")?f(Ee("CommentService"),{darkmode:o.value}):null,(s=t.bottom)==null?void 0:s.call(t)]}))}}),k1=K({name:"PortfolioHero",slots:Object,setup(e,{slots:t}){const n=Bc(),o=Se(),r=ae(0),l=k(()=>{var p;return((p=o.value.titles)==null?void 0:p[r.value])??""}),i=ae(""),s=k(()=>{const{name:p,avatar:h,avatarDark:b,avatarAlt:y,avatarStyle:w}=o.value;return{name:p??n.value.name,avatar:h?$e(h):null,avatarDark:b?$e(b):null,avatarStyle:w,alt:(y||p)??""}}),a=k(()=>{const{bgImage:p,bgImageDark:h,bgImageStyle:b}=o.value;return{image:_e(p)?$e(p):null,imageDark:_e(h)?$e(h):null,bgStyle:b}}),c=k(()=>{const{welcome:p,name:h,titles:b=[],medias:y}=o.value;return{name:h??n.value.name,welcome:p??"👋 Hi There, I'm",title:i.value,titles:b,medias:y??null}}),u=()=>{i.value="";let p=0,h=!1;const b=async()=>{if(!h)if(i.value+=l.value[p],p+=1,await hn(),p{b()},150);else{const y=c.value.titles.length;setTimeout(()=>{r.value=y<=1||r.value===c.value.titles.length-1?0:r.value+1},1e3)}};return b(),()=>{h=!0}};let d;return Pe(()=>{wt(l,()=>{d==null||d(),d=u()})}),()=>{var p,h,b;return f("section",{id:"portfolio",class:["vp-portfolio",{bg:a.value.image}]},[((p=t.bg)==null?void 0:p.call(t,a.value))??[a.value.image?f("div",{class:["vp-portfolio-mask",{light:a.value.imageDark}],style:[{background:`url(${a.value.image}) center/cover no-repeat`},a.value.bgStyle]}):null,a.value.imageDark?f("div",{class:"vp-portfolio-mask dark",style:[{background:`url(${a.value.imageDark}) center/cover no-repeat`},a.value.bgStyle]}):null],((h=t.avatar)==null?void 0:h.call(t,s.value))??f("div",{class:"vp-portfolio-avatar"},[f(it,{delay:.04},()=>{const{avatar:y,avatarDark:w,name:S,alt:_,avatarStyle:g}=s.value;return[y?f("img",{key:"light",class:{light:w},src:y,title:S,alt:_,style:g}):null,w?f("img",{key:"dark",class:"dark",src:w,title:S,alt:_,style:g}):null]})]),f("div",{class:"vp-portfolio-container"},((b=t.info)==null?void 0:b.call(t,c.value))??f("div",{class:"vp-portfolio-info"},[f(it,{appear:!0,delay:.08},()=>f("h6",{class:"vp-portfolio-welcome"},c.value.welcome)),f(it,{appear:!0,delay:.12},()=>f("h1",{class:"vp-portfolio-name",id:"main-title"},c.value.name)),f(it,{appear:!0,delay:.16},()=>f("h2",{class:"vp-portfolio-title"},i.value)),f(it,{appear:!0,delay:.2},()=>c.value.medias?f("div",{class:"vp-portfolio-medias"},c.value.medias.map(({name:y,url:w,icon:S})=>f("a",{class:"vp-portfolio-media",href:w,rel:"noopener noreferrer",target:"_blank",title:y},f(Ee("VPIcon"),{icon:S,sizing:"both"})))):qe("SocialMedias")?f(Ee("SocialMedias")):null)]))])}}}),x1=K({name:"PortfolioHome",setup(){const e=Se(),t=k(()=>e.value.content??"portfolio");return()=>f("main",{id:"main-content",class:"vp-page vp-portfolio-home","aria-labelledby":"main-title"},[f(k1),t.value==="none"?null:f("div",f(it,{appear:!0,delay:.24},()=>f(Ql,{class:{"vp-portfolio-content":t.value==="portfolio"}})))])}}),C1=K({name:"Layout",slots:Object,setup(e,{slots:t}){ye();const n=It(),o=Se(),r=at(),{isMobile:l}=pr(),i=k(()=>"none");return()=>[f(_u),f(bu,{},{default:()=>{var s;return((s=t.default)==null?void 0:s.call(t))??(o.value.portfolio?f(x1):o.value.home?f(g1):f(r.value?Hl:wu,()=>f(T1,{key:n.value.path},{top:t.top,bottom:t.bottom,contentBefore:t.contentBefore,contentAfter:t.contentAfter,tocBefore:t.tocBefore,tocAfter:t.tocAfter})))},navScreenBottom:i.value==="none"&&qe("BloggerInfo")?()=>f(Ee("BloggerInfo")):null,sidebar:!l.value&&i.value==="always"&&qe("BloggerInfo")?()=>f(Ee("BloggerInfo")):null})]}}),P1=K({name:"NotFoundHint",setup(){const e=ye(),t=()=>{const n=e.value.routeLocales.notFoundMsg;return n[Math.floor(Math.random()*n.length)]};return()=>f("div",{class:"not-found-hint"},[f("p",{class:"error-code"},"404"),f("h1",{class:"error-title"},e.value.routeLocales.notFoundTitle),f("p",{class:"error-hint"},t())])}}),A1=K({name:"NotFound",slots:Object,setup(e,{slots:t}){const n=mn(),o=Et(),r=ye();return()=>[f(_u),f(bu,{noSidebar:!0},()=>{var l;return f("main",{id:"main-content",class:"vp-page not-found"},((l=t.default)==null?void 0:l.call(t))??[f(P1),f("div",{class:"actions"},[f("button",{type:"button",class:"action-button",onClick:()=>{window.history.go(-1)}},r.value.routeLocales.back),f("button",{type:"button",class:"action-button",onClick:()=>{n.push(r.value.home??o.value)}},r.value.routeLocales.home)])])})]}});Nm(e=>{const t=e.title,n=e.index??!0,o=e.icon;return n?{title:t,content:o?()=>[f(Ee("VPIcon"),{icon:o}),t]:null,order:e.order,index:e.index}:null});const L1={enhance:({app:e,router:t})=>{const{scrollBehavior:n}=t.options;t.options.scrollBehavior=async(...o)=>(await il.wait(),n(...o)),qg(e)},setup:()=>{Gg(),Bg()},layouts:{Layout:C1,NotFound:A1}},R1=Object.freeze(Object.defineProperty({__proto__:null,default:L1},Symbol.toStringTag,{value:"Module"})),O1={enhance:({app:e})=>{e.component("NpmBadge",fa(()=>D(()=>import("./NpmBadge-Bgluwknq.js"),__vite__mapDeps([78,1]))))}},I1=Object.freeze(Object.defineProperty({__proto__:null,default:O1},Symbol.toStringTag,{value:"Module"})),No=[Hv,Vv,jv,zv,Bv,Gv,Kv,Yv,tm,lm,um,pm,Cm,Am,Dm,Bm,Ym,cg,vg,R1,I1].map(e=>e.default).filter(Boolean),M1=JSON.parse('{"base":"/","lang":"en-US","title":"","description":"","head":[["link",{"rel":"icon","type":"image/png","sizes":"16x16","href":"/images/icons/favicon-16x16.png"}],["link",{"rel":"icon","type":"image/png","sizes":"32x32","href":"/images/icons/favicon-32x32.png"}],["link",{"rel":"manifest","href":"/manifest.webmanifest"}],["meta",{"name":"application-name","content":"VuePress"}],["meta",{"name":"apple-mobile-web-app-title","content":"VuePress"}],["meta",{"name":"apple-mobile-web-app-status-bar-style","content":"black"}],["link",{"rel":"apple-touch-icon","href":"/images/icons/apple-touch-icon.png"}],["link",{"rel":"mask-icon","href":"/images/icons/safari-pinned-tab.svg","color":"#3eaf7c"}],["meta",{"name":"msapplication-TileColor","content":"#3eaf7c"}],["meta",{"name":"theme-color","content":"#3eaf7c"}]],"locales":{"/":{"lang":"en-US","title":"VuePress","description":"Vue-powered Static Site Generator"},"/zh/":{"lang":"zh-CN","title":"VuePress","description":"Vue 驱动的静态网站生成器"}}}');var Tn=re(M1),$1=Xp,D1=()=>{const e=Sh({history:$1(Al("/")),routes:[{name:"vuepress-route",path:"/:catchAll(.*)",components:{}}],scrollBehavior:(t,n,o)=>o||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,n)=>{if(t.path!==n.path||n===xt){const o=At(t.fullPath);if(o.path!==t.fullPath)return o.path;const r=await o.loader();t.meta={...o.meta,_pageChunk:r}}else t.path===n.path&&(t.meta=n.meta)}),e},N1=e=>{e.component("ClientOnly",Dl),e.component("Content",uc),e.component("RouteLink",ut)},H1=(e,t,n)=>{const o=k(()=>t.currentRoute.value.path),r=ea((w,S)=>({get(){return w(),t.currentRoute.value.meta._pageChunk},set(_){t.currentRoute.value.meta._pageChunk=_,S()}})),l=k(()=>en.resolveLayouts(n)),i=k(()=>en.resolveRouteLocale(Tn.value.locales,o.value)),s=k(()=>en.resolveSiteLocaleData(Tn.value,i.value)),a=k(()=>r.value.comp),c=k(()=>r.value.data),u=k(()=>c.value.frontmatter),d=k(()=>en.resolvePageHeadTitle(c.value,s.value)),p=k(()=>en.resolvePageHead(d.value,u.value,s.value)),h=k(()=>en.resolvePageLang(c.value,s.value)),b=k(()=>en.resolvePageLayout(c.value,l.value)),y={layouts:l,pageData:c,pageComponent:a,pageFrontmatter:u,pageHead:p,pageHeadTitle:d,pageLang:h,pageLayout:b,redirects:Xr,routeLocale:i,routePath:o,routes:On,siteData:Tn,siteLocaleData:s,frontmatter:u,head:p,headTitle:d,lang:h,page:c,site:Tn,siteLocale:s};return e.provide(Il,y),Object.defineProperties(e.config.globalProperties,{$pageFrontmatter:{get:()=>u.value},$pageHead:{get:()=>p.value},$pageHeadTitle:{get:()=>d.value},$pageLang:{get:()=>h.value},$pageData:{get:()=>c.value},$routeLocale:{get:()=>i.value},$withBase:{get:()=>$e},$frontmatter:{get:()=>u.value},$head:{get:()=>p.value},$headTitle:{get:()=>d.value},$lang:{get:()=>h.value},$page:{get:()=>c.value},$site:{get:()=>Tn.value},$siteLocale:{get:()=>s.value}}),y},V1=([e,t,n=""])=>{const o=Object.entries(t).map(([s,a])=>_e(a)?`[${s}=${JSON.stringify(a)}]`:a?`[${s}]`:"").join(""),r=`head > ${e}${o}`;return Array.from(document.querySelectorAll(r)).find(s=>s.innerText===n)??null},j1=([e,t,n])=>{if(!_e(e))return null;const o=document.createElement(e);return Vn(t)&&Object.entries(t).forEach(([r,l])=>{_e(l)?o.setAttribute(r,l):l&&o.setAttribute(r,"")}),_e(n)&&o.appendChild(document.createTextNode(n)),o},z1=()=>{const e=xh(),t=cr();let n=[];const o=()=>{e.value.forEach(i=>{const s=V1(i);s&&n.push(s)})},r=()=>{const i=[];return e.value.forEach(s=>{const a=j1(s);a&&i.push(a)}),i},l=()=>{document.documentElement.lang=t.value;const i=r();n.forEach((s,a)=>{const c=i.findIndex(u=>s.isEqualNode(u));c===-1?(s.remove(),delete n[a]):i.splice(c,1)}),i.forEach(s=>document.head.appendChild(s)),n=[...n.filter(s=>!!s),...i]};Rn(Ph,l),Pe(()=>{o(),xe(e,l,{immediate:!1})})},F1=rp,B1=async()=>{var n;const e=F1({name:"Vuepress",setup(){var l;z1();for(const i of No)(l=i.setup)==null||l.call(i);const o=No.flatMap(({rootComponents:i=[]})=>i.map(s=>f(s))),r=Ch();return()=>[f(r.value),o]}}),t=D1();N1(e),H1(e,t,No);for(const o of No)await((n=o.enhance)==null?void 0:n.call(o,{app:e,router:t,siteData:Tn}));return e.use(t),{app:e,router:t}};B1().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{Qe as F,G1 as a,Da as b,q1 as c,B1 as createVueApp,Na as d,Oe as e,W1 as f,ae as g,f as h,K as i,k as j,U1 as o,Ee as r,Nu as t,wf as w}; diff --git a/assets/architecture.html-Bv0X7fAx.js b/assets/architecture.html-Bv0X7fAx.js new file mode 100644 index 00000000..edb5677a --- /dev/null +++ b/assets/architecture.html-Bv0X7fAx.js @@ -0,0 +1 @@ +import{_ as s,a as i}from"./vuepress-core-process-C4qfrYlz.js";import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as u,a,b as r,d as t,e as l,w as n,r as d,o as m}from"./app-DVsngoLV.js";const g={};function f(v,e){const o=d("RouteLink");return m(),u("div",null,[e[28]||(e[28]=a('

架构

概览

vuepress-architecture-overview

上图展示了 VuePress 的简要架构:

  • Node App 会生成临时文件,包括页面、路由等。
  • Bundler 会将 Client App 和临时文件一起进行打包,就像处理一个普通的 Vue App 一样。

作为开发者,你必须要意识到 VuePress 分为两个主要部分: Node AppClient App ,这一点对于开发插件和主题来说都十分重要。

  • 插件或者主题的入口文件会在 Node App 中被加载。
  • 客户端文件会在 Client App 中被加载,也就是会被 Bundler 处理。比如组件、客户端配置文件等。

核心流程与 Hooks

vuepress-core-process

',9)),r("p",null,[e[1]||(e[1]=t("上图展示了 VuePress 的核心流程以及 ")),l(o,{to:"/zh/reference/plugin-api.html"},{default:n(()=>e[0]||(e[0]=[t("插件 API")])),_:1}),e[2]||(e[2]=t(" 的 Hooks :"))]),r("ul",null,[r("li",null,[e[14]||(e[14]=t("在 ")),e[15]||(e[15]=r("strong",null,"init",-1)),e[16]||(e[16]=t(" 阶段: ")),r("ul",null,[e[13]||(e[13]=r("li",null,"主题和插件会被加载。这意味着插件需要在初始化之前使用。",-1)),r("li",null,[e[7]||(e[7]=t("由于我们要使用 markdown-it 来解析 Markdown 文件,因此需要在加载页面文件之前创建 markdown-it 实例: ")),r("ul",null,[r("li",null,[l(o,{to:"/zh/reference/plugin-api.html#extendsmarkdownoptions"},{default:n(()=>e[3]||(e[3]=[t("extendsMarkdownOptions")])),_:1}),e[4]||(e[4]=t(" Hook 会被调用,用以创建 markdown-it 实例。"))]),r("li",null,[l(o,{to:"/zh/reference/plugin-api.html#extendsmarkdown"},{default:n(()=>e[5]||(e[5]=[t("extendsMarkdown")])),_:1}),e[6]||(e[6]=t(" Hook 会被调用,用以扩展 markdown-it 实例。"))])])]),r("li",null,[e[12]||(e[12]=t("页面文件会被加载: ")),r("ul",null,[r("li",null,[l(o,{to:"/zh/reference/plugin-api.html#extendspageoptions"},{default:n(()=>e[8]||(e[8]=[t("extendsPageOptions")])),_:1}),e[9]||(e[9]=t(" Hook 会被调用,用以创建页面。"))]),r("li",null,[l(o,{to:"/zh/reference/plugin-api.html#extendspage"},{default:n(()=>e[10]||(e[10]=[t("extendsPage")])),_:1}),e[11]||(e[11]=t(" Hook 会被调用,用以扩展页面对象。"))])])])])]),e[27]||(e[27]=r("li",null,[t("在 "),r("strong",null,"prepare"),t(" 阶段: "),r("ul",null,[r("li",null,"临时文件会被生成,因此所有和客户端文件相关的 Hooks 会在此处调用。")])],-1)),r("li",null,[e[24]||(e[24]=t("在 ")),e[25]||(e[25]=r("strong",null,"dev / build",-1)),e[26]||(e[26]=t(" 阶段: ")),r("ul",null,[r("li",null,[e[23]||(e[23]=t("Bundler 会被加载: ")),r("ul",null,[r("li",null,[l(o,{to:"/zh/reference/plugin-api.html#extendsbundleroptions"},{default:n(()=>e[17]||(e[17]=[t("extendsBundlerOptions")])),_:1}),e[18]||(e[18]=t(" Hook 会被调用,用以生成 Bundler 的配置。"))]),r("li",null,[l(o,{to:"/zh/reference/plugin-api.html#alias"},{default:n(()=>e[19]||(e[19]=[t("alias")])),_:1}),e[21]||(e[21]=t(" Hook 和 ")),l(o,{to:"/zh/reference/plugin-api.html#define"},{default:n(()=>e[20]||(e[20]=[t("define")])),_:1}),e[22]||(e[22]=t(" Hook 会被用在 Bundler 的配置中,所以它们会在此处调用。"))])])])])])])])}const y=p(g,[["render",f]]),h=JSON.parse('{"path":"/zh/advanced/architecture.html","title":"架构","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:folder-tree","description":"架构 概览 vuepress-architecture-overview 上图展示了 VuePress 的简要架构: Node App 会生成临时文件,包括页面、路由等。 Bundler 会将 Client App 和临时文件一起进行打包,就像处理一个普通的 Vue App 一样。 作为开发者,你必须要意识到 VuePress 分为两个主要部分: No...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"架构\\",\\"image\\":[\\"https://vuejs.press/images/guide/vuepress-architecture-overview.png\\",\\"https://vuejs.press/images/guide/vuepress-core-process.png\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/advanced/architecture.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"架构"}],["meta",{"property":"og:description","content":"架构 概览 vuepress-architecture-overview 上图展示了 VuePress 的简要架构: Node App 会生成临时文件,包括页面、路由等。 Bundler 会将 Client App 和临时文件一起进行打包,就像处理一个普通的 Vue App 一样。 作为开发者,你必须要意识到 VuePress 分为两个主要部分: No..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://vuejs.press/images/guide/vuepress-architecture-overview.png"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/advanced/architecture.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.42,"words":427},"filePathRelative":"zh/advanced/architecture.md","autoDesc":true}');export{y as comp,h as data}; diff --git a/assets/architecture.html-D5Z1-dEt.js b/assets/architecture.html-D5Z1-dEt.js new file mode 100644 index 00000000..ada43ff3 --- /dev/null +++ b/assets/architecture.html-D5Z1-dEt.js @@ -0,0 +1 @@ +import{_ as n,a as s}from"./vuepress-core-process-C4qfrYlz.js";import{_ as a}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a as u,b as r,d as t,e as l,w as i,r as d,o as m}from"./app-DVsngoLV.js";const g={};function f(h,e){const o=d("RouteLink");return m(),p("div",null,[e[28]||(e[28]=u('

Architecture

Overview

vuepress-architecture-overview

The above figure shows a brief overview of the VuePress architecture:

  • Node App will generate temp files, including the pages, routes, etc.
  • Bundler will handle Client App together with the temp files, just like a common Vue app.

As a developer, you must be aware of that VuePress has two main parts: Node App and Client App, which is important when developing plugins and themes:

  • The entry file of a plugin or a theme will be loaded in Node App.
  • Client files will be loaded in Client App, which will be handled by bundler. For example, components, client config files, etc.

Core Process and Hooks

vuepress-core-process

',9)),r("p",null,[e[1]||(e[1]=t("The above figure shows the core process of VuePress Node App and the hooks of ")),l(o,{to:"/reference/plugin-api.html"},{default:i(()=>e[0]||(e[0]=[t("Plugin API")])),_:1}),e[2]||(e[2]=t(":"))]),r("ul",null,[r("li",null,[e[14]||(e[14]=t("In the ")),e[15]||(e[15]=r("strong",null,"init",-1)),e[16]||(e[16]=t(" stage: ")),r("ul",null,[e[13]||(e[13]=r("li",null,"Theme and plugins will be loaded. That means all the plugins should be used before initialization.",-1)),r("li",null,[e[7]||(e[7]=t("As we are using markdown-it to parse the markdown file, so we need to create markdown-it instance before loading pages: ")),r("ul",null,[r("li",null,[l(o,{to:"/reference/plugin-api.html#extendsmarkdownoptions"},{default:i(()=>e[3]||(e[3]=[t("extendsMarkdownOptions")])),_:1}),e[4]||(e[4]=t(" hook will be processed to create markdown-it instance."))]),r("li",null,[l(o,{to:"/reference/plugin-api.html#extendsmarkdown"},{default:i(()=>e[5]||(e[5]=[t("extendsMarkdown")])),_:1}),e[6]||(e[6]=t(" hook will be processed extends markdown-it instance."))])])]),r("li",null,[e[12]||(e[12]=t("Page files will be loaded: ")),r("ul",null,[r("li",null,[l(o,{to:"/reference/plugin-api.html#extendspageoptions"},{default:i(()=>e[8]||(e[8]=[t("extendsPageOptions")])),_:1}),e[9]||(e[9]=t(" hook will be processed to create pages."))]),r("li",null,[l(o,{to:"/reference/plugin-api.html#extendspage"},{default:i(()=>e[10]||(e[10]=[t("extendsPage")])),_:1}),e[11]||(e[11]=t(" hook will be processed to extends page object."))])])])])]),e[27]||(e[27]=r("li",null,[t("In the "),r("strong",null,"prepare"),t(" stage: "),r("ul",null,[r("li",null,"Temp files will be generated, so all hooks related to client files will be processed here.")])],-1)),r("li",null,[e[24]||(e[24]=t("In the ")),e[25]||(e[25]=r("strong",null,"dev / build",-1)),e[26]||(e[26]=t(" stage: ")),r("ul",null,[r("li",null,[e[23]||(e[23]=t("Bundler will be resolved: ")),r("ul",null,[r("li",null,[l(o,{to:"/reference/plugin-api.html#extendsbundleroptions"},{default:i(()=>e[17]||(e[17]=[t("extendsBundlerOptions")])),_:1}),e[18]||(e[18]=t(" hook will be processed to create bundler configuration."))]),r("li",null,[l(o,{to:"/reference/plugin-api.html#alias"},{default:i(()=>e[19]||(e[19]=[t("alias")])),_:1}),e[21]||(e[21]=t(" hook and ")),l(o,{to:"/reference/plugin-api.html#define"},{default:i(()=>e[20]||(e[20]=[t("define")])),_:1}),e[22]||(e[22]=t(" hook would be used in bundler configuration, so they will be processed here."))])])])])])])])}const b=a(g,[["render",f]]),k=JSON.parse('{"path":"/advanced/architecture.html","title":"Architecture","lang":"en-US","frontmatter":{"icon":"fa6-solid:folder-tree","description":"Architecture Overview vuepress-architecture-overview The above figure shows a brief overview of the VuePress architecture: Node App will generate temp files, including the pages...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Architecture\\",\\"image\\":[\\"https://vuejs.press/images/guide/vuepress-architecture-overview.png\\",\\"https://vuejs.press/images/guide/vuepress-core-process.png\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/advanced/architecture.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Architecture"}],["meta",{"property":"og:description","content":"Architecture Overview vuepress-architecture-overview The above figure shows a brief overview of the VuePress architecture: Node App will generate temp files, including the pages..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://vuejs.press/images/guide/vuepress-architecture-overview.png"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/advanced/architecture.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.01,"words":303},"filePathRelative":"advanced/architecture.md","autoDesc":true}');export{b as comp,k as data}; diff --git a/assets/assets.html-BidmvL9-.js b/assets/assets.html-BidmvL9-.js new file mode 100644 index 00000000..026b7834 --- /dev/null +++ b/assets/assets.html-BidmvL9-.js @@ -0,0 +1,24 @@ +import{_ as h}from"./hero-BNkrhNQ6.js";import{_ as k}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a as l,b as a,d as s,e as n,w as t,r,o as d}from"./app-DVsngoLV.js";const g={},o={class:"hint-container tip"},A={class:"hint-container tip"};function m(u,i){const e=r("RouteLink");return d(),p("div",null,[i[34]||(i[34]=l('

静态资源

相对路径

你可以在你的 Markdown 内容中使用相对路径来引用静态资源:

![图片](./image.png)

![图片](image.png)

一般情况下,我们推荐你使用这种方式来引用图片,因为人们通常会把图片放在引用它的 Markdown 文件附近。

Public 文件

你可以把一些静态资源放在 Public 目录中,它们会被复制到最终生成的网站的根目录下。

',9)),a("p",null,[i[1]||(i[1]=s("默认的 Public 目录是 ")),i[2]||(i[2]=a("code",null,".vuepress/public",-1)),i[3]||(i[3]=s(" ,可以通过 ")),n(e,{to:"/zh/reference/config.html#public"},{default:t(()=>i[0]||(i[0]=[s("public")])),_:1}),i[4]||(i[4]=s(" 配置项来修改。"))]),i[35]||(i[35]=l(`

在下列这些情况中,你可能会用到它:

  • 你可能需要提供一些静态资源,但是它们并不直接被你的 Markdown 文件引用,比如 favicon 和 PWA 图标。
  • 你可能想要托管一些共享的静态资源,甚至可能需要在你的网站外部引用它,比如 Logo 图片。
  • 你可能想在你的 Markdown 内容中通过绝对路径来引入图片。

以我们文档的源文件为例,我们把 VuePress 的 Logo 放在了 Public 目录下:

└─ docs
+   ├─ .vuepress
+   |  └─ public
+   |     └─ images
+   |        └─ hero.png  # <- Logo 文件
+   └─ guide
+      └─ assets.md       # <- 我们在这里

我们可以这样在当前页面引用 Logo :

Input

![VuePress Logo](/images/hero.png)

Output

VuePress Logo

Base Helper

',10)),a("p",null,[i[6]||(i[6]=s("如果你的网站部署在非根路径下,例如 ")),i[7]||(i[7]=a("code",null,"https://foo.github.io/bar/",-1)),i[8]||(i[8]=s(" ,那么你应该把 ")),n(e,{to:"/zh/reference/config.html#base"},{default:t(()=>i[5]||(i[5]=[s("base")])),_:1}),i[9]||(i[9]=s(" 设置为 ")),i[10]||(i[10]=a("code",null,"'/bar/'",-1)),i[11]||(i[11]=s("。显然,此时你的 Public 文件会被部署在 ")),i[12]||(i[12]=a("code",null,"https://foo.github.io/bar/images/hero.png",-1)),i[13]||(i[13]=s(" 这样的链接下。"))]),i[36]||(i[36]=l('

在大多数情况下,你不需要担心这些 Public 文件的引用路径,因为 VuePress 会自动帮你处理 base 前缀:

<!-- 你不需要给 `/images/hero.png` 手动添加 `/bar/` 前缀 -->\n\n![VuePress Logo](/images/hero.png)
',2)),a("div",o,[i[23]||(i[23]=a("p",{class:"hint-container-title"},"提示",-1)),a("p",null,[i[16]||(i[16]=s("在使用 ")),n(e,{to:"/zh/reference/bundler/webpack.html"},{default:t(()=>i[14]||(i[14]=[s("Webpack 打包工具")])),_:1}),i[17]||(i[17]=s(" 时,你需要将 ")),n(e,{to:"/zh/reference/config.html#markdown-assets"},{default:t(()=>i[15]||(i[15]=[s("markdown.assets.absolutePathPrependBase")])),_:1}),i[18]||(i[18]=s(" 设置为 ")),i[19]||(i[19]=a("code",null,"true",-1)),i[20]||(i[20]=s(" 来给 Markdown 图片自动添加 ")),i[21]||(i[21]=a("code",null,"base",-1)),i[22]||(i[22]=s(" 前缀。"))])]),a("p",null,[i[25]||(i[25]=s("然而,有些情况下,你可能会有一些指向 Public 文件的动态路径,尤其是在你开发一个自定义主题的时候。在这种情况下, ")),i[26]||(i[26]=a("code",null,"base",-1)),i[27]||(i[27]=s(" 无法被自动处理。为了解决这个问题,VuePress 提供了 ")),n(e,{to:"/zh/reference/client-api.html#withbase"},{default:t(()=>i[24]||(i[24]=[s("withBase")])),_:1}),i[28]||(i[28]=s(" 工具函数,它可以帮助你添加 ")),i[29]||(i[29]=a("code",null,"base",-1)),i[30]||(i[30]=s(" 前缀:"))]),i[37]||(i[37]=l(`
<script setup>
+import { ref } from 'vue'
+import { withBase } from 'vuepress/client'
+
+const logoPath = ref('/images/hero.png')
+</script>
+
+<template>
+  <img :src="withBase(logoPath)" />
+</template>

你也可以通过 $withBase 来直接使用这个工具函数:

<img :src="$withBase('/images/hero.png')" alt="VuePress Logo">

依赖包和路径别名

尽管这不是常见用法,但是你可以从依赖包中引用图片:

npm install -D package-name

由于 Markdown 会默认将图片链接视为相对链接,你需要使用 <img> 标签:

<img src="package-name/image.png" alt="来自依赖包的图片">

在配置文件中设置的路径别名也同样支持:

import { getDirname, path } from 'vuepress/utils'
+
+const __dirname = getDirname(import.meta.url)
+
+export default {
+  alias: {
+    '@alias': path.resolve(__dirname, './path/to/some/dir'),
+  },
+}
<img src="@alias/image.png" alt="来自路径别名的图片">
`,11)),a("div",A,[i[33]||(i[33]=a("p",{class:"hint-container-title"},"提示",-1)),a("p",null,[i[32]||(i[32]=s("配置参考: ")),n(e,{to:"/zh/reference/plugin-api.html#alias"},{default:t(()=>i[31]||(i[31]=[s("alias")])),_:1})])])])}const F=k(g,[["render",m]]),c=JSON.parse('{"path":"/zh/guide/assets.html","title":"静态资源","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:photo-film","description":"静态资源 相对路径 你可以在你的 Markdown 内容中使用相对路径来引用静态资源: 或 一般情况下,我们推荐你使用这种方式来引用图片,因为人们通常会把图片放在引用它的 Markdown 文件附近。 Public 文件 你可以把一些静态资源放在 Public 目录中,它们会被复制到最终生成的网站的根目录下。 默认的 Public 目录是 .vuepr...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"静态资源\\",\\"image\\":[\\"https://vuejs.press/images/hero.png\\",\\"https://vuejs.press/images/hero.png\\",\\"https://vuejs.press/images/hero.png\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/assets.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"静态资源"}],["meta",{"property":"og:description","content":"静态资源 相对路径 你可以在你的 Markdown 内容中使用相对路径来引用静态资源: 或 一般情况下,我们推荐你使用这种方式来引用图片,因为人们通常会把图片放在引用它的 Markdown 文件附近。 Public 文件 你可以把一些静态资源放在 Public 目录中,它们会被复制到最终生成的网站的根目录下。 默认的 Public 目录是 .vuepr..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://vuejs.press/images/hero.png"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/assets.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":4,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.44,"words":731},"filePathRelative":"zh/guide/assets.md","autoDesc":true}');export{F as comp,c as data}; diff --git a/assets/assets.html-CGIhIJTl.js b/assets/assets.html-CGIhIJTl.js new file mode 100644 index 00000000..c8033561 --- /dev/null +++ b/assets/assets.html-CGIhIJTl.js @@ -0,0 +1,24 @@ +import{_ as h}from"./hero-BNkrhNQ6.js";import{_ as r}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a as l,b as e,d as i,e as t,w as n,r as k,o as d}from"./app-DVsngoLV.js";const o={},g={class:"hint-container tip"},u={class:"hint-container tip"};function m(A,s){const a=k("RouteLink");return d(),p("div",null,[s[32]||(s[32]=l('

Assets

Relative URLs

You can reference any assets using relative URLs in your Markdown content:

![An image](./image.png)

or

![An image](image.png)

This is generally the suggested way to import images, as users usually place images near the Markdown file that references them.

Public Files

You can put some static assets inside public directory, and they will be copied to the root of the generated directory.

',9)),e("p",null,[s[1]||(s[1]=i("The default public directory is ")),s[2]||(s[2]=e("code",null,".vuepress/public",-1)),s[3]||(s[3]=i(", which can be changed by ")),t(a,{to:"/reference/config.html#public"},{default:n(()=>s[0]||(s[0]=[i("public")])),_:1}),s[4]||(s[4]=i(" option."))]),s[33]||(s[33]=l(`

It would be useful in some cases:

  • You may need to provide static assets that are not directly referenced in any of your Markdown files, for example, favicon and PWA icons.
  • You may need to serve some shared static assets, which may even be referenced outside your site, for example, logo images.
  • You may want to reference images using absolute URLs in your Markdown content.

Take our documentation source files as an example, we are putting the logo of VuePress inside the public directory:

└─ docs
+   ├─ .vuepress
+   |  └─ public
+   |     └─ images
+   |        └─ hero.png  # <- Logo file
+   └─ guide
+      └─ assets.md       # <- Here we are

We can reference our logo in current page like this:

Input

![VuePress Logo](/images/hero.png)

Output

VuePress Logo

Base Helper

',10)),e("p",null,[s[6]||(s[6]=i("If your site is deployed to a non-root URL, for example, ")),s[7]||(s[7]=e("code",null,"https://foo.github.io/bar/",-1)),s[8]||(s[8]=i(", then the ")),t(a,{to:"/reference/config.html#base"},{default:n(()=>s[5]||(s[5]=[i("base")])),_:1}),s[9]||(s[9]=i(" should be set to ")),s[10]||(s[10]=e("code",null,"'/bar/'",-1)),s[11]||(s[11]=i(". Obviously, your public files would be served like ")),s[12]||(s[12]=e("code",null,"https://foo.github.io/bar/images/hero.png",-1)),s[13]||(s[13]=i(" after deployment."))]),s[34]||(s[34]=l('

In most cases, you don't need to worry about the reference path of those public files, as VuePress will automatically handle base for you:

<!-- you don't need to prepend `/bar/` to `/images/hero.png` manually -->\n\n![VuePress Logo](/images/hero.png)
',2)),e("div",g,[s[21]||(s[21]=e("p",{class:"hint-container-title"},"Tips",-1)),e("p",null,[s[16]||(s[16]=i("When using ")),t(a,{to:"/reference/bundler/webpack.html"},{default:n(()=>s[14]||(s[14]=[i("webpack bundler")])),_:1}),s[17]||(s[17]=i(", you need to set ")),t(a,{to:"/reference/config.html#markdown-assets"},{default:n(()=>s[15]||(s[15]=[i("markdown.assets.absolutePathPrependBase")])),_:1}),s[18]||(s[18]=i(" to ")),s[19]||(s[19]=e("code",null,"true",-1)),s[20]||(s[20]=i(" to automatically prepend base to markdown images."))])]),e("p",null,[s[23]||(s[23]=i("However, sometimes you may have some dynamical links referencing public files, especially when you are authoring a custom theme. In such case, the ")),s[24]||(s[24]=e("code",null,"base",-1)),s[25]||(s[25]=i(" could not be handled automatically. To help with that, VuePress provides a ")),t(a,{to:"/reference/client-api.html#withbase"},{default:n(()=>s[22]||(s[22]=[i("withBase")])),_:1}),s[26]||(s[26]=i(" helper to prepend ")),s[27]||(s[27]=e("code",null,"base",-1)),s[28]||(s[28]=i(" for you:"))]),s[35]||(s[35]=l(`
<script setup>
+import { ref } from 'vue'
+import { withBase } from 'vuepress/client'
+
+const logoPath = ref('/images/hero.png')
+</script>
+
+<template>
+  <img :src="withBase(logoPath)" />
+</template>

You can also access the helper by $withBase directly:

<img :src="$withBase('/images/hero.png')" alt="VuePress Logo">

Packages and Path Aliases

Although it is not a common usage, you can reference images from dependent packages:

npm install -D package-name

Since markdown image syntax regards image links as relative paths by default, you need to use <img> tag:

<img src="package-name/image.png" alt="Image from dependency">

The path aliases that set in config file are also supported:

import { getDirname, path } from 'vuepress/utils'
+
+const __dirname = getDirname(import.meta.url)
+
+export default {
+  alias: {
+    '@alias': path.resolve(__dirname, './path/to/some/dir'),
+  },
+}
<img src="@alias/image.png" alt="Image from path alias">
`,11)),e("div",u,[s[31]||(s[31]=e("p",{class:"hint-container-title"},"Tips",-1)),e("p",null,[s[30]||(s[30]=i("Config reference: ")),t(a,{to:"/reference/plugin-api.html#alias"},{default:n(()=>s[29]||(s[29]=[i("alias")])),_:1})])])])}const b=r(o,[["render",m]]),v=JSON.parse('{"path":"/guide/assets.html","title":"Assets","lang":"en-US","frontmatter":{"icon":"fa6-solid:photo-film","description":"Assets Relative URLs You can reference any assets using relative URLs in your Markdown content: or This is generally the suggested way to import images, as users usually place i...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Assets\\",\\"image\\":[\\"https://vuejs.press/images/hero.png\\",\\"https://vuejs.press/images/hero.png\\",\\"https://vuejs.press/images/hero.png\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/assets.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Assets"}],["meta",{"property":"og:description","content":"Assets Relative URLs You can reference any assets using relative URLs in your Markdown content: or This is generally the suggested way to import images, as users usually place i..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://vuejs.press/images/hero.png"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/assets.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":4,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.62,"words":486},"filePathRelative":"guide/assets.md","autoDesc":true}');export{b as comp,v as data}; diff --git a/assets/bundler.html-Cndzc5Ka.js b/assets/bundler.html-Cndzc5Ka.js new file mode 100644 index 00000000..4f9ab901 --- /dev/null +++ b/assets/bundler.html-Cndzc5Ka.js @@ -0,0 +1,16 @@ +import{_ as d}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,a as h,e as n,b as i,w as t,d as e,r as k,o as u}from"./app-DVsngoLV.js";const m={};function g(c,s){const p=k("CodeTabs"),r=k("RouteLink");return u(),o("div",null,[s[11]||(s[11]=h('

打包工具

VuePress 支持使用 ViteWebpack 作为打包工具来进行网站的开发和构建。你可以根据自己的喜好来选择使用哪个打包工具,并且不需要进行额外的配置。

安装打包工具

在安装 vuepress 包时,并不会自动安装打包工具,你需要选择并安装一个打包工具。

',4)),n(p,{id:"12",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:t(({value:a,isActive:l})=>s[0]||(s[0]=[e("pnpm")])),title1:t(({value:a,isActive:l})=>s[1]||(s[1]=[e("yarn")])),title2:t(({value:a,isActive:l})=>s[2]||(s[2]=[e("npm")])),tab0:t(({value:a,isActive:l})=>s[3]||(s[3]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# 安装 vite 打包工具")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# 安装 webpack 打包工具")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-webpack@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab1:t(({value:a,isActive:l})=>s[4]||(s[4]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# 安装 vite 打包工具")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# 安装 webpack 打包工具")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-webpack@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab2:t(({value:a,isActive:l})=>s[5]||(s[5]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# 安装 vite 打包工具")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," install"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# 安装 webpack 打包工具")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," install"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-webpack@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),_:1}),s[12]||(s[12]=i("h2",{id:"使用打包工具",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#使用打包工具"},[i("span",null,"使用打包工具")])],-1)),s[13]||(s[13]=i("p",null,"一般情况下,你不要任何额外配置就可以使用打包工具,因为我们已经帮你配置好了它们。",-1)),i("p",null,[s[7]||(s[7]=e("你只需要通过 ")),n(r,{to:"/zh/reference/config.html#bundler"},{default:t(()=>s[6]||(s[6]=[e("bundler")])),_:1}),s[8]||(s[8]=e(" 配置项指定打包工具即可:"))]),s[14]||(s[14]=h(`
import { viteBundler } from '@vuepress/bundler-vite'
+// import { webpackBundler } from '@vuepress/bundler-webpack'
+
+export default {
+  bundler: viteBundler(),
+  // bundler: webpackBundler(),
+}

当你需要对打包工具进行进阶配置时,只需要传入对应的配置项即可:

`,2)),i("ul",null,[i("li",null,[n(r,{to:"/zh/reference/bundler/vite.html"},{default:t(()=>s[9]||(s[9]=[e("打包工具 > Vite")])),_:1})]),i("li",null,[n(r,{to:"/zh/reference/bundler/webpack.html"},{default:t(()=>s[10]||(s[10]=[e("打包工具 > Webpack")])),_:1})])])])}const A=d(m,[["render",g]]),v=JSON.parse('{"path":"/zh/guide/bundler.html","title":"打包工具","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:boxes-packing","description":"打包工具 VuePress 支持使用 Vite 或 Webpack 作为打包工具来进行网站的开发和构建。你可以根据自己的喜好来选择使用哪个打包工具,并且不需要进行额外的配置。 安装打包工具 在安装 vuepress 包时,并不会自动安装打包工具,你需要选择并安装一个打包工具。 使用打包工具 一般情况下,你不要任何额外配置就可以使用打包工具,因为我们已经...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"打包工具\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/bundler.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"打包工具"}],["meta",{"property":"og:description","content":"打包工具 VuePress 支持使用 Vite 或 Webpack 作为打包工具来进行网站的开发和构建。你可以根据自己的喜好来选择使用哪个打包工具,并且不需要进行额外的配置。 安装打包工具 在安装 vuepress 包时,并不会自动安装打包工具,你需要选择并安装一个打包工具。 使用打包工具 一般情况下,你不要任何额外配置就可以使用打包工具,因为我们已经..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/bundler.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":3,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.08,"words":323},"filePathRelative":"zh/guide/bundler.md","autoDesc":true}');export{A as comp,v as data}; diff --git a/assets/bundler.html-DHcJhx7E.js b/assets/bundler.html-DHcJhx7E.js new file mode 100644 index 00000000..33274b8a --- /dev/null +++ b/assets/bundler.html-DHcJhx7E.js @@ -0,0 +1,16 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,a as h,e as a,b as i,w as t,d as s,r as d,o as u}from"./app-DVsngoLV.js";const c={};function g(b,e){const k=d("CodeTabs"),r=d("RouteLink");return u(),o("div",null,[e[11]||(e[11]=h('

Bundler

VuePress supports using Webpack or Vite to dev and build sites. You can choose which bundler to use according to your preference, and no extra configuration is required.

Install a Bundler

When installing the vuepress package, no bundlers will be installed. You need to choose a bundler to install.

',4)),a(k,{id:"12",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:t(({value:n,isActive:l})=>e[0]||(e[0]=[s("pnpm")])),title1:t(({value:n,isActive:l})=>e[1]||(e[1]=[s("yarn")])),title2:t(({value:n,isActive:l})=>e[2]||(e[2]=[s("npm")])),tab0:t(({value:n,isActive:l})=>e[3]||(e[3]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install vite bundler")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install webpack bundler")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-webpack@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab1:t(({value:n,isActive:l})=>e[4]||(e[4]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install vite bundler")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install webpack bundler")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-webpack@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab2:t(({value:n,isActive:l})=>e[5]||(e[5]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install vite bundler")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," install"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install webpack bundler")]),s(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," install"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-webpack@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),_:1}),e[12]||(e[12]=i("h2",{id:"use-a-bundler",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#use-a-bundler"},[i("span",null,"Use a Bundler")])],-1)),e[13]||(e[13]=i("p",null,"Generally, you could use a bundler without extra configuration, because we have already configured them properly to work with VuePress.",-1)),i("p",null,[e[7]||(e[7]=s("You can use a bundler via the ")),a(r,{to:"/reference/config.html#bundler"},{default:t(()=>e[6]||(e[6]=[s("bundler")])),_:1}),e[8]||(e[8]=s(" option:"))]),e[14]||(e[14]=h(`
import { viteBundler } from '@vuepress/bundler-vite'
+// import { webpackBundler } from '@vuepress/bundler-webpack'
+
+export default {
+  bundler: viteBundler(),
+  // bundler: webpackBundler(),
+}

When you need to customize the bundler, you can set the corresponding options:

`,2)),i("ul",null,[i("li",null,[a(r,{to:"/reference/bundler/vite.html"},{default:t(()=>e[9]||(e[9]=[s("Bundlers > Vite")])),_:1})]),i("li",null,[a(r,{to:"/reference/bundler/webpack.html"},{default:t(()=>e[10]||(e[10]=[s("Bundlers > Webpack")])),_:1})])])])}const A=p(c,[["render",g]]),v=JSON.parse('{"path":"/guide/bundler.html","title":"Bundler","lang":"en-US","frontmatter":{"icon":"fa6-solid:boxes-packing","description":"Bundler VuePress supports using Webpack or Vite to dev and build sites. You can choose which bundler to use according to your preference, and no extra configuration is required....","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Bundler\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/bundler.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Bundler"}],["meta",{"property":"og:description","content":"Bundler VuePress supports using Webpack or Vite to dev and build sites. You can choose which bundler to use according to your preference, and no extra configuration is required...."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/bundler.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":3,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.66,"words":199},"filePathRelative":"guide/bundler.md","autoDesc":true}');export{A as comp,v as data}; diff --git a/assets/cli.html-BYnU5Row.js b/assets/cli.html-BYnU5Row.js new file mode 100644 index 00000000..a761d7ac --- /dev/null +++ b/assets/cli.html-BYnU5Row.js @@ -0,0 +1,43 @@ +import{_ as i}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as l,a as n,b as t,d as s,e as p,w as r,r as o,o as d}from"./app-DVsngoLV.js";const c={};function m(u,e){const a=o("RouteLink");return d(),l("div",null,[e[3]||(e[3]=n(`

Command Line Interface

Run vuepress --help to get following help messages:

Usage:
+  $ vuepress <command> [options]
+
+Commands:
+  dev [sourceDir]    Start development server
+  build [sourceDir]  Build to static site
+  info               Display environment information
+
+For more info, run any command with the \`--help\` flag:
+  $ vuepress dev --help
+  $ vuepress build --help
+  $ vuepress info --help
+
+Options:
+  -v, --version  Display version number
+  -h, --help     Display this message

Tips

VuePress is using debug module.

Set environment variable DEBUG=vuepress* to enable debug logs.

dev

Start a development server to develop your VuePress site locally.

Usage:
+  $ vuepress dev [sourceDir]
+
+Options:
+  -c, --config <config>  Set path to config file
+  -p, --port <port>      Use specified port (default: 8080)
+  -t, --temp <temp>      Set the directory of the temporary files
+  --host <host>          Use specified host (default: 0.0.0.0)
+  --cache <cache>        Set the directory of the cache files
+  --clean-temp           Clean the temporary files before dev
+  --clean-cache          Clean the cache files before dev
+  --open                 Open browser when ready
+  --debug                Enable debug mode
+  --no-watch             Disable watching page and config files (default: true)
+  -v, --version          Display version number
+  -h, --help             Display this message

Tips

Options set by CLI will override those options with the same name in your config file.

build

`,9)),t("p",null,[e[1]||(e[1]=s("Build your VuePress site to static files, which are ready for ")),p(a,{to:"/guide/deployment.html"},{default:r(()=>e[0]||(e[0]=[s("deployment")])),_:1}),e[2]||(e[2]=s("."))]),e[4]||(e[4]=n(`
Usage:
+  $ vuepress build [sourceDir]
+
+Options:
+  -c, --config <config>  Set path to config file
+  -d, --dest <dest>      Set the directory build output (default: .vuepress/dist)
+  -t, --temp <temp>      Set the directory of the temporary files
+  --cache <cache>        Set the directory of the cache files
+  --clean-temp           Clean the temporary files before build
+  --clean-cache          Clean the cache files before build
+  --debug                Enable debug mode
+  -v, --version          Display version number
+  -h, --help             Display this message

Tips

Options set by CLI will override those options with the same name in your config file.

info

Outputs information about your system and dependencies.

This command would be helpful when you want to check your environment or report an issue.

`,5))])}const b=i(c,[["render",m]]),g=JSON.parse('{"path":"/reference/cli.html","title":"Command Line Interface","lang":"en-US","frontmatter":{"icon":"bi:terminal-fill","description":"Command Line Interface Run vuepress --help to get following help messages: Tips VuePress is using debug module. Set environment variable DEBUG=vuepress* to enable debug logs. de...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Command Line Interface\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/cli.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Command Line Interface"}],["meta",{"property":"og:description","content":"Command Line Interface Run vuepress --help to get following help messages: Tips VuePress is using debug module. Set environment variable DEBUG=vuepress* to enable debug logs. de..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/cli.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":3,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.1,"words":330},"filePathRelative":"reference/cli.md","autoDesc":true}');export{b as comp,g as data}; diff --git a/assets/cli.html-xEorj72l.js b/assets/cli.html-xEorj72l.js new file mode 100644 index 00000000..93136ef3 --- /dev/null +++ b/assets/cli.html-xEorj72l.js @@ -0,0 +1,43 @@ +import{_ as i}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as l,a as n,b as p,d as s,e as t,w as r,r as d,o as c}from"./app-DVsngoLV.js";const o={};function m(u,e){const a=d("RouteLink");return c(),l("div",null,[e[3]||(e[3]=n(`

命令行接口

执行 vuepress --help 来获取下列帮助信息:

Usage:
+  $ vuepress <command> [options]
+
+Commands:
+  dev [sourceDir]    Start development server
+  build [sourceDir]  Build to static site
+  info               Display environment information
+
+For more info, run any command with the \`--help\` flag:
+  $ vuepress dev --help
+  $ vuepress build --help
+  $ vuepress info --help
+
+Options:
+  -v, --version  Display version number
+  -h, --help     Display this message

提示

VuePress 使用了 debug 模块。

设置环境变量 DEBUG=vuepress* 可以启用调试日志。

dev

启动一个开发服务器,在本地开发你的 VuePress 站点。

Usage:
+  $ vuepress dev [sourceDir]
+
+Options:
+  -c, --config <config>  Set path to config file
+  -p, --port <port>      Use specified port (default: 8080)
+  -t, --temp <temp>      Set the directory of the temporary files
+  --host <host>          Use specified host (default: 0.0.0.0)
+  --cache <cache>        Set the directory of the cache files
+  --clean-temp           Clean the temporary files before dev
+  --clean-cache          Clean the cache files before dev
+  --open                 Open browser when ready
+  --debug                Enable debug mode
+  --no-watch             Disable watching page and config files (default: true)
+  -v, --version          Display version number
+  -h, --help             Display this message

提示

通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。

build

`,9)),p("p",null,[e[1]||(e[1]=s("将你的 VuePress 站点构建成静态文件,以便你进行后续")),t(a,{to:"/zh/guide/deployment.html"},{default:r(()=>e[0]||(e[0]=[s("部署")])),_:1}),e[2]||(e[2]=s("。"))]),e[4]||(e[4]=n(`
Usage:
+  $ vuepress build [sourceDir]
+
+Options:
+  -c, --config <config>  Set path to config file
+  -d, --dest <dest>      Set the directory build output (default: .vuepress/dist)
+  -t, --temp <temp>      Set the directory of the temporary files
+  --cache <cache>        Set the directory of the cache files
+  --clean-temp           Clean the temporary files before build
+  --clean-cache          Clean the cache files before build
+  --debug                Enable debug mode
+  -v, --version          Display version number
+  -h, --help             Display this message

提示

通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。

info

输出当前系统和依赖相关的信息。

在你想要检查你的环境,或者提交 Issue 时候,可以使用该命令。

`,5))])}const b=i(o,[["render",m]]),g=JSON.parse('{"path":"/zh/reference/cli.html","title":"命令行接口","lang":"zh-CN","frontmatter":{"icon":"bi:terminal-fill","description":"命令行接口 执行 vuepress --help 来获取下列帮助信息: 提示 VuePress 使用了 debug 模块。 设置环境变量 DEBUG=vuepress* 可以启用调试日志。 dev 启动一个开发服务器,在本地开发你的 VuePress 站点。 提示 通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。 build 将你的 VuePr...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"命令行接口\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/cli.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"命令行接口"}],["meta",{"property":"og:description","content":"命令行接口 执行 vuepress --help 来获取下列帮助信息: 提示 VuePress 使用了 debug 模块。 设置环境变量 DEBUG=vuepress* 可以启用调试日志。 dev 启动一个开发服务器,在本地开发你的 VuePress 站点。 提示 通过命令行设置的配置项,会覆盖你配置文件中的同名配置项。 build 将你的 VuePr..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/reference/cli.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":3,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.33,"words":399},"filePathRelative":"zh/reference/cli.md","autoDesc":true}');export{b as comp,g as data}; diff --git a/assets/client-api.html-CV5G7JTh.js b/assets/client-api.html-CV5G7JTh.js new file mode 100644 index 00000000..639371db --- /dev/null +++ b/assets/client-api.html-CV5G7JTh.js @@ -0,0 +1,31 @@ +import{_ as r}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as d,a as t,b as i,e,w as n,d as a,r as p,o as k}from"./app-DVsngoLV.js";const o={},u={id:"resolvers",tabindex:"-1"},g={class:"header-anchor",href:"#resolvers"};function A(B,s){const l=p("RouteLink"),h=p("Badge");return k(),d("div",null,[s[43]||(s[43]=t(`

客户端 API

客户端 API 可以通过 vuepress/client 来引入。

组合式 API

useClientData

  • 详情:

    返回所有客户端数据的 Ref 对象。

    每个属性也可以通过下列的组合式 API 来访问。

  • 示例:

<script setup lang="ts">
+import { useClientData } from 'vuepress/client'
+
+const {
+  pageData,
+  pageFrontmatter,
+  pageHead,
+  pageHeadTitle,
+  pageLang,
+  routeLocale,
+  siteData,
+  siteLocaleData,
+} = useClientData()
+</script>

usePageData

`,7)),i("ul",null,[s[3]||(s[3]=i("li",null,[i("p",null,"详情:"),i("p",null,"返回当前页面数据的 Ref 对象。")],-1)),i("li",null,[s[2]||(s[2]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[e(l,{to:"/zh/reference/node-api.html#data"},{default:n(()=>s[0]||(s[0]=[a("Node API > Page 属性 > data")])),_:1})]),i("li",null,[e(l,{to:"/zh/reference/plugin-api.html#extendspage"},{default:n(()=>s[1]||(s[1]=[a("插件 API > extendsPage")])),_:1})])])])]),s[44]||(s[44]=i("h3",{id:"usepagefrontmatter",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#usepagefrontmatter"},[i("span",null,"usePageFrontmatter")])],-1)),s[45]||(s[45]=i("ul",null,[i("li",null,[i("p",null,"详情:"),i("p",null,"返回当前页面 Frontmatter 的 Ref 对象。"),i("p",null,[a("它的值是页面数据的 "),i("code",null,"frontmatter"),a(" 属性。")])])],-1)),s[46]||(s[46]=i("h3",{id:"usepagehead",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#usepagehead"},[i("span",null,"usePageHead")])],-1)),i("ul",null,[i("li",null,[s[9]||(s[9]=i("p",null,"详情:",-1)),s[10]||(s[10]=i("p",null,"返回当前页面 Head 配置的 Ref 对象。",-1)),i("p",null,[s[6]||(s[6]=a("它的值是合并 ")),e(l,{to:"/zh/reference/frontmatter.html#head"},{default:n(()=>s[4]||(s[4]=[a("head")])),_:1}),s[7]||(s[7]=a(" Frontmatter 和 ")),e(l,{to:"/zh/reference/config.html#head"},{default:n(()=>s[5]||(s[5]=[a("head")])),_:1}),s[8]||(s[8]=a(" 配置,并进行去重后得到的。"))])])]),s[47]||(s[47]=t('

usePageHeadTitle

  • 详情:

    返回当前页面 Head 中的标题的 Ref 对象。

    它的值是连接页面标题和站点标题后得到的。

usePageLang

  • 详情:

    返回当前页面语言的 Ref 对象。

    它的值是页面数据的 lang 属性。

useRoutes

',5)),i("ul",null,[s[13]||(s[13]=i("li",null,[i("p",null,"详情:"),i("p",null,"返回所有路由的 Ref 对象。"),i("p",null,"它的值是站点数据的路由信息。")],-1)),i("li",null,[s[12]||(s[12]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[e(l,{to:"/zh/advanced/cookbook/resolving-routes.html"},{default:n(()=>s[11]||(s[11]=[a("深入 > Cookbook > 解析路由")])),_:1})])])])]),s[48]||(s[48]=i("h3",{id:"useroutelocale",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#useroutelocale"},[i("span",null,"useRouteLocale")])],-1)),i("ul",null,[i("li",null,[s[17]||(s[17]=i("p",null,"详情:",-1)),s[18]||(s[18]=i("p",null,"返回当前路由对应的 locale path 的 Ref 对象。",-1)),i("p",null,[s[15]||(s[15]=a("它的值是 ")),e(l,{to:"/zh/reference/config.html#locales"},{default:n(()=>s[14]||(s[14]=[a("locales")])),_:1}),s[16]||(s[16]=a(" 配置的键之一。"))])])]),s[49]||(s[49]=t(`

useSiteData

  • 详情:

    返回站点数据的 Ref 对象。

useSiteLocaleData

  • 详情:

    返回当前 locale 的站点数据的 Ref 对象。

    当前 locale 中的配置已经合并到顶层配置中。

onContentUpdated

  • 详情:

    当 markdown 文件内容发生变化时,触发回调。

    该函数仅能在组件的 setup 阶段被调用。

    <script setup>
    +import { onContentUpdated } from 'vuepress/client'
    +
    +onContentUpdated((reason) => {
    +  console.log(\`content updated reason: \${reason}\`)
    +})
    +</script>

工具函数

defineClientConfig

`,8)),i("ul",null,[i("li",null,[s[22]||(s[22]=i("p",null,"详情:",-1)),i("p",null,[s[20]||(s[20]=a("帮助你创建 ")),e(l,{to:"/zh/reference/plugin-api.html#clientconfigfile"},{default:n(()=>s[19]||(s[19]=[a("clientConfigFile")])),_:1}),s[21]||(s[21]=a(" 的工具函数。"))])]),i("li",null,[s[24]||(s[24]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[e(l,{to:"/zh/advanced/cookbook/usage-of-client-config.html"},{default:n(()=>s[23]||(s[23]=[a("深入 > Cookbook > 客户端配置的使用方法")])),_:1})])])])]),s[50]||(s[50]=i("h3",{id:"resolveroute",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#resolveroute"},[i("span",null,"resolveRoute")])],-1)),i("ul",null,[s[27]||(s[27]=i("li",null,[i("p",null,"详情:"),i("p",null,"解析给定链接对应的路由")],-1)),i("li",null,[s[26]||(s[26]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[e(l,{to:"/zh/advanced/cookbook/resolving-routes.html"},{default:n(()=>s[25]||(s[25]=[a("深入 > Cookbook > 解析路由")])),_:1})])])])]),s[51]||(s[51]=i("h3",{id:"resolveroutepath",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#resolveroutepath"},[i("span",null,"resolveRoutePath")])],-1)),i("ul",null,[s[30]||(s[30]=i("li",null,[i("p",null,"详情:"),i("p",null,"解析给定链接对应的路由路径")],-1)),i("li",null,[s[29]||(s[29]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[e(l,{to:"/zh/advanced/cookbook/resolving-routes.html"},{default:n(()=>s[28]||(s[28]=[a("深入 > Cookbook > 解析路由")])),_:1})])])])]),s[52]||(s[52]=i("h3",{id:"withbase",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#withbase"},[i("span",null,"withBase")])],-1)),i("ul",null,[i("li",null,[s[34]||(s[34]=i("p",null,"详情:",-1)),i("p",null,[s[32]||(s[32]=a("在 URL 前添加站点 ")),e(l,{to:"/zh/reference/config.html#base"},{default:n(()=>s[31]||(s[31]=[a("base")])),_:1}),s[33]||(s[33]=a(" 前缀。"))])]),i("li",null,[s[36]||(s[36]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[e(l,{to:"/zh/guide/assets.html#base-helper"},{default:n(()=>s[35]||(s[35]=[a("指南 > 静态资源 > Base Helper")])),_:1})])])])]),s[53]||(s[53]=t(`

常量

在客户端代码中有一些常量可以使用。

如果想要把这些常量的类型定义补充到你的代码环境中,请将 vuepress/client-types 添加到你的 tsconfig.json 里:

{
+  "compilerOptions": {
+    "types": ["vuepress/client-types"]
+  }
+}

__VUEPRESS_VERSION__

  • 类型: string

  • 详情:

    VuePress Core 的版本号。

__VUEPRESS_BASE__

`,7)),i("ul",null,[s[41]||(s[41]=i("li",null,[i("p",null,[a("类型: "),i("code",null,"string")])],-1)),i("li",null,[s[40]||(s[40]=i("p",null,"详情:",-1)),i("p",null,[s[38]||(s[38]=a("配置中的 ")),e(l,{to:"/zh/reference/config.html#base"},{default:n(()=>s[37]||(s[37]=[a("base")])),_:1}),s[39]||(s[39]=a(" 字段。"))])])]),s[54]||(s[54]=t('

__VUEPRESS_DEV__

  • 类型: boolean

  • 详情:

    一个环境标记,用于标识当前是否运行在 dev 模式下。

__VUEPRESS_SSR__

  • 类型: boolean

  • 详情:

    一个环境标记,用于标识当前是否运行在服务端渲染 (SSR) 环境下。

进阶能力

',5)),i("h3",u,[i("a",g,[i("span",null,[s[42]||(s[42]=a("resolvers ")),e(h,{text:"实验性能力"})])])]),s[55]||(s[55]=t(`
  • 类型: Record<string, Function>

  • 详情:

    一个响应式对象,其中的方法决定了如何获取全局计算属性。

  • 示例:

在客户端配置文件中自定义 <title> 的格式:

import { defineClientConfig, resolvers } from 'vuepress/client'
+
+export default defineClientConfig({
+  enhance({ app, router, siteData }) {
+    resolvers.resolvePageHeadTitle = (page, siteLocale) =>
+      \`\${siteLocale.title} > \${page.title}\`
+  },
+})

警告

resolvers 会直接影响 VuePress 的基础功能,在修改前请确保你已充分了解其用途。

`,4))])}const v=r(o,[["render",A]]),f=JSON.parse('{"path":"/zh/reference/client-api.html","title":"客户端 API","lang":"zh-CN","frontmatter":{"icon":"fa6-brands:chrome","description":"客户端 API 客户端 API 可以通过 vuepress/client 来引入。 组合式 API useClientData 详情: 返回所有客户端数据的 Ref 对象。 每个属性也可以通过下列的组合式 API 来访问。 示例: usePageData 详情: 返回当前页面数据的 Ref 对象。 参考: usePageFrontmatter 详情: ...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"客户端 API\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/client-api.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"客户端 API"}],["meta",{"property":"og:description","content":"客户端 API 客户端 API 可以通过 vuepress/client 来引入。 组合式 API useClientData 详情: 返回所有客户端数据的 Ref 对象。 每个属性也可以通过下列的组合式 API 来访问。 示例: usePageData 详情: 返回当前页面数据的 Ref 对象。 参考: usePageFrontmatter 详情: ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/reference/client-api.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":7,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":2,"url":"https://github.com/Mister-Hope"},{"name":"pengzhanbo","username":"pengzhanbo","email":"q942450674@outlook.com","commits":1,"url":"https://github.com/pengzhanbo"}]},"readingTime":{"minutes":2.61,"words":782},"filePathRelative":"zh/reference/client-api.md","autoDesc":true}');export{v as comp,f as data}; diff --git a/assets/client-api.html-D4ZKAx8U.js b/assets/client-api.html-D4ZKAx8U.js new file mode 100644 index 00000000..a5ac9c16 --- /dev/null +++ b/assets/client-api.html-D4ZKAx8U.js @@ -0,0 +1,31 @@ +import{_ as h}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as d,a as t,b as i,e as a,w as l,d as e,r as p,o}from"./app-DVsngoLV.js";const k={},u={id:"resolvers",tabindex:"-1"},g={class:"header-anchor",href:"#resolvers"};function A(c,s){const n=p("RouteLink"),r=p("Badge");return o(),d("div",null,[s[43]||(s[43]=t(`

Client API

Client API can be imported from vuepress/client.

Composition API

useClientData

  • Details:

    Returns all the client data ref objects.

    Each property can also be accessed by the following composition APIs.

  • Example:

<script setup lang="ts">
+import { useClientData } from 'vuepress/client'
+
+const {
+  pageData,
+  pageFrontmatter,
+  pageHead,
+  pageHeadTitle,
+  pageLang,
+  routeLocale,
+  siteData,
+  siteLocaleData,
+} = useClientData()
+</script>

usePageData

`,7)),i("ul",null,[s[3]||(s[3]=i("li",null,[i("p",null,"Details:"),i("p",null,"Returns the page data ref object of current page.")],-1)),i("li",null,[s[2]||(s[2]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[a(n,{to:"/reference/node-api.html#data"},{default:l(()=>s[0]||(s[0]=[e("Node API > Page Properties > data")])),_:1})]),i("li",null,[a(n,{to:"/reference/plugin-api.html#extendspage"},{default:l(()=>s[1]||(s[1]=[e("Plugin API > extendsPage")])),_:1})])])])]),s[44]||(s[44]=i("h3",{id:"usepagefrontmatter",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#usepagefrontmatter"},[i("span",null,"usePageFrontmatter")])],-1)),s[45]||(s[45]=i("ul",null,[i("li",null,[i("p",null,"Details:"),i("p",null,"Returns the frontmatter ref object of current page."),i("p",null,[e("The value is the "),i("code",null,"frontmatter"),e(" property of the page data.")])])],-1)),s[46]||(s[46]=i("h3",{id:"usepagehead",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#usepagehead"},[i("span",null,"usePageHead")])],-1)),i("ul",null,[i("li",null,[s[9]||(s[9]=i("p",null,"Details:",-1)),s[10]||(s[10]=i("p",null,"Returns the head config ref object of current page.",-1)),i("p",null,[s[6]||(s[6]=e("The value is obtained by merging and deduplicating ")),a(n,{to:"/reference/frontmatter.html#head"},{default:l(()=>s[4]||(s[4]=[e("head")])),_:1}),s[7]||(s[7]=e(" frontmatter and ")),a(n,{to:"/reference/config.html#head"},{default:l(()=>s[5]||(s[5]=[e("head")])),_:1}),s[8]||(s[8]=e(" config."))])])]),s[47]||(s[47]=t('

usePageHeadTitle

  • Details:

    Returns the head title ref object of current page.

    The value is obtained by joining the page title and site title.

usePageLang

  • Details:

    Returns the language ref object of current page.

    The value is the lang property of the page data.

useRoutes

',5)),i("ul",null,[s[13]||(s[13]=i("li",null,[i("p",null,"Details:"),i("p",null,"Returns the routes ref object."),i("p",null,[e("The value is the "),i("code",null,"routes"),e(" property of the site data.")])],-1)),i("li",null,[s[12]||(s[12]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[a(n,{to:"/advanced/cookbook/resolving-routes.html"},{default:l(()=>s[11]||(s[11]=[e("Advanced > Cookbook > Resolving Routes")])),_:1})])])])]),s[48]||(s[48]=i("h3",{id:"useroutelocale",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#useroutelocale"},[i("span",null,"useRouteLocale")])],-1)),i("ul",null,[i("li",null,[s[17]||(s[17]=i("p",null,"Details:",-1)),s[18]||(s[18]=i("p",null,"Returns the locale path ref object of current route.",-1)),i("p",null,[s[15]||(s[15]=e("The value is one of the keys of the ")),a(n,{to:"/reference/config.html#locales"},{default:l(()=>s[14]||(s[14]=[e("locales")])),_:1}),s[16]||(s[16]=e(" config."))])])]),s[49]||(s[49]=t(`

useSiteData

  • Details:

    Returns the site data ref object.

useSiteLocaleData

  • Details:

    Returns the site data ref object of current locale.

    The properties of current locale have been merged into the root-level properties.

onContentUpdated

  • Details:

    When the content of the markdown file changes, the callback is triggered.

    This function can only be called during the setup phase of the component.

    <script setup>
    +import { onContentUpdated } from 'vuepress/client'
    +
    +onContentUpdated((reason) => {
    +  console.log(\`content updated reason: \${reason}\`)
    +})
    +</script>

Helpers

defineClientConfig

`,8)),i("ul",null,[i("li",null,[s[22]||(s[22]=i("p",null,"Details:",-1)),i("p",null,[s[20]||(s[20]=e("Helper for creating ")),a(n,{to:"/reference/plugin-api.html#clientconfigfile"},{default:l(()=>s[19]||(s[19]=[e("clientConfigFile")])),_:1}),s[21]||(s[21]=e("."))])]),i("li",null,[s[24]||(s[24]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[a(n,{to:"/advanced/cookbook/usage-of-client-config.html"},{default:l(()=>s[23]||(s[23]=[e("Advanced > Cookbook > Usage of Client Config")])),_:1})])])])]),s[50]||(s[50]=i("h3",{id:"resolveroute",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#resolveroute"},[i("span",null,"resolveRoute")])],-1)),i("ul",null,[s[27]||(s[27]=i("li",null,[i("p",null,"Details:"),i("p",null,"Parses the route of the given link.")],-1)),i("li",null,[s[26]||(s[26]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[a(n,{to:"/advanced/cookbook/resolving-routes.html"},{default:l(()=>s[25]||(s[25]=[e("Advanced > Cookbook > Resolving Routes")])),_:1})])])])]),s[51]||(s[51]=i("h3",{id:"resolveroutepath",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#resolveroutepath"},[i("span",null,"resolveRoutePath")])],-1)),i("ul",null,[s[30]||(s[30]=i("li",null,[i("p",null,"Details:"),i("p",null,"Parses the route path of the given link.")],-1)),i("li",null,[s[29]||(s[29]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[a(n,{to:"/advanced/cookbook/resolving-routes.html"},{default:l(()=>s[28]||(s[28]=[e("Advanced > Cookbook > Resolving Routes")])),_:1})])])])]),s[52]||(s[52]=i("h3",{id:"withbase",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#withbase"},[i("span",null,"withBase")])],-1)),i("ul",null,[i("li",null,[s[34]||(s[34]=i("p",null,"Details:",-1)),i("p",null,[s[32]||(s[32]=e("Prefix URL with site ")),a(n,{to:"/reference/config.html#base"},{default:l(()=>s[31]||(s[31]=[e("base")])),_:1}),s[33]||(s[33]=e("."))])]),i("li",null,[s[36]||(s[36]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[a(n,{to:"/guide/assets.html#base-helper"},{default:l(()=>s[35]||(s[35]=[e("Guide > Assets > Base Helper")])),_:1})])])])]),s[53]||(s[53]=t(`

Constants

There are some constants that available in the client side code.

To shim the types of these constants in client side code, add vuepress/client-types to your tsconfig.json:

{
+  "compilerOptions": {
+    "types": ["vuepress/client-types"]
+  }
+}

__VUEPRESS_VERSION__

  • Type: string

  • Details:

    Version of VuePress core package.

__VUEPRESS_BASE__

`,7)),i("ul",null,[s[41]||(s[41]=i("li",null,[i("p",null,[e("Type: "),i("code",null,"string")])],-1)),i("li",null,[s[40]||(s[40]=i("p",null,"Details:",-1)),i("p",null,[s[38]||(s[38]=e("The ")),a(n,{to:"/reference/config.html#base"},{default:l(()=>s[37]||(s[37]=[e("base")])),_:1}),s[39]||(s[39]=e(" option from config."))])])]),s[54]||(s[54]=t('

__VUEPRESS_DEV__

  • Type: boolean

  • Details:

    An environment flag indicating whether it is currently running in dev mode.

__VUEPRESS_SSR__

  • Type: boolean

  • Details:

    An environment flag indicating whether it is currently running in server-side-rendering (SSR) build.

Advanced

',5)),i("h3",u,[i("a",g,[i("span",null,[s[42]||(s[42]=e("resolvers ")),a(r,{text:"experimental"})])])]),s[55]||(s[55]=t(`
  • Type: Record<string, Function>

  • Details:

    An reactive object, methods of which determining how to resolve global computed.

  • Example:

Customizing the format of <title> in client config file:

import { defineClientConfig, resolvers } from 'vuepress/client'
+
+export default defineClientConfig({
+  enhance({ app, router, siteData }) {
+    resolvers.resolvePageHeadTitle = (page, siteLocale) =>
+      \`\${siteLocale.title} > \${page.title}\`
+  },
+})

Caution

resolvers will affect the basic functionality of VuePress. Please make sure you have fully understood its purpose before modifying it.

`,4))])}const m=h(k,[["render",A]]),f=JSON.parse('{"path":"/reference/client-api.html","title":"Client API","lang":"en-US","frontmatter":{"icon":"fa6-brands:chrome","description":"Client API Client API can be imported from vuepress/client. Composition API useClientData Details: Returns all the client data ref objects. Each property can also be accessed by...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Client API\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/client-api.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Client API"}],["meta",{"property":"og:description","content":"Client API Client API can be imported from vuepress/client. Composition API useClientData Details: Returns all the client data ref objects. Each property can also be accessed by..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/client-api.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":8,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":2,"url":"https://github.com/Mister-Hope"},{"name":"pengzhanbo","username":"pengzhanbo","email":"q942450674@outlook.com","commits":1,"url":"https://github.com/pengzhanbo"}]},"readingTime":{"minutes":1.79,"words":536},"filePathRelative":"reference/client-api.md","autoDesc":true}');export{m as comp,f as data}; diff --git a/assets/components.html-DRn-dJE5.js b/assets/components.html-DRn-dJE5.js new file mode 100644 index 00000000..7b6974c2 --- /dev/null +++ b/assets/components.html-DRn-dJE5.js @@ -0,0 +1,56 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as e,a as n,b as i,d as a,e as h,w as k,r as p,o as d}from"./app-DVsngoLV.js";const r={};function o(c,s){const l=p("RouteLink");return d(),e("div",null,[s[3]||(s[3]=n(`

内置组件

  • Props:

    • config
      • 类型:AutoLinkConfig
      • 是否必须:true
interface AutoLinkConfig {
+  /**
+   * 判断该链接是否被激活的模式,优先级高于 \`exact\`
+   */
+  activeMatch?: RegExp | string
+
+  /**
+   * \`aria-label\` 属性
+   */
+  ariaLabel?: string
+
+  /**
+   * 该链接是否只有在 URL 完全匹配时才激活
+   */
+  exact?: boolean
+
+  /**
+   * 自动链接的 URL
+   */
+  link: string
+
+  /**
+   * \`rel\` 属性
+   */
+  rel?: string
+
+  /**
+   * \`target\` 属性
+   */
+  target?: string
+
+  /**
+   * 自动链接的文本
+   */
+  text: string
+}
  • 使用:
<AutoLink :config="autoLinkConfig" />
+
+<AutoLink :config="autoLinkConfig">
+  default 插槽
+</AutoLink>
+
+<AutoLink :config="autoLinkConfig">
+  <template #before>before 插槽</template>
+  <template #after>after 插槽</template>
+</AutoLink>
+
+<AutoLink :config="autoLinkConfig">
+  <template v-slot="config">{{ config.text }}</template>
+</AutoLink>
+
+<AutoLink :config="autoLinkConfig">
+  <template #before="config">{{ config.text }}</template>
+</AutoLink>
  • 详情:

    该组件将会自动将内部链接渲染为 <RouteLink> ,将外部链接渲染为 <a> ,并添加必要的属性。

    你可以通过 beforeafter 插槽,在文本之前和之后渲染内容。也可以通过 default 插槽,直接渲染文本(默认文本是 config.text)。

    该组件主要是为了开发主题时使用,普通用户在绝大多数情况下并不会用到它。对于主题作者来说,我们建议你在不确定链接是内部链接还是外部链接时,尽量使用这个组件。

ClientOnly

  • 使用:
<ClientOnly>
+  <NonSsrFriendlyComponent />
+</ClientOnly>
  • 详情:

    该组件和它的子元素只会在客户端被渲染。也就是说,它不会在构建 (SSR) 过程中被渲染到 HTML 内。

    如果一个组件在 setup() 中直接使用 浏览器 / DOM API ,它会导致构建过程报错,因为这些 API 在 Node.js 的环境中是无法使用的。在这种情况下,你可以选择一种方式:

    • 修改这个组件,只在 onBeforeMount()onMounted() Hook 中使用 浏览器 / DOM API 。
    • 使用 <ClientOnly> 包裹这个组件。

提示

从 Vue 3.5 开始,如果你只是想避免 Hydration Mismatch ,可以尝试使用新的 data-allow-mismatch 属性来代替 <ClientOnly> 组件。

Content

  • Props:

    • path
      • 类型: string
      • 是否必须: false
  • 使用:

<Content path="/path/to/page.md" />
`,15)),i("ul",null,[s[2]||(s[2]=i("li",null,[i("p",null,"详情:"),i("p",null,"该组件会渲染页面的 Markdown 内容。"),i("p",null,[a("如果没有传入 "),i("code",null,"path"),a(" Prop ,它会渲染当前路由下的页面内容。")]),i("p",null,"该组件主要是为了开发主题时使用。在绝大多数情况下你不会用到它。")],-1)),i("li",null,[s[1]||(s[1]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[h(l,{to:"/zh/reference/node-api.html#path"},{default:k(()=>s[0]||(s[0]=[a("Node API > Page 属性 > path")])),_:1})])])])]),s[4]||(s[4]=n(`
  • Props:

    • to
      • 类型: string
      • 是否必须: true
    • active
      • 类型: boolean
      • 是否必须: false
      • 默认值: false
    • activeClass
      • 类型: string
      • 是否必须: false
      • 默认值: 'route-link-active'
  • 使用:

<RouteLink to="/path/to/target-page.md">目标页面</RouteLink>
+<RouteLink active to="/path/to/current-page.md">当前页面</RouteLink>
  • 详情:

    该组件会渲染一个链接,用于跳转到指定页面。

    如果 active Prop 被设置为 true ,那么这个链接会被额外添加一个 activeClass 类名。需要注意的是,这里的 active 状态并不会根据当前路由自动更新。

    该组件主要是为了开发主题时使用,普通用户在绝大多数情况下并不会用到它。对于主题作者来说,我们建议你在渲染内部链接时尽量使用这个组件,而不是使用 vue-router<RouterLink> 组件。

`,4))])}const u=t(r,[["render",o]]),y=JSON.parse('{"path":"/zh/reference/components.html","title":"内置组件","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:puzzle-piece","description":"内置组件 AutoLink Props: config 类型:AutoLinkConfig 是否必须:true 使用: 详情: 该组件将会自动将内部链接渲染为 ,将外部链接渲染为 ,并添加必要的属性。 你可以通过 before 和 after 插槽,在文本之前和之后渲染内容。也可以通过 default 插槽,直接渲染文本...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"内置组件\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/components.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"内置组件"}],["meta",{"property":"og:description","content":"内置组件 AutoLink Props: config 类型:AutoLinkConfig 是否必须:true 使用: 详情: 该组件将会自动将内部链接渲染为 ,将外部链接渲染为 ,并添加必要的属性。 你可以通过 before 和 after 插槽,在文本之前和之后渲染内容。也可以通过 default 插槽,直接渲染文本..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/reference/components.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":6,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"张怀文","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.63,"words":790},"filePathRelative":"zh/reference/components.md","autoDesc":true}');export{u as comp,y as data}; diff --git a/assets/components.html-qQedLS-E.js b/assets/components.html-qQedLS-E.js new file mode 100644 index 00000000..d1beedc2 --- /dev/null +++ b/assets/components.html-qQedLS-E.js @@ -0,0 +1,56 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as l,a,b as i,d as n,e as h,w as p,r as k,o as r}from"./app-DVsngoLV.js";const d={};function o(c,s){const e=k("RouteLink");return r(),l("div",null,[s[3]||(s[3]=a(`

Built-in Components

  • Props:

    • config
      • Type: AutoLinkConfig
      • Required: true
interface AutoLinkConfig {
+  /**
+   * Pattern to determine if the link should be active, which has higher priority than \`exact\`
+   */
+  activeMatch?: RegExp | string
+
+  /**
+   * The \`aria-label\` attribute
+   */
+  ariaLabel?: string
+
+  /**
+   * Whether the link should be active only if the url is an exact match
+   */
+  exact?: boolean
+
+  /**
+   * URL of the auto link
+   */
+  link: string
+
+  /**
+   * The \`rel\` attribute
+   */
+  rel?: string
+
+  /**
+   * The \`target\` attribute
+   */
+  target?: string
+
+  /**
+   * Text of the auto link
+   */
+  text: string
+}
  • Usage:
<AutoLink :config="autoLinkConfig" />
+
+<AutoLink :config="autoLinkConfig">
+  default slot
+</AutoLink>
+
+<AutoLink :config="autoLinkConfig">
+  <template #before>before slot</template>
+  <template #after>after slot</template>
+</AutoLink>
+
+<AutoLink :config="autoLinkConfig">
+  <template v-slot="config">{{ config.text }}</template>
+</AutoLink>
+
+<AutoLink :config="autoLinkConfig">
+  <template #before="config">{{ config.text }}</template>
+</AutoLink>
  • Details:

    This component will automatically render internal link as <RouteLink>, and render external link as <a>. It will also add necessary attributes correspondingly.

    You can make use of the before and after slots to render content before and after the text. Also, you can use the default slot to render the text (default text is config.text).

    This component is mainly for developing themes. Users won't need it in most cases. For theme authors, it's recommended to use this component to render links that could be either internal or external.

ClientOnly

  • Usage:
<ClientOnly>
+  <NonSsrFriendlyComponent />
+</ClientOnly>
  • Details:

    This component and its children will only be rendered in client-side. That means, it will not be rendered to HTML during build (SSR).

    If a component is trying to access Browser / DOM APIs directly in setup(), an error will occur during build because those APIs are unavailable in Node.js environment. In such case, you could do either:

    • Modify the component to only access Browser / DOM APIs in onBeforeMount() or onMounted() hook.
    • Wrap the component with <ClientOnly>.

Tips

Since Vue 3.5, if you only want to avoid hydration mismatch, you can try the new data-allow-mismatch attribute instead of <ClientOnly> component.

Content

  • Props:

    • path
      • Type: string
      • Required: false
  • Usage:

<Content path="/path/to/page.md" />
`,15)),i("ul",null,[s[2]||(s[2]=i("li",null,[i("p",null,"Details:"),i("p",null,"This component will render the Markdown content of a page."),i("p",null,[n("If the "),i("code",null,"path"),n(" prop is not provided, it will render the page content of current route.")]),i("p",null,"This component is mainly for developing themes. You won't need it in most cases.")],-1)),i("li",null,[s[1]||(s[1]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[h(e,{to:"/reference/node-api.html#path"},{default:p(()=>s[0]||(s[0]=[n("Node API > Page Properties > path")])),_:1})])])])]),s[4]||(s[4]=a(`
  • Props:

    • to
      • Type: string
      • Required: true
    • active
      • Type: boolean
      • Required: false
      • Default: false
    • activeClass
      • Type: string
      • Required: false
      • Default: 'route-link-active'
  • Usage:

<RouteLink to="/path/to/target-page.md">target page</RouteLink>
+<RouteLink active to="/path/to/current-page.md">current page</RouteLink>
  • Details:

    This component will render a link to the target page.

    If the active prop is set to true, the link will have an extra activeClass. Notice that the active status won't be updated automatically when the route changes.

    This component is mainly for developing themes. Users won't need it in most cases. For theme authors, it's recommended to use this component to render internal links instead of the <RouterLink> component from vue-router.

`,4))])}const y=t(d,[["render",o]]),A=JSON.parse('{"path":"/reference/components.html","title":"Built-in Components","lang":"en-US","frontmatter":{"icon":"fa6-solid:puzzle-piece","description":"Built-in Components AutoLink Props: config Type: AutoLinkConfig Required: true Usage: Details: This component will automatically render internal link as , and render ...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Built-in Components\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/components.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Built-in Components"}],["meta",{"property":"og:description","content":"Built-in Components AutoLink Props: config Type: AutoLinkConfig Required: true Usage: Details: This component will automatically render internal link as , and render ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/components.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":6,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"张怀文","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.8,"words":539},"filePathRelative":"reference/components.md","autoDesc":true}');export{y as comp,A as data}; diff --git a/assets/config.html-5XTANjpy.js b/assets/config.html-5XTANjpy.js new file mode 100644 index 00000000..4481f7fc --- /dev/null +++ b/assets/config.html-5XTANjpy.js @@ -0,0 +1,15 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as r,a as t,b as l,e as s,w as a,d as e,r as d,o}from"./app-DVsngoLV.js";const h={};function u(k,i){const n=d("RouteLink");return o(),r("div",null,[i[86]||(i[86]=t('

配置

站点配置

base

',3)),l("ul",null,[i[3]||(i[3]=t('
  • 类型: string

  • 默认值: /

  • 详情:

    部署站点的基础路径。

    如果你想让你的网站部署到一个子路径下,你将需要设置它。它的值应当总是以斜杠开始,并以斜杠结束。举例来说,如果你想将你的网站部署到 https://foo.github.io/bar/,那么 base 应该被设置成 "/bar/"

    base 将会作为前缀自动地插入到以 / 开始的其他选项的链接中,所以你只需要指定一次。(head 中的属性除外)

    需要注意的是, base 应该是一个以 / 开始和结束的绝对路径名。

  • ',3)),l("li",null,[i[2]||(i[2]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/assets.html#base-helper"},{default:a(()=>i[0]||(i[0]=[e("指南 > 静态资源 > Base Helper")])),_:1})]),l("li",null,[s(n,{to:"/zh/guide/deployment.html"},{default:a(()=>i[1]||(i[1]=[e("指南 > 部署")])),_:1})])])])]),i[87]||(i[87]=t('

    lang

    • 类型: string

    • 默认值: en-US

    • 详情:

      站点的语言。

      它将会在最终渲染出的 HTML 中作为 <html> 标签的 lang 属性。

      它可以设置在不同语言的 locales 中。

    • 参考:

    title

    • 类型: string

    • 默认值: ''

    • 详情:

      站点的标题。

      它将会作为所有页面标题的后缀,并且在默认主题的导航栏中显示。

      它可以设置在不同语言的 locales 中。

    • 参考:

    description

    ',5)),l("ul",null,[i[7]||(i[7]=t("
  • 类型: string

  • 默认值: ''

  • 详情:

    站点的描述。

    它将会在最终渲染出的 HTML 中作为 <meta name="description" /> 标签的 content 属性。它会被每个页面的 Frontmatter 中的 description 字段覆盖。

    它可以设置在不同语言的 locales 中。

  • ",3)),l("li",null,[i[6]||(i[6]=l("p",null,"参考:",-1)),l("ul",null,[i[5]||(i[5]=l("li",null,[l("a",{href:"#locales"},"配置 > locales")],-1)),l("li",null,[s(n,{to:"/zh/reference/frontmatter.html#description"},{default:a(()=>i[4]||(i[4]=[e("Frontmatter > description")])),_:1})])])])]),i[88]||(i[88]=t(`
    • 类型: HeadConfig[]

    • 默认值: []

    • 详情:

      在最终渲染出的 HTML 的 <head> 标签内加入的额外标签。

      你可以通过 [tagName, { attrName: attrValue }, innerHTML?] 的格式来添加标签。

      它可以设置在不同语言的 locales 中。

      需要注意的是,如果 attrValue 是一个 pathname ,它不会被自动添加 base 前缀,所以如果需要的话请记得手动添加前缀。

    • 示例:

      增加一个自定义的 favicon :

    export default {
    +  head: [['link', { rel: 'icon', href: '/images/logo.png' }]],
    +}

    渲染为:

    <head>
    +  <link rel="icon" href="/images/logo.png" />
    +</head>
    `,5)),l("ul",null,[l("li",null,[i[10]||(i[10]=e("参考: ")),l("ul",null,[i[9]||(i[9]=l("li",null,[l("a",{href:"#locales"},"配置 > locales")],-1)),l("li",null,[s(n,{to:"/zh/reference/frontmatter.html#head"},{default:a(()=>i[8]||(i[8]=[e("Frontmatter > head")])),_:1})])])])]),i[89]||(i[89]=l("h3",{id:"locales",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#locales"},[l("span",null,"locales")])],-1)),l("ul",null,[i[13]||(i[13]=t('
  • 类型: { [path: string]: Partial<SiteLocaleData> }

  • 默认值: {}

  • 详情:

    多语言支持的各个语言 locales 。

    可以使用的字段有:

  • ',3)),l("li",null,[i[12]||(i[12]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/i18n.html"},{default:a(()=>i[11]||(i[11]=[e("指南 > I18n")])),_:1})])])])]),i[90]||(i[90]=l("h2",{id:"主题配置",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#主题配置"},[l("span",null,"主题配置")])],-1)),i[91]||(i[91]=l("h3",{id:"theme",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#theme"},[l("span",null,"theme")])],-1)),l("ul",null,[i[17]||(i[17]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"Theme")])],-1)),i[18]||(i[18]=l("li",null,[l("p",null,"详情:"),l("p",null,"设置站点要使用的主题。"),l("p",null,"如果不设置该选项,将会使用默认主题。")],-1)),l("li",null,[i[16]||(i[16]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/theme.html"},{default:a(()=>i[14]||(i[14]=[e("指南 > 主题")])),_:1})]),i[15]||(i[15]=l("li",null,[l("a",{href:"https://ecosystem.vuejs.press/zh/themes/default/config.html",target:"_blank",rel:"noopener noreferrer"},"默认主题 > 配置")],-1))])])]),i[92]||(i[92]=l("h2",{id:"打包工具配置",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#打包工具配置"},[l("span",null,"打包工具配置")])],-1)),i[93]||(i[93]=l("h3",{id:"bundler",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#bundler"},[l("span",null,"bundler")])],-1)),l("ul",null,[i[23]||(i[23]=t("
  • 类型: Bundler

  • 详情:

    设置站点要使用的打包工具。

    如果不设置该选项,将会使用默认的打包工具:

    • 使用 vuepressvuepress-vite 时,默认的打包工具是 Vite 。
    • 使用 vuepress-webpack 时,默认的打包工具是 Webpack 。
  • ",2)),l("li",null,[i[22]||(i[22]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/bundler.html"},{default:a(()=>i[19]||(i[19]=[e("指南 > 打包工具")])),_:1})]),l("li",null,[s(n,{to:"/zh/reference/bundler/vite.html"},{default:a(()=>i[20]||(i[20]=[e("打包工具 > Vite")])),_:1})]),l("li",null,[s(n,{to:"/zh/reference/bundler/webpack.html"},{default:a(()=>i[21]||(i[21]=[e("打包工具 > Webpack")])),_:1})])])])]),i[94]||(i[94]=t('

    通用配置项

    dest

    • 类型: string

    • 默认值: `${sourceDir}/.vuepress/dist`

    • 详情:

      指定 vuepress build 命令的输出目录。

    temp

    • 类型: string

    • 默认值: `${sourceDir}/.vuepress/.temp`

    • 详情:

      指定临时文件目录。

    注意

    VuePress 在开发和构建时会加载临时文件,因此临时文件目录应位于项目根目录内部,以便可以正确地解析到依赖。

    cache

    • 类型: string

    • 默认值: `${sourceDir}/.vuepress/.cache`

    • 详情:

      指定缓存文件目录。

    public

    ',9)),l("ul",null,[i[26]||(i[26]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"string")])],-1)),i[27]||(i[27]=l("li",null,[l("p",null,[e("默认值: "),l("code",null,"`${sourceDir}/.vuepress/public`")])],-1)),i[28]||(i[28]=l("li",null,[l("p",null,"详情:"),l("p",null,"指定 Public 文件目录。")],-1)),l("li",null,[i[25]||(i[25]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/assets.html#public-%E6%96%87%E4%BB%B6"},{default:a(()=>i[24]||(i[24]=[e("指南 > 静态资源 > Public 文件")])),_:1})])])])]),i[95]||(i[95]=t('

    debug

    • 类型: boolean

    • 默认值: false

    • 详情:

      是否启用 Debug 模式。

      该配置项主要提供给开发者使用。同时,我们使用了 debug 模块打印 Debug 日志,可以通过 DEBUG=vuepress* 环境变量来启用。

    pagePatterns

    • 类型: string[]

    • 默认值: ['**/*.md', '!.vuepress', '!node_modules']

    • 详情:

      指定页面文件的 Patterns 。这些 Patterns 是相对于 Source 目录的。

    permalinkPattern

    ',5)),l("ul",null,[i[31]||(i[31]=t("
  • 类型: string | null

  • 默认值: null

  • 详情:

    指定为页面生成永久链接的 Pattern 。

    它会被每个页面的 Frontmatter 中的 permalinkPattern 字段覆盖。

  • ",3)),l("li",null,[i[30]||(i[30]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/reference/frontmatter.html#permalinkpattern"},{default:a(()=>i[29]||(i[29]=[e("Frontmatter > permalinkPattern")])),_:1})])])])]),i[96]||(i[96]=t('

    Dev 配置项

    host

    • 类型: string

    • 默认值: '0.0.0.0'

    • 详情:

      指定开发服务器的主机名。

    port

    • 类型: number

    • 默认值: 8080

    • 详情:

      指定开发服务器的端口号。

    open

    • 类型: boolean

    • 默认值: false

    • 详情:

      是否在开发服务器启动后打开浏览器。

    templateDev

    • 类型: string

    • 默认值: '@vuepress/client/templates/dev.html'

    • 详情:

      指定开发时使用的 HTML 模板。

    Build 配置项

    shouldPreload

    • 类型: ((file: string, type: string) => boolean)) | boolean

    • 默认值: true

    • 详情:

      一个函数,用来控制哪些文件是需要生成对应的 <link rel="preload"> 标签的。设置为 true 或者 false 来完全启用或禁用它。

      默认情况下,只有当前页面所需的文件会被预加载。所以在绝大部分情况下,你只需要使用 true 就可以了。

    shouldPrefetch

    • 类型: ((file: string, type: string) => boolean)) | boolean

    • 默认值: true

    • 详情:

      一个函数,用来控制哪些文件是需要生成对应的 <link rel="prefetch"> 标签的。设置为 true 或者 false 来完全启用或禁用它。

      如果你将它设置为 true ,所有其它页面所需的文件都会被预拉取。这对于小型站点来说是十分有帮助的,因为它会大大提升页面切换的速度。但是在你的网站有很多页面时不建议你这么做。

    templateBuild

    • 类型: string

    • 默认值: '@vuepress/client/templates/build.html'

    • 详情:

      指定构建时使用的 HTML 模板路径。

    templateBuildRenderer

    • 类型: TemplateRenderer

    • 默认值: templateRenderer

    • 详情:

      指定构建时使用的 HTML 模板渲染函数。

    Markdown 配置

    markdown

    ',20)),l("ul",null,[i[35]||(i[35]=t('
  • 类型: MarkdownOptions

  • 默认值: {}

  • 详情:

    对 VuePress 内置的 Markdown 语法扩展进行配置。

    它可以接收 markdown-it 的所有配置项,以及下列额外的配置项。

  • ',3)),l("li",null,[i[34]||(i[34]=l("p",null,"参考:",-1)),l("ul",null,[i[33]||(i[33]=l("li",null,[l("a",{href:"https://github.com/markdown-it/markdown-it#init-with-presets-and-options",target:"_blank",rel:"noopener noreferrer"},"markdown-it > Init with presets and options")],-1)),l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E8%AF%AD%E6%B3%95%E6%89%A9%E5%B1%95"},{default:a(()=>i[32]||(i[32]=[e("指南 > Markdown > 语法扩展")])),_:1})])])])]),i[97]||(i[97]=t(`

    markdown.anchor

    • 类型: AnchorPluginOptions | false

    • 默认值:

    const defaultOptions = {
    +  level: [1, 2, 3, 4, 5, 6],
    +  permalink: anchorPlugin.permalink.headerLink({
    +    class: 'header-anchor',
    +    safariReaderFix: true,
    +  }),
    +}
    `,3)),l("ul",null,[i[38]||(i[38]=l("li",null,[l("p",null,"详情:"),l("p",null,[l("a",{href:"https://github.com/valeriangalliat/markdown-it-anchor",target:"_blank",rel:"noopener noreferrer"},"markdown-it-anchor"),e(" 的配置项。")]),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[37]||(i[37]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E6%A0%87%E9%A2%98%E9%94%9A%E7%82%B9"},{default:a(()=>i[36]||(i[36]=[e("指南 > Markdown > 语法扩展 > 标题锚点")])),_:1})])])])]),i[98]||(i[98]=t('

    markdown.assets

    • 类型: AssetsPluginOptions | false

    • 详情:

      VuePress 内置的 markdown-it assets 插件的配置项。

      设置为 false 可以禁用该插件。

    警告

    除非你了解它的用途,否则你不应该设置该配置项。

    markdown.component

    警告

    除非你了解它的用途,否则你不应该设置该配置项。

    markdown.emoji

    ',7)),l("ul",null,[i[41]||(i[41]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"EmojiPluginOptions | false")])],-1)),i[42]||(i[42]=l("li",null,[l("p",null,"详情:"),l("p",null,[l("a",{href:"https://github.com/markdown-it/markdown-it-emoji",target:"_blank",rel:"noopener noreferrer"},"markdown-it-emoji"),e(" 的配置项。")]),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[40]||(i[40]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#emoji"},{default:a(()=>i[39]||(i[39]=[e("指南 > Markdown > 语法扩展 > Emoji")])),_:1})])])])]),i[99]||(i[99]=l("h3",{id:"markdown-frontmatter",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#markdown-frontmatter"},[l("span",null,"markdown.frontmatter")])],-1)),l("ul",null,[i[46]||(i[46]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"FrontmatterPluginOptions | false")])],-1)),i[47]||(i[47]=l("li",null,[l("p",null,"详情:"),l("p",null,[l("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-frontmatter"),e(" 插件的配置项。")]),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[45]||(i[45]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/page.html#frontmatter"},{default:a(()=>i[43]||(i[43]=[e("指南 > 页面 > Frontmatter")])),_:1})]),l("li",null,[s(n,{to:"/zh/reference/node-api.html#frontmatter"},{default:a(()=>i[44]||(i[44]=[e("Node API > Page 属性 > frontmatter")])),_:1})])])])]),i[100]||(i[100]=t(`

    警告

    除非你了解它的用途,否则你不应该设置该配置项。

    markdown.headers

    • 类型: HeadersPluginOptions | false

    • 默认值:

    const defaultOptions = {
    +  level: [2, 3],
    +}
    `,4)),l("ul",null,[i[50]||(i[50]=l("li",null,[l("p",null,"详情:"),l("p",null,[l("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-headers"),e(" 插件的配置项。")]),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[49]||(i[49]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/reference/node-api.html#headers"},{default:a(()=>i[48]||(i[48]=[e("Node API > Page 属性 > headers")])),_:1})])])])]),i[101]||(i[101]=l("h3",{id:"markdown-importcode",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#markdown-importcode"},[l("span",null,"markdown.importCode")])],-1)),l("ul",null,[i[53]||(i[53]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"ImportCodePluginOptions | false")])],-1)),i[54]||(i[54]=l("li",null,[l("p",null,"详情:"),l("p",null,"VuePress 内置的 markdown-it 导入代码插件的配置项。"),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[52]||(i[52]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E5%AF%BC%E5%85%A5%E4%BB%A3%E7%A0%81%E5%9D%97"},{default:a(()=>i[51]||(i[51]=[e("指南 > Markdown > 语法扩展 > 导入代码块")])),_:1})])])])]),i[102]||(i[102]=t('

    markdown.importCode.handleImportPath

    • 类型: (str: string) => string

    • 默认值: (str) => str

    • 详情:

      一个函数,用于处理导入代码语法中的文件导入路径。

    ',3)),l("ul",null,[i[57]||(i[57]=t('
  • 类型: LinkPluginOptions | false

  • 详情:

    VuePress 内置的 markdown-it 链接插件的配置项。

    它可以把站内链接的 tag 转换为 internalTag ,并且可以在站外链接上添加额外的属性和图标。

    设置为 false 可以禁用该插件。

  • ',2)),l("li",null,[i[56]||(i[56]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E9%93%BE%E6%8E%A5"},{default:a(()=>i[55]||(i[55]=[e("指南 > Markdown > 语法扩展 > 链接")])),_:1})])])])]),i[103]||(i[103]=l("h4",{id:"markdown-links-internaltag",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#markdown-links-internaltag"},[l("span",null,"markdown.links.internalTag")])],-1)),l("ul",null,[i[63]||(i[63]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"string")])],-1)),i[64]||(i[64]=l("li",null,[l("p",null,[e("默认值: "),l("code",null,"'RouteLink'")])],-1)),l("li",null,[i[61]||(i[61]=l("p",null,"详情:",-1)),i[62]||(i[62]=l("p",null,"内部链接所使用的标签。",-1)),l("p",null,[i[59]||(i[59]=e("默认情况下,该插件会把内部链接转换为 ")),s(n,{to:"/zh/reference/components.html#routelink"},{default:a(()=>i[58]||(i[58]=[e("RouteLink")])),_:1}),i[60]||(i[60]=e(" 。"))])])]),i[104]||(i[104]=t('
    • 类型: Record<string, string>

    • 默认值: { target: '_blank', rel: 'noopener noreferrer' }

    • 详情:

      为外部链接添加额外的属性。

    markdown.sfc

    ',3)),l("ul",null,[i[68]||(i[68]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"SfcPluginOptions | false")])],-1)),i[69]||(i[69]=l("li",null,[l("p",null,"详情:"),l("p",null,[l("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-sfc"),e(" 插件的配置项。")]),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[67]||(i[67]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/advanced/cookbook/markdown-and-vue-sfc.html"},{default:a(()=>i[65]||(i[65]=[e("Cookbook > Markdown 与 Vue SFC")])),_:1})]),l("li",null,[s(n,{to:"/zh/reference/node-api.html#sfcblocks"},{default:a(()=>i[66]||(i[66]=[e("Node API > Page 属性 > sfcBlocks")])),_:1})])])])]),i[105]||(i[105]=t(`

    警告

    除非你了解它的用途,否则你不应该设置该配置项。

    markdown.slugify

    • 类型: (str: string) => string

    • 详情:

      默认使用的 slugify 函数。

    markdown.title

    • 类型: undefined | false

    • 详情:

      @mdit-vue/plugin-title 插件的配置项。

      设置为 false 可以禁用该插件。

    警告

    除非你了解它的用途,否则你不应该设置该配置项。

    markdown.toc

    • 类型: TocPluginOptions | false

    • 默认值:

    const defaultOptions = {
    +  level: [2, 3],
    +}
    `,9)),l("ul",null,[i[72]||(i[72]=l("li",null,[l("p",null,"详情:"),l("p",null,[l("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-toc"),e(" 插件的配置项。")]),l("p",null,[e("设置为 "),l("code",null,"false"),e(" 可以禁用该插件。")])],-1)),l("li",null,[i[71]||(i[71]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E7%9B%AE%E5%BD%95"},{default:a(()=>i[70]||(i[70]=[e("指南 > Markdown > 语法扩展 > 目录")])),_:1})])])])]),i[106]||(i[106]=l("h4",{id:"markdown-vpre-block",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#markdown-vpre-block"},[l("span",null,"markdown.vPre.block")])],-1)),l("ul",null,[i[75]||(i[75]=t("
  • 类型: boolean

  • 默认值: true

  • 详情:

    是否在代码块的 <pre> 标签上添加 v-pre 指令。

  • ",3)),l("li",null,[i[74]||(i[74]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E6%B7%BB%E5%8A%A0-v-pre"},{default:a(()=>i[73]||(i[73]=[e("指南 > Markdown > 语法扩展 > 代码块 > 添加 v-pre")])),_:1})])])])]),i[107]||(i[107]=l("h4",{id:"markdown-vpre-inline",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#markdown-vpre-inline"},[l("span",null,"markdown.vPre.inline")])],-1)),l("ul",null,[i[78]||(i[78]=t("
  • 类型: boolean

  • 默认值: true

  • 详情:

    是否在行内代码的 <code> 标签上添加 v-pre 指令。

  • ",3)),l("li",null,[i[77]||(i[77]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/markdown.html#%E6%B7%BB%E5%8A%A0-v-pre"},{default:a(()=>i[76]||(i[76]=[e("指南 > Markdown > 语法扩展 > 代码块 > 添加 v-pre")])),_:1})])])])]),i[108]||(i[108]=l("h2",{id:"插件配置",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#插件配置"},[l("span",null,"插件配置")])],-1)),i[109]||(i[109]=l("h3",{id:"plugins",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#plugins"},[l("span",null,"plugins")])],-1)),l("ul",null,[i[81]||(i[81]=l("li",null,[l("p",null,[e("类型: "),l("code",null,"PluginConfig[]")])],-1)),i[82]||(i[82]=l("li",null,[l("p",null,"详情:"),l("p",null,"要使用的插件。"),l("p",null,"该配置项接收一个数组,其中的每一个数组项是一个或一组插件。")],-1)),l("li",null,[i[80]||(i[80]=l("p",null,"参考:",-1)),l("ul",null,[l("li",null,[s(n,{to:"/zh/guide/plugin.html"},{default:a(()=>i[79]||(i[79]=[e("指南 > 插件")])),_:1})])])])]),i[110]||(i[110]=l("h2",{id:"插件-api",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#插件-api"},[l("span",null,"插件 API")])],-1)),i[111]||(i[111]=l("p",null,[e("用户配置文件同样可以作为一个 VuePress 插件,所以除了 "),l("code",null,"name"),e(" 和 "),l("code",null,"multiple"),e(" 配置项以外的所有插件 API 都可以在配置文件中使用。")],-1)),l("p",null,[i[84]||(i[84]=e("前往 ")),s(n,{to:"/zh/reference/plugin-api.html"},{default:a(()=>i[83]||(i[83]=[e("插件 API 参考")])),_:1}),i[85]||(i[85]=e(" 查看所有插件 API 。"))])])}const f=p(h,[["render",u]]),b=JSON.parse('{"path":"/zh/reference/config.html","title":"配置","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:gear","description":"配置 站点配置 base 类型: string 默认值: / 详情: 部署站点的基础路径。 如果你想让你的网站部署到一个子路径下,你将需要设置它。它的值应当总是以斜杠开始,并以斜杠结束。举例来说,如果你想将你的网站部署到 https://foo.github.io/bar/,那么 base 应该被设置成 \\"/bar/\\"。 base 将会作为前缀自动地插...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"配置\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/config.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"配置"}],["meta",{"property":"og:description","content":"配置 站点配置 base 类型: string 默认值: / 详情: 部署站点的基础路径。 如果你想让你的网站部署到一个子路径下,你将需要设置它。它的值应当总是以斜杠开始,并以斜杠结束。举例来说,如果你想将你的网站部署到 https://foo.github.io/bar/,那么 base 应该被设置成 \\"/bar/\\"。 base 将会作为前缀自动地插..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/reference/config.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":6,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":2},{"name":"lebennington","username":"lebennington","email":"100212066+lebennington@users.noreply.github.com","commits":1,"url":"https://github.com/lebennington"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":8.16,"words":2447},"filePathRelative":"zh/reference/config.md","autoDesc":true}');export{f as comp,b as data}; diff --git a/assets/config.html-u1PoDrUn.js b/assets/config.html-u1PoDrUn.js new file mode 100644 index 00000000..0b5e98f2 --- /dev/null +++ b/assets/config.html-u1PoDrUn.js @@ -0,0 +1,15 @@ +import{_ as o}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a,b as e,e as s,w as t,d as i,r,o as d}from"./app-DVsngoLV.js";const u={};function h(k,l){const n=r("RouteLink");return d(),p("div",null,[l[90]||(l[90]=a('

    Config

    Site Config

    base

    ',3)),e("ul",null,[l[3]||(l[3]=a('
  • Type: string

  • Default: /

  • Details:

    The base URL the site will be deployed at.

    You will need to set this if you plan to deploy your site under a sub path. It should always start and end with a slash. For example, if you plan to deploy your site to GitHub pages at https://foo.github.io/bar/, then you should set base to "/bar/".

    The base is automatically prepended to the URLs that start with / in other options, so you only need to specify it once. (Except for attrs of head)

    Notice that base should be an absolute URL pathname starting and ending with / .

  • ',3)),e("li",null,[l[2]||(l[2]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/assets.html#base-helper"},{default:t(()=>l[0]||(l[0]=[i("Guide > Assets > Base Helper")])),_:1})]),e("li",null,[s(n,{to:"/guide/deployment.html"},{default:t(()=>l[1]||(l[1]=[i("Guide > Deployment")])),_:1})])])])]),l[91]||(l[91]=e("h3",{id:"lang",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#lang"},[e("span",null,"lang")])],-1)),e("ul",null,[l[7]||(l[7]=a("
  • Type: string

  • Default: en-US

  • Details:

    Language for the site.

    This will be the lang attribute of the <html> tag in the rendered HTML.

    This can be specified in different locales.

  • ",3)),e("li",null,[l[6]||(l[6]=e("p",null,"Also see:",-1)),e("ul",null,[l[5]||(l[5]=e("li",null,[e("a",{href:"#locales"},"Config > locales")],-1)),e("li",null,[s(n,{to:"/reference/frontmatter.html#lang"},{default:t(()=>l[4]||(l[4]=[i("Frontmatter > lang")])),_:1})])])])]),l[92]||(l[92]=a('

    title

    • Type: string

    • Default: ''

    • Details:

      Title for the site.

      This will be the suffix for all page titles, and displayed in the navbar in the default theme.

      This can be specified in different locales.

    • Also see:

    description

    ',3)),e("ul",null,[l[11]||(l[11]=a("
  • Type: string

  • Default: ''

  • Details:

    Description for the site.

    This will be the content attribute of <meta name="description" /> tag in the rendered HTML, which will be overrode by the description field of page frontmatter.

    This can be specified in different locales.

  • ",3)),e("li",null,[l[10]||(l[10]=e("p",null,"Also see:",-1)),e("ul",null,[l[9]||(l[9]=e("li",null,[e("a",{href:"#locales"},"Config > locales")],-1)),e("li",null,[s(n,{to:"/reference/frontmatter.html#description"},{default:t(()=>l[8]||(l[8]=[i("Frontmatter > description")])),_:1})])])])]),l[93]||(l[93]=a(`
    • Type: HeadConfig[]

    • Default: []

    • Details:

      Extra tags to inject into the <head> tag in the rendered HTML.

      You can specify each tag in the form of [tagName, { attrName: attrValue }, innerHTML?].

      This can be specified in different locales.

      Notice that if the attrValue is a pathname, it will be kept as-is without prepending base automatically, so remember to prepend it manually if needed.

    • Example:

      To add a custom favicon:

    export default {
    +  head: [['link', { rel: 'icon', href: '/images/logo.png' }]],
    +}

    Rendered as:

    <head>
    +  <link rel="icon" href="/images/logo.png" />
    +</head>
    `,5)),e("ul",null,[e("li",null,[l[14]||(l[14]=i("Also see: ")),e("ul",null,[l[13]||(l[13]=e("li",null,[e("a",{href:"#locales"},"Config > locales")],-1)),e("li",null,[s(n,{to:"/reference/frontmatter.html#head"},{default:t(()=>l[12]||(l[12]=[i("Frontmatter > head")])),_:1})])])])]),l[94]||(l[94]=e("h3",{id:"locales",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#locales"},[e("span",null,"locales")])],-1)),e("ul",null,[l[17]||(l[17]=a('
  • Type: { [path: string]: Partial<SiteLocaleData> }

  • Default: {}

  • Details:

    Specify locales for i18n support.

    Acceptable fields:

  • ',3)),e("li",null,[l[16]||(l[16]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/i18n.html"},{default:t(()=>l[15]||(l[15]=[i("Guide > I18n")])),_:1})])])])]),l[95]||(l[95]=e("h2",{id:"theme-config",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#theme-config"},[e("span",null,"Theme Config")])],-1)),l[96]||(l[96]=e("h3",{id:"theme",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#theme"},[e("span",null,"theme")])],-1)),e("ul",null,[l[21]||(l[21]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"Theme")])],-1)),l[22]||(l[22]=e("li",null,[e("p",null,"Details:"),e("p",null,"Set the theme of your site."),e("p",null,"If this option is not set, the default theme will be used.")],-1)),e("li",null,[l[20]||(l[20]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/theme.html"},{default:t(()=>l[18]||(l[18]=[i("Guide > Theme")])),_:1})]),l[19]||(l[19]=e("li",null,[e("a",{href:"https://ecosystem.vuejs.press/themes/default/config.html",target:"_blank",rel:"noopener noreferrer"},"Default Theme > Config")],-1))])])]),l[97]||(l[97]=e("h2",{id:"bundler-config",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#bundler-config"},[e("span",null,"Bundler Config")])],-1)),l[98]||(l[98]=e("h3",{id:"bundler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#bundler"},[e("span",null,"bundler")])],-1)),e("ul",null,[l[27]||(l[27]=a("
  • Type: Bundler

  • Details:

    Set the bundler of your site.

    If this option is not set, the default bundler will be used:

    • With vuepress or vuepress-vite, the default bundler is vite.
    • With vuepress-webpack, the default bundler is webpack.
  • ",2)),e("li",null,[l[26]||(l[26]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/bundler.html"},{default:t(()=>l[23]||(l[23]=[i("Guide > Bundler")])),_:1})]),e("li",null,[s(n,{to:"/reference/bundler/vite.html"},{default:t(()=>l[24]||(l[24]=[i("Bundlers > Vite")])),_:1})]),e("li",null,[s(n,{to:"/reference/bundler/webpack.html"},{default:t(()=>l[25]||(l[25]=[i("Bundlers > Webpack")])),_:1})])])])]),l[99]||(l[99]=a('

    Common Config

    dest

    • Type: string

    • Default: `${sourceDir}/.vuepress/dist`

    • Details:

      Specify the output directory for vuepress build command.

    temp

    • Type: string

    • Default: `${sourceDir}/.vuepress/.temp`

    • Details:

      Specify the directory for temporary files.

    Warning

    Since VuePress will load temp files during dev and build, the temp directory should be inside project root to resolve dependencies correctly.

    cache

    • Type: string

    • Default: `${sourceDir}/.vuepress/.cache`

    • Details:

      Specify the directory for cache files.

    public

    ',9)),e("ul",null,[l[30]||(l[30]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"string")])],-1)),l[31]||(l[31]=e("li",null,[e("p",null,[i("Default: "),e("code",null,"`${sourceDir}/.vuepress/public`")])],-1)),l[32]||(l[32]=e("li",null,[e("p",null,"Details:"),e("p",null,"Specify the directory for public files.")],-1)),e("li",null,[l[29]||(l[29]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/assets.html#public-files"},{default:t(()=>l[28]||(l[28]=[i("Guide > Assets > Public Files")])),_:1})])])])]),l[100]||(l[100]=a('

    debug

    • Type: boolean

    • Default: false

    • Details:

      Enable debug mode or not.

      This would be helpful for developers. Also, we are using debug package for debug logging, which can be enabled via DEBUG=vuepress* environment variable.

    pagePatterns

    • Type: string[]

    • Default: ['**/*.md', '!.vuepress', '!node_modules']

    • Details:

      Specify the patterns of files you want to be resolved as pages. The patterns are relative to the source directory.

    permalinkPattern

    ',5)),e("ul",null,[l[35]||(l[35]=a("
  • Type: string | null

  • Default: null

  • Details:

    Specify the pattern to generate permalink.

    This will be overrode by the permalinkPattern field of page frontmatter.

  • ",3)),e("li",null,[l[34]||(l[34]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/reference/frontmatter.html#permalinkpattern"},{default:t(()=>l[33]||(l[33]=[i("Frontmatter > permalinkPattern")])),_:1})])])])]),l[101]||(l[101]=a('

    Dev Config

    host

    • Type: string

    • Default: '0.0.0.0'

    • Details:

      Specify the host to use for the dev server.

    port

    • Type: number

    • Default: 8080

    • Details:

      Specify the port to use for the dev server.

    open

    • Type: boolean

    • Default: false

    • Details:

      Whether to open the browser after dev-server had been started.

    templateDev

    • Type: string

    • Default: '@vuepress/client/templates/dev.html'

    • Details:

      Specify the path of the HTML template to be used for dev.

    Build Config

    shouldPreload

    • Type: ((file: string, type: string) => boolean)) | boolean

    • Default: true

    • Details:

      A function to control what files should have <link rel="preload"> resource hints generated. Set to true or false to enable or disable totally.

      By default, only those files that are required by current page will be preloaded. So you can keep it true in most cases.

    shouldPrefetch

    • Type: ((file: string, type: string) => boolean)) | boolean

    • Default: true

    • Details:

      A function to control what files should have <link rel="prefetch"> resource hints generated. Set to true or false to enable or disable for all files.

      If you set it to true, all files that required by other pages will be prefetched. This is good for small sites, which will speed up the navigation, but it might not be a good idea if you have lots of pages in your site.

    templateBuild

    • Type: string

    • Default: '@vuepress/client/templates/build.html'

    • Details:

      Specify the path of the HTML template to be used for build.

    templateBuildRenderer

    • Type: TemplateRenderer

    • Default: templateRenderer

    • Details:

      Specify the HTML template renderer to be used for build.

    Markdown Config

    markdown

    ',20)),e("ul",null,[l[39]||(l[39]=a('
  • Type: MarkdownOptions

  • Default: {}

  • Details:

    Configure VuePress built-in Markdown syntax extensions.

    It accepts all options of markdown-it, and the following additional options.

  • ',3)),e("li",null,[l[38]||(l[38]=e("p",null,"Also see:",-1)),e("ul",null,[l[37]||(l[37]=e("li",null,[e("a",{href:"https://github.com/markdown-it/markdown-it#init-with-presets-and-options",target:"_blank",rel:"noopener noreferrer"},"markdown-it > Init with presets and options")],-1)),e("li",null,[s(n,{to:"/guide/markdown.html#syntax-extensions"},{default:t(()=>l[36]||(l[36]=[i("Guide > Markdown > Syntax Extensions")])),_:1})])])])]),l[102]||(l[102]=a(`

    markdown.anchor

    • Type: AnchorPluginOptions | false

    • Default:

    const defaultOptions = {
    +  level: [1, 2, 3, 4, 5, 6],
    +  permalink: anchorPlugin.permalink.headerLink({
    +    class: 'header-anchor',
    +    safariReaderFix: true,
    +  }),
    +}
    `,3)),e("ul",null,[l[42]||(l[42]=e("li",null,[e("p",null,"Details:"),e("p",null,[i("Options for "),e("a",{href:"https://github.com/valeriangalliat/markdown-it-anchor",target:"_blank",rel:"noopener noreferrer"},"markdown-it-anchor"),i(".")]),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[41]||(l[41]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#header-anchors"},{default:t(()=>l[40]||(l[40]=[i("Guide > Markdown > Syntax Extensions > Header Anchors")])),_:1})])])])]),l[103]||(l[103]=a('

    markdown.assets

    • Type: AssetsPluginOptions | false

    • Details:

      Options for VuePress built-in markdown-it assets plugin.

      Set to false to disable this plugin.

    Caution

    You should not configure it unless you understand what it is for.

    markdown.component

    Caution

    You should not configure it unless you understand what it is for.

    markdown.emoji

    ',7)),e("ul",null,[l[45]||(l[45]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"EmojiPluginOptions | false")])],-1)),l[46]||(l[46]=e("li",null,[e("p",null,"Details:"),e("p",null,[i("Options for "),e("a",{href:"https://github.com/markdown-it/markdown-it-emoji",target:"_blank",rel:"noopener noreferrer"},"markdown-it-emoji"),i(".")]),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[44]||(l[44]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#emoji"},{default:t(()=>l[43]||(l[43]=[i("Guide > Markdown > Syntax Extensions > Emoji")])),_:1})])])])]),l[104]||(l[104]=e("h3",{id:"markdown-frontmatter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#markdown-frontmatter"},[e("span",null,"markdown.frontmatter")])],-1)),e("ul",null,[l[50]||(l[50]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"FrontmatterPluginOptions | false")])],-1)),l[51]||(l[51]=e("li",null,[e("p",null,"Details:"),e("p",null,[i("Options for "),e("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-frontmatter",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-frontmatter"),i(".")]),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[49]||(l[49]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/page.html#frontmatter"},{default:t(()=>l[47]||(l[47]=[i("Guide > Page > Frontmatter")])),_:1})]),e("li",null,[s(n,{to:"/reference/node-api.html#frontmatter"},{default:t(()=>l[48]||(l[48]=[i("Node API > Page Properties > frontmatter")])),_:1})])])])]),l[105]||(l[105]=a(`

    Caution

    You should not configure it unless you understand what it is for.

    markdown.headers

    • Type: HeadersPluginOptions | false

    • Default:

    const defaultOptions = {
    +  level: [2, 3],
    +}
    `,4)),e("ul",null,[l[54]||(l[54]=e("li",null,[e("p",null,"Details:"),e("p",null,[i("Options for "),e("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-headers",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-headers"),i(".")]),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[53]||(l[53]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/reference/node-api.html#headers"},{default:t(()=>l[52]||(l[52]=[i("Node API > Page Properties > headers")])),_:1})])])])]),l[106]||(l[106]=e("h3",{id:"markdown-importcode",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#markdown-importcode"},[e("span",null,"markdown.importCode")])],-1)),e("ul",null,[l[57]||(l[57]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"ImportCodePluginOptions | false")])],-1)),l[58]||(l[58]=e("li",null,[e("p",null,"Details:"),e("p",null,"Options for VuePress built-in markdown-it import-code plugin."),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[56]||(l[56]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#import-code-blocks"},{default:t(()=>l[55]||(l[55]=[i("Guide > Markdown > Syntax Extensions > Import Code Blocks")])),_:1})])])])]),l[107]||(l[107]=a('

    markdown.importCode.handleImportPath

    • Type: (str: string) => string

    • Default: (str) => str

    • Details:

      A function to handle the import path of the import code syntax.

    ',3)),e("ul",null,[l[61]||(l[61]=a('
  • Type: LinksPluginOptions | false

  • Details:

    Options for VuePress built-in markdown-it links plugin.

    It will convert the tag of internal links to internalTag, and add extra attributes and icon to external links.

    Set to false to disable this plugin.

  • ',2)),e("li",null,[l[60]||(l[60]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#links"},{default:t(()=>l[59]||(l[59]=[i("Guide > Markdown > Syntax Extensions > Links")])),_:1})])])])]),l[108]||(l[108]=e("h4",{id:"markdown-links-internaltag",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#markdown-links-internaltag"},[e("span",null,"markdown.links.internalTag")])],-1)),e("ul",null,[l[67]||(l[67]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"'a' | 'RouteLink' | 'RouterLink'")])],-1)),l[68]||(l[68]=e("li",null,[e("p",null,[i("Default: "),e("code",null,"'RouteLink'")])],-1)),e("li",null,[l[65]||(l[65]=e("p",null,"Details:",-1)),l[66]||(l[66]=e("p",null,"Tag for internal links.",-1)),e("p",null,[l[63]||(l[63]=i("By default, this plugin will transform internal links to ")),s(n,{to:"/reference/components.html#routelink"},{default:t(()=>l[62]||(l[62]=[i("RouteLink")])),_:1}),l[64]||(l[64]=i("."))])])]),l[109]||(l[109]=a('
    • Type: Record<string, string>

    • Default: { target: '_blank', rel: 'noopener noreferrer' }

    • Details:

      Additional attributes for external links.

    markdown.sfc

    ',3)),e("ul",null,[l[72]||(l[72]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"SfcPluginOptions | false")])],-1)),l[73]||(l[73]=e("li",null,[e("p",null,"Details:"),e("p",null,[i("Options for "),e("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-sfc",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-sfc"),i(".")]),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[71]||(l[71]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/advanced/cookbook/markdown-and-vue-sfc.html"},{default:t(()=>l[69]||(l[69]=[i("Cookbook > Markdown and Vue SFC")])),_:1})]),e("li",null,[s(n,{to:"/reference/node-api.html#sfcblocks"},{default:t(()=>l[70]||(l[70]=[i("Node API > Page Properties > sfcBlocks")])),_:1})])])])]),l[110]||(l[110]=a(`

    Caution

    You should not configure it unless you understand what it is for.

    markdown.slugify

    • Type: (str: string) => string

    • Details:

      The default slugify function.

    markdown.title

    Caution

    You should not configure it unless you understand what it is for.

    markdown.toc

    • Type: TocPluginOptions | false

    • Default:

    const defaultOptions = {
    +  level: [2, 3],
    +}
    `,9)),e("ul",null,[l[76]||(l[76]=e("li",null,[e("p",null,"Details:"),e("p",null,[i("Options for "),e("a",{href:"https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc",target:"_blank",rel:"noopener noreferrer"},"@mdit-vue/plugin-toc"),i(".")]),e("p",null,[i("Set to "),e("code",null,"false"),i(" to disable this plugin.")])],-1)),e("li",null,[l[75]||(l[75]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#table-of-contents"},{default:t(()=>l[74]||(l[74]=[i("Guide > Markdown > Syntax Extensions > Table of Contents")])),_:1})])])])]),l[111]||(l[111]=e("h4",{id:"markdown-vpre-block",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#markdown-vpre-block"},[e("span",null,"markdown.vPre.block")])],-1)),e("ul",null,[l[79]||(l[79]=a("
  • Type: boolean

  • Default: true

  • Details:

    Add v-pre directive to <pre> tag of code block or not.

  • ",3)),e("li",null,[l[78]||(l[78]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#wrap-with-v-pre"},{default:t(()=>l[77]||(l[77]=[i("Guide > Markdown > Syntax Extensions > Code Blocks > Wrap with v-pre")])),_:1})])])])]),l[112]||(l[112]=e("h4",{id:"markdown-vpre-inline",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#markdown-vpre-inline"},[e("span",null,"markdown.vPre.inline")])],-1)),e("ul",null,[l[82]||(l[82]=a("
  • Type: boolean

  • Default: true

  • Details:

    Add v-pre directive to <code> tag of inline code or not.

  • ",3)),e("li",null,[l[81]||(l[81]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/markdown.html#wrap-with-v-pre"},{default:t(()=>l[80]||(l[80]=[i("Guide > Markdown > Syntax Extensions > Code Blocks > Wrap with v-pre")])),_:1})])])])]),l[113]||(l[113]=e("h2",{id:"plugin-config",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#plugin-config"},[e("span",null,"Plugin Config")])],-1)),l[114]||(l[114]=e("h3",{id:"plugins",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#plugins"},[e("span",null,"plugins")])],-1)),e("ul",null,[l[85]||(l[85]=e("li",null,[e("p",null,[i("Type: "),e("code",null,"(Plugin | Plugin[])[]")])],-1)),l[86]||(l[86]=e("li",null,[e("p",null,"Details:"),e("p",null,"Plugins to use."),e("p",null,"This option accepts an array, each item of which could be a plugin or an array of plugins.")],-1)),e("li",null,[l[84]||(l[84]=e("p",null,"Also see:",-1)),e("ul",null,[e("li",null,[s(n,{to:"/guide/plugin.html"},{default:t(()=>l[83]||(l[83]=[i("Guide > Plugin")])),_:1})])])])]),l[115]||(l[115]=e("h2",{id:"plugin-api",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#plugin-api"},[e("span",null,"Plugin API")])],-1)),l[116]||(l[116]=e("p",null,[i("User config file also works as a VuePress plugin, so all of the Plugin APIs are available except the "),e("code",null,"name"),i(" and "),e("code",null,"multiple"),i(" options.")],-1)),e("p",null,[l[88]||(l[88]=i("Please check out ")),s(n,{to:"/reference/plugin-api.html"},{default:t(()=>l[87]||(l[87]=[i("Plugin API Reference")])),_:1}),l[89]||(l[89]=i(" for a full list of Plugin APIs."))])])}const m=o(u,[["render",h]]),b=JSON.parse('{"path":"/reference/config.html","title":"Config","lang":"en-US","frontmatter":{"icon":"fa6-solid:gear","description":"Config Site Config base Type: string Default: / Details: The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path. I...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Config\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/config.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Config"}],["meta",{"property":"og:description","content":"Config Site Config base Type: string Default: / Details: The base URL the site will be deployed at. You will need to set this if you plan to deploy your site under a sub path. I..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/config.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":6,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":2},{"name":"lebennington","username":"lebennington","email":"100212066+lebennington@users.noreply.github.com","commits":1,"url":"https://github.com/lebennington"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":5.45,"words":1635},"filePathRelative":"reference/config.md","autoDesc":true}');export{m as comp,b as data}; diff --git a/assets/configuration.html-B_xUzcn7.js b/assets/configuration.html-B_xUzcn7.js new file mode 100644 index 00000000..f20df334 --- /dev/null +++ b/assets/configuration.html-B_xUzcn7.js @@ -0,0 +1,24 @@ +import{_ as r}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as p,a,b as s,d as e,e as l,w as t,r as o,o as h}from"./app-DVsngoLV.js";const d={},k={class:"hint-container tip"},c={class:"hint-container tip"};function g(u,i){const n=o("RouteLink");return h(),p("div",null,[i[13]||(i[13]=a('

    Configuration

    Config File

    The essential file for configuring a VuePress site is .vuepress/config.js, while TypeScript config file is also supported. You can use .vuepress/config.ts instead to get better types hint for VuePress config.

    To be more specific, we have a convention for config file paths (in order of precedence):

    • In current working directory cwd:
      • vuepress.config.ts
      • vuepress.config.js
      • vuepress.config.mjs
    • In source directory sourceDir:
      • .vuepress/config.ts
      • .vuepress/config.js
      • .vuepress/config.mjs
    ',5)),s("p",null,[i[1]||(i[1]=e("You can also specify the config file via ")),i[2]||(i[2]=s("code",null,"--config",-1)),i[3]||(i[3]=e(" option of ")),l(n,{to:"/reference/cli.html"},{default:t(()=>i[0]||(i[0]=[e("CLI")])),_:1}),i[4]||(i[4]=e(":"))]),i[14]||(i[14]=a(`
    vuepress dev docs --config my-config.ts

    A basic config file looks like this:

    import { viteBundler } from '@vuepress/bundler-vite'
    +import { defaultTheme } from '@vuepress/theme-default'
    +import { defineUserConfig } from 'vuepress'
    +
    +export default defineUserConfig({
    +  bundler: viteBundler(),
    +  theme: defaultTheme(),
    +
    +  lang: 'en-US',
    +  title: 'Hello VuePress',
    +  description: 'Just playing around',
    +})
    `,3)),s("div",k,[i[8]||(i[8]=s("p",{class:"hint-container-title"},"Tips",-1)),s("p",null,[i[6]||(i[6]=e("Check out the ")),l(n,{to:"/reference/config.html"},{default:t(()=>i[5]||(i[5]=[e("Config Reference")])),_:1}),i[7]||(i[7]=e(" for a full list of VuePress config."))])]),i[15]||(i[15]=a(`

    Client Config File

    In most cases, the config file is sufficient to configure your VuePress site. However, sometimes users may want to add some client-side code directly. To help with this, VuePress also supports a client config file:

    ├─ docs
    +│  ├─ .vuepress
    +│  │  ├─ client.js   <--- client config file
    +│  │  └─ config.js   <--- config file
    +│  └─ README.md
    +├─ .gitignore
    +└─ package.json

    Similarly, we also have a convention for client config file paths (in order of precedence):

    • In current working directory cwd:
      • vuepress.client.ts
      • vuepress.client.js
      • vuepress.client.mjs
    • In source directory sourceDir:
      • .vuepress/client.ts
      • .vuepress/client.js
      • .vuepress/client.mjs

    A basic client config file looks like this:

    import { defineClientConfig } from 'vuepress/client'
    +
    +export default defineClientConfig({
    +  enhance({ app, router, siteData }) {},
    +  setup() {},
    +  rootComponents: [],
    +})
    `,7)),s("div",c,[i[11]||(i[11]=s("p",{class:"hint-container-title"},"Tips",-1)),i[12]||(i[12]=s("p",null,"Unlike config file, client config file could not be specified via CLI options.",-1)),s("p",null,[i[10]||(i[10]=e("To learn more about client config file, see ")),l(n,{to:"/advanced/cookbook/usage-of-client-config.html"},{default:t(()=>i[9]||(i[9]=[e("Advanced > Cookbook > Usage of Client Config")])),_:1})])])])}const v=r(d,[["render",g]]),y=JSON.parse('{"path":"/guide/configuration.html","title":"Configuration","lang":"en-US","frontmatter":{"icon":"fa6-solid:gear","description":"Configuration Config File The essential file for configuring a VuePress site is .vuepress/config.js, while TypeScript config file is also supported. You can use .vuepress/config...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Configuration\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/configuration.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Configuration"}],["meta",{"property":"og:description","content":"Configuration Config File The essential file for configuring a VuePress site is .vuepress/config.js, while TypeScript config file is also supported. You can use .vuepress/config..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/configuration.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":4,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.92,"words":276},"filePathRelative":"guide/configuration.md","autoDesc":true}');export{v as comp,y as data}; diff --git a/assets/configuration.html-C67FYR2G.js b/assets/configuration.html-C67FYR2G.js new file mode 100644 index 00000000..6bda7fce --- /dev/null +++ b/assets/configuration.html-C67FYR2G.js @@ -0,0 +1,24 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as r,a,b as e,d as i,e as l,w as t,r as h,o as d}from"./app-DVsngoLV.js";const k={},o={class:"hint-container tip"},c={class:"hint-container tip"};function g(u,s){const n=h("RouteLink");return d(),r("div",null,[s[14]||(s[14]=a('

    配置

    配置文件

    VuePress 站点的基本配置文件是 .vuepress/config.js ,但也同样支持 TypeScript 配置文件。你可以使用 .vuepress/config.ts 来得到更好的类型提示。

    具体而言,我们对于配置文件的路径有着约定(按照优先顺序):

    • 当前工作目录 cwd 下:
      • vuepress.config.ts
      • vuepress.config.js
      • vuepress.config.mjs
    • 源文件目录 sourceDir 下:
      • .vuepress/config.ts
      • .vuepress/config.js
      • .vuepress/config.mjs
    ',5)),e("p",null,[s[1]||(s[1]=i("你也可以通过 ")),l(n,{to:"/zh/reference/cli.html"},{default:t(()=>s[0]||(s[0]=[i("命令行接口")])),_:1}),s[2]||(s[2]=i(" 的 ")),s[3]||(s[3]=e("code",null,"--config",-1)),s[4]||(s[4]=i(" 选项来指定配置文件:"))]),s[15]||(s[15]=a(`
    vuepress dev docs --config my-config.ts

    一个基础的配置文件是这样的:

    import { viteBundler } from '@vuepress/bundler-vite'
    +import { defaultTheme } from '@vuepress/theme-default'
    +import { defineUserConfig } from 'vuepress'
    +
    +export default defineUserConfig({
    +  bundler: viteBundler(),
    +  theme: defaultTheme(),
    +
    +  lang: 'zh-CN',
    +  title: '你好, VuePress !',
    +  description: '这是我的第一个 VuePress 站点',
    +})
    `,3)),e("div",o,[s[8]||(s[8]=e("p",{class:"hint-container-title"},"提示",-1)),e("p",null,[s[6]||(s[6]=i("前往 ")),l(n,{to:"/zh/reference/config.html"},{default:t(()=>s[5]||(s[5]=[i("配置参考")])),_:1}),s[7]||(s[7]=i(" 查看所有 VuePress 配置。"))])]),s[16]||(s[16]=a(`

    客户端配置文件

    在大多数情况下,配置文件已经足够帮助你配置好你的 VuePress 站点。不过,有些时候用户们可能希望直接添加一些客户端代码。 VuePress 通过客户端配置文件来支持这种需求:

    ├─ docs
    +│  ├─ .vuepress
    +│  │  ├─ client.js   <--- 客户端配置文件
    +│  │  └─ config.js   <--- 配置文件
    +│  └─ README.md
    +├─ .gitignore
    +└─ package.json

    同样的,我们也有关于客户端配置文件的路径约定(按照优先顺序):

    • 当前工作目录 cwd 下:
      • vuepress.client.ts
      • vuepress.client.js
      • vuepress.client.mjs
    • 源文件目录 sourceDir 下:
      • .vuepress/client.ts
      • .vuepress/client.js
      • .vuepress/client.mjs

    一个基础的客户端配置文件是这样的:

    import { defineClientConfig } from 'vuepress/client'
    +
    +export default defineClientConfig({
    +  enhance({ app, router, siteData }) {},
    +  setup() {},
    +  rootComponents: [],
    +})
    `,7)),e("div",c,[s[12]||(s[12]=e("p",{class:"hint-container-title"},"提示",-1)),s[13]||(s[13]=e("p",null,"和配置文件不同,客户端配置文件不能通过命令行接口的选项来指定。",-1)),e("p",null,[s[10]||(s[10]=i("可以前往 ")),l(n,{to:"/zh/advanced/cookbook/usage-of-client-config.html"},{default:t(()=>s[9]||(s[9]=[i("深入 > Cookbook > 客户端配置的使用方法")])),_:1}),s[11]||(s[11]=i(" 来了解更多信息。"))])])])}const A=p(k,[["render",g]]),y=JSON.parse('{"path":"/zh/guide/configuration.html","title":"配置","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:gear","description":"配置 配置文件 VuePress 站点的基本配置文件是 .vuepress/config.js ,但也同样支持 TypeScript 配置文件。你可以使用 .vuepress/config.ts 来得到更好的类型提示。 具体而言,我们对于配置文件的路径有着约定(按照优先顺序): 当前工作目录 cwd 下: vuepress.config.ts vuep...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"配置\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/configuration.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"配置"}],["meta",{"property":"og:description","content":"配置 配置文件 VuePress 站点的基本配置文件是 .vuepress/config.js ,但也同样支持 TypeScript 配置文件。你可以使用 .vuepress/config.ts 来得到更好的类型提示。 具体而言,我们对于配置文件的路径有着约定(按照优先顺序): 当前工作目录 cwd 下: vuepress.config.ts vuep..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/configuration.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":4,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.4,"words":421},"filePathRelative":"zh/guide/configuration.md","autoDesc":true}');export{A as comp,y as data}; diff --git a/assets/deployment.html-Ch-IpzwJ.js b/assets/deployment.html-Ch-IpzwJ.js new file mode 100644 index 00000000..6c26ef0c --- /dev/null +++ b/assets/deployment.html-Ch-IpzwJ.js @@ -0,0 +1,93 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as h,a as n,b as i,d as a,e as l,w as t,r,o as d}from"./app-DVsngoLV.js";const k={};function o(c,s){const e=r("RouteLink");return d(),h("div",null,[s[10]||(s[10]=n(`

    部署

    下述的指南基于以下条件:

    • Markdown 源文件放置在你项目的 docs 目录;
    • 使用的是默认的构建输出目录 (.vuepress/dist) ;
    • 使用 pnpm 作为包管理器,当然也支持使用 npm 或 yarn 。
    • VuePress 作为项目依赖安装,并在 package.json 中配置了如下脚本:
    {
    +  "scripts": {
    +    "docs:build": "vuepress build docs"
    +  }
    +}

    GitHub Pages

    `,5)),i("ol",null,[i("li",null,[i("p",null,[s[1]||(s[1]=a("设置正确的 ")),l(e,{to:"/zh/reference/config.html#base"},{default:t(()=>s[0]||(s[0]=[a("base")])),_:1}),s[2]||(s[2]=a(" 选项。"))]),s[3]||(s[3]=n("

    如果你准备发布到 https://<USERNAME>.github.io/ ,你可以省略这一步,因为 base 默认就是 "/"

    如果你准备发布到 https://<USERNAME>.github.io/<REPO>/ ,也就是说你的仓库地址是 https://github.com/<USERNAME>/<REPO> ,则将 base 设置为 "/<REPO>/"

    ",2))]),s[4]||(s[4]=i("li",null,[i("p",null,[a("选择你想要使用的 CI 工具。这里我们以 "),i("a",{href:"https://github.com/features/actions",target:"_blank",rel:"noopener noreferrer"},"GitHub Actions"),a(" 为例。")]),i("p",null,[a("创建 "),i("code",null,".github/workflows/docs.yml"),a(" 文件来配置工作流。")])],-1))]),s[11]||(s[11]=n(`
    点击展开配置样例
    name: docs
    +
    +on:
    +  # 每当 push 到 main 分支时触发部署
    +  push:
    +    branches: [main]
    +  # 手动触发部署
    +  workflow_dispatch:
    +
    +jobs:
    +  docs:
    +    runs-on: ubuntu-latest
    +
    +    steps:
    +      - uses: actions/checkout@v4
    +        with:
    +          # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
    +          fetch-depth: 0
    +
    +      - name: 设置 pnpm
    +        uses: pnpm/action-setup@v4
    +
    +      - name: 设置 Node.js
    +        uses: actions/setup-node@v4
    +        with:
    +          # 选择要使用的 node 版本
    +          node-version: 22
    +          # 缓存 pnpm 依赖
    +          cache: pnpm
    +
    +      - name: 安装依赖
    +        run: pnpm install --frozen-lockfile
    +
    +      # 运行构建脚本
    +      - name: 构建 VuePress 站点
    +        run: pnpm docs:build
    +
    +      # 查看 workflow 的文档来获取更多信息
    +      # @see https://github.com/crazy-max/ghaction-github-pages
    +      - name: 部署到 GitHub Pages
    +        uses: crazy-max/ghaction-github-pages@v4
    +        with:
    +          # 部署到 gh-pages 分支
    +          target_branch: gh-pages
    +          # 部署目录为 VuePress 的默认输出目录
    +          build_dir: docs/.vuepress/dist
    +        env:
    +          # @see https://docs.github.com/cn/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
    +          GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}

    提示

    请参考 GitHub Pages 官方指南 来获取更多信息。

    GitLab Pages

    `,3)),i("ol",null,[i("li",null,[i("p",null,[s[6]||(s[6]=a("设置正确的 ")),l(e,{to:"/zh/reference/config.html#base"},{default:t(()=>s[5]||(s[5]=[a("base")])),_:1}),s[7]||(s[7]=a(" 选项。"))]),s[8]||(s[8]=n("

    如果你准备发布到 https://<USERNAME>.gitlab.io/ ,你可以省略这一步,因此 base 默认就是 "/"

    如果你准备发布到 https://<USERNAME>.gitlab.io/<REPO>/ ,也就是说你的仓库地址是 https://gitlab.com/<USERNAME>/<REPO> ,则将 base 设置为 "/<REPO>/"

    ",2))]),s[9]||(s[9]=i("li",null,[i("p",null,[a("创建 "),i("code",null,".gitlab-ci.yml"),a(" 文件来配置 "),i("a",{href:"https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/",target:"_blank",rel:"noopener noreferrer"},"GitLab CI"),a(" 工作流。")])],-1))]),s[12]||(s[12]=n(`
    点击展开配置样例
    # 选择你要使用的 docker 镜像
    +image: node:18-buster
    +
    +pages:
    +  # 每当 push 到 main 分支时触发部署
    +  only:
    +    - main
    +
    +  # 缓存 node_modules
    +  cache:
    +    key:
    +      files:
    +        - pnpm-lock.yaml
    +    paths:
    +      - .pnpm-store
    +
    +  # 安装 pnpm
    +  before_script:
    +    - curl -fsSL https://get.pnpm.io/install.sh | sh -
    +    - pnpm config set store-dir .pnpm-store
    +
    +  # 安装依赖并运行构建脚本
    +  script:
    +    - pnpm install --frozen-lockfile
    +    - pnpm docs:build --dest public
    +
    +  artifacts:
    +    paths:
    +      - public

    提示

    请参考 GitLab Pages 官方指南 来获取更多信息。

    Google Firebase

    1. 请确保你已经安装了 firebase-tools

    2. 在你项目的根目录下创建 firebase.json.firebaserc,并包含以下内容:

    firebase.json:

    {
    +  "hosting": {
    +    "public": "./docs/.vuepress/dist",
    +    "ignore": []
    +  }
    +}

    .firebaserc:

    {
    +  "projects": {
    +    "default": "<YOUR_FIREBASE_ID>"
    +  }
    +}
    1. 在执行了 pnpm docs:build 后, 使用 firebase deploy 指令来部署。

    提示

    请参考 Firebase CLI 官方指南 来获取更多信息。

    Heroku

    1. 首先安装 Heroku CLI

    2. 在这里 注册一个 Heroku 账号;

    3. 运行 heroku login 并填写你的 Heroku 认证信息:

    heroku login
    1. 在你的项目根目录中,创建一个名为 static.json 的文件,并包含下述内容:

    static.json:

    {
    +  "root": "./docs/.vuepress/dist"
    +}

    这里是你项目的配置,请参考 heroku-buildpack-static 来获取更多信息。

    Kinsta

    请查看 Set Up VuePress on Kinsta

    Edgio

    请查看 Edgio Documentation > Framework Guides > VuePress

    Netlify

    1. 前往 Netlify ,从 GitHub 创建一个新项目,并进行如下配置:

      • Build Command: pnpm docs:build
      • Publish directory: docs/.vuepress/dist
    2. 设置 Environment variables 来选择 Node 版本:

      • NODE_VERSION: 20
    3. 点击 deploy 按钮。

    你应该在 "Site Configuration" → "Build & Deploy" → "Post processing" 中禁用 Pretty URLs。

    Vercel

    1. 前往 Vercel ,从 GitHub 创建一个新项目,并进行如下配置:

      • FRAMEWORK PRESET: Other
      • BUILD COMMAND: pnpm docs:build
      • OUTPUT DIRECTORY: docs/.vuepress/dist
    2. 点击 deploy 按钮。

    云开发 CloudBase

    云开发 CloudBase 是一个云原生一体化的 Serverless 云平台,支持静态网站、容器等多种托管能力,并提供简便的部署工具 CloudBase Framework 来一键部署应用。

    1. 全局安装 CloudBase CLI :
    pnpm install -g @cloudbase/cli
    1. 在项目根目录运行以下命令一键部署 VuePress 应用,在部署之前可以先 开通环境
    cloudbase init --without-template
    +cloudbase framework:deploy

    CloudBase CLI 首先会跳转到控制台进行登录授权,然后将会交互式进行确认。

    确认信息后会立即进行部署,部署完成后,可以获得一个自动 SSL,CDN 加速的网站应用,你也可以搭配使用 GitHub Action 来持续部署 GitHub 上的 VuePress 应用。

    也可以使用 cloudbase init --template vuepress 快速创建和部署一个新的 VuePress 应用。

    提示

    更多详细信息请查看 CloudBase Framework 的部署项目示例

    21 云盒子

    请查看 21 云盒子 - 部署一个 VuePress 静态网页

    `,38))])}const m=p(k,[["render",o]]),b=JSON.parse('{"path":"/zh/guide/deployment.html","title":"部署","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:rocket","description":"部署 下述的指南基于以下条件: Markdown 源文件放置在你项目的 docs 目录; 使用的是默认的构建输出目录 (.vuepress/dist) ; 使用 pnpm 作为包管理器,当然也支持使用 npm 或 yarn 。 VuePress 作为项目依赖安装,并在 package.json 中配置了如下脚本: GitHub Pages 设置正确的 ...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"部署\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/deployment.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"部署"}],["meta",{"property":"og:description","content":"部署 下述的指南基于以下条件: Markdown 源文件放置在你项目的 docs 目录; 使用的是默认的构建输出目录 (.vuepress/dist) ; 使用 pnpm 作为包管理器,当然也支持使用 npm 或 yarn 。 VuePress 作为项目依赖安装,并在 package.json 中配置了如下脚本: GitHub Pages 设置正确的 ..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/deployment.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":1,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":3},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":3,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":4.21,"words":1262},"filePathRelative":"zh/guide/deployment.md","autoDesc":true}');export{m as comp,b as data}; diff --git a/assets/deployment.html-ySqYnmHM.js b/assets/deployment.html-ySqYnmHM.js new file mode 100644 index 00000000..c57c655f --- /dev/null +++ b/assets/deployment.html-ySqYnmHM.js @@ -0,0 +1,92 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as h,a,b as i,d as e,e as l,w as t,r,o as d}from"./app-DVsngoLV.js";const o={};function k(c,s){const n=r("RouteLink");return d(),h("div",null,[s[10]||(s[10]=a(`

    Deployment

    The following guides are based on some shared assumptions:

    • You are placing your Markdown source files inside the docs directory of your project;
    • You are using the default build output location (.vuepress/dist);
    • You are using pnpm as package manager, while npm and yarn are also supported;
    • VuePress is installed as a local dependency in your project, and you have setup the following script in package.json:
    {
    +  "scripts": {
    +    "docs:build": "vuepress build docs"
    +  }
    +}

    GitHub Pages

    `,5)),i("ol",null,[i("li",null,[i("p",null,[s[1]||(s[1]=e("Set the correct ")),l(n,{to:"/reference/config.html#base"},{default:t(()=>s[0]||(s[0]=[e("base")])),_:1}),s[2]||(s[2]=e(" config."))]),s[3]||(s[3]=a("

    If you are deploying to https://<USERNAME>.github.io/, you can omit this step as base defaults to "/".

    If you are deploying to https://<USERNAME>.github.io/<REPO>/, for example your repository is at https://github.com/<USERNAME>/<REPO>, then set base to "/<REPO>/".

    ",2))]),s[4]||(s[4]=i("li",null,[i("p",null,[e("Choose your preferred CI tools. Here we take "),i("a",{href:"https://github.com/features/actions",target:"_blank",rel:"noopener noreferrer"},"GitHub Actions"),e(" as an example.")]),i("p",null,[e("Create "),i("code",null,".github/workflows/docs.yml"),e(" to set up the workflow.")])],-1))]),s[11]||(s[11]=a(`
    Click to expand sample config
    name: docs
    +
    +on:
    +  # trigger deployment on every push to main branch
    +  push:
    +    branches: [main]
    +  # trigger deployment manually
    +  workflow_dispatch:
    +
    +jobs:
    +  docs:
    +    runs-on: ubuntu-latest
    +
    +    steps:
    +      - uses: actions/checkout@v4
    +        with:
    +          # fetch all commits to get last updated time or other git log info
    +          fetch-depth: 0
    +
    +      - name: Setup pnpm
    +        uses: pnpm/action-setup@v4
    +
    +      - name: Setup Node.js
    +        uses: actions/setup-node@v4
    +        with:
    +          # choose node.js version to use
    +          node-version: 22
    +          # cache deps for pnpm
    +          cache: pnpm
    +
    +      - name: Install deps
    +        run: pnpm install --frozen-lockfile
    +
    +      # run build script
    +      - name: Build VuePress site
    +        run: pnpm docs:build
    +
    +      # please check out the docs of the workflow for more details
    +      # @see https://github.com/crazy-max/ghaction-github-pages
    +      - name: Deploy to GitHub Pages
    +        uses: crazy-max/ghaction-github-pages@v4
    +        with:
    +          # deploy to gh-pages branch
    +          target_branch: gh-pages
    +          # deploy the default output dir of VuePress
    +          build_dir: docs/.vuepress/dist
    +        env:
    +          # @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
    +          GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}

    Tips

    Please refer to GitHub Pages official guide for more details.

    GitLab Pages

    `,3)),i("ol",null,[i("li",null,[i("p",null,[s[6]||(s[6]=e("Set the correct ")),l(n,{to:"/reference/config.html#base"},{default:t(()=>s[5]||(s[5]=[e("base")])),_:1}),s[7]||(s[7]=e(" config."))]),s[8]||(s[8]=a("

    If you are deploying to https://<USERNAME>.gitlab.io/, you can omit base as it defaults to "/".

    If you are deploying to https://<USERNAME>.gitlab.io/<REPO>/, for example your repository is at https://gitlab.com/<USERNAME>/<REPO>, then set base to "/<REPO>/".

    ",2))]),s[9]||(s[9]=i("li",null,[i("p",null,[e("Create "),i("code",null,".gitlab-ci.yml"),e(" to set up "),i("a",{href:"https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/",target:"_blank",rel:"noopener noreferrer"},"GitLab CI"),e(" workflow.")])],-1))]),s[12]||(s[12]=a(`
    Click to expand sample config
    # choose a docker image to use
    +image: node:18-buster
    +
    +pages:
    +  # trigger deployment on every push to main branch
    +  only:
    +    - main
    +
    +  # cache node_modules
    +  cache:
    +    key:
    +      files:
    +        - pnpm-lock.yaml
    +    paths:
    +      - .pnpm-store
    +
    +  # Install pnpm
    +  before_script:
    +    - curl -fsSL https://get.pnpm.io/install.sh | sh -
    +    - pnpm config set store-dir .pnpm-store
    +
    +  # install dependencies and run build script
    +  script:
    +    - pnpm i --frozen-lockfile
    +    - pnpm docs:build --dest public
    +
    +  artifacts:
    +    paths:
    +      - public

    Tips

    Please refer to GitLab Pages official guide for more details.

    Google Firebase

    1. Make sure you have firebase-tools installed.

    2. Create firebase.json and .firebaserc at the root of your project with the following content:

    firebase.json:

    {
    +  "hosting": {
    +    "public": "./docs/.vuepress/dist",
    +    "ignore": []
    +  }
    +}

    .firebaserc:

    {
    +  "projects": {
    +    "default": "<YOUR_FIREBASE_ID>"
    +  }
    +}
    1. After running pnpm docs:build, deploy using the command firebase deploy.

    Tips

    Please refer to Firebase CLI official guide for more details.

    Heroku

    1. Install Heroku CLI.

    2. Create a Heroku account by signing up.

    3. Run heroku login and fill in your Heroku credentials:

    heroku login
    1. Create a file called static.json in the root of your project with the below content:

    static.json:

    {
    +  "root": "./docs/.vuepress/dist"
    +}

    This is the configuration of your site; read more at heroku-buildpack-static.

    Kinsta

    See Set Up VuePress on Kinsta.

    Edgio

    See Edgio Documentation > Framework Guides > VuePress.

    Netlify

    1. On Netlify, set up a new project from GitHub with the following settings:

      • Build Command: pnpm docs:build
      • Publish directory: docs/.vuepress/dist
    2. Set Environment variables to choose node version:

      • NODE_VERSION: 20
    3. Hit the deploy button.

    Note

    You should disable Pretty URLs in the "Site Configuration" → "Build & Deploy" → "Post processing".

    Vercel

    1. Go to Vercel, set up a new project from GitHub with the following settings:

      • FRAMEWORK PRESET: Other
      • BUILD COMMAND: pnpm docs:build
      • OUTPUT DIRECTORY: docs/.vuepress/dist
    2. Hit the deploy button.

    `,26))])}const y=p(o,[["render",k]]),m=JSON.parse('{"path":"/guide/deployment.html","title":"Deployment","lang":"en-US","frontmatter":{"icon":"fa6-solid:rocket","description":"Deployment The following guides are based on some shared assumptions: You are placing your Markdown source files inside the docs directory of your project; You are using the def...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Deployment\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/deployment.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Deployment"}],["meta",{"property":"og:description","content":"Deployment The following guides are based on some shared assumptions: You are placing your Markdown source files inside the docs directory of your project; You are using the def..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/deployment.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":1,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":3},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":3,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.47,"words":741},"filePathRelative":"guide/deployment.md","autoDesc":true}');export{y as comp,m as data}; diff --git a/assets/frontmatter.html-BvpLSt9a.js b/assets/frontmatter.html-BvpLSt9a.js new file mode 100644 index 00000000..22976022 --- /dev/null +++ b/assets/frontmatter.html-BvpLSt9a.js @@ -0,0 +1,24 @@ +import{_ as r}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as d,b as i,a as t,d as l,e as n,w as a,r as p,o as h}from"./app-DVsngoLV.js";const o={};function k(u,s){const e=p("RouteLink");return h(),d("div",null,[s[34]||(s[34]=i("h1",{id:"frontmatter",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#frontmatter"},[i("span",null,"Frontmatter")])],-1)),s[35]||(s[35]=i("h2",{id:"date",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#date"},[i("span",null,"date")])],-1)),i("ul",null,[s[2]||(s[2]=i("li",null,[i("p",null,[l("类型: "),i("code",null,"string")])],-1)),s[3]||(s[3]=i("li",null,[i("p",null,"详情:"),i("p",null,"页面的创建日期。"),i("p",null,[l("应按照 "),i("code",null,"yyyy-MM-dd"),l(" 的格式来指定日期,或者遵循 "),i("a",{href:"https://yaml.org/type/timestamp.html",target:"_blank",rel:"noopener noreferrer"},"YAML Timestamp Type"),l(" 。")])],-1)),i("li",null,[s[1]||(s[1]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/node-api.html#date"},{default:a(()=>s[0]||(s[0]=[l("Node API > Page 属性 > date")])),_:1})])])])]),s[36]||(s[36]=i("h2",{id:"description",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#description"},[i("span",null,"description")])],-1)),i("ul",null,[s[6]||(s[6]=i("li",null,[i("p",null,[l("类型: "),i("code",null,"string")])],-1)),s[7]||(s[7]=i("li",null,[i("p",null,"详情:"),i("p",null,"页面的描述。"),i("p",null,[l("它将会覆盖站点配置中的 "),i("code",null,"description"),l(" 配置项。")])],-1)),i("li",null,[s[5]||(s[5]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/config.html#description"},{default:a(()=>s[4]||(s[4]=[l("配置 > description")])),_:1})])])])]),s[37]||(s[37]=t(`
    • 类型: HeadConfig[]

    • 详情:

      页面 <head> 标签内添加的额外标签。

    • 示例:

    ---
    +head:
    +  - - meta
    +    - name: foo
    +      content: yaml 数组语法
    +  - [meta, { name: bar, content: 方括号语法 }]
    +---

    渲染为:

    <head>
    +  <meta name="foo" content="yaml 数组语法" />
    +  <meta name="bar" content="方括号语法" />
    +</head>
    `,5)),i("ul",null,[i("li",null,[s[9]||(s[9]=l("参考: ")),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/config.html#head"},{default:a(()=>s[8]||(s[8]=[l("配置 > head")])),_:1})])])])]),s[38]||(s[38]=i("h2",{id:"lang",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#lang"},[i("span",null,"lang")])],-1)),i("ul",null,[s[13]||(s[13]=i("li",null,[i("p",null,[l("类型: "),i("code",null,"string")])],-1)),s[14]||(s[14]=i("li",null,[i("p",null,"详情:"),i("p",null,"页面的语言。"),i("p",null,[l("它将会覆盖站点配置中的 "),i("code",null,"lang"),l(" 配置项")])],-1)),i("li",null,[s[12]||(s[12]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/config.html#lang"},{default:a(()=>s[10]||(s[10]=[l("配置 > lang")])),_:1})]),i("li",null,[n(e,{to:"/zh/reference/node-api.html#lang"},{default:a(()=>s[11]||(s[11]=[l("Node API > Page 属性 > lang")])),_:1})])])])]),s[39]||(s[39]=t(`

    layout

    • 类型: string

    • 详情:

      页面的布局。

      布局是由主题提供的。如果你不指定该 Frontmatter ,则会使用默认布局。你应该参考主题自身的文档来了解其提供了哪些布局。

      如果主题布局无法满足你的需求,你可以使用自定义布局组件。

    • 示例:

    .vuepress/client.ts 文件中注册一个布局组件:

    import { defineClientConfig } from 'vuepress/client'
    +import CustomLayout from './CustomLayout.vue'
    +
    +export default defineClientConfig({
    +  layouts: {
    +    CustomLayout,
    +  },
    +})

    在 Frontmatter 中设置自定义布局:

    ---
    +layout: CustomLayout
    +---
    `,7)),i("ul",null,[s[19]||(s[19]=i("li",null,[i("p",null,[l("类型: "),i("code",null,"string | null")])],-1)),s[20]||(s[20]=i("li",null,[i("p",null,"详情:"),i("p",null,"页面的永久链接。"),i("p",null,"它将会覆盖根据文件路径来决定的默认路由路径。"),i("p",null,[l("当被设置为 "),i("code",null,"null"),l(" 时,将会禁用页面的永久链接。")])],-1)),i("li",null,[s[18]||(s[18]=i("p",null,"参考:",-1)),i("ul",null,[s[17]||(s[17]=i("li",null,[i("a",{href:"#permalinkpattern"},"Frontmatter > permalinkPattern")],-1)),i("li",null,[n(e,{to:"/zh/guide/page.html#%E8%B7%AF%E7%94%B1"},{default:a(()=>s[15]||(s[15]=[l("指南 > 页面 > 路由")])),_:1})]),i("li",null,[n(e,{to:"/zh/reference/node-api.html#permalink"},{default:a(()=>s[16]||(s[16]=[l("Node API > Page 属性 > permalink")])),_:1})])])])]),s[40]||(s[40]=t(`

    permalinkPattern

    • 类型: string | null

    • 详情:

      为页面生成永久链接的 Pattern 。

      它将会覆盖站点配置中的 permalinkPattern 配置项。

      如果 Frontmatter 中设置了 permalink ,那么这个字段则不会生效。

    • 使用:

      Pattern描述
      :year创建日期的 年 部分
      :month创建日期的 月 部分
      :day创建日期的 日 部分
      :slug页面文件名的 Slug
      :raw原始路由路径

      :year, :month:day Pattern 根据如下优先级进行解析:

      • Frontmatter 中的 date 字段。
      • 符合 yyyy-MM-dd-foobar.mdyyyy-MM-foobar.md 日期格式的文件名。
      • 符合 yyyy/MM/dd/foobar.mdyyyy/MM/foobar.md 日期格式的目录名。
      • 默认值 0000-00-00
    • 示例 1 :

      页面文件名是 foo-bar.md

      页面 Frontmatter 是:

    ---
    +date: 2021-01-03
    +permalinkPattern: :year/:month/:day/:slug.html
    +---

    那么页面的永久链接将会是 2021/01/03/foo-bar.html

    • 示例 2 :

      页面文件名是 2021-01-03-bar-baz.md

      页面 Frontmatter 是:

    ---
    +permalinkPattern: :year/:month/:day/:slug.html
    +---

    那么页面的永久链接将会是 2021/01/03/bar-baz.html

    `,7)),i("ul",null,[i("li",null,[s[25]||(s[25]=l("参考: ")),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/config.html#permalinkpattern"},{default:a(()=>s[21]||(s[21]=[l("配置 > permalinkPattern")])),_:1})]),s[23]||(s[23]=i("li",null,[i("a",{href:"#date"},"Frontmatter > date")],-1)),s[24]||(s[24]=i("li",null,[i("a",{href:"#permalink"},"Frontmatter > permalink")],-1)),i("li",null,[n(e,{to:"/zh/reference/node-api.html#permalink"},{default:a(()=>s[22]||(s[22]=[l("Node API > Page 属性 > permalink")])),_:1})])])])]),s[41]||(s[41]=i("h2",{id:"routemeta",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#routemeta"},[i("span",null,"routeMeta")])],-1)),i("ul",null,[s[28]||(s[28]=i("li",null,[i("p",null,[l("类型: "),i("code",null,"Record")])],-1)),s[29]||(s[29]=i("li",null,[i("p",null,"详情:"),i("p",null,"附加到页面路由的自定义数据。")],-1)),i("li",null,[s[27]||(s[27]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/node-api.html#routeMeta"},{default:a(()=>s[26]||(s[26]=[l("Node API > Page 属性 > routeMeta")])),_:1})])])])]),s[42]||(s[42]=i("h2",{id:"title",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#title"},[i("span",null,"title")])],-1)),i("ul",null,[s[32]||(s[32]=i("li",null,[i("p",null,[l("类型: "),i("code",null,"string")])],-1)),s[33]||(s[33]=i("li",null,[i("p",null,"详情:"),i("p",null,"页面的标题。"),i("p",null,[l("如果你不在 Frontmatter 中设置 "),i("code",null,"title"),l(" ,那么页面中第一个一级标题(即 "),i("code",null,"# title"),l(")的内容会被当作标题使用。")])],-1)),i("li",null,[s[31]||(s[31]=i("p",null,"参考:",-1)),i("ul",null,[i("li",null,[n(e,{to:"/zh/reference/node-api.html#title"},{default:a(()=>s[30]||(s[30]=[l("Node API > Page 属性 > title")])),_:1})])])])])])}const y=r(o,[["render",k]]),A=JSON.parse('{"path":"/zh/reference/frontmatter.html","title":"Frontmatter","lang":"zh-CN","frontmatter":{"icon":"fa-solid:bars","description":"Frontmatter date 类型: string 详情: 页面的创建日期。 应按照 yyyy-MM-dd 的格式来指定日期,或者遵循 YAML Timestamp Type 。 参考: description 类型: string 详情: 页面的描述。 它将会覆盖站点配置中的 description 配置项。 参考: head 类型: HeadC...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Frontmatter\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/frontmatter.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Frontmatter"}],["meta",{"property":"og:description","content":"Frontmatter date 类型: string 详情: 页面的创建日期。 应按照 yyyy-MM-dd 的格式来指定日期,或者遵循 YAML Timestamp Type 。 参考: description 类型: string 详情: 页面的描述。 它将会覆盖站点配置中的 description 配置项。 参考: head 类型: HeadC..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/reference/frontmatter.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":5,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"张怀文","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.5,"words":750},"filePathRelative":"zh/reference/frontmatter.md","autoDesc":true}');export{y as comp,A as data}; diff --git a/assets/frontmatter.html-CA6RnZ0l.js b/assets/frontmatter.html-CA6RnZ0l.js new file mode 100644 index 00000000..4c67281f --- /dev/null +++ b/assets/frontmatter.html-CA6RnZ0l.js @@ -0,0 +1,24 @@ +import{_ as r}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as p,b as i,a as n,d as s,e as t,w as a,r as d,o}from"./app-DVsngoLV.js";const h={};function k(u,e){const l=d("RouteLink");return o(),p("div",null,[e[34]||(e[34]=i("h1",{id:"frontmatter",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#frontmatter"},[i("span",null,"Frontmatter")])],-1)),e[35]||(e[35]=i("h2",{id:"date",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#date"},[i("span",null,"date")])],-1)),i("ul",null,[e[2]||(e[2]=i("li",null,[i("p",null,[s("Type: "),i("code",null,"string")])],-1)),e[3]||(e[3]=i("li",null,[i("p",null,"Details:"),i("p",null,"Created date for the page."),i("p",null,[s("You should specify the date in the form of "),i("code",null,"yyyy-MM-dd"),s(", or follow the "),i("a",{href:"https://yaml.org/type/timestamp.html",target:"_blank",rel:"noopener noreferrer"},"YAML Timestamp Type"),s(".")])],-1)),i("li",null,[e[1]||(e[1]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[t(l,{to:"/reference/node-api.html#date"},{default:a(()=>e[0]||(e[0]=[s("Node API > Page Properties > date")])),_:1})])])])]),e[36]||(e[36]=i("h2",{id:"description",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#description"},[i("span",null,"description")])],-1)),i("ul",null,[e[6]||(e[6]=i("li",null,[i("p",null,[s("Type: "),i("code",null,"string")])],-1)),e[7]||(e[7]=i("li",null,[i("p",null,"Details:"),i("p",null,"Description for the page."),i("p",null,[s("This will override the "),i("code",null,"description"),s(" option in your site config.")])],-1)),i("li",null,[e[5]||(e[5]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[t(l,{to:"/reference/config.html#description"},{default:a(()=>e[4]||(e[4]=[s("Config > description")])),_:1})])])])]),e[37]||(e[37]=n(`
    • Type: HeadConfig[]

    • Details:

      Extra tags in <head> tag for the page.

    • Example:

    ---
    +head:
    +  - - meta
    +    - name: foo
    +      content: yaml array syntax
    +  - [meta, { name: bar, content: square brackets syntax }]
    +---

    Rendered as:

    <head>
    +  <meta name="foo" content="yaml array syntax" />
    +  <meta name="bar" content="square brackets syntax" />
    +</head>
    `,5)),i("ul",null,[i("li",null,[e[9]||(e[9]=s("Also see: ")),i("ul",null,[i("li",null,[t(l,{to:"/reference/config.html#head"},{default:a(()=>e[8]||(e[8]=[s("Config > head")])),_:1})])])])]),e[38]||(e[38]=i("h2",{id:"lang",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#lang"},[i("span",null,"lang")])],-1)),i("ul",null,[e[13]||(e[13]=i("li",null,[i("p",null,[s("Type: "),i("code",null,"string")])],-1)),e[14]||(e[14]=i("li",null,[i("p",null,"Details:"),i("p",null,"Language for the page."),i("p",null,[s("This will override the "),i("code",null,"lang"),s(" option in your site config.")])],-1)),i("li",null,[e[12]||(e[12]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[t(l,{to:"/reference/config.html#lang"},{default:a(()=>e[10]||(e[10]=[s("Config > lang")])),_:1})]),i("li",null,[t(l,{to:"/reference/node-api.html#lang"},{default:a(()=>e[11]||(e[11]=[s("Node API > Page Properties > lang")])),_:1})])])])]),e[39]||(e[39]=n(`

    layout

    • Type: string

    • Details:

      Layout for the page.

      Layouts are provided by theme. If you don't specify this frontmatter, the default layout will be used. You should refer to the theme's own documentation to find what layouts it provides.

      If the theme layouts cannot meet your needs, you can use a custom layout component.

    • Example:

    Register a layout component in .vuepress/client.ts file:

    import { defineClientConfig } from 'vuepress/client'
    +import CustomLayout from './CustomLayout.vue'
    +
    +export default defineClientConfig({
    +  layouts: {
    +    CustomLayout,
    +  },
    +})

    Set custom layout in frontmatter:

    ---
    +layout: CustomLayout
    +---
    `,7)),i("ul",null,[e[19]||(e[19]=i("li",null,[i("p",null,[s("Type: "),i("code",null,"string | null")])],-1)),e[20]||(e[20]=i("li",null,[i("p",null,"Details:"),i("p",null,"Permalink for the page."),i("p",null,"This will override the default route path that determined by the file path of the page."),i("p",null,[s("When it is set to "),i("code",null,"null"),s(", the permalink of the page will be disabled.")])],-1)),i("li",null,[e[18]||(e[18]=i("p",null,"Also see:",-1)),i("ul",null,[e[17]||(e[17]=i("li",null,[i("a",{href:"#permalinkpattern"},"Frontmatter > permalinkPattern")],-1)),i("li",null,[t(l,{to:"/guide/page.html#routing"},{default:a(()=>e[15]||(e[15]=[s("Guide > Page > Routing")])),_:1})]),i("li",null,[t(l,{to:"/reference/node-api.html#permalink"},{default:a(()=>e[16]||(e[16]=[s("Node API > Page Properties > permalink")])),_:1})])])])]),e[40]||(e[40]=n(`

    permalinkPattern

    • Type: string | null

    • Details:

      Pattern to generate permalink for the page.

      This will override the permalinkPattern option in your site config.

      This won't take effect if the permalink frontmatter has been set.

    • Usage:

      PatternDescription
      :yearYear part of created date
      :monthMonth part of created date
      :dayDay part of created date
      :slugSlug of page filename
      :rawRaw route path

      The :year, :month and :day patterns are resolved according to the following priority:

      • The date frontmatter.
      • The filename that matches the date pattern yyyy-MM-dd-foobar.md or yyyy-MM-foobar.md.
      • The dirname that matches the date pattern yyyy/MM/dd/foobar.md or yyyy/MM/foobar.md.
      • Fallback to 0000-00-00.
    • Example 1:

      The page filename is foo-bar.md.

      The page frontmatter is:

    ---
    +date: 2021-01-03
    +permalinkPattern: :year/:month/:day/:slug.html
    +---

    Then the permalink of the page would be 2021/01/03/foo-bar.html.

    • Example 2:

      The page filename is 2021-01-03-bar-baz.md.

      The page frontmatter is:

    ---
    +permalinkPattern: :year/:month/:day/:slug.html
    +---

    Then the permalink of the page would be 2021/01/03/bar-baz.html.

    `,7)),i("ul",null,[i("li",null,[e[25]||(e[25]=s("Also see: ")),i("ul",null,[i("li",null,[t(l,{to:"/reference/config.html#permalinkpattern"},{default:a(()=>e[21]||(e[21]=[s("Config > permalinkPattern")])),_:1})]),e[23]||(e[23]=i("li",null,[i("a",{href:"#date"},"Frontmatter > date")],-1)),e[24]||(e[24]=i("li",null,[i("a",{href:"#permalink"},"Frontmatter > permalink")],-1)),i("li",null,[t(l,{to:"/reference/node-api.html#permalink"},{default:a(()=>e[22]||(e[22]=[s("Node API > Page Properties > permalink")])),_:1})])])])]),e[41]||(e[41]=i("h2",{id:"routemeta",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#routemeta"},[i("span",null,"routeMeta")])],-1)),i("ul",null,[e[28]||(e[28]=i("li",null,[i("p",null,[s("Type: "),i("code",null,"Record")])],-1)),e[29]||(e[29]=i("li",null,[i("p",null,"Details:"),i("p",null,"Custom data to be attached to the page route.")],-1)),i("li",null,[e[27]||(e[27]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[t(l,{to:"/reference/node-api.html#routeMeta"},{default:a(()=>e[26]||(e[26]=[s("Node API > Page Properties > routeMeta")])),_:1})])])])]),e[42]||(e[42]=i("h2",{id:"title",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#title"},[i("span",null,"title")])],-1)),i("ul",null,[e[32]||(e[32]=i("li",null,[i("p",null,[s("Type: "),i("code",null,"string")])],-1)),e[33]||(e[33]=i("li",null,[i("p",null,"Details:"),i("p",null,"Title for the page."),i("p",null,[s("If you don't specify "),i("code",null,"title"),s(" in frontmatter, content of the first level-one header (i.e. "),i("code",null,"# title"),s(") will be used as the title.")])],-1)),i("li",null,[e[31]||(e[31]=i("p",null,"Also see:",-1)),i("ul",null,[i("li",null,[t(l,{to:"/reference/node-api.html#title"},{default:a(()=>e[30]||(e[30]=[s("Node API > Page Properties > title")])),_:1})])])])])])}const y=r(h,[["render",k]]),A=JSON.parse('{"path":"/reference/frontmatter.html","title":"Frontmatter","lang":"en-US","frontmatter":{"icon":"fa-solid:bars","description":"Frontmatter date Type: string Details: Created date for the page. You should specify the date in the form of yyyy-MM-dd, or follow the YAML Timestamp Type. Also see: description...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Frontmatter\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/frontmatter.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Frontmatter"}],["meta",{"property":"og:description","content":"Frontmatter date Type: string Details: Created date for the page. You should specify the date in the form of yyyy-MM-dd, or follow the YAML Timestamp Type. Also see: description..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/frontmatter.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":5,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"张怀文","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.89,"words":566},"filePathRelative":"reference/frontmatter.md","autoDesc":true}');export{y as comp,A as data}; diff --git a/assets/getting-started.html-B-E2ElMp.js b/assets/getting-started.html-B-E2ElMp.js new file mode 100644 index 00000000..73406ef5 --- /dev/null +++ b/assets/getting-started.html-B-E2ElMp.js @@ -0,0 +1,35 @@ +import{_ as k}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,a as r,e as t,b as s,w as a,d as e,r as p,o as g}from"./app-DVsngoLV.js";const c={};function u(b,i){const h=p("CodeTabs"),d=p("RouteLink");return g(),o("div",null,[i[18]||(i[18]=r('

    快速上手

    注意

    VuePress v2 目前仍处于 RC (Release Candidate) 阶段。你已经可以用它来构建你的站点,但是它的配置和 API 还不够稳定,有可能会发生一些微小的 Breaking Changes 。因此,在每次更新 RC 版本之后,请一定要仔细阅读 更新日志

    在线试一试

    你可以通过 StackBlitz 在你的浏览器里直接使用 VuePress 。

    安装

    依赖环境

    提示

    • 使用 pnpm 时,你需要安装 vue 作为 peer-dependencies 。
    • 使用 yarn 2+ 时,你需要在 .yarnrc.yml 文件中设置 nodeLinker: 'node-modules'

    创建项目

    通过命令行创建

    你可以通过 create-vuepress 直接创建项目模板。

    ',11)),t(h,{id:"55",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:a(({value:n,isActive:l})=>i[0]||(i[0]=[e("pnpm")])),title1:a(({value:n,isActive:l})=>i[1]||(i[1]=[e("yarn")])),title2:a(({value:n,isActive:l})=>i[2]||(i[2]=[e("npm")])),tab0:a(({value:n,isActive:l})=>i[3]||(i[3]=[s("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[s("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," create"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress-starter")])])]),s("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[s("div",{class:"line-number"})])],-1)])),tab1:a(({value:n,isActive:l})=>i[4]||(i[4]=[s("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[s("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," create"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress-starter")])])]),s("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[s("div",{class:"line-number"})])],-1)])),tab2:a(({value:n,isActive:l})=>i[5]||(i[5]=[s("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[s("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress-starter")])])]),s("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[s("div",{class:"line-number"})])],-1)])),_:1}),i[19]||(i[19]=r(`

    手动创建

    这一章节会帮助你从头搭建一个简单的 VuePress 文档网站。

    • 创建并进入一个新目录
    mkdir vuepress-starter
    +cd vuepress-starter
    • 初始化项目
    `,5)),t(h,{id:"87",data:[{id:"pnpm"},{id:"yarn"}],"tab-id":"shell"},{title0:a(({value:n,isActive:l})=>i[6]||(i[6]=[e("pnpm")])),title1:a(({value:n,isActive:l})=>i[7]||(i[7]=[e("yarn")])),tab0:a(({value:n,isActive:l})=>i[8]||(i[8]=[s("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[s("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"git"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")]),e(` +`),s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")])])]),s("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1)])),tab1:a(({value:n,isActive:l})=>i[9]||(i[9]=[s("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[s("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[s("code",null,[s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"git"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")]),e(` +`),s("span",{class:"line"},[s("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),s("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")])])]),s("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[s("div",{class:"line-number"}),s("div",{class:"line-number"})])],-1)])),_:1}),i[20]||(i[20]=r(`
    • 安装 VuePress

    ::: tabs

    @tab pnpm

    # 安装 vuepress 和 vue
    +pnpm add -D vuepress@next vue
    +# 安装打包工具和主题
    +pnpm add -D @vuepress/bundler-vite@next @vuepress/theme-default@next

    @tab yarn

    # 安装 vuepress
    +yarn add -D vuepress@next
    +# 安装打包工具和主题
    +yarn add -D @vuepress/bundler-vite@next @vuepress/theme-default@next

    @tab npm

    # 安装 vuepress
    +npm install -D vuepress@next
    +# 安装打包工具和主题
    +npm install -D @vuepress/bundler-vite@next @vuepress/theme-default@next

    :::

    • 创建 docs 目录和 docs/.vuepress 目录
    mkdir docs
    +mkdir docs/.vuepress
    • 创建 VuePress 配置文件 docs/.vuepress/config.js
    import { viteBundler } from '@vuepress/bundler-vite'
    +import { defaultTheme } from '@vuepress/theme-default'
    +import { defineUserConfig } from 'vuepress'
    +
    +export default defineUserConfig({
    +  bundler: viteBundler(),
    +  theme: defaultTheme(),
    +})
    • 创建你的第一篇文档
    echo '# Hello VuePress' > docs/README.md

    目录结构

    创建完成后,你项目的目录结构应该是这样的:

    ├─ docs
    +│  ├─ .vuepress
    +│  │  └─ config.js
    +│  └─ README.md
    +└─ package.json

    docs 目录是你放置 Markdown 文件的地方,它同时也会作为 VuePress 的源文件目录。

    docs/.vuepress 目录,即源文件目录下的 .vuepress 目录,是放置所有和 VuePress 相关的文件的地方。当前这里只有一个配置文件。默认还会在该目录下生成临时文件、缓存文件和构建输出文件。建议你把它们添加到 .gitignore 文件中。

    示例 .gitignore 文件
    # VuePress 默认临时文件目录
    +.vuepress/.temp
    +# VuePress 默认缓存目录
    +.vuepress/.cache
    +# VuePress 默认构建生成的静态文件目录
    +.vuepress/dist

    开始使用 VuePress

    启动开发服务器

    你可以在 package.json 中添加一些 scripts

    {
    +  "scripts": {
    +    "docs:dev": "vuepress dev docs",
    +    "docs:build": "vuepress build docs"
    +  }
    +}

    运行 docs:dev 脚本可以启动开发服务器:

    ::: tabs

    @tab pnpm

    pnpm docs:dev

    @tab yarn

    yarn docs:dev

    @tab npm

    npm run docs:dev

    :::

    VuePress 会在 http://localhost:8080 启动一个热重载的开发服务器。当你修改你的 Markdown 文件时,浏览器中的内容也会自动更新。

    构建你的网站

    运行 docs:build 脚本可以构建你的网站:

    ::: tabs

    @tab pnpm

    pnpm docs:build

    @tab yarn

    yarn docs:build

    @tab npm

    npm run docs:build

    :::

    `,45)),s("p",null,[i[11]||(i[11]=e("在 ")),i[12]||(i[12]=s("code",null,"docs/.vuepress/dist",-1)),i[13]||(i[13]=e(" 目录中可以找到构建生成的静态文件。你可以查看 ")),t(d,{to:"/zh/guide/deployment.html"},{default:a(()=>i[10]||(i[10]=[e("部署")])),_:1}),i[14]||(i[14]=e(" 来了解如何部署你的网站。"))]),i[21]||(i[21]=s("h2",{id:"进一步了解-vuepress",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#进一步了解-vuepress"},[s("span",null,"进一步了解 VuePress")])],-1)),i[22]||(i[22]=s("p",null,"现在,你应该已经有了一个简单可用的 VuePress 网站。但你可能仍需要阅读后续的指南来更加了解 VuePress 。",-1)),s("p",null,[i[16]||(i[16]=e("下一步,前往 ")),t(d,{to:"/zh/guide/configuration.html"},{default:a(()=>i[15]||(i[15]=[e("配置")])),_:1}),i[17]||(i[17]=e(" 了解更多配置文件相关的内容。"))])])}const A=k(c,[["render",u]]),y=JSON.parse('{"path":"/zh/guide/getting-started.html","title":"快速上手","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:lightbulb","description":"快速上手 注意 VuePress v2 目前仍处于 RC (Release Candidate) 阶段。你已经可以用它来构建你的站点,但是它的配置和 API 还不够稳定,有可能会发生一些微小的 Breaking Changes 。因此,在每次更新 RC 版本之后,请一定要仔细阅读 更新日志。 在线试一试 你可以通过 StackBlitz 在你的浏览器里...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"快速上手\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-29T18:12:59.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/getting-started.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"快速上手"}],["meta",{"property":"og:description","content":"快速上手 注意 VuePress v2 目前仍处于 RC (Release Candidate) 阶段。你已经可以用它来构建你的站点,但是它的配置和 API 还不够稳定,有可能会发生一些微小的 Breaking Changes 。因此,在每次更新 RC 版本之后,请一定要仔细阅读 更新日志。 在线试一试 你可以通过 StackBlitz 在你的浏览器里..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-29T18:12:59.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-29T18:12:59.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/getting-started.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1745950379000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":5,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":3,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.95,"words":885},"filePathRelative":"zh/guide/getting-started.md","autoDesc":true}');export{A as comp,y as data}; diff --git a/assets/getting-started.html-DPjQNJnr.js b/assets/getting-started.html-DPjQNJnr.js new file mode 100644 index 00000000..eb227847 --- /dev/null +++ b/assets/getting-started.html-DPjQNJnr.js @@ -0,0 +1,36 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,a as h,e as l,b as i,w as a,d as e,r as k,o as u}from"./app-DVsngoLV.js";const g={};function c(b,s){const r=k("CodeTabs"),d=k("RouteLink");return u(),o("div",null,[s[38]||(s[38]=h('

    Getting Started

    Warning

    VuePress v2 is currently in RC (Release Candidate) stage. It's ready to be used for building your site, but the config and API are not stable enough, which is possibly to have minor breaking changes. So make sure to read the changelog carefully each time you upgrade a RC version.

    Try It Online

    You can try VuePress directly in your browser on StackBlitz.

    Installation

    Prerequisites

    Tips

    • When using pnpm, you need to install vue as peer-dependencies.
    • When using yarn 2+, you need to set nodeLinker: 'node-modules' in your .yarnrc.yml file.

    Project Setup

    Setup via CLI

    You can use create-vuepress to generate a template directly.

    ',11)),l(r,{id:"55",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:a(({value:t,isActive:n})=>s[0]||(s[0]=[e("pnpm")])),title1:a(({value:t,isActive:n})=>s[1]||(s[1]=[e("yarn")])),title2:a(({value:t,isActive:n})=>s[2]||(s[2]=[e("npm")])),tab0:a(({value:t,isActive:n})=>s[3]||(s[3]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," create"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress-starter")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),tab1:a(({value:t,isActive:n})=>s[4]||(s[4]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," create"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress-starter")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),tab2:a(({value:t,isActive:n})=>s[5]||(s[5]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress-starter")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),_:1}),s[39]||(s[39]=h(`

    Setup Manually

    This section will help you build a basic VuePress documentation site from ground up.

    • Create and change into a new directory
    mkdir vuepress-starter
    +cd vuepress-starter
    • Initialize your project
    `,5)),l(r,{id:"87",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:a(({value:t,isActive:n})=>s[6]||(s[6]=[e("pnpm")])),title1:a(({value:t,isActive:n})=>s[7]||(s[7]=[e("yarn")])),title2:a(({value:t,isActive:n})=>s[8]||(s[8]=[e("npm")])),tab0:a(({value:t,isActive:n})=>s[9]||(s[9]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"git"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab1:a(({value:t,isActive:n})=>s[10]||(s[10]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"git"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab2:a(({value:t,isActive:n})=>s[11]||(s[11]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"git"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," init")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),_:1}),s[40]||(s[40]=i("ul",null,[i("li",null,"Install VuePress")],-1)),l(r,{id:"105",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:a(({value:t,isActive:n})=>s[12]||(s[12]=[e("pnpm")])),title1:a(({value:t,isActive:n})=>s[13]||(s[13]=[e("yarn")])),title2:a(({value:t,isActive:n})=>s[14]||(s[14]=[e("npm")])),tab0:a(({value:t,isActive:n})=>s[15]||(s[15]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install vuepress and vue")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vue")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install bundler and theme")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/theme-default@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab1:a(({value:t,isActive:n})=>s[16]||(s[16]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install vuepress")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install bundler and theme")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," add"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/theme-default@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),tab2:a(({value:t,isActive:n})=>s[17]||(s[17]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install vuepress")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," install"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," vuepress@next")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#A0A1A7","--shiki-light-font-style":"italic","--shiki-dark":"#7F848E","--shiki-dark-font-style":"italic"}},"# install bundler and theme")]),e(` +`),i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," install"),i("span",{style:{"--shiki-light":"#986801","--shiki-dark":"#D19A66"}}," -D"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/bundler-vite@next"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," @vuepress/theme-default@next")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"}),i("div",{class:"line-number"})])],-1)])),_:1}),s[41]||(s[41]=h(`
    • Create docs directory and docs/.vuepress directory
    mkdir docs
    +mkdir docs/.vuepress
    • Create the VuePress config file docs/.vuepress/config.js
    import { viteBundler } from '@vuepress/bundler-vite'
    +import { defaultTheme } from '@vuepress/theme-default'
    +import { defineUserConfig } from 'vuepress'
    +
    +export default defineUserConfig({
    +  bundler: viteBundler(),
    +  theme: defaultTheme(),
    +})
    • Create your first document
    echo '# Hello VuePress' > docs/README.md

    Directory Structure

    After the setup, the minimal structure of your project should look like this:

    ├─ docs
    +│  ├─ .vuepress
    +│  │  └─ config.js
    +│  └─ README.md
    +└─ package.json

    The docs directory is where you put your markdown files, and it will be used as the source directory of VuePress.

    The docs/.vuepress directory, i.e. the .vuepress directory in the source directory, is where all VuePress-specific files will be placed. Currently there is only one config file in it. By default, the temp, cache and output directory will also be generated inside this directory. It is suggested to add them to your .gitignore file.

    Example .gitignore file
    # VuePress default temp directory
    +.vuepress/.temp
    +# VuePress default cache directory
    +.vuepress/.cache
    +# VuePress default build output directory
    +.vuepress/dist

    Work with VuePress

    Start Dev Server

    You can add some scripts to package.json:

    {
    +  "scripts": {
    +    "docs:dev": "vuepress dev docs",
    +    "docs:build": "vuepress build docs"
    +  }
    +}

    Then, run docs:dev script to start the dev server:

    `,17)),l(r,{id:"169",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:a(({value:t,isActive:n})=>s[18]||(s[18]=[e("pnpm")])),title1:a(({value:t,isActive:n})=>s[19]||(s[19]=[e("yarn")])),title2:a(({value:t,isActive:n})=>s[20]||(s[20]=[e("npm")])),tab0:a(({value:t,isActive:n})=>s[21]||(s[21]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," docs:dev")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),tab1:a(({value:t,isActive:n})=>s[22]||(s[22]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," docs:dev")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),tab2:a(({value:t,isActive:n})=>s[23]||(s[23]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," run"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," docs:dev")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),_:1}),s[42]||(s[42]=i("p",null,[e("VuePress will start a hot-reloading development server at "),i("a",{href:"http://localhost:8080",target:"_blank",rel:"noopener noreferrer"},"http://localhost:8080"),e(". When you modify your markdown files, the content in the browser will be auto updated.")],-1)),s[43]||(s[43]=i("h3",{id:"build-your-site",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#build-your-site"},[i("span",null,"Build Your Site")])],-1)),s[44]||(s[44]=i("p",null,[e("To build your site, run "),i("code",null,"docs:build"),e(" script:")],-1)),l(r,{id:"189",data:[{id:"pnpm"},{id:"yarn"},{id:"npm"}],"tab-id":"shell"},{title0:a(({value:t,isActive:n})=>s[24]||(s[24]=[e("pnpm")])),title1:a(({value:t,isActive:n})=>s[25]||(s[25]=[e("yarn")])),title2:a(({value:t,isActive:n})=>s[26]||(s[26]=[e("npm")])),tab0:a(({value:t,isActive:n})=>s[27]||(s[27]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"pnpm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," docs:build")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),tab1:a(({value:t,isActive:n})=>s[28]||(s[28]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"yarn"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," docs:build")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),tab2:a(({value:t,isActive:n})=>s[29]||(s[29]=[i("div",{class:"language-bash line-numbers-mode","data-highlighter":"shiki","data-ext":"bash",style:{"--shiki-light":"#383A42","--shiki-dark":"#abb2bf","--shiki-light-bg":"#FAFAFA","--shiki-dark-bg":"#282c34"}},[i("pre",{class:"shiki shiki-themes one-light one-dark-pro vp-code"},[i("code",null,[i("span",{class:"line"},[i("span",{style:{"--shiki-light":"#4078F2","--shiki-dark":"#61AFEF"}},"npm"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," run"),i("span",{style:{"--shiki-light":"#50A14F","--shiki-dark":"#98C379"}}," docs:build")])])]),i("div",{class:"line-numbers","aria-hidden":"true",style:{"counter-reset":"line-number 0"}},[i("div",{class:"line-number"})])],-1)])),_:1}),i("p",null,[s[31]||(s[31]=e("You will see the generated static files in the ")),s[32]||(s[32]=i("code",null,"docs/.vuepress/dist",-1)),s[33]||(s[33]=e(" directory. You can check out ")),l(d,{to:"/guide/deployment.html"},{default:a(()=>s[30]||(s[30]=[e("deployment")])),_:1}),s[34]||(s[34]=e(" for how to deploy them."))]),s[45]||(s[45]=i("h2",{id:"learn-more-about-vuepress",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#learn-more-about-vuepress"},[i("span",null,"Learn More about VuePress")])],-1)),s[46]||(s[46]=i("p",null,"By now, you should have a basic but functional VuePress site. But you may still need to read the subsequent guide to learn more about VuePress.",-1)),i("p",null,[s[36]||(s[36]=e("Next step, learn more about the ")),l(d,{to:"/guide/configuration.html"},{default:a(()=>s[35]||(s[35]=[e("configuration")])),_:1}),s[37]||(s[37]=e("."))])])}const y=p(g,[["render",c]]),A=JSON.parse(`{"path":"/guide/getting-started.html","title":"Getting Started","lang":"en-US","frontmatter":{"icon":"fa6-solid:lightbulb","description":"Getting Started Warning VuePress v2 is currently in RC (Release Candidate) stage. It's ready to be used for building your site, but the config and API are not stable enough, whi...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Getting Started\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-29T18:12:59.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/getting-started.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Getting Started"}],["meta",{"property":"og:description","content":"Getting Started Warning VuePress v2 is currently in RC (Release Candidate) stage. It's ready to be used for building your site, but the config and API are not stable enough, whi..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-29T18:12:59.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-29T18:12:59.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/getting-started.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1745950379000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":5,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":3,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.16,"words":649},"filePathRelative":"guide/getting-started.md","autoDesc":true}`);export{y as comp,A as data}; diff --git a/assets/hero-BNkrhNQ6.js b/assets/hero-BNkrhNQ6.js new file mode 100644 index 00000000..d90d6d57 --- /dev/null +++ b/assets/hero-BNkrhNQ6.js @@ -0,0 +1 @@ +const o="/images/hero.png";export{o as _}; diff --git a/assets/i18n.html-CIS7iyFP.js b/assets/i18n.html-CIS7iyFP.js new file mode 100644 index 00000000..a27399f4 --- /dev/null +++ b/assets/i18n.html-CIS7iyFP.js @@ -0,0 +1,39 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as h,a,b as e,d as i,e as l,w as t,r,o as d}from"./app-DVsngoLV.js";const k={},o={class:"hint-container tip"};function c(g,s){const n=r("RouteLink");return d(),h("div",null,[s[8]||(s[8]=a(`

    I18n

    Site I18n Config

    To take advantage of multi-language support in VuePress, you first need to use the following file and directory structure:

    docs
    +├─ README.md
    +├─ foo.md
    +├─ nested
    +│  └─ README.md
    +└─ zh
    +   ├─ README.md
    +   ├─ foo.md
    +   └─ nested
    +      └─ README.md
    `,4)),e("p",null,[s[1]||(s[1]=i("Then, specify the ")),s[2]||(s[2]=e("code",null,"locales",-1)),s[3]||(s[3]=i(" option in your ")),l(n,{to:"/guide/configuration.html#config-file"},{default:t(()=>s[0]||(s[0]=[i("config file")])),_:1}),s[4]||(s[4]=i(":"))]),s[9]||(s[9]=a(`
    export default {
    +  locales: {
    +    // The key is the path for the locale to be nested under.
    +    // As a special case, the default locale can use '/' as its path.
    +    '/': {
    +      lang: 'en-US',
    +      title: 'VuePress',
    +      description: 'Vue-powered Static Site Generator',
    +    },
    +    '/zh/': {
    +      lang: 'zh-CN',
    +      title: 'VuePress',
    +      description: 'Vue 驱动的静态网站生成器',
    +    },
    +  },
    +}

    If a locale does not have a lang, title, description or head, VuePress will fallback to the root-level values. You can omit the root level config as long as they are provided in each locale.

    `,2)),e("div",o,[s[7]||(s[7]=e("p",{class:"hint-container-title"},"Tips",-1)),e("p",null,[s[6]||(s[6]=i("Config reference: ")),l(n,{to:"/reference/config.html#locales"},{default:t(()=>s[5]||(s[5]=[i("locales")])),_:1})])]),s[10]||(s[10]=a(`

    Theme I18n Config

    VuePress does not restrict how themes provide multi-language support, so each theme may have different way to handle i18n, and some themes may not provide multi-language support at all. You'd better refer to the theme documentation for detailed guide.

    If you are using default theme, the multi-language support is the same as above:

    import { defaultTheme } from '@vuepress/theme-default'
    +import { defineUserConfig } from 'vuepress'
    +
    +export default defineUserConfig({
    +  theme: defaultTheme({
    +    locales: {
    +      '/': {
    +        selectLanguageName: 'English',
    +      },
    +      '/zh/': {
    +        selectLanguageName: '简体中文',
    +      },
    +    },
    +  }),
    +})
    `,5))])}const B=p(k,[["render",c]]),y=JSON.parse('{"path":"/guide/i18n.html","title":"I18n","lang":"en-US","frontmatter":{"icon":"fa6-solid:language","description":"I18n Site I18n Config To take advantage of multi-language support in VuePress, you first need to use the following file and directory structure: Then, specify the locales option...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"I18n\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/i18n.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"I18n"}],["meta",{"property":"og:description","content":"I18n Site I18n Config To take advantage of multi-language support in VuePress, you first need to use the following file and directory structure: Then, specify the locales option..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/i18n.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":2},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.84,"words":252},"filePathRelative":"guide/i18n.md","autoDesc":true}');export{B as comp,y as data}; diff --git a/assets/i18n.html-Cz1yWZyl.js b/assets/i18n.html-Cz1yWZyl.js new file mode 100644 index 00000000..63a1fbc3 --- /dev/null +++ b/assets/i18n.html-Cz1yWZyl.js @@ -0,0 +1,39 @@ +import{_ as p}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as h,a as n,b as a,d as i,e as l,w as t,r,o as d}from"./app-DVsngoLV.js";const k={},o={class:"hint-container tip"};function c(B,s){const e=r("RouteLink");return d(),h("div",null,[s[8]||(s[8]=n(`

    多语言支持

    站点多语言配置

    要启用 VuePress 的多语言支持,首先需要使用如下的文件目录结构:

    docs
    +├─ README.md
    +├─ foo.md
    +├─ nested
    +│  └─ README.md
    +└─ zh
    +   ├─ README.md
    +   ├─ foo.md
    +   └─ nested
    +      └─ README.md
    `,4)),a("p",null,[s[1]||(s[1]=i("然后,在你的 ")),l(e,{to:"/zh/guide/configuration.html#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6"},{default:t(()=>s[0]||(s[0]=[i("配置文件")])),_:1}),s[2]||(s[2]=i(" 中设置 ")),s[3]||(s[3]=a("code",null,"locales",-1)),s[4]||(s[4]=i(" 选项:"))]),s[9]||(s[9]=n(`
    export default {
    +  locales: {
    +    // 键名是该语言所属的子路径
    +    // 作为特例,默认语言可以使用 '/' 作为其路径。
    +    '/': {
    +      lang: 'en-US',
    +      title: 'VuePress',
    +      description: 'Vue-powered Static Site Generator',
    +    },
    +    '/zh/': {
    +      lang: 'zh-CN',
    +      title: 'VuePress',
    +      description: 'Vue 驱动的静态网站生成器',
    +    },
    +  },
    +}

    如果一个语言没有声明 lang, title, description 或者 head ,VuePress 将会尝试使用顶层配置的对应值。如果每个语言都声明了这些值,那么顶层配置中的对应值可以被省略。

    `,2)),a("div",o,[s[7]||(s[7]=a("p",{class:"hint-container-title"},"提示",-1)),a("p",null,[s[6]||(s[6]=i("配置参考: ")),l(e,{to:"/zh/reference/config.html#locales"},{default:t(()=>s[5]||(s[5]=[i("locales")])),_:1})])]),s[10]||(s[10]=n(`

    主题多语言配置

    VuePress 没有限制主题如何提供多语言支持,因此每个主题可能会有不同的多语言配置方式,而且部分主题可能不会提供多语言支持。建议你查看主题本身的文档来获取更详细的指引。

    如果你使用的是默认主题,那么它提供多语言支持的方式和上述是一致的:

    import { defaultTheme } from '@vuepress/theme-default'
    +import { defineUserConfig } from 'vuepress'
    +
    +export default defineUserConfig({
    +  theme: defaultTheme({
    +    locales: {
    +      '/': {
    +        selectLanguageName: 'English',
    +      },
    +      '/zh/': {
    +        selectLanguageName: '简体中文',
    +      },
    +    },
    +  }),
    +})
    `,5))])}const A=p(k,[["render",c]]),u=JSON.parse('{"path":"/zh/guide/i18n.html","title":"多语言支持","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:language","description":"多语言支持 站点多语言配置 要启用 VuePress 的多语言支持,首先需要使用如下的文件目录结构: 然后,在你的 中设置 locales 选项: 如果一个语言没有声明 lang, title, description 或者 head ,VuePress 将会尝试使用顶层配置的对应值。如果每个语言都声明了这些值,那么顶层配置中的对应值可以被省略。 提示...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"多语言支持\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/i18n.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"多语言支持"}],["meta",{"property":"og:description","content":"多语言支持 站点多语言配置 要启用 VuePress 的多语言支持,首先需要使用如下的文件目录结构: 然后,在你的 中设置 locales 选项: 如果一个语言没有声明 lang, title, description 或者 head ,VuePress 将会尝试使用顶层配置的对应值。如果每个语言都声明了这些值,那么顶层配置中的对应值可以被省略。 提示..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/i18n.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":2},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.22,"words":365},"filePathRelative":"zh/guide/i18n.md","autoDesc":true}');export{A as comp,u as data}; diff --git a/assets/index-B-M8YVCw.js b/assets/index-B-M8YVCw.js new file mode 100644 index 00000000..51455096 --- /dev/null +++ b/assets/index-B-M8YVCw.js @@ -0,0 +1,12 @@ +/*! @docsearch/js 3.9.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t2&&(a.children=arguments.length>3?Wt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Et(e,a,n,o,null)}function Et(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Oo,__i:-1,__u:0};return o==null&&F.vnode!=null&&F.vnode(i),i}function Re(e){return e.children}function Ce(e,t){this.props=e,this.context=t}function ct(e,t){if(t==null)return e.__?ct(e.__,e.__i+1):null;for(var r;tt&&Ge.sort(Ur));dr.__r=0}function ko(e,t,r,n,o,i,a,c,f,m,b){var l,h,s,S,g,d,v=n&&n.__k||Po,_=t.length;for(f=function(p,y,P,k,N){var x,j,C,I,L,Q=P.length,q=Q,G=0;for(p.__k=new Array(N),x=0;x0?Et(j.type,j.props,j.key,j.ref?j.ref:null,j.__v):j).__=p,j.__b=p.__b+1,C=null,(L=j.__i=di(j,P,I,q))!==-1&&(q--,(C=P[L])&&(C.__u|=2)),C==null||C.__v===null?(L==-1&&G--,typeof j.type!="function"&&(j.__u|=4)):L!=I&&(L==I-1?G--:L==I+1?G++:(L>I?G--:G++,j.__u|=4))):p.__k[x]=null;if(q)for(x=0;x(f==null||2&f.__u?0:1))for(o=r-1,i=r+1;o>=0||i=0){if((f=t[o])&&!(2&f.__u)&&a==f.key&&c===f.type)return o;o--}if(i2&&(c.children=arguments.length>3?Wt.call(arguments,2):r),Et(e.type,c,n||e.key,o||e.ref,null)}Wt=Po.slice,F={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(c){e=c}throw e}},Oo=0,Ce.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Te({},this.state),typeof e=="function"&&(e=e(Te({},r),this.props)),e&&Te(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vr(this))},Ce.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vr(this))},Ce.prototype.render=Re,Ge=[],wo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ur=function(e,t){return e.__v.__b-t.__v.__b},dr.__r=0,Eo=/(PointerCapture)$|Capture$/i,en=0,Fr=Sn(!1),Br=Sn(!0),jo=0;var Be,Z,Dr,On,lt=0,No=[],ee=F,wn=ee.__b,En=ee.__r,jn=ee.diffed,Pn=ee.__c,In=ee.unmount,kn=ee.__;function st(e,t){ee.__h&&ee.__h(Z,e,lt||t),lt=0;var r=Z.__H||(Z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function zt(e){return lt=1,on(Uo,e)}function on(e,t,r){var n=st(Be++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Uo(void 0,t),function(c){var f=n.__N?n.__N[0]:n.__[0],m=n.t(f,c);f!==m&&(n.__N=[m,n.__[1]],n.__c.setState({}))}],n.__c=Z,!Z.u)){var o=function(c,f,m){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(h){return!!h.__c});if(b.every(function(h){return!h.__N}))return!i||i.call(this,c,f,m);var l=n.__c.props!==c;return b.forEach(function(h){if(h.__N){var s=h.__[0];h.__=h.__N,h.__N=void 0,s!==h.__[0]&&(l=!0)}}),i&&i.call(this,c,f,m)||l};Z.u=!0;var i=Z.shouldComponentUpdate,a=Z.componentWillUpdate;Z.componentWillUpdate=function(c,f,m){if(this.__e){var b=i;i=void 0,o(c,f,m),i=b}a&&a.call(this,c,f,m)},Z.shouldComponentUpdate=o}return n.__N||n.__}function Jt(e,t){var r=st(Be++,3);!ee.__s&&an(r.__H,t)&&(r.__=e,r.i=t,Z.__H.__h.push(r))}function Qt(e,t){var r=st(Be++,4);!ee.__s&&an(r.__H,t)&&(r.__=e,r.i=t,Z.__h.push(r))}function To(e){return lt=5,_r(function(){return{current:e}},[])}function Ro(e,t,r){lt=6,Qt(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function _r(e,t){var r=st(Be++,7);return an(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function Lo(e,t){return lt=8,_r(function(){return e},t)}function qo(e){var t=Z.context[e.__c],r=st(Be++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(Z)),t.props.value):e.__}function Mo(e,t){ee.useDebugValue&&ee.useDebugValue(t?t(e):e)}function Ho(){var e=st(Be++,11);if(!e.__){for(var t=Z.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function bi(){for(var e;e=No.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mr),e.__H.__h.forEach(Kr),e.__H.__h=[]}catch(t){e.__H.__h=[],ee.__e(t,e.__v)}}ee.__b=function(e){Z=null,wn&&wn(e)},ee.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),kn&&kn(e,t)},ee.__r=function(e){En&&En(e),Be=0;var t=(Z=e.__c).__H;t&&(Dr===Z?(t.__h=[],Z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(t.__h.forEach(mr),t.__h.forEach(Kr),t.__h=[],Be=0)),Dr=Z},ee.diffed=function(e){jn&&jn(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(No.push(t)!==1&&On===ee.requestAnimationFrame||((On=ee.requestAnimationFrame)||Si)(bi)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Dr=Z=null},ee.__c=function(e,t){t.some(function(r){try{r.__h.forEach(mr),r.__h=r.__h.filter(function(n){return!n.__||Kr(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ee.__e(n,r.__v)}}),Pn&&Pn(e,t)},ee.unmount=function(e){In&&In(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{mr(n)}catch(o){t=o}}),r.__H=void 0,t&&ee.__e(t,r.__v))};var Dn=typeof requestAnimationFrame=="function";function Si(e){var t,r=function(){clearTimeout(n),Dn&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Dn&&(t=requestAnimationFrame(r))}function mr(e){var t=Z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Z=t}function Kr(e){var t=Z;e.__c=e.__(),Z=t}function an(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Uo(e,t){return typeof t=="function"?t(e):t}function Fo(e,t){for(var r in t)e[r]=t[r];return e}function Wr(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function Bo(e,t){var r=t(),n=zt({t:{__:r,u:t}}),o=n[0].t,i=n[1];return Qt(function(){o.__=r,o.u=t,Cr(o)&&i({t:o})},[e,r,t]),Jt(function(){return Cr(o)&&i({t:o}),e(function(){Cr(o)&&i({t:o})})},[e]),r}function Cr(e){var t,r,n=e.u,o=e.__;try{var i=n();return!((t=o)===(r=i)&&(t!==0||1/t==1/r)||t!=t&&r!=r)}catch{return!0}}function Vo(e){e()}function Ko(e){return e}function Wo(){return[!1,Vo]}var zo=Qt;function zr(e,t){this.props=e,this.context=t}(zr.prototype=new Ce).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(e,t){return Wr(this.props,e)||Wr(this.state,t)};var Cn=F.__b;F.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Cn&&Cn(e)};var Oi=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,xn=function(e,t){return e==null?null:Le(Le(e).map(t))},wi={map:xn,forEach:xn,count:function(e){return e?Le(e).length:0},only:function(e){var t=Le(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Le},Ei=F.__e;F.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}Ei(e,t,r,n)};var An=F.unmount;function Jo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Fo({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Jo(n,t,r)})),e}function Qo(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Qo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function pr(){this.__u=0,this.o=null,this.__b=null}function $o(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ot(){this.i=null,this.l=null}F.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),An&&An(e)},(pr.prototype=new Ce).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var o=$o(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(c):c())};r.__R=a;var c=function(){if(!--n.__u){if(n.state.__a){var f=n.state.__a;n.__v.__k[0]=Qo(f,f.__c.__P,f.__c.__O)}var m;for(n.setState({__a:n.__b=null});m=n.o.pop();)m.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},pr.prototype.componentWillUnmount=function(){this.o=[]},pr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Jo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&De(Re,null,e.fallback);return o&&(o.__u&=-33),[De(Re,null,t.__a?null:e.children),o]};var Nn=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.h.removeChild(n)}}),Ft(De(ji,{context:t.context},e.__v),t.v)}function Zo(e,t){var r=De(Pi,{__v:e,h:t});return r.containerInfo=t,r}(Ot.prototype=new Ce).__a=function(e){var t=this,r=$o(t.__v),n=t.l.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),Nn(t,e,n)):o()};r?r(i):i()}},Ot.prototype.render=function(e){this.i=null,this.l=new Map;var t=Le(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},Ot.prototype.componentDidUpdate=Ot.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){Nn(e,r,t)})};var Go=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ii=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ki=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Di=/[A-Z0-9]/g,Ci=typeof document<"u",xi=function(e){return(typeof Symbol<"u"&&A(Symbol())=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Yo(e,t,r){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof r=="function"&&r(),e?e.__c:null}Ce.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ce.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Tn=F.event;function Ai(){}function Ni(){return this.cancelBubble}function Ti(){return this.defaultPrevented}F.event=function(e){return Tn&&(e=Tn(e)),e.persist=Ai,e.isPropagationStopped=Ni,e.isDefaultPrevented=Ti,e.nativeEvent=e};var un,Ri={enumerable:!1,configurable:!0,get:function(){return this.class}},Rn=F.vnode;F.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={},i=n.indexOf("-")===-1;for(var a in r){var c=r[a];if(!(a==="value"&&"defaultValue"in r&&c==null||Ci&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var f=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&c===!0?c="":f==="translate"&&c==="no"?c=!1:f[0]==="o"&&f[1]==="n"?f==="ondoubleclick"?a="ondblclick":f!=="onchange"||n!=="input"&&n!=="textarea"||xi(r.type)?f==="onfocus"?a="onfocusin":f==="onblur"?a="onfocusout":ki.test(a)&&(a=f):f=a="oninput":i&&Ii.test(a)?a=a.replace(Di,"-$&").toLowerCase():c===null&&(c=void 0),f==="oninput"&&o[a=f]&&(a="oninputCapture"),o[a]=c}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Le(r.children).forEach(function(m){m.props.selected=o.value.indexOf(m.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Le(r.children).forEach(function(m){m.props.selected=o.multiple?o.defaultValue.indexOf(m.props.value)!=-1:o.defaultValue==m.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Ri)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Go,Rn&&Rn(e)};var Ln=F.__r;F.__r=function(e){Ln&&Ln(e),un=e.__c};var qn=F.diffed;F.diffed=function(e){qn&&qn(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),un=null};var Li={ReactCurrentDispatcher:{current:{readContext:function(e){return un.__n[e.__c].props.value},useCallback:Lo,useContext:qo,useDebugValue:Mo,useDeferredValue:Ko,useEffect:Jt,useId:Ho,useImperativeHandle:Ro,useInsertionEffect:zo,useLayoutEffect:Qt,useMemo:_r,useReducer:on,useRef:To,useState:zt,useSyncExternalStore:Bo,useTransition:Wo}}};function rr(e){return!!e&&e.$$typeof===Go}var u={useState:zt,useId:Ho,useReducer:on,useEffect:Jt,useLayoutEffect:Qt,useInsertionEffect:zo,useTransition:Wo,useDeferredValue:Ko,useSyncExternalStore:Bo,startTransition:Vo,useRef:To,useImperativeHandle:Ro,useMemo:_r,useCallback:Lo,useContext:qo,useDebugValue:Mo,version:"18.3.1",Children:wi,render:Yo,hydrate:function(e,t,r){return Ao(e,t),typeof r=="function"&&r(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Ft(null,e),!0)},createPortal:Zo,createElement:De,createContext:function(e,t){var r={__c:t="__cC"+jo++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=new Set,(i={})[t]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.forEach(function(c){c.__e=!0,Vr(c)})},this.sub=function(a){o.add(a);var c=a.componentWillUnmount;a.componentWillUnmount=function(){o&&o.delete(a),c&&c.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r},createFactory:function(e){return De.bind(null,e)},cloneElement:function(e){return rr(e)?gi.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Re,isValidElement:rr,isElement:rr,isFragment:function(e){return rr(e)&&e.type===Re},isMemo:function(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")},findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:Ce,PureComponent:zr,memo:function(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Wr(this.props,o)}function n(o){return this.shouldComponentUpdate=r,De(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:function(e){function t(r){var n=Fo({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Oi,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},flushSync:function(e,t){return e(t)},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:Re,Suspense:pr,SuspenseList:Ot,lazy:function(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return De(r,i)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Li};function Jr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--R){var D=this.tryEntries[R],M=D.completion;if(D.tryLoc==="root")return E("end");if(D.tryLoc<=this.prev){var W=n.call(D,"catchLoc"),K=n.call(D,"finallyLoc");if(W&&K){if(this.prev=0;--E){var R=this.tryEntries[E];if(R.tryLoc<=this.prev&&n.call(R,"finallyLoc")&&this.prev=0;--w){var E=this.tryEntries[w];if(E.finallyLoc===O)return this.complete(E.completion,E.afterLoc),Q(E),d}},catch:function(O){for(var w=this.tryEntries.length-1;w>=0;--w){var E=this.tryEntries[w];if(E.tryLoc===O){var R=E.completion;if(R.type==="throw"){var D=R.arg;Q(E)}return D}}throw Error("illegal catch attempt")},delegateYield:function(O,w,E){return this.delegate={iterator:G(O),resultName:w,nextLoc:E},this.method==="next"&&(this.arg=e),d}},t}function Vt(e,t){return Vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Vt(e,t)}function he(e,t){return function(r){if(Array.isArray(r))return r}(e)||function(r,n){var o=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(o!=null){var i,a,c,f,m=[],b=!0,l=!1;try{if(c=(o=o.call(r)).next,n===0){if(Object(o)!==o)return;b=!1}else for(;!(b=(i=c.call(o)).done)&&(m.push(i.value),m.length!==n);b=!0);}catch(h){l=!0,a=h}finally{try{if(!b&&o.return!=null&&(f=o.return(),Object(f)!==f))return}finally{if(l)throw a}}return m}}(e,t)||Xo(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function jt(e){return function(t){if(Array.isArray(t))return Jr(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Xo(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xo(e,t){if(e){if(typeof e=="string")return Jr(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jr(e,t):void 0}}function Qr(e){var t=typeof Map=="function"?new Map:void 0;return Qr=function(r){if(r===null||!function(o){try{return Function.toString.call(o).indexOf("[native code]")!==-1}catch{return typeof o=="function"}}(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return function(o,i,a){if(cn())return Reflect.construct.apply(null,arguments);var c=[null];c.push.apply(c,i);var f=new(o.bind.apply(o,c));return a&&Vt(f,a.prototype),f}(r,arguments,Bt(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Vt(n,r)},Qr(e)}function qi(){return u.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},u.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function ei(){return u.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},u.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var Mi=["translations"],Ar="Ctrl",Hi=u.forwardRef(function(e,t){var r=e.translations,n=r===void 0?{}:r,o=xe(e,Mi),i=n.buttonText,a=i===void 0?"Search":i,c=n.buttonAriaLabel,f=c===void 0?"Search":c,m=he(zt(null),2),b=m[0],l=m[1];Jt(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?l("⌘"):l(Ar))},[]);var h=he(b===Ar?[Ar,"Ctrl",u.createElement(qi,null)]:["Meta","Command",b],3),s=h[0],S=h[1],g=h[2];return u.createElement("button",le({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(f," (").concat(S,"+K)")},o,{ref:t}),u.createElement("span",{className:"DocSearch-Button-Container"},u.createElement(ei,null),u.createElement("span",{className:"DocSearch-Button-Placeholder"},a)),u.createElement("span",{className:"DocSearch-Button-Keys"},b!==null&&u.createElement(u.Fragment,null,u.createElement(Un,{reactsToKey:s},g),u.createElement(Un,{reactsToKey:"k"},"K"))))});function Un(e){var t=e.reactsToKey,r=e.children,n=he(zt(!1),2),o=n[0],i=n[1];return Jt(function(){if(t)return window.addEventListener("keydown",a),window.addEventListener("keyup",c),function(){window.removeEventListener("keydown",a),window.removeEventListener("keyup",c)};function a(f){f.key===t&&i(!0)}function c(f){f.key!==t&&f.key!=="Meta"||i(!1)}},[t]),u.createElement("kbd",{className:o?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},r)}function ti(e,t){var r=void 0;return function(){for(var n=arguments.length,o=new Array(n),i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(b[f]=a[f]);return b}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Kn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function at(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=3||S===2&&g>=4||S===1&&g>=10);function v(_,p,y){if(d&&y!==void 0){var P=y[0].__autocomplete_algoliaCredentials,k={"X-Algolia-Application-Id":P.appId,"X-Algolia-API-Key":P.apiKey};h.apply(void 0,[_].concat(nr(p),[{headers:k}]))}else h.apply(void 0,[_].concat(nr(p)))}return{init:function(_,p){h("init",{appId:_,apiKey:p})},setAuthenticatedUserToken:function(_){h("setAuthenticatedUserToken",_)},setUserToken:function(_){h("setUserToken",_)},clickedObjectIDsAfterSearch:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&v("clickedObjectIDsAfterSearch",or(p),p[0].items)},clickedObjectIDs:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&v("clickedObjectIDs",or(p),p[0].items)},clickedFilters:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&h.apply(void 0,["clickedFilters"].concat(p))},convertedObjectIDsAfterSearch:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&v("convertedObjectIDsAfterSearch",or(p),p[0].items)},convertedObjectIDs:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&v("convertedObjectIDs",or(p),p[0].items)},convertedFilters:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&h.apply(void 0,["convertedFilters"].concat(p))},viewedObjectIDs:function(){for(var _=arguments.length,p=new Array(_),y=0;y<_;y++)p[y]=arguments[y];p.length>0&&p.reduce(function(P,k){var N=k.items,x=ni(k,Vi);return[].concat(nr(P),nr(function(j){for(var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,I=[],L=0;L0&&h.apply(void 0,["viewedFilters"].concat(p))}}}(f),b={current:[]},l=ti(function(h){var s=h.state;if(s.isOpen){var S=s.collections.reduce(function(g,d){return[].concat(ut(g),ut(d.items))},[]).filter(bt);ri(b.current.map(function(g){return g.objectID}),S.map(function(g){return g.objectID}))||(b.current=S,S.length>0&&Qi({onItemsChange:o,items:S,insights:m,state:s}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(h){var s=h.setContext,S=h.onSelect,g=h.onActive;function d(v){s({algoliaInsightsPlugin:{__algoliaSearchParameters:we(we({},c?{clickAnalytics:!0}:{}),v?{userToken:$i(v)}:{}),insights:m}})}f("addAlgoliaAgent","insights-plugin"),d(),f("onUserTokenChange",function(v){d(v)}),f("getUserToken",null,function(v,_){d(_)}),S(function(v){var _=v.item,p=v.state,y=v.event,P=v.source;bt(_)&&i({state:p,event:y,insights:m,item:_,insightsEvents:[we({eventName:"Item Selected"},Bn({item:_,items:P.getItems().filter(bt)}))]})}),g(function(v){var _=v.item,p=v.source,y=v.state,P=v.event;bt(_)&&a({state:y,event:P,insights:m,item:_,insightsEvents:[we({eventName:"Item Active"},Bn({item:_,items:p.getItems().filter(bt)}))]})})},onStateChange:function(h){var s=h.state;l({state:s})},__autocomplete_pluginOptions:e}}function Jn(){var e,t=arguments.length>1?arguments[1]:void 0;return[].concat(ut(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]),["autocomplete-internal"],ut((e=t.algoliaInsightsPlugin)!==null&&e!==void 0&&e.__automaticInsights?["autocomplete-automatic"]:[]))}function $i(e){return typeof e=="number"?e.toString():e}function hr(e,t){var r=t;return{then:function(n,o){return hr(e.then(ir(n,r,e),ir(o,r,e)),r)},catch:function(n){return hr(e.catch(ir(n,r,e)),r)},finally:function(n){return n&&r.onCancelList.push(n),hr(e.finally(ir(n&&function(){return r.onCancelList=[],n()},r,e)),r)},cancel:function(){r.isCanceled=!0;var n=r.onCancelList;r.onCancelList=[],n.forEach(function(o){o()})},isCanceled:function(){return r.isCanceled===!0}}}function Qn(e){return hr(e,{isCanceled:!1,onCancelList:[]})}function ir(e,t,r){return e?function(n){return t.isCanceled?n:e(n)}:r}function $n(e,t,r,n){if(!r)return null;if(e<0&&(t===null||n!==null&&t===0))return r+e;var o=(t===null?-1:t)+e;return o<=-1||o>=r?n===null?null:0:o}function Zn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Gn(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(Q[I]=j[I]);return Q}(p,y);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(p);for(k=0;k=0||Object.prototype.propertyIsEnumerable.call(p,P)&&(N[P]=p[P])}return N}(e,na);St&&o.environment.clearTimeout(St);var m=f.setCollections,b=f.setIsOpen,l=f.setQuery,h=f.setActiveItemId,s=f.setStatus,S=f.setContext;if(l(i),h(o.defaultActiveItemId),!i&&o.openOnFocus===!1){var g,d=c.getState().collections.map(function(p){return ze(ze({},p),{},{items:[]})});s("idle"),m(d),b((g=n.isOpen)!==null&&g!==void 0?g:o.shouldPanelOpen({state:c.getState()}));var v=Qn(ao(d).then(function(){return Promise.resolve()}));return c.pendingRequests.add(v)}s("loading"),St=o.environment.setTimeout(function(){s("stalled")},o.stallThreshold);var _=Qn(ao(o.getSources(ze({query:i,refresh:a,state:c.getState()},f)).then(function(p){return Promise.all(p.map(function(y){return Promise.resolve(y.getItems(ze({query:i,refresh:a,state:c.getState()},f))).then(function(P){return function(k,N,x){if(C=k,!!(C!=null&&C.execute)){var j=k.requesterId==="algolia"?Object.assign.apply(Object,[{}].concat(ai(Object.keys(x.context).map(function(I){var L;return(L=x.context[I])===null||L===void 0?void 0:L.__algoliaSearchParameters})))):{};return nt(nt({},k),{},{requests:k.queries.map(function(I){return{query:k.requesterId==="algolia"?nt(nt({},I),{},{params:nt(nt({},j),I.params)}):I,sourceId:N,transformResponse:k.transformResponse}})})}var C;return{items:k,sourceId:N}}(P,y.sourceId,c.getState())})})).then(ra).then(function(y){var P,k=y.some(function(N){return function(x){return!Array.isArray(x)&&!!(x!=null&&x._automaticInsights)}(N.items)});return k&&S({algoliaInsightsPlugin:ze(ze({},((P=c.getState().context)===null||P===void 0?void 0:P.algoliaInsightsPlugin)||{}),{},{__automaticInsights:k})}),function(N,x,j){return x.map(function(C){var I,L=N.filter(function(O){return O.sourceId===C.sourceId}),Q=L.map(function(O){return O.items}),q=L[0].transformResponse,G=q?q({results:I=Q,hits:I.map(function(O){return O.hits}).filter(Boolean),facetHits:I.map(function(O){var w;return(w=O.facetHits)===null||w===void 0?void 0:w.map(function(E){return{label:E.value,count:E.count,_highlightResult:{label:{value:E.highlighted}}}})}).filter(Boolean)}):Q;return C.onResolve({source:C,results:Q,items:G,state:j.getState()}),G.every(Boolean),'The `getItems` function from source "'.concat(C.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`. + +Did you forget to return items? + +See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:C,items:G}})}(y,p,c)}).then(function(y){return function(P){var k=P.props,N=P.state,x=P.collections.reduce(function(C,I){return ur(ur({},C),{},ii({},I.source.sourceId,ur(ur({},I.source),{},{getItems:function(){return Kt(I.items)}})))},{}),j=k.plugins.reduce(function(C,I){return I.reshape?I.reshape(C):C},{sourcesBySourceId:x,state:N}).sourcesBySourceId;return Kt(k.reshape({sourcesBySourceId:j,sources:Object.values(j),state:N})).filter(Boolean).map(function(C){return{source:C,items:C.getItems()}})}({collections:y,props:o,state:c.getState()})})}))).then(function(p){var y;s("idle"),m(p);var P=o.shouldPanelOpen({state:c.getState()});b((y=n.isOpen)!==null&&y!==void 0?y:o.openOnFocus&&!i&&P||P);var k=Ye(c.getState());if(c.getState().activeItemId!==null&&k){var N=k.item,x=k.itemInputValue,j=k.itemUrl,C=k.source;C.onActive(ze({event:t,item:N,itemInputValue:x,itemUrl:j,refresh:a,source:C,state:c.getState()},f))}}).finally(function(){s("idle"),St&&o.environment.clearTimeout(St)});return c.pendingRequests.add(_)}function Rt(e){return Rt=typeof Symbol=="function"&&A(Symbol.iterator)=="symbol"?function(t){return A(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":A(t)},Rt(e)}var ia=["event","props","refresh","store"];function uo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t=0||(b[f]=a[f]);return b}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function qt(e){return qt=typeof Symbol=="function"&&A(Symbol.iterator)=="symbol"?function(t){return A(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":A(t)},qt(e)}function lo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function va(e){for(var t=1;t0},reshape:function(g){return g.sources}},b),{},{id:(h=b.id)!==null&&h!==void 0?h:"autocomplete-".concat(Ui++),plugins:S,initialState:rt({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},b.initialState),onStateChange:function(g){var d;(d=b.onStateChange)===null||d===void 0||d.call(b,g),S.forEach(function(v){var _;return(_=v.onStateChange)===null||_===void 0?void 0:_.call(v,g)})},onSubmit:function(g){var d;(d=b.onSubmit)===null||d===void 0||d.call(b,g),S.forEach(function(v){var _;return(_=v.onSubmit)===null||_===void 0?void 0:_.call(v,g)})},onReset:function(g){var d;(d=b.onReset)===null||d===void 0||d.call(b,g),S.forEach(function(v){var _;return(_=v.onReset)===null||_===void 0?void 0:_.call(v,g)})},getSources:function(g){return Promise.all([].concat(function(d){return function(v){if(Array.isArray(v))return Rr(v)}(d)||function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)}(d)||function(v,_){if(v){if(typeof v=="string")return Rr(v,_);var p=Object.prototype.toString.call(v).slice(8,-1);return p==="Object"&&v.constructor&&(p=v.constructor.name),p==="Map"||p==="Set"?Array.from(v):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?Rr(v,_):void 0}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(S.map(function(d){return d.getSources})),[b.getSources]).filter(Boolean).map(function(d){return function(v,_){var p=[];return Promise.resolve(v(_)).then(function(y){return Promise.all(y.filter(function(P){return!!P}).map(function(P){if(P.sourceId,p.includes(P.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(P.sourceId)," is not unique."));p.push(P.sourceId);var k={getItemInputValue:function(x){return x.state.query},getItemUrl:function(){},onSelect:function(x){(0,x.setIsOpen)(!1)},onActive:vr,onResolve:vr};Object.keys(k).forEach(function(x){k[x].__default=!0});var N=Gn(Gn({},k),P);return Promise.resolve(N)}))})}(d,g)})).then(function(d){return Kt(d)}).then(function(d){return d.map(function(v){return rt(rt({},v),{},{onSelect:function(_){v.onSelect(_),l.forEach(function(p){var y;return(y=p.onSelect)===null||y===void 0?void 0:y.call(p,_)})},onActive:function(_){v.onActive(_),l.forEach(function(p){var y;return(y=p.onActive)===null||y===void 0?void 0:y.call(p,_)})},onResolve:function(_){v.onResolve(_),l.forEach(function(p){var y;return(y=p.onResolve)===null||y===void 0?void 0:y.call(p,_)})}})})})},navigator:rt({navigate:function(g){var d=g.itemUrl;s.location.assign(d)},navigateNewTab:function(g){var d=g.itemUrl,v=s.open(d,"_blank","noopener");v==null||v.focus()},navigateNewWindow:function(g){var d=g.itemUrl;s.open(d,"_blank","noopener")}},b.navigator)})}(e,t),n=function(b,l,h){var s,S=l.initialState;return{getState:function(){return S},dispatch:function(g,d){var v=function(_){for(var p=1;p=0||(qe[je]=Ee[je]);return qe}(K,z);if(Object.getOwnPropertySymbols){var dt=Object.getOwnPropertySymbols(K);for(se=0;se=0||Object.prototype.propertyIsEnumerable.call(K,Y)&&(te[Y]=K[Y])}return te}(C,ia);if(I.key==="ArrowUp"||I.key==="ArrowDown"){var O=function(){var K=Ye(q.getState()),z=L.environment.document.getElementById(be(L.id,"item-".concat(q.getState().activeItemId),K==null?void 0:K.source));z&&(z.scrollIntoViewIfNeeded?z.scrollIntoViewIfNeeded(!1):z.scrollIntoView(!1))},w=function(){var K=Ye(q.getState());if(q.getState().activeItemId!==null&&K){var z=K.item,Y=K.itemInputValue,se=K.itemUrl,te=K.source;te.onActive(Qe({event:I,item:z,itemInputValue:Y,itemUrl:se,refresh:Q,source:te,state:q.getState()},G))}};I.preventDefault(),q.getState().isOpen===!1&&(L.openOnFocus||q.getState().query)?Je(Qe({event:I,props:L,query:q.getState().query,refresh:Q,store:q},G)).then(function(){q.dispatch(I.key,{nextActiveItemId:L.defaultActiveItemId}),w(),setTimeout(O,0)}):(q.dispatch(I.key,{}),w(),O())}else if(I.key==="Escape")I.preventDefault(),q.dispatch(I.key,null),q.pendingRequests.cancelAll();else if(I.key==="Tab")q.dispatch("blur",null),q.pendingRequests.cancelAll();else if(I.key==="Enter"){if(q.getState().activeItemId===null||q.getState().collections.every(function(K){return K.items.length===0}))return void(L.debug||q.pendingRequests.cancelAll());I.preventDefault();var E=Ye(q.getState()),R=E.item,D=E.itemInputValue,M=E.itemUrl,W=E.source;if(I.metaKey||I.ctrlKey)M!==void 0&&(W.onSelect(Qe({event:I,item:R,itemInputValue:D,itemUrl:M,refresh:Q,source:W,state:q.getState()},G)),L.navigator.navigateNewTab({itemUrl:M,item:R,state:q.getState()}));else if(I.shiftKey)M!==void 0&&(W.onSelect(Qe({event:I,item:R,itemInputValue:D,itemUrl:M,refresh:Q,source:W,state:q.getState()},G)),L.navigator.navigateNewWindow({itemUrl:M,item:R,state:q.getState()}));else if(!I.altKey){if(M!==void 0)return W.onSelect(Qe({event:I,item:R,itemInputValue:D,itemUrl:M,refresh:Q,source:W,state:q.getState()},G)),void L.navigator.navigate({itemUrl:M,item:R,state:q.getState()});Je(Qe({event:I,nextState:{isOpen:!1},props:L,query:D,refresh:Q,store:q},G)).then(function(){W.onSelect(Qe({event:I,item:R,itemInputValue:D,itemUrl:M,refresh:Q,source:W,state:q.getState()},G))})}}}(ie({event:j,props:l,refresh:h,store:s},S))},onFocus:v,onBlur:vr,onClick:function(j){g.inputElement!==l.environment.document.activeElement||s.getState().isOpen||v(j)}},P)},getPanelProps:function(g){return ie({onMouseDown:function(d){d.preventDefault()},onMouseLeave:function(){s.dispatch("mouseleave",null)}},g)},getListProps:function(g){var d=g||{},v=d.source,_=ot(d,fa);return ie({role:"listbox","aria-labelledby":be(l.id,"label"),id:be(l.id,"list",v)},_)},getItemProps:function(g){var d=g.item,v=g.source,_=ot(g,ma);return ie({id:be(l.id,"item-".concat(d.__autocomplete_id),v),role:"option","aria-selected":s.getState().activeItemId===d.__autocomplete_id,onMouseMove:function(p){if(d.__autocomplete_id!==s.getState().activeItemId){s.dispatch("mousemove",d.__autocomplete_id);var y=Ye(s.getState());if(s.getState().activeItemId!==null&&y){var P=y.item,k=y.itemInputValue,N=y.itemUrl,x=y.source;x.onActive(ie({event:p,item:P,itemInputValue:k,itemUrl:N,refresh:h,source:x,state:s.getState()},S))}}},onMouseDown:function(p){p.preventDefault()},onClick:function(p){var y=v.getItemInputValue({item:d,state:s.getState()}),P=v.getItemUrl({item:d,state:s.getState()});(P?Promise.resolve():Je(ie({event:p,nextState:{isOpen:!1},props:l,query:y,refresh:h,store:s},S))).then(function(){v.onSelect(ie({event:p,item:d,itemInputValue:y,itemUrl:P,refresh:h,source:v,state:s.getState()},S))})}},_)}}}($e({props:r,refresh:a,store:n,navigator:r.navigator},o));function a(){return Je($e({event:new Event("input"),nextState:{isOpen:n.getState().isOpen},props:r,navigator:r.navigator,query:n.getState().query,refresh:a,store:n},o))}function c(b){b.forEach(function(l){var h;return(h=l.subscribe)===null||h===void 0?void 0:h.call(l,$e($e({},o),{},{navigator:r.navigator,refresh:a,onSelect:function(s){t.push({onSelect:s})},onActive:function(s){t.push({onActive:s})},onResolve:function(s){t.push({onResolve:s})}}))})}function f(){return r.plugins.some(function(b){return b.name==="aa.algoliaInsightsPlugin"})}if(r.insights&&!f()){var m=typeof r.insights=="boolean"?{}:r.insights;r.plugins.push(zn(m))}return c(r.plugins),function(b){var l,h,s=b.metadata,S=b.environment;if(!((l=S.navigator)===null||l===void 0||(h=l.userAgent)===null||h===void 0)&&h.includes("Algolia Crawler")){var g=S.document.createElement("meta"),d=S.document.querySelector("head");g.name="algolia:metadata",setTimeout(function(){g.content=JSON.stringify(s),d.appendChild(g)},0)}}({metadata:ha({plugins:r.plugins,options:e}),environment:r.environment}),$e($e({refresh:a,navigator:r.navigator},i),o)}function ba(e){var t=e.translations,r=(t===void 0?{}:t).searchByText,n=r===void 0?"Search by":r;return u.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},u.createElement("span",{className:"DocSearch-Label"},n),u.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},u.createElement("defs",null,u.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),u.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),u.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),u.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),u.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),u.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),u.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),u.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),u.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),u.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function sr(e){return u.createElement("svg",{width:"15",height:"15","aria-label":e.ariaLabel,role:"img"},u.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},e.children))}function Sa(e){var t=e.translations,r=t===void 0?{}:t,n=r.selectText,o=n===void 0?"to select":n,i=r.selectKeyAriaLabel,a=i===void 0?"Enter key":i,c=r.navigateText,f=c===void 0?"to navigate":c,m=r.navigateUpKeyAriaLabel,b=m===void 0?"Arrow up":m,l=r.navigateDownKeyAriaLabel,h=l===void 0?"Arrow down":l,s=r.closeText,S=s===void 0?"to close":s,g=r.closeKeyAriaLabel,d=g===void 0?"Escape key":g,v=r.searchByText,_=v===void 0?"Search by":v;return u.createElement(u.Fragment,null,u.createElement("div",{className:"DocSearch-Logo"},u.createElement(ba,{translations:{searchByText:_}})),u.createElement("ul",{className:"DocSearch-Commands"},u.createElement("li",null,u.createElement("kbd",{className:"DocSearch-Commands-Key"},u.createElement(sr,{ariaLabel:a},u.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),u.createElement("span",{className:"DocSearch-Label"},o)),u.createElement("li",null,u.createElement("kbd",{className:"DocSearch-Commands-Key"},u.createElement(sr,{ariaLabel:h},u.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),u.createElement("kbd",{className:"DocSearch-Commands-Key"},u.createElement(sr,{ariaLabel:b},u.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),u.createElement("span",{className:"DocSearch-Label"},f)),u.createElement("li",null,u.createElement("kbd",{className:"DocSearch-Commands-Key"},u.createElement(sr,{ariaLabel:d},u.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),u.createElement("span",{className:"DocSearch-Label"},S))))}function Oa(e){var t=e.hit,r=e.children;return u.createElement("a",{href:t.url},r)}function wa(){return u.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},u.createElement("g",{fill:"none",fillRule:"evenodd"},u.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},u.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),u.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},u.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function Ea(){return u.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),u.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function Zr(){return u.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function ja(){return u.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),u.createElement("path",{d:"M8 17l-6-6 6-6"})))}var Pa=function(){return u.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function Ia(e){switch(e.type){case"lvl1":return u.createElement(Pa,null);case"content":return u.createElement(Da,null);default:return u.createElement(ka,null)}}function ka(){return u.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function Da(){return u.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function po(){return u.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},u.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Ca(){return u.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function xa(){return u.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function Aa(e){var t=e.translations,r=t===void 0?{}:t,n=r.titleText,o=n===void 0?"Unable to fetch results":n,i=r.helpText,a=i===void 0?"You might want to check your network connection.":i;return u.createElement("div",{className:"DocSearch-ErrorScreen"},u.createElement("div",{className:"DocSearch-Screen-Icon"},u.createElement(Ca,null)),u.createElement("p",{className:"DocSearch-Title"},o),u.createElement("p",{className:"DocSearch-Help"},a))}var Na=["translations"];function Ta(e){var t=e.translations,r=t===void 0?{}:t,n=xe(e,Na),o=r.noResultsText,i=o===void 0?"No results for":o,a=r.suggestedQueryText,c=a===void 0?"Try searching for":a,f=r.reportMissingResultsText,m=f===void 0?"Believe this query should return results?":f,b=r.reportMissingResultsLinkText,l=b===void 0?"Let us know.":b,h=n.state.context.searchSuggestions;return u.createElement("div",{className:"DocSearch-NoResults"},u.createElement("div",{className:"DocSearch-Screen-Icon"},u.createElement(xa,null)),u.createElement("p",{className:"DocSearch-Title"},i,' "',u.createElement("strong",null,n.state.query),'"'),h&&h.length>0&&u.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},u.createElement("p",{className:"DocSearch-Help"},c,":"),u.createElement("ul",null,h.slice(0,3).reduce(function(s,S){return[].concat(jt(s),[u.createElement("li",{key:S},u.createElement("button",{className:"DocSearch-Prefill",key:S,type:"button",onClick:function(){n.setQuery(S.toLowerCase()+" "),n.refresh(),n.inputRef.current.focus()}},S))])},[]))),n.getMissingResultsUrl&&u.createElement("p",{className:"DocSearch-Help"},"".concat(m," "),u.createElement("a",{href:n.getMissingResultsUrl({query:n.state.query}),target:"_blank",rel:"noopener noreferrer"},l)))}var Ra=["hit","attribute","tagName"];function vo(e,t){return t.split(".").reduce(function(r,n){return r!=null&&r[n]?r[n]:null},e)}function it(e){var t=e.hit,r=e.attribute,n=e.tagName;return De(n===void 0?"span":n,B(B({},xe(e,Ra)),{},{dangerouslySetInnerHTML:{__html:vo(t,"_snippetResult.".concat(r,".value"))||vo(t,r)}}))}function Gr(e){return e.collection&&e.collection.items.length!==0?u.createElement("section",{className:"DocSearch-Hits"},u.createElement("div",{className:"DocSearch-Hit-source"},e.title),u.createElement("ul",e.getListProps(),e.collection.items.map(function(t,r){return u.createElement(La,le({key:[e.title,t.objectID].join(":"),item:t,index:r},e))}))):null}function La(e){var t=e.item,r=e.index,n=e.renderIcon,o=e.renderAction,i=e.getItemProps,a=e.onItemClick,c=e.collection,f=e.hitComponent,m=he(u.useState(!1),2),b=m[0],l=m[1],h=he(u.useState(!1),2),s=h[0],S=h[1],g=u.useRef(null),d=f;return u.createElement("li",le({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",b&&"DocSearch-Hit--deleting",s&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){g.current&&g.current()}},i({item:t,source:c.source,onClick:function(v){a(t,v)}})),u.createElement(d,{hit:t},u.createElement("div",{className:"DocSearch-Hit-Container"},n({item:t,index:r}),t.hierarchy[t.type]&&t.type==="lvl1"&&u.createElement("div",{className:"DocSearch-Hit-content-wrapper"},u.createElement(it,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&u.createElement(it,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&(t.type==="lvl2"||t.type==="lvl3"||t.type==="lvl4"||t.type==="lvl5"||t.type==="lvl6")&&u.createElement("div",{className:"DocSearch-Hit-content-wrapper"},u.createElement(it,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),u.createElement(it,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),t.type==="content"&&u.createElement("div",{className:"DocSearch-Hit-content-wrapper"},u.createElement(it,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),u.createElement(it,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),o({item:t,runDeleteTransition:function(v){l(!0),g.current=v},runFavoriteTransition:function(v){S(!0),g.current=v}}))))}function ho(e,t,r){return e.reduce(function(n,o){var i=t(o);return n.hasOwnProperty(i)||(n[i]=[]),n[i].length<(r||5)&&n[i].push(o),n},{})}function yo(e){return e}function fr(e){return e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function qa(){}var ci=/(|<\/mark>)/g,Ma=RegExp(ci.source);function li(e){var t,r,n=e;if(!n.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var o=n.__docsearch_parent?(t=n.__docsearch_parent)===null||t===void 0||(t=t._highlightResult)===null||t===void 0||(t=t.hierarchy)===null||t===void 0?void 0:t.lvl0:(r=e._highlightResult)===null||r===void 0||(r=r.hierarchy)===null||r===void 0?void 0:r.lvl0;return o?o.value&&Ma.test(o.value)?o.value.replace(ci,""):o.value:e.hierarchy.lvl0}function Ha(e){return u.createElement("div",{className:"DocSearch-Dropdown-Container"},e.state.collections.map(function(t){if(t.items.length===0)return null;var r=li(t.items[0]);return u.createElement(Gr,le({},e,{key:t.source.sourceId,title:r,collection:t,renderIcon:function(n){var o,i=n.item,a=n.index;return u.createElement(u.Fragment,null,i.__docsearch_parent&&u.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},u.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},i.__docsearch_parent!==((o=t.items[a+1])===null||o===void 0?void 0:o.__docsearch_parent)?u.createElement("path",{d:"M8 6v21M20 27H8.3"}):u.createElement("path",{d:"M8 6v42M20 27H8.3"}))),u.createElement("div",{className:"DocSearch-Hit-icon"},u.createElement(Ia,{type:i.type})))},renderAction:function(){return u.createElement("div",{className:"DocSearch-Hit-action"},u.createElement(ja,null))}}))}),e.resultsFooterComponent&&u.createElement("section",{className:"DocSearch-HitsFooter"},u.createElement(e.resultsFooterComponent,{state:e.state})))}var Ua=["translations"];function Fa(e){var t=e.translations,r=t===void 0?{}:t,n=xe(e,Ua),o=r.recentSearchesTitle,i=o===void 0?"Recent":o,a=r.noRecentSearchesText,c=a===void 0?"No recent searches":a,f=r.saveRecentSearchButtonTitle,m=f===void 0?"Save this search":f,b=r.removeRecentSearchButtonTitle,l=b===void 0?"Remove this search from history":b,h=r.favoriteSearchesTitle,s=h===void 0?"Favorite":h,S=r.removeFavoriteSearchButtonTitle,g=S===void 0?"Remove this search from favorites":S;return n.state.status==="idle"&&n.hasCollections===!1?n.disableUserPersonalization?null:u.createElement("div",{className:"DocSearch-StartScreen"},u.createElement("p",{className:"DocSearch-Help"},c)):n.hasCollections===!1?null:u.createElement("div",{className:"DocSearch-Dropdown-Container"},u.createElement(Gr,le({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return u.createElement("div",{className:"DocSearch-Hit-icon"},u.createElement(Ea,null))},renderAction:function(d){var v=d.item,_=d.runFavoriteTransition,p=d.runDeleteTransition;return u.createElement(u.Fragment,null,u.createElement("div",{className:"DocSearch-Hit-action"},u.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(y){y.preventDefault(),y.stopPropagation(),_(function(){n.favoriteSearches.add(v),n.recentSearches.remove(v),n.refresh()})}},u.createElement(po,null))),u.createElement("div",{className:"DocSearch-Hit-action"},u.createElement("button",{className:"DocSearch-Hit-action-button",title:l,type:"submit",onClick:function(y){y.preventDefault(),y.stopPropagation(),p(function(){n.recentSearches.remove(v),n.refresh()})}},u.createElement(Zr,null))))}})),u.createElement(Gr,le({},n,{title:s,collection:n.state.collections[1],renderIcon:function(){return u.createElement("div",{className:"DocSearch-Hit-icon"},u.createElement(po,null))},renderAction:function(d){var v=d.item,_=d.runDeleteTransition;return u.createElement("div",{className:"DocSearch-Hit-action"},u.createElement("button",{className:"DocSearch-Hit-action-button",title:g,type:"submit",onClick:function(p){p.preventDefault(),p.stopPropagation(),_(function(){n.favoriteSearches.remove(v),n.refresh()})}},u.createElement(Zr,null)))}})))}var Ba=["translations"],Va=u.memo(function(e){var t=e.translations,r=t===void 0?{}:t,n=xe(e,Ba);if(n.state.status==="error")return u.createElement(Aa,{translations:r==null?void 0:r.errorScreen});var o=n.state.collections.some(function(i){return i.items.length>0});return n.state.query?o===!1?u.createElement(Ta,le({},n,{translations:r==null?void 0:r.noResultsScreen})):u.createElement(Ha,n):u.createElement(Fa,le({},n,{hasCollections:o,translations:r==null?void 0:r.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"}),Ka=["translations"];function Wa(e){var t=e.translations,r=t===void 0?{}:t,n=xe(e,Ka),o=r.resetButtonTitle,i=o===void 0?"Clear the query":o,a=r.resetButtonAriaLabel,c=a===void 0?"Clear the query":a,f=r.cancelButtonText,m=f===void 0?"Cancel":f,b=r.cancelButtonAriaLabel,l=b===void 0?"Cancel":b,h=r.searchInputLabel,s=h===void 0?"Search":h,S=n.getFormProps({inputElement:n.inputRef.current}).onReset;return u.useEffect(function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()},[n.autoFocus,n.inputRef]),u.useEffect(function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()},[n.isFromSelection,n.inputRef]),u.createElement(u.Fragment,null,u.createElement("form",{className:"DocSearch-Form",onSubmit:function(g){g.preventDefault()},onReset:S},u.createElement("label",le({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),u.createElement(ei,null),u.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},s)),u.createElement("div",{className:"DocSearch-LoadingIndicator"},u.createElement(wa,null)),u.createElement("input",le({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:64}))),u.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":c,hidden:!n.state.query},u.createElement(Zr,null))),u.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":l,onClick:n.onClose},m))}var za=["_highlightResult","_snippetResult"];function _o(e){var t=e.key,r=e.limit,n=r===void 0?5:r,o=function(a){return function(){var c="__TEST_KEY__";try{return localStorage.setItem(c,""),localStorage.removeItem(c),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(c){return window.localStorage.setItem(a,JSON.stringify(c))},getItem:function(){var c=window.localStorage.getItem(a);return c?JSON.parse(c):[]}}}(t),i=o.getItem().slice(0,n);return{add:function(a){var c=a;c._highlightResult,c._snippetResult;var f=xe(c,za),m=i.findIndex(function(b){return b.objectID===f.objectID});m>-1&&i.splice(m,1),i.unshift(f),i=i.slice(0,n),o.setItem(i)},remove:function(a){i=i.filter(function(c){return c.objectID!==a.objectID}),o.setItem(i)},getAll:function(){return i}}}function Ja(e){var t,r="algolia-client-js-".concat(e.key);function n(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(n().getItem(r)||"{}")}function i(a){n().setItem(r,JSON.stringify(a))}return{get:function(a,c){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var m,b,l;return m=e.timeToLive?1e3*e.timeToLive:null,b=o(),i(l=Object.fromEntries(Object.entries(b).filter(function(h){return he(h,2)[1].timestamp!==void 0}))),m&&i(Object.fromEntries(Object.entries(l).filter(function(h){var s=he(h,2)[1],S=new Date().getTime();return!(s.timestamp+m2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return o().then(function(a){return Promise.all([a,i.miss(a)])}).then(function(a){return he(a,1)[0]})},set:function(n,o){return Promise.resolve(o)},delete:function(n){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(n,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(n,o,i).catch(function(){return wt({caches:t}).get(n,o,i)})},set:function(n,o){return r.set(n,o).catch(function(){return wt({caches:t}).set(n,o)})},delete:function(n){return r.delete(n).catch(function(){return wt({caches:t}).delete(n)})},clear:function(){return r.clear().catch(function(){return wt({caches:t}).clear()})}}}function Mr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(r);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);var a=n();return a.then(function(c){return o.miss(c)}).then(function(){return a})},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Qa(e){var t=e.algoliaAgents,r=e.client,n=e.version,o=function(i){var a={value:"Algolia for JavaScript (".concat(i,")"),add:function(c){var f="; ".concat(c.segment).concat(c.version!==void 0?" (".concat(c.version,")"):"");return a.value.indexOf(f)===-1&&(a.value="".concat(a.value).concat(f)),a}};return a}(n).add({segment:r,version:n});return t.forEach(function(i){return o.add(i)}),o}var go=12e4;function bo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"up",r=Date.now();return B(B({},e),{},{status:t,lastUpdate:r,isUp:function(){return t==="up"||Date.now()-r>go},isTimedOut:function(){return t==="timed out"&&Date.now()-r<=go}})}var si=function(){function e(t,r){var n;return mt(this,e),vt(n=ft(this,e,[t]),"name","AlgoliaError"),r&&(n.name=r),n}return ht(e,Qr(Error)),pt(e)}(),fi=function(){function e(t,r,n){var o;return mt(this,e),vt(o=ft(this,e,[t,n]),"stackTrace",void 0),o.stackTrace=r,o}return ht(e,si),pt(e)}(),$a=function(){function e(t){return mt(this,e),ft(this,e,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return ht(e,fi),pt(e)}(),Yr=function(){function e(t,r,n){var o,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ApiError";return mt(this,e),vt(o=ft(this,e,[t,n,i]),"status",void 0),o.status=r,o}return ht(e,fi),pt(e)}(),Za=function(){function e(t,r){var n;return mt(this,e),vt(n=ft(this,e,[t,"DeserializationError"]),"response",void 0),n.response=r,n}return ht(e,si),pt(e)}(),Ga=function(){function e(t,r,n,o){var i;return mt(this,e),vt(i=ft(this,e,[t,r,o,"DetailedApiError"]),"error",void 0),i.error=n,i}return ht(e,Yr),pt(e)}();function Ya(e,t,r){var n,o=(n=r,Object.keys(n).filter(function(a){return n[a]!==void 0}).sort().map(function(a){return"".concat(a,"=").concat(encodeURIComponent(Object.prototype.toString.call(n[a])==="[object Array]"?n[a].join(","):n[a]).replace(/\+/g,"%20"))}).join("&")),i="".concat(e.protocol,"://").concat(e.url).concat(e.port?":".concat(e.port):"","/").concat(t.charAt(0)==="/"?t.substring(1):t);return o.length&&(i+="?".concat(o)),i}function Xa(e,t){if(e.method!=="GET"&&(e.data!==void 0||t.data!==void 0)){var r=Array.isArray(e.data)?e.data:B(B({},e.data),t.data);return JSON.stringify(r)}}function eu(e,t,r){var n=B(B(B({Accept:"application/json"},e),t),r),o={};return Object.keys(n).forEach(function(i){var a=n[i];o[i.toLowerCase()]=a}),o}function tu(e){try{return JSON.parse(e.content)}catch(t){throw new Za(t.message,e)}}function ru(e,t){var r=e.content,n=e.status;try{var o=JSON.parse(r);return"error"in o?new Ga(o.message,n,o.error,t):new Yr(o.message,n,t)}catch{}return new Yr(r,n,t)}function nu(e){return e.map(function(t){return mi(t)})}function mi(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return B(B({},e),{},{request:B(B({},e.request),{},{headers:B(B({},e.request.headers),t)})})}var ou=["appId","apiKey","authMode","algoliaAgents"],iu=["params"],So="5.19.0";function au(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(t){for(var r=t,n=t.length-1;n>0;n--){var o=Math.floor(Math.random()*(n+1)),i=t[n];r[n]=t[o],r[o]=i}return r}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Xr="3.9.0",uu=["footer","searchBox"];function cu(e){var t=e.appId,r=e.apiKey,n=e.indexName,o=e.placeholder,i=o===void 0?"Search docs":o,a=e.searchParameters,c=e.maxResultsPerGroup,f=e.onClose,m=f===void 0?qa:f,b=e.transformItems,l=b===void 0?yo:b,h=e.hitComponent,s=h===void 0?Oa:h,S=e.resultsFooterComponent,g=S===void 0?function(){return null}:S,d=e.navigator,v=e.initialScrollY,_=v===void 0?0:v,p=e.transformSearchClient,y=p===void 0?yo:p,P=e.disableUserPersonalization,k=P!==void 0&&P,N=e.initialQuery,x=N===void 0?"":N,j=e.translations,C=j===void 0?{}:j,I=e.getMissingResultsUrl,L=e.insights,Q=L!==void 0&&L,q=C.footer,G=C.searchBox,O=xe(C,uu),w=he(u.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),E=w[0],R=w[1],D=u.useRef(null),M=u.useRef(null),W=u.useRef(null),K=u.useRef(null),z=u.useRef(null),Y=u.useRef(10),se=u.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,te=u.useRef(x||se).current,dt=function(H,J,ae){return u.useMemo(function(){var me=function(de,_e){if(!de||typeof de!="string")throw new Error("`appId` is missing.");if(!_e||typeof _e!="string")throw new Error("`apiKey` is missing.");return function(U){var re=U.appId,X=U.apiKey,Pe=U.authMode,Me=U.algoliaAgents,Ie=xe(U,ou),Se=function(T,$){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"WithinHeaders",ye={"x-algolia-api-key":$,"x-algolia-application-id":T};return{headers:function(){return ne==="WithinHeaders"?ye:{}},queryParameters:function(){return ne==="WithinQueryParameters"?ye:{}}}}(re,X,Pe),pe=function(T){var $=T.hosts,ne=T.hostsCache,ye=T.baseHeaders,ke=T.logger,He=T.baseQueryParameters,Ke=T.algoliaAgent,sn=T.timeouts,fn=T.requester,yt=T.requestsCache,gr=T.responsesCache;function vi(ge){return mn.apply(this,arguments)}function mn(){return(mn=xr(Ze().mark(function ge(ue){var oe,Ae,ce,ve,Ue;return Ze().wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,Promise.all(ue.map(function(fe){return ne.get(fe,function(){return Promise.resolve(bo(fe))})}));case 2:return oe=Ne.sent,Ae=oe.filter(function(fe){return fe.isUp()}),ce=oe.filter(function(fe){return fe.isTimedOut()}),ve=[].concat(jt(Ae),jt(ce)),Ue=ve.length>0?ve:ue,Ne.abrupt("return",{hosts:Ue,getTimeout:function(fe,et){return(ce.length===0&&fe===0?1:ce.length+3+fe)*et}});case 8:case"end":return Ne.stop()}},ge)}))).apply(this,arguments)}function pn(ge,ue){return br.apply(this,arguments)}function br(){return br=xr(Ze().mark(function ge(ue,oe){var Ae,ce,ve,Ue,Ne,fe,et,Sr,We,Zt,Or,vn,wr,Er=arguments;return Ze().wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:if(Ae=!(Er.length>2&&Er[2]!==void 0)||Er[2],ce=[],ve=Xa(ue,oe),Ue=eu(ye,ue.headers,oe.headers),Ne=ue.method==="GET"?B(B({},ue.data),oe.data):{},fe=B(B(B({},He),ue.queryParameters),Ne),Ke.value&&(fe["x-algolia-agent"]=Ke.value),oe&&oe.queryParameters)for(et=0,Sr=Object.keys(oe.queryParameters);et1&&arguments[1]!==void 0?arguments[1]:{},oe=ge.useReadTransporter||ge.method==="GET";if(!oe)return pn(ge,ue,oe);var Ae=function(){return pn(ge,ue)};if((ue.cacheable||ge.cacheable)!==!0)return Ae();var ce={request:ge,requestOptions:ue,transporter:{queryParameters:He,headers:ye}};return gr.get(ce,function(){return yt.get(ce,function(){return yt.set(ce,Ae()).then(function(ve){return Promise.all([yt.delete(ce),ve])},function(ve){return Promise.all([yt.delete(ce),Promise.reject(ve)])}).then(function(ve){var Ue=he(ve,2);return Ue[0],Ue[1]})})},{miss:function(ve){return gr.set(ce,ve)}})},requestsCache:yt,responsesCache:gr}}(B(B({hosts:au(re)},Ie),{},{algoliaAgent:Qa({algoliaAgents:Me,client:"Lite",version:So}),baseHeaders:B(B({"content-type":"text/plain"},Se.headers()),Ie.baseHeaders),baseQueryParameters:B(B({},Se.queryParameters()),Ie.baseQueryParameters)}));return{transporter:pe,appId:re,apiKey:X,clearCache:function(){return Promise.all([pe.requestsCache.clear(),pe.responsesCache.clear()]).then(function(){})},get _ua(){return pe.algoliaAgent.value},addAlgoliaAgent:function(T,$){pe.algoliaAgent.add({segment:T,version:$})},setClientApiKey:function(T){var $=T.apiKey;Pe&&Pe!=="WithinHeaders"?pe.baseQueryParameters["x-algolia-api-key"]=$:pe.baseHeaders["x-algolia-api-key"]=$},searchForHits:function(T,$){return this.search(T,$)},searchForFacets:function(T,$){return this.search(T,$)},customPost:function(T,$){var ne=T.path,ye=T.parameters,ke=T.body;if(!ne)throw new Error("Parameter `path` is required when calling `customPost`.");var He={method:"POST",path:"/{path}".replace("{path}",ne),queryParameters:ye||{},headers:{},data:ke||{}};return pe.request(He,$)},getRecommendations:function(T,$){if(T&&Array.isArray(T)&&(T={requests:T}),!T)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!T.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var ne={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:T,useReadTransporter:!0,cacheable:!0};return pe.request(ne,$)},search:function(T,$){if(T&&Array.isArray(T)){var ne={requests:T.map(function(ke){var He=ke.params,Ke=xe(ke,iu);return Ke.type==="facet"?B(B(B({},Ke),He),{},{type:"facet"}):B(B(B({},Ke),He),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};T=ne}if(!T)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!T.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var ye={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:T,useReadTransporter:!0,cacheable:!0};return pe.request(ye,$)}}}(B({appId:de,apiKey:_e,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(U,re){return Promise.resolve()},info:function(U,re){return Promise.resolve()},error:function(U,re){return Promise.resolve()}},requester:{send:function(U){return new Promise(function(re){var X=new XMLHttpRequest;X.open(U.method,U.url,!0),Object.keys(U.headers).forEach(function(Se){return X.setRequestHeader(Se,U.headers[Se])});var Pe,Me=function(Se,pe){return setTimeout(function(){X.abort(),re({status:0,content:pe,isTimedOut:!0})},Se)},Ie=Me(U.connectTimeout,"Connection timeout");X.onreadystatechange=function(){X.readyState>X.OPENED&&Pe===void 0&&(clearTimeout(Ie),Pe=Me(U.responseTimeout,"Socket timeout"))},X.onerror=function(){X.status===0&&(clearTimeout(Ie),clearTimeout(Pe),re({content:X.responseText||"Network request failed",status:X.status,isTimedOut:!1}))},X.onload=function(){clearTimeout(Ie),clearTimeout(Pe),re({content:X.responseText,status:X.status,isTimedOut:!1})},X.send(U.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:Mr(),requestsCache:Mr({serializable:!1}),hostsCache:wt({caches:[Ja({key:"".concat(So,"-").concat(de)}),Mr()]})},void 0))}(H,J);return me.addAlgoliaAgent("docsearch",Xr),/docsearch.js \(.*\)/.test(me.transporter.algoliaAgent.value)===!1&&me.addAlgoliaAgent("docsearch-react",Xr),ae(me)},[H,J,ae])}(t,r,y),Ee=u.useRef(_o({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(n),limit:10})).current,Ve=u.useRef(_o({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(n),limit:Ee.getAll().length===0?7:4})).current,je=u.useCallback(function(H){if(!k){var J=H.type==="content"?H.__docsearch_parent:H;J&&Ee.getAll().findIndex(function(ae){return ae.objectID===J.objectID})===-1&&Ve.add(J)}},[Ee,Ve,k]),Xe=u.useCallback(function(H){if(E.context.algoliaInsightsPlugin&&H.__autocomplete_id){var J=H,ae={eventName:"Item Selected",index:J.__autocomplete_indexName,items:[J],positions:[H.__autocomplete_id],queryID:J.__autocomplete_queryID};E.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(ae)}},[E.context.algoliaInsightsPlugin]),qe=u.useMemo(function(){return ga({id:"docsearch",defaultActiveItemId:0,placeholder:i,openOnFocus:!0,initialState:{query:te,context:{searchSuggestions:[]}},insights:Q,navigator:d,onStateChange:function(H){R(H.state)},getSources:function(H){var J=H.query,ae=H.state,me=H.setContext,de=H.setStatus;if(!J)return k?[]:[{sourceId:"recentSearches",onSelect:function(U){var re=U.item,X=U.event;je(re),fr(X)||m()},getItemUrl:function(U){return U.item.url},getItems:function(){return Ve.getAll()}},{sourceId:"favoriteSearches",onSelect:function(U){var re=U.item,X=U.event;je(re),fr(X)||m()},getItemUrl:function(U){return U.item.url},getItems:function(){return Ee.getAll()}}];var _e=!!Q;return dt.search({requests:[B({query:J,indexName:n,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Y.current),"hierarchy.lvl2:".concat(Y.current),"hierarchy.lvl3:".concat(Y.current),"hierarchy.lvl4:".concat(Y.current),"hierarchy.lvl5:".concat(Y.current),"hierarchy.lvl6:".concat(Y.current),"content:".concat(Y.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:_e},a)]}).catch(function(U){throw U.name==="RetryError"&&de("error"),U}).then(function(U){var re=U.results[0],X=re.hits,Pe=re.nbHits,Me=ho(X,function(Se){return li(Se)},c);ae.context.searchSuggestions.length0&&(ln(),z.current&&z.current.focus())},[te,ln]),u.useEffect(function(){function H(){if(M.current){var J=.01*window.innerHeight;M.current.style.setProperty("--docsearch-vh","".concat(J,"px"))}}return H(),window.addEventListener("resize",H),function(){window.removeEventListener("resize",H)}},[]),u.createElement("div",le({ref:D},pi({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",E.status==="stalled"&&"DocSearch-Container--Stalled",E.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(H){H.target===H.currentTarget&&m()}}),u.createElement("div",{className:"DocSearch-Modal",ref:M},u.createElement("header",{className:"DocSearch-SearchBar",ref:W},u.createElement(Wa,le({},qe,{state:E,autoFocus:te.length===0,inputRef:z,isFromSelection:!!te&&te===se,translations:G,onClose:m}))),u.createElement("div",{className:"DocSearch-Dropdown",ref:K},u.createElement(Va,le({},qe,{indexName:n,state:E,hitComponent:s,resultsFooterComponent:g,disableUserPersonalization:k,recentSearches:Ve,favoriteSearches:Ee,inputRef:z,translations:O,getMissingResultsUrl:I,onItemClick:function(H,J){Xe(H),je(H),fr(J)||m()}}))),u.createElement("footer",{className:"DocSearch-Footer"},u.createElement(Sa,{translations:q}))))}function lu(e){var t,r,n=u.useRef(null),o=he(u.useState(!1),2),i=o[0],a=o[1],c=he(u.useState((e==null?void 0:e.initialQuery)||void 0),2),f=c[0],m=c[1],b=u.useCallback(function(){a(!0)},[a]),l=u.useCallback(function(){a(!1),m(e==null?void 0:e.initialQuery)},[a,e.initialQuery]);return function(h){var s=h.isOpen,S=h.onOpen,g=h.onClose,d=h.onInput,v=h.searchButtonRef;u.useEffect(function(){function _(p){var y;if(p.code==="Escape"&&s||((y=p.key)===null||y===void 0?void 0:y.toLowerCase())==="k"&&(p.metaKey||p.ctrlKey)||!function(P){var k=P.target,N=k.tagName;return k.isContentEditable||N==="INPUT"||N==="SELECT"||N==="TEXTAREA"}(p)&&p.key==="/"&&!s)return p.preventDefault(),void(s?g():document.body.classList.contains("DocSearch--active")||S());v&&v.current===document.activeElement&&d&&/[a-zA-Z0-9]/.test(String.fromCharCode(p.keyCode))&&d(p)}return window.addEventListener("keydown",_),function(){window.removeEventListener("keydown",_)}},[s,S,g,d,v])}({isOpen:i,onOpen:b,onClose:l,onInput:u.useCallback(function(h){a(!0),m(h.key)},[a,m]),searchButtonRef:n}),u.createElement(u.Fragment,null,u.createElement(Hi,{ref:n,translations:e==null||(t=e.translations)===null||t===void 0?void 0:t.button,onClick:b}),i&&Zo(u.createElement(cu,le({},e,{initialScrollY:window.scrollY,initialQuery:f,translations:e==null||(r=e.translations)===null||r===void 0?void 0:r.modal,onClose:l})),document.body))}function su(e){Yo(u.createElement(lu,Hr({},e,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js",Xr),e.transformSearchClient?e.transformSearchClient(t):t}})),function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return typeof t=="string"?r.document.querySelector(t):t}(e.container,e.environment))}export{su as default}; diff --git a/assets/index.html-5tZDq72T.js b/assets/index.html-5tZDq72T.js new file mode 100644 index 00000000..1b58c9c9 --- /dev/null +++ b/assets/index.html-5tZDq72T.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as r,e as n,r as o,o as a}from"./app-DVsngoLV.js";const c={};function s(p,l){const e=o("Catalog");return a(),r("div",null,[n(e)])}const f=t(c,[["render",s]]),g=JSON.parse('{"path":"/reference/","title":"Reference","lang":"en-US","frontmatter":{"title":"Reference","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Reference\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Reference"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{f as comp,g as data}; diff --git a/assets/index.html-BW43vxYC.js b/assets/index.html-BW43vxYC.js new file mode 100644 index 00000000..34970d86 --- /dev/null +++ b/assets/index.html-BW43vxYC.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,e as a,r as n,o as r}from"./app-DVsngoLV.js";const s={};function p(c,i){const e=n("Catalog");return r(),o("div",null,[a(e)])}const d=t(s,[["render",p]]),g=JSON.parse('{"path":"/zh/guide/","title":"Guide","lang":"en-US","frontmatter":{"title":"Guide","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Guide\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Guide"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{d as comp,g as data}; diff --git a/assets/index.html-Bf3E0fXo.js b/assets/index.html-Bf3E0fXo.js new file mode 100644 index 00000000..b278e29d --- /dev/null +++ b/assets/index.html-Bf3E0fXo.js @@ -0,0 +1 @@ +import{_ as e}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as t,o}from"./app-DVsngoLV.js";const i={};function a(r,n){return o(),t("div")}const m=e(i,[["render",a]]),c=JSON.parse('{"path":"/","title":"Home","lang":"en-US","frontmatter":{"home":true,"title":"Home","icon":"fa6-solid:house","heroImage":"/images/hero.png","actions":[{"text":"Get Started","icon":"fa6-solid:lightbulb","link":"/guide/getting-started.html","type":"primary"},{"text":"Introduction","icon":"fa6-solid:circle-info","link":"/guide/introduction.html","type":"secondary"},{"text":"Marketplace","icon":"fa6-solid:cart-shopping","link":"https://marketplace.vuejs.press/","type":"secondary"}],"features":[{"title":"Simplicity First","icon":"fa6-solid:star","details":"Minimal setup with markdown-centered project structure helps you focus on writing."},{"title":"Vue-Powered","icon":"fa6-brands:vuejs","details":"Enjoy the dev experience of Vue, use Vue components in markdown, and develop custom themes with Vue."},{"title":"Performant","icon":"fa6-solid:bolt","details":"VuePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded."},{"title":"Themes","icon":"fa6-solid:palette","details":"Providing a default theme out of the box. You can also choose a community theme or create your own one."},{"title":"Plugins","icon":"fa6-solid:plug","details":"Flexible plugin API, allowing plugins to provide lots of plug-and-play features for your site."},{"title":"Bundlers","icon":"fa6-solid:boxes-packing","details":"Recommended bundler is Vite, while Webpack is also supported. Choose the one you like!"}],"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Home\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Home"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":3,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.63,"words":190},"filePathRelative":"README.md"}');export{m as comp,c as data}; diff --git a/assets/index.html-Bsw-jOL4.js b/assets/index.html-Bsw-jOL4.js new file mode 100644 index 00000000..74ba6c18 --- /dev/null +++ b/assets/index.html-Bsw-jOL4.js @@ -0,0 +1 @@ +import{_ as o}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as t,a as r,o as a}from"./app-DVsngoLV.js";const n={};function s(i,e){return a(),t("div",null,e[0]||(e[0]=[r('

    介绍

    Cookbook 的目的是什么?

    • 我们在 指南 中介绍了基本概念,但你可能不知道怎么才能了解得更深入。
    • 我们在 参考 中列出了 API ,但你可能不知道如何充分利用它们。

    于是就有了 Cookbook 。

    每个案例都会针对某个特定的方面,通过提供更详细的示例来向你展示 VuePress 的用法和其他可能性。

    ',5)]))}const m=o(n,[["render",s]]),l=JSON.parse('{"path":"/zh/advanced/cookbook/","title":"介绍","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:circle-info","description":"介绍 Cookbook 的目的是什么? 我们在 指南 中介绍了基本概念,但你可能不知道怎么才能了解得更深入。 我们在 参考 中列出了 API ,但你可能不知道如何充分利用它们。 于是就有了 Cookbook 。 每个案例都会针对某个特定的方面,通过提供更详细的示例来向你展示 VuePress 的用法和其他可能性。","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"介绍\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/advanced/cookbook/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"介绍"}],["meta",{"property":"og:description","content":"介绍 Cookbook 的目的是什么? 我们在 指南 中介绍了基本概念,但你可能不知道怎么才能了解得更深入。 我们在 参考 中列出了 API ,但你可能不知道如何充分利用它们。 于是就有了 Cookbook 。 每个案例都会针对某个特定的方面,通过提供更详细的示例来向你展示 VuePress 的用法和其他可能性。"}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/advanced/cookbook/"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":1,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.38,"words":115},"filePathRelative":"zh/advanced/cookbook/README.md","autoDesc":true}');export{m as comp,l as data}; diff --git a/assets/index.html-C4bSVrZS.js b/assets/index.html-C4bSVrZS.js new file mode 100644 index 00000000..dfc14174 --- /dev/null +++ b/assets/index.html-C4bSVrZS.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as n,e as o,r,o as a}from"./app-DVsngoLV.js";const c={};function s(p,l){const e=r("Catalog");return a(),n("div",null,[o(e)])}const f=t(c,[["render",s]]),_=JSON.parse('{"path":"/zh/reference/","title":"Reference","lang":"en-US","frontmatter":{"title":"Reference","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Reference\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Reference"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{f as comp,_ as data}; diff --git a/assets/index.html-DCikbAAD.js b/assets/index.html-DCikbAAD.js new file mode 100644 index 00000000..49cf28a3 --- /dev/null +++ b/assets/index.html-DCikbAAD.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,a as n,o as r}from"./app-DVsngoLV.js";const a={};function i(s,e){return r(),o("div",null,e[0]||(e[0]=[n('

    Introduction

    What's the Cookbook for?

    • We are introducing essential concepts in the Guide, but you may not know how to dig deeper.
    • We are listing APIs in the Reference, but you may not know how to take full advantage of them.

    So here comes the Cookbook.

    Each recipe will focus on one specific aspect, providing more detailed examples to show you the usages and possibilities of VuePress.

    ',5)]))}const d=t(a,[["render",i]]),l=JSON.parse(`{"path":"/advanced/cookbook/","title":"Introduction","lang":"en-US","frontmatter":{"icon":"fa6-solid:circle-info","description":"Introduction What's the Cookbook for? We are introducing essential concepts in the Guide, but you may not know how to dig deeper. We are listing APIs in the Reference, but you m...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Introduction\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/advanced/cookbook/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Introduction"}],["meta",{"property":"og:description","content":"Introduction What's the Cookbook for? We are introducing essential concepts in the Guide, but you may not know how to dig deeper. We are listing APIs in the Reference, but you m..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/advanced/cookbook/"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":1,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.24,"words":73},"filePathRelative":"advanced/cookbook/README.md","autoDesc":true}`);export{d as comp,l as data}; diff --git a/assets/index.html-Dcah2Vrx.js b/assets/index.html-Dcah2Vrx.js new file mode 100644 index 00000000..58ecd49a --- /dev/null +++ b/assets/index.html-Dcah2Vrx.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as a,e as n,r as o,o as r}from"./app-DVsngoLV.js";const c={};function s(p,l){const e=o("Catalog");return r(),a("div",null,[n(e)])}const m=t(c,[["render",s]]),_=JSON.parse('{"path":"/zh/advanced/","title":"Advanced","lang":"en-US","frontmatter":{"title":"Advanced","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Advanced\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/advanced/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Advanced"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{m as comp,_ as data}; diff --git a/assets/index.html-Dhfuxt_n.js b/assets/index.html-Dhfuxt_n.js new file mode 100644 index 00000000..1b83e94f --- /dev/null +++ b/assets/index.html-Dhfuxt_n.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as r,e as n,r as o,o as a}from"./app-DVsngoLV.js";const l={};function s(c,p){const e=o("Catalog");return a(),r("div",null,[n(e)])}const d=t(l,[["render",s]]),f=JSON.parse('{"path":"/reference/bundler/","title":"Bundler","lang":"en-US","frontmatter":{"title":"Bundler","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Bundler\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/reference/bundler/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Bundler"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/reference/bundler/"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{d as comp,f as data}; diff --git a/assets/index.html-Do19UIZ3.js b/assets/index.html-Do19UIZ3.js new file mode 100644 index 00000000..5270f828 --- /dev/null +++ b/assets/index.html-Do19UIZ3.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as a,e as n,r as o,o as r}from"./app-DVsngoLV.js";const c={};function s(p,l){const e=o("Catalog");return r(),a("div",null,[n(e)])}const m=t(c,[["render",s]]),f=JSON.parse('{"path":"/advanced/","title":"Advanced","lang":"en-US","frontmatter":{"title":"Advanced","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Advanced\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/advanced/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Advanced"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/advanced/"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{m as comp,f as data}; diff --git a/assets/index.html-DxEsXlbe.js b/assets/index.html-DxEsXlbe.js new file mode 100644 index 00000000..07354910 --- /dev/null +++ b/assets/index.html-DxEsXlbe.js @@ -0,0 +1 @@ +import{_ as e}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as t,o}from"./app-DVsngoLV.js";const i={};function a(r,n){return o(),t("div")}const m=e(i,[["render",a]]),c=JSON.parse('{"path":"/zh/","title":"首页","lang":"zh-CN","frontmatter":{"home":true,"icon":"fa6-solid:house","title":"首页","heroImage":"/images/hero.png","actions":[{"text":"快速上手","icon":"fa6-solid:lightbulb","link":"/zh/guide/getting-started.html","type":"primary"},{"text":"项目简介","icon":"fa6-solid:circle-info","link":"/zh/guide/introduction.html","type":"secondary"},{"text":"市场","icon":"fa6-solid:cart-shopping","link":"https://marketplace.vuejs.press/zh/","type":"secondary"}],"features":[{"title":"简洁至上","icon":"fa6-solid:star","details":"以 Markdown 为中心的项目结构,以最少的配置帮助你专注于写作。"},{"title":"Vue 驱动","icon":"fa6-brands:vuejs","details":"享受 Vue 的开发体验,可以在 Markdown 中使用 Vue 组件,又可以使用 Vue 来开发自定义主题。"},{"title":"高性能","icon":"fa6-solid:bolt","details":"VuePress 会为每个页面预渲染生成静态的 HTML,同时,每个页面被加载的时候,将作为 SPA 运行。"},{"title":"主题","icon":"fa6-solid:palette","details":"提供了一个开箱即用的默认主题。你也可以挑选一个社区主题,或者创建一个你自己的主题。"},{"title":"插件","icon":"fa6-solid:plug","details":"灵活的插件API,使得插件可以为你的站点提供许多即插即用的功能。"},{"title":"打包工具","icon":"fa6-solid:boxes-packing","details":"推荐的打包工具是 Vite ,但也同样支持使用 Webpack 。选一个你喜欢的来使用吧!"}],"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"首页\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"首页"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":3,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":2},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.98,"words":294},"filePathRelative":"zh/README.md"}');export{m as comp,c as data}; diff --git a/assets/index.html-_e7kFd1H.js b/assets/index.html-_e7kFd1H.js new file mode 100644 index 00000000..e8f3e284 --- /dev/null +++ b/assets/index.html-_e7kFd1H.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,e as a,r as n,o as r}from"./app-DVsngoLV.js";const s={};function p(l,c){const e=n("Catalog");return r(),o("div",null,[a(e)])}const d=t(s,[["render",p]]),g=JSON.parse('{"path":"/guide/","title":"Guide","lang":"en-US","frontmatter":{"title":"Guide","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Guide\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Guide"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{d as comp,g as data}; diff --git a/assets/index.html-itz1aZ3n.js b/assets/index.html-itz1aZ3n.js new file mode 100644 index 00000000..eb2c9945 --- /dev/null +++ b/assets/index.html-itz1aZ3n.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as n,e as r,r as o,o as a}from"./app-DVsngoLV.js";const s={};function l(c,p){const e=o("Catalog");return a(),n("div",null,[r(e)])}const d=t(s,[["render",l]]),f=JSON.parse('{"path":"/zh/reference/bundler/","title":"Bundler","lang":"en-US","frontmatter":{"title":"Bundler","article":false,"feed":false,"sitemap":false,"head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"WebPage\\",\\"name\\":\\"Bundler\\"}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/reference/bundler/"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Bundler"}],["meta",{"property":"og:type","content":"website"}],["meta",{"property":"og:locale","content":"en-US"}]]},"git":{},"readingTime":{"minutes":0,"words":1},"filePathRelative":null}');export{d as comp,f as data}; diff --git a/assets/introduction.html-CanvhM2y.js b/assets/introduction.html-CanvhM2y.js new file mode 100644 index 00000000..3ab14bb2 --- /dev/null +++ b/assets/introduction.html-CanvhM2y.js @@ -0,0 +1 @@ +import{_ as r}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as t,a as o,o as a}from"./app-DVsngoLV.js";const s={};function n(i,e){return a(),t("div",null,e[0]||(e[0]=[o('

    介绍

    VuePress 是一个以 Markdown 为中心的静态网站生成器。你可以使用 Markdown 来书写内容(如文档、博客等),然后 VuePress 会帮助你生成一个静态网站来展示它们。

    VuePress 诞生的初衷是为了支持 Vue.js 及其子项目的文档需求,但是现在它已经在帮助大量用户构建他们的文档、博客和其他静态网站。

    它是如何工作的?

    一个 VuePress 站点本质上是一个由 VueVue Router 驱动的单页面应用 (SPA)。

    路由会根据你的 Markdown 文件的相对路径来自动生成。每个 Markdown 文件都通过 markdown-it 编译为 HTML ,然后将其作为 Vue 组件的模板。因此,你可以在 Markdown 文件中直接使用 Vue 语法,便于你嵌入一些动态内容。

    在开发过程中,我们启动一个常规的开发服务器 (dev-server) ,并将 VuePress 站点作为一个常规的 SPA。如果你以前使用过 Vue 的话,你在使用时会感受到非常熟悉的开发体验。

    在构建过程中,我们会为 VuePress 站点创建一个服务端渲染 (SSR) 的版本,然后通过虚拟访问每一条路径来渲染对应的 HTML 。这种做法的灵感来源于 Nuxtnuxt generate 命令,以及其他的一些项目,比如 Gatsby

    为什么不是 ...?

    Nuxt

    Nuxt 是一套出色的 Vue SSR 框架, VuePress 能做的事情,Nuxt 实际上也同样能够胜任。但 Nuxt 是为构建应用程序而生的,而 VuePress 则更为轻量化并且专注在以内容为中心的静态网站上。

    VitePress

    VitePress 是 VuePress 的孪生兄弟,它同样由 Vue.js 团队创建和维护。 VitePress 甚至比 VuePress 要更轻更快,但它在灵活性和可配置性上作出了一些让步,比如它不支持插件系统。当然,如果你没有进阶的定制化需求, VitePress 已经足够支持你将你的内容部署到线上。

    这个比喻可能不是很恰当,但是你可以把 VuePress 和 VitePress 的关系看作 Laravel 和 Lumen 。

    Docsify / Docute

    这两个项目同样都是基于 Vue,然而它们都是完全的运行时驱动,因此对 SEO 不够友好。如果你并不关注 SEO,同时也不想安装大量依赖,它们仍然是非常好的选择!

    Hexo

    Hexo 一直驱动着 Vue 2.x 的文档。Hexo 最大的问题在于他的主题系统太过于静态以及过度地依赖纯字符串,而我们十分希望能够好好地利用 Vue 来处理我们的布局和交互。同时,Hexo 在配置 Markdown 渲染方面的灵活性也不是最佳的。

    GitBook

    过去我们的子项目文档一直都在使用 GitBook 。 GitBook 最大的问题在于当文件很多时,每次编辑后的重新加载时间长得令人无法忍受。它的默认主题导航结构也比较有限制性,并且,主题系统也不是 Vue 驱动的。GitBook 背后的团队如今也更专注于将其打造为一个商业产品而不是开源工具。

    ',20)]))}const h=r(s,[["render",n]]),c=JSON.parse('{"path":"/zh/guide/introduction.html","title":"介绍","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:circle-info","description":"介绍 VuePress 是一个以 Markdown 为中心的静态网站生成器。你可以使用 Markdown 来书写内容(如文档、博客等),然后 VuePress 会帮助你生成一个静态网站来展示它们。 VuePress 诞生的初衷是为了支持 Vue.js 及其子项目的文档需求,但是现在它已经在帮助大量用户构建他们的文档、博客和其他静态网站。 它是如何工作的...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"介绍\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/guide/introduction.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"介绍"}],["meta",{"property":"og:description","content":"介绍 VuePress 是一个以 Markdown 为中心的静态网站生成器。你可以使用 Markdown 来书写内容(如文档、博客等),然后 VuePress 会帮助你生成一个静态网站来展示它们。 VuePress 诞生的初衷是为了支持 Vue.js 及其子项目的文档需求,但是现在它已经在帮助大量用户构建他们的文档、博客和其他静态网站。 它是如何工作的..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/guide/introduction.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Xinyu Liu","username":"","email":"meteor.lxy@foxmail.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":2.78,"words":834},"filePathRelative":"zh/guide/introduction.md","autoDesc":true}');export{h as comp,c as data}; diff --git a/assets/introduction.html-U5lYTjcB.js b/assets/introduction.html-U5lYTjcB.js new file mode 100644 index 00000000..73d1a2de --- /dev/null +++ b/assets/introduction.html-U5lYTjcB.js @@ -0,0 +1 @@ +import{_ as t}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as o,a as r,o as n}from"./app-DVsngoLV.js";const a={};function i(s,e){return n(),o("div",null,e[0]||(e[0]=[r('

    Introduction

    VuePress is a markdown-centered static site generator. You can write your content (documentations, blogs, etc.) in Markdown, then VuePress will help you to generate a static site to host them.

    The purpose of creating VuePress was to support the documentation of Vue.js and its sub-projects, but now it has been helping a large amount of users to build their documentation, blogs, and other static sites.

    How It Works

    A VuePress site is in fact a single-page application (SPA) powered by Vue and Vue Router.

    Routes are generated according to the relative path of your markdown files. Each Markdown file is compiled into HTML with markdown-it and then processed as the template of a Vue component. This allows you to directly use Vue inside your Markdown files and is great when you need to embed dynamic content.

    During development, we start a normal dev-server, and serve the VuePress site as a normal SPA. If you’ve used Vue before, you will notice the familiar development experience when you are writing and developing with VuePress.

    During build, we create a server-rendered version of the VuePress site and render the corresponding HTML by virtually visiting each route. This approach is inspired by Nuxt's nuxt generate command and other projects like Gatsby.

    Why Not ...?

    Nuxt

    Nuxt is an outstanding Vue SSR framework, and it is capable of doing what VuePress does. But Nuxt is designed for building applications, while VuePress is more lightweight and focused on content-centric static sites.

    VitePress

    VitePress is the little brother of VuePress. It's also created and maintained by our Vue.js team. It's even more lightweight and faster than VuePress. However, as a tradeoff, it's more opinionated and less configurable. For example, it does not support plugins. But VitePress is powerful enough to make your content online if you don't need advanced customizations.

    It might not be an appropriate comparison, but you can take VuePress and VitePress as Laravel and Lumen.

    Docsify / Docute

    Both are great projects and also Vue-powered. Except they are both fully runtime-driven and therefore not SEO-friendly. If you don’t care for SEO and don’t want to mess with installing dependencies, these are still great choices.

    Hexo

    Hexo has been serving the Vue 2.x docs well. The biggest problem is that its theming system is static and string-based - we want to take advantage of Vue for both the layout and the interactivity. Also, Hexo’s Markdown rendering isn’t the most flexible to configure.

    GitBook

    We’ve been using GitBook for most of our sub project docs. The primary problem with GitBook is that its development reload performance is intolerable with a large amount of files. The default theme also has a pretty limiting navigation structure, and the theming system is, again, not Vue based. The team behind GitBook is also more focused on turning it into a commercial product rather than an open-source tool.

    ',20)]))}const p=t(a,[["render",i]]),h=JSON.parse('{"path":"/guide/introduction.html","title":"Introduction","lang":"en-US","frontmatter":{"icon":"fa6-solid:circle-info","description":"Introduction VuePress is a markdown-centered static site generator. You can write your content (documentations, blogs, etc.) in Markdown, then VuePress will help you to generate...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Introduction\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/guide/introduction.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Introduction"}],["meta",{"property":"og:description","content":"Introduction VuePress is a markdown-centered static site generator. You can write your content (documentations, blogs, etc.) in Markdown, then VuePress will help you to generate..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/guide/introduction.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":2,"url":"https://github.com/meteorlxy"},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.74,"words":521},"filePathRelative":"guide/introduction.md","autoDesc":true}');export{p as comp,h as data}; diff --git a/assets/making-a-theme-extendable.html-CGR9U-du.js b/assets/making-a-theme-extendable.html-CGR9U-du.js new file mode 100644 index 00000000..29f07300 --- /dev/null +++ b/assets/making-a-theme-extendable.html-CGR9U-du.js @@ -0,0 +1,30 @@ +import{_ as e}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as t,b as i,a as l,d as a,e as h,w as k,r as p,o as r}from"./app-DVsngoLV.js";const d={};function g(B,s){const n=p("RouteLink");return r(),t("div",null,[s[3]||(s[3]=i("h1",{id:"开发一个可继承的主题",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#开发一个可继承的主题"},[i("span",null,"开发一个可继承的主题")])],-1)),s[4]||(s[4]=i("p",null,"有时用户可能希望对一个主题进行一些小改动,但是又不想 Fork 并修改整个项目。",-1)),i("p",null,[s[1]||(s[1]=a("借助于 ")),h(n,{to:"/zh/reference/theme-api.html"},{default:k(()=>s[0]||(s[0]=[a("主题 API")])),_:1}),s[2]||(s[2]=a(" ,你可以让用户继承你的主题,允许用户对你的主题进行改动。"))]),s[5]||(s[5]=l(`

    你肯定已经知道了如何 继承默认主题 。接下来我们将介绍如何让你的主题像默认主题一样被用户继承。

    布局插槽

    这种方式需要你来决定主题的哪些部分是可以被扩展的,它更适合用于一些常见的自定义需求,比如页眉或页脚。

    你只需要在你的布局文件中提供 slots ,并告诉用户如何使用它们即可:

    <template>
    +  <div class="my-theme-layout">
    +    <slot name="page-header" />
    +    <Content />
    +    <slot name="page-footer" />
    +  </div>
    +</template>

    组件别名

    这种方式需要你考虑清楚你的主题的哪些组件可以被替换,并且你需要将组件拆分到合适的粒度。

    首先,为你主题的可替换组件设置 alias 别名:

    import type { Theme } from 'vuepress/core'
    +import { getDirname, path } from 'vuepress/utils'
    +
    +const __dirname = getDirname(import.meta.url)
    +
    +export const fooTheme = (options): Theme => ({
    +  name: 'vuepress-theme-foo',
    +  alias: {
    +    // 为可替换的组件设置别名
    +    '@theme/Navbar.vue': path.resolve(__dirname, 'components/Navbar.vue'),
    +    '@theme/Sidebar.vue': path.resolve(__dirname, 'components/Sidebar.vue'),
    +  },
    +})

    然后,在你的主题中通过别名来使用这些组件:

    <script setup lang="ts">
    +import Navbar from '@theme/Navbar.vue'
    +import Sidebar from '@theme/Sidebar.vue'
    +</script>
    +
    +<template>
    +  <div class="my-theme-layout">
    +    <Navbar />
    +    <Sidebar />
    +    <Content />
    +  </div>
    +</template>

    这样,用户在继承或使用你的主题时,就可以通过覆盖 alias 来替换特定的组件了。

    `,12))])}const y=e(d,[["render",g]]),m=JSON.parse('{"path":"/zh/advanced/cookbook/making-a-theme-extendable.html","title":"开发一个可继承的主题","lang":"zh-CN","frontmatter":{"icon":"fa6-solid:clone","description":"开发一个可继承的主题 有时用户可能希望对一个主题进行一些小改动,但是又不想 Fork 并修改整个项目。 借助于 ,你可以让用户继承你的主题,允许用户对你的主题进行改动。 你肯定已经知道了如何 继承默认主题 。接下来我们将介绍如何让你的主题像默认主题一样被用户继承。 布局插槽 这种方式需要你来决定主题的哪些部分是可以被扩展的,它更适合用于一些常见的自定义...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"开发一个可继承的主题\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/zh/advanced/cookbook/making-a-theme-extendable.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"开发一个可继承的主题"}],["meta",{"property":"og:description","content":"开发一个可继承的主题 有时用户可能希望对一个主题进行一些小改动,但是又不想 Fork 并修改整个项目。 借助于 ,你可以让用户继承你的主题,允许用户对你的主题进行改动。 你肯定已经知道了如何 继承默认主题 。接下来我们将介绍如何让你的主题像默认主题一样被用户继承。 布局插槽 这种方式需要你来决定主题的哪些部分是可以被扩展的,它更适合用于一些常见的自定义..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"zh-CN"}],["meta",{"property":"og:locale:alternate","content":"en-US"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"en-us","href":"https://vuejs.press/advanced/cookbook/making-a-theme-extendable.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":3,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":1.37,"words":411},"filePathRelative":"zh/advanced/cookbook/making-a-theme-extendable.md","autoDesc":true}');export{y as comp,m as data}; diff --git a/assets/making-a-theme-extendable.html-DfbNOmbi.js b/assets/making-a-theme-extendable.html-DfbNOmbi.js new file mode 100644 index 00000000..e5a0b610 --- /dev/null +++ b/assets/making-a-theme-extendable.html-DfbNOmbi.js @@ -0,0 +1,30 @@ +import{_ as n}from"./plugin-vue_export-helper-DlAUqK2U.js";import{c as t,b as i,a as l,d as a,e as h,w as k,r as p,o as r}from"./app-DVsngoLV.js";const d={};function o(g,s){const e=p("RouteLink");return r(),t("div",null,[s[3]||(s[3]=i("h1",{id:"making-a-theme-extendable",tabindex:"-1"},[i("a",{class:"header-anchor",href:"#making-a-theme-extendable"},[i("span",null,"Making a Theme Extendable")])],-1)),s[4]||(s[4]=i("p",null,"Sometimes users might want make some minor changes to a theme, but they don't want to fork and modify the entire project.",-1)),i("p",null,[s[1]||(s[1]=a("With the help of ")),h(e,{to:"/reference/theme-api.html"},{default:k(()=>s[0]||(s[0]=[a("Theme API")])),_:1}),s[2]||(s[2]=a(", you can make your theme extendable, allowing users to make their own modifications easily."))]),s[5]||(s[5]=l(`

    You must have known that how to extend default theme. Here we'll introduce how to make your own theme extendable like default theme.

    Layout Slots

    This approach requires you to determine which parts of your theme could be extended. It is more suitable for those common customizations like page footer or header.

    You just need to provide slots in your layouts, and tell users how to make use of them:

    <template>
    +  <div class="my-theme-layout">
    +    <slot name="page-header" />
    +    <Content />
    +    <slot name="page-footer" />
    +  </div>
    +</template>

    Component Aliases

    This approach requires you to consider which components of your theme should be replaceable, and you also need to split components into a suitable granularity.

    First, set alias for replaceable components of you theme:

    import type { Theme } from 'vuepress/core'
    +import { getDirname } from 'vuepress/utils'
    +
    +const __dirname = getDirname(import.meta.url)
    +
    +export const fooTheme = (options): Theme => ({
    +  name: 'vuepress-theme-foo',
    +  alias: {
    +    // set alias for replaceable components
    +    '@theme/Navbar.vue': path.resolve(__dirname, 'components/Navbar.vue'),
    +    '@theme/Sidebar.vue': path.resolve(__dirname, 'components/Sidebar.vue'),
    +  },
    +})

    Next, use those components via aliases in your theme:

    <script setup lang="ts">
    +import Navbar from '@theme/Navbar.vue'
    +import Sidebar from '@theme/Sidebar.vue'
    +</script>
    +
    +<template>
    +  <div class="my-theme-layout">
    +    <Navbar />
    +    <Sidebar />
    +    <Content />
    +  </div>
    +</template>

    Then, users can replace specific components by overriding the alias when extending or using your theme.

    `,12))])}const A=n(d,[["render",o]]),y=JSON.parse(`{"path":"/advanced/cookbook/making-a-theme-extendable.html","title":"Making a Theme Extendable","lang":"en-US","frontmatter":{"icon":"fa6-solid:clone","description":"Making a Theme Extendable Sometimes users might want make some minor changes to a theme, but they don't want to fork and modify the entire project. With the help of , you can ma...","head":[["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"Making a Theme Extendable\\",\\"image\\":[\\"\\"],\\"dateModified\\":\\"2025-04-09T09:33:10.000Z\\",\\"author\\":[]}"],["meta",{"property":"og:url","content":"https://vuejs.press/advanced/cookbook/making-a-theme-extendable.html"}],["meta",{"property":"og:site_name","content":"VuePress"}],["meta",{"property":"og:title","content":"Making a Theme Extendable"}],["meta",{"property":"og:description","content":"Making a Theme Extendable Sometimes users might want make some minor changes to a theme, but they don't want to fork and modify the entire project. With the help of , you can ma..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2025-04-09T09:33:10.000Z"}],["meta",{"property":"article:modified_time","content":"2025-04-09T09:33:10.000Z"}],["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://vuejs.press/zh/advanced/cookbook/making-a-theme-extendable.html"}]]},"git":{"createdTime":1701614677000,"updatedTime":1744191190000,"contributors":[{"name":"meteorlxy","username":"meteorlxy","email":"meteor.lxy@foxmail.com","commits":3,"url":"https://github.com/meteorlxy"},{"name":"Mr.Hope","username":"","email":"mister-hope@outlook.com","commits":1},{"name":"Mister-Hope","username":"Mister-Hope","email":"mister-hope@outlook.com","commits":1,"url":"https://github.com/Mister-Hope"}]},"readingTime":{"minutes":0.92,"words":275},"filePathRelative":"advanced/cookbook/making-a-theme-extendable.md","autoDesc":true}`);export{A as comp,y as data}; diff --git a/assets/markdown-and-vue-sfc.html-CAGydog6.js b/assets/markdown-and-vue-sfc.html-CAGydog6.js new file mode 100644 index 00000000..4792a1c8 --- /dev/null +++ b/assets/markdown-and-vue-sfc.html-CAGydog6.js @@ -0,0 +1,30 @@ +import{g as l,c as h,a as p,b as i,e as k,t as n,w as d,h as r,o}from"./app-DVsngoLV.js";const c="Vue in Markdown",u={__name:"markdown-and-vue-sfc.html",setup(B){const e=(t,s)=>r("div",{class:"red-div"},s.slots.default()),a=l(0);return(t,s)=>(o(),h("div",null,[s[1]||(s[1]=p(`

    Markdown and Vue SFC

    Each Markdown file is first compiled into HTML, and then converted to a Vue SFC. In other words, you can write a Markdown file like a Vue SFC:

    • Blocks <script> and <style> are treated as Vue SFC blocks as they are. In other words, they are hoisted from the <template> block to the top-level of SFC.
    • Everything outside <script> and <style> will be compiled into HTML, and be treated as Vue SFC <template> block.

    Warning

    As Vue SFC can contain only one <script> element, you should avoid using more than one <script> in VuePress markdown.

    Here comes an example:

    Input

    markdown-and-vue-sfc.md
    _Hello, {{ msg }}_
    +
    +<RedDiv>
    +
    +_Current count is: {{ count }}_
    +
    +</RedDiv>
    +
    +<button @click="count++">Click Me!</button>
    +
    +<script setup>
    +import { h, ref } from 'vue'
    +
    +const RedDiv = (_, ctx) =>
    +  h(
    +    'div',
    +    {
    +      class: 'red-div',
    +    },
    +    ctx.slots.default(),
    +  )
    +const msg = 'Vue in Markdown'
    +const count = ref(0)
    +</script>
    +
    +<style>
    +.red-div {
    +  color: red;
    +}
    +</style>

    Output

    `,8)),i("p",null,[i("em",null,"Hello, "+n(c))]),k(e,null,{default:d(()=>[i("p",null,[i("em",null,"Current count is: "+n(a.value),1)])]),_:1}),i("p",null,[i("button",{onClick:s[0]||(s[0]=g=>a.value++)},"Click Me!")])]))}},y=JSON.parse('{"path":"/advanced/cookbook/markdown-and-vue-sfc.html","title":"Markdown and Vue SFC","lang":"en-US","frontmatter":{"icon":"fa6-brands:vuejs","description":"Markdown and Vue SFC Each Markdown file is first compiled into HTML, and then converted to a Vue SFC. In other words, you can write a Markdown file like a Vue SFC: Blocks r("div",{class:"red-div"},s.slots.default()),a=l(0);return(t,s)=>(o(),p("div",null,[s[1]||(s[1]=h(`

    Markdown 与 Vue SFC

    每一个 Markdown 文件,首先都会编译为 HTML ,然后转换为一个 Vue 单文件组件 (SFC) 。换句话说,你可以像写 Vue SFC 一样来写 Markdown 文件:

    • <script><style> 标签会直接被当作 Vue SFC 中的标签。换句话说,它们是从 <template> 标签中提升到了 SFC 的顶层。
    • 所有 <script><style> 标签的以外的内容,会先被编译为 HTML ,然后被当作 Vue SFC 的 <template> 标签。

    注意

    由于 Vue 单文件组件只能包含一个 <script> 标签,你应该避免在 VuePress Markdown 中使用多于一个 <script> 标签。

    我们来看一个例子:

    输入

    markdown-and-vue-sfc.md
    _你好, {{ msg }}_
    +
    +<RedDiv>
    +
    +_当前计数为: {{ count }}_
    +
    +</RedDiv>
    +
    +<button @click="count++">点我!</button>
    +
    +<script setup>
    +import { h, ref } from 'vue'
    +
    +const RedDiv = (_, ctx) =>
    +  h(
    +    'div',
    +    {
    +      class: 'red-div',
    +    },
    +    ctx.slots.default(),
    +  )
    +const msg = 'Markdown 中的 Vue'
    +const count = ref(0)
    +</script>
    +
    +<style>
    +.red-div {
    +  color: red;
    +}
    +</style>

    输出

    `,8)),i("p",null,[i("em",null,"你好, "+n(c))]),k(e,null,{default:d(()=>[i("p",null,[i("em",null,"当前计数为: "+n(a.value),1)])]),_:1}),i("p",null,[i("button",{onClick:s[0]||(s[0]=g=>a.value++)},"点我!")])]))}},A=JSON.parse('{"path":"/zh/advanced/cookbook/markdown-and-vue-sfc.html","title":"Markdown 与 Vue SFC","lang":"zh-CN","frontmatter":{"icon":"fa6-brands:vuejs","description":"Markdown 与 Vue SFC 每一个 Markdown 文件,首先都会编译为 HTML ,然后转换为一个 Vue 单文件组件 (SFC) 。换句话说,你可以像写 Vue SFC 一样来写 Markdown 文件: - - - - diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts deleted file mode 100644 index 5edd8485..00000000 --- a/docs/.vuepress/config.ts +++ /dev/null @@ -1,204 +0,0 @@ -import { createRequire } from 'node:module' -import process from 'node:process' -import { viteBundler } from '@vuepress/bundler-vite' -import { webpackBundler } from '@vuepress/bundler-webpack' -import { docsearchPlugin } from '@vuepress/plugin-docsearch' -import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' -import { registerComponentsPlugin } from '@vuepress/plugin-register-components' -import { shikiPlugin } from '@vuepress/plugin-shiki' -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' -import { getDirname, path } from 'vuepress/utils' -import { - head, - navbarEn, - navbarZh, - sidebarEn, - sidebarZh, -} from './configs/index.js' - -const __dirname = getDirname(import.meta.url) -const require = createRequire(import.meta.url) -const isProd = process.env.NODE_ENV === 'production' - -export default defineUserConfig({ - // set site base to default value - base: '/', - - // extra tags in `` - head, - - // site-level locales config - locales: { - '/': { - lang: 'en-US', - title: 'VuePress', - description: 'Vue-powered Static Site Generator', - }, - '/zh/': { - lang: 'zh-CN', - title: 'VuePress', - description: 'Vue 驱动的静态网站生成器', - }, - }, - - // specify bundler via environment variable - bundler: - process.env.DOCS_BUNDLER === 'webpack' ? webpackBundler() : viteBundler(), - - // configure default theme - theme: defaultTheme({ - hostname: 'https://vuepress.vuejs.org', - logo: '/images/hero.png', - repo: 'vuepress/core', - docsRepo: 'vuepress/docs', - docsDir: 'docs', - - // theme-level locales config - locales: { - /** - * English locale config - * - * As the default locale of @vuepress/theme-default is English, - * we don't need to set all of the locale fields - */ - '/': { - // navbar - navbar: navbarEn, - // sidebar - sidebar: sidebarEn, - // page meta - editLinkText: 'Edit this page on GitHub', - }, - - /** - * Chinese locale config - */ - '/zh/': { - // navbar - navbar: navbarZh, - selectLanguageName: '简体中文', - selectLanguageText: '选择语言', - selectLanguageAriaLabel: '选择语言', - // sidebar - sidebar: sidebarZh, - // page meta - editLinkText: '在 GitHub 上编辑此页', - lastUpdatedText: '上次更新', - contributorsText: '贡献者', - // custom containers - tip: '提示', - warning: '注意', - danger: '警告', - // 404 page - notFound: [ - '这里什么都没有', - '我们怎么到这来了?', - '这是一个 404 页面', - '看起来我们进入了错误的链接', - ], - backToHome: '返回首页', - // a11y - openInNewWindow: '在新窗口打开', - toggleColorMode: '切换颜色模式', - toggleSidebar: '切换侧边栏', - }, - }, - - themePlugins: { - // only enable git plugin in production mode - git: isProd, - // use shiki plugin in production mode instead - prismjs: !isProd, - }, - }), - - // configure markdown - markdown: { - importCode: { - handleImportPath: (importPath) => { - // handle @vuepress packages import path - if (importPath.startsWith('@vuepress/')) { - const packageName = importPath.match(/^(@vuepress\/[^/]*)/)![1] - return importPath - .replace( - packageName, - path.dirname(require.resolve(`${packageName}/package.json`)), - ) - .replace('/src/', '/lib/') - .replace(/hotKey\.ts$/, 'hotKey.d.ts') - } - return importPath - }, - }, - }, - - // use plugins - plugins: [ - docsearchPlugin({ - appId: '34YFD9IUQ2', - apiKey: '9a9058b8655746634e01071411c366b8', - indexName: 'vuepress', - searchParameters: { - facetFilters: ['tags:v2'], - }, - locales: { - '/zh/': { - placeholder: '搜索文档', - translations: { - button: { - buttonText: '搜索文档', - buttonAriaLabel: '搜索文档', - }, - modal: { - searchBox: { - resetButtonTitle: '清除查询条件', - resetButtonAriaLabel: '清除查询条件', - cancelButtonText: '取消', - cancelButtonAriaLabel: '取消', - }, - startScreen: { - recentSearchesTitle: '搜索历史', - noRecentSearchesText: '没有搜索历史', - saveRecentSearchButtonTitle: '保存至搜索历史', - removeRecentSearchButtonTitle: '从搜索历史中移除', - favoriteSearchesTitle: '收藏', - removeFavoriteSearchButtonTitle: '从收藏中移除', - }, - errorScreen: { - titleText: '无法获取结果', - helpText: '你可能需要检查你的网络连接', - }, - footer: { - selectText: '选择', - navigateText: '切换', - closeText: '关闭', - searchByText: '搜索提供者', - }, - noResultsScreen: { - noResultsText: '无法找到相关结果', - suggestedQueryText: '你可以尝试查询', - reportMissingResultsText: '你认为该查询应该有结果?', - reportMissingResultsLinkText: '点击反馈', - }, - }, - }, - }, - }, - }), - googleAnalyticsPlugin({ - // we have multiple deployments, which would use different id - id: process.env.DOCS_GA_ID ?? '', - }), - registerComponentsPlugin({ - componentsDir: path.resolve(__dirname, './components'), - }), - // only enable shiki plugin in production mode - isProd - ? shikiPlugin({ - langs: ['bash', 'diff', 'json', 'md', 'ts', 'vue'], - theme: 'dark-plus', - }) - : [], - ], -}) diff --git a/docs/.vuepress/configs/head.ts b/docs/.vuepress/configs/head.ts deleted file mode 100644 index 0d45b078..00000000 --- a/docs/.vuepress/configs/head.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { HeadConfig } from 'vuepress/core' - -// eslint-disable-next-line @typescript-eslint/naming-convention -export const head: HeadConfig[] = [ - [ - 'link', - { - rel: 'icon', - type: 'image/png', - sizes: '16x16', - href: `/images/icons/favicon-16x16.png`, - }, - ], - [ - 'link', - { - rel: 'icon', - type: 'image/png', - sizes: '32x32', - href: `/images/icons/favicon-32x32.png`, - }, - ], - ['link', { rel: 'manifest', href: '/manifest.webmanifest' }], - ['meta', { name: 'application-name', content: 'VuePress' }], - ['meta', { name: 'apple-mobile-web-app-title', content: 'VuePress' }], - ['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }], - [ - 'link', - { rel: 'apple-touch-icon', href: `/images/icons/apple-touch-icon.png` }, - ], - [ - 'link', - { - rel: 'mask-icon', - href: '/images/icons/safari-pinned-tab.svg', - color: '#3eaf7c', - }, - ], - ['meta', { name: 'msapplication-TileColor', content: '#3eaf7c' }], - ['meta', { name: 'theme-color', content: '#3eaf7c' }], -] diff --git a/docs/.vuepress/configs/index.ts b/docs/.vuepress/configs/index.ts deleted file mode 100644 index b23dc923..00000000 --- a/docs/.vuepress/configs/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './head.js' -export * from './navbar/index.js' -export * from './sidebar/index.js' diff --git a/docs/.vuepress/configs/meta.ts b/docs/.vuepress/configs/meta.ts deleted file mode 100644 index 3b89a465..00000000 --- a/docs/.vuepress/configs/meta.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { createRequire } from 'node:module' -import { fs } from 'vuepress/utils' - -const require = createRequire(import.meta.url) - -export const VERSION = ( - fs.readJsonSync(require.resolve('vuepress/package.json')) as { - version: string - } -).version diff --git a/docs/.vuepress/configs/navbar/en.ts b/docs/.vuepress/configs/navbar/en.ts deleted file mode 100644 index adc22769..00000000 --- a/docs/.vuepress/configs/navbar/en.ts +++ /dev/null @@ -1,117 +0,0 @@ -import type { NavbarOptions } from '@vuepress/theme-default' -import { VERSION } from '../meta.js' - -export const navbarEn: NavbarOptions = [ - { - text: 'Guide', - children: [ - '/guide/introduction.md', - '/guide/getting-started.md', - '/guide/configuration.md', - '/guide/page.md', - '/guide/markdown.md', - '/guide/assets.md', - '/guide/i18n.md', - '/guide/deployment.md', - '/guide/theme.md', - '/guide/plugin.md', - '/guide/bundler.md', - '/guide/migration.md', - '/guide/troubleshooting.md', - ], - }, - { - text: 'Reference', - children: [ - { - text: 'Core', - children: [ - { - text: 'CLI', - link: '/reference/cli.html', - }, - '/reference/config.md', - '/reference/frontmatter.md', - '/reference/components.md', - '/reference/plugin-api.md', - '/reference/theme-api.md', - '/reference/client-api.md', - '/reference/node-api.md', - ], - }, - { - text: 'Bundlers', - children: [ - '/reference/bundler/vite.md', - '/reference/bundler/webpack.md', - ], - }, - { - text: 'Ecosystem', - children: [ - { - text: 'Default Theme', - link: 'https://ecosystem.vuejs.press/themes/default/', - }, - { - text: 'Plugins', - link: 'https://ecosystem.vuejs.press/plugins/', - }, - ], - }, - ], - }, - - { - text: 'Learn More', - children: [ - { - text: 'Advanced', - children: [ - '/advanced/architecture.md', - '/advanced/plugin.md', - '/advanced/theme.md', - { - text: 'Cookbook', - link: '/advanced/cookbook/', - }, - ], - }, - { - text: 'Resources', - children: [ - { - text: 'Ecosystem', - link: 'https://ecosystem.vuejs.press/', - }, - { - text: 'MarketPlace', - link: 'https://marketplace.vuejs.press', - }, - { - text: 'Contributing Guide', - link: 'https://github.com/vuepress/core/blob/main/CONTRIBUTING.md', - }, - ], - }, - ], - }, - { - text: `v${VERSION}`, - children: [ - { - text: 'Changelog', - link: 'https://github.com/vuepress/core/blob/main/CHANGELOG.md', - }, - { - text: 'v1.x', - link: 'https://v1.vuepress.vuejs.org', - }, - { - text: 'v0.x', - link: 'https://v0.vuepress.vuejs.org', - }, - ], - }, - // TODO: remove the type assertion -] as NavbarOptions diff --git a/docs/.vuepress/configs/navbar/index.ts b/docs/.vuepress/configs/navbar/index.ts deleted file mode 100644 index 7183393c..00000000 --- a/docs/.vuepress/configs/navbar/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './en.js' -export * from './zh.js' diff --git a/docs/.vuepress/configs/navbar/zh.ts b/docs/.vuepress/configs/navbar/zh.ts deleted file mode 100644 index 47a3d994..00000000 --- a/docs/.vuepress/configs/navbar/zh.ts +++ /dev/null @@ -1,113 +0,0 @@ -import type { NavbarOptions } from '@vuepress/theme-default' -import { VERSION } from '../meta.js' - -export const navbarZh: NavbarOptions = [ - { - text: '指南', - children: [ - '/zh/guide/introduction.md', - '/zh/guide/getting-started.md', - '/zh/guide/configuration.md', - '/zh/guide/page.md', - '/zh/guide/markdown.md', - '/zh/guide/assets.md', - '/zh/guide/i18n.md', - '/zh/guide/deployment.md', - '/zh/guide/theme.md', - '/zh/guide/plugin.md', - '/zh/guide/bundler.md', - '/zh/guide/migration.md', - '/zh/guide/troubleshooting.md', - ], - }, - { - text: '参考', - children: [ - { - text: '核心', - children: [ - '/zh/reference/cli.md', - '/zh/reference/config.md', - '/zh/reference/frontmatter.md', - '/zh/reference/components.md', - '/zh/reference/plugin-api.md', - '/zh/reference/theme-api.md', - '/zh/reference/client-api.md', - '/zh/reference/node-api.md', - ], - }, - { - text: '打包工具', - children: [ - '/zh/reference/bundler/vite.md', - '/zh/reference/bundler/webpack.md', - ], - }, - { - text: '生态系统', - children: [ - { - text: '默认主题', - link: 'https://ecosystem.vuejs.press/zh/themes/default/', - }, - { - text: '插件', - link: 'https://ecosystem.vuejs.press/zh/plugins/', - }, - ], - }, - ], - }, - { - text: '了解更多', - children: [ - { - text: '深入', - children: [ - '/zh/advanced/architecture.md', - '/zh/advanced/plugin.md', - '/zh/advanced/theme.md', - { - text: 'Cookbook', - link: '/zh/advanced/cookbook/', - }, - ], - }, - { - text: '其他资源', - children: [ - { - text: '生态系统', - link: 'https://ecosystem.vuejs.press/zh/', - }, - { - text: '市场', - link: 'https://marketplace.vuejs.press/zh/', - }, - { - text: '贡献指南', - link: 'https://github.com/vuepress/core/blob/main/CONTRIBUTING_zh.md', - }, - ], - }, - ], - }, - { - text: `v${VERSION}`, - children: [ - { - text: '更新日志', - link: 'https://github.com/vuepress/core/blob/main/CHANGELOG.md', - }, - { - text: 'v1.x', - link: 'https://v1.vuepress.vuejs.org/zh/', - }, - { - text: 'v0.x', - link: 'https://v0.vuepress.vuejs.org/zh/', - }, - ], - }, - // TODO: remove the type assertion -] as NavbarOptions diff --git a/docs/.vuepress/configs/sidebar/en.ts b/docs/.vuepress/configs/sidebar/en.ts deleted file mode 100644 index 387003b7..00000000 --- a/docs/.vuepress/configs/sidebar/en.ts +++ /dev/null @@ -1,79 +0,0 @@ -import type { SidebarOptions } from '@vuepress/theme-default' - -export const sidebarEn: SidebarOptions = { - '/guide/': [ - { - text: 'Guide', - children: [ - '/guide/introduction.md', - '/guide/getting-started.md', - '/guide/configuration.md', - '/guide/page.md', - '/guide/markdown.md', - '/guide/assets.md', - '/guide/i18n.md', - '/guide/deployment.md', - '/guide/theme.md', - '/guide/plugin.md', - '/guide/bundler.md', - '/guide/migration.md', - '/guide/troubleshooting.md', - ], - }, - ], - '/advanced/': [ - { - text: 'Advanced', - children: [ - '/advanced/architecture.md', - '/advanced/plugin.md', - '/advanced/theme.md', - ], - }, - { - text: 'Cookbook', - children: [ - '/advanced/cookbook/README.md', - '/advanced/cookbook/usage-of-client-config.md', - '/advanced/cookbook/adding-extra-pages.md', - '/advanced/cookbook/making-a-theme-extendable.md', - '/advanced/cookbook/passing-data-to-client-code.md', - '/advanced/cookbook/markdown-and-vue-sfc.md', - '/advanced/cookbook/resolving-routes.md', - ], - }, - ], - '/reference/': [ - { - text: 'Core', - collapsible: true, - children: [ - '/reference/cli.md', - '/reference/config.md', - '/reference/frontmatter.md', - '/reference/components.md', - '/reference/plugin-api.md', - '/reference/theme-api.md', - '/reference/client-api.md', - '/reference/node-api.md', - ], - }, - { - text: 'Bundlers', - children: ['/reference/bundler/vite.md', '/reference/bundler/webpack.md'], - }, - { - text: 'Ecosystem', - children: [ - { - text: 'Default Theme', - link: 'https://ecosystem.vuejs.press/themes/default/', - }, - { - text: 'Plugins', - link: 'https://ecosystem.vuejs.press/plugins/', - }, - ], - }, - ], -} diff --git a/docs/.vuepress/configs/sidebar/index.ts b/docs/.vuepress/configs/sidebar/index.ts deleted file mode 100644 index 7183393c..00000000 --- a/docs/.vuepress/configs/sidebar/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './en.js' -export * from './zh.js' diff --git a/docs/.vuepress/configs/sidebar/zh.ts b/docs/.vuepress/configs/sidebar/zh.ts deleted file mode 100644 index 3955f70c..00000000 --- a/docs/.vuepress/configs/sidebar/zh.ts +++ /dev/null @@ -1,82 +0,0 @@ -import type { SidebarOptions } from '@vuepress/theme-default' - -export const sidebarZh: SidebarOptions = { - '/zh/guide/': [ - { - text: '指南', - children: [ - '/zh/guide/introduction.md', - '/zh/guide/getting-started.md', - '/zh/guide/configuration.md', - '/zh/guide/page.md', - '/zh/guide/markdown.md', - '/zh/guide/assets.md', - '/zh/guide/i18n.md', - '/zh/guide/deployment.md', - '/zh/guide/theme.md', - '/zh/guide/plugin.md', - '/zh/guide/bundler.md', - '/zh/guide/migration.md', - '/zh/guide/troubleshooting.md', - ], - }, - ], - '/zh/advanced/': [ - { - text: '深入', - children: [ - '/zh/advanced/architecture.md', - '/zh/advanced/plugin.md', - '/zh/advanced/theme.md', - ], - }, - { - text: 'Cookbook', - children: [ - '/zh/advanced/cookbook/README.md', - '/zh/advanced/cookbook/usage-of-client-config.md', - '/zh/advanced/cookbook/adding-extra-pages.md', - '/zh/advanced/cookbook/making-a-theme-extendable.md', - '/zh/advanced/cookbook/passing-data-to-client-code.md', - '/zh/advanced/cookbook/markdown-and-vue-sfc.md', - '/zh/advanced/cookbook/resolving-routes.md', - ], - }, - ], - '/zh/reference/': [ - { - text: '核心', - collapsible: true, - children: [ - '/zh/reference/cli.md', - '/zh/reference/config.md', - '/zh/reference/frontmatter.md', - '/zh/reference/components.md', - '/zh/reference/plugin-api.md', - '/zh/reference/theme-api.md', - '/zh/reference/client-api.md', - '/zh/reference/node-api.md', - ], - }, - { - text: '打包工具', - children: [ - '/zh/reference/bundler/vite.md', - '/zh/reference/bundler/webpack.md', - ], - }, - { - text: '生态系统', - children: [ - { - text: '默认主题', - link: 'https://ecosystem.vuejs.press/zh/themes/default/', - }, - { - text: '插件', - link: 'https://ecosystem.vuejs.press/zh/plugins/', - }, - ], - }, - ], -} diff --git a/docs/.vuepress/styles/index.scss b/docs/.vuepress/styles/index.scss deleted file mode 100644 index f4fbf823..00000000 --- a/docs/.vuepress/styles/index.scss +++ /dev/null @@ -1,19 +0,0 @@ -:root { - scroll-behavior: smooth; -} - -@media (min-width: 751px) { - #docsearch-container:lang(zh-CN) { - min-width: 184.66px; - } -} - -// FIXME: Workaround solution -div[class*='language-'] pre code { - color: var(--code-c-text); -} - -.code-block-title-bar { - --code-title-c-bg: #1e1e1e; - --code-title-c-text: #d4d4d4; -} diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 4b49d110..00000000 --- a/docs/README.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -home: true -title: Home -heroImage: /images/hero.png -actions: - - text: Get Started - link: /guide/getting-started.html - type: primary - - - text: Introduction - link: /guide/introduction.html - type: secondary - -features: - - title: Simplicity First - details: Minimal setup with markdown-centered project structure helps you focus on writing. - - - title: Vue-Powered - details: Enjoy the dev experience of Vue, use Vue components in markdown, and develop custom themes with Vue. - - - title: Performant - details: VuePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded. - - - title: Themes - details: Providing a default theme out of the box. You can also choose a community theme or create your own one. - - - title: Plugins - details: Flexible plugin API, allowing plugins to provide lots of plug-and-play features for your site. - - - title: Bundlers - details: Recommended bundler is Vite, while Webpack is also supported. Choose the one you like! - -footer: MIT Licensed | Copyright © 2018-present VuePress Community ---- diff --git a/docs/advanced/architecture.md b/docs/advanced/architecture.md deleted file mode 100644 index 0a3ecdbe..00000000 --- a/docs/advanced/architecture.md +++ /dev/null @@ -1,36 +0,0 @@ -# Architecture - -## Overview - -![vuepress-architecture-overview](/images/guide/vuepress-architecture-overview.png) - -The above figure shows a brief overview of the VuePress architecture: - -- Node App will generate temp files, including the pages, routes, etc. -- Bundler will handle Client App together with the temp files, just like a common Vue app. - -As a developer, you must be aware of that VuePress has two main parts: **Node App** and **Client App**, which is important when developing plugins and themes: - -- The entry file of a plugin or a theme will be loaded in Node App. -- Client files will be loaded in Client App, which will be handled by bundler. For example, components, client config files, etc. - -## Core Process and Hooks - -![vuepress-core-process](/images/guide/vuepress-core-process.png) - -The above figure shows the core process of VuePress Node App and the hooks of [Plugin API](../reference/plugin-api.md): - -- In the **init** stage: - - Theme and plugins will be loaded. That means all the plugins should be used before initialization. - - As we are using markdown-it to parse the markdown file, so we need to create markdown-it instance before loading pages: - - [extendsMarkdownOptions](../reference/plugin-api.md#extendsmarkdownoptions) hook will be processed to create markdown-it instance. - - [extendsMarkdown](../reference/plugin-api.md#extendsmarkdown) hook will be processed extends markdown-it instance. - - Page files will be loaded: - - [extendsPageOptions](../reference/plugin-api.md#extendspageoptions) hook will be processed to create pages. - - [extendsPage](../reference/plugin-api.md#extendspage) hook will be processed to extends page object. -- In the **prepare** stage: - - Temp files will be generated, so all hooks related to client files will be processed here. -- In the **dev / build** stage: - - Bundler will be resolved: - - [extendsBundlerOptions](../reference/plugin-api.md#extendsbundleroptions) hook will be processed to create bundler configuration. - - [alias](../reference/plugin-api.md#alias) hook and [define](../reference/plugin-api.md#define) hook would be used in bundler configuration, so they will be processed here. diff --git a/docs/advanced/cookbook/README.md b/docs/advanced/cookbook/README.md deleted file mode 100644 index da53257d..00000000 --- a/docs/advanced/cookbook/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Introduction - -## What's the Cookbook for? - -- We are introducing essential concepts in the **Guide**, but you may not know how to dig deeper. -- We are listing APIs in the **Reference**, but you may not know how to take full advantage of them. - -So here comes the Cookbook. - -Each recipe will focus on one specific aspect, providing more detailed examples to show you the usages and possibilities of VuePress. diff --git a/docs/advanced/cookbook/adding-extra-pages.md b/docs/advanced/cookbook/adding-extra-pages.md deleted file mode 100644 index 9dc5ada9..00000000 --- a/docs/advanced/cookbook/adding-extra-pages.md +++ /dev/null @@ -1,38 +0,0 @@ -# Adding Extra Pages - -Sometimes you might want to add some extra pages without creating a markdown file in the source directory. - -With the help of [Plugin API](../../reference/plugin-api.md) and [Node API](../../reference/node-api.md), we can do that with ease. - -## Add a Default Homepage - -As a theme author, you may not require users to create a `/README.md` file as the homepage, but you want to provide a default one: - -```ts -import { createPage } from 'vuepress/core' - -export default { - // all pages have been loaded after initialization - async onInitialized(app) { - // if the homepage does not exist - if (app.pages.every((page) => page.path !== '/')) { - // create a homepage - const homepage = await createPage(app, { - path: '/', - // set frontmatter - frontmatter: { - layout: 'Layout', - }, - // set markdown content - content: `\ -# Welcome to ${app.options.title} - -This is the default homepage -`, - }) - // add it to `app.pages` - app.pages.push(homepage) - } - }, -} -``` diff --git a/docs/advanced/cookbook/making-a-theme-extendable.md b/docs/advanced/cookbook/making-a-theme-extendable.md deleted file mode 100644 index c14ee0c7..00000000 --- a/docs/advanced/cookbook/making-a-theme-extendable.md +++ /dev/null @@ -1,64 +0,0 @@ -# Making a Theme Extendable - -Sometimes users might want make some minor changes to a theme, but they don't want to fork and modify the entire project. - -With the help of [Theme API](../../reference/theme-api.md), you can make your theme extendable, allowing users to make their own modifications easily. - -You must have known that how to [extend default theme](https://ecosystem.vuejs.press/themes/default/extending.html). Here we'll introduce how to make your own theme extendable like default theme. - -## Layout Slots - -This approach requires you to determine which parts of your theme could be extended. It is more suitable for those common customizations like page footer or header. - -You just need to provide slots in your layouts, and tell users how to make use of them: - -```vue - -``` - -## Component Aliases - -This approach requires you to consider which components of your theme should be replaceable, and you also need to split components into a suitable granularity. - -First, set `alias` for replaceable components of you theme: - -```ts -import type { Theme } from 'vuepress/core' -import { getDirname } from 'vuepress/utils' - -const __dirname = getDirname(import.meta.url) - -export const fooTheme = (options): Theme => ({ - name: 'vuepress-theme-foo', - alias: { - // set alias for replaceable components - '@theme/Navbar.vue': path.resolve(__dirname, 'components/Navbar.vue'), - '@theme/Sidebar.vue': path.resolve(__dirname, 'components/Sidebar.vue'), - }, -}) -``` - -Next, use those components via aliases in your theme: - -```vue - - - -``` - -Then, users can replace specific components by overriding the `alias` when extending or using your theme. diff --git a/docs/advanced/cookbook/markdown-and-vue-sfc.md b/docs/advanced/cookbook/markdown-and-vue-sfc.md deleted file mode 100644 index 4fec769f..00000000 --- a/docs/advanced/cookbook/markdown-and-vue-sfc.md +++ /dev/null @@ -1,80 +0,0 @@ -# Markdown and Vue SFC - -Each Markdown file is first compiled into HTML, and then converted to a Vue SFC. In other words, you can write a Markdown file like a Vue SFC: - -- Blocks ` - - -``` - -**Output** - -_Hello, {{ msg }}_ - - - -_Current count is: {{ count }}_ - - - - - - - - diff --git a/docs/advanced/cookbook/passing-data-to-client-code.md b/docs/advanced/cookbook/passing-data-to-client-code.md deleted file mode 100644 index 39b919b4..00000000 --- a/docs/advanced/cookbook/passing-data-to-client-code.md +++ /dev/null @@ -1,66 +0,0 @@ -# Passing Data to Client Code - -As we know, VuePress plugin entries and theme entries are processed in Node side, but sometimes you might need to pass data to client side. For example, you want to generate different data when users use different options. - -## Use `define` Hook - -Plugin API provides a [define](../../reference/plugin-api.md#define) hook to define global constants for client code. You can make use of it to pass data to client. - -First, define some constants in `define` hook: - -```ts -export default (options) => ({ - define: { - __FOO__: options.foo || 'str', - __OBJ__: { - bar: options.bar || 123, - }, - }, -}) -``` - -Then use them in client code directly: - -```ts -const foo = __FOO__ -const obj = __OBJ__ -``` - -If you are using TypeScript in client code, you may need to declare the types of the global constants manually: - -```ts -declare const __FOO__: string -declare const __OBJ__: { bar: number } -``` - -## Write and Load Temp Files - -If you need to achieve some more complex features, you can write temp files and load them dynamically in client code. - -First, write a temp file `foo.js`, which will be generated in the [temp](../../reference/config.md#temp) directory: - -```ts -export default (options) => ({ - async onPrepared(app) { - // write temp file - await app.writeTemp( - 'foo.js', - `export const foo = ${JSON.stringify(options.foo)}`, - ) - }, -}) -``` - -Then, load the temp file via `@temp` alias in client code: - -```ts -import { foo } from '@temp/foo' -``` - -If you are using TypeScript in client code, you may need to declare the type of the temp module manually: - -```ts -declare module '@temp/foo' { - export const foo: string -} -``` diff --git a/docs/advanced/cookbook/resolving-routes.md b/docs/advanced/cookbook/resolving-routes.md deleted file mode 100644 index 4f3d55b1..00000000 --- a/docs/advanced/cookbook/resolving-routes.md +++ /dev/null @@ -1,50 +0,0 @@ -# Resolving Routes - -## Getting all routes - -You can make use of [useRoutes](../../reference/client-api.md#useroutes) to get all routes information. - -The return value of `useRoutes` is a Ref object containing all routes. The keys are route paths of each route, and the values are the corresponding route information. - -```ts -import { useRoutes } from 'vuepress/client' - -const routes = useRoutes() -// { -// '/': { meta: { title: 'Home' }, loader: HomePageLoader }, -// '/404.html': { meta: { title: 'Not Found' }, loader: NotFoundPageLoader }, -// ... -// } - -const routePaths = computed(() => Object.keys(routes.value)) -// => ['/‘, '/404.html', '/foo/', '/bar/', ...] -``` - -## Resolving route path - -You can make use of [resolveRoutePath](../../reference/client-api.md#resolveroutepath) to resolve the route path of the given link. - -`resolveRoutePath` receives a link and an optional base path, and returns the resolved route path: - -```ts -import { resolveRoutePath } from 'vuepress/client' - -const routePath = resolveRoutePath('/foo/') // => '/foo/' -const routePath = resolveRoutePath('baz.html', '/foo/bar.html') // => '/foo/baz.html' -``` - -## Resolving route information - -You can make use of [resolveRoute](../../reference/client-api.md#resolveroute) to resolve route information for a given link. - -`resolveRoute` receives a link and an optional base path, and returns the resolved route information: - -```ts -import { resolveRoute } from 'vuepress/client' - -const route = resolveRoute('/foo/') // => { notFound: false, path: '/foo/', meta: { title: 'Foo' }, loader: FooPageLoader } -const route = resolveRoute('baz.html', '/foo/bar.html') // => { notFound: false, path: '/foo/baz.html', meta: { title: 'Baz' }, loader: BazPageLoader } -const route = resolveRoute('/not-exist.html') // => { notFound: true, path: '/not-exist.html', meta: { title: 'Not Found' }, loader: NotFoundPageLoader } -``` - -There is a `notFound` field in the returned information, which is used to indicate whether a corresponding route exists for a given path. When the route does not exist, the `notFound` field would be `true`, the `path` field would be the normalized path, and the `meta` and `loader` fields would point to the default 404 page. diff --git a/docs/advanced/cookbook/usage-of-client-config.md b/docs/advanced/cookbook/usage-of-client-config.md deleted file mode 100644 index 56ca2fc0..00000000 --- a/docs/advanced/cookbook/usage-of-client-config.md +++ /dev/null @@ -1,174 +0,0 @@ -# Usage of Client Config - -You can make use of the [client config file](../../guide/configuration.md#client-config-file) directly in your project, or specify the file path in your plugin or theme via [clientConfigFile](../../reference/plugin-api.md#clientconfigfile) hook: - -```ts -import { getDirname, path } from 'vuepress/utils' - -const __dirname = getDirname(import.meta.url) - -const pluginOrTheme = { - clientConfigFile: path.resolve(__dirname, './path/to/clientConfig.ts'), -} -``` - -Inside the client config file, `vuepress/client` provides a helper function [defineClientConfig](../../reference/client-api.md#defineclientconfig) to help you define the client config: - -```ts -import { defineClientConfig } from 'vuepress/client' - -export default defineClientConfig({ - enhance({ app, router, siteData }) {}, - setup() {}, - layouts: {}, - rootComponents: [], -}) -``` - -## enhance - -The `enhance` function could be either synchronous or asynchronous. It accepts a context param with following properties: - -- `app` is the Vue application instance that created by [createApp](https://vuejs.org/api/application.html#createapp). -- `router` is the Vue Router instance that created by [createRouter](https://router.vuejs.org/api/#createrouter). -- `siteData` is a ref of an object that generated from user config, including [base](../../reference/config.md#base), [lang](../../reference/config.md#lang), [title](../../reference/config.md#title), [description](../../reference/config.md#description), [head](../../reference/config.md#head) and [locales](../../reference/config.md#locales). - -The `enhance` function will be invoked after the client app is created. It's possible to implement any enhancements to the Vue application. - -### Register Vue Components - -You can register global Vue components via the [app.component](https://vuejs.org/api/application.html#app-component) method: - -```ts -import { defineClientConfig } from 'vuepress/client' -import MyComponent from './MyComponent.vue' - -export default defineClientConfig({ - enhance({ app }) { - app.component('MyComponent', MyComponent) - }, -}) -``` - -### Use Non-SSR-Friendly Features - -VuePress will generate a SSR application to pre-render pages during build. Generally speaking, if a code snippet is using Browser / DOM APIs before client app is mounted, we call it non-SSR-friendly. - -We already provides a [ClientOnly](../../reference/components.md#clientonly) component to wrap non-SSR-friendly content. - -In the `enhance` function, you can make use of the [`__VUEPRESS_SSR__`](../../reference/client-api.md#ssr) flag for that purpose. - -```ts -import { defineClientConfig } from 'vuepress/client' - -export default defineClientConfig({ - async enhance() { - if (!__VUEPRESS_SSR__) { - const nonSsrFriendlyModule = await import('non-ssr-friendly-module') - // ... - } - }, -}) -``` - -### Use Router Methods - -You can make use of the [Router Methods](https://router.vuejs.org/api/#router-methods) that provided by vue-router. For example, add navigation guard: - -```ts -import { defineClientConfig } from 'vuepress/client' - -export default defineClientConfig({ - enhance({ router }) { - router.beforeEach((to) => { - console.log('before navigation') - }) - - router.afterEach((to) => { - console.log('after navigation') - }) - }, -}) -``` - -::: warning -It's not recommended to use `addRoute` method to add dynamic routes here, because those routes will **NOT** be pre-rendered in build mode. - -But you can still do that if you understand the drawback. -::: - -## setup - -The `setup` function would be invoked inside the [setup](https://vuejs.org/api/composition-api-setup.html) hook of the client vue app. - -### Use Composition API - -You can take the `setup` function as part of the [setup](https://vuejs.org/api/composition-api-setup.html) hook of the root component. Thus, all composition APIs are available here. - -```ts -import { provide, ref } from 'vue' -import { useRoute, useRouter } from 'vue-router' -import { defineClientConfig } from 'vuepress/client' - -export default defineClientConfig({ - setup() { - // get the current route location - const route = useRoute() - // get the vue-router instance - const router = useRouter() - // provide a value that can be injected by layouts, pages and other components - const count = ref(0) - provide('count', count) - }, -}) -``` - -### Use Non-SSR-Friendly Features - -In the `setup` function, the [`__VUEPRESS_SSR__`](../../reference/client-api.md#ssr) flag is also available. - -Another way to use non-ssr-friendly features is to put them inside the [onMounted](https://vuejs.org/api/composition-api-lifecycle.html#onmounted) hook: - -```ts -import { onMounted } from 'vue' -import { defineClientConfig } from 'vuepress/client' - -export default defineClientConfig({ - setup() { - onMounted(() => { - // use DOM API after mounted - document.querySelector('#app') - }) - }, -}) -``` - -## layouts - -The `layouts` options is to set layout components. After layout components are registered here, users can use it via [layout](../../reference/frontmatter.md#layout) frontmatter. - -```ts -import { defineClientConfig } from 'vuepress/client' -import MyLayout from './layouts/MyLayout.vue' - -export default defineClientConfig({ - layouts: { - MyLayout, - }, -}) -``` - -## rootComponents - -The `rootComponents` is a components array to be placed directly into the root node of the client vue app. - -Typical usage of this option is to put some global UI components, like global popup or so: - -```ts -import { defineClientConfig } from 'vuepress/client' -import GlobalPopup from './components/GlobalPopup.vue' - -export default defineClientConfig({ - rootComponents: [GlobalPopup], -}) -``` diff --git a/docs/advanced/plugin.md b/docs/advanced/plugin.md deleted file mode 100644 index f3aac5a2..00000000 --- a/docs/advanced/plugin.md +++ /dev/null @@ -1,53 +0,0 @@ -# Writing a Plugin - -::: tip -Before reading this guide, you'd better learn the VuePress [architecture](./architecture.md) first. -::: - -## Create a Plugin - -A plugin should be a plain JavaScript object that satisfies the [Plugin API](../reference/plugin-api.md), which is called a _Plugin Object_: - -```ts -const fooPlugin = { - name: 'vuepress-plugin-foo', - // ... -} -``` - -A plugin could also be a function that receives the [app instance](../reference/node-api.md#app) as the param and returns a _Plugin Object_, which is called a _Plugin Function_: - -```ts -const barPlugin = (app) => ({ - name: 'vuepress-plugin-bar', - // ... -}) -``` - -A plugin usually needs to allow user options, so we typically provide users with a function to receive options, and returns a _Plugin Object_ or a _Plugin Function_. Then your plugin should be converted like this: - -```ts -const fooPlugin = (options) => ({ - name: 'vuepress-plugin-foo', - // ... -}) - -const barPlugin = (options) => (app) => ({ - name: 'vuepress-plugin-bar', - // ... -}) -``` - -## Publish to NPM - -After creating a plugin, you should follow some conventions in the [package.json](https://docs.npmjs.com/cli/v8/configuring-npm/package-json) file before publishing it to NPM: - -```json -{ - "name": "vuepress-plugin-foo", - "keywords": ["vuepress-plugin"] -} -``` - -- Set `name` to follow the naming convention, i.e. `vuepress-plugin-xxx` or `@org/vuepress-plugin-xxx`, which should be consistent with the [name](../reference/plugin-api.md#name) field of the _Plugin Object_. -- Set `keywords` to include `vuepress-plugin`, so that users can search your plugin on NPM. diff --git a/docs/advanced/theme.md b/docs/advanced/theme.md deleted file mode 100644 index 9ceae09a..00000000 --- a/docs/advanced/theme.md +++ /dev/null @@ -1,95 +0,0 @@ -# Writing a Theme - -::: tip -Before reading this guide, you'd better learn the guide of [Writing a Plugin](./plugin.md) first. -::: - -## Create a Theme - -A VuePress theme is a special plugin, which should satisfy the [Theme API](../reference/theme-api.md). Like plugins, a theme should also be a _Theme Object_ or a _Theme Function_, and could be wrapped with a function to receive options: - -```ts -import { getDirname, path } from 'vuepress/utils' - -const __dirname = getDirname(import.meta.url) - -const fooTheme = (options) => - // returns a theme object - ({ - name: 'vuepress-theme-foo', - - // path to the client config of your theme - clientConfigFile: path.resolve(__dirname, 'client.js'), - - // set custom dev / build template - // if the template is not specified, the default template - templateBuild: path.resolve(__dirname, 'templates/build.html'), - templateDev: path.resolve(__dirname, 'templates/dev.html'), - - // use plugins - plugins: [ - // ... - ], - - // other plugin APIs are also available - }) - -const barTheme = - (options) => - // returns a theme function - (app) => ({ - name: 'vuepress-theme-bar', - // ... - }) -``` - -Then, create theme's client config file `client.js` : - -```ts -import { defineClientConfig } from 'vuepress/client' -import Layout from './layouts/Layout.vue' -import NotFound from './layouts/NotFound.vue' - -export default defineClientConfig({ - layouts: { - Layout, - NotFound, - }, -}) -``` - -The `layouts` field declares the layouts provided by your theme. A theme must provide at least two layouts: `Layout` and `NotFound`. The former is to provide default layout for common pages, while the latter is to provide layout for 404-not-found page. - -The `Layout` layout should contain the [Content](../reference/components.md#content) component to display the markdown content: - -```vue - -``` - -The `NotFound` layout will be used for the `404.html` page: - -```vue - -``` - -You can provide more layouts, and users can change layout via [layout](../reference/frontmatter.md#layout) frontmatter. - -## Publish to NPM - -Also, there are some conventions for theme in [package.json](https://docs.npmjs.com/cli/v8/configuring-npm/package-json): - -```json -{ - "name": "vuepress-theme-foo", - "keywords": ["vuepress-theme"] -} -``` - -- Set `name` to follow the naming convention: `vuepress-theme-xxx` or `@org/vuepress-theme-xxx`, which should be consistent with the [name](../reference/theme-api.md#name) field of the _Theme Object_. -- Set `keywords` to include `vuepress-theme`, so that users can search your theme on NPM. diff --git a/docs/guide/assets.md b/docs/guide/assets.md deleted file mode 100644 index 93618ad1..00000000 --- a/docs/guide/assets.md +++ /dev/null @@ -1,126 +0,0 @@ -# Assets - -## Relative URLs - -You can reference any assets using relative URLs in your Markdown content: - -```md -![An image](./image.png) -``` - -or - -```md -![An image](image.png) -``` - -This is generally the suggested way to import images, as users usually place images near the Markdown file that references them. - -## Public Files - -You can put some static assets inside public directory, and they will be copied to the root of the generated directory. - -The default public directory is `.vuepress/public`, which can be changed by [public](../reference/config.md#public) option. - -It would be useful in some cases: - -- You may need to provide static assets that are not directly referenced in any of your Markdown files, for example, favicon and PWA icons. -- You may need to serve some shared static assets, which may even be referenced outside your site, for example, logo images. -- You may want to reference images using absolute URLs in your Markdown content. - -Take our documentation source files as an example, we are putting the logo of VuePress inside the public directory: - -```bash -└─ docs - ├─ .vuepress - | └─ public - | └─ images - | └─ hero.png # <- Logo file - └─ guide - └─ assets.md # <- Here we are -``` - -We can reference our logo in current page like this: - -**Input** - -```md -![VuePress Logo](/images/hero.png) -``` - -**Output** - -![VuePress Logo](/images/hero.png) - -### Base Helper - -If your site is deployed to a non-root URL, for example, `https://foo.github.io/bar/`, then the [base](../reference/config.md#base) should be set to `'/bar/'`. Obviously, your public files would be served like `https://foo.github.io/bar/images/hero.png` after deployment. - -In most cases, you don't need to worry about the reference path of those public files, as VuePress will automatically handle `base` for you: - -```md - - -![VuePress Logo](/images/hero.png) -``` - -::: tip -When using [webpack bundler](../reference/bundler/webpack.md), you need to set [markdown.assets.absolutePathPrependBase](../reference/config.md#markdown-assets) to `true` to automatically prepend base to markdown images. -::: - -However, sometimes you may have some dynamical links referencing public files, especially when you are authoring a custom theme. In such case, the `base` could not be handled automatically. To help with that, VuePress provides a [withBase](../reference/client-api.md#withbase) helper to prepend `base` for you: - -```vue - - - -``` - -You can also access the helper by `$withBase` directly: - -```md -VuePress Logo -``` - -## Packages and Path Aliases - -Although it is not a common usage, you can reference images from dependent packages: - -```bash -npm install -D package-name -``` - -Since markdown image syntax regards image links as relative paths by default, you need to use `` tag: - -```md -Image from dependency -``` - -The path aliases that set in config file are also supported: - -```ts -import { getDirname, path } from 'vuepress/utils' - -const __dirname = getDirname(import.meta.url) - -export default { - alias: { - '@alias': path.resolve(__dirname, './path/to/some/dir'), - }, -} -``` - -```md -Image from path alias -``` - -::: tip -Config reference: [alias](../reference/plugin-api.md#alias) -::: diff --git a/docs/guide/bundler.md b/docs/guide/bundler.md deleted file mode 100644 index 443e46a0..00000000 --- a/docs/guide/bundler.md +++ /dev/null @@ -1,59 +0,0 @@ -# Bundler - -VuePress supports using [Webpack](https://webpack.js.org/) or [Vite](https://vite.dev/) to dev and build sites. You can choose which bundler to use according to your preference, and no extra configuration is required. - -## Install a Bundler - -When installing the [vuepress](https://www.npmjs.com/package/vuepress) package, no bundlers will be installed. You need to choose a bundler to install. - -::: code-tabs#shell - -@tab pnpm - -```bash -# install vite bundler -pnpm add -D vuepress@next @vuepress/bundler-vite@next -# install webpack bundler -pnpm add -D vuepress@next @vuepress/bundler-webpack@next -``` - -@tab yarn - -```bash -# install vite bundler -yarn add -D vuepress@next @vuepress/bundler-vite@next -# install webpack bundler -yarn add -D vuepress@next @vuepress/bundler-webpack@next -``` - -@tab npm - -```bash -# install vite bundler -npm install -D vuepress@next @vuepress/bundler-vite@next -# install webpack bundler -npm install -D vuepress@next @vuepress/bundler-webpack@next -``` - -::: - -## Use a Bundler - -Generally, you could use a bundler without extra configuration, because we have already configured them properly to work with VuePress. - -You can use a bundler via the [bundler](../reference/config.md#bundler) option: - -```ts -import { viteBundler } from '@vuepress/bundler-vite' -// import { webpackBundler } from '@vuepress/bundler-webpack' - -export default { - bundler: viteBundler(), - // bundler: webpackBundler(), -} -``` - -When you need to customize the bundler, you can set the corresponding options: - -- [Bundlers > Vite](../reference/bundler/vite.md) -- [Bundlers > Webpack](../reference/bundler/webpack.md) diff --git a/docs/guide/configuration.md b/docs/guide/configuration.md deleted file mode 100644 index a750472f..00000000 --- a/docs/guide/configuration.md +++ /dev/null @@ -1,86 +0,0 @@ -# Configuration - -## Config File - -The essential file for configuring a VuePress site is `.vuepress/config.js`, while TypeScript config file is also supported. You can use `.vuepress/config.ts` instead to get better types hint for VuePress config. - -To be more specific, we have a convention for config file paths (in order of precedence): - -- In current working directory `cwd`: - - `vuepress.config.ts` - - `vuepress.config.js` - - `vuepress.config.mjs` -- In source directory `sourceDir`: - - `.vuepress/config.ts` - - `.vuepress/config.js` - - `.vuepress/config.mjs` - -You can also specify the config file via `--config` option of [CLI](../reference/cli.md): - -```bash -vuepress dev docs --config my-config.ts -``` - -A basic config file looks like this: - -```ts -import { viteBundler } from '@vuepress/bundler-vite' -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - bundler: viteBundler(), - theme: defaultTheme(), - - lang: 'en-US', - title: 'Hello VuePress', - description: 'Just playing around', -}) -``` - -::: tip -Check out the [Config Reference](../reference/config.md) for a full list of VuePress config. -::: - -## Client Config File - -In most cases, the config file is sufficient to configure your VuePress site. However, sometimes users may want to add some client-side code directly. To help with this, VuePress also supports a client config file: - -``` -├─ docs -│ ├─ .vuepress -│ │ ├─ client.js <--- client config file -│ │ └─ config.js <--- config file -│ └─ README.md -├─ .gitignore -└─ package.json -``` - -Similarly, we also have a convention for client config file paths (in order of precedence): - -- In current working directory `cwd`: - - `vuepress.client.ts` - - `vuepress.client.js` - - `vuepress.client.mjs` -- In source directory `sourceDir`: - - `.vuepress/client.ts` - - `.vuepress/client.js` - - `.vuepress/client.mjs` - -A basic client config file looks like this: - -```ts -import { defineClientConfig } from 'vuepress/client' - -export default defineClientConfig({ - enhance({ app, router, siteData }) {}, - setup() {}, - rootComponents: [], -}) -``` - -::: tip -Unlike config file, client config file could not be specified via CLI options. - -To learn more about client config file, see [Advanced > Cookbook > Usage of Client Config](../advanced/cookbook/usage-of-client-config.md) -::: diff --git a/docs/guide/deployment.md b/docs/guide/deployment.md deleted file mode 100644 index 7fe5feee..00000000 --- a/docs/guide/deployment.md +++ /dev/null @@ -1,233 +0,0 @@ -# Deployment - -The following guides are based on some shared assumptions: - -- You are placing your Markdown source files inside the `docs` directory of your project; -- You are using the default build output location (`.vuepress/dist`); -- You are using [pnpm](https://pnpm.io) as package manager, while npm and yarn are also supported; -- VuePress is installed as a local dependency in your project, and you have setup the following script in `package.json`: - -```json -{ - "scripts": { - "docs:build": "vuepress build docs" - } -} -``` - -## GitHub Pages - -1. Set the correct [base](../reference/config.md#base) config. - - If you are deploying to `https://.github.io/`, you can omit this step as `base` defaults to `"/"`. - - If you are deploying to `https://.github.io//`, for example your repository is at `https://github.com//`, then set `base` to `"//"`. - -2. Choose your preferred CI tools. Here we take [GitHub Actions](https://github.com/features/actions) as an example. - - Create `.github/workflows/docs.yml` to set up the workflow. - -::: details Click to expand sample config - -```yaml -name: docs - -on: - # trigger deployment on every push to main branch - push: - branches: [main] - # trigger deployment manually - workflow_dispatch: - -jobs: - docs: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - with: - # fetch all commits to get last updated time or other git log info - fetch-depth: 0 - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - # choose node.js version to use - node-version: 22 - # cache deps for pnpm - cache: pnpm - - - name: Install deps - run: pnpm install --frozen-lockfile - - # run build script - - name: Build VuePress site - run: pnpm docs:build - - # please check out the docs of the workflow for more details - # @see https://github.com/crazy-max/ghaction-github-pages - - name: Deploy to GitHub Pages - uses: crazy-max/ghaction-github-pages@v4 - with: - # deploy to gh-pages branch - target_branch: gh-pages - # deploy the default output dir of VuePress - build_dir: docs/.vuepress/dist - env: - # @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -``` - -::: - -::: tip -Please refer to [GitHub Pages official guide](https://pages.github.com/) for more details. -::: - -## GitLab Pages - -1. Set the correct [base](../reference/config.md#base) config. - - If you are deploying to `https://.gitlab.io/`, you can omit `base` as it defaults to `"/"`. - - If you are deploying to `https://.gitlab.io//`, for example your repository is at `https://gitlab.com//`, then set `base` to `"//"`. - -2. Create `.gitlab-ci.yml` to set up [GitLab CI](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/) workflow. - -::: details Click to expand sample config - -```yaml -# choose a docker image to use -image: node:18-buster - -pages: - # trigger deployment on every push to main branch - only: - - main - - # cache node_modules - cache: - key: - files: - - pnpm-lock.yaml - paths: - - .pnpm-store - - # Install pnpm - before_script: - - curl -fsSL https://get.pnpm.io/install.sh | sh - - - pnpm config set store-dir .pnpm-store - - # install dependencies and run build script - script: - - pnpm i --frozen-lockfile - - pnpm docs:build --dest public - - artifacts: - paths: - - public -``` - -::: - -::: tip -Please refer to [GitLab Pages official guide](https://docs.gitlab.com/ce/user/project/pages/#getting-started) for more details. -::: - -## Google Firebase - -1. Make sure you have [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed. - -2. Create `firebase.json` and `.firebaserc` at the root of your project with the following content: - -`firebase.json`: - -```json -{ - "hosting": { - "public": "./docs/.vuepress/dist", - "ignore": [] - } -} -``` - -`.firebaserc`: - -```json -{ - "projects": { - "default": "" - } -} -``` - -3. After running `pnpm docs:build`, deploy using the command `firebase deploy`. - -::: tip -Please refer to [Firebase CLI official guide](https://firebase.google.com/docs/cli) for more details. -::: - -## Heroku - -1. Install [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli). - -2. Create a Heroku account by [signing up](https://signup.heroku.com). - -3. Run `heroku login` and fill in your Heroku credentials: - -```bash -heroku login -``` - -4. Create a file called `static.json` in the root of your project with the below content: - -`static.json`: - -```json -{ - "root": "./docs/.vuepress/dist" -} -``` - -This is the configuration of your site; read more at [heroku-buildpack-static](https://github.com/heroku/heroku-buildpack-static). - -## Kinsta - -See [Set Up VuePress on Kinsta](https://kinsta.com/docs/vuepress-application/). - -## Edgio - -See [Edgio Documentation > Framework Guides > VuePress](https://docs.edg.io/guides/vuepress). - -## Netlify - -1. On [Netlify](https://netlify.com), set up a new project from GitHub with the following settings: - - **Build Command:** `pnpm docs:build` - - **Publish directory:** `docs/.vuepress/dist` - -2. Set [Environment variables](https://docs.netlify.com/configure-builds/environment-variables) to choose node version: - - `NODE_VERSION`: 20 - -3. Hit the deploy button. - -::: note - -You should disable Pretty URLs in the "Site Configuration" → "Build & Deploy" → "Post processing". - -::: - -## Vercel - -1. Go to [Vercel](https://vercel.com), set up a new project from GitHub with the following settings: - - **FRAMEWORK PRESET:** `Other` - - **BUILD COMMAND:** `pnpm docs:build` - - **OUTPUT DIRECTORY:** `docs/.vuepress/dist` - -2. Hit the deploy button. - -## CloudRay - -See [Deploy Your VuePress Site With CloudRay](https://cloudray.io/articles/how-to-deploy-your-vuepress-site) diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md deleted file mode 100644 index 9a231c80..00000000 --- a/docs/guide/getting-started.md +++ /dev/null @@ -1,252 +0,0 @@ -# Getting Started - -::: warning -VuePress v2 is currently in RC (Release Candidate) stage. It's ready to be used for building your site, but the config and API are not stable enough, which is possibly to have minor breaking changes. So make sure to read the [changelog](https://github.com/vuepress/core/blob/main/CHANGELOG.md) carefully each time you upgrade a RC version. -::: - -## Try It Online - -You can try VuePress directly in your browser on [StackBlitz](https://stackblitz.com/fork/vuepress). - -## Installation - -### Prerequisites - -- [Node.js v20.9.0+](https://nodejs.org/) -- Package manager like [pnpm](https://pnpm.io), [yarn](https://classic.yarnpkg.com/en/), [npm](https://www.npmjs.com), etc. - -::: tip - -- When using [pnpm](https://pnpm.io/), you need to install `vue` as peer-dependencies. -- When using [yarn 2+](https://yarnpkg.com/), you need to set `nodeLinker: 'node-modules'` in your [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) file. - -::: - -### Project Setup - -#### Setup via CLI - -You can use [create-vuepress](https://www.npmjs.com/package/create-vuepress) to generate a template directly. - -::: code-tabs#shell - -@tab pnpm - -```bash -pnpm create vuepress vuepress-starter -``` - -@tab yarn - -```bash -yarn create vuepress vuepress-starter -``` - -@tab npm - -```bash -npm init vuepress vuepress-starter -``` - -::: - -#### Setup Manually - -This section will help you build a basic VuePress documentation site from ground up. - -- Create and change into a new directory - -```bash -mkdir vuepress-starter -cd vuepress-starter -``` - -- Initialize your project - -::: code-tabs#shell - -@tab pnpm - -```bash -git init -pnpm init -``` - -@tab yarn - -```bash -git init -yarn init -``` - -@tab npm - -```bash -git init -npm init -``` - -::: - -- Install VuePress - -::: code-tabs#shell - -@tab pnpm - -```bash -# install vuepress and vue -pnpm add -D vuepress@next vue -# install bundler and theme -pnpm add -D @vuepress/bundler-vite@next @vuepress/theme-default@next -``` - -@tab yarn - -```bash -# install vuepress -yarn add -D vuepress@next -# install bundler and theme -yarn add -D @vuepress/bundler-vite@next @vuepress/theme-default@next -``` - -@tab npm - -```bash -# install vuepress -npm install -D vuepress@next -# install bundler and theme -npm install -D @vuepress/bundler-vite@next @vuepress/theme-default@next -``` - -::: - -- Create `docs` directory and `docs/.vuepress` directory - -```bash -mkdir docs -mkdir docs/.vuepress -``` - -- Create the VuePress config file `docs/.vuepress/config.js` - -```ts -import { viteBundler } from '@vuepress/bundler-vite' -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - bundler: viteBundler(), - theme: defaultTheme(), -}) -``` - -- Create your first document - -```bash -echo '# Hello VuePress' > docs/README.md -``` - -## Directory Structure - -After the setup, the minimal structure of your project should look like this: - -``` -├─ docs -│ ├─ .vuepress -│ │ └─ config.js -│ └─ README.md -└─ package.json -``` - -The `docs` directory is where you put your markdown files, and it will be used as the source directory of VuePress. - -The `docs/.vuepress` directory, i.e. the `.vuepress` directory in the source directory, is where all VuePress-specific files will be placed. Currently there is only one config file in it. By default, the temp, cache and output directory will also be generated inside this directory. It is suggested to add them to your `.gitignore` file. - -::: details Example `.gitignore` file - -``` -# VuePress default temp directory -.vuepress/.temp -# VuePress default cache directory -.vuepress/.cache -# VuePress default build output directory -.vuepress/dist -``` - -::: - -## Work with VuePress - -### Start Dev Server - -You can add some [scripts](https://classic.yarnpkg.com/en/docs/package-json#toc-scripts) to `package.json`: - -```json -{ - "scripts": { - "docs:dev": "vuepress dev docs", - "docs:build": "vuepress build docs" - } -} -``` - -Then, run `docs:dev` script to start the dev server: - -::: code-tabs#shell - -@tab pnpm - -```bash -pnpm docs:dev -``` - -@tab yarn - -```bash -yarn docs:dev -``` - -@tab npm - -```bash -npm run docs:dev -``` - -::: - -VuePress will start a hot-reloading development server at [http://localhost:8080](http://localhost:8080). When you modify your markdown files, the content in the browser will be auto updated. - -### Build Your Site - -To build your site, run `docs:build` script: - -::: code-tabs#shell - -@tab pnpm - -```bash -pnpm docs:build -``` - -@tab yarn - -```bash -yarn docs:build -``` - -@tab npm - -```bash -npm run docs:build -``` - -::: - -You will see the generated static files in the `docs/.vuepress/dist` directory. You can check out [deployment](./deployment.md) for how to deploy them. - -## Learn More about VuePress - -By now, you should have a basic but functional VuePress site. But you may still need to read the subsequent guide to learn more about VuePress. - -Next step, learn more about the [configuration](./configuration.md). diff --git a/docs/guide/i18n.md b/docs/guide/i18n.md deleted file mode 100644 index bf572ef0..00000000 --- a/docs/guide/i18n.md +++ /dev/null @@ -1,78 +0,0 @@ -# I18n - -## Site I18n Config - -To take advantage of multi-language support in VuePress, you first need to use the following file and directory structure: - -``` -docs -├─ README.md -├─ foo.md -├─ nested -│  └─ README.md -└─ zh - ├─ README.md - ├─ foo.md - └─ nested -    └─ README.md -``` - -Then, specify the `locales` option in your [config file](./configuration.md#config-file): - -```ts -export default { - locales: { - // The key is the path for the locale to be nested under. - // As a special case, the default locale can use '/' as its path. - '/': { - lang: 'en-US', - title: 'VuePress', - description: 'Vue-powered Static Site Generator', - }, - '/zh/': { - lang: 'zh-CN', - title: 'VuePress', - description: 'Vue 驱动的静态网站生成器', - }, - }, -} -``` - -If a locale does not have a `lang`, `title`, `description` or `head`, VuePress will fallback to the root-level values. You can omit the root level config as long as they are provided in each locale. - -::: tip -Config reference: [locales](../reference/config.md#locales) -::: - -## Theme I18n Config - -VuePress does not restrict how themes provide multi-language support, so each theme may have different way to handle i18n, and some themes may not provide multi-language support at all. You'd better refer to the theme documentation for detailed guide. - -If you are using default theme, the multi-language support is the same as above: - -```ts -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - theme: defaultTheme({ - locales: { - '/': { - selectLanguageName: 'English', - }, - '/zh/': { - selectLanguageName: '简体中文', - }, - }, - }), -}) -``` - -::: tip - -Config reference: - -- [Default Theme > Config](https://ecosystem.vuejs.press/themes/default/config.html) -- [Default Theme > Locale config](https://ecosystem.vuejs.press/themes/default/locale.html) - -::: diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md deleted file mode 100644 index 9157eb6f..00000000 --- a/docs/guide/introduction.md +++ /dev/null @@ -1,25 +0,0 @@ -# Introduction - -VuePress is a markdown-centered static site generator (SSG). You can write your content (documentations, blogs, etc.) in [Markdown](https://en.wikipedia.org/wiki/Markdown), then VuePress will help you to generate a static site to host them. - -The purpose of creating VuePress was to support the documentation of Vue.js and its sub-projects, but now it has been helping a large amount of users to build their documentation, blogs, and other static sites. - -## How It Works - -A VuePress site is in fact a single-page application (SPA) powered by [Vue](https://vuejs.org/) and [Vue Router](https://router.vuejs.org). - -Routes are generated according to the relative path of your markdown files. Each Markdown file is compiled into HTML with [markdown-it](https://github.com/markdown-it/markdown-it) and then processed as the template of a Vue component. This allows you to directly use Vue inside your Markdown files and is great when you need to embed dynamic content. - -During development, we start a normal dev-server, and serve the VuePress site as a normal SPA. If you’ve used Vue before, you will notice the familiar development experience when you are writing and developing with VuePress. - -During build, we create a server-rendered version of the VuePress site and render the corresponding HTML by virtually visiting each route. This approach is inspired by [Nuxt](https://nuxtjs.org/)'s `nuxt generate` command and other projects like [Gatsby](https://www.gatsbyjs.org/). - -## VuePress and VitePress: The Connection - -VitePress can be seen as the younger sibling of VuePress. Both were originally created by Evan You, the author of Vue.js. Today, VitePress is maintained by the Vue.js team, while VuePress is maintained by the VuePress team. - -The history goes like this: VuePress v0 and v1 were built on top of Webpack. Later, when Evan created Vite, he started a new static site generator based on it — VitePress — reusing some ideas and code from VuePress. At the same time, the community forked the VuePress v2 branch, continued its development, and added support for both Webpack and Vite. - -At one point, we discussed merging the two projects under the VuePress brand. However, over time their goals and technical directions diverged. As a result, the Vue.js team chose to focus on VitePress, while the community — now the VuePress team — took over VuePress and continues to drive its development forward. - -As a user, you can choose either project depending on your needs. VitePress is tightly integrated with Vite. VuePress, on the other hand, is designed to support different bundlers: it supports Webpack and Vite today, and open to any other bundlers. In addition, VuePress has an official [ecosystem](https://ecosystem.vuejs.press/) project and provides a wide range of plugins, making it easier to build sites with features. diff --git a/docs/guide/markdown.md b/docs/guide/markdown.md deleted file mode 100644 index 3d24a946..00000000 --- a/docs/guide/markdown.md +++ /dev/null @@ -1,508 +0,0 @@ -# Markdown - -Make sure you already know Markdown well before reading this section. If not, please learn some [Markdown tutorials](https://commonmark.org/help/) first. - -## Syntax Extensions - -The Markdown content in VuePress will be parsed by [markdown-it](https://github.com/markdown-it/markdown-it), which supports [syntax extensions](https://github.com/markdown-it/markdown-it#syntax-extensions) via markdown-it plugins. - -This section will introduce built-in Markdown syntax extensions of VuePress. - -You can also configure those built-in extensions, load more markdown-it plugins and implement your own extensions via [markdown](../reference/config.md#markdown) option and [extendsMarkdown](../reference/plugin-api.md#extendsmarkdown) option. - -### Embedded - -Embedded by markdown-it: - -- [Tables](https://help.github.com/articles/organizing-information-with-tables/) (GFM) -- [Strikethrough](https://help.github.com/articles/basic-writing-and-formatting-syntax/#styling-text) (GFM) - -### Header Anchors - -You might have noticed that, a `#` anchor is displayed when you hover the mouse on the headers of each section. By clicking the `#` anchor, you can jump to the section directly. - -::: tip -This header anchors extension is supported by [markdown-it-anchor](https://github.com/valeriangalliat/markdown-it-anchor). - -Config reference: [markdown.anchor](../reference/config.md#markdown-anchor) -::: - -### Links - -When using Markdown [link syntax](https://spec.commonmark.org/0.29/#link-reference-definitions), VuePress will implement some conversions for you. - -Take our documentation source files as an example: - -```bash -└─ docs - ├─ guide - │ ├─ getting-started.md - │ ├─ introduction.md - │ └─ markdown.md # <- Here we are - ├─ reference - │ └─ config.md - └─ README.md -``` - -**Raw Markdown** - -```md - - -[Home](../README.md) -[Config Reference](../reference/config.md) -[Getting Started](./getting-started.md) - - - -[Guide > Introduction](/guide/introduction.md) -[Config Reference > markdown.links](/reference/config.md#links) - - - -[GitHub](https://github.com) -``` - -**Converted to** - -```vue - -``` - -**Rendered as** - -[Home](../README.md) -[Config Reference](../reference/config.md) -[Getting Started](./getting-started.md) -[Guide > Introduction](/guide/introduction.md) -[Config Reference > markdown.links](/reference/config.md#links) -[GitHub](https://github.com) - -**Explanation** - -- Internal links will be converted to [RouteLink](../reference/components.md#routelink) for SPA navigation. -- Internal links to `.md` files will be converted to the [page route path](./page.md#routing), and both absolute path and relative path are supported. -- External links will get `target="_blank" rel="noopener noreferrer"` attrs. - -**Suggestion** - -Try to use relative paths instead of absolute paths for internal links to markdown files. - -- Relative paths are a valid links to the target files, and they can navigate correctly when browsing the source files in your editor or repository. -- Relative paths are consistent in different locales, so you don't need to change the locale path when translating your content. - -::: tip -This links extension is supported by our built-in plugin. - -Config reference: [markdown.links](../reference/config.md#markdown-links) -::: - -### Emoji :tada: - -You can add emoji to your Markdown content by typing `:EMOJICODE:`. - -For a full list of available emoji and codes, check out [emoji-cheat-sheet](https://github.com/ikatyang/emoji-cheat-sheet). - -**Input** - -```md -VuePress 2 is out :tada: ! -``` - -**Output** - -VuePress 2 is out :tada: ! - -::: tip -This emoji extension is supported by [markdown-it-emoji](https://github.com/markdown-it/markdown-it-emoji). - -Config reference: [markdown.emoji](../reference/config.md#markdown-emoji) -::: - -### Table of Contents - -If you want to put the table of contents (TOC) of your current page inside your Markdown content, you can use the `[[toc]]` syntax. - -**Input** - -```md -[[toc]] -``` - -**Output** - -[[toc]] - -The headers in TOC will link to the corresponding [header anchors](#header-anchors), so TOC won't work well if you disable header anchors. - -::: tip -This toc extension is supported by [@mdit-vue/plugin-toc](https://github.com/mdit-vue/mdit-vue/tree/main/packages/plugin-toc). - -Config reference: [markdown.toc](../reference/config.md#markdown-toc) -::: - -### Code Blocks - -Following code blocks extensions are implemented during markdown parsing in Node side. That means, the code blocks won't be processed in client side. - -With [@vuepress/plugin-prismjs][prismjs] and [@vuepress/plugin-shiki][shiki], you can highlight code blocks with [Prism](https://prismjs.com/) or [Shiki](https://shiki.style/). - -#### Code Title - -You can specify the title of the code block by adding a `title` key-value mark in your fenced code blocks. - -**Input** - -````md -```ts title=".vuepress/config.ts" -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - title: 'Hello, VuePress', - - theme: defaultTheme({ - logo: 'https://vuejs.org/images/logo.png', - }), -}) -``` -```` - -**Output** - -```ts title=".vuepress/config.ts" -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - title: 'Hello, VuePress', - - theme: defaultTheme({ - logo: 'https://vuejs.org/images/logo.png', - }), -}) -``` - -::: tip - -Code title is supported by highlight plugins by default. It can be used in combination with the other marks below. Please leave a space between them. - -::: - -#### Line Highlighting - -You can highlight specified lines of your code blocks by adding line ranges mark in your fenced code blocks. - -**Input** - -````md -```ts{1,7-9} -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - title: 'Hello, VuePress', - - theme: defaultTheme({ - logo: 'https://vuejs.org/images/logo.png', - }), -}) -``` -```` - -**Output** - -```ts{1,7-9} -import { defaultTheme } from '@vuepress/theme-default' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - title: 'Hello, VuePress', - - theme: defaultTheme({ - logo: 'https://vuejs.org/images/logo.png', - }), -}) -``` - -Examples for line ranges mark: - -- Line ranges: `{5-8}` -- Multiple single lines: `{4,7,9}` -- Combined: `{4,7-13,16,23-27,40}` - -::: tip - -Line highlighting extension is supported by highlighter plugins. - -Config reference: [prism line highlighting](https://ecosystem.vuejs.press/plugins/markdown/prismjs.html#highlightlines) and [shiki highlighting](https://ecosystem.vuejs.press/plugins/markdown/shiki.html#highlightlines). - -::: - -#### Line Numbers - -You must have noticed that the number of lines is displayed on the left side of code blocks. - -You can add `:line-numbers` / `:no-line-numbers` mark in your fenced code blocks to override the value set in config. - -**Input** - -````md -```ts -// line-numbers is enabled by default -const line2 = 'This is line 2' -const line3 = 'This is line 3' -``` - -```ts:no-line-numbers -// line-numbers is disabled -const line2 = 'This is line 2' -const line3 = 'This is line 3' -``` -```` - -**Output** - -```ts -// line-numbers is enabled by default -const line2 = 'This is line 2' -const line3 = 'This is line 3' -``` - -```ts:no-line-numbers -// line-numbers is disabled -const line2 = 'This is line 2' -const line3 = 'This is line 3' -``` - -::: tip - -Line numbers extension is supported by highlighter plugins. - -Config reference: [prism line numbers](https://ecosystem.vuejs.press/plugins/markdown/prismjs.html#linenumbers) and [shiki line numbers](https://ecosystem.vuejs.press/plugins/markdown/shiki.html#linenumbers). - -::: - -#### Wrap with v-pre - -As [template syntax is allowed in Markdown](#template-syntax), it would also work in code blocks, too. - -To avoid your code blocks being compiled by Vue, VuePress will add [v-pre](https://vuejs.org/api/built-in-directives.html#v-pre) directive to your code blocks by default, which can be disabled in config. - -You can add `:v-pre` / `:no-v-pre` mark in your fenced code blocks to override the value set in config. - -::: warning -The template syntax characters, for example, the "Mustache" syntax (double curly braces) might be parsed by the syntax highlighter. Thus, as the following example, `:no-v-pre` might not work well in some languages. - -If you want to make Vue syntax work in those languages anyway, try to disable the default syntax highlighting and implement your own syntax highlighting in client side. -::: - -**Input** - -````md -```md - - -1 + 2 + 3 = {{ 1 + 2 + 3 }} -``` - -```md:no-v-pre - - -1 + 2 + 3 = {{ 1 + 2 + 3 }} -``` - -```js:no-v-pre -// This won't be compiled correctly because of js syntax highlighting -const onePlusTwoPlusThree = {{ 1 + 2 + 3 }} -``` -```` - -**Output** - -```md - - -1 + 2 + 3 = {{ 1 + 2 + 3 }} -``` - -```md:no-v-pre - - -1 + 2 + 3 = {{ 1 + 2 + 3 }} -``` - - - -```js -// This won't be compiled correctly because of js syntax highlighting -const onePlusTwoPlusThree = {{ 1 + 2 + 3 }} -``` - -::: tip - -This v-pre extension is supported by our built-in plugin. - -Config reference: [markdown.vPre.block](../reference/config.md#markdown-vpre-block) - -::: - -### Import Code Blocks - -You can import code blocks from files with following syntax: - -```md - - -@[code](../foo.js) -``` - -If you want to partially import the file: - -```md - - -@[code{1-10}](../foo.js) -``` - -The code language is inferred from the file extension, while it is recommended to specify it explicitly: - -```md - - -@[code js](../foo.js) -``` - -In fact, the second part inside the `[]` will be treated as the mark of the code fence, so it supports all the syntax mentioned in the above [Code Blocks](#code-blocks) section: - -```md - - -@[code js{2,4-5}](../foo.js) -``` - -Here is a complex example: - -- import line 3 to line 10 of the `'../foo.js'` file -- specify the language as `'js'` -- highlight line 3 of the imported code, i.e. line 5 of the `'../foo.js'` file -- disable line numbers - -```md -@[code{3-10} js{3}:no-line-numbers](../foo.js) -``` - -Notice that path aliases are not available in import code syntax. You can use following config to handle path alias yourself: - -```ts -import { getDirname, path } from 'vuepress/utils' - -const __dirname = getDirname(import.meta.url) - -export default { - markdown: { - importCode: { - handleImportPath: (str) => - str.replace(/^@src/, path.resolve(__dirname, 'path/to/src')), - }, - }, -} -``` - -```md - - -@[code](@src/foo.js) -``` - -::: tip -This import code extension is supported by our built-in plugin. - -Config reference: [markdown.importCode](../reference/config.md#markdown-importcode) -::: - -## Using Vue in Markdown - -This section will introduce some basic usage of Vue in Markdown. - -Check out [Cookbook > Markdown and Vue SFC](../advanced/cookbook/markdown-and-vue-sfc.md) for more details. - -### Template Syntax - -As we know: - -- HTML is allowed in Markdown. -- Vue template syntax is compatible with HTML. - -That means, [Vue template syntax](https://vuejs.org/guide/essentials/template-syntax.html) is allowed in Markdown. - -**Input** - -```md -One plus one equals: {{ 1 + 1 }} - - span: {{ i }} -``` - -**Output** - -One plus one equals: {{ 1 + 1 }} - - span: {{ i }} - -### Components - -You can use Vue components directly in Markdown. - -**Input** - -```md -This is default theme built-in `` component -``` - -**Output** - -This is default theme built-in `` component - -::: tip -Check out the [Built-in Components](../reference/components.md) for a full list of built-in components. - -Check out the [Default Theme > Built-in Components](https://ecosystem.vuejs.press/themes/default/components.html) for a full list of default theme built-in components. -::: - -## Markdown Plugins - -You can explore more markdown plugins at [VuePress Marketplace](https://marketplace.vuejs.press/plugins/markdown.html). - -## Cautions - -### Non-Standard HTML Tags - -Non-standard HTML tags would not be recognized as native HTML tags by Vue template compiler. Instead, Vue will try to resolve those tags as Vue components, and obviously these components usually don't exist. For example: - -- Deprecated HTML tags such as [\
    ](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center) and [\](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font). -- [MathML tags](https://developer.mozilla.org/en-US/docs/Web/MathML), which might be used by some markdown-it LaTeX plugin. - -If you want to use those tags anyway, try either of the following workarounds: - -- Adding a [v-pre](https://vuejs.org/api/built-in-directives.html#v-pre) directive to skip the compilation of the element and its children. Notice that the template syntax would also be invalid. -- Using [compilerOptions.isCustomElement](https://vuejs.org/api/application.html#app-config-compileroptions) to tell Vue template compiler not try to resolve them as components. - - For `@vuepress/bundler-webpack`, set [vue.compilerOptions](../reference/bundler/webpack.md#vue) - - For `@vuepress/bundler-vite`, set [vuePluginOptions.template.compilerOptions](../reference/bundler/vite.md#vuepluginoptions) - -[prismjs]: https://ecosystem.vuejs.press/plugins/markdown/prismjs.html -[shiki]: https://ecosystem.vuejs.press/plugins/markdown/shiki.html diff --git a/docs/guide/migration.md b/docs/guide/migration.md deleted file mode 100644 index 48434049..00000000 --- a/docs/guide/migration.md +++ /dev/null @@ -1,443 +0,0 @@ -# Migrating from v1 - -::: warning -Plugins and themes of VuePress v1 are not compatible with VuePress v2. You need to update them to corresponding v2 version. -::: - -Some major changes and enhancements of VuePress v2: - -- VuePress v2 is now using Vue 3, so make sure your components and other client files are compatible with Vue 3. -- VuePress v2 is developed with TypeScript, so it provides better TS support now. It's highly recommended to use TypeScript to develop plugins and themes. VuePress config file also supports TypeScript, and you can use `.vuepress/config.ts` directly. -- VuePress v2 supports both Webpack and Vite as bundler. You can choose the bundler you like in your config file. -- VuePress v2 is now released as pure ESM packages, and CommonJS config files are no longer supported. - -Core ideas and processes of VuePress v2 are the same with v1, while v2 API has been re-designed and becomes more normalized. So you might encounter breaking changes when migrating an existing v1 project to v2. This guide is here to help you migrating v1 sites / plugins / themes to v2. - -- If you are a common user, you need to read the guide [for users](#for-users). -- If you are a plugin author, you need to read the guide [for plugin authors](#for-plugin-authors). -- If you are a theme author, you need to read the guide [for theme authors](#for-theme-authors). - -## For Users - -### User Config Change - -Config file should be in ESM format, and CommonJS format config file is no longer supported. - -```diff title=".vuepress/config.ts" -- module.exports = { -- // user config -- } - -+ import { defineUserConfig } from 'vuepress' -+ -+ export default defineUserConfig({ -+ // user config -+ }) -``` - -#### bundler - -Now we support using different bundlers. - -Install and use the vite bundler in your config file: - -```bash -npm i -D @vuepress/bundler-vite@next -``` - -```ts title=".vuepress/config.ts" -import { viteBundler } from '@vuepress/bundler-vite' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - bundler: viteBundler(), -}) -``` - -Or using the webpack bundler: - -```bash -npm i -D @vuepress/bundler-webpack@next -``` - -```ts title=".vuepress/config.ts" -import { webpackBundler } from '@vuepress/bundler-webpack' -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - bundler: webpackBundler(), -}) -``` - -#### theme - -Using a theme via string is not supported, and the default theme is not integrated into vuepress package by default. - -Install and use the default theme in your config file: - -```bash -npm i -D @vuepress/theme-default@next -``` - -```diff title=".vuepress/config.ts" -- module.exports = { -- theme: '@vuepress/theme-default', -- themeConfig: { -- // default theme config -- }, -- } - -+ import { defaultTheme } from '@vuepress/theme-default' -+ import { defineUserConfig } from 'vuepress' -+ -+ export default defineUserConfig({ -+ theme: defaultTheme({ -+ // default theme config -+ }), -+ }) -``` - -#### themeConfig - -Removed. Set config to the theme directly. - -#### plugins - -Using a plugin via string is not supported. Import the plugin directly. - -```diff title=".vuepress/config.ts" -- module.exports = { -- plugins: [ -- [ -- '@vuepress/plugin-google-analytics', -- { -- id: 'G-XXXXXXXXXX', -- }, -- ], -- ], -- } - -+ import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' -+ import { defineUserConfig } from 'vuepress' -+ -+ export default defineUserConfig({ -+ plugins: [ -+ googleAnalyticsPlugin({ -+ id: 'G-XXXXXXXXXX', -+ }), -+ ], -+ }) -``` - -#### shouldPrefetch - -Default value is changed from `() => true` to `true`. - -#### extraWatchFiles - -Removed. - -You can watch files manually in [onWatched](../reference/plugin-api.md#onwatched) hook. - -#### patterns - -Renamed to `pagePatterns` - -#### markdown.lineNumbers - -Removed. - -The same feature is implemented in [@vuepress/plugin-prismjs][prismjs] and [@vuepress/plugin-shiki][shiki]. - -#### markdown.pageSuffix - -Removed. - -#### markdown.externalLinks - -Moved to [markdown.links.externalAttrs](../reference/config.md#markdown-links). - -#### markdown.toc - -Changed. - -See [Config > markdown.toc](../reference/config.md#markdown-toc) - -#### markdown.plugins - -Removed. - -Use markdown-it plugins in [extendsMarkdown](../reference/plugin-api.md#extendsmarkdown) hook. - -#### markdown.extendMarkdown - -Removed. - -Use [extendsMarkdown](../reference/plugin-api.md#extendsmarkdown) hook. - -#### markdown.extractHeaders - -Moved to [markdown.headers](../reference/config.md#markdown-headers). - -#### Webpack Related Configs - -All webpack related configs are moved to options of `@vuepress/bundler-webpack`, including: - -- `postcss` -- `stylus` -- `scss` -- `sass` -- `less` -- `chainWebpack` -- `configureWebpack` -- `evergreen`: default value is changed from `false` to `true` - -```diff title=".vuepress/config.ts" -- module.exports = { -- sass: { /* ... */ }, -- } - -+ import { webpackBundler } from '@vuepress/bundler-webpack' -+ import { defineUserConfig } from 'vuepress' -+ -+ export default defineUserConfig({ -+ bundler: webpackBundler({ -+ sass: { /* ... */ }, -+ }), -+ }) -``` - -Please refer to [Guide > Bundler](./bundler.md). - -### Frontmatter Change - -#### meta - -Removed. - -Use [head](../reference/frontmatter.md#head) instead. For example: - -```yaml -head: - - - meta - - name: foo - content: bar - - - link - - rel: canonical - href: foobar - - - script - - {} - - console.log('hello from frontmatter'); -``` - -Has the same structure with: - -```ts title=".vuepress/config.ts" -import { defineUserConfig } from 'vuepress' - -export default defineUserConfig({ - // ... - head: [ - ['meta', { name: 'foo', content: 'bar' }], - ['link', { rel: 'canonical', href: 'foobar' }], - ['script', {}, `console.log('hello from frontmatter');`], - ], - // ... -}) -``` - -### Permalink Patterns Change - -- `:i_month`: removed -- `:i_day`: removed -- `:minutes`: removed (undocumented in v1) -- `:seconds`: removed (undocumented in v1) -- `:regular`: renamed to `:raw` - -See [Frontmatter > permalinkPattern](../reference/frontmatter.md#permalinkpattern). - -### Palette System Change - -The stylus palette system of VuePress v1 (i.e. `styles/palette.styl` and `styles/index.styl`) is no longer provided by VuePress Core. - -The palette system is extracted to [@vuepress/plugin-palette](https://ecosystem.vuejs.press/plugins/palette.html). - -Theme authors can use their own way to allow users to customize styles, and not be limited with stylus. - -If you are using default theme, the palette system is still available but migrated to SASS, while most variables have been migrated to CSS variables. See [Default Theme > Styles](https://ecosystem.vuejs.press/themes/default/styles.html). - -### Conventional Files Change - -#### .vuepress/enhanceApp.js - -Renamed to `.vuepress/client.{js,ts}`, and the usage has been changed, too. - -See [Advanced > Cookbook > Usage of Client Config](../advanced/cookbook/usage-of-client-config.md). - -#### .vuepress/components/ - -Files in this directory will not be registered as Vue components automatically. - -You need to use [@vuepress/plugin-register-components](https://ecosystem.vuejs.press/plugins/register-components.html), or register your components manually in `.vuepress/client.{js,ts}`. - -#### .vuepress/theme/ - -This directory will not be used as local theme implicitly if it is existed. - -You need to import and set your local theme via [theme](../reference/config.md#theme) option. - -### Markdown Change - -- Markdown slot is no longer supported. -- Markdown image syntax does not support webpack aliases anymore. Links without `./` prefix are also treated as relative links, which is aligned with the behavior of the native markdown image syntax. If you want to use aliases in image paths, or use images from external packages, you should use `` tag instead. - -```diff -- ![](@alias/foo.png) -- ![](package-name/bar.png) - -+ -+ -``` - -### CLI Change - -#### eject command - -Removed. - -#### cache options - -- `-c, --cache [cache]`: changed to `--cache `, which means that the shorthand `-c` is not for `cache` option, and the value of `cache` option is not optional. -- `--no-cache`: renamed to `--clean-cache` . - -### Default Theme Change - -#### Built-in Components - -- `` and `` are replaced by [code tab feature](https://ecosystem.vuejs.press/themes/default/markdown.html#code-tabs) -- `` - - `$badgeErrorColor` palette variable renamed to `$badgeDangerColor` - - `type` prop only accepts `tip`, `warning` and `danger` now - -#### Palette System - -The palette system of default theme has migrated to SASS and CSS variables. - -See [Default Theme > Styles](https://ecosystem.vuejs.press/themes/default/styles.html). - -#### Theme Config - -Default theme config has been changed a lot. You'd better check the config reference of v2 default theme to migrate it properly. - -See [Default Theme > Config](https://ecosystem.vuejs.press/themes/default/config.html). - -Here we list some notable changes: - -##### Sidebar Config - -```diff -- sidebar: { -- title: 'Foo Bar', -- path: '/foo/bar.html', -- collapsable: true, -- children: [ -- ['/baz', 'Baz'], -- ], -- } - -+ sidebar: { -+ text: 'Foo Bar', -+ link: '/foo/bar.html', -+ collapsible: true, -+ children: [ -+ { -+ text: 'Baz', -+ link: '/baz', -+ } -+ ], -+ } -``` - -### Official Plugins Change - -Check the v2 docs of official plugins. - -### Community Themes and Plugins - -Themes and plugins of v1 are not compatible with v2. - -Please make sure that those themes and plugins you are using have supported v2, and refer to their own documentation for migration guide. - -## For Plugin Authors - -Some major breaking changes: - -- You cannot use other plugins in your plugin anymore, which avoids lots of potential issues caused by plugin nesting. If your plugin depends on other plugins, you could list them in the docs to ask users import them manually. Alternatively, you can provide users with an array of plugins for convenience. -- Most of the v1 hooks have equivalents in v2. The only exception is `extendsCli`, which has been removed. -- Webpack related hooks are removed, because VuePress Core has decoupled with webpack. You can try to use [extendsBundlerOptions](../reference/plugin-api.md#extendsbundleroptions) hook for similar purpose, and make sure to work with all bundlers. - -For more detailed guide about how to write a plugin in v2, see [Advanced > Writing a Plugin](../advanced/plugin.md). - -### Plugin API Change - -- `plugins`: removed -- `ready`: renamed to `onPrepared` -- `updated`: renamed to `onWatched` -- `generated`: renamed to `onGenerated` -- `additionalPages`: removed, use `app.pages.push(createPage())` in `onInitialized` hook -- `clientDynamicModules`: removed, use `app.writeTemp()` in `onPrepared` hook -- `enhanceAppFiles`: removed, use `clientConfigFile` hook -- `globalUIComponents`: removed, use `clientConfigFile` hook -- `clientRootMixin`: removed, use `clientConfigFile` hook -- `extendMarkdown`: renamed to `extendsMarkdown` -- `chainMarkdown`: removed -- `extendPageData`: renamed to `extendsPage` -- `extendsCli`: removed -- `configureWebpack`: removed -- `chainWebpack`: removed -- `beforeDevServer`: removed -- `afterDevServer`: removed - -See [Plugin API](../reference/plugin-api.md). - -## For Theme Authors - -Although we do not allow using other plugins in a plugin anymore, you can still use plugins in your theme. - -Some major breaking changes: - -- There is no **conventional theme directory structure** anymore. - - The file `theme/enhanceApp.js` will not be used as client app enhance file implicitly. You need to specify it explicitly in `clientConfigFile` hook. - - Files in `theme/global-components/` directory will not be registered as Vue components automatically. You need to use [@vuepress/plugin-register-components](https://ecosystem.vuejs.press/plugins/register-components.html), or register components manually in `clientConfigFile`. - - Files in `theme/layouts/` directory will not be registered as layout components automatically. You need to specify it explicitly in `layouts` option in `clientConfigFile`. - - Files in `theme/templates/` directory will not be used as dev / ssr template automatically. You need to specify theme explicitly in `templateBuild` and `templateDev` option. - - Always provide a valid js entry file, and do not use `"main": "layouts/Layout.vue"` as the theme entry anymore. -- `themeConfig` is removed from user config and site data. To access the `themeConfig` as you would via `this.$site.themeConfig` in v1, we now recommend using the [@vuepress/plugin-theme-data](https://ecosystem.vuejs.press/plugins/theme-data.html) plugin and its `useThemeData` composition API. -- Stylus is no longer the default CSS pre-processor, and the stylus palette system is not embedded. If you still want to use similar palette system as v1, [@vuepress/plugin-palette](https://ecosystem.vuejs.press/plugins/palette.html) may help. -- Markdown code blocks syntax highlighting by Prism.js is not embedded by default. You can use either [@vuepress/plugin-prismjs][prismjs] or [@vuepress/plugin-shiki][shiki], or implement syntax highlighting in your own way. -- For scalability concerns, `this.$site.pages` is not available any more. See [Advanced > Cookbook > Resolving Routes](../advanced/cookbook/resolving-routes.md) for how to retrieve pages data in v2. - -For more detailed guide about how to write a theme in v2, see [Advanced > Writing a Theme](../advanced/theme.md). - -### Theme API Change - -#### layouts - -Removed. - -Now you need to specify layout component in the client config file of your theme. - -See [Advanced > Writing a theme](../advanced/theme.md). - -#### extend - -Renamed to `extends`. - -You can still inherit a parent theme with `extends: parentTheme()`, which will extends the plugins, layouts, etc. - -You can refer to [Default Theme > Extending](https://ecosystem.vuejs.press/themes/default/extending.html) for how to extend default theme. - -The `@theme` and `@parent-theme` aliases are removed by default, but you can still make a extendable theme with similar approach, see [Advanced > Cookbook > Making a Theme Extendable](../advanced/cookbook/making-a-theme-extendable.md). - -[prismjs]: https://ecosystem.vuejs.press/plugins/prismjs.html -[shiki]: https://ecosystem.vuejs.press/plugins/shiki.html diff --git a/docs/guide/page.md b/docs/guide/page.md deleted file mode 100644 index f16469fd..00000000 --- a/docs/guide/page.md +++ /dev/null @@ -1,64 +0,0 @@ -# Page - -VuePress is markdown-centered. Each markdown file inside your project is a standalone page. - -## Routing - -By default, the route path of a page is determined by the relative path of your markdown file. - -Assuming this is the directory structure of your markdown files: - -``` -└─ docs - ├─ guide - │ ├─ getting-started.md - │ └─ README.md - ├─ contributing.md - └─ README.md -``` - -Take the `docs` directory as your [sourceDir](../reference/cli.md), e.g. you are running `vuepress dev docs` command. Then the route paths of your markdown files would be: - -| Relative Path | Route Path | -| --------------------------- | ----------------------------- | -| `/README.md` | `/` | -| `/index.md` | `/` | -| `/contributing.md` | `/contributing.html` | -| `/guide/README.md` | `/guide/` | -| `/guide/getting-started.md` | `/guide/getting-started.html` | - -::: tip -By default, both `README.md` and `index.md` would be converted to `index.html` and generate a slash-ending route path. However, it might cause conflicts if you want to keep both of the two files. - -In such case, you can set the [pagePatterns](../reference/config.md#pagepatterns) to avoid one of them being processed by VuePress, e.g. use `['**/*.md', '!**/README.md', '!.vuepress', '!node_modules']` to exclude all `README.md` files. - -Also, some symbols like `:` and `+` may have special meanings for vue-router, so you should avoid using them, see [vue-router docs](https://router.vuejs.org/guide/essentials/route-matching-syntax.html) for more details. -::: - -## Frontmatter - -A markdown file could contain a [YAML](https://yaml.org/) frontmatter. The frontmatter must be at the top of the Markdown file and must be wrapped with a couple of triple-dashed lines. Here is a basic example: - -```md ---- -lang: en-US -title: Title of this page -description: Description of this page ---- -``` - -You must have noticed that those fields are similar with the [Site Config](./configuration.md#site-config) in the [Config File](./configuration.md#config-file). You can override `lang`, `title`, `description`, etc., of current page via frontmatter. So you can take frontmatter as page scope config. - -Also, VuePress has built-in support for some frontmatter fields, and your theme may have its own special frontmatter, too. - -::: tip -Check out the [Frontmatter Reference](../reference/frontmatter.md) for a full list of VuePress built-in frontmatter. - -Check out the [Default Theme > Frontmatter Reference](https://ecosystem.vuejs.press/themes/default/frontmatter.html) for the frontmatter of default theme. -::: - -## Content - -The main content of your page is written in Markdown. VuePress will firstly transform your Markdown to HTML code, then treat the HTML code as `