import{a as w,b as D,c as R}from"./chunk-EQKJ2FTO.js";import{a as M}from"./chunk-YS36H54Y.js";import{a as d}from"./chunk-WEEVLXNE.js";import"./chunk-GTGWJ4QE.js";import"./chunk-33EXYKGO.js";import"./chunk-FJIOJAKX.js";import"./chunk-OMVYFFZP.js";import{b as P}from"./chunk-RZ76RA6V.js";import"./chunk-OLKW7C4J.js";import{e as F,f as C,h as A}from"./chunk-CED4UL3K.js";import"./chunk-SFJC7Q3Z.js";import"./chunk-BJH42HFS.js";import"./chunk-QQAZFEPL.js";import"./chunk-AAJM7L4L.js";import"./chunk-WRFB4CHD.js";import"./chunk-BPDXZBJG.js";import"./chunk-732QA5Y6.js";import"./chunk-4Y64SOUG.js";import"./chunk-KMAYBES5.js";import"./chunk-IUCE563K.js";import"./chunk-GIVHWFJ3.js";import"./chunk-24MD72MK.js";import"./chunk-SLZ3C4PO.js";import"./chunk-AT3KNCOK.js";import{c as E}from"./chunk-K6LRUFYU.js";import"./chunk-EN3GHNYR.js";import"./chunk-CHNXZAI5.js";import"./chunk-4RAH7ZCY.js";import"./chunk-S3EOECWM.js";import"./chunk-IC23Q2I7.js";import"./chunk-BNV6WX3E.js";import"./chunk-64ZHOV3B.js";import"./chunk-FT4IBESK.js";import"./chunk-CNNMPU7W.js";import"./chunk-UARGXBQG.js";import"./chunk-DZZLGFRO.js";import"./chunk-VRWNGTON.js";import"./chunk-7ST2GVW3.js";import"./chunk-5QNRJ25A.js";import"./chunk-JDNPKJOH.js";import"./chunk-GLU5B42A.js";import"./chunk-CKNOD7HV.js";import"./chunk-7VHQBARM.js";import"./chunk-ZJ7WKAH3.js";import{Da as S,Ea as s,Lb as k,R as p,T as u,Wa as f,Yf as I,aa as m,ba as v,cg as y,db as b,eb as h,fb as g,l,nb as T,pg as V,ug as _,vg as O}from"./chunk-QXV2GR6R.js";import{a as c,b as a,i as e}from"./chunk-JJ4RDTEF.js";var U=(()=>{let r=class r{constructor(i,t,o,L,N){e(this,"authService");e(this,"userSubscription");e(this,"hooks");e(this,"videoService");e(this,"scopedTokensService");e(this,"getVideosObservableFunction",this.getVideosObservable.bind(this));e(this,"getSyndicationItemsFunction",this.getSyndicationItems.bind(this));e(this,"defaultSort","-publishedAt");e(this,"actions",[{routerLink:"/my-library/subscriptions",label:"\u7BA1\u7406",iconName:"cog"}]);e(this,"disabled",!1);e(this,"feedToken");this.authService=i,this.userSubscription=t,this.hooks=o,this.videoService=L,this.scopedTokensService=N;}getVideosObservable(i,t){let o=a(c({},t.toVideosAPIObject()),{videoPagination:i,skipCount:!0});return this.hooks.wrapObsFun(this.userSubscription.getUserSubscriptionVideos.bind(this.userSubscription),o,"common","filter:api.user-subscriptions-videos.videos.list.params","filter:api.user-subscriptions-videos.videos.list.result");}getSyndicationItems(){return this.loadFeedToken().then(()=>{let i=this.authService.getUser();return this.videoService.getVideoSubscriptionFeedUrls(i.account.id,this.feedToken);});}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}loadFeedToken(){if(this.feedToken)return Promise.resolve(this.feedToken);let i=this.authService.userInformationLoaded.pipe(p(()=>this.scopedTokensService.getScopedTokens()),u(t=>this.feedToken=t.feedToken));return l(i);}};e(r,"\u0275fac",function(t){return new(t||r)(s(I),s(d),s(V),s(E),s(y));}),e(r,"\u0275cmp",v({type:r,selectors:[["my-videos-user-subscriptions"]],standalone:!0,features:[k],decls:3,vars:5,consts:()=>{let i;return i="\u767B\u9332\u30C1\u30E3\u30F3\u30CD\u30EB\u304B\u3089\u306E\u52D5\u753B",[i,[1,"visually-hidden"],["displayFilters","false","displayModerationBlock","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(t,o){t&1&&(b(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),t&2&&(S(2),f("getVideosObservableFunction",o.getVideosObservableFunction)("getSyndicationItemsFunction",o.getSyndicationItemsFunction)("defaultSort",o.defaultSort)("disabled",o.disabled)("headerActions",o.actions));},dependencies:[M],encapsulation:2}));let n=r;return n;})();var se=[{path:"",providers:[w,d,P,A,C,F],children:[{path:"overview",component:D,data:{meta:{title:"\u30C7\u30A3\u30B9\u30AB\u30D0\u30FC"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+m(_).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:R,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[O],component:U,data:{meta:{title:"\u767B\u9332\u30C1\u30E3\u30F3\u30CD\u30EB"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{se as default};/**i18n:224bcada6943fe8b17ea60808c2d370cec9507c3bd670ebe71692d099a3befa1*///# sourceMappingURL=chunk-4WYCMLME.js.map