(function () { 'use strict'; if (window.__DBC_ABOUT_R11_REFINEMENT__) return; window.__DBC_ABOUT_R11_REFINEMENT__ = true; const allowedAnchors = new Set([ 'overview', 'company-profile', 'scope', 'business-network', 'evidence', 'routes' ]); function isAboutR11() { return document.body?.dataset.v7318AboutLayout === 'scope-footer-r11'; } function currentAnchor() { const id = decodeURIComponent(window.location.hash.replace(/^#/, '')); return allowedAnchors.has(id) ? document.getElementById(id) : null; } let settleTimer = 0; function alignAnchor(markReady) { if (!isAboutR11()) return; const shellReady = document.body.dataset.v7301SharedShell === 'active'; const target = currentAnchor(); if (!target) { if (markReady && shellReady) document.body.dataset.v7318AnchorReady = 'true'; return; } window.requestAnimationFrame(function () { window.requestAnimationFrame(function () { const root = document.documentElement; const previousScrollBehavior = root.style.getPropertyValue('scroll-behavior'); const previousScrollPriority = root.style.getPropertyPriority('scroll-behavior'); root.style.setProperty('scroll-behavior', 'auto', 'important'); target.scrollIntoView({ block: 'start', inline: 'nearest', behavior: 'instant' }); window.requestAnimationFrame(function () { const header = document.querySelector('.site-header'); const headerBox = header?.getBoundingClientRect(); const headerPosition = header ? getComputedStyle(header).position : 'static'; const headerIsVisible = Boolean(headerBox && ['fixed', 'sticky'].includes(headerPosition) && headerBox.top >= -1 && headerBox.bottom > 0); const desiredTop = headerIsVisible ? headerBox.bottom : 0; const delta = target.getBoundingClientRect().top - desiredTop; if (Math.abs(delta) > 1) window.scrollBy({ top: delta, left: 0, behavior: 'instant' }); if (previousScrollBehavior) root.style.setProperty('scroll-behavior', previousScrollBehavior, previousScrollPriority); else root.style.removeProperty('scroll-behavior'); if (markReady && shellReady) document.body.dataset.v7318AnchorReady = 'true'; }); }); }); } function refineFooterContactTone() { if (!isAboutR11()) return; document.querySelectorAll('.formal-site-footer .v7301-footer-identity__copy a').forEach(function (link) { link.style.setProperty('color', 'rgba(235, 243, 247, .74)', 'important'); link.style.setProperty('-webkit-text-fill-color', 'rgba(235, 243, 247, .74)', 'important'); }); } function settle() { refineFooterContactTone(); alignAnchor(false); window.clearTimeout(settleTimer); settleTimer = window.setTimeout(function () { refineFooterContactTone(); alignAnchor(true); }, 180); } function init() { if (!isAboutR11()) return; settle(); const observer = new MutationObserver(function () { if (document.body.dataset.v7301SharedShell !== 'active') return; refineFooterContactTone(); settle(); observer.disconnect(); }); observer.observe(document.body, { attributes: true, attributeFilter: ['data-v7301-shared-shell'] }); window.addEventListener('load', settle, { once: true }); window.addEventListener('hashchange', settle); document.addEventListener('dbc:languagechange', settle); } if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', init, { once: true }); else init(); })();