PageSourceSearch

https://www.tvagder.no/_next/static/chunks/8008-9ad357ab0dc90277.js

js tvagder.no collected 2026-10-04 17:01:00 UTC 16,428 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8008],{18008:(e,t,r)=>{r.d(t,{Kv:()=>s,eq:()=>h,lY:()=>u,x:()=>T,vb:()=>F,Ow:()=>W,P0:()=>S,w8:()=>k,YS:()=>c,Il:()=>f,ED:()=>o,RV:()=>v,aX:()=>p.aX,RC:()=>p.RC});var i,n=r(46698);function l(e){let t=new Map;if(!e)return t;for(let r of e.split("&")){if(!r)continue;let e=r.indexOf("=");if(e<0){t.set(r,"");continue}t.set(r.slice(0,e),r.slice(e+1))}return t}function a(e){return[...e.entries()].filter(e=>{let[t]=e;return""!==t}).map(e=>{let[t,r]=e;return"".concat(t,"=").concat(r)}).join("&")}function o(e){if(!(null==e?void 0:e.trim()))return e;try{var t;let r=(null==(t=window.location)?void 0:t.href)?window.location.href:"https://invalid.invalid/",i=new URL(e,r),n=i.searchParams.get("cust_params");if(null==n||""===n)return e;let o=function(e){let t=function(e){let t=0,r=0,i=[];for(;t<e.length;){let n=/^(\d+)=/.exec(e.slice(t));if(!n||Number(n[1])!==r){if(0===r)return null;break}let l=e[t+=n[0].length];if(void 0===l)return null;if(i.push(l),r+=1,(t+=1)>=e.length)break;if("&"===e[t]){t+=1;continue}break}return r<11?null:{recovered:i.join(""),rest:e.slice(t)}}(e);if(!t)return e;let{recovered:r,rest:i}=t;return i?"".concat(r,"&").concat(i):r}(n),c=l(o);for(let e of[...c.keys()])"undefined"===c.get(e)&&c.delete(e);let u=a(c);return""===u?i.searchParams.delete("cust_params"):i.searchParams.set("cust_params",u),i.toString()}catch(t){return e}}let c=e=>{let{assetId:t,categoryId:r,duration:i,includeCategoryIdInCustParams:o=!0,origin:c,urlStr:u}=e;if(!u||0===u.length)return u;try{var s,d;let e=new URL(u),n=new URLSearchParams(e.search),p=null!=(s=n.get("description_url"))?s:"";if(/^\[DESCRIPTIONURL\]$/.test(p)){let e="".concat(c,"/api/descriptions/").concat(t);n.set("description_url",e)}n.set("vid_d","".concat(Math.floor(i)));let v=null==r?void 0:r.trim();if(o&&v){let e=null!=(d=n.get("cust_params"))?d:"",t=l(e);t.set("category_id",v),n.set("cust_params",a(t))}return e.search=n.toString(),e.toString()}catch(e){return n.vF.error("Error processing ad tag URL:",u,e),u}},u=e=>{var t,r;let i=null==e||null==(t=e.getAdPodInfo)?void 0:t.call(e),n=null==i||null==(r=i.getTimeOffset)?void 0:r.call(i);return 0===n?"pre":-1===n?"post":"mid"};function s(e){if(!e)return;let t=e.querySelector('[id$="_ima-ad-container"]');t&&(t.querySelectorAll("audio, video").forEach(e=>{e.pause(),e.muted=!0,e.volume=0,e.src=""}),t.remove())}var d=r(83576),p=r(93382);let v=(e,t)=>{var r,i,n;if(!F(e))return;let{ppid:l}=(e=>{let t=null,r=!1;if("string"==typeof e)try{var i,n;let l=d.de.decode(e);(r=(null!=(i=null==l?void 0:l.purposeConsents.size)?i:0)>0||(null!=(n=null==l?void 0:l.vendorConsents.size)?n:0)>0)&&(t=e.slice(0,149))}catch(e){}return null!=t||(t=(0,p.lk)()),{ppid:t,hasSomeConsent:r}})(t["euconsent-v2"]);(null==e||null==(r=e.ima)?void 0:r.settings)&&l&&(null==(i=(n=e.ima.settings).setPpid)||i.call(n,l))};function f(e){try{var t,r,i;let n=null==(t=e.tech)?void 0:t.call(e,{IWillNotUseThisInPlugins:!0}),l=null==n?void 0:n.vhs;if(!(null==l||null==(r=l.playlists)?void 0:r.load))return!1;return l.playlists.load(),"function"==typeof(null==(i=l.playlistController_)?void 0:i.load)&&l.playlistController_.load(),!0}catch(e){return!1}}function h(e){try{var t;let r=null==(t=e.seekable)?void 0:t.call(e);if(!r||0===r.length)return!1;let i=r.length-1,n=r.end(i),l=r.start(0);if(!Number.isFinite(n)||n<=l)return!1;let a=Math.max(l,n-.05);return e.currentTime(a),!0}catch(e){return!1}}var m=r(18702),w=r(89910);let g=parseInt(null!=(i=(0,w.l)("NEXT_PUBLIC_LIVEWRAPPED_TIMEOUT"))?i:"3000",10)||3e3,b=!1;function y(){return!!(0,n.cW)()||"true"===(0,w.l)("NEXT_PUBLIC_LIVEWRAPPED_DISABLE_CMP")}function L(e){try{var t,r;null==(r=window.lwhb)||null==(t=r.disableCmp)||t.call(r),n.vF.debug("LiveWrapped: disableCmp() (".concat(e,")"))}catch(t){n.vF.warn("LiveWrapped: disableCmp failed (".concat(e,")"),{error:t})}}async function _(){var e,t,r;if(!y())return;window.lwhb=null!=(r=window.lwhb)?r:{cmd:[]};let i=Date.now();for(;Date.now()-i<3e3&&"function"!=typeof(null==(e=window.lwhb)?void 0:e.disableCmp);)await new Promise(e=>{requestAnimationFrame(()=>e())});let l=Date.now()-i;"function"==typeof(null==(t=window.lwhb)?void 0:t.disableCmp)?(L("after disableCmp API available"),window.lwhb.cmd.push(()=>{L("cmd backup post-disableCmp")})):(n.vF.warn("LiveWrapped: disableCmp API not available within wait window; queuing late retry",{waitedMs:l}),window.lwhb.cmd.push(()=>{var e;"function"==typeof(null==(e=window.lwhb)?void 0:e.disableCmp)&&L("cmd when disableCmp appeared late")}))}let P=!1,E=!1,U=new Map,I=null,R=new Map,x=(e,t)=>{if(!e||"string"!=typeof e)return e;let r=e;try{if(e.includes("http://")||e.includes("https://")){let r=new URL(e).searchParams.get("iu");if(r)return r;if(e.includes("iu=")){let t=/[?&]iu=([^&]+)/.exec(e);if(null==t?void 0:t[1])return decodeURIComponent(t[1])}try{let e=new URL(t).searchParams.get("iu");if(e)return n.vF.debug("LiveWrapped: Using iu from fallbackUrl",{fallbackIu:e}),e}catch(e){n.vF.warn("Could not parse fallbackUrl to extract iu parameter")}}else if(e.includes("iu=")){var i;r=null!=(i=new URLSearchParams(e.includes("?")?e.split("?")[1]:e).get("iu"))?i:e}}catch(t){if(n.vF.warn("Failed to parse sourceAdUnit, attempting fallback extraction",{error:t}),e.includes("iu=")){let t=/[?&]iu=([^&]+)/.exec(e);(null==t?void 0:t[1])&&(r=decodeURIComponent(t[1]))}}return r},C=new Set(["iu","output"]),S=()=>new Promise((e,t)=>
1{var r;if(!function(){try{let e=new URL(window.location.href);if(e.searchParams.has("lw_debug"))return;let t=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(!t)return;let r=new URLSearchParams(t),i=r.get("lw_debug");if(null==i)return;r.delete("lw_debug"),e.searchParams.set("lw_debug",i);let l=r.toString();e.hash=l?"#".concat(l):"";let a="".concat(e.pathname).concat(e.search).concat(e.hash),o="".concat(window.location.pathname).concat(window.location.search).concat(window.location.hash);if(a===o)return;window.history.replaceState(null,"",a),n.vF.info("LiveWrapped: promoted lw_debug from hash to query",{lw_debug:i,href:a.slice(0,200)})}catch(e){n.vF.warn("LiveWrapped: could not promote lw_debug from hash",{error:e})}}(),!function(){var e;!b&&y()&&(b=!0,window.lwhb=null!=(e=window.lwhb)?e:{cmd:[]},window.lwhb.cmd.push(()=>{L("pre-load cmd queue")}))}(),P&&window.lwhb)return void e();if(E){let r=setInterval(()=>{P&&window.lwhb&&(clearInterval(r),e())},100);setTimeout(()=>{clearInterval(r),t(Error("Script loading timeout"))},5e3);return}E=!0,window.lwhb=null!=(r=window.lwhb)?r:{cmd:[]};let i=(0,w.l)("NEXT_PUBLIC_LIVEWRAPPED_PUBLISHER_ID");if(!i){E=!1,t(Error("LiveWrapped publisher ID not configured"));return}let l=document.createElement("script");l.src="https://lwadm.com/lw/pbjs?pid=".concat(i),l.async=!0,l.crossOrigin="anonymous",l.onload=()=>{P=!0,E=!1,_().catch(e=>{n.vF.warn("LiveWrapped: CMP bypass wait failed",{error:e})}).finally(()=>{n.vF.info("LiveWrapped script loaded successfully"),e()})},l.onerror=()=>{E=!1,t(Error("Failed to load LiveWrapped script"))},document.head.appendChild(l)}),k=(e,t)=>{let r;if(!m.ud)return Promise.resolve(e);let i="".concat(m.RH,"_").concat(t),l=document.getElementById(i);if(!l)return Promise.resolve(e);let a=R.get(i);if(a)return a;let o=new Promise(e=>{r=e});return R.set(i,o),(async()=>{try{let o=(0,w.l)("NEXT_PUBLIC_LIVEWRAPPED_AD_UNIT_NAME"),c=function(e){let t=null==e?void 0:e.trim();if(t)return t.includes("://")||t.startsWith("iu=")||t.includes("gampad/a
1ds")?void n.vF.warn("LiveWrapped: ignoring invalid adUnitName format",{adUnitName:t.slice(0,120)}):t}(o),u=l.getAttribute("style");(()=>{var e;let t=null==(e=l.getBoundingClientRect)?void 0:e.call(l);t&&t.width>0&&t.height>0||l.offsetWidth>0||l.offsetHeight>0||(l.style.position="fixed",l.style.right="0",l.style.bottom="0",l.style.width="1px",l.style.height="1px",l.style.overflow="hidden",l.style.opacity="0.01",l.style.pointerEvents="none")})();let s=function(){try{let e=new URL(window.location.href);if((0,n.cW)()&&e.searchParams.has("lw_debug"))return Math.max(g,15e3)}catch(e){}return g}();n.vF.debug("LiveWrapped: Configuration",{tagId:i,assetId:t,adUnitName:c,timeout:s,timeoutSeconds:s/1e3,fallbackUrl:e,publisherId:(0,w.l)("NEXT_PUBLIC_LIVEWRAPPED_PUBLISHER_ID"),playerElementExists:!!l});let d=!1,p=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"warn",a=arguments.length>2?arguments[2]:void 0;if(!d){d=!0;let o=null!=a?a:e;switch(i){case"error":n.vF.error(t);break;case"warn":n.vF.warn(t);break;default:n.vF.info(t)}clearTimeout(v),null===u?l.removeAttribute("style"):l.setAttribute("style",u),r(o)}},v=setTimeout(()=>{p("LiveWrapped header bidding timeout, using fallback","warn")},s);try{var a;if(!window.lwhb)return void p("LiveWrapped not initialized, using fallback");let t=new Promise((e,t)=>{var r;(null==(r=window.lwhb)?void 0:r.cmd)?window.lwhb.cmd.push(()=>e()):t(Error("lwhb not initialized")),setTimeout(()=>t(Error("LiveWrapped initialization timeout")),5e3)});if(await t,!(null==(a=window.lwhb)?void 0:a.loadAd))return void p("LiveWrapped loadAd not available, using fallback");n.vF.info("LiveWrapped: Starting header bidding for",{fallbackUrl:e});let r=e=>{var t;if((null==(t=window.lwhb)?void 0:t.removeAdUnit)&&"function"==typeof window.lwhb.removeAdUnit)try{window.lwhb.removeAdUnit(e)}catch(t){n.vF.warn("LiveWrapped: Error removing ad unit",{id:e,error:t})}};I&&I!==i&&r(I),r(i),I=i;let l=!1,o=!1,u={...c&&{adUnitName:c},tagId:i,video:{callback:t=>{if(l=!0,!t||"string"!=typeof t||""===t.trim())return void p("LiveWrapped: Received invalid video URL, using fallback","warn");let r=t!==e;r&&U.set(i,t),p("LiveWrapped: Returning ".concat(r?"modified":"original"," URL"),"log",t)},paramsFn:(t,r)=>{var i;o=!0;let l=x(e,e).trim(),a=r&&"string"==typeof r&&""!==r.trim()?r.trim():"",c=l||a||e,u=x(c,e);if(u&&(u.includes("http://")||u.includes("https://"))){n.vF.warn("LiveWrapped: adUnitPath still contains URL, attempting final extraction");let t=/[?&]iu=([^&]+)/.exec(u);if(null==t?void 0:t[1])u=decodeURIComponent(t[1]);else try{let t=new URL(e).searchParams.get("iu");t?(u=t,n.vF.debug("LiveWrapped: Using iu from fallbackUrl as last resort",{adUnitPath:u})):n.vF.error("LiveWrapped: Could not extract valid ad unit path, using original sourceAdUnit")}catch(e){n.vF.error("LiveWrapped: Could not parse fallbackUrl, using original sourceAdUnit")}}let s=null==(i=(0,w.l)("NEXT_PUBLIC_LIVEWRAPPED_VAST_IU_OVERRIDE"))?void 0:i.trim();s&&(u=s,n.vF.debug("LiveWrapped: Using NEXT_PUBLIC_LIVEWRAPPED_VAST_IU_OVERRIDE for iu",{adUnitPath:u})),n.vF.debug("LiveWrapped: Final ad unit path for iu parameter",{adUnitPath:u});let d=function(e){if(!(null==e?void 0:e.trim()))return{};try{var t;let r=(null==(t=window.location)?void 0:t.href)?window.location.href:"https://invalid.invalid/",i=new URL(e,r),n={};return i.searchParams.forEach((e,t)=>{C.has(t.toLowerCase())||(n[t]=e)}),n}catch(e){return{}}}(e);return{adUnit:t,params:{...d,iu:u,output:"vast"}}}}};y()&&L("immediately before loadAd"),window.lwhb.loadAd(u),setTimeout(()=>{l||(n.vF.warn("LiveWrapped: Callback not fired yet after ".concat((s-500)/1e3,"s")),n.vF.warn("LiveWrapped: Callback status - paramsFnCalled: ".concat(o,", callbackFired: ").concat(l)),o&&!l&&n.vF.error("LiveWrapped: PROBLEM - paramsFn was called but callback didn't fire! This suggests an issue with LiveWrapped callback mechanism."))},s-500)}catch(e){p("LiveWrapped header bidding failed: ".concat(String(e)),"error")}}finally{R.delete(i)}})(),o};r(83126);let F=e=>"object"==typeof e&&null!==e&&"ima"in e&&null!==e.ima&&"object"==typeof e.ima&&"settings"in e.ima,T=e=>!!e&&"string"==typeof e&&""!==e.trim(),W=e=>"ima"in e&&"function"==typeof e.ima&&null!==e.ima;r(39022)},39022:(e,t,r)=>{r.d(t,{N5:()=>p,O6:()=>o,Qs:()=>c,VO:()=>s,Xn:()=>d,bb:()=>u});var i=r(18702),n=r(46698),l=r(70006);let a=[.5,1,1.25,1.5,2],o=(e,t)=>{let r=document.createElement("video-js");return r.setAttribute("id","".concat(i.RH,"_").concat(t)),r.setAttribute("webkit-playsinline","true"),r.setAttribute("x5-playsinline","true"),r.classList.add("vjs-default-skin","vjs-big-play-centered","video-js-wrapper"),e.appendChild(r),r},c=e=>{let{playback:t,poster:r,shouldAutoplay:i,shouldMute:n,withCredentials:o}
1=e,{isAndroid:c,isFirefox:u,isIPadChrome:s,isSafari:d}=(0,l.GX)();return{autoplay:i,controls:!0,muted:n,poster:r,preload:"auto",html5:{vhs:{withCredentials:o,overrideNative:!d,enableLowInitialPlaylist:!0,limitRenditionByPlayerDimensions:!0,smoothQualityChange:!0,useBandwidthFromLocalStorage:!0,bandwidth:{default:2e6,min:5e5,max:2e7},liveBackBufferLength:30,liveSyncDurationCount:3,liveMaxLatencyDurationCount:6,maxMaxBufferLength:60,maxBufferLength:60,maxBufferSize:12e7,backBufferLength:60,...s&&{overrideNative:!1,useNativeHlsOnSafari:!0,enableLowInitialPlaylist:!1},handleManifestRedirects:!0,experimentalBufferBasedABR:!0,maxRetries:3,retryInterval:1e3},nativeAudioTracks:!0,nativeVideoTracks:!0,nativeTextTracks:!u},playsinline:!0,liveui:!0,...c&&{suppressNotSupportedError:!0},liveTracker:{liveTolerance:60,trackingThreshold:0,liveSyncDurationCount:3},...!t.isLive&&{playbackRates:a},enableSmoothSeeking:!0,controlBar:{children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","seekToLive","progressControl","LiveIndicator","playbackRateMenuButton","pictureInPictureToggle","fullscreenToggle"]},inactivityTimeout:3e3}},u=(e,t)=>{t&&t(()=>{if(e&&!e.isDisposed()){var t;e.pause(),e.currentTime(0),null==(t=e.play)||t.call(e)}})},s=(e,t)=>{t&&t(()=>{if(e&&!e.isDisposed()){var t;let r=null==(t=e.play)?void 0:t.call(e);r&&"function"==typeof r.catch&&r.catch(e=>{n.vF.error("Playback failed:",e)})}})},d=(e,t)=>{t&&t(()=>{e&&!e.isDisposed()&&e.pause()})},p=e=>{e&&!e.isDisposed()&&e.dispose()}},83126:(e,t,r)=>{r.d(t,{MR:()=>l,XD:()=>a,hq:()=>c,lO:()=>o});let i={latencyHighBufferSec:45,latencySpikeSkipSec:2,tolerancePostMs:1e4,tolerancePreMs:500},n=(e,t)=>{if(void 0===e||""===e)return t;let r=Number(e);return Number.isFinite(r)&&r>=0?r:t},l=e=>({latencyHighBufferSec:n(e("NEXT_PUBLIC_MIDROLL_LATENCY_HIGH_BUFFER_SEC"),i.latencyHighBufferSec),latencySpikeSkipSec:n(e("NEXT_PUBLIC_MIDROLL_LATENCY_SPIKE_SKIP_SEC"),i.latencySpikeSkipSec),tolerancePostMs:n(e("NEXT_PUBLIC_MIDROLL_CUE_TOLERANCE_POST_MS"),i.tolerancePostMs),tolerancePreMs:n(e("NEXT_PUBLIC_MIDROLL_CUE_TOLERANCE_PRE_MS"),i.tolerancePreMs)}),a=e=>{try{var t;let r=e.liveTracker;if((null==r?void 0:r.seekableEnd)&&"function"==typeof r.seekableEnd){let t=r.seekableEnd(),i=e.currentTime();if("number"==typeof i&&Number.isFinite(t)&&Number.isFinite(i))return Math.max(0,t-i)}let i=null==(t=e.seekable)?void 0:t.call(e);if(i&&i.length>0){let t=i.length-1,r=i.end(t),n=e.currentTime();if("number"==typeof n&&Number.isFinite(r)&&Number.isFinite(n))return Math.max(0,r-n)}}catch(e){}return null},o=e=>{let{bufferAheadSec:t,cfg:r,cueStartMs:i,programTimeAtPlayheadMs:n}=e,l=r.tolerancePreMs;null!=t&&t>r.latencyHighBufferSec&&(l=0);let a=i+r.tolerancePostMs;return n>=i-l&&n<=a},c=(e,t,r)=>null!=e&&null!=t&&t-e>r},93382:(e,t,r)=>{r.d(t,{RC:()=>o,T8:()=>c,aX:()=>a,lk:()=>l});var i=r(46698);let n="generated_ppid",l=()=>{let e=localStorage.getItem(n);if(e)return e;let t=("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.floor(16*Math.random());return("x"===e?t:3&t|8).toString(16)})).replace(/[^a-zA-Z0-9_-]/g,"-").slice(0,150);return localStorage.setItem(n,t),t},a=(e,t)=>{try{let r=null!=t?t:document;[".video-js .vjs-progress-control .vjs-slider",".vjs-slider-horizontal .vjs-volume-level"].forEach(t=>{let i=r.querySelector(t);i&&i.setAttribute("style","color: ".concat(e))})}catch(e){i.vF.error("Error setting primary color:",e)}},o=e=>{try{let t=document.querySelector(".videojs-watermark");t&&t.setAttribute("style","display: ".concat(e?"block":"none"))}catch(t){i.vF.error("Error ".concat(e?"showing":"hiding"," watermark:"),t)}},c=(e,t)=>{if(!e)return"";try{let r,i=document.querySelector(".vjs-poster");if(!i)return e;try{r=new URL(e)}catch(i){let t=window.location.origin;r=new URL(e.startsWith("/")?e:"/".concat(e),t)}
1let n=new URLSearchParams(r.search);return t?(n.delete("height"),n.delete("width")):(n.set("height","".concat(i.clientHeight)),n.set("width","".concat(i.clientWidth))),r.search=n.toString(),r.toString()}catch(t){return i.vF.warn("Failed to build poster URL:",t),e}}}}]);

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.