UNPKG

jamis

Version:

一种支持通过JSON配置方式生成页面的组件库

1 lines 274 kB
import{g as Qt}from"../sdk.js";function Jt(ze,Je){for(var me=0;me<Je.length;me++){const te=Je[me];if(typeof te!="string"&&!Array.isArray(te)){for(const D in te)if(D!=="default"&&!(D in ze)){const F=Object.getOwnPropertyDescriptor(te,D);F&&Object.defineProperty(ze,D,F.get?F:{enumerable:!0,get:()=>te[D]})}}}return Object.freeze(Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"}))}var vt={exports:{}};(function(ze,Je){(function(me,te){ze.exports=te()})(window,function(){return function(me){var te={};function D(F){if(te[F])return te[F].exports;var M=te[F]={i:F,l:!1,exports:{}};return me[F].call(M.exports,M,M.exports,D),M.l=!0,M.exports}return D.m=me,D.c=te,D.d=function(F,M,p){D.o(F,M)||Object.defineProperty(F,M,{enumerable:!0,get:p})},D.r=function(F){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(F,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(F,"__esModule",{value:!0})},D.t=function(F,M){if(1&M&&(F=D(F)),8&M||4&M&&typeof F=="object"&&F&&F.__esModule)return F;var p=Object.create(null);if(D.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:F}),2&M&&typeof F!="string")for(var v in F)D.d(p,v,(function(S){return F[S]}).bind(null,v));return p},D.n=function(F){var M=F&&F.__esModule?function(){return F.default}:function(){return F};return D.d(M,"a",M),M},D.o=function(F,M){return Object.prototype.hasOwnProperty.call(F,M)},D.p="",D(D.s=20)}([function(me,te,D){var F=D(9),M=D.n(F),p=function(){function v(){}return v.e=function(S,g){S&&!v.FORCE_GLOBAL_TAG||(S=v.GLOBAL_TAG);var T="[".concat(S,"] > ").concat(g);v.ENABLE_CALLBACK&&v.emitter.emit("log","error",T),v.ENABLE_ERROR&&(console.error?console.error(T):console.warn?console.warn(T):console.log(T))},v.i=function(S,g){S&&!v.FORCE_GLOBAL_TAG||(S=v.GLOBAL_TAG);var T="[".concat(S,"] > ").concat(g);v.ENABLE_CALLBACK&&v.emitter.emit("log","info",T),v.ENABLE_INFO&&(console.info?console.info(T):console.log(T))},v.w=function(S,g){S&&!v.FORCE_GLOBAL_TAG||(S=v.GLOBAL_TAG);var T="[".concat(S,"] > ").concat(g);v.ENABLE_CALLBACK&&v.emitter.emit("log","warn",T),v.ENABLE_WARN&&(console.warn?console.warn(T):console.log(T))},v.d=function(S,g){S&&!v.FORCE_GLOBAL_TAG||(S=v.GLOBAL_TAG);var T="[".concat(S,"] > ").concat(g);v.ENABLE_CALLBACK&&v.emitter.emit("log","debug",T),v.ENABLE_DEBUG&&(console.debug?console.debug(T):console.log(T))},v.v=function(S,g){S&&!v.FORCE_GLOBAL_TAG||(S=v.GLOBAL_TAG);var T="[".concat(S,"] > ").concat(g);v.ENABLE_CALLBACK&&v.emitter.emit("log","verbose",T),v.ENABLE_VERBOSE&&console.log(T)},v}();p.GLOBAL_TAG="mpegts.js",p.FORCE_GLOBAL_TAG=!1,p.ENABLE_ERROR=!0,p.ENABLE_INFO=!0,p.ENABLE_WARN=!0,p.ENABLE_DEBUG=!0,p.ENABLE_VERBOSE=!0,p.ENABLE_CALLBACK=!1,p.emitter=new M.a,te.a=p},function(me,te,D){var F;(function(M){M.IO_ERROR="io_error",M.DEMUX_ERROR="demux_error",M.INIT_SEGMENT="init_segment",M.MEDIA_SEGMENT="media_segment",M.LOADING_COMPLETE="loading_complete",M.RECOVERED_EARLY_EOF="recovered_early_eof",M.MEDIA_INFO="media_info",M.METADATA_ARRIVED="metadata_arrived",M.SCRIPTDATA_ARRIVED="scriptdata_arrived",M.TIMED_ID3_METADATA_ARRIVED="timed_id3_metadata_arrived",M.SYNCHRONOUS_KLV_METADATA_ARRIVED="synchronous_klv_metadata_arrived",M.ASYNCHRONOUS_KLV_METADATA_ARRIVED="asynchronous_klv_metadata_arrived",M.SMPTE2038_METADATA_ARRIVED="smpte2038_metadata_arrived",M.SCTE35_METADATA_ARRIVED="scte35_metadata_arrived",M.PES_PRIVATE_DATA_DESCRIPTOR="pes_private_data_descriptor",M.PES_PRIVATE_DATA_ARRIVED="pes_private_data_arrived",M.STATISTICS_INFO="statistics_info",M.RECOMMEND_SEEKPOINT="recommend_seekpoint"})(F||(F={})),te.a=F},function(me,te,D){D.d(te,"c",function(){return M}),D.d(te,"b",function(){return p}),D.d(te,"a",function(){return v});var F=D(3),M={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},p={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},v=function(){function S(g){this._type=g||"undefined",this._status=M.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return S.prototype.destroy=function(){this._status=M.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},S.prototype.isWorking=function(){return this._status===M.kConnecting||this._status===M.kBuffering},Object.defineProperty(S.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(g){this._onContentLengthKnown=g},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(g){this._onURLRedirect=g},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(g){this._onDataArrival=g},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onError",{get:function(){return this._onError},set:function(g){this._onError=g},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"onComplete",{get:function(){return this._onComplete},set:function(g){this._onComplete=g},enumerable:!1,configurable:!0}),S.prototype.open=function(g,T){throw new F.c("Unimplemented abstract function!")},S.prototype.abort=function(){throw new F.c("Unimplemented abstract function!")},S}()},function(me,te,D){D.d(te,"d",function(){return p}),D.d(te,"a",function(){return v}),D.d(te,"b",function(){return S}),D.d(te,"c",function(){return g});var F,M=(F=function(T,E){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,B){L.__proto__=B}||function(L,B){for(var w in B)Object.prototype.hasOwnProperty.call(B,w)&&(L[w]=B[w])})(T,E)},function(T,E){if(typeof E!="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");function L(){this.constructor=T}F(T,E),T.prototype=E===null?Object.create(E):(L.prototype=E.prototype,new L)}),p=function(){function T(E){this._message=E}return Object.defineProperty(T.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(T.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),T.prototype.toString=function(){return this.name+": "+this.message},T}(),v=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),E}(p),S=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),E}(p),g=function(T){function E(L){return T.call(this,L)||this}return M(E,T),Object.defineProperty(E.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),E}(p)},function(me,te,D){var F;(function(M){M.ERROR="error",M.LOADING_COMPLETE="loading_complete",M.RECOVERED_EARLY_EOF="recovered_early_eof",M.MEDIA_INFO="media_info",M.METADATA_ARRIVED="metadata_arrived",M.SCRIPTDATA_ARRIVED="scriptdata_arrived",M.TIMED_ID3_METADATA_ARRIVED="timed_id3_metadata_arrived",M.SYNCHRONOUS_KLV_METADATA_ARRIVED="synchronous_klv_metadata_arrived",M.ASYNCHRONOUS_KLV_METADATA_ARRIVED="asynchronous_klv_metadata_arrived",M.SMPTE2038_METADATA_ARRIVED="smpte2038_metadata_arrived",M.SCTE35_METADATA_ARRIVED="scte35_metadata_arrived",M.PES_PRIVATE_DATA_DESCRIPTOR="pes_private_data_descriptor",M.PES_PRIVATE_DATA_ARRIVED="pes_private_data_arrived",M.STATISTICS_INFO="statistics_info",M.DESTROYING="destroying"})(F||(F={})),te.a=F},function(me,te,D){var F={};(function(){var M=self.navigator.userAgent.toLowerCase(),p=/(edge)\/([\w.]+)/.exec(M)||/(opr)[\/]([\w.]+)/.exec(M)||/(chrome)[ \/]([\w.]+)/.exec(M)||/(iemobile)[\/]([\w.]+)/.exec(M)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(M)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(M)||/(webkit)[ \/]([\w.]+)/.exec(M)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(M)||/(msie) ([\w.]+)/.exec(M)||M.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(M)||M.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(M)||[],v=/(ipad)/.exec(M)||/(ipod)/.exec(M)||/(windows phone)/.exec(M)||/(iphone)/.exec(M)||/(kindle)/.exec(M)||/(android)/.exec(M)||/(windows)/.exec(M)||/(mac)/.exec(M)||/(linux)/.exec(M)||/(cros)/.exec(M)||[],S={browser:p[5]||p[3]||p[1]||"",version:p[2]||p[4]||"0",majorVersion:p[4]||p[2]||"0",platform:v[0]||""},g={};if(S.browser){g[S.browser]=!0;var T=S.majorVersion.split(".");g.version={major:parseInt(S.majorVersion,10),string:S.version},T.length>1&&(g.version.minor=parseInt(T[1],10)),T.length>2&&(g.version.build=parseInt(T[2],10))}S.platform&&(g[S.platform]=!0),(g.chrome||g.opr||g.safari)&&(g.webkit=!0),(g.rv||g.iemobile)&&(g.rv&&delete g.rv,S.browser="msie",g.msie=!0),g.edge&&(delete g.edge,S.browser="msedge",g.msedge=!0),g.opr&&(S.browser="opera",g.opera=!0),g.safari&&g.android&&(S.browser="android",g.android=!0);for(var E in g.name=S.browser,g.platform=S.platform,F)F.hasOwnProperty(E)&&delete F[E];Object.assign(F,g)})(),te.a=F},function(me,te,D){te.a={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},function(me,te,D){var F;(function(M){M.ERROR="error",M.SOURCE_OPEN="source_open",M.UPDATE_END="update_end",M.BUFFER_FULL="buffer_full",M.START_STREAMING="start_streaming",M.END_STREAMING="end_streaming"})(F||(F={})),te.a=F},function(me,te,D){var F=D(9),M=D.n(F),p=D(0),v=function(){function S(){}return Object.defineProperty(S,"forceGlobalTag",{get:function(){return p.a.FORCE_GLOBAL_TAG},set:function(g){p.a.FORCE_GLOBAL_TAG=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"globalTag",{get:function(){return p.a.GLOBAL_TAG},set:function(g){p.a.GLOBAL_TAG=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"enableAll",{get:function(){return p.a.ENABLE_VERBOSE&&p.a.ENABLE_DEBUG&&p.a.ENABLE_INFO&&p.a.ENABLE_WARN&&p.a.ENABLE_ERROR},set:function(g){p.a.ENABLE_VERBOSE=g,p.a.ENABLE_DEBUG=g,p.a.ENABLE_INFO=g,p.a.ENABLE_WARN=g,p.a.ENABLE_ERROR=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"enableDebug",{get:function(){return p.a.ENABLE_DEBUG},set:function(g){p.a.ENABLE_DEBUG=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"enableVerbose",{get:function(){return p.a.ENABLE_VERBOSE},set:function(g){p.a.ENABLE_VERBOSE=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"enableInfo",{get:function(){return p.a.ENABLE_INFO},set:function(g){p.a.ENABLE_INFO=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"enableWarn",{get:function(){return p.a.ENABLE_WARN},set:function(g){p.a.ENABLE_WARN=g,S._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(S,"enableError",{get:function(){return p.a.ENABLE_ERROR},set:function(g){p.a.ENABLE_ERROR=g,S._notifyChange()},enumerable:!1,configurable:!0}),S.getConfig=function(){return{globalTag:p.a.GLOBAL_TAG,forceGlobalTag:p.a.FORCE_GLOBAL_TAG,enableVerbose:p.a.ENABLE_VERBOSE,enableDebug:p.a.ENABLE_DEBUG,enableInfo:p.a.ENABLE_INFO,enableWarn:p.a.ENABLE_WARN,enableError:p.a.ENABLE_ERROR,enableCallback:p.a.ENABLE_CALLBACK}},S.applyConfig=function(g){p.a.GLOBAL_TAG=g.globalTag,p.a.FORCE_GLOBAL_TAG=g.forceGlobalTag,p.a.ENABLE_VERBOSE=g.enableVerbose,p.a.ENABLE_DEBUG=g.enableDebug,p.a.ENABLE_INFO=g.enableInfo,p.a.ENABLE_WARN=g.enableWarn,p.a.ENABLE_ERROR=g.enableError,p.a.ENABLE_CALLBACK=g.enableCallback},S._notifyChange=function(){var g=S.emitter;if(g.listenerCount("change")>0){var T=S.getConfig();g.emit("change",T)}},S.registerListener=function(g){S.emitter.addListener("change",g)},S.removeListener=function(g){S.emitter.removeListener("change",g)},S.addLogListener=function(g){p.a.emitter.addListener("log",g),p.a.emitter.listenerCount("log")>0&&(p.a.ENABLE_CALLBACK=!0,S._notifyChange())},S.removeLogListener=function(g){p.a.emitter.removeListener("log",g),p.a.emitter.listenerCount("log")===0&&(p.a.ENABLE_CALLBACK=!1,S._notifyChange())},S}();v.emitter=new M.a,te.a=v},function(me,te,D){var F,M=typeof Reflect=="object"?Reflect:null,p=M&&typeof M.apply=="function"?M.apply:function(k,q,Q){return Function.prototype.apply.call(k,q,Q)};F=M&&typeof M.ownKeys=="function"?M.ownKeys:Object.getOwnPropertySymbols?function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:function(k){return Object.getOwnPropertyNames(k)};var v=Number.isNaN||function(k){return k!=k};function S(){S.init.call(this)}me.exports=S,me.exports.once=function(k,q){return new Promise(function(Q,O){function l(d){k.removeListener(q,_),O(d)}function _(){typeof k.removeListener=="function"&&k.removeListener("error",l),Q([].slice.call(arguments))}X(k,q,_,{once:!0}),q!=="error"&&function(d,f,V){typeof d.on=="function"&&X(d,"error",f,V)}(k,l,{once:!0})})},S.EventEmitter=S,S.prototype._events=void 0,S.prototype._eventsCount=0,S.prototype._maxListeners=void 0;var g=10;function T(k){if(typeof k!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof k)}function E(k){return k._maxListeners===void 0?S.defaultMaxListeners:k._maxListeners}function L(k,q,Q,O){var l,_,d,f;if(T(Q),(_=k._events)===void 0?(_=k._events=Object.create(null),k._eventsCount=0):(_.newListener!==void 0&&(k.emit("newListener",q,Q.listener?Q.listener:Q),_=k._events),d=_[q]),d===void 0)d=_[q]=Q,++k._eventsCount;else if(typeof d=="function"?d=_[q]=O?[Q,d]:[d,Q]:O?d.unshift(Q):d.push(Q),(l=E(k))>0&&d.length>l&&!d.warned){d.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+d.length+" "+String(q)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=k,V.type=q,V.count=d.length,f=V,console&&console.warn&&console.warn(f)}return k}function B(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(k,q,Q){var O={fired:!1,wrapFn:void 0,target:k,type:q,listener:Q},l=B.bind(O);return l.listener=Q,O.wrapFn=l,l}function U(k,q,Q){var O=k._events;if(O===void 0)return[];var l=O[q];return l===void 0?[]:typeof l=="function"?Q?[l.listener||l]:[l]:Q?function(_){for(var d=new Array(_.length),f=0;f<d.length;++f)d[f]=_[f].listener||_[f];return d}(l):P(l,l.length)}function N(k){var q=this._events;if(q!==void 0){var Q=q[k];if(typeof Q=="function")return 1;if(Q!==void 0)return Q.length}return 0}function P(k,q){for(var Q=new Array(q),O=0;O<q;++O)Q[O]=k[O];return Q}function X(k,q,Q,O){if(typeof k.on=="function")O.once?k.once(q,Q):k.on(q,Q);else{if(typeof k.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof k);k.addEventListener(q,function l(_){O.once&&k.removeEventListener(q,l),Q(_)})}}Object.defineProperty(S,"defaultMaxListeners",{enumerable:!0,get:function(){return g},set:function(k){if(typeof k!="number"||k<0||v(k))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+k+".");g=k}}),S.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},S.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||v(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this},S.prototype.getMaxListeners=function(){return E(this)},S.prototype.emit=function(k){for(var q=[],Q=1;Q<arguments.length;Q++)q.push(arguments[Q]);var O=k==="error",l=this._events;if(l!==void 0)O=O&&l.error===void 0;else if(!O)return!1;if(O){var _;if(q.length>0&&(_=q[0]),_ instanceof Error)throw _;var d=new Error("Unhandled error."+(_?" ("+_.message+")":""));throw d.context=_,d}var f=l[k];if(f===void 0)return!1;if(typeof f=="function")p(f,this,q);else{var V=f.length,J=P(f,V);for(Q=0;Q<V;++Q)p(J[Q],this,q)}return!0},S.prototype.addListener=function(k,q){return L(this,k,q,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(k,q){return L(this,k,q,!0)},S.prototype.once=function(k,q){return T(q),this.on(k,w(this,k,q)),this},S.prototype.prependOnceListener=function(k,q){return T(q),this.prependListener(k,w(this,k,q)),this},S.prototype.removeListener=function(k,q){var Q,O,l,_,d;if(T(q),(O=this._events)===void 0)return this;if((Q=O[k])===void 0)return this;if(Q===q||Q.listener===q)--this._eventsCount==0?this._events=Object.create(null):(delete O[k],O.removeListener&&this.emit("removeListener",k,Q.listener||q));else if(typeof Q!="function"){for(l=-1,_=Q.length-1;_>=0;_--)if(Q[_]===q||Q[_].listener===q){d=Q[_].listener,l=_;break}if(l<0)return this;l===0?Q.shift():function(f,V){for(;V+1<f.length;V++)f[V]=f[V+1];f.pop()}(Q,l),Q.length===1&&(O[k]=Q[0]),O.removeListener!==void 0&&this.emit("removeListener",k,d||q)}return this},S.prototype.off=S.prototype.removeListener,S.prototype.removeAllListeners=function(k){var q,Q,O;if((Q=this._events)===void 0)return this;if(Q.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):Q[k]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete Q[k]),this;if(arguments.length===0){var l,_=Object.keys(Q);for(O=0;O<_.length;++O)(l=_[O])!=="removeListener"&&this.removeAllListeners(l);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(q=Q[k])=="function")this.removeListener(k,q);else if(q!==void 0)for(O=q.length-1;O>=0;O--)this.removeListener(k,q[O]);return this},S.prototype.listeners=function(k){return U(this,k,!0)},S.prototype.rawListeners=function(k){return U(this,k,!1)},S.listenerCount=function(k,q){return typeof k.listenerCount=="function"?k.listenerCount(q):N.call(k,q)},S.prototype.listenerCount=N,S.prototype.eventNames=function(){return this._eventsCount>0?F(this._events):[]}},function(me,te,D){D.d(te,"b",function(){return p}),D.d(te,"a",function(){return v});var F=D(2),M=D(6),p={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},v={NETWORK_EXCEPTION:F.b.EXCEPTION,NETWORK_STATUS_CODE_INVALID:F.b.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:F.b.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:F.b.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:M.a.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:M.a.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:M.a.CODEC_UNSUPPORTED}},function(me,te,D){D.d(te,"d",function(){return F}),D.d(te,"b",function(){return M}),D.d(te,"a",function(){return p}),D.d(te,"c",function(){return v});var F=function(S,g,T,E,L){this.dts=S,this.pts=g,this.duration=T,this.originalDts=E,this.isSyncPoint=L,this.fileposition=null},M=function(){function S(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}return S.prototype.appendSyncPoint=function(g){g.isSyncPoint=!0,this.syncPoints.push(g)},S}(),p=function(){function S(){this._list=[]}return S.prototype.clear=function(){this._list=[]},S.prototype.appendArray=function(g){var T=this._list;g.length!==0&&(T.length>0&&g[0].originalDts<T[T.length-1].originalDts&&this.clear(),Array.prototype.push.apply(T,g))},S.prototype.getLastSyncPointBeforeDts=function(g){if(this._list.length==0)return null;var T=this._list,E=0,L=T.length-1,B=0,w=0,U=L;for(g<T[0].dts&&(E=0,w=U+1);w<=U;){if((B=w+Math.floor((U-w)/2))===L||g>=T[B].dts&&g<T[B+1].dts){E=B;break}T[B].dts<g?w=B+1:U=B-1}return this._list[E]},S}(),v=function(){function S(g){this._type=g,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(S.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),S.prototype.isEmpty=function(){return this._list.length===0},S.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},S.prototype._searchNearestSegmentBefore=function(g){var T=this._list;if(T.length===0)return-2;var E=T.length-1,L=0,B=0,w=E,U=0;if(g<T[0].originalBeginDts)return U=-1;for(;B<=w;){if((L=B+Math.floor((w-B)/2))===E||g>T[L].lastSample.originalDts&&g<T[L+1].originalBeginDts){U=L;break}T[L].originalBeginDts<g?B=L+1:w=L-1}return U},S.prototype._searchNearestSegmentAfter=function(g){return this._searchNearestSegmentBefore(g)+1},S.prototype.append=function(g){var T=this._list,E=g,L=this._lastAppendLocation,B=0;L!==-1&&L<T.length&&E.originalBeginDts>=T[L].lastSample.originalDts&&(L===T.length-1||L<T.length-1&&E.originalBeginDts<T[L+1].originalBeginDts)?B=L+1:T.length>0&&(B=this._searchNearestSegmentBefore(E.originalBeginDts)+1),this._lastAppendLocation=B,this._list.splice(B,0,E)},S.prototype.getLastSegmentBefore=function(g){var T=this._searchNearestSegmentBefore(g);return T>=0?this._list[T]:null},S.prototype.getLastSampleBefore=function(g){var T=this.getLastSegmentBefore(g);return T!=null?T.lastSample:null},S.prototype.getLastSyncPointBefore=function(g){for(var T=this._searchNearestSegmentBefore(g),E=this._list[T].syncPoints;E.length===0&&T>0;)T--,E=this._list[T].syncPoints;return E.length>0?E[E.length-1]:null},S}()},function(me,te,D){var F=function(){function M(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}return M.prototype.isComplete=function(){var p=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,v=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&p&&v},M.prototype.isSeekable=function(){return this.hasKeyframesIndex===!0},M.prototype.getNearestKeyframe=function(p){if(this.keyframesIndex==null)return null;var v=this.keyframesIndex,S=this._search(v.times,p);return{index:S,milliseconds:v.times[S],fileposition:v.filepositions[S]}},M.prototype._search=function(p,v){var S=0,g=p.length-1,T=0,E=0,L=g;for(v<p[0]&&(S=0,E=L+1);E<=L;){if((T=E+Math.floor((L-E)/2))===g||v>=p[T]&&v<p[T+1]){S=T;break}p[T]<v?E=T+1:L=T-1}return S},M}();te.a=F},function(me,te,D){var F=D(9),M=D.n(F),p=D(0),v=D(5),S=D(12);function g(a,i,t){var e=a;if(i+t<e.length){for(;t--;)if((192&e[++i])!=128)return!1;return!0}return!1}var T,E=function(a){for(var i=[],t=a,e=0,n=a.length;e<n;)if(t[e]<128)i.push(String.fromCharCode(t[e])),++e;else{if(!(t[e]<192)){if(t[e]<224){if(g(t,e,1)&&(o=(31&t[e])<<6|63&t[e+1])>=128){i.push(String.fromCharCode(65535&o)),e+=2;continue}}else if(t[e]<240){if(g(t,e,2)&&(o=(15&t[e])<<12|(63&t[e+1])<<6|63&t[e+2])>=2048&&(63488&o)!=55296){i.push(String.fromCharCode(65535&o)),e+=3;continue}}else if(t[e]<248){var o;if(g(t,e,3)&&(o=(7&t[e])<<18|(63&t[e+1])<<12|(63&t[e+2])<<6|63&t[e+3])>65536&&o<1114112){o-=65536,i.push(String.fromCharCode(o>>>10|55296)),i.push(String.fromCharCode(1023&o|56320)),e+=4;continue}}}i.push(String.fromCharCode(65533)),++e}return i.join("")},L=D(3),B=(T=new ArrayBuffer(2),new DataView(T).setInt16(0,256,!0),new Int16Array(T)[0]===256),w=function(){function a(){}return a.parseScriptData=function(i,t,e){var n={};try{var o=a.parseValue(i,t,e),r=a.parseValue(i,t+o.size,e-o.size);n[o.data]=r.data}catch(s){p.a.e("AMF",s.toString())}return n},a.parseObject=function(i,t,e){if(e<3)throw new L.a("Data not enough when parse ScriptDataObject");var n=a.parseString(i,t,e),o=a.parseValue(i,t+n.size,e-n.size),r=o.objectEnd;return{data:{name:n.data,value:o.data},size:n.size+o.size,objectEnd:r}},a.parseVariable=function(i,t,e){return a.parseObject(i,t,e)},a.parseString=function(i,t,e){if(e<2)throw new L.a("Data not enough when parse String");var n=new DataView(i,t,e).getUint16(0,!B);return{data:n>0?E(new Uint8Array(i,t+2,n)):"",size:2+n}},a.parseLongString=function(i,t,e){if(e<4)throw new L.a("Data not enough when parse LongString");var n=new DataView(i,t,e).getUint32(0,!B);return{data:n>0?E(new Uint8Array(i,t+4,n)):"",size:4+n}},a.parseDate=function(i,t,e){if(e<10)throw new L.a("Data size invalid when parse Date");var n=new DataView(i,t,e),o=n.getFloat64(0,!B),r=n.getInt16(8,!B);return{data:new Date(o+=60*r*1e3),size:10}},a.parseValue=function(i,t,e){if(e<1)throw new L.a("Data not enough when parse Value");var n,o=new DataView(i,t,e),r=1,s=o.getUint8(0),u=!1;try{switch(s){case 0:n=o.getFloat64(1,!B),r+=8;break;case 1:n=!!o.getUint8(1),r+=1;break;case 2:var h=a.parseString(i,t+1,e-1);n=h.data,r+=h.size;break;case 3:n={};var m=0;for((16777215&o.getUint32(e-4,!B))==9&&(m=3);r<e-4;){var A=a.parseObject(i,t+r,e-r-m);if(A.objectEnd)break;n[A.data.name]=A.data.value,r+=A.size}r<=e-3&&(16777215&o.getUint32(r-1,!B))===9&&(r+=3);break;case 8:for(n={},r+=4,m=0,(16777215&o.getUint32(e-4,!B))==9&&(m=3);r<e-8;){var y=a.parseVariable(i,t+r,e-r-m);if(y.objectEnd)break;n[y.data.name]=y.data.value,r+=y.size}r<=e-3&&(16777215&o.getUint32(r-1,!B))===9&&(r+=3);break;case 9:n=void 0,r=1,u=!0;break;case 10:n=[];var R=o.getUint32(1,!B);r+=4;for(var I=0;I<R;I++){var H=a.parseValue(i,t+r,e-r);n.push(H.data),r+=H.size}break;case 11:var x=a.parseDate(i,t+1,e-1);n=x.data,r+=x.size;break;case 12:var ee=a.parseString(i,t+1,e-1);n=ee.data,r+=ee.size;break;default:r=e,p.a.w("AMF","Unsupported AMF value type "+s)}}catch(Z){p.a.e("AMF",Z.toString())}return{data:n,size:r,objectEnd:u}},a}(),U=function(){function a(i){this.TAG="ExpGolomb",this._buffer=i,this._buffer_index=0,this._total_bytes=i.byteLength,this._total_bits=8*i.byteLength,this._current_word=0,this._current_word_bits_left=0}return a.prototype.destroy=function(){this._buffer=null},a.prototype._fillCurrentWord=function(){var i=this._total_bytes-this._buffer_index;if(i<=0)throw new L.a("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,i),e=new Uint8Array(4);e.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(e.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t},a.prototype.readBits=function(i){if(i>32)throw new L.b("ExpGolomb: readBits() bits exceeded max 32bits!");if(i<=this._current_word_bits_left){var t=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t}var e=this._current_word_bits_left?this._current_word:0;e>>>=32-this._current_word_bits_left;var n=i-this._current_word_bits_left;this._fillCurrentWord();var o=Math.min(n,this._current_word_bits_left),r=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,e=e<<o|r},a.prototype.readBool=function(){return this.readBits(1)===1},a.prototype.readByte=function(){return this.readBits(8)},a.prototype._skipLeadingZero=function(){var i;for(i=0;i<this._current_word_bits_left;i++)if(this._current_word&2147483648>>>i)return this._current_word<<=i,this._current_word_bits_left-=i,i;return this._fillCurrentWord(),i+this._skipLeadingZero()},a.prototype.readUEG=function(){var i=this._skipLeadingZero();return this.readBits(i+1)-1},a.prototype.readSEG=function(){var i=this.readUEG();return 1&i?i+1>>>1:-1*(i>>>1)},a}(),N=function(){function a(){}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),o=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[o]=t[r],o++);return new Uint8Array(n.buffer,0,o)},a.parseSPS=function(i){for(var t=i.subarray(1,4),e="avc1.",n=0;n<3;n++){var o=t[n].toString(16);o.length<2&&(o="0"+o),e+=o}var r=a._ebsp2rbsp(i),s=new U(r);s.readByte();var u=s.readByte();s.readByte();var h=s.readByte();s.readUEG();var m=a.getProfileString(u),A=a.getLevelString(h),y=1,R=420,I=8,H=8;if((u===100||u===110||u===122||u===244||u===44||u===83||u===86||u===118||u===128||u===138||u===144)&&((y=s.readUEG())===3&&s.readBits(1),y<=3&&(R=[0,420,422,444][y]),I=s.readUEG()+8,H=s.readUEG()+8,s.readBits(1),s.readBool()))for(var x=y!==3?8:12,ee=0;ee<x;ee++)s.readBool()&&(ee<6?a._skipScalingList(s,16):a._skipScalingList(s,64));s.readUEG();var Z=s.readUEG();if(Z===0)s.readUEG();else if(Z===1){s.readBits(1),s.readSEG(),s.readSEG();var Y=s.readUEG();for(ee=0;ee<Y;ee++)s.readSEG()}var re=s.readUEG();s.readBits(1);var fe=s.readUEG(),$=s.readUEG(),ae=s.readBits(1);ae===0&&s.readBits(1),s.readBits(1);var pe=0,oe=0,le=0,Se=0;s.readBool()&&(pe=s.readUEG(),oe=s.readUEG(),le=s.readUEG(),Se=s.readUEG());var Ae=1,ue=1,ge=0,Re=!0,Le=0,xe=0;if(s.readBool()){if(s.readBool()){var De=s.readByte();De>0&&De<16?(Ae=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][De-1],ue=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][De-1]):De===255&&(Ae=s.readByte()<<8|s.readByte(),ue=s.readByte()<<8|s.readByte())}if(s.readBool()&&s.readBool(),s.readBool()&&(s.readBits(4),s.readBool()&&s.readBits(24)),s.readBool()&&(s.readUEG(),s.readUEG()),s.readBool()){var Pe=s.readBits(32),Be=s.readBits(32);Re=s.readBool(),ge=(Le=Be)/(xe=2*Pe)}}var Oe=1;Ae===1&&ue===1||(Oe=Ae/ue);var Ie=0,be=0;y===0?(Ie=1,be=2-ae):(Ie=y===3?1:2,be=(y===1?2:1)*(2-ae));var Ve=16*(fe+1),Fe=16*($+1)*(2-ae);Ve-=(pe+oe)*Ie,Fe-=(le+Se)*be;var Xe=Math.ceil(Ve*Oe);return s.destroy(),s=null,{codec_mimetype:e,profile_idc:u,level_idc:h,profile_string:m,level_string:A,chroma_format_idc:y,bit_depth:I,bit_depth_luma:I,bit_depth_chroma:H,ref_frames:re,chroma_format:R,chroma_format_string:a.getChromaFormatString(R),frame_rate:{fixed:Re,fps:ge,fps_den:xe,fps_num:Le},sar_ratio:{width:Ae,height:ue},codec_size:{width:Ve,height:Fe},present_size:{width:Xe,height:Fe}}},a._skipScalingList=function(i,t){for(var e=8,n=8,o=0;o<t;o++)n!==0&&(n=(e+i.readSEG()+256)%256),e=n===0?e:n},a.getProfileString=function(i){switch(i){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}},a.getLevelString=function(i){return(i/10).toFixed(1)},a.getChromaFormatString=function(i){switch(i){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},a}(),P=D(6),X=function(){function a(){}return a._ebsp2rbsp=function(i){for(var t=i,e=t.byteLength,n=new Uint8Array(e),o=0,r=0;r<e;r++)r>=2&&t[r]===3&&t[r-1]===0&&t[r-2]===0||(n[o]=t[r],o++);return new Uint8Array(n.buffer,0,o)},a.parseVPS=function(i){var t=a._ebsp2rbsp(i),e=new U(t);return e.readByte(),e.readByte(),e.readBits(4),e.readBits(2),e.readBits(6),{num_temporal_layers:e.readBits(3)+1,temporal_id_nested:e.readBool()}},a.parseSPS=function(i){var t=a._ebsp2rbsp(i),e=new U(t);e.readByte(),e.readByte();for(var n=0,o=0,r=0,s=0,u=(e.readBits(4),e.readBits(3)),h=(e.readBool(),e.readBits(2)),m=e.readBool(),A=e.readBits(5),y=e.readByte(),R=e.readByte(),I=e.readByte(),H=e.readByte(),x=e.readByte(),ee=e.readByte(),Z=e.readByte(),Y=e.readByte(),re=e.readByte(),fe=e.readByte(),$=e.readByte(),ae=[],pe=[],oe=0;oe<u;oe++)ae.push(e.readBool()),pe.push(e.readBool());if(u>0)for(oe=u;oe<8;oe++)e.readBits(2);for(oe=0;oe<u;oe++)ae[oe]&&(e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte(),e.readByte()),pe[oe]&&e.readByte();e.readUEG();var le=e.readUEG();le==3&&e.readBits(1);var Se=e.readUEG(),Ae=e.readUEG();e.readBool()&&(n+=e.readUEG(),o+=e.readUEG(),r+=e.readUEG(),s+=e.readUEG());var ue=e.readUEG(),ge=e.readUEG(),Re=e.readUEG();for(oe=e.readBool()?0:u;oe<=u;oe++)e.readUEG(),e.readUEG(),e.readUEG();if(e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readBool()&&e.readBool())for(var Le=0;Le<4;Le++)for(var xe=0;xe<(Le===3?2:6);xe++)if(e.readBool()){var De=Math.min(64,1<<4+(Le<<1));for(Le>1&&e.readSEG(),oe=0;oe<De;oe++)e.readSEG()}else e.readUEG();e.readBool(),e.readBool(),e.readBool()&&(e.readByte(),e.readUEG(),e.readUEG(),e.readBool());var Pe=e.readUEG(),Be=0;for(oe=0;oe<Pe;oe++){var Oe=!1;if(oe!==0&&(Oe=e.readBool()),Oe){oe===Pe&&e.readUEG(),e.readBool(),e.readUEG();for(var Ie=0,be=0;be<=Be;be++){var Ve=e.readBool(),Fe=!1;Ve||(Fe=e.readBool()),(Ve||Fe)&&Ie++}Be=Ie}else{var Xe=e.readUEG(),ct=e.readUEG();for(Be=Xe+ct,be=0;be<Xe;be++)e.readUEG(),e.readBool();for(be=0;be<ct;be++)e.readUEG(),e.readBool()}}if(e.readBool()){var Yt=e.readUEG();for(oe=0;oe<Yt;oe++){for(be=0;be<Re+4;be++)e.readBits(1);e.readBits(1)}}var ht=0,qe=1,Ke=1,lt=!1,et=1,tt=1;if(e.readBool(),e.readBool(),e.readBool()){if(e.readBool()){var We=e.readByte();We>0&&We<=16?(qe=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][We-1],Ke=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][We-1]):We===255&&(qe=e.readBits(16),Ke=e.readBits(16))}if(e.readBool()&&e.readBool(),e.readBool()&&(e.readBits(3),e.readBool(),e.readBool()&&(e.readByte(),e.readByte(),e.readByte())),e.readBool()&&(e.readUEG(),e.readUEG()),e.readBool(),e.readBool(),e.readBool(),e.readBool()&&(e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG()),e.readBool()&&(et=e.readBits(32),tt=e.readBits(32),e.readBool()&&e.readUEG(),e.readBool())){var it=!1,at=!1,Qe=!1;for(it=e.readBool(),at=e.readBool(),(it||at)&&((Qe=e.readBool())&&(e.readByte(),e.readBits(5),e.readBool(),e.readBits(5)),e.readBits(4),e.readBits(4),Qe&&e.readBits(4),e.readBits(5),e.readBits(5),e.readBits(5)),oe=0;oe<=u;oe++){var ut=e.readBool();lt=ut;var ft=!0,nt=1;ut||(ft=e.readBool());var pt=!1;if(ft?e.readUEG():pt=e.readBool(),pt||(nt=e.readUEG()+1),it){for(be=0;be<nt;be++)e.readUEG(),e.readUEG(),Qe&&(e.readUEG(),e.readUEG());e.readBool()}if(at){for(be=0;be<nt;be++)e.readUEG(),e.readUEG(),Qe&&(e.readUEG(),e.readUEG());e.readBool()}}}e.readBool()&&(e.readBool(),e.readBool(),e.readBool(),ht=e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG(),e.readUEG())}e.readBool();var Xt="hvc1.".concat(A,".1.L").concat($,".B0"),mt=Se-(n+o)*(le===1||le===2?2:1),gt=Ae-(r+s)*(le===1?2:1),yt=1;return qe!==1&&Ke!==1&&(yt=qe/Ke),e.destroy(),e=null,{codec_mimetype:Xt,profile_string:a.getProfileString(A),level_string:a.getLevelString($),profile_idc:A,bit_depth:ue+8,ref_frames:1,chroma_format:le,chroma_format_string:a.getChromaFormatString(le),general_level_idc:$,general_profile_space:h,general_tier_flag:m,general_profile_idc:A,general_profile_compatibility_flags_1:y,general_profile_compatibility_flags_2:R,general_profile_compatibility_flags_3:I,general_profile_compatibility_flags_4:H,general_constraint_indicator_flags_1:x,general_constraint_indicator_flags_2:ee,general_constraint_indicator_flags_3:Z,general_constraint_indicator_flags_4:Y,general_constraint_indicator_flags_5:re,general_constraint_indicator_flags_6:fe,min_spatial_segmentation_idc:ht,constant_frame_rate:0,chroma_format_idc:le,bit_depth_luma_minus8:ue,bit_depth_chroma_minus8:ge,frame_rate:{fixed:lt,fps:tt/et,fps_den:et,fps_num:tt},sar_ratio:{width:qe,height:Ke},codec_size:{width:mt,height:gt},present_size:{width:mt*yt,height:gt}}},a.parsePPS=function(i){var t=a._ebsp2rbsp(i),e=new U(t);e.readByte(),e.readByte(),e.readUEG(),e.readUEG(),e.readBool(),e.readBool(),e.readBits(3),e.readBool(),e.readBool(),e.readUEG(),e.readUEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool()&&e.readUEG(),e.readSEG(),e.readSEG(),e.readBool(),e.readBool(),e.readBool(),e.readBool();var n=e.readBool(),o=e.readBool(),r=1;return o&&n?r=0:o?r=3:n&&(r=2),{parallelismType:r}},a.getChromaFormatString=function(i){switch(i){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}},a.getProfileString=function(i){switch(i){case 1:return"Main";case 2:return"Main10";case 3:return"MainSP";case 4:return"Rext";case 9:return"SCC";default:return"Unknown"}},a.getLevelString=function(i){return(i/30).toFixed(1)},a}();function k(a){return a.byteOffset%2==0&&a.byteLength%2==0}function q(a){return a.byteOffset%4==0&&a.byteLength%4==0}function Q(a,i){for(var t=0;t<a.length;t++)if(a[t]!==i[t])return!1;return!0}var O=function(a,i){return a.byteLength===i.byteLength&&(q(a)&&q(i)?function(t,e){return Q(new Uint32Array(t.buffer,t.byteOffset,t.byteLength/4),new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4))}(a,i):k(a)&&k(i)?function(t,e){return Q(new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2))}(a,i):function(t,e){return Q(t,e)}(a,i))},l=function(){return(l=Object.assign||function(a){for(var i,t=1,e=arguments.length;t<e;t++)for(var n in i=arguments[t])Object.prototype.hasOwnProperty.call(i,n)&&(a[n]=i[n]);return a}).apply(this,arguments)},_=function(){function a(){}return a.parseOBUs=function(i,t){for(var e=0;e<i.byteLength;){var n=e,o=(i[e],(120&i[e])>>3),r=(4&i[e])!=0,s=(2&i[e])!=0;i[e],e+=1,r&&(e+=1);var u=Number.POSITIVE_INFINITY;if(s){u=0;for(var h=0;;h++){var m=i[e++];if(u|=(127&m)<<7*h,(128&m)==0)break}}console.log(o),o===1?t=l(l({},a.parseSeuqneceHeader(i.subarray(e,e+u))),{sequence_header_data:i.subarray(n,e+u)}):(o==3&&t||o==6&&t)&&(t=a.parseOBUFrameHeader(i.subarray(e,e+u),0,0,t)),e+=u}return t},a.parseSeuqneceHeader=function(i){var t=new U(i),e=t.readBits(3),n=(t.readBool(),t.readBool()),o=!0,r=0,s=1,u=void 0,h=[];if(n)h.push({operating_point_idc:0,level:t.readBits(5),tier:0});else{if(t.readBool()){var m=t.readBits(32),A=t.readBits(32),y=t.readBool();if(y){for(var R=0;t.readBits(1)===0;)R+=1;R>=32||(1<<R)-1+t.readBits(R)}(r=A)/(s=m),o=y,t.readBool()&&(t.readBits(5),t.readBits(32),u=t.readBits(5),t.readBits(5))}for(var I=t.readBool(),H=t.readBits(5),x=0;x<=H;x++){var ee=t.readBits(12),Z=t.readBits(5),Y=Z>7?t.readBits(1):0;h.push({operating_point_idc:ee,level:Z,tier:Y}),I&&t.readBool()&&t.readBits(4)}}var re=h[0],fe=re.level,$=re.tier,ae=t.readBits(4),pe=t.readBits(4),oe=t.readBits(ae+1)+1,le=t.readBits(pe+1)+1,Se=!1;n||(Se=t.readBool()),Se&&(t.readBits(4),t.readBits(4)),t.readBool(),t.readBool(),t.readBool();var Ae=!1,ue=2,ge=2,Re=0;n||(t.readBool(),t.readBool(),t.readBool(),t.readBool(),(Ae=t.readBool())&&(t.readBool(),t.readBool()),(ue=t.readBool()?2:t.readBits(1))?ge=t.readBool()?2:t.readBits(1):ge=2,Ae?Re=t.readBits(3)+1:Re=0);var Le=t.readBool(),xe=(t.readBool(),t.readBool(),t.readBool()),De=8;e===2&&xe?De=t.readBool()?12:10:De=xe?10:8;var Pe=!1;e!==1&&(Pe=t.readBool()),t.readBool()&&(t.readBits(8),t.readBits(8),t.readBits(8));var Be=1,Oe=1;return Pe?(t.readBits(1),Be=1,Oe=1):(t.readBits(1),e==0?(Be=1,Oe=1):e==1?(Be=0,Oe=0):De==12?t.readBits(1)&&t.readBits(1):(Be=1,Oe=0),Be&&Oe&&t.readBits(2),t.readBits(1)),t.readBool(),t.destroy(),t=null,{codec_mimetype:"av01.".concat(e,".").concat(a.getLevelString(fe,$),".").concat(De.toString(10).padStart(2,"0")),level:fe,tier:$,level_string:a.getLevelString(fe,$),profile_idc:e,profile_string:"".concat(e),bit_depth:De,ref_frames:1,chroma_format:a.getChromaFormat(Pe,Be,Oe),chroma_format_string:a.getChromaFormatString(Pe,Be,Oe),sequence_header:{frame_id_numbers_present_flag:Se,additional_frame_id_length_minus_1:void 0,delta_frame_id_length_minus_2:void 0,reduced_still_picture_header:n,decoder_model_info_present_flag:!1,operating_points:h,buffer_removal_time_length_minus_1:u,equal_picture_interval:o,seq_force_screen_content_tools:ue,seq_force_integer_mv:ge,enable_order_hint:Ae,order_hint_bits:Re,enable_superres:Le,frame_width_bit:ae+1,frame_height_bit:pe+1,max_frame_width:oe,max_frame_height:le},keyframe:void 0,frame_rate:{fixed:o,fps:r/s,fps_den:s,fps_num:r}}},a.parseOBUFrameHeader=function(i,t,e,n){var o=n.sequence_header,r=new U(i),s=(o.max_frame_width,o.max_frame_height,0);o.frame_id_numbers_present_flag&&(s=o.additional_frame_id_length_minus_1+o.delta_frame_id_length_minus_2+3);var u=0,h=!0,m=!0,A=!1;if(!o.reduced_still_picture_header){if(r.readBool())return n;h=(u=r.readBits(2))===2||u===0,(m=r.readBool())&&o.decoder_model_info_present_flag&&o.equal_picture_interval,m&&r.readBool(),A=!!(u===3||u===0&&m)||r.readBool()}n.keyframe=h,r.readBool();var y=o.seq_force_screen_content_tools;o.seq_force_screen_content_tools===2&&(y=r.readBits(1)),y&&(o.seq_force_integer_mv,o.seq_force_integer_mv==2&&r.readBits(1)),o.frame_id_numbers_present_flag&&r.readBits(s);var R=!1;if(R=u==3||!o.reduced_still_picture_header&&r.readBool(),r.readBits(o.order_hint_bits),h||A||r.readBits(3),o.decoder_model_info_present_flag&&r.readBool()){for(var I=0;I<=o.operating_points_cnt_minus_1;I++)if(o.operating_points[I].decoder_model_present_for_this_op[I]){var H=o.operating_points[I].operating_point_idc;(H===0||H>>t&1&&H>>e+8&1)&&r.readBits(o.buffer_removal_time_length_minus_1+1)}}var x=255;if(u===3||u==0&&m||(x=r.readBits(8)),(h||x!==255)&&A&&o.enable_order_hint)for(var ee=0;ee<8;ee++)r.readBits(o.order_hint_bits);if(h){var Z=a.frameSizeAndRenderSize(r,R,o);n.codec_size={width:Z.FrameWidth,height:Z.FrameHeight},n.present_size={width:Z.RenderWidth,height:Z.RenderHeight},n.sar_ratio={width:Z.RenderWidth/Z.FrameWidth,height:Z.RenderHeight/Z.FrameHeight}}return r.destroy(),r=null,n},a.frameSizeAndRenderSize=function(i,t,e){var n=e.max_frame_width,o=e.max_frame_height;t&&(n=i.readBits(e.frame_width_bit)+1,o=i.readBits(e.frame_height_bit)+1);var r=!1;e.enable_superres&&(r=i.readBool());var s=8;r&&(s=i.readBits(3)+9);var u=n;n=Math.floor((8*u+s/2)/s);var h=u,m=o;if(i.readBool()){var A=i.readBits(16)+1,y=i.readBits(16)+1;h=i.readBits(A)+1,m=i.readBits(y)+1}return{UpscaledWidth:u,FrameWidth:n,FrameHeight:o,RenderWidth:h,RenderHeight:m}},a.getLevelString=function(i,t){return"".concat(i.toString(10).padStart(2,"0")).concat(t===0?"M":"H")},a.getChromaFormat=function(i,t,e){return i?0:t===0&&e===0?3:t===1&&e===0?2:t===1&&e===1?1:Number.NaN},a.getChromaFormatString=function(i,t,e){return i?"4:0:0":t===0&&e===0?"4:4:4":t===1&&e===0?"4:2:2":t===1&&e===1?"4:2:0":"Unknown"},a}(),d,f=function(){function a(i,t){this.TAG="FLVDemuxer",this._config=t,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=i.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=i.hasAudioTrack,this._hasVideo=i.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new S.a,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256}()}return a.prototype.destroy=function(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null},a.probe=function(i){var t=new Uint8Array(i);if(t.byteLength<9)return{needMoreData:!0};var e={match:!1};if(t[0]!==70||t[1]!==76||t[2]!==86||t[3]!==1)return e;var n,o,r=(4&t[4])>>>2!=0,s=(1&t[4])!=0,u=(n=t)[o=5]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3];return u<9?e:{match:!0,consumed:u,dataOffset:u,hasAudioTrack:r,hasVideoTrack:s}},a.prototype.bindDataSource=function(i){return i.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(a.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(i){this._onTrackMetadata=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(i){this._onMediaInfo=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(i){this._onMetaDataArrived=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(i){this._onScriptDataArrived=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onError",{get:function(){return this._onError},set:function(i){this._onError=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(i){this._onDataAvailable=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(i){this._timestampBase=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedDuration",{get:function(){return this._duration},set:function(i){this._durationOverrided=!0,this._duration=i,this._mediaInfo.duration=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedHasAudio",{set:function(i){this._hasAudioFlagOverrided=!0,this._hasAudio=i,this._mediaInfo.hasAudio=i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"overridedHasVideo",{set:function(i){this._hasVideoFlagOverrided=!0,this._hasVideo=i,this._mediaInfo.hasVideo=i},enumerable:!1,configurable:!0}),a.prototype.resetMediaInfo=function(){this._mediaInfo=new S.a},a.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},a.prototype.parseChunks=function(i,t){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new L.a("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var e=0,n=this._littleEndian;if(t===0){if(!(i.byteLength>13))return 0;e=a.probe(i).dataOffset}for(this._firstParse&&(this._firstParse=!1,t+e!==this._dataOffset&&p.a.w(this.TAG,"First time parsing but chunk byteStart invalid!"),(o=new DataView(i,e)).getUint32(0,!n)!==0&&p.a.w(this.TAG,"PrevTagSize0 !== 0 !!!"),e+=4);e<i.byteLength;){this._dispatch=!0;var o=new DataView(i,e);if(e+11+4>i.byteLength)break;var r=o.getUint8(0),s=16777215&o.getUint32(0,!n);if(e+11+s+4>i.byteLength)break;if(r===8||r===9||r===18){var u=o.getUint8(4),h=o.getUint8(5),m=o.getUint8(6)|h<<8|u<<16|o.getUint8(7)<<24;16777215&o.getUint32(7,!n)&&p.a.w(this.TAG,"Meet tag which has StreamID != 0!");var A=e+11;switch(r){case 8:this._parseAudioData(i,A,s,m);break;case 9:this._parseVideoData(i,A,s,m,t+e);break;case 18:this._parseScriptData(i,A,s)}var y=o.getUint32(11+s,!n);y!==11+s&&p.a.w(this.TAG,"Invalid PrevTagSize ".concat(y)),e+=11+s+4}else p.a.w(this.TAG,"Unsupported tag type ".concat(r,", skipped")),e+=11+s+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),e},a.prototype._parseScriptData=function(i,t,e){var n=w.parseScriptData(i,t,e);if(n.hasOwnProperty("onMetaData")){if(n.onMetaData==null||typeof n.onMetaData!="object")return void p.a.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&p.a.w(this.TAG,"Found another onMetaData tag!"),this._metadata=n;var o=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},o)),typeof o.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof o.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof o.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=o.audiodatarate),typeof o.videodatarate=="number"&&(this._mediaInfo.videoDataRate=o.videodatarate),typeof o.width=="number"&&(this._mediaInfo.width=o.width),typeof o.height=="number"&&(this._mediaInfo.height=o.height),typeof o.duration=="number"){if(!this._durationOverrided){var r=Math.floor(o.duration*this._timescale);this._duration=r,this._mediaInfo.duration=r}}else this._mediaInfo.duration=0;if(typeof o.framerate=="number"){var s=Math.floor(1e3*o.framerate);if(s>0){var u=s/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=u,this._referenceFrameRate.fps_num=s,this._referenceFrameRate.fps_den=1e3,this._mediaIn