import{a as P,b as w,c as M}from"./chunk-I4PW6FOK.js";import{a as E}from"./chunk-7HUSKXMD.js";import{a as n}from"./chunk-54ARBDSQ.js";import"./chunk-PSQQLL6L.js";import"./chunk-UPU23J34.js";import{b as O}from"./chunk-4TSRGP4O.js";import"./chunk-F5VSJKNH.js";import{d as F,h as C,i as A}from"./chunk-67ZQBBNS.js";import"./chunk-NEQNDP4X.js";import"./chunk-7SZZZYED.js";import"./chunk-SQUGPRYV.js";import"./chunk-X5NK5L7T.js";import"./chunk-HRCF6Z36.js";import"./chunk-M7Y4FZWI.js";import"./chunk-QRSSOSSE.js";import"./chunk-LMK47KGF.js";import"./chunk-UQUYPKIO.js";import"./chunk-RFQGMFNI.js";import{c as I}from"./chunk-7T4LIDV5.js";import"./chunk-36HZBC22.js";import"./chunk-VDLGCIJ4.js";import"./chunk-RKCRS6MC.js";import"./chunk-JVF7SXRU.js";import"./chunk-OXO64LAT.js";import"./chunk-D47LWG56.js";import"./chunk-LYGPBVAF.js";import"./chunk-AUMGG4VE.js";import"./chunk-VCCY44XO.js";import"./chunk-OH4LRFJW.js";import"./chunk-VOWWAETK.js";import"./chunk-72QYE45F.js";import"./chunk-YHF4WJY6.js";import"./chunk-QQO3W6PJ.js";import"./chunk-NPQY7G6R.js";import"./chunk-KSMXYE2L.js";import"./chunk-YGIKG7MC.js";import"./chunk-AVYEW24G.js";import"./chunk-75XCCDXA.js";import"./chunk-VN3YPA5O.js";import"./chunk-HWLEL4TN.js";import"./chunk-B5LZ35ZT.js";import"./chunk-UNKOZF3E.js";import{Ch as k,Dh as V,Ga as m,Q as p,Ra as S,S as u,Sh as _,aa as o,db as v,m as l,mb as b,nb as f,ob as h,oh as T,th as y,wb as g}from"./chunk-WHTWCQ62.js";import{a as c,b as a,i as d}from"./chunk-AI7IVZV2.js";var R=(()=>{let r=class r{authService=o(T);userSubscription=o(n);hooks=o(_);videoService=o(I);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Administrer",iconName:"cog"}];disabled=!1;feedToken;getVideosObservable(e,i){let t=a(c({},i.toVideosAPIObject()),{videoPagination:e,skipCount:!0});return this.hooks.wrapObsFun(this.userSubscription.getUserSubscriptionVideos.bind(this.userSubscription),t,"common","filter:api.user-subscriptions-videos.videos.list.params","filter:api.user-subscriptions-videos.videos.list.result");}getSyndicationItems(){return this.loadFeedToken().then(()=>{let e=this.authService.getUser();return this.videoService.getVideoSubscriptionFeedUrls(e.account.id,this.feedToken);});}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}loadFeedToken(){if(this.feedToken)return Promise.resolve(this.feedToken);let e=this.authService.userInformationLoaded.pipe(p(()=>this.scopedTokensService.getScopedTokens()),u(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",S({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Videoer fra dine abonnementer",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(b(0,"h1",1),g(1,0),f(),h(2,"my-videos-list",2)),i&2&&(m(2),v("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[E],encapsulation:2}));let s=r;return s;})();var te=[{path:"",providers:[P,n,O,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"Oppdag videoer"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(k).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:M,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[V],component:R,data:{meta:{title:"Abonnenter"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:1cf7c077143c4c267fdafbe5508f191afcef21bad6aba22a3a8dc180e1003753*///# sourceMappingURL=chunk-3NUWWB2D.js.map