blank project

This commit is contained in:
root
2025-10-17 20:17:33 +00:00
commit 14b2d53e8e
9366 changed files with 1515019 additions and 0 deletions

82
node_modules/astro/dist/runtime/server/escape.js generated vendored Normal file
View File

@@ -0,0 +1,82 @@
import { escape } from "html-escaper";
import { streamAsyncIterator } from "./util.js";
const escapeHTML = escape;
class HTMLBytes extends Uint8Array {
}
Object.defineProperty(HTMLBytes.prototype, Symbol.toStringTag, {
get() {
return "HTMLBytes";
}
});
class HTMLString extends String {
get [Symbol.toStringTag]() {
return "HTMLString";
}
}
const markHTMLString = (value) => {
if (value instanceof HTMLString) {
return value;
}
if (typeof value === "string") {
return new HTMLString(value);
}
return value;
};
function isHTMLString(value) {
return Object.prototype.toString.call(value) === "[object HTMLString]";
}
function markHTMLBytes(bytes) {
return new HTMLBytes(bytes);
}
function isHTMLBytes(value) {
return Object.prototype.toString.call(value) === "[object HTMLBytes]";
}
function hasGetReader(obj) {
return typeof obj.getReader === "function";
}
async function* unescapeChunksAsync(iterable) {
if (hasGetReader(iterable)) {
for await (const chunk of streamAsyncIterator(iterable)) {
yield unescapeHTML(chunk);
}
} else {
for await (const chunk of iterable) {
yield unescapeHTML(chunk);
}
}
}
function* unescapeChunks(iterable) {
for (const chunk of iterable) {
yield unescapeHTML(chunk);
}
}
function unescapeHTML(str) {
if (!!str && typeof str === "object") {
if (str instanceof Uint8Array) {
return markHTMLBytes(str);
} else if (str instanceof Response && str.body) {
const body = str.body;
return unescapeChunksAsync(body);
} else if (typeof str.then === "function") {
return Promise.resolve(str).then((value) => {
return unescapeHTML(value);
});
} else if (str[Symbol.for("astro:slot-string")]) {
return str;
} else if (Symbol.iterator in str) {
return unescapeChunks(str);
} else if (Symbol.asyncIterator in str || hasGetReader(str)) {
return unescapeChunksAsync(str);
}
}
return markHTMLString(str);
}
export {
HTMLBytes,
HTMLString,
escapeHTML,
isHTMLBytes,
isHTMLString,
markHTMLString,
unescapeHTML
};