admin felület különválasztva

This commit is contained in:
Roo
2026-06-24 11:29:45 +00:00
parent 71ef33bb85
commit 80a5d67f79
462 changed files with 87873 additions and 312 deletions

View File

@@ -0,0 +1,19 @@
import { escapeHtml } from '@vue/shared';
const _messages = {
"appName": "Nuxt",
"version": "",
"status": 500,
"statusText": "Server error",
"description": "This page is temporarily unavailable."
};
const template = (messages) => {
messages = {
..._messages,
...messages
};
return "<!DOCTYPE html><html lang=\"en\"><head><title>" + escapeHtml(messages.status) + " - " + escapeHtml(messages.statusText) + " | " + escapeHtml(messages.appName) + "</title><meta charset=\"utf-8\"><meta content=\"width=device-width,initial-scale=1.0,minimum-scale=1.0\" name=\"viewport\"><style>.spotlight{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:\"\"}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.fixed{position:fixed}.-bottom-1\\/2{bottom:-50%}.left-0{left:0}.right-0{right:0}.grid{display:grid}.mb-16{margin-bottom:4rem}.mb-8{margin-bottom:2rem}.h-1\\/2{height:50%}.max-w-520px{max-width:520px}.min-h-screen{min-height:100vh}.place-content-center{place-content:center}.overflow-hidden{overflow:hidden}.bg-white{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8{padding-left:2rem;padding-right:2rem}.text-center{text-align:center}.text-8xl{font-size:6rem;line-height:1}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light{font-weight:300}.font-medium{font-weight:500}.leading-tight{line-height:1.25}.font-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-black{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:px-0{padding-left:0;padding-right:0}.sm\\:text-4xl{font-size:2.25rem;line-height:2.5rem}}</style><script>!function(){const e=document.createElement(\"link\").relList;if(!(e&&e.supports&&e.supports(\"modulepreload\"))){for(const e of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(e);new MutationObserver(e=>{for(const o of e)if(\"childList\"===o.type)for(const e of o.addedNodes)\"LINK\"===e.tagName&&\"modulepreload\"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),\"use-credentials\"===e.crossOrigin?r.credentials=\"include\":\"anonymous\"===e.crossOrigin?r.credentials=\"omit\":r.credentials=\"same-origin\",r}(e);fetch(e.href,r)}}();<\/script></head><body class=\"antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black\"><div class=\"-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight\"></div><div class=\"max-w-520px text-center\"><h1 class=\"font-medium mb-8 sm:text-10xl text-8xl\">" + escapeHtml(messages.status) + "</h1><p class=\"font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl\">" + escapeHtml(messages.description) + "</p></div></body></html>";
};
export { template };
//# sourceMappingURL=error-500.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"error-500.mjs","sources":["../../../../node_modules/@nuxt/nitro-server/dist/runtime/templates/error-500.mjs"],"names":[],"mappings":"","x_google_ignoreList":[0]}

View File

@@ -0,0 +1,8 @@
import { a as app_vue_vue_type_style_index_0_lang } from './entry-styles-3.mjs-C1rWf53M.mjs';
const appStyles_BKebClGy = [
app_vue_vue_type_style_index_0_lang
];
export { appStyles_BKebClGy as default };
//# sourceMappingURL=app-styles.BKebClGy.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app-styles.BKebClGy.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/app-styles.BKebClGy.mjs"],"names":["style_0"],"mappings":";;AACA,2BAAe;AACf,EAAEA;AACF;;;;"}

View File

@@ -0,0 +1,127 @@
import { p as publicAssetsURL } from '../routes/renderer.mjs';
import { defineStore } from 'pinia';
import { ref, computed } from 'vue';
import { u as useCookie } from './cookie-CWIsZYm7.mjs';
const _imports_0 = publicAssetsURL("/sf_logo.png");
const useAuthStore = defineStore("auth", () => {
const user = ref(null);
const token = ref(null);
const isLoading = ref(false);
const error = ref(null);
const isInitialized = ref(false);
const isAuthenticated = computed(() => !!token.value && !!user.value);
const isAdmin = computed(() => {
var _a;
const role = (_a = user.value) == null ? void 0 : _a.role;
if (!role) return false;
const staffRoles = ["SUPERADMIN", "ADMIN", "MODERATOR", "SALES_REP", "SERVICE_MGR"];
return staffRoles.includes(role.toUpperCase());
});
const userName = computed(() => {
if (!user.value) return "";
const { first_name, last_name } = user.value;
if (first_name && last_name) return `${first_name} ${last_name}`;
return first_name || last_name || user.value.email;
});
const userEmail = computed(() => {
var _a, _b;
return (_b = (_a = user.value) == null ? void 0 : _a.email) != null ? _b : "";
});
const userRole = computed(() => {
var _a, _b;
return (_b = (_a = user.value) == null ? void 0 : _a.role) != null ? _b : "guest";
});
async function login(email, password) {
var _a;
isLoading.value = true;
error.value = null;
try {
const body = new URLSearchParams();
body.append("username", email);
body.append("password", password);
const res = await $fetch("/api/v1/auth/login", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body
});
const tokenCookie = useCookie("access_token", {
maxAge: 60 * 60 * 24 * 7,
// 7 days
path: "/",
sameSite: "lax",
secure: true
});
tokenCookie.value = res.access_token;
token.value = res.access_token;
await fetchUser();
} catch (err) {
error.value = ((_a = err == null ? void 0 : err.data) == null ? void 0 : _a.detail) || (err == null ? void 0 : err.message) || "Login failed";
throw err;
} finally {
isLoading.value = false;
}
}
async function fetchUser() {
var _a;
const tokenCookie = useCookie("access_token");
const currentToken = tokenCookie.value || token.value;
if (!currentToken) return;
try {
const res = await $fetch("/api/v1/auth/me", {
headers: { Authorization: `Bearer ${currentToken}` }
});
user.value = res;
} catch (err) {
if (((_a = err == null ? void 0 : err.response) == null ? void 0 : _a.status) === 401) {
logout();
}
throw err;
}
}
function logout() {
token.value = null;
user.value = null;
error.value = null;
const tokenCookie = useCookie("access_token");
tokenCookie.value = null;
}
async function init() {
const tokenCookie = useCookie("access_token");
if (tokenCookie.value) {
token.value = tokenCookie.value;
try {
await fetchUser();
} catch {
logout();
}
}
isInitialized.value = true;
}
function clearError() {
error.value = null;
}
return {
// State
user,
token,
isLoading,
error,
isInitialized,
// Getters
isAuthenticated,
isAdmin,
userName,
userEmail,
userRole,
// Actions
login,
fetchUser,
logout,
init,
clearError
};
});
export { _imports_0 as _, useAuthStore as u };
//# sourceMappingURL=auth-CRAMW6e4.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"auth-CRAMW6e4.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/auth-CRAMW6e4.js"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,34 @@
import { d as defineNuxtRouteMiddleware, n as navigateTo } from './server.mjs';
import { u as useCookie } from './cookie-CWIsZYm7.mjs';
import 'vue';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'vue/server-renderer';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'pinia';
import 'vue-router';
const auth = defineNuxtRouteMiddleware((to, from) => {
if (to.path === "/login") {
return;
}
const tokenCookie = useCookie("access_token");
if (!tokenCookie.value) {
return navigateTo("/login");
}
});
export { auth as default };
//# sourceMappingURL=auth-D_CY0lMs.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"auth-D_CY0lMs.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/auth-D_CY0lMs.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAM,IAAA,GAAO,yBAAA,CAA0B,CAAC,EAAA,EAAI,IAAA,KAAS;AACnD,EAAA,IAAI,EAAA,CAAG,SAAS,QAAA,EAAU;AACxB,IAAA;AAAA,EACF;AACA,EAAA,MAAM,WAAA,GAAc,UAAU,cAAc,CAAA;AAC5C,EAAA,IAAI,CAAC,YAAY,KAAA,EAAO;AACtB,IAAA,OAAO,WAAW,QAAQ,CAAA;AAAA,EAC5B;AACF,CAAC;;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,77 @@
import { ref } from 'vue';
import { t as klona, v as parse, x as getRequestHeader, y as destr, z as isEqual, A as setCookie, B as getCookie, C as deleteCookie } from '../nitro/nitro.mjs';
import { a as useNuxtApp } from './server.mjs';
function useRequestEvent(nuxtApp) {
var _a;
nuxtApp || (nuxtApp = useNuxtApp());
return (_a = nuxtApp.ssrContext) == null ? void 0 : _a.event;
}
const CookieDefaults = {
path: "/",
watch: true,
decode: (val) => {
const decoded = decodeURIComponent(val);
const parsed = destr(decoded);
if (typeof parsed === "number" && (!Number.isFinite(parsed) || String(parsed) !== decoded)) {
return decoded;
}
return parsed;
},
encode: (val) => encodeURIComponent(typeof val === "string" ? val : JSON.stringify(val))
};
function useCookie(name, _opts) {
var _a, _b, _c;
const opts = { ...CookieDefaults, ..._opts };
(_a = opts.filter) != null ? _a : opts.filter = (key) => key === name;
const cookies = readRawCookies(opts) || {};
let delay;
if (opts.maxAge !== void 0) {
delay = opts.maxAge * 1e3;
} else if (opts.expires) {
delay = opts.expires.getTime() - Date.now();
}
const hasExpired = delay !== void 0 && delay <= 0;
const cookieValue = klona(hasExpired ? void 0 : (_c = cookies[name]) != null ? _c : (_b = opts.default) == null ? void 0 : _b.call(opts));
const cookie = ref(cookieValue);
{
const nuxtApp = useNuxtApp();
const writeFinalCookieValue = () => {
if (opts.readonly || isEqual(cookie.value, cookies[name])) {
return;
}
nuxtApp._cookies || (nuxtApp._cookies = {});
if (name in nuxtApp._cookies) {
if (isEqual(cookie.value, nuxtApp._cookies[name])) {
return;
}
}
nuxtApp._cookies[name] = cookie.value;
writeServerCookie(useRequestEvent(nuxtApp), name, cookie.value, opts);
};
const unhook = nuxtApp.hooks.hookOnce("app:rendered", writeFinalCookieValue);
nuxtApp.hooks.hookOnce("app:error", () => {
unhook();
return writeFinalCookieValue();
});
}
return cookie;
}
function readRawCookies(opts = {}) {
{
return parse(getRequestHeader(useRequestEvent(), "cookie") || "", opts);
}
}
function writeServerCookie(event, name, value, opts = {}) {
if (event) {
if (value !== null && value !== void 0) {
return setCookie(event, name, value, opts);
}
if (getCookie(event, name) !== void 0) {
return deleteCookie(event, name, opts);
}
}
}
export { useCookie as u };
//# sourceMappingURL=cookie-CWIsZYm7.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cookie-CWIsZYm7.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/cookie-CWIsZYm7.js"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,260 @@
import { _ as __nuxt_component_0 } from './nuxt-link-DNVrgHUL.mjs';
import { defineComponent, ref, computed, mergeProps, withCtx, createVNode, toDisplayString, withDirectives, vShow, openBlock, createBlock, createTextVNode, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderClass, ssrRenderAttr, ssrRenderList, ssrInterpolate, ssrRenderStyle, ssrRenderComponent, ssrRenderSlot } from 'vue/server-renderer';
import { u as useAuthStore, _ as _imports_0 } from './auth-CRAMW6e4.mjs';
import { useRoute } from 'vue-router';
import { u as useRouter } from './server.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'pinia';
import './cookie-CWIsZYm7.mjs';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "default",
__ssrInlineRender: true,
setup(__props) {
const route = useRoute();
useRouter();
const authStore = useAuthStore();
const sidebarOpen = ref(false);
const sidebarCollapsed = ref(false);
const dropdownOpen = ref(false);
ref(null);
const expandedGroups = ref(/* @__PURE__ */ new Set(["K\xF6zpont"]));
const userEmail = computed(() => authStore.userEmail || "admin@servicefinder.hu");
const userInitials = computed(() => {
const email = authStore.userEmail;
if (!email) return "AD";
return email.split("@")[0].split(".").map((s) => s[0]).join("").toUpperCase().slice(0, 2);
});
const menuGroups = [
{
title: "K\xF6zpont",
items: [
{
path: "/",
label: "Dashboard",
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>'
}
]
},
{
title: "Felhaszn\xE1l\xF3k & Partnerek",
items: [
{
label: "Gar\xE1zsok",
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>',
children: [
{
path: "/garages",
label: "Gar\xE1zsok list\xE1ja",
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>'
}
]
},
{
label: "Felhaszn\xE1l\xF3k",
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /></svg>',
children: [
{
path: "/users",
label: "Felhaszn\xE1l\xF3k list\xE1ja",
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /></svg>'
}
]
}
]
},
{
title: "Rendszer",
items: [
{
path: "/permissions",
label: "Jogosults\xE1gok",
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>'
},
{
label: "Rendszernapl\xF3k",
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',
children: [
{
path: "/logs",
label: "Rendszernapl\xF3k",
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>'
}
]
}
]
}
];
const pageTitle = computed(() => {
if (route.path === "/") return "Dashboard";
if (route.path.startsWith("/permissions")) return "Jogosults\xE1g Kezel\xE9s";
if (route.path.startsWith("/garages")) return "Gar\xE1zsok";
if (route.path.startsWith("/users")) return "Felhaszn\xE1l\xF3k";
if (route.path.startsWith("/logs")) return "Rendszernapl\xF3k";
return "Admin Panel";
});
function isActive(path) {
if (path === "/") return route.path === "/";
return route.path.startsWith(path);
}
function isGroupActive(item) {
if (!item.children) return false;
return item.children.some((child) => isActive(child.path));
}
return (_ctx, _push, _parent, _attrs) => {
const _component_NuxtLink = __nuxt_component_0;
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-screen bg-slate-900 text-white flex" }, _attrs))}>`);
if (sidebarOpen.value) {
_push(`<div class="fixed inset-0 bg-black/50 z-20 lg:hidden"></div>`);
} else {
_push(`<!---->`);
}
_push(`<aside class="${ssrRenderClass([
"fixed lg:static inset-y-0 left-0 z-30 flex flex-col bg-slate-800 border-r border-slate-700 transition-all duration-300",
sidebarOpen.value ? "w-64 translate-x-0" : "-translate-x-full lg:translate-x-0 lg:w-20"
])}"><div class="flex items-center h-16 px-4 border-b border-slate-700">`);
if (sidebarOpen.value || !sidebarCollapsed.value) {
_push(`<div class="flex items-center gap-3"><img${ssrRenderAttr("src", _imports_0)} class="h-8 w-auto" alt="SF Logo"><span class="text-lg font-bold text-white whitespace-nowrap">Admin Panel</span></div>`);
} else {
_push(`<div class="mx-auto"><img${ssrRenderAttr("src", _imports_0)} class="h-8 w-auto" alt="SF Logo"></div>`);
}
_push(`</div><button class="hidden lg:flex items-center justify-center h-10 mx-2 mt-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"><svg class="${ssrRenderClass([{ "rotate-180": sidebarCollapsed.value }, "w-5 h-5 transition-transform duration-300"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7"></path></svg></button><nav class="flex-1 px-2 py-4 space-y-2 overflow-y-auto"><!--[-->`);
ssrRenderList(menuGroups, (group) => {
_push(`<!--[-->`);
if (!sidebarCollapsed.value || sidebarOpen.value) {
_push(`<div class="px-3 py-1 text-xs font-semibold uppercase tracking-wider text-slate-500">${ssrInterpolate(group.title)}</div>`);
} else {
_push(`<!---->`);
}
_push(`<!--[-->`);
ssrRenderList(group.items, (item) => {
var _a;
_push(`<!--[-->`);
if (item.children) {
_push(`<div><button class="${ssrRenderClass([isGroupActive(item) ? "bg-indigo-600/20 text-indigo-300" : "text-slate-300 hover:bg-slate-700 hover:text-white", "flex items-center w-full gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition"])}"><span class="flex-shrink-0 w-5 h-5">${(_a = item.icon) != null ? _a : ""}</span><span class="flex-1 text-left whitespace-nowrap" style="${ssrRenderStyle(!sidebarCollapsed.value || sidebarOpen.value ? null : { display: "none" })}">${ssrInterpolate(item.label)}</span><svg class="${ssrRenderClass([{ "rotate-90": expandedGroups.value.has(item.label) }, "w-4 h-4 transition-transform duration-200"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24" style="${ssrRenderStyle(!sidebarCollapsed.value || sidebarOpen.value ? null : { display: "none" })}"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg></button><div class="ml-2 mt-1 space-y-1 overflow-hidden transition-all duration-200" style="${ssrRenderStyle(expandedGroups.value.has(item.label) && (!sidebarCollapsed.value || sidebarOpen.value) ? null : { display: "none" })}"><!--[-->`);
ssrRenderList(item.children, (child) => {
_push(ssrRenderComponent(_component_NuxtLink, {
key: child.path,
to: child.path,
class: ["flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition", isActive(child.path) ? "bg-indigo-600 text-white" : "text-slate-400 hover:bg-slate-700 hover:text-white"],
onClick: ($event) => sidebarOpen.value = false
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
var _a2;
if (_push2) {
_push2(`<span class="flex-shrink-0 w-4 h-4"${_scopeId}>${(_a2 = child.icon) != null ? _a2 : ""}</span><span class="whitespace-nowrap"${_scopeId}>${ssrInterpolate(child.label)}</span>`);
} else {
return [
createVNode("span", {
class: "flex-shrink-0 w-4 h-4",
innerHTML: child.icon
}, null, 8, ["innerHTML"]),
createVNode("span", { class: "whitespace-nowrap" }, toDisplayString(child.label), 1)
];
}
}),
_: 2
}, _parent));
});
_push(`<!--]--></div></div>`);
} else {
_push(ssrRenderComponent(_component_NuxtLink, {
to: item.path,
class: ["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition", isActive(item.path) ? "bg-indigo-600 text-white" : "text-slate-300 hover:bg-slate-700 hover:text-white"],
onClick: ($event) => sidebarOpen.value = false
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
var _a2;
if (_push2) {
_push2(`<span class="flex-shrink-0 w-5 h-5"${_scopeId}>${(_a2 = item.icon) != null ? _a2 : ""}</span><span class="whitespace-nowrap" style="${ssrRenderStyle(!sidebarCollapsed.value || sidebarOpen.value ? null : { display: "none" })}"${_scopeId}>${ssrInterpolate(item.label)}</span>`);
} else {
return [
createVNode("span", {
class: "flex-shrink-0 w-5 h-5",
innerHTML: item.icon
}, null, 8, ["innerHTML"]),
withDirectives(createVNode("span", { class: "whitespace-nowrap" }, toDisplayString(item.label), 513), [
[vShow, !sidebarCollapsed.value || sidebarOpen.value]
])
];
}
}),
_: 2
}, _parent));
}
_push(`<!--]-->`);
});
_push(`<!--]--><!--]-->`);
});
_push(`<!--]--></nav><div class="p-4 border-t border-slate-700">`);
if (!sidebarCollapsed.value || sidebarOpen.value) {
_push(`<div class="text-xs text-slate-500"> ServiceFinder v2.0 </div>`);
} else {
_push(`<!---->`);
}
_push(`</div></aside><div class="flex-1 flex flex-col min-w-0"><header class="sticky top-0 z-10 bg-slate-800/95 backdrop-blur-sm border-b border-slate-700"><div class="flex items-center justify-between h-16 px-4 lg:px-6"><div class="flex items-center gap-3"><button class="lg:hidden p-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg></button><h1 class="text-lg font-semibold text-white truncate">${ssrInterpolate(pageTitle.value)}</h1></div><div class="relative"><button class="flex items-center gap-2 p-1.5 rounded-lg hover:bg-slate-700 transition"><div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center text-sm font-bold text-white">${ssrInterpolate(userInitials.value)}</div><span class="hidden sm:block text-sm text-slate-300">${ssrInterpolate(userEmail.value)}</span><svg class="w-4 h-4 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></button>`);
if (dropdownOpen.value) {
_push(`<div class="absolute right-0 mt-2 w-56 bg-slate-800 border border-slate-700 rounded-xl shadow-xl py-1 z-50"><div class="px-4 py-3 border-b border-slate-700"><p class="text-sm font-medium text-white">${ssrInterpolate(userEmail.value)}</p><p class="text-xs text-slate-400 mt-0.5">Administrator</p></div>`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/profile",
class: "flex items-center gap-3 px-4 py-2.5 text-sm text-slate-300 hover:bg-slate-700 hover:text-white transition",
onClick: ($event) => dropdownOpen.value = false
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"${_scopeId}></path></svg> Profile Settings `);
} else {
return [
(openBlock(), createBlock("svg", {
class: "w-4 h-4",
fill: "none",
stroke: "currentColor",
viewBox: "0 0 24 24"
}, [
createVNode("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
})
])),
createTextVNode(" Profile Settings ")
];
}
}),
_: 1
}, _parent));
_push(`<button class="flex items-center gap-3 w-full px-4 py-2.5 text-sm text-red-400 hover:bg-slate-700 hover:text-red-300 transition"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg> Sign Out </button></div>`);
} else {
_push(`<!---->`);
}
_push(`</div></div></header><main class="flex-1 p-4 lg:p-6 overflow-auto">`);
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
_push(`</main></div></div>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("layouts/default.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export { _sfc_main as default };
//# sourceMappingURL=default-DbJQlxCD.mjs.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
const app_vue_vue_type_style_index_0_lang = "body{margin:0;padding:0}";
export { app_vue_vue_type_style_index_0_lang as a };
//# sourceMappingURL=entry-styles-3.mjs-C1rWf53M.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"entry-styles-3.mjs-C1rWf53M.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/entry-styles-3.mjs-C1rWf53M.js"],"names":[],"mappings":"AAAA,MAAM,mCAAA,GAAsC;;;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"entry-styles.BhrIOCGw.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/entry-styles-1.mjs-CF-ChPYj.js","../../../../.nuxt/dist/server/_nuxt/entry-styles-2.mjs-CntxBZab.js","../../../../.nuxt/dist/server/_nuxt/entry-styles.BhrIOCGw.mjs"],"names":["style_0","style_1","style_2"],"mappings":";;AAAA,MAAM,QAAA,GAAW,okfAAA;;ACAjB,MAAM,IAAA,GAAO,8kiBAAA;;ACGb,6BAAe;AACf,EAAEA,QAAO;AACT,EAAEC,IAAO;AACT,EAAEC;AACF;;;;"}

View File

@@ -0,0 +1,99 @@
import { _ as __nuxt_component_0 } from './nuxt-link-DNVrgHUL.mjs';
import { mergeProps, withCtx, createTextVNode, toDisplayString, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrInterpolate, ssrRenderComponent } from 'vue/server-renderer';
import { _ as _export_sfc } from './server.mjs';
import { u as useHead } from './v3-DnDMBKvA.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'pinia';
import 'vue-router';
const _sfc_main = {
__name: "error-404",
__ssrInlineRender: true,
props: {
appName: {
type: String,
default: "Nuxt"
},
version: {
type: String,
default: ""
},
status: {
type: Number,
default: 404
},
statusText: {
type: String,
default: "Not Found"
},
description: {
type: String,
default: "Sorry, the page you are looking for could not be found."
},
backHome: {
type: String,
default: "Go back home"
}
},
setup(__props) {
const props = __props;
useHead({
title: `${props.status} - ${props.statusText} | ${props.appName}`,
script: [
{
innerHTML: `!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`
}
],
style: [
{
innerHTML: `*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`
}
]
});
return (_ctx, _push, _parent, _attrs) => {
const _component_NuxtLink = __nuxt_component_0;
_push(`<div${ssrRenderAttrs(mergeProps({ class: "antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black" }, _attrs))} data-v-1bd9e11a><div class="fixed left-0 right-0 spotlight z-10" data-v-1bd9e11a></div><div class="max-w-520px text-center z-20" data-v-1bd9e11a><h1 class="font-medium mb-8 sm:text-10xl text-8xl" data-v-1bd9e11a>${ssrInterpolate(__props.status)}</h1><p class="font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl" data-v-1bd9e11a>${ssrInterpolate(__props.description)}</p><div class="flex items-center justify-center w-full" data-v-1bd9e11a>`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/",
class: "cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`${ssrInterpolate(__props.backHome)}`);
} else {
return [
createTextVNode(toDisplayString(__props.backHome), 1)
];
}
}),
_: 1
}, _parent));
_push(`</div></div></div>`);
};
}
};
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/nuxt/dist/app/components/error-404.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const error404 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1bd9e11a"]]);
export { error404 as default };
//# sourceMappingURL=error-404-BDmq62MM.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"error-404-BDmq62MM.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/error-404-BDmq62MM.js"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,8 @@
const error404_vue_vue_type_style_index_0_scoped_1bd9e11a_lang = '.spotlight[data-v-1bd9e11a]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-1bd9e11a]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media(prefers-color-scheme:light){.gradient-border[data-v-1bd9e11a]{background-color:#ffffff4d}.gradient-border[data-v-1bd9e11a]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media(prefers-color-scheme:dark){.gradient-border[data-v-1bd9e11a]{background-color:#1414144d}.gradient-border[data-v-1bd9e11a]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-1bd9e11a]:before{background-size:400% auto;border-radius:.5rem;content:"";inset:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-1bd9e11a]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-1bd9e11a]{position:fixed}.left-0[data-v-1bd9e11a]{left:0}.right-0[data-v-1bd9e11a]{right:0}.z-10[data-v-1bd9e11a]{z-index:10}.z-20[data-v-1bd9e11a]{z-index:20}.grid[data-v-1bd9e11a]{display:grid}.mb-16[data-v-1bd9e11a]{margin-bottom:4rem}.mb-8[data-v-1bd9e11a]{margin-bottom:2rem}.max-w-520px[data-v-1bd9e11a]{max-width:520px}.min-h-screen[data-v-1bd9e11a]{min-height:100vh}.w-full[data-v-1bd9e11a]{width:100%}.flex[data-v-1bd9e11a]{display:flex}.cursor-pointer[data-v-1bd9e11a]{cursor:pointer}.place-content-center[data-v-1bd9e11a]{place-content:center}.items-center[data-v-1bd9e11a]{align-items:center}.justify-center[data-v-1bd9e11a]{justify-content:center}.overflow-hidden[data-v-1bd9e11a]{overflow:hidden}.bg-white[data-v-1bd9e11a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-1bd9e11a]{padding-left:1rem;padding-right:1rem}.px-8[data-v-1bd9e11a]{padding-left:2rem;padding-right:2rem}.py-2[data-v-1bd9e11a]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-1bd9e11a]{text-align:center}.text-8xl[data-v-1bd9e11a]{font-size:6rem;line-height:1}.text-xl[data-v-1bd9e11a]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-1bd9e11a]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-1bd9e11a]{font-weight:300}.font-medium[data-v-1bd9e11a]{font-weight:500}.leading-tight[data-v-1bd9e11a]{line-height:1.25}.font-sans[data-v-1bd9e11a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-1bd9e11a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-black[data-v-1bd9e11a]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:text-white[data-v-1bd9e11a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:px-0[data-v-1bd9e11a]{padding-left:0;padding-right:0}.sm\\:px-6[data-v-1bd9e11a]{padding-left:1.5rem;padding-right:1.5rem}.sm\\:py-3[data-v-1bd9e11a]{padding-bottom:.75rem;padding-top:.75rem}.sm\\:text-4xl[data-v-1bd9e11a]{font-size:2.25rem;line-height:2.5rem}.sm\\:text-xl[data-v-1bd9e11a]{font-size:1.25rem;line-height:1.75rem}}';
const error404Styles_CiJjK6WX = [
error404_vue_vue_type_style_index_0_scoped_1bd9e11a_lang
];
export { error404Styles_CiJjK6WX as default };
//# sourceMappingURL=error-404-styles.CiJjK6WX.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"error-404-styles.CiJjK6WX.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/error-404-styles-1.mjs-COQ9lBg6.js","../../../../.nuxt/dist/server/_nuxt/error-404-styles.CiJjK6WX.mjs"],"names":["style_0"],"mappings":"AAAA,MAAM,wDAAA,GAA2D,k9GAAA;;ACCjE,gCAAe;AACf,EAAEA;AACF;;;;"}

View File

@@ -0,0 +1,77 @@
import { mergeProps, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrInterpolate } from 'vue/server-renderer';
import { _ as _export_sfc } from './server.mjs';
import { u as useHead } from './v3-DnDMBKvA.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'pinia';
import 'vue-router';
const _sfc_main = {
__name: "error-500",
__ssrInlineRender: true,
props: {
appName: {
type: String,
default: "Nuxt"
},
version: {
type: String,
default: ""
},
status: {
type: Number,
default: 500
},
statusText: {
type: String,
default: "Server error"
},
description: {
type: String,
default: "This page is temporarily unavailable."
}
},
setup(__props) {
const props = __props;
useHead({
title: `${props.status} - ${props.statusText} | ${props.appName}`,
script: [
{
innerHTML: `!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`
}
],
style: [
{
innerHTML: `*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`
}
]
});
return (_ctx, _push, _parent, _attrs) => {
_push(`<div${ssrRenderAttrs(mergeProps({ class: "antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black" }, _attrs))} data-v-a01dd0ba><div class="-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight" data-v-a01dd0ba></div><div class="max-w-520px text-center" data-v-a01dd0ba><h1 class="font-medium mb-8 sm:text-10xl text-8xl" data-v-a01dd0ba>${ssrInterpolate(__props.status)}</h1><p class="font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl" data-v-a01dd0ba>${ssrInterpolate(__props.description)}</p></div></div>`);
};
}
};
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/nuxt/dist/app/components/error-500.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const error500 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a01dd0ba"]]);
export { error500 as default };
//# sourceMappingURL=error-500-gzzPk_-U.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"error-500-gzzPk_-U.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/error-500-gzzPk_-U.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAeA,MAAM,SAAA,GAAY;AAAA,EAChB,MAAA,EAAQ,WAAA;AAAA,EACR,iBAAA,EAAmB,IAAA;AAAA,EACnB,KAAA,EAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS;AAAA,KACX;AAAA,IACA,OAAA,EAAS;AAAA,MACP,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS;AAAA,KACX;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS;AAAA,KACX;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS;AAAA,KACX;AAAA,IACA,WAAA,EAAa;AAAA,MACX,IAAA,EAAM,MAAA;AAAA,MACN,OAAA,EAAS;AAAA;AACX,GACF;AAAA,EACA,MAAM,OAAA,EAAS;AACb,IAAA,MAAM,KAAA,GAAQ,OAAA;AACd,IAAA,OAAA,CAAQ;AAAA,MACN,KAAA,EAAO,GAAG,KAAA,CAAM,MAAM,MAAM,KAAA,CAAM,UAAU,CAAA,GAAA,EAAM,KAAA,CAAM,OAAO,CAAA,CAAA;AAAA,MAC/D,MAAA,EAAQ;AAAA,QACN;AAAA,UACE,SAAA,EAAW,CAAA,+rBAAA;AAAA;AACb,OACF;AAAA,MACA,KAAA,EAAO;AAAA,QACL;AAAA,UACE,SAAA,EAAW,CAAA,yjDAAA;AAAA;AACb;AACF,KACD,CAAA;AACD,IAAA,OAAO,CAAC,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,KAAW;AACvC,MAAA,KAAA,CAAM,CAAA,IAAA,EAAO,eAAe,UAAA,CAAW,EAAE,OAAO,gIAAA,EAAiI,EAAG,MAAM,CAAC,CAAC,gOAAgO,cAAA,CAAe,OAAA,CAAQ,MAAM,CAAC,CAAA,gGAAA,EAAmG,eAAe,OAAA,CAAQ,WAAW,CAAC,CAAA,gBAAA,CAAkB,CAAA;AAAA,IACplB,CAAA;AAAA,EACF;AACF,CAAA;AACA,MAAM,aAAa,SAAA,CAAU,KAAA;AAC7B,SAAA,CAAU,KAAA,GAAQ,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChC,EAAA,MAAM,aAAa,aAAA,EAAc;AACjC,EAAA,CAAC,UAAA,CAAW,YAAY,UAAA,CAAW,OAAA,uBAA8B,GAAA,EAAI,CAAA,EAAI,IAAI,qDAAqD,CAAA;AAClI,EAAA,OAAO,UAAA,GAAa,UAAA,CAAW,KAAA,EAAO,GAAG,CAAA,GAAI,MAAA;AAC/C,CAAA;AACA,MAAM,QAAA,+BAAuC,SAAA,EAAW,CAAC,CAAC,WAAA,EAAa,iBAAiB,CAAC,CAAC;;;;"}

View File

@@ -0,0 +1,8 @@
const error500_vue_vue_type_style_index_0_scoped_a01dd0ba_lang = ".spotlight[data-v-a01dd0ba]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-a01dd0ba]{position:fixed}.-bottom-1\\/2[data-v-a01dd0ba]{bottom:-50%}.left-0[data-v-a01dd0ba]{left:0}.right-0[data-v-a01dd0ba]{right:0}.grid[data-v-a01dd0ba]{display:grid}.mb-16[data-v-a01dd0ba]{margin-bottom:4rem}.mb-8[data-v-a01dd0ba]{margin-bottom:2rem}.h-1\\/2[data-v-a01dd0ba]{height:50%}.max-w-520px[data-v-a01dd0ba]{max-width:520px}.min-h-screen[data-v-a01dd0ba]{min-height:100vh}.place-content-center[data-v-a01dd0ba]{place-content:center}.overflow-hidden[data-v-a01dd0ba]{overflow:hidden}.bg-white[data-v-a01dd0ba]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-a01dd0ba]{padding-left:2rem;padding-right:2rem}.text-center[data-v-a01dd0ba]{text-align:center}.text-8xl[data-v-a01dd0ba]{font-size:6rem;line-height:1}.text-xl[data-v-a01dd0ba]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-a01dd0ba]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-a01dd0ba]{font-weight:300}.font-medium[data-v-a01dd0ba]{font-weight:500}.leading-tight[data-v-a01dd0ba]{line-height:1.25}.font-sans[data-v-a01dd0ba]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-a01dd0ba]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-black[data-v-a01dd0ba]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:text-white[data-v-a01dd0ba]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:px-0[data-v-a01dd0ba]{padding-left:0;padding-right:0}.sm\\:text-4xl[data-v-a01dd0ba]{font-size:2.25rem;line-height:2.5rem}}";
const error500Styles_ulHNpcF1 = [
error500_vue_vue_type_style_index_0_scoped_a01dd0ba_lang
];
export { error500Styles_ulHNpcF1 as default };
//# sourceMappingURL=error-500-styles.ulHNpcF1.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"error-500-styles.ulHNpcF1.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/error-500-styles-1.mjs-C0glhSuM.js","../../../../.nuxt/dist/server/_nuxt/error-500-styles.ulHNpcF1.mjs"],"names":["style_0"],"mappings":"AAAA,MAAM,wDAAA,GAA2D,i2DAAA;;ACCjE,gCAAe;AACf,EAAEA;AACF;;;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-92TOgIUU.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/index-92TOgIUU.js"],"names":[],"mappings":";;;AAGA,MAAM,4BAA4B,eAAA,CAAgB;AAAA,EAChD,MAAA,EAAQ,OAAA;AAAA,EACR,iBAAA,EAAmB,IAAA;AAAA,EACnB,MAAM,OAAA,EAAS;AACb,IAAA,MAAM,gBAAA,GAAmB;AAAA,MACvB,EAAE,IAAA,EAAM,2CAAA,EAA6C,IAAA,EAAM,eAAA,EAAiB,UAAU,gBAAA,EAAiB;AAAA,MACvG,EAAE,IAAA,EAAM,kCAAA,EAAoC,IAAA,EAAM,gBAAA,EAAkB,UAAU,aAAA,EAAc;AAAA,MAC5F,EAAE,IAAA,EAAM,gDAAA,EAA6C,IAAA,EAAM,YAAA,EAAc,UAAU,gBAAA,EAAiB;AAAA,MACpG,EAAE,IAAA,EAAM,iDAAA,EAAmD,IAAA,EAAM,aAAA,EAAe,UAAU,aAAA,EAAc;AAAA,MACxG,EAAE,IAAA,EAAM,+CAAA,EAAiD,IAAA,EAAM,aAAA,EAAe,UAAU,eAAA;AAAgB,KAC1G;AACA,IAAA,OAAO,CAAC,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,KAAW;AACvC,MAAA,KAAA,CAAM,CAAA,IAAA,EAAO,cAAA,CAAe,MAAM,CAAC,CAAA,q4NAAA,CAA63N,CAAA;AACh6N,MAAA,aAAA,CAAc,gBAAA,EAAkB,CAAC,QAAA,EAAU,KAAA,KAAU;AACnD,QAAA,KAAA,CAAM,mDAAmD,cAAA,CAAe,CAAC,SAAS,QAAA,EAAU,yCAAyC,CAAC,CAAC,CAAA,sEAAA,EAAyE,cAAA,CAAe,QAAA,CAAS,IAAI,CAAC,CAAA,6CAAA,EAAgD,eAAe,QAAA,CAAS,IAAI,CAAC,CAAA,gBAAA,CAAkB,CAAA;AAAA,MAC9U,CAAC,CAAA;AACD,MAAA,KAAA,CAAM,CAAA,gCAAA,CAAkC,CAAA;AAAA,IAC1C,CAAA;AAAA,EACF;AACF,CAAC;AACD,MAAM,aAAa,SAAA,CAAU,KAAA;AAC7B,SAAA,CAAU,KAAA,GAAQ,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChC,EAAA,MAAM,aAAa,aAAA,EAAc;AACjC,EAAA,CAAC,UAAA,CAAW,YAAY,UAAA,CAAW,OAAA,uBAA8B,GAAA,EAAI,CAAA,EAAI,IAAI,iBAAiB,CAAA;AAC9F,EAAA,OAAO,UAAA,GAAa,UAAA,CAAW,KAAA,EAAO,GAAG,CAAA,GAAI,MAAA;AAC/C,CAAA;;;;"}

View File

@@ -0,0 +1,54 @@
import { defineComponent, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderList, ssrInterpolate, ssrRenderClass } from 'vue/server-renderer';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "index",
__ssrInlineRender: true,
setup(__props) {
const superadminPerms = [
{ key: "user_mgmt", label: "User Management", enabled: true },
{ key: "billing_admin", label: "Billing Administration", enabled: true },
{ key: "robot_config", label: "Robot Configuration", enabled: true },
{ key: "system_logs", label: "System Logs Access", enabled: true },
{ key: "api_keys", label: "API Key Management", enabled: false }
];
const garagePerms = [
{ key: "vehicle_crud", label: "Vehicle CRUD", enabled: true },
{ key: "service_booking", label: "Service Booking", enabled: true },
{ key: "customer_view", label: "Customer Data View", enabled: true },
{ key: "report_export", label: "Report Export", enabled: false },
{ key: "bulk_import", label: "Bulk Import", enabled: false }
];
const packagePerms = [
{ key: "premium_features", label: "Premium Features", enabled: true },
{ key: "analytics", label: "Analytics Dashboard", enabled: true },
{ key: "multi_garage", label: "Multi-Garage Support", enabled: false },
{ key: "white_label", label: "White Label Branding", enabled: false },
{ key: "api_access", label: "API Access", enabled: true }
];
return (_ctx, _push, _parent, _attrs) => {
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8"><h1 class="text-2xl font-bold text-white">Jogosults\xE1g Kezel\xE9s</h1><p class="text-slate-400 mt-1">Permissions Management \u2014 Role-based access control matrix</p></div><div class="bg-indigo-500/10 border border-indigo-500/20 rounded-xl p-4 mb-8 flex items-start gap-3"><svg class="w-5 h-5 text-indigo-400 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><p class="text-sm text-indigo-300"> This is the permissions management interface. The 3D Capability Matrix UI (Superadmin, Garages, and Packages toggles) will be implemented here in the next iteration. </p></div><div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8"><div class="bg-slate-800 rounded-xl border border-slate-700 p-6"><div class="flex items-center gap-3 mb-4"><div class="p-2 rounded-lg bg-purple-500/10 text-purple-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"></path></svg></div><h2 class="text-lg font-semibold text-white">Superadmin</h2></div><p class="text-sm text-slate-400 mb-4">Full system access \u2014 user management, billing, robots, and system configuration.</p><div class="space-y-3"><!--[-->`);
ssrRenderList(superadminPerms, (perm) => {
_push(`<div class="flex items-center justify-between py-2 border-b border-slate-700/50 last:border-0"><span class="text-sm text-slate-300">${ssrInterpolate(perm.label)}</span><span class="${ssrRenderClass([perm.enabled ? "bg-emerald-400/10 text-emerald-400" : "bg-slate-700 text-slate-500", "text-xs px-2 py-0.5 rounded-full"])}">${ssrInterpolate(perm.enabled ? "Enabled" : "Disabled")}</span></div>`);
});
_push(`<!--]--></div><div class="mt-4 pt-4 border-t border-slate-700"><button class="w-full px-4 py-2 text-sm bg-purple-600 hover:bg-purple-500 text-white rounded-lg transition"> Configure Superadmin </button></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6"><div class="flex items-center gap-3 mb-4"><div class="p-2 rounded-lg bg-cyan-500/10 text-cyan-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.25 18.75a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 01-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 01-3 0m3 0a1.5 1.5 0 00-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 00-3.213-9.193 2.056 2.056 0 00-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 00-10.026 0 1.106 1.106 0 00-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"></path></svg></div><h2 class="text-lg font-semibold text-white">Garages</h2></div><p class="text-sm text-slate-400 mb-4">Garage-level access \u2014 vehicle management, service booking, customer data.</p><div class="space-y-3"><!--[-->`);
ssrRenderList(garagePerms, (perm) => {
_push(`<div class="flex items-center justify-between py-2 border-b border-slate-700/50 last:border-0"><span class="text-sm text-slate-300">${ssrInterpolate(perm.label)}</span><span class="${ssrRenderClass([perm.enabled ? "bg-emerald-400/10 text-emerald-400" : "bg-slate-700 text-slate-500", "text-xs px-2 py-0.5 rounded-full"])}">${ssrInterpolate(perm.enabled ? "Enabled" : "Disabled")}</span></div>`);
});
_push(`<!--]--></div><div class="mt-4 pt-4 border-t border-slate-700"><button class="w-full px-4 py-2 text-sm bg-cyan-600 hover:bg-cyan-500 text-white rounded-lg transition"> Configure Garages </button></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6"><div class="flex items-center gap-3 mb-4"><div class="p-2 rounded-lg bg-amber-500/10 text-amber-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0l-3-3m3 3l3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"></path></svg></div><h2 class="text-lg font-semibold text-white">Packages</h2></div><p class="text-sm text-slate-400 mb-4">Subscription package permissions \u2014 feature toggles per plan tier.</p><div class="space-y-3"><!--[-->`);
ssrRenderList(packagePerms, (perm) => {
_push(`<div class="flex items-center justify-between py-2 border-b border-slate-700/50 last:border-0"><span class="text-sm text-slate-300">${ssrInterpolate(perm.label)}</span><span class="${ssrRenderClass([perm.enabled ? "bg-emerald-400/10 text-emerald-400" : "bg-slate-700 text-slate-500", "text-xs px-2 py-0.5 rounded-full"])}">${ssrInterpolate(perm.enabled ? "Enabled" : "Disabled")}</span></div>`);
});
_push(`<!--]--></div><div class="mt-4 pt-4 border-t border-slate-700"><button class="w-full px-4 py-2 text-sm bg-amber-600 hover:bg-amber-500 text-white rounded-lg transition"> Configure Packages </button></div></div></div><div class="bg-slate-800/50 border-2 border-dashed border-slate-600 rounded-xl p-12 text-center"><svg class="w-12 h-12 mx-auto text-slate-600 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"></path></svg><h3 class="text-lg font-semibold text-slate-400 mb-2">3D Capability Matrix</h3><p class="text-sm text-slate-500 max-w-md mx-auto"> The interactive permission matrix UI with toggles for Superadmin, Garages, and Packages will be rendered here in the next development phase. </p></div></div>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/permissions/index.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export { _sfc_main as default };
//# sourceMappingURL=index-nGH29Vk2.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-nGH29Vk2.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/index-nGH29Vk2.js"],"names":[],"mappings":"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"}

View File

@@ -0,0 +1,75 @@
import { _ as __nuxt_component_0 } from './nuxt-link-DNVrgHUL.mjs';
import { defineComponent, ref, mergeProps, unref, withCtx, createTextVNode, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrIncludeBooleanAttr, ssrRenderComponent } from 'vue/server-renderer';
import { u as useAuthStore, _ as _imports_0 } from './auth-CRAMW6e4.mjs';
import { u as useRouter } from './server.mjs';
import '../nitro/nitro.mjs';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
import '../routes/renderer.mjs';
import 'vue-bundle-renderer/runtime';
import 'unhead/server';
import 'devalue';
import 'unhead/utils';
import 'unhead/plugins';
import 'pinia';
import './cookie-CWIsZYm7.mjs';
import 'vue-router';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "login",
__ssrInlineRender: true,
setup(__props) {
const email = ref("");
const password = ref("");
useRouter();
const authStore = useAuthStore();
return (_ctx, _push, _parent, _attrs) => {
const _component_NuxtLink = __nuxt_component_0;
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-screen bg-slate-900 flex items-center justify-center px-4" }, _attrs))}><div class="w-full max-w-md"><div class="text-center mb-8"><div class="flex items-center justify-center gap-3 mb-4"><img${ssrRenderAttr("src", _imports_0)} class="h-12 w-auto drop-shadow-md" alt="ServiceFinder Logo"><span class="text-3xl font-extrabold tracking-wider"><span class="text-white">SERVICE</span><span class="text-cyan-400">FINDER</span></span></div><h1 class="text-xl font-semibold text-slate-300">Staff Portal</h1><p class="text-sm text-slate-500 mt-1">Authorised personnel only</p></div><div class="bg-slate-800 rounded-xl shadow-2xl border border-slate-700 p-8">`);
if (unref(authStore).error) {
_push(`<div class="mb-6 p-3 rounded-lg bg-red-900/40 border border-red-700 text-red-300 text-sm">${ssrInterpolate(unref(authStore).error)}</div>`);
} else {
_push(`<!---->`);
}
_push(`<form class="space-y-5"><div><label for="email" class="block text-sm font-medium text-slate-300 mb-1.5"> Email Address </label><input id="email"${ssrRenderAttr("value", unref(email))} type="email" autocomplete="email" required placeholder="admin@example.com" class="w-full px-4 py-2.5 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-transparent transition"></div><div><label for="password" class="block text-sm font-medium text-slate-300 mb-1.5"> Password </label><input id="password"${ssrRenderAttr("value", unref(password))} type="password" autocomplete="current-password" required placeholder="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" class="w-full px-4 py-2.5 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-transparent transition"></div><button type="submit"${ssrIncludeBooleanAttr(unref(authStore).isLoading) ? " disabled" : ""} class="w-full py-2.5 px-4 bg-cyan-600 hover:bg-cyan-500 disabled:bg-cyan-800 disabled:cursor-not-allowed text-white font-semibold rounded-lg transition duration-200 flex items-center justify-center gap-2">`);
if (unref(authStore).isLoading) {
_push(`<svg class="animate-spin h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>`);
} else {
_push(`<!---->`);
}
_push(`<span>${ssrInterpolate(unref(authStore).isLoading ? "Signing in..." : "Sign In")}</span></button></form><div class="mt-6 text-center">`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: "/",
class: "text-sm text-slate-500 hover:text-cyan-400 transition"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(` \u2190 Back to ServiceFinder `);
} else {
return [
createTextVNode(" \u2190 Back to ServiceFinder ")
];
}
}),
_: 1
}, _parent));
_push(`</div></div></div></div>`);
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/login.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
export { _sfc_main as default };
//# sourceMappingURL=login-CLIOTi6c.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"login-CLIOTi6c.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/login-CLIOTi6c.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,4BAA4B,eAAA,CAAgB;AAAA,EAChD,MAAA,EAAQ,OAAA;AAAA,EACR,iBAAA,EAAmB,IAAA;AAAA,EACnB,MAAM,OAAA,EAAS;AACb,IAAA,MAAM,KAAA,GAAQ,IAAI,EAAE,CAAA;AACpB,IAAA,MAAM,QAAA,GAAW,IAAI,EAAE,CAAA;AACvB,IAAA,SAAA,EAAU;AACV,IAAA,MAAM,YAAY,YAAA,EAAa;AAC/B,IAAA,OAAO,CAAC,IAAA,EAAM,KAAA,EAAO,OAAA,EAAS,MAAA,KAAW;AACvC,MAAA,MAAM,mBAAA,GAAsB,kBAAA;AAC5B,MAAA,KAAA,CAAM,CAAA,IAAA,EAAO,cAAA,CAAe,UAAA,CAAW,EAAE,OAAO,iEAAA,EAAkE,EAAG,MAAM,CAAC,CAAC,CAAA,yHAAA,EAA4H,aAAA,CAAc,KAAA,EAAO,UAAU,CAAC,CAAA,uaAAA,CAAya,CAAA;AAClsB,MAAA,IAAI,KAAA,CAAM,SAAS,CAAA,CAAE,KAAA,EAAO;AAC1B,QAAA,KAAA,CAAM,6FAA6F,cAAA,CAAe,KAAA,CAAM,SAAS,CAAA,CAAE,KAAK,CAAC,CAAA,MAAA,CAAQ,CAAA;AAAA,MACnJ,CAAA,MAAO;AACL,QAAA,KAAA,CAAM,CAAA,OAAA,CAAS,CAAA;AAAA,MACjB;AACA,MAAA,KAAA,CAAM,CAAA,gJAAA,EAAmJ,cAAc,OAAA,EAAS,KAAA,CAAM,KAAK,CAAC,CAAC,CAAA,+YAAA,EAAkZ,aAAA,CAAc,OAAA,EAAS,KAAA,CAAM,QAAQ,CAAC,CAAC,CAAA,wVAAA,EAAmT,qBAAA,CAAsB,KAAA,CAAM,SAAS,EAAE,SAAS,CAAA,GAAI,WAAA,GAAc,EAAE,CAAA,8MAAA,CAAgN,CAAA;AAC7rC,MAAA,IAAI,KAAA,CAAM,SAAS,CAAA,CAAE,SAAA,EAAW;AAC9B,QAAA,KAAA,CAAM,CAAA,4TAAA,CAA8T,CAAA;AAAA,MACtU,CAAA,MAAO;AACL,QAAA,KAAA,CAAM,CAAA,OAAA,CAAS,CAAA;AAAA,MACjB;AACA,MAAA,KAAA,CAAM,CAAA,MAAA,EAAS,eAAe,KAAA,CAAM,SAAS,EAAE,SAAA,GAAY,eAAA,GAAkB,SAAS,CAAC,CAAA,qDAAA,CAAuD,CAAA;AAC9I,MAAA,KAAA,CAAM,mBAAmB,mBAAA,EAAqB;AAAA,QAC5C,EAAA,EAAI,GAAA;AAAA,QACJ,KAAA,EAAO;AAAA,OACT,EAAG;AAAA,QACD,SAAS,OAAA,CAAQ,CAAC,CAAA,EAAG,MAAA,EAAQ,UAAU,QAAA,KAAa;AAClD,UAAA,IAAI,MAAA,EAAQ;AACV,YAAA,MAAA,CAAO,CAAA,8BAAA,CAA2B,CAAA;AAAA,UACpC,CAAA,MAAO;AACL,YAAA,OAAO;AAAA,cACL,gBAAgB,gCAA2B;AAAA,aAC7C;AAAA,UACF;AAAA,QACF,CAAC,CAAA;AAAA,QACD,CAAA,EAAG;AAAA,OACL,EAAG,OAAO,CAAC,CAAA;AACX,MAAA,KAAA,CAAM,CAAA,wBAAA,CAA0B,CAAA;AAAA,IAClC,CAAA;AAAA,EACF;AACF,CAAC;AACD,MAAM,aAAa,SAAA,CAAU,KAAA;AAC7B,SAAA,CAAU,KAAA,GAAQ,CAAC,KAAA,EAAO,GAAA,KAAQ;AAChC,EAAA,MAAM,aAAa,aAAA,EAAc;AACjC,EAAA,CAAC,UAAA,CAAW,YAAY,UAAA,CAAW,OAAA,uBAA8B,GAAA,EAAI,CAAA,EAAI,IAAI,iBAAiB,CAAA;AAC9F,EAAA,OAAO,UAAA,GAAa,UAAA,CAAW,KAAA,EAAO,GAAG,CAAA,GAAI,MAAA;AAC/C,CAAA;;;;"}

View File

@@ -0,0 +1,310 @@
import { defineComponent, shallowRef, h, resolveComponent, computed, unref } from 'vue';
import { D as parseQuery, k as hasProtocol, m as joinURL, l as isScriptProtocol, E as withTrailingSlash, F as withoutTrailingSlash } from '../nitro/nitro.mjs';
import { u as useRouter, e as encodeRoutePath, r as resolveRouteObject, n as navigateTo, a as useNuxtApp, b as useRuntimeConfig, c as nuxtLinkDefaults } from './server.mjs';
const firstNonUndefined = (...args) => args.find((arg) => arg !== void 0);
function sanitizeExternalHref(value) {
let candidate = value.replace(/[\u0000-\u001f\s]+/g, "");
while (candidate.toLowerCase().startsWith("view-source:")) {
candidate = candidate.slice("view-source:".length);
}
const colon = candidate.indexOf(":");
if (colon > 0 && isScriptProtocol(candidate.slice(0, colon + 1))) {
return null;
}
return value;
}
// @__NO_SIDE_EFFECTS__
function defineNuxtLink(options) {
const componentName = options.componentName || "NuxtLink";
function isHashLinkWithoutHashMode(link) {
return typeof link === "string" && link.startsWith("#");
}
function resolveTrailingSlashBehavior(to, resolve, trailingSlash) {
const effectiveTrailingSlash = trailingSlash != null ? trailingSlash : options.trailingSlash;
if (!to || effectiveTrailingSlash !== "append" && effectiveTrailingSlash !== "remove") {
return to;
}
if (typeof to === "string") {
return applyTrailingSlashBehavior(to, effectiveTrailingSlash);
}
const path = "path" in to && to.path !== void 0 ? to.path : resolve(to).path;
const resolvedPath = {
...to,
name: void 0,
// named routes would otherwise always override trailing slash behavior
path: applyTrailingSlashBehavior(path, effectiveTrailingSlash)
};
return resolvedPath;
}
function useNuxtLink(props) {
var _a, _b, _c;
const router = useRouter();
const config = useRuntimeConfig();
const hasTarget = computed(() => !!unref(props.target) && unref(props.target) !== "_self");
const isAbsoluteUrl = computed(() => {
const path = unref(props.to) || unref(props.href) || "";
return typeof path === "string" && hasProtocol(path, { acceptRelative: true });
});
const builtinRouterLink = resolveComponent("RouterLink");
const useBuiltinLink = builtinRouterLink && typeof builtinRouterLink !== "string" ? builtinRouterLink.useLink : void 0;
const isExternal = computed(() => {
if (unref(props.external)) {
return true;
}
const path = unref(props.to) || unref(props.href) || "";
if (typeof path === "object") {
return false;
}
return path === "" || isAbsoluteUrl.value;
});
const to = computed(() => {
const path = unref(props.to) || unref(props.href) || "";
if (isExternal.value) {
return path;
}
return resolveTrailingSlashBehavior(path, router.resolve, unref(props.trailingSlash));
});
const link = isExternal.value ? void 0 : useBuiltinLink == null ? void 0 : useBuiltinLink({ ...props, to, viewTransition: unref(props.viewTransition) });
const href = computed(() => {
var _a2, _b2, _c2;
const effectiveTrailingSlash = (_a2 = unref(props.trailingSlash)) != null ? _a2 : options.trailingSlash;
if (!to.value || isAbsoluteUrl.value || isHashLinkWithoutHashMode(to.value)) {
const raw = to.value;
return typeof raw === "string" ? sanitizeExternalHref(raw) : raw;
}
if (isExternal.value) {
const path = typeof to.value === "object" && "path" in to.value ? resolveRouteObject(to.value) : to.value;
const href2 = typeof path === "object" ? router.resolve(path).href : path;
const safe = typeof href2 === "string" ? sanitizeExternalHref(href2) : href2;
return safe === null ? null : applyTrailingSlashBehavior(safe, effectiveTrailingSlash);
}
if (typeof to.value === "object") {
return (_c2 = (_b2 = router.resolve(to.value)) == null ? void 0 : _b2.href) != null ? _c2 : null;
}
return applyTrailingSlashBehavior(joinURL(config.app.baseURL, to.value), effectiveTrailingSlash);
});
return {
to,
hasTarget,
isAbsoluteUrl,
isExternal,
//
href,
isActive: (_a = link == null ? void 0 : link.isActive) != null ? _a : computed(() => to.value === router.currentRoute.value.path),
isExactActive: (_b = link == null ? void 0 : link.isExactActive) != null ? _b : computed(() => to.value === router.currentRoute.value.path),
route: (_c = link == null ? void 0 : link.route) != null ? _c : computed(() => router.resolve(to.value)),
async navigate(_e) {
if (href.value === null) {
return;
}
await navigateTo(href.value, { replace: unref(props.replace), external: isExternal.value || hasTarget.value });
}
};
}
return defineComponent({
name: componentName,
props: {
// Routing
to: {
type: [String, Object],
default: void 0,
required: false
},
href: {
type: [String, Object],
default: void 0,
required: false
},
// Attributes
target: {
type: String,
default: void 0,
required: false
},
rel: {
type: String,
default: void 0,
required: false
},
noRel: {
type: Boolean,
default: void 0,
required: false
},
// Prefetching
prefetch: {
type: Boolean,
default: void 0,
required: false
},
prefetchOn: {
type: [String, Object],
default: void 0,
required: false
},
noPrefetch: {
type: Boolean,
default: void 0,
required: false
},
// Styling
activeClass: {
type: String,
default: void 0,
required: false
},
exactActiveClass: {
type: String,
default: void 0,
required: false
},
prefetchedClass: {
type: String,
default: void 0,
required: false
},
// Vue Router's `<RouterLink>` additional props
replace: {
type: Boolean,
default: void 0,
required: false
},
ariaCurrentValue: {
type: String,
default: void 0,
required: false
},
// Edge cases handling
external: {
type: Boolean,
default: void 0,
required: false
},
// Slot API
custom: {
type: Boolean,
default: void 0,
required: false
},
// Behavior
trailingSlash: {
type: String,
default: void 0,
required: false
}
},
useLink: useNuxtLink,
setup(props, { slots }) {
const router = useRouter();
const { to, href, navigate, isExternal, hasTarget, isAbsoluteUrl } = useNuxtLink(props);
shallowRef(false);
const el = void 0;
const elRef = void 0;
async function prefetch(nuxtApp = useNuxtApp()) {
{
return;
}
}
return () => {
var _a;
if (!isExternal.value && !hasTarget.value && !isHashLinkWithoutHashMode(to.value)) {
const routerLinkProps = {
ref: elRef,
to: to.value,
activeClass: props.activeClass || options.activeClass,
exactActiveClass: props.exactActiveClass || options.exactActiveClass,
replace: props.replace,
ariaCurrentValue: props.ariaCurrentValue,
custom: props.custom
};
if (!props.custom) {
routerLinkProps.rel = props.rel || void 0;
}
return h(
resolveComponent("RouterLink"),
routerLinkProps,
slots.default
);
}
const target = props.target || null;
const rel = firstNonUndefined(
// converts `""` to `null` to prevent the attribute from being added as empty (`rel=""`)
props.noRel ? "" : props.rel,
options.externalRelAttribute,
/*
* A fallback rel of `noopener noreferrer` is applied for external links or links that open in a new tab.
* This solves a reverse tabnapping security flaw in browsers pre-2021 as well as improving privacy.
*/
isAbsoluteUrl.value || hasTarget.value ? "noopener noreferrer" : ""
) || null;
if (props.custom) {
if (!slots.default) {
return null;
}
return slots.default({
href: href.value,
navigate,
prefetch,
get route() {
if (!href.value) {
return void 0;
}
const url = new URL(href.value, "http://localhost");
return {
path: url.pathname,
fullPath: url.pathname,
get query() {
return parseQuery(url.search);
},
hash: url.hash,
params: {},
name: void 0,
matched: [],
redirectedFrom: void 0,
meta: {},
href: href.value
};
},
rel,
target,
isExternal: isExternal.value || hasTarget.value,
isActive: false,
isExactActive: false
});
}
return h("a", {
ref: el,
href: href.value || null,
// converts `""` to `null` to prevent the attribute from being added as empty (`href=""`)
rel,
target,
onClick: async (event) => {
var _a2;
if (isExternal.value || hasTarget.value) {
return;
}
event.preventDefault();
try {
const encodedHref = encodeRoutePath((_a2 = href.value) != null ? _a2 : "");
return await (props.replace ? router.replace(encodedHref) : router.push(encodedHref));
} finally {
}
}
}, (_a = slots.default) == null ? void 0 : _a.call(slots));
};
}
});
}
const __nuxt_component_0 = /* @__PURE__ */ defineNuxtLink(nuxtLinkDefaults);
function applyTrailingSlashBehavior(to, trailingSlash) {
const normalizeFn = trailingSlash === "append" ? withTrailingSlash : withoutTrailingSlash;
const hasProtocolDifferentFromHttp = hasProtocol(to) && !to.startsWith("http");
if (hasProtocolDifferentFromHttp) {
return to;
}
return normalizeFn(to, true);
}
export { __nuxt_component_0 as _ };
//# sourceMappingURL=nuxt-link-DNVrgHUL.mjs.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
const interopDefault = r => r.default || r || [];
const styles = {
"node_modules/nuxt/dist/app/entry.js": () => import('./entry-styles.BhrIOCGw.mjs').then(interopDefault),
"app.vue": () => import('./app-styles.BKebClGy.mjs').then(interopDefault),
"node_modules/nuxt/dist/app/components/error-404.vue": () => import('./error-404-styles.CiJjK6WX.mjs').then(interopDefault),
"node_modules/nuxt/dist/app/components/error-500.vue": () => import('./error-500-styles.ulHNpcF1.mjs').then(interopDefault)
};
export { styles as default };
//# sourceMappingURL=styles.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"styles.mjs","sources":["../../../../.nuxt/dist/server/styles.mjs"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,IAAI;AAC9C,eAAe;AACf,EAAE,qCAAqC,EAAE,MAAM,OAAO,6BAAmC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;AAC/G,EAAE,SAAS,EAAE,MAAM,OAAO,2BAAiC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;AACjF,EAAE,qDAAqD,EAAE,MAAM,OAAO,iCAAuC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC;AACnI,EAAE,qDAAqD,EAAE,MAAM,OAAO,iCAAuC,CAAC,CAAC,IAAI,CAAC,cAAc;AAClI;;;;"}

View File

@@ -0,0 +1,22 @@
import { hasInjectionContext, inject } from 'vue';
import { t as tryUseNuxtApp } from './server.mjs';
import { u as useHead$1, h as headSymbol } from '../routes/renderer.mjs';
function injectHead(nuxtApp) {
var _a;
const nuxt = nuxtApp || tryUseNuxtApp();
return ((_a = nuxt == null ? void 0 : nuxt.ssrContext) == null ? void 0 : _a.head) || (nuxt == null ? void 0 : nuxt.runWithContext(() => {
if (hasInjectionContext()) {
return inject(headSymbol);
}
}));
}
function useHead(input, options = {}) {
const head = injectHead(options.nuxt);
if (head) {
return useHead$1(input, { head, ...options });
}
}
export { useHead as u };
//# sourceMappingURL=v3-DnDMBKvA.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"v3-DnDMBKvA.mjs","sources":["../../../../.nuxt/dist/server/_nuxt/v3-DnDMBKvA.js"],"names":[],"mappings":";;;;AAGA,SAAS,WAAW,OAAA,EAAS;AAH7B,EAAA,IAAA,EAAA;AAIE,EAAA,MAAM,IAAA,GAAO,WAAW,aAAA,EAAc;AACtC,EAAA,OAAA,CAAA,CAAO,kCAAM,UAAA,KAAN,IAAA,GAAA,MAAA,GAAA,EAAA,CAAkB,IAAA,MAAQ,IAAA,IAAA,IAAA,GAAA,MAAA,GAAA,IAAA,CAAM,eAAe,MAAM;AAC1D,IAAA,IAAI,qBAAoB,EAAG;AACzB,MAAA,OAAO,OAAO,UAAU,CAAA;AAAA,IAC1B;AAAA,EACF,CAAA,CAAA,CAAA;AACF;AACA,SAAS,OAAA,CAAQ,KAAA,EAAO,OAAA,GAAU,EAAC,EAAG;AACpC,EAAA,MAAM,IAAA,GAAO,UAAA,CAAW,OAAA,CAAQ,IAAI,CAAA;AACpC,EAAA,IAAI,IAAA,EAAM;AACR,IAAA,OAAO,UAAU,KAAA,EAAO,EAAE,IAAA,EAAM,GAAG,SAAS,CAAA;AAAA,EAC9C;AACF;;;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"nitro.mjs","sources":["../../../../node_modules/destr/dist/index.mjs","../../../../node_modules/ufo/dist/index.mjs","../../../../node_modules/h3/node_modules/cookie-es/dist/index.mjs","../../../../node_modules/radix3/dist/index.mjs","../../../../node_modules/defu/dist/defu.mjs","../../../../node_modules/node-mock-http/dist/index.mjs","../../../../node_modules/h3/dist/index.mjs","../../../../node_modules/hookable/dist/index.mjs","../../../../node_modules/node-fetch-native/dist/native.mjs","../../../../node_modules/ofetch/dist/shared/ofetch.CWycOUEr.mjs","../../../../node_modules/ofetch/dist/node.mjs","../../../../node_modules/unstorage/dist/shared/unstorage.zVDD2mZo.mjs","../../../../node_modules/unstorage/dist/index.mjs","../../../../node_modules/unstorage/drivers/utils/index.mjs","../../../../node_modules/unstorage/drivers/utils/node-fs.mjs","../../../../node_modules/unstorage/drivers/fs-lite.mjs","../../../../node_modules/nitropack/dist/runtime/internal/storage.mjs","../../../../node_modules/ohash/dist/shared/ohash.D__AXeF1.mjs","../../../../node_modules/ohash/dist/crypto/node/index.mjs","../../../../node_modules/nitropack/dist/runtime/internal/hash.mjs","../../../../node_modules/nitropack/dist/runtime/internal/cache.mjs","../../../../node_modules/klona/dist/index.mjs","../../../../node_modules/scule/dist/index.mjs","../../../../node_modules/nitropack/dist/runtime/internal/utils.env.mjs","../../../../node_modules/nitropack/dist/runtime/internal/config.mjs","../../../../node_modules/unctx/dist/index.mjs","../../../../node_modules/nitropack/dist/runtime/internal/context.mjs","../../../../node_modules/nitropack/dist/runtime/internal/route-rules-utils.mjs","../../../../node_modules/nitropack/dist/runtime/internal/route-rules.mjs","../../../../node_modules/nitropack/dist/runtime/internal/utils.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/error.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/error.mjs","../../../../node_modules/nitropack/dist/runtime/internal/error/utils.mjs","../../../../node_modules/nitropack/dist/runtime/internal/error/prod.mjs","../../../../node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs","../../../../node_modules/nitropack/dist/runtime/internal/static.mjs","../../../../node_modules/nitropack/dist/runtime/internal/app.mjs","../../../../node_modules/nitropack/dist/runtime/internal/renderer.mjs","../../../../node_modules/cookie-es/dist/index.mjs","../../../../node_modules/nitropack/dist/runtime/internal/lib/http-graceful-shutdown.mjs","../../../../node_modules/nitropack/dist/runtime/internal/shutdown.mjs","../../../../node_modules/nitropack/dist/presets/node/runtime/node-server.mjs"],"names":["decode","getQuery","NullObject","parse","tryDecode","serialize","createRouter","f","h","c","i","l","createError","mergeHeaders","s","nodeFetch","Headers","Headers$1","AbortController$1","normalizeKey","defineDriver","DRIVER_NAME","dirname","fsPromises","resolve","fsp","_inlineAppConfig","createRadixRouter","nitroApp","callNodeRequestHandler","fetchNodeRequestHandler","gracefulShutdown","HttpsServer","HttpServer"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]}

View File

@@ -0,0 +1,461 @@
import { createRenderer, getRequestDependencies, getPreloadLinks, getPrefetchLinks } from 'vue-bundle-renderer/runtime';
import { j as joinRelativeURL, u as useRuntimeConfig, e as encodePath, d as defineRenderHandler, g as getQuery, c as createError, a as getRouteRules, b as getResponseStatusText, f as getResponseStatus, h as useNitroApp } from '../nitro/nitro.mjs';
import { renderToString } from 'vue/server-renderer';
import { createHead as createHead$1, propsToString, renderSSRHead } from 'unhead/server';
import { stringify, uneval } from 'devalue';
import { walkResolver } from 'unhead/utils';
import { isRef, toValue, hasInjectionContext, inject, ref, watchEffect, getCurrentInstance, onBeforeUnmount, onDeactivated, onActivated } from 'vue';
import { DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin } from 'unhead/plugins';
const VueResolver = (_, value) => {
return isRef(value) ? toValue(value) : value;
};
const headSymbol = "usehead";
// @__NO_SIDE_EFFECTS__
function vueInstall(head) {
const plugin = {
install(app) {
app.config.globalProperties.$unhead = head;
app.config.globalProperties.$head = head;
app.provide(headSymbol, head);
}
};
return plugin.install;
}
// @__NO_SIDE_EFFECTS__
function injectHead() {
if (hasInjectionContext()) {
const instance = inject(headSymbol);
if (instance) {
return instance;
}
}
throw new Error("useHead() was called without provide context, ensure you call it through the setup() function.");
}
function useHead(input, options = {}) {
const head = options.head || /* @__PURE__ */ injectHead();
return head.ssr ? head.push(input || {}, options) : clientUseHead(head, input, options);
}
function clientUseHead(head, input, options = {}) {
const deactivated = ref(false);
let entry;
watchEffect(() => {
const i = deactivated.value ? {} : walkResolver(input, VueResolver);
if (entry) {
entry.patch(i);
} else {
entry = head.push(i, options);
}
});
const vm = getCurrentInstance();
if (vm) {
onBeforeUnmount(() => {
entry.dispose();
});
onDeactivated(() => {
deactivated.value = true;
});
onActivated(() => {
deactivated.value = false;
});
}
return entry;
}
// @__NO_SIDE_EFFECTS__
function createHead(options = {}) {
const head = createHead$1({
...options,
propResolvers: [VueResolver]
});
head.install = vueInstall(head);
return head;
}
const NUXT_RUNTIME_PAYLOAD_EXTRACTION = false;
const appHead = {"meta":[{"name":"viewport","content":"width=device-width, initial-scale=1"},{"charset":"utf-8"}],"link":[],"style":[],"script":[],"noscript":[]};
const appRootTag = "div";
const appRootAttrs = {"id":"__nuxt"};
const appTeleportTag = "div";
const appTeleportAttrs = {"id":"teleports"};
const appId = "nuxt-app";
function baseURL() {
return useRuntimeConfig().app.baseURL;
}
function buildAssetsDir() {
return useRuntimeConfig().app.buildAssetsDir;
}
function buildAssetsURL(...path) {
return joinRelativeURL(publicAssetsURL(), buildAssetsDir(), ...path);
}
function publicAssetsURL(...path) {
const app = useRuntimeConfig().app;
const publicBase = app.cdnURL || app.baseURL;
return path.length ? joinRelativeURL(publicBase, ...path) : publicBase;
}
// @ts-expect-error private property consumed by vite-generated url helpers
globalThis.__buildAssetsURL = buildAssetsURL;
// @ts-expect-error private property consumed by vite-generated url helpers
globalThis.__publicAssetsURL = publicAssetsURL;
const APP_ROOT_OPEN_TAG = `<${appRootTag}${propsToString(appRootAttrs)}>`;
const APP_ROOT_CLOSE_TAG = `</${appRootTag}>`;
// @ts-expect-error file will be produced after app build
const getServerEntry = () => import('../build/server.mjs').then((r) => r.default || r);
// @ts-expect-error file will be produced after app build
const getPrecomputedDependencies = () => import('../build/client.precomputed.mjs').then((r) => r.default || r).then((r) => typeof r === "function" ? r() : r);
const getSSRRenderer = lazyCachedFunction(async () => {
const createSSRApp = await getServerEntry();
if (!createSSRApp) {
throw new Error("Server bundle is not available");
}
const precomputed = await getPrecomputedDependencies();
const renderer = createRenderer(createSSRApp, {
precomputed,
manifest: undefined,
renderToString: renderToString$1,
buildAssetsURL
});
async function renderToString$1(input, context) {
const html = await renderToString(input, context);
return APP_ROOT_OPEN_TAG + html + APP_ROOT_CLOSE_TAG;
}
return renderer;
});
const getSPARenderer = lazyCachedFunction(async () => {
const precomputed = await getPrecomputedDependencies();
// @ts-expect-error virtual file
const spaTemplate = await import('../virtual/_virtual_spa-template.mjs').then((r) => r.template).catch(() => "").then((r) => {
{
return APP_ROOT_OPEN_TAG + r + APP_ROOT_CLOSE_TAG;
}
});
const renderer = createRenderer(() => () => {}, {
precomputed,
manifest: undefined,
renderToString: () => spaTemplate,
buildAssetsURL
});
const result = await renderer.renderToString({});
const renderToString = (ssrContext) => {
const config = useRuntimeConfig(ssrContext.event);
ssrContext.modules ||= new Set();
ssrContext.payload.serverRendered = false;
ssrContext.config = {
public: config.public,
app: config.app
};
return Promise.resolve(result);
};
return {
rendererContext: renderer.rendererContext,
renderToString
};
});
function lazyCachedFunction(fn) {
let res = null;
return () => {
if (res === null) {
res = fn().catch((err) => {
res = null;
throw err;
});
}
return res;
};
}
function getRenderer(ssrContext) {
return ssrContext.noSSR ? getSPARenderer() : getSSRRenderer();
}
// @ts-expect-error file will be produced after app build
const getSSRStyles = lazyCachedFunction(() => import('../build/styles.mjs').then((r) => r.default || r));
function renderPayloadJsonScript(opts) {
const contents = opts.data ? encodeForwardSlashes(stringify(opts.data, opts.ssrContext["~payloadReducers"])) : "";
const payload = {
"type": "application/json",
"innerHTML": contents,
"data-nuxt-data": appId,
"data-ssr": !(opts.ssrContext.noSSR)
};
{
payload.id = "__NUXT_DATA__";
}
if (opts.src) {
payload["data-src"] = opts.src;
}
const config = uneval(opts.ssrContext.config);
return [payload, { innerHTML: `window.__NUXT__={};window.__NUXT__.config=${config}` }];
}
function encodeForwardSlashes(str) {
return str.replaceAll("/", "\\u002F");
}
const unheadOptions = {
disableDefaults: true,
disableCapoSorting: false,
plugins: [DeprecationsPlugin, PromisesPlugin, TemplateParamsPlugin, AliasSortingPlugin],
};
function encodeEventPath(path) {
const queryIndex = path.indexOf("?");
if (queryIndex === -1) {
return encodePath(path);
}
return encodePath(path.slice(0, queryIndex)) + path.slice(queryIndex);
}
function createSSRContext(event) {
const url = encodeEventPath(event.path);
const ssrContext = {
url,
event,
runtimeConfig: useRuntimeConfig(event),
noSSR: event.context.nuxt?.noSSR || (false),
head: createHead(unheadOptions),
error: false,
nuxt: undefined,
payload: {},
["~payloadReducers"]: Object.create(null),
modules: new Set()
};
return ssrContext;
}
function setSSRError(ssrContext, error) {
ssrContext.error = true;
ssrContext.payload = { error };
ssrContext.url = error.url;
}
async function renderInlineStyles(usedModules) {
const styleMap = await getSSRStyles();
const inlinedStyles = new Set();
for (const mod of usedModules) {
if (mod in styleMap && styleMap[mod]) {
for (const style of await styleMap[mod]()) {
inlinedStyles.add(style);
}
}
}
return Array.from(inlinedStyles).map((style) => ({ innerHTML: style }));
}
const renderSSRHeadOptions = {"omitLineBreaks":false};
const entryIds = ["node_modules/nuxt/dist/app/entry.js"];
// @ts-expect-error private property consumed by vite-generated url helpers
globalThis.__buildAssetsURL = buildAssetsURL;
// @ts-expect-error private property consumed by vite-generated url helpers
globalThis.__publicAssetsURL = publicAssetsURL;
const HAS_APP_TELEPORTS = !!(appTeleportAttrs.id);
const APP_TELEPORT_OPEN_TAG = HAS_APP_TELEPORTS ? `<${appTeleportTag}${propsToString(appTeleportAttrs)}>` : "";
const APP_TELEPORT_CLOSE_TAG = HAS_APP_TELEPORTS ? `</${appTeleportTag}>` : "";
const handler = defineRenderHandler((event) => {
const ssrError = event.path.startsWith("/__nuxt_error") ? getQuery(event) : null;
if (ssrError && !("__unenv__" in event.node.req)) {
throw createError({
status: 404,
statusText: "Page Not Found: /__nuxt_error",
message: "Page Not Found: /__nuxt_error"
});
}
return renderRoute(event, ssrError);
});
async function renderRoute(event, ssrError) {
const nitroApp = useNitroApp();
const ssrContext = createSSRContext(event);
const headEntryOptions = { mode: "server" };
ssrContext.head.push(appHead, headEntryOptions);
if (ssrError) {
const status = ssrError.status || ssrError.statusCode;
if (status) {
ssrError.status = ssrError.statusCode = Number.parseInt(status);
}
setSSRError(ssrContext, ssrError);
}
const routeOptions = getRouteRules(event);
if (routeOptions.ssr === false) {
ssrContext.noSSR = true;
}
!ssrContext.noSSR && (NUXT_RUNTIME_PAYLOAD_EXTRACTION);
const renderer = await getRenderer(ssrContext);
{
for (const id of entryIds) {
ssrContext.modules.add(id);
}
}
const _rendered = await renderer.renderToString(ssrContext).catch(async (error) => {
if ((ssrContext["~renderResponse"] || ssrContext._renderResponse) && error.message === "skipping render") {
return {};
}
const _err = !ssrError && ssrContext.payload?.error || error;
await ssrContext.nuxt?.hooks.callHook("app:error", _err);
throw _err;
});
const inlinedStyles = !ssrContext["~renderResponse"] && !ssrContext._renderResponse && true ? await renderInlineStyles(ssrContext.modules ?? []) : [];
await ssrContext.nuxt?.hooks.callHook("app:rendered", {
ssrContext,
renderResult: _rendered
});
if (ssrContext["~renderResponse"] || ssrContext._renderResponse) {
return ssrContext["~renderResponse"] || ssrContext._renderResponse;
}
if (ssrContext.payload?.error && !ssrError) {
throw ssrContext.payload.error;
}
const NO_SCRIPTS = routeOptions.noScripts;
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext);
if (ssrContext["~preloadManifest"] && !NO_SCRIPTS) {
ssrContext.head.push({ link: [{
rel: "preload",
as: "fetch",
fetchpriority: "low",
crossorigin: "anonymous",
href: buildAssetsURL(`builds/meta/${ssrContext.runtimeConfig.app.buildId}.json`)
}] }, {
...headEntryOptions,
tagPriority: "low"
});
}
if (inlinedStyles.length) {
ssrContext.head.push({ style: inlinedStyles });
}
const link = [];
for (const resource of Object.values(styles)) {
link.push({
rel: "stylesheet",
href: renderer.rendererContext.buildAssetsURL(resource.file),
crossorigin: ""
});
}
if (link.length) {
ssrContext.head.push({ link }, headEntryOptions);
}
if (!NO_SCRIPTS) {
if (ssrContext["~lazyHydratedModules"]) {
for (const id of ssrContext["~lazyHydratedModules"]) {
ssrContext.modules?.delete(id);
}
}
ssrContext.head.push({ link: getPreloadLinks(ssrContext, renderer.rendererContext) }, headEntryOptions);
ssrContext.head.push({ link: getPrefetchLinks(ssrContext, renderer.rendererContext) }, headEntryOptions);
ssrContext.head.push({ script: renderPayloadJsonScript({
ssrContext,
data: ssrContext.payload
}) }, {
...headEntryOptions,
tagPosition: "bodyClose",
tagPriority: "high"
});
}
if (!routeOptions.noScripts) {
const tagPosition = "head";
ssrContext.head.push({ script: Object.values(scripts).map((resource) => ({
type: resource.module ? "module" : null,
src: renderer.rendererContext.buildAssetsURL(resource.file),
defer: resource.module ? null : true,
tagPosition,
crossorigin: ""
})) }, headEntryOptions);
}
const { headTags, bodyTags, bodyTagsOpen, htmlAttrs, bodyAttrs } = await renderSSRHead(ssrContext.head, renderSSRHeadOptions);
const htmlContext = {
htmlAttrs: htmlAttrs ? [htmlAttrs] : [],
head: normalizeChunks([headTags]),
bodyAttrs: bodyAttrs ? [bodyAttrs] : [],
bodyPrepend: normalizeChunks([bodyTagsOpen, ssrContext.teleports?.body]),
body: [_rendered.html, APP_TELEPORT_OPEN_TAG + (HAS_APP_TELEPORTS ? joinTags([ssrContext.teleports?.[`#${appTeleportAttrs.id}`]]) : "") + APP_TELEPORT_CLOSE_TAG],
bodyAppend: [bodyTags]
};
await nitroApp.hooks.callHook("render:html", htmlContext, { event });
return {
body: renderHTMLDocument(htmlContext),
statusCode: getResponseStatus(event),
statusMessage: getResponseStatusText(event),
headers: {
"content-type": "text/html;charset=utf-8",
"x-powered-by": "Nuxt"
}
};
}
function normalizeChunks(chunks) {
const result = [];
for (const _chunk of chunks) {
const chunk = _chunk?.trim();
if (chunk) {
result.push(chunk);
}
}
return result;
}
function joinTags(tags) {
return tags.join("");
}
function joinAttrs(chunks) {
if (chunks.length === 0) {
return "";
}
return " " + chunks.join(" ");
}
function renderHTMLDocument(html) {
return "<!DOCTYPE html>" + `<html${joinAttrs(html.htmlAttrs)}>` + `<head>${joinTags(html.head)}</head>` + `<body${joinAttrs(html.bodyAttrs)}>${joinTags(html.bodyPrepend)}${joinTags(html.body)}${joinTags(html.bodyAppend)}</body>` + "</html>";
}
const renderer = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
__proto__: null,
default: handler
}, Symbol.toStringTag, { value: 'Module' }));
export { baseURL as b, headSymbol as h, publicAssetsURL as p, renderer as r, useHead as u };
//# sourceMappingURL=renderer.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"renderer.mjs","sources":["../../../../node_modules/@unhead/vue/dist/shared/vue.N9zWjxoK.mjs","../../../../node_modules/@unhead/vue/dist/shared/vue.Cr7xSEtD.mjs","../../../../node_modules/@unhead/vue/dist/server.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/paths.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/build-files.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/payload.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/app.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/utils/renderer/inline-styles.mjs","../../../../node_modules/@nuxt/nitro-server/dist/runtime/handlers/renderer.mjs"],"names":["renderToString","_renderToString"],"mappings":"","x_google_ignoreList":[0,1,2,3,4,5,6,7,8]}

View File

@@ -0,0 +1,4 @@
const template = "";
export { template };
//# sourceMappingURL=_virtual_spa-template.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"_virtual_spa-template.mjs","sources":[],"names":[],"mappings":";;;;"}

View File

@@ -0,0 +1,10 @@
import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import 'node:http';
import 'node:https';
export { G as default } from './chunks/nitro/nitro.mjs';
import 'node:events';
import 'node:buffer';
import 'node:fs';
import 'node:path';
import 'node:crypto';
import 'node:url';
//# sourceMappingURL=index.mjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sources":[],"names":[],"mappings":";;;;;;;;"}

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,22 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./api.js"), exports);
__exportStar(require("./app.js"), exports);
__exportStar(require("./component.js"), exports);
__exportStar(require("./context.js"), exports);
__exportStar(require("./hooks.js"), exports);
__exportStar(require("./util.js"), exports);

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HOOK_PLUGIN_SETTINGS_SET = exports.HOOK_SETUP = void 0;
exports.HOOK_SETUP = 'devtools-plugin:setup';
exports.HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isProxyAvailable = exports.getTarget = exports.getDevtoolsGlobalHook = void 0;
function getDevtoolsGlobalHook() {
return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
exports.getDevtoolsGlobalHook = getDevtoolsGlobalHook;
function getTarget() {
// @ts-expect-error navigator and windows are not available in all environments
return (typeof navigator !== 'undefined' && typeof window !== 'undefined')
? window
: typeof globalThis !== 'undefined'
? globalThis
: {};
}
exports.getTarget = getTarget;
exports.isProxyAvailable = typeof Proxy === 'function';

View File

@@ -0,0 +1,45 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.setupDevtoolsPlugin = void 0;
const env_js_1 = require("./env.js");
const const_js_1 = require("./const.js");
const proxy_js_1 = require("./proxy.js");
__exportStar(require("./api/index.js"), exports);
__exportStar(require("./plugin.js"), exports);
__exportStar(require("./time.js"), exports);
function setupDevtoolsPlugin(pluginDescriptor, setupFn) {
const descriptor = pluginDescriptor;
const target = (0, env_js_1.getTarget)();
const hook = (0, env_js_1.getDevtoolsGlobalHook)();
const enableProxy = env_js_1.isProxyAvailable && descriptor.enableEarlyProxy;
if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {
hook.emit(const_js_1.HOOK_SETUP, pluginDescriptor, setupFn);
}
else {
const proxy = enableProxy ? new proxy_js_1.ApiProxy(descriptor, hook) : null;
const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];
list.push({
pluginDescriptor: descriptor,
setupFn,
proxy,
});
if (proxy) {
setupFn(proxy.proxiedTarget);
}
}
}
exports.setupDevtoolsPlugin = setupDevtoolsPlugin;

View File

@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,111 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApiProxy = void 0;
const const_js_1 = require("./const.js");
const time_js_1 = require("./time.js");
class ApiProxy {
constructor(plugin, hook) {
this.target = null;
this.targetQueue = [];
this.onQueue = [];
this.plugin = plugin;
this.hook = hook;
const defaultSettings = {};
if (plugin.settings) {
for (const id in plugin.settings) {
const item = plugin.settings[id];
defaultSettings[id] = item.defaultValue;
}
}
const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;
let currentSettings = Object.assign({}, defaultSettings);
try {
const raw = localStorage.getItem(localSettingsSaveId);
const data = JSON.parse(raw);
Object.assign(currentSettings, data);
}
catch (e) {
// noop
}
this.fallbacks = {
getSettings() {
return currentSettings;
},
setSettings(value) {
try {
localStorage.setItem(localSettingsSaveId, JSON.stringify(value));
}
catch (e) {
// noop
}
currentSettings = value;
},
now() {
return (0, time_js_1.now)();
},
};
if (hook) {
hook.on(const_js_1.HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {
if (pluginId === this.plugin.id) {
this.fallbacks.setSettings(value);
}
});
}
this.proxiedOn = new Proxy({}, {
get: (_target, prop) => {
if (this.target) {
return this.target.on[prop];
}
else {
return (...args) => {
this.onQueue.push({
method: prop,
args,
});
};
}
},
});
this.proxiedTarget = new Proxy({}, {
get: (_target, prop) => {
if (this.target) {
return this.target[prop];
}
else if (prop === 'on') {
return this.proxiedOn;
}
else if (Object.keys(this.fallbacks).includes(prop)) {
return (...args) => {
this.targetQueue.push({
method: prop,
args,
resolve: () => { },
});
return this.fallbacks[prop](...args);
};
}
else {
return (...args) => {
return new Promise((resolve) => {
this.targetQueue.push({
method: prop,
args,
resolve,
});
});
};
}
},
});
}
async setRealTarget(target) {
this.target = target;
for (const item of this.onQueue) {
this.target.on[item.method](...item.args);
}
for (const item of this.targetQueue) {
item.resolve(await this.target[item.method](...item.args));
}
}
}
exports.ApiProxy = ApiProxy;

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.now = exports.isPerformanceSupported = void 0;
let supported;
let perf;
function isPerformanceSupported() {
var _a;
if (supported !== undefined) {
return supported;
}
if (typeof window !== 'undefined' && window.performance) {
supported = true;
perf = window.performance;
}
else if (typeof globalThis !== 'undefined' && ((_a = globalThis.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {
supported = true;
perf = globalThis.perf_hooks.performance;
}
else {
supported = false;
}
return supported;
}
exports.isPerformanceSupported = isPerformanceSupported;
function now() {
return isPerformanceSupported() ? perf.now() : Date.now();
}
exports.now = now;

View File

@@ -0,0 +1,37 @@
{
"name": "@vue/devtools-api",
"version": "6.6.4",
"description": "Interact with the Vue devtools from the page",
"author": {
"name": "Guillaume Chau"
},
"license": "MIT",
"repository": {
"url": "https://github.com/vuejs/vue-devtools.git",
"type": "git",
"directory": "packages/api"
},
"sideEffects": false,
"main": "lib/cjs/index.js",
"browser": "lib/esm/index.js",
"module": "lib/esm/index.js",
"types": "lib/esm/index.d.ts",
"files": [
"lib/cjs",
"lib/esm"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "rimraf lib && yarn build:esm && yarn build:cjs",
"build:esm": "tsc --module es2015 --outDir lib/esm -d",
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
"build:watch": "yarn tsc --module es2015 --outDir lib/esm -d -w --sourceMap"
},
"devDependencies": {
"@types/node": "^20.11.16",
"@types/webpack-env": "^1.15.1",
"typescript": "^5.3.3"
}
}

View File

@@ -0,0 +1,42 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var index_exports = {};
__export(index_exports, {
addCustomCommand: () => import_devtools_kit.addCustomCommand,
addCustomTab: () => import_devtools_kit.addCustomTab,
onDevToolsClientConnected: () => import_devtools_kit.onDevToolsClientConnected,
onDevToolsConnected: () => import_devtools_kit.onDevToolsConnected,
removeCustomCommand: () => import_devtools_kit.removeCustomCommand,
setupDevToolsPlugin: () => import_devtools_kit.setupDevToolsPlugin,
setupDevtoolsPlugin: () => import_devtools_kit.setupDevToolsPlugin
});
module.exports = __toCommonJS(index_exports);
var import_devtools_kit = require("@vue/devtools-kit");
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
addCustomCommand,
addCustomTab,
onDevToolsClientConnected,
onDevToolsConnected,
removeCustomCommand,
setupDevToolsPlugin,
setupDevtoolsPlugin
});

View File

@@ -0,0 +1,32 @@
{
"name": "@vue/devtools-api",
"type": "module",
"version": "7.7.9",
"author": "webfansplz",
"license": "MIT",
"repository": {
"directory": "packages/devtools-api",
"type": "git",
"url": "git+https://github.com/vuejs/devtools.git"
},
"sideEffects": false,
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"files": [
"dist"
],
"dependencies": {
"@vue/devtools-kit": "^7.7.9"
},
"scripts": {
"build": "tsup --clean",
"prepare:type": "tsup --dts-only",
"stub": "tsup --watch --onSuccess 'tsup --dts-only'"
}
}

View File

@@ -0,0 +1,299 @@
'use strict';
function flatHooks(configHooks, hooks = {}, parentName) {
for (const key in configHooks) {
const subHook = configHooks[key];
const name = parentName ? `${parentName}:${key}` : key;
if (typeof subHook === "object" && subHook !== null) {
flatHooks(subHook, hooks, name);
} else if (typeof subHook === "function") {
hooks[name] = subHook;
}
}
return hooks;
}
function mergeHooks(...hooks) {
const finalHooks = {};
for (const hook of hooks) {
const flatenHook = flatHooks(hook);
for (const key in flatenHook) {
if (finalHooks[key]) {
finalHooks[key].push(flatenHook[key]);
} else {
finalHooks[key] = [flatenHook[key]];
}
}
}
for (const key in finalHooks) {
if (finalHooks[key].length > 1) {
const array = finalHooks[key];
finalHooks[key] = (...arguments_) => serial(array, (function_) => function_(...arguments_));
} else {
finalHooks[key] = finalHooks[key][0];
}
}
return finalHooks;
}
function serial(tasks, function_) {
return tasks.reduce(
(promise, task) => promise.then(() => function_(task)),
Promise.resolve()
);
}
const defaultTask = { run: (function_) => function_() };
const _createTask = () => defaultTask;
const createTask = typeof console.createTask !== "undefined" ? console.createTask : _createTask;
function serialTaskCaller(hooks, args) {
const name = args.shift();
const task = createTask(name);
return hooks.reduce(
(promise, hookFunction) => promise.then(() => task.run(() => hookFunction(...args))),
Promise.resolve()
);
}
function parallelTaskCaller(hooks, args) {
const name = args.shift();
const task = createTask(name);
return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));
}
function serialCaller(hooks, arguments_) {
return hooks.reduce(
(promise, hookFunction) => promise.then(() => hookFunction(...arguments_ || [])),
Promise.resolve()
);
}
function parallelCaller(hooks, args) {
return Promise.all(hooks.map((hook) => hook(...args || [])));
}
function callEachWith(callbacks, arg0) {
for (const callback of [...callbacks]) {
callback(arg0);
}
}
class Hookable {
constructor() {
this._hooks = {};
this._before = void 0;
this._after = void 0;
this._deprecatedMessages = void 0;
this._deprecatedHooks = {};
this.hook = this.hook.bind(this);
this.callHook = this.callHook.bind(this);
this.callHookWith = this.callHookWith.bind(this);
}
hook(name, function_, options = {}) {
if (!name || typeof function_ !== "function") {
return () => {
};
}
const originalName = name;
let dep;
while (this._deprecatedHooks[name]) {
dep = this._deprecatedHooks[name];
name = dep.to;
}
if (dep && !options.allowDeprecated) {
let message = dep.message;
if (!message) {
message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
}
if (!this._deprecatedMessages) {
this._deprecatedMessages = /* @__PURE__ */ new Set();
}
if (!this._deprecatedMessages.has(message)) {
console.warn(message);
this._deprecatedMessages.add(message);
}
}
if (!function_.name) {
try {
Object.defineProperty(function_, "name", {
get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
configurable: true
});
} catch {
}
}
this._hooks[name] = this._hooks[name] || [];
this._hooks[name].push(function_);
return () => {
if (function_) {
this.removeHook(name, function_);
function_ = void 0;
}
};
}
hookOnce(name, function_) {
let _unreg;
let _function = (...arguments_) => {
if (typeof _unreg === "function") {
_unreg();
}
_unreg = void 0;
_function = void 0;
return function_(...arguments_);
};
_unreg = this.hook(name, _function);
return _unreg;
}
removeHook(name, function_) {
if (this._hooks[name]) {
const index = this._hooks[name].indexOf(function_);
if (index !== -1) {
this._hooks[name].splice(index, 1);
}
if (this._hooks[name].length === 0) {
delete this._hooks[name];
}
}
}
deprecateHook(name, deprecated) {
this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
const _hooks = this._hooks[name] || [];
delete this._hooks[name];
for (const hook of _hooks) {
this.hook(name, hook);
}
}
deprecateHooks(deprecatedHooks) {
Object.assign(this._deprecatedHooks, deprecatedHooks);
for (const name in deprecatedHooks) {
this.deprecateHook(name, deprecatedHooks[name]);
}
}
addHooks(configHooks) {
const hooks = flatHooks(configHooks);
const removeFns = Object.keys(hooks).map(
(key) => this.hook(key, hooks[key])
);
return () => {
for (const unreg of removeFns.splice(0, removeFns.length)) {
unreg();
}
};
}
removeHooks(configHooks) {
const hooks = flatHooks(configHooks);
for (const key in hooks) {
this.removeHook(key, hooks[key]);
}
}
removeAllHooks() {
for (const key in this._hooks) {
delete this._hooks[key];
}
}
callHook(name, ...arguments_) {
arguments_.unshift(name);
return this.callHookWith(serialTaskCaller, name, ...arguments_);
}
callHookParallel(name, ...arguments_) {
arguments_.unshift(name);
return this.callHookWith(parallelTaskCaller, name, ...arguments_);
}
callHookWith(caller, name, ...arguments_) {
const event = this._before || this._after ? { name, args: arguments_, context: {} } : void 0;
if (this._before) {
callEachWith(this._before, event);
}
const result = caller(
name in this._hooks ? [...this._hooks[name]] : [],
arguments_
);
if (result instanceof Promise) {
return result.finally(() => {
if (this._after && event) {
callEachWith(this._after, event);
}
});
}
if (this._after && event) {
callEachWith(this._after, event);
}
return result;
}
beforeEach(function_) {
this._before = this._before || [];
this._before.push(function_);
return () => {
if (this._before !== void 0) {
const index = this._before.indexOf(function_);
if (index !== -1) {
this._before.splice(index, 1);
}
}
};
}
afterEach(function_) {
this._after = this._after || [];
this._after.push(function_);
return () => {
if (this._after !== void 0) {
const index = this._after.indexOf(function_);
if (index !== -1) {
this._after.splice(index, 1);
}
}
};
}
}
function createHooks() {
return new Hookable();
}
const isBrowser = typeof window !== "undefined";
function createDebugger(hooks, _options = {}) {
const options = {
inspect: isBrowser,
group: isBrowser,
filter: () => true,
..._options
};
const _filter = options.filter;
const filter = typeof _filter === "string" ? (name) => name.startsWith(_filter) : _filter;
const _tag = options.tag ? `[${options.tag}] ` : "";
const logPrefix = (event) => _tag + event.name + "".padEnd(event._id, "\0");
const _idCtr = {};
const unsubscribeBefore = hooks.beforeEach((event) => {
if (filter !== void 0 && !filter(event.name)) {
return;
}
_idCtr[event.name] = _idCtr[event.name] || 0;
event._id = _idCtr[event.name]++;
console.time(logPrefix(event));
});
const unsubscribeAfter = hooks.afterEach((event) => {
if (filter !== void 0 && !filter(event.name)) {
return;
}
if (options.group) {
console.groupCollapsed(event.name);
}
if (options.inspect) {
console.timeLog(logPrefix(event), event.args);
} else {
console.timeEnd(logPrefix(event));
}
if (options.group) {
console.groupEnd();
}
_idCtr[event.name]--;
});
return {
/** Stop debugging and remove listeners */
close: () => {
unsubscribeBefore();
unsubscribeAfter();
}
};
}
exports.Hookable = Hookable;
exports.createDebugger = createDebugger;
exports.createHooks = createHooks;
exports.flatHooks = flatHooks;
exports.mergeHooks = mergeHooks;
exports.parallelCaller = parallelCaller;
exports.serial = serial;
exports.serialCaller = serialCaller;

View File

@@ -0,0 +1,49 @@
{
"name": "hookable",
"version": "5.5.3",
"description": "Awaitable hook system",
"keywords": [
"hook",
"hookable",
"plugin",
"tapable",
"tappable"
],
"repository": "unjs/hookable",
"license": "MIT",
"exports": {
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs"
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"devDependencies": {
"@types/node": "^18.15.11",
"@vitest/coverage-c8": "^0.29.8",
"changelogen": "^0.5.2",
"eslint": "^8.37.0",
"eslint-config-unjs": "^0.1.0",
"expect-type": "^0.15.0",
"prettier": "^2.8.7",
"typescript": "^5.0.2",
"unbuild": "^1.1.2",
"vite": "^4.2.1",
"vitest": "^0.29.8"
},
"packageManager": "pnpm@8.0.0",
"scripts": {
"build": "unbuild",
"dev": "vitest",
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
"prepublish": "pnpm build",
"release": "pnpm test && pnpm build && changelogen --release --push && pnpm publish",
"test": "pnpm lint && vitest run --coverage",
"test:types": "tsc --noEmit"
}
}

View File

@@ -0,0 +1,257 @@
function flatHooks(configHooks, hooks = {}, parentName) {
for (const key in configHooks) {
const subHook = configHooks[key];
const name = parentName ? `${parentName}:${key}` : key;
if (typeof subHook === "object" && subHook !== null) flatHooks(subHook, hooks, name);
else if (typeof subHook === "function") hooks[name] = subHook;
}
return hooks;
}
function mergeHooks(...hooks) {
const finalHooks = {};
for (const hook of hooks) {
const flatenHook = flatHooks(hook);
for (const key in flatenHook) if (finalHooks[key]) finalHooks[key].push(flatenHook[key]);
else finalHooks[key] = [flatenHook[key]];
}
for (const key in finalHooks) if (finalHooks[key].length > 1) {
const array = finalHooks[key];
finalHooks[key] = (...arguments_) => serial(array, (function_) => function_(...arguments_));
} else finalHooks[key] = finalHooks[key][0];
return finalHooks;
}
function serial(tasks, function_) {
return tasks.reduce((promise, task) => promise.then(() => function_(task)), Promise.resolve());
}
const createTask = /* @__PURE__ */ (() => {
if (console.createTask) return console.createTask;
const defaultTask = { run: (fn) => fn() };
return () => defaultTask;
})();
function callHooks(hooks, args, startIndex, task) {
for (let i = startIndex; i < hooks.length; i += 1) try {
const result = task ? task.run(() => hooks[i](...args)) : hooks[i](...args);
if (result && typeof result.then === "function") return Promise.resolve(result).then(() => callHooks(hooks, args, i + 1, task));
} catch (error) {
return Promise.reject(error);
}
}
function serialTaskCaller(hooks, args, name) {
if (hooks.length > 0) return callHooks(hooks, args, 0, createTask(name));
}
function parallelTaskCaller(hooks, args, name) {
if (hooks.length > 0) {
const task = createTask(name);
return Promise.all(hooks.map((hook) => task.run(() => hook(...args))));
}
}
function serialCaller(hooks, arguments_) {
return hooks.reduce((promise, hookFunction) => promise.then(() => hookFunction(...arguments_ || [])), Promise.resolve());
}
function parallelCaller(hooks, args) {
return Promise.all(hooks.map((hook) => hook(...args || [])));
}
function callEachWith(callbacks, arg0) {
for (const callback of [...callbacks]) callback(arg0);
}
var Hookable = class {
_hooks;
_before;
_after;
_deprecatedHooks;
_deprecatedMessages;
constructor() {
this._hooks = {};
this._before = void 0;
this._after = void 0;
this._deprecatedMessages = void 0;
this._deprecatedHooks = {};
this.hook = this.hook.bind(this);
this.callHook = this.callHook.bind(this);
this.callHookWith = this.callHookWith.bind(this);
}
hook(name, function_, options = {}) {
if (!name || typeof function_ !== "function") return () => {};
const originalName = name;
let dep;
while (this._deprecatedHooks[name]) {
dep = this._deprecatedHooks[name];
name = dep.to;
}
if (dep && !options.allowDeprecated) {
let message = dep.message;
if (!message) message = `${originalName} hook has been deprecated` + (dep.to ? `, please use ${dep.to}` : "");
if (!this._deprecatedMessages) this._deprecatedMessages = /* @__PURE__ */ new Set();
if (!this._deprecatedMessages.has(message)) {
console.warn(message);
this._deprecatedMessages.add(message);
}
}
if (!function_.name) try {
Object.defineProperty(function_, "name", {
get: () => "_" + name.replace(/\W+/g, "_") + "_hook_cb",
configurable: true
});
} catch {}
this._hooks[name] = this._hooks[name] || [];
this._hooks[name].push(function_);
return () => {
if (function_) {
this.removeHook(name, function_);
function_ = void 0;
}
};
}
hookOnce(name, function_) {
let _unreg;
let _function = (...arguments_) => {
if (typeof _unreg === "function") _unreg();
_unreg = void 0;
_function = void 0;
return function_(...arguments_);
};
_unreg = this.hook(name, _function);
return _unreg;
}
removeHook(name, function_) {
const hooks = this._hooks[name];
if (hooks) {
const index = hooks.indexOf(function_);
if (index !== -1) hooks.splice(index, 1);
if (hooks.length === 0) this._hooks[name] = void 0;
}
}
clearHook(name) {
this._hooks[name] = void 0;
}
deprecateHook(name, deprecated) {
this._deprecatedHooks[name] = typeof deprecated === "string" ? { to: deprecated } : deprecated;
const _hooks = this._hooks[name] || [];
this._hooks[name] = void 0;
for (const hook of _hooks) this.hook(name, hook);
}
deprecateHooks(deprecatedHooks) {
for (const name in deprecatedHooks) this.deprecateHook(name, deprecatedHooks[name]);
}
addHooks(configHooks) {
const hooks = flatHooks(configHooks);
const removeFns = Object.keys(hooks).map((key) => this.hook(key, hooks[key]));
return () => {
for (const unreg of removeFns) unreg();
removeFns.length = 0;
};
}
removeHooks(configHooks) {
const hooks = flatHooks(configHooks);
for (const key in hooks) this.removeHook(key, hooks[key]);
}
removeAllHooks() {
this._hooks = {};
}
callHook(name, ...args) {
return this.callHookWith(serialTaskCaller, name, args);
}
callHookParallel(name, ...args) {
return this.callHookWith(parallelTaskCaller, name, args);
}
callHookWith(caller, name, args) {
const event = this._before || this._after ? {
name,
args,
context: {}
} : void 0;
if (this._before) callEachWith(this._before, event);
const result = caller(this._hooks[name] ? [...this._hooks[name]] : [], args, name);
if (result instanceof Promise) return result.finally(() => {
if (this._after && event) callEachWith(this._after, event);
});
if (this._after && event) callEachWith(this._after, event);
return result;
}
beforeEach(function_) {
this._before = this._before || [];
this._before.push(function_);
return () => {
if (this._before !== void 0) {
const index = this._before.indexOf(function_);
if (index !== -1) this._before.splice(index, 1);
}
};
}
afterEach(function_) {
this._after = this._after || [];
this._after.push(function_);
return () => {
if (this._after !== void 0) {
const index = this._after.indexOf(function_);
if (index !== -1) this._after.splice(index, 1);
}
};
}
};
function createHooks() {
return new Hookable();
}
var HookableCore = class {
_hooks;
constructor() {
this._hooks = {};
}
hook(name, fn) {
if (!name || typeof fn !== "function") return () => {};
this._hooks[name] = this._hooks[name] || [];
this._hooks[name].push(fn);
return () => {
if (fn) {
this.removeHook(name, fn);
fn = void 0;
}
};
}
removeHook(name, function_) {
const hooks = this._hooks[name];
if (hooks) {
const index = hooks.indexOf(function_);
if (index !== -1) hooks.splice(index, 1);
if (hooks.length === 0) this._hooks[name] = void 0;
}
}
callHook(name, ...args) {
const hooks = this._hooks[name];
if (!hooks || hooks.length === 0) return;
return callHooks(hooks, args, 0);
}
};
const isBrowser = typeof window !== "undefined";
function createDebugger(hooks, _options = {}) {
const options = {
inspect: isBrowser,
group: isBrowser,
filter: () => true,
..._options
};
const _filter = options.filter;
const filter = typeof _filter === "string" ? (name) => name.startsWith(_filter) : _filter;
const _tag = options.tag ? `[${options.tag}] ` : "";
const logPrefix = (event) => _tag + event.name + "".padEnd(event._id, "\0");
const _idCtr = {};
const unsubscribeBefore = hooks.beforeEach((event) => {
if (filter !== void 0 && !filter(event.name)) return;
_idCtr[event.name] = _idCtr[event.name] || 0;
event._id = _idCtr[event.name]++;
console.time(logPrefix(event));
});
const unsubscribeAfter = hooks.afterEach((event) => {
if (filter !== void 0 && !filter(event.name)) return;
if (options.group) console.groupCollapsed(event.name);
if (options.inspect) console.timeLog(logPrefix(event), event.args);
else console.timeEnd(logPrefix(event));
if (options.group) console.groupEnd();
_idCtr[event.name]--;
});
return { close: () => {
unsubscribeBefore();
unsubscribeAfter();
} };
}
export { Hookable, HookableCore, createDebugger, createHooks, flatHooks, mergeHooks, parallelCaller, serial, serialCaller };

View File

@@ -0,0 +1,53 @@
{
"name": "hookable",
"version": "6.1.1",
"description": "Awaitable hook system",
"keywords": [
"hook",
"hookable",
"plugin",
"tapable",
"tappable"
],
"license": "MIT",
"repository": "unjs/hookable",
"files": [
"dist"
],
"type": "module",
"sideEffects": false,
"main": "./dist/index.mjs",
"types": "./dist/index.d.mts",
"exports": {
".": "./dist/index.mjs"
},
"scripts": {
"bench": "node --expose-gc --allow-natives-syntax test/bench.ts",
"build": "obuild src/index.ts",
"dev": "vitest",
"lint": "oxlint . && oxfmt --check src test",
"lint:fix": "oxlint . --fix && oxfmt src test",
"prepublish": "pnpm build",
"release": "pnpm test && pnpm build && changelogen --release --publish --push",
"test": "pnpm lint && vitest run --coverage",
"test:types": "tsgo --noEmit"
},
"devDependencies": {
"@types/node": "^25.6.0",
"@typescript/native-preview": "^7.0.0-dev.20260414.1",
"@vitest/coverage-v8": "^4.1.4",
"changelogen": "^0.6.2",
"esbuild": "^0.28.0",
"eslint-config-unjs": "^0.6.2",
"expect-type": "^1.3.0",
"hookable-prev": "npm:hookable@^6.1.0",
"mitata": "^1.0.34",
"obuild": "^0.4.33",
"oxfmt": "^0.45.0",
"oxlint": "^1.60.0",
"typescript": "^6.0.2",
"vite": "^8.0.8",
"vitest": "^4.1.4"
},
"packageManager": "pnpm@10.33.0"
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
{
"name": "@babel/parser",
"version": "7.29.7",
"description": "A JavaScript parser",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-parser",
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"keywords": [
"babel",
"javascript",
"parser",
"tc39",
"ecmascript",
"@babel/parser"
],
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-parser"
},
"main": "./lib/index.js",
"types": "./typings/babel-parser.d.ts",
"files": [
"bin",
"lib",
"typings/babel-parser.d.ts",
"index.cjs"
],
"engines": {
"node": ">=6.0.0"
},
"# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
"dependencies": {
"@babel/types": "^7.29.7"
},
"devDependencies": {
"@babel/code-frame": "^7.29.7",
"@babel/helper-check-duplicate-nodes": "^7.29.7",
"@babel/helper-fixtures": "^7.29.7",
"@babel/helper-string-parser": "^7.29.7",
"@babel/helper-validator-identifier": "^7.29.7",
"charcodes": "^0.2.0"
},
"bin": "./bin/babel-parser.js",
"type": "commonjs"
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,58 @@
{
"name": "@vue/compiler-core",
"version": "3.5.38",
"description": "@vue/compiler-core",
"main": "index.js",
"module": "dist/compiler-core.esm-bundler.js",
"types": "dist/compiler-core.d.ts",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/compiler-core.d.ts",
"node": {
"production": "./dist/compiler-core.cjs.prod.js",
"development": "./dist/compiler-core.cjs.js",
"default": "./dist/compiler-core.cjs.prod.js"
},
"module": "./dist/compiler-core.esm-bundler.js",
"import": "./dist/compiler-core.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueCompilerCore",
"compat": true,
"formats": [
"esm-bundler",
"cjs"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/compiler-core"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
"dependencies": {
"@babel/parser": "^7.29.7",
"entities": "^7.0.1",
"estree-walker": "^2.0.2",
"source-map-js": "^1.2.1",
"@vue/shared": "3.5.38"
},
"devDependencies": {
"@babel/types": "^7.29.7"
}
}

View File

@@ -0,0 +1,689 @@
/**
* @vue/compiler-dom v3.5.38
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var compilerCore = require('@vue/compiler-core');
var shared = require('@vue/shared');
const V_MODEL_RADIO = /* @__PURE__ */ Symbol(``);
const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
``
);
const V_MODEL_TEXT = /* @__PURE__ */ Symbol(``);
const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
``
);
const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
``
);
const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
``
);
const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
``
);
const V_SHOW = /* @__PURE__ */ Symbol(``);
const TRANSITION = /* @__PURE__ */ Symbol(``);
const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
``
);
compilerCore.registerRuntimeHelpers({
[V_MODEL_RADIO]: `vModelRadio`,
[V_MODEL_CHECKBOX]: `vModelCheckbox`,
[V_MODEL_TEXT]: `vModelText`,
[V_MODEL_SELECT]: `vModelSelect`,
[V_MODEL_DYNAMIC]: `vModelDynamic`,
[V_ON_WITH_MODIFIERS]: `withModifiers`,
[V_ON_WITH_KEYS]: `withKeys`,
[V_SHOW]: `vShow`,
[TRANSITION]: `Transition`,
[TRANSITION_GROUP]: `TransitionGroup`
});
const parserOptions = {
parseMode: "html",
isVoidTag: shared.isVoidTag,
isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag),
isPreTag: (tag) => tag === "pre",
isIgnoreNewlineTag: (tag) => tag === "pre" || tag === "textarea",
decodeEntities: void 0,
isBuiltInComponent: (tag) => {
if (tag === "Transition" || tag === "transition") {
return TRANSITION;
} else if (tag === "TransitionGroup" || tag === "transition-group") {
return TRANSITION_GROUP;
}
},
// https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
getNamespace(tag, parent, rootNamespace) {
let ns = parent ? parent.ns : rootNamespace;
if (parent && ns === 2) {
if (parent.tag === "annotation-xml") {
if (tag === "svg") {
return 1;
}
if (parent.props.some(
(a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
)) {
ns = 0;
}
} else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
ns = 0;
}
} else if (parent && ns === 1) {
if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
ns = 0;
}
}
if (ns === 0) {
if (tag === "svg") {
return 1;
}
if (tag === "math") {
return 2;
}
}
return ns;
}
};
const transformStyle = (node) => {
if (node.type === 1) {
node.props.forEach((p, i) => {
if (p.type === 6 && p.name === "style" && p.value) {
node.props[i] = {
type: 7,
name: `bind`,
arg: compilerCore.createSimpleExpression(`style`, true, p.loc),
exp: parseInlineCSS(p.value.content, p.loc),
modifiers: [],
loc: p.loc
};
}
});
}
};
const parseInlineCSS = (cssText, loc) => {
const normalized = shared.parseStringStyle(cssText);
return compilerCore.createSimpleExpression(
JSON.stringify(normalized),
false,
loc,
3
);
};
function createDOMCompilerError(code, loc) {
return compilerCore.createCompilerError(
code,
loc,
DOMErrorMessages
);
}
const DOMErrorCodes = {
"X_V_HTML_NO_EXPRESSION": 54,
"54": "X_V_HTML_NO_EXPRESSION",
"X_V_HTML_WITH_CHILDREN": 55,
"55": "X_V_HTML_WITH_CHILDREN",
"X_V_TEXT_NO_EXPRESSION": 56,
"56": "X_V_TEXT_NO_EXPRESSION",
"X_V_TEXT_WITH_CHILDREN": 57,
"57": "X_V_TEXT_WITH_CHILDREN",
"X_V_MODEL_ON_INVALID_ELEMENT": 58,
"58": "X_V_MODEL_ON_INVALID_ELEMENT",
"X_V_MODEL_ARG_ON_ELEMENT": 59,
"59": "X_V_MODEL_ARG_ON_ELEMENT",
"X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
"60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
"X_V_MODEL_UNNECESSARY_VALUE": 61,
"61": "X_V_MODEL_UNNECESSARY_VALUE",
"X_V_SHOW_NO_EXPRESSION": 62,
"62": "X_V_SHOW_NO_EXPRESSION",
"X_TRANSITION_INVALID_CHILDREN": 63,
"63": "X_TRANSITION_INVALID_CHILDREN",
"X_IGNORED_SIDE_EFFECT_TAG": 64,
"64": "X_IGNORED_SIDE_EFFECT_TAG",
"__EXTEND_POINT__": 65,
"65": "__EXTEND_POINT__"
};
const DOMErrorMessages = {
[54]: `v-html is missing expression.`,
[55]: `v-html will override element children.`,
[56]: `v-text is missing expression.`,
[57]: `v-text will override element children.`,
[58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
[59]: `v-model argument is not supported on plain elements.`,
[60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
[61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
[62]: `v-show is missing expression.`,
[63]: `<Transition> expects exactly one child element or component.`,
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
};
const transformVHtml = (dir, node, context) => {
const { exp, loc } = dir;
if (!exp) {
context.onError(
createDOMCompilerError(54, loc)
);
}
if (node.children.length) {
context.onError(
createDOMCompilerError(55, loc)
);
node.children.length = 0;
}
return {
props: [
compilerCore.createObjectProperty(
compilerCore.createSimpleExpression(`innerHTML`, true, loc),
exp || compilerCore.createSimpleExpression("", true)
)
]
};
};
const transformVText = (dir, node, context) => {
const { exp, loc } = dir;
if (!exp) {
context.onError(
createDOMCompilerError(56, loc)
);
}
if (node.children.length) {
context.onError(
createDOMCompilerError(57, loc)
);
node.children.length = 0;
}
return {
props: [
compilerCore.createObjectProperty(
compilerCore.createSimpleExpression(`textContent`, true),
exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression(
context.helperString(compilerCore.TO_DISPLAY_STRING),
[exp],
loc
) : compilerCore.createSimpleExpression("", true)
)
]
};
};
const transformModel = (dir, node, context) => {
const baseResult = compilerCore.transformModel(dir, node, context);
if (!baseResult.props.length || node.tagType === 1) {
return baseResult;
}
if (dir.arg) {
context.onError(
createDOMCompilerError(
59,
dir.arg.loc
)
);
}
const { tag } = node;
const isCustomElement = context.isCustomElement(tag);
if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) {
let directiveToUse = V_MODEL_TEXT;
let isInvalidType = false;
if (tag === "input" || isCustomElement) {
const type = compilerCore.findProp(node, `type`);
if (type) {
if (type.type === 7) {
directiveToUse = V_MODEL_DYNAMIC;
} else if (type.value) {
switch (type.value.content) {
case "radio":
directiveToUse = V_MODEL_RADIO;
break;
case "checkbox":
directiveToUse = V_MODEL_CHECKBOX;
break;
case "file":
isInvalidType = true;
context.onError(
createDOMCompilerError(
60,
dir.loc
)
);
break;
}
}
} else if (compilerCore.hasDynamicKeyVBind(node)) {
directiveToUse = V_MODEL_DYNAMIC;
} else ;
} else if (tag === "select") {
directiveToUse = V_MODEL_SELECT;
} else ;
if (!isInvalidType) {
baseResult.needRuntime = context.helper(directiveToUse);
}
} else {
context.onError(
createDOMCompilerError(
58,
dir.loc
)
);
}
baseResult.props = baseResult.props.filter(
(p) => !(p.key.type === 4 && p.key.content === "modelValue")
);
return baseResult;
};
const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`);
const isNonKeyModifier = /* @__PURE__ */ shared.makeMap(
// event propagation management
`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
);
const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right");
const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(`onkeyup,onkeydown,onkeypress`);
const resolveModifiers = (key, modifiers, context, loc) => {
const keyModifiers = [];
const nonKeyModifiers = [];
const eventOptionModifiers = [];
for (let i = 0; i < modifiers.length; i++) {
const modifier = modifiers[i].content;
if (modifier === "native" && compilerCore.checkCompatEnabled(
"COMPILER_V_ON_NATIVE",
context,
loc
)) {
eventOptionModifiers.push(modifier);
} else if (isEventOptionModifier(modifier)) {
eventOptionModifiers.push(modifier);
} else {
if (maybeKeyModifier(modifier)) {
if (compilerCore.isStaticExp(key)) {
if (isKeyboardEvent(key.content.toLowerCase())) {
keyModifiers.push(modifier);
} else {
nonKeyModifiers.push(modifier);
}
} else {
keyModifiers.push(modifier);
nonKeyModifiers.push(modifier);
}
} else {
if (isNonKeyModifier(modifier)) {
nonKeyModifiers.push(modifier);
} else {
keyModifiers.push(modifier);
}
}
}
}
return {
keyModifiers,
nonKeyModifiers,
eventOptionModifiers
};
};
const transformClick = (key, event) => {
const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick";
return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([
`(`,
key,
`) === "onClick" ? "${event}" : (`,
key,
`)`
]) : key;
};
const transformOn = (dir, node, context) => {
return compilerCore.transformOn(dir, node, context, (baseResult) => {
const { modifiers } = dir;
if (!modifiers.length) return baseResult;
let { key, value: handlerExp } = baseResult.props[0];
const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
if (nonKeyModifiers.includes("right")) {
key = transformClick(key, `onContextmenu`);
}
if (nonKeyModifiers.includes("middle")) {
key = transformClick(key, `onMouseup`);
}
if (nonKeyModifiers.length) {
handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [
handlerExp,
JSON.stringify(nonKeyModifiers)
]);
}
if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
(!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content.toLowerCase()))) {
handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [
handlerExp,
JSON.stringify(keyModifiers)
]);
}
if (eventOptionModifiers.length) {
const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join("");
key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]);
}
return {
props: [compilerCore.createObjectProperty(key, handlerExp)]
};
});
};
const transformShow = (dir, node, context) => {
const { exp, loc } = dir;
if (!exp) {
context.onError(
createDOMCompilerError(62, loc)
);
}
return {
props: [],
needRuntime: context.helper(V_SHOW)
};
};
const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g;
const stringifyStatic = (children, context, parent) => {
if (context.scopes.vSlot > 0) {
return;
}
const isParentCached = parent.type === 1 && parent.codegenNode && parent.codegenNode.type === 13 && parent.codegenNode.children && !shared.isArray(parent.codegenNode.children) && parent.codegenNode.children.type === 20;
let nc = 0;
let ec = 0;
const currentChunk = [];
const stringifyCurrentChunk = (currentIndex) => {
if (nc >= 20 || ec >= 5) {
const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [
JSON.stringify(
currentChunk.map((node) => stringifyNode(node, context)).join("")
).replace(expReplaceRE, `" + $1 + "`),
// the 2nd argument indicates the number of DOM nodes this static vnode
// will insert / hydrate
String(currentChunk.length)
]);
const deleteCount = currentChunk.length - 1;
if (isParentCached) {
children.splice(
currentIndex - currentChunk.length,
currentChunk.length,
// @ts-expect-error
staticCall
);
} else {
currentChunk[0].codegenNode.value = staticCall;
if (currentChunk.length > 1) {
children.splice(currentIndex - currentChunk.length + 1, deleteCount);
const cacheIndex = context.cached.indexOf(
currentChunk[currentChunk.length - 1].codegenNode
);
if (cacheIndex > -1) {
for (let i2 = cacheIndex; i2 < context.cached.length; i2++) {
const c = context.cached[i2];
if (c) c.index -= deleteCount;
}
context.cached.splice(cacheIndex - deleteCount + 1, deleteCount);
}
}
}
return deleteCount;
}
return 0;
};
let i = 0;
for (; i < children.length; i++) {
const child = children[i];
const isCached = isParentCached || getCachedNode(child);
if (isCached) {
const result = analyzeNode(child);
if (result) {
nc += result[0];
ec += result[1];
currentChunk.push(child);
continue;
}
}
i -= stringifyCurrentChunk(i);
nc = 0;
ec = 0;
currentChunk.length = 0;
}
stringifyCurrentChunk(i);
};
const getCachedNode = (node) => {
if ((node.type === 1 && node.tagType === 0 || node.type === 12) && node.codegenNode && node.codegenNode.type === 20) {
return node.codegenNode;
}
};
const dataAriaRE = /^(?:data|aria)-/;
const isStringifiableAttr = (name, ns) => {
return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : ns === 2 ? shared.isKnownMathMLAttr(name) : false) || dataAriaRE.test(name);
};
const isNonStringifiable = /* @__PURE__ */ shared.makeMap(
`caption,thead,tr,th,tbody,td,tfoot,colgroup,col`
);
function analyzeNode(node) {
if (node.type === 1 && isNonStringifiable(node.tag)) {
return false;
}
if (node.type === 1 && compilerCore.findDir(node, "once", true)) {
return false;
}
if (node.type === 12) {
return [1, 0];
}
let nc = 1;
let ec = node.props.length > 0 ? 1 : 0;
let bailed = false;
const bail = () => {
bailed = true;
return false;
};
function walk(node2) {
const isOptionTag = node2.tag === "option" && node2.ns === 0;
for (let i = 0; i < node2.props.length; i++) {
const p = node2.props[i];
if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) {
return bail();
}
if (p.type === 7 && p.name === "bind") {
if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) {
return bail();
}
if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
return bail();
}
if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && !p.exp.isStatic) {
return bail();
}
}
}
for (let i = 0; i < node2.children.length; i++) {
nc++;
const child = node2.children[i];
if (child.type === 1) {
if (child.props.length > 0) {
ec++;
}
walk(child);
if (bailed) {
return false;
}
}
}
return true;
}
return walk(node) ? [nc, ec] : false;
}
function stringifyNode(node, context) {
if (shared.isString(node)) {
return node;
}
if (shared.isSymbol(node)) {
return ``;
}
switch (node.type) {
case 1:
return stringifyElement(node, context);
case 2:
return shared.escapeHtml(node.content);
case 3:
return `<!--${shared.escapeHtml(node.content)}-->`;
case 5:
return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content)));
case 8:
return shared.escapeHtml(evaluateConstant(node));
case 12:
return stringifyNode(node.content, context);
default:
return "";
}
}
function stringifyElement(node, context) {
let res = `<${node.tag}`;
let innerHTML = "";
for (let i = 0; i < node.props.length; i++) {
const p = node.props[i];
if (p.type === 6) {
res += ` ${p.name}`;
if (p.value) {
res += `="${shared.escapeHtml(p.value.content)}"`;
}
} else if (p.type === 7) {
if (p.name === "bind") {
const exp = p.exp;
if (exp.content[0] === "_") {
res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`;
continue;
}
if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") {
continue;
}
let evaluated = evaluateConstant(exp);
if (evaluated != null) {
const arg = p.arg && p.arg.content;
if (arg === "class") {
evaluated = shared.normalizeClass(evaluated);
} else if (arg === "style") {
evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated));
}
res += ` ${p.arg.content}="${shared.escapeHtml(
evaluated
)}"`;
}
} else if (p.name === "html") {
innerHTML = evaluateConstant(p.exp);
} else if (p.name === "text") {
innerHTML = shared.escapeHtml(
shared.toDisplayString(evaluateConstant(p.exp))
);
}
}
}
if (context.scopeId) {
res += ` ${context.scopeId}`;
}
res += `>`;
if (innerHTML) {
res += innerHTML;
} else {
for (let i = 0; i < node.children.length; i++) {
res += stringifyNode(node.children[i], context);
}
}
if (!shared.isVoidTag(node.tag)) {
res += `</${node.tag}>`;
}
return res;
}
function evaluateConstant(exp) {
if (exp.type === 4) {
return new Function(`return (${exp.content})`)();
} else {
let res = ``;
exp.children.forEach((c) => {
if (shared.isString(c) || shared.isSymbol(c)) {
return;
}
if (c.type === 2) {
res += c.content;
} else if (c.type === 5) {
res += shared.toDisplayString(evaluateConstant(c.content));
} else {
res += evaluateConstant(c);
}
});
return res;
}
}
const ignoreSideEffectTags = (node, context) => {
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
context.removeNode();
}
};
const DOMNodeTransforms = [
transformStyle,
...[]
];
const DOMDirectiveTransforms = {
cloak: compilerCore.noopDirectiveTransform,
html: transformVHtml,
text: transformVText,
model: transformModel,
// override compiler-core
on: transformOn,
// override compiler-core
show: transformShow
};
function compile(src, options = {}) {
return compilerCore.baseCompile(
src,
shared.extend({}, parserOptions, options, {
nodeTransforms: [
// ignore <script> and <tag>
// this is not put inside DOMNodeTransforms because that list is used
// by compiler-ssr to generate vnode fallback branches
ignoreSideEffectTags,
...DOMNodeTransforms,
...options.nodeTransforms || []
],
directiveTransforms: shared.extend(
{},
DOMDirectiveTransforms,
options.directiveTransforms || {}
),
transformHoist: stringifyStatic
})
);
}
function parse(template, options = {}) {
return compilerCore.baseParse(template, shared.extend({}, parserOptions, options));
}
exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
exports.DOMErrorCodes = DOMErrorCodes;
exports.DOMErrorMessages = DOMErrorMessages;
exports.DOMNodeTransforms = DOMNodeTransforms;
exports.TRANSITION = TRANSITION;
exports.TRANSITION_GROUP = TRANSITION_GROUP;
exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX;
exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC;
exports.V_MODEL_RADIO = V_MODEL_RADIO;
exports.V_MODEL_SELECT = V_MODEL_SELECT;
exports.V_MODEL_TEXT = V_MODEL_TEXT;
exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS;
exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS;
exports.V_SHOW = V_SHOW;
exports.compile = compile;
exports.createDOMCompilerError = createDOMCompilerError;
exports.parse = parse;
exports.parserOptions = parserOptions;
exports.transformStyle = transformStyle;
Object.keys(compilerCore).forEach(function (k) {
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k];
});

View File

@@ -0,0 +1,57 @@
{
"name": "@vue/compiler-dom",
"version": "3.5.38",
"description": "@vue/compiler-dom",
"main": "index.js",
"module": "dist/compiler-dom.esm-bundler.js",
"types": "dist/compiler-dom.d.ts",
"unpkg": "dist/compiler-dom.global.js",
"jsdelivr": "dist/compiler-dom.global.js",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/compiler-dom.d.ts",
"node": {
"production": "./dist/compiler-dom.cjs.prod.js",
"development": "./dist/compiler-dom.cjs.js",
"default": "./dist/compiler-dom.cjs.prod.js"
},
"module": "./dist/compiler-dom.esm-bundler.js",
"import": "./dist/compiler-dom.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"name": "VueCompilerDOM",
"compat": true,
"formats": [
"esm-bundler",
"esm-browser",
"cjs",
"global"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/compiler-dom"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
"dependencies": {
"@vue/shared": "3.5.38",
"@vue/compiler-core": "3.5.38"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
{
"name": "@vue/compiler-ssr",
"version": "3.5.38",
"description": "@vue/compiler-ssr",
"main": "dist/compiler-ssr.cjs.js",
"types": "dist/compiler-ssr.d.ts",
"files": [
"dist"
],
"buildOptions": {
"prod": false,
"formats": [
"cjs"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/compiler-ssr"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
"dependencies": {
"@vue/shared": "3.5.38",
"@vue/compiler-dom": "3.5.38"
}
}

View File

@@ -0,0 +1 @@
../.nitro/@vue/devtools-api@7.7.9

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
../../../.nitro/hookable@5.5.3

View File

@@ -0,0 +1,44 @@
{
"name": "@vue/devtools-kit",
"type": "module",
"version": "7.7.9",
"author": "webfansplz",
"license": "MIT",
"repository": {
"directory": "packages/devtools-kit",
"type": "git",
"url": "git+https://github.com/vuejs/devtools.git"
},
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./types.d.ts",
"files": [
"**.d.ts",
"dist"
],
"dependencies": {
"birpc": "^2.3.0",
"hookable": "^5.5.3",
"mitt": "^3.0.1",
"perfect-debounce": "^1.0.0",
"speakingurl": "^14.0.1",
"superjson": "^2.2.2",
"@vue/devtools-shared": "^7.7.9"
},
"devDependencies": {
"@types/speakingurl": "^13.0.6",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
"scripts": {
"build": "tsup --clean",
"prepare:type": "tsup --dts-only",
"stub": "tsup --watch --onSuccess 'tsup --dts-only'"
}
}

View File

@@ -0,0 +1,378 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target2, all) => {
for (var name in all)
__defProp(target2, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target2, "default", { value: mod, enumerable: true }) : target2,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/cjs_shims.js
var init_cjs_shims = __esm({
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/cjs_shims.js"() {
"use strict";
}
});
// ../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js
var require_rfdc = __commonJS({
"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(exports2, module2) {
"use strict";
init_cjs_shims();
module2.exports = rfdc2;
function copyBuffer(cur) {
if (cur instanceof Buffer) {
return Buffer.from(cur);
}
return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);
}
function rfdc2(opts) {
opts = opts || {};
if (opts.circles) return rfdcCircles(opts);
const constructorHandlers = /* @__PURE__ */ new Map();
constructorHandlers.set(Date, (o) => new Date(o));
constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
if (opts.constructorHandlers) {
for (const handler2 of opts.constructorHandlers) {
constructorHandlers.set(handler2[0], handler2[1]);
}
}
let handler = null;
return opts.proto ? cloneProto : clone;
function cloneArray(a, fn) {
const keys = Object.keys(a);
const a2 = new Array(keys.length);
for (let i = 0; i < keys.length; i++) {
const k = keys[i];
const cur = a[k];
if (typeof cur !== "object" || cur === null) {
a2[k] = cur;
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
a2[k] = handler(cur, fn);
} else if (ArrayBuffer.isView(cur)) {
a2[k] = copyBuffer(cur);
} else {
a2[k] = fn(cur);
}
}
return a2;
}
function clone(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, clone);
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
return handler(o, clone);
}
const o2 = {};
for (const k in o) {
if (Object.hasOwnProperty.call(o, k) === false) continue;
const cur = o[k];
if (typeof cur !== "object" || cur === null) {
o2[k] = cur;
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
o2[k] = handler(cur, clone);
} else if (ArrayBuffer.isView(cur)) {
o2[k] = copyBuffer(cur);
} else {
o2[k] = clone(cur);
}
}
return o2;
}
function cloneProto(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, cloneProto);
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
return handler(o, cloneProto);
}
const o2 = {};
for (const k in o) {
const cur = o[k];
if (typeof cur !== "object" || cur === null) {
o2[k] = cur;
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
o2[k] = handler(cur, cloneProto);
} else if (ArrayBuffer.isView(cur)) {
o2[k] = copyBuffer(cur);
} else {
o2[k] = cloneProto(cur);
}
}
return o2;
}
}
function rfdcCircles(opts) {
const refs = [];
const refsNew = [];
const constructorHandlers = /* @__PURE__ */ new Map();
constructorHandlers.set(Date, (o) => new Date(o));
constructorHandlers.set(Map, (o, fn) => new Map(cloneArray(Array.from(o), fn)));
constructorHandlers.set(Set, (o, fn) => new Set(cloneArray(Array.from(o), fn)));
if (opts.constructorHandlers) {
for (const handler2 of opts.constructorHandlers) {
constructorHandlers.set(handler2[0], handler2[1]);
}
}
let handler = null;
return opts.proto ? cloneProto : clone;
function cloneArray(a, fn) {
const keys = Object.keys(a);
const a2 = new Array(keys.length);
for (let i = 0; i < keys.length; i++) {
const k = keys[i];
const cur = a[k];
if (typeof cur !== "object" || cur === null) {
a2[k] = cur;
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
a2[k] = handler(cur, fn);
} else if (ArrayBuffer.isView(cur)) {
a2[k] = copyBuffer(cur);
} else {
const index = refs.indexOf(cur);
if (index !== -1) {
a2[k] = refsNew[index];
} else {
a2[k] = fn(cur);
}
}
}
return a2;
}
function clone(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, clone);
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
return handler(o, clone);
}
const o2 = {};
refs.push(o);
refsNew.push(o2);
for (const k in o) {
if (Object.hasOwnProperty.call(o, k) === false) continue;
const cur = o[k];
if (typeof cur !== "object" || cur === null) {
o2[k] = cur;
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
o2[k] = handler(cur, clone);
} else if (ArrayBuffer.isView(cur)) {
o2[k] = copyBuffer(cur);
} else {
const i = refs.indexOf(cur);
if (i !== -1) {
o2[k] = refsNew[i];
} else {
o2[k] = clone(cur);
}
}
}
refs.pop();
refsNew.pop();
return o2;
}
function cloneProto(o) {
if (typeof o !== "object" || o === null) return o;
if (Array.isArray(o)) return cloneArray(o, cloneProto);
if (o.constructor !== Object && (handler = constructorHandlers.get(o.constructor))) {
return handler(o, cloneProto);
}
const o2 = {};
refs.push(o);
refsNew.push(o2);
for (const k in o) {
const cur = o[k];
if (typeof cur !== "object" || cur === null) {
o2[k] = cur;
} else if (cur.constructor !== Object && (handler = constructorHandlers.get(cur.constructor))) {
o2[k] = handler(cur, cloneProto);
} else if (ArrayBuffer.isView(cur)) {
o2[k] = copyBuffer(cur);
} else {
const i = refs.indexOf(cur);
if (i !== -1) {
o2[k] = refsNew[i];
} else {
o2[k] = cloneProto(cur);
}
}
}
refs.pop();
refsNew.pop();
return o2;
}
}
}
});
// src/index.ts
var index_exports = {};
__export(index_exports, {
BROADCAST_CHANNEL_NAME: () => BROADCAST_CHANNEL_NAME,
NOOP: () => NOOP,
VIEW_MODE_STORAGE_KEY: () => VIEW_MODE_STORAGE_KEY,
VITE_PLUGIN_CLIENT_URL_STORAGE_KEY: () => VITE_PLUGIN_CLIENT_URL_STORAGE_KEY,
VITE_PLUGIN_DETECTED_STORAGE_KEY: () => VITE_PLUGIN_DETECTED_STORAGE_KEY,
basename: () => basename,
camelize: () => camelize,
classify: () => classify,
deepClone: () => deepClone,
isArray: () => isArray,
isBrowser: () => isBrowser,
isInChromePanel: () => isInChromePanel,
isInElectron: () => isInElectron,
isInIframe: () => isInIframe,
isInSeparateWindow: () => isInSeparateWindow,
isMacOS: () => isMacOS,
isMap: () => isMap,
isNumeric: () => isNumeric,
isNuxtApp: () => isNuxtApp,
isObject: () => isObject,
isSet: () => isSet,
isUrlString: () => isUrlString,
kebabize: () => kebabize,
randomStr: () => randomStr,
sortByKey: () => sortByKey,
target: () => target
});
module.exports = __toCommonJS(index_exports);
init_cjs_shims();
// src/constants.ts
init_cjs_shims();
var VIEW_MODE_STORAGE_KEY = "__vue-devtools-view-mode__";
var VITE_PLUGIN_DETECTED_STORAGE_KEY = "__vue-devtools-vite-plugin-detected__";
var VITE_PLUGIN_CLIENT_URL_STORAGE_KEY = "__vue-devtools-vite-plugin-client-url__";
var BROADCAST_CHANNEL_NAME = "__vue-devtools-broadcast-channel__";
// src/env.ts
init_cjs_shims();
var isBrowser = typeof navigator !== "undefined";
var target = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : typeof global !== "undefined" ? global : {};
var isInChromePanel = typeof target.chrome !== "undefined" && !!target.chrome.devtools;
var isInIframe = isBrowser && target.self !== target.top;
var _a;
var isInElectron = typeof navigator !== "undefined" && ((_a = navigator.userAgent) == null ? void 0 : _a.toLowerCase().includes("electron"));
var isNuxtApp = typeof window !== "undefined" && !!window.__NUXT__;
var isInSeparateWindow = !isInIframe && !isInChromePanel && !isInElectron;
// src/general.ts
init_cjs_shims();
var import_rfdc = __toESM(require_rfdc(), 1);
function NOOP() {
}
var isNumeric = (str) => `${+str}` === str;
var isMacOS = () => (navigator == null ? void 0 : navigator.platform) ? navigator == null ? void 0 : navigator.platform.toLowerCase().includes("mac") : /Macintosh/.test(navigator.userAgent);
var classifyRE = /(?:^|[-_/])(\w)/g;
var camelizeRE = /-(\w)/g;
var kebabizeRE = /([a-z0-9])([A-Z])/g;
function toUpper(_, c) {
return c ? c.toUpperCase() : "";
}
function classify(str) {
return str && `${str}`.replace(classifyRE, toUpper);
}
function camelize(str) {
return str && str.replace(camelizeRE, toUpper);
}
function kebabize(str) {
return str && str.replace(kebabizeRE, (_, lowerCaseCharacter, upperCaseLetter) => {
return `${lowerCaseCharacter}-${upperCaseLetter}`;
}).toLowerCase();
}
function basename(filename, ext) {
let normalizedFilename = filename.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
if (normalizedFilename.endsWith(`index${ext}`)) {
normalizedFilename = normalizedFilename.replace(`/index${ext}`, ext);
}
const lastSlashIndex = normalizedFilename.lastIndexOf("/");
const baseNameWithExt = normalizedFilename.substring(lastSlashIndex + 1);
if (ext) {
const extIndex = baseNameWithExt.lastIndexOf(ext);
return baseNameWithExt.substring(0, extIndex);
}
return "";
}
function sortByKey(state) {
return state && state.slice().sort((a, b) => {
if (a.key < b.key)
return -1;
if (a.key > b.key)
return 1;
return 0;
});
}
var HTTP_URL_RE = /^https?:\/\//;
function isUrlString(str) {
return str.startsWith("/") || HTTP_URL_RE.test(str);
}
var deepClone = (0, import_rfdc.default)({ circles: true });
function randomStr() {
return Math.random().toString(36).slice(2);
}
function isObject(value) {
return typeof value === "object" && !Array.isArray(value) && value !== null;
}
function isArray(value) {
return Array.isArray(value);
}
function isSet(value) {
return value instanceof Set;
}
function isMap(value) {
return value instanceof Map;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BROADCAST_CHANNEL_NAME,
NOOP,
VIEW_MODE_STORAGE_KEY,
VITE_PLUGIN_CLIENT_URL_STORAGE_KEY,
VITE_PLUGIN_DETECTED_STORAGE_KEY,
basename,
camelize,
classify,
deepClone,
isArray,
isBrowser,
isInChromePanel,
isInElectron,
isInIframe,
isInSeparateWindow,
isMacOS,
isMap,
isNumeric,
isNuxtApp,
isObject,
isSet,
isUrlString,
kebabize,
randomStr,
sortByKey,
target
});

View File

@@ -0,0 +1,34 @@
{
"name": "@vue/devtools-shared",
"type": "module",
"version": "7.7.9",
"author": "webfansplz",
"license": "MIT",
"repository": {
"directory": "packages/shared",
"type": "git",
"url": "git+https://github.com/vuejs/devtools.git"
},
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"files": [
"dist"
],
"dependencies": {
"rfdc": "^1.4.1"
},
"devDependencies": {
"@types/node": "^22.13.14"
},
"scripts": {
"build": "tsup",
"prepare:type": "tsup --dts-only",
"stub": "tsup --watch --onSuccess 'tsup --dts-only'"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,55 @@
{
"name": "@vue/reactivity",
"version": "3.5.38",
"description": "@vue/reactivity",
"main": "index.js",
"module": "dist/reactivity.esm-bundler.js",
"types": "dist/reactivity.d.ts",
"unpkg": "dist/reactivity.global.js",
"jsdelivr": "dist/reactivity.global.js",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/reactivity.d.ts",
"node": {
"production": "./dist/reactivity.cjs.prod.js",
"development": "./dist/reactivity.cjs.js",
"default": "./dist/reactivity.cjs.prod.js"
},
"module": "./dist/reactivity.esm-bundler.js",
"import": "./dist/reactivity.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/reactivity"
},
"buildOptions": {
"name": "VueReactivity",
"formats": [
"esm-bundler",
"esm-browser",
"cjs",
"global"
]
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
"dependencies": {
"@vue/shared": "3.5.38"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
{
"name": "@vue/runtime-core",
"version": "3.5.38",
"description": "@vue/runtime-core",
"main": "index.js",
"module": "dist/runtime-core.esm-bundler.js",
"types": "dist/runtime-core.d.ts",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/runtime-core.d.ts",
"node": {
"production": "./dist/runtime-core.cjs.prod.js",
"development": "./dist/runtime-core.cjs.js",
"default": "./dist/runtime-core.cjs.prod.js"
},
"module": "./dist/runtime-core.esm-bundler.js",
"import": "./dist/runtime-core.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueRuntimeCore",
"formats": [
"esm-bundler",
"cjs"
]
},
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/runtime-core"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
"dependencies": {
"@vue/shared": "3.5.38",
"@vue/reactivity": "3.5.38"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,60 @@
{
"name": "@vue/runtime-dom",
"version": "3.5.38",
"description": "@vue/runtime-dom",
"main": "index.js",
"module": "dist/runtime-dom.esm-bundler.js",
"types": "dist/runtime-dom.d.ts",
"unpkg": "dist/runtime-dom.global.js",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/runtime-dom.d.ts",
"node": {
"production": "./dist/runtime-dom.cjs.prod.js",
"development": "./dist/runtime-dom.cjs.js",
"default": "./dist/runtime-dom.cjs.prod.js"
},
"module": "./dist/runtime-dom.esm-bundler.js",
"import": "./dist/runtime-dom.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"name": "VueRuntimeDOM",
"formats": [
"esm-bundler",
"esm-browser",
"cjs",
"global"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/runtime-dom"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-dom#readme",
"dependencies": {
"csstype": "^3.2.3",
"@vue/shared": "3.5.38",
"@vue/runtime-core": "3.5.38",
"@vue/reactivity": "3.5.38"
},
"devDependencies": {
"@types/trusted-types": "^2.0.7"
}
}

View File

@@ -0,0 +1,883 @@
/**
* @vue/server-renderer v3.5.38
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var Vue = require('vue');
var shared = require('@vue/shared');
var compilerSsr = require('@vue/compiler-ssr');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
for (var k in e) {
n[k] = e[k];
}
}
n.default = e;
return Object.freeze(n);
}
var Vue__namespace = /*#__PURE__*/_interopNamespaceDefault(Vue);
const shouldIgnoreProp = /* @__PURE__ */ shared.makeMap(
`,key,ref,innerHTML,textContent,ref_key,ref_for`
);
function ssrRenderAttrs(props, tag) {
let ret = "";
for (let key in props) {
if (shouldIgnoreProp(key) || shared.isOn(key) || tag === "textarea" && key === "value" || // force as property (not rendered in SSR)
key.startsWith(".")) {
continue;
}
const value = props[key];
if (key.startsWith("^")) key = key.slice(1);
if (key === "class") {
ret += ` class="${ssrRenderClass(value)}"`;
} else if (key === "style") {
ret += ` style="${ssrRenderStyle(value)}"`;
} else if (key === "className") {
if (value != null) {
ret += ` class="${shared.escapeHtml(String(value))}"`;
}
} else {
ret += ssrRenderDynamicAttr(key, value, tag);
}
}
return ret;
}
function ssrRenderDynamicAttr(key, value, tag) {
if (!shared.isRenderableAttrValue(value)) {
return ``;
}
const attrKey = tag && (tag.indexOf("-") > 0 || shared.isSVGTag(tag)) ? key : shared.propsToAttrMap[key] || key.toLowerCase();
if (shared.isBooleanAttr(attrKey)) {
return shared.includeBooleanAttr(value) ? ` ${attrKey}` : ``;
} else if (shared.isSSRSafeAttrName(attrKey)) {
return value === "" ? ` ${attrKey}` : ` ${attrKey}="${shared.escapeHtml(value)}"`;
} else {
console.warn(
`[@vue/server-renderer] Skipped rendering unsafe attribute name: ${attrKey}`
);
return ``;
}
}
function ssrRenderAttr(key, value) {
if (!shared.isRenderableAttrValue(value)) {
return ``;
}
return ` ${key}="${shared.escapeHtml(value)}"`;
}
function ssrRenderClass(raw) {
return shared.escapeHtml(shared.normalizeClass(raw));
}
function ssrRenderStyle(raw) {
if (!raw) {
return "";
}
if (shared.isString(raw)) {
return shared.escapeHtml(raw);
}
const styles = shared.normalizeStyle(ssrResetCssVars(raw));
return shared.escapeHtml(shared.stringifyStyle(styles));
}
function ssrResetCssVars(raw) {
if (!shared.isArray(raw) && shared.isObject(raw)) {
const res = {};
for (const key in raw) {
if (key.startsWith(":--")) {
res[key.slice(1)] = shared.normalizeCssVarValue(raw[key]);
} else {
res[key] = raw[key];
}
}
return res;
}
return raw;
}
function ssrRenderComponent(comp, props = null, children = null, parentComponent = null, slotScopeId) {
return renderComponentVNode(
Vue.createVNode(comp, props, children),
parentComponent,
slotScopeId
);
}
const { ensureValidVNode } = Vue.ssrUtils;
function ssrRenderSlot(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId) {
push(`<!--[-->`);
ssrRenderSlotInner(
slots,
slotName,
slotProps,
fallbackRenderFn,
push,
parentComponent,
slotScopeId
);
push(`<!--]-->`);
}
function ssrRenderSlotInner(slots, slotName, slotProps, fallbackRenderFn, push, parentComponent, slotScopeId, transition) {
const slotFn = slots[slotName];
if (slotFn) {
const slotBuffer = [];
const bufferedPush = (item) => {
slotBuffer.push(item);
};
const ret = slotFn(
slotProps,
bufferedPush,
parentComponent,
slotScopeId ? " " + slotScopeId : ""
);
if (shared.isArray(ret)) {
const validSlotContent = ensureValidVNode(ret);
if (validSlotContent) {
renderVNodeChildren(
push,
validSlotContent,
parentComponent,
slotScopeId
);
} else if (fallbackRenderFn) {
fallbackRenderFn();
} else if (transition) {
push(`<!---->`);
}
} else {
let isEmptySlot = true;
if (transition) {
isEmptySlot = false;
} else {
for (let i = 0; i < slotBuffer.length; i++) {
if (!isComment(slotBuffer[i])) {
isEmptySlot = false;
break;
}
}
}
if (isEmptySlot) {
if (fallbackRenderFn) {
fallbackRenderFn();
}
} else {
let start = 0;
let end = slotBuffer.length;
if (transition && slotBuffer[0] === "<!--[-->" && slotBuffer[end - 1] === "<!--]-->") {
start++;
end--;
}
if (start < end) {
for (let i = start; i < end; i++) {
push(slotBuffer[i]);
}
} else if (transition) {
push(`<!---->`);
}
}
}
} else if (fallbackRenderFn) {
fallbackRenderFn();
} else if (transition) {
push(`<!---->`);
}
}
const commentTestRE = /^<!--[\s\S]*-->$/;
const commentRE = /<!--[^]*?-->/gm;
function isComment(item) {
if (typeof item !== "string" || !commentTestRE.test(item)) return false;
if (item.length <= 8) return true;
return !item.replace(commentRE, "").trim();
}
function ssrRenderTeleport(parentPush, contentRenderFn, target, disabled, parentComponent) {
parentPush("<!--teleport start-->");
const context = parentComponent.appContext.provides[Vue.ssrContextKey];
const teleportBuffers = context.__teleportBuffers || (context.__teleportBuffers = {});
const targetBuffer = teleportBuffers[target] || (teleportBuffers[target] = []);
const bufferIndex = targetBuffer.length;
let teleportContent;
if (disabled) {
contentRenderFn(parentPush);
teleportContent = `<!--teleport start anchor--><!--teleport anchor-->`;
} else {
const { getBuffer, push } = createBuffer();
push(`<!--teleport start anchor-->`);
contentRenderFn(push);
push(`<!--teleport anchor-->`);
teleportContent = getBuffer();
}
targetBuffer.splice(bufferIndex, 0, teleportContent);
parentPush("<!--teleport end-->");
}
function ssrInterpolate(value) {
return shared.escapeHtml(shared.toDisplayString(value));
}
function ssrRenderList(source, renderItem) {
if (shared.isArray(source) || shared.isString(source)) {
for (let i = 0, l = source.length; i < l; i++) {
renderItem(source[i], i);
}
} else if (typeof source === "number") {
for (let i = 0; i < source; i++) {
renderItem(i + 1, i);
}
} else if (shared.isObject(source)) {
if (source[Symbol.iterator]) {
let i = 0;
for (const item of source) {
renderItem(item, i++);
}
} else {
const keys = Object.keys(source);
for (let i = 0, l = keys.length; i < l; i++) {
const key = keys[i];
renderItem(source[key], key, i);
}
}
}
}
function ssrRenderSuspense(push, { default: renderContent }) {
if (renderContent) {
renderContent();
} else {
push(`<!---->`);
}
}
function ssrGetDirectiveProps(instance, dir, value, arg, modifiers = {}) {
if (typeof dir !== "function" && dir.getSSRProps) {
return dir.getSSRProps(
{
dir,
instance: Vue.ssrUtils.getComponentPublicInstance(instance.$),
value,
oldValue: void 0,
arg,
modifiers
},
null
) || {};
}
return {};
}
const ssrLooseEqual = shared.looseEqual;
function ssrLooseContain(arr, value) {
return shared.looseIndexOf(arr, value) > -1;
}
function ssrRenderDynamicModel(type, model, value) {
switch (type) {
case "radio":
return shared.looseEqual(model, value) ? " checked" : "";
case "checkbox":
return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? " checked" : "";
default:
return ssrRenderAttr("value", model);
}
}
function ssrGetDynamicModelProps(existingProps = {}, model) {
const { type, value } = existingProps;
switch (type) {
case "radio":
return shared.looseEqual(model, value) ? { checked: true } : null;
case "checkbox":
return (shared.isArray(model) ? ssrLooseContain(model, value) : model) ? { checked: true } : null;
default:
return { value: model };
}
}
var helpers = /*#__PURE__*/Object.freeze({
__proto__: null,
ssrGetDirectiveProps: ssrGetDirectiveProps,
ssrGetDynamicModelProps: ssrGetDynamicModelProps,
ssrIncludeBooleanAttr: shared.includeBooleanAttr,
ssrInterpolate: ssrInterpolate,
ssrLooseContain: ssrLooseContain,
ssrLooseEqual: ssrLooseEqual,
ssrRenderAttr: ssrRenderAttr,
ssrRenderAttrs: ssrRenderAttrs,
ssrRenderClass: ssrRenderClass,
ssrRenderComponent: ssrRenderComponent,
ssrRenderDynamicAttr: ssrRenderDynamicAttr,
ssrRenderDynamicModel: ssrRenderDynamicModel,
ssrRenderList: ssrRenderList,
ssrRenderSlot: ssrRenderSlot,
ssrRenderSlotInner: ssrRenderSlotInner,
ssrRenderStyle: ssrRenderStyle,
ssrRenderSuspense: ssrRenderSuspense,
ssrRenderTeleport: ssrRenderTeleport,
ssrRenderVNode: renderVNode
});
const compileCache = /* @__PURE__ */ Object.create(null);
function ssrCompile(template, instance) {
const Component = instance.type;
const { isCustomElement, compilerOptions } = instance.appContext.config;
const { delimiters, compilerOptions: componentCompilerOptions } = Component;
const finalCompilerOptions = shared.extend(
shared.extend(
{
isCustomElement,
delimiters
},
compilerOptions
),
componentCompilerOptions
);
finalCompilerOptions.isCustomElement = finalCompilerOptions.isCustomElement || shared.NO;
finalCompilerOptions.isNativeTag = finalCompilerOptions.isNativeTag || shared.NO;
const cacheKey = JSON.stringify(
{
template,
compilerOptions: finalCompilerOptions
},
(key, value) => {
return shared.isFunction(value) ? value.toString() : value;
}
);
const cached = compileCache[cacheKey];
if (cached) {
return cached;
}
finalCompilerOptions.onError = (err) => {
{
throw err;
}
};
const { code } = compilerSsr.compile(template, finalCompilerOptions);
const requireMap = {
vue: Vue__namespace,
"vue/server-renderer": helpers
};
const fakeRequire = (id) => requireMap[id];
return compileCache[cacheKey] = Function("require", code)(fakeRequire);
}
const {
createComponentInstance,
setCurrentRenderingInstance,
setupComponent,
renderComponentRoot,
normalizeVNode,
pushWarningContext,
popWarningContext
} = Vue.ssrUtils;
function createBuffer() {
let appendable = false;
const buffer = [];
return {
getBuffer() {
return buffer;
},
push(item) {
const isStringItem = shared.isString(item);
if (appendable && isStringItem) {
buffer[buffer.length - 1] += item;
return;
}
buffer.push(item);
appendable = isStringItem;
if (shared.isPromise(item) || shared.isArray(item) && item.hasAsync) {
buffer.hasAsync = true;
}
}
};
}
function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
const instance = vnode.component = createComponentInstance(
vnode,
parentComponent,
null
);
const res = setupComponent(
instance,
true
/* isSSR */
);
const hasAsyncSetup = shared.isPromise(res);
let prefetches = instance.sp;
if (hasAsyncSetup || prefetches) {
const p = Promise.resolve(res).then(() => {
if (hasAsyncSetup) prefetches = instance.sp;
if (prefetches) {
return Promise.all(
prefetches.map((prefetch) => prefetch.call(instance.proxy))
);
}
}).catch(shared.NOOP);
return p.then(() => renderComponentSubTree(instance, slotScopeId));
} else {
return renderComponentSubTree(instance, slotScopeId);
}
}
function renderComponentSubTree(instance, slotScopeId) {
const comp = instance.type;
const { getBuffer, push } = createBuffer();
if (shared.isFunction(comp)) {
let root = renderComponentRoot(instance);
if (!comp.props) {
for (const key in instance.attrs) {
if (key.startsWith(`data-v-`)) {
(root.props || (root.props = {}))[key] = ``;
}
}
}
renderVNode(push, instance.subTree = root, instance, slotScopeId);
} else {
if ((!instance.render || instance.render === shared.NOOP) && !instance.ssrRender && !comp.ssrRender && shared.isString(comp.template)) {
comp.ssrRender = ssrCompile(comp.template, instance);
}
const ssrRender = instance.ssrRender || comp.ssrRender;
if (ssrRender) {
let attrs = instance.inheritAttrs !== false ? instance.attrs : void 0;
let hasCloned = false;
let cur = instance;
while (true) {
const scopeId = cur.vnode.scopeId;
if (scopeId) {
if (!hasCloned) {
attrs = { ...attrs };
hasCloned = true;
}
attrs[scopeId] = "";
}
const parent = cur.parent;
if (parent && parent.subTree && parent.subTree === cur.vnode) {
cur = parent;
} else {
break;
}
}
if (slotScopeId) {
if (!hasCloned) attrs = { ...attrs };
const slotScopeIdList = slotScopeId.trim().split(" ");
for (let i = 0; i < slotScopeIdList.length; i++) {
attrs[slotScopeIdList[i]] = "";
}
}
const prev = setCurrentRenderingInstance(instance);
try {
ssrRender(
instance.proxy,
push,
instance,
attrs,
// compiler-optimized bindings
instance.props,
instance.setupState,
instance.data,
instance.ctx
);
} finally {
setCurrentRenderingInstance(prev);
}
} else if (instance.render && instance.render !== shared.NOOP) {
renderVNode(
push,
instance.subTree = renderComponentRoot(instance),
instance,
slotScopeId
);
} else {
const componentName = comp.name || comp.__file || `<Anonymous>`;
Vue.warn(`Component ${componentName} is missing template or render function.`);
push(`<!---->`);
}
}
return getBuffer();
}
function renderVNode(push, vnode, parentComponent, slotScopeId) {
const { type, shapeFlag, children, dirs, props } = vnode;
if (dirs) {
vnode.props = applySSRDirectives(vnode, props, dirs);
}
switch (type) {
case Vue.Text:
push(shared.escapeHtml(children));
break;
case Vue.Comment:
push(
children ? `<!--${shared.escapeHtmlComment(children)}-->` : `<!---->`
);
break;
case Vue.Static:
push(children);
break;
case Vue.Fragment:
if (vnode.slotScopeIds) {
slotScopeId = (slotScopeId ? slotScopeId + " " : "") + vnode.slotScopeIds.join(" ");
}
push(`<!--[-->`);
renderVNodeChildren(
push,
children,
parentComponent,
slotScopeId
);
push(`<!--]-->`);
break;
default:
if (shapeFlag & 1) {
renderElementVNode(push, vnode, parentComponent, slotScopeId);
} else if (shapeFlag & 6) {
push(renderComponentVNode(vnode, parentComponent, slotScopeId));
} else if (shapeFlag & 64) {
renderTeleportVNode(push, vnode, parentComponent, slotScopeId);
} else if (shapeFlag & 128) {
renderVNode(push, vnode.ssContent, parentComponent, slotScopeId);
} else {
Vue.warn(
"[@vue/server-renderer] Invalid VNode type:",
type,
`(${typeof type})`
);
}
}
}
function renderVNodeChildren(push, children, parentComponent, slotScopeId) {
for (let i = 0; i < children.length; i++) {
renderVNode(push, normalizeVNode(children[i]), parentComponent, slotScopeId);
}
}
function renderElementVNode(push, vnode, parentComponent, slotScopeId) {
const tag = vnode.type;
let { props, children, shapeFlag, scopeId } = vnode;
let openTag = `<${tag}`;
if (props) {
openTag += ssrRenderAttrs(props, tag);
}
if (scopeId) {
openTag += ` ${scopeId}`;
}
let curParent = parentComponent;
let curVnode = vnode;
while (curParent && curVnode === curParent.subTree) {
curVnode = curParent.vnode;
if (curVnode.scopeId) {
openTag += ` ${curVnode.scopeId}`;
}
curParent = curParent.parent;
}
if (slotScopeId) {
openTag += ` ${slotScopeId}`;
}
push(openTag + `>`);
if (!shared.isVoidTag(tag)) {
let hasChildrenOverride = false;
if (props) {
if (props.innerHTML) {
hasChildrenOverride = true;
push(props.innerHTML);
} else if (props.textContent) {
hasChildrenOverride = true;
push(shared.escapeHtml(props.textContent));
} else if (tag === "textarea" && props.value) {
hasChildrenOverride = true;
push(shared.escapeHtml(props.value));
}
}
if (!hasChildrenOverride) {
if (shapeFlag & 8) {
push(shared.escapeHtml(children));
} else if (shapeFlag & 16) {
renderVNodeChildren(
push,
children,
parentComponent,
slotScopeId
);
}
}
push(`</${tag}>`);
}
}
function applySSRDirectives(vnode, rawProps, dirs) {
const toMerge = [];
for (let i = 0; i < dirs.length; i++) {
const binding = dirs[i];
const {
dir: { getSSRProps }
} = binding;
if (getSSRProps) {
const props = getSSRProps(binding, vnode);
if (props) toMerge.push(props);
}
}
return Vue.mergeProps(rawProps || {}, ...toMerge);
}
function renderTeleportVNode(push, vnode, parentComponent, slotScopeId) {
const target = vnode.props && vnode.props.to;
const disabled = vnode.props && vnode.props.disabled;
if (!target) {
if (!disabled) {
Vue.warn(`[@vue/server-renderer] Teleport is missing target prop.`);
}
return [];
}
if (!shared.isString(target)) {
Vue.warn(
`[@vue/server-renderer] Teleport target must be a query selector string.`
);
return [];
}
ssrRenderTeleport(
push,
(push2) => {
renderVNodeChildren(
push2,
vnode.children,
parentComponent,
slotScopeId
);
},
target,
disabled || disabled === "",
parentComponent
);
}
const { isVNode: isVNode$1 } = Vue.ssrUtils;
function nestedUnrollBuffer(buffer, parentRet, startIndex) {
if (!buffer.hasAsync) {
return parentRet + unrollBufferSync$1(buffer);
}
let ret = parentRet;
for (let i = startIndex; i < buffer.length; i += 1) {
const item = buffer[i];
if (shared.isString(item)) {
ret += item;
continue;
}
if (shared.isPromise(item)) {
return item.then((nestedItem) => {
buffer[i] = nestedItem;
return nestedUnrollBuffer(buffer, ret, i);
});
}
const result = nestedUnrollBuffer(item, ret, 0);
if (shared.isPromise(result)) {
return result.then((nestedItem) => {
buffer[i] = nestedItem;
return nestedUnrollBuffer(buffer, "", i);
});
}
ret = result;
}
return ret;
}
function unrollBuffer$1(buffer) {
return nestedUnrollBuffer(buffer, "", 0);
}
function unrollBufferSync$1(buffer) {
let ret = "";
for (let i = 0; i < buffer.length; i++) {
let item = buffer[i];
if (shared.isString(item)) {
ret += item;
} else {
ret += unrollBufferSync$1(item);
}
}
return ret;
}
async function renderToString(input, context = {}) {
if (isVNode$1(input)) {
return renderToString(Vue.createApp({ render: () => input }), context);
}
const vnode = Vue.createVNode(input._component, input._props);
vnode.appContext = input._context;
input.provide(Vue.ssrContextKey, context);
const buffer = await renderComponentVNode(vnode);
const result = await unrollBuffer$1(buffer);
await resolveTeleports(context);
if (context.__watcherHandles) {
for (const unwatch of context.__watcherHandles) {
unwatch();
}
}
return result;
}
async function resolveTeleports(context) {
if (context.__teleportBuffers) {
context.teleports = context.teleports || {};
for (const key in context.__teleportBuffers) {
context.teleports[key] = await unrollBuffer$1(
await Promise.all([context.__teleportBuffers[key]])
);
}
}
}
const { isVNode } = Vue.ssrUtils;
async function unrollBuffer(buffer, stream) {
if (buffer.hasAsync) {
for (let i = 0; i < buffer.length; i++) {
let item = buffer[i];
if (shared.isPromise(item)) {
item = await item;
}
if (shared.isString(item)) {
stream.push(item);
} else {
await unrollBuffer(item, stream);
}
}
} else {
unrollBufferSync(buffer, stream);
}
}
function unrollBufferSync(buffer, stream) {
for (let i = 0; i < buffer.length; i++) {
let item = buffer[i];
if (shared.isString(item)) {
stream.push(item);
} else {
unrollBufferSync(item, stream);
}
}
}
function renderToSimpleStream(input, context, stream) {
if (isVNode(input)) {
return renderToSimpleStream(
Vue.createApp({ render: () => input }),
context,
stream
);
}
const vnode = Vue.createVNode(input._component, input._props);
vnode.appContext = input._context;
input.provide(Vue.ssrContextKey, context);
Promise.resolve(renderComponentVNode(vnode)).then((buffer) => unrollBuffer(buffer, stream)).then(() => resolveTeleports(context)).then(() => {
if (context.__watcherHandles) {
for (const unwatch of context.__watcherHandles) {
unwatch();
}
}
}).then(() => stream.push(null)).catch((error) => {
stream.destroy(error);
});
return stream;
}
function renderToStream(input, context = {}) {
console.warn(
`[@vue/server-renderer] renderToStream is deprecated - use renderToNodeStream instead.`
);
return renderToNodeStream(input, context);
}
function renderToNodeStream(input, context = {}) {
const stream = new (require("node:stream")).Readable({ read() {
} }) ;
if (!stream) {
throw new Error(
`ESM build of renderToStream() does not support renderToNodeStream(). Use pipeToNodeWritable() with an existing Node.js Writable stream instance instead.`
);
}
return renderToSimpleStream(input, context, stream);
}
function pipeToNodeWritable(input, context = {}, writable) {
renderToSimpleStream(input, context, {
push(content) {
if (content != null) {
writable.write(content);
} else {
writable.end();
}
},
destroy(err) {
writable.destroy(err);
}
});
}
function renderToWebStream(input, context = {}) {
if (typeof ReadableStream !== "function") {
throw new Error(
`ReadableStream constructor is not available in the global scope. If the target environment does support web streams, consider using pipeToWebWritable() with an existing WritableStream instance instead.`
);
}
const encoder = new TextEncoder();
let cancelled = false;
return new ReadableStream({
start(controller) {
renderToSimpleStream(input, context, {
push(content) {
if (cancelled) return;
if (content != null) {
controller.enqueue(encoder.encode(content));
} else {
controller.close();
}
},
destroy(err) {
controller.error(err);
}
});
},
cancel() {
cancelled = true;
}
});
}
function pipeToWebWritable(input, context = {}, writable) {
const writer = writable.getWriter();
const encoder = new TextEncoder();
let hasReady = false;
try {
hasReady = shared.isPromise(writer.ready);
} catch (e) {
}
renderToSimpleStream(input, context, {
async push(content) {
if (hasReady) {
await writer.ready;
}
if (content != null) {
return writer.write(encoder.encode(content));
} else {
return writer.close();
}
},
destroy(err) {
console.log(err);
writer.close();
}
});
}
Vue.initDirectivesForSSR();
exports.ssrIncludeBooleanAttr = shared.includeBooleanAttr;
exports.pipeToNodeWritable = pipeToNodeWritable;
exports.pipeToWebWritable = pipeToWebWritable;
exports.renderToNodeStream = renderToNodeStream;
exports.renderToSimpleStream = renderToSimpleStream;
exports.renderToStream = renderToStream;
exports.renderToString = renderToString;
exports.renderToWebStream = renderToWebStream;
exports.ssrGetDirectiveProps = ssrGetDirectiveProps;
exports.ssrGetDynamicModelProps = ssrGetDynamicModelProps;
exports.ssrInterpolate = ssrInterpolate;
exports.ssrLooseContain = ssrLooseContain;
exports.ssrLooseEqual = ssrLooseEqual;
exports.ssrRenderAttr = ssrRenderAttr;
exports.ssrRenderAttrs = ssrRenderAttrs;
exports.ssrRenderClass = ssrRenderClass;
exports.ssrRenderComponent = ssrRenderComponent;
exports.ssrRenderDynamicAttr = ssrRenderDynamicAttr;
exports.ssrRenderDynamicModel = ssrRenderDynamicModel;
exports.ssrRenderList = ssrRenderList;
exports.ssrRenderSlot = ssrRenderSlot;
exports.ssrRenderSlotInner = ssrRenderSlotInner;
exports.ssrRenderStyle = ssrRenderStyle;
exports.ssrRenderSuspense = ssrRenderSuspense;
exports.ssrRenderTeleport = ssrRenderTeleport;
exports.ssrRenderVNode = renderVNode;

View File

@@ -0,0 +1,55 @@
{
"name": "@vue/server-renderer",
"version": "3.5.38",
"description": "@vue/server-renderer",
"main": "index.js",
"module": "dist/server-renderer.esm-bundler.js",
"types": "dist/server-renderer.d.ts",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/server-renderer.d.ts",
"node": {
"production": "./dist/server-renderer.cjs.prod.js",
"development": "./dist/server-renderer.cjs.js",
"default": "./dist/server-renderer.cjs.prod.js"
},
"module": "./dist/server-renderer.esm-bundler.js",
"import": "./dist/server-renderer.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"buildOptions": {
"name": "VueServerRenderer",
"formats": [
"esm-bundler",
"esm-browser",
"cjs"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/server-renderer"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/server-renderer#readme",
"peerDependencies": {
"vue": "3.5.38"
},
"dependencies": {
"@vue/shared": "3.5.38",
"@vue/compiler-ssr": "3.5.38"
}
}

View File

@@ -0,0 +1,604 @@
/**
* @vue/shared v3.5.38
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
// @__NO_SIDE_EFFECTS__
function makeMap(str) {
const map = /* @__PURE__ */ Object.create(null);
for (const key of str.split(",")) map[key] = 1;
return (val) => val in map;
}
const EMPTY_OBJ = {};
const EMPTY_ARR = [];
const NOOP = () => {
};
const NO = () => false;
const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
const isModelListener = (key) => key.startsWith("onUpdate:");
const extend = Object.assign;
const remove = (arr, el) => {
const i = arr.indexOf(el);
if (i > -1) {
arr.splice(i, 1);
}
};
const hasOwnProperty = Object.prototype.hasOwnProperty;
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
const isArray = Array.isArray;
const isMap = (val) => toTypeString(val) === "[object Map]";
const isSet = (val) => toTypeString(val) === "[object Set]";
const isDate = (val) => toTypeString(val) === "[object Date]";
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
const isFunction = (val) => typeof val === "function";
const isString = (val) => typeof val === "string";
const isSymbol = (val) => typeof val === "symbol";
const isObject = (val) => val !== null && typeof val === "object";
const isPromise = (val) => {
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
};
const objectToString = Object.prototype.toString;
const toTypeString = (value) => objectToString.call(value);
const toRawType = (value) => {
return toTypeString(value).slice(8, -1);
};
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
const isReservedProp = /* @__PURE__ */ makeMap(
// the leading comma is intentional so empty string "" is also included
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
);
const isBuiltInDirective = /* @__PURE__ */ makeMap(
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
);
const cacheStringFunction = (fn) => {
const cache = /* @__PURE__ */ Object.create(null);
return ((str) => {
const hit = cache[str];
return hit || (cache[str] = fn(str));
});
};
const camelizeRE = /-\w/g;
const camelize = cacheStringFunction(
(str) => {
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
}
);
const hyphenateRE = /\B([A-Z])/g;
const hyphenate = cacheStringFunction(
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
);
const capitalize = cacheStringFunction((str) => {
return str.charAt(0).toUpperCase() + str.slice(1);
});
const toHandlerKey = cacheStringFunction(
(str) => {
const s = str ? `on${capitalize(str)}` : ``;
return s;
}
);
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
const invokeArrayFns = (fns, ...arg) => {
for (let i = 0; i < fns.length; i++) {
fns[i](...arg);
}
};
const def = (obj, key, value, writable = false) => {
Object.defineProperty(obj, key, {
configurable: true,
enumerable: false,
writable,
value
});
};
const looseToNumber = (val) => {
const n = parseFloat(val);
return isNaN(n) ? val : n;
};
const toNumber = (val) => {
const n = isString(val) ? Number(val) : NaN;
return isNaN(n) ? val : n;
};
let _globalThis;
const getGlobalThis = () => {
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
};
const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
function genPropsAccessExp(name) {
return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
}
function genCacheKey(source, options) {
return source + JSON.stringify(
options,
(_, val) => typeof val === "function" ? val.toString() : val
);
}
const PatchFlags = {
"TEXT": 1,
"1": "TEXT",
"CLASS": 2,
"2": "CLASS",
"STYLE": 4,
"4": "STYLE",
"PROPS": 8,
"8": "PROPS",
"FULL_PROPS": 16,
"16": "FULL_PROPS",
"NEED_HYDRATION": 32,
"32": "NEED_HYDRATION",
"STABLE_FRAGMENT": 64,
"64": "STABLE_FRAGMENT",
"KEYED_FRAGMENT": 128,
"128": "KEYED_FRAGMENT",
"UNKEYED_FRAGMENT": 256,
"256": "UNKEYED_FRAGMENT",
"NEED_PATCH": 512,
"512": "NEED_PATCH",
"DYNAMIC_SLOTS": 1024,
"1024": "DYNAMIC_SLOTS",
"DEV_ROOT_FRAGMENT": 2048,
"2048": "DEV_ROOT_FRAGMENT",
"CACHED": -1,
"-1": "CACHED",
"BAIL": -2,
"-2": "BAIL"
};
const PatchFlagNames = {
[1]: `TEXT`,
[2]: `CLASS`,
[4]: `STYLE`,
[8]: `PROPS`,
[16]: `FULL_PROPS`,
[32]: `NEED_HYDRATION`,
[64]: `STABLE_FRAGMENT`,
[128]: `KEYED_FRAGMENT`,
[256]: `UNKEYED_FRAGMENT`,
[512]: `NEED_PATCH`,
[1024]: `DYNAMIC_SLOTS`,
[2048]: `DEV_ROOT_FRAGMENT`,
[-1]: `CACHED`,
[-2]: `BAIL`
};
const ShapeFlags = {
"ELEMENT": 1,
"1": "ELEMENT",
"FUNCTIONAL_COMPONENT": 2,
"2": "FUNCTIONAL_COMPONENT",
"STATEFUL_COMPONENT": 4,
"4": "STATEFUL_COMPONENT",
"TEXT_CHILDREN": 8,
"8": "TEXT_CHILDREN",
"ARRAY_CHILDREN": 16,
"16": "ARRAY_CHILDREN",
"SLOTS_CHILDREN": 32,
"32": "SLOTS_CHILDREN",
"TELEPORT": 64,
"64": "TELEPORT",
"SUSPENSE": 128,
"128": "SUSPENSE",
"COMPONENT_SHOULD_KEEP_ALIVE": 256,
"256": "COMPONENT_SHOULD_KEEP_ALIVE",
"COMPONENT_KEPT_ALIVE": 512,
"512": "COMPONENT_KEPT_ALIVE",
"COMPONENT": 6,
"6": "COMPONENT"
};
const SlotFlags = {
"STABLE": 1,
"1": "STABLE",
"DYNAMIC": 2,
"2": "DYNAMIC",
"FORWARDED": 3,
"3": "FORWARDED"
};
const slotFlagsText = {
[1]: "STABLE",
[2]: "DYNAMIC",
[3]: "FORWARDED"
};
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol";
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
const isGloballyWhitelisted = isGloballyAllowed;
const range = 2;
function generateCodeFrame(source, start = 0, end = source.length) {
start = Math.max(0, Math.min(start, source.length));
end = Math.max(0, Math.min(end, source.length));
if (start > end) return "";
let lines = source.split(/(\r?\n)/);
const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
lines = lines.filter((_, idx) => idx % 2 === 0);
let count = 0;
const res = [];
for (let i = 0; i < lines.length; i++) {
count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
if (count >= start) {
for (let j = i - range; j <= i + range || end > count; j++) {
if (j < 0 || j >= lines.length) continue;
const line = j + 1;
res.push(
`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`
);
const lineLength = lines[j].length;
const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
if (j === i) {
const pad = start - (count - (lineLength + newLineSeqLength));
const length = Math.max(
1,
end > count ? lineLength - pad : end - start
);
res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
} else if (j > i) {
if (end > count) {
const length = Math.max(Math.min(end - count, lineLength), 1);
res.push(` | ` + "^".repeat(length));
}
count += lineLength + newLineSeqLength;
}
}
break;
}
}
return res.join("\n");
}
function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const item = value[i];
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
} else if (isString(value) || isObject(value)) {
return value;
}
}
const listDelimiterRE = /;(?![^(]*\))/g;
const propertyDelimiterRE = /:([^]+)/;
const styleCommentRE = /\/\*[^]*?\*\//g;
function parseStringStyle(cssText) {
const ret = {};
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
if (item) {
const tmp = item.split(propertyDelimiterRE);
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
}
});
return ret;
}
function stringifyStyle(styles) {
if (!styles) return "";
if (isString(styles)) return styles;
let ret = "";
for (const key in styles) {
const value = styles[key];
if (isString(value) || typeof value === "number") {
const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
ret += `${normalizedKey}:${value};`;
}
}
return ret;
}
function normalizeClass(value) {
let res = "";
if (isString(value)) {
res = value;
} else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
const normalized = normalizeClass(value[i]);
if (normalized) {
res += normalized + " ";
}
}
} else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + " ";
}
}
}
return res.trim();
}
function normalizeProps(props) {
if (!props) return null;
let { class: klass, style } = props;
if (klass && !isString(klass)) {
props.class = normalizeClass(klass);
}
if (style) {
props.style = normalizeStyle(style);
}
return props;
}
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
const isBooleanAttr = /* @__PURE__ */ makeMap(
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
);
function includeBooleanAttr(value) {
return !!value || value === "";
}
const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
const attrValidationCache = {};
function isSSRSafeAttrName(name) {
if (attrValidationCache.hasOwnProperty(name)) {
return attrValidationCache[name];
}
const isUnsafe = unsafeAttrCharRE.test(name);
if (isUnsafe) {
console.error(`unsafe attribute name: ${name}`);
}
return attrValidationCache[name] = !isUnsafe;
}
const propsToAttrMap = {
acceptCharset: "accept-charset",
className: "class",
htmlFor: "for",
httpEquiv: "http-equiv"
};
const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
`accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
);
const isKnownSvgAttr = /* @__PURE__ */ makeMap(
`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
);
const isKnownMathMLAttr = /* @__PURE__ */ makeMap(
`accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`
);
function isRenderableAttrValue(value) {
if (value == null) {
return false;
}
const type = typeof value;
return type === "string" || type === "number" || type === "boolean";
}
const escapeRE = /["'&<>]/;
function escapeHtml(string) {
const str = "" + string;
const match = escapeRE.exec(str);
if (!match) {
return str;
}
let html = "";
let escaped;
let index;
let lastIndex = 0;
for (index = match.index; index < str.length; index++) {
switch (str.charCodeAt(index)) {
case 34:
escaped = "&quot;";
break;
case 38:
escaped = "&amp;";
break;
case 39:
escaped = "&#39;";
break;
case 60:
escaped = "&lt;";
break;
case 62:
escaped = "&gt;";
break;
default:
continue;
}
if (lastIndex !== index) {
html += str.slice(lastIndex, index);
}
lastIndex = index + 1;
html += escaped;
}
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
}
const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
function escapeHtmlComment(src) {
return src.replace(commentStripRE, "");
}
const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
function getEscapedCssVarName(key, doubleEscape) {
return key.replace(
cssVarNameEscapeSymbolsRE,
(s) => doubleEscape ? s === '"' ? '\\\\\\"' : `\\\\${s}` : `\\${s}`
);
}
function looseCompareArrays(a, b) {
if (a.length !== b.length) return false;
let equal = true;
for (let i = 0; equal && i < a.length; i++) {
equal = looseEqual(a[i], b[i]);
}
return equal;
}
function looseEqual(a, b) {
if (a === b) return true;
let aValidType = isDate(a);
let bValidType = isDate(b);
if (aValidType || bValidType) {
return aValidType && bValidType ? a.getTime() === b.getTime() : false;
}
aValidType = isSymbol(a);
bValidType = isSymbol(b);
if (aValidType || bValidType) {
return a === b;
}
aValidType = isArray(a);
bValidType = isArray(b);
if (aValidType || bValidType) {
return aValidType && bValidType ? looseCompareArrays(a, b) : false;
}
aValidType = isObject(a);
bValidType = isObject(b);
if (aValidType || bValidType) {
if (!aValidType || !bValidType) {
return false;
}
const aKeysCount = Object.keys(a).length;
const bKeysCount = Object.keys(b).length;
if (aKeysCount !== bKeysCount) {
return false;
}
for (const key in a) {
const aHasKey = a.hasOwnProperty(key);
const bHasKey = b.hasOwnProperty(key);
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
return false;
}
}
}
return String(a) === String(b);
}
function looseIndexOf(arr, val) {
return arr.findIndex((item) => looseEqual(item, val));
}
const isRef = (val) => {
return !!(val && val["__v_isRef"] === true);
};
const toDisplayString = (val) => {
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
};
const replacer = (_key, val) => {
if (isRef(val)) {
return replacer(_key, val.value);
} else if (isMap(val)) {
return {
[`Map(${val.size})`]: [...val.entries()].reduce(
(entries, [key, val2], i) => {
entries[stringifySymbol(key, i) + " =>"] = val2;
return entries;
},
{}
)
};
} else if (isSet(val)) {
return {
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
};
} else if (isSymbol(val)) {
return stringifySymbol(val);
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
return String(val);
}
return val;
};
const stringifySymbol = (v, i = "") => {
var _a;
return (
// Symbol.description in es2019+ so we need to cast here to pass
// the lib: es2016 check
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
);
};
function normalizeCssVarValue(value) {
if (value == null) {
return "initial";
}
if (typeof value === "string") {
return value === "" ? " " : value;
}
return String(value);
}
exports.EMPTY_ARR = EMPTY_ARR;
exports.EMPTY_OBJ = EMPTY_OBJ;
exports.NO = NO;
exports.NOOP = NOOP;
exports.PatchFlagNames = PatchFlagNames;
exports.PatchFlags = PatchFlags;
exports.ShapeFlags = ShapeFlags;
exports.SlotFlags = SlotFlags;
exports.camelize = camelize;
exports.capitalize = capitalize;
exports.cssVarNameEscapeSymbolsRE = cssVarNameEscapeSymbolsRE;
exports.def = def;
exports.escapeHtml = escapeHtml;
exports.escapeHtmlComment = escapeHtmlComment;
exports.extend = extend;
exports.genCacheKey = genCacheKey;
exports.genPropsAccessExp = genPropsAccessExp;
exports.generateCodeFrame = generateCodeFrame;
exports.getEscapedCssVarName = getEscapedCssVarName;
exports.getGlobalThis = getGlobalThis;
exports.hasChanged = hasChanged;
exports.hasOwn = hasOwn;
exports.hyphenate = hyphenate;
exports.includeBooleanAttr = includeBooleanAttr;
exports.invokeArrayFns = invokeArrayFns;
exports.isArray = isArray;
exports.isBooleanAttr = isBooleanAttr;
exports.isBuiltInDirective = isBuiltInDirective;
exports.isDate = isDate;
exports.isFunction = isFunction;
exports.isGloballyAllowed = isGloballyAllowed;
exports.isGloballyWhitelisted = isGloballyWhitelisted;
exports.isHTMLTag = isHTMLTag;
exports.isIntegerKey = isIntegerKey;
exports.isKnownHtmlAttr = isKnownHtmlAttr;
exports.isKnownMathMLAttr = isKnownMathMLAttr;
exports.isKnownSvgAttr = isKnownSvgAttr;
exports.isMap = isMap;
exports.isMathMLTag = isMathMLTag;
exports.isModelListener = isModelListener;
exports.isObject = isObject;
exports.isOn = isOn;
exports.isPlainObject = isPlainObject;
exports.isPromise = isPromise;
exports.isRegExp = isRegExp;
exports.isRenderableAttrValue = isRenderableAttrValue;
exports.isReservedProp = isReservedProp;
exports.isSSRSafeAttrName = isSSRSafeAttrName;
exports.isSVGTag = isSVGTag;
exports.isSet = isSet;
exports.isSpecialBooleanAttr = isSpecialBooleanAttr;
exports.isString = isString;
exports.isSymbol = isSymbol;
exports.isVoidTag = isVoidTag;
exports.looseEqual = looseEqual;
exports.looseIndexOf = looseIndexOf;
exports.looseToNumber = looseToNumber;
exports.makeMap = makeMap;
exports.normalizeClass = normalizeClass;
exports.normalizeCssVarValue = normalizeCssVarValue;
exports.normalizeProps = normalizeProps;
exports.normalizeStyle = normalizeStyle;
exports.objectToString = objectToString;
exports.parseStringStyle = parseStringStyle;
exports.propsToAttrMap = propsToAttrMap;
exports.remove = remove;
exports.slotFlagsText = slotFlagsText;
exports.stringifyStyle = stringifyStyle;
exports.toDisplayString = toDisplayString;
exports.toHandlerKey = toHandlerKey;
exports.toNumber = toNumber;
exports.toRawType = toRawType;
exports.toTypeString = toTypeString;

View File

@@ -0,0 +1,47 @@
{
"name": "@vue/shared",
"version": "3.5.38",
"description": "internal utils shared across @vue packages",
"main": "index.js",
"module": "dist/shared.esm-bundler.js",
"types": "dist/shared.d.ts",
"files": [
"index.js",
"dist"
],
"exports": {
".": {
"types": "./dist/shared.d.ts",
"node": {
"production": "./dist/shared.cjs.prod.js",
"development": "./dist/shared.cjs.js",
"default": "./dist/shared.cjs.prod.js"
},
"module": "./dist/shared.esm-bundler.js",
"import": "./dist/shared.esm-bundler.js",
"require": "./index.js"
},
"./*": "./*"
},
"sideEffects": false,
"buildOptions": {
"formats": [
"esm-bundler",
"cjs"
]
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/core.git",
"directory": "packages/shared"
},
"keywords": [
"vue"
],
"author": "Evan You",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/core/issues"
},
"homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme"
}

View File

@@ -0,0 +1,296 @@
'use strict';
const TYPE_REQUEST = "q";
const TYPE_RESPONSE = "s";
const DEFAULT_TIMEOUT = 6e4;
function defaultSerialize(i) {
return i;
}
const defaultDeserialize = defaultSerialize;
const { clearTimeout, setTimeout } = globalThis;
const random = Math.random.bind(Math);
function createBirpc($functions, options) {
const {
post,
on,
off = () => {
},
eventNames = [],
serialize = defaultSerialize,
deserialize = defaultDeserialize,
resolver,
bind = "rpc",
timeout = DEFAULT_TIMEOUT
} = options;
let $closed = false;
const _rpcPromiseMap = /* @__PURE__ */ new Map();
let _promiseInit;
let rpc;
async function _call(method, args, event, optional) {
if ($closed)
throw new Error(`[birpc] rpc is closed, cannot call "${method}"`);
const req = { m: method, a: args, t: TYPE_REQUEST };
if (optional)
req.o = true;
const send = async (_req) => post(serialize(_req));
if (event) {
await send(req);
return;
}
if (_promiseInit) {
try {
await _promiseInit;
} finally {
_promiseInit = void 0;
}
}
let { promise, resolve, reject } = createPromiseWithResolvers();
const id = nanoid();
req.i = id;
let timeoutId;
async function handler(newReq = req) {
if (timeout >= 0) {
timeoutId = setTimeout(() => {
try {
const handleResult = options.onTimeoutError?.call(rpc, method, args);
if (handleResult !== true)
throw new Error(`[birpc] timeout on calling "${method}"`);
} catch (e) {
reject(e);
}
_rpcPromiseMap.delete(id);
}, timeout);
if (typeof timeoutId === "object")
timeoutId = timeoutId.unref?.();
}
_rpcPromiseMap.set(id, { resolve, reject, timeoutId, method });
await send(newReq);
return promise;
}
try {
if (options.onRequest)
await options.onRequest.call(rpc, req, handler, resolve);
else
await handler();
} catch (e) {
if (options.onGeneralError?.call(rpc, e) !== true)
throw e;
return;
} finally {
clearTimeout(timeoutId);
_rpcPromiseMap.delete(id);
}
return promise;
}
const $call = (method, ...args) => _call(method, args, false);
const $callOptional = (method, ...args) => _call(method, args, false, true);
const $callEvent = (method, ...args) => _call(method, args, true);
const $callRaw = (options2) => _call(options2.method, options2.args, options2.event, options2.optional);
const builtinMethods = {
$call,
$callOptional,
$callEvent,
$callRaw,
$rejectPendingCalls,
get $closed() {
return $closed;
},
get $meta() {
return options.meta;
},
$close,
$functions
};
rpc = new Proxy({}, {
get(_, method) {
if (Object.prototype.hasOwnProperty.call(builtinMethods, method))
return builtinMethods[method];
if (method === "then" && !eventNames.includes("then") && !("then" in $functions))
return void 0;
const sendEvent = (...args) => _call(method, args, true);
if (eventNames.includes(method)) {
sendEvent.asEvent = sendEvent;
return sendEvent;
}
const sendCall = (...args) => _call(method, args, false);
sendCall.asEvent = sendEvent;
return sendCall;
}
});
function $close(customError) {
$closed = true;
_rpcPromiseMap.forEach(({ reject, method }) => {
const error = new Error(`[birpc] rpc is closed, cannot call "${method}"`);
if (customError) {
customError.cause ??= error;
return reject(customError);
}
reject(error);
});
_rpcPromiseMap.clear();
off(onMessage);
}
function $rejectPendingCalls(handler) {
const entries = Array.from(_rpcPromiseMap.values());
const handlerResults = entries.map(({ method, reject }) => {
if (!handler) {
return reject(new Error(`[birpc]: rejected pending call "${method}".`));
}
return handler({ method, reject });
});
_rpcPromiseMap.clear();
return handlerResults;
}
async function onMessage(data, ...extra) {
let msg;
try {
msg = deserialize(data);
} catch (e) {
if (options.onGeneralError?.call(rpc, e) !== true)
throw e;
return;
}
if (msg.t === TYPE_REQUEST) {
const { m: method, a: args, o: optional } = msg;
let result, error;
let fn = await (resolver ? resolver.call(rpc, method, $functions[method]) : $functions[method]);
if (optional)
fn ||= () => void 0;
if (!fn) {
error = new Error(`[birpc] function "${method}" not found`);
} else {
try {
result = await fn.apply(bind === "rpc" ? rpc : $functions, args);
} catch (e) {
error = e;
}
}
if (msg.i) {
if (error && options.onError)
options.onError.call(rpc, error, method, args);
if (error && options.onFunctionError) {
if (options.onFunctionError.call(rpc, error, method, args) === true)
return;
}
if (!error) {
try {
await post(serialize({ t: TYPE_RESPONSE, i: msg.i, r: result }), ...extra);
return;
} catch (e) {
error = e;
if (options.onGeneralError?.call(rpc, e, method, args) !== true)
throw e;
}
}
try {
await post(serialize({ t: TYPE_RESPONSE, i: msg.i, e: error }), ...extra);
} catch (e) {
if (options.onGeneralError?.call(rpc, e, method, args) !== true)
throw e;
}
}
} else {
const { i: ack, r: result, e: error } = msg;
const promise = _rpcPromiseMap.get(ack);
if (promise) {
clearTimeout(promise.timeoutId);
if (error)
promise.reject(error);
else
promise.resolve(result);
}
_rpcPromiseMap.delete(ack);
}
}
_promiseInit = on(onMessage);
return rpc;
}
const cacheMap = /* @__PURE__ */ new WeakMap();
function cachedMap(items, fn) {
return items.map((i) => {
let r = cacheMap.get(i);
if (!r) {
r = fn(i);
cacheMap.set(i, r);
}
return r;
});
}
function createBirpcGroup(functions, channels, options = {}) {
const getChannels = () => typeof channels === "function" ? channels() : channels;
const getClients = (channels2 = getChannels()) => cachedMap(channels2, (s) => createBirpc(functions, { ...options, ...s }));
function _boardcast(method, args, event, optional) {
const clients = getClients();
return Promise.all(clients.map((c) => c.$callRaw({ method, args, event, optional })));
}
function $call(method, ...args) {
return _boardcast(method, args, false);
}
function $callOptional(method, ...args) {
return _boardcast(method, args, false, true);
}
function $callEvent(method, ...args) {
return _boardcast(method, args, true);
}
const broadcastBuiltin = {
$call,
$callOptional,
$callEvent
};
const broadcastProxy = new Proxy({}, {
get(_, method) {
if (Object.prototype.hasOwnProperty.call(broadcastBuiltin, method))
return broadcastBuiltin[method];
const client = getClients();
const callbacks = client.map((c) => c[method]);
const sendCall = (...args) => {
return Promise.all(callbacks.map((i) => i(...args)));
};
sendCall.asEvent = async (...args) => {
await Promise.all(callbacks.map((i) => i.asEvent(...args)));
};
return sendCall;
}
});
function updateChannels(fn) {
const channels2 = getChannels();
fn?.(channels2);
return getClients(channels2);
}
getClients();
return {
get clients() {
return getClients();
},
functions,
updateChannels,
broadcast: broadcastProxy,
/**
* @deprecated use `broadcast`
*/
// @ts-expect-error deprecated
boardcast: broadcastProxy
};
}
function createPromiseWithResolvers() {
let resolve;
let reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
return { promise, resolve, reject };
}
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
function nanoid(size = 21) {
let id = "";
let i = size;
while (i--)
id += urlAlphabet[random() * 64 | 0];
return id;
}
exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
exports.cachedMap = cachedMap;
exports.createBirpc = createBirpc;
exports.createBirpcGroup = createBirpcGroup;

View File

@@ -0,0 +1,57 @@
{
"name": "birpc",
"type": "module",
"version": "2.9.0",
"description": "Message based Two-way remote procedure call",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
"funding": "https://github.com/sponsors/antfu",
"homepage": "https://github.com/antfu-collective/birpc#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/antfu-collective/birpc.git"
},
"bugs": {
"url": "https://github.com/antfu-collective/birpc/issues"
},
"keywords": [
"rpc",
"messages"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"devDependencies": {
"@antfu/eslint-config": "^6.3.0",
"@antfu/ni": "^28.0.0",
"@types/node": "^24.10.1",
"@vitest/coverage-v8": "3.0.9",
"bumpp": "^10.3.2",
"eslint": "^9.39.1",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"unbuild": "^3.6.1",
"vite": "^7.2.6",
"vitest": "^4.0.15"
},
"scripts": {
"build": "unbuild",
"dev": "unbuild --stub",
"lint": "eslint .",
"release": "bumpp",
"start": "tsx src/index.ts",
"typecheck": "tsc --noEmit",
"test": "vitest"
}
}

View File

@@ -0,0 +1,4 @@
export { uneval } from './src/uneval.js';
export { parse, unflatten } from './src/parse.js';
export { stringify, stringifyAsync } from './src/stringify.js';
export { DevalueError } from './src/utils.js';

View File

@@ -0,0 +1,40 @@
{
"name": "devalue",
"description": "Gets the job done when JSON.stringify can't",
"version": "5.8.1",
"repository": "sveltejs/devalue",
"sideEffects": false,
"exports": {
".": {
"types": "./types/index.d.ts",
"import": "./index.js",
"default": "./index.js"
}
},
"files": [
"index.js",
"src",
"types"
],
"types": "./types/index.d.ts",
"devDependencies": {
"@changesets/cli": "^2.29.6",
"@js-temporal/polyfill": "^0.5.1",
"@types/node": "^24.12.0",
"dts-buddy": "^0.6.2",
"publint": "^0.3.12",
"typescript": "^5.9.2",
"uvu": "^0.5.6"
},
"license": "MIT",
"type": "module",
"packageManager": "pnpm@8.15.9",
"scripts": {
"changeset:version": "changeset version",
"changeset:publish": "changeset publish",
"build": "dts-buddy",
"test": "uvu",
"bench": "node --allow-natives-syntax ./benchmarking/run.js",
"bench:compare": "node --allow-natives-syntax ./benchmarking/compare/index.js"
}
}

View File

@@ -0,0 +1,60 @@
/* Baseline 2025 runtimes */
/** @type {(array_buffer: ArrayBuffer) => string} */
export function encode_native(array_buffer) {
return new Uint8Array(array_buffer).toBase64();
}
/** @type {(base64: string) => ArrayBuffer} */
export function decode_native(base64) {
return Uint8Array.fromBase64(base64).buffer;
}
/* Node-compatible runtimes */
/** @type {(array_buffer: ArrayBuffer) => string} */
export function encode_buffer(array_buffer) {
return Buffer.from(array_buffer).toString('base64');
}
/** @type {(base64: string) => ArrayBuffer} */
export function decode_buffer(base64) {
return Uint8Array.from(Buffer.from(base64, 'base64')).buffer;
}
/* Legacy runtimes */
/** @type {(array_buffer: ArrayBuffer) => string} */
export function encode_legacy(array_buffer) {
const array = new Uint8Array(array_buffer);
let binary = '';
// the maximum number of arguments to String.fromCharCode.apply
// should be around 0xFFFF in modern engines
const chunk_size = 0x8000;
for (let i = 0; i < array.length; i += chunk_size) {
const chunk = array.subarray(i, i + chunk_size);
binary += String.fromCharCode.apply(null, chunk);
}
return btoa(binary);
}
/** @type {(base64: string) => ArrayBuffer} */
export function decode_legacy(base64) {
const binary_string = atob(base64);
const len = binary_string.length;
const array = new Uint8Array(len);
for (let i = 0; i < len; i++) {
array[i] = binary_string.charCodeAt(i);
}
return array.buffer;
}
const native = typeof Uint8Array.fromBase64 === 'function';
const buffer = typeof process === 'object' && process.versions?.node !== undefined;
export const encode64 = native ? encode_native : buffer ? encode_buffer : encode_legacy;
export const decode64 = native ? decode_native : buffer ? decode_buffer : decode_legacy;

View File

@@ -0,0 +1,12 @@
export const UNDEFINED = -1;
export const HOLE = -2;
export const NAN = -3;
export const POSITIVE_INFINITY = -4;
export const NEGATIVE_INFINITY = -5;
export const NEGATIVE_ZERO = -6;
export const SPARSE = -7;
// The largest valid value for a JavaScript array's `length` property,
// and the largest valid array index (one less than the max length).
export const MAX_ARRAY_LEN = 2 ** 32 - 1;
export const MAX_ARRAY_INDEX = MAX_ARRAY_LEN - 1;

View File

@@ -0,0 +1,283 @@
import { decode64 } from './base64.js';
import {
HOLE,
MAX_ARRAY_INDEX,
NAN,
NEGATIVE_INFINITY,
NEGATIVE_ZERO,
POSITIVE_INFINITY,
SPARSE,
UNDEFINED
} from './constants.js';
import { is_valid_array_index, is_valid_array_len } from './utils.js';
/**
* Revive a value serialized with `devalue.stringify`
* @param {string} serialized
* @param {Record<string, (value: any) => any>} [revivers]
*/
export function parse(serialized, revivers) {
return unflatten(JSON.parse(serialized), revivers);
}
/**
* Revive a value flattened with `devalue.stringify`
* @param {number | any[]} parsed
* @param {Record<string, (value: any) => any>} [revivers]
*/
export function unflatten(parsed, revivers) {
if (typeof parsed === 'number') return hydrate(parsed, true);
if (!Array.isArray(parsed) || parsed.length === 0) {
throw new Error('Invalid input');
}
const values = /** @type {any[]} */ (parsed);
const hydrated = Array(values.length);
/**
* A set of values currently being hydrated with custom revivers,
* used to detect invalid cyclical dependencies
* @type {Set<number> | null}
*/
let hydrating = null;
/**
* @param {number} index
* @returns {any}
*/
function hydrate(index, standalone = false) {
if (index === UNDEFINED) return undefined;
if (index === NAN) return NaN;
if (index === POSITIVE_INFINITY) return Infinity;
if (index === NEGATIVE_INFINITY) return -Infinity;
if (index === NEGATIVE_ZERO) return -0;
if (standalone || typeof index !== 'number') {
throw new Error(`Invalid input`);
}
if (index in hydrated) return hydrated[index];
const value = values[index];
if (!value || typeof value !== 'object') {
hydrated[index] = value;
} else if (Array.isArray(value)) {
if (typeof value[0] === 'string') {
const type = value[0];
const reviver = revivers && Object.hasOwn(revivers, type) ? revivers[type] : undefined;
if (reviver) {
let i = value[1];
if (typeof i !== 'number') {
// if it's not a number, it was serialized by a builtin reviver
// so we need to munge it into the format expected by a custom reviver
i = values.push(value[1]) - 1;
}
hydrating ??= new Set();
if (hydrating.has(i)) {
throw new Error('Invalid circular reference');
}
hydrating.add(i);
hydrated[index] = reviver(hydrate(i));
hydrating.delete(i);
return hydrated[index];
}
switch (type) {
case 'Date':
hydrated[index] = new Date(value[1]);
break;
case 'Set':
const set = new Set();
hydrated[index] = set;
for (let i = 1; i < value.length; i += 1) {
set.add(hydrate(value[i]));
}
break;
case 'Map':
const map = new Map();
hydrated[index] = map;
for (let i = 1; i < value.length; i += 2) {
map.set(hydrate(value[i]), hydrate(value[i + 1]));
}
break;
case 'RegExp':
hydrated[index] = new RegExp(value[1], value[2]);
break;
case 'Object': {
const wrapped_index = value[1];
if (
typeof values[wrapped_index] === 'object' &&
values[wrapped_index][0] !== 'BigInt'
) {
// avoid infinite recusion in case of malformed input
throw new Error('Invalid input');
}
hydrated[index] = Object(hydrate(wrapped_index));
break;
}
case 'BigInt':
hydrated[index] = BigInt(value[1]);
break;
case 'null':
const obj = Object.create(null);
hydrated[index] = obj;
for (let i = 1; i < value.length; i += 2) {
if (value[i] === '__proto__') {
throw new Error('Cannot parse an object with a `__proto__` property');
}
obj[value[i]] = hydrate(value[i + 1]);
}
break;
case 'Int8Array':
case 'Uint8Array':
case 'Uint8ClampedArray':
case 'Int16Array':
case 'Uint16Array':
case 'Float16Array':
case 'Int32Array':
case 'Uint32Array':
case 'Float32Array':
case 'Float64Array':
case 'BigInt64Array':
case 'BigUint64Array':
case 'DataView': {
if (values[value[1]][0] !== 'ArrayBuffer') {
// without this, if we receive malformed input we could
// end up trying to hydrate in a circle or allocate
// huge amounts of memory when we call `new TypedArrayConstructor(buffer)`
throw new Error('Invalid data');
}
const TypedArrayConstructor = globalThis[type];
const buffer = hydrate(value[1]);
hydrated[index] =
value[2] !== undefined
? new TypedArrayConstructor(buffer, value[2], value[3])
: new TypedArrayConstructor(buffer);
break;
}
case 'ArrayBuffer': {
const base64 = value[1];
if (typeof base64 !== 'string') {
throw new Error('Invalid ArrayBuffer encoding');
}
const arraybuffer = decode64(base64);
hydrated[index] = arraybuffer;
break;
}
case 'Temporal.Duration':
case 'Temporal.Instant':
case 'Temporal.PlainDate':
case 'Temporal.PlainTime':
case 'Temporal.PlainDateTime':
case 'Temporal.PlainMonthDay':
case 'Temporal.PlainYearMonth':
case 'Temporal.ZonedDateTime': {
const temporalName = type.slice(9);
// @ts-expect-error TS doesn't know about Temporal yet
hydrated[index] = Temporal[temporalName].from(value[1]);
break;
}
case 'URL': {
const url = new URL(value[1]);
hydrated[index] = url;
break;
}
case 'URLSearchParams': {
const url = new URLSearchParams(value[1]);
hydrated[index] = url;
break;
}
default:
throw new Error(`Unknown type ${type}`);
}
} else if (value[0] === SPARSE) {
// Sparse array encoding: [SPARSE, length, idx, val, idx, val, ...]
const len = value[1];
if (!is_valid_array_len(len)) {
throw new Error('Invalid input');
}
/** @type {any[]} */
const array = [];
hydrated[index] = array;
// Setting `array.length = len` (or equivalently calling `new Array(len)`)
// on an untrusted `len` is a DoS vector: V8 eagerly allocates a
// contiguous backing store for array lengths below ~10^8, so a
// small payload with a huge declared length can force arbitrary
// memory allocation. Touching the largest-possible index first
// forces V8 into dictionary-elements mode, where `length` is
// just a number and no contiguous allocation occurs.
array[MAX_ARRAY_INDEX] = undefined;
delete array[MAX_ARRAY_INDEX];
for (let i = 2; i < value.length; i += 2) {
const idx = value[i];
if (!is_valid_array_index(idx) || idx >= len) {
throw new Error('Invalid input');
}
array[idx] = hydrate(value[i + 1]);
}
array.length = len;
} else {
const array = new Array(value.length);
hydrated[index] = array;
for (let i = 0; i < value.length; i += 1) {
const n = value[i];
if (n === HOLE) continue;
array[i] = hydrate(n);
}
}
} else {
/** @type {Record<string, any>} */
const object = {};
hydrated[index] = object;
for (const key of Object.keys(value)) {
if (key === '__proto__') {
throw new Error('Cannot parse an object with a `__proto__` property');
}
const n = value[key];
object[key] = hydrate(n);
}
}
return hydrated[index];
}
return hydrate(0);
}

View File

@@ -0,0 +1,401 @@
import {
DevalueError,
enumerable_symbols,
get_type,
is_plain_object,
is_primitive,
stringify_key,
stringify_string,
valid_array_indices
} from './utils.js';
import {
HOLE,
NAN,
NEGATIVE_INFINITY,
NEGATIVE_ZERO,
POSITIVE_INFINITY,
SPARSE,
UNDEFINED
} from './constants.js';
import { encode64 } from './base64.js';
/**
* Turn a value into a JSON string that can be parsed with `devalue.parse`
* @param {any} value
* @param {Record<string, (value: any) => any>} [reducers]
*/
export function stringify(value, reducers) {
const stringified = run(false, value, reducers);
return typeof stringified === 'string' ? stringified : `[${stringified.join(',')}]`;
}
/**
* Turn a value into a JSON string that can be parsed with `devalue.parse`
* @param {any} value
* @param {Record<string, (value: any) => any>} [reducers]
*/
export async function stringifyAsync(value, reducers) {
const stringified = run(true, value, reducers);
if (typeof stringified === 'string') {
return stringified;
}
let out = '[';
for (let i = 0; i < stringified.length; i += 1) {
let value = stringified[i];
if (typeof value !== 'string') {
await value;
value = stringified[i];
if (i === 0 && value < 0) {
return `${value}`;
}
}
out += value;
if (i < stringified.length - 1) {
out += ',';
}
}
out += ']';
return out;
}
/**
* @param {boolean} async
* @param {any} value
* @param {Record<string, (value: any) => any>} [reducers]
*/
function run(async, value, reducers) {
/** @type {any[]} */
const stringified = [];
/** @type {Map<any, number>} */
const indexes = new Map();
/** @type {Array<{ key: string, fn: (value: any) => any }>} */
const custom = [];
if (reducers) {
for (const key of Object.getOwnPropertyNames(reducers)) {
custom.push({ key, fn: reducers[key] });
}
}
/** @type {string[]} */
const keys = [];
let p = 0;
/**
* @param {any} thing
* @param {number} [index]
*/
function flatten(thing, index) {
if (thing === undefined) return UNDEFINED;
if (Number.isNaN(thing)) return NAN;
if (thing === Infinity) return POSITIVE_INFINITY;
if (thing === -Infinity) return NEGATIVE_INFINITY;
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO;
if (indexes.has(thing)) return /** @type {number} */ (indexes.get(thing));
index ??= p++;
indexes.set(thing, index);
for (const { key, fn } of custom) {
const value = fn(thing);
if (value) {
stringified[index] = `["${key}",${flatten(value)}]`;
return index;
}
}
if (typeof thing === 'function') {
throw new DevalueError(`Cannot stringify a function`, keys, thing, value);
} else if (typeof thing === 'symbol') {
throw new DevalueError(`Cannot stringify a Symbol primitive`, keys, thing, value);
}
/** @type {string | Promise<any>} */
let str = '';
if (is_primitive(thing)) {
str = stringify_primitive(thing);
} else if (typeof thing.then === 'function') {
if (!async) {
throw new DevalueError(
`Cannot stringify a Promise or thenable — use stringifyAsync instead`,
keys,
thing,
value
);
}
str = Promise.resolve(thing).then((value) => {
const i = flatten(value, index);
if (i < 0) stringified[index] = i;
});
} else {
const type = get_type(thing);
switch (type) {
case 'Number':
case 'String':
case 'Boolean':
case 'BigInt':
str = `["Object",${flatten(thing.valueOf())}]`;
break;
case 'Date':
const valid = !isNaN(thing.getDate());
str = `["Date","${valid ? thing.toISOString() : ''}"]`;
break;
case 'URL':
str = `["URL",${stringify_string(thing.toString())}]`;
break;
case 'URLSearchParams':
str = `["URLSearchParams",${stringify_string(thing.toString())}]`;
break;
case 'RegExp':
const { source, flags } = thing;
str = flags
? `["RegExp",${stringify_string(source)},"${flags}"]`
: `["RegExp",${stringify_string(source)}]`;
break;
case 'Array': {
// For dense arrays (no holes), we iterate normally.
// When we encounter the first hole, we call Object.keys
// to determine the sparseness, then decide between:
// - HOLE encoding: [-2, val, -2, ...] (default)
// - Sparse encoding: [-7, length, idx, val, ...] (for very sparse arrays)
// Only the sparse path avoids iterating every slot, which
// is what protects against the DoS of e.g. `arr[1000000] = 1`.
let mostly_dense = false;
str = '[';
for (let i = 0; i < thing.length; i += 1) {
if (i > 0) str += ',';
if (Object.hasOwn(thing, i)) {
keys.push(`[${i}]`);
str += flatten(thing[i]);
keys.pop();
} else if (mostly_dense) {
// Use dense encoding. The heuristic guarantees the
// array is only mildly sparse, so iterating over every
// slot is fine.
str += HOLE;
} else {
// Decide between HOLE encoding and sparse encoding.
//
// HOLE encoding: each hole is serialized as the HOLE
// sentinel (-2). For example, [, "a", ,] becomes
// [-2, 0, -2]. Each hole costs 3 chars ("-2" + comma).
//
// Sparse encoding: lists only populated indices.
// For example, [, "a", ,] becomes [-7, 3, 1, 0] — the
// -7 sentinel, the array length (3), then index-value
// pairs. This avoids paying per-hole, but each element
// costs extra chars to write its index.
//
// The values are the same size either way, so the
// choice comes down to structural overhead:
//
// HOLE overhead:
// 3 chars per hole ("-2" + comma)
// = (L - P) * 3
//
// Sparse overhead:
// "-7," — 3 chars (sparse sentinel + comma)
// + length + "," — (d + 1) chars (array length + comma)
// + per element: index + "," — (d + 1) chars
// = (4 + d) + P * (d + 1)
//
// where L is the array length, P is the number of
// populated elements, and d is the number of digits
// in L (an upper bound on the digits in any index).
//
// Sparse encoding is cheaper when:
// (4 + d) + P * (d + 1) < (L - P) * 3
const populated_keys = valid_array_indices(/** @type {any[]} */ (thing));
const population = populated_keys.length;
const d = String(thing.length).length;
const hole_cost = (thing.length - population) * 3;
const sparse_cost = 4 + d + population * (d + 1);
if (hole_cost > sparse_cost) {
str = '[' + SPARSE + ',' + thing.length;
for (let j = 0; j < populated_keys.length; j++) {
const key = populated_keys[j];
keys.push(`[${key}]`);
str += ',' + key + ',' + flatten(thing[key]);
keys.pop();
}
break;
} else {
mostly_dense = true;
str += HOLE;
}
}
}
str += ']';
break;
}
case 'Set':
str = '["Set"';
for (const value of thing) {
str += `,${flatten(value)}`;
}
str += ']';
break;
case 'Map':
str = '["Map"';
for (const [key, value] of thing) {
keys.push(`.get(${is_primitive(key) ? stringify_primitive(key) : '...'})`);
str += `,${flatten(key)},${flatten(value)}`;
keys.pop();
}
str += ']';
break;
case 'Int8Array':
case 'Uint8Array':
case 'Uint8ClampedArray':
case 'Int16Array':
case 'Uint16Array':
case 'Float16Array':
case 'Int32Array':
case 'Uint32Array':
case 'Float32Array':
case 'Float64Array':
case 'BigInt64Array':
case 'BigUint64Array':
case 'DataView': {
/** @type {import("./types.js").TypedArray} */
const typedArray = thing;
str = '["' + type + '",' + flatten(typedArray.buffer);
// handle subarrays
if (typedArray.byteLength !== typedArray.buffer.byteLength) {
// to be used with `new TypedArray(buffer, byteOffset, length)`
str += `,${typedArray.byteOffset},${typedArray.length}`;
}
str += ']';
break;
}
case 'ArrayBuffer': {
/** @type {ArrayBuffer} */
const arraybuffer = thing;
const base64 = encode64(arraybuffer);
str = `["ArrayBuffer","${base64}"]`;
break;
}
case 'Temporal.Duration':
case 'Temporal.Instant':
case 'Temporal.PlainDate':
case 'Temporal.PlainTime':
case 'Temporal.PlainDateTime':
case 'Temporal.PlainMonthDay':
case 'Temporal.PlainYearMonth':
case 'Temporal.ZonedDateTime':
str = `["${type}",${stringify_string(thing.toString())}]`;
break;
default:
if (!is_plain_object(thing)) {
throw new DevalueError(`Cannot stringify arbitrary non-POJOs`, keys, thing, value);
}
if (enumerable_symbols(thing).length > 0) {
throw new DevalueError(`Cannot stringify POJOs with symbolic keys`, keys, thing, value);
}
if (Object.getPrototypeOf(thing) === null) {
str = '["null"';
for (const key of Object.keys(thing)) {
if (key === '__proto__') {
throw new DevalueError(
`Cannot stringify objects with __proto__ keys`,
keys,
thing,
value
);
}
keys.push(stringify_key(key));
str += `,${stringify_string(key)},${flatten(thing[key])}`;
keys.pop();
}
str += ']';
} else {
str = '{';
let started = false;
for (const key of Object.keys(thing)) {
if (key === '__proto__') {
throw new DevalueError(
`Cannot stringify objects with __proto__ keys`,
keys,
thing,
value
);
}
if (started) str += ',';
started = true;
keys.push(stringify_key(key));
str += `${stringify_string(key)}:${flatten(thing[key])}`;
keys.pop();
}
str += '}';
}
}
}
stringified[index] = str;
return index;
}
const index = flatten(value);
// special case — value is represented as a negative index
if (index < 0) return `${index}`;
return stringified;
}
/**
* @param {any} thing
* @returns {string}
*/
function stringify_primitive(thing) {
const type = typeof thing;
if (type === 'string') return stringify_string(thing);
if (thing === void 0) return UNDEFINED.toString();
if (thing === 0 && 1 / thing < 0) return NEGATIVE_ZERO.toString();
if (type === 'bigint') return `["BigInt","${thing}"]`;
return String(thing);
}

Some files were not shown because too many files have changed in this diff Show More