import { createElement, createRender } from "../lib/skeleton/index.js"; import { toHref, fromHref } from "../lib/skeleton/router.js"; import { forwardURLParams } from "../lib/path.js"; import rxjs, { effect, applyMutation } from "../lib/rx.js"; import { qs } from "../lib/dom.js"; import t from "../locales/index.js"; import { AjaxError, ApplicationError } from "../lib/error.js"; import "../components/icon.js"; const strToHTML = (str) => str .replaceAll("<", "<") .replaceAll(">", ">") .replaceAll(" ", " "); export default function(render = createRender(qs(document.body, "[role=\"main\"]"))) { return function(err) { const [msg, trace] = processError(err); const link = forwardURLParams(calculateBacklink(fromHref(window.location.pathname)), ["share"]); const $page = createElement(`
${strToHTML(trace)}