PageSourceSearch

https://www.tvagder.no/_next/static/chunks/app/%5Blocale%5D/(fulls…?dpl=dpl_Fwf3uTMAPePkbWJTLbNp3q1qdmbr

js tvagder.no collected 2026-10-04 17:00:46 UTC 23,805 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4612],{3392:(e,t,r)=>{"use strict";r.d(t,{x:()=>i});var n=r(64721),o=r(61177);let a=(0,r(13700).F)(["object-cover","inset-0","absolute","h-full","w-full"],{variants:{variant:{top:["bg-fade-top"],bottom:["bg-fade-bottom"],left:["bg-fade-left"],right:["bg-fade-right"],"top-half":["bg-fade-top-half"],"bottom-half":["bg-fade-bottom-half"],"left-half":["bg-fade-left-half"],"right-half":["bg-fade-right-half"]}},defaultVariants:{variant:"bottom"}}),i=e=>{let{className:t,variant:r,...i}=e;return(0,n.jsx)("div",{className:(0,o.cn)(a({variant:r}),t),...i})}},9009:(e,t,r)=>{"use strict";r.d(t,{d:()=>o});var n=r(89910);let o=()=>{let e=(0,n.l)("NEXT_PUBLIC_APP_VERSION");if(e)return e}},23241:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Artwork:()=>l});var n=r(64721),o=r(24581),a=r(47961),i=r(50549);let l=e=>{let{alt:t,fallbackToDefault:r,height:l,location:s="main",onLoadError:c,src:u,title:d,width:p,...f}=e,m=(0,o.$)({source:u,location:s}),[v,h]=(0,i.useState)(m),j=(0,i.useRef)(null);return u&&v?(0,n.jsx)("div",{ref:j,className:"contents",children:(0,n.jsx)(a.default,{...f,title:null!=d?d:t,alt:t,src:v,width:p,height:l,onError:()=>{if(!r||v===u){j.current&&(j.current.className="hidden"),null==c||c();return}h((0,o.$)({source:u}))}})}):null}},25380:(e,t,r)=>{"use strict";r.d(t,{useSubprofiles:()=>m});var n=r(18808),o=r(12615),a=r(42308),i=r(1315),l=r(81385),s=r(89910);let c=i.Ik({subProfileId:i.Yj(),subProfileName:i.Yj(),birthDate:i.Yj().optional(),properties:i.Ik({color:i.Yj().optional()}).optional()}),u=i.Ik({data:i.YO(c).optional()});var d=r(50549),p=r(58595),f=r(73055);let m=()=>{let{jwt:e}=(0,p.useAuthentication)(),t=(0,d.useContext)(f.z);if(!t)throw Error("useSubprofiles must be used within an SubprofileProvider");let{setActiveSubprofile:r,setSubprofileToken:i}=t,c=(0,n.jE)(),m=["subprofiles"],{data:v,error:h,isLoading:j,isFetched:Y}=(0,o.I)({queryKey:m,queryFn:()=>e?(e=>e?(0,l.C)("https://".concat((0,s.l)("NEXT_PUBLIC_TENANT"),".subprofile.cf.").concat((0,s.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/subprofiles"),{method:"GET",headers:{accept:"application/json",authorization:"Bearer ".concat(e)},redirect:"follow"}).then(e=>e.json()).then(e=>{var t;return null!=(t=u.parse(e).data)?t:[]}):Promise.resolve([]))(e):Promise.resolve([]),enabled:!!e}),g=(0,a.n)({mutationFn:async t=>{if(e)return((e,t)=>{let r={method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:"Bearer ".concat(e)},body:JSON.stringify(t),redirect:"follow"};return(0,l.C)("https://".concat((0,s.l)("NEXT_PUBLIC_TENANT"),".subprofile.cf.").concat((0,s.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/subprofiles"),r).then(e=>e.json()).then(e=>e.data)})(e,t)},onSuccess:(e,t)=>{var r;let n=[...null!=(r=c.getQueryData(m))?r:[],t];c.setQueryData(m,n)}}),b=(0,a.n)({mutationFn:async t=>{if(e)return(0,l.C)("https://".concat((0,s.l)("NEXT_PUBLIC_TENANT"),".subprofile.cf.").concat((0,s.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/subprofiles/").concat(t.subProfileId),{method:"DELETE",headers:{accept:"application/json",authorization:"Bearer ".concat(e)},redirect:"follow"})},onSuccess:(e,t)=>{let r=c.getQueryData(m).filter(e=>e.subProfileId!==t.subProfileId);c.setQueryData(m,r)}}),E=(0,a.n)({mutationFn:async t=>{if(e)return((e,t)=>{let r={method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:"Bearer ".concat(e)},body:JSON.stringify(t),redirect:"follow"};return(0,l.C)("https://".concat((0,s.l)("NEXT_PUBLIC_TENANT"),".subprofile.cf.").concat((0,s.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/subprofiles/").concat(t.subProfileId),r).then(e=>e.json()).then(e=>e.data)})(e,t)},onSuccess(e,t){let r=c.getQueryData(m).map(e=>e.subProfileId===t.subProfileId?t:e);c.setQueryData(m,r)}}),I=async n=>{if(!e)return;let o=await (e=>{let{jwt:t,subprofile:r}=e;return(0,l.C)("https://".concat((0,s.l)("NEXT_PUBLIC_TENANT"),".subprofile.cf.").concat((0,s.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/subprofiles/").concat(r.subProfileId,"/token"),{method:"GET",headers:{accept:"application/json",authorization:"Bearer ".concat(t)},redirect:"follow"}).then(e=>e.headers.get("X-Vimond-Subprofile")).then(e=>null!=e?e:"")}
1)({jwt:e,subprofile:n});if("web"===t.app){let e=o.split(".")[1];if(!e)return;let t=new Date(1e3*JSON.parse(atob(e)).exp);t.setMinutes(t.getMinutes()-5);let r=JSON.stringify(n);document.cookie="subprofile=".concat(r,"; path=/; Secure; SameSite=Strict");let a=JSON.stringify(o);document.cookie="subprofile_token=".concat(a,"; path=/; Secure; SameSite=Strict; expires=").concat(t)}if(r(n),i(o),"web"===t.app){let e=new URLSearchParams(window.location.search).get("returnUrl"),t="auth_redirect_url",r=sessionStorage.getItem(t);sessionStorage.removeItem(t);let n="/browse";e&&e.startsWith("/")&&!e.startsWith("//")?n=decodeURIComponent(e):r&&r.startsWith("/")&&!r.startsWith("//")&&(n=r),window.location.replace(n)}};return{...t,setActiveSubprofile:I,subprofiles:v,isSubprofilesLoading:j,isSubprofilesFetched:Y,subprofilesError:h,createSubprofile:g.mutateAsync,deleteSubProfile:b.mutateAsync,updateProfile:E.mutateAsync}}},27443:(e,t,r)=>{"use strict";r.d(t,{z:()=>a});var n=r(15363),o=r(89910);new n.q({max:100,ttl:864e5,ignoreFetchAbort:!0,allowStale:!0});let a=()=>{var e;return(0,o.l)("NEXT_PUBLIC_REVALIDATE_TIME_SECONDS")?parseInt(null!=(e=(0,o.l)("NEXT_PUBLIC_REVALIDATE_TIME_SECONDS"))?e:"60",10):60}},38236:(e,t,r)=>{Promise.resolve().then(r.bind(r,82445)),Promise.resolve().then(r.bind(r,96012)),Promise.resolve().then(r.bind(r,94836)),Promise.resolve().then(r.bind(r,77131)),Promise.resolve().then(r.bind(r,72665)),Promise.resolve().then(r.bind(r,55105)),Promise.resolve().then(r.bind(r,10181)),Promise.resolve().then(r.bind(r,9727)),Promise.resolve().then(r.bind(r,18376)),Promise.resolve().then(r.bind(r,58595)),Promise.resolve().then(r.bind(r,29407))},38969:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(50549);let o=n.forwardRef(function(e,t){let{title:r,titleId:o,...a}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},a),r?n.createElement("title",{id:o},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"}))})},51992:(e,t,r)=>{"use strict";r.d(t,{usePlayback:()=>N});var n=r(12615),o=r(1315),a=r(81385),i=r(89910),l=r(58303),s=r.n(l);let c=o.Ik({headers:o.KC([o.YO(o.bz()),o.g1(o.Yj(),o.bz())]),uri:o.Yj()}),u=o.Ik({uri:o.Yj(),headers:o.Ik({}),certificateUrl:o.Yj().optional()}),d=o.Ik({id:o.Yj(),bitrate:o.ai(),mediaFormat:o.Yj(),mimeType:o.Yj(),manifest:c,drmProxyType:o.Yj().optional(),drm:u.optional()}),p=o.Ik({name:o.Yj(),locale:o.Yj(),audience:o.Yj(),contentType:o.Yj(),url:o.Yj()}),f=o.Ik({buildName:o.Yj(),buildVersion:o.Yj(),countryCode:o.Yj(),deviceId:o.Yj(),deviceOS:o.Yj(),deviceType:o.Yj(),drm:o.Yj(),envPlatform:o.Yj(),envVersion:o.Yj(),pageUrl:o.Yj(),platform:o.Yj(),playerEvent:o.Yj(),playerState:o.Yj(),streamUrl:o.Yj(),userAgent:o.Yj(),videoFormat:o.Yj(),videoProtocol:o.Yj(),viewingSession:o.Yj()}),m=o.Ik({duration:o.ai(),position:o.Yj()}),v=o.Ik({onLiveEdge:o.Yj(),liveResumePossible:o.Yj(),position:o.Yj()}),h=o.Ik({assetId:o.Yj(),categoryId:o.Yj(),title:o.Yj(),assetType:o.Yj(),playbackType:o.Yj(),eventNumber:o.ai(),vod:m.optional(),live:v.optional()}),j=o.Ik({title:o.Yj().optional(),type:o.Yj(),startTime:o.ai(),endTime:o.ai(),images:o.Ik({defaultUrl:o.Yj()}).optional()}),Y=o.Ik({eventName:o.Yj(),originator:o.Yj(),originatorId:o.Yj(),subProfileId:o.Yj(),versions:o.YO(o.Yj()),tenant:o.Yj(),logData:o.Yj(),client:f,progress:h,timestamp:o.Yj(),eventInterval:o.ai()}),g=o.Ik({body:Y,eventInterval:o.ai(),uri:o.Yj()}),b=o.Ik({assetId:o.Yj(),assetTitle:o.Yj(),categoryId:o.Yj(),startTime:o.ai(),endTime:o.ai(),duration:o.ai(),transmissionTime:o.Yj(),isDrmProtected:o.zM(),isLive:o.zM(),recommendedStream:d.optional(),alternativeStreams:o.YO(d).optional(),subtitles:o.YO(p).optional(),playerEventRequest:g.optional(),markers:o.YO(j).optional()}),E=o.Ik({title:o.Yj().optional(),detail:o.Yj().optional(),code:o.Yj().optional()}),I=o.Ik({data:o.YO(b).optional(),errors:o.YO(E).optional()});var T=r(58595),y=r(25380);let N=(e,t,r)=>{var o,l,c;let{jwt:u}=(0,T.useAuthentication)(),{subprofileToken:d}=(0,y.useSubprofiles)(),p=["play",e];u&&p.push(u),d&&p.push(d);let{data:f,error:m,isLoading:v}=(0,n.I)({queryKey:p,queryFn:async()=>await ((e,t,r,n,o)=>{let l=o?o.split(",")[0]:"",c={method:"POST",headers:{"content-type":"application/json",accept:"application/json","user-agent":t,...o&&{"x-forwarded-for":l},...r&&{authorization:"Bearer ".concat(r)},...n&&{"X-Vimond-Subprofile":n}},redirect:"follow",body:JSON.stringify(r?{device:(e=>({label:(e=>{var t,r,n,o,a;let i=s()(e),l=null!=(t=i.device.model)?t:"Unknown",c=null!=(r=i.os.name)?r:"Unknown",u=null!=(n=i.os.version)?n:"Unknown",d=null!=(o=i.browser.name)?o:"Unknown",p=null!=(a=i.browser.version)?a:"Unknown";return"".concat(l," ").concat(c," (").concat(u,") ").concat(d," (").concat(p,")")})(e),udid:(e=>{let t=e.replace(/[^a-z0-9]/gi,"-");return t.length>=36?t.substring(0,36):t.padEnd(36,"-")})(e)}))(t)}:{})};return(0,a.C)("https://".concat((0,i.l)("NEXT_PUBLIC_TENANT"),".play.cf.").concat((0,i.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v2/asset/").concat(e,"/play?extraFields=markers,alternativeStreams,streamsTemplate"),c).then(e=>e.json()).then(e=>I.parse(e))})(e,t,u,d)||null,initialData:r&&{data:[r]},enabled:!!e,refetchOnWindowFocus:!1});return{playback:null==f||null==(o=f.data)?void 0:o[0],error:null!=(c=null==f||null==(l=f.errors)?void 0:l[0])?c:m?{title:null==m?void 0:m.name,code:void 0,dettail:void 0}:void 0,isLoading:v}}},54348:(e,t,r)=>{"use strict";r.d(t,{s:()=>l});var n=r(64721),o=r(61177),a=r(23241),i=r(89910);let l=e=>{let{className:t,fallbackToDefault:r,src:l}=e;return l&&"false"!==(0,i.l)("NEXT_PUBLIC_ARTWORK_LOGO_ENABLED")?(0,n.jsx)(a.Artwork,{src:l,alt:"",location:"thumb",fallbackToDefault:r,width:300,height:200,className:(0,o.cn)("my-3 h-auto max-w-[80%] rounded-md",t)}):null}},56884:(e,t,r)=>{"use strict";r.d(t,{s:()=>n});let n=e=>{let t=Math.floor(e),r=Math.floor(t/3600),n=Math.floor(t%3600/60),o=t%60;return r>0?"".concat(r.toString().padStart(2,"0"),":").concat(n.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0")):"".concat(n.toString().padStart(2,"0"),":").concat(o.toString().padStart(2,"0"))}},60177:(e,t,r)=>{"use strict";r.d(t,{n:()=>n});let n=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-GB",n=Date.now()-new Date(e).getTime(),o=Math.floor(n/6e4),a=Math.floor(o/60);return 0===o?t("relative-time.just-now"):o<60?t(n>0?"relative-time.minutes-ago":"relative-time.minutes-in",{count:Math.abs(o)}):a<24?t(n>0?"relative-time.hours-ago":"relative-time.hours-in",{count:Math.abs(a)}):new Date(e).toLocaleDateString(r,{day:"numeric",month:"short",year:"numeric"}).replace(/\s/g," ")}},62589:(e,t,r)=>{"use strict";r.d(t,{GU:()=>N,Vd:()=>Y,Y:()=>T,qb:()=>y}),r(94106);var n=r(1315),o=r(27443),a=r(89910),i=r(81385);let l=(0,a.l)("NEXT_PUBLIC_PUBLISHER_ID"),s=(0,a.l)("NEXT_PUBLIC_DEFAULT_ASSET_SORT_BY"),c="https://".concat((0,a.l)("NEXT_PUBLIC_TENANT"),".content-discovery.cf.").concat((0,a.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v2/assets"),u=n.Ik({regions:n.YO(n.Yj()),locations:n.YO(n.Yj()),withRegion:n.Yj(),withLocation:n.Yj(),complete:n.Yj()}),d=n.Ik({defaultUrl:n.Yj(),version:n.Yj(),templates:u}),p=n.Ik({start:n.Yj().optional(),platform:n.Yj(),geoExpressions:n.YO(n.Yj())}),f=n.Ik({id:n.Yj(),name:n.Yj(),accessType:n.Yj()}),m=n.Ik({accessType:n.Yj()}),v=n.Ik({path:n.Yj().optional(),link:n.Yj(),id:n.Yj()}),h=n.Ik({available:n.YO(n.Yj()),type:n.Yj()}),j=n.Ik({id:n.Yj(),title:n.Yj().optional(),type:n.Yj(),startTime:n.ai().optional(),endTime:n.ai().optional()}),Y=n.Ik({id:n.Yj(),timestamp:n.Yj(),createTime:n.Yj(),images:d.optional(),content:n.Ik({images:d.optional()}).optional(),category:v,labeledAsFree:n.zM(),drmProtected:n.zM(),duration:n.ai(),assetType:n.Yj(),aspect16x9:n.zM().optional(),isLive:n.zM(),channelNumber:n.ai().optional(),isParent:n.zM(),transmissionTime:n.Yj(),relatedAssets:n.YO(n.L5()),qualities:n.YO(n.L5()).optional(),startTime:n.ai().optional(),endTime:n.ai().optional(),version:h,publishing:p,products:n.YO(f),accessInfo:m.optional(),"publisher-id":n.ai().optional(),"description-short":n.Yj().optional(),description:n.Yj().optional(),title:n.Yj(),labels:n.Yj().optional(),people:n.Yj().optional(),tags:n.Yj().optional(),keywords:n.Yj().optional(),"age-rating":n.Yj().optional(),markers:n.YO(j).optional(),season:n.ai().optional(),episode:n.ai().optional(),adProfile:n.Yj().optional(),"reference-links":n.Yj().optional()}),g=n.Ik({numberOfHits:n.ai(),totalPages:n.ai().optional(),pageSize:n.ai().optional()}),b=n.Ik({self:n.Yj(),first:n.Yj(),last:n.Yj()}),E=n.Ik({title:n.Yj(),detail:n.Yj(),code:n.Yj()}
1),I=n.Ik({data:n.YO(Y).optional(),meta:g.optional(),links:b.optional(),errors:n.YO(E).optional()}),T=async e=>{let{assetIds:t,locale:r}=e,n={accept:"application/json",...r&&{"Accept-Language":r}};if((null==t?void 0:t.length)===0)return Promise.resolve(void 0);let o="id:(".concat(t.join(" "),")")+(l?" AND publisher-id:".concat(l):"");return(0,i.C)("".concat(c,"?query=").concat(o),{method:"GET",headers:n,redirect:"follow"}).then(e=>e.json()).then(e=>I.parse(e).data)},y=async e=>{let{categoryId:t,includeAssetsFromChildCategories:r,extraQueryClause:n,locale:a,page:u}=e,d={method:"GET",headers:{accept:"application/json",...a&&{"Accept-Language":a}},redirect:"follow",next:{revalidate:(0,o.z)()}},p="query=".concat((r?"category.path:".concat(t):"category.id:".concat(t))+(null!=n?n:"")+(l?" AND publisher-id:".concat(l):""))+"&extraFields=markers"+(s?"&sort=".concat(s):""),f="".concat(c,"?").concat(p);return u.number&&(f+="&page[number]=".concat(u.number)),u.size&&(f+="&page[size]=".concat(u.size)),(0,i.C)(f,d).then(e=>e.json()).then(e=>{var t,r,n,o,a;let i=I.parse(e),l=null!=(n=i.data)?n:[],s=null==(t=i.meta)?void 0:t.totalPages,c=null!=(o=null==(r=i.meta)?void 0:r.pageSize)?o:u.size,d=null!=(a=u.number)?a:1,p=s?d<s:l.length>=u.size;return{assets:l,hasMore:p,totalPages:s,pageSize:c}}).catch(e=>(console.error("Error fetching paginated assets by category",e),{assets:[],hasMore:!1,totalPages:0,pageSize:u.size}))},N=async function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n={accept:"application/json",...t&&{"Accept-Language":t}},o=(0,a.l)("NEXT_PUBLIC_PUBLISHER_ID"),l=(0,a.l)("NEXT_PUBLIC_LIVE_PROGRAMS_CATEGORY_ID"),s="(".concat(e,")")+(o?" AND publisher-id:".concat(o):"");l&&(s+=" AND -category.id:".concat(l));let u=r?encodeURIComponent(s):s;return(0,i.C)("".concat(c,"?query=").concat(u,"&page[size]=50"),{method:"GET",headers:n,redirect:"follow"}).then(e=>e.json()).then(e=>{var t;let r=I.parse(e);return r.errors?(console.error("searchAssets query returned errors",r.errors),[]):null!=(t=r.data)?t:[]})}},65346:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(50549);let o=n.forwardRef(function(e,t){let{title:r,titleId:o,...a}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},a),r?n.createElement("title",{id:o},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))})},73055:(e,t,r)=>{"use strict";r.d(t,{SubprofileProvider:()=>i,z:()=>a});var n=r(64721),o=r(50549);let a=(0,o.createContext)(null),i=e=>{let{app:t,children:r}=e,[i,l]=(0,o.useState)(),[s,c]=(0,o.useState)();return(0,o.useEffect)(()=>{if("web"!==t)return;let e=document.cookie,r=e.split("; ").find(e=>e.startsWith("subprofile")),n=null==r?void 0:r.split("=")[1];c(r&&n?JSON.parse(n):void 0);let o=e.split("; ").find(e=>e.startsWith("subprofile_token")),a=null==o?void 0:o.split("=")[1];l(o&&a?JSON.parse(a):void 0)},[t]),(0,n.jsx)(a.Provider,{value:{app:t,subprofileToken:i,activeSubprofile:s,setSubprofileToken:l,setActiveSubprofile:c,isSelected:!!i},children:r})}},75997:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(50549);let o=n.forwardRef(function(e,t){let{title:r,titleId:o,...a}=e;return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":o},a),r?n.createElement("title",{id:o},r):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.182 16.318A4.486 4.486 0 0 0 12.016 15a4.486 4.486 0 0 0-3.198 1.318M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM9.75 9.75c0 .414-.168.75-.375.75S9 10.164 9 9.75 9.168 9 9.375 9s.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Zm5.625 0c0 .414-.168.75-.375.75s-.375-.336-.375-.75.168-.75.375-.75.375.336.375.75Zm-.375 0h.008v.015h-.008V9.75Z"}))})},79798:(e,t,r)=>{"use strict";r.d(t,{r:()=>I});var n=r(12660),o=r.n(n),a=r(679),i=r.n(a),l=r(50549),s=r(18808),c=r(12615),u=r(42308),d=r(62589),p=r(1315),f=r(81385),m=r(89910);let v=p.Ik({position:p.Yj(),date:p.Yj(),updateTime:p.Yj()}),h=p.Ik({dates:p.YO(p.Yj()),viewCount:p.ai(),updateTime:p.Yj()}),j=p.Ik({assetId:p.Yj(),categoryId:p.Yj(),totalTime:p.Yj(),progress:v.optional(),completed:h.optional()}),Y=p.Ik({title:p.Yj(),detail:p.Yj(),code:p.Yj()}),g=p.Ik({data:p.YO(j).optional(),errors:p.YO(Y).optional()});var b=r(58595),E=r(25380);let I=(e,t)=>{let{viewingProgress:r,isLoadingViewingProgress:n}=(e=>{let{jwt:t}=(0,b.useAuthentication)(),{subprofileToken:r,activeSubprofile:n}=(0,E.useSubprofiles)(),[o,a]=(0,l.useState)([]),i=(0,s.jE)(),p=["progress",null==n?void 0:n.subProfileId],{data:v,error:h,isLoading:j}=(0,c.I)({queryKey:p,refetchOnWindowFocus:!1,queryFn:async()=>{var n;if(!t||!r)return[];let o=await (e=>{let{jwt:t,subprofileToken:r}=e;return(null==t?void 0:t.length)===0?(console.error("No JWT found"),Promise.resolve(void 0)):(null==r?void 0:r.length)===0?(console.error("No subprofile token found"),Promise.resolve(void 0)):"true"!==(0,m.l)("NEXT_PUBLIC_ENABLE_VIEWING_HISTORY")?Promise.resolve([]):(0,f.C)("https://".concat((0,m.l)("NEXT_PUBLIC_TENANT"),".viewing-history.cf.").concat((0,m.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/viewinghistory/progress?maxResults=20&skipOlderThan=P1M"),{method:"GET",headers:{"content-type":"application/json",accept:"application/json",authorization:"Bearer ".concat(t),"X-Vimond-Subprofile":r},redirect:"follow"}).then(e=>e.json()).then(e=>{let t=g.parse(e);if(t.errors){var r;console.error(null==(r=t.errors[0])?void 0:r.detail)}return t.data})})({jwt:t,subprofileToken:r});if(!(null==o?void 0:o.length))return[];let i=null!=(n=null==o?void 0:o.map(e=>e.assetId))?n:[];return a(await (0,d.Y)({assetIds:i,locale:e})),o},enabled:!!t&&!!r}),Y=(0,u.n)({mutationFn:async e=>{if(t&&r)return(e=>{let{jwt:t,subprofileToken:r,assetId:n}=e;return(null==t?void 0:t.length)===0?(console.error("No JWT found"),Promise.resolve(void 0)):(null==r?void 0:r.length)===0?(console.error("No subprofile token found"),Promise.resolve(void 0)):(0,f.C)("https://".concat((0,m.l)("NEXT_PUBLIC_TENANT"),".viewing-history.cf.").concat((0,m.l)("NEXT_PUBLIC_ENVIRONMENT"),".vmnd.tv/api/v1/viewinghistory/").concat(n),{method:"DELETE",headers:{"content-type":"application/json",accept:"application/json",authorization:"Bearer ".concat(t),"X-Vimond-Subprofile":r},redirect:"follow"})})({jwt:t,subprofileToken:r,assetId:e})},onSuccess:(e,t)=>{let r=i.getQueryData(p).filter(e=>e.assetId!==t);i.setQueryData(p,r)}});return(0,l.useEffect)(()=>{(async()=>{await i.invalidateQueries({queryKey:["progress"]}),a(void 0)})()},[r,i]),{viewingProgress:v,assets:o,isLoadingViewingProgress:j,viewingProgressError:h,deleteVideoProgress:Y.mutateAsync}})(t);return(0,l.useMemo)(()=>{var t,a;if(!e)return{isLoadingViewingProgress:n,progress:0};o().extend(i());let l=null==r||null==(a=r.find(t=>t.assetId===e))||null==(t=a.progress)?void 0:t.position;return l?{isLoadingViewingProgress:n,progress:o().duration(l).asSeconds()}:{isLoadingViewingProgress:n,progress:0}},[e,r,n])}},82445:(e,t,r)=>{"use strict";r.d(t,{KilkayaMeta:()=>a});var n=r(64721),o=r(50549);function a(e){let{meta:t}=e;return(0,o.useEffect)(()=>
1{window.k5aMeta=t,setTimeout(()=>{"function"==typeof window.spaReady&&window.spaReady(),document.dispatchEvent(new Event("K5A:SpaReady"))},0)},[t]),(0,n.jsx)("script",{children:"window.k5aMeta = ".concat(JSON.stringify(t),";")})}},96012:(e,t,r)=>{"use strict";r.d(t,{VideoObjectSchemaInjector:()=>o});var n=r(50549);function o(e){let{schema:t}=e;return(0,n.useEffect)(()=>{let e=document.createElement("script");e.id="video-schema",e.type="application/ld+json",e.textContent=JSON.stringify(t);let r=document.getElementById("video-schema");return r&&r.remove(),document.head.appendChild(e),()=>{let e=document.getElementById("video-schema");e&&e.remove()}}),null}},99329:(e,t,r)=>{"use strict";r.d(t,{YQ:()=>o,dh:()=>a});var n=r(50549);function o(e,t,r,o){var a=this,i=(0,n.useRef)(null),l=(0,n.useRef)(0),s=(0,n.useRef)(0),c=(0,n.useRef)(null),u=(0,n.useRef)([]),d=(0,n.useRef)(),p=(0,n.useRef)(),f=(0,n.useRef)(e),m=(0,n.useRef)(!0),v=(0,n.useRef)(),h=(0,n.useRef)();f.current=e;var j="undefined"!=typeof window,Y=!t&&0!==t&&j;if("function"!=typeof e)throw TypeError("Expected a function");t=+t||0;var g=!!(r=r||{}).leading,b=!("trailing"in r)||!!r.trailing,E=!!r.flushOnExit&&b,I="maxWait"in r,T="debounceOnServer"in r&&!!r.debounceOnServer,y=I?Math.max(+r.maxWait||0,t):null,N=(0,n.useMemo)(function(){var e=function(e){var t=u.current,r=d.current;return u.current=d.current=null,l.current=e,s.current=s.current||e,p.current=f.current.apply(r,t)},r=function(e,t){Y&&cancelAnimationFrame(c.current),c.current=Y?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!m.current)return!1;var r=e-i.current;return!i.current||r>=t||r<0||I&&e-l.current>=y},N=function(t){return c.current=null,b&&u.current?e(t):(u.current=d.current=null,p.current)},w=function e(){var o=Date.now();if(g&&s.current===l.current&&P(),n(o))return N(o);if(m.current){var a=t-(o-i.current);r(e,I?Math.min(a,y-(o-l.current)):a)}},P=function(){o&&o({})},k=function(){if(j||T){var o,s=Date.now(),f=n(s);if(u.current=[].slice.call(arguments),d.current=a,i.current=s,E&&!v.current&&(v.current=function(){var e;"hidden"===(null==(e=globalThis.document)?void 0:e.visibilityState)&&h.current.flush()},null==(o=globalThis.document)||null==o.addEventListener||o.addEventListener("visibilitychange",v.current)),f){if(!c.current&&m.current)return l.current=i.current,r(w,t),g?e(i.current):p.current;if(I)return r(w,t),e(i.current)}return c.current||r(w,t),p.current}};return k.cancel=function(){var e=c.current;e&&(Y?cancelAnimationFrame(c.current):clearTimeout(c.current)),l.current=0,u.current=i.current=d.current=c.current=null,e&&o&&o({})},k.isPending=function(){return!!c.current},k.flush=function(){return c.current?N(Date.now()):p.current},k},[g,I,t,y,b,E,Y,j,T,o]);return h.current=N,(0,n.useEffect)(function(){return m.current=!0,function(){var e;E&&h.current.flush(),v.current&&(null==(e=globalThis.document)||null==e.removeEventListener||e.removeEventListener("visibilitychange",v.current),v.current=null),m.current=!1}},[E]),N}function a(e,t,r){var n=void 0===r?{}:r,a=n.leading,i=n.trailing,l=n.flushOnExit;return o(e,t,{maxWait:t,leading:void 0===a||a,trailing:void 0===i||i,flushOnExit:void 0!==l&&l})}}},e=>{e.O(0,[2270,5004,2721,7395,3602,9636,1588,862,1189,7212,7961,1315,5363,1151,8303,4317,1072,2107,6698,7115,3924,8595,4150,6067,5717,4297,7358],()=>e(e.s=38236)),_N_E=e.O()}]);

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.