1import{a as u,b as q,c as K,d as Z,e as l,g as ee,h as ie,i as re}from"./chunk-JRJJXDZ6.js";import{a as Y}from"./chunk-EVIWUZNN.js";import"./chunk-GFJIT7GB.js";import{a as p}from"./chunk-T62PPGJ7.js";import"./chunk-WDHWWRFV.js";import"./chunk-OQKV6IAG.js";import"./chunk-UVPC3B5J.js";import"./chunk-64N5RJ22.js";import"./chunk-V5K6NVAV.js";import"./chunk-AI76OAWD.js";import"./chunk-3VVCFCGV.js";import"./chunk-6TRWHIGK.js";import"./chunk-7SKD4YPG.js";import"./chunk-IULRDVRP.js";import"./chunk-L2X7GKGR.js";import"./chunk-25DGWRZN.js";import"./chunk-KFEDPBGU.js";import"./chunk-JIW7VQPX.js";import{a as v}from"./chunk-B6TT5TKK.js";import"./chunk-46KN4MMA.js";import"./chunk-DM6B3VGW.js";import"./chunk-EMDHICXI.js";import"./chunk-WT7UUPYM.js";import"./chunk-B7BTPFQN.js";import"./chunk-ND4GMJSI.js";import"./chunk-7WRF56BE.js";import{a as X}from"./chunk-BTWZOLVD.js";import{a as J}from"./chunk-UUAWMZHV.js";import"./chunk-PHS5R4SY.js";import"./chunk-72XXIMS2.js";import"./chunk-GXA3YMKZ.js";import"./chunk-CJIFKH3B.js";import"./chunk-YMDPP36B.js";import{b as Q,c as $}from"./chunk-RG7KH4LA.js";import"./chunk-IK6BG7XB.js";import"./chunk-SPEPIGSN.js";import"./chunk-DXPZKAMP.js";import"./chunk-CL3DZCLS.js";import"./chunk-PFFSH6Z6.js";import"./chunk-DLT7LQRW.js";import"./chunk-XPG25PO3.js";import"./chunk-KBWWUUW5.js";import"./chunk-K7HMHW3L.js";import"./chunk-ZIOGCVJC.js";import"./chunk-636JIKZA.js";import"./chunk-NFMVL5C6.js";import"./chunk-KFLEEQUN.js";import{E as R,F as _}from"./chunk-P7U3FVME.js";import"./chunk-CZUQPOUG.js";import"./chunk-WACTU4HM.js";import{Af as x,Ba as L,C as E,Gd as H,Hb as g,Kd as O,Na as T,Qh as N,R as S,Rf as k,Tg as B,Z as I,ba as r,jh as W,k as c,l as D,nb as A,o as f,ob as F,s as w,sh as z,vh as m,ye as j,zh as G}from"./chunk-RB2SGB4Z.js";import{i as d,j as U}from"./chunk-IQVXR75E.js";var oe=(()=>{let t=class t{route=r(H);serverService=r(m);notifier=r(B);manageController=r(l);ngOnInit(){let e=this.route.snapshot.data.resolverData,{userChannels:i,userQuota:o,privacies:n,videoEdit:s}=e;this.manageController.setStore({videoEdit:s,userQuota:o,userChannels:i,privacies:n}),this.manageController.setConfig({manageType:"update",serverConfig:this.serverService.getHTMLConfig()});}ngOnDestroy(){this.manageController.cancelUploadIfNeeded();}onVideoUpdated(){this.notifier.success("Video updated.");}onUnload(e){let{text:i,canDeactivate:o}=this.canDeactivate();if(!o)return e.returnValue=i,i;}canDeactivate(){return{canDeactivate:!this.manageController.hasPendingChanges(),text:"You have unsaved changes. Are you sure you want to leave?"};}};d(t,"\u0275fac",function(i){return new(i||t)();}),d(t,"\u0275cmp",T({type:t,selectors:[["my-video-manage"]],hostBindings:function(i,o){i&1&&g("beforeunload",function(s){return o.onUnload(s);},L);},decls:2,vars:0,consts:[[1,"margin-content"],["canUpdate","true","canWatch","true","cancelLink","/my-library/videos",3,"videoUpdated"]],template:function(i,o){i&1&&(A(0,"div",0)(1,"my-video-manage-container",1),g("videoUpdated",function(){return o.onVideoUpdated();}),F()());},dependencies:[R,_,re],encapsulation:2}));let a=t;return a;})();var h=(()=>{let t=class t{router=r(O);videoService=r($);liveVideoService=r(p);authService=r(W);videoCaptionService=r(J);videoChapterService=r(X);videoPasswordService=r(Q);userService=r(N);serverService=r(m);playerSettingsService=r(v);videoEmbedPrivacyService=r(u);resolve(e){let i=e.params.uuid;return this.videoService.getVideo({videoId:i}).pipe(S(o=>w(this.buildObservables(o))),S(Ze=>U(this,[Ze],function*([o,n,s,C,V,y,P,te,ae,b,M]){let ne=yield ee.createFromAPI(this.serverService.getHTMLConfig(),{video:o,captions:C,chapters:V,live:y,videoSource:n,playerSettings:b,videoPasswords:P.map(de=>de.password),embedPrivacy:M});return{video:o,userChannels:s,captions:C,chapters:V,videoSource:n,live:y,videoPasswords:P,userQuota:te,privacies:ae,videoEdit:ne,playerSettings:b,embedPrivacy:M};})),E(o=>(x.error("Cannot fetch video information",o),this.router.navigate(["/401"],{state:{obj:o},skipLocationChange:!0}),D(()=>o))));}buildObservables(e){return[c(e),this.videoService.getSource(e.id),k(this.authService,{includeCollaborations:!0}),this.videoCaptionService.listCaptions(e.uuid).pipe(f(i=>i.data)),this.videoChapterService.getChapters({videoId:e.uuid}).pipe(f(({chapters:i}
1)=>i)),e.isLive?this.liveVideoService.getVideoLive(e.id):c(void 0),e.privacy.id===j.PASSWORD_PROTECTED?this.videoPasswordService.getVideoPasswords({videoUUID:e.uuid}):c([]),this.userService.getMyVideoQuotaUsed(),this.serverService.getVideoPrivacies(),this.playerSettingsService.getVideoSettings({videoId:e.uuid,raw:!0}),this.videoEmbedPrivacyService.getPrivacy({videoId:e.uuid})];}};d(t,"\u0275fac",function(i){return new(i||t)();}),d(t,"\u0275prov",I({token:t,factory:t.ɵfac}));let a=t;return a;})();var qe=[{path:"",component:oe,canActivate:[G],canDeactivate:[z],providers:[l,h,p,q,K,Z,Y,v,u],resolve:{resolverData:h},children:ie}];export{qe as default};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*///# sourceMappingURL=chunk-BYSXBZBD.js.map
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.