import{Na as O,Y as N,qe as p}from"./chunk-CUA2BO3S.js";import{a as s,b as i,i as m}from"./chunk-75J4RO44.js";var M=(()=>{let r=class r{cacheKey;cacheResult;buildWarn(n,o){let l=`${n}-${o}`;return this.cacheKey===l&&this.cacheResult?this.cacheResult:(this.cacheResult=this._buildWarn(n,o),this.cacheKey=l,this.cacheResult);}_buildWarn(n,o){let l="\u6B63\u5728\u8655\u7406\u60A8\u7684\u5F71\u7247\u6A94\u3002",E="\u9019\u53EF\u80FD\u9700\u8981\u4E00\u6BB5\u6642\u9593\uFF0C\u5728\u5B8C\u6210\u4E4B\u524D\uFF0C\u67D0\u4E9B\u529F\u80FD\u53EF\u80FD\u7121\u6CD5\u4F7F\u7528\u3002",I="\u806F\u7D61\u60A8\u7684\u7BA1\u7406\u54E1\u4F86\u4FEE\u5FA9\u3002",u="\u60A8\u7684\u7DB2\u8DEF\u700F\u89BD\u5668\u53EF\u80FD\u7121\u6CD5\u64AD\u653E\u5B83\u3002";switch(o){case p.PUBLISHED:case p.LIVE_ENDED:case p.WAITING_FOR_LIVE:return;case p.TO_TRANSCODE:return{title:"\u6B63\u5728\u8F49\u63DB\u7DE8\u78BC",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:""};case p.TO_IMPORT:return{title:"\u6B63\u5728\u532F\u5165",manageMain:"\u6B63\u5728\u532F\u5165\u60A8\u7684\u9060\u7AEF\u5F71\u7247\u3002",manageSecondary:E,watchMain:"\u6B63\u5728\u532F\u5165\u9060\u7AEF\u5F71\u7247\uFF0C\u532F\u5165\u5B8C\u6210\u5F8C\u5373\u53EF\u4F7F\u7528\u3002",watchSecondary:"",routerLink:{text:"\u5BE9\u95B1\u60A8\u7684\u532F\u5165",link:["/my-library/video-imports"],queryParams:{search:`videoId:${n}`}}};case p.TO_IMPORT_FAILED:{let _="\u9060\u7AEF\u5F71\u7247\u532F\u5165\u5931\u6557\uFF0C\u5C07\u7121\u6CD5\u4F7F\u7528\u3002";return{title:"\u532F\u5165\u5931\u6557",manageMain:"\u60A8\u7684\u9060\u7AEF\u5F71\u7247\u532F\u5165\u5931\u6557\u3002",manageSecondary:"",watchMain:_,watchSecondary:"",routerLink:{text:"\u5BE9\u95B1\u60A8\u7684\u532F\u5165",link:["/my-library/video-imports"],queryParams:{search:`videoId:${n}`}}};}case p.TO_MOVE_TO_FILE_SYSTEM:return{title:"\u79FB\u52D5\u5F71\u7247\u6A94\u6848",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:"\u6B63\u5728\u79FB\u52D5\u5F71\u7247\u5230\u6A94\u6848\u7CFB\u7D71\u3002"};case p.TO_MOVE_TO_FILE_SYSTEM_FAILED:{let _="\u5C07\u5F71\u7247\u6A94\u79FB\u52D5\u5230\u5E73\u53F0\u6A94\u6848\u7CFB\u7D71\u5931\u6557\u3002";return{title:"\u79FB\u52D5\u5F71\u7247\u6A94\u5931\u6557",manageMain:_,manageSecondary:I,watchMain:u,watchSecondary:_};}case p.TO_MOVE_TO_EXTERNAL_STORAGE:return{title:"\u79FB\u52D5\u5F71\u7247\u6A94\u6848",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:"\u5F71\u7247\u88AB\u79FB\u52D5\u5230\u5916\u90E8\u5132\u5B58\u7A7A\u9593\u3002"};case p.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED:{let _="\u5C07\u5F71\u7247\u6A94\u79FB\u52D5\u5230\u5916\u90E8\u5132\u5B58\u7A7A\u9593\u5931\u6557\u3002";return{title:"\u79FB\u52D5\u5F71\u7247\u6A94\u5931\u6557",manageMain:_,manageSecondary:I,watchMain:u,watchSecondary:_};}case p.TO_EDIT:return{title:"\u6B63\u5728\u5DE5\u4F5C\u5BA4\u7DE8\u8F2F",manageMain:l,manageSecondary:E,watchMain:u,watchSecondary:""};case p.TRANSCODING_FAILED:return{title:"\u8F49\u63DB\u7DE8\u78BC\u5931\u6557",manageMain:"\u5F71\u7247\u6A94\u6848\u8F49\u63DB\u7DE8\u78BC\u6642\u767C\u751F\u932F\u8AA4",manageSecondary:I,watchMain:u,watchSecondary:""};default:return o;}}};m(r,"\u0275fac",function(o){return new(o||r)();}),m(r,"\u0275prov",N({token:r,factory:r.ɵfac}));let e=r;return e;})();var h=e=>typeof e.id=="string"&&typeof e.from=="number"&&typeof e.to=="number"&&typeof e.text=="string",T=e=>!e||/^\s*$/.test(e),c={ID:"ID",TIME_LINE:"TIME_LINE",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},d=e=>{let r=e.split(":"),t,n,o;return r.length===2?[n,o]=r:[t,n,o]=r,parseInt(o.replace(",",""),10)+parseInt(n,10)*60*1e3+(t?parseInt(t,10):0)*60*60*1e3;},S=()=>({start(e){let r=c.ID,t={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;r!==c.FINISH;){let n=this[r](t);t=n.params,r=n.next;}return t.result;},[c.ID](e){let{tokens:r,pos:t,current:n}=e;if(r.length<=t)return{next:c.FINISH,params:e};if(T(r[t]))return{next:c.ID,params:i(s({},e),{pos:t+1})};let o=r[t].includes("-->");return n.id=o?"":r[t],{next:c.TIME_LINE,params:i(s({},e),{current:n,tokens:r,pos:o?t:t+1})};},[c.TIME_LINE](e){let{tokens:r,pos:t,current:n}=e,o=r[t],[l,E]=o.split("-->");return n.from=d(l),n.to=d(E),{next:c.TEXT,params:i(s({},e),{current:n,pos:t+1})};},[c.TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t?{next:c.FINISH,params:e}:(n.text=r[t],{next:c.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[c.MULTI_LINE_TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t||T(r[t])?{next:c.FIN_ENTRY,params:e}:(n.text=`${n.text}
${r[t]}`,{next:c.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[c.FIN_ENTRY](e){let{pos:r,current:t,result:n}=e;if(h(t))n.push(t);else throw new Error(`Parsing error current not complete ${JSON.stringify(t)}`);return{next:c.ID,params:i(s({},e),{current:{},pos:r+1})};},[c.FINISH](e){return{next:c.FINISH,params:e};}}),f=e=>({entries:S().start(e)}),a={HEADER:"HEADER",ID:"ID",TIME_LINE:"TIME_LINE",ID_OR_NOTE_OR_STYLE_OR_REGION:"ID_OR_NOTE_OR_STYLE_OR_REGION",STYLE:"STYLE",NOTE:"NOTE",REGION:"REGION",LEGACY_HEADER:"LEGACY_HEADER",TEXT:"TEXT",MULTI_LINE_TEXT:"MULTI_LINE_TEXT",FIN_ENTRY:"FIN_ENTRY",FINISH:"FINISH"},R=e=>{let r=e.split(":"),t,n,o;return r.length===2?[n,o]=r:[t,n,o]=r,parseInt(o.replace(".",""),10)+parseInt(n,10)*60*1e3+(t?parseInt(t,10):0)*60*60*1e3;},x=()=>({start(e){let r=a.HEADER,t={tokens:e.split(/\n/),pos:0,result:[],current:{}};for(;r!==a.FINISH;){let n=this[r](t);t=n.params,r=n.next;}return t.result;},[a.HEADER](e){return{next:a.LEGACY_HEADER,params:i(s({},e),{pos:e.pos+1})};},[a.LEGACY_HEADER](e){let{tokens:r,pos:t}=e;return r.length<=t?{next:a.FINISH,params:e}:r[t].includes(":")&&!r[t].includes("-->")?{next:a.LEGACY_HEADER,params:i(s({},e),{pos:t+1})}:{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:e};},[a.ID_OR_NOTE_OR_STYLE_OR_REGION](e){let{tokens:r,pos:t}=e;return r.length<=t?{next:a.FINISH,params:e}:T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:r[t].toUpperCase().includes("NOTE")?{next:a.NOTE,params:e}:r[t].toUpperCase().includes("STYLE")?{next:a.STYLE,params:e}:r[t].toUpperCase().includes("REGION")?{next:a.REGION,params:e}:{next:a.ID,params:e};},[a.STYLE](e){let{tokens:r,pos:t}=e;return T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:{next:a.STYLE,params:i(s({},e),{pos:t+1})};},[a.NOTE](e){let{tokens:r,pos:t}=e;return T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:{next:a.STYLE,params:i(s({},e),{pos:t+1})};},[a.REGION](e){let{tokens:r,pos:t}=e;return T(r[t])?{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{pos:t+1})}:{next:a.REGION,params:i(s({},e),{pos:t+1})};},[a.ID](e){let{tokens:r,pos:t,current:n}=e;if(r.length<=t)return{next:a.FINISH,params:e};if(T(r[t]))return{next:a.ID,params:i(s({},e),{pos:t+1})};let o=r[t].includes("-->");return n.id=o?"":r[t],{next:a.TIME_LINE,params:i(s({},e),{current:n,tokens:r,pos:o?t:t+1})};},[a.TIME_LINE](e){let{tokens:r,pos:t,current:n}=e,o=r[t],[l,E]=o.split("-->");return n.from=R(l),n.to=R(E),{next:a.TEXT,params:i(s({},e),{current:n,pos:t+1})};},[a.TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t?{next:a.FINISH,params:e}:(n.text=r[t],{next:a.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[a.MULTI_LINE_TEXT](e){let{tokens:r,pos:t,current:n}=e;return r.length<=t||T(r[t])?{next:a.FIN_ENTRY,params:e}:(n.text=`${n.text}
${r[t]}`,{next:a.MULTI_LINE_TEXT,params:i(s({},e),{current:n,pos:t+1})});},[a.FIN_ENTRY](e){let{pos:r,current:t,result:n}=e;if(h(t))n.push(t);else throw new Error(`Parsing error current not complete ${JSON.stringify(t)}`);return{next:a.ID_OR_NOTE_OR_STYLE_OR_REGION,params:i(s({},e),{current:{},pos:r+1})};},[a.FINISH](e){return{next:a.FINISH,params:e};}}),g=e=>({entries:x().start(e)}),F=e=>e.startsWith("WEBVTT")?g(e):f(e);var z=(()=>{let r=class r{transform(n){let o=Math.floor(n/3600),l=Math.floor(n%3600/60),E=n%60;if(o>0){let I=""+o+"h";return l!==0&&(I+=" "+(""+l+"\u5206\u9418")),E!==0&&(I+=" "+(""+E+"\u79D2")),I;}if(l>0){let I=""+l+"\u5206\u9418";return E!==0&&(I+=` ${E}sec`),I;}return""+E+" \u79D2\n        ";}};m(r,"\u0275fac",function(o){return new(o||r)();}),m(r,"\u0275pipe",O({name:"myTimeDurationFormatter",type:r,pure:!0}));let e=r;return e;})();export{M as a,F as b,z as c};/**i18n:42440f0a8726af1836b15b193adfd3f46a3ecd983a1ed2a1e05982c4f600c8a1*///# sourceMappingURL=chunk-4E6CTLK6.js.map