import { effectScope, shallowReactive, reactive, getCurrentScope, hasInjectionContext, getCurrentInstance, inject, toRef, version, unref, h, shallowRef, isReadonly, isRef, isShallow, isReactive, toRaw, ref, computed, defineComponent, provide, Suspense, nextTick, mergeProps, Transition, watch, Fragment, withCtx, createVNode, useSSRContext, onErrorCaptured, onServerPrefetch, resolveDynamicComponent, createApp } from "vue"; import { $fetch as $fetch$1 } from "ofetch"; import { baseURL } from "#internal/nuxt/paths"; import { createHooks } from "hookable"; import { getContext } from "unctx"; import { sanitizeStatusCode, createError as createError$1 } from "h3"; import { getActiveHead, CapoPlugin } from "unhead"; import { defineHeadPlugin } from "@unhead/shared"; import { START_LOCATION, createMemoryHistory, createRouter as createRouter$1, useRoute as useRoute$1, RouterView } from "vue-router"; import { toRouteMatcher, createRouter } from "radix3"; import { defu } from "defu"; import { hasProtocol, isScriptProtocol, joinURL, withQuery } from "ufo"; import { createPinia } from "pinia"; import { ssrRenderComponent, ssrRenderAttrs, ssrRenderSuspense, ssrRenderVNode } from "vue/server-renderer"; if (!globalThis.$fetch) { globalThis.$fetch = $fetch$1.create({ baseURL: baseURL() }); } const appLayoutTransition = false; const appPageTransition = false; const appKeepalive = false; const nuxtLinkDefaults = { "componentName": "NuxtLink", "prefetch": true, "prefetchOn": { "visibility": true } }; const asyncDataDefaults = { "value": null, "errorValue": null, "deep": true }; const appId = "nuxt-app"; function getNuxtAppCtx(id = appId) { return getContext(id, { asyncContext: false }); } const NuxtPluginIndicator = "__nuxt_plugin"; function createNuxtApp(options) { var _a; let hydratingCount = 0; const nuxtApp = { _id: options.id || appId || "nuxt-app", _scope: effectScope(), provide: void 0, globalName: "nuxt", versions: { get nuxt() { return "3.15.2"; }, get vue() { return nuxtApp.vueApp.version; } }, payload: shallowReactive({ ...((_a = options.ssrContext) == null ? void 0 : _a.payload) || {}, data: shallowReactive({}), state: reactive({}), once: /* @__PURE__ */ new Set(), _errors: shallowReactive({}) }), static: { data: {} }, runWithContext(fn) { if (nuxtApp._scope.active && !getCurrentScope()) { return nuxtApp._scope.run(() => callWithNuxt(nuxtApp, fn)); } return callWithNuxt(nuxtApp, fn); }, isHydrating: false, deferHydration() { if (!nuxtApp.isHydrating) { return () => { }; } hydratingCount++; let called = false; return () => { if (called) { return; } called = true; hydratingCount--; if (hydratingCount === 0) { nuxtApp.isHydrating = false; return nuxtApp.callHook("app:suspense:resolve"); } }; }, _asyncDataPromises: {}, _asyncData: shallowReactive({}), _payloadRevivers: {}, ...options }; { nuxtApp.payload.serverRendered = true; } if (nuxtApp.ssrContext) { nuxtApp.payload.path = nuxtApp.ssrContext.url; nuxtApp.ssrContext.nuxt = nuxtApp; nuxtApp.ssrContext.payload = nuxtApp.payload; nuxtApp.ssrContext.config = { public: nuxtApp.ssrContext.runtimeConfig.public, app: nuxtApp.ssrContext.runtimeConfig.app }; } nuxtApp.hooks = createHooks(); nuxtApp.hook = nuxtApp.hooks.hook; { const contextCaller = async function(hooks, args) { for (const hook of hooks) { await nuxtApp.runWithContext(() => hook(...args)); } }; nuxtApp.hooks.callHook = (name, ...args) => nuxtApp.hooks.callHookWith(contextCaller, name, ...args); } nuxtApp.callHook = nuxtApp.hooks.callHook; nuxtApp.provide = (name, value) => { const $name = "$" + name; defineGetter(nuxtApp, $name, value); defineGetter(nuxtApp.vueApp.config.globalProperties, $name, value); }; defineGetter(nuxtApp.vueApp, "$nuxt", nuxtApp); defineGetter(nuxtApp.vueApp.config.globalProperties, "$nuxt", nuxtApp); const runtimeConfig = options.ssrContext.runtimeConfig; nuxtApp.provide("config", runtimeConfig); return nuxtApp; } function registerPluginHooks(nuxtApp, plugin2) { if (plugin2.hooks) { nuxtApp.hooks.addHooks(plugin2.hooks); } } async function applyPlugin(nuxtApp, plugin2) { if (typeof plugin2 === "function") { const { provide: provide2 } = await nuxtApp.runWithContext(() => plugin2(nuxtApp)) || {}; if (provide2 && typeof provide2 === "object") { for (const key in provide2) { nuxtApp.provide(key, provide2[key]); } } } } async function applyPlugins(nuxtApp, plugins2) { var _a, _b, _c, _d; const resolvedPlugins = []; const unresolvedPlugins = []; const parallels = []; const errors = []; let promiseDepth = 0; async function executePlugin(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) { resolvedPlugins.push(plugin2._name); await Promise.all(unresolvedPlugins.map(async ([dependsOn, unexecutedPlugin]) => { if (dependsOn.has(plugin2._name)) { dependsOn.delete(plugin2._name); if (dependsOn.size === 0) { promiseDepth++; await executePlugin(unexecutedPlugin); } } })); } }); if (plugin2.parallel) { parallels.push(promise.catch((e) => errors.push(e))); } else { await promise; } } } for (const plugin2 of plugins2) { if (((_a = nuxtApp.ssrContext) == null ? void 0 : _a.islandContext) && ((_b = plugin2.env) == null ? void 0 : _b.islands) === false) { continue; } registerPluginHooks(nuxtApp, plugin2); } for (const plugin2 of plugins2) { if (((_c = nuxtApp.ssrContext) == null ? void 0 : _c.islandContext) && ((_d = plugin2.env) == null ? void 0 : _d.islands) === false) { continue; } await executePlugin(plugin2); } await Promise.all(parallels); if (promiseDepth) { for (let i = 0; i < promiseDepth; i++) { await Promise.all(parallels); } } if (errors.length) { throw errors[0]; } } // @__NO_SIDE_EFFECTS__ function defineNuxtPlugin(plugin2) { if (typeof plugin2 === "function") { return plugin2; } const _name = plugin2._name || plugin2.name; delete plugin2.name; return Object.assign(plugin2.setup || (() => { }), plugin2, { [NuxtPluginIndicator]: true, _name }); } function callWithNuxt(nuxt, setup, args) { const fn = () => setup(); const nuxtAppCtx = getNuxtAppCtx(nuxt._id); { return nuxt.vueApp.runWithContext(() => nuxtAppCtx.callAsync(nuxt, fn)); } } function tryUseNuxtApp(id) { var _a; let nuxtAppInstance; if (hasInjectionContext()) { nuxtAppInstance = (_a = getCurrentInstance()) == null ? void 0 : _a.appContext.app.$nuxt; } nuxtAppInstance = nuxtAppInstance || getNuxtAppCtx(id).tryUse(); return nuxtAppInstance || null; } function useNuxtApp(id) { const nuxtAppInstance = tryUseNuxtApp(id); if (!nuxtAppInstance) { { throw new Error("[nuxt] instance unavailable"); } } return nuxtAppInstance; } // @__NO_SIDE_EFFECTS__ function useRuntimeConfig(_event) { return useNuxtApp().$config; } function defineGetter(obj, key, val) { Object.defineProperty(obj, key, { get: () => val }); } const LayoutMetaSymbol = Symbol("layout-meta"); const PageRouteSymbol = Symbol("route"); const useRouter = () => { var _a; return (_a = useNuxtApp()) == null ? void 0 : _a.$router; }; const useRoute = () => { if (hasInjectionContext()) { return inject(PageRouteSymbol, useNuxtApp()._route); } return useNuxtApp()._route; }; // @__NO_SIDE_EFFECTS__ function defineNuxtRouteMiddleware(middleware) { return middleware; } const isProcessingMiddleware = () => { try { if (useNuxtApp()._processingMiddleware) { return true; } } catch { return false; } return false; }; const URL_QUOTE_RE = /"/g; const navigateTo = (to, options) => { if (!to) { to = "/"; } const toPath = typeof to === "string" ? to : "path" in to ? resolveRouteObject(to) : useRouter().resolve(to).href; const isExternalHost = hasProtocol(toPath, { acceptRelative: true }); const isExternal = (options == null ? void 0 : options.external) || isExternalHost; 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 } = new URL(toPath, "http://localhost"); if (protocol && isScriptProtocol(protocol)) { throw new Error(`Cannot navigate to a URL with '${protocol}' protocol.`); } } const inMiddleware = isProcessingMiddleware(); const router = useRouter(); const nuxtApp = 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(URL_QUOTE_RE, "%22"); const encodedHeader = encodeURL(location2, isExternalHost); nuxtApp.ssrContext._renderResponse = { statusCode: sanitizeStatusCode((options == null ? void 0 : options.redirectCode) || 302, 302), body: `
`, headers: { location: encodedHeader } }; 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); }; function resolveRouteObject(to) { return withQuery(to.path || "", to.query || {}) + (to.hash || ""); } function encodeURL(location2, isExternalHost = false) { const url = new URL(location2, "http://localhost"); if (!isExternalHost) { return url.pathname + url.search + url.hash; } if (location2.startsWith("//")) { return url.toString().replace(url.protocol, ""); } return url.toString(); } const NUXT_ERROR_SIGNATURE = "__nuxt_error"; const useError = () => toRef(useNuxtApp().payload, "error"); const showError = (error) => { const nuxtError = createError(error); try { const nuxtApp = 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[0] === "3"; function resolveUnref(r) { return typeof r === "function" ? r() : unref(r); } function resolveUnrefHeadInput(ref2) { if (ref2 instanceof Promise || ref2 instanceof Date || ref2 instanceof RegExp) return ref2; const root = resolveUnref(ref2); if (!ref2 || !root) return root; if (Array.isArray(root)) return root.map((r) => resolveUnrefHeadInput(r)); if (typeof root === "object") { const resolved = {}; for (const k in root) { if (!Object.prototype.hasOwnProperty.call(root, k)) { continue; } if (k === "titleTemplate" || k[0] === "o" && k[1] === "n") { resolved[k] = unref(root[k]); continue; } resolved[k] = resolveUnrefHeadInput(root[k]); } return resolved; } return root; } defineHeadPlugin({ hooks: { "entries:resolve": (ctx) => { for (const entry2 of ctx.entries) entry2.resolvedInput = resolveUnrefHeadInput(entry2.input); } } }); const headSymbol = "usehead"; const _global = typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; const globalKey$1 = "__unhead_injection_handler__"; function setHeadInjectionHandler(handler) { _global[globalKey$1] = handler; } function injectHead() { if (globalKey$1 in _global) { return _global[globalKey$1](); } const head = inject(headSymbol); if (!head && process.env.NODE_ENV !== "production") console.warn("Unhead is missing Vue context, falling back to shared context. This may have unexpected results."); return head || getActiveHead(); } [CapoPlugin({ track: true })]; const unhead_KgADcZ0jPj = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:head", enforce: "pre", setup(nuxtApp) { const head = nuxtApp.ssrContext.head; setHeadInjectionHandler( // need a fresh instance of the nuxt app to avoid parallel requests interfering with each other () => useNuxtApp().vueApp._context.provides.usehead ); nuxtApp.vueApp.use(head); } }); function createContext(opts = {}) { let currentInstance; let isSingleton = false; const checkConflict = (instance) => { if (currentInstance && currentInstance !== instance) { throw new Error("Context conflict"); } }; let als; if (opts.asyncContext) { const _AsyncLocalStorage = opts.AsyncLocalStorage || globalThis.AsyncLocalStorage; if (_AsyncLocalStorage) { als = new _AsyncLocalStorage(); } else { console.warn("[unctx] `AsyncLocalStorage` is not provided."); } } const _getCurrentInstance = () => { if (als) { const instance = als.getStore(); if (instance !== void 0) { return instance; } } return currentInstance; }; return { use: () => { const _instance = _getCurrentInstance(); if (_instance === void 0) { throw new Error("Context is not available"); } return _instance; }, tryUse: () => { return _getCurrentInstance(); }, set: (instance, replace) => { if (!replace) { checkConflict(instance); } currentInstance = instance; isSingleton = true; }, unset: () => { currentInstance = void 0; isSingleton = false; }, call: (instance, callback) => { checkConflict(instance); currentInstance = instance; try { return als ? als.run(instance, callback) : callback(); } finally { if (!isSingleton) { currentInstance = void 0; } } }, async callAsync(instance, callback) { currentInstance = instance; const onRestore = () => { currentInstance = instance; }; const onLeave = () => currentInstance === instance ? onRestore : void 0; asyncHandlers.add(onLeave); try { const r = als ? als.run(instance, callback) : callback(); if (!isSingleton) { currentInstance = void 0; } return await r; } finally { asyncHandlers.delete(onLeave); } } }; } function createNamespace(defaultOpts = {}) { const contexts = {}; return { get(key, opts = {}) { if (!contexts[key]) { contexts[key] = createContext({ ...defaultOpts, ...opts }); } return contexts[key]; } }; } const _globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof global !== "undefined" ? global : {}; const globalKey = "__unctx__"; _globalThis[globalKey] || (_globalThis[globalKey] = createNamespace()); const asyncHandlersKey = "__unctx_async_handlers__"; const asyncHandlers = _globalThis[asyncHandlersKey] || (_globalThis[asyncHandlersKey] = /* @__PURE__ */ new Set()); function executeAsync(function_) { const restores = []; for (const leaveHandler of asyncHandlers) { const restore2 = leaveHandler(); if (restore2) { restores.push(restore2); } } const restore = () => { for (const restore2 of restores) { restore2(); } }; let awaitable = function_(); if (awaitable && typeof awaitable === "object" && "catch" in awaitable) { awaitable = awaitable.catch((error) => { restore(); throw error; }); } return [awaitable, restore]; } const ROUTE_KEY_PARENTHESES_RE$1 = /(:\w+)\([^)]+\)/g; const ROUTE_KEY_SYMBOLS_RE$1 = /(:\w+)[?+*]/g; const ROUTE_KEY_NORMAL_RE$1 = /:\w+/g; const interpolatePath = (route, match) => { return match.path.replace(ROUTE_KEY_PARENTHESES_RE$1, "$1").replace(ROUTE_KEY_SYMBOLS_RE$1, "$1").replace(ROUTE_KEY_NORMAL_RE$1, (r) => { var _a; return ((_a = route.params[r.slice(1)]) == null ? void 0 : _a.toString()) || ""; }); }; const generateRouteKey$1 = (routeProps, override) => { const matchedRoute = routeProps.route.matched.find((m) => { var _a; return ((_a = m.components) == null ? void 0 : _a.default) === routeProps.Component.type; }); const source = override ?? (matchedRoute == null ? void 0 : matchedRoute.meta.key) ?? (matchedRoute && interpolatePath(routeProps.route, matchedRoute)); return typeof source === "function" ? source(routeProps.route) : source; }; const wrapInKeepAlive = (props, children) => { return { default: () => children }; }; function toArray(value) { return Array.isArray(value) ? value : [value]; } async function getRouteRules(arg) { const path = typeof arg === "string" ? arg : arg.path; { useNuxtApp().ssrContext._preloadManifest = true; const _routeRulesMatcher = toRouteMatcher( createRouter({ routes: (/* @__PURE__ */ useRuntimeConfig()).nitro.routeRules }) ); return defu({}, ..._routeRulesMatcher.matchAll(path).reverse()); } } function handleHotUpdate(_router, _generateRoutes) { } const _routes = [ { name: "dir-dir-id", path: "/:dir()/:dir()/:id()", component: () => import("./_nuxt/_id_-CY4S08zh.js") }, { name: "dir-dir-list-id", path: "/:dir()/:dir()/list-:id()", component: () => import("./_nuxt/list-_id_-By6mIPL6.js") }, { name: "dir-id", path: "/:dir()/:id()", component: () => import("./_nuxt/_id_-DSKwGPjq.js") }, { name: "dir-index.html", path: "/:dir()/index.html", component: () => import("./_nuxt/index.html-DZvbkZ4V.js") }, { name: "dir-list-id", path: "/:dir()/list-:id()", component: () => import("./_nuxt/list-_id_-DSsbG6f8.js") }, { name: "about-dir-dir-id", path: "/about/:dir()/:dir()/:id()", component: () => import("./_nuxt/_id_-BYaqDGP_.js") }, { name: "about-dir-index.html", path: "/about/:dir()/index.html", component: () => import("./_nuxt/index.html-CGLEEYXF.js") }, { name: "about-dir-list-id", path: "/about/:dir()/list-:id()", component: () => import("./_nuxt/list-_id_-Bkf2uAQN.js") }, { name: "advertising-adDetail", path: "/advertising/adDetail", component: () => import("./_nuxt/adDetail-DiEtJ07k.js") }, { name: "advertising", path: "/advertising", component: () => import("./_nuxt/index-DJajLbTi.js") }, { name: "index", path: "/", component: () => import("./_nuxt/index-BDsvj-bv.js") }, { name: "search-id", path: "/search/:id()", component: () => import("./_nuxt/_id_-DYJ3XEyk.js") }, { name: "topic-id", path: "/topic/:id()", component: () => import("./_nuxt/_id_-CwA5PBWj.js") }, { name: "topic", path: "/topic", component: () => import("./_nuxt/index-BwfKHbcJ.js") } ]; const _wrapIf = (component, props, slots) => { props = props === true ? {} : props; return { default: () => { var _a; return props ? h(component, props, slots) : (_a = slots.default) == null ? void 0 : _a.call(slots); } }; }; const ROUTE_KEY_PARENTHESES_RE = /(:\w+)\([^)]+\)/g; const ROUTE_KEY_SYMBOLS_RE = /(:\w+)[?+*]/g; const ROUTE_KEY_NORMAL_RE = /:\w+/g; function generateRouteKey(route) { const source = (route == null ? void 0 : route.meta.key) ?? route.path.replace(ROUTE_KEY_PARENTHESES_RE, "$1").replace(ROUTE_KEY_SYMBOLS_RE, "$1").replace(ROUTE_KEY_NORMAL_RE, (r) => { var _a; return ((_a = route.params[r.slice(1)]) == null ? void 0 : _a.toString()) || ""; }); return typeof source === "function" ? source(route) : source; } function isChangingPage(to, from) { if (to === from || from === START_LOCATION) { return false; } if (generateRouteKey(to) !== generateRouteKey(from)) { return true; } const areComponentsSame = to.matched.every( (comp, index) => { var _a, _b; return comp.components && comp.components.default === ((_b = (_a = from.matched[index]) == null ? void 0 : _a.components) == null ? void 0 : _b.default); } ); if (areComponentsSame) { return false; } return true; } const routerOptions0 = { scrollBehavior(to, from, savedPosition) { var _a; const nuxtApp = useNuxtApp(); const behavior = ((_a = useRouter().options) == null ? void 0 : _a.scrollBehaviorType) ?? "auto"; let position = savedPosition || void 0; const routeAllowsScrollToTop = typeof to.meta.scrollToTop === "function" ? to.meta.scrollToTop(to, from) : to.meta.scrollToTop; if (!position && from && to && routeAllowsScrollToTop !== false && isChangingPage(to, from)) { position = { left: 0, top: 0 }; } if (to.path === from.path) { if (from.hash && !to.hash) { return { left: 0, top: 0 }; } if (to.hash) { return { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior }; } return false; } const hasTransition = (route) => !!(route.meta.pageTransition ?? appPageTransition); const hookToWait = hasTransition(from) && hasTransition(to) ? "page:transition:finish" : "page:finish"; return new Promise((resolve) => { nuxtApp.hooks.hookOnce(hookToWait, async () => { await new Promise((resolve2) => setTimeout(resolve2, 0)); if (to.hash) { position = { el: to.hash, top: _getHashElementScrollMarginTop(to.hash), behavior }; } resolve(position); }); }); } }; function _getHashElementScrollMarginTop(selector) { try { const elem = (void 0).querySelector(selector); if (elem) { return (Number.parseFloat(getComputedStyle(elem).scrollMarginTop) || 0) + (Number.parseFloat(getComputedStyle((void 0).documentElement).scrollPaddingTop) || 0); } } catch { } return 0; } const routerOptions1 = { routes: async (routes) => { return [ ...routes //...routeData, ]; } }; const configRouterOptions = { hashMode: false, scrollBehaviorType: "auto" }; const hashMode = routerOptions0.hashMode ?? false; const routerOptions = { ...configRouterOptions, ...routerOptions0, ...routerOptions1 }; const validate = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to) => { var _a; let __temp, __restore; if (!((_a = to.meta) == null ? void 0 : _a.validate)) { return; } const nuxtApp = useNuxtApp(); const router = useRouter(); const result = ([__temp, __restore] = executeAsync(() => Promise.resolve(to.meta.validate(to))), __temp = await __temp, __restore(), __temp); if (result === true) { return; } const error = createError({ statusCode: result && result.statusCode || 404, statusMessage: result && result.statusMessage || `Page Not Found: ${to.fullPath}`, data: { path: to.fullPath } }); const unsub = router.beforeResolve((final) => { unsub(); if (final === to) { const unsub2 = router.afterEach(async () => { unsub2(); await nuxtApp.runWithContext(() => showError(error)); }); return false; } }); }); const manifest_45route_45rule = /* @__PURE__ */ defineNuxtRouteMiddleware(async (to) => { { return; } }); const globalMiddleware = [ validate, manifest_45route_45rule ]; const namedMiddleware = { auth: () => import("./_nuxt/auth-DWp-I46x.js") }; const plugin = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:router", enforce: "pre", async setup(nuxtApp) { var _a, _b, _c; let __temp, __restore; let routerBase = (/* @__PURE__ */ useRuntimeConfig()).app.baseURL; if (hashMode && !routerBase.includes("#")) { routerBase += "#"; } const history = ((_a = routerOptions.history) == null ? void 0 : _a.call(routerOptions, routerBase)) ?? createMemoryHistory(routerBase); const routes = routerOptions.routes ? ([__temp, __restore] = executeAsync(() => routerOptions.routes(_routes)), __temp = await __temp, __restore(), __temp) ?? _routes : _routes; let startPosition; const router = createRouter$1({ ...routerOptions, scrollBehavior: (to, from, savedPosition) => { if (from === START_LOCATION) { startPosition = savedPosition; return; } 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 }); handleHotUpdate(router, routerOptions.routes ? routerOptions.routes : (routes2) => routes2); nuxtApp.vueApp.use(router); const previousRoute = shallowRef(router.currentRoute.value); router.afterEach((_to, from) => { previousRoute.value = from; }); Object.defineProperty(nuxtApp.vueApp.config.globalProperties, "previousRoute", { get: () => previousRoute.value }); const initialURL = nuxtApp.ssrContext.url; const _route = shallowRef(router.currentRoute.value); const syncCurrentRoute = () => { _route.value = router.currentRoute.value; }; nuxtApp.hook("page:finish", syncCurrentRoute); router.afterEach((to, from) => { var _a2, _b2, _c2, _d; if (((_b2 = (_a2 = to.matched[0]) == null ? void 0 : _a2.components) == null ? void 0 : _b2.default) === ((_d = (_c2 = from.matched[0]) == null ? void 0 : _c2.components) == null ? void 0 : _d.default)) { syncCurrentRoute(); } }); const route = {}; for (const key in _route.value) { Object.defineProperty(route, key, { get: () => _route.value[key], enumerable: true }); } nuxtApp._route = shallowReactive(route); nuxtApp._middleware = nuxtApp._middleware || { global: [], named: {} }; useError(); if (!((_b = nuxtApp.ssrContext) == null ? void 0 : _b.islandContext)) { router.afterEach(async (to, _from, failure) => { delete nuxtApp._processingMiddleware; if (failure) { await nuxtApp.callHook("page:loading:end"); } if ((failure == null ? void 0 : failure.type) === 4) { return; } if (to.redirectedFrom && to.fullPath !== initialURL) { await nuxtApp.runWithContext(() => navigateTo(to.fullPath || "/")); } }); } try { if (true) { ; [__temp, __restore] = executeAsync(() => router.push(initialURL)), await __temp, __restore(); ; } ; [__temp, __restore] = executeAsync(() => router.isReady()), await __temp, __restore(); ; } catch (error2) { [__temp, __restore] = executeAsync(() => nuxtApp.runWithContext(() => showError(error2))), await __temp, __restore(); } const resolvedInitialRoute = router.currentRoute.value; syncCurrentRoute(); if ((_c = nuxtApp.ssrContext) == null ? void 0 : _c.islandContext) { return { provide: { router } }; } const initialLayout = nuxtApp.payload.state._layout; router.beforeEach(async (to, from) => { var _a2, _b2; await nuxtApp.callHook("page:loading:start"); to.meta = reactive(to.meta); if (nuxtApp.isHydrating && initialLayout && !isReadonly(to.meta.layout)) { to.meta.layout = initialLayout; } nuxtApp._processingMiddleware = true; if (!((_a2 = nuxtApp.ssrContext) == null ? void 0 : _a2.islandContext)) { const middlewareEntries = /* @__PURE__ */ new Set([...globalMiddleware, ...nuxtApp._middleware.global]); for (const component of to.matched) { const componentMiddleware = component.meta.middleware; if (!componentMiddleware) { continue; } for (const entry2 of toArray(componentMiddleware)) { middlewareEntries.add(entry2); } } { const routeRules = await nuxtApp.runWithContext(() => getRouteRules({ path: to.path })); if (routeRules.appMiddleware) { for (const key in routeRules.appMiddleware) { if (routeRules.appMiddleware[key]) { middlewareEntries.add(key); } else { middlewareEntries.delete(key); } } } } for (const entry2 of middlewareEntries) { const middleware = typeof entry2 === "string" ? nuxtApp._middleware.named[entry2] || await ((_b2 = namedMiddleware[entry2]) == null ? void 0 : _b2.call(namedMiddleware).then((r) => r.default || r)) : entry2; if (!middleware) { throw new Error(`Unknown route middleware: '${entry2}'.`); } const result = await nuxtApp.runWithContext(() => middleware(to, from)); { if (result === false || result instanceof Error) { const error2 = result || createError$1({ statusCode: 404, statusMessage: `Page Not Found: ${initialURL}` }); await nuxtApp.runWithContext(() => showError(error2)); return false; } } if (result === true) { continue; } if (result || result === false) { return result; } } } }); router.onError(async () => { delete nuxtApp._processingMiddleware; await nuxtApp.callHook("page:loading:end"); }); router.afterEach(async (to, _from) => { if (to.matched.length === 0) { await nuxtApp.runWithContext(() => showError(createError$1({ statusCode: 404, fatal: false, statusMessage: `Page not found: ${to.fullPath}`, data: { path: to.fullPath } }))); } }); nuxtApp.hooks.hookOnce("app:created", async () => { try { if ("name" in resolvedInitialRoute) { resolvedInitialRoute.name = void 0; } await router.replace({ ...resolvedInitialRoute, force: true }); router.options.scrollBehavior = routerOptions.scrollBehavior; } catch (error2) { await nuxtApp.runWithContext(() => showError(error2)); } }); return { provide: { router } }; } }); function definePayloadReducer(name, reduce) { { useNuxtApp().ssrContext._payloadReducers[name] = reduce; } } const reducers = [ ["NuxtError", (data) => isNuxtError(data) && data.toJSON()], ["EmptyShallowRef", (data) => isRef(data) && isShallow(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")], ["EmptyRef", (data) => isRef(data) && !data.value && (typeof data.value === "bigint" ? "0n" : JSON.stringify(data.value) || "_")], ["ShallowRef", (data) => isRef(data) && isShallow(data) && data.value], ["ShallowReactive", (data) => isReactive(data) && isShallow(data) && toRaw(data)], ["Ref", (data) => isRef(data) && data.value], ["Reactive", (data) => isReactive(data) && toRaw(data)] ]; const revive_payload_server_eJ33V7gbc6 = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:revive-payload:server", setup() { for (const [reducer, fn] of reducers) { definePayloadReducer(reducer, fn); } } }); const components_plugin_KR1HBZs4kY = /* @__PURE__ */ defineNuxtPlugin({ name: "nuxt:global-components" }); const element_plus_elM4AXquKi = /* @__PURE__ */ defineNuxtPlugin(() => { }); const globals_W2yFmejOiw = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { nuxtApp.provide("webUrl", "http://apipre1.bjzxtw.org.cn:29501"); nuxtApp.provide("CwebUrl", "http://nwpre.bjzxtw.org.cn"); nuxtApp.provide("BwebUrl", "http://adminpre.bjzxtw.org.cn"); nuxtApp.provide("LoginWebUrl", "http://adminpre.bjzxtw.org.cn/adminapi"); nuxtApp.provide("userUrl", "http://localhost:3000"); }); const pinia_Uphuq97G1L = /* @__PURE__ */ defineNuxtPlugin((nuxtApp) => { const pinia = createPinia(); nuxtApp.vueApp.use(pinia); return { provide: { pinia } }; }); const plugins = [ unhead_KgADcZ0jPj, plugin, revive_payload_server_eJ33V7gbc6, components_plugin_KR1HBZs4kY, element_plus_elM4AXquKi, globals_W2yFmejOiw, pinia_Uphuq97G1L ]; function defaultEstimatedProgress(duration, elapsed) { const completionPercentage = elapsed / duration * 100; return 2 / Math.PI * 100 * Math.atan(completionPercentage / 50); } function createLoadingIndicator(opts = {}) { opts.estimatedProgress || defaultEstimatedProgress; const nuxtApp = useNuxtApp(); const progress = ref(0); const isLoading = ref(false); const error = ref(false); const start = () => { error.value = false; set(0); }; function set(at = 0) { if (nuxtApp.isHydrating) { return; } if (at >= 100) { return finish(); } progress.value = at < 0 ? 0 : at; { isLoading.value = true; } } function finish(opts2 = {}) { progress.value = 100; if (opts2.error) { error.value = true; } if (opts2.force) { progress.value = 0; isLoading.value = false; } } function clear() { } let _cleanup = () => { }; return { _cleanup, progress: computed(() => progress.value), isLoading: computed(() => isLoading.value), error: computed(() => error.value), start, set, finish, clear }; } function useLoadingIndicator(opts = {}) { const nuxtApp = useNuxtApp(); const indicator = nuxtApp._loadingIndicator = nuxtApp._loadingIndicator || createLoadingIndicator(opts); return indicator; } const __nuxt_component_0 = defineComponent({ name: "NuxtLoadingIndicator", props: { throttle: { type: Number, default: 200 }, duration: { type: Number, default: 2e3 }, height: { type: Number, default: 3 }, color: { type: [String, Boolean], default: "repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)" }, errorColor: { type: String, default: "repeating-linear-gradient(to right,#f87171 0%,#ef4444 100%)" }, estimatedProgress: { type: Function, required: false } }, setup(props, { slots, expose }) { const { progress, isLoading, error, start, finish, clear } = useLoadingIndicator({ duration: props.duration, throttle: props.throttle, estimatedProgress: props.estimatedProgress }); expose({ progress, isLoading, error, start, finish, clear }); return () => h("div", { class: "nuxt-loading-indicator", style: { position: "fixed", top: 0, right: 0, left: 0, pointerEvents: "none", width: "auto", height: `${props.height}px`, opacity: isLoading.value ? 1 : 0, background: error.value ? props.errorColor : props.color || void 0, backgroundSize: `${100 / progress.value * 100}% auto`, transform: `scaleX(${progress.value}%)`, transformOrigin: "left", transition: "transform 0.1s, height 0.4s, opacity 0.4s", zIndex: 999999 } }, slots); } }); const layouts = {}; const LayoutLoader = defineComponent({ name: "LayoutLoader", inheritAttrs: false, props: { name: String, layoutProps: Object }, setup(props, context) { return () => h(layouts[props.name], props.layoutProps, context.slots); } }); const __nuxt_component_1 = defineComponent({ name: "NuxtLayout", inheritAttrs: false, props: { name: { type: [String, Boolean, Object], default: null }, fallback: { type: [String, Object], default: null } }, setup(props, context) { const nuxtApp = useNuxtApp(); const injectedRoute = inject(PageRouteSymbol); const route = injectedRoute === useRoute() ? useRoute$1() : injectedRoute; const layout = computed(() => { let layout2 = unref(props.name) ?? route.meta.layout ?? "default"; if (layout2 && !(layout2 in layouts)) { if (props.fallback) { layout2 = unref(props.fallback); } } return layout2; }); const layoutRef = ref(); context.expose({ layoutRef }); const done = nuxtApp.deferHydration(); return () => { const hasLayout = layout.value && layout.value in layouts; const transitionProps = route.meta.layoutTransition ?? appLayoutTransition; return _wrapIf(Transition, hasLayout && transitionProps, { default: () => h(Suspense, { suspensible: true, onResolve: () => { nextTick(done); } }, { default: () => h( LayoutProvider, { layoutProps: mergeProps(context.attrs, { ref: layoutRef }), key: layout.value || void 0, name: layout.value, shouldProvide: !props.name, hasTransition: !!transitionProps }, context.slots ) }) }).default(); }; } }); const LayoutProvider = defineComponent({ name: "NuxtLayoutProvider", inheritAttrs: false, props: { name: { type: [String, Boolean] }, layoutProps: { type: Object }, hasTransition: { type: Boolean }, shouldProvide: { type: Boolean } }, setup(props, context) { const name = props.name; if (props.shouldProvide) { provide(LayoutMetaSymbol, { isCurrent: (route) => name === (route.meta.layout ?? "default") }); } return () => { var _a, _b; if (!name || typeof name === "string" && !(name in layouts)) { return (_b = (_a = context.slots).default) == null ? void 0 : _b.call(_a); } return h( LayoutLoader, { key: name, layoutProps: props.layoutProps, name }, context.slots ); }; } }); const RouteProvider = defineComponent({ props: { vnode: { type: Object, required: true }, route: { type: Object, required: true }, vnodeRef: Object, renderKey: String, trackRootNodes: Boolean }, setup(props) { const previousKey = props.renderKey; const previousRoute = props.route; const route = {}; for (const key in props.route) { Object.defineProperty(route, key, { get: () => previousKey === props.renderKey ? props.route[key] : previousRoute[key], enumerable: true }); } provide(PageRouteSymbol, shallowReactive(route)); return () => { return h(props.vnode, { ref: props.vnodeRef }); }; } }); const __nuxt_component_2 = defineComponent({ name: "NuxtPage", inheritAttrs: false, props: { name: { type: String }, transition: { type: [Boolean, Object], default: void 0 }, keepalive: { type: [Boolean, Object], default: void 0 }, route: { type: Object }, pageKey: { type: [Function, String], default: null } }, setup(props, { attrs, slots, expose }) { const nuxtApp = useNuxtApp(); const pageRef = ref(); const forkRoute = inject(PageRouteSymbol, null); let previousPageKey; expose({ pageRef }); inject(LayoutMetaSymbol, null); let vnode; const done = nuxtApp.deferHydration(); if (props.pageKey) { watch(() => props.pageKey, (next, prev) => { if (next !== prev) { nuxtApp.callHook("page:loading:start"); } }); } let pageLoadingEndHookAlreadyCalled = false; return () => { return h(RouterView, { name: props.name, route: props.route, ...attrs }, { default: (routeProps) => { if (!routeProps.Component) { done(); return; } const key = generateRouteKey$1(routeProps, props.pageKey); if (!nuxtApp.isHydrating && !hasChildrenRoutes(forkRoute, routeProps.route, routeProps.Component) && previousPageKey === key) { nuxtApp.callHook("page:loading:end"); pageLoadingEndHookAlreadyCalled = true; } previousPageKey = key; const hasTransition = !!(props.transition ?? routeProps.route.meta.pageTransition ?? appPageTransition); const transitionProps = hasTransition && _mergeTransitionProps([ props.transition, routeProps.route.meta.pageTransition, appPageTransition, { onAfterLeave: () => { nuxtApp.callHook("page:transition:finish", routeProps.Component); } } ].filter(Boolean)); const keepaliveConfig = props.keepalive ?? routeProps.route.meta.keepalive ?? appKeepalive; vnode = _wrapIf( Transition, hasTransition && transitionProps, wrapInKeepAlive( keepaliveConfig, h(Suspense, { suspensible: true, onPending: () => nuxtApp.callHook("page:start", routeProps.Component), onResolve: () => { nextTick(() => nuxtApp.callHook("page:finish", routeProps.Component).then(() => { if (!pageLoadingEndHookAlreadyCalled) { return nuxtApp.callHook("page:loading:end"); } pageLoadingEndHookAlreadyCalled = false; }).finally(done)); } }, { default: () => { const providerVNode = h(RouteProvider, { key: key || void 0, vnode: slots.default ? h(Fragment, void 0, slots.default(routeProps)) : routeProps.Component, route: routeProps.route, renderKey: key || void 0, trackRootNodes: hasTransition, vnodeRef: pageRef }); return providerVNode; } }) ) ).default(); return vnode; } }); }; } }); function _mergeTransitionProps(routeProps) { const _props = routeProps.map((prop) => ({ ...prop, onAfterLeave: prop.onAfterLeave ? toArray(prop.onAfterLeave) : void 0 })); return defu(..._props); } function hasChildrenRoutes(fork, newRoute, Component) { if (!fork) { return false; } const index = newRoute.matched.findIndex((m) => { var _a; return ((_a = m.components) == null ? void 0 : _a.default) === (Component == null ? void 0 : Component.type); }); return index < newRoute.matched.length - 1; } const _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const _sfc_main$2 = {}; function _sfc_ssrRender(_ctx, _push, _parent, _attrs) { const _component_NuxtLoadingIndicator = __nuxt_component_0; const _component_NuxtLayout = __nuxt_component_1; const _component_NuxtPage = __nuxt_component_2; _push(``); _push(ssrRenderComponent(_component_NuxtLoadingIndicator, { color: "#49A769" }, null, _parent)); _push(ssrRenderComponent(_component_NuxtLayout, null, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_NuxtPage, null, null, _parent2, _scopeId)); } else { return [ createVNode(_component_NuxtPage) ]; } }), _: 1 }, _parent)); _push(``); } const _sfc_setup$2 = _sfc_main$2.setup; _sfc_main$2.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("app.vue"); return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0; }; const AppComponent = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["ssrRender", _sfc_ssrRender]]); const _sfc_main$1 = { __name: "error", __ssrInlineRender: true, setup(__props) { useRouter(); return (_ctx, _push, _parent, _attrs) => { _push(`