PageSourceSearch

https://vrew.ai/try/assets/encoder.audio.worker-DPSFqGfj.js

js vrew.ai collected 2026-10-02 05:04:06 UTC 100,042 bytes, 28 lines download raw bytes

1const ln=Symbol("Comlink.proxy"),fa=Symbol("Comlink.endpoint"),da=Symbol("Comlink.releaseProxy"),Ut=Symbol("Comlink.finalizer"),At=Symbol("Comlink.thrown"),un=t=>typeof t=="object"&&t!==null||typeof t=="function",Aa={canHandle:t=>un(t)&&t[ln],serialize(t){const{port1:e,port2:r}=new MessageChannel;return sr(t,e),[r,[r]]},deserialize(t){return t.start(),ha(t)}},ma={canHandle:t=>un(t)&&At in t,serialize({value:t}){let e;return t instanceof Error?e={isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:e={isError:!1,value:t},[e,[]]},deserialize(t){throw t.isError?Object.assign(new Error(t.value.message),t.value):t.value}},fn=new Map([["proxy",Aa],["throw",ma]]);function pa(t,e){for(const r of t)if(e===r||r==="*"||r instanceof RegExp&&r.test(e))return!0;return!1}function sr(t,e=globalThis,r=["*"]){e.addEventListener("message",function a(n){if(!n||!n.data)return;if(!pa(r,n.origin)){console.warn(`Invalid origin '${n.origin}' for comlink proxy`);return}const{id:_,type:s,path:c}=Object.assign({path:[]},n.data),u=(n.data.argumentList||[]).map(Te);let A;try{const C=c.slice(0,-1).reduce((f,I)=>f[I],t),S=c.reduce((f,I)=>f[I],t);switch(s){case"GET":A=S;break;case"SET":C[c.slice(-1)[0]]=Te(n.data.value),A=!0;break;case"APPLY":A=S.apply(C,u);break;case"CONSTRUCT":{const f=new S(...u);A=Pa(f)}break;case"ENDPOINT":{const{port1:f,port2:I}=new MessageChannel;sr(t,I),A=Sa(f,[f])}break;case"RELEASE":A=void 0;break;default:return}}catch(C){A={value:C,[At]:0}}Promise.resolve(A).catch(C=>({value:C,[At]:0})).then(C=>{const[S,f]=Ct(C);e.postMessage(Object.assign(Object.assign({},S),{id:_}),f),s==="RELEASE"&&(e.removeEventListener("message",a),dn(e),Ut in t&&typeof t[Ut]=="function"&&t[Ut]())}).catch(C=>{const[S,f]=Ct({value:new TypeError("Unserializable return value"),[At]:0});e.postMessage(Object.assign(Object.assign({},S),{id:_}),f)})}),e.start&&e.start()}function Ea(t){return t.constructor.name==="MessagePort"}function dn(t){Ea(t)&&t.close()}function ha(t,e){const r=new Map;return t.addEventListener("message",function(n){const{data:_}=n;if(!_||!_.id)return;const s=r.get(_.id);if(s)try{s(_)}finally{r.delete(_.id)}}),$t(t,r,[],e)}function st(t){if(t)throw new Error("Proxy has been released and is not useable")}function An(t){return Me(t,new Map,{type:"RELEASE"}).then(()=>{dn(t)})}const Et=new WeakMap,ht="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(Et.get(t)||0)-1;Et.set(t,e),e===0&&An(t)});function Ca(t,e){const r=(Et.get(e)||0)+1;Et.set(e,r),ht&&ht.register(t,e,t)}function Va(t){ht&&ht.unregister(t)}function $t(t,e,r=[],a=function(){}){let n=!1;const _=new Proxy(a,{get(s,c){if(st(n),c===da)return()=>{Va(_),An(t),e.clear(),n=!0};if(c==="then"){if(r.length===0)return{then:()=>_};const u=Me(t,e,{type:"GET",path:r.map(A=>A.toString())}).then(Te);return u.then.bind(u)}return $t(t,e,[...r,c])},set(s,c,u){st(n);const[A,C]=Ct(u);return Me(t,e,{type:"SET",path:[...r,c].map(S=>S.toString()),value:A},C).then(Te)},apply(s,c,u){st(n);const A=r[r.length-1];if(A===fa)return Me(t,e,{type:"ENDPOINT"}).then(Te);if(A==="bind")return $t(t,e,r.slice(0,-1));const[C,S]=Nr(u);return Me(t,e,{type:"APPLY",path:r.map(f=>f.toString()),argumentList:C},S).then(Te)},construct(s,c){st(n);const[u,A]=Nr(c);return Me(t,e,{type:"CONSTRUCT",path:r.map(C=>C.toString()),argumentList:u},A).then(Te)}});return Ca(_,t),_}function Ta(t){return Array.prototype.concat.apply([],t)}function Nr(t){const e=t.map(Ct);return[e.map(r=>r[0]),Ta(e.map(r=>r[1]))]}const mn=new WeakMap;function Sa(t,e){return mn.set(t,e),t}function Pa(t){return Object.assign(t,{[ln]:!0})}function Ct(t){for(const[e,r]of fn)if(r.canHandle(t)){const[a,n]=r.serialize(t);return[{type:"HANDLER",name:e,value:a},n]}return[{type:"RAW",value:t},mn.get(t)||[]]}function Te(t){switch(t.type){case"HANDLER":return fn.get(t.name).deserialize(t.value);case"RAW":return t.value}}function Me(t,e,r,a){return new Promise(n=>{const _=Oa();e.set(_,n),t.start&&t.start(),t.postMessage(Object.assign({id:_},r),a)})}function Oa(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class z{static _zero=new z(0);_micros;constructor(e){this._micros=e}static fromUS(e){return new z(Math.round(e))}static fromMS(e){return new z(Math.round(e*1e3))}static fromSec(e){return new z(Math.round(e*1e6))}static zero(){return z._zero}static doOverlap(e,r,a,n){return e.lt(n)&&a.lt(r)}get as(){return{us:(e="raw",r)=>z._round(this._micros,e,r),ms:(e="raw",r)=>z._round(this._micros/1e3,e,r),sec:(e="raw",r)=>z._round(this._micros/1e6,e,r)}}lt(e){return this._micros<e._micros}lte(e){return this._micros<=e._micros}gt(e){return this._micros>e._micros}gte(e){return this._micros>=e._micros}eq(e,r=0){return Math.abs(this._micros-e._micros)<=r}add(e){return new z(this._micros+e._micros)}sub(e){return new z(this._micros-e._micros)}mul(e){return new z(Math.round(this._micros*e))}div(e){if(e===0)throw new Error("Division by zero at Time.div");return new z(Math.round(this._micros/e))}mod(e){if(e._micros===0)throw new Error("Division by zero at Time.mod");const r=this._micros%e._micros;return new z(r)}roundTo(e=0){return z.fromUS(this.as.us("round",e))}static compare(e,r){return e._micros-r._micros}static min(...e){if(e.length===0)throw new Error("Time.min requires at least one Time argument");let r=e[0];for(const a of e)a._micros<r._micros&&(r=a);return r}static max(...e){if(e.length===0)throw new Error("Time.max requires at least one Time argument");let r=e[0];for(const a of e)a._micros>r._micros&&(r=a);return r}static _round(e,r,a){if(r==="raw")return e;const n=10**(a??0);switch(r){case"round":return Math.round(e/n)*n;case"floor":return Math.floor(e/n)*n;case"ceil":return Math.ceil(e/n)*n}
1}}const N=(t=g.UNKNOWN_ERR,e,r,a)=>{const n=Bt(e)?e.type:Ia(e)?g.NETWORK_FAILED_ERR:t,_=pn(e)||Bt(e)?e.message:"",s=_?`${_}
2    ${r??""}: ${We(e)}`:`${r??""}: ${We(e)}`,c=Bt(e)&&e.errorArgs!==void 0?e.errorArgs:a;return{__internal:"MediaProcessingError",type:n,message:s,errorArgs:c}},Bt=t=>typeof t=="object"&&t!==null&&"__internal"in t,pn=t=>t instanceof Error,Ra=t=>t instanceof DOMException,Ia=t=>pn(t)&&t.name==="TypeError"&&t.message==="Network request failed",ba=t=>{if(Ra(t))return`DOMException ${t.name}(${t.code}): ${t.message}`;const e=Object.getOwnPropertyNames(t);try{return JSON.stringify(t,e)}catch(r){return`{${e.map(n=>`${n}: ${t[n]}`).join(", ")}} (stringify failed: ${r})`}},We=t=>{switch(typeof t){case"string":return t;case"undefined":return"undefined";case"function":return`function ${t.name}`;case"number":case"bigint":case"symbol":case"boolean":return t.toString();case"object":return t!==null?ba(t):"null"}};class La extends Error{}class Ae extends La{constructor(){super("Zone is an abstract class")}}function He(t){return typeof t>"u"}function ya(){try{return typeof Intl<"u"&&Intl.DateTimeFormat}catch{return!1}}function ga(){return!He(Intl.DateTimeFormat.prototype.formatToParts)}function it(t,e=2){return t.toString().length<e?("0".repeat(e)+t).slice(-e):t.toString()}function En(t){if(!(He(t)||t===null||t===""))return parseInt(t,10)}function Ma(t){if(!(He(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Fa(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function va(t,e,r,a=null){const n=new Date(t),_={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(_.timeZone=a);const s=Object.assign({timeZoneName:e},_),c=ya();if(c&&ga()){const u=new Intl.DateTimeFormat(r,s).formatToParts(n).find(A=>A.type.toLowerCase()==="timezonename");return u?u.value:null}else if(c){const u=new Intl.DateTimeFormat(r,_).format(n);return new Intl.DateTimeFormat(r,s).format(n).substring(u.length).replace(/^[, \u200e]+/,"")}else return null}function hn(t,e){let r=parseInt(t,10);Number.isNaN(r)&&(r=0);const a=parseInt(e,10)||0,n=r<0||Object.is(r,-0)?-a:a;return r*60+n}function Kt(t,e){const r=Math.trunc(t/60),a=Math.abs(t%60),n=r>=0&&!Object.is(r,-0)?"+":"-",_=`${n}${Math.abs(r)}`;switch(e){case"short":return`${n}${it(Math.abs(r),2)}:${it(a,2)}`;case"narrow":return a>0?`${_}:${a}`:_;case"techie":return`${n}${it(Math.abs(r),2)}${it(a,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}const Cn=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;class Vn{get type(){throw new Ae}get name(){throw new Ae}get universal(){throw new Ae}offsetName(e,r){throw new Ae}formatOffset(e,r){throw new Ae}offset(e){throw new Ae}equals(e){throw new Ae}get isValid(){throw new Ae}}const Da=RegExp(`^${Cn.source}$`);let mt={};function wa(t){return mt[t]||(mt[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),mt[t]}const Na={year:0,month:1,day:2,hour:3,minute:4,second:5};function xa(t,e){const r=t.format(e).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r),[,n,_,s,c,u,A]=a;return[s,n,_,c,u,A]}function ka(t,e){const r=t.formatToParts(e),a=[];for(let n=0;n<r.length;n++){const{type:_,value:s}=r[n],c=Na[_];He(c)||(a[c]=parseInt(s,10))}return a}let ct={};class Vt extends Vn{static create(e){return ct[e]||(ct[e]=new Vt(e)),ct[e]}static resetCache(){ct={},mt={}}static isValidSpecifier(e){return!!(e&&e.match(Da))}static isValidZone(e){try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}static parseGMTOffset(e){if(e){const r=e.match(/^Etc\/GMT([+-]\d{1,2})$/i);if(r)return-60*parseInt(r[1])}return null}constructor(e){super(),this.zoneName=e,this.valid=Vt.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get universal(){return!1}offsetName(e,{format:r,locale:a}){return va(e,r,a,this.name)}formatOffset(e,r){return Kt(this.offset(e),r)}offset(e){const r=new Date(e),a=wa(this.name),[n,_,s,c,u,A]=a.formatToParts?ka(a,r):xa(a,r),S=Fa({year:n,month:_,day:s,hour:c===24?0:c,minute:u,second:A,millisecond:0});let f=+r;const I=f%1e3;return f-=I>=0?I:1e3+I,(S-f)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Gt=null;class ve extends Vn{static get utcInstance(){return Gt===null&&(Gt=new ve(0)),Gt}static instance(e){return e===0?ve.utcInstance:new ve(e)}static parseSpecifier(e){if(e){const r=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new ve(hn(r[1],r[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Kt(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,r){return Kt(this.fixed,r)}get universal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}function we(...t){const e=t.reduce((r,a)=>r+a.source,"");return RegExp(`^${e}$`)}function Ne(...t){return e=>t.reduce(([r,a,n],_)=>{const[s,c,u]=_(e,n);return[Object.assign(r,s),a||c,u]},[{},null,1]).slice(0,2)}function Tn(...t){return(e,r)=>{const a={};let n;for(n=0;n<t.length;n++)a[t[n]]=En(e[r+n]);return[a,null,r+n]}}const Sn=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Pn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,9}))?)?)?/,On=RegExp(`${Pn.source}${Sn.source}?`),ir=RegExp(`(?:T${On.source})?`),Ua=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ba=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ga=/(\d{4})-?(\d{3})/,Xa=Tn("weekYear","weekNumber","weekDay"),Ya=Tn("year","ordinal"),za=/(\d{4})-(\d\d)-(\d\d)/,Rn=RegExp(`${Pn.source} ?(?:${Sn.source}|(${Cn.source}))?`),Wa=RegExp(`(?: ${Rn.source})?`);function De(t,e,r){const a=t[e];return He(a)?r:En(a)}function In(t,e){return[{year:De(t,e),month:De(t,e+1,1),day:De(t,e+2,1)},null,e+3]}function xe(t,e){return[{hour:De(t,e,0),minute:De(t,e+1,0),second:De(t,e+2,0),millisecond:Ma(t[e+3])},null,e+4]}function je(t,e){const r=!t[e]&&!t[e+1],a=hn(t[e+1],t[e+2]),n=r?null:ve.instance(a);return[{},n,e+3]}function bn(t,e){const r=t[e]?Vt.create(t[e]):null;return[{},r,e+1]}we(Ua,ir);we(Ba,ir);we(Ga,ir);we(On);Ne(In,xe,je);Ne(Xa,xe,je);Ne(Ya,xe);Ne(xe,je);we(za,Wa);we(Rn);Ne(In,xe,je,bn);Ne(xe,je,bn);const Ln={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}};Object.assign({years:{months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3}},Ln);const J=146097/400,Le=146097/4800;Object.assign({years:{months:12,weeks:J/7,days:J,hours:J*24,minutes:J*24*60,seconds:J*24*60*60,milliseconds:J*24*60*60*1e3},quarters:{months:3,weeks:J/28,days:J/4,hours:J*24/4,minutes:J*24*60/4,seconds:J*24*60*60/4,milliseconds:J*24*60*60*1e3/4}
2,months:{weeks:Le/7,days:Le,hours:Le*24,minutes:Le*24*60,seconds:Le*24*60*60,milliseconds:Le*24*60*60*1e3}},Ln);const xr=(t,e)=>z.fromSec(t/e),Ha=t=>new Promise(e=>setTimeout(e,t)),yn=async(t,e,r,a)=>{let n;for(let _=0;_<=e;_++)try{if(_>0&&n)try{a?.(n,_),await Ha(r(_))}catch{}return await t()}catch(s){n=s}throw n};function kr(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function ja(t){if(Array.isArray(t))return t}function $a(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,_,s,c=[],u=!0,A=!1;try{if(_=(r=r.call(t)).next,e!==0)for(;!(u=(a=_.call(r)).done)&&(c.push(a.value),c.length!==e);u=!0);}catch(C){A=!0,n=C}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(A)throw n}}return c}}function Ka(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qa(t,e){return ja(t)||$a(t,e)||Qa(t,e)||Ka()}function Qa(t,e){if(t){if(typeof t=="string")return kr(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kr(t,e):void 0}}const gn=Object.entries,Ur=Object.setPrototypeOf,Za=Object.isFrozen,Ja=Object.getPrototypeOf,eo=Object.getOwnPropertyDescriptor;let W=Object.freeze,H=Object.seal,Fe=Object.create,Mn=typeof Reflect<"u"&&Reflect,qt=Mn.apply,Qt=Mn.construct;W||(W=function(e){return e});H||(H=function(e){return e});qt||(qt=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),_=2;_<a;_++)n[_-2]=arguments[_];return e.apply(r,n)});Qt||(Qt=function(e){for(var r=arguments.length,a=new Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];return new e(...a)});const ye=B(Array.prototype.forEach),to=B(Array.prototype.lastIndexOf),Br=B(Array.prototype.pop),ge=B(Array.prototype.push),ro=B(Array.prototype.splice),Ee=Array.isArray,ze=B(String.prototype.toLowerCase),Xt=B(String.prototype.toString),Gr=B(String.prototype.match),Xe=B(String.prototype.replace),Xr=B(String.prototype.indexOf),no=B(String.prototype.trim),ao=B(Number.prototype.toString),oo=B(Boolean.prototype.toString),Yr=typeof BigInt>"u"?null:B(BigInt.prototype.toString),zr=typeof Symbol>"u"?null:B(Symbol.prototype.toString),Y=B(Object.prototype.hasOwnProperty),Ye=B(Object.prototype.toString),X=B(RegExp.prototype.test),Ve=_o(TypeError);function B(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,a=new Array(r>1?r-1:0),n=1;n<r;n++)a[n-1]=arguments[n];return qt(t,e,a)}}function _o(t){return function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return Qt(t,r)}}function O(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ze;if(Ur&&Ur(t,null),!Ee(e))return t;let a=e.length;for(;a--;){let n=e[a];if(typeof n=="string"){const _=r(n);_!==n&&(Za(e)||(e[a]=_),n=_)}t[n]=!0}return t}function so(t){for(let e=0;e<t.length;e++)Y(t,e)||(t[e]=null);return t}function $(t){const e=Fe(null);for(const a of gn(t)){var r=qa(a,2);const n=r[0],_=r[1];Y(t,n)&&(Ee(_)?e[n]=so(_):_&&typeof _=="object"&&_.constructor===Object?e[n]=$(_):e[n]=_)}return e}function io(t){switch(typeof t){case"string":return t;case"number":return ao(t);case"boolean":return oo(t);case"bigint":return Yr?Yr(t):"0";case"symbol":return zr?zr(t):"Symbol()";case"undefined":return Ye(t);case"function":case"object":{if(t===null)return Ye(t);const e=t,r=re(e,"toString");if(typeof r=="function"){const a=r(e);return typeof a=="string"?a:Ye(a)}return Ye(t)}default:return Ye(t)}}function re(t,e){for(;t!==null;){const a=eo(t,e);if(a){if(a.get)return B(a.get);if(typeof a.value=="function")return B(a.value)}t=Ja(t)}function r(){return null}return r}function co(t){try{return X(t,""),!0}catch{return!1}}const Wr=W(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Yt=W(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),zt=W(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),lo=W(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Wt=W(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),uo=W(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hr=W(["#text"]),jr=W(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
3spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Ht=W(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$r=W(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),lt=W(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fo=H(/{{[\w\W]*|^[\w\W]*}}/g),Ao=H(/<%[\w\W]*|^[\w\W]*%>/g),mo=H(/\${[\w\W]*/g),po=H(/^data-[\-\w.\u00B7-\uFFFF]+$/),Eo=H(/^aria-[\-\w]+$/),Kr=H(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ho=H(/^(?:\w+script|data):/i),Co=H(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vo=H(/^html$/i),To=H(/^[a-z][.\w]*(-[.\w]+)+$/i),qr=H(/<[/\w!]/g),Qr=H(/<[/\w]/g),So=H(/<\/no(script|embed|frames)/i),Po=H(/\/>/i),Z={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Oo=function(){return typeof window>"u"?null:window},Ro=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let a=null;
vendor: 4,161 bytes, line 3
3const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(a=r.getAttribute(n));const _="dompurify"+(a?"#"+a:"");try{return e.createPolicy(_,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+_+" could not be created."),null}},Zr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},me=function(e,r,a,n){return Y(e,r)&&Ee(e[r])?O(n.base?$(n.base):{},e[r],n.transform):a};function Fn(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Oo();const e=d=>Fn(d);if(e.version="3.4.13",e.removed=[],!t||!t.document||t.document.nodeType!==Z.document||!t.Element)return e.isSupported=!1,e;let r=t.document;const a=r,n=a.currentScript;t.DocumentFragment;const _=t.HTMLTemplateElement,s=t.Node,c=t.Element,u=t.NodeFilter,A=t.NamedNodeMap;A===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const C=t.DOMParser,S=t.trustedTypes,f=c.prototype,I=re(f,"cloneNode"),G=re(f,"remove"),L=re(f,"nextSibling"),y=re(f,"childNodes"),k=re(f,"parentNode"),h=re(f,"shadowRoot"),P=re(f,"attributes"),V=s&&s.prototype?re(s.prototype,"nodeType"):null,j=s&&s.prototype?re(s.prototype,"nodeName"):null,ee=s&&s.prototype?re(s.prototype,"ownerDocument"):null;if(typeof _=="function"){const d=r.createElement("template");d.content&&d.content.ownerDocument&&(r=d.content.ownerDocument)}let T,U="",te,ce=!1,ie=0;const lr=function(){if(ie>0)throw Ve('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Se=function(o){lr(),ie++;try{return T.createHTML(o)}finally{ie--}},kn=function(o){lr(),ie++;try{return T.createScriptURL(o)}finally{ie--}},Un=function(){return ce||(te=Ro(S,n),ce=!0),te},Ke=r,St=Ke.implementation,ur=Ke.createNodeIterator,Bn=Ke.createDocumentFragment,Gn=Ke.getElementsByTagName,Xn=a.importNode;let M=Zr();e.isSupported=typeof gn=="function"&&typeof k=="function"&&St&&St.createHTMLDocument!==void 0;const Yn=fo,zn=Ao,Wn=mo,Hn=po,jn=Eo,$n=ho,fr=Co,Kn=To;let dr=Kr,F=null;const Pt=O({},[...Wr,...Yt,...zt,...Wt,...Hr]);let v=null;const Ot=O({},[...jr,...Ht,...$r,...lt]);let x=Object.seal(Fe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ke=null,Ar=null;const le=Object.seal(Fe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let mr=!0,Rt=!0,pr=!1,Er=!0,ue=!1,fe=!0,he=!1,It=!1,qe=null,Qe=null,bt=!1,Pe=!1,Ze=!1,Je=!1,hr=!0,Cr=!1;const Vr="user-content-";let Lt=!0,et=!1,Oe={},oe=null;const yt=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Tr=null;const Sr=O({},["audio","video","img","source","image","track"]);let gt=null;const Pr=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tt="http://www.w3.org/1998/Math/MathML",rt="http://www.w3.org/2000/svg",_e="http://www.w3.org/1999/xhtml";let Re=_e,Mt=!1,Ft=null;const qn=O({},[tt,rt,_e],Xt),Or=W(["mi","mo","mn","ms","mtext"]);let vt=O({},Or);const Rr=W(["annotation-xml"]);let Dt=O({},Rr);const Qn=O({},["title","style","font","a","script"]);let Ue=null;const Zn=["application/xhtml+xml","text/html"],Jn="text/html";let D=null,Ie=null;const ea=r.createElement("form"),Ir=function(o){return o instanceof RegExp||o instanceof Function},wt=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ie&&Ie===o)return;(!o||typeof o!="object")&&(o={}
vendor: 4,955 bytes, line 3
3),o=$(o),Ue=Zn.indexOf(o.PARSER_MEDIA_TYPE)===-1?Jn:o.PARSER_MEDIA_TYPE,D=Ue==="application/xhtml+xml"?Xt:ze,F=me(o,"ALLOWED_TAGS",Pt,{transform:D}),v=me(o,"ALLOWED_ATTR",Ot,{transform:D}),Ft=me(o,"ALLOWED_NAMESPACES",qn,{transform:Xt}),gt=me(o,"ADD_URI_SAFE_ATTR",Pr,{transform:D,base:Pr}),Tr=me(o,"ADD_DATA_URI_TAGS",Sr,{transform:D,base:Sr}),oe=me(o,"FORBID_CONTENTS",yt,{transform:D}),ke=me(o,"FORBID_TAGS",$({}),{transform:D}),Ar=me(o,"FORBID_ATTR",$({}),{transform:D}),Oe=Y(o,"USE_PROFILES")?o.USE_PROFILES&&typeof o.USE_PROFILES=="object"?$(o.USE_PROFILES):o.USE_PROFILES:!1,mr=o.ALLOW_ARIA_ATTR!==!1,Rt=o.ALLOW_DATA_ATTR!==!1,pr=o.ALLOW_UNKNOWN_PROTOCOLS||!1,Er=o.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ue=o.SAFE_FOR_TEMPLATES||!1,fe=o.SAFE_FOR_XML!==!1,he=o.WHOLE_DOCUMENT||!1,Pe=o.RETURN_DOM||!1,Ze=o.RETURN_DOM_FRAGMENT||!1,Je=o.RETURN_TRUSTED_TYPE||!1,bt=o.FORCE_BODY||!1,hr=o.SANITIZE_DOM!==!1,Cr=o.SANITIZE_NAMED_PROPS||!1,Lt=o.KEEP_CONTENT!==!1,et=o.IN_PLACE||!1,dr=co(o.ALLOWED_URI_REGEXP)?o.ALLOWED_URI_REGEXP:Kr,Re=typeof o.NAMESPACE=="string"?o.NAMESPACE:_e,vt=Y(o,"MATHML_TEXT_INTEGRATION_POINTS")&&o.MATHML_TEXT_INTEGRATION_POINTS&&typeof o.MATHML_TEXT_INTEGRATION_POINTS=="object"?$(o.MATHML_TEXT_INTEGRATION_POINTS):O({},Or),Dt=Y(o,"HTML_INTEGRATION_POINTS")&&o.HTML_INTEGRATION_POINTS&&typeof o.HTML_INTEGRATION_POINTS=="object"?$(o.HTML_INTEGRATION_POINTS):O({},Rr);const i=Y(o,"CUSTOM_ELEMENT_HANDLING")&&o.CUSTOM_ELEMENT_HANDLING&&typeof o.CUSTOM_ELEMENT_HANDLING=="object"?$(o.CUSTOM_ELEMENT_HANDLING):Fe(null);if(x=Fe(null),Y(i,"tagNameCheck")&&Ir(i.tagNameCheck)&&(x.tagNameCheck=i.tagNameCheck),Y(i,"attributeNameCheck")&&Ir(i.attributeNameCheck)&&(x.attributeNameCheck=i.attributeNameCheck),Y(i,"allowCustomizedBuiltInElements")&&typeof i.allowCustomizedBuiltInElements=="boolean"&&(x.allowCustomizedBuiltInElements=i.allowCustomizedBuiltInElements),H(x),ue&&(Rt=!1),Ze&&(Pe=!0),Oe&&(F=O({},Hr),v=Fe(null),Oe.html===!0&&(O(F,Wr),O(v,jr)),Oe.svg===!0&&(O(F,Yt),O(v,Ht),O(v,lt)),Oe.svgFilters===!0&&(O(F,zt),O(v,Ht),O(v,lt)),Oe.mathMl===!0&&(O(F,Wt),O(v,$r),O(v,lt))),le.tagCheck=null,le.attributeCheck=null,Y(o,"ADD_TAGS")&&(typeof o.ADD_TAGS=="function"?le.tagCheck=o.ADD_TAGS:Ee(o.ADD_TAGS)&&(F===Pt&&(F=$(F)),O(F,o.ADD_TAGS,D))),Y(o,"ADD_ATTR")&&(typeof o.ADD_ATTR=="function"?le.attributeCheck=o.ADD_ATTR:Ee(o.ADD_ATTR)&&(v===Ot&&(v=$(v)),O(v,o.ADD_ATTR,D))),Y(o,"ADD_URI_SAFE_ATTR")&&Ee(o.ADD_URI_SAFE_ATTR)&&O(gt,o.ADD_URI_SAFE_ATTR,D),Y(o,"FORBID_CONTENTS")&&Ee(o.FORBID_CONTENTS)&&(oe===yt&&(oe=$(oe)),O(oe,o.FORBID_CONTENTS,D)),Y(o,"ADD_FORBID_CONTENTS")&&Ee(o.ADD_FORBID_CONTENTS)&&(oe===yt&&(oe=$(oe)),O(oe,o.ADD_FORBID_CONTENTS,D)),Lt&&(F["#text"]=!0),he&&O(F,["html","head","body"]),F.table&&(O(F,["tbody"]),delete ke.tbody),o.TRUSTED_TYPES_POLICY){if(typeof o.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof o.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ve('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const l=T;T=o.TRUSTED_TYPES_POLICY;try{U=Se("")}catch(m){throw T=l,m}}else o.TRUSTED_TYPES_POLICY===null?(T=void 0,U=""):(T===void 0&&(T=Un()),T&&typeof U=="string"&&(U=Se("")));W&&W(o),Ie=o},br=O({},[...Yt,...zt,...lo]),Lr=O({},[...Wt,...uo]),ta=function(o,i,l){return i.namespaceURI===_e?o==="svg":i.namespaceURI===tt?o==="svg"&&(l==="annotation-xml"||vt[l]):!!br[o]},ra=function(o,i,l){return i.namespaceURI===_e?o==="math":i.namespaceURI===rt?o==="math"&&Dt[l]:!!Lr[o]},na=function(o,i,l){return i.namespaceURI===rt&&!Dt[l]||i.namespaceURI===tt&&!vt[l]?!1:!Lr[o]&&(Qn[o]||!br[o])},aa=function(o){let i=k(o);(!i||!i.tagName)&&(i={namespaceURI:Re,tagName:"template"});const l=ze(o.tagName),m=ze(i.tagName);return Ft[o.namespaceURI]?o.namespaceURI===rt?ta(l,i,m):o.namespaceURI===tt?ra(l,i,m):o.namespaceURI===_e?na(l,i,m):!!(Ue==="application/xhtml+xml"&&Ft[o.namespaceURI]):!1},de=function(o){ge(e.removed,{element:o});try{k(o).removeChild(o)}catch{if(G(o),!k(o))throw Ve("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},nt=function(o){Be(o);const i=y(o);if(i){const m=[];ye(i,p=>{ge(m,p)}),ye(m,p=>{try{G(p)}catch{}})}const l=P(o);if(l)for(let m=l.length-1;m>=0;--m){const p=l[m],E=p&&p.name;if(typeof E=="string")try{o.removeAttribute(E)}catch{}}},Ce=function(o,i){try{ge(e.removed,{attribute:i.getAttributeNode(o),from:i})}catch{ge(e.removed,{attribute:null,from:i})}if(i.removeAttribute(o),o==="is")if(Pe||Ze)try{de(i)}catch{}else try{i.setAttribute(o,"")}catch{}},oa=function(o){const i=P(o);if(i)for(let l=i.length-1;l>=0;--l){const m=i[l],p=m&&m.name;if(!(typeof p!="string"||v[D(p)]))try{o.removeAttribute(p)}catch{}}},Be=function(o){const i=[o];for(;i.length>0;){const l=i.pop();(V?V(l):l.nodeType)===Z.element&&oa(l);const p=y(l);if(p)for(let E=p.length-1;E>=0;--E)i.push(p[E])}}
3,_a=function(o){if(!fe)return;const i=[o];for(;i.length>0;){const l=i.pop(),m=V?V(l):l.nodeType;if(m===Z.processingInstruction||m===Z.comment&&X(Qr,l.data)){try{G(l)}catch{}continue}if(m===Z.element){const E=l,b=D(j?j(l):l.nodeName);try{E.hasAttribute&&E.hasAttribute("patchsrc")&&E.removeAttribute("patchsrc"),E.hasAttribute&&E.hasAttribute("for")&&b!=="label"&&b!=="output"&&E.removeAttribute("for")}catch{}}const p=y(l);if(p)for(let E=p.length-1;E>=0;--E)i.push(p[E])}},yr=function(o){let i=null,l=null;if(bt)o="<remove></remove>"+o;else{const E=Gr(o,/^[\r\n\t ]+/);l=E&&E[0]}Ue==="application/xhtml+xml"&&Re===_e&&(o='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+o+"</body></html>");const m=T?Se(o):o;if(Re===_e)try{i=new C().parseFromString(m,Ue)}catch{}if(!i||!i.documentElement){i=St.createDocument(Re,"template",null);try{i.documentElement.innerHTML=Mt?U:m}catch{}}const p=i.body||i.documentElement;return o&&l&&p.insertBefore(r.createTextNode(l),p.childNodes[0]||null),Re===_e?Gn.call(i,he?"html":"body")[0]:he?i.documentElement:p},gr=function(o){const i=ee?ee(o):o.ownerDocument;return ur.call(i||o,o,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},at=function(o){return o=Xe(o,Yn," "),o=Xe(o,zn," "),o=Xe(o,Wn," "),o},Nt=function(o){var i;o.normalize();const l=ee?ee(o):o.ownerDocument,m=ur.call(l||o,o,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let p=m.nextNode();for(;p;)p.data=at(p.data),p=m.nextNode();const E=(i=o.querySelectorAll)===null||i===void 0?void 0:i.call(o,"template");E&&ye(E,b=>{be(b.content)&&Nt(b.content)})},ot=function(o){const i=j?j(o):null;return typeof i!="string"||D(i)!=="form"?!1:typeof o.nodeName!="string"||typeof o.textContent!="string"||typeof o.removeChild!="function"||o.attributes!==P(o)||typeof o.removeAttribute!="function"||typeof o.setAttribute!="function"||typeof o.namespaceURI!="string"||typeof o.insertBefore!="function"||typeof o.hasChildNodes!="function"||o.nodeType!==V(o)||o.childNodes!==y(o)},be=function(o){if(!V||typeof o!="object"||o===null)return!1;try{return V(o)===Z.documentFragment}catch{return!1}},Ge=function(o){if(!V||typeof o!="object"||o===null)return!1;try{return typeof V(o)=="number"}catch{return!1}};function se(d,o,i){d.length!==0&&ye(d,l=>{l.call(e,o,i,Ie)})}const sa=function(o,i){return!!(fe&&o.hasChildNodes()&&!Ge(o.firstElementChild)&&X(qr,o.textContent)&&X(qr,o.innerHTML)||fe&&o.namespaceURI===_e&&i==="style"&&Ge(o.firstElementChild)||o.nodeType===Z.processingInstruction||fe&&o.nodeType===Z.comment&&X(Qr,o.data))},ia=function(o,i,l){if(!ke[i]&&Dr(i)&&(x.tagNameCheck instanceof RegExp&&X(x.tagNameCheck,i)||x.tagNameCheck instanceof Function&&x.tagNameCheck(i)))return!1;if(Lt&&!oe[i]){const m=k(o),p=y(o);if(p&&m){const E=p.length;for(let b=E-1;b>=0;--b){const w=o===l?I(p[b],!0):p[b];m.insertBefore(w,L(o))}}}return de(o),!0},Mr=function(o,i,l,m){return o.length===0?i:i===l||i===m?$(i):i},Fr=function(o,i){if(se(M.beforeSanitizeElements,o,null),o!==i&&k(o)===null)return et&&Be(o),!0;if(ot(o))return de(o),!0;const l=D(j?j(o):o.nodeName);if(F=Mr(M.uponSanitizeElement,F,Pt,qe),se(M.uponSanitizeElement,o,{tagName:l,allowedTags:F}),o!==i&&k(o)===null)return et&&Be(o),!0;if(sa(o,l))return de(o),!0;if(ke[l]||!(le.tagCheck instanceof Function&&le.tagCheck(l))&&!F[l]){const p=ia(o,l,i);return p===!1&&se(M.afterSanitizeElements,o,null),p}if((V?V(o):o.nodeType)===Z.element&&!aa(o)||(l==="noscript"||l==="noembed"||l==="noframes")&&X(So,o.innerHTML))return de(o),!0;if(ue&&o.nodeType===Z.text){const p=at(o.textContent);o.textContent!==p&&(ge(e.removed,{element:o.cloneNode()}),o.textContent=p)}return se(M.afterSanitizeElements,o,null),!1},vr=function(o,i,l){if(Ar[i]||fe&&i==="patchsrc"||fe&&i==="for"&&o!=="label"&&o!=="output"||hr&&(i==="id"||i==="name")&&(l in r||l in ea))return!1;const m=v[i]||le.attributeCheck instanceof Function&&le.attributeCheck(i,o);if(!(Rt&&X(Hn,i))){if(!(mr&&X(jn,i))){if(m){if(!gt[i]){if(!X(dr,Xe(l,fr,""))){if(!((i==="src"||i==="xlink:href"||i==="href")&&o!=="script"&&Xr(l,"data:")===0&&Tr[o])){if(!(pr&&!X($n,Xe(l,fr,"")))){if(l)return!1}}}}}
3else if(!(Dr(o)&&(x.tagNameCheck instanceof RegExp&&X(x.tagNameCheck,o)||x.tagNameCheck instanceof Function&&x.tagNameCheck(o))&&(x.attributeNameCheck instanceof RegExp&&X(x.attributeNameCheck,i)||x.attributeNameCheck instanceof Function&&x.attributeNameCheck(i,o))||i==="is"&&x.allowCustomizedBuiltInElements&&(x.tagNameCheck instanceof RegExp&&X(x.tagNameCheck,l)||x.tagNameCheck instanceof Function&&x.tagNameCheck(l))))return!1}}return!0},ca=O({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Dr=function(o){return!ca[ze(o)]&&X(Kn,o)},la=function(o,i,l,m){if(T&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!l)switch(S.getAttributeType(o,i)){case"TrustedHTML":return Se(m);case"TrustedScriptURL":return kn(m)}return m},ua=function(o,i,l,m){try{l?o.setAttributeNS(l,i,m):o.setAttribute(i,m),ot(o)?de(o):Br(e.removed)}catch{Ce(i,o)}},wr=function(o){se(M.beforeSanitizeAttributes,o,null);const i=o.attributes;if(!i||ot(o))return;v=Mr(M.uponSanitizeAttribute,v,Ot,Qe);const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:v,forceKeepAttr:void 0};let m=i.length;const p=D(o.nodeName);for(;m--;){const E=i[m],b=E.name,w=E.namespaceURI,q=E.value,Q=D(b),kt=q;let K=b==="value"?kt:no(kt);if(l.attrName=Q,l.attrValue=K,l.keepAttr=!0,l.forceKeepAttr=void 0,se(M.uponSanitizeAttribute,o,l),K=l.attrValue,Cr&&(Q==="id"||Q==="name")&&Xr(K,Vr)!==0&&(Ce(b,o),K=Vr+K),fe&&X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,K)){Ce(b,o);continue}if(Q==="attributename"&&Gr(K,"href")){Ce(b,o);continue}if(!l.forceKeepAttr){if(!l.keepAttr){Ce(b,o);continue}if(!Er&&X(Po,K)){Ce(b,o);continue}
vendor: 3,229 bytes, lines 3-4
3if(ue&&(K=at(K)),!vr(p,Q,K)){Ce(b,o);continue}K=la(p,Q,w,K),K!==kt&&ua(o,b,w,K)}}se(M.afterSanitizeAttributes,o,null)},_t=function(o){let i=null;const l=gr(o);for(se(M.beforeSanitizeShadowDOM,o,null);i=l.nextNode();)if(se(M.uponSanitizeShadowNode,i,null),Fr(i,o),wr(i),be(i.content)&&_t(i.content),(V?V(i):i.nodeType)===Z.element){const p=h(i);be(p)&&(xt(p),_t(p))}se(M.afterSanitizeShadowDOM,o,null)},xt=function(o){const i=[{node:o,shadow:null}];for(;i.length>0;){const l=i.pop();if(l.shadow){_t(l.shadow);continue}const m=l.node,E=(V?V(m):m.nodeType)===Z.element,b=y(m);if(b)for(let w=b.length-1;w>=0;--w)i.push({node:b[w],shadow:null});if(E){const w=j?j(m):null;if(typeof w=="string"&&D(w)==="template"){const q=m.content;be(q)&&i.push({node:q,shadow:null})}}if(E){const w=h(m);be(w)&&i.push({node:null,shadow:w},{node:w,shadow:null})}}};return e.sanitize=function(d){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,l=null,m=null,p=null;if(Mt=!d,Mt&&(d="<!-->"),typeof d!="string"&&!Ge(d)&&(d=io(d),typeof d!="string"))throw Ve("dirty is not a string, aborting");if(!e.isSupported)return d;It?(F=qe,v=Qe):wt(o),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(F=$(F)),M.uponSanitizeAttribute.length>0&&(v=$(v)),e.removed=[];const E=et&&typeof d!="string"&&Ge(d);if(E){_a(d);const q=j?j(d):d.nodeName;if(typeof q=="string"){const Q=D(q);if(!F[Q]||ke[Q])throw nt(d),Ve("root node is forbidden and cannot be sanitized in-place")}if(ot(d))throw nt(d),Ve("root node is clobbered and cannot be sanitized in-place");try{xt(d)}catch(Q){throw nt(d),Q}}else if(Ge(d))i=yr("<!---->"),l=i.ownerDocument.importNode(d,!0),l.nodeType===Z.element&&l.nodeName==="BODY"||l.nodeName==="HTML"?i=l:i.appendChild(l),xt(l);else{if(!Pe&&!ue&&!he&&d.indexOf("<")===-1)return T&&Je?Se(d):d;if(i=yr(d),!i)return Pe?null:Je?U:""}i&&bt&&de(i.firstChild);const b=E?d:i;try{const q=gr(b);for(;m=q.nextNode();)Fr(m,b),wr(m),be(m.content)&&_t(m.content)}catch(q){throw E&&(nt(d),ye(e.removed,Q=>{Q.element&&Be(Q.element)})),q}if(E)return ye(e.removed,q=>{q.element&&Be(q.element)}),ue&&Nt(d),d;if(Pe){if(ue&&Nt(i),Ze)for(p=Bn.call(i.ownerDocument);i.firstChild;)p.appendChild(i.firstChild);else p=i;return(v.shadowroot||v.shadowrootmode)&&(p=Xn.call(a,p,!0)),p}let w=he?i.outerHTML:i.innerHTML;return he&&F["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&X(Vo,i.ownerDocument.doctype.name)&&(w="<!DOCTYPE "+i.ownerDocument.doctype.name+`>
4`+w),ue&&(w=at(w)),T&&Je?Se(w):w},e.setConfig=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wt(d),It=!0,qe=F,Qe=v},e.clearConfig=function(){Ie=null,It=!1,qe=null,Qe=null,T=te,U=""},e.isValidAttribute=function(d,o,i){Ie||wt({});const l=D(d),m=D(o);return vr(l,m,i)},e.addHook=function(d,o){typeof o=="function"&&Y(M,d)&&ge(M[d],o)},e.removeHook=function(d,o){if(Y(M,d)){if(o!==void 0){const i=to(M[d],o);return i===-1?void 0:ro(M[d],i,1)[0]}return Br(M[d])}},e.removeHooks=function(d){Y(M,d)&&(M[d]=[])},e.removeAllHooks=function(){M=Zr()},e}Fn();var g=(t=>(t.NOT_IMPLEMENTED="EEE",t.LOGIC_ERR="E00",t.UNKNOWN_ERR="E01",t.IMAGE_ASSET_LOST="E02",t.VIDEO_ASSET_LOST="E03",t.FFMPEG_SPAWN_FAILED="E04",t.FILE_READ_E
4RROR="E05",t.VIDEO_FORMAT_ERR="E06",t.VIDEO_DECODE_ERR="E07",t.VIDEO_RENDER_ERR="E08",t.CANVAS_CTX_ERR="E09",t.VIDEO_ENCODE_ERR="E10",t.NO_SUPPORTED_CONFIG="E11",t.ENCODED_VIDEO_NOT_FOUND="E12",t.CHAR_ASSET_LOST="E13",t.SIMPLE_CHARACTER_ASSET_LOST="E14",t.WATERMARK_LOST="E15",t.DISK_WRITE_ERR="E16",t.DISK_NO_SPACE="E17",t.MUXER_ERR="E18",t.CANVAS_RENDER_EMPTY_BLOB="E19",t.MUXING_AUDIO_FAILED="E20",t.AUDIO_EXPORT_ERR="E21",t.SOURCE_LOST="E22",t.ALPHA_MODE_ERR="E23",t.ASSET_CHUNK_LOST="E24",t.CTX_LOST="E25",t.ENCODER_TIMEOUT="E26",t.ENCODER_OPERATION_ERR="E27",t.NETWORK_FAILED_ERR="E28",t.BITMAP_CREATION_ERR="E29",t.AUDIO_LOGIC_ERR="E30",t.AUDIO_DECODE_ERR="E31",t.AUDIO_ENCODE_ERR="E32",t.AUDIO_DECODER_CONFIG_ERR="E33",t.DECODER_WORKER_SPAWN_ERR="E34",t.AUDIO_FORMAT_ERR="E35",t.IMAGE_EXPORT_GENERAL_ERROR="E36",t.RENDERER_INIT_HWACCEL_UNAVAILABLE="E37",t.AUDIO_ENCODER_TIMEOUT="E38",t.AUDIO_ENCODER_CONFIG_ERR="E39",t))(g||{});const Jr=(t,e)=>t*4294967296+(e>>>0),en=(t,e,r)=>e===0||r===0?z.fromSec(t):z.fromSec(t*e/r),Zt=t=>{const e=t<0?-1:1,r=Math.abs(t),a=r>>>0;return[(r/4294967296>>>0)*e,a]},tn=(t,e,r)=>t.mul(e/r).as.sec("round");async function Io(t,e){let r;e.codecpar?r=await t.ff_copyout_codecpar(e.codecpar):r=e;const a=await t.avcodec_get_name(r.codec_id),n={codec:"",sampleRate:r.sample_rate,numberOfChannels:r.channels},_=r.extradata;switch(a){case"flac":n.codec="flac",n.description=_;break;case"mp3":n.codec="mp3";break;case"aac":{switch(r.profile){case 1:default:n.codec="mp4a.40.2";break;case 4:n.codec="mp4a.40.5";break;case 28:n.codec="mp4a.40.29";break}_&&(n.description=_);break}case"opus":n.codec="opus";break;case"vorbis":n.codec="vorbis",n.description=_;break;case"pcm_f32le":n.codec="pcm-f32";break;case"pcm_f32be":n.codec="pcm-f32be";break;case"pcm_s32le":n.codec="pcm-s32";break;case"pcm_s32be":n.codec="pcm-s32be";break;case"pcm_s24le":n.codec="pcm-s24";break;case"pcm_s24be":n.codec="pcm-s24be";break;case"pcm_s16le":n.codec="pcm-s16";break;case"pcm_s16be":n.codec="pcm-s16be";break;case"pcm_u8":n.codec="pcm-u8";break}if(n.codec)return n;throw new Error(`Unsupported audio codec: ${a}`)}const bo=t=>{switch(t){case"mp3":return["mp3","mp4a.69","mp4a.6B"];case"aac":return["mp4a.40.2","mp4a.40.02","mp4a.40.5","mp4a.40.05","mp4a.40.29","mp4a.67"];case"pcm-u8":return["pcm-u8"];case"pcm-s16":return["pcm-s16"];case"pcm-s24":return["pcm-s24"];case"pcm-s32":return["pcm-s32"];case"pcm-f32":return["pcm-f32"];case"opus":return["opus"];case"vorbis":return["vorbis"];default:throw new Error(`invalid codec: ${t}`)}},Jt=(t,e)=>Array.from({length:t},()=>new Float32Array(e)),Lo=t=>{const e=Jt(t.numberOfChannels,t.numberOfFrames);for(let r=0;r<t.numberOfChannels;r++){const a=e[r];t.copyTo(a,{planeIndex:r,format:"f32-planar"})}return t.close(),e};class yo{constructor(e){this._numberOfChannels=e,this._buffer=Jt(this._numberOfChannels,0),this._length=0}_numberOfChannels;_buffer;_length;get length(){return this._length}get numberOfChannels(){return this._numberOfChannels}destroy=()=>{this._buffer=[],this._length=0};push(e){const r=e[0].length;this._ensureCapacity(r+this._length);for(let a=0;a<this._numberOfChannels;a++)this._buffer[a].set(e[a],this._length);this._length+=r}shift(e){const r=Math.min(e,this._length),a=Jt(this._numberOfChannels,r);for(let n=0;n<this._numberOfChannels;n++){const _=this._buffer[n].subarray(0,r);a[n].set(_),this._buffer[n].copyWithin(0,r)}return this._length-=r,a}subarray(e,r){const a=e??0,n=r??this._length;return Array.from({length:this._numberOfChannels},(_,s)=>this._buffer[s].subarray(a,n))}_ensureCapacity(e){const r=this._buffer[0].length;if(e-r>0)for(let n=0;n<this._numberOfChannels;n++){const _=new Float32Array(e);_.set(this._buffer[n]),this._buffer[n]=_}}}const go="3c00a4f8";class Mo{future=null;current=null;_isResolved=!1;promise(e=!1){return e&&this.reset(),this.current?this.current:this.current=new Promise((r,a)=>{this.future={resolve:r,reject:a}})}resolve(e,r=!0,a=!1){if(!this.future){if(a)return;throw new Error("No promise")}this._isResolved||(this.future.resolve(e),this._isResolved=!0,r&&this.reset())}reject(e,r=!0,a=!1){if(!this.future){if(a)return;throw new Error("No promise")}this._isResolved||(this.future.reject(e),this._isResolved=!0,r&&this.reset())}reset(){return this.current=null,this.future=null,this._isResolved=!1,this}}const Fo=async(t,e)=>{const r=performance.now(),a=vo(t);return yn(async()=>{try{const _=await fetch(a,{signal:e});if(!_.ok)throw N(g.NETWORK_FAILED_ERR,"fetch response is not ok",`Details:
5            network: ${navigator.onLine}
6            response: ${_.status} ${_.statusText}
7            time: ${performance.now()-r}ms
8            url: ${t}
9            status: ${_.status}
10            statusText: ${_.statusText}
11            headers: ${JSON.stringify(Object.fromEntries(_.headers.entries()))}
12            disk: ${await er()}
13          `);return _}catch(_){throw _ instanceof DOMException&&_.name==="AbortError"?_:N(g.NETWORK_FAILED_ERR,`fetch failed
14         Details:
15          time: ${performance.now()-r}ms
16          url: ${t}
17          err: ${We(_)}
18          network: ${navigator.onLine}
19          disk: ${await er()}
20        `)}},1,()=>100+Math.random()*1e3)},er=async()=>{try{const t=await navigator.storage.estimate();return`storage estimation: ${t.usage} / ${t.quota}`}catch{return"storage estimation: failed to get storage estimation"}},rn=async(t,e)=>yn(async()=>{const a=await Fo(t,e);try{return await a.blob()}catch(n){if(n instanceof Error&&n.name==="TypeError"){const _=await er();throw N(g.DISK_NO_SPACE,`blob() failed
21         Details:
22          url: ${t}
23          err: ${We(n)}
24          disk: ${_}
25        `)}throw N(g.NETWORK_FAILED_ERR,n)}},1,()=>100+Math.random()*1e3),vo=t=>{if(!t)return t;const e=t.toLowerCase(),r=/^\/(assets|worklet|libav|locales|src|@fs)\//,a=r.test(t)||t.startsWith("/try/")&&r.test(`/${t.slice(5)}`);if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("blob:")||e.startsWith("data:")||e.startsWith("vrew-file:")||a)return t;throw N(g.LOGIC_ERR,`[assertLoadableUrl] Unconverted path reached core: ${t}`)};let ut=null,ft=null,pe=null;const nn=go,Do=async()=>
25{if(ut&&ft)return{mjsUrl:ut,wasmUrl:ft};if(pe)return pe.promise();pe=new Mo,pe.promise();try{const t="/try/",e=new URL(`${t}libav/libav-vrew-${nn}.mjs`,import.meta.url).href,r=new URL(`${t}libav/libav-vrew-${nn}.wasm`,import.meta.url).href,[a,n]=await Promise.all([rn(e),rn(r)]);ut=URL.createObjectURL(a),ft=URL.createObjectURL(n);const _={mjsUrl:ut,wasmUrl:ft};return pe.resolve(_),_}catch(t){throw pe&&pe.reject(t),t}finally{pe=null}},R={};(function(){function t(s){if(s=s||[0,97,115,109,1,0,0,0],typeof WebAssembly!="object"||typeof WebAssembly.instantiate!="function")return!1;try{var s=new WebAssembly.Module(new Uint8Array(s));if(s instanceof WebAssembly.Module)return new WebAssembly.Instance(s)instanceof WebAssembly.Instance}catch{}return!1}function e(){try{var s=new WebAssembly.Memory({initial:1,maximum:1,shared:!0});return s.buffer instanceof SharedArrayBuffer}catch{}return!1}var r=typeof process<"u";R.base||(R.base=import.meta.url,R.base=R.base.replace(/\/[^\/]*$/,"")),R.isWebAssemblySupported=t,R.isThreadingSupported=e;function a(s){s=s||{};var c=!s.nowasm&&t(),u=s.yesthreads&&c&&!s.nothreads&&e();return c?u?"thr":"wasm":"asm"}R.target=a,R.VER="0.18.8.0",R.CONFIG="vrew",R.DBG="",R.factories={};var n={};n.NULL=0,n.i64tof64=function(s,c){return!c&&s>=0||c===-1&&s<0?s:c*4294967296+s+(s<0?4294967296:0)},n.f64toi64=function(s){return[~~s,Math.floor(s/4294967296)]},n.i64ToBigInt=function(s,c){var u=new DataView(new ArrayBuffer(8));return u.setInt32(0,s,!0),u.setInt32(4,c,!0),u.getBigInt64(0,!0)},n.bigIntToi64=function(s){var c=new DataView(new ArrayBuffer(8));return c.setBigInt64(0,s,!0),[c.getInt32(0,!0),c.getInt32(4,!0)]},n.ff_channel_layout=function(s){return s.channel_layout?s.channel_layout:s.channels&&s.channels!==1?(1<<s.channels)-1:4},n.ff_channels=function(s){if(s.channels)return s.channels;if(s.channel_layout){for(var c=0,u=s.channel_layout;u;)c+=u&1,u>>=1;return c}else return 1},n.AV_VERSION_INT=function(s,c,u){return s<<16|c<<8|u};function _(s,c){typeof c===void 0&&(c=0);var u=c;s.forEach(function(A){n[A]=u++})}n.AV_TIME_BASE=1e6,n.AV_NOPTS_VALUE_I64=[0,-2147483648],n.AV_NOPTS_VALUE_LO=0,n.AV_NOPTS_VALUE_HI=-2147483648,n.AV_NOPTS_VALUE=n.i64tof64(0,-2147483648),n.AV_OPT_SEARCH_CHILDREN=1,_(["AVMEDIA_TYPE_UNKNOWN","AVMEDIA_TYPE_VIDEO","AVMEDIA_TYPE_AUDIO","AVMEDIA_TYPE_DATA","AVMEDIA_TYPE_SUBTITLE","AVMEDIA_TYPE_ATTACHMENT"],-1),_(["AV_SAMPLE_FMT_NONE","AV_SAMPLE_FMT_U8","AV_SAMPLE_FMT_S16","AV_SAMPLE_FMT_S32","AV_SAMPLE_FMT_FLT","AV_SAMPLE_FMT_DBL","AV_SAMPLE_FMT_U8P","AV_SAMPLE_FMT_S16P","AV_SAMPLE_FMT_S32P","AV_SAMPLE_FMT_FLTP","AV_SAMPLE_FMT_DBLP","AV_SAMPLE_FMT_S64","AV_SAMPLE_FMT_S64P","AV_SAMPLE_FMT_NB"],-1),_(["AV_PIX_FMT_NONE","AV_PIX_FMT_YUV420P","AV_PIX_FMT_YUYV422","AV_PIX_FMT_RGB24","AV_PIX_FMT_BGR24","AV_PIX_FMT_YUV422P","AV_PIX_FMT_YUV444P","AV_PIX_FMT_YUV410P","AV_PIX_FMT_YUV411P","AV_PIX_FMT_GRAY8","AV_PIX_FMT_MONOWHITE","AV_PIX_FMT_MONOBLACK","AV_PIX_FMT_PAL8","AV_PIX_FMT_YUVJ420P","AV_PIX_FMT_YUVJ422P","AV_PIX_FMT_YUVJ444P","AV_PIX_FMT_UYVY422","AV_PIX_FMT_UYYVYY411","AV_PIX_FMT_BGR8","AV_PIX_FMT_BGR4","AV_PIX_FMT_BGR4_BYTE","AV_PIX_FMT_RGB8","AV_PIX_FMT_RGB4","AV_PIX_FMT_RGB4_BYTE","AV_PIX_FMT_NV12","AV_PIX_FMT_NV21","AV_PIX_FMT_ARGB","AV_PIX_FMT_RGBA","AV_PIX_FMT_ABGR","AV_PIX_FMT_BGRA","AV_PIX_FMT_GRAY16BE","AV_PIX_FMT_GRAY16LE","AV_PIX_FMT_YUV440P","AV_PIX_FMT_YUVJ440P","AV_PIX_FMT_YUVA420P","AV_PIX_FMT_RGB48BE","AV_PIX_FMT_RGB48LE","AV_PIX_FMT_RGB565BE","AV_PIX_FMT_RGB565LE","AV_PIX_FMT_RGB555BE","AV_PIX_FMT_RGB555LE","AV_PIX_FMT_BGR565BE","AV_PIX_FMT_BGR565LE","AV_PIX_FMT_BGR555BE","AV_PIX_FMT_BGR555LE"],-1),n.AVCOL_PRI_RESERVED0=0,n.AVCOL_PRI_BT709=1,n.AVCOL_PRI_UNSPECIFIED=2,n.AVCOL_PRI_RESERVED=3,n.AVCOL_PRI_BT470M=4,n.AVCOL_PRI_BT470BG=5,n.AVCOL_PRI_SMPTE170M=6,n.AVCOL_PRI_SMPTE240M=7,n.AVCOL_PRI_FILM=8,n.AVCOL_PRI_BT2020=9,n.AVCOL_PRI_SMPTE428=10,n.AVCOL_PRI_SMPTEST428_1=n.AVCOL_PRI_SMPTE428,n.AVCOL_PRI_SMPTE431=11,n.AVCOL_PRI_SMPTE432=12,n.AVCOL_PRI_EBU3213=22,n.AVCOL_PRI_JEDEC_P22=n.AVCOL_PRI_EBU3213,n.AVCOL_TRC_RESERVED0=0,n.AVCOL_TRC_BT709=1,n.AVCOL_TRC_UNSPECIFIED=2,n.AVCOL_TRC_RESERVED=3,n.AVCOL_TRC_GAMMA22=4,n.AVCOL_TRC_GAMMA28=5,n.AVCOL_TRC_SMPTE170M=6,n.AVCOL_TRC_SMPTE240M=7,n.AVCOL_TRC_LINEAR=8,n.AVCOL_TRC_LOG=9,n.AVCOL_TRC_LOG_SQRT=10,n.AVCOL_TRC_IEC61966_2_4=11,n.AVCOL_TRC_BT1361_ECG=12,n.AVCOL_TRC_IEC61966_2_1=13,n.AVCOL_TRC_BT2020_10=14,n.AVCOL_TRC_BT2020_12=15,n.AVCOL_TRC_SMPTE2084=16,n.AVCOL_TRC_SMPTEST2084=n.AVCOL_TRC_SMPTE2084,n.AVCOL_TRC_SMPTE428=17,n.AVCOL_TRC_SMPTEST428_1=n.AVCOL_TRC_SMPTE428,n.AVCOL_TRC_ARIB_STD_B67=18,n.AVCOL_SPC_RGB=0,n.AVCOL_SPC_BT709=1,n.AVCOL_SPC_UNSPECIFIED=2,n.AVCOL_SPC_RESERVED=3,n.AVCOL_SPC_FCC=4,n.AVCOL_SPC_BT470BG=5,n.AVCOL_SPC_SMPTE170M=6,n.AVCOL_SPC_SMPTE240M=7,n.AVCOL_SPC_YCGCO=8,n.AVCOL_SPC_YCOCG=n.AVCOL_SPC_YCGCO,n.AVCOL_SPC_BT2020_NCL=9,n.AVCOL_SPC_BT2020_CL=10,n.AVCOL_SPC_SMPTE2085=11,n.AVCOL_SPC_CHROMA_DERIVED_NCL=12,n.AVCOL_SPC_CHROMA_DERIVED_CL=13,n.AVCOL_SPC_ICTCP=14,n.AVCOL_RANGE_UNSPECIFIED=0,n.AVCOL_RANGE_MPEG=1,n.AVCOL_RANGE_JPEG=2,n.AVIO_FLAG_READ=1,n.AVIO_FLAG_WRITE=2,n.AVIO_FLAG_READ_WRITE=3,n.AVIO_FLAG_NONBLOCK=8,n.AVIO_FLAG_DIRECT=32768,n.AVFMT_FLAG_NOBUFFER=64,n.AVFMT_FLAG_FLUSH_PACKETS=512,n.AVSEEK_FLAG_BACKWARD=1,n.AVSEEK_FLAG_BYTE=2,n.AVSEEK_FLAG_ANY=4,n.AVSEEK_FLAG_FRAME=8,n.AVDISCARD_NONE=-16,n.AVDISCARD_DEFAULT=0,n.AVDISCARD_NONREF=8,n.AVDISCARD_BIDIR=16,n.AVDISCARD_NONINTRA=24,n.AVDISCARD_NONKEY=32,n.AVDISCARD_ALL=48,n.AV_LOG_QUIET=-8,n.AV_LOG_PANIC=0,n.AV_LOG_FATAL=8,n.AV_LOG_ERROR=16,n.AV_LOG_WARNING=24,n.AV_LOG_INFO=32,n.AV_LOG_VERBOSE=40,n.AV_LOG_DEBUG=48,n.AV_LOG_TRACE=56,n.AV_PKT_FLAG_KEY=1,n.AV_PKT_FLAG_CORRUPT=2,n.AV_PKT_FLAG_DISCARD=4,n.AV_PKT_FLAG_TRUSTED=8,n.AV_PKT_FLAG_DISPOSABLE=16,n.SWS_FAST_BILINEAR=1,n.SWS_BILINEAR=2,n.SWS_BICUBIC=4,n.SWS_X=8,n.SWS_POINT=16,n.SWS_AREA=32,n.SWS_BICUBLIN=64,n.SWS_GAUSS=128,n.SWS_SINC=256,n.SWS_LANCZOS=512,n.SWS_SPLINE=1024,_(["E2BIG","EPERM","EADDRINUSE","EADDRNOTAVAIL","EAFNOSUPPORT","EAGAIN","EALREADY","
25EBADF","EBADMSG","EBUSY","ECANCELED","ECHILD","ECONNABORTED","ECONNREFUSED","ECONNRESET","EDEADLOCK","EDESTADDRREQ","EDOM","EDQUOT","EEXIST","EFAULT","EFBIG","EHOSTUNREACH","EIDRM","EILSEQ","EINPROGRESS","EINTR","EINVAL","EIO","EISCONN","EISDIR","ELOOP","EMFILE","EMLINK","EMSGSIZE","EMULTIHOP","ENAMETOOLONG","ENETDOWN","ENETRESET","ENETUNREACH","ENFILE","ENOBUFS","ENODEV","ENOENT"],1),n.AVERROR_EOF=-541478725,Object.assign(R,n),R.LibAV=function(s){s=s||{};var c=s.base||R.base,u=a(s),A=s.variant||R.variant||"vrew",C=!0;C&&(s.noes6||R.noes6)&&(C=!1);var S=s.toImport||R.toImport||c+"/libav-0.18.8.0-"+A+"."+u+"."+(C?"mjs":"js"),f,I="direct";return u==="thr"?I="threads":!r&&!s.noworker&&typeof Worker<"u"&&(I="worker"),Promise.all([]).then(function(){if(s.factory||R.factory)return s.factory||R.factory;if(R.factories[S])return R.factories[S];if(I!=="worker")return C?import(S).then(function(G){return R.factories[S]=G.default,G.default}):r?R.factories[S]=require(S):typeof importScripts<"u"?(importScripts(S),R.factories[S]=LibAVFactory):new Promise(function(G,L){var y=document.createElement("script");y.src=S,y.addEventListener("load",G),y.addEventListener("error",L),y.async=!0,document.body.appendChild(y)}).then(function(){return R.factories[S]=LibAVFactory})}).then(function(G){return I==="worker"?(f={},f.worker=new Worker(S,{type:C?"module":"classic"}),new Promise(function(L,y){f.worker.onerror=h=>{console.error(h),y(h.error||new Error(h.message))},f.worker.postMessage({config:{variant:s.variant||R.variant,wasmurl:s.wasmurl||R.wasmurl}}),f.on=1,f.handlers={error:[function(h){y(h)},null],onready:[function(){L()},null],onwrite:[function(h){f.onwrite&&f.onwrite.apply(f,h)},null],onread:[function(h){try{var P=null;f.onread&&(P=f.onread.apply(f,h)),P&&P.then&&P.catch&&P.catch(function(V){f.ff_reader_dev_send(h[0],null,{error:V})})}catch(V){f.ff_reader_dev_send(h[0],null,{error:V})}},null],onblockread:[function(h){try{var P=null;f.onblockread&&(P=f.onblockread.apply(f,h)),P&&P.then&&P.catch&&P.catch(function(V){f.ff_block_reader_dev_send(h[0],h[1],null,{error:V})})}catch(V){f.ff_block_reader_dev_send(h[0],h[1],null,{error:V})}},null]},f.c=function(){for(var h=Array.prototype.slice.call(arguments),P=[],V=0;V<h.length;V++)h[V]&&h[V].libavjsTransfer&&P.push.apply(P,h[V].libavjsTransfer);return new Promise(function(j,ee){var T=f.on++;h=[T].concat(h),f.handlers[T]=[j,ee],f.worker.postMessage(h,P)})};function k(h){var P=h.data[0],V=f.handlers[P];V&&(h.data[2]?V[0](h.data[3]):V[1](h.data[3]),typeof P=="number"&&delete f.handlers[P])}f.worker.onmessage=k,f.terminate=function(){f.worker.terminate()}})):I==="threads"?Promise.all([]).then(function(){return G({wasmurl:s.wasmurl||R.wasmurl,variant:s.variant||R.variant})}).then(function(L){f=L;var y=f.libavjs_create_main_thread(),k=f.PThread.pthreads[y],h=1,P={},V=null,j=new Promise(function(T){V=T});f.c=function(){var T=Array.prototype.slice.call(arguments);return new Promise(function(U,te){var ce=h++;T=[ce].concat(T),P[ce]=[U,te],k.postMessage({c:"libavjs_run",a:T})})};var ee=k.onmessage;return k.onmessage=function(T){if(T.data&&T.data.c==="libavjs_ret"){var U=T.data.a,te=P[U[0]];te&&(U[2]?te[0](U[3]):te[1](U[3]),delete P[U[0]])}else if(T.data&&T.data.c==="libavjs_wait_reader")if(f.readerDevReady(T.data.fd))k.postMessage({c:"libavjs_wait_reader",fd:T.data.fd});else{var ce=f.fdName(T.data.fd),ie=f.ff_reader_dev_waiters[ce];ie||(ie=f.ff_reader_dev_waiters[ce]=[]),ie.push(function(){k.postMessage({c:"libavjs_wait_reader",fd:T.data.fd})})}else if(T.data&&T.data.c==="libavjs_ready")V();else return ee.apply(this,arguments)},f.terminate=function(){f.PThread.unusedWorkers.concat(f.PThread.runningWorkers).forEach(function(T){T.terminate()})},j}):Promise.all([]).then(function(){return G({wasmurl:s.wasmurl||R.wasmurl,variant:s.variant||R.variant})}).then(function(L){f=L,f.worker=!1,f.c=function(y){var k=Array.prototype.slice.call(arguments,1);return new Promise(function(h,P){try{h(f[y].apply(f,k))}catch(V){P(V)}})},f.terminate=function(){}})}).then(function(){function G(h){h.forEach(function(P){f[P]=function(){return f.c.apply(f,[P].concat(Array.prototype.slice.call(arguments)))}})}function L(h){h.forEach(function(P){var V=f[P+"_sync"]=f[P];f[P]=function(){var j=arguments;return new Promise(function(ee,T){try{var U=V.apply(f,j);typeof U=="object"&&U!==null&&U.then?U.then(ee).catch(T):ee(U)}catch(te){T(te)}})}})}var y=["calloc","close","dup2","free","malloc","mallinfo_uordblks","open","strerror","libavjs_create_main_thread","libavjs_with_
25swscale","ff_malloc_int32_list","ff_malloc_int64_list","av_compare_ts_js","av_dict_copy_js","av_dict_free","av_dict_set_js","av_log_get_level","av_log_set_level","av_opt_set","av_opt_set_int_list_js","av_strdup","ff_error","ff_nothing","LIBAVUTIL_VERSION_INT","av_dict_free_js","sws_getContext","sws_freeContext","sws_scale_frame","av_find_best_stream","av_find_input_format","avformat_alloc_context","avformat_alloc_output_context2_js","avformat_close_input","avformat_find_stream_info","avformat_flush","avformat_free_context","avformat_new_stream","avformat_open_input","avformat_open_input_js","avformat_seek_file","avformat_seek_file_min","avformat_seek_file_max","avformat_seek_file_approx","avformat_write_header","avformat_get_rotation","av_interleaved_write_frame","avio_open2_js","avio_close","avio_flush","av_read_frame","av_seek_frame","av_write_frame","av_write_trailer","avstream_get_frame_rate","avstream_get_sample_aspect_ratio_num","avstream_get_sample_aspect_ratio_den","ff_get_media_duration","ff_get_timecode","ff_get_input_format_name","ff_get_major_brand","ff_slice_audio","ff_extract_audio","ff_convert_audio_to_mp3","convert_to_hls","LIBAVFORMAT_VERSION_INT","ff_init_muxer","ff_free_muxer","ff_init_demuxer_file","ff_write_multi","ff_read_frame_multi","ff_read_multi","AVFormatContext_duration","AVFormatContext_duration_s","AVFormatContext_durationhi","AVFormatContext_durationhi_s","AVFormatContext_flags","AVFormatContext_flags_s","AVFormatContext_nb_streams","AVFormatContext_nb_streams_s","AVFormatContext_oformat","AVFormatContext_oformat_s","AVFormatContext_pb","AVFormatContext_pb_s","AVFormatContext_start_time","AVFormatContext_start_time_s","AVFormatContext_start_timehi","AVFormatContext_start_timehi_s","AVFormatContext_streams_a","AVFormatContext_streams_a_s","AVStream_codecpar","AVStream_codecpar_s","AVStream_discard","AVStream_discard_s","AVStream_duration","AVStream_duration_s","AVStream_durationhi","AVStream_durationhi_s","AVStream_start_time","AVStream_start_time_s","AVStream_start_timehi","AVStream_start_timehi_s","AVStream_time_base_num","AVStream_time_base_den","AVStream_time_base_num_s","AVStream_time_base_den_s","AVStream_time_base_s","avformat_close_input_js","avcodec_descriptor_get","avcodec_descriptor_get_by_name","avcodec_descriptor_next","av_grow_packet","av_packet_alloc","av_packet_clone","av_packet_free","av_packet_make_writable","av_packet_new_side_data","av_packet_ref","av_packet_rescale_ts_js","AVPacketSideData_data","AVPacketSideData_size","AVPacketSideData_type","av_packet_unref","av_shrink_packet","ff_codecpar_new_side_data","av_channel_layout_default_mask","LIBAVCODEC_VERSION_INT","ff_set_packet","ff_copyout_packet","ff_copyout_packet_ptr","ff_copyin_packet","AVCodecDescriptor_id","AVCodecDescriptor_id_s","AVCodecDescriptor_long_name","AVCodecDescriptor_mime_types_a","AVCodecDescriptor_mime_types_a_s","AVCodecDescriptor_name","AVCodecDescriptor_props","AVCodecDescriptor_props_s","AVCodecDescriptor_type","AVCodecDescriptor_type_s","AVCodecParameters_bit_rate","AVCodecParameters_bit_rate_s","AVCodecParameters_channel_layoutmask","AVCodecParameters_channel_layoutmask_s","AVCodecParameters_channels","AVCodecParameters_channels_s","AVCodecParameters_ch_layout_nb_channels","AVCodecParameters_ch_layout_nb_channels_s","AVCodecParameters_chroma_location","AVCodecParameters_chroma_location_s","AVCodecParameters_codec_id","AVCodecParameters_codec_id_s","AVCodecParameters_codec_tag","AVCodecParameters_codec_tag_s","AVCodecParameters_codec_type","AVCodecParameters_codec_type_s","AVCodecParameters_coded_side_data","AVCodecParameters_coded_side_data_s","AVCodecParameters_color_primaries","AVCodecParameters_color_primaries_s","AVCodecParameters_color_range","AVCodecParameters_color_range_s","AVCodecParameters_color_space","AVCodecParameters_color_space_s","AVCodecParameters_color_trc","AVCodecParameters_color_trc_s","AVCodecParameters_extradata","AVCodecParameters_extradata_s","AVCodecParameters_extradata_size","AVCodecParameters_extradata_size_s","AVCodecParameters_format","AVCodecParameters_format_s","AVCodecParameters_framerate_num","AVCodecParameters_framerate_den","AVCodecParameters_framerate_num_s","AVCodecParameters_framerate_den_s","AVCodecParameters_framerate_s","AVCodecParameters_height","AVCodecParameters_height_s","AVCodecParameters_level","AVCodecParameters_level_s","AVCodecParameters_nb_coded_side_data","AVCodecParameters_nb_coded_side_data_s","AVCodecParameters_profile","AVCodecParameters_profile_s","AVCodecParameters_sample_rate","AVCodecParameters_sample_rate_s","AVCodecParameters_width","AVCodecParameters_width_s","AVCodecParameters_block_align","AVCodecParameters_block_align_s","AVCodecParameters_frame_size","AVCodecParameters_frame_size_s","AVCodecParameters_initial_padding","AVCodecParameters_initial_padding_s","AVCodecParameters_trailing_padding","AVCodecParameters_trailing_padding_s","AVCodecParameters_seek_preroll","AVCodecParameters_seek_preroll_s","AVPacket_data","AVPacket_data_s","AVPacket_dts","AVPacket_dts_s","AVPacket_dtshi","AVPacket_dtshi_s","AVPacket_duration","AVPacket_duration_s","AVPacket_durationhi","AVPacket_durationhi_s","AVPacket_flags","AVPacket_flags_s","AVPacket_pos","AVPacket_pos_s","AVPacket_poshi","AVPacket_poshi_s","AVPacket_pts","AVPacket_pts_s","AVPacket_ptshi","AVPacket_ptshi_s","AVPacket_side_data","AVPacket_side_data_s","AVPacket_side_data_elems","AVPacket_side_data_elems_s","AVPacket_size","AVPacket_size_s","AVPacket_stream_index","AVPacket_stream_index_s","AVPacket_time_base_num","AVPacket_time_base_den","AVPacket_time_base_num_s","AVPacket_time_base_den_s","AVPacket_time_base_s","av_packet_free_js","avcodec_parameters_free_js","avcodec_alloc_context3","avcodec_find_decoder","avcodec_find_decoder_by_name","avcodec_find_encoder","avcodec_find_encoder_by_name","avcodec_flush_buffers","avcodec_free_context","avcodec_get_name","avcodec_open2","avcodec_open2_js","avcodec_parameters_alloc","avcodec_parameters_copy","avcodec_parameters_free","avcodec_parameters_from_context","avcodec_parameters_to_context","avcodec_receive_frame","avcodec_receive_packet","avcodec_send_frame","avcodec_send_packet","ff_get_colorspace_name","ff_get_pix_fmt_name","ff_get_color_range_name","ff_init_encoder","ff_init_decoder","ff_free_encoder","ff_free_decoder","ff_encode_multi","ff_decode_multi","ff_copyout_codecpar","ff_copyin_codecpar","AVCodec_name","AVCodec_sample_fmts","AVCodec_sample_fmts_s","AVCodec_sample_fmts_a","AVCodec_sample_fmts_a_s","AVCodec_supported_samplerates","AVCodec_supported_samplerates_s","AVCodec_supported_samplerates_a","AVCodec_supported_samplerates_a_s","AVCodec_type","AVCodec_type_s","AVCodecContext_codec_id","AVCodecContext_codec_id_s","AVCodecContext_codec_type","AVCodecContext_codec_type_s","AVCodecContext_bit_rate","AVCodecContext_bit_rate_s","AVCodecContext_bit_ratehi","AVCodecContext_bit_ratehi_s","AVCodecContext_channel_layout","AVCodecContext_channel_layout_s","AVCodecContext_channel_layouthi","AVCodecContext_channel_layouthi_s","AVCodecContext_channels","AVCodecContext_channels_s","AVCodecContext_channel_layoutmask","AVCodecContext_channel_layoutmask_s","AVCodecContext_ch_layout_nb_channels","AVCodecContext_ch_layout_nb_channels_s","AVCodecContext_coded_side_data","AVCodecContext_coded_side_data_s","AVCodecContext_compression_level","AVCodecContext_compression_level_s","AVCodecContext_extradata","AVCodecContext_extradata_s","AVCodecContext_extradata_size","AVCodecContext_extradata_size_s","AVCodecContext_frame_size","AVCodecContext_frame_size_s","AVCodecContext_framerate_num","AVCodecContext_framerate_den","AVCodecContext_framerate_num_s","AVCodecContext_framerate_den_s","AVCodecContext_framerate_s","AVCodecContext_gop_size","AVCodecContext_gop_size_s","AVCodecContext_height","AVCodecContext_height_s","AVCodecContext_keyint_min","AVCodecContext_keyint_min_s","AVCodecContext_level","AVCodecContext_level_s","AVCodecContext_max_b_frames","AVCodecContext_max_b_frames_s","AVCodecContext_nb_coded_side_data","AVCodecContext_nb_coded_side_data_s","AVCodecContext_pix_fmt","AVCodecContext_pix_fmt_s","AVCodecContext_profile","AVCodecContext_profile_s","AVCodecContext_rc_max_rate","AVCodecContext_rc_max_rate_s","AVCodecContext_rc_max_ratehi","AVCodecContext_rc_max_ratehi_s","AVCodecContext_rc_min_rate","AVCodecContext_rc_min_rate_s","AVCodecContext_rc_min_ratehi","AVCodecContext_rc_min_ratehi_s","AVCodecContext_sample_aspect_ratio_num","AVCodecContext_sample_aspect_ratio_den","AVCodecContext_sample_aspect_ratio_num_s","AVCodecContext_sample_aspect_ratio_den_s","AVCodecContext_sample_aspect_ratio_s","AVCodecContext_sample_fmt","AVCodecContext_sample_fmt_s","AVCodecContext_sample_rate","AVCodecContext_sample_rate_s","AVCodecContext_str
25ict_std_compliance","AVCodecContext_strict_std_compliance_s","AVCodecContext_time_base_num","AVCodecContext_time_base_den","AVCodecContext_time_base_num_s","AVCodecContext_time_base_den_s","AVCodecContext_time_base_s","AVCodecContext_pkt_timebase_num","AVCodecContext_pkt_timebase_den","AVCodecContext_pkt_timebase_num_s","AVCodecContext_pkt_timebase_den_s","AVCodecContext_pkt_timebase_s","AVCodecContext_qmax","AVCodecContext_qmax_s","AVCodecContext_qmin","AVCodecContext_qmin_s","AVCodecContext_width","AVCodecContext_width_s","avcodec_free_context_js","av_frame_alloc","av_frame_clone","av_frame_free","av_frame_get_buffer","av_frame_make_writable","av_frame_ref","av_frame_unref","av_get_bytes_per_sample","av_get_sample_fmt_name","av_pix_fmt_desc_get","AVPixFmtDescriptor_comp_depth","ff_frame_rescale_ts_js","ff_copyout_frame","ff_copyout_frame_video","ff_frame_video_packed_size","ff_copyout_frame_video_packed","ff_copyout_frame_video_imagedata","ff_copyout_frame_ptr","ff_copyin_frame","AVFrame_channel_layout","AVFrame_channel_layout_s","AVFrame_channel_layouthi","AVFrame_channel_layouthi_s","AVFrame_channels","AVFrame_channels_s","AVFrame_channel_layoutmask","AVFrame_channel_layoutmask_s","AVFrame_ch_layout_nb_channels","AVFrame_ch_layout_nb_channels_s","AVFrame_crop_bottom","AVFrame_crop_bottom_s","AVFrame_crop_left","AVFrame_crop_left_s","AVFrame_crop_right","AVFrame_crop_right_s","AVFrame_crop_top","AVFrame_crop_top_s","AVFrame_data_a","AVFrame_data_a_s","AVFrame_flags","AVFrame_flags_s","AVFrame_format","AVFrame_format_s","AVFrame_height","AVFrame_height_s","AVFrame_key_frame","AVFrame_key_frame_s","AVFrame_linesize_a","AVFrame_linesize_a_s","AVFrame_nb_samples","AVFrame_nb_samples_s","AVFrame_pict_type","AVFrame_pict_type_s","AVFrame_pts","AVFrame_pts_s","AVFrame_ptshi","AVFrame_ptshi_s","AVFrame_duration","AVFrame_duration_s","AVFrame_durationhi","AVFrame_durationhi_s","AVFrame_sample_aspect_ratio_num","AVFrame_sample_aspect_ratio_den","AVFrame_sample_aspect_ratio_num_s","AVFrame_sample_aspect_ratio_den_s","AVFrame_sample_aspect_ratio_s","AVFrame_sample_rate","AVFrame_sample_rate_s","AVFrame_time_base_num","AVFrame_time_base_den","AVFrame_time_base_num_s","AVFrame_time_base_den_s","AVFrame_time_base_s","AVFrame_width","AVFrame_width_s","AVPixFmtDescriptor_flags","AVPixFmtDescriptor_flags_s","AVPixFmtDescriptor_log2_chroma_h","AVPixFmtDescriptor_log2_chroma_h_s","AVPixFmtDescriptor_log2_chroma_w","AVPixFmtDescriptor_log2_chroma_w_s","AVPixFmtDescriptor_nb_components","AVPixFmtDescriptor_nb_components_s","av_frame_free_js","avcodec_descriptor_get","avcodec_descriptor_get_by_name","avcodec_descriptor_next","av_grow_packet","av_packet_alloc","av_packet_clone","av_packet_free","av_packet_make_writable","av_packet_new_side_data","av_packet_ref","av_packet_rescale_ts_js","AVPacketSideData_data","AVPacketSideData_size","AVPacketSideData_type","av_packet_unref","av_shrink_packet","ff_codecpar_new_side_data","av_channel_layout_default_mask","LIBAVCODEC_VERSION_INT","ff_set_packet","ff_copyout_packet","ff_copyout_packet_ptr","ff_copyin_packet","AVCodecDescriptor_id","AVCodecDescriptor_id_s","AVCodecDescriptor_long_name","AVCodecDescriptor_mime_types_a","AVCodecDescriptor_mime_types_a_s","AVCodecDescriptor_name","AVCodecDescriptor_props","AVCodecDescriptor_props_s","AVCodecDescriptor_type","AVCodecDescriptor_type_s","AVCodecParameters_bit_rate","AVCodecParameters_bit_rate_s","AVCodecParameters_channel_layoutmask","AVCodecParameters_channel_layoutmask_s","AVCodecParameters_channels","AVCodecParameters_channels_s","AVCodecParameters_ch_layout_nb_channels","AVCodecParameters_ch_layout_nb_channels_s","AVCodecParameters_chroma_location","AVCodecParameters_chroma_location_s","AVCodecParameters_codec_id","AVCodecParameters_codec_id_s","AVCodecParameters_codec_tag","AVCodecParameters_codec_tag_s","AVCodecParameters_codec_type","AVCodecParameters_codec_type_s","AVCodecParameters_coded_side_data","AVCodecParameters_coded_side_data_s","AVCodecParameters_color_primaries","AVCodecParameters_color_primaries_s","AVCodecParameters_color_range","AVCodecParameters_color_range_s","AVCodecParameters_color_space","AVCodecParameters_color_space_s","AVCodecParameters_color_trc","AVCodecParameters_color_trc_s","AVCodecParameters_extradata","AVCodecParameters_extradata_s","AVCodecParameters_extradata_size","AVCodecParameters_extradata_size_s","AVCodecParameters_format","AVCodecParameters_format_s","AVCodecParameters_framerate_num","AVCodecParameters_framerate_den","AVCodecParameters_framerate_num_s","AVCodecParameters_framerate_den_s","AVCodecParameters_framerate_s","AVCodecParameters_height","AVCodecParameters_height_s","AVCodecParameters_level","AVCodecParameters_level_s","AVCodecParameters_nb_coded_side_data","AVCodecParameters_nb_coded_side_data_s","AVCodecParameters_profile","AVCodecParameters_profile_s","AVCodecParameters_sample_rate","AVCodecParameters_sample_rate_s","AVCodecParameters_width","AVCodecParameters_width_s","AVCodecParameters_block_align","AVCodecParameters_block_align_s","AVCodecParameters_frame_size","AVCodecParameters_frame_size_s","AVCodecParameters_initial_padding","AVCodecParameters_initial_padding_s","AVCodecParameters_trailing_padding","AVCodecParameters_trailing_padding_s","AVCodecParameters_seek_preroll","AVCodecParameters_seek_preroll_s","AVPacket_data","AVPacket_data_s","AVPacket_dts","AVPacket_dts_s","AVPacket_dtshi","AVPacket_dtshi_s","AVPacket_duration","AVPacket_duration_s","AVPacket_durationhi","AVPacket_durationhi_s","AVPacket_flags","AVPacket_flags_s","AVPacket_pos","AVPacket_pos_s","AVPacket_poshi","AVPacket_poshi_s","AVPacket_pts","AVPacket_pts_s","AVPacket_ptshi","AVPacket_ptshi_s","AVPacket_side_data","AVPacket_side_data_s","AVPacket_side_data_elems","AVPacket_side_data_elems_s","AVPacket_size","AVPacket_size_s","AVPacket_stream_index","AVPacket_stream_index_s","AVPacket_time_base_num","AVPacket_time_base_den","AVPacket_time_base_num_s","AVPacket_time_base_den_s","AVPacket_time_base_s","av_packet_free_js","avcodec_parameters_free_js","av_bsf_flush","av_bsf_free","av_bsf_init","av_bsf_list_parse_str","av_bsf_list_parse_str_js","av_bsf_receive_packet","av_bsf_send_packet","ff_bsf_multi","AVBSFContext_par_in","AVBSFContext_par_in_s","AVBSFContext_par_out","AVBSFContext_par_out_s","AVBSFContext_time_base_in_num","AVBSFContext_time_base_in_den","AVBSFContext_time_base_in_num_s","AVBSFContext_time_base_in_den_s","AVBSFContext_time_base_in_s","AVBSFContext_time_base_out_num","AVBSFContext_time_base_out_den","AVBSFContext_time_base_out_num_s","AVBSFContext_time_base_out_den_s","AVBSFContext_time_base_out_s","av_bsf_free_js","av_buffersink_get_frame","av_buffersink_get_time_base_num","av_buffersink_get_time_base_den","av_buffersink_set_frame_size","ff_buffersink_set_ch_layout","av_buffersrc_add_frame_flags","avfilter_free","avfilter_get_by_name","avfilter_graph_alloc","avfilter_graph_config","avfilter_graph_create_filter_js","avfilter_graph_free","avfilter_graph_parse","avfilter_inout_alloc","avfilter_inout_free","avfilter_link","LIBAVFILTER_VERSION_INT","ff_init_filter_graph","ff_filter_multi","ff_decode_filter_multi","AVFilterInOut_filter_ctx","AVFilterInOut_filter_ctx_s","AVFilterInOut_name","AVFilterInOut_name_s","AVFilterInOut_next","AVFilterInOut_next_s","AVFilterInOut_pad_idx","AVFilterInOut_pad_idx_s","avfilter_graph_free_js","avfilter_inout_free_js"],k=["copyin_u8","copyout_u8","copyin_s16","copyout_s16","copyin_s32","copyout_s32","copyin_f32","copyout_f32","createLazyFile","ff_block_reader_dev_send","ff_reader_dev_send","ff_reader_dev_waiting","mkblockreaderdev","mkdev","mkfsfhfile","mkreadaheadfile","mkreaderdev","mkstreamwriterdev","mkworkerfsfile","mkwriterdev","mountwriterfs","readFile","unlink","unlinkfsfhfile","unlinkreadaheadfile","unlinkworkerfsfile","unmount","writeFile"];return f.libavjsMode=I,I==="worker"?(G(y),G(k)):I==="threads"?(G(y),L(k)):(L(y),L(k)),Object.assign(f,n),f})}})();const{base:d_,isWebAssemblySupported:A_,isThreadingSupported:m_,target:p_,VER:E_,CONFIG:h_,DBG:C_,factories:V_,NULL:T_,i64tof64:S_,f64toi64:P_,i64ToBigInt:O_,bigIntToi64:R_,ff_channel_layout:I_,ff_channels:b_,AV_VERSION_INT:L_,AV_TIME_BASE:y_,AV_NOPTS_VALUE_I64:g_,AV_NOPTS_VALUE_LO:M_,A
25V_NOPTS_VALUE_HI:F_,AV_NOPTS_VALUE:v_,AV_OPT_SEARCH_CHILDREN:D_,AVMEDIA_TYPE_UNKNOWN:w_,AVMEDIA_TYPE_VIDEO:N_,AVMEDIA_TYPE_AUDIO:x_,AVMEDIA_TYPE_DATA:k_,AVMEDIA_TYPE_SUBTITLE:U_,AVMEDIA_TYPE_ATTACHMENT:B_,AV_SAMPLE_FMT_NONE:G_,AV_SAMPLE_FMT_U8:X_,AV_SAMPLE_FMT_S16:Y_,AV_SAMPLE_FMT_S32:z_,AV_SAMPLE_FMT_FLT:W_,AV_SAMPLE_FMT_DBL:H_,AV_SAMPLE_FMT_U8P:j_,AV_SAMPLE_FMT_S16P:$_,AV_SAMPLE_FMT_S32P:K_,AV_SAMPLE_FMT_FLTP:q_,AV_SAMPLE_FMT_DBLP:Q_,AV_SAMPLE_FMT_S64:Z_,AV_SAMPLE_FMT_S64P:J_,AV_SAMPLE_FMT_NB:es,AV_PIX_FMT_NONE:ts,AV_PIX_FMT_YUV420P:rs,AV_PIX_FMT_YUYV422:ns,AV_PIX_FMT_RGB24:as,AV_PIX_FMT_BGR24:os,AV_PIX_FMT_YUV422P:_s,AV_PIX_FMT_YUV444P:ss,AV_PIX_FMT_YUV410P:is,AV_PIX_FMT_YUV411P:cs,AV_PIX_FMT_GRAY8:ls,AV_PIX_FMT_MONOWHITE:us,AV_PIX_FMT_MONOBLACK:fs,AV_PIX_FMT_PAL8:ds,AV_PIX_FMT_YUVJ420P:As,AV_PIX_FMT_YUVJ422P:ms,AV_PIX_FMT_YUVJ444P:ps,AV_PIX_FMT_UYVY422:Es,AV_PIX_FMT_UYYVYY411:hs,AV_PIX_FMT_BGR8:Cs,AV_PIX_FMT_BGR4:Vs,AV_PIX_FMT_BGR4_BYTE:Ts,AV_PIX_FMT_RGB8:Ss,AV_PIX_FMT_RGB4:Ps,AV_PIX_FMT_RGB4_BYTE:Os,AV_PIX_FMT_NV12:Rs,AV_PIX_FMT_NV21:Is,AV_PIX_FMT_ARGB:bs,AV_PIX_FMT_RGBA:Ls,AV_PIX_FMT_ABGR:ys,AV_PIX_FMT_BGRA:gs,AV_PIX_FMT_GRAY16BE:Ms,AV_PIX_FMT_GRAY16LE:Fs,AV_PIX_FMT_YUV440P:vs,AV_PIX_FMT_YUVJ440P:Ds,AV_PIX_FMT_YUVA420P:ws,AV_PIX_FMT_RGB48BE:Ns,AV_PIX_FMT_RGB48LE:xs,AV_PIX_FMT_RGB565BE:ks,AV_PIX_FMT_RGB565LE:Us,AV_PIX_FMT_RGB555BE:Bs,AV_PIX_FMT_RGB555LE:Gs,AV_PIX_FMT_BGR565BE:Xs,AV_PIX_FMT_BGR565LE:Ys,AV_PIX_FMT_BGR555BE:zs,AV_PIX_FMT_BGR555LE:Ws,AVCOL_PRI_RESERVED0:Hs,AVCOL_PRI_BT709:js,AVCOL_PRI_UNSPECIFIED:$s,AVCOL_PRI_RESERVED:Ks,AVCOL_PRI_BT470M:qs,AVCOL_PRI_BT470BG:Qs,AVCOL_PRI_SMPTE170M:Zs,AVCOL_PRI_SMPTE240M:Js,AVCOL_PRI_FILM:ei,AVCOL_PRI_BT2020:ti,AVCOL_PRI_SMPTE428:ri,AVCOL_PRI_SMPTEST428_1:ni,AVCOL_PRI_SMPTE431:ai,AVCOL_PRI_SMPTE432:oi,AVCOL_PRI_EBU3213:_i,AVCOL_PRI_JEDEC_P22:si,AVCOL_TRC_RESERVED0:ii,AVCOL_TRC_BT709:ci,AVCOL_TRC_UNSPECIFIED:li,AVCOL_TRC_RESERVED:ui,AVCOL_TRC_GAMMA22:fi,AVCOL_TRC_GAMMA28:di,AVCOL_TRC_SMPTE170M:Ai,AVCOL_TRC_SMPTE240M:mi,AVCOL_TRC_LINEAR:pi,AVCOL_TRC_LOG:Ei,AVCOL_TRC_LOG_SQRT:hi,AVCOL_TRC_IEC61966_2_4:Ci,AVCOL_TRC_BT1361_ECG:Vi,AVCOL_TRC_IEC61966_2_1:Ti,AVCOL_TRC_BT2020_10:Si,AVCOL_TRC_BT2020_12:Pi,AVCOL_TRC_SMPTE2084:Oi,AVCOL_TRC_SMPTEST2084:Ri,AVCOL_TRC_SMPTE428:Ii,AVCOL_TRC_SMPTEST428_1:bi,AVCOL_TRC_ARIB_STD_B67:Li,AVCOL_SPC_RGB:yi,AVCOL_SPC_BT709:gi,AVCOL_SPC_UNSPECIFIED:Mi,AVCOL_SPC_RESERVED:Fi,AVCOL_SPC_FCC:vi,AVCOL_SPC_BT470BG:Di,AVCOL_SPC_SMPTE170M:wi,AVCOL_SPC_SMPTE240M:Ni,AVCOL_SPC_YCGCO:xi,AVCOL_SPC_YCOCG:ki,AVCOL_SPC_BT2020_NCL:Ui,AVCOL_SPC_BT2020_CL:Bi,AVCOL_SPC_SMPTE2085:Gi,AVCOL_SPC_CHROMA_DERIVED_NCL:Xi,AVCOL_SPC_CHROMA_DERIVED_CL:Yi,AVCOL_SPC_ICTCP:zi,AVCOL_RANGE_UNSPECIFIED:Wi,AVCOL_RANGE_MPEG:Hi,AVCOL_RANGE_JPEG:ji,AVIO_FLAG_READ:$i,AVIO_FLAG_WRITE:Ki,AVIO_FLAG_READ_WRITE:qi,AVIO_FLAG_NONBLOCK:Qi,AVIO_FLAG_DIRECT:Zi,AVFMT_FLAG_NOBUFFER:Ji,AVFMT_FLAG_FLUSH_PACKETS:ec,AVSEEK_FLAG_BACKWARD:tc,AVSEEK_FLAG_BYTE:rc,AVSEEK_FLAG_ANY:nc,AVSEEK_FLAG_FRAME:ac,AVDISCARD_NONE:oc,AVDISCARD_DEFAULT:_c,AVDISCARD_NONREF:sc,AVDISCARD_BIDIR:ic,AVDISCARD_NONINTRA:cc,AVDISCARD_NONKEY:lc,AVDISCARD_ALL:uc,AV_LOG_QUIET:fc,AV_LOG_PANIC:dc,AV_LOG_FATAL:Ac,AV_LOG_ERROR:mc,AV_LOG_WARNING:pc,AV_LOG_INFO:Ec,AV_LOG_VERBOSE:hc,AV_LOG_DEBUG:Cc,AV_LOG_TRACE:Vc,AV_PKT_FLAG_KEY:Tc,AV_PKT_FLAG_CORRUPT:Sc,AV_PKT_FLAG_DISCARD:Pc,AV_PKT_FLAG_TRUSTED:Oc,AV_PKT_FLAG_DISPOSABLE:Rc,SWS_FAST_BILINEAR:Ic,SWS_BILINEAR:bc,SWS_BICUBIC:Lc,SWS_X:yc,SWS_POINT:gc,SWS_AREA:Mc,SWS_BICUBLIN:Fc,SWS_GAUSS:vc,SWS_SINC:Dc,SWS_LANCZOS:wc,SWS_SPLINE:Nc,E2BIG:xc,EPERM:kc,EADDRINUSE:Uc,EADDRNOTAVAIL:Bc,EAFNOSUPPORT:Gc,EAGAIN:Xc,EALREADY:Yc,EBADF:zc,EBADMSG:Wc,EBUSY:Hc,ECANCELED:jc,ECHILD:$c,ECONNABORTED:Kc,ECONNREFUSED:qc,ECONNRESET:Qc,EDEADLOCK:Zc,EDESTADDRREQ:Jc,EDOM:el,EDQUOT:tl,EEXIST:rl,EFAULT:nl,EFBIG:al,EHOSTUNREACH:ol,EIDRM:_l,EILSEQ:sl,EINPROGRESS:il,EINTR:cl,EINVAL:ll,EIO:ul,EISCONN:fl,EISDIR:dl,ELOOP:Al,EMFILE:ml,EMLINK:pl,EMSGSIZE:El,EMULTIHOP:hl,ENAMETOOLONG:Cl,ENETDOWN:Vl,ENETRESET:Tl,ENETUNREACH:Sl,ENFILE:Pl,ENOBUFS:Ol,ENODEV:Rl,ENOENT:Il,AVERROR_EOF:bl,LibAV:wo}=R,No=1024;class xo{constructor(e,r,a,n,_,s){this._codec=e,this._sampleRate=r,this._numberOfChannels=a,this._onQueueSizeChange=n,this._handleError=_,this._handleEncode=s,this._queue=new yo(this._numberOfChannels)}_codec;_sampleRate;_numberOfChannels;_onQueueSizeChange;_handleError;_handleEncode;_queue;_libav=null;_context=null;_decoderConfig=null;_numFetched=0;get name(){return"libav"}get config(){return this._decoderConfig?{codec:this._decoderConfig.codec,sampleRate:this._decoderConfig.sampleRate,numberOfChannels:this._decoderConfig.numberOfChannels}:null}init=async()=>{const{mjsUrl:e,wasmUrl:r}=await Do();this._libav=await wo({toImport:e,wasmurl:r,noworker:!0});const a=Uo(this._codec),n=await Bo(this._libav,this._codec,this._sampleRate,this._numberOfChannels),[_,s,c,u,A]=await this._libav.ff_init_encoder(a,{
25ctx:n});return this._context={c:s,codec:_,frame:c,pkt:u,frame_size:A||No,format:n.sample_fmt},this._decoderConfig=await this._getDecoderConfig(s),this};encode=async e=>{try{if(e.type!=="audio")throw N(g.AUDIO_LOGIC_ERR,"Invalid input type in LibAVAudioEncoder.encode()");if(!this._queue||!this._context||!this._libav)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in LibAVAudioEncoder.encode()");const r=e.data;this._queue.push(Lo(r));const a=this._fetchFrames({flush:!1}),n=await this._libav.ff_encode_multi(this._context.c,this._context.frame,this._context.pkt,a,!1);for(const _ of n){const s=_.data,c=this._toMuxMetadata(_);c.audio&&c.audio.timestamp<0||await this._handleEncode(s,c)}this._onQueueSizeChange(0)}catch(r){this._handleError(N(g.AUDIO_ENCODE_ERR,r))}};finalize=async()=>{if(!this._context||!this._libav)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in LibAVAudioEncoder.finalize()");try{const e=this._fetchFrames({flush:!0}),r=await this._libav.ff_encode_multi(this._context.c,this._context.frame,this._context.pkt,e,!0);for(const a of r){const n=a.data,_=this._toMuxMetadata(a);_.audio&&_.audio.timestamp<0||await this._handleEncode(n,_)}}catch(e){this._handleError(N(g.AUDIO_ENCODE_ERR,e))}};cancel=async()=>{await this._cleanup()};destroy=async()=>{await this._cleanup()};_cleanup=async()=>{if(!(!this._libav||!this._context))try{await this._libav.ff_encode_multi(this._context.c,this._context.frame,this._context.pkt,[],!0),await this._libav.ff_free_encoder(this._context.c,this._context.frame,this._context.pkt)}finally{this._queue.destroy(),this._numFetched=0,this._libav=null,this._context=null}};_fetchFrames=({flush:e})=>{if(!this._context||!this._numberOfChannels||!this._libav)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in LibAVAudioEncoder._fetchFrames()");const r=this._context.format,a=r===this._libav.AV_SAMPLE_FMT_FLTP,n=1,_=this._sampleRate,s=this._numberOfChannels,c=this._context.frame_size,u=[];for(;this._queue.length&&!(!e&&this._queue.length<c);){const A=Math.min(c,this._queue.length),C=this._queue.shift(A),S=xr(this._numFetched,this._sampleRate),f=xr(A,this._sampleRate),[I,G]=Zt(tn(S,_,n)),[L,y]=Zt(tn(f,_,n));u.push({data:a?C:ko(C),pts:G,ptshi:I,duration:y,durationhi:L,time_base_num:n,time_base_den:_,format:r,channels:s,sample_rate:this._sampleRate,nb_samples:C[0].length,key_frame:1}),this._numFetched+=A}return u};_getDecoderConfig=async e=>{const r=this._libav;if(!r)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in LibAVAudioEncoder._getDecoderConfig()");const a=await r.avcodec_parameters_alloc();await r.avcodec_parameters_from_context(a,e);const n=await r.ff_copyout_codecpar(a);return await Io(r,n)};_toMuxMetadata=e=>{if(!this._decoderConfig)throw N(g.AUDIO_LOGIC_ERR,"DecoderConfig is null in LibAVAudioEncoder._toMuxMetadata()");const r=en(Jr(e.ptshi,e.pts),e.time_base_num,e.time_base_den),a=en(Jr(e.durationhi,e.duration),e.time_base_num,e.time_base_den);return{audio:{timestamp:r.as.us("round"),duration:a.as.us("round"),isKeyFrame:!0,chunkMeta:{decoderConfig:this._decoderConfig}}}}}const ko=t=>{const e=t[0].length,r=t.length,a=new Float32Array(e*r);for(let n=0;n<e;n++)for(let _=0;_<r;_++)a[n*r+_]=t[_][n];return a},Uo=t=>{switch(t){case"wav":return"pcm_f32le";case"mp3":return"libmp3lame";case"aac":return"aac"}},Bo=async(t,e,r,a)=>{const n=await t.av_channel_layout_default_mask(a);if(n===0)throw new Error(`Unsupported number of channels: ${a}`);const[_,s]=Zt(n);switch(e){case"wav":return{sample_fmt:t.AV_SAMPLE_FMT_FLT,sample_rate:r,channel_layout:s,channel_layouthi:_};case"mp3":return{sample_fmt:t.AV_SAMPLE_FMT_FLTP,sample_rate:r,channel_layout:s,channel_layouthi:_};case"aac":return{sample_fmt:t.AV_SAMPLE_FMT_FLTP,sample_rate:r,channel_layout:s,channel_layouthi:_}}};var tr=function(t,e){return tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(r[n]=a[n])},tr(t,e)};function $e(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");tr(t,e);function r(){this.constructor=t}
vendor: 6,802 bytes, lines 25-27
25t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}function rr(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],a=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&a>=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function nr(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var a=r.call(t),n,_=[],s;try{for(;(e===void 0||e-- >0)&&!(n=a.next()).done;)_.push(n.value)}catch(c){s={error:c}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(s)throw s.error}}return _}function ar(t,e,r){if(arguments.length===2)for(var a=0,n=e.length,_;a<n;a++)(_||!(a in e))&&(_||(_=Array.prototype.slice.call(e,0,a)),_[a]=e[a]);return t.concat(_||Array.prototype.slice.call(e))}function ne(t){return typeof t=="function"}function vn(t){var e=function(a){Error.call(a),a.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var jt=vn(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
26`+r.map(function(a,n){return n+1+") "+a.toString()}).join(`
27  `):"",this.name="UnsubscriptionError",this.errors=r}});function or(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Tt=(function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,a,n,_;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var c=rr(s),u=c.next();!u.done;u=c.next()){var A=u.value;A.remove(this)}}catch(L){e={error:L}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(e)throw e.error}}else s.remove(this);var C=this.initialTeardown;if(ne(C))try{C()}catch(L){_=L instanceof jt?L.errors:[L]}var S=this._finalizers;if(S){this._finalizers=null;try{for(var f=rr(S),I=f.next();!I.done;I=f.next()){var G=I.value;try{an(G)}catch(L){_=_??[],L instanceof jt?_=ar(ar([],nr(_)),nr(L.errors)):_.push(L)}}}catch(L){a={error:L}}finally{try{I&&!I.done&&(n=f.return)&&n.call(f)}finally{if(a)throw a.error}}}if(_)throw new jt(_)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)an(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&or(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&or(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=(function(){var e=new t;return e.closed=!0,e})(),t})(),Dn=Tt.EMPTY;function wn(t){return t instanceof Tt||t&&"closed"in t&&ne(t.remove)&&ne(t.add)&&ne(t.unsubscribe)}function an(t){ne(t)?t():t.unsubscribe()}var Go={Promise:void 0},Xo={setTimeout:function(t,e){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];return setTimeout.apply(void 0,ar([t,e],nr(r)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Yo(t){Xo.setTimeout(function(){throw t})}function on(){}function pt(t){t()}var cr=(function(t){$e(e,t);function e(r){var a=t.call(this)||this;return a.isStopped=!1,r?(a.destination=r,wn(r)&&r.add(a)):a.destination=Ho,a}return e.create=function(r,a,n){return new _r(r,a,n)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e})(Tt),zo=(function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(a){dt(a)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(a){dt(a)}else dt(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){dt(r)}},t})(),_r=(function(t){$e(e,t);function e(r,a,n){var _=t.call(this)||this,s;return ne(r)||!r?s={next:r??void 0,error:a??void 0,complete:n??void 0}:s=r,_.destination=new zo(s),_}return e})(cr);function dt(t){Yo(t)}function Wo(t){throw t}var Ho={closed:!0,next:on,error:Wo,complete:on},jo=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Nn(t){return t}function $o(t){return t.length===0?Nn:t.length===1?t[0]:function(r){return t.reduce(function(a,n){return n(a)},r)}}var _n=(function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,a){var n=this,_=qo(e)?e:new _r(e,r,a);return pt(function(){var s=n,c=s.operator,u=s.source;_.add(c?c.call(_,u):u?n._subscribe(_):n._trySubscribe(_))}),_},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var a=this;return r=sn(r),new r(function(n,_){var s=new _r({next:function(c){try{e(c)}catch(u){_(u),s.unsubscribe()}},error:_,complete:n});a.subscribe(s)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[jo]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return $o(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=sn(e),new e(function(a,n){var _;r.subscribe(function(s){return _=s},function(s){return n(s)},function(){return a(_)})})},t.create=function(e){return new t(e)},t})();function sn(t){var e;return(e=t??Go.Promise)!==null&&e!==void 0?e:Promise}function Ko(t){return t&&ne(t.next)&&ne(t.error)&&ne(t.complete)}function qo(t){return t&&t instanceof cr||Ko(t)&&wn(t)}function Qo(t){return ne(t?.lift)}function Zo(t){return function(e){if(Qo(e))return e.lift(function(r){try{return t(r,this)}catch(a){this.error(a)}});throw new TypeError("Unable to lift unknown Observable type")}}function Jo(t,e,r,a,n){return new e_(t,e,r,a,n)}var e_=(function(t){$e(e,t);function e(r,a,n,_,s,c){var u=t.call(this,r)||this;return u.onFinalize=s,u.shouldUnsubscribe=c,u._next=a?function(A){try{a(A)}catch(C){r.error(C)}}
27:t.prototype._next,u._error=_?function(A){try{_(A)}catch(C){r.error(C)}finally{this.unsubscribe()}}:t.prototype._error,u._complete=n?function(){try{n()}catch(A){r.error(A)}finally{this.unsubscribe()}}:t.prototype._complete,u}return e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var a=this.closed;t.prototype.unsubscribe.call(this),!a&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e})(cr),t_=vn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),xn=(function(t){$e(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var a=new cn(this,this);return a.operator=r,a},e.prototype._throwIfClosed=function(){if(this.closed)throw new t_},e.prototype.next=function(r){var a=this;pt(function(){var n,_;if(a._throwIfClosed(),!a.isStopped){a.currentObservers||(a.currentObservers=Array.from(a.observers));try{for(var s=rr(a.currentObservers),c=s.next();!c.done;c=s.next()){var u=c.value;u.next(r)}}catch(A){n={error:A}}finally{try{c&&!c.done&&(_=s.return)&&_.call(s)}finally{if(n)throw n.error}}}})},e.prototype.error=function(r){var a=this;pt(function(){if(a._throwIfClosed(),!a.isStopped){a.hasError=a.isStopped=!0,a.thrownError=r;for(var n=a.observers;n.length;)n.shift().error(r)}})},e.prototype.complete=function(){var r=this;pt(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var a=r.observers;a.length;)a.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var a=this,n=this,_=n.hasError,s=n.isStopped,c=n.observers;return _||s?Dn:(this.currentObservers=null,c.push(r),new Tt(function(){a.currentObservers=null,or(c,r)}))},e.prototype._checkFinalizedStatuses=function(r){var a=this,n=a.hasError,_=a.thrownError,s=a.isStopped;n?r.error(_):s&&r.complete()},e.prototype.asObservable=function(){var r=new _n;return r.source=this,r},e.create=function(r,a){return new cn(r,a)},e})(_n),cn=(function(t){$e(e,t);function e(r,a){var n=t.call(this)||this;return n.destination=r,n.source=a,n}return e.prototype.next=function(r){var a,n;(n=(a=this.destination)===null||a===void 0?void 0:a.next)===null||n===void 0||n.call(a,r)},e.prototype.error=function(r){var a,n;(n=(a=this.destination)===null||a===void 0?void 0:a.error)===null||n===void 0||n.call(a,r)},e.prototype.complete=function(){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||a===void 0||a.call(r)},e.prototype._subscribe=function(r){var a,n;return(n=(a=this.source)===null||a===void 0?void 0:a.subscribe(r))!==null&&n!==void 0?n:Dn},e})(xn);function r_(t,e,r){var a=ne(t)||e||r?{next:t,error:e,complete:r}:t;return a?Zo(function(n,_){var s;(s=a.subscribe)===null||s===void 0||s.call(a);var c=!0;n.subscribe(Jo(_,function(u){var A;(A=a.next)===null||A===void 0||A.call(a,u),_.next(u)},function(){var u;c=!1,(u=a.complete)===null||u===void 0||u.call(a),_.complete()},function(u){var A;c=!1,(A=a.error)===null||A===void 0||A.call(a,u),_.error(u)},function(){var u,A;c&&((u=a.unsubscribe)===null||u===void 0||u.call(a)),(A=a.finalize)===null||A===void 0||A.call(a)}))}):Nn}class n_{constructor(e,r,a,n,_,s,c){this._codec=e,this._sampleRate=r,this._numberOfChannels=a,this._logger=n,this._onQueueSizeChange=_,this._handleError=s,this._handleEncode=c,this._encoder=new AudioEncoder({output:this._onOutput,error:this._onError}),this._encoder.addEventListener("dequeue",()=>{this._encoderObsv$.next(this._encoder.encodeQueueSize)}),this._subscription=this._getEncoderQueueSizeSubscription()}_codec;_sampleRate;_numberOfChannels;_logger;_onQueueSizeChange;_handleError;_handleEncode;_encoder;_config=null;_encoderObsv$=new xn;_subscription;get name(){return"webcodecs"}get config(){return this._config}init=async()=>(this._config=await a_(this._codec,this._sampleRate,this._numberOfChannels),this._encoder.configure(this._config),this);encode=async e=>{if(e.type!=="audio")throw N(g.AUDIO_LOGIC_ERR,"Invalid input type in WebCodecsAudioEncoder.encode()");if(this._encoder.state==="closed")return;const r=e.data;this._encoder.encode(r),r.close()};finalize=async()=>
27{if(this._encoder.state==="closed"){this._logger.warn(null,"finalize() called on closed encoder");return}await this._encoder.flush()};cancel=async()=>{this.destroy()};destroy=()=>{this._encoder.state==="configured"&&this._encoder.close(),this._subscription.unsubscribe()};_onOutput=(e,r)=>{const a=new Uint8Array(e.byteLength);e.copyTo(a);const n=e.timestamp,_=e.duration,s=e.type==="key";this._handleEncode(a,{audio:{timestamp:n,duration:_,isKeyFrame:s,chunkMeta:r}})};_onError=e=>{this._handleError(N(g.AUDIO_ENCODE_ERR,e,"Error encoding audio in WebCodecsAudioEncoder"))};_getEncoderQueueSizeSubscription(){return this._encoderObsv$.asObservable().pipe(r_(e=>this._onQueueSizeChange(e))).subscribe()}}const a_=async(t,e,r)=>{for await(const a of bo(t)){const n={codec:a,sampleRate:e,numberOfChannels:r},_=await AudioEncoder.isConfigSupported(n);if(_.supported&&_.config!==void 0)return _.config}throw new Error(`No supported encoder config: ${t}, ${e}, ${r}`)},o_=(t,e,r)=>({debug:r?(...a)=>t.debug(...a):()=>{},verbose:(...a)=>t.verbose(...a),info:(...a)=>t.info(...a),warn:(...a)=>t.warn(...a),error:(...a)=>t.error(...a)});let ae=null;const __=async(t,e,r,a,n,_,s,c,u,A)=>{if(ae)return;const C=o_(n,_,s);ae=new u_(t,e,r,a,C,c,u,A),await ae.init()},s_=async t=>{if(!ae)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in encode");await ae.encode(t)},i_=async()=>{if(!ae)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in finalize");await ae.finalize()},c_=async()=>{if(!ae)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in cancel");await ae.cancel()},l_=async()=>{try{await ae?.destroy(),ae=null}finally{globalThis.close()}};class u_{_factories=[];_current=null;_logger;constructor(e,r,a,n,_,s,c,u){this._logger=_,e==="aac"&&!n&&this._factories.push(()=>new n_(e,r,a,_,s,c,u)),this._factories.push(()=>new xo(e,r,a,s,c,u))}init=async()=>{let e=null;for(;this._factories.length>0;)try{const a=this._factories.shift()();return await a.init(),this._current=a,this._logger.info(null,`${a.name} encoder initialized. ${JSON.stringify(a.config??{})}`),this}catch(r){e=r;const a=N(void 0,r);this._logger.warn(null,`Failed to init. try next... ${a.message}`),await this._current?.destroy(),this._current=null}throw N(g.AUDIO_ENCODER_CONFIG_ERR,e,"Failed to initialize AudioEncoder")};encode=async e=>{if(!this._current)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in AudioEncoder.encode()");try{await this._current.encode(e)}catch(r){this._logger.warn(null,`Failed to encode. try next... ${We(r)}`),await this._current?.destroy(),this._current=null;const a=this._factories.shift();if(!a)throw r;const n=a();return this._current=await n.init(),this.encode(e)}};finalize=async()=>{if(!this._current)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in AudioEncoder.finalize()");await this._current.finalize()};cancel=async()=>{if(!this._current)throw N(g.AUDIO_LOGIC_ERR,"Encoder not initialized in AudioEncoder.cancel()");await this._current.cancel()};destroy=async()=>{await this._current?.destroy(),this._factories.splice(0,this._factories.length),this._current=null}}var f_=Object.freeze({__proto__:null,cancel:c_,destroy:l_,encode:s_,finalize:i_,init:__});sr(f_);
28//# sourceMappingURL=encoder.audio.worker-DPSFqGfj.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.