var OGVDecoderVideoAV1W = (() => { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; return ( function(OGVDecoderVideoAV1W) { OGVDecoderVideoAV1W = OGVDecoderVideoAV1W || {}; var a;a||(a=typeof OGVDecoderVideoAV1W !== 'undefined' ? OGVDecoderVideoAV1W : {});var aa,q;a.ready=new Promise(function(b,c){aa=b;q=c});var ba=a,ca=Object.assign({},a),da="object"==typeof window,r="function"==typeof importScripts,A="",ea,F,G,fs,I,fa; if("object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node)A=r?require("path").dirname(A)+"/":__dirname+"/",fa=()=>{I||(fs=require("fs"),I=require("path"))},ea=function(b,c){fa();b=I.normalize(b);return fs.readFileSync(b,c?void 0:"utf8")},G=b=>{b=ea(b,!0);b.buffer||(b=new Uint8Array(b));return b},F=(b,c,f)=>{fa();b=I.normalize(b);fs.readFile(b,function(d,e){d?f(d):c(e.buffer)})},1{var c=new XMLHttpRequest;c.open("GET",b,!1);c.send(null);return c.responseText},r&&(G=b=>{var c=new XMLHttpRequest;c.open("GET",b,!1);c.responseType= "arraybuffer";c.send(null);return new Uint8Array(c.response)}),F=(b,c,f)=>{var d=new XMLHttpRequest;d.open("GET",b,!0);d.responseType="arraybuffer";d.onload=()=>{200==d.status||0==d.status&&d.response?c(d.response):f()};d.onerror=f;d.send(null)};var ha=a.print||console.log.bind(console),J=a.printErr||console.warn.bind(console);Object.assign(a,ca);ca=null;var K;a.wasmBinary&&(K=a.wasmBinary);var noExitRuntime=a.noExitRuntime||!0;"object"!=typeof WebAssembly&&M("no native wasm support detected"); var N,ia=!1,ja="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ka,O,P;function la(){var b=N.buffer;ka=b;a.HEAP8=new Int8Array(b);a.HEAP16=new Int16Array(b);a.HEAP32=P=new Int32Array(b);a.HEAPU8=O=new Uint8Array(b);a.HEAPU16=new Uint16Array(b);a.HEAPU32=new Uint32Array(b);a.HEAPF32=new Float32Array(b);a.HEAPF64=new Float64Array(b)}var ma,na=[],oa=[],pa=[];function qa(){var b=a.preRun.shift();na.unshift(b)}var Q=0,ra=null,R=null;a.preloadedImages={};a.preloadedAudios={}; function M(b){if(a.onAbort)a.onAbort(b);b="Aborted("+b+")";J(b);ia=!0;b=new WebAssembly.RuntimeError(b+". Build with -s ASSERTIONS=1 for more info.");q(b);throw b;}function sa(){return S.startsWith("data:application/octet-stream;base64,")}var S;S="ogv-decoder-video-av1-wasm.wasm";if(!sa()){var ta=S;S=a.locateFile?a.locateFile(ta,A):A+ta}function ua(){var b=S;try{if(b==S&&K)return new Uint8Array(K);if(G)return G(b);throw"both async and sync fetching of the wasm failed";}catch(c){M(c)}} function va(){if(!K&&(da||r)){if("function"==typeof fetch&&!S.startsWith("file://"))return fetch(S,{credentials:"same-origin"}).then(function(b){if(!b.ok)throw"failed to load wasm binary file at '"+S+"'";return b.arrayBuffer()}).catch(function(){return ua()});if(F)return new Promise(function(b,c){F(S,function(f){b(new Uint8Array(f))},c)})}return Promise.resolve().then(function(){return ua()})} function wa(b){for(;0=T.length&&(T.length=b+1),T[b]=c=ma.get(b));return c} var Ja=[null,[],[]],Ka={f:function(){M("")},e:function(b,c,f){O.copyWithin(b,c,c+f)},c:function(b){var c=O.length;b>>>=0;if(2147483648=f;f*=2){var d=c*(1+.2/f);d=Math.min(d,b+100663296);var e=Math;d=Math.max(b,d);e=e.min.call(e,2147483648,d+(65536-d%65536)%65536);a:{try{N.grow(e-ka.byteLength+65535>>>16);la();var g=1;break a}catch(w){}g=void 0}if(g)return!0}return!1},d:function(){return 0},b:function(){},a:function(b,c,f,d){for(var e=0,g=0;g>2],u=P[c+4>> 2];c+=8;for(var y=0;y=t);)++v;if(16h?t+=String.fromCharCode(h):(h-=65536,t+=String.fromCharCode(55296|h>>10,56320|h&1023))}}else t+=String.fromCharCode(h)}l= t}n(l);x.length=0}else x.push(n)}e+=u}P[d>>2]=e;return 0},g:function(b,c,f,d,e,g,w,u,y,n,x,l,p,t,v,h){function B(H,k,C,xa,ya,za,Ma,Na,V){H.set(new Uint8Array(U,k,C*xa));var D,z;for(D=z=0;D=d||(X&&a._free(X),Pa=d,X=a._malloc(Pa));var e=X;(new Uint8Array(N.buffer,e,d)).set(new Uint8Array(b));return a._ogv_video_decoder_process_header(e,d)});c(f)};a.A=[]; a.processFrame=function(b,c){function f(u){a._free(g);c(u)}var d=a._ogv_video_decoder_async(),e=b.byteLength,g=a._malloc(e);d&&a.A.push(f);var w=Z(function(){(new Uint8Array(N.buffer,g,e)).set(new Uint8Array(b));return a._ogv_video_decoder_process_frame(g,e)});d||f(w)};a.close=function(){};a.sync=function(){a._ogv_video_decoder_async()&&(a.A.push(function(){}),Z(function(){a._ogv_video_decoder_process_frame(0,0)}))};a.recycledFrames=[]; a.recycleFrame=function(b){var c=a.recycledFrames;c.push(b);16