vuepress/docs/.vuepress/.cache/deps/@vuepress_shared.js.map

8 lines
8.5 KiB
Plaintext
Raw Normal View History

2024-12-22 15:36:03 +08:00
{
"version": 3,
"sources": ["../../../../node_modules/@vuepress/shared/dist/index.js"],
"sourcesContent": ["// src/utils/links/isLinkWithProtocol.ts\nvar isLinkWithProtocol = (link) => /^[a-z][a-z0-9+.-]*:/.test(link) || link.startsWith(\"//\");\n\n// src/utils/links/isLinkExternal.ts\nvar markdownLinkRegexp = /.md((\\?|#).*)?$/;\nvar isLinkExternal = (link, base = \"/\") => isLinkWithProtocol(link) || // absolute link that does not start with `base` and does not end with `.md`\nlink.startsWith(\"/\") && !link.startsWith(base) && !markdownLinkRegexp.test(link);\n\n// src/utils/links/isLinkHttp.ts\nvar isLinkHttp = (link) => /^(https?:)?\\/\\//.test(link);\n\n// src/utils/routes/inferRoutePath.ts\nvar inferRoutePath = (rawPath) => {\n if (!rawPath || rawPath.endsWith(\"/\")) return rawPath;\n let routePath = rawPath.replace(/(^|\\/)README.md$/i, \"$1index.html\");\n if (routePath.endsWith(\".md\")) {\n routePath = `${routePath.substring(0, routePath.length - 3)}.html`;\n } else if (!routePath.endsWith(\".html\")) {\n routePath = `${routePath}.html`;\n }\n if (routePath.endsWith(\"/index.html\")) {\n routePath = routePath.substring(0, routePath.length - 10);\n }\n return routePath;\n};\n\n// src/utils/routes/normalizeRoutePath.ts\nvar FAKE_HOST = \"http://.\";\nvar normalizeRoutePath = (pathname, current) => {\n if (!pathname.startsWith(\"/\") && current) {\n const loc = current.slice(0, current.lastIndexOf(\"/\"));\n return inferRoutePath(new URL(`${loc}/${pathname}`, FAKE_HOST).pathname);\n }\n return inferRoutePath(pathname);\n};\n\n// src/utils/routes/resolveLocalePath.ts\nvar resolveLocalePath = (locales, routePath) => {\n const localePaths = Object.keys(locales).sort((a, b) => {\n const levelDelta = b.split(\"/\").length - a.split(\"/\").length;\n if (levelDelta !== 0) {\n return levelDelta;\n }\n return b.length - a.length;\n });\n for (const localePath of localePaths) {\n if (routePath.startsWith(localePath)) {\n return localePath;\n }\n }\n return \"/\";\n};\n\n// src/utils/routes/resolveRoutePathFromUrl.ts\nvar resolveRoutePathFromUrl = (url, base = \"/\") => {\n const pathname = url.replace(/^(?:https?:)?\\/\\/[^/]*/, \"\");\n return pathname.startsWith(base) ? `/${pathname.slice(base.length)}` : pathname;\n};\n\n// src/utils/routes/splitPath.ts\nvar SPLIT_CHAR_REGEXP = /(#|\\?)/;\nvar splitPath = (path) => {\n const [pathname, ...hashAndQueries] = path.split(SPLIT_CHAR_REGEXP);\n return {\n pathname,\n hashAndQueries: hashAndQueries.join(\"\")\n };\n};\n\n// src/utils/resolveHeadIdentifier.ts\nvar TAGS_ALLOWED = [\"link\", \"meta\", \"script\", \"style\", \"noscript\", \"template\"];\nvar TAGS_UNIQUE = [\"title\", \"base\"];\nvar resolveHeadIdentifier = ([tag, attrs, content]) => {\n if (TAGS_UNIQUE.includes(tag)) {\n return tag;\n }\n if (!TAGS_ALLOWED.includes(tag)) {\n return null;\n }\n if (tag === \"meta\" && attrs.name) {\n return `${tag}.${attrs.name}`;\n }\n if (tag === \"template\" && attrs.id) {\n return `${tag}.${attrs.id}`;\n }\n return JSON.stringify([\n tag,\n Object.entries(attrs).map(([key, value]) => {\n if (typeof value === \"boolean\") {\n return value ? [key, \"\"] : null;\n }\n return [key, value];\n }).filter((item) => item != null).sort(([keyA], [keyB]) => keyA.localeCompare(keyB)),\n content\n ]);\n};\n\n// src/utils/dedupeHead.ts\nvar dedupeHead = (head) => {\n const identifierSet = /* @__PURE__ */ new Set();\n const result = [];\n head.forEach((item) => {\n const identifier = resolveHeadIdentifier(item);\n if (identifier && !identifierSet.has(identifier)) {\n identifierSet.add(identifier);\n result.push(item);\n }\n });\n return result;\n};\n\n// src/utils/ensureLeadingSlash.ts\nvar ensureLeadingSlash = (str) => str.startsWith(\"/\") ? str : `/${str}`;\n\n// src/utils/ensureEndingSlash.ts\nvar ensureEndingSlash = (str) => str.endsWith(\"/\") || str.endsWith(\".html\") ? str : `${str}/`;\n\n// src/utils/formatDateString.ts\nvar formatDateString = (str, defaultDateString = \"\") => {\n const dateMatch = str.match(/\\b(\\d{
"mappings": ";AACA,IAAI,qBAAqB,CAAC,SAAS,sBAAsB,KAAK,IAAI,KAAK,KAAK,WAAW,IAAI;AAG3F,IAAI,qBAAqB;AACzB,IAAI,iBAAiB,CAAC,MAAM,OAAO,QAAQ,mBAAmB,IAAI;AAClE,KAAK,WAAW,GAAG,KAAK,CAAC,KAAK,WAAW,IAAI,KAAK,CAAC,mBAAmB,KAAK,IAAI;AAG/E,IAAI,aAAa,CAAC,SAAS,kBAAkB,KAAK,IAAI;AAGtD,IAAI,iBAAiB,CAAC,YAAY;AAChC,MAAI,CAAC,WAAW,QAAQ,SAAS,GAAG,EAAG,QAAO;AAC9C,MAAI,YAAY,QAAQ,QAAQ,qBAAqB,cAAc;AACnE,MAAI,UAAU,SAAS,KAAK,GAAG;AAC7B,gBAAY,GAAG,UAAU,UAAU,GAAG,UAAU,SAAS,CAAC,CAAC;AAAA,EAC7D,WAAW,CAAC,UAAU,SAAS,OAAO,GAAG;AACvC,gBAAY,GAAG,SAAS;AAAA,EAC1B;AACA,MAAI,UAAU,SAAS,aAAa,GAAG;AACrC,gBAAY,UAAU,UAAU,GAAG,UAAU,SAAS,EAAE;AAAA,EAC1D;AACA,SAAO;AACT;AAGA,IAAI,YAAY;AAChB,IAAI,qBAAqB,CAAC,UAAU,YAAY;AAC9C,MAAI,CAAC,SAAS,WAAW,GAAG,KAAK,SAAS;AACxC,UAAM,MAAM,QAAQ,MAAM,GAAG,QAAQ,YAAY,GAAG,CAAC;AACrD,WAAO,eAAe,IAAI,IAAI,GAAG,GAAG,IAAI,QAAQ,IAAI,SAAS,EAAE,QAAQ;AAAA,EACzE;AACA,SAAO,eAAe,QAAQ;AAChC;AAGA,IAAI,oBAAoB,CAAC,SAAS,cAAc;AAC9C,QAAM,cAAc,OAAO,KAAK,OAAO,EAAE,KAA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