{ "version": 3, "sources": ["site/lib/template-resolver.mjs"], "sourcesContent": ["/**\n * template-resolver.mjs - gh#3600: the pure decision points site.js's\n * templateResolver makes, extracted for testability.\n *\n * Consumer: site/site.js's router.templateResolver.\n *\n * Browser-reachable module: NO `node:*` imports (same house rule\n * site/lib/routes.mjs already states - see AGENTS.md \"No top-level\n * `import 'node:*'`\"). Pure functions, plus holdRouteUntilAssets(), which\n * touches only the element it is handed, so a test can pass a stand-in.\n */\n\n/**\n * gh#3565: the real
meta description content for a route. Falls\n * back to the site-wide default for the majority of routes with no\n * authored sitemap.json meta.description, so a client-side nav away from\n * a described route never leaves its description stale on an undescribed\n * one.\n *\n * @param {{ meta?: { description?: string } | null }} route\n * @param {string} defaultDescription\n * @returns {string}\n */\nexport function resolveMetaDescription(route, defaultDescription) {\n return route?.meta?.description || defaultDescription;\n}\n\n/**\n * Which of templateResolver's three branches a route's `template` name\n * resolves to:\n * - 'blank': no template name, or the literal 'blank' - render the\n * fetched content unchanged, no chrome.\n * - 'standalone': the content file is a full HTML document, rendered\n * via an isolated iframe rather than injected into doc-template chrome.\n * - 'doc': everything else - the legacy doc-template path (fetch\n * `site/templates/