import{a as P,b as w,c as M}from"./chunk-VTO2HCZN.js";import{a as E}from"./chunk-JEVXVWBJ.js";import{a as n}from"./chunk-BQ5TNB4S.js";import"./chunk-VY7URCCF.js";import"./chunk-HNYWPJQG.js";import"./chunk-ECGNRZAO.js";import"./chunk-G6JMM6YH.js";import"./chunk-THGGAECT.js";import{c as F,g as C,h as A}from"./chunk-QLOAR54U.js";import"./chunk-XOTV7GJG.js";import"./chunk-DVYB3SDD.js";import"./chunk-Y7Q577DU.js";import"./chunk-TLSMBXOV.js";import"./chunk-PCNKN7TU.js";import"./chunk-7WRF56BE.js";import"./chunk-6QI3LCLL.js";import"./chunk-G3J3JU5I.js";import"./chunk-RWFRRD6F.js";import"./chunk-JF6CNN2A.js";import"./chunk-6FPHKDDK.js";import"./chunk-2IPYKLQX.js";import"./chunk-I5ANGE3H.js";import"./chunk-UIX23F7I.js";import"./chunk-J3MTDSU3.js";import{c as O}from"./chunk-SGCHCWLM.js";import"./chunk-76SWT53P.js";import"./chunk-KYFYXE3K.js";import"./chunk-XSS37KCJ.js";import"./chunk-BJVL6ZJ5.js";import"./chunk-MBQWFBKS.js";import"./chunk-4GSKMGEL.js";import"./chunk-XU6VXSM7.js";import"./chunk-F3H57332.js";import"./chunk-VI342OHG.js";import"./chunk-DEGXQ3R2.js";import"./chunk-5TE7477A.js";import"./chunk-VQCVCUXF.js";import"./chunk-PR244PNT.js";import"./chunk-MS2CS6MN.js";import"./chunk-KLZQNCJY.js";import"./chunk-7JTNILXC.js";import"./chunk-CUOYDGDO.js";import"./chunk-TTJW756Y.js";import{Da as S,Db as T,L as p,Na as f,Oh as I,R as u,T as m,ba as o,jh as k,mb as b,n as l,nb as v,ob as h,oh as y,pb as g,yh as _,zh as V}from"./chunk-NY4TI4KT.js";import{a as c,b as a,i as d}from"./chunk-IQVXR75E.js";var R=(()=>{let r=class r{authService=o(k);userSubscription=o(n);hooks=o(I);videoService=o(O);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Manage",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(),u(()=>this.scopedTokensService.getScopedTokens()),m(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",f({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="\u0645\u0642\u0627\u0637\u0639 \u0641\u064A\u062F\u064A\u0648 \u0645\u0646 \u0627\u0634\u062A\u0631\u0627\u0643\u0627\u062A\u0643",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(v(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),i&2&&(S(2),b("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,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"\u0627\u0643\u062A\u0634\u0641 \u0641\u064A\u062F\u064A\u0648\u0647\u0627\u062A"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(_).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:"\u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643\u0627\u062A"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-B6VPU2R7.js.map