PageSourceSearch

https://www.aftenposten.no/front-page-assets/_astro/RenderWebCompo…_astro_type_script_index_0_lang.DK9EhGjJ.js

js aftenposten.no collected 2026-09-24 08:28:39 UTC 4,226 bytes, 10 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`86ef0a0c-6b2a-4a3d-98b0-125232ec40b5`,e._sentryDebugIdIdentifier=`sentry-dbid-86ef0a0c-6b2a-4a3d-98b0-125232ec40b5`)}catch{}})();import{t as e}from"./smart-frame.BNuyMLaP.js";import{n as t,t as n}from"./to-friendly.py9BHzJn.js";import{t as r}from"./register.DQiXB4hG.js";var i=class extends HTMLElement{interval=null;timeElement=null;updateFreshState(){if(!this.timeElement||!this.dataset.freshThresholdMs)return;let e=Number(this.dataset.freshThresholdMs),t=new Date(this.timeElement.dateTime).getTime();Number.isFinite(e)&&Number.isFinite(t)&&(this.timeElement.dataset.fresh=(Math.abs(Date.now()-t)<=e).toString())}update(e,r){if(!this.timeElement)throw Error(`No time element found`);let i=this.timeElement.dateTime;if(!i)throw Error(`No timestamp attribute found`);this.updateFreshState();let a=new Date(i).getTime(),o=t(n(a,r,e)),s=this.timeElement.querySelector(`span`);if(s){s.textContent!==o&&(s.textContent=o);return}this.timeElement.textContent!==o&&(this.timeElement.textContent=o)}connectedCallback(){this.timeElement=this.querySelector(`time`);let e=this.options,t=this.locale;this.update(e,t),this.interval=setInterval(()=>this.update(e,t),1e3)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}get options(){let{options:e}=this.dataset;return e?JSON.parse(e):{}}get locale(){return this.dataset.locale}},a=new Set,o=500,s=`0px`,c=()=>window.matchMedia(`(hover: hover) and (pointer: fine)`).matches;function l(e){e instanceof HTMLVideoElement&&e.play(),e?.classList.add(`preview-video-in-screen`)}var u=new Map;function d(e,t=1e3){if(t===0){l(e);return}if(!u.has(e)){let n=setTimeout(()=>l(e),t);u.set(e,n)}}function f(e){u.has(e)&&(clearTimeout(u.get(e)),u.delete(e)),e.classList.remove(`preview-video-in-screen`)}function p(e){let{target:t,isIntersecting:n}=e;n?a.add(t):(a.delete(t),f(t));let[r]=a;d(r,o)}var m=(e=!1)=>e?`img`:`video`,h,g=async e=>{if(e&&e instanceof HTMLVideoElement&&!navigator.userAgent.includes(`Android`)&&h===void 0)try{await e.play(),h=!1}catch{h=!c()}},_=class extends HTMLElement{observer=null;eventController=new AbortController;constructor(){super(),this.attachShadow({mode:`open`})}connectedCallback(){this.observer=new IntersectionObserver(e=>{let[t]=e;if(t.isIntersecting)this.render(),g(this.getMediaElement()).catch(()=>{this.render()});else{let e=this.getMediaElement();if(!e||(e instanceof HTMLVideoElement&&e.pause?.(),!this.shadowRoot))return;this.eventController?.abort(),this.shadowRoot.innerHTML=``}p(t)},{threshold:[.5],rootMargin:s}),this.observer.observe(this)}disconnectedCallback(){this.observer?.disconnect(),this.observer=null,this.eventController?.abort(),a.delete(this)}getMediaElement(){return this.shadowRoot?this.shadowRoot.querySelector(m(h)):null}async render(){let e=Array.from(this.attributes),t=m(h);if(this.eventController=new AbortController,!this.shadowRoot)return;let n=Object.assign(document.createElement(t),{muted:!0,playsInline:!0,autoplay:!0,preload:`auto`,controlsList:`nodownload nofullscreen noremoteplayback`,disableRemotePlayback:!0,disablePictureInPicture:!0,loop:!0}),r=HTMLVideoElement?`play`:`load`,i=this.eventController.signal;n.addEventListener(r,()=>{this.classList.add(`preview-video-loaded`)},{signal:i}),n.setAttribute(`x-webkit-airplay`,`deny`);for(let t of e)n.setAttribute(t.name,t.value);this.shadowRoot.innerHTML=`
2      <style>
3        video, img {
4          width: 100%;
5          height: 100%;
6          object-fit: cover;
7        }
8      </style>
9    `,this.shadowRoot.appendChild(n)}};if(customElements.get(`friendly-timestamp`)||customElements.define(`friendly-timestamp`,i),customElements.get(`preview-video`)||customElements.define(`preview-video`,_),customElements.get(`smart-frame`)||customElements.define(`smart-frame`,e),!customElements.get(`audio-play-button`)){let e=document.getElementById(`web-component-config`),{brand:t}=JSON.parse(e?.textContent??`{}`);r({site:t,dnaStyle:t})}
10//# sourceMappingURL=RenderWebComponent.astro_astro_type_script_index_0_lang.DK9EhGjJ.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.