讨论加特殊图标

This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-03-21 15:49:12 +08:00
parent 0ed747a035
commit dd619643c9
202 changed files with 2973 additions and 2866 deletions

View File

@@ -1,4 +1,4 @@
import { version, unref, inject, hasInjectionContext, getCurrentInstance, ref, computed, createApp, effectScope, reactive, useSSRContext, defineAsyncComponent, provide, onErrorCaptured, onServerPrefetch, createVNode, resolveDynamicComponent, toRef, shallowRef, shallowReactive, isReadonly, isRef, isShallow, isReactive, toRaw, resolveComponent, mergeProps, nextTick } from 'vue';
import { hasInjectionContext, inject, version, unref, getCurrentInstance, ref, computed, createApp, effectScope, reactive, useSSRContext, defineAsyncComponent, provide, onErrorCaptured, onServerPrefetch, createVNode, resolveDynamicComponent, toRef, shallowRef, shallowReactive, isReadonly, isRef, isShallow, isReactive, toRaw, resolveComponent, mergeProps, nextTick } from 'vue';
import { d as useRuntimeConfig$1, $ as $fetch, w as withQuery, l as hasProtocol, p as parseURL, m as isScriptProtocol, j as joinURL, h as createError$1, n as sanitizeStatusCode, o as createHooks } from '../nitro/node-server.mjs';
import { getActiveHead } from 'unhead';
import { defineHeadPlugin } from '@unhead/shared';
@@ -127,7 +127,7 @@ function createNuxtApp(options) {
globalName: "nuxt",
versions: {
get nuxt() {
return "3.9.0";
return "3.10.1";
},
get vue() {
return nuxtApp.vueApp.version;
@@ -228,8 +228,10 @@ async function applyPlugins(nuxtApp, plugins2) {
const errors = [];
let promiseDepth = 0;
async function executePlugin(plugin2) {
if (plugin2.dependsOn && !plugin2.dependsOn.every((name) => resolvedPlugins.includes(name))) {
unresolvedPlugins.push([new Set(plugin2.dependsOn), plugin2]);
var _a2;
const unresolvedPluginsForThisPlugin = ((_a2 = plugin2.dependsOn) == null ? void 0 : _a2.filter((name) => plugins2.some((p) => p._name === name) && !resolvedPlugins.includes(name))) ?? [];
if (unresolvedPluginsForThisPlugin.length > 0) {
unresolvedPlugins.push([new Set(unresolvedPluginsForThisPlugin), plugin2]);
} else {
const promise = applyPlugin(nuxtApp, plugin2).then(async () => {
if (plugin2._name) {
@@ -285,13 +287,18 @@ function callWithNuxt(nuxt, setup, args) {
}
}
// @__NO_SIDE_EFFECTS__
function useNuxtApp() {
function tryUseNuxtApp() {
var _a;
let nuxtAppInstance;
if (hasInjectionContext()) {
nuxtAppInstance = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app.$nuxt;
}
nuxtAppInstance = nuxtAppInstance || nuxtAppCtx.tryUse();
return nuxtAppInstance || null;
}
// @__NO_SIDE_EFFECTS__
function useNuxtApp() {
const nuxtAppInstance = /* @__PURE__ */ tryUseNuxtApp();
if (!nuxtAppInstance) {
{
throw new Error("[nuxt] instance unavailable");
@@ -300,12 +307,125 @@ function useNuxtApp() {
return nuxtAppInstance;
}
// @__NO_SIDE_EFFECTS__
function useRuntimeConfig() {
function useRuntimeConfig(_event) {
return (/* @__PURE__ */ useNuxtApp()).$config;
}
function defineGetter(obj, key, val) {
Object.defineProperty(obj, key, { get: () => val });
}
const PageRouteSymbol = Symbol("route");
const useRouter = () => {
var _a;
return (_a = /* @__PURE__ */ useNuxtApp()) == null ? void 0 : _a.$router;
};
const useRoute = () => {
if (hasInjectionContext()) {
return inject(PageRouteSymbol, (/* @__PURE__ */ useNuxtApp())._route);
}
return (/* @__PURE__ */ useNuxtApp())._route;
};
// @__NO_SIDE_EFFECTS__
function defineNuxtRouteMiddleware(middleware) {
return middleware;
}
const isProcessingMiddleware = () => {
try {
if ((/* @__PURE__ */ useNuxtApp())._processingMiddleware) {
return true;
}
} catch {
return true;
}
return false;
};
const navigateTo = (to, options) => {
if (!to) {
to = "/";
}
const toPath = typeof to === "string" ? to : withQuery(to.path || "/", to.query || {}) + (to.hash || "");
if (options == null ? void 0 : options.open) {
return Promise.resolve();
}
const isExternal = (options == null ? void 0 : options.external) || hasProtocol(toPath, { acceptRelative: true });
if (isExternal) {
if (!(options == null ? void 0 : options.external)) {
throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");
}
const protocol = parseURL(toPath).protocol;
if (protocol && isScriptProtocol(protocol)) {
throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`);
}
}
const inMiddleware = isProcessingMiddleware();
const router = useRouter();
const nuxtApp = /* @__PURE__ */ useNuxtApp();
{
if (nuxtApp.ssrContext) {
const fullPath = typeof to === "string" || isExternal ? toPath : router.resolve(to).fullPath || "/";
const location2 = isExternal ? toPath : joinURL((/* @__PURE__ */ useRuntimeConfig()).app.baseURL, fullPath);
const redirect = async function(response) {
await nuxtApp.callHook("app:redirected");
const encodedLoc = location2.replace(/"/g, "%22");
nuxtApp.ssrContext._renderResponse = {
statusCode: sanitizeStatusCode((options == null ? void 0 : options.redirectCode) || 302, 302),
body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
headers: { location: location2 }
};
return response;
};
if (!isExternal && inMiddleware) {
router.afterEach((final) => final.fullPath === fullPath ? redirect(false) : void 0);
return to;
}
return redirect(!inMiddleware ? void 0 : (
/* abort route navigation */
false
));
}
}
if (isExternal) {
nuxtApp._scope.stop();
if (options == null ? void 0 : options.replace) {
(void 0).replace(toPath);
} else {
(void 0).href = toPath;
}
if (inMiddleware) {
if (!nuxtApp.isHydrating) {
return false;
}
return new Promise(() => {
});
}
return Promise.resolve();
}
return (options == null ? void 0 : options.replace) ? router.replace(to) : router.push(to);
};
const NUXT_ERROR_SIGNATURE = "__nuxt_error";
const useError = () => toRef((/* @__PURE__ */ useNuxtApp()).payload, "error");
const showError = (error) => {
const nuxtError = createError(error);
try {
const nuxtApp = /* @__PURE__ */ useNuxtApp();
const error2 = useError();
if (false)
;
error2.value = error2.value || nuxtError;
} catch {
throw nuxtError;
}
return nuxtError;
};
const isNuxtError = (error) => !!error && typeof error === "object" && NUXT_ERROR_SIGNATURE in error;
const createError = (error) => {
const nuxtError = createError$1(error);
Object.defineProperty(nuxtError, NUXT_ERROR_SIGNATURE, {
value: true,
configurable: false,
writable: false
});
return nuxtError;
};
version.startsWith("3");
function resolveUnref(r) {
return typeof r === "function" ? r() : unref(r);
@@ -484,151 +604,38 @@ function executeAsync(function_) {
function toArray(value) {
return Array.isArray(value) ? value : [value];
}
const PageRouteSymbol = Symbol("route");
const useRouter = () => {
var _a;
return (_a = /* @__PURE__ */ useNuxtApp()) == null ? void 0 : _a.$router;
};
const useRoute = () => {
if (hasInjectionContext()) {
return inject(PageRouteSymbol, (/* @__PURE__ */ useNuxtApp())._route);
}
return (/* @__PURE__ */ useNuxtApp())._route;
};
// @__NO_SIDE_EFFECTS__
function defineNuxtRouteMiddleware(middleware) {
return middleware;
}
const isProcessingMiddleware = () => {
try {
if ((/* @__PURE__ */ useNuxtApp())._processingMiddleware) {
return true;
}
} catch {
return true;
}
return false;
};
const navigateTo = (to, options) => {
if (!to) {
to = "/";
}
const toPath = typeof to === "string" ? to : withQuery(to.path || "/", to.query || {}) + (to.hash || "");
if (options == null ? void 0 : options.open) {
return Promise.resolve();
}
const isExternal = (options == null ? void 0 : options.external) || hasProtocol(toPath, { acceptRelative: true });
if (isExternal) {
if (!(options == null ? void 0 : options.external)) {
throw new Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");
}
const protocol = parseURL(toPath).protocol;
if (protocol && isScriptProtocol(protocol)) {
throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`);
}
}
const inMiddleware = isProcessingMiddleware();
const router = useRouter();
const nuxtApp = /* @__PURE__ */ useNuxtApp();
{
if (nuxtApp.ssrContext) {
const fullPath = typeof to === "string" || isExternal ? toPath : router.resolve(to).fullPath || "/";
const location2 = isExternal ? toPath : joinURL((/* @__PURE__ */ useRuntimeConfig()).app.baseURL, fullPath);
const redirect = async function(response) {
await nuxtApp.callHook("app:redirected");
const encodedLoc = location2.replace(/"/g, "%22");
nuxtApp.ssrContext._renderResponse = {
statusCode: sanitizeStatusCode((options == null ? void 0 : options.redirectCode) || 302, 302),
body: `<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=${encodedLoc}"></head></html>`,
headers: { location: location2 }
};
return response;
};
if (!isExternal && inMiddleware) {
router.afterEach((final) => final.fullPath === fullPath ? redirect(false) : void 0);
return to;
}
return redirect(!inMiddleware ? void 0 : (
/* abort route navigation */
false
));
}
}
if (isExternal) {
nuxtApp._scope.stop();
if (options == null ? void 0 : options.replace) {
(void 0).replace(toPath);
} else {
(void 0).href = toPath;
}
if (inMiddleware) {
if (!nuxtApp.isHydrating) {
return false;
}
return new Promise(() => {
});
}
return Promise.resolve();
}
return (options == null ? void 0 : options.replace) ? router.replace(to) : router.push(to);
};
const NUXT_ERROR_SIGNATURE = "__nuxt_error";
const useError = () => toRef((/* @__PURE__ */ useNuxtApp()).payload, "error");
const showError = (error) => {
const nuxtError = createError(error);
try {
const nuxtApp = /* @__PURE__ */ useNuxtApp();
const error2 = useError();
if (false)
;
error2.value = error2.value || nuxtError;
} catch {
throw nuxtError;
}
return nuxtError;
};
const isNuxtError = (error) => !!error && typeof error === "object" && NUXT_ERROR_SIGNATURE in error;
const createError = (error) => {
const nuxtError = createError$1(error);
Object.defineProperty(nuxtError, NUXT_ERROR_SIGNATURE, {
value: true,
configurable: false,
writable: false
});
return nuxtError;
};
const _routes = [
{
name: "details-id",
path: "/details/:id()",
meta: {},
alias: [],
redirect: void 0,
component: () => import('./_nuxt/_id_-J15OaOmb.mjs').then((m) => m.default || m)
redirect: void 0 ,
component: () => import('./_nuxt/_id_-rlM3aRdI.mjs').then((m) => m.default || m)
},
{
name: "index.html",
path: "/index.html",
meta: {},
alias: [],
redirect: void 0,
component: () => import('./_nuxt/index-GF9xxCrT.mjs').then((m) => m.default || m)
redirect: void 0 ,
component: () => import('./_nuxt/index-TJ8Qfrsu.mjs').then((m) => m.default || m)
},
{
name: "index",
path: "/",
meta: {},
alias: [],
redirect: void 0,
component: () => import('./_nuxt/index-nI-dTwSW.mjs').then((m) => m.default || m)
redirect: void 0 ,
component: () => import('./_nuxt/index-pqrokjW9.mjs').then((m) => m.default || m)
},
{
name: "publish",
path: "/publish",
meta: {},
alias: [],
redirect: void 0,
component: () => import('./_nuxt/index-qtIXtWec.mjs').then((m) => m.default || m)
redirect: void 0 ,
component: () => import('./_nuxt/index-hbpS3F7F.mjs').then((m) => m.default || m)
}
];
function generateRouteKey(route) {
@@ -639,7 +646,7 @@ function generateRouteKey(route) {
return typeof source === "function" ? source(route) : source;
}
function isChangingPage(to, from) {
if (to === from) {
if (to === from || from === START_LOCATION) {
return false;
}
if (generateRouteKey(to) !== generateRouteKey(from)) {
@@ -749,13 +756,20 @@ const plugin = /* @__PURE__ */ defineNuxtPlugin({
const router = createRouter({
...routerOptions,
scrollBehavior: (to, from, savedPosition) => {
var _a2;
if (from === START_LOCATION) {
startPosition = savedPosition;
return;
}
router.options.scrollBehavior = routerOptions.scrollBehavior;
return (_a2 = routerOptions.scrollBehavior) == null ? void 0 : _a2.call(routerOptions, to, START_LOCATION, startPosition || savedPosition);
if (routerOptions.scrollBehavior) {
router.options.scrollBehavior = routerOptions.scrollBehavior;
if ("scrollRestoration" in (void 0).history) {
const unsub = router.beforeEach(() => {
unsub();
(void 0).history.scrollRestoration = "manual";
});
}
return routerOptions.scrollBehavior(to, START_LOCATION, startPosition || savedPosition);
}
},
history,
routes
@@ -1093,8 +1107,8 @@ const _sfc_main$1 = {
const statusMessage = _error.statusMessage ?? (is404 ? "Page Not Found" : "Internal Server Error");
const description = _error.message || _error.toString();
const stack = void 0;
const _Error404 = defineAsyncComponent(() => import('./_nuxt/error-404-XWR4z_gY.mjs').then((r) => r.default || r));
const _Error = defineAsyncComponent(() => import('./_nuxt/error-500-z3XX5In0.mjs').then((r) => r.default || r));
const _Error404 = defineAsyncComponent(() => import('./_nuxt/error-404-ddHl6xOi.mjs').then((r) => r.default || r));
const _Error = defineAsyncComponent(() => import('./_nuxt/error-500-wl8Krfxh.mjs').then((r) => r.default || r));
const ErrorTemplate = is404 ? _Error404 : _Error;
return (_ctx, _push, _parent, _attrs) => {
_push(ssrRenderComponent(unref(ErrorTemplate), mergeProps({ statusCode: unref(statusCode), statusMessage: unref(statusMessage), description: unref(description), stack: unref(stack) }, _attrs), null, _parent));
@@ -1112,7 +1126,7 @@ const _sfc_main = {
__name: "nuxt-root",
__ssrInlineRender: true,
setup(__props) {
const IslandRenderer = defineAsyncComponent(() => import('./_nuxt/island-renderer-UtbYqhWq.mjs').then((r) => r.default || r));
const IslandRenderer = defineAsyncComponent(() => import('./_nuxt/island-renderer-1RMPnle6.mjs').then((r) => r.default || r));
const nuxtApp = /* @__PURE__ */ useNuxtApp();
nuxtApp.deferHydration();
nuxtApp.ssrContext.url;
@@ -1162,9 +1176,9 @@ let entry;
try {
await applyPlugins(nuxt, plugins);
await nuxt.hooks.callHook("app:created", vueApp);
} catch (err) {
await nuxt.hooks.callHook("app:error", err);
nuxt.payload.error = nuxt.payload.error || err;
} catch (error) {
await nuxt.hooks.callHook("app:error", error);
nuxt.payload.error = nuxt.payload.error || createError(error);
}
if (ssrContext == null ? void 0 : ssrContext._renderResponse) {
throw new Error("skipping render");