!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i(i.s=40)}({0:function(e,t,i){"use strict";function n(e,t,i,n,r,o,s,a){var u,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=u):r&&(u=a?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var d=l.render;l.render=function(e,t){return u.call(t),d(e,t)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,u):[u]}return{exports:e,options:l}}i.d(t,"a",(function(){return n}))},10:function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},26:function(e,t,i){(function(t){var i;self,i=function(){return function(){var e={"./node_modules/es6-promise/dist/es6-promise.js":
/*!******************************************************!*\
  !*** ./node_modules/es6-promise/dist/es6-promise.js ***!
  \******************************************************/function(e,i,n){
/*!
 * @overview es6-promise - a tiny implementation of Promises/A+.
 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
 * @license   Licensed under MIT license
 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
 * @version   v4.2.8+1e68dce6
 */
e.exports=function(){"use strict";function e(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=0,o=void 0,s=void 0,a=function(e,t){p[r]=e,p[r+1]=t,2===(r+=2)&&(s?s(m):b())},u="undefined"!=typeof window?window:void 0,l=u||{},d=l.MutationObserver||l.WebKitMutationObserver,c="undefined"==typeof self&&void 0!==t&&"[object process]"==={}.toString.call(t),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var p=new Array(1e3);function m(){for(var e=0;e<r;e+=2)(0,p[e])(p[e+1]),p[e]=void 0,p[e+1]=void 0;r=0}var _,g,v,y,b=void 0;function w(e,t){var i=this,n=new this.constructor(A);void 0===n[S]&&M(n);var r=i._state;if(r){var o=arguments[r-1];a((function(){return I(r,n,o,i._result)}))}else C(i,n,e,t);return n}function E(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return R(t,e),t}c?b=function(){return t.nextTick(m)}:d?(g=0,v=new d(m),y=document.createTextNode(""),v.observe(y,{characterData:!0}),b=function(){y.data=g=++g%2}):h?((_=new MessageChannel).port1.onmessage=m,b=function(){return _.port2.postMessage(0)}):b=void 0===u?function(){try{var e=Function("return this")().require("vertx");return void 0!==(o=e.runOnLoop||e.runOnContext)?function(){o(m)}:f()}catch(e){return f()}}():f();var S=Math.random().toString(36).substring(2);function A(){}function L(t,i,n){i.constructor===t.constructor&&n===w&&i.constructor.resolve===E?function(e,t){1===t._state?x(e,t._result):2===t._state?O(e,t._result):C(t,void 0,(function(t){return R(e,t)}),(function(t){return O(e,t)}))}(t,i):void 0===n?x(t,i):e(n)?function(e,t,i){a((function(e){var n=!1,r=function(e,t,i,n){try{e.call(t,i,n)}catch(e){return e}}(i,t,(function(i){n||(n=!0,t!==i?R(e,i):x(e,i))}),(function(t){n||(n=!0,O(e,t))}),e._label);!n&&r&&(n=!0,O(e,r))}),e)}(t,i,n):x(t,i)}function R(e,t){if(e===t)O(e,new TypeError("You cannot resolve a promise with itself"));else if(r=typeof(n=t),null===n||"object"!==r&&"function"!==r)x(e,t);else{var i=void 0;try{i=t.then}catch(t){return void O(e,t)}L(e,t,i)}var n,r}function T(e){e._onerror&&e._onerror(e._result),k(e)}function x(e,t){void 0===e._state&&(e._result=t,e._state=1,0!==e._subscribers.length&&a(k,e))}function O(e,t){void 0===e._state&&(e._state=2,e._result=t,a(T,e))}function C(e,t,i,n){var r=e._subscribers,o=r.length;e._onerror=null,r[o]=t,r[o+1]=i,r[o+2]=n,0===o&&e._state&&a(k,e)}function k(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,o=e._result,s=0;s<t.length;s+=3)n=t[s],r=t[s+i],n?I(i,n,r,o):r(o);e._subscribers.length=0}}function I(t,i,n,r){var o=e(n),s=void 0,a=void 0,u=!0;if(o){try{s=n(r)}catch(e){u=!1,a=e}if(i===s)return void O(i,new TypeError("A promises callback cannot return that same promise."))}else s=r;void 0!==i._state||(o&&u?R(i,s):!1===u?O(i,a):1===t?x(i,s):2===t&&O(i,s))}var D=0;function M(e){e[S]=D++,e._state=void 0,e._result=void 0,e._subscribers=[]}var P=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[S]||M(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?x(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&x(this.promise,this._result))):O(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;void 0===this._state&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===E){var r=void 0,o=void 0,s=!1;try{r=e.then}catch(e){s=!0,o=e}if(r===w&&void 0!==e._state)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(i===B){var a=new i(A);s?O(a,o):L(a,e,r),this._willSettleAt(a,t)}else this._willSettleAt(new i((function(t){return t(e)})),t)}else this._willSettleAt(n(e),t)},e.prototype._settledAt=function(e,t,i){var n=this.promise;void 0===n._state&&(this._remaining--,2===e?O(n,i):this._result[t]=i),0===this._remaining&&x(n,this._result)},e.prototype._willSettleAt=function(e,t){var i=this;C(e,void 0,(function(e){return i._settledAt(1,t,e)}),(function(e){return i._settledAt(2,t,e)}))},e}(),B=function(){function t(e){this[S]=D++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof t?function(e,t){try{t((function(t){R(e,t)}),(function(t){O(e,t)}))}catch(t){O(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return t.prototype.catch=function(e){return this.then(null,e)},t.prototype.finally=function(t){var i=this.constructor;return e(t)?this.then((function(e){return i.resolve(t()).then((function(){return e}))}),(function(e){return i.resolve(t()).then((function(){throw e}))})):this.then(t,t)},t}();return B.prototype.then=w,B.all=function(e){return new P(this,e).promise},B.race=function(e){var t=this;return i(e)?new t((function(i,n){for(var r=e.length,o=0;o<r;o++)t.resolve(e[o]).then(i,n)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},B.resolve=E,B.reject=function(e){var t=new this(A);return O(t,e),t},B._setScheduler=function(e){s=e},B._setAsap=function(e){a=e},B._asap=a,B.polyfill=function(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var i=null;try{i=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===i&&!t.cast)return}e.Promise=B},B.Promise=B,B}()},"./node_modules/events/events.js":
/*!***************************************!*\
  !*** ./node_modules/events/events.js ***!
  \***************************************/function(e){"use strict";var t,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,i){return Function.prototype.apply.call(e,t,i)};t=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(i,n){function r(i){e.removeListener(t,o),n(i)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),i([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,i){"function"==typeof e.on&&m(e,"error",t,i)}(e,r,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,i,n){var r,o,s,l;if(a(i),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,i.listener?i.listener:i),o=e._events),s=o[t]),void 0===s)s=o[t]=i,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[i,s]:[s,i]:n?s.unshift(i):s.push(i),(r=u(e))>0&&s.length>r&&!s.warned){s.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=s.length,l=d,console&&console.warn&&console.warn(l)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,i){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:i},r=d.bind(n);return r.listener=i,n.wrapFn=r,r}function h(e,t,i){var n=e._events;if(void 0===n)return[];var r=n[t];return void 0===r?[]:"function"==typeof r?i?[r.listener||r]:[r]:i?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(r):p(r,r.length)}function f(e){var t=this._events;if(void 0!==t){var i=t[e];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function p(e,t){for(var i=new Array(t),n=0;n<t;++n)i[n]=e[n];return i}function m(e,t,i,n){if("function"==typeof e.on)n.once?e.once(t,i):e.on(t,i);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){n.once&&e.removeEventListener(t,r),i(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,d=p(u,l);for(i=0;i<l;++i)n(d[i],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var i,n,r,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(i=n[e]))return this;if(i===t||i.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||t));else if("function"!=typeof i){for(r=-1,o=i.length-1;o>=0;o--)if(i[o]===t||i[o].listener===t){s=i[o].listener,r=o;break}if(r<0)return this;0===r?i.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(i,r),1===i.length&&(n[e]=i[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,i,n;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[e]),this;if(0===arguments.length){var r,o=Object.keys(i);for(n=0;n<o.length;++n)"removeListener"!==(r=o[n])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=i[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},"./node_modules/webworkify-webpack/index.js":
/*!**************************************************!*\
  !*** ./node_modules/webworkify-webpack/index.js ***!
  \**************************************************/function(e,t,i){function n(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.i=function(e){return e},i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/",i.oe=function(e){throw console.error(e),e};var n=i(i.s=ENTRY_MODULE);return n.default||n}function r(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(e,t,n){var o={};o[n]=[];var s=t.toString(),a=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!a)return o;for(var u,l=a[1],d=new RegExp("(\\\\n|\\W)"+r(l)+"\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)","g");u=d.exec(s);)"dll-reference"!==u[3]&&o[n].push(u[3]);for(d=new RegExp("\\("+r(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)',"g");u=d.exec(s);)e[u[2]]||(o[n].push(u[1]),e[u[2]]=i(u[1]).m),o[u[2]]=o[u[2]]||[],o[u[2]].push(u[4]);for(var c,h=Object.keys(o),f=0;f<h.length;f++)for(var p=0;p<o[h[f]].length;p++)c=o[h[f]][p],isNaN(1*c)||(o[h[f]][p]=1*o[h[f]][p]);return o}function s(e){return Object.keys(e).reduce((function(t,i){return t||e[i].length>0}),!1)}e.exports=function(e,t){t=t||{};var r={main:i.m},a=t.all?{main:Object.keys(r.main)}:function(e,t){for(var i={main:[t]},n={main:[]},r={main:{}};s(i);)for(var a=Object.keys(i),u=0;u<a.length;u++){var l=a[u],d=i[l].pop();if(r[l]=r[l]||{},!r[l][d]&&e[l][d]){r[l][d]=!0,n[l]=n[l]||[],n[l].push(d);for(var c=o(e,e[l][d],l),h=Object.keys(c),f=0;f<h.length;f++)i[h[f]]=i[h[f]]||[],i[h[f]]=i[h[f]].concat(c[h[f]])}}return n}(r,e),u="";Object.keys(a).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;a[e][t];)t++;a[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",u=u+"var "+e+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+a[e].map((function(t){return JSON.stringify(t)+": "+r[e][t].toString()})).join(",")+"});\n"})),u=u+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+a.main.map((function(e){return JSON.stringify(e)+": "+r.main[e].toString()})).join(",")+"}))(self);";var l=new window.Blob([u],{type:"text/javascript"});if(t.bare)return l;var d=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(l),c=new window.Worker(d);return c.objectURL=d,c}},"./src/config.js":
/*!***********************!*\
  !*** ./src/config.js ***!
  \***********************/function(e,t,i){"use strict";i.r(t),i.d(t,{defaultConfig:function(){return n},createDefaultConfig:function(){return r}});var n={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function r(){return Object.assign({},n)}},"./src/core/features.js":
/*!******************************!*\
  !*** ./src/core/features.js ***!
  \******************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),r=i(/*! ../config.js */"./src/config.js"),o=function(){function e(){}return e.supportMSEH264Playback=function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')},e.supportNetworkStreamIO=function(){var e=new n.default({},(0,r.createDefaultConfig)()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t},e.getNetworkLoaderTypeName=function(){var e=new n.default({},(0,r.createDefaultConfig)()),t=e.loaderType;return e.destroy(),t},e.supportNativeMediaPlayback=function(t){null==e.videoElement&&(e.videoElement=window.document.createElement("video"));var i=e.videoElement.canPlayType(t);return"probably"===i||"maybe"==i},e.getFeatureList=function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t},e}();t.default=o},"./src/core/media-info.js":
/*!********************************!*\
  !*** ./src/core/media-info.js ***!
  \********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){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 e.prototype.isComplete=function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=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;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t},e.prototype.isSeekable=function(){return!0===this.hasKeyframesIndex},e.prototype.getNearestKeyframe=function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,i=this._search(t.times,e);return{index:i,milliseconds:t.times[i],fileposition:t.filepositions[i]}},e.prototype._search=function(e,t){var i=0,n=e.length-1,r=0,o=0,s=n;for(t<e[0]&&(i=0,o=s+1);o<=s;){if((r=o+Math.floor((s-o)/2))===n||t>=e[r]&&t<e[r+1]){i=r;break}e[r]<t?o=r+1:s=r-1}return i},e}();t.default=n},"./src/core/media-segment-info.js":
/*!****************************************!*\
  !*** ./src/core/media-segment-info.js ***!
  \****************************************/function(e,t,i){"use strict";i.r(t),i.d(t,{SampleInfo:function(){return n},MediaSegmentInfo:function(){return r},IDRSampleList:function(){return o},MediaSegmentInfoList:function(){return s}});var n=function(e,t,i,n,r){this.dts=e,this.pts=t,this.duration=i,this.originalDts=n,this.isSyncPoint=r,this.fileposition=null},r=function(){function e(){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 e.prototype.appendSyncPoint=function(e){e.isSyncPoint=!0,this.syncPoints.push(e)},e}(),o=function(){function e(){this._list=[]}return e.prototype.clear=function(){this._list=[]},e.prototype.appendArray=function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))},e.prototype.getLastSyncPointBeforeDts=function(e){if(0==this._list.length)return null;var t=this._list,i=0,n=t.length-1,r=0,o=0,s=n;for(e<t[0].dts&&(i=0,o=s+1);o<=s;){if((r=o+Math.floor((s-o)/2))===n||e>=t[r].dts&&e<t[r+1].dts){i=r;break}t[r].dts<e?o=r+1:s=r-1}return this._list[i]},e}(),s=function(){function e(e){this._type=e,this._list=[],this._lastAppendLocation=-1}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._list.length},enumerable:!1,configurable:!0}),e.prototype.isEmpty=function(){return 0===this._list.length},e.prototype.clear=function(){this._list=[],this._lastAppendLocation=-1},e.prototype._searchNearestSegmentBefore=function(e){var t=this._list;if(0===t.length)return-2;var i=t.length-1,n=0,r=0,o=i,s=0;if(e<t[0].originalBeginDts)return s=-1;for(;r<=o;){if((n=r+Math.floor((o-r)/2))===i||e>t[n].lastSample.originalDts&&e<t[n+1].originalBeginDts){s=n;break}t[n].originalBeginDts<e?r=n+1:o=n-1}return s},e.prototype._searchNearestSegmentAfter=function(e){return this._searchNearestSegmentBefore(e)+1},e.prototype.append=function(e){var t=this._list,i=e,n=this._lastAppendLocation,r=0;-1!==n&&n<t.length&&i.originalBeginDts>=t[n].lastSample.originalDts&&(n===t.length-1||n<t.length-1&&i.originalBeginDts<t[n+1].originalBeginDts)?r=n+1:t.length>0&&(r=this._searchNearestSegmentBefore(i.originalBeginDts)+1),this._lastAppendLocation=r,this._list.splice(r,0,i)},e.prototype.getLastSegmentBefore=function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null},e.prototype.getLastSampleBefore=function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null},e.prototype.getLastSyncPointBefore=function(e){for(var t=this._searchNearestSegmentBefore(e),i=this._list[t].syncPoints;0===i.length&&t>0;)t--,i=this._list[t].syncPoints;return i.length>0?i[i.length-1]:null},e}()},"./src/core/mse-controller.js":
/*!************************************!*\
  !*** ./src/core/mse-controller.js ***!
  \************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./mse-events.js */"./src/core/mse-events.js"),u=i(/*! ./media-segment-info.js */"./src/core/media-segment-info.js"),l=i(/*! ../utils/exception.js */"./src/utils/exception.js"),d=function(){function e(e){this.TAG="MSEController",this._config=e,this._emitter=new(r()),this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new u.IDRSampleList}return e.prototype.destroy=function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaSource)throw new l.IllegalStateException("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL},e.prototype.detachMediaElement=function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var i=this._pendingSegments[t];i.splice(0,i.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var n=this._sourceBuffers[t];if(n){if("closed"!==e.readyState){try{e.removeSourceBuffer(n)}catch(e){o.default.e(this.TAG,e.message)}n.removeEventListener("error",this.e.onSourceBufferError),n.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){o.default.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)},e.prototype.appendInitSegment=function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var i=e,n=""+i.container;i.codec&&i.codec.length>0&&(n+=";codecs="+i.codec);var r=!1;if(o.default.v(this.TAG,"Received Initialization Segment, mimeType: "+n),this._lastInitSegments[i.type]=i,n!==this._mimeTypes[i.type]){if(this._mimeTypes[i.type])o.default.v(this.TAG,"Notice: "+i.type+" mimeType changed, origin: "+this._mimeTypes[i.type]+", target: "+n);else{r=!0;try{var u=this._sourceBuffers[i.type]=this._mediaSource.addSourceBuffer(n);u.addEventListener("error",this.e.onSourceBufferError),u.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return o.default.e(this.TAG,e.message),void this._emitter.emit(a.default.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[i.type]=n}t||this._pendingSegments[i.type].push(i),r||this._sourceBuffers[i.type]&&!this._sourceBuffers[i.type].updating&&this._doAppendSegments(),s.default.safari&&"audio/mpeg"===i.container&&i.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=i.mediaDuration/1e3,this._updateMediaSourceDuration())},e.prototype.appendMediaSegment=function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var i=this._sourceBuffers[t.type];!i||i.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()},e.prototype.seek=function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var i=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{i.abort()}catch(e){o.default.e(this.TAG,e.message)}this._idrList.clear();var n=this._pendingSegments[t];if(n.splice(0,n.length),"closed"!==this._mediaSource.readyState){for(var r=0;r<i.buffered.length;r++){var a=i.buffered.start(r),u=i.buffered.end(r);this._pendingRemoveRanges[t].push({start:a,end:u})}if(i.updating||this._doRemoveRanges(),s.default.safari){var l=this._lastInitSegments[t];l&&(this._pendingSegments[t].push(l),i.updating||this._doAppendSegments())}}}},e.prototype.endOfStream=function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)},e.prototype.getNearestKeyframe=function(e){return this._idrList.getLastSyncPointBeforeDts(e)},e.prototype._needCleanupSourceBuffer=function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var i=this._sourceBuffers[t];if(i){var n=i.buffered;if(n.length>=1&&e-n.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1},e.prototype._doCleanupSourceBuffer=function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var i=this._sourceBuffers[t];if(i){for(var n=i.buffered,r=!1,o=0;o<n.length;o++){var s=n.start(o),a=n.end(o);if(s<=e&&e<a+3){if(e-s>=this._config.autoCleanupMaxBackwardDuration){r=!0;var u=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:u})}}else a<e&&(r=!0,this._pendingRemoveRanges[t].push({start:s,end:a}))}r&&!i.updating&&this._doRemoveRanges()}}},e.prototype._updateMediaSourceDuration=function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,i=this._pendingMediaDuration;i>0&&(isNaN(t)||i>t)&&(o.default.v(this.TAG,"Update MediaSource duration from "+t+" to "+i),this._mediaSource.duration=i),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}},e.prototype._doRemoveRanges=function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],i=this._pendingRemoveRanges[e];i.length&&!t.updating;){var n=i.shift();t.remove(n.start,n.end)}},e.prototype._doAppendSegments=function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var i=e[t].shift();if(i.timestampOffset){var n=this._sourceBuffers[t].timestampOffset,r=i.timestampOffset/1e3;Math.abs(n-r)>.1&&(o.default.v(this.TAG,"Update MPEG audio timestampOffset from "+n+" to "+r),this._sourceBuffers[t].timestampOffset=r),delete i.timestampOffset}if(!i.data||0===i.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(i.data),this._isBufferFull=!1,"video"===t&&i.hasOwnProperty("info")&&this._idrList.appendArray(i.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(i),22===e.code?(this._isBufferFull||this._emitter.emit(a.default.BUFFER_FULL),this._isBufferFull=!0):(o.default.e(this.TAG,e.message),this._emitter.emit(a.default.ERROR,{code:e.code,msg:e.message}))}}},e.prototype._onSourceOpen=function(){if(o.default.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(a.default.SOURCE_OPEN)},e.prototype._onSourceEnded=function(){o.default.v(this.TAG,"MediaSource onSourceEnded")},e.prototype._onSourceClose=function(){o.default.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))},e.prototype._hasPendingSegments=function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0},e.prototype._hasPendingRemoveRanges=function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0},e.prototype._onSourceBufferUpdateEnd=function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(a.default.UPDATE_END)},e.prototype._onSourceBufferError=function(e){o.default.e(this.TAG,"SourceBuffer Error: "+e)},e}();t.default=d},"./src/core/mse-events.js":
/*!********************************!*\
  !*** ./src/core/mse-events.js ***!
  \********************************/function(e,t,i){"use strict";i.r(t),t.default={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"}},"./src/core/transmuxer.js":
/*!********************************!*\
  !*** ./src/core/transmuxer.js ***!
  \********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! webworkify-webpack */"./node_modules/webworkify-webpack/index.js"),s=i.n(o),a=i(/*! ../utils/logger.js */"./src/utils/logger.js"),u=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),l=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),d=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),c=i(/*! ./media-info.js */"./src/core/media-info.js"),h=function(){function e(e,t){if(this.TAG="Transmuxer",this._emitter=new(r()),t.enableWorker&&"undefined"!=typeof Worker)try{this._worker=s()(/*! ./transmuxing-worker */"./src/core/transmuxing-worker.js"),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[e,t]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},u.default.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:u.default.getConfig()})}catch(i){a.default.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new l.default(e,t)}else this._controller=new l.default(e,t);if(this._controller){var i=this._controller;i.on(d.default.IO_ERROR,this._onIOError.bind(this)),i.on(d.default.DEMUX_ERROR,this._onDemuxError.bind(this)),i.on(d.default.INIT_SEGMENT,this._onInitSegment.bind(this)),i.on(d.default.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),i.on(d.default.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),i.on(d.default.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),i.on(d.default.MEDIA_INFO,this._onMediaInfo.bind(this)),i.on(d.default.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),i.on(d.default.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),i.on(d.default.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),i.on(d.default.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return e.prototype.destroy=function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),u.default.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.hasWorker=function(){return null!=this._worker},e.prototype.open=function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()},e.prototype.close=function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()},e.prototype.seek=function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)},e.prototype.pause=function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()},e.prototype.resume=function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()},e.prototype._onInitSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.INIT_SEGMENT,e,t)}))},e.prototype._onMediaSegment=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.MEDIA_SEGMENT,e,t)}))},e.prototype._onLoadingComplete=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(d.default.LOADING_COMPLETE)}))},e.prototype._onRecoveredEarlyEof=function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(d.default.RECOVERED_EARLY_EOF)}))},e.prototype._onMediaInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.MEDIA_INFO,e)}))},e.prototype._onMetaDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.METADATA_ARRIVED,e)}))},e.prototype._onScriptDataArrived=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.SCRIPTDATA_ARRIVED,e)}))},e.prototype._onStatisticsInfo=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.STATISTICS_INFO,e)}))},e.prototype._onIOError=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.IO_ERROR,e,t)}))},e.prototype._onDemuxError=function(e,t){var i=this;Promise.resolve().then((function(){i._emitter.emit(d.default.DEMUX_ERROR,e,t)}))},e.prototype._onRecommendSeekpoint=function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(d.default.RECOMMEND_SEEKPOINT,e)}))},e.prototype._onLoggingConfigChanged=function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})},e.prototype._onWorkerMessage=function(e){var t=e.data,i=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case d.default.INIT_SEGMENT:case d.default.MEDIA_SEGMENT:this._emitter.emit(t.msg,i.type,i.data);break;case d.default.LOADING_COMPLETE:case d.default.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case d.default.MEDIA_INFO:Object.setPrototypeOf(i,c.default.prototype),this._emitter.emit(t.msg,i);break;case d.default.METADATA_ARRIVED:case d.default.SCRIPTDATA_ARRIVED:case d.default.STATISTICS_INFO:this._emitter.emit(t.msg,i);break;case d.default.IO_ERROR:case d.default.DEMUX_ERROR:this._emitter.emit(t.msg,i.type,i.info);break;case d.default.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,i);break;case"logcat_callback":a.default.emitter.emit("log",i.type,i.logcat)}},e}();t.default=h},"./src/core/transmuxing-controller.js":
/*!********************************************!*\
  !*** ./src/core/transmuxing-controller.js ***!
  \********************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./media-info.js */"./src/core/media-info.js"),u=i(/*! ../demux/flv-demuxer.js */"./src/demux/flv-demuxer.js"),l=i(/*! ../remux/mp4-remuxer.js */"./src/remux/mp4-remuxer.js"),d=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),c=i(/*! ../io/io-controller.js */"./src/io/io-controller.js"),h=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js"),f=function(){function e(e,t){this.TAG="TransmuxingController",this._emitter=new(r()),this._config=t,e.segments||(e.segments=[{duration:e.duration,filesize:e.filesize,url:e.url}]),"boolean"!=typeof e.cors&&(e.cors=!0),"boolean"!=typeof e.withCredentials&&(e.withCredentials=!1),this._mediaDataSource=e,this._currentSegmentIndex=0;var i=0;this._mediaDataSource.segments.forEach((function(n){n.timestampBase=i,i+=n.duration,n.cors=e.cors,n.withCredentials=e.withCredentials,t.referrerPolicy&&(n.referrerPolicy=t.referrerPolicy)})),isNaN(i)||this._mediaDataSource.duration===i||(this._mediaDataSource.duration=i),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return e.prototype.destroy=function(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.start=function(){this._loadSegment(0),this._enableStatisticsReporter()},e.prototype._loadSegment=function(e,t){this._currentSegmentIndex=e;var i=this._mediaDataSource.segments[e],n=this._ioctl=new c.default(i,this._config,e);n.onError=this._onIOException.bind(this),n.onSeeked=this._onIOSeeked.bind(this),n.onComplete=this._onIOComplete.bind(this),n.onRedirect=this._onIORedirect.bind(this),n.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):n.onDataArrival=this._onInitChunkArrival.bind(this),n.open(t)},e.prototype.stop=function(){this._internalAbort(),this._disableStatisticsReporter()},e.prototype._internalAbort=function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)},e.prototype.pause=function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())},e.prototype.resume=function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())},e.prototype.seek=function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var i=this._mediaInfo.segments[t];if(null==i)this._pendingSeekTime=e;else{var n=i.getNearestKeyframe(e);this._remuxer.seek(n.milliseconds),this._ioctl.seek(n.fileposition),this._pendingResolveSeekPoint=n.milliseconds}}else{var r=this._mediaInfo.segments[t];null==r?(this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t)):(n=r.getNearestKeyframe(e),this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,n.fileposition),this._pendingResolveSeekPoint=n.milliseconds,this._reportSegmentMediaInfo(t))}this._enableStatisticsReporter()}},e.prototype._searchSegmentIndexContains=function(e){for(var t=this._mediaDataSource.segments,i=t.length-1,n=0;n<t.length;n++)if(e<t[n].timestampBase){i=n-1;break}return i},e.prototype._onInitChunkArrival=function(e,t){var i=this,n=null,r=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,r=this._demuxer.parseChunks(e,t);else if((n=u.default.probe(e)).match){this._demuxer=new u.default(n,this._config),this._remuxer||(this._remuxer=new l.default(this._config));var s=this._mediaDataSource;null==s.duration||isNaN(s.duration)||(this._demuxer.overridedDuration=s.duration),"boolean"==typeof s.hasAudio&&(this._demuxer.overridedHasAudio=s.hasAudio),"boolean"==typeof s.hasVideo&&(this._demuxer.overridedHasVideo=s.hasVideo),this._demuxer.timestampBase=s.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),r=this._demuxer.parseChunks(e,t)}else n=null,o.default.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){i._internalAbort()})),this._emitter.emit(h.default.DEMUX_ERROR,d.default.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),r=0;return r},e.prototype._onMediaInfo=function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,a.default.prototype));var i=Object.assign({},e);Object.setPrototypeOf(i,a.default.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=i,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))},e.prototype._onMetaDataArrived=function(e){this._emitter.emit(h.default.METADATA_ARRIVED,e)},e.prototype._onScriptDataArrived=function(e){this._emitter.emit(h.default.SCRIPTDATA_ARRIVED,e)},e.prototype._onIOSeeked=function(){this._remuxer.insertDiscontinuity()},e.prototype._onIOComplete=function(e){var t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(h.default.LOADING_COMPLETE),this._disableStatisticsReporter())},e.prototype._onIORedirect=function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e},e.prototype._onIORecoveredEarlyEof=function(){this._emitter.emit(h.default.RECOVERED_EARLY_EOF)},e.prototype._onIOException=function(e,t){o.default.e(this.TAG,"IOException: type = "+e+", code = "+t.code+", msg = "+t.msg),this._emitter.emit(h.default.IO_ERROR,e,t),this._disableStatisticsReporter()},e.prototype._onDemuxException=function(e,t){o.default.e(this.TAG,"DemuxException: type = "+e+", info = "+t),this._emitter.emit(h.default.DEMUX_ERROR,e,t)},e.prototype._onRemuxerInitSegmentArrival=function(e,t){this._emitter.emit(h.default.INIT_SEGMENT,e,t)},e.prototype._onRemuxerMediaSegmentArrival=function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(h.default.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var i=t.info.syncPoints,n=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,s.default.safari&&i.length>0&&i[0].originalDts===n&&(n=i[0].pts),this._emitter.emit(h.default.RECOMMEND_SEEKPOINT,n)}},e.prototype._enableStatisticsReporter=function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))},e.prototype._disableStatisticsReporter=function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype._reportSegmentMediaInfo=function(e){var t=this._mediaInfo.segments[e],i=Object.assign({},t);i.duration=this._mediaInfo.duration,i.segmentCount=this._mediaInfo.segmentCount,delete i.segments,delete i.keyframesIndex,this._emitter.emit(h.default.MEDIA_INFO,i)},e.prototype._reportStatisticsInfo=function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(h.default.STATISTICS_INFO,e)},e}();t.default=f},"./src/core/transmuxing-events.js":
/*!****************************************!*\
  !*** ./src/core/transmuxing-events.js ***!
  \****************************************/function(e,t,i){"use strict";i.r(t),t.default={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"}},"./src/core/transmuxing-worker.js":
/*!****************************************!*\
  !*** ./src/core/transmuxing-worker.js ***!
  \****************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logging-control.js */"./src/utils/logging-control.js"),r=i(/*! ../utils/polyfill.js */"./src/utils/polyfill.js"),o=i(/*! ./transmuxing-controller.js */"./src/core/transmuxing-controller.js"),s=i(/*! ./transmuxing-events.js */"./src/core/transmuxing-events.js");t.default=function(e){var t=null,i=function(t,i){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:i}})}.bind(this);function a(t,i){var n={msg:s.default.INIT_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function u(t,i){var n={msg:s.default.MEDIA_SEGMENT,data:{type:t,data:i}};e.postMessage(n,[i.data])}function l(){var t={msg:s.default.LOADING_COMPLETE};e.postMessage(t)}function d(){var t={msg:s.default.RECOVERED_EARLY_EOF};e.postMessage(t)}function c(t){var i={msg:s.default.MEDIA_INFO,data:t};e.postMessage(i)}function h(t){var i={msg:s.default.METADATA_ARRIVED,data:t};e.postMessage(i)}function f(t){var i={msg:s.default.SCRIPTDATA_ARRIVED,data:t};e.postMessage(i)}function p(t){var i={msg:s.default.STATISTICS_INFO,data:t};e.postMessage(i)}function m(t,i){e.postMessage({msg:s.default.IO_ERROR,data:{type:t,info:i}})}function _(t,i){e.postMessage({msg:s.default.DEMUX_ERROR,data:{type:t,info:i}})}function g(t){e.postMessage({msg:s.default.RECOMMEND_SEEKPOINT,data:t})}r.default.install(),e.addEventListener("message",(function(r){switch(r.data.cmd){case"init":(t=new o.default(r.data.param[0],r.data.param[1])).on(s.default.IO_ERROR,m.bind(this)),t.on(s.default.DEMUX_ERROR,_.bind(this)),t.on(s.default.INIT_SEGMENT,a.bind(this)),t.on(s.default.MEDIA_SEGMENT,u.bind(this)),t.on(s.default.LOADING_COMPLETE,l.bind(this)),t.on(s.default.RECOVERED_EARLY_EOF,d.bind(this)),t.on(s.default.MEDIA_INFO,c.bind(this)),t.on(s.default.METADATA_ARRIVED,h.bind(this)),t.on(s.default.SCRIPTDATA_ARRIVED,f.bind(this)),t.on(s.default.STATISTICS_INFO,p.bind(this)),t.on(s.default.RECOMMEND_SEEKPOINT,g.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(r.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var v=r.data.param;n.default.applyConfig(v),!0===v.enableCallback?n.default.addLogListener(i):n.default.removeLogListener(i)}}))}},"./src/demux/amf-parser.js":
/*!*********************************!*\
  !*** ./src/demux/amf-parser.js ***!
  \*********************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ../utils/utf8-conv.js */"./src/utils/utf8-conv.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=(n=new ArrayBuffer(2),new DataView(n).setInt16(0,256,!0),256===new Int16Array(n)[0]),u=function(){function e(){}return e.parseScriptData=function(t,i,n){var o={};try{var s=e.parseValue(t,i,n),a=e.parseValue(t,i+s.size,n-s.size);o[s.data]=a.data}catch(e){r.default.e("AMF",e.toString())}return o},e.parseObject=function(t,i,n){if(n<3)throw new s.IllegalStateException("Data not enough when parse ScriptDataObject");var r=e.parseString(t,i,n),o=e.parseValue(t,i+r.size,n-r.size),a=o.objectEnd;return{data:{name:r.data,value:o.data},size:r.size+o.size,objectEnd:a}},e.parseVariable=function(t,i,n){return e.parseObject(t,i,n)},e.parseString=function(e,t,i){if(i<2)throw new s.IllegalStateException("Data not enough when parse String");var n=new DataView(e,t,i).getUint16(0,!a);return{data:n>0?(0,o.default)(new Uint8Array(e,t+2,n)):"",size:2+n}},e.parseLongString=function(e,t,i){if(i<4)throw new s.IllegalStateException("Data not enough when parse LongString");var n=new DataView(e,t,i).getUint32(0,!a);return{data:n>0?(0,o.default)(new Uint8Array(e,t+4,n)):"",size:4+n}},e.parseDate=function(e,t,i){if(i<10)throw new s.IllegalStateException("Data size invalid when parse Date");var n=new DataView(e,t,i),r=n.getFloat64(0,!a),o=n.getInt16(8,!a);return{data:new Date(r+=60*o*1e3),size:10}},e.parseValue=function(t,i,n){if(n<1)throw new s.IllegalStateException("Data not enough when parse Value");var o,u=new DataView(t,i,n),l=1,d=u.getUint8(0),c=!1;try{switch(d){case 0:o=u.getFloat64(1,!a),l+=8;break;case 1:o=!!u.getUint8(1),l+=1;break;case 2:var h=e.parseString(t,i+1,n-1);o=h.data,l+=h.size;break;case 3:o={};var f=0;for(9==(16777215&u.getUint32(n-4,!a))&&(f=3);l<n-4;){var p=e.parseObject(t,i+l,n-l-f);if(p.objectEnd)break;o[p.data.name]=p.data.value,l+=p.size}l<=n-3&&9==(16777215&u.getUint32(l-1,!a))&&(l+=3);break;case 8:for(o={},l+=4,f=0,9==(16777215&u.getUint32(n-4,!a))&&(f=3);l<n-8;){var m=e.parseVariable(t,i+l,n-l-f);if(m.objectEnd)break;o[m.data.name]=m.data.value,l+=m.size}l<=n-3&&9==(16777215&u.getUint32(l-1,!a))&&(l+=3);break;case 9:o=void 0,l=1,c=!0;break;case 10:o=[];var _=u.getUint32(1,!a);l+=4;for(var g=0;g<_;g++){var v=e.parseValue(t,i+l,n-l);o.push(v.data),l+=v.size}break;case 11:var y=e.parseDate(t,i+1,n-1);o=y.data,l+=y.size;break;case 12:var b=e.parseString(t,i+1,n-1);o=b.data,l+=b.size;break;default:l=n,r.default.w("AMF","Unsupported AMF value type "+d)}}catch(e){r.default.e("AMF",e.toString())}return{data:o,size:l,objectEnd:c}},e}();t.default=u},"./src/demux/demux-errors.js":
/*!***********************************!*\
  !*** ./src/demux/demux-errors.js ***!
  \***********************************/function(e,t,i){"use strict";i.r(t),t.default={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"}},"./src/demux/exp-golomb.js":
/*!*********************************!*\
  !*** ./src/demux/exp-golomb.js ***!
  \*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/exception.js */"./src/utils/exception.js"),r=function(){function e(e){this.TAG="ExpGolomb",this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}return e.prototype.destroy=function(){this._buffer=null},e.prototype._fillCurrentWord=function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new n.IllegalStateException("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t},e.prototype.readBits=function(e){if(e>32)throw new n.InvalidArgumentException("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var i=this._current_word_bits_left?this._current_word:0;i>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var o=Math.min(r,this._current_word_bits_left),s=this._current_word>>>32-o;return this._current_word<<=o,this._current_word_bits_left-=o,i=i<<o|s},e.prototype.readBool=function(){return 1===this.readBits(1)},e.prototype.readByte=function(){return this.readBits(8)},e.prototype._skipLeadingZero=function(){var e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()},e.prototype.readUEG=function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1},e.prototype.readSEG=function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)},e}();t.default=r},"./src/demux/flv-demuxer.js":
/*!**********************************!*\
  !*** ./src/demux/flv-demuxer.js ***!
  \**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./amf-parser.js */"./src/demux/amf-parser.js"),o=i(/*! ./sps-parser.js */"./src/demux/sps-parser.js"),s=i(/*! ./demux-errors.js */"./src/demux/demux-errors.js"),a=i(/*! ../core/media-info.js */"./src/core/media-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),l=function(){function e(e,t){var i;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=e.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=e.hasAudioTrack,this._hasVideo=e.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new a.default,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=(i=new ArrayBuffer(2),new DataView(i).setInt16(0,256,!0),256===new Int16Array(i)[0])}return e.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},e.probe=function(e){var t=new Uint8Array(e),i={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return i;var n,r,o=(4&t[4])>>>2!=0,s=0!=(1&t[4]),a=(n=t)[r=5]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3];return a<9?i:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:o,hasVideoTrack:s}},e.prototype.bindDataSource=function(e){return e.onDataArrival=this.parseChunks.bind(this),this},Object.defineProperty(e.prototype,"onTrackMetadata",{get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaInfo",{get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMetaDataArrived",{get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScriptDataArrived",{get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataAvailable",{get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"timestampBase",{get:function(){return this._timestampBase},set:function(e){this._timestampBase=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedDuration",{get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasAudio",{set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overridedHasVideo",{set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e},enumerable:!1,configurable:!0}),e.prototype.resetMediaInfo=function(){this._mediaInfo=new a.default},e.prototype._isInitialMetadataDispatched=function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched},e.prototype.parseChunks=function(t,i){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new u.IllegalStateException("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,o=this._littleEndian;if(0===i){if(!(t.byteLength>13))return 0;r=e.probe(t).dataOffset}for(this._firstParse&&(this._firstParse=!1,i+r!==this._dataOffset&&n.default.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==(s=new DataView(t,r)).getUint32(0,!o)&&n.default.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);r<t.byteLength;){this._dispatch=!0;var s=new DataView(t,r);if(r+11+4>t.byteLength)break;var a=s.getUint8(0),l=16777215&s.getUint32(0,!o);if(r+11+l+4>t.byteLength)break;if(8===a||9===a||18===a){var d=s.getUint8(4),c=s.getUint8(5),h=s.getUint8(6)|c<<8|d<<16|s.getUint8(7)<<24;0!=(16777215&s.getUint32(7,!o))&&n.default.w(this.TAG,"Meet tag which has StreamID != 0!");var f=r+11;switch(a){case 8:this._parseAudioData(t,f,l,h);break;case 9:this._parseVideoData(t,f,l,h,i+r);break;case 18:this._parseScriptData(t,f,l)}var p=s.getUint32(11+l,!o);p!==11+l&&n.default.w(this.TAG,"Invalid PrevTagSize "+p),r+=11+l+4}else n.default.w(this.TAG,"Unsupported tag type "+a+", skipped"),r+=11+l+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r},e.prototype._parseScriptData=function(e,t,i){var o=r.default.parseScriptData(e,t,i);if(o.hasOwnProperty("onMetaData")){if(null==o.onMetaData||"object"!=typeof o.onMetaData)return void n.default.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&n.default.w(this.TAG,"Found another onMetaData tag!"),this._metadata=o;var s=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},s)),"boolean"==typeof s.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=s.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof s.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=s.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof s.audiodatarate&&(this._mediaInfo.audioDataRate=s.audiodatarate),"number"==typeof s.videodatarate&&(this._mediaInfo.videoDataRate=s.videodatarate),"number"==typeof s.width&&(this._mediaInfo.width=s.width),"number"==typeof s.height&&(this._mediaInfo.height=s.height),"number"==typeof s.duration){if(!this._durationOverrided){var a=Math.floor(s.duration*this._timescale);this._duration=a,this._mediaInfo.duration=a}}else this._mediaInfo.duration=0;if("number"==typeof s.framerate){var u=Math.floor(1e3*s.framerate);if(u>0){var l=u/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=l,this._referenceFrameRate.fps_num=u,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=l}}if("object"==typeof s.keyframes){this._mediaInfo.hasKeyframesIndex=!0;var d=s.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(d),s.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=s,n.default.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(o).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},o))},e.prototype._parseKeyframesIndex=function(e){for(var t=[],i=[],n=1;n<e.times.length;n++){var r=this._timestampBase+Math.floor(1e3*e.times[n]);t.push(r),i.push(e.filepositions[n])}return{times:t,filepositions:i}},e.prototype._parseAudioData=function(e,t,i,r){if(i<=1)n.default.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var o=new DataView(e,t,i).getUint8(0),a=o>>>4;if(2===a||10===a){var u=0,l=(12&o)>>>2;if(l>=0&&l<=4){u=this._flvSoundRateTable[l];var d=1&o,c=this._audioMetadata,h=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(c=this._audioMetadata={}).type="audio",c.id=h.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=u,c.channelCount=0===d?1:2),10===a){var f=this._parseAACAudioData(e,t+1,i-1);if(null==f)return;if(0===f.packetType){c.config&&n.default.w(this.TAG,"Found another AudioSpecificConfig!");var p=f.data;c.audioSampleRate=p.samplingRate,c.channelCount=p.channelCount,c.codec=p.codec,c.originalCodec=p.originalCodec,c.config=p.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,n.default.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",c),(g=this._mediaInfo).audioCodec=c.originalCodec,g.audioSampleRate=c.audioSampleRate,g.audioChannelCount=c.channelCount,g.hasVideo?null!=g.videoCodec&&(g.mimeType='video/x-flv; codecs="'+g.videoCodec+","+g.audioCodec+'"'):g.mimeType='video/x-flv; codecs="'+g.audioCodec+'"',g.isComplete()&&this._onMediaInfo(g)}else if(1===f.packetType){var m=this._timestampBase+r,_={unit:f.data,length:f.data.byteLength,dts:m,pts:m};h.samples.push(_),h.length+=f.data.length}else n.default.e(this.TAG,"Flv: Unsupported AAC data type "+f.packetType)}else if(2===a){if(!c.codec){var g;if(null==(p=this._parseMP3AudioData(e,t+1,i-1,!0)))return;c.audioSampleRate=p.samplingRate,c.channelCount=p.channelCount,c.codec=p.codec,c.originalCodec=p.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,n.default.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c),(g=this._mediaInfo).audioCodec=c.codec,g.audioSampleRate=c.audioSampleRate,g.audioChannelCount=c.channelCount,g.audioDataRate=p.bitRate,g.hasVideo?null!=g.videoCodec&&(g.mimeType='video/x-flv; codecs="'+g.videoCodec+","+g.audioCodec+'"'):g.mimeType='video/x-flv; codecs="'+g.audioCodec+'"',g.isComplete()&&this._onMediaInfo(g)}var v=this._parseMP3AudioData(e,t+1,i-1,!1);if(null==v)return;m=this._timestampBase+r;var y={unit:v,length:v.byteLength,dts:m,pts:m};h.samples.push(y),h.length+=v.length}}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+l)}else this._onError(s.default.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+a)}},e.prototype._parseAACAudioData=function(e,t,i){if(!(i<=1)){var r={},o=new Uint8Array(e,t,i);return r.packetType=o[0],0===o[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,i-1):r.data=o.subarray(1),r}n.default.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")},e.prototype._parseAACAudioSpecificConfig=function(e,t,i){var n,r,o=new Uint8Array(e,t,i),a=null,u=0,l=null;if(u=n=o[0]>>>3,(r=(7&o[0])<<1|o[1]>>>7)<0||r>=this._mpegSamplingRates.length)this._onError(s.default.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var d=this._mpegSamplingRates[r],c=(120&o[1])>>>3;if(!(c<0||c>=8)){5===u&&(l=(7&o[1])<<1|o[2]>>>7,o[2]);var h=self.navigator.userAgent.toLowerCase();return-1!==h.indexOf("firefox")?r>=6?(u=5,a=new Array(4),l=r-3):(u=2,a=new Array(2),l=r):-1!==h.indexOf("android")?(u=2,a=new Array(2),l=r):(u=5,l=r,a=new Array(4),r>=6?l=r-3:1===c&&(u=2,a=new Array(2),l=r)),a[0]=u<<3,a[0]|=(15&r)>>>1,a[1]=(15&r)<<7,a[1]|=(15&c)<<3,5===u&&(a[1]|=(15&l)>>>1,a[2]=(1&l)<<7,a[2]|=8,a[3]=0),{config:a,samplingRate:d,channelCount:c,codec:"mp4a.40."+u,originalCodec:"mp4a.40."+n}}this._onError(s.default.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}},e.prototype._parseMP3AudioData=function(e,t,i,r){if(!(i<4)){this._littleEndian;var o=new Uint8Array(e,t,i),s=null;if(r){if(255!==o[0])return;var a=o[1]>>>3&3,u=(6&o[1])>>1,l=(240&o[2])>>>4,d=(12&o[2])>>>2,c=3!=(o[3]>>>6&3)?2:1,h=0,f=0;switch(a){case 0:h=this._mpegAudioV25SampleRateTable[d];break;case 2:h=this._mpegAudioV20SampleRateTable[d];break;case 3:h=this._mpegAudioV10SampleRateTable[d]}switch(u){case 1:l<this._mpegAudioL3BitRateTable.length&&(f=this._mpegAudioL3BitRateTable[l]);break;case 2:l<this._mpegAudioL2BitRateTable.length&&(f=this._mpegAudioL2BitRateTable[l]);break;case 3:l<this._mpegAudioL1BitRateTable.length&&(f=this._mpegAudioL1BitRateTable[l])}s={bitRate:f,samplingRate:h,channelCount:c,codec:"mp3",originalCodec:"mp3"}}else s=o;return s}n.default.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")},e.prototype._parseVideoData=function(e,t,i,r,o){if(i<=1)n.default.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var a=new Uint8Array(e,t,i)[0],u=(240&a)>>>4,l=15&a;7===l?this._parseAVCVideoPacket(e,t+1,i-1,r,o,u):this._onError(s.default.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: "+l)}},e.prototype._parseAVCVideoPacket=function(e,t,i,r,o,a){if(i<4)n.default.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var u=this._littleEndian,l=new DataView(e,t,i),d=l.getUint8(0),c=(16777215&l.getUint32(0,!u))<<8>>8;if(0===d)this._parseAVCDecoderConfigurationRecord(e,t+4,i-4);else if(1===d)this._parseAVCVideoData(e,t+4,i-4,r,o,a,c);else if(2!==d)return void this._onError(s.default.FORMAT_ERROR,"Flv: Invalid video packet type "+d)}},e.prototype._parseAVCDecoderConfigurationRecord=function(e,t,i){if(i<7)n.default.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,a=this._videoTrack,u=this._littleEndian,l=new DataView(e,t,i);r?void 0!==r.avcc&&n.default.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=a.id,r.timescale=this._timescale,r.duration=this._duration);var d=l.getUint8(0),c=l.getUint8(1);if(l.getUint8(2),l.getUint8(3),1===d&&0!==c)if(this._naluLengthSize=1+(3&l.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var h=31&l.getUint8(5);if(0!==h){h>1&&n.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = "+h);for(var f=6,p=0;p<h;p++){var m=l.getUint16(f,!u);if(f+=2,0!==m){var _=new Uint8Array(e,t+f,m);f+=m;var g=o.default.parseSPS(_);if(0===p){r.codecWidth=g.codec_size.width,r.codecHeight=g.codec_size.height,r.presentWidth=g.present_size.width,r.presentHeight=g.present_size.height,r.profile=g.profile_string,r.level=g.level_string,r.bitDepth=g.bit_depth,r.chromaFormat=g.chroma_format,r.sarRatio=g.sar_ratio,r.frameRate=g.frame_rate,!1!==g.frame_rate.fixed&&0!==g.frame_rate.fps_num&&0!==g.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var v=r.frameRate.fps_den,y=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(v/y);for(var b=_.subarray(1,4),w="avc1.",E=0;E<3;E++){var S=b[E].toString(16);S.length<2&&(S="0"+S),w+=S}r.codec=w;var A=this._mediaInfo;A.width=r.codecWidth,A.height=r.codecHeight,A.fps=r.frameRate.fps,A.profile=r.profile,A.level=r.level,A.refFrames=g.ref_frames,A.chromaFormat=g.chroma_format_string,A.sarNum=r.sarRatio.width,A.sarDen=r.sarRatio.height,A.videoCodec=w,A.hasAudio?null!=A.audioCodec&&(A.mimeType='video/x-flv; codecs="'+A.videoCodec+","+A.audioCodec+'"'):A.mimeType='video/x-flv; codecs="'+A.videoCodec+'"',A.isComplete()&&this._onMediaInfo(A)}}}var L=l.getUint8(f);if(0!==L){for(L>1&&n.default.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = "+L),f++,p=0;p<L;p++)m=l.getUint16(f,!u),f+=2,0!==m&&(f+=m);r.avcc=new Uint8Array(i),r.avcc.set(new Uint8Array(e,t,i),0),n.default.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",r)}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(s.default.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: "+(this._naluLengthSize-1));else this._onError(s.default.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}},e.prototype._parseAVCVideoData=function(e,t,i,r,o,s,a){for(var u=this._littleEndian,l=new DataView(e,t,i),d=[],c=0,h=0,f=this._naluLengthSize,p=this._timestampBase+r,m=1===s;h<i;){if(h+4>=i){n.default.w(this.TAG,"Malformed Nalu near timestamp "+p+", offset = "+h+", dataSize = "+i);break}var _=l.getUint32(h,!u);if(3===f&&(_>>>=8),_>i-f)return void n.default.w(this.TAG,"Malformed Nalus near timestamp "+p+", NaluSize > DataSize!");var g=31&l.getUint8(h+f);5===g&&(m=!0);var v=new Uint8Array(e,t+h,f+_),y={type:g,data:v};d.push(y),c+=v.byteLength,h+=f+_}if(d.length){var b=this._videoTrack,w={units:d,length:c,isKeyframe:m,dts:p,cts:a,pts:p+a};m&&(w.fileposition=o),b.samples.push(w),b.length+=c}},e}();t.default=l},"./src/demux/sps-parser.js":
/*!*********************************!*\
  !*** ./src/demux/sps-parser.js ***!
  \*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ./exp-golomb.js */"./src/demux/exp-golomb.js"),r=function(){function e(){}return e._ebsp2rbsp=function(e){for(var t=e,i=t.byteLength,n=new Uint8Array(i),r=0,o=0;o<i;o++)o>=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(n[r]=t[o],r++);return new Uint8Array(n.buffer,0,r)},e.parseSPS=function(t){var i=e._ebsp2rbsp(t),r=new n.default(i);r.readByte();var o=r.readByte();r.readByte();var s=r.readByte();r.readUEG();var a=e.getProfileString(o),u=e.getLevelString(s),l=1,d=420,c=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(d=[0,420,422,444][l]),c=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var h=3!==l?8:12,f=0;f<h;f++)r.readBool()&&(f<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var p=r.readUEG();if(0===p)r.readUEG();else if(1===p){r.readBits(1),r.readSEG(),r.readSEG();var m=r.readUEG();for(f=0;f<m;f++)r.readSEG()}var _=r.readUEG();r.readBits(1);var g=r.readUEG(),v=r.readUEG(),y=r.readBits(1);0===y&&r.readBits(1),r.readBits(1);var b=0,w=0,E=0,S=0;r.readBool()&&(b=r.readUEG(),w=r.readUEG(),E=r.readUEG(),S=r.readUEG());var A=1,L=1,R=0,T=!0,x=0,O=0;if(r.readBool()){if(r.readBool()){var C=r.readByte();C>0&&C<16?(A=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][C-1],L=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][C-1]):255===C&&(A=r.readByte()<<8|r.readByte(),L=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var k=r.readBits(32),I=r.readBits(32);T=r.readBool(),R=(x=I)/(O=2*k)}}var D=1;1===A&&1===L||(D=A/L);var M=0,P=0;0===l?(M=1,P=2-y):(M=3===l?1:2,P=(1===l?2:1)*(2-y));var B=16*(g+1),j=16*(v+1)*(2-y);B-=(b+w)*M,j-=(E+S)*P;var N=Math.ceil(B*D);return r.destroy(),r=null,{profile_string:a,level_string:u,bit_depth:c,ref_frames:_,chroma_format:d,chroma_format_string:e.getChromaFormatString(d),frame_rate:{fixed:T,fps:R,fps_den:O,fps_num:x},sar_ratio:{width:A,height:L},codec_size:{width:B,height:j},present_size:{width:N,height:j}}},e._skipScalingList=function(e,t){for(var i=8,n=8,r=0;r<t;r++)0!==n&&(n=(i+e.readSEG()+256)%256),i=0===n?i:n},e.getProfileString=function(e){switch(e){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"}},e.getLevelString=function(e){return(e/10).toFixed(1)},e.getChromaFormatString=function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}},e}();t.default=r},"./src/flv.js":
/*!********************!*\
  !*** ./src/flv.js ***!
  \********************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ./utils/polyfill.js */"./src/utils/polyfill.js"),r=i(/*! ./core/features.js */"./src/core/features.js"),o=i(/*! ./io/loader.js */"./src/io/loader.js"),s=i(/*! ./player/flv-player.js */"./src/player/flv-player.js"),a=i(/*! ./player/native-player.js */"./src/player/native-player.js"),u=i(/*! ./player/player-events.js */"./src/player/player-events.js"),l=i(/*! ./player/player-errors.js */"./src/player/player-errors.js"),d=i(/*! ./utils/logging-control.js */"./src/utils/logging-control.js"),c=i(/*! ./utils/exception.js */"./src/utils/exception.js");n.default.install();var h={createPlayer:function(e,t){var i=e;if(null==i||"object"!=typeof i)throw new c.InvalidArgumentException("MediaDataSource must be an javascript object!");if(!i.hasOwnProperty("type"))throw new c.InvalidArgumentException("MediaDataSource must has type field to indicate video file type!");switch(i.type){case"flv":return new s.default(i,t);default:return new a.default(i,t)}},isSupported:function(){return r.default.supportMSEH264Playback()},getFeatureList:function(){return r.default.getFeatureList()}};h.BaseLoader=o.BaseLoader,h.LoaderStatus=o.LoaderStatus,h.LoaderErrors=o.LoaderErrors,h.Events=u.default,h.ErrorTypes=l.ErrorTypes,h.ErrorDetails=l.ErrorDetails,h.FlvPlayer=s.default,h.NativePlayer=a.default,h.LoggingControl=d.default,Object.defineProperty(h,"version",{enumerable:!0,get:function(){return"1.6.2"}}),t.default=h},"./src/index.js":
/*!**********************!*\
  !*** ./src/index.js ***!
  \**********************/function(e,t,i){e.exports=i(/*! ./flv.js */"./src/flv.js").default},"./src/io/fetch-stream-loader.js":
/*!***************************************!*\
  !*** ./src/io/fetch-stream-loader.js ***!
  \***************************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ../utils/browser.js */"./src/utils/browser.js"),o=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),u=function(e){function t(t,i){var n=e.call(this,"fetch-stream-loader")||this;return n.TAG="FetchStreamLoader",n._seekHandler=t,n._config=i,n._needStash=!0,n._requestAbort=!1,n._contentLength=null,n._receivedLength=0,n}return a(t,e),t.isSupported=function(){try{var e=r.default.msedge&&r.default.version.minor>=15048,t=!r.default.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){var i=this;this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t),a=new self.Headers;if("object"==typeof r.headers){var u=r.headers;for(var l in u)u.hasOwnProperty(l)&&a.append(l,u[l])}var d={method:"GET",headers:a,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"==typeof this._config.headers)for(var l in this._config.headers)a.append(l,this._config.headers[l]);!1===e.cors&&(d.mode="same-origin"),e.withCredentials&&(d.credentials="include"),e.referrerPolicy&&(d.referrerPolicy=e.referrerPolicy),self.AbortController&&(this._abortController=new self.AbortController,d.signal=this._abortController.signal),this._status=o.LoaderStatus.kConnecting,self.fetch(r.url,d).then((function(e){if(i._requestAbort)return i._status=o.LoaderStatus.kIdle,void e.body.cancel();if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==r.url&&i._onURLRedirect){var t=i._seekHandler.removeURLParameters(e.url);i._onURLRedirect(t)}var n=e.headers.get("Content-Length");return null!=n&&(i._contentLength=parseInt(n),0!==i._contentLength&&i._onContentLengthKnown&&i._onContentLengthKnown(i._contentLength)),i._pump.call(i,e.body.getReader())}if(i._status=o.LoaderStatus.kError,!i._onError)throw new s.RuntimeException("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);i._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(!i._abortController||!i._abortController.signal.aborted){if(i._status=o.LoaderStatus.kError,!i._onError)throw e;i._onError(o.LoaderErrors.EXCEPTION,{code:-1,msg:e.message})}}))},t.prototype.abort=function(){if(this._requestAbort=!0,(this._status!==o.LoaderStatus.kBuffering||!r.default.chrome)&&this._abortController)try{this._abortController.abort()}catch(e){}},t.prototype._pump=function(e){var t=this;return e.read().then((function(i){if(i.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=o.LoaderStatus.kError;var n=o.LoaderErrors.EARLY_EOF,r={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new s.RuntimeException(r.msg);t._onError(n,r)}else t._status=o.LoaderStatus.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(t._abortController&&t._abortController.signal.aborted)return void(t._status=o.LoaderStatus.kComplete);if(!0===t._requestAbort)return t._status=o.LoaderStatus.kComplete,e.cancel();t._status=o.LoaderStatus.kBuffering;var a=i.value.buffer,u=t._range.from+t._receivedLength;t._receivedLength+=a.byteLength,t._onDataArrival&&t._onDataArrival(a,u,t._receivedLength),t._pump(e)}})).catch((function(e){if(t._abortController&&t._abortController.signal.aborted)t._status=o.LoaderStatus.kComplete;else if(11!==e.code||!r.default.msedge){t._status=o.LoaderStatus.kError;var i=0,n=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(i=o.LoaderErrors.EXCEPTION,n={code:e.code,msg:e.message}):(i=o.LoaderErrors.EARLY_EOF,n={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new s.RuntimeException(n.msg);t._onError(i,n)}}))},t}(o.BaseLoader);t.default=u},"./src/io/io-controller.js":
/*!*********************************!*\
  !*** ./src/io/io-controller.js ***!
  \*********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),o=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ./fetch-stream-loader.js */"./src/io/fetch-stream-loader.js"),a=i(/*! ./xhr-moz-chunked-loader.js */"./src/io/xhr-moz-chunked-loader.js"),u=i(/*! ./xhr-range-loader.js */"./src/io/xhr-range-loader.js"),l=i(/*! ./websocket-loader.js */"./src/io/websocket-loader.js"),d=i(/*! ./range-seek-handler.js */"./src/io/range-seek-handler.js"),c=i(/*! ./param-seek-handler.js */"./src/io/param-seek-handler.js"),h=i(/*! ../utils/exception.js */"./src/utils/exception.js"),f=function(){function e(e,t,i){this.TAG="IOController",this._config=t,this._extraData=i,this._stashInitialSize=393216,null!=t.stashInitialSize&&t.stashInitialSize>0&&(this._stashInitialSize=t.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===t.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=e,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(e.url),this._refTotalLength=e.filesize?e.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new r.default,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}return e.prototype.destroy=function(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null},e.prototype.isWorking=function(){return this._loader&&this._loader.isWorking()&&!this._paused},e.prototype.isPaused=function(){return this._paused},Object.defineProperty(e.prototype,"status",{get:function(){return this._loader.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extraData",{get:function(){return this._extraData},set:function(e){this._extraData=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSeeked",{get:function(){return this._onSeeked},set:function(e){this._onSeeked=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRedirect",{get:function(){return this._onRedirect},set:function(e){this._onRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRecoveredEarlyEof",{get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentURL",{get:function(){return this._dataSource.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasRedirect",{get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentRedirectedURL",{get:function(){return this._redirectedURL||this._dataSource.redirectedURL},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentSpeed",{get:function(){return this._loaderClass===u.default?this._loader.currentSpeed:this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loaderType",{get:function(){return this._loader.type},enumerable:!1,configurable:!0}),e.prototype._selectSeekHandler=function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new d.default(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",i=e.seekParamEnd||"bend";this._seekHandler=new c.default(t,i)}else{if("custom"!==e.seekType)throw new h.InvalidArgumentException("Invalid seekType in config: "+e.seekType);if("function"!=typeof e.customSeekHandler)throw new h.InvalidArgumentException("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}},e.prototype._selectLoader=function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=l.default;else if(s.default.isSupported())this._loaderClass=s.default;else if(a.default.isSupported())this._loaderClass=a.default;else{if(!u.default.isSupported())throw new h.RuntimeException("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=u.default}},e.prototype._createLoader=function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)},e.prototype.open=function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))},e.prototype.abort=function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)},e.prototype.pause=function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)},e.prototype.resume=function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}},e.prototype.seek=function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)},e.prototype._internalSeek=function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var i={from:e,to:-1};this._currentRange={from:i.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,i),this._onSeeked&&this._onSeeked()},e.prototype.updateUrl=function(e){if(!e||"string"!=typeof e||0===e.length)throw new h.InvalidArgumentException("Url must be a non-empty string!");this._dataSource.url=e},e.prototype._expandBuffer=function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var i=new ArrayBuffer(t);if(this._stashUsed>0){var n=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(i,0,t).set(n,0)}this._stashBuffer=i,this._bufferSize=t}},e.prototype._normalizeSpeed=function(e){var t=this._speedNormalizeList,i=t.length-1,n=0,r=0,o=i;if(e<t[0])return t[0];for(;r<=o;){if((n=r+Math.floor((o-r)/2))===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:o=n-1}},e.prototype._adjustStashSize=function(e){var t=0;(t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var i=1024*t+1048576;this._bufferSize<i&&this._expandBuffer(i),this._stashSize=1024*t},e.prototype._dispatchChunks=function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)},e.prototype._onURLRedirect=function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)},e.prototype._onContentLengthKnown=function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)},e.prototype._onLoaderChunkArrival=function(e,t,i){if(!this._onDataArrival)throw new h.IllegalStateException("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var n=this._speedSampler.lastSecondKBps;if(0!==n){var r=this._normalizeSpeed(n);this._speedNormalized!==r&&(this._speedNormalized=r,this._adjustStashSize(r))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize)(a=new Uint8Array(this._stashBuffer,0,this._stashSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;else if(a=new Uint8Array(this._stashBuffer,0,this._bufferSize),this._stashUsed>0){var o=this._stashBuffer.slice(0,this._stashUsed);(u=this._dispatchChunks(o,this._stashByteStart))<o.byteLength?u>0&&(l=new Uint8Array(o,u),a.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=u):(this._stashUsed=0,this._stashByteStart+=u),this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else(u=this._dispatchChunks(e,t))<e.byteLength&&((s=e.byteLength-u)>this._bufferSize&&(this._expandBuffer(s),a=new Uint8Array(this._stashBuffer,0,this._bufferSize)),a.set(new Uint8Array(e,u),0),this._stashUsed+=s,this._stashByteStart=t+u);else if(0===this._stashUsed){var s;(u=this._dispatchChunks(e,t))<e.byteLength&&((s=e.byteLength-u)>this._bufferSize&&this._expandBuffer(s),(a=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e,u),0),this._stashUsed+=s,this._stashByteStart=t+u)}else{var a,u;if(this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength),(a=new Uint8Array(this._stashBuffer,0,this._bufferSize)).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength,(u=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart))<this._stashUsed&&u>0){var l=new Uint8Array(this._stashBuffer,u);a.set(l,0)}this._stashUsed-=u,this._stashByteStart+=u}}},e.prototype._flushStashBuffer=function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),i=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-i;if(i<t.byteLength){if(!e){if(i>0){var o=new Uint8Array(this._stashBuffer,0,this._bufferSize),s=new Uint8Array(t,i);o.set(s,0),this._stashUsed=s.byteLength,this._stashByteStart+=i}return 0}n.default.w(this.TAG,r+" bytes unconsumed data remain when flush buffer, dropped")}return this._stashUsed=0,this._stashByteStart=0,r}return 0},e.prototype._onLoaderComplete=function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)},e.prototype._onLoaderError=function(e,t){switch(n.default.e(this.TAG,"Loader error, code = "+t.code+", msg = "+t.msg),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=o.LoaderErrors.UNRECOVERABLE_EARLY_EOF),e){case o.LoaderErrors.EARLY_EOF:if(!this._config.isLive&&this._totalLength){var i=this._currentRange.to+1;return void(i<this._totalLength&&(n.default.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(i,!1)))}e=o.LoaderErrors.UNRECOVERABLE_EARLY_EOF;break;case o.LoaderErrors.UNRECOVERABLE_EARLY_EOF:case o.LoaderErrors.CONNECTING_TIMEOUT:case o.LoaderErrors.HTTP_STATUS_CODE_INVALID:case o.LoaderErrors.EXCEPTION:}if(!this._onError)throw new h.RuntimeException("IOException: "+t.msg);this._onError(e,t)},e}();t.default=f},"./src/io/loader.js":
/*!**************************!*\
  !*** ./src/io/loader.js ***!
  \**************************/function(e,t,i){"use strict";i.r(t),i.d(t,{LoaderStatus:function(){return r},LoaderErrors:function(){return o},BaseLoader:function(){return s}});var n=i(/*! ../utils/exception.js */"./src/utils/exception.js"),r={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},o={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},s=function(){function e(e){this._type=e||"undefined",this._status=r.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return e.prototype.destroy=function(){this._status=r.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null},e.prototype.isWorking=function(){return this._status===r.kConnecting||this._status===r.kBuffering},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needStashBuffer",{get:function(){return this._needStash},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onContentLengthKnown",{get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onURLRedirect",{get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDataArrival",{get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onError},set:function(e){this._onError=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onComplete",{get:function(){return this._onComplete},set:function(e){this._onComplete=e},enumerable:!1,configurable:!0}),e.prototype.open=function(e,t){throw new n.NotImplementedException("Unimplemented abstract function!")},e.prototype.abort=function(){throw new n.NotImplementedException("Unimplemented abstract function!")},e}()},"./src/io/param-seek-handler.js":
/*!**************************************!*\
  !*** ./src/io/param-seek-handler.js ***!
  \**************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(e,t){this._startName=e,this._endName=t}return e.prototype.getConfig=function(e,t){var i=e;if(0!==t.from||-1!==t.to){var n=!0;-1===i.indexOf("?")&&(i+="?",n=!1),n&&(i+="&"),i+=this._startName+"="+t.from.toString(),-1!==t.to&&(i+="&"+this._endName+"="+t.to.toString())}return{url:i,headers:{}}},e.prototype.removeURLParameters=function(e){var t=e.split("?")[0],i=void 0,n=e.indexOf("?");-1!==n&&(i=e.substring(n+1));var r="";if(null!=i&&i.length>0)for(var o=i.split("&"),s=0;s<o.length;s++){var a=o[s].split("="),u=s>0;a[0]!==this._startName&&a[0]!==this._endName&&(u&&(r+="&"),r+=o[s])}return 0===r.length?t:t+"?"+r},e}();t.default=n},"./src/io/range-seek-handler.js":
/*!**************************************!*\
  !*** ./src/io/range-seek-handler.js ***!
  \**************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(e){this._zeroStart=e||!1}return e.prototype.getConfig=function(e,t){var i={};if(0!==t.from||-1!==t.to){var n=void 0;n=-1!==t.to?"bytes="+t.from.toString()+"-"+t.to.toString():"bytes="+t.from.toString()+"-",i.Range=n}else this._zeroStart&&(i.Range="bytes=0-");return{url:e,headers:i}},e.prototype.removeURLParameters=function(e){return e},e}();t.default=n},"./src/io/speed-sampler.js":
/*!*********************************!*\
  !*** ./src/io/speed-sampler.js ***!
  \*********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}return e.prototype.reset=function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0},e.prototype.addBytes=function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())},Object.defineProperty(e.prototype,"currentKBps",{get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastSecondKBps",{get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"averageKBps",{get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024},enumerable:!1,configurable:!0}),e}();t.default=n},"./src/io/websocket-loader.js":
/*!************************************!*\
  !*** ./src/io/websocket-loader.js ***!
  \************************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ./loader.js */"./src/io/loader.js"),o=i(/*! ../utils/exception.js */"./src/utils/exception.js"),s=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=function(e){function t(){var t=e.call(this,"websocket-loader")||this;return t.TAG="WebSocketLoader",t._needStash=!0,t._ws=null,t._requestAbort=!1,t._receivedLength=0,t}return s(t,e),t.isSupported=function(){try{return void 0!==self.WebSocket}catch(e){return!1}},t.prototype.destroy=function(){this._ws&&this.abort(),e.prototype.destroy.call(this)},t.prototype.open=function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=r.LoaderStatus.kConnecting}catch(e){this._status=r.LoaderStatus.kError;var i={code:e.code,msg:e.message};if(!this._onError)throw new o.RuntimeException(i.msg);this._onError(r.LoaderErrors.EXCEPTION,i)}},t.prototype.abort=function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=r.LoaderStatus.kComplete},t.prototype._onWebSocketOpen=function(e){this._status=r.LoaderStatus.kBuffering},t.prototype._onWebSocketClose=function(e){!0!==this._requestAbort?(this._status=r.LoaderStatus.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1},t.prototype._onWebSocketMessage=function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var i=new FileReader;i.onload=function(){t._dispatchArrayBuffer(i.result)},i.readAsArrayBuffer(e.data)}else{this._status=r.LoaderStatus.kError;var n={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new o.RuntimeException(n.msg);this._onError(r.LoaderErrors.EXCEPTION,n)}},t.prototype._dispatchArrayBuffer=function(e){var t=e,i=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)},t.prototype._onWebSocketError=function(e){this._status=r.LoaderStatus.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new o.RuntimeException(t.msg);this._onError(r.LoaderErrors.EXCEPTION,t)},t}(r.BaseLoader);t.default=a},"./src/io/xhr-moz-chunked-loader.js":
/*!******************************************!*\
  !*** ./src/io/xhr-moz-chunked-loader.js ***!
  \******************************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ./loader.js */"./src/io/loader.js"),s=i(/*! ../utils/exception.js */"./src/utils/exception.js"),a=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),u=function(e){function t(t,i){var n=e.call(this,"xhr-moz-chunked-loader")||this;return n.TAG="MozChunkedLoader",n._seekHandler=t,n._config=i,n._needStash=!0,n._xhr=null,n._requestAbort=!1,n._contentLength=null,n._receivedLength=0,n}return a(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return r.default.w("MozChunkedLoader",e.message),!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),e.prototype.destroy.call(this)},t.prototype.open=function(e,t){this._dataSource=e,this._range=t;var i=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(i=e.redirectedURL);var n=this._seekHandler.getConfig(i,t);this._requestURL=n.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="moz-chunked-arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onloadend=this._onLoadEnd.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){var s=n.headers;for(var a in s)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a])}if("object"==typeof this._config.headers)for(var a in s=this._config.headers)s.hasOwnProperty(a)&&r.setRequestHeader(a,s[a]);this._status=o.LoaderStatus.kConnecting,r.send()},t.prototype.abort=function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=o.LoaderStatus.kComplete},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var i=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(i)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=o.LoaderStatus.kError,!this._onError)throw new s.RuntimeException("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(o.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=o.LoaderStatus.kBuffering}},t.prototype._onProgress=function(e){if(this._status!==o.LoaderStatus.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,i,this._receivedLength)}},t.prototype._onLoadEnd=function(e){!0!==this._requestAbort?this._status!==o.LoaderStatus.kError&&(this._status=o.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1},t.prototype._onXhrError=function(e){this._status=o.LoaderStatus.kError;var t=0,i=null;if(this._contentLength&&e.loaded<this._contentLength?(t=o.LoaderErrors.EARLY_EOF,i={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=o.LoaderErrors.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new s.RuntimeException(i.msg);this._onError(t,i)},t}(o.BaseLoader);t.default=u},"./src/io/xhr-range-loader.js":
/*!************************************!*\
  !*** ./src/io/xhr-range-loader.js ***!
  \************************************/function(e,t,i){"use strict";i.r(t);var n,r=i(/*! ../utils/logger.js */"./src/utils/logger.js"),o=i(/*! ./speed-sampler.js */"./src/io/speed-sampler.js"),s=i(/*! ./loader.js */"./src/io/loader.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js"),u=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),l=function(e){function t(t,i){var n=e.call(this,"xhr-range-loader")||this;return n.TAG="RangeLoader",n._seekHandler=t,n._config=i,n._needStash=!1,n._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],n._currentChunkSizeKB=384,n._currentSpeedNormalized=0,n._zeroSpeedChunkCount=0,n._xhr=null,n._speedSampler=new o.default,n._requestAbort=!1,n._waitForTotalLength=!1,n._totalLengthReceived=!1,n._currentRequestURL=null,n._currentRedirectedURL=null,n._currentRequestRange=null,n._totalLength=null,n._contentLength=null,n._receivedLength=0,n._lastTimeLoaded=0,n}return u(t,e),t.isSupported=function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return r.default.w("RangeLoader",e.message),!1}},t.prototype.destroy=function(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),e.prototype.destroy.call(this)},Object.defineProperty(t.prototype,"currentSpeed",{get:function(){return this._speedSampler.lastSecondKBps},enumerable:!1,configurable:!0}),t.prototype.open=function(e,t){this._dataSource=e,this._range=t,this._status=s.LoaderStatus.kConnecting;var i=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(i=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||i?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))},t.prototype._openSubRange=function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,i=t+e;null!=this._contentLength&&i-this._range.from>=this._contentLength&&(i=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:i},this._internalOpen(this._dataSource,this._currentRequestRange)},t.prototype._internalOpen=function(e,t){this._lastTimeLoaded=0;var i=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?i=this._currentRedirectedURL:null!=e.redirectedURL&&(i=e.redirectedURL));var n=this._seekHandler.getConfig(i,t);this._currentRequestURL=n.url;var r=this._xhr=new XMLHttpRequest;if(r.open("GET",n.url,!0),r.responseType="arraybuffer",r.onreadystatechange=this._onReadyStateChange.bind(this),r.onprogress=this._onProgress.bind(this),r.onload=this._onLoad.bind(this),r.onerror=this._onXhrError.bind(this),e.withCredentials&&(r.withCredentials=!0),"object"==typeof n.headers){var o=n.headers;for(var s in o)o.hasOwnProperty(s)&&r.setRequestHeader(s,o[s])}if("object"==typeof this._config.headers)for(var s in o=this._config.headers)o.hasOwnProperty(s)&&r.setRequestHeader(s,o[s]);r.send()},t.prototype.abort=function(){this._requestAbort=!0,this._internalAbort(),this._status=s.LoaderStatus.kComplete},t.prototype._internalAbort=function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)},t.prototype._onReadyStateChange=function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var i=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&i!==this._currentRedirectedURL&&(this._currentRedirectedURL=i,this._onURLRedirect&&this._onURLRedirect(i))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=s.LoaderStatus.kBuffering}else{if(this._status=s.LoaderStatus.kError,!this._onError)throw new a.RuntimeException("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(s.LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}},t.prototype._onProgress=function(e){if(this._status!==s.LoaderStatus.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var i=e.total;this._internalAbort(),null!=i&0!==i&&(this._totalLength=i)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var n=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(n)}},t.prototype._normalizeSpeed=function(e){var t=this._chunkSizeKBList,i=t.length-1,n=0,r=0,o=i;if(e<t[0])return t[0];for(;r<=o;){if((n=r+Math.floor((o-r)/2))===i||e>=t[n]&&e<t[n+1])return t[n];t[n]<e?r=n+1:o=n-1}},t.prototype._onLoad=function(e){if(this._status!==s.LoaderStatus.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){var i=this._normalizeSpeed(t);this._currentSpeedNormalized!==i&&(this._currentSpeedNormalized=i,this._currentChunkSizeKB=i)}var n=e.target.response,r=this._range.from+this._receivedLength;this._receivedLength+=n.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():o=!0,this._onDataArrival&&this._onDataArrival(n,r,this._receivedLength),o&&(this._status=s.LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}},t.prototype._onXhrError=function(e){this._status=s.LoaderStatus.kError;var t=0,i=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=s.LoaderErrors.EARLY_EOF,i={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=s.LoaderErrors.EXCEPTION,i={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new a.RuntimeException(i.msg);this._onError(t,i)},t}(s.BaseLoader);t.default=l},"./src/player/flv-player.js":
/*!**********************************!*\
  !*** ./src/player/flv-player.js ***!
  \**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ../utils/logger.js */"./src/utils/logger.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ./player-events.js */"./src/player/player-events.js"),u=i(/*! ../core/transmuxer.js */"./src/core/transmuxer.js"),l=i(/*! ../core/transmuxing-events.js */"./src/core/transmuxing-events.js"),d=i(/*! ../core/mse-controller.js */"./src/core/mse-controller.js"),c=i(/*! ../core/mse-events.js */"./src/core/mse-events.js"),h=i(/*! ./player-errors.js */"./src/player/player-errors.js"),f=i(/*! ../config.js */"./src/config.js"),p=i(/*! ../utils/exception.js */"./src/utils/exception.js"),m=function(){function e(e,t){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(r()),this._config=(0,f.createDefaultConfig)(),"object"==typeof t&&Object.assign(this._config,t),"flv"!==e.type.toLowerCase())throw new p.InvalidArgumentException("FlvPlayer requires an flv MediaDataSource input!");!0===e.isLive&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=e,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var i=s.default.chrome&&(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661);this._alwaysSeekKeyframe=!!(i||s.default.msedge||s.default.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return e.prototype.destroy=function(){null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){var i=this;e===a.default.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){i._emitter.emit(a.default.MEDIA_INFO,i.mediaInfo)})):e===a.default.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){i._emitter.emit(a.default.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new d.default(this._config),this._msectl.on(c.default.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(c.default.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(c.default.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(c.default.ERROR,(function(e){t._emitter.emit(a.default.ERROR,h.ErrorTypes.MEDIA_ERROR,h.ErrorDetails.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},e.prototype.detachMediaElement=function(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)},e.prototype.load=function(){var e=this;if(!this._mediaElement)throw new p.IllegalStateException("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new p.IllegalStateException("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new u.default(this._mediaDataSource,this._config),this._transmuxer.on(l.default.INIT_SEGMENT,(function(t,i){e._msectl.appendInitSegment(i)})),this._transmuxer.on(l.default.MEDIA_SEGMENT,(function(t,i){if(e._msectl.appendMediaSegment(i),e._config.lazyLoad&&!e._config.isLive){var n=e._mediaElement.currentTime;i.info.endDts>=1e3*(n+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(o.default.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(l.default.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(a.default.LOADING_COMPLETE)})),this._transmuxer.on(l.default.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(a.default.RECOVERED_EARLY_EOF)})),this._transmuxer.on(l.default.IO_ERROR,(function(t,i){e._emitter.emit(a.default.ERROR,h.ErrorTypes.NETWORK_ERROR,t,i)})),this._transmuxer.on(l.default.DEMUX_ERROR,(function(t,i){e._emitter.emit(a.default.ERROR,h.ErrorTypes.MEDIA_ERROR,t,{code:-1,msg:i})})),this._transmuxer.on(l.default.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(a.default.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(l.default.METADATA_ARRIVED,(function(t){e._emitter.emit(a.default.METADATA_ARRIVED,t)})),this._transmuxer.on(l.default.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(a.default.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(l.default.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(a.default.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(l.default.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))},e.prototype.unload=function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){return Object.assign({},this._mediaInfo)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)},enumerable:!1,configurable:!0}),e.prototype._fillStatisticsInfo=function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();i=r.totalVideoFrames,n=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e},e.prototype._onmseUpdateEnd=function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,i=0,n=0;n<e.length;n++){var r=e.start(n),s=e.end(n);if(r<=t&&t<s){i=s;break}}i>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(o.default.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}},e.prototype._onmseBufferFull=function(){o.default.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()},e.prototype._suspendTransmuxer=function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))},e.prototype._checkProgressAndResume=function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,i=!1,n=0;n<t.length;n++){var r=t.start(n),s=t.end(n);if(e>=r&&e<s){e>=s-this._config.lazyLoadRecoverDuration&&(i=!0);break}}i&&(window.clearInterval(this._progressChecker),this._progressChecker=null,i&&(o.default.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))},e.prototype._isTimepointBuffered=function(e){for(var t=this._mediaElement.buffered,i=0;i<t.length;i++){var n=t.start(i),r=t.end(i);if(e>=n&&e<r)return!0}return!1},e.prototype._internalSeek=function(e){var t=this._isTimepointBuffered(e),i=!1,n=0;if(e<1&&this._mediaElement.buffered.length>0){var r=this._mediaElement.buffered.start(0);(r<1&&e<r||s.default.safari)&&(i=!0,n=s.default.safari?.1:r)}if(i)this._requestSetTime=!0,this._mediaElement.currentTime=n;else if(t){if(this._alwaysSeekKeyframe){var o=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=o?o.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)},e.prototype._checkAndApplyUnbufferedSeekpoint=function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)},e.prototype._checkAndResumeStuckPlayback=function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var i=t.buffered;i.length>0&&t.currentTime<i.start(0)&&(o.default.w(this.TAG,"Playback seems stuck at "+t.currentTime+", seek to "+i.start(0)),this._requestSetTime=!0,this._mediaElement.currentTime=i.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)},e.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)},e.prototype._onvSeeking=function(e){var t=this._mediaElement.currentTime,i=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&i.length>0){var n=i.start(0);if(n<1&&t<n||s.default.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=s.default.safari?.1:n)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var r=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=r&&(this._requestSetTime=!0,this._mediaElement.currentTime=r.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},e.prototype._onvCanPlay=function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)},e.prototype._onvStalled=function(e){this._checkAndResumeStuckPlayback(!0)},e.prototype._onvProgress=function(e){this._checkAndResumeStuckPlayback()},e}();t.default=m},"./src/player/native-player.js":
/*!*************************************!*\
  !*** ./src/player/native-player.js ***!
  \*************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ./player-events.js */"./src/player/player-events.js"),s=i(/*! ../config.js */"./src/config.js"),a=i(/*! ../utils/exception.js */"./src/utils/exception.js"),u=function(){function e(e,t){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(r()),this._config=(0,s.createDefaultConfig)(),"object"==typeof t&&Object.assign(this._config,t),"flv"===e.type.toLowerCase())throw new a.InvalidArgumentException("NativePlayer does't support flv MediaDataSource input!");if(e.hasOwnProperty("segments"))throw new a.InvalidArgumentException("NativePlayer("+e.type+") doesn't support multipart playback!");this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=e,this._mediaElement=null}return e.prototype.destroy=function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null},e.prototype.on=function(e,t){var i=this;e===o.default.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(o.default.MEDIA_INFO,i.mediaInfo)})):e===o.default.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){i._emitter.emit(o.default.STATISTICS_INFO,i.statisticsInfo)})),this._emitter.addListener(e,t)},e.prototype.off=function(e,t){this._emitter.removeListener(e,t)},e.prototype.attachMediaElement=function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}},e.prototype.detachMediaElement=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.load=function(){if(!this._mediaElement)throw new a.IllegalStateException("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)},e.prototype.unload=function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)},e.prototype.play=function(){return this._mediaElement.play()},e.prototype.pause=function(){this._mediaElement.pause()},Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffered",{get:function(){return this._mediaElement.buffered},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._mediaElement.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"muted",{get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentTime",{get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mediaInfo",{get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statisticsInfo",{get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,i=0,n=0;if(this._mediaElement.getVideoPlaybackQuality){var r=this._mediaElement.getVideoPlaybackQuality();i=r.totalVideoFrames,n=r.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(i=this._mediaElement.webkitDecodedFrameCount,n=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=i,e.droppedFrames=n),e},enumerable:!1,configurable:!0}),e.prototype._onvLoadedMetadata=function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(o.default.MEDIA_INFO,this.mediaInfo)},e.prototype._reportStatisticsInfo=function(){this._emitter.emit(o.default.STATISTICS_INFO,this.statisticsInfo)},e}();t.default=u},"./src/player/player-errors.js":
/*!*************************************!*\
  !*** ./src/player/player-errors.js ***!
  \*************************************/function(e,t,i){"use strict";i.r(t),i.d(t,{ErrorTypes:function(){return o},ErrorDetails:function(){return s}});var n=i(/*! ../io/loader.js */"./src/io/loader.js"),r=i(/*! ../demux/demux-errors.js */"./src/demux/demux-errors.js"),o={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},s={NETWORK_EXCEPTION:n.LoaderErrors.EXCEPTION,NETWORK_STATUS_CODE_INVALID:n.LoaderErrors.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:n.LoaderErrors.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:n.LoaderErrors.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:r.default.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:r.default.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:r.default.CODEC_UNSUPPORTED}},"./src/player/player-events.js":
/*!*************************************!*\
  !*** ./src/player/player-events.js ***!
  \*************************************/function(e,t,i){"use strict";i.r(t),t.default={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"}},"./src/remux/aac-silent.js":
/*!*********************************!*\
  !*** ./src/remux/aac-silent.js ***!
  \*********************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},e}();t.default=n},"./src/remux/mp4-generator.js":
/*!************************************!*\
  !*** ./src/remux/mp4-generator.js ***!
  \************************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.init=function(){for(var t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var i=e.constants={};i.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),i.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),i.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),i.STSC=i.STCO=i.STTS,i.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),i.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),i.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),i.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])},e.box=function(e){for(var t=8,i=null,n=Array.prototype.slice.call(arguments,1),r=n.length,o=0;o<r;o++)t+=n[o].byteLength;(i=new Uint8Array(t))[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);var s=8;for(o=0;o<r;o++)i.set(n[o],s),s+=n[o].byteLength;return i},e.generateInitSegment=function(t){var i=e.box(e.types.ftyp,e.constants.FTYP),n=e.moov(t),r=new Uint8Array(i.byteLength+n.byteLength);return r.set(i,0),r.set(n,i.byteLength),r},e.moov=function(t){var i=e.mvhd(t.timescale,t.duration),n=e.trak(t),r=e.mvex(t);return e.box(e.types.moov,i,n,r)},e.mvhd=function(t,i){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))},e.trak=function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.tkhd=function(t){var i=t.id,n=t.duration,r=t.presentWidth,o=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,o>>>8&255,255&o,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))},e.mdhd=function(t){var i=t.timescale,n=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))},e.hdlr=function(t){var i=null;return i="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,i)},e.minf=function(t){var i=null;return i="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,i,e.dinf(),e.stbl(t))},e.dinf=function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))},e.mp3=function(t){var i=t.channelCount,n=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types[".mp3"],r)},e.mp4a=function(t){var i=t.channelCount,n=t.audioSampleRate,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return e.box(e.types.mp4a,r,e.esds(t))},e.esds=function(t){var i=t.config||[],n=i.length,r=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(i).concat([6,1,2]));return e.box(e.types.esds,r)},e.avc1=function(t){var i=t.avcc,n=t.codecWidth,r=t.codecHeight,o=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return e.box(e.types.avc1,o,e.box(e.types.avcC,i))},e.mvex=function(t){return e.box(e.types.mvex,e.trex(t))},e.trex=function(t){var i=t.id,n=new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,n)},e.moof=function(t,i){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,i))},e.mfhd=function(t){var i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,i)},e.traf=function(t,i){var n=t.id,r=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),o=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=e.sdtp(t),a=e.trun(t,s.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,r,o,a,s)},e.sdtp=function(t){for(var i=t.samples||[],n=i.length,r=new Uint8Array(4+n),o=0;o<n;o++){var s=i[o].flags;r[o+4]=s.isLeading<<6|s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy}return e.box(e.types.sdtp,r)},e.trun=function(t,i){var n=t.samples||[],r=n.length,o=12+16*r,s=new Uint8Array(o);i+=8+o,s.set([0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0);for(var a=0;a<r;a++){var u=n[a].duration,l=n[a].size,d=n[a].flags,c=n[a].cts;s.set([u>>>24&255,u>>>16&255,u>>>8&255,255&u,l>>>24&255,l>>>16&255,l>>>8&255,255&l,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.isNonSync,0,0,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*a)}return e.box(e.types.trun,s)},e.mdat=function(t){return e.box(e.types.mdat,t)},e}();n.init(),t.default=n},"./src/remux/mp4-remuxer.js":
/*!**********************************!*\
  !*** ./src/remux/mp4-remuxer.js ***!
  \**********************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! ../utils/logger.js */"./src/utils/logger.js"),r=i(/*! ./mp4-generator.js */"./src/remux/mp4-generator.js"),o=i(/*! ./aac-silent.js */"./src/remux/aac-silent.js"),s=i(/*! ../utils/browser.js */"./src/utils/browser.js"),a=i(/*! ../core/media-segment-info.js */"./src/core/media-segment-info.js"),u=i(/*! ../utils/exception.js */"./src/utils/exception.js"),l=function(){function e(e){this.TAG="MP4Remuxer",this._config=e,this._isLive=!0===e.isLive,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new a.MediaSegmentInfoList("audio"),this._videoSegmentInfoList=new a.MediaSegmentInfoList("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!s.default.chrome||!(s.default.version.major<50||50===s.default.version.major&&s.default.version.build<2661)),this._fillSilentAfterSeek=s.default.msedge||s.default.msie,this._mp3UseMpegAudio=!s.default.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return e.prototype.destroy=function(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null},e.prototype.bindDataSource=function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this},Object.defineProperty(e.prototype,"onInitSegment",{get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onMediaSegment",{get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e},enumerable:!1,configurable:!0}),e.prototype.insertDiscontinuity=function(){this._audioNextDts=this._videoNextDts=void 0},e.prototype.seek=function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()},e.prototype.remux=function(e,t){if(!this._onMediaSegment)throw new u.IllegalStateException("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)},e.prototype._onTrackMetadataReceived=function(e,t){var i=null,n="mp4",o=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(n="mpeg",o="",i=new Uint8Array):i=r.default.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,i=r.default.generateInitSegment(t)}if(!this._onInitSegment)throw new u.IllegalStateException("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:i.buffer,codec:o,container:e+"/"+n,mediaDuration:t.duration})},e.prototype._calculateDtsBase=function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)},e.prototype.flushStashedSamples=function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,i={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(i.samples.push(e),i.length=e.length);var n={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(n.samples.push(t),n.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(i,!0),this._remuxAudio(n,!0)},e.prototype._remuxAudio=function(e,t){if(null!=this._audioMeta){var i,u=e,l=u.samples,d=void 0,c=-1,h=this._audioMeta.refSampleDuration,f="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,p=this._dtsBaseInited&&void 0===this._audioNextDts,m=!1;if(l&&0!==l.length&&(1!==l.length||t)){var _=0,g=null,v=0;f?(_=0,v=u.length):(_=8,v=8+u.length);var y=null;if(l.length>1&&(v-=(y=l.pop()).length),null!=this._audioStashedLastSample){var b=this._audioStashedLastSample;this._audioStashedLastSample=null,l.unshift(b),v+=b.length}null!=y&&(this._audioStashedLastSample=y);var w=l[0].dts-this._dtsBase;if(this._audioNextDts)d=w-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())d=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(m=!0);else{var E=this._audioSegmentInfoList.getLastSampleBefore(w);if(null!=E){var S=w-(E.originalDts+E.duration);S<=3&&(S=0),d=w-(E.dts+E.duration+S)}else d=0}if(m){var A=w-d,L=this._videoSegmentInfoList.getLastSegmentBefore(w);if(null!=L&&L.beginDts<A){if(B=o.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount)){var R=L.beginDts,T=A-L.beginDts;n.default.v(this.TAG,"InsertPrefixSilentAudio: dts: "+R+", duration: "+T),l.unshift({unit:B,dts:R,pts:R}),v+=B.byteLength}}else m=!1}for(var x=[],O=0;O<l.length;O++){var C=(b=l[O]).unit,k=b.dts-this._dtsBase,I=(R=k,!1),D=null,M=0;if(!(k<-.001)){if("mp3"!==this._audioMeta.codec){var P=k;if(this._audioNextDts&&(P=this._audioNextDts),(d=k-P)<=-3*h){n.default.w(this.TAG,"Dropping 1 audio frame (originalDts: "+k+" ms ,curRefDts: "+P+" ms)  due to dtsCorrection: "+d+" ms overlap.");continue}if(d>=3*h&&this._fillAudioTimestampGap&&!s.default.safari){I=!0;var B,j=Math.floor(d/h);n.default.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: "+k+" ms, curRefDts: "+P+" ms, dtsCorrection: "+Math.round(d)+" ms, generate: "+j+" frames"),R=Math.floor(P),M=Math.floor(P+h)-R,null==(B=o.default.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount))&&(n.default.w(this.TAG,"Unable to generate silent frame for "+this._audioMeta.originalCodec+" with "+this._audioMeta.channelCount+" channels, repeat last frame"),B=C),D=[];for(var N=0;N<j;N++){P+=h;var F=Math.floor(P),U=Math.floor(P+h)-F,z={dts:F,pts:F,cts:0,unit:B,size:B.byteLength,duration:U,originalDts:k,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};D.push(z),v+=z.size}this._audioNextDts=P+h}else R=Math.floor(P),M=Math.floor(P+h)-R,this._audioNextDts=P+h}else R=k-d,M=O!==l.length-1?l[O+1].dts-this._dtsBase-d-R:null!=y?y.dts-this._dtsBase-d-R:x.length>=1?x[x.length-1].duration:Math.floor(h),this._audioNextDts=R+M;-1===c&&(c=R),x.push({dts:R,pts:R,cts:0,unit:b.unit,size:b.unit.byteLength,duration:M,originalDts:k,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),I&&x.push.apply(x,D)}}if(0===x.length)return u.samples=[],void(u.length=0);for(f?g=new Uint8Array(v):((g=new Uint8Array(v))[0]=v>>>24&255,g[1]=v>>>16&255,g[2]=v>>>8&255,g[3]=255&v,g.set(r.default.types.mdat,4)),O=0;O<x.length;O++)C=x[O].unit,g.set(C,_),_+=C.byteLength;var V=x[x.length-1];i=V.dts+V.duration;var G=new a.MediaSegmentInfo;G.beginDts=c,G.endDts=i,G.beginPts=c,G.endPts=i,G.originalBeginDts=x[0].originalDts,G.originalEndDts=V.originalDts+V.duration,G.firstSample=new a.SampleInfo(x[0].dts,x[0].pts,x[0].duration,x[0].originalDts,!1),G.lastSample=new a.SampleInfo(V.dts,V.pts,V.duration,V.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(G),u.samples=x,u.sequenceNumber++;var q=null;q=f?new Uint8Array:r.default.moof(u,c),u.samples=[],u.length=0;var H={type:"audio",data:this._mergeBoxes(q,g).buffer,sampleCount:x.length,info:G};f&&p&&(H.timestampOffset=c),this._onMediaSegment("audio",H)}}},e.prototype._remuxVideo=function(e,t){if(null!=this._videoMeta){var i,n,o=e,s=o.samples,u=void 0,l=-1,d=-1;if(s&&0!==s.length&&(1!==s.length||t)){var c=8,h=null,f=8+e.length,p=null;if(s.length>1&&(f-=(p=s.pop()).length),null!=this._videoStashedLastSample){var m=this._videoStashedLastSample;this._videoStashedLastSample=null,s.unshift(m),f+=m.length}null!=p&&(this._videoStashedLastSample=p);var _=s[0].dts-this._dtsBase;if(this._videoNextDts)u=_-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())u=0;else{var g=this._videoSegmentInfoList.getLastSampleBefore(_);if(null!=g){var v=_-(g.originalDts+g.duration);v<=3&&(v=0),u=_-(g.dts+g.duration+v)}else u=0}for(var y=new a.MediaSegmentInfo,b=[],w=0;w<s.length;w++){var E=(m=s[w]).dts-this._dtsBase,S=m.isKeyframe,A=E-u,L=m.cts,R=A+L;-1===l&&(l=A,d=R);var T=0;if(T=w!==s.length-1?s[w+1].dts-this._dtsBase-u-A:null!=p?p.dts-this._dtsBase-u-A:b.length>=1?b[b.length-1].duration:Math.floor(this._videoMeta.refSampleDuration),S){var x=new a.SampleInfo(A,R,T,m.dts,!0);x.fileposition=m.fileposition,y.appendSyncPoint(x)}b.push({dts:A,pts:R,cts:L,units:m.units,size:m.length,isKeyframe:S,duration:T,originalDts:E,flags:{isLeading:0,dependsOn:S?2:1,isDependedOn:S?1:0,hasRedundancy:0,isNonSync:S?0:1}})}for((h=new Uint8Array(f))[0]=f>>>24&255,h[1]=f>>>16&255,h[2]=f>>>8&255,h[3]=255&f,h.set(r.default.types.mdat,4),w=0;w<b.length;w++)for(var O=b[w].units;O.length;){var C=O.shift().data;h.set(C,c),c+=C.byteLength}var k=b[b.length-1];if(i=k.dts+k.duration,n=k.pts+k.duration,this._videoNextDts=i,y.beginDts=l,y.endDts=i,y.beginPts=d,y.endPts=n,y.originalBeginDts=b[0].originalDts,y.originalEndDts=k.originalDts+k.duration,y.firstSample=new a.SampleInfo(b[0].dts,b[0].pts,b[0].duration,b[0].originalDts,b[0].isKeyframe),y.lastSample=new a.SampleInfo(k.dts,k.pts,k.duration,k.originalDts,k.isKeyframe),this._isLive||this._videoSegmentInfoList.append(y),o.samples=b,o.sequenceNumber++,this._forceFirstIDR){var I=b[0].flags;I.dependsOn=2,I.isNonSync=0}var D=r.default.moof(o,l);o.samples=[],o.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(D,h).buffer,sampleCount:b.length,info:y})}}},e.prototype._mergeBoxes=function(e,t){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(e,0),i.set(t,e.byteLength),i},e}();t.default=l},"./src/utils/browser.js":
/*!******************************!*\
  !*** ./src/utils/browser.js ***!
  \******************************/function(e,t,i){"use strict";i.r(t);var n={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],i=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:i[0]||""},o={};if(r.browser){o[r.browser]=!0;var s=r.majorVersion.split(".");o.version={major:parseInt(r.majorVersion,10),string:r.version},s.length>1&&(o.version.minor=parseInt(s[1],10)),s.length>2&&(o.version.build=parseInt(s[2],10))}for(var a in r.platform&&(o[r.platform]=!0),(o.chrome||o.opr||o.safari)&&(o.webkit=!0),(o.rv||o.iemobile)&&(o.rv&&delete o.rv,r.browser="msie",o.msie=!0),o.edge&&(delete o.edge,r.browser="msedge",o.msedge=!0),o.opr&&(r.browser="opera",o.opera=!0),o.safari&&o.android&&(r.browser="android",o.android=!0),o.name=r.browser,o.platform=r.platform,n)n.hasOwnProperty(a)&&delete n[a];Object.assign(n,o)}(),t.default=n},"./src/utils/exception.js":
/*!********************************!*\
  !*** ./src/utils/exception.js ***!
  \********************************/function(e,t,i){"use strict";i.r(t),i.d(t,{RuntimeException:function(){return o},IllegalStateException:function(){return s},InvalidArgumentException:function(){return a},NotImplementedException:function(){return u}});var n,r=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=function(){function e(e){this._message=e}return Object.defineProperty(e.prototype,"name",{get:function(){return"RuntimeException"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.name+": "+this.message},e}(),s=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"IllegalStateException"},enumerable:!1,configurable:!0}),t}(o),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"InvalidArgumentException"},enumerable:!1,configurable:!0}),t}(o),u=function(e){function t(t){return e.call(this,t)||this}return r(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"NotImplementedException"},enumerable:!1,configurable:!0}),t}(o)},"./src/utils/logger.js":
/*!*****************************!*\
  !*** ./src/utils/logger.js ***!
  \*****************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=function(){function e(){}return e.e=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","error",n),e.ENABLE_ERROR&&(console.error?console.error(n):console.warn?console.warn(n):console.log(n))},e.i=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","info",n),e.ENABLE_INFO&&(console.info?console.info(n):console.log(n))},e.w=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",n),e.ENABLE_WARN&&(console.warn?console.warn(n):console.log(n))},e.d=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",n),e.ENABLE_DEBUG&&(console.debug?console.debug(n):console.log(n))},e.v=function(t,i){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var n="["+t+"] > "+i;e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",n),e.ENABLE_VERBOSE&&console.log(n)},e}();o.GLOBAL_TAG="flv.js",o.FORCE_GLOBAL_TAG=!1,o.ENABLE_ERROR=!0,o.ENABLE_INFO=!0,o.ENABLE_WARN=!0,o.ENABLE_DEBUG=!0,o.ENABLE_VERBOSE=!0,o.ENABLE_CALLBACK=!1,o.emitter=new(r()),t.default=o},"./src/utils/logging-control.js":
/*!**************************************!*\
  !*** ./src/utils/logging-control.js ***!
  \**************************************/function(e,t,i){"use strict";i.r(t);var n=i(/*! events */"./node_modules/events/events.js"),r=i.n(n),o=i(/*! ./logger.js */"./src/utils/logger.js"),s=function(){function e(){}return Object.defineProperty(e,"forceGlobalTag",{get:function(){return o.default.FORCE_GLOBAL_TAG},set:function(t){o.default.FORCE_GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"globalTag",{get:function(){return o.default.GLOBAL_TAG},set:function(t){o.default.GLOBAL_TAG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableAll",{get:function(){return o.default.ENABLE_VERBOSE&&o.default.ENABLE_DEBUG&&o.default.ENABLE_INFO&&o.default.ENABLE_WARN&&o.default.ENABLE_ERROR},set:function(t){o.default.ENABLE_VERBOSE=t,o.default.ENABLE_DEBUG=t,o.default.ENABLE_INFO=t,o.default.ENABLE_WARN=t,o.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableDebug",{get:function(){return o.default.ENABLE_DEBUG},set:function(t){o.default.ENABLE_DEBUG=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableVerbose",{get:function(){return o.default.ENABLE_VERBOSE},set:function(t){o.default.ENABLE_VERBOSE=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableInfo",{get:function(){return o.default.ENABLE_INFO},set:function(t){o.default.ENABLE_INFO=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableWarn",{get:function(){return o.default.ENABLE_WARN},set:function(t){o.default.ENABLE_WARN=t,e._notifyChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"enableError",{get:function(){return o.default.ENABLE_ERROR},set:function(t){o.default.ENABLE_ERROR=t,e._notifyChange()},enumerable:!1,configurable:!0}),e.getConfig=function(){return{globalTag:o.default.GLOBAL_TAG,forceGlobalTag:o.default.FORCE_GLOBAL_TAG,enableVerbose:o.default.ENABLE_VERBOSE,enableDebug:o.default.ENABLE_DEBUG,enableInfo:o.default.ENABLE_INFO,enableWarn:o.default.ENABLE_WARN,enableError:o.default.ENABLE_ERROR,enableCallback:o.default.ENABLE_CALLBACK}},e.applyConfig=function(e){o.default.GLOBAL_TAG=e.globalTag,o.default.FORCE_GLOBAL_TAG=e.forceGlobalTag,o.default.ENABLE_VERBOSE=e.enableVerbose,o.default.ENABLE_DEBUG=e.enableDebug,o.default.ENABLE_INFO=e.enableInfo,o.default.ENABLE_WARN=e.enableWarn,o.default.ENABLE_ERROR=e.enableError,o.default.ENABLE_CALLBACK=e.enableCallback},e._notifyChange=function(){var t=e.emitter;if(t.listenerCount("change")>0){var i=e.getConfig();t.emit("change",i)}},e.registerListener=function(t){e.emitter.addListener("change",t)},e.removeListener=function(t){e.emitter.removeListener("change",t)},e.addLogListener=function(t){o.default.emitter.addListener("log",t),o.default.emitter.listenerCount("log")>0&&(o.default.ENABLE_CALLBACK=!0,e._notifyChange())},e.removeLogListener=function(t){o.default.emitter.removeListener("log",t),0===o.default.emitter.listenerCount("log")&&(o.default.ENABLE_CALLBACK=!1,e._notifyChange())},e}();s.emitter=new(r()),t.default=s},"./src/utils/polyfill.js":
/*!*******************************!*\
  !*** ./src/utils/polyfill.js ***!
  \*******************************/function(e,t,i){"use strict";i.r(t);var n=function(){function e(){}return e.install=function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}return t},"function"!=typeof self.Promise&&i(/*! es6-promise */"./node_modules/es6-promise/dist/es6-promise.js").polyfill()},e}();n.install(),t.default=n},"./src/utils/utf8-conv.js":
/*!********************************!*\
  !*** ./src/utils/utf8-conv.js ***!
  \********************************/function(e,t,i){"use strict";function n(e,t,i){var n=e;if(t+i<n.length){for(;i--;)if(128!=(192&n[++t]))return!1;return!0}return!1}i.r(t),t.default=function(e){for(var t=[],i=e,r=0,o=e.length;r<o;)if(i[r]<128)t.push(String.fromCharCode(i[r])),++r;else{if(i[r]<192);else if(i[r]<224){if(n(i,r,1)&&(s=(31&i[r])<<6|63&i[r+1])>=128){t.push(String.fromCharCode(65535&s)),r+=2;continue}}else if(i[r]<240){if(n(i,r,2)&&(s=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2])>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),r+=3;continue}}else if(i[r]<248){var s;if(n(i,r,3)&&(s=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3])>65536&&s<1114112){s-=65536,t.push(String.fromCharCode(s>>>10|55296)),t.push(String.fromCharCode(1023&s|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")}}},i={};function n(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return e[t].call(o.exports,o,o.exports,n),o.exports}return n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n("./src/index.js")}()},e.exports=i()}).call(this,i(93))},30:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"pdf-viewer"},[this.pdfSrc?this._e():t("p",{staticClass:"pdf-viewer-errorMessage"},[this._v("\n    "+this._s("暂无"+this.titleName+"信息")+"\n  ")]),this._v(" "),t("div",{attrs:{id:"pdf-content"}})])};n._withStripped=!0;var r=i(39),o=i.n(r),s={props:{pdfSrc:{type:String,default:""},titleName:{type:String,default:""}},data:function(){return{}},watch:{pdfSrc:function(){this.updatePDF()}},mounted:function(){this.updatePDF()},methods:{updatePDF:function(){this.pdfSrc&&o.a.embed(this.pdfSrc,"#pdf-content")}}},a=i(0),u=Object(a.a)(s,n,[],!1,null,"039353e9",null);u.options.__file="PDFViewer/index.vue";t.default=u.exports},31:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this.$createElement;return(this._self._c||e)("div",[this._t("default",null,{images:this.images,options:this.options})],2)};n._withStripped=!0;var r=i(38),o=i.n(r);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var a={url:"data-src",title:function(e,t){return t.naturalWidth+" × "+t.naturalHeight}},u={props:{images:{type:Array,default:null},options:{type:Object,default:null}},watch:{images:function(){this.onChange()},options:{deep:!0,handler:function(){var e=this;this.$nextTick((function(){e.rebuildViewer()}))}}},mounted:function(){this.buildViewer()},beforeDestroy:function(){this.destroyViewer()},methods:{buildViewer:function(){this.$viewer=new o.a(this.$el,s({},a,this.options))},rebuildViewer:function(){this.destroyViewer(),this.buildViewer()},updateViewer:function(){this.$viewer?this.$viewer.update():this.buildViewer()},destroyViewer:function(){this.$viewer&&(this.$viewer.destroy(),this.$viewer=null)},onChange:function(){this.updateViewer()}}},l=i(0),d=Object(l.a)(u,n,[],!1,null,null,null);d.options.__file="ImageViewer/index.vue";t.default=d.exports},32:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this.$createElement,t=this._self._c||e;return t("audio",this._b({},"audio",this.audioOptions,!1),[this._v("\n  Your browser does not support the\n  "),t("code",[this._v("audio")]),this._v(" element.\n")])};function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}n._withStripped=!0;var o={autoplay:!0},s={name:"AudioPlayer",props:{options:{type:Object,default:function(){return o}}},computed:{audioOptions:function(){return r({},o,this.options)}}},a=i(0),u=Object(a.a)(s,n,[],!1,null,null,null);u.options.__file="AudioPlayer/index.vue";t.default=u.exports},33:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this.$createElement;return(this._self._c||e)("video",{ref:"videoPlayer",staticClass:"video-js",attrs:{controls:this.controls}})};n._withStripped=!0;var r=i(26),o=i.n(r);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var a={name:"VideoPlayer",props:{controls:{type:Boolean,default:!0},src:{type:String,default:""},mediaDataSource:{type:Object,default:void 0},config:{type:Object,default:void 0}},data:function(){return{$player:null}},mounted:function(){if(o.a.isSupported())try{var e=o.a.createPlayer(s({type:"mp4",url:this.src},this.mediaDataSource||{}),this.config);e.attachMediaElement(this.$refs.videoPlayer),e.load(),e.play(),this.$player=e}catch(e){console.log(e)}else this.$message.error("抱歉，您的浏览器不支持flv.js。")},beforeDestroy:function(){this.$player&&this.$player.destroy()}},u=i(0),l=Object(u.a)(a,n,[],!1,null,null,null);l.options.__file="VideoPlayer/index.vue";t.default=l.exports},38:function(e,t,i){"use strict";
/*!
 * Viewer.js v1.10.2
 * https://fengyuanchen.github.io/viewerjs
 *
 * Copyright 2015-present Chen Fengyuan
 * Released under the MIT license
 *
 * Date: 2021-10-22T13:59:51.046Z
 */function n(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?n(Object(i),!0).forEach((function(t){u(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l={backdrop:!0,button:!0,navbar:!0,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialViewIndex:0,inline:!1,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,minWidth:200,minHeight:100,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,slideOnTouch:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,stop:null},d="undefined"!=typeof window&&void 0!==window.document,c=d?window:{},h=!(!d||!c.document.documentElement)&&"ontouchstart"in c.document.documentElement,f=!!d&&"PointerEvent"in c,p="".concat("viewer","-active"),m="".concat("viewer","-close"),_="".concat("viewer","-fade"),g="".concat("viewer","-fixed"),v="".concat("viewer","-fullscreen"),y="".concat("viewer","-fullscreen-exit"),b="".concat("viewer","-hide"),w="".concat("viewer","-hide-md-down"),E="".concat("viewer","-hide-sm-down"),S="".concat("viewer","-hide-xs-down"),A="".concat("viewer","-in"),L="".concat("viewer","-invisible"),R="".concat("viewer","-loading"),T="".concat("viewer","-move"),x="".concat("viewer","-open"),O="".concat("viewer","-show"),C="".concat("viewer","-transition"),k=f?"pointerdown":h?"touchstart":"mousedown",I=f?"pointermove":h?"touchmove":"mousemove",D=f?"pointerup pointercancel":h?"touchend touchcancel":"mouseup",M="".concat("viewer","Action"),P=/\s\s*/,B=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function j(e){return"string"==typeof e}var N=Number.isNaN||c.isNaN;function F(e){return"number"==typeof e&&!N(e)}function U(e){return void 0===e}function z(e){return"object"===o(e)&&null!==e}var V=Object.prototype.hasOwnProperty;function G(e){if(!z(e))return!1;try{var t=e.constructor,i=t.prototype;return t&&i&&V.call(i,"isPrototypeOf")}catch(e){return!1}}function q(e){return"function"==typeof e}function H(e,t){if(e&&q(t))if(Array.isArray(e)||F(e.length)){var i,n=e.length;for(i=0;i<n&&!1!==t.call(e,e[i],i,e);i+=1);}else z(e)&&Object.keys(e).forEach((function(i){t.call(e,e[i],i,e)}));return e}var W=Object.assign||function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return z(e)&&i.length>0&&i.forEach((function(t){z(t)&&Object.keys(t).forEach((function(i){e[i]=t[i]}))})),e},K=/^(?:width|height|left|top|marginLeft|marginTop)$/;function X(e,t){var i=e.style;H(t,(function(e,t){K.test(t)&&F(e)&&(e+="px"),i[t]=e}))}function Y(e){return j(e)?e.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}function $(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)}function Z(e,t){if(e&&t)if(F(e.length))H(e,(function(e){Z(e,t)}));else if(e.classList)e.classList.add(t);else{var i=e.className.trim();i?i.indexOf(t)<0&&(e.className="".concat(i," ").concat(t)):e.className=t}}function J(e,t){e&&t&&(F(e.length)?H(e,(function(e){J(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function Q(e,t,i){t&&(F(e.length)?H(e,(function(e){Q(e,t,i)})):i?Z(e,t):J(e,t))}var ee=/([a-z\d])([A-Z])/g;function te(e){return e.replace(ee,"$1-$2").toLowerCase()}function ie(e,t){return z(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(te(t)))}function ne(e,t,i){z(i)?e[t]=i:e.dataset?e.dataset[t]=i:e.setAttribute("data-".concat(te(t)),i)}var re=function(){var e=!1;if(d){var t=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return e}();function oe(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i;t.trim().split(P).forEach((function(t){if(!re){var o=e.listeners;o&&o[t]&&o[t][i]&&(r=o[t][i],delete o[t][i],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,r,n)}))}function se(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=i;t.trim().split(P).forEach((function(t){if(n.once&&!re){var o=e.listeners,s=void 0===o?{}:o;r=function(){delete s[t][i],e.removeEventListener(t,r,n);for(var o=arguments.length,a=new Array(o),u=0;u<o;u++)a[u]=arguments[u];i.apply(e,a)},s[t]||(s[t]={}),s[t][i]&&e.removeEventListener(t,s[t][i],n),s[t][i]=r,e.listeners=s}e.addEventListener(t,r,n)}))}function ae(e,t,i,n){var o;return q(Event)&&q(CustomEvent)?o=new CustomEvent(t,r({bubbles:!0,cancelable:!0,detail:i},n)):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,i),e.dispatchEvent(o)}function ue(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}function le(e){var t=e.rotate,i=e.scaleX,n=e.scaleY,r=e.translateX,o=e.translateY,s=[];F(r)&&0!==r&&s.push("translateX(".concat(r,"px)")),F(o)&&0!==o&&s.push("translateY(".concat(o,"px)")),F(t)&&0!==t&&s.push("rotate(".concat(t,"deg)")),F(i)&&1!==i&&s.push("scaleX(".concat(i,")")),F(n)&&1!==n&&s.push("scaleY(".concat(n,")"));var a=s.length?s.join(" "):"none";return{WebkitTransform:a,msTransform:a,transform:a}}var de=c.navigator&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(c.navigator.userAgent);function ce(e,t,i){var n=document.createElement("img");if(e.naturalWidth&&!de)return i(e.naturalWidth,e.naturalHeight),n;var r=document.body||document.documentElement;return n.onload=function(){i(n.width,n.height),de||r.removeChild(n)},H(t.inheritedAttributes,(function(t){var i=e.getAttribute(t);null!==i&&n.setAttribute(t,i)})),n.src=e.src,de||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(n)),n}function he(e){switch(e){case 2:return S;case 3:return E;case 4:return w;default:return""}}function fe(e,t){var i=e.pageX,n=e.pageY,o={endX:i,endY:n};return t?o:r({timeStamp:Date.now(),startX:i,startY:n},o)}function pe(e){var t=0,i=0,n=0;return H(e,(function(e){var r=e.startX,o=e.startY;t+=r,i+=o,n+=1})),{pageX:t/=n,pageY:i/=n}}var me,_e={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.element.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,i=this.parent;t.inline&&(e={width:Math.max(i.offsetWidth,t.minWidth),height:Math.max(i.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=W({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&X(this.viewer,this.viewerData)},initList:function(){var e=this,t=this.element,i=this.options,n=this.list,r=[];n.innerHTML="",H(this.images,(function(t,o){var s=t.src,a=t.alt||function(e){return j(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}(s),u=e.getImageURL(t);if(s||u){var l=document.createElement("li"),d=document.createElement("img");H(i.inheritedAttributes,(function(e){var i=t.getAttribute(e);null!==i&&d.setAttribute(e,i)})),d.src=s||u,d.alt=a,d.setAttribute("data-original-url",u||s),l.setAttribute("data-index",o),l.setAttribute("data-viewer-action","view"),l.setAttribute("role","button"),i.keyboard&&l.setAttribute("tabindex",0),l.appendChild(d),n.appendChild(l),r.push(l)}})),this.items=r,H(r,(function(t){var n,r,o=t.firstElementChild;ne(o,"filled",!0),i.loading&&Z(t,R),se(o,"load",n=function(n){oe(o,"error",r),i.loading&&J(t,R),e.loadImage(n)},{once:!0}),se(o,"error",r=function(){oe(o,"load",n),i.loading&&J(t,R)},{once:!0})})),i.transition&&se(t,"viewed",(function(){Z(n,C)}),{once:!0})},renderList:function(){var e=this.index,t=this.items[e];if(t){var i=t.nextElementSibling,n=parseInt(window.getComputedStyle(i||t).marginLeft,10),r=t.offsetWidth,o=r+n;X(this.list,W({width:o*this.length-n},le({translateX:(this.viewerData.width-r)/2-o*e})))}},resetList:function(){var e=this.list;e.innerHTML="",J(e,C),X(e,le({translateX:0}))},initImage:function(e){var t,i=this,n=this.options,r=this.image,o=this.viewerData,s=this.footer.offsetHeight,a=o.width,u=Math.max(o.height-s,s),l=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=ce(r,n,(function(t,r){var o=t/r,s=a,d=u;i.imageInitializing=!1,u*o>a?d=a/o:s=u*o,s=Math.min(.9*s,t),d=Math.min(.9*d,r);var c=(a-s)/2,h=(u-d)/2,f={left:c,top:h,x:c,y:h,width:s,height:d,oldRatio:1,ratio:s/t,aspectRatio:o,naturalWidth:t,naturalHeight:r},p=W({},f);n.rotatable&&(f.rotate=l.rotate||0,p.rotate=0),n.scalable&&(f.scaleX=l.scaleX||1,f.scaleY=l.scaleY||1,p.scaleX=1,p.scaleY=1),i.imageData=f,i.initialImageData=p,e&&e()}))},renderImage:function(e){var t=this,i=this.image,n=this.imageData;if(X(i,W({width:n.width,height:n.height,marginLeft:n.x,marginTop:n.y},le(n))),e)if((this.viewing||this.moving||this.rotating||this.scaling||this.zooming)&&this.options.transition&&$(i,C)){var r=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){oe(i,"transitionend",r)}},se(i,"transitionend",r,{once:!0})}else e()},resetImage:function(){if(this.viewing||this.viewed){var e=this.image;this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null}}},ge={bind:function(){var e=this.options,t=this.viewer,i=this.canvas,n=this.element.ownerDocument;se(t,"click",this.onClick=this.click.bind(this)),se(t,"dragstart",this.onDragStart=this.dragstart.bind(this)),se(i,k,this.onPointerDown=this.pointerdown.bind(this)),se(n,I,this.onPointerMove=this.pointermove.bind(this)),se(n,D,this.onPointerUp=this.pointerup.bind(this)),se(n,"keydown",this.onKeyDown=this.keydown.bind(this)),se(window,"resize",this.onResize=this.resize.bind(this)),e.zoomable&&e.zoomOnWheel&&se(t,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleOnDblclick&&se(i,"dblclick",this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,i=this.canvas,n=this.element.ownerDocument;oe(t,"click",this.onClick),oe(t,"dragstart",this.onDragStart),oe(i,k,this.onPointerDown),oe(n,I,this.onPointerMove),oe(n,D,this.onPointerUp),oe(n,"keydown",this.onKeyDown),oe(window,"resize",this.onResize),e.zoomable&&e.zoomOnWheel&&oe(t,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleOnDblclick&&oe(i,"dblclick",this.onDblclick)}},ve={click:function(e){var t=this.options,i=this.imageData,n=e.target,r=ie(n,M);switch(r||"img"!==n.localName||"li"!==n.parentElement.localName||(r=ie(n=n.parentElement,M)),h&&e.isTrusted&&n===this.canvas&&clearTimeout(this.clickCanvasTimeout),r){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.hide();break;case"view":this.view(ie(n,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-i.scaleX||-1);break;case"flip-vertical":this.scaleY(-i.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(h&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.toggle(e))},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,i=this.options,n=this.image,r=this.index,o=this.viewerData;J(n,L),i.loading&&J(this.canvas,R),n.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage((function(){Q(n,T,i.movable),Q(n,C,i.transition),e.renderImage((function(){e.viewed=!0,e.viewing=!1,q(i.viewed)&&se(t,"viewed",i.viewed,{once:!0}),ae(t,"viewed",{originalImage:e.images[r],index:r,image:n},{cancelable:!1})}))}))},loadImage:function(e){var t=e.target,i=t.parentNode,n=i.offsetWidth||30,r=i.offsetHeight||50,o=!!ie(t,"filled");ce(t,this.options,(function(e,i){var s=e/i,a=n,u=r;r*s>n?o?a=r*s:u=n/s:o?u=n/s:a=r*s,X(t,W({width:a,height:u},le({translateX:(n-a)/2,translateY:(r-u)/2})))}))},keydown:function(e){var t=this.options;if(t.keyboard){var i=e.keyCode||e.which||e.charCode;switch(i){case 13:this.viewer.contains(e.target)&&this.click(e)}if(this.fulled)switch(i){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},pointerdown:function(e){var t=this.options,i=this.pointers,n=e.buttons,r=e.button;if(!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(F(n)&&1!==n||F(r)&&0!==r||e.ctrlKey))){e.preventDefault(),e.changedTouches?H(e.changedTouches,(function(e){i[e.identifier]=fe(e)})):i[e.pointerId||0]=fe(e);var o=!!t.movable&&"move";t.zoomOnTouch&&t.zoomable&&Object.keys(i).length>1?o="zoom":t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o="switch"),!t.transition||"move"!==o&&"zoom"!==o||J(this.image,C),this.action=o}},pointermove:function(e){var t=this.pointers,i=this.action;this.viewed&&i&&(e.preventDefault(),e.changedTouches?H(e.changedTouches,(function(e){W(t[e.identifier]||{},fe(e,!0))})):W(t[e.pointerId||0]||{},fe(e,!0)),this.change(e))},pointerup:function(e){var t,i=this,n=this.options,r=this.action,o=this.pointers;e.changedTouches?H(e.changedTouches,(function(e){t=o[e.identifier],delete o[e.identifier]})):(t=o[e.pointerId||0],delete o[e.pointerId||0]),r&&(e.preventDefault(),!n.transition||"move"!==r&&"zoom"!==r||Z(this.image,C),this.action=!1,h&&"zoom"!==r&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),n.toggleOnDblclick&&this.viewed&&e.target===this.image?this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout((function(){ae(i.image,"dblclick")}),50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout((function(){i.imageClicked=!1}),500)):(this.imageClicked=!1,n.backdrop&&"static"!==n.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout((function(){ae(i.canvas,"click")}),50)))))},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage()})),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();H(this.player.getElementsByTagName("img"),(function(t){se(t,"load",e.loadImage.bind(e),{once:!0}),ae(t,"load")}))}},wheel:function(e){var t=this;if(this.viewed&&(e.preventDefault(),!this.wheeling)){this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50);var i=Number(this.options.zoomRatio)||.1,n=1;e.deltaY?n=e.deltaY>0?1:-1:e.wheelDelta?n=-e.wheelDelta/120:e.detail&&(n=e.detail>0?1:-1),this.zoom(-n*i,!0,e)}}},ye={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,i=this.options;if(i.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;if(q(i.show)&&se(t,"show",i.show,{once:!0}),!1===ae(t,"show")||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var n=this.viewer;if(J(n,b),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("aria-hidden"),i.transition&&!e){var r=this.shown.bind(this);this.transitioning={abort:function(){oe(n,"transitionend",r),J(n,A)}},Z(n,C),n.initialOffsetWidth=n.offsetWidth,se(n,"transitionend",r,{once:!0}),Z(n,A)}else Z(n,A),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.element,n=this.options;if(n.inline||this.hiding||!this.isShown&&!this.showing)return this;if(q(n.hide)&&se(i,"hide",n.hide,{once:!0}),!1===ae(i,"hide"))return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var r=this.viewer,o=this.image,s=function(){J(r,A),e.hidden()};if(n.transition&&!t){var a=function t(i){i&&i.target===r&&(oe(r,"transitionend",t),e.hidden())},u=function(){$(r,C)?(se(r,"transitionend",a),J(r,A)):s()};this.transitioning={abort:function(){e.viewed&&$(o,C)?oe(o,"transitionend",u):$(r,C)&&oe(r,"transitionend",a)}},this.viewed&&$(o,C)?(se(o,"transitionend",u,{once:!0}),this.zoomTo(0,!1,null,!0)):u()}else s();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===this.index)return this;if(!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var i=this.element,n=this.options,r=this.title,o=this.canvas,s=this.items[t],a=s.querySelector("img"),u=ie(a,"originalUrl"),l=a.getAttribute("alt"),d=document.createElement("img");if(H(n.inheritedAttributes,(function(e){var t=a.getAttribute(e);null!==t&&d.setAttribute(e,t)})),d.src=u,d.alt=l,q(n.view)&&se(i,"view",n.view,{once:!0}),!1===ae(i,"view",{originalImage:this.images[t],index:t,image:d})||!this.isShown||this.hiding||this.played)return this;var c=this.items[this.index];c&&(J(c,p),c.removeAttribute("aria-selected")),Z(s,p),s.setAttribute("aria-selected",!0),n.focus&&s.focus(),this.image=d,this.viewed=!1,this.index=t,this.imageData={},Z(d,L),n.loading&&Z(o,R),o.innerHTML="",o.appendChild(d),this.renderList(),r.innerHTML="";var h,f,m=function(){var t=e.imageData,i=Array.isArray(n.title)?n.title[1]:n.title;r.innerHTML=Y(q(i)?i.call(e,d,t):"".concat(l," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))};return se(i,"viewed",m,{once:!0}),this.viewing={abort:function(){oe(i,"viewed",m),d.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(d.src="",oe(d,"load",h),e.timeout&&clearTimeout(e.timeout))}},d.complete?this.load():(se(d,"load",h=function(){oe(d,"error",f),e.load()},{once:!0}),se(d,"error",f=function(){oe(d,"load",h),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1),J(d,L),n.loading&&J(e.canvas,R)},{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout((function(){J(d,L),e.timeout=!1}),1e3)),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,i=this.index+1;return i>t&&(i=e?0:t),this.view(i),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.imageData;return this.moveTo(U(e)?e:i.x+Number(e),U(t)?t:i.y+Number(t)),this},moveTo:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.element,o=this.options,s=this.imageData;if(e=Number(e),i=Number(i),this.viewed&&!this.played&&o.movable){var a=s.x,u=s.y,l=!1;if(F(e)?l=!0:e=a,F(i)?l=!0:i=u,l){if(q(o.move)&&se(r,"move",o.move,{once:!0}),!1===ae(r,"move",{x:e,y:i,oldX:a,oldY:u,originalEvent:n}))return this;s.x=e,s.y=i,s.left=e,s.top=i,this.moving=!0,this.renderImage((function(){t.moving=!1,q(o.moved)&&se(r,"moved",o.moved,{once:!0}),ae(r,"moved",{x:e,y:i,oldX:a,oldY:u,originalEvent:n},{cancelable:!1})}))}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,i=this.element,n=this.options,r=this.imageData;if(F(e=Number(e))&&this.viewed&&!this.played&&n.rotatable){var o=r.rotate;if(q(n.rotate)&&se(i,"rotate",n.rotate,{once:!0}),!1===ae(i,"rotate",{degree:e,oldDegree:o}))return this;r.rotate=e,this.rotating=!0,this.renderImage((function(){t.rotating=!1,q(n.rotated)&&se(i,"rotated",n.rotated,{once:!0}),ae(i,"rotated",{degree:e,oldDegree:o},{cancelable:!1})}))}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.element,r=this.options,o=this.imageData;if(e=Number(e),i=Number(i),this.viewed&&!this.played&&r.scalable){var s=o.scaleX,a=o.scaleY,u=!1;if(F(e)?u=!0:e=s,F(i)?u=!0:i=a,u){if(q(r.scale)&&se(n,"scale",r.scale,{once:!0}),!1===ae(n,"scale",{scaleX:e,scaleY:i,oldScaleX:s,oldScaleY:a}))return this;o.scaleX=e,o.scaleY=i,this.scaling=!0,this.renderImage((function(){t.scaling=!1,q(r.scaled)&&se(n,"scaled",r.scaled,{once:!0}),ae(n,"scaled",{scaleX:e,scaleY:i,oldScaleX:s,oldScaleY:a},{cancelable:!1})}))}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,t,i),this},zoomTo:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.element,s=this.options,a=this.pointers,u=this.imageData,l=u.x,d=u.y,c=u.width,h=u.height,f=u.naturalWidth,p=u.naturalHeight;if(F(e=Math.max(0,e))&&this.viewed&&!this.played&&(r||s.zoomable)){if(!r){var m=Math.max(.01,s.minZoomRatio),_=Math.min(100,s.maxZoomRatio);e=Math.min(Math.max(e,m),_)}n&&s.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);var g=f*e,v=p*e,y=g-c,b=v-h,w=u.ratio;if(q(s.zoom)&&se(o,"zoom",s.zoom,{once:!0}),!1===ae(o,"zoom",{ratio:e,oldRatio:w,originalEvent:n}))return this;if(this.zooming=!0,n){var E=ue(this.viewer),S=a&&Object.keys(a).length?pe(a):{pageX:n.pageX,pageY:n.pageY};u.x-=y*((S.pageX-E.left-l)/c),u.y-=b*((S.pageY-E.top-d)/h)}else u.x-=y/2,u.y-=b/2;u.left=u.x,u.top=u.y,u.width=g,u.height=v,u.oldRatio=w,u.ratio=e,this.renderImage((function(){t.zooming=!1,q(s.zoomed)&&se(o,"zoomed",s.zoomed,{once:!0}),ae(o,"zoomed",{ratio:e,oldRatio:w,originalEvent:n},{cancelable:!1})})),i&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var i=this.element,n=this.options;if(q(n.play)&&se(i,"play",n.play,{once:!0}),!1===ae(i,"play"))return this;var r=this.player,o=this.loadImage.bind(this),s=[],a=0,u=0;if(this.played=!0,this.onLoadWhenPlay=o,t&&this.requestFullscreen(t),Z(r,O),H(this.items,(function(e,t){var i=e.querySelector("img"),l=document.createElement("img");l.src=ie(i,"originalUrl"),l.alt=i.getAttribute("alt"),l.referrerPolicy=i.referrerPolicy,a+=1,Z(l,_),Q(l,C,n.transition),$(e,p)&&(Z(l,A),u=t),s.push(l),se(l,"load",o,{once:!0}),r.appendChild(l)})),F(n.interval)&&n.interval>0){var l=function t(){e.playing=setTimeout((function(){J(s[u],A),Z(s[u=(u+=1)<a?u:0],A),t()}),n.interval)};a>1&&l()}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,i=this.options;if(q(i.stop)&&se(t,"stop",i.stop,{once:!0}),!1===ae(t,"stop"))return this;var n=this.player;return this.played=!1,clearTimeout(this.playing),H(n.getElementsByTagName("img"),(function(t){oe(t,"load",e.onLoadWhenPlay)})),J(n,O),n.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,i=this.viewer,n=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),Z(this.button,y),t.transition&&(J(r,C),this.viewed&&J(n,C)),Z(i,g),i.setAttribute("role","dialog"),i.setAttribute("aria-labelledby",this.title.id),i.setAttribute("aria-modal",!0),i.removeAttribute("style"),X(i,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=W({},this.containerData),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage((function(){t.transition&&setTimeout((function(){Z(n,C),Z(r,C)}),0)}))}))),this},exit:function(){var e=this,t=this.options,i=this.viewer,n=this.image,r=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),J(this.button,y),t.transition&&(J(r,C),this.viewed&&J(n,C)),t.focus&&this.clearEnforceFocus(),i.removeAttribute("role"),i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-modal"),J(i,g),X(i,{zIndex:t.zIndexInline}),this.viewerData=W({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage((function(){e.renderImage((function(){t.transition&&setTimeout((function(){Z(n,C),Z(r,C)}),0)}))})),this):this},tooltip:function(){var e=this,t=this.options,i=this.tooltipBox,n=this.imageData;return this.viewed&&!this.played&&t.tooltip?(i.textContent="".concat(Math.round(100*n.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):t.transition?(this.fading&&ae(i,"transitionend"),Z(i,O),Z(i,_),Z(i,C),i.removeAttribute("aria-hidden"),i.initialOffsetWidth=i.offsetWidth,Z(i,A)):(Z(i,O),i.removeAttribute("aria-hidden")),this.tooltipping=setTimeout((function(){t.transition?(se(i,"transitionend",(function(){J(i,O),J(i,_),J(i,C),i.setAttribute("aria-hidden",!0),e.fading=!1}),{once:!0}),J(i,A),e.fading=!0):(J(i,O),i.setAttribute("aria-hidden",!0)),e.tooltipping=!1}),1e3),this):this},toggle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0,e):this.zoomTo(1,!0,e),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=W({},this.initialImageData),this.renderImage()),this},update:function(){var e=this,t=this.element,i=this.options,n=this.isImg;if(n&&!t.parentNode)return this.destroy();var r=[];if(H(n?[t]:t.querySelectorAll("img"),(function(t){q(i.filter)?i.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)})),!r.length)return this;if(this.images=r,this.length=r.length,this.ready){var o=[];if(H(this.items,(function(e,t){var i=e.querySelector("img"),n=r[t];n&&i&&n.src===i.src&&n.alt===i.alt||o.push(t)})),X(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=o.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var a=this.items[this.index];Z(a,p),a.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e.viewer?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||oe(e,"click",this.onStart),e.viewer=void 0,this):this}},be={getImageURL:function(e){var t=this.options.url;return t=j(t)?e.getAttribute(t):q(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),se(document,"focusin",this.onFocusin=function(t){var i=e.viewer,n=t.target;n===document||n===i||i.contains(n)||null!==n.getAttribute("tabindex")&&"true"===n.getAttribute("aria-modal")||i.focus()})},clearEnforceFocus:function(){this.onFocusin&&(oe(document,"focusin",this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;Z(e,x),e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px")},close:function(){var e=this.body;J(e,x),e.style.paddingRight=this.initialBodyPaddingRight},shown:function(){var e=this.element,t=this.options,i=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(i.focus(),this.enforceFocus()),q(t.shown)&&se(e,"shown",t.shown,{once:!0}),!1!==ae(e,"shown")&&this.ready&&this.isShown&&!this.hiding&&this.view(this.index)},hidden:function(){var e=this.element,t=this.options,i=this.viewer;t.fucus&&this.clearEnforceFocus(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.close(),this.unbind(),Z(i,b),i.removeAttribute("role"),i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-modal"),i.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.hiding=!1,this.destroyed||(q(t.hidden)&&se(e,"hidden",t.hidden,{once:!0}),ae(e,"hidden",null,{cancelable:!1}))},requestFullscreen:function(e){var t=this.element.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var i=t.documentElement;i.requestFullscreen?G(e)?i.requestFullscreen(e):i.requestFullscreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):i.mozRequestFullScreen?i.mozRequestFullScreen():i.msRequestFullscreen&&i.msRequestFullscreen()}},exitFullscreen:function(){var e=this.element.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,i=this.pointers,n=i[Object.keys(i)[0]];if(n){var o=n.endX-n.startX,s=n.endY-n.startY;switch(this.action){case"move":this.move(o,s,e);break;case"zoom":this.zoom(function(e){var t=r({},e),i=[];return H(e,(function(e,n){delete t[n],H(t,(function(t){var n=Math.abs(e.startX-t.startX),r=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),s=Math.abs(e.endY-t.endY),a=Math.sqrt(n*n+r*r),u=(Math.sqrt(o*o+s*s)-a)/a;i.push(u)}))})),i.sort((function(e,t){return Math.abs(e)<Math.abs(t)})),i[0]}(i),!1,e);break;case"switch":this.action="switched";var a=Math.abs(o);a>1&&a>Math.abs(s)&&(this.pointers={},o>1?this.prev(t.loop):o<-1&&this.next(t.loop))}H(i,(function(e){e.startX=e.endX,e.startY=e.endY}))}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},we=c.Viewer,Ee=(me=-1,function(){return me+=1}),Se=function(){function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(s(this,e),!t||1!==t.nodeType)throw new Error("The first argument is required and must be an element.");this.element=t,this.options=W({},l,G(i)&&i),this.action=!1,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.id=Ee(),this.init()}var t,i,n;return t=e,n=[{key:"noConflict",value:function(){return window.Viewer=we,e}},{key:"setDefaults",value:function(e){W(l,G(e)&&e)}}],(i=[{key:"init",value:function(){var e=this,t=this.element,i=this.options;if(!t.viewer){t.viewer=this,i.focus&&!i.keyboard&&(i.focus=!1);var n="img"===t.localName,r=[];if(H(n?[t]:t.querySelectorAll("img"),(function(t){q(i.filter)?i.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)})),this.isImg=n,this.length=r.length,this.images=r,this.initBody(),U(document.createElement("viewer").style.transition)&&(i.transition=!1),i.inline){var o=0,s=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout((function(){e.delaying=!1,e.build()}),0))};this.initializing={abort:function(){H(r,(function(e){e.complete||oe(e,"load",s)}))}},H(r,(function(e){e.complete?s():se(e,"load",s,{once:!0})}))}else se(t,"click",this.onStart=function(t){var n=t.target;"img"!==n.localName||q(i.filter)&&!i.filter.call(e,n)||e.view(e.images.indexOf(n))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,i=e.parentNode,n=document.createElement("div");n.innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-footer"><div class="viewer-title"></div><div class="viewer-toolbar"></div><div class="viewer-navbar"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button"></div><div class="viewer-player"></div></div>';var r=n.querySelector(".".concat("viewer","-container")),o=r.querySelector(".".concat("viewer","-title")),s=r.querySelector(".".concat("viewer","-toolbar")),a=r.querySelector(".".concat("viewer","-navbar")),u=r.querySelector(".".concat("viewer","-button")),l=r.querySelector(".".concat("viewer","-canvas"));if(this.parent=i,this.viewer=r,this.title=o,this.toolbar=s,this.navbar=a,this.button=u,this.canvas=l,this.footer=r.querySelector(".".concat("viewer","-footer")),this.tooltipBox=r.querySelector(".".concat("viewer","-tooltip")),this.player=r.querySelector(".".concat("viewer","-player")),this.list=r.querySelector(".".concat("viewer","-list")),r.id="".concat("viewer").concat(this.id),o.id="".concat("viewer","Title").concat(this.id),Z(o,t.title?he(Array.isArray(t.title)?t.title[0]:t.title):b),Z(a,t.navbar?he(t.navbar):b),Q(u,b,!t.button),t.keyboard&&u.setAttribute("tabindex",0),t.backdrop&&(Z(r,"".concat("viewer","-backdrop")),t.inline||"static"===t.backdrop||ne(l,M,"hide")),j(t.className)&&t.className&&t.className.split(P).forEach((function(e){Z(r,e)})),t.toolbar){var d=document.createElement("ul"),c=G(t.toolbar),h=B.slice(0,3),f=B.slice(7,9),p=B.slice(9);c||Z(s,he(t.toolbar)),H(c?t.toolbar:B,(function(e,i){var n=c&&G(e),r=c?te(i):e,o=n&&!U(e.show)?e.show:e;if(o&&(t.zoomable||-1===h.indexOf(r))&&(t.rotatable||-1===f.indexOf(r))&&(t.scalable||-1===p.indexOf(r))){var s=n&&!U(e.size)?e.size:e,a=n&&!U(e.click)?e.click:e,u=document.createElement("li");t.keyboard&&u.setAttribute("tabindex",0),u.setAttribute("role","button"),Z(u,"".concat("viewer","-").concat(r)),q(a)||ne(u,M,r),F(o)&&Z(u,he(o)),-1!==["small","large"].indexOf(s)?Z(u,"".concat("viewer","-").concat(s)):"play"===r&&Z(u,"".concat("viewer","-large")),q(a)&&se(u,"click",a),d.appendChild(u)}})),s.appendChild(d)}else Z(s,b);if(!t.rotatable){var y=s.querySelectorAll('li[class*="rotate"]');Z(y,L),H(y,(function(e){s.appendChild(e)}))}if(t.inline)Z(u,v),X(r,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(i).position&&X(i,{position:"relative"}),i.insertBefore(r,e.nextSibling);else{Z(u,m),Z(r,g),Z(r,_),Z(r,b),X(r,{zIndex:t.zIndex});var w=t.container;j(w)&&(w=e.ownerDocument.querySelector(w)),w||(w=this.body),w.appendChild(r)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,q(t.ready)&&se(e,"ready",t.ready,{once:!0}),!1!==ae(e,"ready")?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}])&&a(t.prototype,i),n&&a(t,n),e}();W(Se.prototype,_e,ge,ve,ye,be),e.exports=Se},39:function(e,t,i){var n,r,o;
/**
 *  PDFObject v2.2.7
 *  https://github.com/pipwerks/PDFObject
 *  @license
 *  Copyright (c) 2008-2021 Philip Hutchison
 *  MIT-style license: http://pipwerks.mit-license.org/
 *  UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js
 */r=[],void 0===(o="function"==typeof(n=function(){"use strict";if("undefined"==typeof window||void 0===window.navigator||void 0===window.navigator.userAgent||void 0===window.navigator.mimeTypes)return!1;let e=window.navigator,t=window.navigator.userAgent,i="ActiveXObject"in window,n=void 0!==window.Promise,r=void 0!==e.mimeTypes["application/pdf"],o=void 0!==e.platform&&"MacIntel"===e.platform&&void 0!==e.maxTouchPoints&&e.maxTouchPoints>1||/Mobi|Tablet|Android|iPad|iPhone/.test(t),s=!o&&void 0!==e.vendor&&/Apple/.test(e.vendor)&&/Safari/.test(t),a=!!(!o&&/irefox/.test(t)&&t.split("rv:").length>1)&&parseInt(t.split("rv:")[1].split(".")[0],10)>18,u=function(e){var t;try{t=new ActiveXObject(e)}catch(e){t=null}return t},l=!o&&(n||a||r||i&&!(!u("AcroPDF.PDF")&&!u("PDF.PdfCtrl"))),d=function(e,t){return t||console.log("[PDFObject] "+e),!1},c=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},h=function(e,t,i,n,r,o,s){c(e);let a=n+"?file="+encodeURIComponent(t)+i,u=document.createElement("div"),l=document.createElement("iframe");return l.src=a,l.className="pdfobject",l.type="application/pdf",l.frameborder="0",l.allow="fullscreen",l.title=o,r&&(l.id=r),s||(u.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; left: 0;",l.style.cssText="border: none; width: 100%; height: 100%;",e.style.position="relative",e.style.overflow="auto"),u.appendChild(l),e.appendChild(u),e.classList.add("pdfobject-container"),e.getElementsByTagName("iframe")[0]},f=function(e,t,i){let n=t||!1,r=i||{},a="string"==typeof r.id?r.id:"",u=r.page||!1,f=r.pdfOpenParams||{},p=r.fallbackLink||!0,m=r.width||"100%",_=r.height||"100%",g=r.title||"Embedded PDF",v="boolean"!=typeof r.assumptionMode||r.assumptionMode,y="boolean"==typeof r.forcePDFJS&&r.forcePDFJS,b="boolean"==typeof r.supportRedirect&&r.supportRedirect,w="boolean"==typeof r.omitInlineStyles&&r.omitInlineStyles,E="boolean"==typeof r.suppressConsole&&r.suppressConsole,S="boolean"==typeof r.forceIframe&&r.forceIframe,A=r.PDFJS_URL||!1,L=function(e){let t=document.body;return"string"==typeof e?t=document.querySelector(e):void 0!==window.jQuery&&e instanceof jQuery&&e.length?t=e.get(0):void 0!==e.nodeType&&1===e.nodeType&&(t=e),t}(n),R="",T="";return"string"!=typeof e?d("URL is not valid",E):L?(u&&(f.page=u),T=function(e){let t,i="";if(e){for(t in e)e.hasOwnProperty(t)&&(i+=encodeURIComponent(t)+"="+encodeURIComponent(e[t])+"&");i&&(i="#"+i,i=i.slice(0,i.length-1))}return i}(f),y&&A?h(L,e,T,A,a,g,w):l||v&&!o?function(e,t,i,n,r,o,s,a,u,l){c(t);let d=document.createElement(e);if(d.src=n+r,d.className="pdfobject",d.type="application/pdf",d.title=u,a&&(d.id=a),"iframe"===e&&(d.allow="fullscreen"),!l){let t="embed"===e?"overflow: auto;":"border: none;";i&&i!==document.body?t+="width: "+o+"; height: "+s+";":t+="position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;",d.style.cssText=t}return t.classList.add("pdfobject-container"),t.appendChild(d),t.getElementsByTagName(e)[0]}(S||b||s?"iframe":"embed",L,t,e,T,m,_,a,g,w):A?h(L,e,T,A,a,g,w):(p&&(R="string"==typeof p?p:"<p>This browser does not support inline PDFs. Please download the PDF to view it: <a href='[url]'>Download PDF</a></p>",L.innerHTML=R.replace(/\[url\]/g,e)),d("This browser does not support embedded PDFs",E))):d("Target element cannot be determined",E)};return{embed:function(e,t,i){return f(e,t,i)},pdfobjectversion:"2.2.7",supportsPDFs:l}})?n.apply(t,r):n)||(e.exports=o)},4:function(e,t,i){window,e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i(i.s=15)}({15:function(e,t,i){"use strict";i.r(t),i.d(t,"getExtName",(function(){return o})),i.d(t,"download",(function(){return s})),i.d(t,"downloadBlob",(function(){return a})),i.d(t,"getFileType",(function(){return u})),i.d(t,"isImage",(function(){return d})),i.d(t,"isVideo",(function(){return c})),i.d(t,"isAudio",(function(){return h})),i.d(t,"isPDF",(function(){return f})),i.d(t,"FileType",(function(){return n}));var n={IMAGE:"IMAGE",VIDEO:"VIDEO",AUDIO:"AUDIO",PDF:"PDF",OTHER:"OTHER"},r=[{type:n.IMAGE,extList:[".png",".jpg",".jpeg",".bmp",".gif",".webp",".svg"]},{type:n.VIDEO,extList:[".flv",".avi",".mp4",".ogg"]},{type:n.AUDIO,extList:[".mp3",".m4a",".wav",".mpeg"]},{type:n.PDF,extList:[".pdf"]}],o=function(e,t){if(void 0===t&&(t=!0),!e)return"";var i=/^.+(\.(\w+))$/g.exec(e)||[],n=i[1],r=void 0===n?"":n,o=i[2];return t?r:void 0===o?"":o},s=function(e,t,i){var n=document.createElement("a");n.style.display="none",n.href=e,t&&n.setAttribute("download",decodeURI(t)),void 0===n.download&&n.setAttribute("target","_blank"),document.body.appendChild(n),n.click(),document.body.removeChild(n)},a=function(e,t,i){var n=new Blob([e],{type:i}),r=window.URL.createObjectURL(n);s(r,t),window.URL.revokeObjectURL(r)},u=function(e){var t=o(e),i=r.find((function(e){return e.extList.includes(t)}));return i?i.type:n.OTHER},l=function(e){return function(t){var i=u(t);return e===i}},d=l(n.IMAGE),c=l(n.VIDEO),h=l(n.AUDIO),f=l(n.PDF)}})},40:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"viewer"},[e._t("default",(function(){return[i("thumbnail-list",{attrs:{data:e.rebuildData,direction:"horizontal"},nativeOn:{click:function(t){return e.toggle.apply(null,arguments)}},model:{value:e.currentIndex,callback:function(t){e.currentIndex=t},expression:"currentIndex"}})]}),null,{list:e.rebuildData,change:e.change,toggle:e.toggle}),e._v(" "),i("transition",{attrs:{name:"fade"}},[e.visible&&e.current?i("div",{ref:"viewer-dialog",staticClass:"viewer-dialog"},[i("div",{staticClass:"viewer-dialog-close",on:{click:e.toggle}}),e._v(" "),i("el-scrollbar",{staticClass:"viewer-dialog-navbar"},[i("thumbnail-list",{attrs:{data:e.rebuildData,direction:"vertical"},model:{value:e.currentIndex,callback:function(t){e.currentIndex=t},expression:"currentIndex"}})],1),e._v(" "),i("div",{staticClass:"viewer-dialog-content"},[e.current._fileType===e.fileType.IMAGE?i("image-viewer",e._b({ref:"imageViewer",staticClass:"viewer-box"},"image-viewer",e.imageViewerProps,!1),[i("div",{staticClass:"image-viewer-images"},e._l(e.imageData,(function(t){return i("img",{key:t._typeIndex,staticClass:"img",attrs:{"data-src":e.getSrc(t),src:e.getSrc(t)}})})),0)]):e.current._fileType===e.fileType.VIDEO?i("video-player",e._b({staticClass:"viewer-box"},"video-player",e.videoPlayerProps,!1)):e.current._fileType===e.fileType.AUDIO?i("audio-player",e._b({},"audio-player",e.audioPlayerProps,!1)):e.current._fileType===e.fileType.PDF?i("p-d-f-viewer",e._b({staticClass:"viewer-box"},"p-d-f-viewer",e.PDFViewerProps,!1)):e._e()],1)],1):e._e()])],2)};n._withStripped=!0;var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("ul",{staticClass:"thumbnail-list",class:e.directionClass},e._l(e.data,(function(t,n){return i("li",{key:n,ref:"thumbnails",refInFor:!0,staticClass:"thumbnail-item",class:{"is-active":e.isActive(n)}},[i("thumbnail",{attrs:{data:t},nativeOn:{click:function(t){return e.handleView(n)}}})],1)})),0)};r._withStripped=!0;var o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"thumbnail",class:e.thumbnailClass},[i("div",{staticClass:"thumbnail-content"},[e.data._fileType===e.fileType.IMAGE?i("img",{attrs:{src:e.data._src,alt:e.data.title||e.data.__filename}}):i("svg-icon",{attrs:{"icon-class":e.thumbnailIconClass,"class-name":"thumbnail-icon"}}),e._v(" "),e.thumbnailTip?i("div",{staticClass:"thumbnail-tip"},[e._v(e._s(e.thumbnailTip))]):e._e()],1)])};o._withStripped=!0;var s=i(6),a=i.n(s),u=i(7),l=i.n(u),d=new a.a({id:"icon-web-lib-icon-filetype-audio",use:"icon-web-lib-icon-filetype-audio-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="icon-web-lib-icon-filetype-audio"><defs><style type="text/css"></style></defs><path d="M902.095238 314.514286V853.333333a97.52381 97.52381 0 0 1-97.523809 97.52381H219.428571a97.52381 97.52381 0 0 1-97.523809-97.52381V170.666667a97.52381 97.52381 0 0 1 97.523809-97.52381h441.295239z" fill="#A15FDE" p-id="1314" /><path d="M660.72381 241.371429V73.142857l241.371428 241.371429h-168.228571a73.142857 73.142857 0 0 1-73.142857-73.142857z" fill="#C386F0" p-id="1315" /><path d="M633.904762 436.419048v187.001904c0 20.72381-24.380952 37.546667-56.076191 37.546667s-55.832381-16.822857-55.832381-37.546667 24.380952-37.546667 55.832381-37.546666a76.55619 76.55619 0 0 1 31.695239 6.582857v-130.925714l-162.620953 38.278095v166.521905c0 20.72381-24.380952 37.546667-56.807619 37.546666s-57.051429-16.822857-57.051428-37.546666 25.6-37.546667 57.051428-37.546667a76.312381 76.312381 0 0 1 32.426667 6.826667v-161.401905a24.380952 24.380952 0 0 1 18.773333-24.380953l162.377143-37.790476a24.380952 24.380952 0 0 1 30.232381 24.380953z" fill="#FFFFFF" p-id="1316" /></symbol>'}),c=(l.a.add(d),new a.a({id:"icon-web-lib-icon-filetype-image",use:"icon-web-lib-icon-filetype-image-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="icon-web-lib-icon-filetype-image"><defs><style type="text/css"></style></defs><path d="M897.462857 314.514286V853.333333a97.52381 97.52381 0 0 1-97.523809 97.52381h-585.142858a97.52381 97.52381 0 0 1-97.523809-97.52381V170.666667a97.52381 97.52381 0 0 1 97.523809-97.52381h441.295239z" fill="#85BCFF" p-id="1049" /><path d="M660.72381 216.990476V73.142857l241.371428 241.371429h-143.847619a97.52381 97.52381 0 0 1-97.523809-97.52381z" fill="#529EE0" p-id="1050" /><path d="M287.939048 372.784762m48.761904 0l341.333334 0q48.761905 0 48.761904 48.761905l0 278.674285q0 48.761905-48.761904 48.761905l-341.333334 0q-48.761905 0-48.761904-48.761905l0-278.674285q0-48.761905 48.761904-48.761905Z" fill="#FFFFFF" p-id="1051" /><path d="M404.967619 460.068571m-29.013333 0a29.013333 29.013333 0 1 0 58.026666 0 29.013333 29.013333 0 1 0-58.026666 0Z" fill="#85BCFF" p-id="1052" /><path d="M487.619048 641.462857L414.47619 585.142857l-83.382857 85.577143v28.525714a19.992381 19.992381 0 0 0 20.72381 19.017143h312.32a20.23619 20.23619 0 0 0 20.967619-19.017143V585.142857l-73.142857-75.824762z" fill="#85BCFF" p-id="1053" /></symbol>'})),h=(l.a.add(c),new a.a({id:"icon-web-lib-icon-filetype-other",use:"icon-web-lib-icon-filetype-other-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="icon-web-lib-icon-filetype-other"><defs><style type="text/css"></style></defs><path d="M902.095238 314.514286V853.333333a97.52381 97.52381 0 0 1-97.523809 97.52381H219.428571a97.52381 97.52381 0 0 1-97.523809-97.52381V170.666667a97.52381 97.52381 0 0 1 97.523809-97.52381h441.295239z" fill="#BABABA" p-id="1444" /><path d="M660.72381 216.990476V73.142857l241.371428 241.371429h-143.847619a97.52381 97.52381 0 0 1-97.523809-97.52381z" fill="#979797" p-id="1445" /><path d="M701.927619 615.375238a94.841905 94.841905 0 0 1-94.841905 95.085714h-190.171428a94.841905 94.841905 0 0 1-9.508572-189.44 104.838095 104.838095 0 0 1 209.188572 0 94.841905 94.841905 0 0 1 85.333333 94.354286z" fill="#FFFFFF" p-id="1446" /></symbol>'})),f=(l.a.add(h),new a.a({id:"icon-web-lib-icon-filetype-pdf",use:"icon-web-lib-icon-filetype-pdf-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="icon-web-lib-icon-filetype-pdf"><defs><style type="text/css"></style></defs><path d="M902.095238 314.514286V853.333333a97.52381 97.52381 0 0 1-97.523809 97.52381H219.428571a97.52381 97.52381 0 0 1-97.523809-97.52381V170.666667a97.52381 97.52381 0 0 1 97.523809-97.52381h441.295239z" fill="#ED5050" p-id="917" /><path d="M660.72381 265.752381V73.142857l241.371428 241.371429h-192.609524a48.761905 48.761905 0 0 1-48.761904-48.761905z" fill="#D43030" p-id="918" /><path d="M633.904762 577.828571a309.150476 309.150476 0 0 0-59.489524 6.826667 288.670476 288.670476 0 0 1-59.001905-76.068571c16.335238-52.906667 17.066667-88.990476 4.876191-106.057143a31.451429 31.451429 0 0 0-24.380953-12.434286 30.72 30.72 0 0 0-29.500952 15.36c-17.066667 28.281905 7.558095 84.358095 19.017143 107.032381a673.645714 673.645714 0 0 1-50.224762 117.516191c-91.184762 39.009524-93.866667 62.659048-93.866667 71.19238a27.794286 27.794286 0 0 0 16.091429 24.380953 24.380952 24.380952 0 0 0 14.140952 3.657143c24.380952 0 51.2-26.575238 80.700953-78.506667a658.285714 658.285714 0 0 1 112.64-36.083809 121.904762 121.904762 0 0 0 70.217143 28.525714c16.091429 0 48.761905 0 48.761904-32.426667 0.24381-10.971429-6.339048-31.939048-49.980952-32.914286z m-260.632381 124.342858h-2.925714a73.142857 73.142857 0 0 1 34.133333-27.550477 62.659048 62.659048 0 0 1-31.207619 27.550477z m116.540952-282.575239a5.851429 5.851429 0 0 1 3.900953 0h2.925714a80.944762 80.944762 0 0 1 0 48.761905 76.8 76.8 0 0 1-6.826667-48.761905z m48.761905 183.832381a588.068571 588.068571 0 0 0-64.609524 19.017143v-1.950476h-1.950476c10.48381-20.72381 19.992381-42.666667 28.525714-64.365714v-1.950476a292.571429 292.571429 0 0 0 37.790477 46.323809h-2.681905z m97.52381 12.434286a82.651429 82.651429 0 0 1-28.769524-6.339047 107.032381 107.032381 0 0 1 24.380952-1.950477c18.773333 0 22.674286 4.632381 22.674286 7.558096a40.96 40.96 0 0 1-18.529524 0.731428z" fill="#FFFFFF" p-id="919" /></symbol>'})),p=(l.a.add(f),new a.a({id:"icon-web-lib-icon-filetype-video",use:"icon-web-lib-icon-filetype-video-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="icon-web-lib-icon-filetype-video"><defs><style type="text/css"></style></defs><path d="M902.095238 314.514286V853.333333a97.52381 97.52381 0 0 1-97.523809 97.52381H219.428571a97.52381 97.52381 0 0 1-97.523809-97.52381V170.666667a97.52381 97.52381 0 0 1 97.523809-97.52381h441.295239z" fill="#C386F0" p-id="1181" /><path d="M660.72381 216.990476V73.142857l241.371428 241.371429h-143.847619a97.52381 97.52381 0 0 1-97.523809-97.52381z" fill="#A15FDE" p-id="1182" /><path d="M343.04 424.228571m24.380952 0l240.64 0q24.380952 0 24.380953 24.380953l0 182.369524q0 24.380952-24.380953 24.380952l-240.64 0q-24.380952 0-24.380952-24.380952l0-182.369524q0-24.380952 24.380952-24.380953Z" fill="#FFFFFF" p-id="1183" /><path d="M585.142857 560.761905l101.912381 58.758095a24.380952 24.380952 0 0 0 36.571429-20.967619v-117.516191a24.380952 24.380952 0 0 0-36.571429-21.211428L585.142857 518.826667A24.380952 24.380952 0 0 0 585.142857 560.761905z" fill="#FFFFFF" p-id="1184" /></symbol>'})),m=(l.a.add(p),i(5)),_=i(4),g={name:"Thumbnail",components:{SvgIcon:m.default},props:{data:{type:Object,required:!0},type:{type:String,default:""}},data:function(){return{fileType:_.FileType}},computed:{thumbnailClass:function(){var e,t=this.data._fileType;return((e={})[_.FileType.IMAGE]="is-image",e[_.FileType.VIDEO]="is-video",e[_.FileType.AUDIO]="is-audio",e[_.FileType.PDF]="is-pdf",e[_.FileType.OTHER]="is-other",e)[t]},thumbnailIconClass:function(){var e,t=this.data._fileType;return((e={})[_.FileType.IMAGE]="web-lib-icon-filetype-image",e[_.FileType.VIDEO]="web-lib-icon-filetype-video",e[_.FileType.AUDIO]="web-lib-icon-filetype-audio",e[_.FileType.PDF]="web-lib-icon-filetype-pdf",e[_.FileType.OTHER]="web-lib-icon-filetype-other",e)[t]},thumbnailTip:function(){return this.data.title}}},v=i(0),y=Object(v.a)(g,o,[],!1,null,"92c8869c",null);y.options.__file="Viewer/components/Thumbnail.vue";var b={name:"ThumbnailList",components:{Thumbnail:y.exports},props:{data:{type:Array,default:function(){return[]}},value:{type:Number,default:0},direction:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}}},computed:{directionClass:function(){return"is-"+this.direction}},watch:{value:function(){this.scrollIntoView()}},mounted:function(){this.scrollIntoView()},methods:{handleView:function(e){this.$emit("input",e)},isActive:function(e){return this.value===e},scrollIntoView:function(){"horizontal"!==this.direction&&this.$refs.thumbnails&&this.$refs.thumbnails[this.value]&&this.$refs.thumbnails[this.value].scrollIntoView()}}},w=Object(v.a)(b,r,[],!1,null,"6ff2f07b",null);w.options.__file="Viewer/ThumbnailList.vue";var E=w.exports,S=i(32),A=i(31),L=i(30),R=i(33);function T(){return(T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var x={name:"Viewer",components:{ThumbnailList:E,ImageViewer:A.default,PDFViewer:L.default,VideoPlayer:R.default,AudioPlayer:S.default},props:{data:{type:Array,default:function(){return[]}},appendToBody:{type:Boolean,default:!1}},data:function(){var e=this;return{visible:!1,currentIndex:0,fileType:_.FileType,imageViewerProps:{options:{inline:!0,backdrop:!1,button:!1,ready:function(t){if(e.current&&e.current._fileType===_.FileType.IMAGE){var i=e.current._typeIndex;e.viewImage(i)}},view:function(t){var i=t.detail.index,n=e.imageData.find((function(e){return e._typeIndex===i}));n&&e.change(n._originIndex)}}}}},computed:{videoPlayerProps:function(){return{src:this.current?this.current._src:""}},audioPlayerProps:function(){return{options:{autoplay:!0,controls:!0,src:this.current?this.current._src:""}}},PDFViewerProps:function(){return{pdfSrc:this.current?this.current._src:"",titleName:this.current?this.current.title||this.current._filename:""}},rebuildData:function(){var e=this,t=Object.values(_.FileType).reduce((function(e,t){var i;return T({},e,((i={})[t]=0,i))}),{});return this.data.reduce((function(t,i,n){var r=e.getFilename(i),o=e.getSrc(i),s=e.getFileType(i);return{data:[].concat(t.data,[T({},i,{_filename:r,_src:o,_fileType:s,_typeIndex:t.typeIndexMap[s]++,_originIndex:n})]),typeIndexMap:t.typeIndexMap}}),{data:[],typeIndexMap:t}).data},imageData:function(){return this.rebuildData.filter(this.isImage)},current:function(){return this.rebuildData&&this.rebuildData.length?this.rebuildData[this.currentIndex]:null}},watch:{current:function(e){var t=e._typeIndex;this.isImage(e)&&this.viewImage(t)},visible:function(e){this.appendViewerDialogToBody()}},mounted:function(){this.appendViewerDialogToBody()},destroyed:function(){this.appendToBody&&this.$refs["viewer-dialog"]&&this.$refs["viewer-dialog"].parentNode&&this.$refs["viewer-dialog"].parentNode.removeChild(this.$refs["viewer-dialog"])},methods:{appendViewerDialogToBody:function(){var e=this;this.$nextTick((function(){e.visible&&e.appendToBody&&e.$refs["viewer-dialog"]&&document.body.appendChild(e.$refs["viewer-dialog"])}))},getFileType:function(e){return e._fileType||Object(_.getFileType)(this.getFilename(e))},isImage:function(e){return this.getFileType(e)===_.FileType.IMAGE},viewImage:function(e){this.$refs.imageViewer&&this.$refs.imageViewer.$viewer&&this.$refs.imageViewer.$viewer.view(e)},getFilename:function(e){if(!e)return"";var t=e||{},i=t.name,n=void 0===i?"":i,r=t.src,o=void 0===r?"":r,s=t.url;return n||o||(void 0===s?"":s)},getSrc:function(e){if(!e)return"";var t=e||{},i=t.src,n=void 0===i?"":i,r=t.url,o=n||(void 0===r?"":r);return o.startsWith("https:")||o.startsWith("http:")||o.startsWith("ftp:")?o:location.origin+"/"+o},prev:function(){this.currentIndex--},next:function(){this.currentIndex++},change:function(e){this.currentIndex=e},toggle:function(){this.visible=!this.visible}}},O=Object(v.a)(x,n,[],!1,null,"0c0a4ec3",null);O.options.__file="Viewer/index.vue";t.default=O.exports},5:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.isExternal?i("div",e._g({staticClass:"svg-external-icon svg-icon",style:e.styleExternalIcon},e.$listeners)):i("svg",e._g({class:e.svgClass,attrs:{"aria-hidden":"true"}},e.$listeners),[i("use",{attrs:{"xlink:href":e.iconName}})])};n._withStripped=!0;var r=i(9),o={name:"SvgIcon",props:{iconClass:{type:String,required:!0},className:{type:String,default:""}},computed:{isExternal:function(){return Object(r.isExternal)(this.iconClass)},iconName:function(){return"#icon-"+this.iconClass},svgClass:function(){return this.className?"svg-icon "+this.className:"svg-icon"},styleExternalIcon:function(){return{mask:"url("+this.iconClass+") no-repeat 50% 50%","-webkit-mask":"url("+this.iconClass+") no-repeat 50% 50%"}}}},s=i(0),a=Object(s.a)(o,n,[],!1,null,"45258a82",null);a.options.__file="SvgIcon/index.vue";t.default=a.exports},6:function(e,t,i){(function(t){var i;i=function(){"use strict";var e=function(e){var t=e.id,i=e.viewBox,n=e.content;this.id=t,this.viewBox=i,this.content=n};function i(e,t){return e(t={exports:{}},t.exports),t.exports}e.prototype.stringify=function(){return this.content},e.prototype.toString=function(){return this.stringify()},e.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach((function(t){return delete e[t]}))},"undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self;var n=i((function(e,t){e.exports=function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(t,i){var r;return i&&!0===i.clone&&e(t)?n((r=t,Array.isArray(r)?[]:{}),t,i):t}function i(i,r,o){var s=i.slice();return r.forEach((function(r,a){void 0===s[a]?s[a]=t(r,o):e(r)?s[a]=n(i[a],r,o):-1===i.indexOf(r)&&s.push(t(r,o))})),s}function n(r,o,s){var a=Array.isArray(o),u=(s||{arrayMerge:i}).arrayMerge||i;return a?Array.isArray(r)?u(r,o,s):t(o,s):function(i,r,o){var s={};return e(i)&&Object.keys(i).forEach((function(e){s[e]=t(i[e],o)})),Object.keys(r).forEach((function(a){e(r[a])&&i[a]?s[a]=n(i[a],r[a],o):s[a]=t(r[a],o)})),s}(r,o,s)}return n.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,i){return n(e,i,t)}))},n}()})),r=i((function(e,t){t.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},e.exports=t.default})),o=r.svg,s=r.xlink,a={};a[o.name]=o.uri,a[s.name]=s.uri;var u=function(e,t){return void 0===e&&(e=""),"<svg "+function(e){return Object.keys(e).map((function(t){return t+'="'+e[t].toString().replace(/"/g,"&quot;")+'"'})).join(" ")}(n(a,t||{}))+">"+e+"</svg>"};return function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,i=this.render();return this.node=i,t.appendChild(i),i},t.prototype.render=function(){var e=this.stringify();return function(e){var t=!!document.importNode,i=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(i,!0):i}(u(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,i),t}(e)},e.exports=i()}).call(this,i(10))},7:function(e,t,i){(function(t){var i;i=function(){"use strict";function e(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof window?window:void 0!==t||"undefined"!=typeof self&&self;var i=e((function(e,t){e.exports=function(){function e(e){return e&&"object"==typeof e&&"[object RegExp]"!==Object.prototype.toString.call(e)&&"[object Date]"!==Object.prototype.toString.call(e)}function t(t,i){var r;return i&&!0===i.clone&&e(t)?n((r=t,Array.isArray(r)?[]:{}),t,i):t}function i(i,r,o){var s=i.slice();return r.forEach((function(r,a){void 0===s[a]?s[a]=t(r,o):e(r)?s[a]=n(i[a],r,o):-1===i.indexOf(r)&&s.push(t(r,o))})),s}function n(r,o,s){var a=Array.isArray(o),u=(s||{arrayMerge:i}).arrayMerge||i;return a?Array.isArray(r)?u(r,o,s):t(o,s):function(i,r,o){var s={};return e(i)&&Object.keys(i).forEach((function(e){s[e]=t(i[e],o)})),Object.keys(r).forEach((function(a){e(r[a])&&i[a]?s[a]=n(i[a],r[a],o):s[a]=t(r[a],o)})),s}(r,o,s)}return n.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce((function(e,i){return n(e,i,t)}))},n}()})),n=e((function(e,t){t.default={svg:{name:"xmlns",uri:"http://www.w3.org/2000/svg"},xlink:{name:"xmlns:xlink",uri:"http://www.w3.org/1999/xlink"}},e.exports=t.default})),r=n.svg,o=n.xlink,s={};s[r.name]=r.uri,s[o.name]=o.uri;var a,u=function(e,t){return void 0===e&&(e=""),"<svg "+function(e){return Object.keys(e).map((function(t){return t+'="'+e[t].toString().replace(/"/g,"&quot;")+'"'})).join(" ")}(i(s,t||{}))+">"+e+"</svg>"},l=n.svg,d=n.xlink,c={attrs:(a={style:["position: absolute","width: 0","height: 0"].join("; "),"aria-hidden":"true"},a[l.name]=l.uri,a[d.name]=d.uri,a)},h=function(e){this.config=i(c,e||{}),this.symbols=[]};h.prototype.add=function(e){var t=this.symbols,i=this.find(e.id);return i?(t[t.indexOf(i)]=e,!1):(t.push(e),!0)},h.prototype.remove=function(e){var t=this.symbols,i=this.find(e);return!!i&&(t.splice(t.indexOf(i),1),i.destroy(),!0)},h.prototype.find=function(e){return this.symbols.filter((function(t){return t.id===e}))[0]||null},h.prototype.has=function(e){return null!==this.find(e)},h.prototype.stringify=function(){var e=this.config.attrs,t=this.symbols.map((function(e){return e.stringify()})).join("");return u(t,e)},h.prototype.toString=function(){return this.stringify()},h.prototype.destroy=function(){this.symbols.forEach((function(e){return e.destroy()}))};var f=function(e){var t=e.id,i=e.viewBox,n=e.content;this.id=t,this.viewBox=i,this.content=n};f.prototype.stringify=function(){return this.content},f.prototype.toString=function(){return this.stringify()},f.prototype.destroy=function(){var e=this;["id","viewBox","content"].forEach((function(t){return delete e[t]}))};var p=function(e){var t=!!document.importNode,i=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement;return t?document.importNode(i,!0):i},m=function(e){function t(){e.apply(this,arguments)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={isMounted:{}};return i.isMounted.get=function(){return!!this.node},t.createFromExistingNode=function(e){return new t({id:e.getAttribute("id"),viewBox:e.getAttribute("viewBox"),content:e.outerHTML})},t.prototype.destroy=function(){this.isMounted&&this.unmount(),e.prototype.destroy.call(this)},t.prototype.mount=function(e){if(this.isMounted)return this.node;var t="string"==typeof e?document.querySelector(e):e,i=this.render();return this.node=i,t.appendChild(i),i},t.prototype.render=function(){var e=this.stringify();return p(u(e)).childNodes[0]},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},Object.defineProperties(t.prototype,i),t}(f),_={autoConfigure:!0,mountTo:"body",syncUrlsWithBaseTag:!1,listenLocationChangeEvent:!0,locationChangeEvent:"locationChange",locationChangeAngularEmitter:!1,usagesToUpdate:"use[*|href]",moveGradientsOutsideSymbol:!1},g=function(e){return Array.prototype.slice.call(e,0)},v=function(){return/firefox/i.test(navigator.userAgent)},y=function(){return/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent)},b=function(){return/edge/i.test(navigator.userAgent)},w=function(e){return(e||window.location.href).split("#")[0]},E=function(e){angular.module("ng").run(["$rootScope",function(t){t.$on("$locationChangeSuccess",(function(t,i,n){var r,o,s;r=e,o={oldUrl:n,newUrl:i},(s=document.createEvent("CustomEvent")).initCustomEvent(r,!1,!1,o),window.dispatchEvent(s)}))}])},S=function(e,t){return void 0===t&&(t="linearGradient, radialGradient, pattern, mask, clipPath"),g(e.querySelectorAll("symbol")).forEach((function(e){g(e.querySelectorAll(t)).forEach((function(t){e.parentNode.insertBefore(t,e)}))})),e},A=n.xlink.uri,L=/[{}|\\\^\[\]`"<>]/g;function R(e){return e.replace(L,(function(e){return"%"+e[0].charCodeAt(0).toString(16).toUpperCase()}))}var T,x=["clipPath","colorProfile","src","cursor","fill","filter","marker","markerStart","markerMid","markerEnd","mask","stroke","style"],O=x.map((function(e){return"["+e+"]"})).join(","),C=function(e,t,i,n){var r=R(i),o=R(n);(function(e,t){return g(e).reduce((function(e,i){if(!i.attributes)return e;var n=g(i.attributes),r=t?n.filter(t):n;return e.concat(r)}),[])})(e.querySelectorAll(O),(function(e){var t=e.localName,i=e.value;return-1!==x.indexOf(t)&&-1!==i.indexOf("url("+r)})).forEach((function(e){return e.value=e.value.replace(new RegExp(r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),o)})),function(e,t,i){g(e).forEach((function(e){var n=e.getAttribute("xlink:href");if(n&&0===n.indexOf(t)){var r=n.replace(t,i);e.setAttributeNS(A,"xlink:href",r)}}))}(t,r,o)},k="mount",I="symbol_mount",D=function(e){function t(t){var n=this;void 0===t&&(t={}),e.call(this,i(_,t));var r,o=(r=r||Object.create(null),{on:function(e,t){(r[e]||(r[e]=[])).push(t)},off:function(e,t){r[e]&&r[e].splice(r[e].indexOf(t)>>>0,1)},emit:function(e,t){(r[e]||[]).map((function(e){e(t)})),(r["*"]||[]).map((function(i){i(e,t)}))}});this._emitter=o,this.node=null;var s=this.config;if(s.autoConfigure&&this._autoConfigure(t),s.syncUrlsWithBaseTag){var a=document.getElementsByTagName("base")[0].getAttribute("href");o.on(k,(function(){return n.updateUrls("#",a)}))}var u=this._handleLocationChange.bind(this);this._handleLocationChange=u,s.listenLocationChangeEvent&&window.addEventListener(s.locationChangeEvent,u),s.locationChangeAngularEmitter&&E(s.locationChangeEvent),o.on(k,(function(e){s.moveGradientsOutsideSymbol&&S(e)})),o.on(I,(function(e){var t;s.moveGradientsOutsideSymbol&&S(e.parentNode),(y()||b())&&(t=[],g(e.querySelectorAll("style")).forEach((function(e){e.textContent+="",t.push(e)})))}))}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={isMounted:{}};return n.isMounted.get=function(){return!!this.node},t.prototype._autoConfigure=function(e){var t=this.config;void 0===e.syncUrlsWithBaseTag&&(t.syncUrlsWithBaseTag=void 0!==document.getElementsByTagName("base")[0]),void 0===e.locationChangeAngularEmitter&&(t.locationChangeAngularEmitter=void 0!==window.angular),void 0===e.moveGradientsOutsideSymbol&&(t.moveGradientsOutsideSymbol=v())},t.prototype._handleLocationChange=function(e){var t=e.detail,i=t.oldUrl,n=t.newUrl;this.updateUrls(i,n)},t.prototype.add=function(t){var i=e.prototype.add.call(this,t);return this.isMounted&&i&&(t.mount(this.node),this._emitter.emit(I,t.node)),i},t.prototype.attach=function(e){var t=this,i=this;if(i.isMounted)return i.node;var n="string"==typeof e?document.querySelector(e):e;return i.node=n,this.symbols.forEach((function(e){e.mount(i.node),t._emitter.emit(I,e.node)})),g(n.querySelectorAll("symbol")).forEach((function(e){var t=m.createFromExistingNode(e);t.node=e,i.add(t)})),this._emitter.emit(k,n),n},t.prototype.destroy=function(){var e=this.config,t=this.symbols,i=this._emitter;t.forEach((function(e){return e.destroy()})),i.off("*"),window.removeEventListener(e.locationChangeEvent,this._handleLocationChange),this.isMounted&&this.unmount()},t.prototype.mount=function(e,t){if(void 0===e&&(e=this.config.mountTo),void 0===t&&(t=!1),this.isMounted)return this.node;var i="string"==typeof e?document.querySelector(e):e,n=this.render();return this.node=n,t&&i.childNodes[0]?i.insertBefore(n,i.childNodes[0]):i.appendChild(n),this._emitter.emit(k,n),n},t.prototype.render=function(){return p(this.stringify())},t.prototype.unmount=function(){this.node.parentNode.removeChild(this.node)},t.prototype.updateUrls=function(e,t){if(!this.isMounted)return!1;var i=document.querySelectorAll(this.config.usagesToUpdate);return C(this.node,i,w(e)+"#",w(t)+"#"),!0},Object.defineProperties(t.prototype,n),t}(h),M=e((function(e){var t,i,n,r,o;e.exports=(i=[],n=document,r=n.documentElement.doScroll,(o=(r?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState))||n.addEventListener("DOMContentLoaded",t=function(){for(n.removeEventListener("DOMContentLoaded",t),o=1;t=i.shift();)t()}),function(e){o?setTimeout(e,0):i.push(e)})}));window.__SVG_SPRITE__?T=window.__SVG_SPRITE__:(T=new D({attrs:{id:"__SVG_SPRITE_NODE__","aria-hidden":"true"}}),window.__SVG_SPRITE__=T);var P=function(){var e=document.getElementById("__SVG_SPRITE_NODE__");e?T.attach(e):T.mount(document.body,!0)};return document.body?P():M(P),T},e.exports=i()}).call(this,i(10))},9:function(e,t,i){window,e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="./",i(i.s=20)}({20:function(e,t,i){"use strict";function n(e){return function(t,i,n){if(!e||!e.length)return n();for(var r=i&&i.length,o=function(t){var o=e[t]||{},s=o.predicate,a=o.message;return o.required&&!r||s&&r&&!s(i)?{v:n(new Error(a))}:void 0},s=0;s<e.length;s++){var a=o(s);if("object"==typeof a)return a.v}return n()}}function r(e){return/^(?:(?:(?:[a-z]+:)?\/\/)|www\.)(?:\S+(?::\S*)?@)?(?:localhost|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3})|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[/?#][^\s"]*)?$/.test(e)}i.r(t),i.d(t,"getValidator",(function(){return n})),i.d(t,"isExternal",(function(){return r})),i.d(t,"USERNAME_REG",(function(){return o})),i.d(t,"PASSWORD_REG",(function(){return s})),i.d(t,"isUsername",(function(){return a})),i.d(t,"isPassword",(function(){return u})),i.d(t,"isMobilePhoneNumber",(function(){return l})),i.d(t,"isFixedPhoneNumber",(function(){return d})),i.d(t,"isPhoneNumber",(function(){return c}));var o=/^.{4,20}$/,s=/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!@$^\-_=+[{}\]:,./?~#*])([A-Za-z0-9!@$^\-_=+[{}\]:,./?~#*]{10,20})$/;function a(e){return o.test(e)}function u(e){return s.test(e)}function l(e){return/^1[3456789]\d{9}$/.test(e)}function d(e){return/^((\d{3}-|\d{3})\d{8}|(\d{4}-|\d{4})\d{7,8})$/.test(e)}function c(e){return l(e)||d(e)}}})},93:function(e,t){var i,n,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(i===setTimeout)return setTimeout(e,0);if((i===o||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:o}catch(e){i=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,l=[],d=!1,c=-1;function h(){d&&u&&(d=!1,u.length?l=u.concat(l):c=-1,l.length&&f())}function f(){if(!d){var e=a(h);d=!0;for(var t=l.length;t;){for(u=l,l=[];++c<t;)u&&u[c].run();c=-1,t=l.length}u=null,d=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new p(e,t)),1!==l.length||d||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}}})}));
//# sourceMappingURL=Viewer.js.map