import { n as BaseComponent, t as publicDirURL } from "../../../public_dir-C5bujZKB.js"; import { n as htmlEscape } from "../../../helpers-B9BQYaS6.js"; import { dump, themes } from "@poppinss/dumper/html"; var ErrorMetadata = class extends BaseComponent { cssFile = new URL("./error_metadata/style.css", publicDirURL); #primitives = [ "string", "boolean", "number", "undefined" ]; #formatRowValue(value, dumpValue, cspNonce) { if (dumpValue === true) return dump(value, { styles: themes.cssVariables, cspNonce }); if (this.#primitives.includes(typeof value) || value === null) return typeof value === "string" ? htmlEscape(value) : value; return dump(value, { styles: themes.cssVariables, cspNonce }); } #renderRows(rows, cspNonce) { return `
| ${row.key} | ${this.#formatRowValue(row.value, row.dump, cspNonce)} |