1(self.rspackChunkmono_repo=self.rspackChunkmono_repo||[]).push([[9588],{55732(e,t){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},n=function(t){t||(t={"&":"&","<":"<",">":">","&lrm":"â","&rlm":"â"," ":" "}),this.entities=t,this.parse=function(n,r){n=n.replace(/\0/g,"�");var s=Date.now(),o=0,l=n.split(/\r\n|\r|\n/),f=!1,u=[],c=[],d=[];function p(e,t){d.push({message:e,line:o+1,col:t})}var m=l[o],g=m.length,h="WEBVTT",v=0,b=h.length;for("\uFEFF"===m[0]&&(v=1,b+=1),(g<b||m.indexOf(h)!==0+v||g>b&&" "!==m[b]&&" "!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),o++;""!=l[o]&&void 0!=l[o];){if(p("No blank line after the signature."),-1!=l[o].indexOf("-->")){f=!0;break}o++}for(;void 0!=l[o];){for(;!f&&""==l[o];)o++;if(!f&&void 0==l[o])break;T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var T,x=!0;if(-1==l[o].indexOf("-->")){if(T.id=l[o],/^NOTE($|[ \t])/.test(T.id)){for(o++;""!=l[o]&&void 0!=l[o];)-1!=l[o].indexOf("-->")&&p("Cannot have timestamp in a comment."),o++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var y=[],w=!1;for(o++;""!=l[o]&&void 0!=l[o];)-1!=l[o].indexOf("-->")&&(p("Cannot have timestamp in a style block."),w=!0),y.push(l[o]),o++;if(c.length){p("Style blocks cannot appear after the first cue.");continue}w||u.push(y.join("\n"));continue}if(""==l[++o]||void 0==l[o]){p("Cue identifier cannot be standalone.");continue}if(-1==l[o].indexOf("-->")){x=!1,p("Cue identifier needs to be followed by timestamp.");continue}}f=!1;var O=new i(l[o],p),A=0;if(c.length>0&&(A=c[c.length-1].startTime),x&&!O.parse(T,A)){for(T=null,o++;""!=l[o]&&void 0!=l[o];){if(-1!=l[o].indexOf("-->")){f=!0;break}o++}continue}for(o++;""!=l[o]&&void 0!=l[o];){if(-1!=l[o].indexOf("-->")){p("Blank line missing before cue."),f=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[o],o++}var I=new a(T.text,p,r,t);T.tree=I.parse(T.startTime,T.endTime),c.push(T)}return c.sort(function(e,t){return e.startTime<t.startTime?-1:e.startTime>t.startTime?1:e.endTime>t.endTime?-1:e.endTime<t.endTime?1:0}),{cues:c,errors:d,time:Date.now()-s,styles:u}}},i=function(e,t){var n=/[\u0020\t\f]/,i=/[^\u0020\t\f]/,e=e,a=0,r=function(e){t(e,a+1)};function s(t){for(;void 0!=e[a]&&t.test(e[a]);)a++}function o(t){for(var n="";void 0!=e[a]&&t.test(e[a]);)n+=e[a],a++;return n}function l(){var t,n,i,s,l="minutes";if(void 0==e[a]){r("No timestamp found.");return}if(!/\d/.test(e[a])){r("Timestamp must start with a character in the range 0-9.");return}if(((t=o(/\d/)).length>2||parseInt(t,10)>59)&&(l="hours"),":"!=e[a]){r("No time unit separator found.");return}if(a++,2!=(n=o(/\d/)).length){r("Must be exactly two digits.");return}if("hours"==l||":"==e[a]){if(":"!=e[a]){r("No seconds found or minutes is greater than 59.");return}if(a++,2!=(i=o(/\d/)).length){r("Must be exactly two digits.");return}}else{if(2!=t.length){r("Must be exactly two digits.");return}i=n,n=t,t="0"}if("."!=e[a]){r('No decimal separator (".") found.');return}if(a++,3!=(s=o(/\d/)).length){r("Milliseconds must be given in three digits.");return}if(parseInt(n,10)>59){r("You cannot have more than 59 minutes.");return}if(parseInt(i,10)>59){r("You cannot have more than 59 seconds.");return}return 3600*parseInt(t,10)+60*parseInt(n,10)+parseInt(i,10)+parseInt(s,10)/1e3}this.parse=function(t,o){if(s(n),t.startTime=l(),void 0!=t.startTime){if(t.startTime<o&&r("Start timestamp is not greater than or equal to start timestamp of previous cue."),i.test(e[a])&&r("Timestamp not separated from '-->' by whitespace."),s(n),"-"!=e[a]||"-"!=e[++a]||">"!=e[++a]){r("No valid timestamp separator found.");return}if(a++,i.test(e[a])&&r("'-->' not separated from timestamp by whitespace."),s(n),t.endTime=l(),void 0!=t.endTime)return t.endTime<=t.startTime&&r("End timestamp is not greater than start timestamp."),i.test(e[a]),s(n),function(e,t){for(var i=e.split(n),a=[],s=0;s<i.length;s++)if(""!=i[s]){var o=i[s].indexOf(":"),l=i[s].slice(0,o),f=i[s].slice(o+1);if(-1!=a.indexOf(l)&&r("Duplicate setting."),a.push(l),""==f){r("No value for setting defined.");return}if("vertical"==l){if("rl"!=f&&"lr"!=f){r("Writing direction can only be set to 'rl' or 'rl'.");continue}t.direction=f}else if("line"==l){if(/,/.test(f)){var u=f.split(",");f=u[0];var c=u[1]}if(!/^[-\d](\d*)(\.\d+)?%?$/.test(f)){r("Line position takes a number or percentage.");continue}if(-1!=f.indexOf("-",1)){r("Line position can only have '-' at the start.");continue}if(-1!=f.indexOf("%")&&f.indexOf("%")!=f.length-1){r("Line position can only have '%' at the end.");continue}if("-"==f[0]&&"%"==f[f.length-1]){r("Line position cannot be a negative percentage.");continue}var d=f,p=!1;if("%"==f[f.length-1]&&(p=!0,d=f.slice(0,f.length-1),parseInt(f,10)>100)){r("Line position cannot be >100%.");continue}if(""===d||isNaN(d)||!isFinite(d)){r("Line position needs to be a number");continue}if(void 0!==c){if(!["start","center","end"].includes(c)){r("Line alignment needs to be one of start, center or end");continue}t.lineAlign=c}t.snapToLines=!p,t.linePosition=parseFloat(d),parseFloat(d).toString()!==d&&(t.nonSerializable=!0)}else if("position"==l){if(/,/.test(f)){var u=f.split(",");f=u[0];var m=u[1]}
1if("%"!=f[f.length-1]){r("Text position must be a percentage.");continue}if(parseInt(f,10)>100||0>parseInt(f,10)){r("Text position needs to be between 0 and 100%.");continue}if(""===(d=f.slice(0,f.length-1))||isNaN(d)||!isFinite(d)){r("Line position needs to be a number");continue}if(void 0!==m){if(!["line-left","center","line-right"].includes(m)){r("Position alignment needs to be one of line-left, center or line-right");continue}t.positionAlign=m}t.textPosition=parseFloat(d)}else if("size"==l){if("%"!=f[f.length-1]){r("Size must be a percentage.");continue}if(parseInt(f,10)>100){r("Size cannot be >100%.");continue}var g=f.slice(0,f.length-1);if(void 0===g||""===g||isNaN(g)){r("Size needs to be a number"),g=100;continue}if((g=parseFloat(g))<0||g>100){r("Size needs to be between 0 and 100%.");continue}t.size=g}else if("align"==l){var h=["start","center","end","left","right"];if(-1==h.indexOf(f)){r("Alignment can only be set to one of "+h.join(", ")+".");continue}t.alignment=f}else r("Invalid setting.")}}(e.substring(a),t),!0}},this.parseTimestamp=function(){var t=l();if(void 0!=e[a]){r("Timestamp must not have trailing characters.");return}return t}},a=function(e,t,n,a){this.entities=a;var r=this,e=e,s=0,o=function(e){"metadata"!=n&&t(e,s+1)};this.parse=function(t,l){var f={children:[]},u=f,c=[];function d(e){u.children.push({type:"object",name:e[1],classes:e[2],children:[],parent:u}),u=u.children[u.children.length-1]}for(;void 0!=e[s];){var p=function(){for(var t="data",n="",i="",l=[];void 0!=e[s-1]||0==s;){var f=e[s];if("data"==t){if("&"==f)i=f,t="escape";else if("<"==f&&""==n)t="tag";else{if("<"==f||void 0==f)return["text",n];n+=f}}else if("escape"==t){if("<"==f||void 0==f){let e;return o("Incorrect escape."),(e=i.match(/^&#([0-9]+)$/))?n+=String.fromCharCode(e[1]):r.entities[i]?n+=r.entities[i]:n+=i,["text",n]}if("&"==f)o("Incorrect escape."),n+=i,i=f;else if(/[a-z#0-9]/i.test(f))i+=f;else if(";"==f){let e;(e=i.match(/^&#(x?[0-9]+)$/))?n+=String.fromCharCode("0"+e[1]):r.entities[i+f]?n+=r.entities[i+f]:(e=Object.keys(a).find(e=>i.startsWith(e)))?n+=r.entities[e]+i.slice(e.length)+f:(o("Incorrect escape."),n+=i+";"),t="data"}else o("Incorrect escape."),n+=i+f,t="data"}else if("tag"==t){if(" "==f||"\n"==f||"\f"==f||" "==f)t="start tag annotation";else if("."==f)t="start tag class";else if("/"==f)t="end tag";else if(/\d/.test(f))n=f,t="timestamp tag";else{if(">"==f||void 0==f)return">"==f&&s++,["start tag","",[],""];n=f,t="start tag"}}else if("start tag"==t){if(" "==f||"\f"==f||" "==f)t="start tag annotation";else if("\n"==f)i=f,t="start tag annotation";else if("."==f)t="start tag class";else{if(">"==f||void 0==f)return">"==f&&s++,["start tag",n,[],""];n+=f}}else if("start tag class"==t){if(" "==f||"\f"==f||" "==f)i&&l.push(i),i="",t="start tag annotation";else if("\n"==f)i&&l.push(i),i=f,t="start tag annotation";else if("."==f)i&&l.push(i),i="";else{if(">"==f||void 0==f)return">"==f&&s++,i&&l.push(i),["start tag",n,l,""];i+=f}}else if("start tag annotation"==t){if(">"==f||void 0==f)return">"==f&&s++,["start tag",n,l,i=i.split(/[\u0020\t\f\r\n]+/).filter(function(e){if(e)return!0}).join(" ")];i+=f}else if("end tag"==t){if(">"==f||void 0==f)return">"==f&&s++,["end tag",n];n+=f}else if("timestamp tag"==t){if(">"==f||void 0==f)return">"==f&&s++,["timestamp",n];n+=f}else o("Never happens.");s++}}();if("text"==p[0])u.children.push({type:"text",value:p[1],parent:u});else if("start tag"==p[0]){"chapters"==n&&o("Start tags not allowed in chapter title text.");var m=p[1];"v"!=m&&"lang"!=m&&""!=p[3]&&o("Only <v> and <lang> can have an annotation."),"c"==m||"i"==m||"b"==m||"u"==m||"ruby"==m?d(p):"rt"==m&&"ruby"==u.name?d(p):"v"==m?(function(e){for(var t=u;t;){if("v"==t.name)return!0;t=t.parent}}(0)&&o("<v> cannot be nested inside itself."),d(p),u.value=p[3],p[3]||o("<v> requires an annotation.")):"lang"==m?(d(p),u.value=p[3]):o("Incorrect start tag.")}else if("end tag"==p[0])"chapters"==n&&o("End tags not allowed in chapter title text."),p[1]==u.name?u=u.parent:"ruby"==p[1]&&"rt"==u.name?u=u.parent.parent:o("Incorrect end tag.");else if("timestamp"==p[0]){"chapters"==n&&o("Timestamp not allowed in chapter title text.");var g=new i(p[1],o).parseTimestamp();void 0!=g&&((g<=t||g>=l)&&o("Timestamp must be between start timestamp and end timestamp."),c.length>0&&c[c.length-1]>=g&&o("Timestamp must be greater than any previous timestamp."),u.children.push({type:"timestamp",value:g,parent:u}),c.push(g))}}for(;u.parent;)"v"!=u.name&&o("Required end tag missing."),u=u.parent;return function e(t){let n={...t};return t.children&&(n.children=t.children.map(e)),n.parent&&delete n.parent,n}(f)}},r=function(){function t(e){let t=("00"+1e3*(e-Math.floor(e)).toFixed(3)).slice(-3),n=0,i=0,a=0;return e>=3600&&(n=Math.floor(e/3600)),i=Math.floor((e-3600*n)/60),a=Math.floor(e-3600*n-60*i),(n?n+":":"")+(""+i).padStart(2,"0")+":"+(""+a).padStart(2,"0")+"."+t}this.serialize=function(n,i){var a,r="WEBVTT\n\n";if(i)for(var s=0;s<i.length;s++)r+="STYLE\n"+i[s]+"\n\n";for(var s=0;s<n.length;s++)r+=(void 0!==(a=n[s]).id?a.id+"\n":"")+t(a.startTime)+" --> "+t(a.endTime)+function(t){var n="";let i=Object.keys(e).filter(n=>t[n]!==e[n]);return i.includes("direction")&&(n+=" vertical:"+t.direction),i.includes("alignment")&&(n+=" align:"+t.alignment),i.includes("size")&&(n+=" size:"+t.size+"%"),(i.includes("lineAlign")||i.includes("linePosition"))&&(n+=" line:"+t.linePosition+(t.snapToLines?"":"%")+(t.lineAlign&&t.lineAlign!=e.lineAlign?","+t.lineAlign:"")),(i.includes("textPosition")||i.includes("positionAlign"))&&(n+=" position:"+t.textPosition+"%"+(t.positionAlign&&t.positionAlign!==e.positionAlign?","+t.positionAlign:"")),n}(a)+"\n"+function e(n){for(var i="",a=0;a<n.length;a++){var r=n[a];if("text"==r.type)i+=r.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");else if("object"==r.type){if(i+="<"+r.name,r.classes)for(var s=0;s<r.classes.length;s++)i+="."+r.classes[s];r.value&&(i+=" "+r.value),i+=">",r.children&&(i+=e(r.children)),i+="</"+r.name+">"}else"timestamp"==r.type?i+="<"+t(r.value)+">":i+="<"+r.value+">"}return i}(a.tree.children)+"\n\n";return r}};function s(e){e.WebVTTParser=n,e.WebVTTCueTimingsAndSettingsParser=i,e.WebVTTCueTextParser=a,e.WebVTTSerializer
1=r}"undefined"!=typeof window&&s(window),s(t)}()}}]); 2//# sourceMappingURL=95882b591b933fe944b6.js.map?3.19.9.5ce6b1f8b.1788641030714
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.