55 lines
282 KiB
JavaScript
55 lines
282 KiB
JavaScript
var Lt=Object.defineProperty;var Dt=(p,a,h)=>a in p?Lt(p,a,{enumerable:!0,configurable:!0,writable:!0,value:h}):p[a]=h;var j=(p,a,h)=>Dt(p,typeof a!="symbol"?a+"":a,h);import{n as Rt,f as V,m as ht,a as M,p as sA,c as dA,B as Mt,s as zA}from"./props-b4vEeO_8.js";import{ae as pt,B as YA,a4 as fA,ah as Ot,I as R,F,J as q,k as m,G as jA,a3 as $,C as AA,h as Me,ag as Nt,N as vA,af as Ht,T as pe,n as Oe,D as Ne}from"./runtime-C3rQLW--.js";import{i as W,s as uA,c as Vt}from"./svelte-component-C8Ginrj8.js";import{b as ct}from"./window-DXjFTZv5.js";import{c as Gt,d as Yt}from"./create-runtime-stories-7AWWVphH.js";import{a as ft}from"./index-client-BAw8T8-V.js";import{s as ut}from"./snippet-C5kbqVpq.js";import{s as He,a as Ee}from"./attributes-Cg6aLqN3.js";import{s as K}from"./style-DvJ3IcV1.js";import{b as ee}from"./size-DMdj3-I9.js";import{b as ue}from"./this-CrUBQEQ_.js";import{T as jt}from"./tweened-4Ja_XIbT.js";import{S as gt}from"./ScrollerBase-DJMKplMV.js";import{e as Ie,i as Fe}from"./each-CVpBMMjG.js";import{t as Ve,f as Ge}from"./index-CCfEE_8A.js";import{B as ae}from"./Block-D3Ui8rd-.js";import{M as Wt}from"./Markdown-DUxFwijc.js";import{H as Qt}from"./Headline-C-tkYFZ6.js";import{B as cA}from"./BodyText-CXnxLnBi.js";var qt="2.0.9",Kt=500,Ye="user-agent",NA="",je="?",Z={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},aA="browser",xA="cpu",yA="device",_A="engine",hA="os",HA="result",S="name",y="type",B="vendor",E="version",iA="architecture",$A="major",x="model",oe="console",H="mobile",Q="tablet",J="smarttv",mA="wearable",ie="xr",JA="embedded",Xt="fetcher",LA="inapp",ze="brands",IA="formFactors",Le="fullVersionList",VA="platform",De="platformVersion",ce="bitness",CA="sec-ch-ua",Zt=CA+"-full-version-list",Jt=CA+"-arch",$t=CA+"-"+ce,Ai=CA+"-form-factors",ei=CA+"-"+H,ti=CA+"-"+x,vt=CA+"-"+VA,ii=vt+"-version",_t=[ze,Le,H,x,VA,De,iA,IA,ce],se="Amazon",DA="Apple",We="ASUS",Qe="BlackBerry",PA="Google",qe="Huawei",ge="Lenovo",Ke="Honor",re="LG",ve="Microsoft",_e="Motorola",Xe="Nvidia",Ze="OnePlus",me="OPPO",qA="Samsung",Je="Sharp",KA="Sony",ye="Xiaomi",be="Zebra",$e="Chrome",At="Chromium",BA="Chromecast",le="Edge",XA="Firefox",RA="Opera",we="Facebook",et="Sogou",MA="Mobile ",OA=" Browser",Be="Windows",si=typeof window!==Z.UNDEFINED,nA=si&&window.navigator?window.navigator:void 0,FA=nA&&nA.userAgentData?nA.userAgentData:void 0,ri=function(p,a){var h={},o=a;if(!de(a)){o={};for(var U in a)for(var w in a[U])o[w]=a[U][w].concat(o[w]?o[w]:[])}for(var u in p)h[u]=o[u]&&o[u].length%2===0?o[u].concat(p[u]):p[u];return h},fe=function(p){for(var a={},h=0;h<p.length;h++)a[p[h].toUpperCase()]=p[h];return a},Te=function(p,a){if(typeof p===Z.OBJECT&&p.length>0){for(var h in p)if(TA(a)==TA(p[h]))return!0;return!1}return te(p)?TA(a)==TA(p):!1},de=function(p,a){for(var h in p)return/^(browser|cpu|device|engine|os)$/.test(h)||(a?de(p[h]):!1)},te=function(p){return typeof p===Z.STRING},xe=function(p){if(p){for(var a=[],h=GA(/\\?\"/g,p).split(","),o=0;o<h.length;o++)if(h[o].indexOf(";")>-1){var U=he(h[o]).split(";v=");a[o]={brand:U[0],version:U[1]}}else a[o]=he(h[o]);return a}},TA=function(p){return te(p)?p.toLowerCase():p},ke=function(p){return te(p)?GA(/[^\d\.]/g,p).split(".")[0]:void 0},wA=function(p){for(var a in p)if(p.hasOwnProperty(a)){var h=p[a];typeof h==Z.OBJECT&&h.length==2?this[h[0]]=h[1]:this[h]=void 0}return this},GA=function(p,a){return te(a)?a.replace(p,NA):a},ZA=function(p){return GA(/\\?\"/g,p)},he=function(p,a){return p=GA(/^\s\s*/,String(p)),typeof a===Z.UNDEFINED?p:p.substring(0,a)},Ce=function(p,a){if(!(!p||!a))for(var h=0,o,U,w,u,s,T;h<a.length&&!s;){var P=a[h],z=a[h+1];for(o=U=0;o<P.length&&!s&&P[o];)if(s=P[o++].exec(p),s)for(w=0;w<z.length;w++)T=s[++U],u=z[w],typeof u===Z.OBJECT&&u.length>0?u.length===2?typeof u[1]==Z.FUNCTION?this[u[0]]=u[1].call(this,T):this[u[0]]=u[1]:u.length>=3&&(typeof u[1]===Z.FUNCTION&&!(u[1].exec&&u[1].test)?u.length>3?this[u[0]]=T?u[1].apply(this,u.slice(2)):void 0:this[u[0]]=T?u[1].call(this,T,u[2]):void 0:u.length==3?this[u[0]]=T?T.replace(u[1],u[2]):void 0:u.length==4?this[u[0]]=T?u[3].call(this,T.replace(u[1],u[2])):void 0:u.length>4&&(this[u[0]]=T?u[3].apply(this,[T.replace(u[1],u[2])].concat(u.slice(4))):void 0)):this[u]=T||void 0;h+=2}},gA=function(p,a){for(var h in a)if(typeof a[h]===Z.OBJECT&&a[h].length>0){for(var o=0;o<a[h].length;o++)if(Te(a[h][o],p))return h===je?void 0:h}else if(Te(a[h],p))return h===je?void 0:h;return a.hasOwnProperty("*")?a["*"]:p},tt={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},it={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ni={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},st={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[E,[S,MA+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[E,[S,le+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[E,[S,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[S,E],[/opios[\/ ]+([\w\.]+)/i],[E,[S,RA+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[E,[S,RA+" GX"]],[/\bopr\/([\w\.]+)/i],[E,[S,RA]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[E,[S,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[E,[S,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[S,E],[/quark(?:pc)?\/([-\w\.]+)/i],[E,[S,"Quark"]],[/\bddg\/([\w\.]+)/i],[E,[S,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[E,[S,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[E,[S,"WeChat"]],[/konqueror\/([\w\.]+)/i],[E,[S,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[E,[S,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[E,[S,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[E,[S,"Smart "+ge+OA]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[S,/(.+)/,"$1 Secure"+OA],E],[/norton\/([\w\.]+)/i],[E,[S,"Norton Private"+OA]],[/\bfocus\/([\w\.]+)/i],[E,[S,XA+" Focus"]],[/ mms\/([\w\.]+)$/i],[E,[S,RA+" Neon"]],[/ opt\/([\w\.]+)$/i],[E,[S,RA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[E,[S,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[E,[S,"Dolphin"]],[/coast\/([\w\.]+)/i],[E,[S,RA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[E,[S,"MIUI"+OA]],[/fxios\/([\w\.-]+)/i],[E,[S,MA+XA]],[/\bqihoobrowser\/?([\w\.]*)/i],[E,[S,"360"]],[/\b(qq)\/([\w\.]+)/i],[[S,/(.+)/,"$1Browser"],E],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[S,/(.+)/,"$1"+OA],E],[/samsungbrowser\/([\w\.]+)/i],[E,[S,qA+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[E,[S,et+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[S,et+" Mobile"],E],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[S,E],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[S],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[E,S],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[S,we],E,[y,LA]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[S,E,[y,LA]],[/\bgsa\/([\w\.]+) .*safari\//i],[E,[S,"GSA"],[y,LA]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[E,[S,"TikTok"],[y,LA]],[/\[(linkedin)app\]/i],[S,[y,LA]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[S,/(.+)/,"Zalo"],E,[y,LA]],[/(chromium)[\/ ]([-\w\.]+)/i],[S,E],[/ome-(lighthouse)$/i],[S,[y,Xt]],[/headlesschrome(?:\/([\w\.]+)| )/i],[E,[S,$e+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[E,[S,le+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[S,$e+" WebView"],E],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[E,[S,"Android"+OA]],[/chrome\/([\w\.]+) mobile/i],[E,[S,MA+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[S,E],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[E,[S,MA+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[S,MA+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[E,S],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[S,[E,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[S,E],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[S,MA+XA],E],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[S,"Netscape"],E],[/(wolvic|librewolf)\/([\w\.]+)/i],[S,E],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[E,[S,XA+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[S,[E,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[S,[E,/[^\d\.]+./,NA]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[iA,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[iA,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[iA,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[iA,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[iA,"arm"]],[/ sun4\w[;\)]/i],[[iA,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[iA,/ower/,NA,TA]],[/mc680.0/i],[[iA,"68k"]],[/winnt.+\[axp/i],[[iA,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[x,[B,qA],[y,Q]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[x,[B,qA],[y,H]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[x,[B,DA],[y,H]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[x,[B,DA],[y,Q]],[/(macintosh);/i],[x,[B,DA]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[x,[B,Je],[y,H]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[x,[B,Ke],[y,Q]],[/honor([-\w ]+)[;\)]/i],[x,[B,Ke],[y,H]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[x,[B,qe],[y,Q]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[x,[B,qe],[y,H]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[x,/_/g," "],[B,ye],[y,Q]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[x,/_/g," "],[B,ye],[y,H]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[x,[B,Ze],[y,H]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[x,[B,me],[y,H]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[x,[B,gA,{OnePlus:["203","304","403","404","413","415"],"*":me}],[y,Q]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[x,[B,"BLU"],[y,H]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[x,[B,"Vivo"],[y,H]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[x,[B,"Realme"],[y,H]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[x,[B,ge],[y,Q]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[x,[B,ge],[y,H]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[x,[B,_e],[y,H]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[x,[B,_e],[y,Q]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[x,[B,re],[y,Q]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[x,[B,re],[y,H]],[/(nokia) (t[12][01])/i],[B,x,[y,Q]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[x,/_/g," "],[y,H],[B,"Nokia"]],[/(pixel (c|tablet))\b/i],[x,[B,PA],[y,Q]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[x,[B,PA],[y,H]],[/(google) (pixelbook( go)?)/i],[B,x],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[x,[B,KA],[y,H]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[x,"Xperia Tablet"],[B,KA],[y,Q]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[x,[B,se],[y,Q]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[x,/(.+)/g,"Fire Phone $1"],[B,se],[y,H]],[/(playbook);[-\w\),; ]+(rim)/i],[x,B,[y,Q]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[x,[B,Qe],[y,H]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[x,[B,We],[y,Q]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[x,[B,We],[y,H]],[/(nexus 9)/i],[x,[B,"HTC"],[y,Q]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[B,[x,/_/g," "],[y,H]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[x,[B,"TCL"],[y,Q]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[x,[B,"TCL"],[y,H]],[/(itel) ((\w+))/i],[[B,TA],x,[y,gA,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[x,[B,"Acer"],[y,Q]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[x,[B,"Meizu"],[y,H]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[x,[B,"Ulefone"],[y,H]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[x,[B,"Energizer"],[y,H]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[x,[B,"Cat"],[y,H]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[x,[B,"Smartfren"],[y,H]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[x,[B,"Nothing"],[y,H]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[x,[B,"Archos"],[y,Q]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[x,[B,"Archos"],[y,H]],[/; (n159v)/i],[x,[B,"HMD"],[y,H]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[B,x,[y,Q]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[B,x,[y,H]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[B,x,[y,Q]],[/(surface duo)/i],[x,[B,ve],[y,Q]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[x,[B,"Fairphone"],[y,H]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[x,[B,Xe],[y,Q]],[/(sprint) (\w+)/i],[B,x,[y,H]],[/(kin\.[onetw]{3})/i],[[x,/\./g," "],[B,ve],[y,H]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[x,[B,be],[y,Q]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[x,[B,be],[y,H]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[B,[y,J]],[/hbbtv.+maple;(\d+)/i],[[x,/^/,"SmartTV"],[B,qA],[y,J]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[B,x,[y,J]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[B,re],[y,J]],[/(apple) ?tv/i],[B,[x,DA+" TV"],[y,J]],[/crkey.*devicetype\/chromecast/i],[[x,BA+" Third Generation"],[B,PA],[y,J]],[/crkey.*devicetype\/([^/]*)/i],[[x,/^/,"Chromecast "],[B,PA],[y,J]],[/fuchsia.*crkey/i],[[x,BA+" Nest Hub"],[B,PA],[y,J]],[/crkey/i],[[x,BA],[B,PA],[y,J]],[/(portaltv)/i],[x,[B,we],[y,J]],[/droid.+aft(\w+)( bui|\))/i],[x,[B,se],[y,J]],[/(shield \w+ tv)/i],[x,[B,Xe],[y,J]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[x,[B,Je],[y,J]],[/(bravia[\w ]+)( bui|\))/i],[x,[B,KA],[y,J]],[/(mi(tv|box)-?\w+) bui/i],[x,[B,ye],[y,J]],[/Hbbtv.*(technisat) (.*);/i],[B,x,[y,J]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[B,/.+\/(\w+)/,"$1",gA,{LG:"lge"}],[x,he],[y,J]],[/(playstation \w+)/i],[x,[B,KA],[y,oe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[x,[B,ve],[y,oe]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[B,gA,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],x,[y,oe]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[x,[B,qA],[y,mA]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[B,x,[y,mA]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[x,[B,me],[y,mA]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[x,[B,DA],[y,mA]],[/(opwwe\d{3})/i],[x,[B,Ze],[y,mA]],[/(moto 360)/i],[x,[B,_e],[y,mA]],[/(smartwatch 3)/i],[x,[B,KA],[y,mA]],[/(g watch r)/i],[x,[B,re],[y,mA]],[/droid.+; (wt63?0{2,3})\)/i],[x,[B,be],[y,mA]],[/droid.+; (glass) \d/i],[x,[B,PA],[y,ie]],[/(pico) ([\w ]+) os\d/i],[B,x,[y,ie]],[/(quest( \d| pro)?s?).+vr/i],[x,[B,we],[y,ie]],[/mobile vr; rv.+firefox/i],[[y,ie]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[B,[y,JA]],[/(aeobc)\b/i],[x,[B,se],[y,JA]],[/(homepod).+mac os/i],[x,[B,DA],[y,JA]],[/windows iot/i],[[y,JA]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[x,[y,J]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[y,J]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[x,[y,gA,{mobile:"Mobile",xr:"VR","*":Q}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[y,Q]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[y,H]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[x,[B,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[E,[S,le+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[S,E],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[E,[S,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[S,E],[/ladybird\//i],[[S,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[E,S]],os:[[/(windows nt) (6\.[23]); arm/i],[[S,/N/,"R"],[E,gA,tt]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[S,E],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[E,/(;|\))/g,"",gA,tt],[S,Be]],[/(windows ce)\/?([\d\.]*)/i],[S,E],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[E,/_/g,"."],[S,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[S,"macOS"],[E,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[E,[S,BA+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[E,[S,BA+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[E,[S,BA+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[E,[S,BA+" Linux"]],[/crkey\/([\d\.]+)/i],[E,[S,BA]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[E,S],[/(ubuntu) ([\w\.]+) like android/i],[[S,/(.+)/,"$1 Touch"],E],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[S,E],[/\(bb(10);/i],[E,[S,Qe]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[E,[S,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[E,[S,XA+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[E,[S,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[E,gA,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[S,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[E,[S,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[E,[S,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[E,[S,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[S,E],[/(sunos) ?([\d\.]*)/i],[[S,"Solaris"],E],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[S,E]]},ne=function(){var p={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return wA.call(p.init,[[aA,[S,E,$A,y]],[xA,[iA]],[yA,[y,x,B]],[_A,[S,E]],[hA,[S,E]]]),wA.call(p.isIgnore,[[aA,[E,$A]],[_A,[E]],[hA,[E]]]),wA.call(p.isIgnoreRgx,[[aA,/ ?browser$/i],[hA,/ ?os$/i]]),wA.call(p.toString,[[aA,[S,E]],[xA,[iA]],[yA,[B,x]],[_A,[S,E]],[hA,[S,E]]]),p}(),ai=function(p,a){var h=ne.init[a],o=ne.isIgnore[a]||0,U=ne.isIgnoreRgx[a]||0,w=ne.toString[a]||0;function u(){wA.call(this,h)}return u.prototype.getItem=function(){return p},u.prototype.withClientHints=function(){return FA?FA.getHighEntropyValues(_t).then(function(s){return p.setCH(new mt(s,!1)).parseCH().get()}):p.parseCH().get()},u.prototype.withFeatureCheck=function(){return p.detectFeature().get()},a!=HA&&(u.prototype.is=function(s){var T=!1;for(var P in this)if(this.hasOwnProperty(P)&&!Te(o,P)&&TA(U?GA(U,this[P]):this[P])==TA(U?GA(U,s):s)){if(T=!0,s!=Z.UNDEFINED)break}else if(s==Z.UNDEFINED&&T){T=!T;break}return T},u.prototype.toString=function(){var s=NA;for(var T in w)typeof this[w[T]]!==Z.UNDEFINED&&(s+=(s?" ":NA)+this[w[T]]);return s||Z.UNDEFINED}),u.prototype.then=function(s){var T=this,P=function(){for(var D in T)T.hasOwnProperty(D)&&(this[D]=T[D])};P.prototype={is:u.prototype.is,toString:u.prototype.toString,withClientHints:u.prototype.withClientHints,withFeatureCheck:u.prototype.withFeatureCheck};var z=new P;return s(z),z},new u};function mt(p,a){if(p=p||{},wA.call(this,_t),a)wA.call(this,[[ze,xe(p[CA])],[Le,xe(p[Zt])],[H,/\?1/.test(p[ei])],[x,ZA(p[ti])],[VA,ZA(p[vt])],[De,ZA(p[ii])],[iA,ZA(p[Jt])],[IA,xe(p[Ai])],[ce,ZA(p[$t])]]);else for(var h in p)this.hasOwnProperty(h)&&typeof p[h]!==Z.UNDEFINED&&(this[h]=p[h])}function kA(p,a,h,o){return wA.call(this,[["itemType",p],["ua",a],["uaCH",o],["rgxMap",h],["data",ai(this,p)]]),this}kA.prototype.get=function(p){return p?this.data.hasOwnProperty(p)?this.data[p]:void 0:this.data};kA.prototype.set=function(p,a){return this.data[p]=a,this};kA.prototype.setCH=function(p){return this.uaCH=p,this};kA.prototype.detectFeature=function(){if(nA&&nA.userAgent==this.ua)switch(this.itemType){case aA:nA.brave&&typeof nA.brave.isBrave==Z.FUNCTION&&this.set(S,"Brave");break;case yA:!this.get(y)&&FA&&FA[H]&&this.set(y,H),this.get(x)=="Macintosh"&&nA&&typeof nA.standalone!==Z.UNDEFINED&&nA.maxTouchPoints&&nA.maxTouchPoints>2&&this.set(x,"iPad").set(y,Q);break;case hA:!this.get(S)&&FA&&FA[VA]&&this.set(S,FA[VA]);break;case HA:var p=this.data,a=function(h){return p[h].getItem().detectFeature().get()};this.set(aA,a(aA)).set(xA,a(xA)).set(yA,a(yA)).set(_A,a(_A)).set(hA,a(hA))}return this};kA.prototype.parseUA=function(){switch(this.itemType!=HA&&Ce.call(this.data,this.ua,this.rgxMap),this.itemType){case aA:this.set($A,ke(this.get(E)));break;case hA:if(this.get(S)=="iOS"&&this.get(E)=="18.6"){var p=/\) Version\/([\d\.]+)/.exec(this.ua);p&&parseInt(p[1].substring(0,2),10)>=26&&this.set(E,p[1])}break}return this};kA.prototype.parseCH=function(){var p=this.uaCH,a=this.rgxMap;switch(this.itemType){case aA:case _A:var h=p[Le]||p[ze],o;if(h)for(var U=0;U<h.length;U++){var w=h[U].brand||h[U],u=h[U].version;this.itemType==aA&&!/not.a.brand/i.test(w)&&(!o||/Chrom/.test(o)&&w!=At||o==le&&/WebView2/.test(w))&&(w=gA(w,ni),o=this.get(S),o&&!/Chrom/.test(o)&&/Chrom/.test(w)||this.set(S,w).set(E,u).set($A,ke(u)),o=w),this.itemType==_A&&w==At&&this.set(E,u)}break;case xA:var s=p[iA];s&&(s&&p[ce]=="64"&&(s+="64"),Ce.call(this.data,s+";",a));break;case yA:if(p[H]&&this.set(y,H),p[x]&&(this.set(x,p[x]),!this.get(y)||!this.get(B))){var T={};Ce.call(T,"droid 9; "+p[x]+")",a),!this.get(y)&&T.type&&this.set(y,T.type),!this.get(B)&&T.vendor&&this.set(B,T.vendor)}if(p[IA]){var P;if(typeof p[IA]!="string")for(var z=0;!P&&z<p[IA].length;)P=gA(p[IA][z++],it);else P=gA(p[IA],it);this.set(y,P)}break;case hA:var D=p[VA];if(D){var O=p[De];D==Be&&(O=parseInt(ke(O),10)>=13?"11":"10"),this.set(S,D).set(E,O)}this.get(S)==Be&&p[x]=="Xbox"&&this.set(S,"Xbox").set(E,void 0);break;case HA:var _=this.data,c=function(C){return _[C].getItem().setCH(p).parseCH().get()};this.set(aA,c(aA)).set(xA,c(xA)).set(yA,c(yA)).set(_A,c(_A)).set(hA,c(hA))}return this};function SA(p,a,h){if(typeof p===Z.OBJECT?(de(p,!0)?(typeof a===Z.OBJECT&&(h=a),a=p):(h=p,a=void 0),p=void 0):typeof p===Z.STRING&&!de(a,!0)&&(h=a,a=void 0),h)if(typeof h.append===Z.FUNCTION){var o={};h.forEach(function(z,D){o[String(D).toLowerCase()]=z}),h=o}else{var U={};for(var w in h)h.hasOwnProperty(w)&&(U[String(w).toLowerCase()]=h[w]);h=U}if(!(this instanceof SA))return new SA(p,a,h).getResult();var u=typeof p===Z.STRING?p:h&&h[Ye]?h[Ye]:nA&&nA.userAgent?nA.userAgent:NA,s=new mt(h,!0),T=a?ri(st,a):st,P=function(z){return z==HA?function(){return new kA(z,u,T,s).set("ua",u).set(aA,this.getBrowser()).set(xA,this.getCPU()).set(yA,this.getDevice()).set(_A,this.getEngine()).set(hA,this.getOS()).get()}:function(){return new kA(z,u,T[z],s).parseUA().get()}};return wA.call(this,[["getBrowser",P(aA)],["getCPU",P(xA)],["getDevice",P(yA)],["getEngine",P(_A)],["getOS",P(hA)],["getResult",P(HA)],["getUA",function(){return u}],["setUA",function(z){return te(z)&&(u=he(z,Kt)),this}]]).setUA(u),this}SA.VERSION=qt;SA.BROWSER=fe([S,E,$A,y]);SA.CPU=fe([iA]);SA.DEVICE=fe([x,B,y,oe,H,J,Q,mA,JA]);SA.ENGINE=SA.OS=fe([S,E]);var Se={},rt;function oi(){return rt||(rt=1,function(p){var a=function(){var A=new Date,e=4,t=3,r=2,n=1,l=e,d={setLogLevel:function(f){f==this.debug?l=n:f==this.info?l=r:f==this.warn?l=t:(f==this.error,l=e)},debug:function(f,v){console.debug===void 0&&(console.debug=console.log),n>=l&&console.debug("["+a.getDurationString(new Date-A,1e3)+"]","["+f+"]",v)},log:function(f,v){this.debug(f.msg)},info:function(f,v){r>=l&&console.info("["+a.getDurationString(new Date-A,1e3)+"]","["+f+"]",v)},warn:function(f,v){t>=l&&console.warn("["+a.getDurationString(new Date-A,1e3)+"]","["+f+"]",v)},error:function(f,v){e>=l&&console.error("["+a.getDurationString(new Date-A,1e3)+"]","["+f+"]",v)}};return d}();a.getDurationString=function(A,e){var t;function r(g,b){for(var k=""+g,L=k.split(".");L[0].length<b;)L[0]="0"+L[0];return L.join(".")}A<0?(t=!0,A=-A):t=!1;var n=e||1,l=A/n,d=Math.floor(l/3600);l-=d*3600;var f=Math.floor(l/60);l-=f*60;var v=l*1e3;return l=Math.floor(l),v-=l*1e3,v=Math.floor(v),(t?"-":"")+d+":"+r(f,2)+":"+r(l,2)+"."+r(v,3)},a.printRanges=function(A){var e=A.length;if(e>0){for(var t="",r=0;r<e;r++)r>0&&(t+=","),t+="["+a.getDurationString(A.start(r))+","+a.getDurationString(A.end(r))+"]";return t}else return"(empty)"},p.Log=a;var h=function(A){if(A instanceof ArrayBuffer)this.buffer=A,this.dataview=new DataView(A);else throw"Needs an array buffer";this.position=0};h.prototype.getPosition=function(){return this.position},h.prototype.getEndPosition=function(){return this.buffer.byteLength},h.prototype.getLength=function(){return this.buffer.byteLength},h.prototype.seek=function(A){var e=Math.max(0,Math.min(this.buffer.byteLength,A));return this.position=isNaN(e)||!isFinite(e)?0:e,!0},h.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},h.prototype.readAnyInt=function(A,e){var t=0;if(this.position+A<=this.buffer.byteLength){switch(A){case 1:e?t=this.dataview.getInt8(this.position):t=this.dataview.getUint8(this.position);break;case 2:e?t=this.dataview.getInt16(this.position):t=this.dataview.getUint16(this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";t=this.dataview.getUint8(this.position)<<16,t|=this.dataview.getUint8(this.position+1)<<8,t|=this.dataview.getUint8(this.position+2);break;case 4:e?t=this.dataview.getInt32(this.position):t=this.dataview.getUint32(this.position);break;case 8:if(e)throw"No method for reading signed 64 bits values";t=this.dataview.getUint32(this.position)<<32,t|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+A}return this.position+=A,t}else throw"Not enough bytes in buffer"},h.prototype.readUint8=function(){return this.readAnyInt(1,!1)},h.prototype.readUint16=function(){return this.readAnyInt(2,!1)},h.prototype.readUint24=function(){return this.readAnyInt(3,!1)},h.prototype.readUint32=function(){return this.readAnyInt(4,!1)},h.prototype.readUint64=function(){return this.readAnyInt(8,!1)},h.prototype.readString=function(A){if(this.position+A<=this.buffer.byteLength){for(var e="",t=0;t<A;t++)e+=String.fromCharCode(this.readUint8());return e}else throw"Not enough bytes in buffer"},h.prototype.readCString=function(){for(var A=[];;){var e=this.readUint8();if(e!==0)A.push(e);else break}return String.fromCharCode.apply(null,A)},h.prototype.readInt8=function(){return this.readAnyInt(1,!0)},h.prototype.readInt16=function(){return this.readAnyInt(2,!0)},h.prototype.readInt32=function(){return this.readAnyInt(4,!0)},h.prototype.readInt64=function(){return this.readAnyInt(8,!1)},h.prototype.readUint8Array=function(A){for(var e=new Uint8Array(A),t=0;t<A;t++)e[t]=this.readUint8();return e},h.prototype.readInt16Array=function(A){for(var e=new Int16Array(A),t=0;t<A;t++)e[t]=this.readInt16();return e},h.prototype.readUint16Array=function(A){for(var e=new Int16Array(A),t=0;t<A;t++)e[t]=this.readUint16();return e},h.prototype.readUint32Array=function(A){for(var e=new Uint32Array(A),t=0;t<A;t++)e[t]=this.readUint32();return e},h.prototype.readInt32Array=function(A){for(var e=new Int32Array(A),t=0;t<A;t++)e[t]=this.readInt32();return e},p.MP4BoxStream=h;var o=function(A,e,t){this._byteOffset=e||0,A instanceof ArrayBuffer?this.buffer=A:typeof A=="object"?(this.dataView=A,e&&(this._byteOffset+=e)):this.buffer=new ArrayBuffer(A||0),this.position=0,this.endianness=t??o.LITTLE_ENDIAN};o.prototype={},o.prototype.getPosition=function(){return this.position},o.prototype._realloc=function(A){if(this._dynamicSize){var e=this._byteOffset+this.position+A,t=this._buffer.byteLength;if(e<=t){e>this._byteLength&&(this._byteLength=e);return}for(t<1&&(t=1);e>t;)t*=2;var r=new ArrayBuffer(t),n=new Uint8Array(this._buffer),l=new Uint8Array(r,0,n.length);l.set(n),this.buffer=r,this._byteLength=e}},o.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var A=new ArrayBuffer(this._byteLength),e=new Uint8Array(A),t=new Uint8Array(this._buffer,0,e.length);e.set(t),this.buffer=A}},o.BIG_ENDIAN=!1,o.LITTLE_ENDIAN=!0,o.prototype._byteLength=0,Object.defineProperty(o.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(o.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(A){this._buffer=A,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(A){this._byteOffset=A,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(o.prototype,"dataView",{get:function(){return this._dataView},set:function(A){this._byteOffset=A.byteOffset,this._buffer=A.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+A.byteLength}}),o.prototype.seek=function(A){var e=Math.max(0,Math.min(this.byteLength,A));this.position=isNaN(e)||!isFinite(e)?0:e},o.prototype.isEof=function(){return this.position>=this._byteLength},o.prototype.mapUint8Array=function(A){this._realloc(A*1);var e=new Uint8Array(this._buffer,this.byteOffset+this.position,A);return this.position+=A*1,e},o.prototype.readInt32Array=function(A,e){A=A??this.byteLength-this.position/4;var t=new Int32Array(A);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,A*t.BYTES_PER_ELEMENT),o.arrayToNative(t,e??this.endianness),this.position+=t.byteLength,t},o.prototype.readInt16Array=function(A,e){A=A??this.byteLength-this.position/2;var t=new Int16Array(A);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,A*t.BYTES_PER_ELEMENT),o.arrayToNative(t,e??this.endianness),this.position+=t.byteLength,t},o.prototype.readInt8Array=function(A){A=A??this.byteLength-this.position;var e=new Int8Array(A);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,A*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readUint32Array=function(A,e){A=A??this.byteLength-this.position/4;var t=new Uint32Array(A);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,A*t.BYTES_PER_ELEMENT),o.arrayToNative(t,e??this.endianness),this.position+=t.byteLength,t},o.prototype.readUint16Array=function(A,e){A=A??this.byteLength-this.position/2;var t=new Uint16Array(A);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,A*t.BYTES_PER_ELEMENT),o.arrayToNative(t,e??this.endianness),this.position+=t.byteLength,t},o.prototype.readUint8Array=function(A){A=A??this.byteLength-this.position;var e=new Uint8Array(A);return o.memcpy(e.buffer,0,this.buffer,this.byteOffset+this.position,A*e.BYTES_PER_ELEMENT),this.position+=e.byteLength,e},o.prototype.readFloat64Array=function(A,e){A=A??this.byteLength-this.position/8;var t=new Float64Array(A);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,A*t.BYTES_PER_ELEMENT),o.arrayToNative(t,e??this.endianness),this.position+=t.byteLength,t},o.prototype.readFloat32Array=function(A,e){A=A??this.byteLength-this.position/4;var t=new Float32Array(A);return o.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,A*t.BYTES_PER_ELEMENT),o.arrayToNative(t,e??this.endianness),this.position+=t.byteLength,t},o.prototype.readInt32=function(A){var e=this._dataView.getInt32(this.position,A??this.endianness);return this.position+=4,e},o.prototype.readInt16=function(A){var e=this._dataView.getInt16(this.position,A??this.endianness);return this.position+=2,e},o.prototype.readInt8=function(){var A=this._dataView.getInt8(this.position);return this.position+=1,A},o.prototype.readUint32=function(A){var e=this._dataView.getUint32(this.position,A??this.endianness);return this.position+=4,e},o.prototype.readUint16=function(A){var e=this._dataView.getUint16(this.position,A??this.endianness);return this.position+=2,e},o.prototype.readUint8=function(){var A=this._dataView.getUint8(this.position);return this.position+=1,A},o.prototype.readFloat32=function(A){var e=this._dataView.getFloat32(this.position,A??this.endianness);return this.position+=4,e},o.prototype.readFloat64=function(A){var e=this._dataView.getFloat64(this.position,A??this.endianness);return this.position+=8,e},o.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,o.memcpy=function(A,e,t,r,n){var l=new Uint8Array(A,e,n),d=new Uint8Array(t,r,n);l.set(d)},o.arrayToNative=function(A,e){return e==this.endianness?A:this.flipArrayEndianness(A)},o.nativeToEndian=function(A,e){return this.endianness==e?A:this.flipArrayEndianness(A)},o.flipArrayEndianness=function(A){for(var e=new Uint8Array(A.buffer,A.byteOffset,A.byteLength),t=0;t<A.byteLength;t+=A.BYTES_PER_ELEMENT)for(var r=t+A.BYTES_PER_ELEMENT-1,n=t;r>n;r--,n++){var l=e[n];e[n]=e[r],e[r]=l}return A},o.prototype.failurePosition=0,String.fromCharCodeUint8=function(A){for(var e=[],t=0;t<A.length;t++)e[t]=A[t];return String.fromCharCode.apply(null,e)},o.prototype.readString=function(A,e){return e==null||e=="ASCII"?String.fromCharCodeUint8.apply(null,[this.mapUint8Array(A??this.byteLength-this.position)]):new TextDecoder(e).decode(this.mapUint8Array(A))},o.prototype.readCString=function(A){var e=this.byteLength-this.position,t=new Uint8Array(this._buffer,this._byteOffset+this.position),r=e;A!=null&&(r=Math.min(A,e));for(var n=0;n<r&&t[n]!==0;n++);var l=String.fromCharCodeUint8.apply(null,[this.mapUint8Array(n)]);return A!=null?this.position+=r-n:n!=e&&(this.position+=1),l};var U=Math.pow(2,32);o.prototype.readInt64=function(){return this.readInt32()*U+this.readUint32()},o.prototype.readUint64=function(){return this.readUint32()*U+this.readUint32()},o.prototype.readInt64=function(){return this.readUint32()*U+this.readUint32()},o.prototype.readUint24=function(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8()},p.DataStream=o,o.prototype.save=function(A){var e=new Blob([this.buffer]);if(window.URL&&URL.createObjectURL){var t=window.URL.createObjectURL(e),r=document.createElement("a");document.body.appendChild(r),r.setAttribute("href",t),r.setAttribute("download",A),r.setAttribute("target","_self"),r.click(),window.URL.revokeObjectURL(t)}else throw"DataStream.save: Can't create object URL."},o.prototype._dynamicSize=!0,Object.defineProperty(o.prototype,"dynamicSize",{get:function(){return this._dynamicSize},set:function(A){A||this._trimAlloc(),this._dynamicSize=A}}),o.prototype.shift=function(A){var e=new ArrayBuffer(this._byteLength-A),t=new Uint8Array(e),r=new Uint8Array(this._buffer,A,t.length);t.set(r),this.buffer=e,this.position-=A},o.prototype.writeInt32Array=function(A,e){if(this._realloc(A.length*4),A instanceof Int32Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapInt32Array(A.length,e);else for(var t=0;t<A.length;t++)this.writeInt32(A[t],e)},o.prototype.writeInt16Array=function(A,e){if(this._realloc(A.length*2),A instanceof Int16Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapInt16Array(A.length,e);else for(var t=0;t<A.length;t++)this.writeInt16(A[t],e)},o.prototype.writeInt8Array=function(A){if(this._realloc(A.length*1),A instanceof Int8Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapInt8Array(A.length);else for(var e=0;e<A.length;e++)this.writeInt8(A[e])},o.prototype.writeUint32Array=function(A,e){if(this._realloc(A.length*4),A instanceof Uint32Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapUint32Array(A.length,e);else for(var t=0;t<A.length;t++)this.writeUint32(A[t],e)},o.prototype.writeUint16Array=function(A,e){if(this._realloc(A.length*2),A instanceof Uint16Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapUint16Array(A.length,e);else for(var t=0;t<A.length;t++)this.writeUint16(A[t],e)},o.prototype.writeUint8Array=function(A){if(this._realloc(A.length*1),A instanceof Uint8Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapUint8Array(A.length);else for(var e=0;e<A.length;e++)this.writeUint8(A[e])},o.prototype.writeFloat64Array=function(A,e){if(this._realloc(A.length*8),A instanceof Float64Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapFloat64Array(A.length,e);else for(var t=0;t<A.length;t++)this.writeFloat64(A[t],e)},o.prototype.writeFloat32Array=function(A,e){if(this._realloc(A.length*4),A instanceof Float32Array&&this.byteOffset+this.position%A.BYTES_PER_ELEMENT===0)o.memcpy(this._buffer,this.byteOffset+this.position,A.buffer,0,A.byteLength),this.mapFloat32Array(A.length,e);else for(var t=0;t<A.length;t++)this.writeFloat32(A[t],e)},o.prototype.writeInt32=function(A,e){this._realloc(4),this._dataView.setInt32(this.position,A,e??this.endianness),this.position+=4},o.prototype.writeInt16=function(A,e){this._realloc(2),this._dataView.setInt16(this.position,A,e??this.endianness),this.position+=2},o.prototype.writeInt8=function(A){this._realloc(1),this._dataView.setInt8(this.position,A),this.position+=1},o.prototype.writeUint32=function(A,e){this._realloc(4),this._dataView.setUint32(this.position,A,e??this.endianness),this.position+=4},o.prototype.writeUint16=function(A,e){this._realloc(2),this._dataView.setUint16(this.position,A,e??this.endianness),this.position+=2},o.prototype.writeUint8=function(A){this._realloc(1),this._dataView.setUint8(this.position,A),this.position+=1},o.prototype.writeFloat32=function(A,e){this._realloc(4),this._dataView.setFloat32(this.position,A,e??this.endianness),this.position+=4},o.prototype.writeFloat64=function(A,e){this._realloc(8),this._dataView.setFloat64(this.position,A,e??this.endianness),this.position+=8},o.prototype.writeUCS2String=function(A,e,t){t==null&&(t=A.length);for(var r=0;r<A.length&&r<t;r++)this.writeUint16(A.charCodeAt(r),e);for(;r<t;r++)this.writeUint16(0)},o.prototype.writeString=function(A,e,t){var r=0;if(e==null||e=="ASCII")if(t!=null){var n=Math.min(A.length,t);for(r=0;r<n;r++)this.writeUint8(A.charCodeAt(r));for(;r<t;r++)this.writeUint8(0)}else for(r=0;r<A.length;r++)this.writeUint8(A.charCodeAt(r));else this.writeUint8Array(new TextEncoder(e).encode(A.substring(0,t)))},o.prototype.writeCString=function(A,e){var t=0;if(e!=null){var r=Math.min(A.length,e);for(t=0;t<r;t++)this.writeUint8(A.charCodeAt(t));for(;t<e;t++)this.writeUint8(0)}else{for(t=0;t<A.length;t++)this.writeUint8(A.charCodeAt(t));this.writeUint8(0)}},o.prototype.writeStruct=function(A,e){for(var t=0;t<A.length;t+=2){var r=A[t+1];this.writeType(r,e[A[t]],e)}},o.prototype.writeType=function(A,e,t){var r;if(typeof A=="function")return A(this,e);if(typeof A=="object"&&!(A instanceof Array))return A.set(this,e,t);var n=null,l="ASCII",d=this.position;switch(typeof A=="string"&&/:/.test(A)&&(r=A.split(":"),A=r[0],n=parseInt(r[1])),typeof A=="string"&&/,/.test(A)&&(r=A.split(","),A=r[0],l=parseInt(r[1])),A){case"uint8":this.writeUint8(e);break;case"int8":this.writeInt8(e);break;case"uint16":this.writeUint16(e,this.endianness);break;case"int16":this.writeInt16(e,this.endianness);break;case"uint32":this.writeUint32(e,this.endianness);break;case"int32":this.writeInt32(e,this.endianness);break;case"float32":this.writeFloat32(e,this.endianness);break;case"float64":this.writeFloat64(e,this.endianness);break;case"uint16be":this.writeUint16(e,o.BIG_ENDIAN);break;case"int16be":this.writeInt16(e,o.BIG_ENDIAN);break;case"uint32be":this.writeUint32(e,o.BIG_ENDIAN);break;case"int32be":this.writeInt32(e,o.BIG_ENDIAN);break;case"float32be":this.writeFloat32(e,o.BIG_ENDIAN);break;case"float64be":this.writeFloat64(e,o.BIG_ENDIAN);break;case"uint16le":this.writeUint16(e,o.LITTLE_ENDIAN);break;case"int16le":this.writeInt16(e,o.LITTLE_ENDIAN);break;case"uint32le":this.writeUint32(e,o.LITTLE_ENDIAN);break;case"int32le":this.writeInt32(e,o.LITTLE_ENDIAN);break;case"float32le":this.writeFloat32(e,o.LITTLE_ENDIAN);break;case"float64le":this.writeFloat64(e,o.LITTLE_ENDIAN);break;case"cstring":this.writeCString(e,n);break;case"string":this.writeString(e,l,n);break;case"u16string":this.writeUCS2String(e,this.endianness,n);break;case"u16stringle":this.writeUCS2String(e,o.LITTLE_ENDIAN,n);break;case"u16stringbe":this.writeUCS2String(e,o.BIG_ENDIAN,n);break;default:if(A.length==3){for(var f=A[1],v=0;v<e.length;v++)this.writeType(f,e[v]);break}else{this.writeStruct(A,e);break}}n!=null&&(this.position=d,this._realloc(n),this.position=d+n)},o.prototype.writeUint64=function(A){var e=Math.floor(A/U);this.writeUint32(e),this.writeUint32(A&4294967295)},o.prototype.writeUint24=function(A){this.writeUint8((A&16711680)>>16),this.writeUint8((A&65280)>>8),this.writeUint8(A&255)},o.prototype.adjustUint32=function(A,e){var t=this.position;this.seek(A),this.writeUint32(e),this.seek(t)},o.prototype.mapInt32Array=function(A,e){this._realloc(A*4);var t=new Int32Array(this._buffer,this.byteOffset+this.position,A);return o.arrayToNative(t,e??this.endianness),this.position+=A*4,t},o.prototype.mapInt16Array=function(A,e){this._realloc(A*2);var t=new Int16Array(this._buffer,this.byteOffset+this.position,A);return o.arrayToNative(t,e??this.endianness),this.position+=A*2,t},o.prototype.mapInt8Array=function(A){this._realloc(A*1);var e=new Int8Array(this._buffer,this.byteOffset+this.position,A);return this.position+=A*1,e},o.prototype.mapUint32Array=function(A,e){this._realloc(A*4);var t=new Uint32Array(this._buffer,this.byteOffset+this.position,A);return o.arrayToNative(t,e??this.endianness),this.position+=A*4,t},o.prototype.mapUint16Array=function(A,e){this._realloc(A*2);var t=new Uint16Array(this._buffer,this.byteOffset+this.position,A);return o.arrayToNative(t,e??this.endianness),this.position+=A*2,t},o.prototype.mapFloat64Array=function(A,e){this._realloc(A*8);var t=new Float64Array(this._buffer,this.byteOffset+this.position,A);return o.arrayToNative(t,e??this.endianness),this.position+=A*8,t},o.prototype.mapFloat32Array=function(A,e){this._realloc(A*4);var t=new Float32Array(this._buffer,this.byteOffset+this.position,A);return o.arrayToNative(t,e??this.endianness),this.position+=A*4,t};var w=function(A){this.buffers=[],this.bufferIndex=-1,A&&(this.insertBuffer(A),this.bufferIndex=0)};w.prototype=new o(new ArrayBuffer,0,o.BIG_ENDIAN),w.prototype.initialized=function(){var A;return this.bufferIndex>-1?!0:this.buffers.length>0?(A=this.buffers[0],A.fileStart===0?(this.buffer=A,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1)):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1)},ArrayBuffer.concat=function(A,e){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(A.byteLength+e.byteLength));var t=new Uint8Array(A.byteLength+e.byteLength);return t.set(new Uint8Array(A),0),t.set(new Uint8Array(e),A.byteLength),t.buffer},w.prototype.reduceBuffer=function(A,e,t){var r;return r=new Uint8Array(t),r.set(new Uint8Array(A,e,t)),r.buffer.fileStart=A.fileStart+e,r.buffer.usedBytes=0,r.buffer},w.prototype.insertBuffer=function(A){for(var e=!0,t=0;t<this.buffers.length;t++){var r=this.buffers[t];if(A.fileStart<=r.fileStart){if(A.fileStart===r.fileStart)if(A.byteLength>r.byteLength){this.buffers.splice(t,1),t--;continue}else a.warn("MultiBufferStream","Buffer (fileStart: "+A.fileStart+" - Length: "+A.byteLength+") already appended, ignoring");else A.fileStart+A.byteLength<=r.fileStart||(A=this.reduceBuffer(A,0,r.fileStart-A.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+A.fileStart+" - Length: "+A.byteLength+")"),this.buffers.splice(t,0,A),t===0&&(this.buffer=A);e=!1;break}else if(A.fileStart<r.fileStart+r.byteLength){var n=r.fileStart+r.byteLength-A.fileStart,l=A.byteLength-n;if(l>0)A=this.reduceBuffer(A,n,l);else{e=!1;break}}}e&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+A.fileStart+" - Length: "+A.byteLength+")"),this.buffers.push(A),t===0&&(this.buffer=A))},w.prototype.logBufferLevel=function(A){var e,t,r,n,l=[],d,f="";for(r=0,n=0,e=0;e<this.buffers.length;e++)t=this.buffers[e],e===0?(d={},l.push(d),d.start=t.fileStart,d.end=t.fileStart+t.byteLength,f+="["+d.start+"-"):d.end===t.fileStart?d.end=t.fileStart+t.byteLength:(d={},d.start=t.fileStart,f+=l[l.length-1].end-1+"], ["+d.start+"-",d.end=t.fileStart+t.byteLength,l.push(d)),r+=t.usedBytes,n+=t.byteLength;l.length>0&&(f+=d.end-1+"]");var v=A?a.info:a.debug;this.buffers.length===0?v("MultiBufferStream","No more buffer in memory"):v("MultiBufferStream",""+this.buffers.length+" stored buffer(s) ("+r+"/"+n+" bytes), continuous ranges: "+f)},w.prototype.cleanBuffers=function(){var A,e;for(A=0;A<this.buffers.length;A++)e=this.buffers[A],e.usedBytes===e.byteLength&&(a.debug("MultiBufferStream","Removing buffer #"+A),this.buffers.splice(A,1),A--)},w.prototype.mergeNextBuffer=function(){var A;if(this.bufferIndex+1<this.buffers.length)if(A=this.buffers[this.bufferIndex+1],A.fileStart===this.buffer.fileStart+this.buffer.byteLength){var e=this.buffer.byteLength,t=this.buffer.usedBytes,r=this.buffer.fileStart;return this.buffers[this.bufferIndex]=ArrayBuffer.concat(this.buffer,A),this.buffer=this.buffers[this.bufferIndex],this.buffers.splice(this.bufferIndex+1,1),this.buffer.usedBytes=t,this.buffer.fileStart=r,a.debug("ISOFile","Concatenating buffer for box parsing (length: "+e+"->"+this.buffer.byteLength+")"),!0}else return!1;else return!1},w.prototype.findPosition=function(A,e,t){var r,n=null,l=-1;for(A===!0?r=0:r=this.bufferIndex;r<this.buffers.length&&(n=this.buffers[r],n.fileStart<=e);){l=r,t&&(n.fileStart+n.byteLength<=e?n.usedBytes=n.byteLength:n.usedBytes=e-n.fileStart,this.logBufferLevel());r++}return l!==-1?(n=this.buffers[l],n.fileStart+n.byteLength>=e?(a.debug("MultiBufferStream","Found position in existing buffer #"+l),l):-1):-1},w.prototype.findEndContiguousBuf=function(A){var e,t,r,n=A!==void 0?A:this.bufferIndex;if(t=this.buffers[n],this.buffers.length>n+1)for(e=n+1;e<this.buffers.length&&(r=this.buffers[e],r.fileStart===t.fileStart+t.byteLength);e++)t=r;return t.fileStart+t.byteLength},w.prototype.getEndFilePositionAfter=function(A){var e=this.findPosition(!0,A,!1);return e!==-1?this.findEndContiguousBuf(e):A},w.prototype.addUsedBytes=function(A){this.buffer.usedBytes+=A,this.logBufferLevel()},w.prototype.setAllUsedBytes=function(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel()},w.prototype.seek=function(A,e,t){var r;return r=this.findPosition(e,A,t),r!==-1?(this.buffer=this.buffers[r],this.bufferIndex=r,this.position=A-this.buffer.fileStart,a.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(a.debug("MultiBufferStream","Position "+A+" not found in buffered data"),!1)},w.prototype.getPosition=function(){if(this.bufferIndex===-1||this.buffers[this.bufferIndex]===null)throw"Error accessing position in the MultiBufferStream";return this.buffers[this.bufferIndex].fileStart+this.position},w.prototype.getLength=function(){return this.byteLength},w.prototype.getEndPosition=function(){if(this.bufferIndex===-1||this.buffers[this.bufferIndex]===null)throw"Error accessing position in the MultiBufferStream";return this.buffers[this.bufferIndex].fileStart+this.byteLength},p.MultiBufferStream=w;var u=function(){var A=3,e=4,t=5,r=6,n=[];n[A]="ES_Descriptor",n[e]="DecoderConfigDescriptor",n[t]="DecoderSpecificInfo",n[r]="SLConfigDescriptor",this.getDescriptorName=function(f){return n[f]};var l=this,d={};return this.parseOneDescriptor=function(f){var v=0,g,b,k;for(g=f.readUint8(),k=f.readUint8();k&128;)v=(v<<7)+(k&127),k=f.readUint8();return v=(v<<7)+(k&127),a.debug("MPEG4DescriptorParser","Found "+(n[g]||"Descriptor "+g)+", size "+v+" at position "+f.getPosition()),n[g]?b=new d[n[g]](v):b=new d.Descriptor(v),b.parse(f),b},d.Descriptor=function(f,v){this.tag=f,this.size=v,this.descs=[]},d.Descriptor.prototype.parse=function(f){this.data=f.readUint8Array(this.size)},d.Descriptor.prototype.findDescriptor=function(f){for(var v=0;v<this.descs.length;v++)if(this.descs[v].tag==f)return this.descs[v];return null},d.Descriptor.prototype.parseRemainingDescriptors=function(f){for(var v=f.position;f.position<v+this.size;){var g=l.parseOneDescriptor(f);this.descs.push(g)}},d.ES_Descriptor=function(f){d.Descriptor.call(this,A,f)},d.ES_Descriptor.prototype=new d.Descriptor,d.ES_Descriptor.prototype.parse=function(f){if(this.ES_ID=f.readUint16(),this.flags=f.readUint8(),this.size-=3,this.flags&128?(this.dependsOn_ES_ID=f.readUint16(),this.size-=2):this.dependsOn_ES_ID=0,this.flags&64){var v=f.readUint8();this.URL=f.readString(v),this.size-=v+1}else this.URL="";this.flags&32?(this.OCR_ES_ID=f.readUint16(),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(f)},d.ES_Descriptor.prototype.getOTI=function(f){var v=this.findDescriptor(e);return v?v.oti:0},d.ES_Descriptor.prototype.getAudioConfig=function(f){var v=this.findDescriptor(e);if(!v)return null;var g=v.findDescriptor(t);if(g&&g.data){var b=(g.data[0]&248)>>3;return b===31&&g.data.length>=2&&(b=32+((g.data[0]&7)<<3)+((g.data[1]&224)>>5)),b}else return null},d.DecoderConfigDescriptor=function(f){d.Descriptor.call(this,e,f)},d.DecoderConfigDescriptor.prototype=new d.Descriptor,d.DecoderConfigDescriptor.prototype.parse=function(f){this.oti=f.readUint8(),this.streamType=f.readUint8(),this.upStream=(this.streamType>>1&1)!==0,this.streamType=this.streamType>>>2,this.bufferSize=f.readUint24(),this.maxBitrate=f.readUint32(),this.avgBitrate=f.readUint32(),this.size-=13,this.parseRemainingDescriptors(f)},d.DecoderSpecificInfo=function(f){d.Descriptor.call(this,t,f)},d.DecoderSpecificInfo.prototype=new d.Descriptor,d.SLConfigDescriptor=function(f){d.Descriptor.call(this,r,f)},d.SLConfigDescriptor.prototype=new d.Descriptor,this};p.MPEG4DescriptorParser=u;var s={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[{type:"mdat",name:"MediaDataBox"},{type:"idat",name:"ItemDataBox"},{type:"free",name:"FreeSpaceBox"},{type:"skip",name:"FreeSpaceBox"},{type:"meco",name:"AdditionalMetadataContainerBox"},{type:"strk",name:"SubTrackBox"}],FULL_BOXES:[{type:"hmhd",name:"HintMediaHeaderBox"},{type:"nmhd",name:"NullMediaHeaderBox"},{type:"iods",name:"ObjectDescriptorBox"},{type:"xml ",name:"XMLBox"},{type:"bxml",name:"BinaryXMLBox"},{type:"ipro",name:"ItemProtectionBox"},{type:"mere",name:"MetaboxRelationBox"}],CONTAINER_BOXES:[[{type:"moov",name:"CompressedMovieBox"},["trak","pssh"]],[{type:"trak",name:"TrackBox"}],[{type:"edts",name:"EditBox"}],[{type:"mdia",name:"MediaBox"}],[{type:"minf",name:"MediaInformationBox"}],[{type:"dinf",name:"DataInformationBox"}],[{type:"stbl",name:"SampleTableBox"},["sgpd","sbgp"]],[{type:"mvex",name:"MovieExtendsBox"},["trex"]],[{type:"moof",name:"CompressedMovieFragmentBox"},["traf"]],[{type:"traf",name:"TrackFragmentBox"},["trun","sgpd","sbgp"]],[{type:"vttc",name:"VTTCueBox"}],[{type:"tref",name:"TrackReferenceBox"}],[{type:"iref",name:"ItemReferenceBox"}],[{type:"mfra",name:"MovieFragmentRandomAccessBox"},["tfra"]],[{type:"meco",name:"AdditionalMetadataContainerBox"}],[{type:"hnti",name:"trackhintinformation"}],[{type:"hinf",name:"hintstatisticsbox"}],[{type:"strk",name:"SubTrackBox"}],[{type:"strd",name:"SubTrackDefinitionBox"}],[{type:"sinf",name:"ProtectionSchemeInfoBox"}],[{type:"rinf",name:"RestrictedSchemeInfoBox"}],[{type:"schi",name:"SchemeInformationBox"}],[{type:"trgr",name:"TrackGroupBox"}],[{type:"udta",name:"UserDataBox"},["kind"]],[{type:"iprp",name:"ItemPropertiesBox"},["ipma"]],[{type:"ipco",name:"ItemPropertyContainerBox"}],[{type:"grpl",name:"GroupsListBox"}],[{type:"j2kH",name:"J2KHeaderInfoBox"}],[{type:"etyp",name:"ExtendedTypeBox"},["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){s.FullBox.prototype=new s.Box,s.ContainerBox.prototype=new s.Box,s.SampleEntry.prototype=new s.Box,s.TrackGroupTypeBox.prototype=new s.FullBox,s.BASIC_BOXES.forEach(function(A){s.createBoxCtor(A.type,A.name)}),s.FULL_BOXES.forEach(function(A){s.createFullBoxCtor(A.type,A.name)}),s.CONTAINER_BOXES.forEach(function(A){s.createContainerBoxCtor(A[0].type,A[0].name,null,A[1])})},Box:function(A,e,t,r){this.type=A,this.box_name=t,this.size=e,this.uuid=r},FullBox:function(A,e,t,r){s.Box.call(this,A,e,t,r),this.flags=0,this.version=0},ContainerBox:function(A,e,t,r){s.Box.call(this,A,e,t,r),this.boxes=[]},SampleEntry:function(A,e,t,r){s.ContainerBox.call(this,A,e),this.hdr_size=t,this.start=r},SampleGroupEntry:function(A){this.grouping_type=A},TrackGroupTypeBox:function(A,e){s.FullBox.call(this,A,e)},createBoxCtor:function(A,e,t){s.boxCodes.push(A),s[A+"Box"]=function(r){s.Box.call(this,A,r,e)},s[A+"Box"].prototype=new s.Box,t&&(s[A+"Box"].prototype.parse=t)},createFullBoxCtor:function(A,e,t){s[A+"Box"]=function(r){s.FullBox.call(this,A,r,e)},s[A+"Box"].prototype=new s.FullBox,s[A+"Box"].prototype.parse=function(r){this.parseFullHeader(r),t&&t.call(this,r)}},addSubBoxArrays:function(A){if(A){this.subBoxNames=A;for(var e=A.length,t=0;t<e;t++)this[A[t]+"s"]=[]}},createContainerBoxCtor:function(A,e,t,r){s[A+"Box"]=function(n){s.ContainerBox.call(this,A,n,e),s.addSubBoxArrays.call(this,r)},s[A+"Box"].prototype=new s.ContainerBox,t&&(s[A+"Box"].prototype.parse=t)},createMediaSampleEntryCtor:function(A,e,t){s.sampleEntryCodes[A]=[],s[A+"SampleEntry"]=function(r,n){s.SampleEntry.call(this,r,n),s.addSubBoxArrays.call(this,t)},s[A+"SampleEntry"].prototype=new s.SampleEntry,e&&(s[A+"SampleEntry"].prototype.parse=e)},createSampleEntryCtor:function(A,e,t,r){s.sampleEntryCodes[A].push(e),s[e+"SampleEntry"]=function(n){s[A+"SampleEntry"].call(this,e,n),s.addSubBoxArrays.call(this,r)},s[e+"SampleEntry"].prototype=new s[A+"SampleEntry"],t&&(s[e+"SampleEntry"].prototype.parse=t)},createEncryptedSampleEntryCtor:function(A,e,t){s.createSampleEntryCtor.call(this,A,e,t,["sinf"])},createSampleGroupCtor:function(A,e){s[A+"SampleGroupEntry"]=function(t){s.SampleGroupEntry.call(this,A,t)},s[A+"SampleGroupEntry"].prototype=new s.SampleGroupEntry,e&&(s[A+"SampleGroupEntry"].prototype.parse=e)},createTrackGroupCtor:function(A,e){s[A+"TrackGroupTypeBox"]=function(t){s.TrackGroupTypeBox.call(this,A,t)},s[A+"TrackGroupTypeBox"].prototype=new s.TrackGroupTypeBox,e&&(s[A+"TrackGroupTypeBox"].prototype.parse=e)},createUUIDBox:function(A,e,t,r,n){s.UUIDs.push(A),s.UUIDBoxes[A]=function(l){t?s.FullBox.call(this,"uuid",l,e,A):r?s.ContainerBox.call(this,"uuid",l,e,A):s.Box.call(this,"uuid",l,e,A)},s.UUIDBoxes[A].prototype=t?new s.FullBox:r?new s.ContainerBox:new s.Box,n&&(t?s.UUIDBoxes[A].prototype.parse=function(l){this.parseFullHeader(l),n&&n.call(this,l)}:s.UUIDBoxes[A].prototype.parse=n)}};s.initialize(),s.TKHD_FLAG_ENABLED=1,s.TKHD_FLAG_IN_MOVIE=2,s.TKHD_FLAG_IN_PREVIEW=4,s.TFHD_FLAG_BASE_DATA_OFFSET=1,s.TFHD_FLAG_SAMPLE_DESC=2,s.TFHD_FLAG_SAMPLE_DUR=8,s.TFHD_FLAG_SAMPLE_SIZE=16,s.TFHD_FLAG_SAMPLE_FLAGS=32,s.TFHD_FLAG_DUR_EMPTY=65536,s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF=131072,s.TRUN_FLAGS_DATA_OFFSET=1,s.TRUN_FLAGS_FIRST_FLAG=4,s.TRUN_FLAGS_DURATION=256,s.TRUN_FLAGS_SIZE=512,s.TRUN_FLAGS_FLAGS=1024,s.TRUN_FLAGS_CTS_OFFSET=2048,s.Box.prototype.add=function(A){return this.addBox(new s[A+"Box"])},s.Box.prototype.addBox=function(A){return this.boxes.push(A),this[A.type+"s"]?this[A.type+"s"].push(A):this[A.type]=A,A},s.Box.prototype.set=function(A,e){return this[A]=e,this},s.Box.prototype.addEntry=function(A,e){var t=e||"entries";return this[t]||(this[t]=[]),this[t].push(A),this},p.BoxParser=s,s.parseUUID=function(A){return s.parseHex16(A)},s.parseHex16=function(A){for(var e="",t=0;t<16;t++){var r=A.readUint8().toString(16);e+=r.length===1?"0"+r:r}return e},s.parseOneBox=function(A,e,t){var r,n=A.getPosition(),l=0,d,f;if(A.getEndPosition()-n<8)return a.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:s.ERR_NOT_ENOUGH_DATA};if(t&&t<8)return a.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:s.ERR_NOT_ENOUGH_DATA};var v=A.readUint32(),g=A.readString(4),b=g;if(a.debug("BoxParser","Found box of type '"+g+"' and size "+v+" at position "+n),l=8,g=="uuid"){if(A.getEndPosition()-A.getPosition()<16||t-l<16)return A.seek(n),a.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:s.ERR_NOT_ENOUGH_DATA};f=s.parseUUID(A),l+=16,b=f}if(v==1){if(A.getEndPosition()-A.getPosition()<8||t&&t-l<8)return A.seek(n),a.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+g+'" box'),{code:s.ERR_NOT_ENOUGH_DATA};v=A.readUint64(),l+=8}else if(v===0){if(t)v=t;else if(g!=="mdat")return a.error("BoxParser","Unlimited box size not supported for type: '"+g+"'"),r=new s.Box(g,v),{code:s.OK,box:r,size:r.size}}return v!==0&&v<l?(a.error("BoxParser","Box of type "+g+" has an invalid size "+v+" (too small to be a box)"),{code:s.ERR_NOT_ENOUGH_DATA,type:g,size:v,hdr_size:l,start:n}):v!==0&&t&&v>t?(a.error("BoxParser","Box of type '"+g+"' has a size "+v+" greater than its container size "+t),{code:s.ERR_NOT_ENOUGH_DATA,type:g,size:v,hdr_size:l,start:n}):v!==0&&n+v>A.getEndPosition()?(A.seek(n),a.info("BoxParser","Not enough data in stream to parse the entire '"+g+"' box"),{code:s.ERR_NOT_ENOUGH_DATA,type:g,size:v,hdr_size:l,start:n}):e?{code:s.OK,type:g,size:v,hdr_size:l,start:n}:(s[g+"Box"]?r=new s[g+"Box"](v):g!=="uuid"?(a.warn("BoxParser","Unknown box type: '"+g+"'"),r=new s.Box(g,v),r.has_unparsed_data=!0):s.UUIDBoxes[f]?r=new s.UUIDBoxes[f](v):(a.warn("BoxParser","Unknown uuid type: '"+f+"'"),r=new s.Box(g,v),r.uuid=f,r.has_unparsed_data=!0),r.hdr_size=l,r.start=n,r.write===s.Box.prototype.write&&r.type!=="mdat"&&(a.info("BoxParser","'"+b+"' box writing not yet implemented, keeping unparsed data in memory for later write"),r.parseDataAndRewind(A)),r.parse(A),d=A.getPosition()-(r.start+r.size),d<0?(a.warn("BoxParser","Parsing of box '"+b+"' did not read the entire indicated box data size (missing "+-d+" bytes), seeking forward"),A.seek(r.start+r.size)):d>0&&(a.error("BoxParser","Parsing of box '"+b+"' read "+d+" more bytes than the indicated box data size, seeking backwards"),r.size!==0&&A.seek(r.start+r.size)),{code:s.OK,box:r,size:r.size})},s.Box.prototype.parse=function(A){this.type!="mdat"?this.data=A.readUint8Array(this.size-this.hdr_size):this.size===0?A.seek(A.getEndPosition()):A.seek(this.start+this.size)},s.Box.prototype.parseDataAndRewind=function(A){this.data=A.readUint8Array(this.size-this.hdr_size),A.position-=this.size-this.hdr_size},s.FullBox.prototype.parseDataAndRewind=function(A){this.parseFullHeader(A),this.data=A.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,A.position-=this.size-this.hdr_size},s.FullBox.prototype.parseFullHeader=function(A){this.version=A.readUint8(),this.flags=A.readUint24(),this.hdr_size+=4},s.FullBox.prototype.parse=function(A){this.parseFullHeader(A),this.data=A.readUint8Array(this.size-this.hdr_size)},s.ContainerBox.prototype.parse=function(A){for(var e,t;A.getPosition()<this.start+this.size;)if(e=s.parseOneBox(A,!1,this.size-(A.getPosition()-this.start)),e.code===s.OK)if(t=e.box,this.boxes.push(t),this.subBoxNames&&this.subBoxNames.indexOf(t.type)!=-1)this[this.subBoxNames[this.subBoxNames.indexOf(t.type)]+"s"].push(t);else{var r=t.type!=="uuid"?t.type:t.uuid;this[r]?a.warn("Box of type "+r+" already stored in field of this type"):this[r]=t}else return},s.Box.prototype.parseLanguage=function(A){this.language=A.readUint16();var e=[];e[0]=this.language>>10&31,e[1]=this.language>>5&31,e[2]=this.language&31,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)},s.SAMPLE_ENTRY_TYPE_VISUAL="Visual",s.SAMPLE_ENTRY_TYPE_AUDIO="Audio",s.SAMPLE_ENTRY_TYPE_HINT="Hint",s.SAMPLE_ENTRY_TYPE_METADATA="Metadata",s.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",s.SAMPLE_ENTRY_TYPE_SYSTEM="System",s.SAMPLE_ENTRY_TYPE_TEXT="Text",s.SampleEntry.prototype.parseHeader=function(A){A.readUint8Array(6),this.data_reference_index=A.readUint16(),this.hdr_size+=8},s.SampleEntry.prototype.parse=function(A){this.parseHeader(A),this.data=A.readUint8Array(this.size-this.hdr_size)},s.SampleEntry.prototype.parseDataAndRewind=function(A){this.parseHeader(A),this.data=A.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,A.position-=this.size-this.hdr_size},s.SampleEntry.prototype.parseFooter=function(A){s.ContainerBox.prototype.parse.call(this,A)},s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_HINT),s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA),s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE),s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SYSTEM),s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_TEXT),s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,function(A){var e;this.parseHeader(A),A.readUint16(),A.readUint16(),A.readUint32Array(3),this.width=A.readUint16(),this.height=A.readUint16(),this.horizresolution=A.readUint32(),this.vertresolution=A.readUint32(),A.readUint32(),this.frame_count=A.readUint16(),e=Math.min(31,A.readUint8()),this.compressorname=A.readString(e),e<31&&A.readString(31-e),this.depth=A.readUint16(),A.readUint16(),this.parseFooter(A)}),s.createMediaSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,function(A){this.parseHeader(A),A.readUint32Array(2),this.channel_count=A.readUint16(),this.samplesize=A.readUint16(),A.readUint16(),A.readUint16(),this.samplerate=A.readUint32()/65536,this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"fLaC"),s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_TEXT,"enct"),s.createEncryptedSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA,"encm"),s.createBoxCtor("a1lx","AV1LayeredImageIndexingProperty",function(A){var e=A.readUint8()&1,t=((e&1)+1)*16;this.layer_size=[];for(var r=0;r<3;r++)t==16?this.layer_size[r]=A.readUint16():this.layer_size[r]=A.readUint32()}),s.createBoxCtor("a1op","OperatingPointSelectorProperty",function(A){this.op_index=A.readUint8()}),s.createFullBoxCtor("auxC","AuxiliaryTypeProperty",function(A){this.aux_type=A.readCString();var e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=A.readUint8Array(e)}),s.createBoxCtor("av1C","AV1CodecConfigurationBox",function(A){var e=A.readUint8();if((e>>7&1)!==1){a.error("av1C marker problem");return}if(this.version=e&127,this.version!==1){a.error("av1C version "+this.version+" not supported");return}if(e=A.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=e&31,e=A.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=e&3,e=A.readUint8(),this.reserved_1=e>>5&7,this.reserved_1!==0){a.error("av1C reserved_1 parsing problem");return}if(this.initial_presentation_delay_present=e>>4&1,this.initial_presentation_delay_present===1)this.initial_presentation_delay_minus_one=e&15;else if(this.reserved_2=e&15,this.reserved_2!==0){a.error("av1C reserved_2 parsing problem");return}var t=this.size-this.hdr_size-4;this.configOBUs=A.readUint8Array(t)});function T(A){var e="<table class='inner-table'>";e+="<thead><tr><th>length</th><th>nalu_data</th></tr></thead>",e+="<tbody>";for(var t=0;t<A.length;t++){var r=A[t];e+="<tr>",e+="<td>"+r.length+"</td>",e+="<td>",e+=r.nalu.reduce(function(n,l){return n+l.toString(16).padStart(2,"0")},"0x"),e+="</td></tr>"}return e+="</tbody></table>",e}s.createBoxCtor("avcC","AVCConfigurationBox",function(A){var e,t;for(this.configurationVersion=A.readUint8(),this.AVCProfileIndication=A.readUint8(),this.profile_compatibility=A.readUint8(),this.AVCLevelIndication=A.readUint8(),this.lengthSizeMinusOne=A.readUint8()&3,this.nb_SPS_nalus=A.readUint8()&31,t=this.size-this.hdr_size-6,this.SPS=[],this.SPS.toString=function(){return T(this)},e=0;e<this.nb_SPS_nalus;e++)this.SPS[e]={},this.SPS[e].length=A.readUint16(),this.SPS[e].nalu=A.readUint8Array(this.SPS[e].length),t-=2+this.SPS[e].length;for(this.nb_PPS_nalus=A.readUint8(),t--,this.PPS=[],this.PPS.toString=function(){return T(this)},e=0;e<this.nb_PPS_nalus;e++)this.PPS[e]={},this.PPS[e].length=A.readUint16(),this.PPS[e].nalu=A.readUint8Array(this.PPS[e].length),t-=2+this.PPS[e].length;t>0&&(this.ext=A.readUint8Array(t))}),s.createBoxCtor("btrt","BitRateBox",function(A){this.bufferSizeDB=A.readUint32(),this.maxBitrate=A.readUint32(),this.avgBitrate=A.readUint32()}),s.createFullBoxCtor("ccst","CodingConstraintsBox",function(A){var e=A.readUint8();this.all_ref_pics_intra=(e&128)==128,this.intra_pred_used=(e&64)==64,this.max_ref_per_pic=(e&63)>>2,A.readUint24()}),s.createBoxCtor("cdef","ComponentDefinitionBox",function(A){var e;for(this.channel_count=A.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],e=0;e<this.channel_count;e++)this.channel_indexes.push(A.readUint16()),this.channel_types.push(A.readUint16()),this.channel_associations.push(A.readUint16())}),s.createBoxCtor("clap","CleanApertureBox",function(A){this.cleanApertureWidthN=A.readUint32(),this.cleanApertureWidthD=A.readUint32(),this.cleanApertureHeightN=A.readUint32(),this.cleanApertureHeightD=A.readUint32(),this.horizOffN=A.readUint32(),this.horizOffD=A.readUint32(),this.vertOffN=A.readUint32(),this.vertOffD=A.readUint32()}),s.createBoxCtor("clli","ContentLightLevelBox",function(A){this.max_content_light_level=A.readUint16(),this.max_pic_average_light_level=A.readUint16()}),s.createFullBoxCtor("cmex","CameraExtrinsicMatrixProperty",function(A){this.flags&1&&(this.pos_x=A.readInt32()),this.flags&2&&(this.pos_y=A.readInt32()),this.flags&4&&(this.pos_z=A.readInt32()),this.flags&8&&(this.version==0?this.flags&16?(this.quat_x=A.readInt32(),this.quat_y=A.readInt32(),this.quat_z=A.readInt32()):(this.quat_x=A.readInt16(),this.quat_y=A.readInt16(),this.quat_z=A.readInt16()):this.version==1),this.flags&32&&(this.id=A.readUint32())}),s.createFullBoxCtor("cmin","CameraIntrinsicMatrixProperty",function(A){this.focal_length_x=A.readInt32(),this.principal_point_x=A.readInt32(),this.principal_point_y=A.readInt32(),this.flags&1&&(this.focal_length_y=A.readInt32(),this.skew_factor=A.readInt32())}),s.createBoxCtor("cmpd","ComponentDefinitionBox",function(A){for(this.component_count=A.readUint32(),this.component_types=[],this.component_type_urls=[],i=0;i<this.component_count;i++){var e=A.readUint16();this.component_types.push(e),e>=32768&&this.component_type_urls.push(A.readCString())}}),s.createFullBoxCtor("co64","ChunkLargeOffsetBox",function(A){var e,t;if(e=A.readUint32(),this.chunk_offsets=[],this.version===0)for(t=0;t<e;t++)this.chunk_offsets.push(A.readUint64())}),s.createFullBoxCtor("CoLL","ContentLightLevelBox",function(A){this.maxCLL=A.readUint16(),this.maxFALL=A.readUint16()}),s.createBoxCtor("colr","ColourInformationBox",function(A){if(this.colour_type=A.readString(4),this.colour_type==="nclx"){this.colour_primaries=A.readUint16(),this.transfer_characteristics=A.readUint16(),this.matrix_coefficients=A.readUint16();var e=A.readUint8();this.full_range_flag=e>>7}else this.colour_type==="rICC"?this.ICC_profile=A.readUint8Array(this.size-4):this.colour_type==="prof"&&(this.ICC_profile=A.readUint8Array(this.size-4))}),s.createFullBoxCtor("cprt","CopyrightBox",function(A){this.parseLanguage(A),this.notice=A.readCString()}),s.createFullBoxCtor("cslg","CompositionToDecodeBox",function(A){this.version===0&&(this.compositionToDTSShift=A.readInt32(),this.leastDecodeToDisplayDelta=A.readInt32(),this.greatestDecodeToDisplayDelta=A.readInt32(),this.compositionStartTime=A.readInt32(),this.compositionEndTime=A.readInt32())}),s.createFullBoxCtor("ctts","CompositionOffsetBox",function(A){var e,t;if(e=A.readUint32(),this.sample_counts=[],this.sample_offsets=[],this.version===0)for(t=0;t<e;t++){this.sample_counts.push(A.readUint32());var r=A.readInt32();r<0&&a.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(r)}else if(this.version==1)for(t=0;t<e;t++)this.sample_counts.push(A.readUint32()),this.sample_offsets.push(A.readInt32())}),s.createBoxCtor("dac3","AC3SpecificBox",function(A){var e=A.readUint8(),t=A.readUint8(),r=A.readUint8();this.fscod=e>>6,this.bsid=e>>1&31,this.bsmod=(e&1)<<2|t>>6&3,this.acmod=t>>3&7,this.lfeon=t>>2&1,this.bit_rate_code=t&3|r>>5&7}),s.createBoxCtor("dec3","EC3SpecificBox",function(A){var e=A.readUint16();this.data_rate=e>>3,this.num_ind_sub=e&7,this.ind_subs=[];for(var t=0;t<this.num_ind_sub+1;t++){var r={};this.ind_subs.push(r);var n=A.readUint8(),l=A.readUint8(),d=A.readUint8();r.fscod=n>>6,r.bsid=n>>1&31,r.bsmod=(n&1)<<4|l>>4&15,r.acmod=l>>1&7,r.lfeon=l&1,r.num_dep_sub=d>>1&15,r.num_dep_sub>0&&(r.chan_loc=(d&1)<<8|A.readUint8())}}),s.createFullBoxCtor("dfLa","FLACSpecificBox",function(A){var e=127,t=128,r=[],n=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];do{var l=A.readUint8(),d=Math.min(l&e,n.length-1);if(d?A.readUint8Array(A.readUint24()):(A.readUint8Array(13),this.samplerate=A.readUint32()>>12,A.readUint8Array(20)),r.push(n[d]),l&t)break}while(!0);this.numMetadataBlocks=r.length+" ("+r.join(", ")+")"}),s.createBoxCtor("dimm","hintimmediateBytesSent",function(A){this.bytessent=A.readUint64()}),s.createBoxCtor("dmax","hintlongestpacket",function(A){this.time=A.readUint32()}),s.createBoxCtor("dmed","hintmediaBytesSent",function(A){this.bytessent=A.readUint64()}),s.createBoxCtor("dOps","OpusSpecificBox",function(A){if(this.Version=A.readUint8(),this.OutputChannelCount=A.readUint8(),this.PreSkip=A.readUint16(),this.InputSampleRate=A.readUint32(),this.OutputGain=A.readInt16(),this.ChannelMappingFamily=A.readUint8(),this.ChannelMappingFamily!==0){this.StreamCount=A.readUint8(),this.CoupledCount=A.readUint8(),this.ChannelMapping=[];for(var e=0;e<this.OutputChannelCount;e++)this.ChannelMapping[e]=A.readUint8()}}),s.createFullBoxCtor("dref","DataReferenceBox",function(A){var e,t;this.entries=[];for(var r=A.readUint32(),n=0;n<r;n++)if(e=s.parseOneBox(A,!1,this.size-(A.getPosition()-this.start)),e.code===s.OK)t=e.box,this.entries.push(t);else return}),s.createBoxCtor("drep","hintrepeatedBytesSent",function(A){this.bytessent=A.readUint64()}),s.createFullBoxCtor("elng","ExtendedLanguageBox",function(A){this.extended_language=A.readString(this.size-this.hdr_size)}),s.createFullBoxCtor("elst","EditListBox",function(A){this.entries=[];for(var e=A.readUint32(),t=0;t<e;t++){var r={};this.entries.push(r),this.version===1?(r.segment_duration=A.readUint64(),r.media_time=A.readInt64()):(r.segment_duration=A.readUint32(),r.media_time=A.readInt32()),r.media_rate_integer=A.readInt16(),r.media_rate_fraction=A.readInt16()}}),s.createFullBoxCtor("emsg","EventMessageBox",function(A){this.version==1?(this.timescale=A.readUint32(),this.presentation_time=A.readUint64(),this.event_duration=A.readUint32(),this.id=A.readUint32(),this.scheme_id_uri=A.readCString(),this.value=A.readCString()):(this.scheme_id_uri=A.readCString(),this.value=A.readCString(),this.timescale=A.readUint32(),this.presentation_time_delta=A.readUint32(),this.event_duration=A.readUint32(),this.id=A.readUint32());var e=this.size-this.hdr_size-(4*4+(this.scheme_id_uri.length+1)+(this.value.length+1));this.version==1&&(e-=4),this.message_data=A.readUint8Array(e)}),s.createEntityToGroupCtor=function(A,e){s[A+"Box"]=function(t){s.FullBox.call(this,A,t)},s[A+"Box"].prototype=new s.FullBox,s[A+"Box"].prototype.parse=function(t){if(this.parseFullHeader(t),e)e.call(this,t);else for(this.group_id=t.readUint32(),this.num_entities_in_group=t.readUint32(),this.entity_ids=[],i=0;i<this.num_entities_in_group;i++){var r=t.readUint32();this.entity_ids.push(r)}}},s.createEntityToGroupCtor("aebr"),s.createEntityToGroupCtor("afbr"),s.createEntityToGroupCtor("albc"),s.createEntityToGroupCtor("altr"),s.createEntityToGroupCtor("brst"),s.createEntityToGroupCtor("dobr"),s.createEntityToGroupCtor("eqiv"),s.createEntityToGroupCtor("favc"),s.createEntityToGroupCtor("fobr"),s.createEntityToGroupCtor("iaug"),s.createEntityToGroupCtor("pano"),s.createEntityToGroupCtor("slid"),s.createEntityToGroupCtor("ster"),s.createEntityToGroupCtor("tsyn"),s.createEntityToGroupCtor("wbbr"),s.createEntityToGroupCtor("prgr"),s.createEntityToGroupCtor("pymd",function(A){this.group_id=A.readUint32(),this.num_entities_in_group=A.readUint32(),this.entity_ids=[];for(var e=0;e<this.num_entities_in_group;e++){var t=A.readUint32();this.entity_ids.push(t)}for(this.tile_size_x=A.readUint16(),this.tile_size_y=A.readUint16(),this.layer_binning=[],this.tiles_in_layer_column_minus1=[],this.tiles_in_layer_row_minus1=[],e=0;e<this.num_entities_in_group;e++)this.layer_binning[e]=A.readUint16(),this.tiles_in_layer_row_minus1[e]=A.readUint16(),this.tiles_in_layer_column_minus1[e]=A.readUint16()}),s.createFullBoxCtor("esds","ElementaryStreamDescriptorBox",function(A){var e=A.readUint8Array(this.size-this.hdr_size);if(typeof u<"u"){var t=new u;this.esd=t.parseOneDescriptor(new o(e.buffer,0,o.BIG_ENDIAN))}}),s.createBoxCtor("fiel","FieldHandlingBox",function(A){this.fieldCount=A.readUint8(),this.fieldOrdering=A.readUint8()}),s.createBoxCtor("frma","OriginalFormatBox",function(A){this.data_format=A.readString(4)}),s.createBoxCtor("ftyp","FileTypeBox",function(A){var e=this.size-this.hdr_size;this.major_brand=A.readString(4),this.minor_version=A.readUint32(),e-=8,this.compatible_brands=[];for(var t=0;e>=4;)this.compatible_brands[t]=A.readString(4),e-=4,t++}),s.createFullBoxCtor("hdlr","HandlerBox",function(A){this.version===0&&(A.readUint32(),this.handler=A.readString(4),A.readUint32Array(3),this.name=A.readString(this.size-this.hdr_size-20),this.name[this.name.length-1]==="\0"&&(this.name=this.name.slice(0,-1)))}),s.createBoxCtor("hvcC","HEVCConfigurationBox",function(A){var e,t,r,n;this.configurationVersion=A.readUint8(),n=A.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(n&32)>>5,this.general_profile_idc=n&31,this.general_profile_compatibility=A.readUint32(),this.general_constraint_indicator=A.readUint8Array(6),this.general_level_idc=A.readUint8(),this.min_spatial_segmentation_idc=A.readUint16()&4095,this.parallelismType=A.readUint8()&3,this.chroma_format_idc=A.readUint8()&3,this.bit_depth_luma_minus8=A.readUint8()&7,this.bit_depth_chroma_minus8=A.readUint8()&7,this.avgFrameRate=A.readUint16(),n=A.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(n&13)>>3,this.temporalIdNested=(n&4)>>2,this.lengthSizeMinusOne=n&3,this.nalu_arrays=[],this.nalu_arrays.toString=function(){var g="<table class='inner-table'>";g+="<thead><tr><th>completeness</th><th>nalu_type</th><th>nalu_data</th></tr></thead>",g+="<tbody>";for(var b=0;b<this.length;b++){var k=this[b];g+="<tr>",g+="<td rowspan='"+k.length+"'>"+k.completeness+"</td>",g+="<td rowspan='"+k.length+"'>"+k.nalu_type+"</td>";for(var L=0;L<k.length;L++){var I=k[L];L!==0&&(g+="<tr>"),g+="<td>",g+=I.data.reduce(function(N,Y){return N+Y.toString(16).padStart(2,"0")},"0x"),g+="</td></tr>"}}return g+="</tbody></table>",g};var l=A.readUint8();for(e=0;e<l;e++){var d=[];this.nalu_arrays.push(d),n=A.readUint8(),d.completeness=(n&128)>>7,d.nalu_type=n&63;var f=A.readUint16();for(t=0;t<f;t++){var v={};d.push(v),r=A.readUint16(),v.data=A.readUint8Array(r)}}}),s.createFullBoxCtor("iinf","ItemInfoBox",function(A){var e;this.version===0?this.entry_count=A.readUint16():this.entry_count=A.readUint32(),this.item_infos=[];for(var t=0;t<this.entry_count;t++)if(e=s.parseOneBox(A,!1,this.size-(A.getPosition()-this.start)),e.code===s.OK)e.box.type!=="infe"&&a.error("BoxParser","Expected 'infe' box, got "+e.box.type),this.item_infos[t]=e.box;else return}),s.createFullBoxCtor("iloc","ItemLocationBox",function(A){var e;e=A.readUint8(),this.offset_size=e>>4&15,this.length_size=e&15,e=A.readUint8(),this.base_offset_size=e>>4&15,this.version===1||this.version===2?this.index_size=e&15:this.index_size=0,this.items=[];var t=0;if(this.version<2)t=A.readUint16();else if(this.version===2)t=A.readUint32();else throw"version of iloc box not supported";for(var r=0;r<t;r++){var n={};if(this.items.push(n),this.version<2)n.item_ID=A.readUint16();else if(this.version===2)n.item_ID=A.readUint32();else throw"version of iloc box not supported";switch(this.version===1||this.version===2?n.construction_method=A.readUint16()&15:n.construction_method=0,n.data_reference_index=A.readUint16(),this.base_offset_size){case 0:n.base_offset=0;break;case 4:n.base_offset=A.readUint32();break;case 8:n.base_offset=A.readUint64();break;default:throw"Error reading base offset size"}var l=A.readUint16();n.extents=[];for(var d=0;d<l;d++){var f={};if(n.extents.push(f),this.version===1||this.version===2)switch(this.index_size){case 0:f.extent_index=0;break;case 4:f.extent_index=A.readUint32();break;case 8:f.extent_index=A.readUint64();break;default:throw"Error reading extent index"}switch(this.offset_size){case 0:f.extent_offset=0;break;case 4:f.extent_offset=A.readUint32();break;case 8:f.extent_offset=A.readUint64();break;default:throw"Error reading extent index"}switch(this.length_size){case 0:f.extent_length=0;break;case 4:f.extent_length=A.readUint32();break;case 8:f.extent_length=A.readUint64();break;default:throw"Error reading extent index"}}}}),s.createBoxCtor("imir","ImageMirror",function(A){var e=A.readUint8();this.reserved=e>>7,this.axis=e&1}),s.createFullBoxCtor("infe","ItemInfoEntry",function(A){if((this.version===0||this.version===1)&&(this.item_ID=A.readUint16(),this.item_protection_index=A.readUint16(),this.item_name=A.readCString(),this.content_type=A.readCString(),this.content_encoding=A.readCString()),this.version===1){this.extension_type=A.readString(4),a.warn("BoxParser","Cannot parse extension type"),A.seek(this.start+this.size);return}this.version>=2&&(this.version===2?this.item_ID=A.readUint16():this.version===3&&(this.item_ID=A.readUint32()),this.item_protection_index=A.readUint16(),this.item_type=A.readString(4),this.item_name=A.readCString(),this.item_type==="mime"?(this.content_type=A.readCString(),this.content_encoding=A.readCString()):this.item_type==="uri "&&(this.item_uri_type=A.readCString()))}),s.createFullBoxCtor("ipma","ItemPropertyAssociationBox",function(A){var e,t;for(entry_count=A.readUint32(),this.associations=[],e=0;e<entry_count;e++){var r={};this.associations.push(r),this.version<1?r.id=A.readUint16():r.id=A.readUint32();var n=A.readUint8();for(r.props=[],t=0;t<n;t++){var l=A.readUint8(),d={};r.props.push(d),d.essential=(l&128)>>7===1,this.flags&1?d.property_index=(l&127)<<8|A.readUint8():d.property_index=l&127}}}),s.createFullBoxCtor("iref","ItemReferenceBox",function(A){var e,t;for(this.references=[];A.getPosition()<this.start+this.size;)if(e=s.parseOneBox(A,!0,this.size-(A.getPosition()-this.start)),e.code===s.OK)this.version===0?t=new s.SingleItemTypeReferenceBox(e.type,e.size,e.hdr_size,e.start):t=new s.SingleItemTypeReferenceBoxLarge(e.type,e.size,e.hdr_size,e.start),t.write===s.Box.prototype.write&&t.type!=="mdat"&&(a.warn("BoxParser",t.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),t.parseDataAndRewind(A)),t.parse(A),this.references.push(t);else return}),s.createBoxCtor("irot","ImageRotation",function(A){this.angle=A.readUint8()&3}),s.createFullBoxCtor("ispe","ImageSpatialExtentsProperty",function(A){this.image_width=A.readUint32(),this.image_height=A.readUint32()}),s.createFullBoxCtor("kind","KindBox",function(A){this.schemeURI=A.readCString(),this.value=A.readCString()}),s.createFullBoxCtor("leva","LevelAssignmentBox",function(A){var e=A.readUint8();this.levels=[];for(var t=0;t<e;t++){var r={};this.levels[t]=r,r.track_ID=A.readUint32();var n=A.readUint8();switch(r.padding_flag=n>>7,r.assignment_type=n&127,r.assignment_type){case 0:r.grouping_type=A.readString(4);break;case 1:r.grouping_type=A.readString(4),r.grouping_type_parameter=A.readUint32();break;case 2:break;case 3:break;case 4:r.sub_track_id=A.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}}),s.createBoxCtor("lhvC","LHEVCConfigurationBox",function(A){var e,t,r;this.configurationVersion=A.readUint8(),this.min_spatial_segmentation_idc=A.readUint16()&4095,this.parallelismType=A.readUint8()&3,r=A.readUint8(),this.numTemporalLayers=(r&13)>>3,this.temporalIdNested=(r&4)>>2,this.lengthSizeMinusOne=r&3,this.nalu_arrays=[],this.nalu_arrays.toString=function(){var g="<table class='inner-table'>";g+="<thead><tr><th>completeness</th><th>nalu_type</th><th>nalu_data</th></tr></thead>",g+="<tbody>";for(var b=0;b<this.length;b++){var k=this[b];g+="<tr>",g+="<td rowspan='"+k.length+"'>"+k.completeness+"</td>",g+="<td rowspan='"+k.length+"'>"+k.nalu_type+"</td>";for(var L=0;L<k.length;L++){var I=k[L];L!==0&&(g+="<tr>"),g+="<td>",g+=I.data.reduce(function(N,Y){return N+Y.toString(16).padStart(2,"0")},"0x"),g+="</td></tr>"}}return g+="</tbody></table>",g};var n=A.readUint8();for(e=0;e<n;e++){var l=[];this.nalu_arrays.push(l),r=A.readUint8(),l.completeness=(r&128)>>7,l.nalu_type=r&63;var d=A.readUint16();for(t=0;t<d;t++){var f={};l.push(f);var v=A.readUint16();f.data=A.readUint8Array(v)}}}),s.createBoxCtor("lsel","LayerSelectorProperty",function(A){this.layer_id=A.readUint16()}),s.createBoxCtor("maxr","hintmaxrate",function(A){this.period=A.readUint32(),this.bytes=A.readUint32()});function P(A,e){this.x=A,this.y=e}P.prototype.toString=function(){return"("+this.x+","+this.y+")"},s.createBoxCtor("mdcv","MasteringDisplayColourVolumeBox",function(A){this.display_primaries=[],this.display_primaries[0]=new P(A.readUint16(),A.readUint16()),this.display_primaries[1]=new P(A.readUint16(),A.readUint16()),this.display_primaries[2]=new P(A.readUint16(),A.readUint16()),this.white_point=new P(A.readUint16(),A.readUint16()),this.max_display_mastering_luminance=A.readUint32(),this.min_display_mastering_luminance=A.readUint32()}),s.createFullBoxCtor("mdhd","MediaHeaderBox",function(A){this.version==1?(this.creation_time=A.readUint64(),this.modification_time=A.readUint64(),this.timescale=A.readUint32(),this.duration=A.readUint64()):(this.creation_time=A.readUint32(),this.modification_time=A.readUint32(),this.timescale=A.readUint32(),this.duration=A.readUint32()),this.parseLanguage(A),A.readUint16()}),s.createFullBoxCtor("mehd","MovieExtendsHeaderBox",function(A){this.flags&1&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),this.version==1?this.fragment_duration=A.readUint64():this.fragment_duration=A.readUint32()}),s.createFullBoxCtor("meta","MetaBox",function(A){this.boxes=[],s.ContainerBox.prototype.parse.call(this,A)}),s.createFullBoxCtor("mfhd","MovieFragmentHeaderBox",function(A){this.sequence_number=A.readUint32()}),s.createFullBoxCtor("mfro","MovieFragmentRandomAccessOffsetBox",function(A){this._size=A.readUint32()}),s.createFullBoxCtor("mskC","MaskConfigurationProperty",function(A){this.bits_per_pixel=A.readUint8()}),s.createFullBoxCtor("mvhd","MovieHeaderBox",function(A){this.version==1?(this.creation_time=A.readUint64(),this.modification_time=A.readUint64(),this.timescale=A.readUint32(),this.duration=A.readUint64()):(this.creation_time=A.readUint32(),this.modification_time=A.readUint32(),this.timescale=A.readUint32(),this.duration=A.readUint32()),this.rate=A.readUint32(),this.volume=A.readUint16()>>8,A.readUint16(),A.readUint32Array(2),this.matrix=A.readUint32Array(9),A.readUint32Array(6),this.next_track_id=A.readUint32()}),s.createBoxCtor("npck","hintPacketsSent",function(A){this.packetssent=A.readUint32()}),s.createBoxCtor("nump","hintPacketsSent",function(A){this.packetssent=A.readUint64()}),s.createFullBoxCtor("padb","PaddingBitsBox",function(A){var e=A.readUint32();this.padbits=[];for(var t=0;t<Math.floor((e+1)/2);t++)this.padbits=A.readUint8()}),s.createBoxCtor("pasp","PixelAspectRatioBox",function(A){this.hSpacing=A.readUint32(),this.vSpacing=A.readUint32()}),s.createBoxCtor("payl","CuePayloadBox",function(A){this.text=A.readString(this.size-this.hdr_size)}),s.createBoxCtor("payt","hintpayloadID",function(A){this.payloadID=A.readUint32();var e=A.readUint8();this.rtpmap_string=A.readString(e)}),s.createFullBoxCtor("pdin","ProgressiveDownloadInfoBox",function(A){var e=(this.size-this.hdr_size)/8;this.rate=[],this.initial_delay=[];for(var t=0;t<e;t++)this.rate[t]=A.readUint32(),this.initial_delay[t]=A.readUint32()}),s.createFullBoxCtor("pitm","PrimaryItemBox",function(A){this.version===0?this.item_id=A.readUint16():this.item_id=A.readUint32()}),s.createFullBoxCtor("pixi","PixelInformationProperty",function(A){var e;for(this.num_channels=A.readUint8(),this.bits_per_channels=[],e=0;e<this.num_channels;e++)this.bits_per_channels[e]=A.readUint8()}),s.createBoxCtor("pmax","hintlargestpacket",function(A){this.bytes=A.readUint32()}),s.createFullBoxCtor("prdi","ProgressiveDerivedImageItemInformationProperty",function(A){if(this.step_count=A.readUint16(),this.item_count=[],this.flags&2)for(var e=0;e<this.step_count;e++)this.item_count[e]=A.readUint16()}),s.createFullBoxCtor("prft","ProducerReferenceTimeBox",function(A){this.ref_track_id=A.readUint32(),this.ntp_timestamp=A.readUint64(),this.version===0?this.media_time=A.readUint32():this.media_time=A.readUint64()}),s.createFullBoxCtor("pssh","ProtectionSystemSpecificHeaderBox",function(A){if(this.system_id=s.parseHex16(A),this.version>0){var e=A.readUint32();this.kid=[];for(var t=0;t<e;t++)this.kid[t]=s.parseHex16(A)}var r=A.readUint32();r>0&&(this.data=A.readUint8Array(r))}),s.createFullBoxCtor("clef","TrackCleanApertureDimensionsBox",function(A){this.width=A.readUint32(),this.height=A.readUint32()}),s.createFullBoxCtor("enof","TrackEncodedPixelsDimensionsBox",function(A){this.width=A.readUint32(),this.height=A.readUint32()}),s.createFullBoxCtor("prof","TrackProductionApertureDimensionsBox",function(A){this.width=A.readUint32(),this.height=A.readUint32()}),s.createContainerBoxCtor("tapt","TrackApertureModeDimensionsBox",null,["clef","prof","enof"]),s.createBoxCtor("rtp ","rtpmoviehintinformation",function(A){this.descriptionformat=A.readString(4),this.sdptext=A.readString(this.size-this.hdr_size-4)}),s.createFullBoxCtor("saio","SampleAuxiliaryInformationOffsetsBox",function(A){this.flags&1&&(this.aux_info_type=A.readString(4),this.aux_info_type_parameter=A.readUint32());var e=A.readUint32();this.offset=[];for(var t=0;t<e;t++)this.version===0?this.offset[t]=A.readUint32():this.offset[t]=A.readUint64()}),s.createFullBoxCtor("saiz","SampleAuxiliaryInformationSizesBox",function(A){if(this.flags&1&&(this.aux_info_type=A.readString(4),this.aux_info_type_parameter=A.readUint32()),this.default_sample_info_size=A.readUint8(),this.sample_count=A.readUint32(),this.sample_info_size=[],this.default_sample_info_size===0)for(var e=0;e<this.sample_count;e++)this.sample_info_size[e]=A.readUint8()}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA,"mett",function(A){this.parseHeader(A),this.content_encoding=A.readCString(),this.mime_format=A.readCString(),this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA,"metx",function(A){this.parseHeader(A),this.content_encoding=A.readCString(),this.namespace=A.readCString(),this.schema_location=A.readCString(),this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"sbtt",function(A){this.parseHeader(A),this.content_encoding=A.readCString(),this.mime_format=A.readCString(),this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"stpp",function(A){this.parseHeader(A),this.namespace=A.readCString(),this.schema_location=A.readCString(),this.auxiliary_mime_types=A.readCString(),this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"stxt",function(A){this.parseHeader(A),this.content_encoding=A.readCString(),this.mime_format=A.readCString(),this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_SUBTITLE,"tx3g",function(A){this.parseHeader(A),this.displayFlags=A.readUint32(),this.horizontal_justification=A.readInt8(),this.vertical_justification=A.readInt8(),this.bg_color_rgba=A.readUint8Array(4),this.box_record=A.readInt16Array(4),this.style_record=A.readUint8Array(12),this.parseFooter(A)}),s.createSampleEntryCtor(s.SAMPLE_ENTRY_TYPE_METADATA,"wvtt",function(A){this.parseHeader(A),this.parseFooter(A)}),s.createSampleGroupCtor("alst",function(A){var e,t=A.readUint16();for(this.first_output_sample=A.readUint16(),this.sample_offset=[],e=0;e<t;e++)this.sample_offset[e]=A.readUint32();var r=this.description_length-4-4*t;for(this.num_output_samples=[],this.num_total_samples=[],e=0;e<r/4;e++)this.num_output_samples[e]=A.readUint16(),this.num_total_samples[e]=A.readUint16()}),s.createSampleGroupCtor("avll",function(A){this.layerNumber=A.readUint8(),this.accurateStatisticsFlag=A.readUint8(),this.avgBitRate=A.readUint16(),this.avgFrameRate=A.readUint16()}),s.createSampleGroupCtor("avss",function(A){this.subSequenceIdentifier=A.readUint16(),this.layerNumber=A.readUint8();var e=A.readUint8();this.durationFlag=e>>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=A.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=A.readUint8(),this.avgBitRate=A.readUint16(),this.avgFrameRate=A.readUint16()),this.dependency=[];for(var t=A.readUint8(),r=0;r<t;r++){var n={};this.dependency.push(n),n.subSeqDirectionFlag=A.readUint8(),n.layerNumber=A.readUint8(),n.subSequenceIdentifier=A.readUint16()}}),s.createSampleGroupCtor("dtrt",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("mvif",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("prol",function(A){this.roll_distance=A.readInt16()}),s.createSampleGroupCtor("rap ",function(A){var e=A.readUint8();this.num_leading_samples_known=e>>7,this.num_leading_samples=e&127}),s.createSampleGroupCtor("rash",function(A){if(this.operation_point_count=A.readUint16(),this.description_length!==2+(this.operation_point_count===1?2:this.operation_point_count*6)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=A.readUint8Array(this.description_length-2);else{if(this.operation_point_count===1)this.target_rate_share=A.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var e=0;e<this.operation_point_count;e++)this.available_bitrate[e]=A.readUint32(),this.target_rate_share[e]=A.readUint16()}this.maximum_bitrate=A.readUint32(),this.minimum_bitrate=A.readUint32(),this.discard_priority=A.readUint8()}}),s.createSampleGroupCtor("roll",function(A){this.roll_distance=A.readInt16()}),s.SampleGroupEntry.prototype.parse=function(A){a.warn("BoxParser","Unknown Sample Group type: "+this.grouping_type),this.data=A.readUint8Array(this.description_length)},s.createSampleGroupCtor("scif",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("scnm",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("seig",function(A){this.reserved=A.readUint8();var e=A.readUint8();this.crypt_byte_block=e>>4,this.skip_byte_block=e&15,this.isProtected=A.readUint8(),this.Per_Sample_IV_Size=A.readUint8(),this.KID=s.parseHex16(A),this.constant_IV_size=0,this.constant_IV=0,this.isProtected===1&&this.Per_Sample_IV_Size===0&&(this.constant_IV_size=A.readUint8(),this.constant_IV=A.readUint8Array(this.constant_IV_size))}),s.createSampleGroupCtor("stsa",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("sync",function(A){var e=A.readUint8();this.NAL_unit_type=e&63}),s.createSampleGroupCtor("tele",function(A){var e=A.readUint8();this.level_independently_decodable=e>>7}),s.createSampleGroupCtor("tsas",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("tscl",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createSampleGroupCtor("vipr",function(A){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}),s.createFullBoxCtor("sbgp","SampleToGroupBox",function(A){this.grouping_type=A.readString(4),this.version===1?this.grouping_type_parameter=A.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var e=A.readUint32(),t=0;t<e;t++){var r={};this.entries.push(r),r.sample_count=A.readInt32(),r.group_description_index=A.readInt32()}});function z(A,e){this.bad_pixel_row=A,this.bad_pixel_column=e}z.prototype.toString=function(){return"[row: "+this.bad_pixel_row+", column: "+this.bad_pixel_column+"]"},s.createFullBoxCtor("sbpm","SensorBadPixelsMapBox",function(A){var e;for(this.component_count=A.readUint16(),this.component_index=[],e=0;e<this.component_count;e++)this.component_index.push(A.readUint16());var t=A.readUint8();for(this.correction_applied=(t&128)==128,this.num_bad_rows=A.readUint32(),this.num_bad_cols=A.readUint32(),this.num_bad_pixels=A.readUint32(),this.bad_rows=[],this.bad_columns=[],this.bad_pixels=[],e=0;e<this.num_bad_rows;e++)this.bad_rows.push(A.readUint32());for(e=0;e<this.num_bad_cols;e++)this.bad_columns.push(A.readUint32());for(e=0;e<this.num_bad_pixels;e++){var r=A.readUint32(),n=A.readUint32();this.bad_pixels.push(new z(r,n))}}),s.createFullBoxCtor("schm","SchemeTypeBox",function(A){this.scheme_type=A.readString(4),this.scheme_version=A.readUint32(),this.flags&1&&(this.scheme_uri=A.readString(this.size-this.hdr_size-8))}),s.createBoxCtor("sdp ","rtptracksdphintinformation",function(A){this.sdptext=A.readString(this.size-this.hdr_size)}),s.createFullBoxCtor("sdtp","SampleDependencyTypeBox",function(A){var e,t=this.size-this.hdr_size;this.is_leading=[],this.sample_depends_on=[],this.sample_is_depended_on=[],this.sample_has_redundancy=[];for(var r=0;r<t;r++)e=A.readUint8(),this.is_leading[r]=e>>6,this.sample_depends_on[r]=e>>4&3,this.sample_is_depended_on[r]=e>>2&3,this.sample_has_redundancy[r]=e&3}),s.createFullBoxCtor("senc","SampleEncryptionBox"),s.createFullBoxCtor("sgpd","SampleGroupDescriptionBox",function(A){this.grouping_type=A.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),this.version===1?this.default_length=A.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=A.readUint32()),this.entries=[];for(var e=A.readUint32(),t=0;t<e;t++){var r;s[this.grouping_type+"SampleGroupEntry"]?r=new s[this.grouping_type+"SampleGroupEntry"](this.grouping_type):r=new s.SampleGroupEntry(this.grouping_type),this.entries.push(r),this.version===1?this.default_length===0?r.description_length=A.readUint32():r.description_length=this.default_length:r.description_length=this.default_length,r.write===s.SampleGroupEntry.prototype.write&&(a.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),r.data=A.readUint8Array(r.description_length),A.position-=r.description_length),r.parse(A)}}),s.createFullBoxCtor("sidx","CompressedSegmentIndexBox",function(A){this.reference_ID=A.readUint32(),this.timescale=A.readUint32(),this.version===0?(this.earliest_presentation_time=A.readUint32(),this.first_offset=A.readUint32()):(this.earliest_presentation_time=A.readUint64(),this.first_offset=A.readUint64()),A.readUint16(),this.references=[];for(var e=A.readUint16(),t=0;t<e;t++){var r={};this.references.push(r);var n=A.readUint32();r.reference_type=n>>31&1,r.referenced_size=n&2147483647,r.subsegment_duration=A.readUint32(),n=A.readUint32(),r.starts_with_SAP=n>>31&1,r.SAP_type=n>>28&7,r.SAP_delta_time=n&268435455}}),s.SingleItemTypeReferenceBox=function(A,e,t,r){s.Box.call(this,A,e),this.hdr_size=t,this.start=r},s.SingleItemTypeReferenceBox.prototype=new s.Box,s.SingleItemTypeReferenceBox.prototype.parse=function(A){this.from_item_ID=A.readUint16();var e=A.readUint16();this.references=[];for(var t=0;t<e;t++)this.references[t]={},this.references[t].to_item_ID=A.readUint16()},s.SingleItemTypeReferenceBoxLarge=function(A,e,t,r){s.Box.call(this,A,e),this.hdr_size=t,this.start=r},s.SingleItemTypeReferenceBoxLarge.prototype=new s.Box,s.SingleItemTypeReferenceBoxLarge.prototype.parse=function(A){this.from_item_ID=A.readUint32();var e=A.readUint16();this.references=[];for(var t=0;t<e;t++)this.references[t]={},this.references[t].to_item_ID=A.readUint32()},s.createFullBoxCtor("SmDm","SMPTE2086MasteringDisplayMetadataBox",function(A){this.primaryRChromaticity_x=A.readUint16(),this.primaryRChromaticity_y=A.readUint16(),this.primaryGChromaticity_x=A.readUint16(),this.primaryGChromaticity_y=A.readUint16(),this.primaryBChromaticity_x=A.readUint16(),this.primaryBChromaticity_y=A.readUint16(),this.whitePointChromaticity_x=A.readUint16(),this.whitePointChromaticity_y=A.readUint16(),this.luminanceMax=A.readUint32(),this.luminanceMin=A.readUint32()}),s.createFullBoxCtor("smhd","SoundMediaHeaderBox",function(A){this.balance=A.readUint16(),A.readUint16()}),s.createFullBoxCtor("ssix","CompressedSubsegmentIndexBox",function(A){this.subsegments=[];for(var e=A.readUint32(),t=0;t<e;t++){var r={};this.subsegments.push(r),r.ranges=[];for(var n=A.readUint32(),l=0;l<n;l++){var d={};r.ranges.push(d),d.level=A.readUint8(),d.range_size=A.readUint24()}}}),s.createFullBoxCtor("stco","ChunkOffsetBox",function(A){var e;if(e=A.readUint32(),this.chunk_offsets=[],this.version===0)for(var t=0;t<e;t++)this.chunk_offsets.push(A.readUint32())}),s.createFullBoxCtor("stdp","DegradationPriorityBox",function(A){var e=(this.size-this.hdr_size)/2;this.priority=[];for(var t=0;t<e;t++)this.priority[t]=A.readUint16()}),s.createFullBoxCtor("sthd","SubtitleMediaHeaderBox"),s.createFullBoxCtor("stri","SubTrackInformationBox",function(A){this.switch_group=A.readUint16(),this.alternate_group=A.readUint16(),this.sub_track_id=A.readUint32();var e=(this.size-this.hdr_size-8)/4;this.attribute_list=[];for(var t=0;t<e;t++)this.attribute_list[t]=A.readUint32()}),s.createFullBoxCtor("stsc","SampleToChunkBox",function(A){var e,t;if(e=A.readUint32(),this.first_chunk=[],this.samples_per_chunk=[],this.sample_description_index=[],this.version===0)for(t=0;t<e;t++)this.first_chunk.push(A.readUint32()),this.samples_per_chunk.push(A.readUint32()),this.sample_description_index.push(A.readUint32())}),s.createFullBoxCtor("stsd","SampleDescriptionBox",function(A){var e,t,r,n;for(this.entries=[],r=A.readUint32(),e=1;e<=r;e++)if(t=s.parseOneBox(A,!0,this.size-(A.getPosition()-this.start)),t.code===s.OK)s[t.type+"SampleEntry"]?(n=new s[t.type+"SampleEntry"](t.size),n.hdr_size=t.hdr_size,n.start=t.start):(a.warn("BoxParser","Unknown sample entry type: "+t.type),n=new s.SampleEntry(t.type,t.size,t.hdr_size,t.start)),n.write===s.SampleEntry.prototype.write&&(a.info("BoxParser","SampleEntry "+n.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(A)),n.parse(A),this.entries.push(n);else return}),s.createFullBoxCtor("stsg","SubTrackSampleGroupBox",function(A){this.grouping_type=A.readUint32();var e=A.readUint16();this.group_description_index=[];for(var t=0;t<e;t++)this.group_description_index[t]=A.readUint32()}),s.createFullBoxCtor("stsh","ShadowSyncSampleBox",function(A){var e,t;if(e=A.readUint32(),this.shadowed_sample_numbers=[],this.sync_sample_numbers=[],this.version===0)for(t=0;t<e;t++)this.shadowed_sample_numbers.push(A.readUint32()),this.sync_sample_numbers.push(A.readUint32())}),s.createFullBoxCtor("stss","SyncSampleBox",function(A){var e,t;if(t=A.readUint32(),this.version===0)for(this.sample_numbers=[],e=0;e<t;e++)this.sample_numbers.push(A.readUint32())}),s.createFullBoxCtor("stsz","SampleSizeBox",function(A){var e;if(this.sample_sizes=[],this.version===0)for(this.sample_size=A.readUint32(),this.sample_count=A.readUint32(),e=0;e<this.sample_count;e++)this.sample_size===0?this.sample_sizes.push(A.readUint32()):this.sample_sizes[e]=this.sample_size}),s.createFullBoxCtor("stts","TimeToSampleBox",function(A){var e,t,r;if(e=A.readUint32(),this.sample_counts=[],this.sample_deltas=[],this.version===0)for(t=0;t<e;t++)this.sample_counts.push(A.readUint32()),r=A.readInt32(),r<0&&(a.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),r=1),this.sample_deltas.push(r)}),s.createFullBoxCtor("stvi","StereoVideoBox",function(A){var e=A.readUint32();this.single_view_allowed=e&3,this.stereo_scheme=A.readUint32();var t=A.readUint32();this.stereo_indication_type=A.readString(t);var r,n;for(this.boxes=[];A.getPosition()<this.start+this.size;)if(r=s.parseOneBox(A,!1,this.size-(A.getPosition()-this.start)),r.code===s.OK)n=r.box,this.boxes.push(n),this[n.type]=n;else return}),s.createBoxCtor("styp","SegmentTypeBox",function(A){s.ftypBox.prototype.parse.call(this,A)}),s.createFullBoxCtor("stz2","CompactSampleSizeBox",function(A){var e,t;if(this.sample_sizes=[],this.version===0)if(this.reserved=A.readUint24(),this.field_size=A.readUint8(),t=A.readUint32(),this.field_size===4)for(e=0;e<t;e+=2){var r=A.readUint8();this.sample_sizes[e]=r>>4&15,this.sample_sizes[e+1]=r&15}else if(this.field_size===8)for(e=0;e<t;e++)this.sample_sizes[e]=A.readUint8();else if(this.field_size===16)for(e=0;e<t;e++)this.sample_sizes[e]=A.readUint16();else a.error("BoxParser","Error in length field in stz2 box")}),s.createFullBoxCtor("subs","SubSampleInformationBox",function(A){var e,t,r,n;for(r=A.readUint32(),this.entries=[],e=0;e<r;e++){var l={};if(this.entries[e]=l,l.sample_delta=A.readUint32(),l.subsamples=[],n=A.readUint16(),n>0)for(t=0;t<n;t++){var d={};l.subsamples.push(d),this.version==1?d.size=A.readUint32():d.size=A.readUint16(),d.priority=A.readUint8(),d.discardable=A.readUint8(),d.codec_specific_parameters=A.readUint32()}}}),s.createFullBoxCtor("tenc","TrackEncryptionBox",function(A){if(A.readUint8(),this.version===0)A.readUint8();else{var e=A.readUint8();this.default_crypt_byte_block=e>>4&15,this.default_skip_byte_block=e&15}this.default_isProtected=A.readUint8(),this.default_Per_Sample_IV_Size=A.readUint8(),this.default_KID=s.parseHex16(A),this.default_isProtected===1&&this.default_Per_Sample_IV_Size===0&&(this.default_constant_IV_size=A.readUint8(),this.default_constant_IV=A.readUint8Array(this.default_constant_IV_size))}),s.createFullBoxCtor("tfdt","TrackFragmentBaseMediaDecodeTimeBox",function(A){this.version==1?this.baseMediaDecodeTime=A.readUint64():this.baseMediaDecodeTime=A.readUint32()}),s.createFullBoxCtor("tfhd","TrackFragmentHeaderBox",function(A){var e=0;this.track_id=A.readUint32(),this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=A.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=A.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=A.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=A.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&s.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=A.readUint32(),e+=4):this.default_sample_flags=0}),s.createFullBoxCtor("tfra","TrackFragmentRandomAccessBox",function(A){this.track_ID=A.readUint32(),A.readUint24();var e=A.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=e&3,this.entries=[];for(var t=A.readUint32(),r=0;r<t;r++)this.version===1?(this.time=A.readUint64(),this.moof_offset=A.readUint64()):(this.time=A.readUint32(),this.moof_offset=A.readUint32()),this.traf_number=A["readUint"+8*(this.length_size_of_traf_num+1)](),this.trun_number=A["readUint"+8*(this.length_size_of_trun_num+1)](),this.sample_number=A["readUint"+8*(this.length_size_of_sample_num+1)]()}),s.createFullBoxCtor("tkhd","TrackHeaderBox",function(A){this.version==1?(this.creation_time=A.readUint64(),this.modification_time=A.readUint64(),this.track_id=A.readUint32(),A.readUint32(),this.duration=A.readUint64()):(this.creation_time=A.readUint32(),this.modification_time=A.readUint32(),this.track_id=A.readUint32(),A.readUint32(),this.duration=A.readUint32()),A.readUint32Array(2),this.layer=A.readInt16(),this.alternate_group=A.readInt16(),this.volume=A.readInt16()>>8,A.readUint16(),this.matrix=A.readInt32Array(9),this.width=A.readUint32(),this.height=A.readUint32()}),s.createBoxCtor("tmax","hintmaxrelativetime",function(A){this.time=A.readUint32()}),s.createBoxCtor("tmin","hintminrelativetime",function(A){this.time=A.readUint32()}),s.createBoxCtor("totl","hintBytesSent",function(A){this.bytessent=A.readUint32()}),s.createBoxCtor("tpay","hintBytesSent",function(A){this.bytessent=A.readUint32()}),s.createBoxCtor("tpyl","hintBytesSent",function(A){this.bytessent=A.readUint64()}),s.TrackGroupTypeBox.prototype.parse=function(A){this.parseFullHeader(A),this.track_group_id=A.readUint32()},s.createTrackGroupCtor("msrc"),s.TrackReferenceTypeBox=function(A,e,t,r){s.Box.call(this,A,e),this.hdr_size=t,this.start=r},s.TrackReferenceTypeBox.prototype=new s.Box,s.TrackReferenceTypeBox.prototype.parse=function(A){this.track_ids=A.readUint32Array((this.size-this.hdr_size)/4)},s.trefBox.prototype.parse=function(A){for(var e,t;A.getPosition()<this.start+this.size;)if(e=s.parseOneBox(A,!0,this.size-(A.getPosition()-this.start)),e.code===s.OK)t=new s.TrackReferenceTypeBox(e.type,e.size,e.hdr_size,e.start),t.write===s.Box.prototype.write&&t.type!=="mdat"&&(a.info("BoxParser","TrackReference "+t.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),t.parseDataAndRewind(A)),t.parse(A),this.boxes.push(t);else return},s.createFullBoxCtor("trep","TrackExtensionPropertiesBox",function(A){for(this.track_ID=A.readUint32(),this.boxes=[];A.getPosition()<this.start+this.size;)if(ret=s.parseOneBox(A,!1,this.size-(A.getPosition()-this.start)),ret.code===s.OK)box=ret.box,this.boxes.push(box);else return}),s.createFullBoxCtor("trex","TrackExtendsBox",function(A){this.track_id=A.readUint32(),this.default_sample_description_index=A.readUint32(),this.default_sample_duration=A.readUint32(),this.default_sample_size=A.readUint32(),this.default_sample_flags=A.readUint32()}),s.createBoxCtor("trpy","hintBytesSent",function(A){this.bytessent=A.readUint64()}),s.createFullBoxCtor("trun","TrackRunBox",function(A){var e=0;if(this.sample_count=A.readUint32(),e+=4,this.size-this.hdr_size>e&&this.flags&s.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=A.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&s.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=A.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(var t=0;t<this.sample_count;t++)this.flags&s.TRUN_FLAGS_DURATION&&(this.sample_duration[t]=A.readUint32()),this.flags&s.TRUN_FLAGS_SIZE&&(this.sample_size[t]=A.readUint32()),this.flags&s.TRUN_FLAGS_FLAGS&&(this.sample_flags[t]=A.readUint32()),this.flags&s.TRUN_FLAGS_CTS_OFFSET&&(this.version===0?this.sample_composition_time_offset[t]=A.readUint32():this.sample_composition_time_offset[t]=A.readInt32())}),s.createFullBoxCtor("tsel","TrackSelectionBox",function(A){this.switch_group=A.readUint32();var e=(this.size-this.hdr_size-4)/4;this.attribute_list=[];for(var t=0;t<e;t++)this.attribute_list[t]=A.readUint32()}),s.createFullBoxCtor("txtC","TextConfigBox",function(A){this.config=A.readCString()}),s.createBoxCtor("tyco","TypeCombinationBox",function(A){var e=(this.size-this.hdr_size)/4;this.compatible_brands=[];for(var t=0;t<e;t++)this.compatible_brands[t]=A.readString(4)}),s.createFullBoxCtor("udes","UserDescriptionProperty",function(A){this.lang=A.readCString(),this.name=A.readCString(),this.description=A.readCString(),this.tags=A.readCString()}),s.createFullBoxCtor("uncC","UncompressedFrameConfigBox",function(A){var e;if(this.profile=A.readString(4),this.version!=1){if(this.version==0){for(this.component_count=A.readUint32(),this.component_index=[],this.component_bit_depth_minus_one=[],this.component_format=[],this.component_align_size=[],e=0;e<this.component_count;e++)this.component_index.push(A.readUint16()),this.component_bit_depth_minus_one.push(A.readUint8()),this.component_format.push(A.readUint8()),this.component_align_size.push(A.readUint8());this.sampling_type=A.readUint8(),this.interleave_type=A.readUint8(),this.block_size=A.readUint8();var t=A.readUint8();this.component_little_endian=t>>7&1,this.block_pad_lsb=t>>6&1,this.block_little_endian=t>>5&1,this.block_reversed=t>>4&1,this.pad_unknown=t>>3&1,this.pixel_size=A.readUint32(),this.row_align_size=A.readUint32(),this.tile_align_size=A.readUint32(),this.num_tile_cols_minus_one=A.readUint32(),this.num_tile_rows_minus_one=A.readUint32()}}}),s.createFullBoxCtor("url ","DataEntryUrlBox",function(A){this.flags!==1&&(this.location=A.readCString())}),s.createFullBoxCtor("urn ","DataEntryUrnBox",function(A){this.name=A.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=A.readCString())}),s.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66","LiveServerManifestBox",!0,!1,function(A){this.LiveServerManifest=A.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}),s.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3","PiffProtectionSystemSpecificHeaderBox",!0,!1,function(A){this.system_id=s.parseHex16(A);var e=A.readUint32();e>0&&(this.data=A.readUint8Array(e))}),s.createUUIDBox("a2394f525a9b4f14a2446c427c648df4","PiffSampleEncryptionBox",!0,!1),s.createUUIDBox("8974dbce7be74c5184f97148f9882554","PiffTrackEncryptionBox",!0,!1,function(A){this.default_AlgorithmID=A.readUint24(),this.default_IV_size=A.readUint8(),this.default_KID=s.parseHex16(A)}),s.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f","TfrfBox",!0,!1,function(A){this.fragment_count=A.readUint8(),this.entries=[];for(var e=0;e<this.fragment_count;e++){var t={},r=0,n=0;this.version===1?(r=A.readUint64(),n=A.readUint64()):(r=A.readUint32(),n=A.readUint32()),t.absolute_time=r,t.absolute_duration=n,this.entries.push(t)}}),s.createUUIDBox("6d1d9b0542d544e680e2141daff757b2","TfxdBox",!0,!1,function(A){this.version===1?(this.absolute_time=A.readUint64(),this.duration=A.readUint64()):(this.absolute_time=A.readUint32(),this.duration=A.readUint32())}),s.createFullBoxCtor("vmhd","VideoMediaHeaderBox",function(A){this.graphicsmode=A.readUint16(),this.opcolor=A.readUint16Array(3)}),s.createFullBoxCtor("vpcC","VPCodecConfigurationRecord",function(A){var e;this.version===1?(this.profile=A.readUint8(),this.level=A.readUint8(),e=A.readUint8(),this.bitDepth=e>>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=e&1,this.colourPrimaries=A.readUint8(),this.transferCharacteristics=A.readUint8(),this.matrixCoefficients=A.readUint8(),this.codecIntializationDataSize=A.readUint16(),this.codecIntializationData=A.readUint8Array(this.codecIntializationDataSize)):(this.profile=A.readUint8(),this.level=A.readUint8(),e=A.readUint8(),this.bitDepth=e>>4&15,this.colorSpace=e&15,e=A.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=e&1,this.codecIntializationDataSize=A.readUint16(),this.codecIntializationData=A.readUint8Array(this.codecIntializationDataSize))}),s.createBoxCtor("vttC","WebVTTConfigurationBox",function(A){this.text=A.readString(this.size-this.hdr_size)}),s.createFullBoxCtor("vvcC","VvcConfigurationBox",function(A){var e,t,r={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(I){this.held_bits=I.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(I){this.held_bits=I.readUint16(),this.num_held_bits=16},extract_bits:function(I){var N=this.held_bits>>this.num_held_bits-I&(1<<I)-1;return this.num_held_bits-=I,N}};if(r.stream_read_1_bytes(A),r.extract_bits(5),this.lengthSizeMinusOne=r.extract_bits(2),this.ptl_present_flag=r.extract_bits(1),this.ptl_present_flag){r.stream_read_2_bytes(A),this.ols_idx=r.extract_bits(9),this.num_sublayers=r.extract_bits(3),this.constant_frame_rate=r.extract_bits(2),this.chroma_format_idc=r.extract_bits(2),r.stream_read_1_bytes(A),this.bit_depth_minus8=r.extract_bits(3),r.extract_bits(5);{if(r.stream_read_2_bytes(A),r.extract_bits(2),this.num_bytes_constraint_info=r.extract_bits(6),this.general_profile_idc=r.extract_bits(7),this.general_tier_flag=r.extract_bits(1),this.general_level_idc=A.readUint8(),r.stream_read_1_bytes(A),this.ptl_frame_only_constraint_flag=r.extract_bits(1),this.ptl_multilayer_enabled_flag=r.extract_bits(1),this.general_constraint_info=new Uint8Array(this.num_bytes_constraint_info),this.num_bytes_constraint_info){for(e=0;e<this.num_bytes_constraint_info-1;e++){var n=r.extract_bits(6);r.stream_read_1_bytes(A);var l=r.extract_bits(2);this.general_constraint_info[e]=n<<2|l}this.general_constraint_info[this.num_bytes_constraint_info-1]=r.extract_bits(6)}else r.extract_bits(6);if(this.num_sublayers>1){for(r.stream_read_1_bytes(A),this.ptl_sublayer_present_mask=0,t=this.num_sublayers-2;t>=0;--t){var d=r.extract_bits(1);this.ptl_sublayer_present_mask|=d<<t}for(t=this.num_sublayers;t<=8&&this.num_sublayers>1;++t)r.extract_bits(1);for(this.sublayer_level_idc=[],t=this.num_sublayers-2;t>=0;--t)this.ptl_sublayer_present_mask&1<<t&&(this.sublayer_level_idc[t]=A.readUint8())}if(this.ptl_num_sub_profiles=A.readUint8(),this.general_sub_profile_idc=[],this.ptl_num_sub_profiles)for(e=0;e<this.ptl_num_sub_profiles;e++)this.general_sub_profile_idc.push(A.readUint32())}this.max_picture_width=A.readUint16(),this.max_picture_height=A.readUint16(),this.avg_frame_rate=A.readUint16()}var f=12,v=13;this.nalu_arrays=[];var g=A.readUint8();for(e=0;e<g;e++){var b=[];this.nalu_arrays.push(b),r.stream_read_1_bytes(A),b.completeness=r.extract_bits(1),r.extract_bits(2),b.nalu_type=r.extract_bits(5);var k=1;for(b.nalu_type!=v&&b.nalu_type!=f&&(k=A.readUint16()),t=0;t<k;t++){var L=A.readUint16();b.push({data:A.readUint8Array(L),length:L})}}}),s.createFullBoxCtor("vvnC","VvcNALUConfigBox",function(A){var e=strm.readUint8();this.lengthSizeMinusOne=e&3}),s.SampleEntry.prototype.isVideo=function(){return!1},s.SampleEntry.prototype.isAudio=function(){return!1},s.SampleEntry.prototype.isSubtitle=function(){return!1},s.SampleEntry.prototype.isMetadata=function(){return!1},s.SampleEntry.prototype.isHint=function(){return!1},s.SampleEntry.prototype.getCodec=function(){return this.type.replace(".","")},s.SampleEntry.prototype.getWidth=function(){return""},s.SampleEntry.prototype.getHeight=function(){return""},s.SampleEntry.prototype.getChannelCount=function(){return""},s.SampleEntry.prototype.getSampleRate=function(){return""},s.SampleEntry.prototype.getSampleSize=function(){return""},s.VisualSampleEntry.prototype.isVideo=function(){return!0},s.VisualSampleEntry.prototype.getWidth=function(){return this.width},s.VisualSampleEntry.prototype.getHeight=function(){return this.height},s.AudioSampleEntry.prototype.isAudio=function(){return!0},s.AudioSampleEntry.prototype.getChannelCount=function(){return this.channel_count},s.AudioSampleEntry.prototype.getSampleRate=function(){return this.samplerate},s.AudioSampleEntry.prototype.getSampleSize=function(){return this.samplesize},s.SubtitleSampleEntry.prototype.isSubtitle=function(){return!0},s.MetadataSampleEntry.prototype.isMetadata=function(){return!0},s.decimalToHex=function(A,e){var t=Number(A).toString(16);for(e=typeof e>"u"||e===null?e=2:e;t.length<e;)t="0"+t;return t},s.avc1SampleEntry.prototype.getCodec=s.avc2SampleEntry.prototype.getCodec=s.avc3SampleEntry.prototype.getCodec=s.avc4SampleEntry.prototype.getCodec=function(){var A=s.SampleEntry.prototype.getCodec.call(this);return this.avcC?A+"."+s.decimalToHex(this.avcC.AVCProfileIndication)+s.decimalToHex(this.avcC.profile_compatibility)+s.decimalToHex(this.avcC.AVCLevelIndication):A},s.hev1SampleEntry.prototype.getCodec=s.hvc1SampleEntry.prototype.getCodec=function(){var A,e=s.SampleEntry.prototype.getCodec.call(this);if(this.hvcC){switch(e+=".",this.hvcC.general_profile_space){case 0:e+="";break;case 1:e+="A";break;case 2:e+="B";break;case 3:e+="C";break}e+=this.hvcC.general_profile_idc,e+=".";var t=this.hvcC.general_profile_compatibility,r=0;for(A=0;A<32&&(r|=t&1,A!=31);A++)r<<=1,t>>=1;e+=s.decimalToHex(r,0),e+=".",this.hvcC.general_tier_flag===0?e+="L":e+="H",e+=this.hvcC.general_level_idc;var n=!1,l="";for(A=5;A>=0;A--)(this.hvcC.general_constraint_indicator[A]||n)&&(l="."+s.decimalToHex(this.hvcC.general_constraint_indicator[A],0)+l,n=!0);e+=l}return e},s.vvc1SampleEntry.prototype.getCodec=s.vvi1SampleEntry.prototype.getCodec=function(){var A,e=s.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){e+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?e+=".H":e+=".L",e+=this.vvcC.general_level_idc;var t="";if(this.vvcC.general_constraint_info){var r=[],n=0;n|=this.vvcC.ptl_frame_only_constraint<<7,n|=this.vvcC.ptl_multilayer_enabled<<6;var l;for(A=0;A<this.vvcC.general_constraint_info.length;++A)n|=this.vvcC.general_constraint_info[A]>>2&63,r.push(n),n&&(l=A),n=this.vvcC.general_constraint_info[A]>>2&3;if(l===void 0)t=".CA";else{t=".C";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",f=0,v=0;for(A=0;A<=l;++A)for(f=f<<8|r[A],v+=8;v>=5;){var g=f>>v-5&31;t+=d[g],v-=5,f&=(1<<v)-1}v&&(f<<=5-v,t+=d[f&31])}}e+=t}return e},s.mp4aSampleEntry.prototype.getCodec=function(){var A=s.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var e=this.esds.esd.getOTI(),t=this.esds.esd.getAudioConfig();return A+"."+s.decimalToHex(e)+(t?"."+t:"")}else return A},s.stxtSampleEntry.prototype.getCodec=function(){var A=s.SampleEntry.prototype.getCodec.call(this);return this.mime_format?A+"."+this.mime_format:A},s.vp08SampleEntry.prototype.getCodec=s.vp09SampleEntry.prototype.getCodec=function(){var A=s.SampleEntry.prototype.getCodec.call(this),e=this.vpcC.level;e==0&&(e="00");var t=this.vpcC.bitDepth;return t==8&&(t="08"),A+".0"+this.vpcC.profile+"."+e+"."+t},s.av01SampleEntry.prototype.getCodec=function(){var A=s.SampleEntry.prototype.getCodec.call(this),e=this.av1C.seq_level_idx_0;e<10&&(e="0"+e);var t;return this.av1C.seq_profile===2&&this.av1C.high_bitdepth===1?t=this.av1C.twelve_bit===1?"12":"10":this.av1C.seq_profile<=2&&(t=this.av1C.high_bitdepth===1?"10":"08"),A+"."+this.av1C.seq_profile+"."+e+(this.av1C.seq_tier_0?"H":"M")+"."+t},s.Box.prototype.writeHeader=function(A,e){this.size+=8,this.size>U&&(this.size+=8),this.type==="uuid"&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+A.getPosition()+(e||"")),this.size>U?A.writeUint32(1):(this.sizePosition=A.getPosition(),A.writeUint32(this.size)),A.writeString(this.type,null,4),this.type==="uuid"&&A.writeUint8Array(this.uuid),this.size>U&&A.writeUint64(this.size)},s.FullBox.prototype.writeHeader=function(A){this.size+=4,s.Box.prototype.writeHeader.call(this,A," v="+this.version+" f="+this.flags),A.writeUint8(this.version),A.writeUint24(this.flags)},s.Box.prototype.write=function(A){this.type==="mdat"?this.data&&(this.size=this.data.length,this.writeHeader(A),A.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(A),this.data&&A.writeUint8Array(this.data))},s.ContainerBox.prototype.write=function(A){this.size=0,this.writeHeader(A);for(var e=0;e<this.boxes.length;e++)this.boxes[e]&&(this.boxes[e].write(A),this.size+=this.boxes[e].size);a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),A.adjustUint32(this.sizePosition,this.size)},s.TrackReferenceTypeBox.prototype.write=function(A){this.size=this.track_ids.length*4,this.writeHeader(A),A.writeUint32Array(this.track_ids)},s.avcCBox.prototype.write=function(A){var e;for(this.size=7,e=0;e<this.SPS.length;e++)this.size+=2+this.SPS[e].length;for(e=0;e<this.PPS.length;e++)this.size+=2+this.PPS[e].length;for(this.ext&&(this.size+=this.ext.length),this.writeHeader(A),A.writeUint8(this.configurationVersion),A.writeUint8(this.AVCProfileIndication),A.writeUint8(this.profile_compatibility),A.writeUint8(this.AVCLevelIndication),A.writeUint8(this.lengthSizeMinusOne+252),A.writeUint8(this.SPS.length+224),e=0;e<this.SPS.length;e++)A.writeUint16(this.SPS[e].length),A.writeUint8Array(this.SPS[e].nalu);for(A.writeUint8(this.PPS.length),e=0;e<this.PPS.length;e++)A.writeUint16(this.PPS[e].length),A.writeUint8Array(this.PPS[e].nalu);this.ext&&A.writeUint8Array(this.ext)},s.co64Box.prototype.write=function(A){var e;for(this.version=0,this.flags=0,this.size=4+8*this.chunk_offsets.length,this.writeHeader(A),A.writeUint32(this.chunk_offsets.length),e=0;e<this.chunk_offsets.length;e++)A.writeUint64(this.chunk_offsets[e])},s.cslgBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4*5,this.writeHeader(A),A.writeInt32(this.compositionToDTSShift),A.writeInt32(this.leastDecodeToDisplayDelta),A.writeInt32(this.greatestDecodeToDisplayDelta),A.writeInt32(this.compositionStartTime),A.writeInt32(this.compositionEndTime)},s.cttsBox.prototype.write=function(A){var e;for(this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(A),A.writeUint32(this.sample_counts.length),e=0;e<this.sample_counts.length;e++)A.writeUint32(this.sample_counts[e]),this.version===1?A.writeInt32(this.sample_offsets[e]):A.writeUint32(this.sample_offsets[e])},s.drefBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4,this.writeHeader(A),A.writeUint32(this.entries.length);for(var e=0;e<this.entries.length;e++)this.entries[e].write(A),this.size+=this.entries[e].size;a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),A.adjustUint32(this.sizePosition,this.size)},s.elngBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=this.extended_language.length,this.writeHeader(A),A.writeString(this.extended_language)},s.elstBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4+12*this.entries.length,this.writeHeader(A),A.writeUint32(this.entries.length);for(var e=0;e<this.entries.length;e++){var t=this.entries[e];A.writeUint32(t.segment_duration),A.writeInt32(t.media_time),A.writeInt16(t.media_rate_integer),A.writeInt16(t.media_rate_fraction)}},s.emsgBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4*4+this.message_data.length+(this.scheme_id_uri.length+1)+(this.value.length+1),this.writeHeader(A),A.writeCString(this.scheme_id_uri),A.writeCString(this.value),A.writeUint32(this.timescale),A.writeUint32(this.presentation_time_delta),A.writeUint32(this.event_duration),A.writeUint32(this.id),A.writeUint8Array(this.message_data)},s.ftypBox.prototype.write=function(A){this.size=8+4*this.compatible_brands.length,this.writeHeader(A),A.writeString(this.major_brand,null,4),A.writeUint32(this.minor_version);for(var e=0;e<this.compatible_brands.length;e++)A.writeString(this.compatible_brands[e],null,4)},s.hdlrBox.prototype.write=function(A){this.size=5*4+this.name.length+1,this.version=0,this.flags=0,this.writeHeader(A),A.writeUint32(0),A.writeString(this.handler,null,4),A.writeUint32(0),A.writeUint32(0),A.writeUint32(0),A.writeCString(this.name)},s.hvcCBox.prototype.write=function(A){var e,t;for(this.size=23,e=0;e<this.nalu_arrays.length;e++)for(this.size+=3,t=0;t<this.nalu_arrays[e].length;t++)this.size+=2+this.nalu_arrays[e][t].data.length;for(this.writeHeader(A),A.writeUint8(this.configurationVersion),A.writeUint8((this.general_profile_space<<6)+(this.general_tier_flag<<5)+this.general_profile_idc),A.writeUint32(this.general_profile_compatibility),A.writeUint8Array(this.general_constraint_indicator),A.writeUint8(this.general_level_idc),A.writeUint16(this.min_spatial_segmentation_idc+(15<<24)),A.writeUint8(this.parallelismType+252),A.writeUint8(this.chroma_format_idc+252),A.writeUint8(this.bit_depth_luma_minus8+248),A.writeUint8(this.bit_depth_chroma_minus8+248),A.writeUint16(this.avgFrameRate),A.writeUint8((this.constantFrameRate<<6)+(this.numTemporalLayers<<3)+(this.temporalIdNested<<2)+this.lengthSizeMinusOne),A.writeUint8(this.nalu_arrays.length),e=0;e<this.nalu_arrays.length;e++)for(A.writeUint8((this.nalu_arrays[e].completeness<<7)+this.nalu_arrays[e].nalu_type),A.writeUint16(this.nalu_arrays[e].length),t=0;t<this.nalu_arrays[e].length;t++)A.writeUint16(this.nalu_arrays[e][t].data.length),A.writeUint8Array(this.nalu_arrays[e][t].data)},s.kindBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=this.schemeURI.length+1+(this.value.length+1),this.writeHeader(A),A.writeCString(this.schemeURI),A.writeCString(this.value)},s.mdhdBox.prototype.write=function(A){this.size=4*4+2*2,this.flags=0,this.version=0,this.writeHeader(A),A.writeUint32(this.creation_time),A.writeUint32(this.modification_time),A.writeUint32(this.timescale),A.writeUint32(this.duration),A.writeUint16(this.language),A.writeUint16(0)},s.mehdBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4,this.writeHeader(A),A.writeUint32(this.fragment_duration)},s.mfhdBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4,this.writeHeader(A),A.writeUint32(this.sequence_number)},s.mvhdBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=23*4+2*2,this.writeHeader(A),A.writeUint32(this.creation_time),A.writeUint32(this.modification_time),A.writeUint32(this.timescale),A.writeUint32(this.duration),A.writeUint32(this.rate),A.writeUint16(this.volume<<8),A.writeUint16(0),A.writeUint32(0),A.writeUint32(0),A.writeUint32Array(this.matrix),A.writeUint32(0),A.writeUint32(0),A.writeUint32(0),A.writeUint32(0),A.writeUint32(0),A.writeUint32(0),A.writeUint32(this.next_track_id)},s.SampleEntry.prototype.writeHeader=function(A){this.size=8,s.Box.prototype.writeHeader.call(this,A),A.writeUint8(0),A.writeUint8(0),A.writeUint8(0),A.writeUint8(0),A.writeUint8(0),A.writeUint8(0),A.writeUint16(this.data_reference_index)},s.SampleEntry.prototype.writeFooter=function(A){for(var e=0;e<this.boxes.length;e++)this.boxes[e].write(A),this.size+=this.boxes[e].size;a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),A.adjustUint32(this.sizePosition,this.size)},s.SampleEntry.prototype.write=function(A){this.writeHeader(A),A.writeUint8Array(this.data),this.size+=this.data.length,a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),A.adjustUint32(this.sizePosition,this.size)},s.VisualSampleEntry.prototype.write=function(A){this.writeHeader(A),this.size+=2*7+6*4+32,A.writeUint16(0),A.writeUint16(0),A.writeUint32(0),A.writeUint32(0),A.writeUint32(0),A.writeUint16(this.width),A.writeUint16(this.height),A.writeUint32(this.horizresolution),A.writeUint32(this.vertresolution),A.writeUint32(0),A.writeUint16(this.frame_count),A.writeUint8(Math.min(31,this.compressorname.length)),A.writeString(this.compressorname,null,31),A.writeUint16(this.depth),A.writeInt16(-1),this.writeFooter(A)},s.AudioSampleEntry.prototype.write=function(A){this.writeHeader(A),this.size+=2*4+3*4,A.writeUint32(0),A.writeUint32(0),A.writeUint16(this.channel_count),A.writeUint16(this.samplesize),A.writeUint16(0),A.writeUint16(0),A.writeUint32(this.samplerate<<16),this.writeFooter(A)},s.stppSampleEntry.prototype.write=function(A){this.writeHeader(A),this.size+=this.namespace.length+1+this.schema_location.length+1+this.auxiliary_mime_types.length+1,A.writeCString(this.namespace),A.writeCString(this.schema_location),A.writeCString(this.auxiliary_mime_types),this.writeFooter(A)},s.SampleGroupEntry.prototype.write=function(A){A.writeUint8Array(this.data)},s.sbgpBox.prototype.write=function(A){this.version=1,this.flags=0,this.size=12+8*this.entries.length,this.writeHeader(A),A.writeString(this.grouping_type,null,4),A.writeUint32(this.grouping_type_parameter),A.writeUint32(this.entries.length);for(var e=0;e<this.entries.length;e++){var t=this.entries[e];A.writeInt32(t.sample_count),A.writeInt32(t.group_description_index)}},s.sgpdBox.prototype.write=function(A){var e,t;for(this.flags=0,this.size=12,e=0;e<this.entries.length;e++)t=this.entries[e],this.version===1&&(this.default_length===0&&(this.size+=4),this.size+=t.data.length);for(this.writeHeader(A),A.writeString(this.grouping_type,null,4),this.version===1&&A.writeUint32(this.default_length),this.version>=2&&A.writeUint32(this.default_sample_description_index),A.writeUint32(this.entries.length),e=0;e<this.entries.length;e++)t=this.entries[e],this.version===1&&this.default_length===0&&A.writeUint32(t.description_length),t.write(A)},s.sidxBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4*4+2+2+12*this.references.length,this.writeHeader(A),A.writeUint32(this.reference_ID),A.writeUint32(this.timescale),A.writeUint32(this.earliest_presentation_time),A.writeUint32(this.first_offset),A.writeUint16(0),A.writeUint16(this.references.length);for(var e=0;e<this.references.length;e++){var t=this.references[e];A.writeUint32(t.reference_type<<31|t.referenced_size),A.writeUint32(t.subsegment_duration),A.writeUint32(t.starts_with_SAP<<31|t.SAP_type<<28|t.SAP_delta_time)}},s.smhdBox.prototype.write=function(A){this.version=0,this.flags=1,this.size=4,this.writeHeader(A),A.writeUint16(this.balance),A.writeUint16(0)},s.stcoBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4+4*this.chunk_offsets.length,this.writeHeader(A),A.writeUint32(this.chunk_offsets.length),A.writeUint32Array(this.chunk_offsets)},s.stscBox.prototype.write=function(A){var e;for(this.version=0,this.flags=0,this.size=4+12*this.first_chunk.length,this.writeHeader(A),A.writeUint32(this.first_chunk.length),e=0;e<this.first_chunk.length;e++)A.writeUint32(this.first_chunk[e]),A.writeUint32(this.samples_per_chunk[e]),A.writeUint32(this.sample_description_index[e])},s.stsdBox.prototype.write=function(A){var e;for(this.version=0,this.flags=0,this.size=0,this.writeHeader(A),A.writeUint32(this.entries.length),this.size+=4,e=0;e<this.entries.length;e++)this.entries[e].write(A),this.size+=this.entries[e].size;a.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),A.adjustUint32(this.sizePosition,this.size)},s.stshBox.prototype.write=function(A){var e;for(this.version=0,this.flags=0,this.size=4+8*this.shadowed_sample_numbers.length,this.writeHeader(A),A.writeUint32(this.shadowed_sample_numbers.length),e=0;e<this.shadowed_sample_numbers.length;e++)A.writeUint32(this.shadowed_sample_numbers[e]),A.writeUint32(this.sync_sample_numbers[e])},s.stssBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4+4*this.sample_numbers.length,this.writeHeader(A),A.writeUint32(this.sample_numbers.length),A.writeUint32Array(this.sample_numbers)},s.stszBox.prototype.write=function(A){var e,t=!0;if(this.version=0,this.flags=0,this.sample_sizes.length>0)for(e=0;e+1<this.sample_sizes.length;)if(this.sample_sizes[e+1]!==this.sample_sizes[0]){t=!1;break}else e++;else t=!1;this.size=8,t||(this.size+=4*this.sample_sizes.length),this.writeHeader(A),t?A.writeUint32(this.sample_sizes[0]):A.writeUint32(0),A.writeUint32(this.sample_sizes.length),t||A.writeUint32Array(this.sample_sizes)},s.sttsBox.prototype.write=function(A){var e;for(this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(A),A.writeUint32(this.sample_counts.length),e=0;e<this.sample_counts.length;e++)A.writeUint32(this.sample_counts[e]),A.writeUint32(this.sample_deltas[e])},s.tfdtBox.prototype.write=function(A){var e=Math.pow(2,32)-1;this.version=this.baseMediaDecodeTime>e?1:0,this.flags=0,this.size=4,this.version===1&&(this.size+=4),this.writeHeader(A),this.version===1?A.writeUint64(this.baseMediaDecodeTime):A.writeUint32(this.baseMediaDecodeTime)},s.tfhdBox.prototype.write=function(A){this.version=0,this.size=4,this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&s.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&s.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(A),A.writeUint32(this.track_id),this.flags&s.TFHD_FLAG_BASE_DATA_OFFSET&&A.writeUint64(this.base_data_offset),this.flags&s.TFHD_FLAG_SAMPLE_DESC&&A.writeUint32(this.default_sample_description_index),this.flags&s.TFHD_FLAG_SAMPLE_DUR&&A.writeUint32(this.default_sample_duration),this.flags&s.TFHD_FLAG_SAMPLE_SIZE&&A.writeUint32(this.default_sample_size),this.flags&s.TFHD_FLAG_SAMPLE_FLAGS&&A.writeUint32(this.default_sample_flags)},s.tkhdBox.prototype.write=function(A){this.version=0,this.size=4*18+2*4,this.writeHeader(A),A.writeUint32(this.creation_time),A.writeUint32(this.modification_time),A.writeUint32(this.track_id),A.writeUint32(0),A.writeUint32(this.duration),A.writeUint32(0),A.writeUint32(0),A.writeInt16(this.layer),A.writeInt16(this.alternate_group),A.writeInt16(this.volume<<8),A.writeUint16(0),A.writeInt32Array(this.matrix),A.writeUint32(this.width),A.writeUint32(this.height)},s.trexBox.prototype.write=function(A){this.version=0,this.flags=0,this.size=4*5,this.writeHeader(A),A.writeUint32(this.track_id),A.writeUint32(this.default_sample_description_index),A.writeUint32(this.default_sample_duration),A.writeUint32(this.default_sample_size),A.writeUint32(this.default_sample_flags)},s.trunBox.prototype.write=function(A){this.version=0,this.size=4,this.flags&s.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&s.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&s.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&s.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&s.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&s.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(A),A.writeUint32(this.sample_count),this.flags&s.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=A.getPosition(),A.writeInt32(this.data_offset)),this.flags&s.TRUN_FLAGS_FIRST_FLAG&&A.writeUint32(this.first_sample_flags);for(var e=0;e<this.sample_count;e++)this.flags&s.TRUN_FLAGS_DURATION&&A.writeUint32(this.sample_duration[e]),this.flags&s.TRUN_FLAGS_SIZE&&A.writeUint32(this.sample_size[e]),this.flags&s.TRUN_FLAGS_FLAGS&&A.writeUint32(this.sample_flags[e]),this.flags&s.TRUN_FLAGS_CTS_OFFSET&&(this.version===0?A.writeUint32(this.sample_composition_time_offset[e]):A.writeInt32(this.sample_composition_time_offset[e]))},s["url Box"].prototype.write=function(A){this.version=0,this.location?(this.flags=0,this.size=this.location.length+1):(this.flags=1,this.size=0),this.writeHeader(A),this.location&&A.writeCString(this.location)},s["urn Box"].prototype.write=function(A){this.version=0,this.flags=0,this.size=this.name.length+1+(this.location?this.location.length+1:0),this.writeHeader(A),A.writeCString(this.name),this.location&&A.writeCString(this.location)},s.vmhdBox.prototype.write=function(A){this.version=0,this.flags=1,this.size=8,this.writeHeader(A),A.writeUint16(this.graphicsmode),A.writeUint16Array(this.opcolor)},s.cttsBox.prototype.unpack=function(A){var e,t,r;for(r=0,e=0;e<this.sample_counts.length;e++)for(t=0;t<this.sample_counts[e];t++)A[r].pts=A[r].dts+this.sample_offsets[e],r++},s.sttsBox.prototype.unpack=function(A){var e,t,r;for(r=0,e=0;e<this.sample_counts.length;e++)for(t=0;t<this.sample_counts[e];t++)r===0?A[r].dts=0:A[r].dts=A[r-1].dts+this.sample_deltas[e],r++},s.stcoBox.prototype.unpack=function(A){var e;for(e=0;e<this.chunk_offsets.length;e++)A[e].offset=this.chunk_offsets[e]},s.stscBox.prototype.unpack=function(A){var e,t,r,n,l;for(n=0,l=0,e=0;e<this.first_chunk.length;e++)for(t=0;t<(e+1<this.first_chunk.length?this.first_chunk[e+1]:1/0);t++)for(l++,r=0;r<this.samples_per_chunk[e];r++){if(A[n])A[n].description_index=this.sample_description_index[e],A[n].chunk_index=l;else return;n++}},s.stszBox.prototype.unpack=function(A){var e;for(e=0;e<this.sample_sizes.length;e++)A[e].size=this.sample_sizes[e]},s.DIFF_BOXES_PROP_NAMES=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],s.DIFF_PRIMITIVE_ARRAY_PROP_NAMES=["compatible_brands","matrix","opcolor","sample_counts","sample_deltas","first_chunk","samples_per_chunk","sample_sizes","chunk_offsets","sample_offsets","sample_description_index","sample_duration"],s.boxEqualFields=function(A,e){if(A&&!e)return!1;var t;for(t in A)if(!(s.DIFF_BOXES_PROP_NAMES.indexOf(t)>-1)){if(A[t]instanceof s.Box||e[t]instanceof s.Box)continue;if(typeof A[t]>"u"||typeof e[t]>"u")continue;if(typeof A[t]=="function"||typeof e[t]=="function")continue;if(A.subBoxNames&&A.subBoxNames.indexOf(t.slice(0,4))>-1||e.subBoxNames&&e.subBoxNames.indexOf(t.slice(0,4))>-1)continue;if(t==="data"||t==="start"||t==="size"||t==="creation_time"||t==="modification_time")continue;if(s.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(t)>-1)continue;if(A[t]!==e[t])return!1}return!0},s.boxEqual=function(A,e){if(!s.boxEqualFields(A,e))return!1;for(var t=0;t<s.DIFF_BOXES_PROP_NAMES.length;t++){var r=s.DIFF_BOXES_PROP_NAMES[t];if(A[r]&&e[r]&&!s.boxEqual(A[r],e[r]))return!1}return!0};var D=function(){};D.prototype.parseSample=function(A){var e,t,r=new h(A.buffer);for(e=[];!r.isEos();)t=s.parseOneBox(r,!1),t.code===s.OK&&t.box.type==="vttc"&&e.push(t.box);return e},D.prototype.getText=function(A,e,t){function r(g,b,k){return k=k||"0",g=g+"",g.length>=b?g:new Array(b-g.length+1).join(k)+g}function n(g){var b=Math.floor(g/3600),k=Math.floor((g-b*3600)/60),L=Math.floor(g-b*3600-k*60),I=Math.floor((g-b*3600-k*60-L)*1e3);return""+r(b,2)+":"+r(k,2)+":"+r(L,2)+"."+r(I,3)}for(var l=this.parseSample(t),d="",f=0;f<l.length;f++){var v=l[f];d+=n(A)+" --> "+n(e)+`\r
|
|
`,d+=v.payl.text}return d};var O=function(){};O.prototype.parseSample=function(A){var e={},t;e.resources=[];var r=new h(A.data.buffer);if(!A.subsamples||A.subsamples.length===0)e.documentString=r.readString(A.data.length);else if(e.documentString=r.readString(A.subsamples[0].size),A.subsamples.length>1)for(t=1;t<A.subsamples.length;t++)e.resources[t]=r.readUint8Array(A.subsamples[t].size);return typeof DOMParser<"u"&&(e.document=new DOMParser().parseFromString(e.documentString,"application/xml")),e};var _=function(){};_.prototype.parseSample=function(A){var e,t=new h(A.data.buffer);return e=t.readString(A.data.length),e},_.prototype.parseConfig=function(A){var e,t=new h(A.buffer);return t.readUint32(),e=t.readCString(),e},p.VTTin4Parser=D,p.XMLSubtitlein4Parser=O,p.Textin4Parser=_;var c=function(A){this.stream=A||new w,this.boxes=[],this.mdats=[],this.moofs=[],this.isProgressive=!1,this.moovStartFound=!1,this.onMoovStart=null,this.moovStartSent=!1,this.onReady=null,this.readySent=!1,this.onSegment=null,this.onSamples=null,this.onError=null,this.sampleListBuilt=!1,this.fragmentedTracks=[],this.extractedTracks=[],this.isFragmentationInitialized=!1,this.sampleProcessingStarted=!1,this.nextMoofNumber=0,this.itemListBuilt=!1,this.items=[],this.entity_groups=[],this.onSidx=null,this.sidxSent=!1};c.prototype.setSegmentOptions=function(A,e,t){var r=this.getTrackById(A);if(r){var n={};this.fragmentedTracks.push(n),n.id=A,n.user=e,n.trak=r,r.nextSample=0,n.segmentStream=null,n.nb_samples=1e3,n.rapAlignement=!0,t&&(t.nbSamples&&(n.nb_samples=t.nbSamples),t.rapAlignement&&(n.rapAlignement=t.rapAlignement))}},c.prototype.unsetSegmentOptions=function(A){for(var e=-1,t=0;t<this.fragmentedTracks.length;t++){var r=this.fragmentedTracks[t];r.id==A&&(e=t)}e>-1&&this.fragmentedTracks.splice(e,1)},c.prototype.setExtractionOptions=function(A,e,t){var r=this.getTrackById(A);if(r){var n={};this.extractedTracks.push(n),n.id=A,n.user=e,n.trak=r,r.nextSample=0,n.nb_samples=1e3,n.samples=[],t&&t.nbSamples&&(n.nb_samples=t.nbSamples)}},c.prototype.unsetExtractionOptions=function(A){for(var e=-1,t=0;t<this.extractedTracks.length;t++){var r=this.extractedTracks[t];r.id==A&&(e=t)}e>-1&&this.extractedTracks.splice(e,1)},c.prototype.parse=function(){var A,e,t=!1;if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else if(this.saveParsePosition&&this.saveParsePosition(),A=s.parseOneBox(this.stream,t),A.code===s.ERR_NOT_ENOUGH_DATA)if(this.processIncompleteBox){if(this.processIncompleteBox(A))continue;return}else return;else{var r;switch(e=A.box,r=e.type!=="uuid"?e.type:e.uuid,this.boxes.push(e),r){case"mdat":this.mdats.push(e);break;case"moof":this.moofs.push(e);break;case"moov":this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0);default:this[r]!==void 0&&a.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=e;break}this.updateUsedBytes&&this.updateUsedBytes(e,A)}},c.prototype.checkBuffer=function(A){if(A==null)throw"Buffer must be defined and non empty";if(A.fileStart===void 0)throw"Buffer must have a fileStart property";return A.byteLength===0?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+A.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+A.fileStart+")"),A.usedBytes=0,this.stream.insertBuffer(A),this.stream.logBufferLevel(),this.stream.initialized()?!0:(a.warn("ISOFile","Not ready to start parsing"),!1))},c.prototype.appendBuffer=function(A,e){var t;if(this.checkBuffer(A))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(e),this.nextSeekPosition?(t=this.nextSeekPosition,this.nextSeekPosition=void 0):t=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(t=this.stream.getEndFilePositionAfter(t))):this.nextParsePosition?t=this.nextParsePosition:t=0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+A.fileStart+") - next buffer to fetch should have a fileStart position of "+t),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),t},c.prototype.getInfo=function(){var A,e,t={},r,n,l,d,f=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(t.hasMoov=!0,t.duration=this.moov.mvhd.duration,t.timescale=this.moov.mvhd.timescale,t.isFragmented=this.moov.mvex!=null,t.isFragmented&&this.moov.mvex.mehd&&(t.fragment_duration=this.moov.mvex.mehd.fragment_duration),t.isProgressive=this.isProgressive,t.hasIOD=this.moov.iods!=null,t.brands=[],t.brands.push(this.ftyp.major_brand),t.brands=t.brands.concat(this.ftyp.compatible_brands),t.created=new Date(f+this.moov.mvhd.creation_time*1e3),t.modified=new Date(f+this.moov.mvhd.modification_time*1e3),t.tracks=[],t.audioTracks=[],t.videoTracks=[],t.subtitleTracks=[],t.metadataTracks=[],t.hintTracks=[],t.otherTracks=[],A=0;A<this.moov.traks.length;A++){if(r=this.moov.traks[A],d=r.mdia.minf.stbl.stsd.entries[0],n={},t.tracks.push(n),n.id=r.tkhd.track_id,n.name=r.mdia.hdlr.name,n.references=[],r.tref)for(e=0;e<r.tref.boxes.length;e++)l={},n.references.push(l),l.type=r.tref.boxes[e].type,l.track_ids=r.tref.boxes[e].track_ids;r.edts&&(n.edits=r.edts.elst.entries),n.created=new Date(f+r.tkhd.creation_time*1e3),n.modified=new Date(f+r.tkhd.modification_time*1e3),n.movie_duration=r.tkhd.duration,n.movie_timescale=t.timescale,n.layer=r.tkhd.layer,n.alternate_group=r.tkhd.alternate_group,n.volume=r.tkhd.volume,n.matrix=r.tkhd.matrix,n.track_width=r.tkhd.width/65536,n.track_height=r.tkhd.height/65536,n.timescale=r.mdia.mdhd.timescale,n.cts_shift=r.mdia.minf.stbl.cslg,n.duration=r.mdia.mdhd.duration,n.samples_duration=r.samples_duration,n.codec=d.getCodec(),n.kind=r.udta&&r.udta.kinds.length?r.udta.kinds[0]:{schemeURI:"",value:""},n.language=r.mdia.elng?r.mdia.elng.extended_language:r.mdia.mdhd.languageString,n.nb_samples=r.samples.length,n.size=r.samples_size,n.bitrate=n.size*8*n.timescale/n.samples_duration,d.isAudio()?(n.type="audio",t.audioTracks.push(n),n.audio={},n.audio.sample_rate=d.getSampleRate(),n.audio.channel_count=d.getChannelCount(),n.audio.sample_size=d.getSampleSize()):d.isVideo()?(n.type="video",t.videoTracks.push(n),n.video={},n.video.width=d.getWidth(),n.video.height=d.getHeight()):d.isSubtitle()?(n.type="subtitles",t.subtitleTracks.push(n)):d.isHint()?(n.type="metadata",t.hintTracks.push(n)):d.isMetadata()?(n.type="metadata",t.metadataTracks.push(n)):(n.type="metadata",t.otherTracks.push(n))}else t.hasMoov=!1;if(t.mime="",t.hasMoov&&t.tracks){for(t.videoTracks&&t.videoTracks.length>0?t.mime+='video/mp4; codecs="':t.audioTracks&&t.audioTracks.length>0?t.mime+='audio/mp4; codecs="':t.mime+='application/mp4; codecs="',A=0;A<t.tracks.length;A++)A!==0&&(t.mime+=","),t.mime+=t.tracks[A].codec;t.mime+='"; profiles="',t.mime+=this.ftyp.compatible_brands.join(),t.mime+='"'}return t},c.prototype.setNextSeekPositionFromSample=function(A){A&&(this.nextSeekPosition?this.nextSeekPosition=Math.min(A.offset+A.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=A.offset+A.alreadyRead)},c.prototype.processSamples=function(A){var e,t;if(this.sampleProcessingStarted){if(this.isFragmentationInitialized&&this.onSegment!==null)for(e=0;e<this.fragmentedTracks.length;e++){var r=this.fragmentedTracks[e];for(t=r.trak;t.nextSample<t.samples.length&&this.sampleProcessingStarted;){a.debug("ISOFile","Creating media fragment on track #"+r.id+" for sample "+t.nextSample);var n=this.createFragment(r.id,t.nextSample,r.segmentStream);if(n)r.segmentStream=n,t.nextSample++;else break;if((t.nextSample%r.nb_samples===0||A||t.nextSample>=t.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+r.id+" for samples ["+Math.max(0,t.nextSample-r.nb_samples)+","+(t.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(r.id,r.user,r.segmentStream.buffer,t.nextSample,A||t.nextSample>=t.samples.length),r.segmentStream=null,r!==this.fragmentedTracks[e]))break}}if(this.onSamples!==null)for(e=0;e<this.extractedTracks.length;e++){var l=this.extractedTracks[e];for(t=l.trak;t.nextSample<t.samples.length&&this.sampleProcessingStarted;){a.debug("ISOFile","Exporting on track #"+l.id+" sample #"+t.nextSample);var d=this.getSample(t,t.nextSample);if(d)t.nextSample++,l.samples.push(d);else{this.setNextSeekPositionFromSample(t.samples[t.nextSample]);break}if((t.nextSample%l.nb_samples===0||t.nextSample>=t.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+l.id+" for sample "+t.nextSample),this.onSamples&&this.onSamples(l.id,l.user,l.samples),l.samples=[],l!==this.extractedTracks[e]))break}}}},c.prototype.getBox=function(A){var e=this.getBoxes(A,!0);return e.length?e[0]:null},c.prototype.getBoxes=function(A,e){var t=[];return c._sweep.call(this,A,t,e),t},c._sweep=function(A,e,t){this.type&&this.type==A&&e.push(this);for(var r in this.boxes){if(e.length&&t)return;c._sweep.call(this.boxes[r],A,e,t)}},c.prototype.getTrackSamplesInfo=function(A){var e=this.getTrackById(A);if(e)return e.samples},c.prototype.getTrackSample=function(A,e){var t=this.getTrackById(A),r=this.getSample(t,e);return r},c.prototype.releaseUsedSamples=function(A,e){var t=0,r=this.getTrackById(A);r.lastValidSample||(r.lastValidSample=0);for(var n=r.lastValidSample;n<e;n++)t+=this.releaseSample(r,n);a.info("ISOFile","Track #"+A+" released samples up to "+e+" (released size: "+t+", remaining: "+this.samplesDataSize+")"),r.lastValidSample=e},c.prototype.start=function(){this.sampleProcessingStarted=!0,this.processSamples(!1)},c.prototype.stop=function(){this.sampleProcessingStarted=!1},c.prototype.flush=function(){a.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0)},c.prototype.seekTrack=function(A,e,t){var r,n,l=1/0,d=0,f=0,v;if(t.samples.length===0)return a.info("ISOFile","No sample in track, cannot seek! Using time "+a.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(r=0;r<t.samples.length;r++){if(n=t.samples[r],r===0)f=0,v=n.timescale;else if(n.cts>A*n.timescale){f=r-1;break}e&&n.is_sync&&(d=r)}for(e&&(f=d),A=t.samples[f].cts,t.nextSample=f;t.samples[f].alreadyRead===t.samples[f].size&&t.samples[f+1];)f++;return l=t.samples[f].offset+t.samples[f].alreadyRead,a.info("ISOFile","Seeking to "+(e?"RAP":"")+" sample #"+t.nextSample+" on track "+t.tkhd.track_id+", time "+a.getDurationString(A,v)+" and offset: "+l),{offset:l,time:A/v}},c.prototype.getTrackDuration=function(A){var e;return A.samples?(e=A.samples[A.samples.length-1],(e.cts+e.duration)/e.timescale):1/0},c.prototype.seek=function(A,e){var t=this.moov,r,n,l,d={offset:1/0,time:1/0};if(this.moov){for(l=0;l<t.traks.length;l++)r=t.traks[l],!(A>this.getTrackDuration(r))&&(n=this.seekTrack(A,e,r),n.offset<d.offset&&(d.offset=n.offset),n.time<d.time&&(d.time=n.time));return a.info("ISOFile","Seeking at time "+a.getDurationString(d.time,1)+" needs a buffer with a fileStart position of "+d.offset),d.offset===1/0?d={offset:this.nextParsePosition,time:0}:d.offset=this.stream.getEndFilePositionAfter(d.offset),a.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+d.offset),d}else throw"Cannot seek: moov not received!"},c.prototype.equal=function(A){for(var e=0;e<this.boxes.length&&e<A.boxes.length;){var t=this.boxes[e],r=A.boxes[e];if(!s.boxEqual(t,r))return!1;e++}return!0},p.ISOFile=c,c.prototype.lastBoxStartPosition=0,c.prototype.parsingMdat=null,c.prototype.nextParsePosition=0,c.prototype.discardMdatData=!1,c.prototype.processIncompleteBox=function(A){var e,t,r;return A.type==="mdat"?(e=new s[A.type+"Box"](A.size),this.parsingMdat=e,this.boxes.push(e),this.mdats.push(e),e.start=A.start,e.hdr_size=A.hdr_size,this.stream.addUsedBytes(e.hdr_size),this.lastBoxStartPosition=e.start+e.size,r=this.stream.seek(e.start+e.size,!1,this.discardMdatData),r?(this.parsingMdat=null,!0):(this.moovStartFound?this.nextParsePosition=this.stream.findEndContiguousBuf():this.nextParsePosition=e.start+e.size,!1)):(A.type==="moov"&&(this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0)),t=this.stream.mergeNextBuffer?this.stream.mergeNextBuffer():!1,t?(this.nextParsePosition=this.stream.getEndPosition(),!0):(A.type?this.moovStartFound?this.nextParsePosition=this.stream.getEndPosition():this.nextParsePosition=this.stream.getPosition()+A.size:this.nextParsePosition=this.stream.getEndPosition(),!1))},c.prototype.hasIncompleteMdat=function(){return this.parsingMdat!==null},c.prototype.processIncompleteMdat=function(){var A,e;return A=this.parsingMdat,e=this.stream.seek(A.start+A.size,!1,this.discardMdatData),e?(a.debug("ISOFile","Found 'mdat' end in buffered data"),this.parsingMdat=null,!0):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1)},c.prototype.restoreParsePosition=function(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData)},c.prototype.saveParsePosition=function(){this.lastBoxStartPosition=this.stream.getPosition()},c.prototype.updateUsedBytes=function(A,e){this.stream.addUsedBytes&&(A.type==="mdat"?(this.stream.addUsedBytes(A.hdr_size),this.discardMdatData&&this.stream.addUsedBytes(A.size-A.hdr_size)):this.stream.addUsedBytes(A.size))},c.prototype.add=s.Box.prototype.add,c.prototype.addBox=s.Box.prototype.addBox,c.prototype.init=function(A){var e=A||{};this.add("ftyp").set("major_brand",e.brands&&e.brands[0]||"iso4").set("minor_version",0).set("compatible_brands",e.brands||["iso4"]);var t=this.add("moov");return t.add("mvhd").set("timescale",e.timescale||600).set("rate",e.rate||65536).set("creation_time",0).set("modification_time",0).set("duration",e.duration||0).set("volume",e.width?0:256).set("matrix",[65536,0,0,0,65536,0,0,0,1073741824]).set("next_track_id",1),t.add("mvex"),this},c.prototype.addTrack=function(A){this.moov||this.init(A);var e=A||{};e.width=e.width||320,e.height=e.height||320,e.id=e.id||this.moov.mvhd.next_track_id,e.type=e.type||"avc1";var t=this.moov.add("trak");this.moov.mvhd.next_track_id=e.id+1,t.add("tkhd").set("flags",s.TKHD_FLAG_ENABLED|s.TKHD_FLAG_IN_MOVIE|s.TKHD_FLAG_IN_PREVIEW).set("creation_time",0).set("modification_time",0).set("track_id",e.id).set("duration",e.duration||0).set("layer",e.layer||0).set("alternate_group",0).set("volume",1).set("matrix",[65536,0,0,0,65536,0,0,0,1073741824]).set("width",e.width<<16).set("height",e.height<<16);var r=t.add("mdia");r.add("mdhd").set("creation_time",0).set("modification_time",0).set("timescale",e.timescale||1).set("duration",e.media_duration||0).set("language",e.language||"und"),r.add("hdlr").set("handler",e.hdlr||"vide").set("name",e.name||"Track created with MP4Box.js"),r.add("elng").set("extended_language",e.language||"fr-FR");var n=r.add("minf");if(s[e.type+"SampleEntry"]!==void 0){var l=new s[e.type+"SampleEntry"];l.data_reference_index=1;var d="";for(var f in s.sampleEntryCodes)for(var v=s.sampleEntryCodes[f],g=0;g<v.length;g++)if(v.indexOf(e.type)>-1){d=f;break}switch(d){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),l.set("width",e.width).set("height",e.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",e.type+" Compressor").set("depth",24),e.avcDecoderConfigRecord){var b=new s.avcCBox;b.parse(new h(e.avcDecoderConfigRecord)),l.addBox(b)}else if(e.hevcDecoderConfigRecord){var k=new s.hvcCBox;k.parse(new h(e.hevcDecoderConfigRecord)),l.addBox(k)}break;case"Audio":n.add("smhd").set("balance",e.balance||0),l.set("channel_count",e.channel_count||2).set("samplesize",e.samplesize||16).set("samplerate",e.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":switch(n.add("sthd"),e.type){case"stpp":l.set("namespace",e.namespace||"nonamespace").set("schema_location",e.schema_location||"").set("auxiliary_mime_types",e.auxiliary_mime_types||"");break}break;case"Metadata":n.add("nmhd");break;case"System":n.add("nmhd");break;default:n.add("nmhd");break}e.description&&l.addBox(e.description),e.description_boxes&&e.description_boxes.forEach(function(I){l.addBox(I)}),n.add("dinf").add("dref").addEntry(new s["url Box"]().set("flags",1));var L=n.add("stbl");return L.add("stsd").addEntry(l),L.add("stts").set("sample_counts",[]).set("sample_deltas",[]),L.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),L.add("stco").set("chunk_offsets",[]),L.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",e.id).set("default_sample_description_index",e.default_sample_description_index||1).set("default_sample_duration",e.default_sample_duration||0).set("default_sample_size",e.default_sample_size||0).set("default_sample_flags",e.default_sample_flags||0),this.buildTrakSampleLists(t),e.id}},s.Box.prototype.computeSize=function(A){var e=A||new o;e.endianness=o.BIG_ENDIAN,this.write(e)},c.prototype.addSample=function(A,e,t){var r=t||{},n={},l=this.getTrackById(A);if(l!==null){n.number=l.samples.length,n.track_id=l.tkhd.track_id,n.timescale=l.mdia.mdhd.timescale,n.description_index=r.sample_description_index?r.sample_description_index-1:0,n.description=l.mdia.minf.stbl.stsd.entries[n.description_index],n.data=e,n.size=e.byteLength,n.alreadyRead=n.size,n.duration=r.duration||1,n.cts=r.cts||0,n.dts=r.dts||0,n.is_sync=r.is_sync||!1,n.is_leading=r.is_leading||0,n.depends_on=r.depends_on||0,n.is_depended_on=r.is_depended_on||0,n.has_redundancy=r.has_redundancy||0,n.degradation_priority=r.degradation_priority||0,n.offset=0,n.subsamples=r.subsamples,l.samples.push(n),l.samples_size+=n.size,l.samples_duration+=n.duration,l.first_dts===void 0&&(l.first_dts=r.dts),this.processSamples();var d=this.createSingleSampleMoof(n);return this.addBox(d),d.computeSize(),d.trafs[0].truns[0].data_offset=d.size+8,this.add("mdat").data=new Uint8Array(e),n}},c.prototype.createSingleSampleMoof=function(A){var e=0;A.is_sync?e=1<<25:e=65536;var t=new s.moofBox;t.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var r=t.add("traf"),n=this.getTrackById(A.track_id);return r.add("tfhd").set("track_id",A.track_id).set("flags",s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),r.add("tfdt").set("baseMediaDecodeTime",A.dts-(n.first_dts||0)),r.add("trun").set("flags",s.TRUN_FLAGS_DATA_OFFSET|s.TRUN_FLAGS_DURATION|s.TRUN_FLAGS_SIZE|s.TRUN_FLAGS_FLAGS|s.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[A.duration]).set("sample_size",[A.size]).set("sample_flags",[e]).set("sample_composition_time_offset",[A.cts-A.dts]),t},c.prototype.lastMoofIndex=0,c.prototype.samplesDataSize=0,c.prototype.resetTables=function(){var A,e,t,r,n,l,d,f;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,A=0;A<this.moov.traks.length;A++){e=this.moov.traks[A],e.tkhd.duration=0,e.mdia.mdhd.duration=0,t=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,t.chunk_offsets=[],r=e.mdia.minf.stbl.stsc,r.first_chunk=[],r.samples_per_chunk=[],r.sample_description_index=[],n=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,n.sample_sizes=[],l=e.mdia.minf.stbl.stts,l.sample_counts=[],l.sample_deltas=[],d=e.mdia.minf.stbl.ctts,d&&(d.sample_counts=[],d.sample_offsets=[]),f=e.mdia.minf.stbl.stss;var v=e.mdia.minf.stbl.boxes.indexOf(f);v!=-1&&(e.mdia.minf.stbl.boxes[v]=null)}},c.initSampleGroups=function(A,e,t,r,n){var l,d,f,v;function g(b,k,L){this.grouping_type=b,this.grouping_type_parameter=k,this.sbgp=L,this.last_sample_in_run=-1,this.entry_index=-1}for(e&&(e.sample_groups_info=[]),A.sample_groups_info||(A.sample_groups_info=[]),d=0;d<t.length;d++){for(v=t[d].grouping_type+"/"+t[d].grouping_type_parameter,f=new g(t[d].grouping_type,t[d].grouping_type_parameter,t[d]),e&&(e.sample_groups_info[v]=f),A.sample_groups_info[v]||(A.sample_groups_info[v]=f),l=0;l<r.length;l++)r[l].grouping_type===t[d].grouping_type&&(f.description=r[l],f.description.used=!0);if(n)for(l=0;l<n.length;l++)n[l].grouping_type===t[d].grouping_type&&(f.fragment_description=n[l],f.fragment_description.used=!0,f.is_fragment=!0)}if(e){if(n)for(d=0;d<n.length;d++)!n[d].used&&n[d].version>=2&&(v=n[d].grouping_type+"/0",f=new g(n[d].grouping_type,0),f.is_fragment=!0,e.sample_groups_info[v]||(e.sample_groups_info[v]=f))}else for(d=0;d<r.length;d++)!r[d].used&&r[d].version>=2&&(v=r[d].grouping_type+"/0",f=new g(r[d].grouping_type,0),A.sample_groups_info[v]||(A.sample_groups_info[v]=f))},c.setSampleGroupProperties=function(A,e,t,r){var n,l;e.sample_groups=[];for(n in r)if(e.sample_groups[n]={},e.sample_groups[n].grouping_type=r[n].grouping_type,e.sample_groups[n].grouping_type_parameter=r[n].grouping_type_parameter,t>=r[n].last_sample_in_run&&(r[n].last_sample_in_run<0&&(r[n].last_sample_in_run=0),r[n].entry_index++,r[n].entry_index<=r[n].sbgp.entries.length-1&&(r[n].last_sample_in_run+=r[n].sbgp.entries[r[n].entry_index].sample_count)),r[n].entry_index<=r[n].sbgp.entries.length-1?e.sample_groups[n].group_description_index=r[n].sbgp.entries[r[n].entry_index].group_description_index:e.sample_groups[n].group_description_index=-1,e.sample_groups[n].group_description_index!==0){var d;r[n].fragment_description?d=r[n].fragment_description:d=r[n].description,e.sample_groups[n].group_description_index>0?(e.sample_groups[n].group_description_index>65535?l=(e.sample_groups[n].group_description_index>>16)-1:l=e.sample_groups[n].group_description_index-1,d&&l>=0&&(e.sample_groups[n].description=d.entries[l])):d&&d.version>=2&&d.default_group_description_index>0&&(e.sample_groups[n].description=d.entries[d.default_group_description_index-1])}},c.process_sdtp=function(A,e,t){e&&(A?(e.is_leading=A.is_leading[t],e.depends_on=A.sample_depends_on[t],e.is_depended_on=A.sample_is_depended_on[t],e.has_redundancy=A.sample_has_redundancy[t]):(e.is_leading=0,e.depends_on=0,e.is_depended_on=0,e.has_redundancy=0))},c.prototype.buildSampleLists=function(){var A,e;for(A=0;A<this.moov.traks.length;A++)e=this.moov.traks[A],this.buildTrakSampleLists(e)},c.prototype.buildTrakSampleLists=function(A){var e,t,r,n,l,d,f,v,g,b,k,L,I,N,Y,rA,oA,tA,X,eA,pA,WA,EA,QA;if(A.samples=[],A.samples_duration=0,A.samples_size=0,t=A.mdia.minf.stbl.stco||A.mdia.minf.stbl.co64,r=A.mdia.minf.stbl.stsc,n=A.mdia.minf.stbl.stsz||A.mdia.minf.stbl.stz2,l=A.mdia.minf.stbl.stts,d=A.mdia.minf.stbl.ctts,f=A.mdia.minf.stbl.stss,v=A.mdia.minf.stbl.stsd,g=A.mdia.minf.stbl.subs,L=A.mdia.minf.stbl.stdp,b=A.mdia.minf.stbl.sbgps,k=A.mdia.minf.stbl.sgpds,tA=-1,X=-1,eA=-1,pA=-1,WA=0,EA=0,QA=0,c.initSampleGroups(A,null,b,k),!(typeof n>"u")){for(e=0;e<n.sample_sizes.length;e++){var G={};G.number=e,G.track_id=A.tkhd.track_id,G.timescale=A.mdia.mdhd.timescale,G.alreadyRead=0,A.samples[e]=G,G.size=n.sample_sizes[e],A.samples_size+=G.size,e===0?(N=1,I=0,G.chunk_index=N,G.chunk_run_index=I,oA=r.samples_per_chunk[I],rA=0,I+1<r.first_chunk.length?Y=r.first_chunk[I+1]-1:Y=1/0):e<oA?(G.chunk_index=N,G.chunk_run_index=I):(N++,G.chunk_index=N,rA=0,N<=Y||(I++,I+1<r.first_chunk.length?Y=r.first_chunk[I+1]-1:Y=1/0),G.chunk_run_index=I,oA+=r.samples_per_chunk[I]),G.description_index=r.sample_description_index[G.chunk_run_index]-1,G.description=v.entries[G.description_index],G.offset=t.chunk_offsets[G.chunk_index-1]+rA,rA+=G.size,e>tA&&(X++,tA<0&&(tA=0),tA+=l.sample_counts[X]),e>0?(A.samples[e-1].duration=l.sample_deltas[X],A.samples_duration+=A.samples[e-1].duration,G.dts=A.samples[e-1].dts+A.samples[e-1].duration):G.dts=0,d?(e>=eA&&(pA++,eA<0&&(eA=0),eA+=d.sample_counts[pA]),G.cts=A.samples[e].dts+d.sample_offsets[pA]):G.cts=G.dts,f?(e==f.sample_numbers[WA]-1?(G.is_sync=!0,WA++):(G.is_sync=!1,G.degradation_priority=0),g&&g.entries[EA].sample_delta+QA==e+1&&(G.subsamples=g.entries[EA].subsamples,QA+=g.entries[EA].sample_delta,EA++)):G.is_sync=!0,c.process_sdtp(A.mdia.minf.stbl.sdtp,G,G.number),L?G.degradation_priority=L.priority[e]:G.degradation_priority=0,g&&g.entries[EA].sample_delta+QA==e&&(G.subsamples=g.entries[EA].subsamples,QA+=g.entries[EA].sample_delta),(b.length>0||k.length>0)&&c.setSampleGroupProperties(A,G,e,A.sample_groups_info)}e>0&&(A.samples[e-1].duration=Math.max(A.mdia.mdhd.duration-A.samples[e-1].dts,0),A.samples_duration+=A.samples[e-1].duration)}},c.prototype.updateSampleLists=function(){var A,e,t,r,n,l,d,f,v,g,b,k,L,I,N;if(this.moov!==void 0){for(;this.lastMoofIndex<this.moofs.length;)if(v=this.moofs[this.lastMoofIndex],this.lastMoofIndex++,v.type=="moof")for(g=v,A=0;A<g.trafs.length;A++){for(b=g.trafs[A],k=this.getTrackById(b.tfhd.track_id),L=this.getTrexById(b.tfhd.track_id),b.tfhd.flags&s.TFHD_FLAG_SAMPLE_DESC?r=b.tfhd.default_sample_description_index:r=L?L.default_sample_description_index:1,b.tfhd.flags&s.TFHD_FLAG_SAMPLE_DUR?n=b.tfhd.default_sample_duration:n=L?L.default_sample_duration:0,b.tfhd.flags&s.TFHD_FLAG_SAMPLE_SIZE?l=b.tfhd.default_sample_size:l=L?L.default_sample_size:0,b.tfhd.flags&s.TFHD_FLAG_SAMPLE_FLAGS?d=b.tfhd.default_sample_flags:d=L?L.default_sample_flags:0,b.sample_number=0,b.sbgps.length>0&&c.initSampleGroups(k,b,b.sbgps,k.mdia.minf.stbl.sgpds,b.sgpds),e=0;e<b.truns.length;e++){var Y=b.truns[e];for(t=0;t<Y.sample_count;t++){I={},I.moof_number=this.lastMoofIndex,I.number_in_traf=b.sample_number,b.sample_number++,I.number=k.samples.length,b.first_sample_index=k.samples.length,k.samples.push(I),I.track_id=k.tkhd.track_id,I.timescale=k.mdia.mdhd.timescale,I.description_index=r-1,I.description=k.mdia.minf.stbl.stsd.entries[I.description_index],I.size=l,Y.flags&s.TRUN_FLAGS_SIZE&&(I.size=Y.sample_size[t]),k.samples_size+=I.size,I.duration=n,Y.flags&s.TRUN_FLAGS_DURATION&&(I.duration=Y.sample_duration[t]),k.samples_duration+=I.duration,k.first_traf_merged||t>0?I.dts=k.samples[k.samples.length-2].dts+k.samples[k.samples.length-2].duration:(b.tfdt?I.dts=b.tfdt.baseMediaDecodeTime:I.dts=0,k.first_traf_merged=!0),I.cts=I.dts,Y.flags&s.TRUN_FLAGS_CTS_OFFSET&&(I.cts=I.dts+Y.sample_composition_time_offset[t]),N=d,Y.flags&s.TRUN_FLAGS_FLAGS?N=Y.sample_flags[t]:t===0&&Y.flags&s.TRUN_FLAGS_FIRST_FLAG&&(N=Y.first_sample_flags),I.is_sync=!(N>>16&1),I.is_leading=N>>26&3,I.depends_on=N>>24&3,I.is_depended_on=N>>22&3,I.has_redundancy=N>>20&3,I.degradation_priority=N&65535;var rA=!!(b.tfhd.flags&s.TFHD_FLAG_BASE_DATA_OFFSET),oA=!!(b.tfhd.flags&s.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),tA=!!(Y.flags&s.TRUN_FLAGS_DATA_OFFSET),X=0;rA?X=b.tfhd.base_data_offset:oA||e===0?X=g.start:X=f,e===0&&t===0?tA?I.offset=X+Y.data_offset:I.offset=X:I.offset=f,f=I.offset+I.size,(b.sbgps.length>0||b.sgpds.length>0||k.mdia.minf.stbl.sbgps.length>0||k.mdia.minf.stbl.sgpds.length>0)&&c.setSampleGroupProperties(k,I,I.number_in_traf,b.sample_groups_info)}}if(b.subs){k.has_fragment_subsamples=!0;var eA=b.first_sample_index;for(e=0;e<b.subs.entries.length;e++)eA+=b.subs.entries[e].sample_delta,I=k.samples[eA-1],I.subsamples=b.subs.entries[e].subsamples}}}},c.prototype.getSample=function(A,e){var t,r=A.samples[e];if(!this.moov)return null;if(!r.data)r.data=new Uint8Array(r.size),r.alreadyRead=0,this.samplesDataSize+=r.size,a.debug("ISOFile","Allocating sample #"+e+" on track #"+A.tkhd.track_id+" of size "+r.size+" (total: "+this.samplesDataSize+")");else if(r.alreadyRead==r.size)return r;for(;;){var n=this.stream.findPosition(!0,r.offset+r.alreadyRead,!1);if(n>-1){t=this.stream.buffers[n];var l=t.byteLength-(r.offset+r.alreadyRead-t.fileStart);if(r.size-r.alreadyRead<=l)return a.debug("ISOFile","Getting sample #"+e+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+(r.size-r.alreadyRead)+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,r.size-r.alreadyRead),t.usedBytes+=r.size-r.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead=r.size,r;if(l===0)return null;a.debug("ISOFile","Getting sample #"+e+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+l+" full size: "+r.size+")"),o.memcpy(r.data.buffer,r.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,l),r.alreadyRead+=l,t.usedBytes+=l,this.stream.logBufferLevel()}else return null}},c.prototype.releaseSample=function(A,e){var t=A.samples[e];return t.data?(this.samplesDataSize-=t.size,t.data=null,t.alreadyRead=0,t.size):0},c.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},c.prototype.getCodecs=function(){var A,e="";for(A=0;A<this.moov.traks.length;A++){var t=this.moov.traks[A];A>0&&(e+=","),e+=t.mdia.minf.stbl.stsd.entries[0].getCodec()}return e},c.prototype.getTrexById=function(A){var e;if(!this.moov||!this.moov.mvex)return null;for(e=0;e<this.moov.mvex.trexs.length;e++){var t=this.moov.mvex.trexs[e];if(t.track_id==A)return t}return null},c.prototype.getTrackById=function(A){if(this.moov===void 0)return null;for(var e=0;e<this.moov.traks.length;e++){var t=this.moov.traks[e];if(t.tkhd.track_id==A)return t}return null},c.prototype.itemsDataSize=0,c.prototype.flattenItemInfo=function(){var A=this.items,e=this.entity_groups,t,r,n,l=this.meta;if(l!=null&&l.hdlr!==void 0&&l.iinf!==void 0){for(t=0;t<l.iinf.item_infos.length;t++)n={},n.id=l.iinf.item_infos[t].item_ID,A[n.id]=n,n.ref_to=[],n.name=l.iinf.item_infos[t].item_name,l.iinf.item_infos[t].protection_index>0&&(n.protection=l.ipro.protections[l.iinf.item_infos[t].protection_index-1]),l.iinf.item_infos[t].item_type?n.type=l.iinf.item_infos[t].item_type:n.type="mime",n.content_type=l.iinf.item_infos[t].content_type,n.content_encoding=l.iinf.item_infos[t].content_encoding,n.item_uri_type=l.iinf.item_infos[t].item_uri_type;if(l.grpl)for(t=0;t<l.grpl.boxes.length;t++)entity_group={},entity_group.id=l.grpl.boxes[t].group_id,entity_group.entity_ids=l.grpl.boxes[t].entity_ids,entity_group.type=l.grpl.boxes[t].type,e[entity_group.id]=entity_group;if(l.iloc)for(t=0;t<l.iloc.items.length;t++){var d=l.iloc.items[t];switch(n=A[d.item_ID],d.data_reference_index!==0&&(a.warn("Item storage with reference to other files: not supported"),n.source=l.dinf.boxes[d.data_reference_index-1]),d.construction_method){case 0:break;case 1:break;case 2:a.warn("Item storage with construction_method : not supported");break}for(n.extents=[],n.size=0,r=0;r<d.extents.length;r++)n.extents[r]={},n.extents[r].offset=d.extents[r].extent_offset+d.base_offset,d.construction_method==1&&(n.extents[r].offset+=l.idat.start+l.idat.hdr_size),n.extents[r].length=d.extents[r].extent_length,n.extents[r].alreadyRead=0,n.size+=n.extents[r].length}if(l.pitm&&(A[l.pitm.item_id].primary=!0),l.iref)for(t=0;t<l.iref.references.length;t++){var f=l.iref.references[t];for(r=0;r<f.references.length;r++)A[f.from_item_ID].ref_to.push({type:f.type,id:f.references[r]})}if(l.iprp)for(var v=0;v<l.iprp.ipmas.length;v++){var g=l.iprp.ipmas[v];for(t=0;t<g.associations.length;t++){var b=g.associations[t];if(n=A[b.id],n||(n=e[b.id]),n)for(n.properties===void 0&&(n.properties={},n.properties.boxes=[]),r=0;r<b.props.length;r++){var k=b.props[r];if(k.property_index>0&&k.property_index-1<l.iprp.ipco.boxes.length){var L=l.iprp.ipco.boxes[k.property_index-1];n.properties[L.type]=L,n.properties.boxes.push(L)}}}}}},c.prototype.getItem=function(A){var e,t;if(!this.meta)return null;if(t=this.items[A],!t.data&&t.size)t.data=new Uint8Array(t.size),t.alreadyRead=0,this.itemsDataSize+=t.size,a.debug("ISOFile","Allocating item #"+A+" of size "+t.size+" (total: "+this.itemsDataSize+")");else if(t.alreadyRead===t.size)return t;for(var r=0;r<t.extents.length;r++){var n=t.extents[r];if(n.alreadyRead!==n.length){var l=this.stream.findPosition(!0,n.offset+n.alreadyRead,!1);if(l>-1){e=this.stream.buffers[l];var d=e.byteLength-(n.offset+n.alreadyRead-e.fileStart);if(n.length-n.alreadyRead<=d)a.debug("ISOFile","Getting item #"+A+" extent #"+r+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+t.size+")"),o.memcpy(t.data.buffer,t.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,n.length-n.alreadyRead),e.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),t.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length;else return a.debug("ISOFile","Getting item #"+A+" extent #"+r+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-e.fileStart)+" read size: "+d+" full extent size: "+n.length+" full item size: "+t.size+")"),o.memcpy(t.data.buffer,t.alreadyRead,e,n.offset+n.alreadyRead-e.fileStart,d),n.alreadyRead+=d,t.alreadyRead+=d,e.usedBytes+=d,this.stream.logBufferLevel(),null}else return null}}return t.alreadyRead===t.size?t:null},c.prototype.releaseItem=function(A){var e=this.items[A];if(e.data){this.itemsDataSize-=e.size,e.data=null,e.alreadyRead=0;for(var t=0;t<e.extents.length;t++){var r=e.extents[t];r.alreadyRead=0}return e.size}else return 0},c.prototype.processItems=function(A){for(var e in this.items){var t=this.items[e];this.getItem(t.id),A&&!t.sent&&(A(t),t.sent=!0,t.data=null)}},c.prototype.hasItem=function(A){for(var e in this.items){var t=this.items[e];if(t.name===A)return t.id}return-1},c.prototype.getMetaHandler=function(){return this.meta?this.meta.hdlr.handler:null},c.prototype.getPrimaryItem=function(){return!this.meta||!this.meta.pitm?null:this.getItem(this.meta.pitm.item_id)},c.prototype.itemToFragmentedTrackFile=function(A){var e=A||{},t=null;if(e.itemId?t=this.getItem(e.itemId):t=this.getPrimaryItem(),t==null)return null;var r=new c;r.discardMdatData=!1;var n={type:t.type,description_boxes:t.properties.boxes};t.properties.ispe&&(n.width=t.properties.ispe.image_width,n.height=t.properties.ispe.image_height);var l=r.addTrack(n);return l?(r.addSample(l,t.data),r):null},c.prototype.write=function(A){for(var e=0;e<this.boxes.length;e++)this.boxes[e].write(A)},c.prototype.createFragment=function(A,e,t){var r=this.getTrackById(A),n=this.getSample(r,e);if(n==null)return this.setNextSeekPositionFromSample(r.samples[e]),null;var l=t||new o;l.endianness=o.BIG_ENDIAN;var d=this.createSingleSampleMoof(n);d.write(l),d.trafs[0].truns[0].data_offset=d.size+8,a.debug("MP4Box","Adjusting data_offset with new value "+d.trafs[0].truns[0].data_offset),l.adjustUint32(d.trafs[0].truns[0].data_offset_position,d.trafs[0].truns[0].data_offset);var f=new s.mdatBox;return f.data=n.data,f.write(l),l},c.writeInitializationSegment=function(A,e,t,r){var n;a.debug("ISOFile","Generating initialization segment");var l=new o;l.endianness=o.BIG_ENDIAN,A.write(l);var d=e.add("mvex");for(t&&d.add("mehd").set("fragment_duration",t),n=0;n<e.traks.length;n++)d.add("trex").set("track_id",e.traks[n].tkhd.track_id).set("default_sample_description_index",1).set("default_sample_duration",r).set("default_sample_size",0).set("default_sample_flags",65536);return e.write(l),l.buffer},c.prototype.save=function(A){var e=new o;e.endianness=o.BIG_ENDIAN,this.write(e),e.save(A)},c.prototype.getBuffer=function(){var A=new o;return A.endianness=o.BIG_ENDIAN,this.write(A),A.buffer},c.prototype.initializeSegmentation=function(){var A,e,t,r;for(this.onSegment===null&&a.warn("MP4Box","No segmentation callback set!"),this.isFragmentationInitialized||(this.isFragmentationInitialized=!0,this.nextMoofNumber=0,this.resetTables()),e=[],A=0;A<this.fragmentedTracks.length;A++){var n=new s.moovBox;n.mvhd=this.moov.mvhd,n.boxes.push(n.mvhd),t=this.getTrackById(this.fragmentedTracks[A].id),n.boxes.push(t),n.traks.push(t),r={},r.id=t.tkhd.track_id,r.user=this.fragmentedTracks[A].user,r.buffer=c.writeInitializationSegment(this.ftyp,n,this.moov.mvex&&this.moov.mvex.mehd?this.moov.mvex.mehd.fragment_duration:void 0,this.moov.traks[A].samples.length>0?this.moov.traks[A].samples[0].duration:0),e.push(r)}return e},s.Box.prototype.printHeader=function(A){this.size+=8,this.size>U&&(this.size+=8),this.type==="uuid"&&(this.size+=16),A.log(A.indent+"size:"+this.size),A.log(A.indent+"type:"+this.type)},s.FullBox.prototype.printHeader=function(A){this.size+=4,s.Box.prototype.printHeader.call(this,A),A.log(A.indent+"version:"+this.version),A.log(A.indent+"flags:"+this.flags)},s.Box.prototype.print=function(A){this.printHeader(A)},s.ContainerBox.prototype.print=function(A){this.printHeader(A);for(var e=0;e<this.boxes.length;e++)if(this.boxes[e]){var t=A.indent;A.indent+=" ",this.boxes[e].print(A),A.indent=t}},c.prototype.print=function(A){A.indent="";for(var e=0;e<this.boxes.length;e++)this.boxes[e]&&this.boxes[e].print(A)},s.mvhdBox.prototype.print=function(A){s.FullBox.prototype.printHeader.call(this,A),A.log(A.indent+"creation_time: "+this.creation_time),A.log(A.indent+"modification_time: "+this.modification_time),A.log(A.indent+"timescale: "+this.timescale),A.log(A.indent+"duration: "+this.duration),A.log(A.indent+"rate: "+this.rate),A.log(A.indent+"volume: "+(this.volume>>8)),A.log(A.indent+"matrix: "+this.matrix.join(", ")),A.log(A.indent+"next_track_id: "+this.next_track_id)},s.tkhdBox.prototype.print=function(A){s.FullBox.prototype.printHeader.call(this,A),A.log(A.indent+"creation_time: "+this.creation_time),A.log(A.indent+"modification_time: "+this.modification_time),A.log(A.indent+"track_id: "+this.track_id),A.log(A.indent+"duration: "+this.duration),A.log(A.indent+"volume: "+(this.volume>>8)),A.log(A.indent+"matrix: "+this.matrix.join(", ")),A.log(A.indent+"layer: "+this.layer),A.log(A.indent+"alternate_group: "+this.alternate_group),A.log(A.indent+"width: "+this.width),A.log(A.indent+"height: "+this.height)};var C={};C.createFile=function(A,e){var t=A!==void 0?A:!0,r=new c(e);return r.discardMdatData=!t,r},p.createFile=C.createFile}(Se)),Se}var li=oi();class di{constructor(a){j(this,"data");j(this,"idx");j(this,"size");this.data=new Uint8Array(a),this.idx=0,this.size=a}getData(){if(this.idx!==this.size)throw new Error("Mismatch between size reserved and sized used");return this.data.slice(0,this.idx)}writeUint8(a){this.data.set([a],this.idx),this.idx+=1}writeUint16(a){const h=new Uint16Array(1);h[0]=a;const o=new Uint8Array(h.buffer);this.data.set([o[1],o[0]],this.idx),this.idx+=2}writeUint8Array(a){this.data.set(a,this.idx),this.idx+=a.length}}const hi=p=>{let a,h=7;for(a=0;a<p.SPS.length;a+=1)h+=2+p.SPS[a].length;for(a=0;a<p.PPS.length;a+=1)h+=2+p.PPS[a].length;const o=new di(h);for(o.writeUint8(p.configurationVersion),o.writeUint8(p.AVCProfileIndication),o.writeUint8(p.profile_compatibility),o.writeUint8(p.AVCLevelIndication),o.writeUint8(p.lengthSizeMinusOne+252),o.writeUint8(p.nb_SPS_nalus+224),a=0;a<p.SPS.length;a+=1)o.writeUint16(p.SPS[a].length),o.writeUint8Array(p.SPS[a].nalu);for(o.writeUint8(p.nb_PPS_nalus),a=0;a<p.PPS.length;a+=1)o.writeUint16(p.PPS[a].length),o.writeUint8Array(p.PPS[a].nalu);return o.getData()},pi=(p,a,{VideoDecoder:h,EncodedVideoChunk:o,debug:U})=>new Promise((w,u)=>{U&&console.info("Decoding video from",p);try{const s=li.createFile();let T="N/A";const P=new h({output:z=>{createImageBitmap(z,{resizeQuality:"high"}).then(D=>{a(D),z.close(),P.decodeQueueSize<=0&&setTimeout(()=>{P.state!=="closed"&&(P.close(),w(T))},500)})},error:z=>{console.error(z),u(z)}});s.onReady=z=>{if(z&&z.videoTracks&&z.videoTracks[0]){[{codec:T}]=z.videoTracks,U&&console.info("Video with codec:",T);const D=s.moov,O=D==null?void 0:D.traks[0].mdia.minf.stbl.stsd.entries[0].avcC;if(!O){u(new Error("Could not find avcC box for extradata."));return}const _=hi(O);P.configure({codec:T,description:_}),s.setExtractionOptions(z.videoTracks[0].id),s.start()}else u(new Error("URL provided is not a valid mp4 video file."))},s.onSamples=(z,D,O)=>{for(let _=0;_<O.length;_+=1){const c=O[_],C=c.is_sync?"key":"delta",A=new o({type:C,timestamp:c.cts,duration:c.duration,data:c.data});P.decode(A)}},fetch(p).then(z=>{if(!z.body)throw new Error("Response body is null");const D=z.body.getReader();let O=0;function _(c){if(c.done)return s.flush(),Promise.resolve();const C=c.value.buffer;return C.fileStart=O,O+=C.byteLength,s.appendBuffer(C),D.read().then(_)}return D.read().then(_)})}catch(s){u(s)}}),ci=(p,a,h=!1)=>typeof VideoDecoder=="function"&&typeof EncodedVideoChunk=="function"?(h&&console.info("WebCodecs is natively supported, using native version..."),pi(p,a,{VideoDecoder,EncodedVideoChunk,debug:h})):(h&&console.info("WebCodecs is not available in this browser."),Promise.resolve("N/A"));function fi(p,a=0){let h;return(...o)=>{clearTimeout(h),h=setTimeout(()=>{p(...o)},a)}}const nt=(p,a=1)=>{const h=window.pageYOffset;return Math.abs(h-p)<a};function Pe(p,a,h){return Math.max(Math.min(p,h),a)}function ui(p,a,h,o,U,w=!0){const u=(p-a)/(h-a)*(U-o)+o;return w?o<U?Pe(u,o,U):Pe(u,U,o):u}function gi(){return pt({generalData:{src:"",videoPercentage:0,frameRate:0,currentTime:0,totalTime:0},usingWebCodecs:!1,framesData:{codec:"",currentFrame:0,totalFrames:0},willAutoPlay:!1,isAutoPlaying:!1,autoplayProgress:0})}class vi{constructor({src:a,scrollerVideoContainer:h,objectFit:o="cover",sticky:U=!0,full:w=!0,trackScroll:u=!0,lockScroll:s=!0,transitionSpeed:T=8,frameThreshold:P=.1,useWebCodecs:z=!0,onReady:D=()=>{},onChange:O=C=>{},debug:_=!1,autoplay:c=!1}){j(this,"container");j(this,"scrollerVideoContainer");j(this,"src");j(this,"transitionSpeed");j(this,"frameThreshold");j(this,"useWebCodecs");j(this,"objectFit");j(this,"sticky");j(this,"trackScroll");j(this,"onReady");j(this,"onChange");j(this,"debug");j(this,"autoplay");j(this,"video");j(this,"videoPercentage");j(this,"isSafari");j(this,"currentTime");j(this,"targetTime");j(this,"canvas");j(this,"context");j(this,"frames");j(this,"frameRate");j(this,"targetScrollPosition",null);j(this,"currentFrame");j(this,"usingWebCodecs");j(this,"totalTime");j(this,"transitioningRaf");j(this,"componentState");j(this,"updateScrollPercentage");j(this,"resize");if(this.src=a,this.scrollerVideoContainer=h,this.objectFit=o,this.sticky=U,this.trackScroll=u,this.transitionSpeed=T,this.frameThreshold=P,this.useWebCodecs=z,this.onReady=D,this.onChange=O,this.debug=_,this.autoplay=c,this.videoPercentage=0,this.isSafari=!1,this.currentTime=0,this.targetTime=0,this.canvas=null,this.context=null,this.container=null,this.frames=null,this.frameRate=0,this.currentTime=0,this.targetTime=0,this.canvas=null,this.context=null,this.frames=[],this.frameRate=0,this.currentFrame=0,this.videoPercentage=0,this.usingWebCodecs=!1,this.totalTime=0,this.transitioningRaf=null,this.componentState=gi(),this.componentState.willAutoPlay=c,h&&h instanceof HTMLElement)this.container=h;else if(typeof h=="string"){if(this.container=document.getElementById(h)||null,!this.container)throw new Error("scrollerVideoContainer must be a valid DOM object")}else throw new Error("scrollerVideoContainer must be a valid DOM object");this.video=document.createElement("video"),this.video.src=a,this.video.preload="auto",this.video.tabIndex=0,this.video.preload="auto",this.video.playsInline=!0,this.video.muted=!0,this.video.pause(),this.video.load(),this.video.addEventListener("canplaythrough",()=>{this.onReady(),this.autoplay&&!this.useWebCodecs&&this.autoplayScroll()},{once:!0}),this.videoPercentage=0,this.container.appendChild(this.video),U&&(this.container.style.display="block",this.container.style.position="sticky",this.container.style.top="0"),w&&(this.container.style.width="100%",this.container.style.height="100lvh",this.container.style.overflow="hidden"),o&&this.setCoverStyle(this.video);const C=new SA().getEngine();this.isSafari=C.name==="WebKit",_&&this.isSafari&&console.info("Safari browser detected");const A=fi(()=>{window.requestAnimationFrame(()=>{this.setScrollPercent(this.videoPercentage)})},100);this.updateScrollPercentage=(e=!1)=>{let t;if(this.container&&this.container.parentNode&&this.container.parentNode.getBoundingClientRect)t=this.container.parentNode.getBoundingClientRect();else{this.debug&&console.error("ScrollerVideo: container or parentNode is null or invalid.");return}let r=-t.top/(t.height-window.innerHeight);this.componentState.autoplayProgress>0&&(r=ui(r,0,1,this.componentState.autoplayProgress,1)),this.debug&&console.info("ScrollerVideo scrolled to",r),this.componentState.isAutoPlaying&&this.frames&&(this.debug&&console.warn("Stopping autoplay due to manual scroll"),this.usingWebCodecs?this.componentState.autoplayProgress=parseFloat((this.currentFrame/this.frames.length).toFixed(4)):this.componentState.autoplayProgress=parseFloat((this.currentTime/this.totalTime).toFixed(4)),this.componentState.isAutoPlaying=!1),this.videoPercentage=r,this.targetScrollPosition==null?(this.setTargetTimePercent(r,{jump:e}),this.onChange(r)):nt(this.targetScrollPosition)?this.targetScrollPosition=null:s&&this.targetScrollPosition!=null&&A(),this.updateDebugInfo()},this.trackScroll?(window.addEventListener("scroll",()=>{this.updateScrollPercentage&&this.updateScrollPercentage(!1)}),this.video.addEventListener("loadedmetadata",()=>{this.updateScrollPercentage&&this.updateScrollPercentage(!0),this.video&&(this.totalTime=this.video.duration),this.setCoverStyle(this.canvas||this.video)},{once:!0})):this.video.addEventListener("loadedmetadata",()=>{this.setTargetTimePercent(0,{jump:!0}),this.video&&(this.totalTime=this.video.duration),this.setCoverStyle(this.canvas||this.video)},{once:!0}),this.resize=()=>{this.debug&&console.info("ScrollerVideo resizing..."),this.objectFit&&this.setCoverStyle(this.canvas||this.video),this.paintCanvasFrame(Math.floor(this.currentTime*this.frameRate))},window.addEventListener("resize",this.resize),this.video.addEventListener("progress",this.resize),this.decodeVideo(),this.updateDebugInfo()}setVideoPercentage(a,h={jump:!1,transitionSpeed:8}){this.videoPercentage!==a&&(this.transitioningRaf&&window.cancelAnimationFrame(this.transitioningRaf),this.videoPercentage=a,this.onChange(a),this.trackScroll&&!h.autoplay&&this.setScrollPercent(a),this.setTargetTimePercent(a,h))}setCoverStyle(a){var h;if(!a){this.debug&&console.warn("No element to set cover style on");return}if(this.objectFit){a.style.position="absolute",a.style.top="50%",a.style.left="50%",a.style.transform="translate(-50%, -50%)";const{width:o,height:U}=((h=this.container)==null?void 0:h.getBoundingClientRect())||{width:0,height:0};let w=0,u=0;a instanceof HTMLVideoElement?(w=a.videoWidth,u=a.videoHeight):a instanceof HTMLCanvasElement&&(w=a.width,u=a.height),this.debug&&console.info("Container dimensions:",[o,U]),this.debug&&console.info("Element dimensions:",[w,u]),this.objectFit=="cover"?o/U>w/u?(a.style.width="100%",a.style.height="auto"):(a.style.height="100%",a.style.width="auto"):this.objectFit=="contain"&&(o/U>w/u?(a.style.height="100%",a.style.width="auto"):(a.style.width="100%",a.style.height="auto"))}}async decodeVideo(){var a,h,o;if(!this.useWebCodecs){this.debug&&console.warn("Cannot perform video decode: `useWebCodes` disabled");return}if(!this.src){this.debug&&console.warn("Cannot perform video decode: no `src` found");return}try{await ci(this.src,U=>{var w;(w=this.frames)==null||w.push(U)},this.debug).then(U=>{this.usingWebCodecs=!0,typeof U=="string"&&(this.componentState.framesData.codec=U)})}catch(U){this.debug&&console.error("Error encountered while decoding video",U),this.frames=[],(a=this.video)==null||a.load()}if(((h=this.frames)==null?void 0:h.length)===0){this.debug&&console.error("No frames were received from webCodecs"),this.onReady();return}this.frameRate=this.frames&&this.video?this.frames.length/this.video.duration:0,this.debug&&console.info("Received",(o=this.frames)==null?void 0:o.length,"frames. Video frame rate:",this.frameRate),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.video&&(this.video.style.display="none"),this.container&&this.container.appendChild(this.canvas),this.objectFit&&this.setCoverStyle(this.canvas),this.paintCanvasFrame(Math.floor(this.currentTime*this.frameRate)),this.onReady(),this.autoplay&&this.autoplayScroll()}paintCanvasFrame(a){var w;if(!this.frames){this.debug&&console.warn("No frames available to paint");return}const h=this.frames[a];if(this.currentFrame=a,!this.canvas||!h)return;this.debug&&console.info("Painting frame",a),this.canvas.width=h.width,this.canvas.height=h.height;const{width:o,height:U}=((w=this.container)==null?void 0:w.getBoundingClientRect())||{width:0,height:0};if(this.objectFit=="cover"?o/U>h.width/h.height?(this.canvas.style.width="100%",this.canvas.style.height="auto"):(this.canvas.style.height="100%",this.canvas.style.width="auto"):this.objectFit=="contain"&&(o/U>h.width/h.height?(this.canvas.style.height="100%",this.canvas.style.width="auto"):(this.canvas.style.width="100%",this.canvas.style.height="auto")),!this.context){this.debug&&console.warn("No canvas context available to paint");return}this.context.drawImage(h,0,0,h.width,h.height),this.updateDebugInfo()}transitionToTargetTime({jump:a,transitionSpeed:h=this.transitionSpeed,easing:o=null}){if(!this.video){console.warn("No video found");return}this.debug&&console.info("Transitioning targetTime:",this.targetTime,"currentTime:",this.currentTime);const U=this.targetTime-this.currentTime,w=Math.abs(U),u=w*1e3,s=U>0,T=({startCurrentTime:P,startTimestamp:z,timestamp:D})=>{var e;if(!this.video){console.warn("No video found during transition tick");return}const O=(D-z)/u,_=s?this.currentTime>=this.targetTime:this.currentTime<=this.targetTime;if(this.componentState.isAutoPlaying&&(this.componentState.autoplayProgress=parseFloat((this.currentTime/this.totalTime).toFixed(4))),isNaN(this.targetTime)||Math.abs(this.targetTime-this.currentTime)<this.frameThreshold||_){(e=this.video)==null||e.pause(),this.transitioningRaf&&(cancelAnimationFrame(this.transitioningRaf),this.transitioningRaf=null);return}this.targetTime>this.video.duration&&(this.targetTime=this.video.duration),this.targetTime<0&&(this.targetTime=0);const c=this.targetTime-this.currentTime,C=o&&Number.isFinite(O)?o(O):0,A=s?P+C*Math.abs(w)*h:P-C*Math.abs(w)*h;if(this.canvas)a?this.currentTime=this.targetTime:C?this.currentTime=A:this.currentTime+=c/(256/h),this.paintCanvasFrame(Math.floor(this.currentTime*this.frameRate));else if(a||this.isSafari||!s)this.video.pause(),C?this.currentTime=A:this.currentTime+=c/(64/h),a&&(this.currentTime=this.targetTime),this.video.currentTime=this.currentTime;else{const t=Math.max(Math.min(c*4,h,16),1);this.debug&&console.info("ScrollerVideo playbackRate:",t),isNaN(t)||(this.video.playbackRate=t,this.video.play()),this.currentTime=this.video.currentTime}typeof requestAnimationFrame=="function"&&(this.transitioningRaf=requestAnimationFrame(t=>T({startCurrentTime:P,startTimestamp:z,timestamp:t})))};typeof requestAnimationFrame=="function"&&(this.transitioningRaf=requestAnimationFrame(P=>{T({startCurrentTime:this.currentTime,startTimestamp:P,timestamp:P})}))}setTargetTimePercent(a,h={jump:!1,transitionSpeed:8}){var U,w,u,s;const o=(U=this.frames)!=null&&U.length&&this.frameRate?this.frames.length/this.frameRate:((w=this.video)==null?void 0:w.duration)||0;this.targetTime=Math.max(Math.min(a,1),0)*o,!(!h.jump&&Math.abs(this.currentTime-this.targetTime)<this.frameThreshold)&&(!this.canvas&&!((u=this.video)!=null&&u.paused)&&((s=this.video)==null||s.play()),this.transitionToTargetTime(h))}setScrollPercent(a){var T;if(!this.trackScroll){console.warn("`setScrollPercent` requires enabled `trackScroll`");return}const h=(T=this.container)==null?void 0:T.parentNode;let o=0,U=0;if(h&&h instanceof Element){const P=h.getBoundingClientRect();o=P.top,U=P.height}const w=o+window.pageYOffset,u=U-window.innerHeight,s=w+u*a;nt(s)?this.targetScrollPosition=null:(window.scrollTo({top:s,behavior:"smooth"}),this.targetScrollPosition=s)}destroy(){this.debug&&console.info("Destroying ScrollerVideo"),this.trackScroll&&this.updateScrollPercentage&&window.removeEventListener("scroll",()=>this.updateScrollPercentage),this.resize&&window.removeEventListener("resize",this.resize),this.container&&(this.container.innerHTML="")}autoplayScroll(){this.setVideoPercentage(1,{jump:!1,transitionSpeed:this.totalTime*.1,easing:a=>a,autoplay:!0}),this.componentState.isAutoPlaying=!0}updateDebugInfo(){var a;this.componentState.generalData.src=this.src,this.componentState.generalData.videoPercentage=Pe(parseFloat(this.videoPercentage.toFixed(4)),0,1),this.componentState.generalData.frameRate=parseFloat(this.frameRate.toFixed(2)),this.componentState.generalData.currentTime=parseFloat(this.currentTime.toFixed(4)),this.componentState.generalData.totalTime=parseFloat(this.totalTime.toFixed(4)),this.componentState.usingWebCodecs=this.usingWebCodecs,this.componentState.framesData.currentFrame=this.currentFrame,this.componentState.framesData.totalFrames=((a=this.frames)==null?void 0:a.length)||0}}function _i(p,a){$(a,!0),p.preventDefault()}function mi(p,a,h){m(a)&&($(a,!1),setTimeout(()=>{$(h,!1)},5),p.stopImmediatePropagation()),p.preventDefault()}function yi(p,a,h){m(a)&&p.preventDefault(),$(h,!1)}var bi=V('<p class="svelte-1vr1rmh">Codec:</p> <p class="state-value svelte-1vr1rmh"><span class="tag svelte-1vr1rmh"> </span></p> <p class="svelte-1vr1rmh">Current frame:</p> <p class="state-value svelte-1vr1rmh"> </p>',1),wi=V('<p class="svelte-1vr1rmh">Autoplaying:</p> <p class="state-value svelte-1vr1rmh"><span class="tag svelte-1vr1rmh"> </span></p> <p class="svelte-1vr1rmh">Autoplay progress:</p> <div style="display: flex; flex-direction: column; gap: 4px;" class="svelte-1vr1rmh"><p class="state-value svelte-1vr1rmh"> </p> <div id="video-progress-bar" class="svelte-1vr1rmh"><div class="svelte-1vr1rmh"></div></div></div>',1),xi=V('<div role="region"><details class="debug-info svelte-1vr1rmh" open><summary class="text-xxs font-sans font-bold title svelte-1vr1rmh" style="grid-column: span 2;">CONSOLE</summary> <div class="state-debug svelte-1vr1rmh"><p class="svelte-1vr1rmh">Source:</p> <p class="state-value svelte-1vr1rmh"> </p> <p class="svelte-1vr1rmh">Progress:</p> <div style="display: flex; flex-direction: column; gap: 4px;" class="svelte-1vr1rmh"><p class="state-value svelte-1vr1rmh"> </p> <div id="video-progress-bar" class="svelte-1vr1rmh"><div class="svelte-1vr1rmh"></div></div></div> <p class="svelte-1vr1rmh">Framerate:</p> <p class="state-value svelte-1vr1rmh"> </p> <p class="svelte-1vr1rmh">Current time:</p> <p class="state-value svelte-1vr1rmh"> </p> <!> <p class="svelte-1vr1rmh">Will Autoplay?:</p> <p class="state-value svelte-1vr1rmh"><span class="tag svelte-1vr1rmh"> </span></p> <!></div></details></div>');function yt(p,a){YA(a,!0);let h=fA(!1),o=fA(!1),U=fA(pt({x:8,y:8}));function w(L){m(h)&&($(U,{x:m(U).x+L.movementX,y:m(U).y+L.movementY},!0),$(o,!0)),L.preventDefault()}var u=xi();ht("mousemove",Ot,w);var s=R(u),T=R(s);T.__mousedown=[_i,h],T.__mouseup=[mi,h,o],T.__click=[yi,o,h];var P=F(T,2),z=F(R(P),2),D=R(z),O=F(z,4),_=R(O),c=R(_),C=F(_,2),A=R(C),e=F(O,4),t=R(e),r=F(e,4),n=R(r),l=F(r,2);{var d=L=>{var I=bi(),N=F(AA(I),2),Y=R(N),rA=R(Y),oA=F(N,4),tA=R(oA);q(()=>{uA(rA,a.componentState.framesData.codec),uA(tA,`${a.componentState.framesData.currentFrame??""}/${a.componentState.framesData.totalFrames??""}`)}),M(L,I)};W(l,L=>{a.componentState.usingWebCodecs&&L(d)})}var f=F(l,4),v=R(f),g=R(v),b=F(f,2);{var k=L=>{var I=wi(),N=F(AA(I),2),Y=R(N),rA=R(Y),oA=F(N,4),tA=R(oA),X=R(tA),eA=F(tA,2),pA=R(eA);q(()=>{uA(rA,a.componentState.isAutoPlaying),uA(X,a.componentState.autoplayProgress),K(pA,`width: ${a.componentState.autoplayProgress*100}%; height: 100%;`)}),M(L,I)};W(b,L=>{a.componentState.willAutoPlay&&L(k)})}q(()=>{K(u,`position: absolute; top: ${m(U).y??""}px; left: ${m(U).x??""}px; z-index: 5; user-select: none;`),uA(D,a.componentState.generalData.src),uA(c,a.componentState.generalData.videoPercentage),K(A,`width: ${a.componentState.generalData.videoPercentage*100}%; height: 100%;`),uA(t,a.componentState.generalData.frameRate),uA(n,`${a.componentState.generalData.currentTime??""}/${a.componentState.generalData.totalTime??""}`),uA(g,a.componentState.willAutoPlay)}),M(p,u),jA()}Rt(["mousedown","mouseup","click"]);yt.__docgen={data:[{name:"componentState",visibility:"public",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"any",text:"any"},static:!1,readonly:!1}],name:"Debug.svelte"};var Si=V('<div class="debug-info"><!></div>'),Ui=V("<!> <!>",1),Ei=V('<div class="embedded-scroller-video-container svelte-1u01kce"><div><div data-scroller-container=""><!></div></div></div>'),Bi=V('<div><div data-scroller-container=""><!></div></div>');function lA(p,a){YA(a,!0);const h=g=>{var b=dA(),k=AA(b);{var L=I=>{var N=Ui(),Y=AA(N);{var rA=X=>{var eA=Si(),pA=R(eA);yt(pA,{get componentState(){return u().componentState}}),M(X,eA)};W(Y,X=>{z()&&X(rA)})}var oA=F(Y,2);{var tA=X=>{var eA=dA(),pA=AA(eA);ut(pA,()=>a.children),M(X,eA)};W(oA,X=>{a.children&&X(tA)})}M(I,N)};W(k,I=>{u()&&I(L)})}M(g,b)},o={threshold:.5,delay:200};let U=sA(a,"class",3,""),w=sA(a,"id",3,""),u=sA(a,"scrollerVideo",15),s=sA(a,"onReady",11,()=>{}),T=sA(a,"onChange",11,()=>{}),P=sA(a,"height",3,"200lvh"),z=sA(a,"showDebugInfo",3,!1),D=sA(a,"embedded",3,!1),O=Mt(a,["$$slots","$$events","$$legacy","class","id","src","scrollerVideo","videoPercentage","onReady","onChange","height","showDebugInfo","embedded","embeddedProps","children"]),_=fA(void 0),c="",C={...o,...a.embeddedProps},A=fA(void 0),e=fA(void 0),t=vA(()=>{let g=1;return m(A)&&m(e)&&(g=m(A).scrollHeight-m(e)),g});const r=new jt(0,{duration:1e3,delay:C.delay,easing:g=>+g});Me(()=>{m(A)&&(m(A).scrollTop=r.current)}),Me(()=>{if(m(_)){if(JSON.stringify(O)!==c){if(u()&&u().destroy&&u().destroy(),u(new vi({src:a.src,scrollerVideoContainer:m(_),onReady:s(),onChange:T(),...O,trackScroll:D()?!1:a.trackScroll,autoplay:D()?!1:a.autoplay})),D()){const g=()=>{s()(),window==null||window.addEventListener("scroll",()=>{var b;if(m(A)&&m(A).getBoundingClientRect().top<window.innerHeight*C.threshold){if(r.current==0&&m(e)&&((b=u())!=null&&b.componentState)){const k=C.duration||u().componentState.generalData.totalTime*1e3;r.set(m(t),{duration:k,delay:C.delay})}}else m(A)&&m(A).getBoundingClientRect().top>window.innerHeight*C.threshold&&r.current>0&&r.set(0,{duration:0})})};u(u().onReady=g,!0)}Nt("scrollerVideoState",u().componentState),c=JSON.stringify(O)}u()&&a.videoPercentage&&a.videoPercentage>=0&&a.videoPercentage<=1&&u().setVideoPercentage(a.videoPercentage,{jump:!1,transitionSpeed:a.transitionSpeed||8})}}),ft(()=>{u()&&u().destroy&&u().destroy()});let n=vA(()=>{var g;return u()?`calc(${P()} * ${1-((g=u())==null?void 0:g.componentState.autoplayProgress)})`:P()});var l=dA(),d=AA(l);{var f=g=>{var b=Ei(),k=R(b),L=R(k),I=R(L);h(I),ue(L,N=>$(_,N),()=>m(_)),ue(b,N=>$(A,N),()=>m(A)),q(()=>{He(k,"id",w()),Ee(k,1,`scroller-video-container embedded ${U()??""}`,"svelte-1u01kce")}),ht("scroll",b,()=>{if(u()&&m(A)){let N=m(A).scrollTop/m(t);u().setVideoPercentage(N,{jump:N==0,easing:Y=>Y})}}),ee(b,"clientHeight",N=>$(e,N)),M(g,b)},v=g=>{var b=Bi(),k=R(b),L=R(k);h(L),ue(k,I=>$(_,I),()=>m(_)),q(()=>{He(b,"id",w()),Ee(b,1,`scroller-video-container ${U()??""}`,"svelte-1u01kce"),K(b,`height: ${m(n)??""}`)}),M(g,b)};W(d,g=>{D()?g(f):g(v,!1)})}M(p,l),jA()}lA.__docgen={data:[{name:"class",visibility:"public",description:"CSS class for scroller container",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"id",visibility:"public",description:"ID of the scroller container",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'""'},{name:"scrollerVideo",visibility:"public",description:"Bindable instance of ScrollerVideo",keywords:[],kind:"let",type:{kind:"type",type:"object",text:"ScrollerVideo"},static:!1,readonly:!1,defaultValue:"..."},{name:"src",visibility:"public",description:"Video source URL",keywords:[{name:"required",description:""}],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"videoPercentage",visibility:"public",description:"Bindable percentage value to control video playback. **Ranges from 0 to 1**",keywords:[],kind:"let",type:{kind:"type",type:"number",text:"number"},static:!1,readonly:!1},{name:"transitionSpeed",visibility:"public",description:"Sets the maximum playbackRate for this video",keywords:[],kind:"let",type:{kind:"type",type:"number",text:"number"},static:!1,readonly:!1},{name:"frameThreshold",visibility:"public",description:"When to stop the video animation, in seconds",keywords:[],kind:"let",type:{kind:"type",type:"number",text:"number"},static:!1,readonly:!1},{name:"objectFit",visibility:"public",description:"How the video should be resized to fit its container",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"sticky",visibility:"public",description:"Whether the video should have position: sticky",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"full",visibility:"public",description:"Whether the video should take up the entire viewport",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"trackScroll",visibility:"public",description:"Whether this object should automatically respond to scroll. Set this to **false** while manually controlling `videoPercentage` prop.",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"lockScroll",visibility:"public",description:"Whether it ignores human scroll while it runs setVideoPercentage with enabled trackScroll",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"useWebCodecs",visibility:"public",description:"Whether the library should use the webcodecs method. For more info, visit https://scrollyvideo.js.org/",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"onReady",visibility:"public",description:"The callback when it's ready to scroll",keywords:[],kind:"let",type:{kind:"function",text:"() => void"},static:!1,readonly:!1,defaultValue:"..."},{name:"onChange",visibility:"public",description:"The callback for video percentage change",keywords:[],kind:"let",type:{kind:"function",text:"() => void"},static:!1,readonly:!1,defaultValue:"..."},{name:"debug",visibility:"public",description:"Whether to log debug information. Internal library logs.",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"showDebugInfo",visibility:"public",description:"Shows debug information on page",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1,defaultValue:"false"},{name:"height",visibility:"public",description:"Height of the video container. Set it to 100lvh when using inside `ScrollerBase`",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'"200lvh"'},{name:"autoplay",visibility:"public",description:"Whether the video should autoplay",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1},{name:"embedded",visibility:"public",description:"Variable to control component rendering on embed page",keywords:[],kind:"let",type:{kind:"type",type:"boolean",text:"boolean"},static:!1,readonly:!1,defaultValue:"false"},{name:"embeddedProps",visibility:"public",description:"Additional properties for embedded videos",keywords:[],kind:"let",type:{kind:"type",type:"object",text:"{ threshold?: number | undefined; duration?: number | undefined; delay?: number | undefined; }"},static:!1,readonly:!1},{name:"children",visibility:"public",description:"Children render function",keywords:[],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1}],name:"ScrollerVideo.svelte"};const Re=""+new URL("goldengate-BC8kEOSV.mp4",import.meta.url).href;var Ti=V('<div class="step-foreground-container svelte-19fg54d"><h3 class="text-center svelte-19fg54d">Step 1</h3></div> <div class="step-foreground-container svelte-19fg54d"><h3 class="text-center svelte-19fg54d">Step 2</h3></div> <div class="step-foreground-container svelte-19fg54d"><h3 class="text-center svelte-19fg54d">Step 3</h3></div>',1);function bt(p){let a=fA(0);gt(p,{query:"div.step-foreground-container",visible:!0,get progress(){return m(a)},set progress(U){$(a,U,!0)},backgroundSnippet:U=>{{let w=vA(()=>Math.min(1,Math.max(m(a),0)));lA(U,{get src(){return Re},height:"100lvh",trackScroll:!1,get videoPercentage(){return m(w)},transitionSpeed:20,showDebugInfo:!0})}},foregroundSnippet:U=>{var w=Ti();M(U,w)},$$slots:{backgroundSnippet:!0,foregroundSnippet:!0}})}bt.__docgen={version:3,name:"WithScrollerBase.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};var ki=V("<div><!></div>"),Ci=V('<div class="scroller-video-foreground-item svelte-1mm8qho"><!></div>'),Pi=V('<div class="scroller-video-foreground-item svelte-1mm8qho"><!></div>'),Ii=V('<div class="scroller-foreground svelte-1mm8qho"><!></div>');function Ae(p,a){YA(a,!0);let h=sA(a,"id",3,""),o=sA(a,"class",3,""),U=sA(a,"startTime",3,0),w=sA(a,"endTime",3,1),u=sA(a,"backgroundColour",3,"#000"),s=sA(a,"width",3,"normal"),T=sA(a,"position",3,"center center"),P=Ht("scrollerVideoState");{let z=vA(()=>`scroller-video-foreground ${o()}`);ae(p,{get class(){return m(z)},get id(){return h()},children:(D,O)=>{var _=dA(),c=AA(_);{var C=A=>{var e=Ii(),t=R(e);{var r=l=>{ae(l,{get class(){return`scroller-video-foreground-text ${T().split(" ")[1]??""}`},get width(){return s()},children:(d,f)=>{var v=ki(),g=R(v);Wt(g,{get source(){return a.text}}),q(b=>{K(v,`background-color: ${u()??""};`),Ee(v,1,`foreground-text ${b??""}`,"svelte-1mm8qho")},[()=>T().split(" ")[0]]),M(d,v)},$$slots:{default:!0}})},n=l=>{var d=dA(),f=AA(d);{var v=b=>{var k=Ci(),L=R(k);ut(L,()=>a.children),M(b,k)},g=b=>{var k=dA(),L=AA(k);{var I=N=>{var Y=Pi(),rA=R(Y);ae(rA,{width:"fluid",children:(oA,tA)=>{var X=dA(),eA=AA(X);Vt(eA,()=>a.Foreground,(pA,WA)=>{WA(pA,{})}),M(oA,X)},$$slots:{default:!0}}),M(N,Y)};W(L,N=>{a.Foreground&&N(I)},!0)}M(b,k)};W(f,b=>{a.children?b(v):b(g,!1)},!0)}M(l,d)};W(t,l=>{a.text?l(r):l(n,!1)})}Ve(1,e,()=>Ge,()=>({delay:100,duration:200})),Ve(2,e,()=>Ge,()=>({delay:0,duration:100})),M(A,e)};W(c,A=>{P.generalData.currentTime>=U()&&P.generalData.currentTime<=w()&&A(C)})}M(D,_)},$$slots:{default:!0}})}jA()}Ae.__docgen={data:[{name:"id",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'""'},{name:"class",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"startTime",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"number",text:"number"},static:!1,readonly:!1,defaultValue:"0"},{name:"endTime",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"number",text:"number"},static:!1,readonly:!1,defaultValue:"1"},{name:"children",visibility:"public",keywords:[],kind:"let",type:{kind:"function",text:"Snippet<[]>"},static:!1,readonly:!1},{name:"backgroundColour",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'"#000"'},{name:"width",visibility:"public",keywords:[],kind:"let",type:{kind:"union",type:[{kind:"const",type:"string",value:"narrower",text:'"narrower"'},{kind:"const",type:"string",value:"narrow",text:'"narrow"'},{kind:"const",type:"string",value:"normal",text:'"normal"'},{kind:"const",type:"string",value:"wide",text:'"wide"'},{kind:"const",type:"string",value:"wider",text:'"wider"'},{kind:"const",type:"string",value:"widest",text:'"widest"'},{kind:"const",type:"string",value:"fluid",text:'"fluid"'}],text:'"narrower" | "narrow" | "normal" | "wide" | "wider" | "widest" | "fluid"'},static:!1,readonly:!1,defaultValue:'"normal"'},{name:"position",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1,defaultValue:'"center center"'},{name:"text",visibility:"public",keywords:[],kind:"let",type:{kind:"type",type:"string",text:"string"},static:!1,readonly:!1},{name:"Foreground",visibility:"public",keywords:[],kind:"let",type:{kind:"function",text:"Component<{}, {}, string>"},static:!1,readonly:!1}],name:"ScrollerVideoForeground.svelte"};const wt=""+new URL("waves_sm-B7mppXQh.mp4",import.meta.url).href,xt=""+new URL("waves_md-5l9I9Yj0.mp4",import.meta.url).href,St=""+new URL("waves_lg-8KxF9jEW.mp4",import.meta.url).href,Fi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApQAAATYCAYAAAChhVcRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADhpJREFUeNrs3UFxwlAUhlGmBoqESEBCJEQCEiIBB0hAQiREAhKQgISUNwT6YJom92XV6Tkz3bRd3dU3JP272QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXJgvAgwA5sFX24igziYAAAAASUVORK5CYII=",at=""+new URL("annotation1-md-ZgX6URMF.png",import.meta.url).href,Li=""+new URL("annotation1-xl-CUHrsFtD.png",import.meta.url).href;var Di=V(`<div id="g-annotation1-xs" class="g-artboard svelte-pen419" style=""><div style="padding: 0 0 187.8788% 0;"></div> <div id="g-annotation1-xs-img" class="g-aiImg svelte-pen419"></div> <div id="g-ai0-1" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:16.5284%;margin-top:-8.5px;left:31.2%;width:166px;"><p class="g-pstyle0 svelte-pen419">Solid southwest swell</p></div> <div id="g-ai0-2" class="g-text g-aiAbs svelte-pen419" style="top:56.9355%;left:20.6061%;width:60.303%;"><p class="svelte-pen419">Tahitian local Vahine Fierro drops into a double overhead wave during
|
|
a recentcompetition. Timing and position are critical to make the
|
|
take-off and maximize scoring</p> <p class="svelte-pen419"></p> <p class="svelte-pen419"> </p></div> <div id="g-ai0-3" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:85.9639%;margin-top:-17px;left:12.7641%;width:156px;"><p class="g-pstyle1 svelte-pen419">Shallow water hides</p> <p class="g-pstyle1 svelte-pen419">a sharp reef</p></div></div>`),Ri=V('<div id="g-annotation1-sm" class="g-artboard svelte-pen419" style=""><div style="padding: 0 0 56.2745% 0;"></div> <div id="g-annotation1-sm-img" class="g-aiImg svelte-pen419"></div> <div id="g-ai1-1" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:18.807%;margin-top:-17px;left:20.9079%;width:247px;"><p class="g-pstyle0 svelte-pen419">Wave forms from hitting reef, and</p> <p class="g-pstyle0 svelte-pen419">tube will track the line of the shelf</p></div> <div id="g-ai1-2" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:24.9046%;margin-top:-8.5px;left:69.9921%;width:166px;"><p class="g-pstyle1 svelte-pen419">Solid southwest swell</p></div> <div id="g-ai1-3" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:81.8732%;margin-top:-57px;left:39.9944%;width:321px;"><p class="g-pstyle0 svelte-pen419">Tahitian local Vahine Fierro drops into</p> <p class="g-pstyle0 svelte-pen419">a double overhead wave during a recent</p> <p class="g-pstyle0 svelte-pen419">competition. Timing and position are critical</p> <p class="g-pstyle0 svelte-pen419">to make the take-off and maximize scoring</p> <p class="g-pstyle0 svelte-pen419"></p> <p class="svelte-pen419"> </p></div> <div id="g-ai1-4" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:81.5248%;margin-top:-17px;left:6.6905%;width:156px;"><p class="g-pstyle0 svelte-pen419">Shallow water hides</p> <p class="g-pstyle0 svelte-pen419">a sharp reef</p></div></div>'),Mi=V('<div id="g-annotation1-md" class="g-artboard svelte-pen419" style=""><div style="padding: 0 0 56.3636% 0;"></div> <div id="g-annotation1-md-img" class="g-aiImg svelte-pen419"></div> <div id="g-ai2-1" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:19.0796%;margin-top:-17px;left:20.696%;width:247px;"><p class="g-pstyle0 svelte-pen419">Wave forms from hitting reef, and</p> <p class="g-pstyle0 svelte-pen419">tube will track the line of the shelf</p></div> <div id="g-ai2-2" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:21.6334%;margin-top:-7.5px;left:70.3415%;width:166px;"><p class="g-pstyle1 svelte-pen419">Solid southwest swell</p></div> <div id="g-ai2-3" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:66.6602%;margin-top:-57px;left:48.1533%;width:321px;"><p class="g-pstyle0 svelte-pen419">Tahitian local Vahine Fierro drops into</p> <p class="g-pstyle0 svelte-pen419">a double overhead wave during a recent</p> <p class="g-pstyle0 svelte-pen419">competition. Timing and position are critical</p> <p class="g-pstyle0 svelte-pen419">to make the take-off and maximize scoring</p> <p class="g-pstyle0 svelte-pen419"></p> <p class="svelte-pen419"> </p></div> <div id="g-ai2-4" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:81.714%;margin-top:-17px;left:17.2641%;width:156px;"><p class="g-pstyle0 svelte-pen419">Shallow water hides</p> <p class="g-pstyle0 svelte-pen419">a sharp reef</p></div></div>'),Oi=V('<div id="g-annotation1-lg" class="g-artboard svelte-pen419" style=""><div style="padding: 0 0 56.0215% 0;"></div> <div id="g-annotation1-lg-img" class="g-aiImg svelte-pen419"></div> <div id="g-ai3-1" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:18.3754%;margin-top:-19.7px;left:20.5759%;width:247px;"><p class="g-pstyle0 svelte-pen419">Wave forms from hitting reef, and</p> <p class="g-pstyle0 svelte-pen419">tube will track the line of the shelf</p></div> <div id="g-ai3-2" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:25.2353%;margin-top:-10.5px;left:73.3785%;width:166px;"><p class="g-pstyle0 svelte-pen419">Solid southwest swell</p></div> <div id="g-ai3-3" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:65.458%;margin-top:-66px;left:46.9484%;width:321px;"><p class="g-pstyle0 svelte-pen419">Tahitian local Vahine Fierro drops into</p> <p class="g-pstyle0 svelte-pen419">a double overhead wave during a recent</p> <p class="g-pstyle0 svelte-pen419">competition. Timing and position are critical</p> <p class="g-pstyle0 svelte-pen419">to make the take-off and maximize scoring</p> <p class="g-pstyle0 svelte-pen419"></p> <p class="svelte-pen419"> </p></div> <div id="g-ai3-4" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:80.1797%;margin-top:-19.7px;left:17.5746%;width:156px;"><p class="g-pstyle0 svelte-pen419">Shallow water hides</p> <p class="g-pstyle0 svelte-pen419">a sharp reef</p></div></div>'),Ni=V(`<div id="g-annotation1-xl" class="g-artboard svelte-pen419" style=""><div style="padding: 0 0 51.6667% 0;"></div> <div id="g-annotation1-xl-img" class="g-aiImg svelte-pen419"></div> <div id="g-ai4-1" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:20.0355%;margin-top:-25.2px;left:20.6647%;width:304px;"><p class="g-pstyle0 svelte-pen419">Wave forms from hitting reef, and</p> <p class="g-pstyle0 svelte-pen419">tube will track the line of the shelf</p></div> <div id="g-ai4-2" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:27.6162%;margin-top:-13.2px;left:81.5814%;width:202px;"><p class="g-pstyle0 svelte-pen419">Solid southwest swell</p></div> <div id="g-ai4-3" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:63.1%;margin-top:-85.2px;left:47.4753%;width:396px;"><p class="g-pstyle0 svelte-pen419">Tahitian local Vahine Fierro drops into</p> <p class="g-pstyle0 svelte-pen419">a double overhead wave during a recent</p> <p class="g-pstyle0 svelte-pen419">competition. Timing and position are critical</p> <p class="g-pstyle0 svelte-pen419">to make the take-off and maximize scoring</p> <p class="g-pstyle0 svelte-pen419"></p> <p class="svelte-pen419"> </p></div> <div id="g-ai4-4" class="g-text g-aiAbs g-aiPointText svelte-pen419" style="top:94.0678%;margin-top:-25.2px;left:20.5662%;width:189px;"><p class="g-pstyle0 svelte-pen419">Shallow water hides</p> <p class="g-
|
|
pstyle0 svelte-pen419">a sharp reef</p></div></div>`),Hi=V('<div id="g-annotation1-box" class="svelte-pen419"><!> <!> <!> <!> <!></div>');function Ut(p){let a=pe(null);var h=Hi(),o=R(h);{var U=_=>{var c=Di(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Fi});`)),M(_,c)};W(o,_=>{m(a)&&m(a)>=0&&m(a)<510&&_(U)})}var w=F(o,2);{var u=_=>{var c=Ri(),C=F(R(c),2);q(()=>K(C,`background-image: url(${zi});`)),M(_,c)};W(w,_=>{m(a)&&m(a)>=510&&m(a)<660&&_(u)})}var s=F(w,2);{var T=_=>{var c=Mi(),C=F(R(c),2);q(()=>K(C,`background-image: url(${at});`)),M(_,c)};W(s,_=>{m(a)&&m(a)>=660&&m(a)<930&&_(T)})}var P=F(s,2);{var z=_=>{var c=Oi(),C=F(R(c),2);q(()=>K(C,`background-image: url(${at});`)),M(_,c)};W(P,_=>{m(a)&&m(a)>=930&&m(a)<1200&&_(z)})}var D=F(P,2);{var O=_=>{var c=Ni(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Li});`)),M(_,c)};W(D,_=>{m(a)&&m(a)>=1200&&_(O)})}ee(h,"clientWidth",_=>$(a,_)),M(p,h)}Ut.__docgen={version:3,name:"annotation1.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const Vi=""+new URL("annotation2-xs-AmjH-66U.png",import.meta.url).href,Gi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA/wAAAI+CAYAAAAB9gHwAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACPdJREFUeNrswTEBAAAAwqD1T20LL6AAAAA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ko8v.png",import.meta.url).href,Yi=""+new URL("annotation2-xl-TNtxwNHv.png",import.meta.url).href;var ji=V(`<div id="g-annotation2-xs" class="g-artboard svelte-101hc9u" style=""><div style="padding: 0 0 187.8788% 0;"></div> <div id="g-annotation2-xs-img" class="g-aiImg svelte-101hc9u"></div> <div id="g-ai0-1" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:9.0284%;margin-top:-41px;left:17.9779%;width:219px;"><p class="g-pstyle0 svelte-101hc9u">The wave at Teahupo'o is</p> <p class="g-pstyle0 svelte-101hc9u">known to be very heavy</p> <p class="g-pstyle0 svelte-101hc9u">with a thick lip that can</p> <p class="g-pstyle0 svelte-101hc9u">easily knock a surfer off the</p> <p class="g-pstyle0 svelte-101hc9u">wave and onto the reef below</p></div> <div id="g-ai0-2" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:68.8671%;margin-top:-25px;left:12.9181%;width:144px;"><p class="g-pstyle0 svelte-101hc9u">Surfer speed is up</p> <p class="g-pstyle0 svelte-101hc9u">to 35 km per hour</p> <p class="g-pstyle0 svelte-101hc9u">(20 mph)</p></div> <div id="g-ai0-3" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:68.8671%;margin-top:-25px;left:62.8912%;width:149px;"><p class="g-pstyle0 svelte-101hc9u">One cubic meter</p> <p class="g-pstyle0 svelte-101hc9u">of water weighs</p> <p class="g-pstyle0 svelte-101hc9u">1,000 kg. (2,200 lb)</p></div> <div id="g-ai0-4" class="g-text g-aiAbs svelte-101hc9u" style="top:78.7097%;left:17.9779%;width:59.0909%;"><p class="svelte-101hc9u">A surfer will adjust speed to stay in the tube by dragging a hand to
|
|
slow, or pumping the board to speed up</p></div></div>`),Wi=V('<div id="g-annotation2-sm" class="g-artboard svelte-101hc9u" style=""><div style="padding: 0 0 56.2745% 0;"></div> <div id="g-annotation2-sm-img" class="g-aiImg svelte-101hc9u"></div></div>'),Qi=V(`<div id="g-annotation2-md" class="g-artboard svelte-101hc9u" style=""><div style="padding: 0 0 56.3636% 0;"></div> <div id="g-annotation2-md-img" class="g-aiImg svelte-101hc9u"></div> <div id="g-ai2-1" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:23.9183%;margin-top:-41px;left:67.1629%;width:219px;"><p class="g-pstyle0 svelte-101hc9u">The wave at Teahupo'o is</p> <p class="g-pstyle0 svelte-101hc9u">known to be very heavy</p> <p class="g-pstyle0 svelte-101hc9u">with a thick lip that can</p> <p class="g-pstyle0 svelte-101hc9u">easily knock a surfer off the</p> <p class="g-pstyle0 svelte-101hc9u">wave and onto the reef below</p></div> <div id="g-ai2-2" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:65.585%;margin-top:-17px;left:51.2917%;width:189px;"><p class="g-pstyle0 svelte-101hc9u">Surfer speed is up to</p> <p class="g-pstyle0 svelte-101hc9u">35 km per hour (20 mph)</p></div> <div id="g-ai2-3" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:74.4559%;margin-top:-25px;left:5.9007%;width:263px;"><p class="g-pstyle0 svelte-101hc9u">A surfer will adjust speed to stay in</p> <p class="g-pstyle0 svelte-101hc9u">the tube by dragging a hand to slow,</p> <p class="g-pstyle0 svelte-101hc9u">or pumping the board to speed up</p></div> <div id="g-ai2-4" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:79.5635%;margin-top:-17px;left:70.1381%;width:199px;"><p class="g-pstyle0 svelte-101hc9u">One cubic meter of water</p> <p class="g-pstyle0 svelte-101hc9u">weighs 1,000 kg. (2,200 lb)</p></div></div>`),qi=V(`<div id="g-annotation2-lg" class="g-artboard svelte-101hc9u" style=""><div style="padding: 0 0 56.0215% 0;"></div> <div id="g-annotation2-lg-img" class="g-aiImg svelte-101hc9u"></div> <div id="g-ai3-1" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:22.7846%;margin-top:-47.7px;left:73.261%;width:219px;"><p class="g-pstyle0 svelte-101hc9u">The wave at Teahupo'o is</p> <p class="g-pstyle0 svelte-101hc9u">known to be very heavy</p> <p class="g-pstyle0 svelte-101hc9u">with a thick lip that can</p> <p class="g-pstyle0 svelte-101hc9u">easily knock a surfer off the</p> <p class="g-pstyle0 svelte-101hc9u">wave and onto the reef below</p></div> <div id="g-ai3-2" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:22.7846%;margin-top:-47.7px;left:73.261%;width:219px;"><p class="g-pstyle0 svelte-101hc9u">The wave at Teahupo'o is</p> <p class="g-pstyle0 svelte-101hc9u">known to be very heavy</p> <p class="g-pstyle0 svelte-101hc9u">with a thick lip that can</p> <p class="g-pstyle0 svelte-101hc9u">easily knock a surfer off the</p> <p class="g-pstyle0 svelte-101hc9u">wave and onto the reef below</p></div> <div id="g-ai3-3" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:61.187%;margin-top:-19.8px;left:54.1451%;width:189px;"><p class="g-pstyle0 svelte-101hc9u">Surfer speed is up to</p> <p class="g-pstyle0 svelte-101hc9u">35 km per hour (20 mph)</p></div> <div id="g-ai3-4" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:61.187%;margin-top:-19.8px;left:54.1451%;width:189px;"><p class="g-pstyle0 svelte-101hc9u">Surfer speed is up to</p> <p class="g-pstyle0 svelte-101hc9u">35 km per hour (20 mph)</p></div> <div id="g-ai3-5" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:72.3786%;margin-top:-29.1px;left:22.2898%;width:263px;"><p class="g-pstyle0 svelte-101hc9u">A surfer will adjust speed to stay in</p> <p class="g-pstyle0 svelte-101hc9u">the tube by dragging a hand to slow,</p> <p class="g-pstyle0 svelte-101hc9u">or pumping the board to speed up</p></div> <div id="g-ai3-6" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:72.3786%;margin-top:-29.1px;left:22.2898%;width:263px;"><p class="g-pstyle0 svelte-101hc9u">A surfer will adjust speed to stay in</p> <p class="g-pstyle0 svelte-101hc9u">the tube by dragging a hand to slow,</p> <p class="g-pstyle0 svelte-101hc9u">or pumping the board to speed up</p></div> <div id="g-ai3-7" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:79.6131%;margin-top:-19.8px;left:76.246%;width:199px;"><p class="g-pstyle0 svelte-101hc9u">One cubic meter of water</p> <p class="g-pstyle0 svelte-101hc9u">weighs 1,000 kg. (2,200 lb)</p></div> <div id="g-ai3-8" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:79.6131%;margin-top:-19.8px;left:76.246%;width:199px;"><p class="g-pstyle0 svelte-101hc9u">One cubic meter of water</p> <p class="g-pstyle0 svelte-101hc9u">weighs 1,000 kg. (2,200 lb)</p></div></div>`),Ki=V(`<div id="g-annotation2-xl" class="g-artboard svelte-101hc9u" style=""><div style="padding: 0 0 51.6667% 0;"></div> <div id="g-annotation2-xl-img" class="g-aiImg svelte-101hc9u"></div> <div id="g-ai4-1" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:23.2613%;margin-top:-61.2px;left:79.2253%;width:268px;"><p class="g-pstyle0 svelte-101hc9u">The wave at Teahupo'o is</p> <p class="g-pstyle0 svelte-101hc9u">known to be very heavy</p> <p class="g-pstyle0 svelte-101hc9u">with a thick lip that can</p> <p class="g-pstyle0 svelte-101hc9u">easily knock a surfer off the</p> <p class="g-pstyle0 svelte-101hc9u">wave and onto the reef below</p></div> <div id="g-ai4-2" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:65.3581%;margin-top:-25.2px;left:54.3241%;width:230px;"><p class="g-pstyle0 svelte-101hc9u">Surfer speed is up to</p> <p class="g-pstyle0 svelte-101hc9u">35 km per hour (20 mph)</p></div> <div id="g-ai4-3" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:76.3258%;margin-top:-37.2px;left:22.0662%;width:323px;"><p class="g-pstyle0 svelte-101hc9u">A surfer will adjust speed to stay in</p> <p class="g-pstyle0 svelte-101hc9u">the tube by dragging a hand to slow,</p> <p class="g-pstyle0 svelte-101hc9u">or pumping the board to speed up</p></div> <div id="g-ai4-4" class="g-text g-aiAbs g-aiPointText svelte-101hc9u" style="top:83.2613%;
|
|
margin-top:-25.2px;left:81.2408%;width:243px;"><p class="g-pstyle0 svelte-101hc9u">One cubic meter of water</p> <p class="g-pstyle0 svelte-101hc9u">weighs 1,000 kg. (2,200 lb)</p></div></div>`),Xi=V('<div id="g-annotation2-box" class="svelte-101hc9u"><!> <!> <!> <!> <!></div>');function Et(p){let a=pe(null);var h=Xi(),o=R(h);{var U=_=>{var c=ji(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Vi});`)),M(_,c)};W(o,_=>{m(a)&&m(a)>=0&&m(a)<510&&_(U)})}var w=F(o,2);{var u=_=>{var c=Wi(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Gi});`)),M(_,c)};W(w,_=>{m(a)&&m(a)>=510&&m(a)<660&&_(u)})}var s=F(w,2);{var T=_=>{var c=Qi(),C=F(R(c),2);q(()=>K(C,`background-image: url(${ot});`)),M(_,c)};W(s,_=>{m(a)&&m(a)>=660&&m(a)<930&&_(T)})}var P=F(s,2);{var z=_=>{var c=qi(),C=F(R(c),2);q(()=>K(C,`background-image: url(${ot});`)),M(_,c)};W(P,_=>{m(a)&&m(a)>=930&&m(a)<1200&&_(z)})}var D=F(P,2);{var O=_=>{var c=Ki(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Yi});`)),M(_,c)};W(D,_=>{m(a)&&m(a)>=1200&&_(O)})}ee(h,"clientWidth",_=>$(a,_)),M(p,h)}Et.__docgen={version:3,name:"annotation2.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const Zi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAApQAAATYCAYAAAChhVcRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADH9JREFUeNrswTEBAAAAwqD1T20Gf6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHyZAAMA910AAZt4cXAAAAAASUVORK5CYII=",$i=""+new URL("annotation3-xl-BhB6_sbQ.png",import.meta.url).href;var As=V(`<div id="g-annotation3-xs" class="g-artboard svelte-kjto9m" style=""><div style="padding: 0 0 187.8788% 0;"></div> <div id="g-annotation3-xs-img" class="g-aiImg svelte-kjto9m"></div> <div id="g-ai0-1" class="g-text g-aiAbs svelte-kjto9m" style="top:9.8387%;left:19.697%;width:65.4545%;"><p class="svelte-kjto9m">Fierro is envelopedin the barrel for over two seconds, which is a long
|
|
time in such an unstable environment</p></div> <div id="g-ai0-2" class="g-text g-aiAbs svelte-kjto9m" style="top:72.2581%;left:20.303%;width:61.2121%;"><p class="svelte-kjto9m">In comptitions, more points are scored for being deep inside a barrel
|
|
which raises the chance the wave will close out on top of them.</p></div></div>`),es=V(`<div id="g-annotation3-sm" class="g-artboard svelte-kjto9m" style=""><div style="padding: 0 0 56.2745% 0;"></div> <div id="g-annotation3-sm-img" class="g-aiImg svelte-kjto9m"></div> <div id="g-ai1-1" class="g-text g-aiAbs svelte-kjto9m" style="top:1.7422%;left:46.7588%;width:51.1765%;"><p class="svelte-kjto9m">Fierro is envelopedin the barrel for over two seconds, which is a long
|
|
time in such an unstable environment</p></div> <div id="g-ai1-2" class="g-text g-aiAbs svelte-kjto9m" style="top:33.4495%;left:66.1788%;width:29.8039%;"><p class="svelte-kjto9m">Surfers often say time distorts inside the barrel, slowing down and
|
|
that the crashing wave noise falls silent, asthey expereince a sense
|
|
of awe</p></div> <div id="g-ai1-3" class="g-text g-aiAbs svelte-kjto9m" style="top:72.8223%;left:13.3333%;width:48.2353%;"><p class="svelte-kjto9m">In comptitions, more points are scored for being deep inside a barrel
|
|
which raises the chance the wave will close out on top of them.</p></div></div>`),ts=V(`<div id="g-annotation3-md" class="g-artboard svelte-kjto9m" style=""><div style="padding: 0 0 56.3636% 0;"></div> <div id="g-annotation3-md-img" class="g-aiImg svelte-kjto9m"></div> <div id="g-ai2-1" class="g-text g-aiAbs svelte-kjto9m" style="top:7.7957%;left:58.355%;width:28.0303%;"><p class="svelte-kjto9m">Fierro is envelopedin the barrel for over two seconds, which is a long
|
|
time in such an unstable environment</p></div> <div id="g-ai2-2" class="g-text g-aiAbs svelte-kjto9m" style="top:45.9677%;left:69.837%;width:26.5152%;"><p class="svelte-kjto9m">Surfers often say time distorts inside the barrel, slowing down and
|
|
that the crashing wave noise falls silent, as they expereince a sense
|
|
of awe</p></div> <div id="g-ai2-3" class="g-text g-aiAbs svelte-kjto9m" style="top:72.3118%;left:31.3158%;width:28.6364%;"><p class="svelte-kjto9m">In comptitions, more points are scored for being deep inside a barrel
|
|
which raises the chance the wave will close out on top of them.</p></div></div>`),is=V(`<div id="g-annotation3-lg" class="g-artboard svelte-kjto9m" style=""><div style="padding: 0 0 56.0215% 0;"></div> <div id="g-annotation3-lg-img" class="g-aiImg svelte-kjto9m"></div> <div id="g-ai3-1" class="g-text g-aiAbs svelte-kjto9m" style="top:16.8906%;left:70.7526%;width:20.7527%;"><p class="svelte-kjto9m">Fierro is envelopedin the barrel for over two seconds, which is a long
|
|
time in such an unstable environment</p></div> <div id="g-ai3-2" class="g-text g-aiAbs svelte-kjto9m" style="top:51.4395%;left:68.4341%;width:26.9892%;"><p class="svelte-kjto9m">Surfers often say time distorts inside the barrel, slowing down and
|
|
that the crashing wave noise falls silent, as they expereince a sense
|
|
of awe</p></div> <div id="g-ai3-3" class="g-text g-aiAbs svelte-kjto9m" style="top:68.5221%;left:38.9959%;width:25.2688%;"><p class="svelte-kjto9m">In comptitions, more points are scored for being deep inside a barrel
|
|
which raises the chance the wave will close out on top of them.</p></div></div>`),ss=V(`<div id="g-annotation3-xl" class="g-artboard svelte-kjto9m" style=""><div style="padding: 0 0 51.6667% 0;"></div> <div id="g-annotation3-xl-img" class="g-aiImg svelte-kjto9m"></div> <div id="g-ai4-1" class="g-text g-aiAbs svelte-kjto9m" style="top:18.0645%;left:70.725%;width:20.6667%;"><p class="svelte-kjto9m">Fierro is envelopedin the barrel for over two seconds, which is a long
|
|
time in such an unstable environment</p></div> <div id="g-ai4-2" class="g-text g-aiAbs svelte-kjto9m" style="top:NaN%;left:5.7255%;width:0.1667%;"><p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">Fierro is enveloped</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">in the barrel for over</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">2 seconds, which is a</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">long time in such an</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">unstable environment</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">Surfers often say time distorts inside</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">the barrel, slowing down and that the</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">crashing wave noise falls silent, as</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">they expereince a sense of awe</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">In comptitions, more points are</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">scored for being deep inside a</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">barrel which raises the chance</p> <p class="svelte-kjto9m"> </p> <p class="g-pstyle0 svelte-kjto9m">the wave will close out on top of them.</p></div> <div id="g-ai4-3" class="g-text g-aiAbs svelte-kjto9m" style="top:55.4839%;left:68.4081%;width:26.0833%;"><p class="svelte-kjto9m">Surfers often say time distorts inside the barrel, slowing down and
|
|
that the crashing wave noise falls silent, as they expereince a sense
|
|
of awe</p></div> <div id="g-ai4-4" class="g-text g-aiAbs svelte-kjto9m" style="top:73.871%;left:38.9915%;width:24.6667%;"><p class="svelte-kjto9m">In comptitions, more points are scored for being deep inside a barrel
|
|
which raises the chance the wave will close out on top of them.</p></div></div>`),rs=V('<div id="g-annotation3-box" class="svelte-kjto9m"><!> <!> <!> <!> <!></div>');function Bt(p){let a=pe(null);var h=rs(),o=R(h);{var U=_=>{var c=As(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Zi});`)),M(_,c)};W(o,_=>{m(a)&&m(a)>=0&&m(a)<510&&_(U)})}var w=F(o,2);{var u=_=>{var c=es(),C=F(R(c),2);q(()=>K(C,`background-image: url(${Ji});`)),M(_,c)};W(w,_=>{m(a)&&m(a)>=510&&m(a)<660&&_(u)})}var s=F(w,2);{var T=_=>{var c=ts(),C=F(R(c),2);q(()=>K(C,`background-image: url(${lt});`)),M(_,c)};W(s,_=>{m(a)&&m(a)>=660&&m(a)<930&&_(T)})}var P=F(s,2);{var z=_=>{var c=is(),C=F(R(c),2);q(()=>K(C,`background-image: url(${lt});`)),M(_,c)};W(P,_=>{m(a)&&m(a)>=930&&m(a)<1200&&_(z)})}var D=F(P,2);{var O=_=>{var c=ss(),C=F(R(c),2);q(()=>K(C,`background-image: url(${$i});`)),M(_,c)};W(D,_=>{m(a)&&m(a)>=1200&&_(O)})}ee(h,"clientWidth",_=>$(a,_)),M(p,h)}Bt.__docgen={version:3,name:"annotation3.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const ns=""+new URL("annotation4-xs-_adHP7to.png",import.meta.url).href,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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgHD+EmAAAymabZXKBs8AAAAASUVORK5CYII=",dt=""+new URL("annotation4-md-BrNAb9Rg.png",import.meta.url).href,os=""+new URL("annotation4-xl-B0riQESf.png",import.meta.url).href;var ls=V(`<div id="g-annotation4-xs" class="g-artboard svelte-duzc63" style=""><div style="padding: 0 0 187.8788% 0;"></div> <div id="g-annotation4-xs-img" class="g-aiImg svelte-duzc63"></div> <div id="g-ai0-1" class="g-text g-aiAbs svelte-duzc63" style="top:9.5161%;left:16.1999%;width:61.5152%;"><p class="svelte-duzc63">The wave path is a short one, only about 100 yards long</p></div> <div id="g-ai0-2" class="g-text g-aiAbs svelte-duzc63" style="top:73.871%;left:16.1999%;width:61.5152%;"><p class="svelte-duzc63">Fierro exits the barrel with a score of 9.33 out of 10, as she was
|
|
deep in the tube, had good speed and went over the foam ball on her
|
|
exit</p></div></div>`),ds=V(`<div id="g-annotation4-sm" class="g-artboard svelte-duzc63" style=""><div style="padding: 0 0 56.2745% 0;"></div> <div id="g-annotation4-sm-img" class="g-aiImg svelte-duzc63"></div> <div id="g-ai1-1" class="g-text g-aiAbs svelte-duzc63" style="top:8.3624%;left:8.9136%;width:39.8039%;"><p class="svelte-duzc63">The wave path is a short one, only about 100 yards long</p></div> <div id="g-ai1-2" class="g-text g-aiAbs svelte-duzc63" style="top:34.8432%;left:62.1168%;width:32.3529%;"><p class="svelte-duzc63">Fierro exits the barrel with a score of 9.33 out of 10, as she was
|
|
deep in the tube, had good speed and went over the foam ball on her
|
|
exit</p></div> <div id="g-ai1-3" class="g-text g-aiAbs svelte-duzc63" style="top:68.9895%;left:9.1341%;width:47.2549%;"><p class="svelte-duzc63">The wave heaves so quickly that as it forms, it pulls water off the
|
|
reef, creating a ride that is often below sea level - seen as the
|
|
surfer exits up and over the wave to higher water</p></div></div>`),hs=V(`<div id="g-annotation4-md" class="g-artboard svelte-duzc63" style=""><div style="padding: 0 0 56.3636% 0;"></div> <div id="g-annotation4-md-img" class="g-aiImg svelte-duzc63"></div> <div id="g-ai2-1" class="g-text g-aiAbs svelte-duzc63" style="top:9.6774%;left:17.6103%;width:30%;"><p class="svelte-duzc63">The wave path is a short one, only about 100 yards long</p></div> <div id="g-ai2-2" class="g-text g-aiAbs svelte-duzc63" style="top:37.3656%;left:62.5253%;width:30.303%;"><p class="svelte-duzc63">Fierro exits the barrel with a score of 9.33 out of 10, as she was
|
|
deep in the tube, had good speed and went over the foam ball on her
|
|
exit</p></div> <div id="g-ai2-3" class="g-text g-aiAbs svelte-duzc63" style="top:71.2366%;left:15.8065%;width:36.8182%;"><p class="svelte-duzc63">The wave heaves so quickly that as it forms, it pulls water off the
|
|
reef, creating a ride that is often below sea level - seen as the
|
|
surfer exits up and over the wave to higher water</p></div></div>`),ps=V(`<div id="g-annotation4-lg" class="g-artboard svelte-duzc63" style=""><div style="padding: 0 0 56.0215% 0;"></div> <div id="g-annotation4-lg-img" class="g-aiImg svelte-duzc63"></div> <div id="g-ai3-1" class="g-text g-aiAbs svelte-duzc63" style="top:15.3551%;left:24.4264%;width:23.2258%;"><p class="svelte-duzc63">The wave path is a short one,</p> <p class="svelte-duzc63">only about 100 yards long</p></div> <div id="g-ai3-2" class="g-text g-aiAbs svelte-duzc63" style="top:38.5797%;left:69.5876%;width:25.3763%;"><p class="svelte-duzc63">Fierro exits the barrel with a score of 9.33 out of 10, as she was
|
|
deep in the tube, had good speed and went over the foam ball on her
|
|
exit</p></div> <div id="g-ai3-3" class="g-text g-aiAbs svelte-duzc63" style="top:77.1593%;left:30.5554%;width:26.0215%;"><p class="svelte-duzc63">The wave heaves so quickly that as it forms, it pulls water off the
|
|
reef, creating a ride that is often below sea level - seen as the
|
|
surfer exits up and over the wave to higher water</p></div></div>`),cs=V('<div id="g-annotation4-xl" class="g-artboard svelte-duzc63" style=""><div style="padding: 0 0 51.6667% 0;"></div> <div id="g-annotation4-xl-img" class="g-aiImg svelte-duzc63"></div> <div id="g-ai4-1" class="g-text g-aiAbs g-aiPointText svelte-duzc63" style="top:19.5123%;margin-top:-17px;left:27.8891%;width:218px;"><p class="g-pstyle0 svelte-duzc63">The wave path is a short one,</p> <p class="g-pstyle0 svelte-duzc63">only about 100 yards long</p></div> <div id="g-ai4-2" class="g-text g-aiAbs g-aiPointText svelte-duzc63" style="top:60.48%;margin-top:-33px;left:68.0232%;width:274px;"><p class="g-pstyle0 svelte-duzc63">Fierro exits the barrel with a score of</p> <p class="g-pstyle0 svelte-duzc63">9.33 out of 10, as she was deep in the</p> <p class="g-pstyle0 svelte-duzc63">tube, had good speed and went over</p> <p class="g-pstyle0 svelte-duzc63">the foam ball on her exit</p></div> <div id="g-ai4-3" class="g-text g-aiAbs g-aiPointText svelte-duzc63" style="top:82.5768%;margin-top:-33px;left:38.7732%;width:319px;"><p class="g-pstyle0 svelte-duzc63">The wave heaves so quickly that as it forms,</p> <p class="g-pstyle0 svelte-duzc63">it pulls water off the reef, creating a rid e that</p> <p class="g-pstyle0 svelte-duzc63">is often below sea level - seen as the surfer</p> <p class="g-pstyle0 svelte-duzc63">exits up and over the wave to higher water</p></div></div>'),fs=V('<div id="g-annotation4-box" class="svelte-duzc63"><!> <!> <!> <!> <!></div>');function Tt(p){let a=pe(null);var h=fs(),o=R(h);{var U=_=>{var c=ls(),C=F(R(c),2);q(()=>K(C,`background-image: url(${ns});`)),M(_,c)};W(o,_=>{m(a)&&m(a)>=0&&m(a)<510&&_(U)})}var w=F(o,2);{var u=_=>{var c=ds(),C=F(R(c),2);q(()=>K(C,`background-image: url(${as});`)),M(_,c)};W(w,_=>{m(a)&&m(a)>=510&&m(a)<660&&_(u)})}var s=F(w,2);{var T=_=>{var c=hs(),C=F(R(c),2);q(()=>K(C,`background-image: url(${dt});`)),M(_,c)};W(s,_=>{m(a)&&m(a)>=660&&m(a)<930&&_(T)})}var P=F(s,2);{var z=_=>{var c=ps(),C=F(R(c),2);q(()=>K(C,`background-image: url(${dt});`)),M(_,c)};W(P,_=>{m(a)&&m(a)>=930&&m(a)<1200&&_(z)})}var D=F(P,2);{var O=_=>{var c=cs(),C=F(R(c),2);q(()=>K(C,`background-image: url(${os});`)),M(_,c)};W(D,_=>{m(a)&&m(a)>=1200&&_(O)})}ee(h,"clientWidth",_=>$(a,_)),M(p,h)}Tt.__docgen={version:3,name:"annotation4.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};var us=V("<!> <!>",1);function kt(p,a){YA(a,!0);const h=(D,O=Oe,_=Oe)=>{lA(D,{get id(){return w.id},get height(){return O()},get src(){return _()},useWebCodecs:!0,showDebugInfo:!0,children:(c,C)=>{var A=us(),e=AA(A);{let r=vA(()=>parseFloat(U.startTime)),n=vA(()=>parseFloat(U.endTime));Ae(e,{get startTime(){return m(r)},get endTime(){return m(n)},children:(l,d)=>{{let f=vA(()=>new Date(U.publishTime).toISOString());Qt(l,{class:"custom-headline",get hed(){return U.hed},get authors(){return U.authors},get publishTime(){return m(f)}})}},$$slots:{default:!0}})}var t=F(e,2);Ie(t,17,()=>w.foregrounds,Fe,(r,n)=>{{let l=vA(()=>parseFloat(m(n).startTime)),d=vA(()=>parseFloat(m(n).endTime));Ae(r,{get startTime(){return m(l)},get endTime(){return m(d)},get width(){return m(n).width},get Foreground(){return o[m(n).foreground]}})}}),M(c,A)},$$slots:{default:!0}})},o={Foreground1:Ut,Foreground2:Et,Foreground3:Bt,Foreground4:Tt},U={hed:"Wind and waves",authors:["Jane Doe"],publishTime:"2020-01-01T00:00:00Z",startTime:"0",endTime:"0.3",blocks:[{type:"scroller-video",id:"surf-scroller",height:"800lvh",foregrounds:[{startTime:"0.3",endTime:"2.2",width:"fluid",foreground:"Foreground1"},{startTime:"2.2",endTime:"3.2",width:"fluid",foreground:"Foreground2"},{startTime:"3.2",endTime:"4.5",width:"fluid",foreground:"Foreground3"},{startTime:"6.5",endTime:"8",width:"fluid",foreground:"Foreground4"}]}]},w=U.blocks[0];let u=fA(1);var s=dA(),T=AA(s);{var P=D=>{h(D,()=>w.height,()=>wt)},z=D=>{var O=dA(),_=AA(O);{var c=A=>{h(A,()=>w.height,()=>xt)},C=A=>{h(A,()=>w.height,()=>St)};W(_,A=>{m(u)<1200?A(c):A(C,!1)},!0)}M(D,O)};W(T,D=>{m(u)<600?D(P):D(z,!1)})}ct("innerWidth",D=>$(u,D,!0)),M(p,s),jA()}kt.__docgen={version:3,name:"WithAi2svelteForegrounds.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const gs=""+new URL("drone-QGa52VJ6.mp4",import.meta.url).href;function Ct(p){const h={blocks:[{type:"scroller-video",id:"alps-scroller",src:"videos/alps.mp4",height:"800lvh",foregrounds:[{startTime:"0",endTime:"5",width:"normal",position:"bottom center",backgroundColour:"rgba(0, 0, 0, 0.8)",text:`#### The Alps
|
|
|
|
The Alps stretch across eight countries: France, Switzerland, Italy, Monaco, Liechtenstein, Austria, Germany, and Slovenia, covering about 1,200 kilometers (750 miles).`},{startTime:"7",endTime:"12",width:"normal",position:"bottom center",backgroundColour:"rgba(0, 0, 0, 0.8)",text:"Mont Blanc, standing at 4,809 meters (15,777 feet), is the highest peak in the Alps and Western Europe, though there's ongoing debate between France and Italy about exactly where the summit lies."},{startTime:"14",endTime:"20",width:"normal",position:"bottom center",backgroundColour:"rgba(0, 0, 0, 0.8)",text:`#### History
|
|
|
|
The Alps were formed around **65 million years** ago when the African and Eurasian tectonic plates collided, pushing the land upward. Over 14 million people live in the Alpine region, with tourism supporting approximately 120 million visitors annually.`}]}]}.blocks[0];lA(p,{get id(){return h.id},get height(){return h.height},get src(){return gs},useWebCodecs:!0,showDebugInfo:!0,children:(o,U)=>{var w=dA(),u=AA(w);Ie(u,1,()=>h.foregrounds,Fe,(s,T)=>{{let P=Ne(()=>parseFloat(m(T).startTime)),z=Ne(()=>parseFloat(m(T).endTime));Ae(s,{get startTime(){return m(P)},get endTime(){return m(z)},get width(){return m(T).width},get position(){return m(T).position},get backgroundColour(){return m(T).backgroundColour},get text(){return m(T).text}})}}),M(o,w)},$$slots:{default:!0}})}Ct.__docgen={version:3,name:"WithTextForegrounds.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};var vs=V("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function Pt(p){const a={blocks:[{type:"scroller-video",id:"goldengate-scroller",src:"../videos/goldengate.mp4",height:"200lvh",foregrounds:[{startTime:"0",endTime:"2",width:"normal",position:"bottom center",backgroundColour:"rgba(0, 0, 0, 0.8)",text:`#### Golden Gate Bridge
|
|
|
|
The Golden Gate Bridge took over 4 years to build (1933-1937) and was the longest suspension bridge in the world at the time of its completion, spanning 4,200 feet between its towers.`},{startTime:"4",endTime:"7",width:"normal",position:"bottom center",backgroundColour:"rgba(0, 0, 0, 0.8)",text:"The bridge's iconic International Orange color was chosen partly for visibility in San Francisco's frequent fog. The paint job requires constant maintenance, with a dedicated crew painting the bridge year-round to protect it from rust and corrosion."},{startTime:"8",endTime:"11",width:"normal",position:"bottom center",backgroundColour:"rgba(0, 0, 0, 0.8)",text:`#### Engineering Marvel
|
|
|
|
The Golden Gate Bridge sways up to **27 feet** sideways in strong winds and can handle winds up to 100 mph. On foggy days, the bridge can collect enough moisture to drip like rain, and it has been struck by ships only once in its history.`}]}]},h="**In embedded mode, `ScrollerVideo` behaves like a normal video player, autoplaying the video when the user scrolls onto it.**",o="Reprehenderit hamburger pork bresaola, dolore chuck sirloin landjaeger ham hock tempor meatball alcatra nostrud pork belly. Culpa pork belly doner ea jowl, elit deserunt leberkas cow shoulder ham hock dolore.",U=a.blocks[0];let w=!0;var u=vs(),s=AA(u);cA(s,{text:h});var T=F(s,2);cA(T,{text:o});var P=F(T,2);cA(P,{text:o});var z=F(P,2);cA(z,{text:o});var D=F(z,2);cA(D,{text:o});var O=F(D,2);cA(O,{text:o});var _=F(O,2);lA(_,{get src(){return Re},class:"embedded-demo",showDebugInfo:!0,embedded:w,embeddedProps:{threshold:.5,duration:12e3,delay:200},children:(n,l)=>{var d=dA(),f=AA(d);Ie(f,17,()=>U.foregrounds,Fe,(v,g)=>{{let b=vA(()=>parseFloat(m(g).startTime)),k=vA(()=>parseFloat(m(g).endTime));Ae(v,{get startTime(){return m(b)},get endTime(){return m(k)},get width(){return m(g).width},get position(){return m(g).position},get backgroundColour(){return m(g).backgroundColour},get text(){return m(g).text}})}}),M(n,d)},$$slots:{default:!0}});var c=F(_,2);cA(c,{text:o});var C=F(c,2);cA(C,{text:o});var A=F(C,2);cA(A,{text:o});var e=F(A,2);cA(e,{text:o});var t=F(e,2);cA(t,{text:o});var r=F(t,2);cA(r,{text:o}),M(p,u)}Pt.__docgen={version:3,name:"Embedded.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const _s=""+new URL("tennis-BnXXVZxy.mp4",import.meta.url).href;var ms=V('<div class="step-foreground-container svelte-14ipnfi"><h3 class="text-center svelte-14ipnfi"> </h3></div> <div class="step-foreground-container svelte-14ipnfi"><h3 class="text-center svelte-14ipnfi"> </h3></div>',1);function It(p,a){YA(a,!0);let h=fA(void 0),o=fA(0),U=fA(0);function w(){var u,s;m(U)===0?(u=m(h))==null||u.setVideoPercentage(0,{jump:!1}):(s=m(h))==null||s.setVideoPercentage(1,{jump:!1}),$(o,requestAnimationFrame(w),!0)}ft(()=>{cancelAnimationFrame(m(o))}),gt(p,{query:"div.step-foreground-container",get index(){return m(U)},set index(T){$(U,T,!0)},backgroundSnippet:T=>{lA(T,{get src(){return _s},height:"100lvh",trackScroll:!1,showDebugInfo:!0,onReady:w,get scrollerVideo(){return m(h)},set scrollerVideo(P){$(h,P,!0)}})},foregroundSnippet:T=>{var P=ms(),z=AA(P),D=R(z),O=R(D),_=F(z,2),c=R(_),C=R(c);q(()=>{uA(O,`Index ${m(U)??""}`),uA(C,`Index ${m(U)??""}`)}),M(T,P)},$$slots:{backgroundSnippet:!0,foregroundSnippet:!0}}),jA()}It.__docgen={version:3,name:"AdvancedUsecases.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const Ft={title:"Components/Graphics/ScrollerVideo",component:lA,argTypes:{autoplay:{control:"boolean",table:{defaultValue:{summary:"false"}}},class:{control:"text",table:{defaultValue:{summary:""}}},debug:{control:"boolean",table:{defaultValue:{summary:"false"}}},frameThreshold:{control:"number",table:{defaultValue:{summary:"0.1"}}},full:{control:"boolean",table:{defaultValue:{summary:"true"}}},lockScroll:{control:"boolean",table:{defaultValue:{summary:"true"}}},objectFit:{control:"select",options:["contain","cover"],table:{defaultValue:{summary:"cover"}}},onChange:{table:{type:{summary:"function"},defaultValue:{summary:"() => {}"},category:"Bindable states"}},onReady:{table:{type:{summary:"function"},defaultValue:{summary:"() => {}"},category:"Bindable states"}},scrollerVideo:{table:{category:"Bindable states"}},showDebugInfo:{control:"boolean",table:{defaultValue:{summary:"false"}}},src:{control:"text",table:{defaultValue:{summary:"https://scrollyvideo.js.org/goldengate.mp4"}}},sticky:{control:"boolean",table:{defaultValue:{summary:"true"}}},trackScroll:{control:"boolean",table:{defaultValue:{summary:"true"}}},transitionSpeed:{control:"number",table:{defaultValue:{summary:"8"}}},useWebCodecs:{control:"boolean",table:{defaultValue:{summary:"true"}}},videoPercentage:{control:"number",table:{category:"Bindable states"}}}},{Story:bA}=Yt();let Ue=fA(0);var ys=V("<!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function zt(p,a){YA(a,!0);const h={Video_SM:wt,Video_MD:xt,Video_LG:St,Goldengate:Re},o={showDebugInfo:!0};var U=ys(),w=AA(U);bA(w,{name:"Demo",children:(c,C)=>{lA(c,zA(()=>o,{get src(){return h.Goldengate}}))},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<ScrollerVideo {...args} src={videoSrc.Goldengate} />"}}});var u=F(w,2);bA(u,{name:"Object Fit",children:(c,C)=>{ae(c,{width:"normal",children:(A,e)=>{lA(A,zA(()=>o,{get src(){return h.Goldengate},objectFit:"contain"}))},$$slots:{default:!0}})},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`<Block width="normal">
|
|
<ScrollerVideo {...args} src={videoSrc.Goldengate} objectFit="contain" />
|
|
</Block>`}}});var s=F(u,2);bA(s,{name:"Responsive videos",exportName:"ResponsiveVideos",children:(c,C)=>{var A=dA(),e=AA(A);{var t=n=>{lA(n,zA(()=>o,{get src(){return h.Video_SM}}))},r=n=>{var l=dA(),d=AA(l);{var f=g=>{lA(g,zA(()=>o,{get src(){return h.Video_MD}}))},v=g=>{lA(g,zA(()=>o,{get src(){return h.Video_LG}}))};W(d,g=>{m(Ue)<1200?g(f):g(v,!1)},!0)}M(n,l)};W(e,n=>{m(Ue)<600?n(t):n(r,!1)})}M(c,A)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:`{#if width < 600}
|
|
<ScrollerVideo {...args} src={videoSrc.Video_SM} />
|
|
{:else if width < 1200}
|
|
<ScrollerVideo {...args} src={videoSrc.Video_MD} />
|
|
{:else}
|
|
<ScrollerVideo {...args} src={videoSrc.Video_LG} />
|
|
{/if}`}}});var T=F(s,2);bA(T,{name:"Embed version",exportName:"Embed",children:(c,C)=>{Pt(c)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<Embedded />"}}});var P=F(T,2);bA(P,{name:"Autoplay",children:(c,C)=>{lA(c,zA(()=>o,{get src(){return h.Goldengate},autoplay:!0}))},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<ScrollerVideo {...args} src={videoSrc.Goldengate} autoplay={true} />"}}});var z=F(P,2);bA(z,{name:"Time-based foregrounds with ArchieML",exportName:"ArchieMLForegrounds",get args(){return o},children:(c,C)=>{Ct(c)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<WithTextForegrounds />"}}});var D=F(z,2);bA(D,{name:"Time-based component foregrounds with ArchieML",exportName:"ComponentArchieMLForegrounds",get args(){return o},children:(c,C)=>{kt(c,{})},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<WithAi2svelteForegrounds />"}}});var O=F(D,2);bA(O,{name:"Using with ScrollerBase",exportName:"ScrollerBase",get args(){return o},children:(c,C)=>{bt(c)},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<WithScrollerBase />"}}});var _=F(O,2);bA(_,{name:"Advanced usecases",exportName:"Advanced",get args(){return o},children:(c,C)=>{It(c,{})},$$slots:{default:!0},parameters:{__svelteCsf:{rawCode:"<AdvancedUsecases />"}}}),ct("innerWidth",c=>$(Ue,c,!0)),M(p,U),jA()}zt.__docgen={version:3,name:"ScrollerVideo.stories.svelte",data:[],computed:[],methods:[],components:[],description:null,keywords:[],events:[],slots:[],refs:[]};const UA=Gt(zt,Ft),bs=["Demo","ObjectFit","ResponsiveVideos","Embed","Autoplay","ArchieMLForegrounds","ComponentArchieMLForegrounds","ScrollerBase","Advanced"],ws=UA.Demo,xs=UA.ObjectFit,Ss=UA.ResponsiveVideos,Us=UA.Embed,Es=UA.Autoplay,Bs=UA.ArchieMLForegrounds,Ts=UA.ComponentArchieMLForegrounds,ks=UA.ScrollerBase,Cs=UA.Advanced,Zs=Object.freeze(Object.defineProperty({__proto__:null,Advanced:Cs,ArchieMLForegrounds:Bs,Autoplay:Es,ComponentArchieMLForegrounds:Ts,Demo:ws,Embed:Us,ObjectFit:xs,ResponsiveVideos:Ss,ScrollerBase:ks,__namedExportsOrder:bs,default:Ft},Symbol.toStringTag,{value:"Module"}));export{Zs as S};
|