import{a as P,b as w,c as M}from"./chunk-I4LQEL5K.js";import{a as E}from"./chunk-HAXQUQPC.js";import{a as n}from"./chunk-CIHRSK63.js";import"./chunk-M43MAZ46.js";import"./chunk-JFKTOPFE.js";import{b as O}from"./chunk-VTGWPHGG.js";import"./chunk-QYG3EDYX.js";import{d as F,h as C,i as A}from"./chunk-PVME3T23.js";import"./chunk-6RZMUNIQ.js";import"./chunk-VC3IPOUZ.js";import"./chunk-XC756HNT.js";import"./chunk-GA7JLXKU.js";import"./chunk-TR7AJ4WV.js";import"./chunk-WZOGW2OD.js";import"./chunk-VRO3Z5VC.js";import"./chunk-WWFCCJOU.js";import"./chunk-T4JA5BL2.js";import"./chunk-MKXIF6QB.js";import{c as I}from"./chunk-BNSJSB3D.js";import"./chunk-VKK7FN63.js";import"./chunk-WVR4737I.js";import"./chunk-RKCRS6MC.js";import"./chunk-6DNEQXKR.js";import"./chunk-ED4UAIKY.js";import"./chunk-LNTGKWFV.js";import"./chunk-VNDV45NT.js";import"./chunk-AUMGG4VE.js";import"./chunk-CSWWX6VG.js";import"./chunk-7J75J5V7.js";import"./chunk-3LMVOEF6.js";import"./chunk-OZ2SBVFL.js";import"./chunk-4JHGSLT3.js";import"./chunk-4DFVOHX4.js";import"./chunk-DU6I2EOK.js";import"./chunk-KWSV4WGL.js";import"./chunk-NHSA3A3A.js";import"./chunk-TUOBROKP.js";import"./chunk-XALFHPFV.js";import"./chunk-DD6NLQ2H.js";import"./chunk-BPXORWWQ.js";import"./chunk-VUHOGLVJ.js";import"./chunk-N222QCTS.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-A3ION7ZA.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:"\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435",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="\u0412\u0438\u0434\u0435\u043E \u0432\u0430\u0448\u0438\u0445 \u043F\u043E\u0434\u043F\u0438\u0441\u043E\u043A",[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:"\u041E\u0431\u0437\u043E\u0440 \u0432\u0438\u0434\u0435\u043E"},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:"\u041F\u043E\u0434\u043F\u0438\u0441\u043A\u0438"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:1cf7c077143c4c267fdafbe5508f191afcef21bad6aba22a3a8dc180e1003753*///# sourceMappingURL=chunk-F5OY7T6D.js.map