/******/ (function() { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 9662:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isCallable = __webpack_require__(614);
var tryToString = __webpack_require__(6330);

var $TypeError = TypeError;

// `Assert: IsCallable(argument) is true`
module.exports = function (argument) {
  if (isCallable(argument)) return argument;
  throw $TypeError(tryToString(argument) + ' is not a function');
};


/***/ }),

/***/ 6077:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isCallable = __webpack_require__(614);

var $String = String;
var $TypeError = TypeError;

module.exports = function (argument) {
  if (typeof argument == 'object' || isCallable(argument)) return argument;
  throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
};


/***/ }),

/***/ 5787:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isPrototypeOf = __webpack_require__(7976);

var $TypeError = TypeError;

module.exports = function (it, Prototype) {
  if (isPrototypeOf(Prototype, it)) return it;
  throw $TypeError('Incorrect invocation');
};


/***/ }),

/***/ 9670:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isObject = __webpack_require__(111);

var $String = String;
var $TypeError = TypeError;

// `Assert: Type(argument) is Object`
module.exports = function (argument) {
  if (isObject(argument)) return argument;
  throw $TypeError($String(argument) + ' is not an object');
};


/***/ }),

/***/ 4019:
/***/ (function(module) {

// eslint-disable-next-line es-x/no-typed-arrays -- safe
module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';


/***/ }),

/***/ 260:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var NATIVE_ARRAY_BUFFER = __webpack_require__(4019);
var DESCRIPTORS = __webpack_require__(9781);
var global = __webpack_require__(7854);
var isCallable = __webpack_require__(614);
var isObject = __webpack_require__(111);
var hasOwn = __webpack_require__(2597);
var classof = __webpack_require__(648);
var tryToString = __webpack_require__(6330);
var createNonEnumerableProperty = __webpack_require__(8880);
var defineBuiltIn = __webpack_require__(8052);
var defineProperty = (__webpack_require__(3070).f);
var isPrototypeOf = __webpack_require__(7976);
var getPrototypeOf = __webpack_require__(9518);
var setPrototypeOf = __webpack_require__(7674);
var wellKnownSymbol = __webpack_require__(5112);
var uid = __webpack_require__(9711);
var InternalStateModule = __webpack_require__(9909);

var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
var Int8Array = global.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = global.Uint8ClampedArray;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
var TypedArray = Int8Array && getPrototypeOf(Int8Array);
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
var ObjectPrototype = Object.prototype;
var TypeError = global.TypeError;

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQUIRED = false;
var NAME, Constructor, Prototype;

var TypedArrayConstructorsList = {
  Int8Array: 1,
  Uint8Array: 1,
  Uint8ClampedArray: 1,
  Int16Array: 2,
  Uint16Array: 2,
  Int32Array: 4,
  Uint32Array: 4,
  Float32Array: 4,
  Float64Array: 8
};

var BigIntArrayConstructorsList = {
  BigInt64Array: 8,
  BigUint64Array: 8
};

var isView = function isView(it) {
  if (!isObject(it)) return false;
  var klass = classof(it);
  return klass === 'DataView'
    || hasOwn(TypedArrayConstructorsList, klass)
    || hasOwn(BigIntArrayConstructorsList, klass);
};

var getTypedArrayConstructor = function (it) {
  var proto = getPrototypeOf(it);
  if (!isObject(proto)) return;
  var state = getInternalState(proto);
  return (state && hasOwn(state, TYPED_ARRAY_CONSTRUCTOR)) ? state[TYPED_ARRAY_CONSTRUCTOR] : getTypedArrayConstructor(proto);
};

var isTypedArray = function (it) {
  if (!isObject(it)) return false;
  var klass = classof(it);
  return hasOwn(TypedArrayConstructorsList, klass)
    || hasOwn(BigIntArrayConstructorsList, klass);
};

var aTypedArray = function (it) {
  if (isTypedArray(it)) return it;
  throw TypeError('Target is not a typed array');
};

var aTypedArrayConstructor = function (C) {
  if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
  throw TypeError(tryToString(C) + ' is not a typed array constructor');
};

var exportTypedArrayMethod = function (KEY, property, forced, options) {
  if (!DESCRIPTORS) return;
  if (forced) for (var ARRAY in TypedArrayConstructorsList) {
    var TypedArrayConstructor = global[ARRAY];
    if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
      delete TypedArrayConstructor.prototype[KEY];
    } catch (error) {
      // old WebKit bug - some methods are non-configurable
      try {
        TypedArrayConstructor.prototype[KEY] = property;
      } catch (error2) { /* empty */ }
    }
  }
  if (!TypedArrayPrototype[KEY] || forced) {
    defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
      : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
  }
};

var exportTypedArrayStaticMethod = function (KEY, property, forced) {
  var ARRAY, TypedArrayConstructor;
  if (!DESCRIPTORS) return;
  if (setPrototypeOf) {
    if (forced) for (ARRAY in TypedArrayConstructorsList) {
      TypedArrayConstructor = global[ARRAY];
      if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
        delete TypedArrayConstructor[KEY];
      } catch (error) { /* empty */ }
    }
    if (!TypedArray[KEY] || forced) {
      // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
      try {
        return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
      } catch (error) { /* empty */ }
    } else return;
  }
  for (ARRAY in TypedArrayConstructorsList) {
    TypedArrayConstructor = global[ARRAY];
    if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
      defineBuiltIn(TypedArrayConstructor, KEY, property);
    }
  }
};

for (NAME in TypedArrayConstructorsList) {
  Constructor = global[NAME];
  Prototype = Constructor && Constructor.prototype;
  if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
  else NATIVE_ARRAY_BUFFER_VIEWS = false;
}

for (NAME in BigIntArrayConstructorsList) {
  Constructor = global[NAME];
  Prototype = Constructor && Constructor.prototype;
  if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;
}

// WebKit bug - typed arrays constructors prototype is Object.prototype
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
  // eslint-disable-next-line no-shadow -- safe
  TypedArray = function TypedArray() {
    throw TypeError('Incorrect invocation');
  };
  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
    if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  }
}

if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  TypedArrayPrototype = TypedArray.prototype;
  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
    if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  }
}

// WebKit bug - one more object in Uint8ClampedArray prototype chain
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
}

if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
  TYPED_ARRAY_TAG_REQUIRED = true;
  defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
    return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  } });
  for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
    createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  }
}

module.exports = {
  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
  aTypedArray: aTypedArray,
  aTypedArrayConstructor: aTypedArrayConstructor,
  exportTypedArrayMethod: exportTypedArrayMethod,
  exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  getTypedArrayConstructor: getTypedArrayConstructor,
  isView: isView,
  isTypedArray: isTypedArray,
  TypedArray: TypedArray,
  TypedArrayPrototype: TypedArrayPrototype
};


/***/ }),

/***/ 1318:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toIndexedObject = __webpack_require__(5656);
var toAbsoluteIndex = __webpack_require__(1400);
var lengthOfArrayLike = __webpack_require__(6244);

// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
  return function ($this, el, fromIndex) {
    var O = toIndexedObject($this);
    var length = lengthOfArrayLike(O);
    var index = toAbsoluteIndex(fromIndex, length);
    var value;
    // Array#includes uses SameValueZero equality algorithm
    // eslint-disable-next-line no-self-compare -- NaN check
    if (IS_INCLUDES && el != el) while (length > index) {
      value = O[index++];
      // eslint-disable-next-line no-self-compare -- NaN check
      if (value != value) return true;
    // Array#indexOf ignores holes, Array#includes - not
    } else for (;length > index; index++) {
      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
    } return !IS_INCLUDES && -1;
  };
};

module.exports = {
  // `Array.prototype.includes` method
  // https://tc39.es/ecma262/#sec-array.prototype.includes
  includes: createMethod(true),
  // `Array.prototype.indexOf` method
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
  indexOf: createMethod(false)
};


/***/ }),

/***/ 9671:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var bind = __webpack_require__(9974);
var IndexedObject = __webpack_require__(8361);
var toObject = __webpack_require__(7908);
var lengthOfArrayLike = __webpack_require__(6244);

// `Array.prototype.{ findLast, findLastIndex }` methods implementation
var createMethod = function (TYPE) {
  var IS_FIND_LAST_INDEX = TYPE == 1;
  return function ($this, callbackfn, that) {
    var O = toObject($this);
    var self = IndexedObject(O);
    var boundFunction = bind(callbackfn, that);
    var index = lengthOfArrayLike(self);
    var value, result;
    while (index-- > 0) {
      value = self[index];
      result = boundFunction(value, index, O);
      if (result) switch (TYPE) {
        case 0: return value; // findLast
        case 1: return index; // findLastIndex
      }
    }
    return IS_FIND_LAST_INDEX ? -1 : undefined;
  };
};

module.exports = {
  // `Array.prototype.findLast` method
  // https://github.com/tc39/proposal-array-find-from-last
  findLast: createMethod(0),
  // `Array.prototype.findLastIndex` method
  // https://github.com/tc39/proposal-array-find-from-last
  findLastIndex: createMethod(1)
};


/***/ }),

/***/ 4326:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);

var toString = uncurryThis({}.toString);
var stringSlice = uncurryThis(''.slice);

module.exports = function (it) {
  return stringSlice(toString(it), 8, -1);
};


/***/ }),

/***/ 648:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
var isCallable = __webpack_require__(614);
var classofRaw = __webpack_require__(4326);
var wellKnownSymbol = __webpack_require__(5112);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var $Object = Object;

// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';

// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
  try {
    return it[key];
  } catch (error) { /* empty */ }
};

// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  var O, tag, result;
  return it === undefined ? 'Undefined' : it === null ? 'Null'
    // @@toStringTag case
    : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
    // builtinTag case
    : CORRECT_ARGUMENTS ? classofRaw(O)
    // ES3 arguments fallback
    : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
};


/***/ }),

/***/ 7741:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);

var $Error = Error;
var replace = uncurryThis(''.replace);

var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);

module.exports = function (stack, dropEntries) {
  if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
    while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  } return stack;
};


/***/ }),

/***/ 9920:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var hasOwn = __webpack_require__(2597);
var ownKeys = __webpack_require__(3887);
var getOwnPropertyDescriptorModule = __webpack_require__(1236);
var definePropertyModule = __webpack_require__(3070);

module.exports = function (target, source, exceptions) {
  var keys = ownKeys(source);
  var defineProperty = definePropertyModule.f;
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
      defineProperty(target, key, getOwnPropertyDescriptor(source, key));
    }
  }
};


/***/ }),

/***/ 8544:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var fails = __webpack_require__(7293);

module.exports = !fails(function () {
  function F() { /* empty */ }
  F.prototype.constructor = null;
  // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
  return Object.getPrototypeOf(new F()) !== F.prototype;
});


/***/ }),

/***/ 8880:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(9781);
var definePropertyModule = __webpack_require__(3070);
var createPropertyDescriptor = __webpack_require__(9114);

module.exports = DESCRIPTORS ? function (object, key, value) {
  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
  object[key] = value;
  return object;
};


/***/ }),

/***/ 9114:
/***/ (function(module) {

module.exports = function (bitmap, value) {
  return {
    enumerable: !(bitmap & 1),
    configurable: !(bitmap & 2),
    writable: !(bitmap & 4),
    value: value
  };
};


/***/ }),

/***/ 8052:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isCallable = __webpack_require__(614);
var definePropertyModule = __webpack_require__(3070);
var makeBuiltIn = __webpack_require__(6339);
var defineGlobalProperty = __webpack_require__(3072);

module.exports = function (O, key, value, options) {
  if (!options) options = {};
  var simple = options.enumerable;
  var name = options.name !== undefined ? options.name : key;
  if (isCallable(value)) makeBuiltIn(value, name, options);
  if (options.global) {
    if (simple) O[key] = value;
    else defineGlobalProperty(key, value);
  } else {
    try {
      if (!options.unsafe) delete O[key];
      else if (O[key]) simple = true;
    } catch (error) { /* empty */ }
    if (simple) O[key] = value;
    else definePropertyModule.f(O, key, {
      value: value,
      enumerable: false,
      configurable: !options.nonConfigurable,
      writable: !options.nonWritable
    });
  } return O;
};


/***/ }),

/***/ 3072:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);

// eslint-disable-next-line es-x/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;

module.exports = function (key, value) {
  try {
    defineProperty(global, key, { value: value, configurable: true, writable: true });
  } catch (error) {
    global[key] = value;
  } return value;
};


/***/ }),

/***/ 9781:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var fails = __webpack_require__(7293);

// Detect IE8's incomplete defineProperty implementation
module.exports = !fails(function () {
  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});


/***/ }),

/***/ 317:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var isObject = __webpack_require__(111);

var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);

module.exports = function (it) {
  return EXISTS ? document.createElement(it) : {};
};


/***/ }),

/***/ 3678:
/***/ (function(module) {

module.exports = {
  IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
  DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
  HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
  WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
  InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
  NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
  NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
  NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
  NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
  InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
  InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
  SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
  InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
  NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
  InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
  ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
  TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
  SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
  NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
  AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
  URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
  QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
  TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
  InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
  DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
};


/***/ }),

/***/ 8113:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(5005);

module.exports = getBuiltIn('navigator', 'userAgent') || '';


/***/ }),

/***/ 7392:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var userAgent = __webpack_require__(8113);

var process = global.process;
var Deno = global.Deno;
var versions = process && process.versions || Deno && Deno.version;
var v8 = versions && versions.v8;
var match, version;

if (v8) {
  match = v8.split('.');
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  // but their correct versions are not interesting for us
  version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
}

// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
// so check `userAgent` even if `.v8` exists, but 0
if (!version && userAgent) {
  match = userAgent.match(/Edge\/(\d+)/);
  if (!match || match[1] >= 74) {
    match = userAgent.match(/Chrome\/(\d+)/);
    if (match) version = +match[1];
  }
}

module.exports = version;


/***/ }),

/***/ 748:
/***/ (function(module) {

// IE8- don't enum bug keys
module.exports = [
  'constructor',
  'hasOwnProperty',
  'isPrototypeOf',
  'propertyIsEnumerable',
  'toLocaleString',
  'toString',
  'valueOf'
];


/***/ }),

/***/ 2914:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var fails = __webpack_require__(7293);
var createPropertyDescriptor = __webpack_require__(9114);

module.exports = !fails(function () {
  var error = Error('a');
  if (!('stack' in error)) return true;
  // eslint-disable-next-line es-x/no-object-defineproperty -- safe
  Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  return error.stack !== 7;
});


/***/ }),

/***/ 2109:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var getOwnPropertyDescriptor = (__webpack_require__(1236).f);
var createNonEnumerableProperty = __webpack_require__(8880);
var defineBuiltIn = __webpack_require__(8052);
var defineGlobalProperty = __webpack_require__(3072);
var copyConstructorProperties = __webpack_require__(9920);
var isForced = __webpack_require__(4705);

/*
  options.target         - name of the target object
  options.global         - target is the global object
  options.stat           - export as static methods of target
  options.proto          - export as prototype methods of target
  options.real           - real prototype method for the `pure` version
  options.forced         - export even if the native feature is available
  options.bind           - bind methods to the target, required for the `pure` version
  options.wrap           - wrap constructors to preventing global pollution, required for the `pure` version
  options.unsafe         - use the simple assignment of property instead of delete + defineProperty
  options.sham           - add a flag to not completely full polyfills
  options.enumerable     - export as enumerable property
  options.dontCallGetSet - prevent calling a getter on target
  options.name           - the .name of the function if it does not match the key
*/
module.exports = function (options, source) {
  var TARGET = options.target;
  var GLOBAL = options.global;
  var STATIC = options.stat;
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  if (GLOBAL) {
    target = global;
  } else if (STATIC) {
    target = global[TARGET] || defineGlobalProperty(TARGET, {});
  } else {
    target = (global[TARGET] || {}).prototype;
  }
  if (target) for (key in source) {
    sourceProperty = source[key];
    if (options.dontCallGetSet) {
      descriptor = getOwnPropertyDescriptor(target, key);
      targetProperty = descriptor && descriptor.value;
    } else targetProperty = target[key];
    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
    // contained in target
    if (!FORCED && targetProperty !== undefined) {
      if (typeof sourceProperty == typeof targetProperty) continue;
      copyConstructorProperties(sourceProperty, targetProperty);
    }
    // add a flag to not completely full polyfills
    if (options.sham || (targetProperty && targetProperty.sham)) {
      createNonEnumerableProperty(sourceProperty, 'sham', true);
    }
    defineBuiltIn(target, key, sourceProperty, options);
  }
};


/***/ }),

/***/ 7293:
/***/ (function(module) {

module.exports = function (exec) {
  try {
    return !!exec();
  } catch (error) {
    return true;
  }
};


/***/ }),

/***/ 2104:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var NATIVE_BIND = __webpack_require__(4374);

var FunctionPrototype = Function.prototype;
var apply = FunctionPrototype.apply;
var call = FunctionPrototype.call;

// eslint-disable-next-line es-x/no-reflect -- safe
module.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {
  return call.apply(apply, arguments);
});


/***/ }),

/***/ 9974:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);
var aCallable = __webpack_require__(9662);
var NATIVE_BIND = __webpack_require__(4374);

var bind = uncurryThis(uncurryThis.bind);

// optional / simple context binding
module.exports = function (fn, that) {
  aCallable(fn);
  return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
    return fn.apply(that, arguments);
  };
};


/***/ }),

/***/ 4374:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var fails = __webpack_require__(7293);

module.exports = !fails(function () {
  // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
  var test = (function () { /* empty */ }).bind();
  // eslint-disable-next-line no-prototype-builtins -- safe
  return typeof test != 'function' || test.hasOwnProperty('prototype');
});


/***/ }),

/***/ 6916:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var NATIVE_BIND = __webpack_require__(4374);

var call = Function.prototype.call;

module.exports = NATIVE_BIND ? call.bind(call) : function () {
  return call.apply(call, arguments);
};


/***/ }),

/***/ 6530:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(9781);
var hasOwn = __webpack_require__(2597);

var FunctionPrototype = Function.prototype;
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;

var EXISTS = hasOwn(FunctionPrototype, 'name');
// additional protection from minified / mangled / dropped function names
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));

module.exports = {
  EXISTS: EXISTS,
  PROPER: PROPER,
  CONFIGURABLE: CONFIGURABLE
};


/***/ }),

/***/ 1702:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var NATIVE_BIND = __webpack_require__(4374);

var FunctionPrototype = Function.prototype;
var bind = FunctionPrototype.bind;
var call = FunctionPrototype.call;
var uncurryThis = NATIVE_BIND && bind.bind(call, call);

module.exports = NATIVE_BIND ? function (fn) {
  return fn && uncurryThis(fn);
} : function (fn) {
  return fn && function () {
    return call.apply(fn, arguments);
  };
};


/***/ }),

/***/ 5005:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var isCallable = __webpack_require__(614);

var aFunction = function (argument) {
  return isCallable(argument) ? argument : undefined;
};

module.exports = function (namespace, method) {
  return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
};


/***/ }),

/***/ 8173:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var aCallable = __webpack_require__(9662);

// `GetMethod` abstract operation
// https://tc39.es/ecma262/#sec-getmethod
module.exports = function (V, P) {
  var func = V[P];
  return func == null ? undefined : aCallable(func);
};


/***/ }),

/***/ 7854:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var check = function (it) {
  return it && it.Math == Math && it;
};

// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
  // eslint-disable-next-line es-x/no-global-this -- safe
  check(typeof globalThis == 'object' && globalThis) ||
  check(typeof window == 'object' && window) ||
  // eslint-disable-next-line no-restricted-globals -- safe
  check(typeof self == 'object' && self) ||
  check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
  // eslint-disable-next-line no-new-func -- fallback
  (function () { return this; })() || Function('return this')();


/***/ }),

/***/ 2597:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);
var toObject = __webpack_require__(7908);

var hasOwnProperty = uncurryThis({}.hasOwnProperty);

// `HasOwnProperty` abstract operation
// https://tc39.es/ecma262/#sec-hasownproperty
// eslint-disable-next-line es-x/no-object-hasown -- safe
module.exports = Object.hasOwn || function hasOwn(it, key) {
  return hasOwnProperty(toObject(it), key);
};


/***/ }),

/***/ 3501:
/***/ (function(module) {

module.exports = {};


/***/ }),

/***/ 4664:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(9781);
var fails = __webpack_require__(7293);
var createElement = __webpack_require__(317);

// Thanks to IE8 for its funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  return Object.defineProperty(createElement('div'), 'a', {
    get: function () { return 7; }
  }).a != 7;
});


/***/ }),

/***/ 8361:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);
var fails = __webpack_require__(7293);
var classof = __webpack_require__(4326);

var $Object = Object;
var split = uncurryThis(''.split);

// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  // eslint-disable-next-line no-prototype-builtins -- safe
  return !$Object('z').propertyIsEnumerable(0);
}) ? function (it) {
  return classof(it) == 'String' ? split(it, '') : $Object(it);
} : $Object;


/***/ }),

/***/ 9587:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isCallable = __webpack_require__(614);
var isObject = __webpack_require__(111);
var setPrototypeOf = __webpack_require__(7674);

// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
  var NewTarget, NewTargetPrototype;
  if (
    // it can work only with native `setPrototypeOf`
    setPrototypeOf &&
    // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
    isCallable(NewTarget = dummy.constructor) &&
    NewTarget !== Wrapper &&
    isObject(NewTargetPrototype = NewTarget.prototype) &&
    NewTargetPrototype !== Wrapper.prototype
  ) setPrototypeOf($this, NewTargetPrototype);
  return $this;
};


/***/ }),

/***/ 2788:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);
var isCallable = __webpack_require__(614);
var store = __webpack_require__(5465);

var functionToString = uncurryThis(Function.toString);

// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
if (!isCallable(store.inspectSource)) {
  store.inspectSource = function (it) {
    return functionToString(it);
  };
}

module.exports = store.inspectSource;


/***/ }),

/***/ 8340:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isObject = __webpack_require__(111);
var createNonEnumerableProperty = __webpack_require__(8880);

// `InstallErrorCause` abstract operation
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
module.exports = function (O, options) {
  if (isObject(options) && 'cause' in options) {
    createNonEnumerableProperty(O, 'cause', options.cause);
  }
};


/***/ }),

/***/ 9909:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var NATIVE_WEAK_MAP = __webpack_require__(8536);
var global = __webpack_require__(7854);
var uncurryThis = __webpack_require__(1702);
var isObject = __webpack_require__(111);
var createNonEnumerableProperty = __webpack_require__(8880);
var hasOwn = __webpack_require__(2597);
var shared = __webpack_require__(5465);
var sharedKey = __webpack_require__(6200);
var hiddenKeys = __webpack_require__(3501);

var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = global.TypeError;
var WeakMap = global.WeakMap;
var set, get, has;

var enforce = function (it) {
  return has(it) ? get(it) : set(it, {});
};

var getterFor = function (TYPE) {
  return function (it) {
    var state;
    if (!isObject(it) || (state = get(it)).type !== TYPE) {
      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
    } return state;
  };
};

if (NATIVE_WEAK_MAP || shared.state) {
  var store = shared.state || (shared.state = new WeakMap());
  var wmget = uncurryThis(store.get);
  var wmhas = uncurryThis(store.has);
  var wmset = uncurryThis(store.set);
  set = function (it, metadata) {
    if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    wmset(store, it, metadata);
    return metadata;
  };
  get = function (it) {
    return wmget(store, it) || {};
  };
  has = function (it) {
    return wmhas(store, it);
  };
} else {
  var STATE = sharedKey('state');
  hiddenKeys[STATE] = true;
  set = function (it, metadata) {
    if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
    metadata.facade = it;
    createNonEnumerableProperty(it, STATE, metadata);
    return metadata;
  };
  get = function (it) {
    return hasOwn(it, STATE) ? it[STATE] : {};
  };
  has = function (it) {
    return hasOwn(it, STATE);
  };
}

module.exports = {
  set: set,
  get: get,
  has: has,
  enforce: enforce,
  getterFor: getterFor
};


/***/ }),

/***/ 614:
/***/ (function(module) {

// `IsCallable` abstract operation
// https://tc39.es/ecma262/#sec-iscallable
module.exports = function (argument) {
  return typeof argument == 'function';
};


/***/ }),

/***/ 4705:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var fails = __webpack_require__(7293);
var isCallable = __webpack_require__(614);

var replacement = /#|\.prototype\./;

var isForced = function (feature, detection) {
  var value = data[normalize(feature)];
  return value == POLYFILL ? true
    : value == NATIVE ? false
    : isCallable(detection) ? fails(detection)
    : !!detection;
};

var normalize = isForced.normalize = function (string) {
  return String(string).replace(replacement, '.').toLowerCase();
};

var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';

module.exports = isForced;


/***/ }),

/***/ 111:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var isCallable = __webpack_require__(614);

module.exports = function (it) {
  return typeof it == 'object' ? it !== null : isCallable(it);
};


/***/ }),

/***/ 1913:
/***/ (function(module) {

module.exports = false;


/***/ }),

/***/ 2190:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(5005);
var isCallable = __webpack_require__(614);
var isPrototypeOf = __webpack_require__(7976);
var USE_SYMBOL_AS_UID = __webpack_require__(3307);

var $Object = Object;

module.exports = USE_SYMBOL_AS_UID ? function (it) {
  return typeof it == 'symbol';
} : function (it) {
  var $Symbol = getBuiltIn('Symbol');
  return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
};


/***/ }),

/***/ 6244:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toLength = __webpack_require__(7466);

// `LengthOfArrayLike` abstract operation
// https://tc39.es/ecma262/#sec-lengthofarraylike
module.exports = function (obj) {
  return toLength(obj.length);
};


/***/ }),

/***/ 6339:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var fails = __webpack_require__(7293);
var isCallable = __webpack_require__(614);
var hasOwn = __webpack_require__(2597);
var DESCRIPTORS = __webpack_require__(9781);
var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(6530).CONFIGURABLE);
var inspectSource = __webpack_require__(2788);
var InternalStateModule = __webpack_require__(9909);

var enforceInternalState = InternalStateModule.enforce;
var getInternalState = InternalStateModule.get;
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;

var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
});

var TEMPLATE = String(String).split('String');

var makeBuiltIn = module.exports = function (value, name, options) {
  if (String(name).slice(0, 7) === 'Symbol(') {
    name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  }
  if (options && options.getter) name = 'get ' + name;
  if (options && options.setter) name = 'set ' + name;
  if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
    if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
    else value.name = name;
  }
  if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
    defineProperty(value, 'length', { value: options.arity });
  }
  try {
    if (options && hasOwn(options, 'constructor') && options.constructor) {
      if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
    // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
    } else if (value.prototype) value.prototype = undefined;
  } catch (error) { /* empty */ }
  var state = enforceInternalState(value);
  if (!hasOwn(state, 'source')) {
    state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  } return value;
};

// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
// eslint-disable-next-line no-extend-native -- required
Function.prototype.toString = makeBuiltIn(function toString() {
  return isCallable(this) && getInternalState(this).source || inspectSource(this);
}, 'toString');


/***/ }),

/***/ 4758:
/***/ (function(module) {

var ceil = Math.ceil;
var floor = Math.floor;

// `Math.trunc` method
// https://tc39.es/ecma262/#sec-math.trunc
// eslint-disable-next-line es-x/no-math-trunc -- safe
module.exports = Math.trunc || function trunc(x) {
  var n = +x;
  return (n > 0 ? floor : ceil)(n);
};


/***/ }),

/***/ 133:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

/* eslint-disable es-x/no-symbol -- required for testing */
var V8_VERSION = __webpack_require__(7392);
var fails = __webpack_require__(7293);

// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  var symbol = Symbol();
  // Chrome 38 Symbol has incorrect toString conversion
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
    // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
    !Symbol.sham && V8_VERSION && V8_VERSION < 41;
});


/***/ }),

/***/ 8536:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var isCallable = __webpack_require__(614);
var inspectSource = __webpack_require__(2788);

var WeakMap = global.WeakMap;

module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));


/***/ }),

/***/ 6277:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toString = __webpack_require__(1340);

module.exports = function (argument, $default) {
  return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
};


/***/ }),

/***/ 3070:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(9781);
var IE8_DOM_DEFINE = __webpack_require__(4664);
var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(3353);
var anObject = __webpack_require__(9670);
var toPropertyKey = __webpack_require__(4948);

var $TypeError = TypeError;
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
var $defineProperty = Object.defineProperty;
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var ENUMERABLE = 'enumerable';
var CONFIGURABLE = 'configurable';
var WRITABLE = 'writable';

// `Object.defineProperty` method
// https://tc39.es/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
    var current = $getOwnPropertyDescriptor(O, P);
    if (current && current[WRITABLE]) {
      O[P] = Attributes.value;
      Attributes = {
        configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
        enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
        writable: false
      };
    }
  } return $defineProperty(O, P, Attributes);
} : $defineProperty : function defineProperty(O, P, Attributes) {
  anObject(O);
  P = toPropertyKey(P);
  anObject(Attributes);
  if (IE8_DOM_DEFINE) try {
    return $defineProperty(O, P, Attributes);
  } catch (error) { /* empty */ }
  if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
  if ('value' in Attributes) O[P] = Attributes.value;
  return O;
};


/***/ }),

/***/ 1236:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(9781);
var call = __webpack_require__(6916);
var propertyIsEnumerableModule = __webpack_require__(5296);
var createPropertyDescriptor = __webpack_require__(9114);
var toIndexedObject = __webpack_require__(5656);
var toPropertyKey = __webpack_require__(4948);
var hasOwn = __webpack_require__(2597);
var IE8_DOM_DEFINE = __webpack_require__(4664);

// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// `Object.getOwnPropertyDescriptor` method
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  O = toIndexedObject(O);
  P = toPropertyKey(P);
  if (IE8_DOM_DEFINE) try {
    return $getOwnPropertyDescriptor(O, P);
  } catch (error) { /* empty */ }
  if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
};


/***/ }),

/***/ 8006:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

var internalObjectKeys = __webpack_require__(6324);
var enumBugKeys = __webpack_require__(748);

var hiddenKeys = enumBugKeys.concat('length', 'prototype');

// `Object.getOwnPropertyNames` method
// https://tc39.es/ecma262/#sec-object.getownpropertynames
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  return internalObjectKeys(O, hiddenKeys);
};


/***/ }),

/***/ 5181:
/***/ (function(__unused_webpack_module, exports) {

// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
exports.f = Object.getOwnPropertySymbols;


/***/ }),

/***/ 9518:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var hasOwn = __webpack_require__(2597);
var isCallable = __webpack_require__(614);
var toObject = __webpack_require__(7908);
var sharedKey = __webpack_require__(6200);
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);

var IE_PROTO = sharedKey('IE_PROTO');
var $Object = Object;
var ObjectPrototype = $Object.prototype;

// `Object.getPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.getprototypeof
// eslint-disable-next-line es-x/no-object-getprototypeof -- safe
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
  var object = toObject(O);
  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  var constructor = object.constructor;
  if (isCallable(constructor) && object instanceof constructor) {
    return constructor.prototype;
  } return object instanceof $Object ? ObjectPrototype : null;
};


/***/ }),

/***/ 7976:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);

module.exports = uncurryThis({}.isPrototypeOf);


/***/ }),

/***/ 6324:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);
var hasOwn = __webpack_require__(2597);
var toIndexedObject = __webpack_require__(5656);
var indexOf = (__webpack_require__(1318).indexOf);
var hiddenKeys = __webpack_require__(3501);

var push = uncurryThis([].push);

module.exports = function (object, names) {
  var O = toIndexedObject(object);
  var i = 0;
  var result = [];
  var key;
  for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  // Don't enum bug & hidden keys
  while (names.length > i) if (hasOwn(O, key = names[i++])) {
    ~indexOf(result, key) || push(result, key);
  }
  return result;
};


/***/ }),

/***/ 5296:
/***/ (function(__unused_webpack_module, exports) {

"use strict";

var $propertyIsEnumerable = {}.propertyIsEnumerable;
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;

// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);

// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  var descriptor = getOwnPropertyDescriptor(this, V);
  return !!descriptor && descriptor.enumerable;
} : $propertyIsEnumerable;


/***/ }),

/***/ 7674:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

/* eslint-disable no-proto -- safe */
var uncurryThis = __webpack_require__(1702);
var anObject = __webpack_require__(9670);
var aPossiblePrototype = __webpack_require__(6077);

// `Object.setPrototypeOf` method
// https://tc39.es/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  var CORRECT_SETTER = false;
  var test = {};
  var setter;
  try {
    // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
    setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
    setter(test, []);
    CORRECT_SETTER = test instanceof Array;
  } catch (error) { /* empty */ }
  return function setPrototypeOf(O, proto) {
    anObject(O);
    aPossiblePrototype(proto);
    if (CORRECT_SETTER) setter(O, proto);
    else O.__proto__ = proto;
    return O;
  };
}() : undefined);


/***/ }),

/***/ 2140:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var call = __webpack_require__(6916);
var isCallable = __webpack_require__(614);
var isObject = __webpack_require__(111);

var $TypeError = TypeError;

// `OrdinaryToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
module.exports = function (input, pref) {
  var fn, val;
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  throw $TypeError("Can't convert object to primitive value");
};


/***/ }),

/***/ 3887:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var getBuiltIn = __webpack_require__(5005);
var uncurryThis = __webpack_require__(1702);
var getOwnPropertyNamesModule = __webpack_require__(8006);
var getOwnPropertySymbolsModule = __webpack_require__(5181);
var anObject = __webpack_require__(9670);

var concat = uncurryThis([].concat);

// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  var keys = getOwnPropertyNamesModule.f(anObject(it));
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
};


/***/ }),

/***/ 2626:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var defineProperty = (__webpack_require__(3070).f);

module.exports = function (Target, Source, key) {
  key in Target || defineProperty(Target, key, {
    configurable: true,
    get: function () { return Source[key]; },
    set: function (it) { Source[key] = it; }
  });
};


/***/ }),

/***/ 4488:
/***/ (function(module) {

var $TypeError = TypeError;

// `RequireObjectCoercible` abstract operation
// https://tc39.es/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
  if (it == undefined) throw $TypeError("Can't call method on " + it);
  return it;
};


/***/ }),

/***/ 6200:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var shared = __webpack_require__(2309);
var uid = __webpack_require__(9711);

var keys = shared('keys');

module.exports = function (key) {
  return keys[key] || (keys[key] = uid(key));
};


/***/ }),

/***/ 5465:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var defineGlobalProperty = __webpack_require__(3072);

var SHARED = '__core-js_shared__';
var store = global[SHARED] || defineGlobalProperty(SHARED, {});

module.exports = store;


/***/ }),

/***/ 2309:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var IS_PURE = __webpack_require__(1913);
var store = __webpack_require__(5465);

(module.exports = function (key, value) {
  return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
  version: '3.24.1',
  mode: IS_PURE ? 'pure' : 'global',
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
  license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
  source: 'https://github.com/zloirock/core-js'
});


/***/ }),

/***/ 1400:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toIntegerOrInfinity = __webpack_require__(9303);

var max = Math.max;
var min = Math.min;

// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
  var integer = toIntegerOrInfinity(index);
  return integer < 0 ? max(integer + length, 0) : min(integer, length);
};


/***/ }),

/***/ 5656:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(8361);
var requireObjectCoercible = __webpack_require__(4488);

module.exports = function (it) {
  return IndexedObject(requireObjectCoercible(it));
};


/***/ }),

/***/ 9303:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var trunc = __webpack_require__(4758);

// `ToIntegerOrInfinity` abstract operation
// https://tc39.es/ecma262/#sec-tointegerorinfinity
module.exports = function (argument) {
  var number = +argument;
  // eslint-disable-next-line no-self-compare -- NaN check
  return number !== number || number === 0 ? 0 : trunc(number);
};


/***/ }),

/***/ 7466:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toIntegerOrInfinity = __webpack_require__(9303);

var min = Math.min;

// `ToLength` abstract operation
// https://tc39.es/ecma262/#sec-tolength
module.exports = function (argument) {
  return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};


/***/ }),

/***/ 7908:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var requireObjectCoercible = __webpack_require__(4488);

var $Object = Object;

// `ToObject` abstract operation
// https://tc39.es/ecma262/#sec-toobject
module.exports = function (argument) {
  return $Object(requireObjectCoercible(argument));
};


/***/ }),

/***/ 4590:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toPositiveInteger = __webpack_require__(3002);

var $RangeError = RangeError;

module.exports = function (it, BYTES) {
  var offset = toPositiveInteger(it);
  if (offset % BYTES) throw $RangeError('Wrong offset');
  return offset;
};


/***/ }),

/***/ 3002:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toIntegerOrInfinity = __webpack_require__(9303);

var $RangeError = RangeError;

module.exports = function (it) {
  var result = toIntegerOrInfinity(it);
  if (result < 0) throw $RangeError("The argument can't be less than 0");
  return result;
};


/***/ }),

/***/ 7593:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var call = __webpack_require__(6916);
var isObject = __webpack_require__(111);
var isSymbol = __webpack_require__(2190);
var getMethod = __webpack_require__(8173);
var ordinaryToPrimitive = __webpack_require__(2140);
var wellKnownSymbol = __webpack_require__(5112);

var $TypeError = TypeError;
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');

// `ToPrimitive` abstract operation
// https://tc39.es/ecma262/#sec-toprimitive
module.exports = function (input, pref) {
  if (!isObject(input) || isSymbol(input)) return input;
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  var result;
  if (exoticToPrim) {
    if (pref === undefined) pref = 'default';
    result = call(exoticToPrim, input, pref);
    if (!isObject(result) || isSymbol(result)) return result;
    throw $TypeError("Can't convert object to primitive value");
  }
  if (pref === undefined) pref = 'number';
  return ordinaryToPrimitive(input, pref);
};


/***/ }),

/***/ 4948:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var toPrimitive = __webpack_require__(7593);
var isSymbol = __webpack_require__(2190);

// `ToPropertyKey` abstract operation
// https://tc39.es/ecma262/#sec-topropertykey
module.exports = function (argument) {
  var key = toPrimitive(argument, 'string');
  return isSymbol(key) ? key : key + '';
};


/***/ }),

/***/ 1694:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var wellKnownSymbol = __webpack_require__(5112);

var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};

test[TO_STRING_TAG] = 'z';

module.exports = String(test) === '[object z]';


/***/ }),

/***/ 1340:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var classof = __webpack_require__(648);

var $String = String;

module.exports = function (argument) {
  if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  return $String(argument);
};


/***/ }),

/***/ 6330:
/***/ (function(module) {

var $String = String;

module.exports = function (argument) {
  try {
    return $String(argument);
  } catch (error) {
    return 'Object';
  }
};


/***/ }),

/***/ 9711:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var uncurryThis = __webpack_require__(1702);

var id = 0;
var postfix = Math.random();
var toString = uncurryThis(1.0.toString);

module.exports = function (key) {
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
};


/***/ }),

/***/ 3307:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

/* eslint-disable es-x/no-symbol -- required for testing */
var NATIVE_SYMBOL = __webpack_require__(133);

module.exports = NATIVE_SYMBOL
  && !Symbol.sham
  && typeof Symbol.iterator == 'symbol';


/***/ }),

/***/ 3353:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var DESCRIPTORS = __webpack_require__(9781);
var fails = __webpack_require__(7293);

// V8 ~ Chrome 36-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
module.exports = DESCRIPTORS && fails(function () {
  // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
    value: 42,
    writable: false
  }).prototype != 42;
});


/***/ }),

/***/ 5112:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

var global = __webpack_require__(7854);
var shared = __webpack_require__(2309);
var hasOwn = __webpack_require__(2597);
var uid = __webpack_require__(9711);
var NATIVE_SYMBOL = __webpack_require__(133);
var USE_SYMBOL_AS_UID = __webpack_require__(3307);

var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var symbolFor = Symbol && Symbol['for'];
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;

module.exports = function (name) {
  if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
    var description = 'Symbol.' + name;
    if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
      WellKnownSymbolsStore[name] = Symbol[name];
    } else if (USE_SYMBOL_AS_UID && symbolFor) {
      WellKnownSymbolsStore[name] = symbolFor(description);
    } else {
      WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
    }
  } return WellKnownSymbolsStore[name];
};


/***/ }),

/***/ 9191:
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var getBuiltIn = __webpack_require__(5005);
var hasOwn = __webpack_require__(2597);
var createNonEnumerableProperty = __webpack_require__(8880);
var isPrototypeOf = __webpack_require__(7976);
var setPrototypeOf = __webpack_require__(7674);
var copyConstructorProperties = __webpack_require__(9920);
var proxyAccessor = __webpack_require__(2626);
var inheritIfRequired = __webpack_require__(9587);
var normalizeStringArgument = __webpack_require__(6277);
var installErrorCause = __webpack_require__(8340);
var clearErrorStack = __webpack_require__(7741);
var ERROR_STACK_INSTALLABLE = __webpack_require__(2914);
var DESCRIPTORS = __webpack_require__(9781);
var IS_PURE = __webpack_require__(1913);

module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
  var STACK_TRACE_LIMIT = 'stackTraceLimit';
  var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
  var path = FULL_NAME.split('.');
  var ERROR_NAME = path[path.length - 1];
  var OriginalError = getBuiltIn.apply(null, path);

  if (!OriginalError) return;

  var OriginalErrorPrototype = OriginalError.prototype;

  // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
  if (!IS_PURE && hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;

  if (!FORCED) return OriginalError;

  var BaseError = getBuiltIn('Error');

  var WrappedError = wrapper(function (a, b) {
    var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
    var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
    if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
    if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(result, 'stack', clearErrorStack(result.stack, 2));
    if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
    if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
    return result;
  });

  WrappedError.prototype = OriginalErrorPrototype;

  if (ERROR_NAME !== 'Error') {
    if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
    else copyConstructorProperties(WrappedError, BaseError, { name: true });
  } else if (DESCRIPTORS && STACK_TRACE_LIMIT in OriginalError) {
    proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
    proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
  }

  copyConstructorProperties(WrappedError, OriginalError);

  if (!IS_PURE) try {
    // Safari 13- bug: WebAssembly errors does not have a proper `.name`
    if (OriginalErrorPrototype.name !== ERROR_NAME) {
      createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
    }
    OriginalErrorPrototype.constructor = WrappedError;
  } catch (error) { /* empty */ }

  return WrappedError;
};


/***/ }),

/***/ 1703:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

/* eslint-disable no-unused-vars -- required for functions `.length` */
var $ = __webpack_require__(2109);
var global = __webpack_require__(7854);
var apply = __webpack_require__(2104);
var wrapErrorConstructorWithCause = __webpack_require__(9191);

var WEB_ASSEMBLY = 'WebAssembly';
var WebAssembly = global[WEB_ASSEMBLY];

var FORCED = Error('e', { cause: 7 }).cause !== 7;

var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  var O = {};
  O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED);
  $({ global: true, constructor: true, arity: 1, forced: FORCED }, O);
};

var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
  if (WebAssembly && WebAssembly[ERROR_NAME]) {
    var O = {};
    O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED);
    $({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED }, O);
  }
};

// https://github.com/tc39/proposal-error-cause
exportGlobalErrorCauseWrapper('Error', function (init) {
  return function Error(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('EvalError', function (init) {
  return function EvalError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('RangeError', function (init) {
  return function RangeError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
  return function ReferenceError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
  return function SyntaxError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('TypeError', function (init) {
  return function TypeError(message) { return apply(init, this, arguments); };
});
exportGlobalErrorCauseWrapper('URIError', function (init) {
  return function URIError(message) { return apply(init, this, arguments); };
});
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
  return function CompileError(message) { return apply(init, this, arguments); };
});
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
  return function LinkError(message) { return apply(init, this, arguments); };
});
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
  return function RuntimeError(message) { return apply(init, this, arguments); };
});


/***/ }),

/***/ 8675:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__(260);
var lengthOfArrayLike = __webpack_require__(6244);
var toIntegerOrInfinity = __webpack_require__(9303);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.at` method
// https://github.com/tc39/proposal-relative-indexing-method
exportTypedArrayMethod('at', function at(index) {
  var O = aTypedArray(this);
  var len = lengthOfArrayLike(O);
  var relativeIndex = toIntegerOrInfinity(index);
  var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
  return (k < 0 || k >= len) ? undefined : O[k];
});


/***/ }),

/***/ 2958:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__(260);
var $findLastIndex = (__webpack_require__(9671).findLastIndex);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.findLastIndex` method
// https://github.com/tc39/proposal-array-find-from-last
exportTypedArrayMethod('findLastIndex', function findLastIndex(predicate /* , thisArg */) {
  return $findLastIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ 3408:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var ArrayBufferViewCore = __webpack_require__(260);
var $findLast = (__webpack_require__(9671).findLast);

var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

// `%TypedArray%.prototype.findLast` method
// https://github.com/tc39/proposal-array-find-from-last
exportTypedArrayMethod('findLast', function findLast(predicate /* , thisArg */) {
  return $findLast(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});


/***/ }),

/***/ 3462:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var global = __webpack_require__(7854);
var call = __webpack_require__(6916);
var ArrayBufferViewCore = __webpack_require__(260);
var lengthOfArrayLike = __webpack_require__(6244);
var toOffset = __webpack_require__(4590);
var toIndexedObject = __webpack_require__(7908);
var fails = __webpack_require__(7293);

var RangeError = global.RangeError;
var Int8Array = global.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
  // eslint-disable-next-line es-x/no-typed-arrays -- required for testing
  var array = new Uint8ClampedArray(2);
  call($set, array, { length: 1, 0: 3 }, 1);
  return array[1] !== 3;
});

// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
  var array = new Int8Array(2);
  array.set(1);
  array.set('2', 1);
  return array[0] !== 0 || array[1] !== 2;
});

// `%TypedArray%.prototype.set` method
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  aTypedArray(this);
  var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  var src = toIndexedObject(arrayLike);
  if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
  var length = this.length;
  var len = lengthOfArrayLike(src);
  var index = 0;
  if (len + offset > length) throw RangeError('Wrong length');
  while (index < len) this[offset + index] = src[index++];
}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);


/***/ }),

/***/ 1118:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

// TODO: Remove from `core-js@4`
__webpack_require__(2958);


/***/ }),

/***/ 7380:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

// TODO: Remove from `core-js@4`
__webpack_require__(3408);


/***/ }),

/***/ 2801:
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {

"use strict";

var $ = __webpack_require__(2109);
var global = __webpack_require__(7854);
var getBuiltIn = __webpack_require__(5005);
var createPropertyDescriptor = __webpack_require__(9114);
var defineProperty = (__webpack_require__(3070).f);
var hasOwn = __webpack_require__(2597);
var anInstance = __webpack_require__(5787);
var inheritIfRequired = __webpack_require__(9587);
var normalizeStringArgument = __webpack_require__(6277);
var DOMExceptionConstants = __webpack_require__(3678);
var clearErrorStack = __webpack_require__(7741);
var DESCRIPTORS = __webpack_require__(9781);
var IS_PURE = __webpack_require__(1913);

var DOM_EXCEPTION = 'DOMException';
var Error = getBuiltIn('Error');
var NativeDOMException = getBuiltIn(DOM_EXCEPTION);

var $DOMException = function DOMException() {
  anInstance(this, DOMExceptionPrototype);
  var argumentsLength = arguments.length;
  var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
  var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
  var that = new NativeDOMException(message, name);
  var error = Error(message);
  error.name = DOM_EXCEPTION;
  defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
  inheritIfRequired(that, this, $DOMException);
  return that;
};

var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;

var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);

// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);

// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
// https://github.com/Jarred-Sumner/bun/issues/399
var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);

var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;

// `DOMException` constructor patch for `.stack` where it's required
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
  DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
});

var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;

if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
  if (!IS_PURE) {
    defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
  }

  for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
    var constant = DOMExceptionConstants[key];
    var constantName = constant.s;
    if (!hasOwn(PolyfilledDOMException, constantName)) {
      defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
    }
  }
}


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/define property getters */
/******/ 	!function() {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = function(exports, definition) {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/global */
/******/ 	!function() {
/******/ 		__webpack_require__.g = (function() {
/******/ 			if (typeof globalThis === 'object') return globalThis;
/******/ 			try {
/******/ 				return this || new Function('return this')();
/******/ 			} catch (e) {
/******/ 				if (typeof window === 'object') return window;
/******/ 			}
/******/ 		})();
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	!function() {
/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
/******/ 	}();
/******/ 	
/******/ 	/* webpack/runtime/publicPath */
/******/ 	!function() {
/******/ 		__webpack_require__.p = "";
/******/ 	}();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
!function() {
"use strict";

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "default": function() { return /* binding */ entry_lib; }
});

// UNUSED EXPORTS: install

;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
/* eslint-disable no-var */
// This file is imported into lib/wc client bundles.

if (typeof window !== 'undefined') {
  var currentScript = window.document.currentScript
  if (false) { var getCurrentScript; }

  var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
  if (src) {
    __webpack_require__.p = src[1] // eslint-disable-line
  }
}

// Indicate to webpack that this file can be concatenated
/* harmony default export */ var setPublicPath = (null);

;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/jsmpeg-player.vue?vue&type=template&id=086c1218&
var render = function render() {
  var _vm = this,
      _c = _vm._self._c;

  return _c('div', {
    staticClass: "jsmpeg-player",
    on: {
      "mouseenter": _vm.handlePlayerMouseEnter,
      "mouseleave": _vm.handlePlayerMouseLeave
    }
  }, [_c('div', {
    staticClass: "player-header",
    class: {
      'is-show': _vm.showTitle
    }
  }, [_vm.$slots.title ? _vm._t("title") : _vm.displayTitle ? _c('span', {
    staticClass: "player-title"
  }, [_vm._v(" " + _vm._s(_vm.displayTitle) + " ")]) : _vm._e(), _vm.playerStatus.recording ? _c('div', {
    staticClass: "recording-tips"
  }, [_c('div', {
    staticClass: "recording-icon"
  }), _vm._v(" REC "), _vm.showTitle ? [_vm._v(" " + _vm._s(_vm.recordingDurationLabel) + " ")] : _vm._e()], 2) : _vm._e(), _vm.showCloseBtn ? _c('button', {
    staticClass: "close-btn jm-icon-close",
    attrs: {
      "type": "button",
      "title": "关闭"
    },
    on: {
      "click": function ($event) {
        return _vm.$emit('close');
      }
    }
  }) : _vm._e()], 2), _c('div', {
    ref: "player-main",
    staticClass: "player-main",
    on: {
      "&mousemove": function ($event) {
        return _vm.handleCanvasMouseMove.apply(null, arguments);
      },
      "click": _vm.handleCanvasClick,
      "dblclick": _vm.toggleFullscreen
    }
  }, [_c('div', {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.loading,
      expression: "loading"
    }],
    staticClass: "player-loading-mask"
  }, [_c('div', {
    staticClass: "player-loading"
  }, [_vm.hasLoadingSlot ? _vm._t("loading", null, {
    "text": _vm.loadingText
  }) : _c('loading', {
    attrs: {
      "text": _vm.loadingText
    }
  })], 2)]), !_vm.loading && _vm.playerStatus.noSignal ? [_vm.$slots['no-signal'] ? [_vm._t("no-signal")] : [_c('div', {
    staticClass: "no-signal-text"
  }, [_vm._v(" " + _vm._s(_vm.noSignalText) + " ")])]] : _vm._e()], 2), _vm.withToolbar ? _c('div', {
    staticClass: "player-toolbar",
    class: {
      'is-show': _vm.playerStatus.playerHover
    },
    on: {
      "mouseenter": _vm.handleToolbarMouseEnter,
      "mouseleave": _vm.handleToolbarMouseLeave
    }
  }, [_c('button', {
    staticClass: "toolbar-item play-btn",
    class: _vm.paused ? 'jm-icon-video-play is-paused' : 'jm-icon-video-pause',
    attrs: {
      "type": "button",
      "title": _vm.paused ? '播放' : '暂停'
    },
    on: {
      "click": function ($event) {
        return _vm.handleToolbar('play');
      }
    }
  }), _c('button', {
    staticClass: "toolbar-item stop-btn jm-icon-stop",
    attrs: {
      "title": "停止",
      "type": "button"
    },
    on: {
      "click": function ($event) {
        return _vm.handleToolbar('stop');
      }
    }
  }), _c('button', {
    directives: [{
      name: "popover",
      rawName: "v-popover:popover-volume",
      arg: "popover-volume"
    }],
    staticClass: "toolbar-item volume-btn",
    class: _vm.isMuted ? 'jm-icon-muted' : 'jm-icon-volume',
    attrs: {
      "type": "button",
      "title": "音量"
    },
    on: {
      "click": function ($event) {
        return _vm.handleToolbar('mute');
      }
    }
  }), _c('div', {
    staticClass: "progress-bar"
  }, [_vm.showDuration ? _c('span', {
    staticClass: "current-time"
  }, [_vm._v(" " + _vm._s(_vm.currentTimeLabel) + " ")]) : _vm._e()]), _c('button', {
    staticClass: "toolbar-item snapshot-btn jm-icon-screenshots",
    attrs: {
      "title": "截图",
      "type": "button"
    },
    on: {
      "click": function ($event) {
        return _vm.handleToolbar('snapshot');
      }
    }
  }), _c('button', {
    staticClass: "toolbar-item recording-btn jm-icon-recording",
    class: _vm.playerStatus.recording ? 'is-recording' : '',
    attrs: {
      "type": "button",
      "title": _vm.playerStatus.recording ? '停止录制' : '录制'
    },
    on: {
      "click": function ($event) {
        return _vm.handleToolbar('recording');
      }
    }
  }), _c('button', {
    directives: [{
      name: "popover",
      rawName: "v-popover:popover-setting",
      arg: "popover-setting"
    }],
    staticClass: "toolbar-item setting-btn jm-icon-settings",
    attrs: {
      "title": "设置",
      "type": "button"
    }
  }), _c('button', {
    staticClass: "toolbar-item fullscreen-btn",
    class: _vm.playerStatus.fullscreen ? 'jm-icon-fullscreen-exit' : 'jm-icon-fullscreen',
    attrs: {
      "type": "button",
      "title": _vm.playerStatus.fullscreen ? '取消全屏' : '全屏'
    },
    on: {
      "click": function ($event) {
        return _vm.handleToolbar('fullscreen');
      }
    }
  })]) : _vm._e(), _c('div', {
    staticClass: "overlayers"
  }, [_vm.withToolbar ? [_c('el-popover', {
    ref: "popover-setting",
    attrs: {
      "popper-class": "jsmpeg-player-popover popover-setting",
      "trigger": "hover",
      "placement": "top-end",
      "visible-arrow": _vm.popoverVisibleArrow,
      "append-to-body": false
    }
  }, [_c('div', {
    staticClass: "setting-item",
    attrs: {
      "highlight": ""
    }
  }, [_c('span', {
    staticClass: "label"
  }, [_vm._v("自动拉伸")]), _c('div', {
    staticClass: "input__wrap"
  }, [_c('el-switch', {
    staticClass: "input",
    on: {
      "change": function ($event) {
        return _vm.settingPlayer('autoStretch', $event);
      }
    },
    model: {
      value: _vm.playerSettings.autoStretch,
      callback: function ($$v) {
        _vm.$set(_vm.playerSettings, "autoStretch", $$v);
      },
      expression: "playerSettings.autoStretch"
    }
  })], 1)]), _c('div', {
    staticClass: "setting-item",
    attrs: {
      "highlight": ""
    }
  }, [_c('span', {
    staticClass: "label"
  }, [_vm._v("旋转画面")]), _c('div', {
    staticClass: "input__wrap"
  }, [_c('button', {
    staticClass: "toolbar-item jm-icon-rotate-left",
    attrs: {
      "title": "向左旋转90度",
      "type": "button"
    },
    on: {
      "click": function ($event) {
        return _vm.rotate(-90, true);
      }
    }
  }), _c('button', {
    staticClass: "toolbar-item jm-icon-rotate-right",
    attrs: {
      "title": "向右旋转90度",
      "type": "button"
    },
    on: {
      "click": function ($event) {
        return _vm.rotate(90, true);
      }
    }
  })])])]), _c('el-popover', {
    ref: "popover-volume",
    attrs: {
      "popper-class": "jsmpeg-player-popover popover-volume",
      "trigger": "hover",
      "placement": "top",
      "visible-arrow": _vm.popoverVisibleArrow,
      "append-to-body": false
    }
  }, [_c('div', {
    staticClass: "volume-value"
  }, [_vm._v(_vm._s(_vm.volumePercent))]), _c('el-slider', {
    attrs: {
      "vertical": "",
      "height": "120px",
      "max": 1,
      "min": 0,
      "step": 0.01,
      "show-tooltip": false,
      "marks": {
        0: '',
        0.5: '',
        1: ''
      }
    },
    on: {
      "change": function ($event) {
        return _vm.$emit('volume-change', _vm.volume);
      }
    },
    model: {
      value: _vm.volume,
      callback: function ($$v) {
        _vm.volume = $$v;
      },
      expression: "volume"
    }
  })], 1)] : _vm._e()], 2)]);
};

var staticRenderFns = [];

;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
function _defineProperty(obj, key, value) {
  if (key in obj) {
    Object.defineProperty(obj, key, {
      value: value,
      enumerable: true,
      configurable: true,
      writable: true
    });
  } else {
    obj[key] = value;
  }

  return obj;
}
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js
var web_dom_exception_stack = __webpack_require__(2801);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.at.js
var es_typed_array_at = __webpack_require__(8675);
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
var es_typed_array_set = __webpack_require__(3462);
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.typed-array.find-last.js
var esnext_typed_array_find_last = __webpack_require__(7380);
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.typed-array.find-last-index.js
var esnext_typed_array_find_last_index = __webpack_require__(1118);
;// CONCATENATED MODULE: ./src/class/jsmpeg/utils/index.js





function Now() {
  return window.performance ? window.performance.now() / 1000 : Date.now() / 1000;
}
function Fill(array, value) {
  if (array.fill) {
    array.fill(value);
  } else {
    for (let i = 0; i < array.length; i++) {
      array[i] = value;
    }
  }
}
function Base64ToArrayBuffer(base64) {
  let binary = window.atob(base64);
  let length = binary.length;
  let bytes = new Uint8Array(length);

  for (let i = 0; i < length; i++) {
    bytes[i] = binary.charCodeAt(i);
  }

  return bytes.buffer;
}
/**
 *
 * @param {object} param
 * @param {string|object|Array} param.data 数据,传入后url参数将被忽略
 * @param {string} param.url 文件下载地址
 * @param {string} param.name 文件名称
 * @param {string} param.mimeType 文件mime类型
 * @returns
 */

function download(blob, name = 'JSMpeg_' + Date.now(), mimeType = '') {
  if (!blob) return;
  const a = document.createElement('a');
  a.style.display = 'none';
  a.download = name;

  if (typeof blob === 'string') {
    a.href = blob;
  } else {
    blob = blob instanceof Blob ? blob : new Blob(blob instanceof Array ? blob : [blob], {
      type: mimeType
    });
    a.href = URL.createObjectURL(blob);
  }

  setTimeout(() => {
    a.click();
  }, 0);
  setTimeout(() => {
    a.remove();
  }, 1);

  if (blob instanceof Blob) {
    setTimeout(() => {
      URL.revokeObjectURL(blob);
    }, 1000);
  }
}
/**
 *
 * @param {number} num
 * @param {number} len
 * @returns
 */

function prefixPadZero(num, len = 2) {
  return (num + '').padStart(len, '0');
}
/**
 * 格式化时间戳(毫秒)为时分秒
 * @param {number} timestamp
 * @param {boolean} showMs
 * @returns
 */


function formatTimestamp(timestamp, showMs) {
  let minutes = parseInt(timestamp / 1000),
      seconds = parseInt(minutes / 60),
      hours = parseInt(seconds / 60);
  let result;

  if (hours < 1) {
    result = `${prefixPadZero(seconds % 60)}:${prefixPadZero(minutes % 60)}`;
  }

  if (hours >= 1) {
    result = `${prefixPadZero(hours % 24)}:${prefixPadZero(seconds % 60)}:${prefixPadZero(minutes % 60)}`;
  }

  if (showMs) {
    result += `:${prefixPadZero(timestamp % 1000, 3)}`;
  }

  return result;
}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/audio-output/webaudio.js


class WebAudioOut {
  /** @type {AudioContext} */

  /** @type {GainNode} */

  /** @type {GainNode} */

  /** @type {number} */

  /** @type {number} */

  /** @type {number} */

  /** @type {boolean} */

  /** @type {boolean} */
  constructor(options) {
    _defineProperty(this, "context", void 0);

    _defineProperty(this, "gain", void 0);

    _defineProperty(this, "destination", void 0);

    _defineProperty(this, "startTime", void 0);

    _defineProperty(this, "buffer", void 0);

    _defineProperty(this, "wallclockStartTime", void 0);

    _defineProperty(this, "volume", void 0);

    _defineProperty(this, "enabled", void 0);

    _defineProperty(this, "unlocked", void 0);

    this.context = WebAudioOut.CachedContext = WebAudioOut.CachedContext || new (window.AudioContext || window.webkitAudioContext)();
    this.gain = this.context.createGain();
    this.destination = this.gain; // Keep track of the number of connections to this AudioContext, so we
    // can safely close() it when we're the only one connected to it.

    this.gain.connect(this.context.destination);
    this.context._connections = (this.context._connections || 0) + 1;
    this.startTime = 0;
    this.buffer = null;
    this.wallclockStartTime = 0;
    this.volume = 1;
    this.enabled = true;
    this.unlocked = !WebAudioOut.NeedsUnlocking();
    Object.defineProperty(this, 'enqueuedTime', {
      get: this.getEnqueuedTime
    });
  }

  destroy() {
    this.gain.disconnect();
    this.context._connections--;

    if (this.context._connections === 0) {
      this.context.close();
      WebAudioOut.CachedContext = null;
    }
  }

  play(sampleRate, left, right) {
    if (!this.enabled) {
      return;
    } // If the context is not unlocked yet, we simply advance the start time
    // to "fake" actually playing audio. This will keep the video in sync.


    if (!this.unlocked) {
      let ts = Now();

      if (this.wallclockStartTime < ts) {
        this.wallclockStartTime = ts;
      }

      this.wallclockStartTime += left.length / sampleRate;
      return;
    }

    this.gain.gain.value = this.volume;
    let buffer = this.context.createBuffer(2, left.length, sampleRate);
    buffer.getChannelData(0).set(left);
    buffer.getChannelData(1).set(right);
    let source = this.context.createBufferSource();
    source.buffer = buffer;
    source.connect(this.destination);
    let now = this.context.currentTime;
    let duration = buffer.duration;

    if (this.startTime < now) {
      this.startTime = now;
      this.wallclockStartTime = Now();
    }

    source.start(this.startTime);
    this.startTime += duration;
    this.wallclockStartTime += duration;
  }

  stop() {
    // Meh; there seems to be no simple way to get a list of currently
    // active source nodes from the Audio Context, and maintaining this
    // list ourselfs would be a pain, so we just set the gain to 0
    // to cut off all enqueued audio instantly.
    this.gain.gain.value = 0;
  }

  getEnqueuedTime() {
    // The AudioContext.currentTime is only updated every so often, so if we
    // want to get exact timing, we need to rely on the system time.
    return Math.max(this.wallclockStartTime - Now(), 0);
  }

  resetEnqueuedTime() {
    this.startTime = this.context.currentTime;
    this.wallclockStartTime = Now();
  }

  unlock(callback) {
    if (this.unlocked) {
      if (callback) {
        callback();
      }

      return;
    }

    this.unlockCallback = callback; // Create empty buffer and play it

    let buffer = this.context.createBuffer(1, 1, 22050);
    let source = this.context.createBufferSource();
    source.buffer = buffer;
    source.connect(this.destination);
    source.start(0);
    setTimeout(this.checkIfUnlocked.bind(this, source, 0), 0);
  }

  checkIfUnlocked(source, attempt) {
    if (source.playbackState === source.PLAYING_STATE || source.playbackState === source.FINISHED_STATE) {
      this.unlocked = true;

      if (this.unlockCallback) {
        this.unlockCallback();
        this.unlockCallback = null;
      }
    } else if (attempt < 10) {
      // Jeez, what a shit show. Thanks iOS!
      setTimeout(this.checkIfUnlocked.bind(this, source, attempt + 1), 100);
    }
  }

  static NeedsUnlocking() {
    return /iPhone|iPad|iPod/i.test(navigator.userAgent);
  }

  static IsSupported() {
    return window.AudioContext || window.webkitAudioContext;
  }

}

_defineProperty(WebAudioOut, "CachedContext", null);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/audio-output/index.js

const AudioOutput = {
  WebAudio: WebAudioOut
};
/* harmony default export */ var audio_output = (AudioOutput);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/buffer.js







class BitBuffer {
  /** @type {Uint8Array} */

  /** @type {number} */

  /** @type {1|2} */

  /** @type {number} */
  constructor(bufferOrLength, mode = BitBuffer.MODE.EXPAND) {
    _defineProperty(this, "bytes", void 0);

    _defineProperty(this, "byteLength", void 0);

    _defineProperty(this, "mode", void 0);

    _defineProperty(this, "index", void 0);

    if (typeof bufferOrLength === 'object') {
      this.bytes = bufferOrLength instanceof Uint8Array ? bufferOrLength : new Uint8Array(bufferOrLength);
      this.byteLength = this.bytes.length;
    } else {
      this.bytes = new Uint8Array(bufferOrLength || 1024 * 1024);
      this.byteLength = 0;
    }

    this.mode = mode;
    this.index = 0;
  }

  resize(size) {
    let newBytes = new Uint8Array(size);

    if (this.byteLength !== 0) {
      this.byteLength = Math.min(this.byteLength, size);
      newBytes.set(this.bytes, 0, this.byteLength);
    }

    this.bytes = newBytes;
    this.index = Math.min(this.index, this.byteLength << 3);
  }

  evict(sizeNeeded) {
    let bytePos = this.index >> 3,
        available = this.bytes.length - this.byteLength; // If the current index is the write position, we can simply reset both
    // to 0. Also reset (and throw away yet unread data) if we won't be able
    // to fit the new data in even after a normal eviction.

    if (this.index === this.byteLength << 3 || sizeNeeded > available + bytePos // emergency evac
    ) {
      this.byteLength = 0;
      this.index = 0;
      return;
    } else if (bytePos === 0) {
      // Nothing read yet - we can't evict anything
      return;
    } // Some browsers don't support copyWithin() yet - we may have to do
    // it manually using set and a subarray


    if (this.bytes.copyWithin) {
      this.bytes.copyWithin(0, bytePos, this.byteLength);
    } else {
      this.bytes.set(this.bytes.subarray(bytePos, this.byteLength));
    }

    this.byteLength = this.byteLength - bytePos;
    this.index -= bytePos << 3;
    return;
  }

  write(buffers) {
    let isArrayOfBuffers = typeof buffers[0] === 'object',
        totalLength = 0,
        available = this.bytes.length - this.byteLength; // Calculate total byte length

    if (isArrayOfBuffers) {
      let totalLength = 0;

      for (let i = 0; i < buffers.length; i++) {
        totalLength += buffers[i].byteLength;
      }
    } else {
      totalLength = buffers.byteLength;
    } // Do we need to resize or evict?


    if (totalLength > available) {
      if (this.mode === BitBuffer.MODE.EXPAND) {
        let newSize = Math.max(this.bytes.length * 2, totalLength - available);
        this.resize(newSize);
      } else {
        this.evict(totalLength);
      }
    }

    if (isArrayOfBuffers) {
      for (let i = 0; i < buffers.length; i++) {
        this.appendSingleBuffer(buffers[i]);
      }
    } else {
      this.appendSingleBuffer(buffers);
    }

    return totalLength;
  }

  appendSingleBuffer(buffer) {
    buffer = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer);
    this.bytes.set(buffer, this.byteLength);
    this.byteLength += buffer.length;
  }

  findNextStartCode() {
    for (let i = this.index + 7 >> 3; i < this.byteLength; i++) {
      if (this.bytes[i] == 0x00 && this.bytes[i + 1] == 0x00 && this.bytes[i + 2] == 0x01) {
        this.index = i + 4 << 3;
        return this.bytes[i + 3];
      }
    }

    this.index = this.byteLength << 3;
    return -1;
  }

  findStartCode(code) {
    let current = 0;

    while (true) {
      current = this.findNextStartCode();

      if (current === code || current === -1) {
        return current;
      }
    }

    return -1;
  }

  nextBytesAreStartCode() {
    let i = this.index + 7 >> 3;
    return i >= this.byteLength || this.bytes[i] == 0x00 && this.bytes[i + 1] == 0x00 && this.bytes[i + 2] == 0x01;
  }

  peek(count) {
    let offset = this.index;
    let value = 0;

    while (count) {
      let currentByte = this.bytes[offset >> 3],
          remaining = 8 - (offset & 7),
          // remaining bits in byte
      read = remaining < count ? remaining : count,
          // bits in this run
      shift = remaining - read,
          mask = 0xff >> 8 - read;
      value = value << read | (currentByte & mask << shift) >> shift;
      offset += read;
      count -= read;
    }

    return value;
  }

  read(count) {
    let value = this.peek(count);
    this.index += count;
    return value;
  }

  skip(count) {
    return this.index += count;
  }

  rewind(count) {
    this.index = Math.max(this.index - count, 0);
  }

  has(count) {
    return (this.byteLength << 3) - this.index >= count;
  }

}

_defineProperty(BitBuffer, "MODE", {
  EVICT: 1,
  EXPAND: 2
});
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/renderer/canvas2d.js


class CanvasRenderer {
  /** @type {HTMLCanvasElement} */

  /**
   *
   * @param {import('../../types').PlayerOptions} options
   */
  constructor(options) {
    _defineProperty(this, "canvas", void 0);

    this.canvas = options.canvas ?? document.createElement('canvas');
    this.width = this.canvas.width;
    this.height = this.canvas.height;
    this.enabled = true;
    this.context = this.canvas.getContext('2d');
  }

  destroy() {// Nothing to do here
  }

  clear() {
    if (!this.context) return;
    let w = this.canvas.width,
        h = this.canvas.height;
    this.context.fillStyle = '#000';
    this.context.fillRect(0, 0, w, h);
  }

  resize(width, height) {
    this.width = width | 0;
    this.height = height | 0;
    this.canvas.width = this.width;
    this.canvas.height = this.height;
    this.imageData = this.context.getImageData(0, 0, this.width, this.height);
    Fill(this.imageData.data, 255);
  }

  renderProgress(progress) {
    let w = this.canvas.width,
        h = this.canvas.height,
        ctx = this.context;
    ctx.fillStyle = '#222';
    ctx.fillRect(0, 0, w, h);
    ctx.fillStyle = '#fff';
    ctx.fillRect(0, h - h * progress, w, h * progress);
  }

  render(y, cb, cr) {
    this.YCbCrToRGBA(y, cb, cr, this.imageData.data);
    this.context.putImageData(this.imageData, 0, 0);
  }

  YCbCrToRGBA(y, cb, cr, rgba) {
    if (!this.enabled) {
      return;
    } // Chroma values are the same for each block of 4 pixels, so we proccess
    // 2 lines at a time, 2 neighboring pixels each.
    // I wish we could use 32bit writes to the RGBA buffer instead of writing
    // each byte separately, but we need the automatic clamping of the RGBA
    // buffer.


    let w = this.width + 15 >> 4 << 4,
        w2 = w >> 1;
    let yIndex1 = 0,
        yIndex2 = w,
        yNext2Lines = w + (w - this.width);
    let cIndex = 0,
        cNextLine = w2 - (this.width >> 1);
    let rgbaIndex1 = 0,
        rgbaIndex2 = this.width * 4,
        rgbaNext2Lines = this.width * 4;
    let cols = this.width >> 1,
        rows = this.height >> 1;
    let ccb, ccr, r, g, b;

    for (let row = 0; row < rows; row++) {
      for (let col = 0; col < cols; col++) {
        ccb = cb[cIndex];
        ccr = cr[cIndex];
        cIndex++;
        r = ccb + (ccb * 103 >> 8) - 179;
        g = (ccr * 88 >> 8) - 44 + (ccb * 183 >> 8) - 91;
        b = ccr + (ccr * 198 >> 8) - 227; // Line 1

        let y1 = y[yIndex1++];
        let y2 = y[yIndex1++];
        rgba[rgbaIndex1] = y1 + r;
        rgba[rgbaIndex1 + 1] = y1 - g;
        rgba[rgbaIndex1 + 2] = y1 + b;
        rgba[rgbaIndex1 + 4] = y2 + r;
        rgba[rgbaIndex1 + 5] = y2 - g;
        rgba[rgbaIndex1 + 6] = y2 + b;
        rgbaIndex1 += 8; // Line 2

        let y3 = y[yIndex2++];
        let y4 = y[yIndex2++];
        rgba[rgbaIndex2] = y3 + r;
        rgba[rgbaIndex2 + 1] = y3 - g;
        rgba[rgbaIndex2 + 2] = y3 + b;
        rgba[rgbaIndex2 + 4] = y4 + r;
        rgba[rgbaIndex2 + 5] = y4 - g;
        rgba[rgbaIndex2 + 6] = y4 + b;
        rgbaIndex2 += 8;
      }

      yIndex1 += yNext2Lines;
      yIndex2 += yNext2Lines;
      rgbaIndex1 += rgbaNext2Lines;
      rgbaIndex2 += rgbaNext2Lines;
      cIndex += cNextLine;
    }
  }

}
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
var es_error_cause = __webpack_require__(1703);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/renderer/webgl.js






class WebGLRenderer {
  /** @type {HTMLCanvasElement} */

  /** @type {WebGLRenderingContext} */
  constructor(options) {
    _defineProperty(this, "canvas", void 0);

    _defineProperty(this, "gl", void 0);

    this.canvas = options.canvas ?? document.createElement('canvas');
    this.width = this.canvas.width;
    this.height = this.canvas.height;
    this.enabled = true;
    this.hasTextureData = {};
    let contextCreateOptions = {
      preserveDrawingBuffer: !!options.preserveDrawingBuffer,
      alpha: false,
      depth: false,
      stencil: false,
      antialias: false,
      premultipliedAlpha: false
    };
    this.gl = this.canvas.getContext('webgl', contextCreateOptions) || this.canvas.getContext('experimental-webgl', contextCreateOptions);

    if (!this.gl) {
      throw new Error('Failed to get WebGL Context');
    }

    let gl = this.gl;
    let vertexAttr = null;
    gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false); // Init buffers

    this.vertexBuffer = gl.createBuffer();
    let vertexCoords = new Float32Array([0, 0, 0, 1, 1, 0, 1, 1]);
    gl.bindBuffer(gl.ARRAY_BUFFER, this.vertexBuffer);
    gl.bufferData(gl.ARRAY_BUFFER, vertexCoords, gl.STATIC_DRAW); // Setup the main YCrCbToRGBA shader

    this.program = this.createProgram(WebGLRenderer.SHADER.VERTEX_IDENTITY, WebGLRenderer.SHADER.FRAGMENT_YCRCB_TO_RGBA);
    vertexAttr = gl.getAttribLocation(this.program, 'vertex');
    gl.enableVertexAttribArray(vertexAttr);
    gl.vertexAttribPointer(vertexAttr, 2, gl.FLOAT, false, 0, 0);
    this.textureY = this.createTexture(0, 'textureY');
    this.textureCb = this.createTexture(1, 'textureCb');
    this.textureCr = this.createTexture(2, 'textureCr'); // Setup the loading animation shader

    this.loadingProgram = this.createProgram(WebGLRenderer.SHADER.VERTEX_IDENTITY, WebGLRenderer.SHADER.FRAGMENT_LOADING);
    vertexAttr = gl.getAttribLocation(this.loadingProgram, 'vertex');
    gl.enableVertexAttribArray(vertexAttr);
    gl.vertexAttribPointer(vertexAttr, 2, gl.FLOAT, false, 0, 0);
    this.shouldCreateUnclampedViews = !this.allowsClampedTextureData();
  }

  destroy(removeCanvas = true) {
    let gl = this.gl;
    this.deleteTexture(gl.TEXTURE0, this.textureY);
    this.deleteTexture(gl.TEXTURE1, this.textureCb);
    this.deleteTexture(gl.TEXTURE2, this.textureCr);
    gl.useProgram(null);
    gl.deleteProgram(this.program);
    gl.deleteProgram(this.loadingProgram);
    gl.bindBuffer(gl.ARRAY_BUFFER, null);
    gl.deleteBuffer(this.vertexBuffer);
    gl.getExtension('WEBGL_lose_context')?.loseContext(); // gl.clear()

    if (removeCanvas) {
      // 默认不移除canvas
      this.canvas.remove();
    }
  }

  clear() {
    // 设置背景颜色
    this.gl?.clearColor(0, 0, 0, 1);
    this.gl?.clear(this.gl.COLOR_BUFFER_BIT);
  }

  resize(width, height) {
    this.width = width | 0;
    this.height = height | 0;
    this.canvas.width = this.width;
    this.canvas.height = this.height;
    this.gl.useProgram(this.program);
    let codedWidth = this.width + 15 >> 4 << 4;
    this.gl.viewport(0, 0, codedWidth, this.height);
  }

  createTexture(index, name) {
    let gl = this.gl;
    let texture = gl.createTexture();
    gl.bindTexture(gl.TEXTURE_2D, texture);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
    gl.uniform1i(gl.getUniformLocation(this.program, name), index);
    return texture;
  }

  createProgram(vsh, fsh) {
    let gl = this.gl;
    let program = gl.createProgram();
    gl.attachShader(program, this.compileShader(gl.VERTEX_SHADER, vsh));
    gl.attachShader(program, this.compileShader(gl.FRAGMENT_SHADER, fsh));
    gl.linkProgram(program);
    gl.useProgram(program);
    return program;
  }

  compileShader(type, source) {
    let gl = this.gl;
    let shader = gl.createShader(type);
    gl.shaderSource(shader, source);
    gl.compileShader(shader);

    if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
      throw new Error(gl.getShaderInfoLog(shader));
    }

    return shader;
  }

  allowsClampedTextureData() {
    let gl = this.gl;
    let texture = gl.createTexture();
    gl.bindTexture(gl.TEXTURE_2D, texture);
    gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, 1, 1, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, new Uint8ClampedArray([0]));
    return gl.getError() === 0;
  }

  renderProgress(progress) {
    let gl = this.gl;
    gl.useProgram(this.loadingProgram);
    let loc = gl.getUniformLocation(this.loadingProgram, 'progress');
    gl.uniform1f(loc, progress);
    gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
  }

  render(y, cb, cr, isClampedArray) {
    if (!this.enabled) {
      return;
    }

    let gl = this.gl;
    let w = this.width + 15 >> 4 << 4,
        h = this.height,
        w2 = w >> 1,
        h2 = h >> 1; // In some browsers WebGL doesn't like Uint8ClampedArrays (this is a bug
    // and should be fixed soon-ish), so we have to create a Uint8Array view
    // for each plane.

    if (isClampedArray && this.shouldCreateUnclampedViews) {
      y = new Uint8Array(y.buffer);
      cb = new Uint8Array(cb.buffer);
      cr = new Uint8Array(cr.buffer);
    }

    gl.useProgram(this.program);
    this.updateTexture(gl.TEXTURE0, this.textureY, w, h, y);
    this.updateTexture(gl.TEXTURE1, this.textureCb, w2, h2, cb);
    this.updateTexture(gl.TEXTURE2, this.textureCr, w2, h2, cr);
    gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
  }

  updateTexture(unit, texture, w, h, data) {
    let gl = this.gl;
    gl.activeTexture(unit);
    gl.bindTexture(gl.TEXTURE_2D, texture);

    if (this.hasTextureData[unit]) {
      gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, w, h, gl.LUMINANCE, gl.UNSIGNED_BYTE, data);
    } else {
      this.hasTextureData[unit] = true;
      gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, w, h, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, data);
    }
  }

  deleteTexture(unit, texture) {
    let gl = this.gl;
    gl.activeTexture(unit);
    gl.bindTexture(gl.TEXTURE_2D, null);
    gl.deleteTexture(texture);
  }

  static IsSupported() {
    try {
      if (!window.WebGLRenderingContext) {
        return false;
      }

      let canvas = document.createElement('canvas');
      return !!(canvas.getContext('webgl') || canvas.getContext('experimental-webgl'));
    } catch (err) {
      return false;
    }
  }

}

_defineProperty(WebGLRenderer, "SHADER", {
  FRAGMENT_YCRCB_TO_RGBA: ['precision mediump float;', 'uniform sampler2D textureY;', 'uniform sampler2D textureCb;', 'uniform sampler2D textureCr;', 'varying vec2 texCoord;', 'mat4 rec601 = mat4(', '1.16438,  0.00000,  1.59603, -0.87079,', '1.16438, -0.39176, -0.81297,  0.52959,', '1.16438,  2.01723,  0.00000, -1.08139,', '0, 0, 0, 1', ');', 'void main() {', 'float y = texture2D(textureY, texCoord).r;', 'float cb = texture2D(textureCb, texCoord).r;', 'float cr = texture2D(textureCr, texCoord).r;', 'gl_FragColor = vec4(y, cr, cb, 1.0) * rec601;', '}'].join('\n'),
  FRAGMENT_LOADING: ['precision mediump float;', 'uniform float progress;', 'varying vec2 texCoord;', 'void main() {', 'float c = ceil(progress-(1.0-texCoord.y));', 'gl_FragColor = vec4(c,c,c,1);', '}'].join('\n'),
  VERTEX_IDENTITY: ['attribute vec2 vertex;', 'varying vec2 texCoord;', 'void main() {', 'texCoord = vertex;', 'gl_Position = vec4((vertex * 2.0 - 1.0) * vec2(1, -1), 0.0, 1.0);', '}'].join('\n')
});
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/decoder/decoder.js




class BaseDecoder {
  /** @type {import('../../utils/event-bus').EventBus} */

  /**
   * @type {WebGLRenderer|CanvasRenderer|WebAudioOut}
   */
  constructor(options) {
    _defineProperty(this, "eventBus", void 0);

    _defineProperty(this, "destination", void 0);

    this.eventBus = options.eventBus;
    this.destination = null;
    this.canPlay = false;
    this.collectTimestamps = !options.streaming;
    this.bytesWritten = 0;
    this.timestamps = [];
    this.timestampIndex = 0;
    this.startTime = 0;
    this.decodedTime = 0;
    Object.defineProperty(this, 'currentTime', {
      get: this.getCurrentTime
    });
  }

  destroy() {}

  connect(destination) {
    this.destination = destination;
  }

  bufferGetIndex() {
    return this.bits.index;
  }

  bufferSetIndex(index) {
    this.bits.index = index;
  }

  bufferWrite(buffers) {
    return this.bits.write(buffers);
  }

  write(pts, buffers) {
    if (this.collectTimestamps) {
      if (this.timestamps.length === 0) {
        this.startTime = pts;
        this.decodedTime = pts;
      }

      this.timestamps.push({
        index: this.bytesWritten << 3,
        time: pts
      });
    }

    this.bytesWritten += this.bufferWrite(buffers);
    this.canPlay = true;
  }

  seek(time) {
    if (!this.collectTimestamps) {
      return;
    }

    this.timestampIndex = 0;

    for (let i = 0; i < this.timestamps.length; i++) {
      if (this.timestamps[i].time > time) {
        break;
      }

      this.timestampIndex = i;
    }

    let ts = this.timestamps[this.timestampIndex];

    if (ts) {
      this.bufferSetIndex(ts.index);
      this.decodedTime = ts.time;
    } else {
      this.bufferSetIndex(0);
      this.decodedTime = this.startTime;
    }
  }

  decode() {
    this.advanceDecodedTime(0);
  }

  advanceDecodedTime(seconds) {
    if (this.collectTimestamps) {
      let newTimestampIndex = -1;
      let currentIndex = this.bufferGetIndex();

      for (let i = this.timestampIndex; i < this.timestamps.length; i++) {
        if (this.timestamps[i].index > currentIndex) {
          break;
        }

        newTimestampIndex = i;
      } // Did we find a new PTS, different from the last? If so, we don't have
      // to advance the decoded time manually and can instead sync it exactly
      // to the PTS.


      if (newTimestampIndex !== -1 && newTimestampIndex !== this.timestampIndex) {
        this.timestampIndex = newTimestampIndex;
        this.decodedTime = this.timestamps[this.timestampIndex].time;
        return;
      }
    }

    this.decodedTime += seconds;
  }

  getCurrentTime() {
    return this.decodedTime;
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/decoder/mpeg1.js








/**
 * Inspired by Java MPEG-1 Video Decoder and Player by Zoltan Korandi
 * https://sourceforge.net/projects/javampeg1video/
 */

class MPEG1 extends BaseDecoder {
  /**
   * @type {boolean}
   * 是否有序列头
   */

  /** 分辨率 */
  constructor(options) {
    super(options);

    _defineProperty(this, "hasSequenceHeader", void 0);

    _defineProperty(this, "resolution", {
      width: 0,
      height: 0
    });

    _defineProperty(this, "frameRate", 30);

    _defineProperty(this, "currentY", null);

    _defineProperty(this, "currentCr", null);

    _defineProperty(this, "currentCb", null);

    _defineProperty(this, "pictureType", 0);

    _defineProperty(this, "forwardY", null);

    _defineProperty(this, "forwardCr", null);

    _defineProperty(this, "forwardCb", null);

    _defineProperty(this, "fullPelForward", false);

    _defineProperty(this, "forwardFCode", 0);

    _defineProperty(this, "forwardRSize", 0);

    _defineProperty(this, "forwardF", 0);

    _defineProperty(this, "quantizerScale", 0);

    _defineProperty(this, "sliceBegin", false);

    _defineProperty(this, "macroblockAddress", 0);

    _defineProperty(this, "mbRow", 0);

    _defineProperty(this, "mbCol", 0);

    _defineProperty(this, "macroblockType", 0);

    _defineProperty(this, "macroblockIntra", false);

    _defineProperty(this, "macroblockMotFw", false);

    _defineProperty(this, "motionFwH", 0);

    _defineProperty(this, "motionFwV", 0);

    _defineProperty(this, "motionFwHPrev", 0);

    _defineProperty(this, "motionFwVPrev", 0);

    _defineProperty(this, "dcPredictorY", 0);

    _defineProperty(this, "dcPredictorCr", 0);

    _defineProperty(this, "dcPredictorCb", 0);

    _defineProperty(this, "blockData", null);

    this.onDecodeCallback = options.onVideoDecode;
    let bufferSize = options.videoBufferSize || 512 * 1024;
    let bufferMode = options.streaming ? BitBuffer.MODE.EVICT : BitBuffer.MODE.EXPAND;
    this.bits = new BitBuffer(bufferSize, bufferMode);
    this.customIntraQuantMatrix = new Uint8Array(64);
    this.customNonIntraQuantMatrix = new Uint8Array(64);
    this.blockData = new Int32Array(64);
    this.currentFrame = 0;
    this.decodeFirstFrame = options.decodeFirstFrame !== false;
    this.options = options;
  }

  write(pts, buffers) {
    super.write(pts, buffers);

    if (!this.hasSequenceHeader) {
      if (this.bits.findStartCode(MPEG1.START.SEQUENCE) === -1) {
        return false;
      }

      this.decodeSequenceHeader();

      if (this.decodeFirstFrame) {
        this.decode();
      }
    }
  }

  decode() {
    let startTime = Now();

    if (!this.hasSequenceHeader) {
      return false;
    }

    if (this.bits.findStartCode(MPEG1.START.PICTURE) === -1) {
      let bufferedBytes = this.bits.byteLength - (this.bits.index >> 3);
      return false;
    }

    this.decodePicture();
    this.advanceDecodedTime(1 / this.frameRate);
    let elapsedTime = Now() - startTime;
    this.onDecodeCallback?.(this, elapsedTime);
    this.eventBus?.emit('video-decode', this, elapsedTime);
    return true;
  }

  readHuffman(codeTable) {
    let state = 0;

    do {
      state = codeTable[state + this.bits.read(1)];
    } while (state >= 0 && codeTable[state] !== 0);

    return codeTable[state + 2];
  } // Sequence Layer


  decodeSequenceHeader() {
    let newWidth = this.bits.read(12),
        newHeight = this.bits.read(12); // skip pixel aspect ratio

    this.bits.skip(4);
    this.frameRate = MPEG1.PICTURE_RATE[this.bits.read(4)]; // skip bitRate, marker, bufferSize and constrained bit

    this.bits.skip(18 + 1 + 10 + 1);

    if (newWidth !== this.width || newHeight !== this.height) {
      this.width = newWidth;
      this.height = newHeight;
      this.initBuffers();

      if (this.destination) {
        this.destination.resize(newWidth, newHeight);
        this.resolution.width = w;
        this.resolution.height = h;
        this.options.onResolutionDecode?.(this, {
          width: newWidth,
          height: newHeight
        });
        this.eventBus?.emit('resolution-decode', this, {
          width: newWidth,
          height: newHeight
        });
      }
    }

    if (this.bits.read(1)) {
      // load custom intra quant matrix?
      for (let i = 0; i < 64; i++) {
        this.customIntraQuantMatrix[MPEG1.ZIG_ZAG[i]] = this.bits.read(8);
      }

      this.intraQuantMatrix = this.customIntraQuantMatrix;
    }

    if (this.bits.read(1)) {
      // load custom non intra quant matrix?
      for (let i = 0; i < 64; i++) {
        let idx = MPEG1.ZIG_ZAG[i];
        this.customNonIntraQuantMatrix[idx] = this.bits.read(8);
      }

      this.nonIntraQuantMatrix = this.customNonIntraQuantMatrix;
    }

    this.hasSequenceHeader = true;
  }

  initBuffers() {
    this.intraQuantMatrix = MPEG1.DEFAULT_INTRA_QUANT_MATRIX;
    this.nonIntraQuantMatrix = MPEG1.DEFAULT_NON_INTRA_QUANT_MATRIX;
    this.mbWidth = this.width + 15 >> 4;
    this.mbHeight = this.height + 15 >> 4;
    this.mbSize = this.mbWidth * this.mbHeight;
    this.codedWidth = this.mbWidth << 4;
    this.codedHeight = this.mbHeight << 4;
    this.codedSize = this.codedWidth * this.codedHeight;
    this.halfWidth = this.mbWidth << 3;
    this.halfHeight = this.mbHeight << 3; // Allocated buffers and resize the canvas

    this.currentY = new Uint8ClampedArray(this.codedSize);
    this.currentY32 = new Uint32Array(this.currentY.buffer);
    this.currentCr = new Uint8ClampedArray(this.codedSize >> 2);
    this.currentCr32 = new Uint32Array(this.currentCr.buffer);
    this.currentCb = new Uint8ClampedArray(this.codedSize >> 2);
    this.currentCb32 = new Uint32Array(this.currentCb.buffer);
    this.forwardY = new Uint8ClampedArray(this.codedSize);
    this.forwardY32 = new Uint32Array(this.forwardY.buffer);
    this.forwardCr = new Uint8ClampedArray(this.codedSize >> 2);
    this.forwardCr32 = new Uint32Array(this.forwardCr.buffer);
    this.forwardCb = new Uint8ClampedArray(this.codedSize >> 2);
    this.forwardCb32 = new Uint32Array(this.forwardCb.buffer);
  } // Picture Layer


  decodePicture(skipOutput) {
    this.currentFrame++;
    this.bits.skip(10); // skip temporalReference

    this.pictureType = this.bits.read(3);
    this.bits.skip(16); // skip vbv_delay
    // Skip B and D frames or unknown coding type

    if (this.pictureType <= 0 || this.pictureType >= MPEG1.PICTURE_TYPE.B) {
      return;
    } // full_pel_forward, forward_f_code


    if (this.pictureType === MPEG1.PICTURE_TYPE.PREDICTIVE) {
      this.fullPelForward = this.bits.read(1);
      this.forwardFCode = this.bits.read(3);

      if (this.forwardFCode === 0) {
        // Ignore picture with zero forward_f_code
        return;
      }

      this.forwardRSize = this.forwardFCode - 1;
      this.forwardF = 1 << this.forwardRSize;
    }

    let code = 0;

    do {
      code = this.bits.findNextStartCode();
    } while (code === MPEG1.START.EXTENSION || code === MPEG1.START.USER_DATA);

    while (code >= MPEG1.START.SLICE_FIRST && code <= MPEG1.START.SLICE_LAST) {
      this.decodeSlice(code & 0x000000ff);
      code = this.bits.findNextStartCode();
    }

    if (code !== -1) {
      // We found the next start code; rewind 32bits and let the main loop
      // handle it.
      this.bits.rewind(32);
    } // Invoke decode callbacks


    if (this.destination) {
      this.destination.render(this.currentY, this.currentCr, this.currentCb, true);
    } // If this is a reference picutre then rotate the prediction pointers


    if (this.pictureType === MPEG1.PICTURE_TYPE.INTRA || this.pictureType === MPEG1.PICTURE_TYPE.PREDICTIVE) {
      let tmpY = this.forwardY,
          tmpY32 = this.forwardY32,
          tmpCr = this.forwardCr,
          tmpCr32 = this.forwardCr32,
          tmpCb = this.forwardCb,
          tmpCb32 = this.forwardCb32;
      this.forwardY = this.currentY;
      this.forwardY32 = this.currentY32;
      this.forwardCr = this.currentCr;
      this.forwardCr32 = this.currentCr32;
      this.forwardCb = this.currentCb;
      this.forwardCb32 = this.currentCb32;
      this.currentY = tmpY;
      this.currentY32 = tmpY32;
      this.currentCr = tmpCr;
      this.currentCr32 = tmpCr32;
      this.currentCb = tmpCb;
      this.currentCb32 = tmpCb32;
    }
  } // Slice Layer


  decodeSlice(slice) {
    this.sliceBegin = true;
    this.macroblockAddress = (slice - 1) * this.mbWidth - 1; // Reset motion vectors and DC predictors

    this.motionFwH = this.motionFwHPrev = 0;
    this.motionFwV = this.motionFwVPrev = 0;
    this.dcPredictorY = 128;
    this.dcPredictorCr = 128;
    this.dcPredictorCb = 128;
    this.quantizerScale = this.bits.read(5); // skip extra bits

    while (this.bits.read(1)) {
      this.bits.skip(8);
    }

    do {
      this.decodeMacroblock();
    } while (!this.bits.nextBytesAreStartCode());
  } // Macroblock Layer


  decodeMacroblock() {
    // Decode macroblock_address_increment
    let increment = 0,
        t = this.readHuffman(MPEG1.MACROBLOCK_ADDRESS_INCREMENT);

    while (t === 34) {
      // macroblock_stuffing
      t = this.readHuffman(MPEG1.MACROBLOCK_ADDRESS_INCREMENT);
    }

    while (t === 35) {
      // macroblock_escape
      increment += 33;
      t = this.readHuffman(MPEG1.MACROBLOCK_ADDRESS_INCREMENT);
    }

    increment += t; // Process any skipped macroblocks

    if (this.sliceBegin) {
      // The first macroblock_address_increment of each slice is relative
      // to beginning of the preverious row, not the preverious macroblock
      this.sliceBegin = false;
      this.macroblockAddress += increment;
    } else {
      if (this.macroblockAddress + increment >= this.mbSize) {
        // Illegal (too large) macroblock_address_increment
        return;
      }

      if (increment > 1) {
        // Skipped macroblocks reset DC predictors
        this.dcPredictorY = 128;
        this.dcPredictorCr = 128;
        this.dcPredictorCb = 128; // Skipped macroblocks in P-pictures reset motion vectors

        if (this.pictureType === MPEG1.PICTURE_TYPE.PREDICTIVE) {
          this.motionFwH = this.motionFwHPrev = 0;
          this.motionFwV = this.motionFwVPrev = 0;
        }
      } // Predict skipped macroblocks


      while (increment > 1) {
        this.macroblockAddress++;
        this.mbRow = this.macroblockAddress / this.mbWidth | 0;
        this.mbCol = this.macroblockAddress % this.mbWidth;
        this.copyMacroblock(this.motionFwH, this.motionFwV, this.forwardY, this.forwardCr, this.forwardCb);
        increment--;
      }

      this.macroblockAddress++;
    }

    this.mbRow = this.macroblockAddress / this.mbWidth | 0;
    this.mbCol = this.macroblockAddress % this.mbWidth; // Process the current macroblock

    let mbTable = MPEG1.MACROBLOCK_TYPE[this.pictureType];
    this.macroblockType = this.readHuffman(mbTable);
    this.macroblockIntra = this.macroblockType & 0x01;
    this.macroblockMotFw = this.macroblockType & 0x08; // Quantizer scale

    if ((this.macroblockType & 0x10) !== 0) {
      this.quantizerScale = this.bits.read(5);
    }

    if (this.macroblockIntra) {
      // Intra-coded macroblocks reset motion vectors
      this.motionFwH = this.motionFwHPrev = 0;
      this.motionFwV = this.motionFwVPrev = 0;
    } else {
      // Non-intra macroblocks reset DC predictors
      this.dcPredictorY = 128;
      this.dcPredictorCr = 128;
      this.dcPredictorCb = 128;
      this.decodeMotionVectors();
      this.copyMacroblock(this.motionFwH, this.motionFwV, this.forwardY, this.forwardCr, this.forwardCb);
    } // Decode blocks


    let cbp = (this.macroblockType & 0x02) !== 0 ? this.readHuffman(MPEG1.CODE_BLOCK_PATTERN) : this.macroblockIntra ? 0x3f : 0;

    for (let block = 0, mask = 0x20; block < 6; block++) {
      if ((cbp & mask) !== 0) {
        this.decodeBlock(block);
      }

      mask >>= 1;
    }
  }

  decodeMotionVectors() {
    let code,
        d,
        r = 0; // Forward

    if (this.macroblockMotFw) {
      // Horizontal forward
      code = this.readHuffman(MPEG1.MOTION);

      if (code !== 0 && this.forwardF !== 1) {
        r = this.bits.read(this.forwardRSize);
        d = (Math.abs(code) - 1 << this.forwardRSize) + r + 1;

        if (code < 0) {
          d = -d;
        }
      } else {
        d = code;
      }

      this.motionFwHPrev += d;

      if (this.motionFwHPrev > (this.forwardF << 4) - 1) {
        this.motionFwHPrev -= this.forwardF << 5;
      } else if (this.motionFwHPrev < -this.forwardF << 4) {
        this.motionFwHPrev += this.forwardF << 5;
      }

      this.motionFwH = this.motionFwHPrev;

      if (this.fullPelForward) {
        this.motionFwH <<= 1;
      } // Vertical forward


      code = this.readHuffman(MPEG1.MOTION);

      if (code !== 0 && this.forwardF !== 1) {
        r = this.bits.read(this.forwardRSize);
        d = (Math.abs(code) - 1 << this.forwardRSize) + r + 1;

        if (code < 0) {
          d = -d;
        }
      } else {
        d = code;
      }

      this.motionFwVPrev += d;

      if (this.motionFwVPrev > (this.forwardF << 4) - 1) {
        this.motionFwVPrev -= this.forwardF << 5;
      } else if (this.motionFwVPrev < -this.forwardF << 4) {
        this.motionFwVPrev += this.forwardF << 5;
      }

      this.motionFwV = this.motionFwVPrev;

      if (this.fullPelForward) {
        this.motionFwV <<= 1;
      }
    } else if (this.pictureType === MPEG1.PICTURE_TYPE.PREDICTIVE) {
      // No motion information in P-picture, reset vectors
      this.motionFwH = this.motionFwHPrev = 0;
      this.motionFwV = this.motionFwVPrev = 0;
    }
  }

  copyMacroblock(motionH, motionV, sY, sCr, sCb) {
    let width, scan, H, V, oddH, oddV, src, dest, last; // We use 32bit writes here

    let dY = this.currentY32,
        dCb = this.currentCb32,
        dCr = this.currentCr32; // Luminance

    width = this.codedWidth;
    scan = width - 16;
    H = motionH >> 1;
    V = motionV >> 1;
    oddH = (motionH & 1) === 1;
    oddV = (motionV & 1) === 1;
    src = ((this.mbRow << 4) + V) * width + (this.mbCol << 4) + H;
    dest = this.mbRow * width + this.mbCol << 2;
    last = dest + (width << 2);
    let x, y1, y2, y;

    if (oddH) {
      if (oddV) {
        while (dest < last) {
          y1 = sY[src] + sY[src + width];
          src++;

          for (x = 0; x < 4; x++) {
            y2 = sY[src] + sY[src + width];
            src++;
            y = y1 + y2 + 2 >> 2 & 0xff;
            y1 = sY[src] + sY[src + width];
            src++;
            y |= y1 + y2 + 2 << 6 & 0xff00;
            y2 = sY[src] + sY[src + width];
            src++;
            y |= y1 + y2 + 2 << 14 & 0xff0000;
            y1 = sY[src] + sY[src + width];
            src++;
            y |= y1 + y2 + 2 << 22 & 0xff000000;
            dY[dest++] = y;
          }

          dest += scan >> 2;
          src += scan - 1;
        }
      } else {
        while (dest < last) {
          y1 = sY[src++];

          for (x = 0; x < 4; x++) {
            y2 = sY[src++];
            y = y1 + y2 + 1 >> 1 & 0xff;
            y1 = sY[src++];
            y |= y1 + y2 + 1 << 7 & 0xff00;
            y2 = sY[src++];
            y |= y1 + y2 + 1 << 15 & 0xff0000;
            y1 = sY[src++];
            y |= y1 + y2 + 1 << 23 & 0xff000000;
            dY[dest++] = y;
          }

          dest += scan >> 2;
          src += scan - 1;
        }
      }
    } else {
      if (oddV) {
        while (dest < last) {
          for (x = 0; x < 4; x++) {
            y = sY[src] + sY[src + width] + 1 >> 1 & 0xff;
            src++;
            y |= sY[src] + sY[src + width] + 1 << 7 & 0xff00;
            src++;
            y |= sY[src] + sY[src + width] + 1 << 15 & 0xff0000;
            src++;
            y |= sY[src] + sY[src + width] + 1 << 23 & 0xff000000;
            src++;
            dY[dest++] = y;
          }

          dest += scan >> 2;
          src += scan;
        }
      } else {
        while (dest < last) {
          for (x = 0; x < 4; x++) {
            y = sY[src];
            src++;
            y |= sY[src] << 8;
            src++;
            y |= sY[src] << 16;
            src++;
            y |= sY[src] << 24;
            src++;
            dY[dest++] = y;
          }

          dest += scan >> 2;
          src += scan;
        }
      }
    } // Chrominance


    width = this.halfWidth;
    scan = width - 8;
    H = motionH / 2 >> 1;
    V = motionV / 2 >> 1;
    oddH = (motionH / 2 & 1) === 1;
    oddV = (motionV / 2 & 1) === 1;
    src = ((this.mbRow << 3) + V) * width + (this.mbCol << 3) + H;
    dest = this.mbRow * width + this.mbCol << 1;
    last = dest + (width << 1);
    let cr1, cr2, cr, cb1, cb2, cb;

    if (oddH) {
      if (oddV) {
        while (dest < last) {
          cr1 = sCr[src] + sCr[src + width];
          cb1 = sCb[src] + sCb[src + width];
          src++;

          for (x = 0; x < 2; x++) {
            cr2 = sCr[src] + sCr[src + width];
            cb2 = sCb[src] + sCb[src + width];
            src++;
            cr = cr1 + cr2 + 2 >> 2 & 0xff;
            cb = cb1 + cb2 + 2 >> 2 & 0xff;
            cr1 = sCr[src] + sCr[src + width];
            cb1 = sCb[src] + sCb[src + width];
            src++;
            cr |= cr1 + cr2 + 2 << 6 & 0xff00;
            cb |= cb1 + cb2 + 2 << 6 & 0xff00;
            cr2 = sCr[src] + sCr[src + width];
            cb2 = sCb[src] + sCb[src + width];
            src++;
            cr |= cr1 + cr2 + 2 << 14 & 0xff0000;
            cb |= cb1 + cb2 + 2 << 14 & 0xff0000;
            cr1 = sCr[src] + sCr[src + width];
            cb1 = sCb[src] + sCb[src + width];
            src++;
            cr |= cr1 + cr2 + 2 << 22 & 0xff000000;
            cb |= cb1 + cb2 + 2 << 22 & 0xff000000;
            dCr[dest] = cr;
            dCb[dest] = cb;
            dest++;
          }

          dest += scan >> 2;
          src += scan - 1;
        }
      } else {
        while (dest < last) {
          cr1 = sCr[src];
          cb1 = sCb[src];
          src++;

          for (x = 0; x < 2; x++) {
            cr2 = sCr[src];
            cb2 = sCb[src++];
            cr = cr1 + cr2 + 1 >> 1 & 0xff;
            cb = cb1 + cb2 + 1 >> 1 & 0xff;
            cr1 = sCr[src];
            cb1 = sCb[src++];
            cr |= cr1 + cr2 + 1 << 7 & 0xff00;
            cb |= cb1 + cb2 + 1 << 7 & 0xff00;
            cr2 = sCr[src];
            cb2 = sCb[src++];
            cr |= cr1 + cr2 + 1 << 15 & 0xff0000;
            cb |= cb1 + cb2 + 1 << 15 & 0xff0000;
            cr1 = sCr[src];
            cb1 = sCb[src++];
            cr |= cr1 + cr2 + 1 << 23 & 0xff000000;
            cb |= cb1 + cb2 + 1 << 23 & 0xff000000;
            dCr[dest] = cr;
            dCb[dest] = cb;
            dest++;
          }

          dest += scan >> 2;
          src += scan - 1;
        }
      }
    } else {
      if (oddV) {
        while (dest < last) {
          for (x = 0; x < 2; x++) {
            cr = sCr[src] + sCr[src + width] + 1 >> 1 & 0xff;
            cb = sCb[src] + sCb[src + width] + 1 >> 1 & 0xff;
            src++;
            cr |= sCr[src] + sCr[src + width] + 1 << 7 & 0xff00;
            cb |= sCb[src] + sCb[src + width] + 1 << 7 & 0xff00;
            src++;
            cr |= sCr[src] + sCr[src + width] + 1 << 15 & 0xff0000;
            cb |= sCb[src] + sCb[src + width] + 1 << 15 & 0xff0000;
            src++;
            cr |= sCr[src] + sCr[src + width] + 1 << 23 & 0xff000000;
            cb |= sCb[src] + sCb[src + width] + 1 << 23 & 0xff000000;
            src++;
            dCr[dest] = cr;
            dCb[dest] = cb;
            dest++;
          }

          dest += scan >> 2;
          src += scan;
        }
      } else {
        while (dest < last) {
          for (x = 0; x < 2; x++) {
            cr = sCr[src];
            cb = sCb[src];
            src++;
            cr |= sCr[src] << 8;
            cb |= sCb[src] << 8;
            src++;
            cr |= sCr[src] << 16;
            cb |= sCb[src] << 16;
            src++;
            cr |= sCr[src] << 24;
            cb |= sCb[src] << 24;
            src++;
            dCr[dest] = cr;
            dCb[dest] = cb;
            dest++;
          }

          dest += scan >> 2;
          src += scan;
        }
      }
    }
  } // Block layer


  decodeBlock(block) {
    let n = 0,
        quantMatrix; // Decode DC coefficient of intra-coded blocks

    if (this.macroblockIntra) {
      let predictor, dctSize; // DC prediction

      if (block < 4) {
        predictor = this.dcPredictorY;
        dctSize = this.readHuffman(MPEG1.DCT_DC_SIZE_LUMINANCE);
      } else {
        predictor = block === 4 ? this.dcPredictorCr : this.dcPredictorCb;
        dctSize = this.readHuffman(MPEG1.DCT_DC_SIZE_CHROMINANCE);
      } // Read DC coeff


      if (dctSize > 0) {
        let differential = this.bits.read(dctSize);

        if ((differential & 1 << dctSize - 1) !== 0) {
          this.blockData[0] = predictor + differential;
        } else {
          this.blockData[0] = predictor + (-1 << dctSize | differential + 1);
        }
      } else {
        this.blockData[0] = predictor;
      } // Save predictor value


      if (block < 4) {
        this.dcPredictorY = this.blockData[0];
      } else if (block === 4) {
        this.dcPredictorCr = this.blockData[0];
      } else {
        this.dcPredictorCb = this.blockData[0];
      } // Dequantize + premultiply


      this.blockData[0] <<= 3 + 5;
      quantMatrix = this.intraQuantMatrix;
      n = 1;
    } else {
      quantMatrix = this.nonIntraQuantMatrix;
    } // Decode AC coefficients (+DC for non-intra)


    let level = 0;

    while (true) {
      let run = 0,
          coeff = this.readHuffman(MPEG1.DCT_COEFF);

      if (coeff === 0x0001 && n > 0 && this.bits.read(1) === 0) {
        // end_of_block
        break;
      }

      if (coeff === 0xffff) {
        // escape
        run = this.bits.read(6);
        level = this.bits.read(8);

        if (level === 0) {
          level = this.bits.read(8);
        } else if (level === 128) {
          level = this.bits.read(8) - 256;
        } else if (level > 128) {
          level = level - 256;
        }
      } else {
        run = coeff >> 8;
        level = coeff & 0xff;

        if (this.bits.read(1)) {
          level = -level;
        }
      }

      n += run;
      let dezigZagged = MPEG1.ZIG_ZAG[n];
      n++; // Dequantize, oddify, clip

      level <<= 1;

      if (!this.macroblockIntra) {
        level += level < 0 ? -1 : 1;
      }

      level = level * this.quantizerScale * quantMatrix[dezigZagged] >> 4;

      if ((level & 1) === 0) {
        level -= level > 0 ? 1 : -1;
      }

      if (level > 2047) {
        level = 2047;
      } else if (level < -2048) {
        level = -2048;
      } // Save premultiplied coefficient


      this.blockData[dezigZagged] = level * MPEG1.PREMULTIPLIER_MATRIX[dezigZagged];
    } // Move block to its place


    let destArray, destIndex, scan;

    if (block < 4) {
      destArray = this.currentY;
      scan = this.codedWidth - 8;
      destIndex = this.mbRow * this.codedWidth + this.mbCol << 4;

      if ((block & 1) !== 0) {
        destIndex += 8;
      }

      if ((block & 2) !== 0) {
        destIndex += this.codedWidth << 3;
      }
    } else {
      destArray = block === 4 ? this.currentCb : this.currentCr;
      scan = (this.codedWidth >> 1) - 8;
      destIndex = (this.mbRow * this.codedWidth << 2) + (this.mbCol << 3);
    }

    if (this.macroblockIntra) {
      // Overwrite (no prediction)
      if (n === 1) {
        MPEG1.CopyValueToDestination(this.blockData[0] + 128 >> 8, destArray, destIndex, scan);
        this.blockData[0] = 0;
      } else {
        MPEG1.IDCT(this.blockData);
        MPEG1.CopyBlockToDestination(this.blockData, destArray, destIndex, scan);
        Fill(this.blockData, 0);
      }
    } else {
      // Add data to the predicted macroblock
      if (n === 1) {
        MPEG1.AddValueToDestination(this.blockData[0] + 128 >> 8, destArray, destIndex, scan);
        this.blockData[0] = 0;
      } else {
        MPEG1.IDCT(this.blockData);
        MPEG1.AddBlockToDestination(this.blockData, destArray, destIndex, scan);
        Fill(this.blockData, 0);
      }
    }

    n = 0;
  } // #region 常量
  // VLC Tables and Constants


  // #endregion
  // #region 静态方法
  static CopyBlockToDestination(block, dest, index, scan) {
    for (let n = 0; n < 64; n += 8, index += scan + 8) {
      dest[index + 0] = block[n + 0];
      dest[index + 1] = block[n + 1];
      dest[index + 2] = block[n + 2];
      dest[index + 3] = block[n + 3];
      dest[index + 4] = block[n + 4];
      dest[index + 5] = block[n + 5];
      dest[index + 6] = block[n + 6];
      dest[index + 7] = block[n + 7];
    }
  }

  static AddBlockToDestination(block, dest, index, scan) {
    for (let n = 0; n < 64; n += 8, index += scan + 8) {
      dest[index + 0] += block[n + 0];
      dest[index + 1] += block[n + 1];
      dest[index + 2] += block[n + 2];
      dest[index + 3] += block[n + 3];
      dest[index + 4] += block[n + 4];
      dest[index + 5] += block[n + 5];
      dest[index + 6] += block[n + 6];
      dest[index + 7] += block[n + 7];
    }
  }

  static CopyValueToDestination(value, dest, index, scan) {
    for (let n = 0; n < 64; n += 8, index += scan + 8) {
      dest[index + 0] = value;
      dest[index + 1] = value;
      dest[index + 2] = value;
      dest[index + 3] = value;
      dest[index + 4] = value;
      dest[index + 5] = value;
      dest[index + 6] = value;
      dest[index + 7] = value;
    }
  }

  static AddValueToDestination(value, dest, index, scan) {
    for (let n = 0; n < 64; n += 8, index += scan + 8) {
      dest[index + 0] += value;
      dest[index + 1] += value;
      dest[index + 2] += value;
      dest[index + 3] += value;
      dest[index + 4] += value;
      dest[index + 5] += value;
      dest[index + 6] += value;
      dest[index + 7] += value;
    }
  }

  static IDCT(block) {
    // See http://vsr.informatik.tu-chemnitz.de/~jan/MPEG/HTML/IDCT.html
    // for more info.
    let b1, b3, b4, b6, b7, tmp1, tmp2, m0, x0, x1, x2, x3, x4, y3, y4, y5, y6, y7; // Transform columns

    for (let i = 0; i < 8; ++i) {
      b1 = block[4 * 8 + i];
      b3 = block[2 * 8 + i] + block[6 * 8 + i];
      b4 = block[5 * 8 + i] - block[3 * 8 + i];
      tmp1 = block[1 * 8 + i] + block[7 * 8 + i];
      tmp2 = block[3 * 8 + i] + block[5 * 8 + i];
      b6 = block[1 * 8 + i] - block[7 * 8 + i];
      b7 = tmp1 + tmp2;
      m0 = block[0 * 8 + i];
      x4 = (b6 * 473 - b4 * 196 + 128 >> 8) - b7;
      x0 = x4 - ((tmp1 - tmp2) * 362 + 128 >> 8);
      x1 = m0 - b1;
      x2 = ((block[2 * 8 + i] - block[6 * 8 + i]) * 362 + 128 >> 8) - b3;
      x3 = m0 + b1;
      y3 = x1 + x2;
      y4 = x3 + b3;
      y5 = x1 - x2;
      y6 = x3 - b3;
      y7 = -x0 - (b4 * 473 + b6 * 196 + 128 >> 8);
      block[0 * 8 + i] = b7 + y4;
      block[1 * 8 + i] = x4 + y3;
      block[2 * 8 + i] = y5 - x0;
      block[3 * 8 + i] = y6 - y7;
      block[4 * 8 + i] = y6 + y7;
      block[5 * 8 + i] = x0 + y5;
      block[6 * 8 + i] = y3 - x4;
      block[7 * 8 + i] = y4 - b7;
    } // Transform rows


    for (let i = 0; i < 64; i += 8) {
      b1 = block[4 + i];
      b3 = block[2 + i] + block[6 + i];
      b4 = block[5 + i] - block[3 + i];
      tmp1 = block[1 + i] + block[7 + i];
      tmp2 = block[3 + i] + block[5 + i];
      b6 = block[1 + i] - block[7 + i];
      b7 = tmp1 + tmp2;
      m0 = block[0 + i];
      x4 = (b6 * 473 - b4 * 196 + 128 >> 8) - b7;
      x0 = x4 - ((tmp1 - tmp2) * 362 + 128 >> 8);
      x1 = m0 - b1;
      x2 = ((block[2 + i] - block[6 + i]) * 362 + 128 >> 8) - b3;
      x3 = m0 + b1;
      y3 = x1 + x2;
      y4 = x3 + b3;
      y5 = x1 - x2;
      y6 = x3 - b3;
      y7 = -x0 - (b4 * 473 + b6 * 196 + 128 >> 8);
      block[0 + i] = b7 + y4 + 128 >> 8;
      block[1 + i] = x4 + y3 + 128 >> 8;
      block[2 + i] = y5 - x0 + 128 >> 8;
      block[3 + i] = y6 - y7 + 128 >> 8;
      block[4 + i] = y6 + y7 + 128 >> 8;
      block[5 + i] = x0 + y5 + 128 >> 8;
      block[6 + i] = y3 - x4 + 128 >> 8;
      block[7 + i] = y4 - b7 + 128 >> 8;
    }
  } // #endregion


}

_defineProperty(MPEG1, "PICTURE_RATE", [0.0, 23.976, 24.0, 25.0, 29.97, 30.0, 50.0, 59.94, 60.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]);

_defineProperty(MPEG1, "ZIG_ZAG", new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]));

_defineProperty(MPEG1, "DEFAULT_INTRA_QUANT_MATRIX", new Uint8Array([8, 16, 19, 22, 26, 27, 29, 34, 16, 16, 22, 24, 27, 29, 34, 37, 19, 22, 26, 27, 29, 34, 34, 38, 22, 22, 26, 27, 29, 34, 37, 40, 22, 26, 27, 29, 32, 35, 40, 48, 26, 27, 29, 32, 35, 40, 48, 58, 26, 27, 29, 34, 38, 46, 56, 69, 27, 29, 35, 38, 46, 56, 69, 83]));

_defineProperty(MPEG1, "DEFAULT_NON_INTRA_QUANT_MATRIX", new Uint8Array([16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16]));

_defineProperty(MPEG1, "PREMULTIPLIER_MATRIX", new Uint8Array([32, 44, 42, 38, 32, 25, 17, 9, 44, 62, 58, 52, 44, 35, 24, 12, 42, 58, 55, 49, 42, 33, 23, 12, 38, 52, 49, 44, 38, 30, 20, 10, 32, 44, 42, 38, 32, 25, 17, 9, 25, 35, 33, 30, 25, 20, 14, 7, 17, 24, 23, 20, 17, 14, 9, 5, 9, 12, 12, 10, 9, 7, 5, 2]));

_defineProperty(MPEG1, "MACROBLOCK_ADDRESS_INCREMENT", new Int16Array([1 * 3, 2 * 3, 0, //   0
3 * 3, 4 * 3, 0, //   1  0
0, 0, 1, //   2  1.
5 * 3, 6 * 3, 0, //   3  00
7 * 3, 8 * 3, 0, //   4  01
9 * 3, 10 * 3, 0, //   5  000
11 * 3, 12 * 3, 0, //   6  001
0, 0, 3, //   7  010.
0, 0, 2, //   8  011.
13 * 3, 14 * 3, 0, //   9  0000
15 * 3, 16 * 3, 0, //  10  0001
0, 0, 5, //  11  0010.
0, 0, 4, //  12  0011.
17 * 3, 18 * 3, 0, //  13  0000 0
19 * 3, 20 * 3, 0, //  14  0000 1
0, 0, 7, //  15  0001 0.
0, 0, 6, //  16  0001 1.
21 * 3, 22 * 3, 0, //  17  0000 00
23 * 3, 24 * 3, 0, //  18  0000 01
25 * 3, 26 * 3, 0, //  19  0000 10
27 * 3, 28 * 3, 0, //  20  0000 11
-1, 29 * 3, 0, //  21  0000 000
-1, 30 * 3, 0, //  22  0000 001
31 * 3, 32 * 3, 0, //  23  0000 010
33 * 3, 34 * 3, 0, //  24  0000 011
35 * 3, 36 * 3, 0, //  25  0000 100
37 * 3, 38 * 3, 0, //  26  0000 101
0, 0, 9, //  27  0000 110.
0, 0, 8, //  28  0000 111.
39 * 3, 40 * 3, 0, //  29  0000 0001
41 * 3, 42 * 3, 0, //  30  0000 0011
43 * 3, 44 * 3, 0, //  31  0000 0100
45 * 3, 46 * 3, 0, //  32  0000 0101
0, 0, 15, //  33  0000 0110.
0, 0, 14, //  34  0000 0111.
0, 0, 13, //  35  0000 1000.
0, 0, 12, //  36  0000 1001.
0, 0, 11, //  37  0000 1010.
0, 0, 10, //  38  0000 1011.
47 * 3, -1, 0, //  39  0000 0001 0
-1, 48 * 3, 0, //  40  0000 0001 1
49 * 3, 50 * 3, 0, //  41  0000 0011 0
51 * 3, 52 * 3, 0, //  42  0000 0011 1
53 * 3, 54 * 3, 0, //  43  0000 0100 0
55 * 3, 56 * 3, 0, //  44  0000 0100 1
57 * 3, 58 * 3, 0, //  45  0000 0101 0
59 * 3, 60 * 3, 0, //  46  0000 0101 1
61 * 3, -1, 0, //  47  0000 0001 00
-1, 62 * 3, 0, //  48  0000 0001 11
63 * 3, 64 * 3, 0, //  49  0000 0011 00
65 * 3, 66 * 3, 0, //  50  0000 0011 01
67 * 3, 68 * 3, 0, //  51  0000 0011 10
69 * 3, 70 * 3, 0, //  52  0000 0011 11
71 * 3, 72 * 3, 0, //  53  0000 0100 00
73 * 3, 74 * 3, 0, //  54  0000 0100 01
0, 0, 21, //  55  0000 0100 10.
0, 0, 20, //  56  0000 0100 11.
0, 0, 19, //  57  0000 0101 00.
0, 0, 18, //  58  0000 0101 01.
0, 0, 17, //  59  0000 0101 10.
0, 0, 16, //  60  0000 0101 11.
0, 0, 35, //  61  0000 0001 000. -- macroblock_escape
0, 0, 34, //  62  0000 0001 111. -- macroblock_stuffing
0, 0, 33, //  63  0000 0011 000.
0, 0, 32, //  64  0000 0011 001.
0, 0, 31, //  65  0000 0011 010.
0, 0, 30, //  66  0000 0011 011.
0, 0, 29, //  67  0000 0011 100.
0, 0, 28, //  68  0000 0011 101.
0, 0, 27, //  69  0000 0011 110.
0, 0, 26, //  70  0000 0011 111.
0, 0, 25, //  71  0000 0100 000.
0, 0, 24, //  72  0000 0100 001.
0, 0, 23, //  73  0000 0100 010.
0, 0, 22 //  74  0000 0100 011.
]));

_defineProperty(MPEG1, "MACROBLOCK_TYPE_INTRA", new Int8Array([1 * 3, 2 * 3, 0, //   0
-1, 3 * 3, 0, //   1  0
0, 0, 0x01, //   2  1.
0, 0, 0x11 //   3  01.
]));

_defineProperty(MPEG1, "MACROBLOCK_TYPE_PREDICTIVE", new Int8Array([1 * 3, 2 * 3, 0, //  0
3 * 3, 4 * 3, 0, //  1  0
0, 0, 0x0a, //  2  1.
5 * 3, 6 * 3, 0, //  3  00
0, 0, 0x02, //  4  01.
7 * 3, 8 * 3, 0, //  5  000
0, 0, 0x08, //  6  001.
9 * 3, 10 * 3, 0, //  7  0000
11 * 3, 12 * 3, 0, //  8  0001
-1, 13 * 3, 0, //  9  00000
0, 0, 0x12, // 10  00001.
0, 0, 0x1a, // 11  00010.
0, 0, 0x01, // 12  00011.
0, 0, 0x11 // 13  000001.
]));

_defineProperty(MPEG1, "MACROBLOCK_TYPE_B", new Int8Array([1 * 3, 2 * 3, 0, //  0
3 * 3, 5 * 3, 0, //  1  0
4 * 3, 6 * 3, 0, //  2  1
8 * 3, 7 * 3, 0, //  3  00
0, 0, 0x0c, //  4  10.
9 * 3, 10 * 3, 0, //  5  01
0, 0, 0x0e, //  6  11.
13 * 3, 14 * 3, 0, //  7  001
12 * 3, 11 * 3, 0, //  8  000
0, 0, 0x04, //  9  010.
0, 0, 0x06, // 10  011.
18 * 3, 16 * 3, 0, // 11  0001
15 * 3, 17 * 3, 0, // 12  0000
0, 0, 0x08, // 13  0010.
0, 0, 0x0a, // 14  0011.
-1, 19 * 3, 0, // 15  00000
0, 0, 0x01, // 16  00011.
20 * 3, 21 * 3, 0, // 17  00001
0, 0, 0x1e, // 18  00010.
0, 0, 0x11, // 19  000001.
0, 0, 0x16, // 20  000010.
0, 0, 0x1a // 21  000011.
]));

_defineProperty(MPEG1, "MACROBLOCK_TYPE", [null, MPEG1.MACROBLOCK_TYPE_INTRA, MPEG1.MACROBLOCK_TYPE_PREDICTIVE, MPEG1.MACROBLOCK_TYPE_B]);

_defineProperty(MPEG1, "CODE_BLOCK_PATTERN", new Int16Array([2 * 3, 1 * 3, 0, //   0
3 * 3, 6 * 3, 0, //   1  1
4 * 3, 5 * 3, 0, //   2  0
8 * 3, 11 * 3, 0, //   3  10
12 * 3, 13 * 3, 0, //   4  00
9 * 3, 7 * 3, 0, //   5  01
10 * 3, 14 * 3, 0, //   6  11
20 * 3, 19 * 3, 0, //   7  011
18 * 3, 16 * 3, 0, //   8  100
23 * 3, 17 * 3, 0, //   9  010
27 * 3, 25 * 3, 0, //  10  110
21 * 3, 28 * 3, 0, //  11  101
15 * 3, 22 * 3, 0, //  12  000
24 * 3, 26 * 3, 0, //  13  001
0, 0, 60, //  14  111.
35 * 3, 40 * 3, 0, //  15  0000
44 * 3, 48 * 3, 0, //  16  1001
38 * 3, 36 * 3, 0, //  17  0101
42 * 3, 47 * 3, 0, //  18  1000
29 * 3, 31 * 3, 0, //  19  0111
39 * 3, 32 * 3, 0, //  20  0110
0, 0, 32, //  21  1010.
45 * 3, 46 * 3, 0, //  22  0001
33 * 3, 41 * 3, 0, //  23  0100
43 * 3, 34 * 3, 0, //  24  0010
0, 0, 4, //  25  1101.
30 * 3, 37 * 3, 0, //  26  0011
0, 0, 8, //  27  1100.
0, 0, 16, //  28  1011.
0, 0, 44, //  29  0111 0.
50 * 3, 56 * 3, 0, //  30  0011 0
0, 0, 28, //  31  0111 1.
0, 0, 52, //  32  0110 1.
0, 0, 62, //  33  0100 0.
61 * 3, 59 * 3, 0, //  34  0010 1
52 * 3, 60 * 3, 0, //  35  0000 0
0, 0, 1, //  36  0101 1.
55 * 3, 54 * 3, 0, //  37  0011 1
0, 0, 61, //  38  0101 0.
0, 0, 56, //  39  0110 0.
57 * 3, 58 * 3, 0, //  40  0000 1
0, 0, 2, //  41  0100 1.
0, 0, 40, //  42  1000 0.
51 * 3, 62 * 3, 0, //  43  0010 0
0, 0, 48, //  44  1001 0.
64 * 3, 63 * 3, 0, //  45  0001 0
49 * 3, 53 * 3, 0, //  46  0001 1
0, 0, 20, //  47  1000 1.
0, 0, 12, //  48  1001 1.
80 * 3, 83 * 3, 0, //  49  0001 10
0, 0, 63, //  50  0011 00.
77 * 3, 75 * 3, 0, //  51  0010 00
65 * 3, 73 * 3, 0, //  52  0000 00
84 * 3, 66 * 3, 0, //  53  0001 11
0, 0, 24, //  54  0011 11.
0, 0, 36, //  55  0011 10.
0, 0, 3, //  56  0011 01.
69 * 3, 87 * 3, 0, //  57  0000 10
81 * 3, 79 * 3, 0, //  58  0000 11
68 * 3, 71 * 3, 0, //  59  0010 11
70 * 3, 78 * 3, 0, //  60  0000 01
67 * 3, 76 * 3, 0, //  61  0010 10
72 * 3, 74 * 3, 0, //  62  0010 01
86 * 3, 85 * 3, 0, //  63  0001 01
88 * 3, 82 * 3, 0, //  64  0001 00
-1, 94 * 3, 0, //  65  0000 000
95 * 3, 97 * 3, 0, //  66  0001 111
0, 0, 33, //  67  0010 100.
0, 0, 9, //  68  0010 110.
106 * 3, 110 * 3, 0, //  69  0000 100
102 * 3, 116 * 3, 0, //  70  0000 010
0, 0, 5, //  71  0010 111.
0, 0, 10, //  72  0010 010.
93 * 3, 89 * 3, 0, //  73  0000 001
0, 0, 6, //  74  0010 011.
0, 0, 18, //  75  0010 001.
0, 0, 17, //  76  0010 101.
0, 0, 34, //  77  0010 000.
113 * 3, 119 * 3, 0, //  78  0000 011
103 * 3, 104 * 3, 0, //  79  0000 111
90 * 3, 92 * 3, 0, //  80  0001 100
109 * 3, 107 * 3, 0, //  81  0000 110
117 * 3, 118 * 3, 0, //  82  0001 001
101 * 3, 99 * 3, 0, //  83  0001 101
98 * 3, 96 * 3, 0, //  84  0001 110
100 * 3, 91 * 3, 0, //  85  0001 011
114 * 3, 115 * 3, 0, //  86  0001 010
105 * 3, 108 * 3, 0, //  87  0000 101
112 * 3, 111 * 3, 0, //  88  0001 000
121 * 3, 125 * 3, 0, //  89  0000 0011
0, 0, 41, //  90  0001 1000.
0, 0, 14, //  91  0001 0111.
0, 0, 21, //  92  0001 1001.
124 * 3, 122 * 3, 0, //  93  0000 0010
120 * 3, 123 * 3, 0, //  94  0000 0001
0, 0, 11, //  95  0001 1110.
0, 0, 19, //  96  0001 1101.
0, 0, 7, //  97  0001 1111.
0, 0, 35, //  98  0001 1100.
0, 0, 13, //  99  0001 1011.
0, 0, 50, // 100  0001 0110.
0, 0, 49, // 101  0001 1010.
0, 0, 58, // 102  0000 0100.
0, 0, 37, // 103  0000 1110.
0, 0, 25, // 104  0000 1111.
0, 0, 45, // 105  0000 1010.
0, 0, 57, // 106  0000 1000.
0, 0, 26, // 107  0000 1101.
0, 0, 29, // 108  0000 1011.
0, 0, 38, // 109  0000 1100.
0, 0, 53, // 110  0000 1001.
0, 0, 23, // 111  0001 0001.
0, 0, 43, // 112  0001 0000.
0, 0, 46, // 113  0000 0110.
0, 0, 42, // 114  0001 0100.
0, 0, 22, // 115  0001 0101.
0, 0, 54, // 116  0000 0101.
0, 0, 51, // 117  0001 0010.
0, 0, 15, // 118  0001 0011.
0, 0, 30, // 119  0000 0111.
0, 0, 39, // 120  0000 0001 0.
0, 0, 47, // 121  0000 0011 0.
0, 0, 55, // 122  0000 0010 1.
0, 0, 27, // 123  0000 0001 1.
0, 0, 59, // 124  0000 0010 0.
0, 0, 31 // 125  0000 0011 1.
]));

_defineProperty(MPEG1, "MOTION", new Int16Array([1 * 3, 2 * 3, 0, //   0
4 * 3, 3 * 3, 0, //   1  0
0, 0, 0, //   2  1.
6 * 3, 5 * 3, 0, //   3  01
8 * 3, 7 * 3, 0, //   4  00
0, 0, -1, //   5  011.
0, 0, 1, //   6  010.
9 * 3, 10 * 3, 0, //   7  001
12 * 3, 11 * 3, 0, //   8  000
0, 0, 2, //   9  0010.
0, 0, -2, //  10  0011.
14 * 3, 15 * 3, 0, //  11  0001
16 * 3, 13 * 3, 0, //  12  0000
20 * 3, 18 * 3, 0, //  13  0000 1
0, 0, 3, //  14  0001 0.
0, 0, -3, //  15  0001 1.
17 * 3, 19 * 3, 0, //  16  0000 0
-1, 23 * 3, 0, //  17  0000 00
27 * 3, 25 * 3, 0, //  18  0000 11
26 * 3, 21 * 3, 0, //  19  0000 01
24 * 3, 22 * 3, 0, //  20  0000 10
32 * 3, 28 * 3, 0, //  21  0000 011
29 * 3, 31 * 3, 0, //  22  0000 101
-1, 33 * 3, 0, //  23  0000 001
36 * 3, 35 * 3, 0, //  24  0000 100
0, 0, -4, //  25  0000 111.
30 * 3, 34 * 3, 0, //  26  0000 010
0, 0, 4, //  27  0000 110.
0, 0, -7, //  28  0000 0111.
0, 0, 5, //  29  0000 1010.
37 * 3, 41 * 3, 0, //  30  0000 0100
0, 0, -5, //  31  0000 1011.
0, 0, 7, //  32  0000 0110.
38 * 3, 40 * 3, 0, //  33  0000 0011
42 * 3, 39 * 3, 0, //  34  0000 0101
0, 0, -6, //  35  0000 1001.
0, 0, 6, //  36  0000 1000.
51 * 3, 54 * 3, 0, //  37  0000 0100 0
50 * 3, 49 * 3, 0, //  38  0000 0011 0
45 * 3, 46 * 3, 0, //  39  0000 0101 1
52 * 3, 47 * 3, 0, //  40  0000 0011 1
43 * 3, 53 * 3, 0, //  41  0000 0100 1
44 * 3, 48 * 3, 0, //  42  0000 0101 0
0, 0, 10, //  43  0000 0100 10.
0, 0, 9, //  44  0000 0101 00.
0, 0, 8, //  45  0000 0101 10.
0, 0, -8, //  46  0000 0101 11.
57 * 3, 66 * 3, 0, //  47  0000 0011 11
0, 0, -9, //  48  0000 0101 01.
60 * 3, 64 * 3, 0, //  49  0000 0011 01
56 * 3, 61 * 3, 0, //  50  0000 0011 00
55 * 3, 62 * 3, 0, //  51  0000 0100 00
58 * 3, 63 * 3, 0, //  52  0000 0011 10
0, 0, -10, //  53  0000 0100 11.
59 * 3, 65 * 3, 0, //  54  0000 0100 01
0, 0, 12, //  55  0000 0100 000.
0, 0, 16, //  56  0000 0011 000.
0, 0, 13, //  57  0000 0011 110.
0, 0, 14, //  58  0000 0011 100.
0, 0, 11, //  59  0000 0100 010.
0, 0, 15, //  60  0000 0011 010.
0, 0, -16, //  61  0000 0011 001.
0, 0, -12, //  62  0000 0100 001.
0, 0, -14, //  63  0000 0011 101.
0, 0, -15, //  64  0000 0011 011.
0, 0, -11, //  65  0000 0100 011.
0, 0, -13 //  66  0000 0011 111.
]));

_defineProperty(MPEG1, "DCT_DC_SIZE_LUMINANCE", new Int8Array([2 * 3, 1 * 3, 0, //   0
6 * 3, 5 * 3, 0, //   1  1
3 * 3, 4 * 3, 0, //   2  0
0, 0, 1, //   3  00.
0, 0, 2, //   4  01.
9 * 3, 8 * 3, 0, //   5  11
7 * 3, 10 * 3, 0, //   6  10
0, 0, 0, //   7  100.
12 * 3, 11 * 3, 0, //   8  111
0, 0, 4, //   9  110.
0, 0, 3, //  10  101.
13 * 3, 14 * 3, 0, //  11  1111
0, 0, 5, //  12  1110.
0, 0, 6, //  13  1111 0.
16 * 3, 15 * 3, 0, //  14  1111 1
17 * 3, -1, 0, //  15  1111 11
0, 0, 7, //  16  1111 10.
0, 0, 8 //  17  1111 110.
]));

_defineProperty(MPEG1, "DCT_DC_SIZE_CHROMINANCE", new Int8Array([2 * 3, 1 * 3, 0, //   0
4 * 3, 3 * 3, 0, //   1  1
6 * 3, 5 * 3, 0, //   2  0
8 * 3, 7 * 3, 0, //   3  11
0, 0, 2, //   4  10.
0, 0, 1, //   5  01.
0, 0, 0, //   6  00.
10 * 3, 9 * 3, 0, //   7  111
0, 0, 3, //   8  110.
12 * 3, 11 * 3, 0, //   9  1111
0, 0, 4, //  10  1110.
14 * 3, 13 * 3, 0, //  11  1111 1
0, 0, 5, //  12  1111 0.
16 * 3, 15 * 3, 0, //  13  1111 11
0, 0, 6, //  14  1111 10.
17 * 3, -1, 0, //  15  1111 111
0, 0, 7, //  16  1111 110.
0, 0, 8 //  17  1111 1110.
]));

_defineProperty(MPEG1, "DCT_COEFF", new Int32Array([1 * 3, 2 * 3, 0, //   0
4 * 3, 3 * 3, 0, //   1  0
0, 0, 0x0001, //   2  1.
7 * 3, 8 * 3, 0, //   3  01
6 * 3, 5 * 3, 0, //   4  00
13 * 3, 9 * 3, 0, //   5  001
11 * 3, 10 * 3, 0, //   6  000
14 * 3, 12 * 3, 0, //   7  010
0, 0, 0x0101, //   8  011.
20 * 3, 22 * 3, 0, //   9  0011
18 * 3, 21 * 3, 0, //  10  0001
16 * 3, 19 * 3, 0, //  11  0000
0, 0, 0x0201, //  12  0101.
17 * 3, 15 * 3, 0, //  13  0010
0, 0, 0x0002, //  14  0100.
0, 0, 0x0003, //  15  0010 1.
27 * 3, 25 * 3, 0, //  16  0000 0
29 * 3, 31 * 3, 0, //  17  0010 0
24 * 3, 26 * 3, 0, //  18  0001 0
32 * 3, 30 * 3, 0, //  19  0000 1
0, 0, 0x0401, //  20  0011 0.
23 * 3, 28 * 3, 0, //  21  0001 1
0, 0, 0x0301, //  22  0011 1.
0, 0, 0x0102, //  23  0001 10.
0, 0, 0x0701, //  24  0001 00.
0, 0, 0xffff, //  25  0000 01. -- escape
0, 0, 0x0601, //  26  0001 01.
37 * 3, 36 * 3, 0, //  27  0000 00
0, 0, 0x0501, //  28  0001 11.
35 * 3, 34 * 3, 0, //  29  0010 00
39 * 3, 38 * 3, 0, //  30  0000 11
33 * 3, 42 * 3, 0, //  31  0010 01
40 * 3, 41 * 3, 0, //  32  0000 10
52 * 3, 50 * 3, 0, //  33  0010 010
54 * 3, 53 * 3, 0, //  34  0010 001
48 * 3, 49 * 3, 0, //  35  0010 000
43 * 3, 45 * 3, 0, //  36  0000 001
46 * 3, 44 * 3, 0, //  37  0000 000
0, 0, 0x0801, //  38  0000 111.
0, 0, 0x0004, //  39  0000 110.
0, 0, 0x0202, //  40  0000 100.
0, 0, 0x0901, //  41  0000 101.
51 * 3, 47 * 3, 0, //  42  0010 011
55 * 3, 57 * 3, 0, //  43  0000 0010
60 * 3, 56 * 3, 0, //  44  0000 0001
59 * 3, 58 * 3, 0, //  45  0000 0011
61 * 3, 62 * 3, 0, //  46  0000 0000
0, 0, 0x0a01, //  47  0010 0111.
0, 0, 0x0d01, //  48  0010 0000.
0, 0, 0x0006, //  49  0010 0001.
0, 0, 0x0103, //  50  0010 0101.
0, 0, 0x0005, //  51  0010 0110.
0, 0, 0x0302, //  52  0010 0100.
0, 0, 0x0b01, //  53  0010 0011.
0, 0, 0x0c01, //  54  0010 0010.
76 * 3, 75 * 3, 0, //  55  0000 0010 0
67 * 3, 70 * 3, 0, //  56  0000 0001 1
73 * 3, 71 * 3, 0, //  57  0000 0010 1
78 * 3, 74 * 3, 0, //  58  0000 0011 1
72 * 3, 77 * 3, 0, //  59  0000 0011 0
69 * 3, 64 * 3, 0, //  60  0000 0001 0
68 * 3, 63 * 3, 0, //  61  0000 0000 0
66 * 3, 65 * 3, 0, //  62  0000 0000 1
81 * 3, 87 * 3, 0, //  63  0000 0000 01
91 * 3, 80 * 3, 0, //  64  0000 0001 01
82 * 3, 79 * 3, 0, //  65  0000 0000 11
83 * 3, 86 * 3, 0, //  66  0000 0000 10
93 * 3, 92 * 3, 0, //  67  0000 0001 10
84 * 3, 85 * 3, 0, //  68  0000 0000 00
90 * 3, 94 * 3, 0, //  69  0000 0001 00
88 * 3, 89 * 3, 0, //  70  0000 0001 11
0, 0, 0x0203, //  71  0000 0010 11.
0, 0, 0x0104, //  72  0000 0011 00.
0, 0, 0x0007, //  73  0000 0010 10.
0, 0, 0x0402, //  74  0000 0011 11.
0, 0, 0x0502, //  75  0000 0010 01.
0, 0, 0x1001, //  76  0000 0010 00.
0, 0, 0x0f01, //  77  0000 0011 01.
0, 0, 0x0e01, //  78  0000 0011 10.
105 * 3, 107 * 3, 0, //  79  0000 0000 111
111 * 3, 114 * 3, 0, //  80  0000 0001 011
104 * 3, 97 * 3, 0, //  81  0000 0000 010
125 * 3, 119 * 3, 0, //  82  0000 0000 110
96 * 3, 98 * 3, 0, //  83  0000 0000 100
-1, 123 * 3, 0, //  84  0000 0000 000
95 * 3, 101 * 3, 0, //  85  0000 0000 001
106 * 3, 121 * 3, 0, //  86  0000 0000 101
99 * 3, 102 * 3, 0, //  87  0000 0000 011
113 * 3, 103 * 3, 0, //  88  0000 0001 110
112 * 3, 116 * 3, 0, //  89  0000 0001 111
110 * 3, 100 * 3, 0, //  90  0000 0001 000
124 * 3, 115 * 3, 0, //  91  0000 0001 010
117 * 3, 122 * 3, 0, //  92  0000 0001 101
109 * 3, 118 * 3, 0, //  93  0000 0001 100
120 * 3, 108 * 3, 0, //  94  0000 0001 001
127 * 3, 136 * 3, 0, //  95  0000 0000 0010
139 * 3, 140 * 3, 0, //  96  0000 0000 1000
130 * 3, 126 * 3, 0, //  97  0000 0000 0101
145 * 3, 146 * 3, 0, //  98  0000 0000 1001
128 * 3, 129 * 3, 0, //  99  0000 0000 0110
0, 0, 0x0802, // 100  0000 0001 0001.
132 * 3, 134 * 3, 0, // 101  0000 0000 0011
155 * 3, 154 * 3, 0, // 102  0000 0000 0111
0, 0, 0x0008, // 103  0000 0001 1101.
137 * 3, 133 * 3, 0, // 104  0000 0000 0100
143 * 3, 144 * 3, 0, // 105  0000 0000 1110
151 * 3, 138 * 3, 0, // 106  0000 0000 1010
142 * 3, 141 * 3, 0, // 107  0000 0000 1111
0, 0, 0x000a, // 108  0000 0001 0011.
0, 0, 0x0009, // 109  0000 0001 1000.
0, 0, 0x000b, // 110  0000 0001 0000.
0, 0, 0x1501, // 111  0000 0001 0110.
0, 0, 0x0602, // 112  0000 0001 1110.
0, 0, 0x0303, // 113  0000 0001 1100.
0, 0, 0x1401, // 114  0000 0001 0111.
0, 0, 0x0702, // 115  0000 0001 0101.
0, 0, 0x1101, // 116  0000 0001 1111.
0, 0, 0x1201, // 117  0000 0001 1010.
0, 0, 0x1301, // 118  0000 0001 1001.
148 * 3, 152 * 3, 0, // 119  0000 0000 1101
0, 0, 0x0403, // 120  0000 0001 0010.
153 * 3, 150 * 3, 0, // 121  0000 0000 1011
0, 0, 0x0105, // 122  0000 0001 1011.
131 * 3, 135 * 3, 0, // 123  0000 0000 0001
0, 0, 0x0204, // 124  0000 0001 0100.
149 * 3, 147 * 3, 0, // 125  0000 0000 1100
172 * 3, 173 * 3, 0, // 126  0000 0000 0101 1
162 * 3, 158 * 3, 0, // 127  0000 0000 0010 0
170 * 3, 161 * 3, 0, // 128  0000 0000 0110 0
168 * 3, 166 * 3, 0, // 129  0000 0000 0110 1
157 * 3, 179 * 3, 0, // 130  0000 0000 0101 0
169 * 3, 167 * 3, 0, // 131  0000 0000 0001 0
174 * 3, 171 * 3, 0, // 132  0000 0000 0011 0
178 * 3, 177 * 3, 0, // 133  0000 0000 0100 1
156 * 3, 159 * 3, 0, // 134  0000 0000 0011 1
164 * 3, 165 * 3, 0, // 135  0000 0000 0001 1
183 * 3, 182 * 3, 0, // 136  0000 0000 0010 1
175 * 3, 176 * 3, 0, // 137  0000 0000 0100 0
0, 0, 0x0107, // 138  0000 0000 1010 1.
0, 0, 0x0a02, // 139  0000 0000 1000 0.
0, 0, 0x0902, // 140  0000 0000 1000 1.
0, 0, 0x1601, // 141  0000 0000 1111 1.
0, 0, 0x1701, // 142  0000 0000 1111 0.
0, 0, 0x1901, // 143  0000 0000 1110 0.
0, 0, 0x1801, // 144  0000 0000 1110 1.
0, 0, 0x0503, // 145  0000 0000 1001 0.
0, 0, 0x0304, // 146  0000 0000 1001 1.
0, 0, 0x000d, // 147  0000 0000 1100 1.
0, 0, 0x000c, // 148  0000 0000 1101 0.
0, 0, 0x000e, // 149  0000 0000 1100 0.
0, 0, 0x000f, // 150  0000 0000 1011 1.
0, 0, 0x0205, // 151  0000 0000 1010 0.
0, 0, 0x1a01, // 152  0000 0000 1101 1.
0, 0, 0x0106, // 153  0000 0000 1011 0.
180 * 3, 181 * 3, 0, // 154  0000 0000 0111 1
160 * 3, 163 * 3, 0, // 155  0000 0000 0111 0
196 * 3, 199 * 3, 0, // 156  0000 0000 0011 10
0, 0, 0x001b, // 157  0000 0000 0101 00.
203 * 3, 185 * 3, 0, // 158  0000 0000 0010 01
202 * 3, 201 * 3, 0, // 159  0000 0000 0011 11
0, 0, 0x0013, // 160  0000 0000 0111 00.
0, 0, 0x0016, // 161  0000 0000 0110 01.
197 * 3, 207 * 3, 0, // 162  0000 0000 0010 00
0, 0, 0x0012, // 163  0000 0000 0111 01.
191 * 3, 192 * 3, 0, // 164  0000 0000 0001 10
188 * 3, 190 * 3, 0, // 165  0000 0000 0001 11
0, 0, 0x0014, // 166  0000 0000 0110 11.
184 * 3, 194 * 3, 0, // 167  0000 0000 0001 01
0, 0, 0x0015, // 168  0000 0000 0110 10.
186 * 3, 193 * 3, 0, // 169  0000 0000 0001 00
0, 0, 0x0017, // 170  0000 0000 0110 00.
204 * 3, 198 * 3, 0, // 171  0000 0000 0011 01
0, 0, 0x0019, // 172  0000 0000 0101 10.
0, 0, 0x0018, // 173  0000 0000 0101 11.
200 * 3, 205 * 3, 0, // 174  0000 0000 0011 00
0, 0, 0x001f, // 175  0000 0000 0100 00.
0, 0, 0x001e, // 176  0000 0000 0100 01.
0, 0, 0x001c, // 177  0000 0000 0100 11.
0, 0, 0x001d, // 178  0000 0000 0100 10.
0, 0, 0x001a, // 179  0000 0000 0101 01.
0, 0, 0x0011, // 180  0000 0000 0111 10.
0, 0, 0x0010, // 181  0000 0000 0111 11.
189 * 3, 206 * 3, 0, // 182  0000 0000 0010 11
187 * 3, 195 * 3, 0, // 183  0000 0000 0010 10
218 * 3, 211 * 3, 0, // 184  0000 0000 0001 010
0, 0, 0x0025, // 185  0000 0000 0010 011.
215 * 3, 216 * 3, 0, // 186  0000 0000 0001 000
0, 0, 0x0024, // 187  0000 0000 0010 100.
210 * 3, 212 * 3, 0, // 188  0000 0000 0001 110
0, 0, 0x0022, // 189  0000 0000 0010 110.
213 * 3, 209 * 3, 0, // 190  0000 0000 0001 111
221 * 3, 222 * 3, 0, // 191  0000 0000 0001 100
219 * 3, 208 * 3, 0, // 192  0000 0000 0001 101
217 * 3, 214 * 3, 0, // 193  0000 0000 0001 001
223 * 3, 220 * 3, 0, // 194  0000 0000 0001 011
0, 0, 0x0023, // 195  0000 0000 0010 101.
0, 0, 0x010b, // 196  0000 0000 0011 100.
0, 0, 0x0028, // 197  0000 0000 0010 000.
0, 0, 0x010c, // 198  0000 0000 0011 011.
0, 0, 0x010a, // 199  0000 0000 0011 101.
0, 0, 0x0020, // 200  0000 0000 0011 000.
0, 0, 0x0108, // 201  0000 0000 0011 111.
0, 0, 0x0109, // 202  0000 0000 0011 110.
0, 0, 0x0026, // 203  0000 0000 0010 010.
0, 0, 0x010d, // 204  0000 0000 0011 010.
0, 0, 0x010e, // 205  0000 0000 0011 001.
0, 0, 0x0021, // 206  0000 0000 0010 111.
0, 0, 0x0027, // 207  0000 0000 0010 001.
0, 0, 0x1f01, // 208  0000 0000 0001 1011.
0, 0, 0x1b01, // 209  0000 0000 0001 1111.
0, 0, 0x1e01, // 210  0000 0000 0001 1100.
0, 0, 0x1002, // 211  0000 0000 0001 0101.
0, 0, 0x1d01, // 212  0000 0000 0001 1101.
0, 0, 0x1c01, // 213  0000 0000 0001 1110.
0, 0, 0x010f, // 214  0000 0000 0001 0011.
0, 0, 0x0112, // 215  0000 0000 0001 0000.
0, 0, 0x0111, // 216  0000 0000 0001 0001.
0, 0, 0x0110, // 217  0000 0000 0001 0010.
0, 0, 0x0603, // 218  0000 0000 0001 0100.
0, 0, 0x0b02, // 219  0000 0000 0001 1010.
0, 0, 0x0e02, // 220  0000 0000 0001 0111.
0, 0, 0x0d02, // 221  0000 0000 0001 1000.
0, 0, 0x0c02, // 222  0000 0000 0001 1001.
0, 0, 0x0f02 // 223  0000 0000 0001 0110.
]));

_defineProperty(MPEG1, "PICTURE_TYPE", {
  INTRA: 1,
  PREDICTIVE: 2,
  B: 3
});

_defineProperty(MPEG1, "START", {
  SEQUENCE: 0xb3,
  SLICE_FIRST: 0x01,
  SLICE_LAST: 0xaf,
  PICTURE: 0x00,
  EXTENSION: 0xb5,
  USER_DATA: 0xb2
});
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/decoder/mpeg1-wasm.js




class MPEG1WASM extends BaseDecoder {
  /** 分辨率 */
  constructor(options) {
    super(options);

    _defineProperty(this, "options", null);

    _defineProperty(this, "resolution", {
      width: 0,
      height: 0
    });

    this.onDecodeCallback = options.onVideoDecode;
    this.module = options.wasmModule;
    this.bufferSize = options.videoBufferSize || 512 * 1024;
    this.bufferMode = options.streaming ? BitBuffer.MODE.EVICT : BitBuffer.MODE.EXPAND;
    this.decodeFirstFrame = options.decodeFirstFrame !== false;
    this.hasSequenceHeader = false;
    this.options = options;
  }

  initializeWasmDecoder() {
    if (!this.module.instance) {
      console.warn('JSMpeg: WASM module not compiled yet');
      return;
    }

    this.instance = this.module.instance;
    this.functions = this.module.instance.exports;
    this.decoder = this.functions._mpeg1_decoder_create(this.bufferSize, this.bufferMode);
  }

  destroy() {
    if (!this.decoder) {
      return;
    }

    this.functions._mpeg1_decoder_destroy(this.decoder);
  }

  bufferGetIndex() {
    if (!this.decoder) {
      return;
    }

    return this.functions._mpeg1_decoder_get_index(this.decoder);
  }

  bufferSetIndex(index) {
    if (!this.decoder) {
      return;
    }

    this.functions._mpeg1_decoder_set_index(this.decoder, index);
  }

  bufferWrite(buffers) {
    if (!this.decoder) {
      this.initializeWasmDecoder();
    }

    let totalLength = 0;

    for (let i = 0; i < buffers.length; i++) {
      totalLength += buffers[i].length;
    }

    let ptr = this.functions._mpeg1_decoder_get_write_ptr(this.decoder, totalLength);

    for (let i = 0; i < buffers.length; i++) {
      this.instance.heapU8.set(buffers[i], ptr);
      ptr += buffers[i].length;
    }

    this.functions._mpeg1_decoder_did_write(this.decoder, totalLength);

    return totalLength;
  }

  write(pts, buffers) {
    super.write(pts, buffers);

    if (!this.hasSequenceHeader && this.functions._mpeg1_decoder_has_sequence_header(this.decoder)) {
      this.loadSequnceHeader();
    }
  }

  loadSequnceHeader() {
    this.hasSequenceHeader = true;
    this.frameRate = this.functions._mpeg1_decoder_get_frame_rate(this.decoder);
    this.codedSize = this.functions._mpeg1_decoder_get_coded_size(this.decoder);

    if (this.destination) {
      let w = this.functions._mpeg1_decoder_get_width(this.decoder);

      let h = this.functions._mpeg1_decoder_get_height(this.decoder);

      this.destination.resize(w, h);
      this.resolution.width = w;
      this.resolution.height = h;
      this.options.onResolutionDecode?.(w, h);
    }

    if (this.decodeFirstFrame) {
      this.decode();
    }
  }

  decode() {
    let startTime = Now();

    if (!this.decoder) {
      return false;
    }

    let didDecode = this.functions._mpeg1_decoder_decode(this.decoder);

    if (!didDecode) {
      return false;
    } // Invoke decode callbacks


    if (this.destination) {
      let ptrY = this.functions._mpeg1_decoder_get_y_ptr(this.decoder),
          ptrCr = this.functions._mpeg1_decoder_get_cr_ptr(this.decoder),
          ptrCb = this.functions._mpeg1_decoder_get_cb_ptr(this.decoder);

      let dy = this.instance.heapU8.subarray(ptrY, ptrY + this.codedSize);
      let dcr = this.instance.heapU8.subarray(ptrCr, ptrCr + (this.codedSize >> 2));
      let dcb = this.instance.heapU8.subarray(ptrCb, ptrCb + (this.codedSize >> 2));
      this.destination.render(dy, dcr, dcb, false);
    }

    this.advanceDecodedTime(1 / this.frameRate);
    let elapsedTime = Now() - startTime;
    this.onDecodeCallback?.(this, elapsedTime);
    this.eventBus?.emit('video-decode', this, elapsedTime);
    return true;
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/decoder/mp2.js










/**
 * Based on kjmp2 by Martin J. Fiedler
 * http://keyj.emphy.de/kjmp2/
 */

class MP2 extends BaseDecoder {
  constructor(options) {
    super(options);
    this.onDecodeCallback = options.onAudioDecode;
    let bufferSize = options.audioBufferSize || 128 * 1024;
    let bufferMode = options.streaming ? BitBuffer.MODE.EVICT : BitBuffer.MODE.EXPAND;
    this.bits = new BitBuffer(bufferSize, bufferMode);
    this.left = new Float32Array(1152);
    this.right = new Float32Array(1152);
    this.sampleRate = 44100;
    this.D = new Float32Array(1024);
    this.D.set(MP2.SYNTHESIS_WINDOW, 0);
    this.D.set(MP2.SYNTHESIS_WINDOW, 512);
    this.V = [new Float32Array(1024), new Float32Array(1024)];
    this.U = new Int32Array(32);
    this.VPos = 0;
    this.allocation = [new Array(32), new Array(32)];
    this.scaleFactorInfo = [new Uint8Array(32), new Uint8Array(32)];
    this.scaleFactor = [new Array(32), new Array(32)];
    this.sample = [new Array(32), new Array(32)];

    for (let j = 0; j < 2; j++) {
      for (let i = 0; i < 32; i++) {
        this.scaleFactor[j][i] = [0, 0, 0];
        this.sample[j][i] = [0, 0, 0];
      }
    }
  }

  decode() {
    let startTime = Now();
    let pos = this.bits.index >> 3;

    if (pos >= this.bits.byteLength) {
      return false;
    }

    let decoded = this.decodeFrame(this.left, this.right);
    this.bits.index = pos + decoded << 3;

    if (!decoded) {
      return false;
    }

    if (this.destination) {
      this.destination.play(this.sampleRate, this.left, this.right);
    }

    this.advanceDecodedTime(this.left.length / this.sampleRate);
    let elapsedTime = Now() - startTime;
    this.onDecodeCallback?.(this, elapsedTime);
    this.eventBus?.emit('audio-decode', this, elapsedTime);
    return true;
  }

  getCurrentTime() {
    let enqueuedTime = this.destination ? this.destination.enqueuedTime : 0;
    return this.decodedTime - enqueuedTime;
  }

  decodeFrame(left, right) {
    // Check for valid header: syncword OK, MPEG-Audio Layer 2
    let sync = this.bits.read(11),
        version = this.bits.read(2),
        layer = this.bits.read(2),
        hasCRC = !this.bits.read(1);

    if (sync !== MP2.FRAME_SYNC || version !== MP2.VERSION.MPEG_1 || layer !== MP2.LAYER.II) {
      return 0; // Invalid header or unsupported version
    }

    let bitrateIndex = this.bits.read(4) - 1;

    if (bitrateIndex > 13) {
      return 0; // Invalid bit rate or 'free format'
    }

    let sampleRateIndex = this.bits.read(2);
    let sampleRate = MP2.SAMPLE_RATE[sampleRateIndex];

    if (sampleRateIndex === 3) {
      return 0; // Invalid sample rate
    }

    if (version === MP2.VERSION.MPEG_2) {
      sampleRateIndex += 4;
      bitrateIndex += 14;
    }

    let padding = this.bits.read(1),
        privat = this.bits.read(1),
        mode = this.bits.read(2); // Parse the mode_extension, set up the stereo bound

    let bound = 0;

    if (mode === MP2.MODE.JOINT_STEREO) {
      bound = this.bits.read(2) + 1 << 2;
    } else {
      this.bits.skip(2);
      bound = mode === MP2.MODE.MONO ? 0 : 32;
    } // Discard the last 4 bits of the header and the CRC value, if present


    this.bits.skip(4);

    if (hasCRC) {
      this.bits.skip(16);
    } // Compute the frame size


    sampleRate = MP2.SAMPLE_RATE[sampleRateIndex];
    let bitrate = MP2.BIT_RATE[bitrateIndex],
        frameSize = 144000 * bitrate / sampleRate + padding | 0; // Prepare the quantizer table lookups

    let tab3 = 0;
    let sblimit = 0;

    if (version === MP2.VERSION.MPEG_2) {
      // MPEG-2 (LSR)
      tab3 = 2;
      sblimit = 30;
    } else {
      // MPEG-1
      let tab1 = mode === MP2.MODE.MONO ? 0 : 1;
      let tab2 = MP2.QUANT_LUT_STEP_1[tab1][bitrateIndex];
      tab3 = MP2.QUANT_LUT_STEP_2[tab2][sampleRateIndex];
      sblimit = tab3 & 63;
      tab3 >>= 6;
    }

    if (bound > sblimit) {
      bound = sblimit;
    } // Read the allocation information


    for (let sb = 0; sb < bound; sb++) {
      this.allocation[0][sb] = this.readAllocation(sb, tab3);
      this.allocation[1][sb] = this.readAllocation(sb, tab3);
    }

    for (let sb = bound; sb < sblimit; sb++) {
      this.allocation[0][sb] = this.allocation[1][sb] = this.readAllocation(sb, tab3);
    } // Read scale factor selector information


    let channels = mode === MP2.MODE.MONO ? 1 : 2;

    for (let sb = 0; sb < sblimit; sb++) {
      for (ch = 0; ch < channels; ch++) {
        if (this.allocation[ch][sb]) {
          this.scaleFactorInfo[ch][sb] = this.bits.read(2);
        }
      }

      if (mode === MP2.MODE.MONO) {
        this.scaleFactorInfo[1][sb] = this.scaleFactorInfo[0][sb];
      }
    } // Read scale factors


    for (let sb = 0; sb < sblimit; sb++) {
      for (let ch = 0; ch < channels; ch++) {
        if (this.allocation[ch][sb]) {
          let sf = this.scaleFactor[ch][sb];

          switch (this.scaleFactorInfo[ch][sb]) {
            case 0:
              sf[0] = this.bits.read(6);
              sf[1] = this.bits.read(6);
              sf[2] = this.bits.read(6);
              break;

            case 1:
              sf[0] = sf[1] = this.bits.read(6);
              sf[2] = this.bits.read(6);
              break;

            case 2:
              sf[0] = sf[1] = sf[2] = this.bits.read(6);
              break;

            case 3:
              sf[0] = this.bits.read(6);
              sf[1] = sf[2] = this.bits.read(6);
              break;
          }
        }
      }

      if (mode === MP2.MODE.MONO) {
        this.scaleFactor[1][sb][0] = this.scaleFactor[0][sb][0];
        this.scaleFactor[1][sb][1] = this.scaleFactor[0][sb][1];
        this.scaleFactor[1][sb][2] = this.scaleFactor[0][sb][2];
      }
    } // Coefficient input and reconstruction


    let outPos = 0;

    for (let part = 0; part < 3; part++) {
      for (let granule = 0; granule < 4; granule++) {
        // Read the samples
        for (let sb = 0; sb < bound; sb++) {
          this.readSamples(0, sb, part);
          this.readSamples(1, sb, part);
        }

        for (let sb = bound; sb < sblimit; sb++) {
          this.readSamples(0, sb, part);
          this.sample[1][sb][0] = this.sample[0][sb][0];
          this.sample[1][sb][1] = this.sample[0][sb][1];
          this.sample[1][sb][2] = this.sample[0][sb][2];
        }

        for (let sb = sblimit; sb < 32; sb++) {
          this.sample[0][sb][0] = 0;
          this.sample[0][sb][1] = 0;
          this.sample[0][sb][2] = 0;
          this.sample[1][sb][0] = 0;
          this.sample[1][sb][1] = 0;
          this.sample[1][sb][2] = 0;
        } // Synthesis loop


        for (let p = 0; p < 3; p++) {
          // Shifting step
          this.VPos = this.VPos - 64 & 1023;

          for (let ch = 0; ch < 2; ch++) {
            MP2.MatrixTransform(this.sample[ch], p, this.V[ch], this.VPos); // Build U, windowing, calculate output

            Fill(this.U, 0);
            let dIndex = 512 - (this.VPos >> 1);
            let vIndex = this.VPos % 128 >> 1;

            while (vIndex < 1024) {
              for (let i = 0; i < 32; ++i) {
                this.U[i] += this.D[dIndex++] * this.V[ch][vIndex++];
              }

              vIndex += 128 - 32;
              dIndex += 64 - 32;
            }

            vIndex = 128 - 32 + 1024 - vIndex;
            dIndex -= 512 - 32;

            while (vIndex < 1024) {
              for (let i = 0; i < 32; ++i) {
                this.U[i] += this.D[dIndex++] * this.V[ch][vIndex++];
              }

              vIndex += 128 - 32;
              dIndex += 64 - 32;
            } // Output samples


            let outChannel = ch === 0 ? left : right;

            for (let j = 0; j < 32; j++) {
              outChannel[outPos + j] = this.U[j] / 2147418112;
            }
          } // End of synthesis channel loop


          outPos += 32;
        } // End of synthesis sub-block loop

      } // Decoding of the granule finished

    }

    this.sampleRate = sampleRate;
    return frameSize;
  }

  readAllocation(sb, tab3) {
    let tab4 = MP2.QUANT_LUT_STEP_3[tab3][sb];
    let qtab = MP2.QUANT_LUT_STEP4[tab4 & 15][this.bits.read(tab4 >> 4)];
    return qtab ? MP2.QUANT_TAB[qtab - 1] : 0;
  }

  readSamples(ch, sb, part) {
    let q = this.allocation[ch][sb],
        sf = this.scaleFactor[ch][sb][part],
        sample = this.sample[ch][sb],
        val = 0;

    if (!q) {
      // No bits allocated for this subband
      sample[0] = sample[1] = sample[2] = 0;
      return;
    } // Resolve scalefactor


    if (sf === 63) {
      sf = 0;
    } else {
      let shift = sf / 3 | 0;
      sf = MP2.SCALEFACTOR_BASE[sf % 3] + (1 << shift >> 1) >> shift;
    } // Decode samples


    let adj = q.levels;

    if (q.group) {
      // Decode grouped samples
      val = this.bits.read(q.bits);
      sample[0] = val % adj;
      val = val / adj | 0;
      sample[1] = val % adj;
      sample[2] = val / adj | 0;
    } else {
      // Decode direct samples
      sample[0] = this.bits.read(q.bits);
      sample[1] = this.bits.read(q.bits);
      sample[2] = this.bits.read(q.bits);
    } // Postmultiply samples


    let scale = 65536 / (adj + 1) | 0;
    adj = (adj + 1 >> 1) - 1;
    val = (adj - sample[0]) * scale;
    sample[0] = val * (sf >> 12) + (val * (sf & 4095) + 2048 >> 12) >> 12;
    val = (adj - sample[1]) * scale;
    sample[1] = val * (sf >> 12) + (val * (sf & 4095) + 2048 >> 12) >> 12;
    val = (adj - sample[2]) * scale;
    sample[2] = val * (sf >> 12) + (val * (sf & 4095) + 2048 >> 12) >> 12;
  }

  static MatrixTransform(s, ss, d, dp) {
    let t01, t02, t03, t04, t05, t06, t07, t08, t09, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22, t23, t24, t25, t26, t27, t28, t29, t30, t31, t32, t33;
    t01 = s[0][ss] + s[31][ss];
    t02 = (s[0][ss] - s[31][ss]) * 0.500602998235;
    t03 = s[1][ss] + s[30][ss];
    t04 = (s[1][ss] - s[30][ss]) * 0.505470959898;
    t05 = s[2][ss] + s[29][ss];
    t06 = (s[2][ss] - s[29][ss]) * 0.515447309923;
    t07 = s[3][ss] + s[28][ss];
    t08 = (s[3][ss] - s[28][ss]) * 0.53104259109;
    t09 = s[4][ss] + s[27][ss];
    t10 = (s[4][ss] - s[27][ss]) * 0.553103896034;
    t11 = s[5][ss] + s[26][ss];
    t12 = (s[5][ss] - s[26][ss]) * 0.582934968206;
    t13 = s[6][ss] + s[25][ss];
    t14 = (s[6][ss] - s[25][ss]) * 0.622504123036;
    t15 = s[7][ss] + s[24][ss];
    t16 = (s[7][ss] - s[24][ss]) * 0.674808341455;
    t17 = s[8][ss] + s[23][ss];
    t18 = (s[8][ss] - s[23][ss]) * 0.744536271002;
    t19 = s[9][ss] + s[22][ss];
    t20 = (s[9][ss] - s[22][ss]) * 0.839349645416;
    t21 = s[10][ss] + s[21][ss];
    t22 = (s[10][ss] - s[21][ss]) * 0.972568237862;
    t23 = s[11][ss] + s[20][ss];
    t24 = (s[11][ss] - s[20][ss]) * 1.16943993343;
    t25 = s[12][ss] + s[19][ss];
    t26 = (s[12][ss] - s[19][ss]) * 1.48416461631;
    t27 = s[13][ss] + s[18][ss];
    t28 = (s[13][ss] - s[18][ss]) * 2.05778100995;
    t29 = s[14][ss] + s[17][ss];
    t30 = (s[14][ss] - s[17][ss]) * 3.40760841847;
    t31 = s[15][ss] + s[16][ss];
    t32 = (s[15][ss] - s[16][ss]) * 10.1900081235;
    t33 = t01 + t31;
    t31 = (t01 - t31) * 0.502419286188;
    t01 = t03 + t29;
    t29 = (t03 - t29) * 0.52249861494;
    t03 = t05 + t27;
    t27 = (t05 - t27) * 0.566944034816;
    t05 = t07 + t25;
    t25 = (t07 - t25) * 0.64682178336;
    t07 = t09 + t23;
    t23 = (t09 - t23) * 0.788154623451;
    t09 = t11 + t21;
    t21 = (t11 - t21) * 1.06067768599;
    t11 = t13 + t19;
    t19 = (t13 - t19) * 1.72244709824;
    t13 = t15 + t17;
    t17 = (t15 - t17) * 5.10114861869;
    t15 = t33 + t13;
    t13 = (t33 - t13) * 0.509795579104;
    t33 = t01 + t11;
    t01 = (t01 - t11) * 0.601344886935;
    t11 = t03 + t09;
    t09 = (t03 - t09) * 0.899976223136;
    t03 = t05 + t07;
    t07 = (t05 - t07) * 2.56291544774;
    t05 = t15 + t03;
    t15 = (t15 - t03) * 0.541196100146;
    t03 = t33 + t11;
    t11 = (t33 - t11) * 1.30656296488;
    t33 = t05 + t03;
    t05 = (t05 - t03) * 0.707106781187;
    t03 = t15 + t11;
    t15 = (t15 - t11) * 0.707106781187;
    t03 += t15;
    t11 = t13 + t07;
    t13 = (t13 - t07) * 0.541196100146;
    t07 = t01 + t09;
    t09 = (t01 - t09) * 1.30656296488;
    t01 = t11 + t07;
    t07 = (t11 - t07) * 0.707106781187;
    t11 = t13 + t09;
    t13 = (t13 - t09) * 0.707106781187;
    t11 += t13;
    t01 += t11;
    t11 += t07;
    t07 += t13;
    t09 = t31 + t17;
    t31 = (t31 - t17) * 0.509795579104;
    t17 = t29 + t19;
    t29 = (t29 - t19) * 0.601344886935;
    t19 = t27 + t21;
    t21 = (t27 - t21) * 0.899976223136;
    t27 = t25 + t23;
    t23 = (t25 - t23) * 2.56291544774;
    t25 = t09 + t27;
    t09 = (t09 - t27) * 0.541196100146;
    t27 = t17 + t19;
    t19 = (t17 - t19) * 1.30656296488;
    t17 = t25 + t27;
    t27 = (t25 - t27) * 0.707106781187;
    t25 = t09 + t19;
    t19 = (t09 - t19) * 0.707106781187;
    t25 += t19;
    t09 = t31 + t23;
    t31 = (t31 - t23) * 0.541196100146;
    t23 = t29 + t21;
    t21 = (t29 - t21) * 1.30656296488;
    t29 = t09 + t23;
    t23 = (t09 - t23) * 0.707106781187;
    t09 = t31 + t21;
    t31 = (t31 - t21) * 0.707106781187;
    t09 += t31;
    t29 += t09;
    t09 += t23;
    t23 += t31;
    t17 += t29;
    t29 += t25;
    t25 += t09;
    t09 += t27;
    t27 += t23;
    t23 += t19;
    t19 += t31;
    t21 = t02 + t32;
    t02 = (t02 - t32) * 0.502419286188;
    t32 = t04 + t30;
    t04 = (t04 - t30) * 0.52249861494;
    t30 = t06 + t28;
    t28 = (t06 - t28) * 0.566944034816;
    t06 = t08 + t26;
    t08 = (t08 - t26) * 0.64682178336;
    t26 = t10 + t24;
    t10 = (t10 - t24) * 0.788154623451;
    t24 = t12 + t22;
    t22 = (t12 - t22) * 1.06067768599;
    t12 = t14 + t20;
    t20 = (t14 - t20) * 1.72244709824;
    t14 = t16 + t18;
    t16 = (t16 - t18) * 5.10114861869;
    t18 = t21 + t14;
    t14 = (t21 - t14) * 0.509795579104;
    t21 = t32 + t12;
    t32 = (t32 - t12) * 0.601344886935;
    t12 = t30 + t24;
    t24 = (t30 - t24) * 0.899976223136;
    t30 = t06 + t26;
    t26 = (t06 - t26) * 2.56291544774;
    t06 = t18 + t30;
    t18 = (t18 - t30) * 0.541196100146;
    t30 = t21 + t12;
    t12 = (t21 - t12) * 1.30656296488;
    t21 = t06 + t30;
    t30 = (t06 - t30) * 0.707106781187;
    t06 = t18 + t12;
    t12 = (t18 - t12) * 0.707106781187;
    t06 += t12;
    t18 = t14 + t26;
    t26 = (t14 - t26) * 0.541196100146;
    t14 = t32 + t24;
    t24 = (t32 - t24) * 1.30656296488;
    t32 = t18 + t14;
    t14 = (t18 - t14) * 0.707106781187;
    t18 = t26 + t24;
    t24 = (t26 - t24) * 0.707106781187;
    t18 += t24;
    t32 += t18;
    t18 += t14;
    t26 = t14 + t24;
    t14 = t02 + t16;
    t02 = (t02 - t16) * 0.509795579104;
    t16 = t04 + t20;
    t04 = (t04 - t20) * 0.601344886935;
    t20 = t28 + t22;
    t22 = (t28 - t22) * 0.899976223136;
    t28 = t08 + t10;
    t10 = (t08 - t10) * 2.56291544774;
    t08 = t14 + t28;
    t14 = (t14 - t28) * 0.541196100146;
    t28 = t16 + t20;
    t20 = (t16 - t20) * 1.30656296488;
    t16 = t08 + t28;
    t28 = (t08 - t28) * 0.707106781187;
    t08 = t14 + t20;
    t20 = (t14 - t20) * 0.707106781187;
    t08 += t20;
    t14 = t02 + t10;
    t02 = (t02 - t10) * 0.541196100146;
    t10 = t04 + t22;
    t22 = (t04 - t22) * 1.30656296488;
    t04 = t14 + t10;
    t10 = (t14 - t10) * 0.707106781187;
    t14 = t02 + t22;
    t02 = (t02 - t22) * 0.707106781187;
    t14 += t02;
    t04 += t14;
    t14 += t10;
    t10 += t02;
    t16 += t04;
    t04 += t08;
    t08 += t14;
    t14 += t28;
    t28 += t10;
    t10 += t20;
    t20 += t02;
    t21 += t16;
    t16 += t32;
    t32 += t04;
    t04 += t06;
    t06 += t08;
    t08 += t18;
    t18 += t14;
    t14 += t30;
    t30 += t28;
    t28 += t26;
    t26 += t10;
    t10 += t12;
    t12 += t20;
    t20 += t24;
    t24 += t02;
    d[dp + 48] = -t33;
    d[dp + 49] = d[dp + 47] = -t21;
    d[dp + 50] = d[dp + 46] = -t17;
    d[dp + 51] = d[dp + 45] = -t16;
    d[dp + 52] = d[dp + 44] = -t01;
    d[dp + 53] = d[dp + 43] = -t32;
    d[dp + 54] = d[dp + 42] = -t29;
    d[dp + 55] = d[dp + 41] = -t04;
    d[dp + 56] = d[dp + 40] = -t03;
    d[dp + 57] = d[dp + 39] = -t06;
    d[dp + 58] = d[dp + 38] = -t25;
    d[dp + 59] = d[dp + 37] = -t08;
    d[dp + 60] = d[dp + 36] = -t11;
    d[dp + 61] = d[dp + 35] = -t18;
    d[dp + 62] = d[dp + 34] = -t09;
    d[dp + 63] = d[dp + 33] = -t14;
    d[dp + 32] = -t05;
    d[dp + 0] = t05;
    d[dp + 31] = -t30;
    d[dp + 1] = t30;
    d[dp + 30] = -t27;
    d[dp + 2] = t27;
    d[dp + 29] = -t28;
    d[dp + 3] = t28;
    d[dp + 28] = -t07;
    d[dp + 4] = t07;
    d[dp + 27] = -t26;
    d[dp + 5] = t26;
    d[dp + 26] = -t23;
    d[dp + 6] = t23;
    d[dp + 25] = -t10;
    d[dp + 7] = t10;
    d[dp + 24] = -t15;
    d[dp + 8] = t15;
    d[dp + 23] = -t12;
    d[dp + 9] = t12;
    d[dp + 22] = -t19;
    d[dp + 10] = t19;
    d[dp + 21] = -t20;
    d[dp + 11] = t20;
    d[dp + 20] = -t13;
    d[dp + 12] = t13;
    d[dp + 19] = -t24;
    d[dp + 13] = t24;
    d[dp + 18] = -t31;
    d[dp + 14] = t31;
    d[dp + 17] = -t02;
    d[dp + 15] = t02;
    d[dp + 16] = 0.0;
  }

}

_defineProperty(MP2, "FRAME_SYNC", 0x7ff);

_defineProperty(MP2, "VERSION", {
  MPEG_2_5: 0x0,
  MPEG_2: 0x2,
  MPEG_1: 0x3
});

_defineProperty(MP2, "LAYER", {
  III: 0x1,
  II: 0x2,
  I: 0x3
});

_defineProperty(MP2, "MODE", {
  STEREO: 0x0,
  JOINT_STEREO: 0x1,
  DUAL_CHANNEL: 0x2,
  MONO: 0x3
});

_defineProperty(MP2, "SAMPLE_RATE", new Uint16Array([44100, 48000, 32000, 0, // MPEG-1
22050, 24000, 16000, 0 // MPEG-2
]));

_defineProperty(MP2, "BIT_RATE", new Uint16Array([32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, // MPEG-1
8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160 // MPEG-2
]));

_defineProperty(MP2, "SCALEFACTOR_BASE", new Uint32Array([0x02000000, 0x01965fea, 0x01428a30]));

_defineProperty(MP2, "SYNTHESIS_WINDOW", new Float32Array([0.0, -0.5, -0.5, -0.5, -0.5, -0.5, -0.5, -1.0, -1.0, -1.0, -1.0, -1.5, -1.5, -2.0, -2.0, -2.5, -2.5, -3.0, -3.5, -3.5, -4.0, -4.5, -5.0, -5.5, -6.5, -7.0, -8.0, -8.5, -9.5, -10.5, -12.0, -13.0, -14.5, -15.5, -17.5, -19.0, -20.5, -22.5, -24.5, -26.5, -29.0, -31.5, -34.0, -36.5, -39.5, -42.5, -45.5, -48.5, -52.0, -55.5, -58.5, -62.5, -66.0, -69.5, -73.5, -77.0, -80.5, -84.5, -88.0, -91.5, -95.0, -98.0, -101.0, -104.0, 106.5, 109.0, 111.0, 112.5, 113.5, 114.0, 114.0, 113.5, 112.0, 110.5, 107.5, 104.0, 100.0, 94.5, 88.5, 81.5, 73.0, 63.5, 53.0, 41.5, 28.5, 14.5, -1.0, -18.0, -36.0, -55.5, -76.5, -98.5, -122.0, -147.0, -173.5, -200.5, -229.5, -259.5, -290.5, -322.5, -355.5, -389.5, -424.0, -459.5, -495.5, -532.0, -568.5, -605.0, -641.5, -678.0, -714.0, -749.0, -783.5, -817.0, -849.0, -879.5, -908.5, -935.0, -959.5, -981.0, -1000.5, -1016.0, -1028.5, -1037.5, -1042.5, -1043.5, -1040.0, -1031.5, 1018.5, 1000.0, 976.0, 946.5, 911.0, 869.5, 822.0, 767.5, 707.0, 640.0, 565.5, 485.0, 397.0, 302.5, 201.0, 92.5, -22.5, -144.0, -272.5, -407.0, -547.5, -694.0, -846.0, -1003.0, -1165.0, -1331.5, -1502.0, -1675.5, -1852.5, -2031.5, -2212.5, -2394.0, -2576.5, -2758.5, -2939.5, -3118.5, -3294.5, -3467.5, -3635.5, -3798.5, -3955.0, -4104.5, -4245.5, -4377.5, -4499.0, -4609.5, -4708.0, -4792.5, -4863.5, -4919.0, -4958.0, -4979.5, -4983.0, -4967.5, -4931.5, -4875.0, -4796.0, -4694.5, -4569.5, -4420.0, -4246.0, -4046.0, -3820.0, -3567.0, 3287.0, 2979.5, 2644.0, 2280.5, 1888.0, 1467.5, 1018.5, 541.0, 35.0, -499.0, -1061.0, -1650.0, -2266.5, -2909.0, -3577.0, -4270.0, -4987.5, -5727.5, -6490.0, -7274.0, -8077.5, -8899.5, -9739.0, -10594.5, -11464.5, -12347.0, -13241.0, -14144.5, -15056.0, -15973.5, -16895.5, -17820.0, -18744.5, -19668.0, -20588.0, -21503.0, -22410.5, -23308.5, -24195.0, -25068.5, -25926.5, -26767.0, -27589.0, -28389.0, -29166.5, -29919.0, -30644.5, -31342.0, -32009.5, -32645.0, -33247.0, -33814.5, -34346.0, -34839.5, -35295.0, -35710.0, -36084.5, -36417.5, -36707.5, -36954.0, -37156.5, -37315.0, -37428.0, -37496.0, 37519.0, 37496.0, 37428.0, 37315.0, 37156.5, 36954.0, 36707.5, 36417.5, 36084.5, 35710.0, 35295.0, 34839.5, 34346.0, 33814.5, 33247.0, 32645.0, 32009.5, 31342.0, 30644.5, 29919.0, 29166.5, 28389.0, 27589.0, 26767.0, 25926.5, 25068.5, 24195.0, 23308.5, 22410.5, 21503.0, 20588.0, 19668.0, 18744.5, 17820.0, 16895.5, 15973.5, 15056.0, 14144.5, 13241.0, 12347.0, 11464.5, 10594.5, 9739.0, 8899.5, 8077.5, 7274.0, 6490.0, 5727.5, 4987.5, 4270.0, 3577.0, 2909.0, 2266.5, 1650.0, 1061.0, 499.0, -35.0, -541.0, -1018.5, -1467.5, -1888.0, -2280.5, -2644.0, -2979.5, 3287.0, 3567.0, 3820.0, 4046.0, 4246.0, 4420.0, 4569.5, 4694.5, 4796.0, 4875.0, 4931.5, 4967.5, 4983.0, 4979.5, 4958.0, 4919.0, 4863.5, 4792.5, 4708.0, 4609.5, 4499.0, 4377.5, 4245.5, 4104.5, 3955.0, 3798.5, 3635.5, 3467.5, 3294.5, 3118.5, 2939.5, 2758.5, 2576.5, 2394.0, 2212.5, 2031.5, 1852.5, 1675.5, 1502.0, 1331.5, 1165.0, 1003.0, 846.0, 694.0, 547.5, 407.0, 272.5, 144.0, 22.5, -92.5, -201.0, -302.5, -397.0, -485.0, -565.5, -640.0, -707.0, -767.5, -822.0, -869.5, -911.0, -946.5, -976.0, -1000.0, 1018.5, 1031.5, 1040.0, 1043.5, 1042.5, 1037.5, 1028.5, 1016.0, 1000.5, 981.0, 959.5, 935.0, 908.5, 879.5, 849.0, 817.0, 783.5, 749.0, 714.0, 678.0, 641.5, 605.0, 568.5, 532.0, 495.5, 459.5, 424.0, 389.5, 355.5, 322.5, 290.5, 259.5, 229.5, 200.5, 173.5, 147.0, 122.0, 98.5, 76.5, 55.5, 36.0, 18.0, 1.0, -14.5, -28.5, -41.5, -53.0, -63.5, -73.0, -81.5, -88.5, -94.5, -100.0, -104.0, -107.5, -110.5, -112.0, -113.5, -114.0, -114.0, -113.5, -112.5, -111.0, -109.0, 106.5, 104.0, 101.0, 98.0, 95.0, 91.5, 88.0, 84.5, 80.5, 77.0, 73.5, 69.5, 66.0, 62.5, 58.5, 55.5, 52.0, 48.5, 45.5, 42.5, 39.5, 36.5, 34.0, 31.5, 29.0, 26.5, 24.5, 22.5, 20.5, 19.0, 17.5, 15.5, 14.5, 13.0, 12.0, 10.5, 9.5, 8.5, 8.0, 7.0, 6.5, 5.5, 5.0, 4.5, 4.0, 3.5, 3.5, 3.0, 2.5, 2.5, 2.0, 2.0, 1.5, 1.5, 1.0, 1.0, 1.0, 1.0, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]));

_defineProperty(MP2, "QUANT_LUT_STEP_1", [// 32, 48, 56, 64, 80, 96,112,128,160,192,224,256,320,384 <- bitrate
[0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2], // mono
// 16, 24, 28, 32, 40, 48, 56, 64, 80, 96,112,128,160,192 <- bitrate / chan
[0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2] // stereo
]);

_defineProperty(MP2, "QUANT_TAB", {
  A: 27 | 64,
  // Table 3-B.2a: high-rate, sblimit = 27
  B: 30 | 64,
  // Table 3-B.2b: high-rate, sblimit = 30
  C: 8,
  // Table 3-B.2c:  low-rate, sblimit =  8
  D: 12 // Table 3-B.2d:  low-rate, sblimit = 12

});

_defineProperty(MP2, "QUANT_LUT_STEP_2", [//   44.1 kHz,        48 kHz,          32 kHz
[MP2.QUANT_TAB.C, MP2.QUANT_TAB.C, MP2.QUANT_TAB.D], // 32 - 48 kbit/sec/ch
[MP2.QUANT_TAB.A, MP2.QUANT_TAB.A, MP2.QUANT_TAB.A], // 56 - 80 kbit/sec/ch
[MP2.QUANT_TAB.B, MP2.QUANT_TAB.A, MP2.QUANT_TAB.B] // 96+	 kbit/sec/ch
]);

_defineProperty(MP2, "QUANT_LUT_STEP_3", [// Low-rate table (3-B.2c and 3-B.2d)
[0x44, 0x44, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34], // High-rate table (3-B.2a and 3-B.2b)
[0x43, 0x43, 0x43, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20], // MPEG-2 LSR table (B.2 in ISO 13818-3)
[0x45, 0x45, 0x45, 0x45, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24]]);

_defineProperty(MP2, "QUANT_LUT_STEP4", [[0, 1, 2, 17], [0, 1, 2, 3, 4, 5, 6, 17], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17], [0, 1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]]);

_defineProperty(MP2, "QUANT_TAB", [{
  levels: 3,
  group: 1,
  bits: 5
}, //  1
{
  levels: 5,
  group: 1,
  bits: 7
}, //  2
{
  levels: 7,
  group: 0,
  bits: 3
}, //  3
{
  levels: 9,
  group: 1,
  bits: 10
}, //  4
{
  levels: 15,
  group: 0,
  bits: 4
}, //  5
{
  levels: 31,
  group: 0,
  bits: 5
}, //  6
{
  levels: 63,
  group: 0,
  bits: 6
}, //  7
{
  levels: 127,
  group: 0,
  bits: 7
}, //  8
{
  levels: 255,
  group: 0,
  bits: 8
}, //  9
{
  levels: 511,
  group: 0,
  bits: 9
}, // 10
{
  levels: 1023,
  group: 0,
  bits: 10
}, // 11
{
  levels: 2047,
  group: 0,
  bits: 11
}, // 12
{
  levels: 4095,
  group: 0,
  bits: 12
}, // 13
{
  levels: 8191,
  group: 0,
  bits: 13
}, // 14
{
  levels: 16383,
  group: 0,
  bits: 14
}, // 15
{
  levels: 32767,
  group: 0,
  bits: 15
}, // 16
{
  levels: 65535,
  group: 0,
  bits: 16
} // 17
]);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/decoder/mp2-wasm.js








class MP2WASM extends BaseDecoder {
  constructor(options) {
    super(options);
    this.onDecodeCallback = options.onAudioDecode;
    this.module = options.wasmModule;
    this.bufferSize = options.audioBufferSize || 128 * 1024;
    this.bufferMode = options.streaming ? BitBuffer.MODE.EVICT : BitBuffer.MODE.EXPAND;
    this.sampleRate = 0;
  }

  initializeWasmDecoder() {
    if (!this.module.instance) {
      console.warn('JSMpeg: WASM module not compiled yet');
      return;
    }

    this.instance = this.module.instance;
    this.functions = this.module.instance.exports;
    this.decoder = this.functions._mp2_decoder_create(this.bufferSize, this.bufferMode);
  }

  destroy() {
    if (!this.decoder) {
      return;
    }

    this.functions._mp2_decoder_destroy(this.decoder);
  }

  bufferGetIndex() {
    if (!this.decoder) {
      return;
    }

    return this.functions._mp2_decoder_get_index(this.decoder);
  }

  bufferSetIndex(index) {
    if (!this.decoder) {
      return;
    }

    this.functions._mp2_decoder_set_index(this.decoder, index);
  }

  bufferWrite(buffers) {
    if (!this.decoder) {
      this.initializeWasmDecoder();
    }

    let totalLength = 0;

    for (let i = 0; i < buffers.length; i++) {
      totalLength += buffers[i].length;
    }

    let ptr = this.functions._mp2_decoder_get_write_ptr(this.decoder, totalLength);

    for (let i = 0; i < buffers.length; i++) {
      this.instance.heapU8.set(buffers[i], ptr);
      ptr += buffers[i].length;
    }

    this.functions._mp2_decoder_did_write(this.decoder, totalLength);

    return totalLength;
  }

  decode() {
    let startTime = Now();

    if (!this.decoder) {
      return false;
    }

    let decodedBytes = this.functions._mp2_decoder_decode(this.decoder);

    if (decodedBytes === 0) {
      return false;
    }

    if (!this.sampleRate) {
      this.sampleRate = this.functions._mp2_decoder_get_sample_rate(this.decoder);
    }

    if (this.destination) {
      // Create a Float32 View into the modules output channel data
      let leftPtr = this.functions._mp2_decoder_get_left_channel_ptr(this.decoder),
          rightPtr = this.functions._mp2_decoder_get_right_channel_ptr(this.decoder);

      let leftOffset = leftPtr / Float32Array.BYTES_PER_ELEMENT,
          rightOffset = rightPtr / Float32Array.BYTES_PER_ELEMENT;
      let left = this.instance.heapF32.subarray(leftOffset, leftOffset + MP2WASM.SAMPLES_PER_FRAME),
          right = this.instance.heapF32.subarray(rightOffset, rightOffset + MP2WASM.SAMPLES_PER_FRAME);
      this.destination.play(this.sampleRate, left, right);
    }

    this.advanceDecodedTime(MP2WASM.SAMPLES_PER_FRAME / this.sampleRate);
    let elapsedTime = Now() - startTime;
    this.onDecodeCallback?.(this, elapsedTime);
    this.eventBus?.emit('audio-decode', this, elapsedTime);
    return true;
  }

  getCurrentTime() {
    let enqueuedTime = this.destination ? this.destination.enqueuedTime : 0;
    return this.decodedTime - enqueuedTime;
  }

}

_defineProperty(MP2WASM, "SAMPLES_PER_FRAME", 1152);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/decoder/index.js





const Decoder = {
  Base: BaseDecoder,
  MPEG1Video: MPEG1,
  MPEG1VideoWASM: MPEG1WASM,
  MP2Audio: MP2,
  MP2AudioWASM: MP2WASM
};
/* harmony default export */ var decoder = (Decoder);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/demuxer/ts.js






class TS {
  /** @type {BitBuffer} */

  /** @type {{[key:string]: {destination: MPEG1|MPEG1WASM|MP2|MP2WASM,currentLength: number,totalLength: number, pts: number, buffers: BitBuffer}}} */
  constructor(options) {
    _defineProperty(this, "bits", void 0);

    _defineProperty(this, "pesPacketInfo", void 0);

    this.bits = null;
    this.leftoverBytes = null;
    this.guessVideoFrameEnd = true;
    this.pidsToStreamIds = {};
    this.pesPacketInfo = {};
    this.startTime = 0;
    this.currentTime = 0;
  }

  connect(streamId, destination) {
    this.pesPacketInfo[streamId] = {
      destination: destination,
      currentLength: 0,
      totalLength: 0,
      pts: 0,
      buffers: []
    };
  }

  write(buffer) {
    if (this.leftoverBytes) {
      let totalLength = buffer.byteLength + this.leftoverBytes.byteLength;
      this.bits = new BitBuffer(totalLength);
      this.bits.write([this.leftoverBytes, buffer]);
    } else {
      this.bits = new BitBuffer(buffer);
    }

    while (this.bits.has(188 << 3) && this.parsePacket()) {}

    let leftoverCount = this.bits.byteLength - (this.bits.index >> 3);
    this.leftoverBytes = leftoverCount > 0 ? this.bits.bytes.subarray(this.bits.index >> 3) : null;
  }

  parsePacket() {
    // Check if we're in sync with packet boundaries; attempt to resync if not.
    if (this.bits.read(8) !== 0x47) {
      if (!this.resync()) {
        // Couldn't resync; maybe next time...
        return false;
      }
    }

    let end = (this.bits.index >> 3) + 187;
    let transportError = this.bits.read(1),
        payloadStart = this.bits.read(1),
        transportPriority = this.bits.read(1),
        pid = this.bits.read(13),
        transportScrambling = this.bits.read(2),
        adaptationField = this.bits.read(2),
        continuityCounter = this.bits.read(4); // If this is the start of a new payload; signal the end of the previous
    // frame, if we didn't do so already.

    let streamId = this.pidsToStreamIds[pid];

    if (payloadStart && streamId) {
      let pi = this.pesPacketInfo[streamId];

      if (pi && pi.currentLength) {
        this.packetComplete(pi);
      }
    } // Extract current payload


    if (adaptationField & 0x1) {
      if (adaptationField & 0x2) {
        let adaptationFieldLength = this.bits.read(8);
        this.bits.skip(adaptationFieldLength << 3);
      }

      if (payloadStart && this.bits.nextBytesAreStartCode()) {
        this.bits.skip(24);
        streamId = this.bits.read(8);
        this.pidsToStreamIds[pid] = streamId;
        let packetLength = this.bits.read(16);
        this.bits.skip(8);
        let ptsDtsFlag = this.bits.read(2);
        this.bits.skip(6);
        let headerLength = this.bits.read(8);
        let payloadBeginIndex = this.bits.index + (headerLength << 3);
        let pi = this.pesPacketInfo[streamId];

        if (pi) {
          let pts = 0;

          if (ptsDtsFlag & 0x2) {
            // The Presentation Timestamp is encoded as 33(!) bit
            // integer, but has a "marker bit" inserted at weird places
            // in between, making the whole thing 5 bytes in size.
            // You can't make this shit up...
            this.bits.skip(4);
            let p32_30 = this.bits.read(3);
            this.bits.skip(1);
            let p29_15 = this.bits.read(15);
            this.bits.skip(1);
            let p14_0 = this.bits.read(15);
            this.bits.skip(1); // Can't use bit shifts here; we need 33 bits of precision,
            // so we're using JavaScript's double number type. Also
            // divide by the 90khz clock to get the pts in seconds.

            pts = (p32_30 * 1073741824 + p29_15 * 32768 + p14_0) / 90000;
            this.currentTime = pts;

            if (this.startTime === -1) {
              this.startTime = pts;
            }
          }

          let payloadLength = packetLength ? packetLength - headerLength - 3 : 0;
          this.packetStart(pi, pts, payloadLength);
        } // Skip the rest of the header without parsing it


        this.bits.index = payloadBeginIndex;
      }

      if (streamId) {
        // Attempt to detect if the PES packet is complete. For Audio (and
        // other) packets, we received a total packet length with the PES
        // header, so we can check the current length.
        // For Video packets, we have to guess the end by detecting if this
        // TS packet was padded - there's no good reason to pad a TS packet
        // in between, but it might just fit exactly. If this fails, we can
        // only wait for the next PES header for that stream.
        let pi = this.pesPacketInfo[streamId];

        if (pi) {
          let start = this.bits.index >> 3;
          let complete = this.packetAddData(pi, start, end);
          let hasPadding = !payloadStart && adaptationField & 0x2;

          if (complete || this.guessVideoFrameEnd && hasPadding) {
            this.packetComplete(pi);
          }
        }
      }
    }

    this.bits.index = end << 3;
    return true;
  }

  resync() {
    // Check if we have enough data to attempt a resync. We need 5 full packets.
    if (!this.bits.has(188 * 6 << 3)) {
      return false;
    }

    let byteIndex = this.bits.index >> 3; // Look for the first sync token in the first 187 bytes

    for (let i = 0; i < 187; i++) {
      if (this.bits.bytes[byteIndex + i] === 0x47) {
        // Look for 4 more sync tokens, each 188 bytes appart
        let foundSync = true;

        for (let j = 1; j < 5; j++) {
          if (this.bits.bytes[byteIndex + i + 188 * j] !== 0x47) {
            foundSync = false;
            break;
          }
        }

        if (foundSync) {
          this.bits.index = byteIndex + i + 1 << 3;
          return true;
        }
      }
    } // In theory, we shouldn't arrive here. If we do, we had enough data but
    // still didn't find sync - this can only happen if we were fed garbage
    // data. Check your source!
    // console.warn('JSMpeg: Possible garbage data. Skipping.')


    this.bits.skip(187 << 3);
    return false;
  }

  packetStart(pi, pts, payloadLength) {
    pi.totalLength = payloadLength;
    pi.currentLength = 0;
    pi.pts = pts;
  }

  packetAddData(pi, start, end) {
    pi.buffers.push(this.bits.bytes.subarray(start, end));
    pi.currentLength += end - start;
    let complete = pi.totalLength !== 0 && pi.currentLength >= pi.totalLength;
    return complete;
  }

  packetComplete(pi) {
    // 在这里将视频流写入了解码器
    pi.destination.write(pi.pts, pi.buffers);
    pi.totalLength = 0;
    pi.currentLength = 0;
    pi.buffers = [];
  }

}

_defineProperty(TS, "STREAM", {
  PACK_HEADER: 0xba,
  SYSTEM_HEADER: 0xbb,
  PROGRAM_MAP: 0xbc,
  PRIVATE_1: 0xbd,
  PADDING: 0xbe,
  PRIVATE_2: 0xbf,
  AUDIO_1: 0xc0,
  VIDEO_1: 0xe0,
  DIRECTORY: 0xff
});
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/demuxer/index.js

const Demuxer = {
  TS: TS
};
/* harmony default export */ var demuxer = (Demuxer);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/renderer/index.js


const Renderer = {
  Canvas2D: CanvasRenderer,
  WebGL: WebGLRenderer
};
/* harmony default export */ var renderer = (Renderer);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/source/ajax.js



class AjaxSource {
  /** @type {import('../../utils/event-bus').EventBus} */
  constructor(url, options) {
    _defineProperty(this, "eventBus", void 0);

    this.url = url;
    this.destination = null;
    this.request = null;
    this.streaming = false;
    this.completed = false;
    this.established = false;
    this.progress = 0;
    this.eventBus = options.eventBus;
    this.onEstablishedCallback = options.onSourceEstablished;
    this.onCompletedCallback = options.onSourceCompleted;
  }

  connect(destination) {
    this.destination = destination;
  }

  start() {
    this.request = new XMLHttpRequest();

    this.request.onreadystatechange = function () {
      if (this.request.readyState === this.request.DONE && this.request.status === 200) {
        this.onLoad(this.request.response);
      }
    }.bind(this);

    this.request.onprogress = this.onProgress.bind(this);
    this.request.open('GET', this.url);
    this.request.responseType = 'arraybuffer';
    this.request.send();
  }

  resume(secondsHeadroom) {// Nothing to do here
  }

  destroy() {
    this.request.abort();
  }

  onProgress(ev) {
    this.progress = ev.loaded / ev.total;
  }

  onLoad(data) {
    this.established = true;
    this.completed = true;
    this.progress = 1;

    if (this.onEstablishedCallback) {
      this.onEstablishedCallback(this);
      this.eventBus?.emit('source-established', this);
    }

    if (this.onCompletedCallback) {
      this.onCompletedCallback(this);
      this.eventBus?.emit('source-completed', this);
    }

    if (this.destination) {
      this.destination.write(data);
    }
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/source/ajax-progressive.js


class AjaxProgressiveSource {
  /** @type {import('../../utils/event-bus').EventBus} */
  constructor(url, options) {
    _defineProperty(this, "eventBus", void 0);

    this.url = url;
    this.destination = null;
    this.request = null;
    this.streaming = false;
    this.completed = false;
    this.established = false;
    this.progress = 0;
    this.fileSize = 0;
    this.loadedSize = 0;
    this.chunkSize = options.chunkSize || 1024 * 1024;
    this.isLoading = false;
    this.loadStartTime = 0;
    this.throttled = options.throttled !== false;
    this.aborted = false;
    this.eventBus = options.eventBus;
    this.onEstablishedCallback = options.onSourceEstablished;
    this.onCompletedCallback = options.onSourceCompleted;
  }

  connect(destination) {
    this.destination = destination;
  }

  start() {
    this.request = new XMLHttpRequest();

    this.request.onreadystatechange = function () {
      if (this.request.readyState === this.request.DONE) {
        this.fileSize = parseInt(this.request.getResponseHeader('Content-Length'));
        this.loadNextChunk();
      }
    }.bind(this);

    this.request.onprogress = this.onProgress.bind(this);
    this.request.open('HEAD', this.url);
    this.request.send();
  }

  resume(secondsHeadroom) {
    if (this.isLoading || !this.throttled) {
      return;
    } // Guess the worst case loading time with lots of safety margin. This is
    // somewhat arbitrary...


    let worstCaseLoadingTime = this.loadTime * 8 + 2;

    if (worstCaseLoadingTime > secondsHeadroom) {
      this.loadNextChunk();
    }
  }

  destroy() {
    this.request.abort();
    this.aborted = true;
  }

  loadNextChunk() {
    let start = this.loadedSize,
        end = Math.min(this.loadedSize + this.chunkSize - 1, this.fileSize - 1);

    if (start >= this.fileSize || this.aborted) {
      this.completed = true;

      if (this.onCompletedCallback) {
        this.onCompletedCallback(this);
        this.eventBus?.emit('source-completed', this);
      }

      return;
    }

    this.isLoading = true;
    this.loadStartTime = Now();
    this.request = new XMLHttpRequest();

    this.request.onreadystatechange = function () {
      if (this.request.readyState === this.request.DONE && this.request.status >= 200 && this.request.status < 300) {
        this.onChunkLoad(this.request.response);
      } else if (this.request.readyState === this.request.DONE) {
        // Retry?
        if (this.loadFails++ < 3) {
          this.loadNextChunk();
        }
      }
    }.bind(this);

    if (start === 0) {
      this.request.onprogress = this.onProgress.bind(this);
    }

    this.request.open('GET', this.url + '?' + start + '-' + end);
    this.request.setRequestHeader('Range', 'bytes=' + start + '-' + end);
    this.request.responseType = 'arraybuffer';
    this.request.send();
  }

  onProgress(ev) {
    this.progress = ev.loaded / ev.total;
  }

  onChunkLoad(data) {
    let isFirstChunk = !this.established;
    this.established = true;
    this.progress = 1;
    this.loadedSize += data.byteLength;
    this.loadFails = 0;
    this.isLoading = false;

    if (isFirstChunk && this.onEstablishedCallback) {
      this.onEstablishedCallback(this);
      this.eventBus?.emit('source-established', this);
    }

    if (this.destination) {
      this.destination.write(data);
    }

    this.loadTime = Now() - this.loadStartTime;

    if (!this.throttled) {
      this.loadNextChunk();
    }
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/source/fetch.js



class FetchSource {
  /** @type {import('../../utils/event-bus').EventBus} */
  constructor(url, options) {
    _defineProperty(this, "eventBus", void 0);

    this.url = url;
    this.destination = null;
    this.request = null;
    this.streaming = true;
    this.completed = false;
    this.established = false;
    this.progress = 0;
    this.aborted = false;
    this.eventBus = options.eventBus;
    this.onEstablishedCallback = options.onSourceEstablished;
    this.onCompletedCallback = options.onSourceCompleted;
  }

  connect(destination) {
    this.destination = destination;
  }

  start() {
    let params = {
      method: 'GET',
      headers: new Headers(),
      keepAlive: 'default'
    };
    self.fetch(this.url, params).then(function (res) {
      if (res.ok && res.status >= 200 && res.status <= 299) {
        this.progress = 1;
        this.established = true;
        return this.pump(res.body.getReader());
      } else {//error
      }
    }.bind(this)).catch(function (err) {
      throw err;
    });
  }

  pump(reader) {
    return reader.read().then(function (result) {
      if (result.done) {
        this.completed = true;
      } else {
        if (this.aborted) {
          return reader.cancel();
        }

        if (this.destination) {
          this.destination.write(result.value.buffer);
        }

        return this.pump(reader);
      }
    }.bind(this)).catch(function (err) {
      throw err;
    });
  }

  resume(secondsHeadroom) {// Nothing to do here
  }

  abort() {
    this.aborted = true;
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/source/websocket.js




class WSSource {
  /** @type {TS} */

  /** @type {WebSocket} */

  /** @type {string} */

  /** @type {import('../../utils/event-bus').EventBus} */

  /**
   *
   * @param {string} url
   * @param {import('../../types').PlayerOptions} options
   */
  constructor(url, options) {
    _defineProperty(this, "timer", {
      heartbeat: null,
      streamInterrupt: null
    });

    _defineProperty(this, "reconnectInterval", void 0);

    _defineProperty(this, "shouldAttemptReconnect", void 0);

    _defineProperty(this, "progress", 0);

    _defineProperty(this, "reconnectTimeoutId", 0);

    _defineProperty(this, "reconnectCount", 0);

    _defineProperty(this, "callbacks", {
      connect: [],
      data: []
    });

    _defineProperty(this, "streaming", true);

    _defineProperty(this, "completed", false);

    _defineProperty(this, "established", false);

    _defineProperty(this, "isPaused", false);

    _defineProperty(this, "isStreamInterrupt", false);

    _defineProperty(this, "destination", void 0);

    _defineProperty(this, "socket", void 0);

    _defineProperty(this, "url", void 0);

    _defineProperty(this, "eventBus", void 0);

    _defineProperty(this, "onEstablishedCallback", void 0);

    _defineProperty(this, "onCompletedCallback", void 0);

    _defineProperty(this, "onClosedCallback", void 0);

    _defineProperty(this, "onStreamInterruptCallback", void 0);

    _defineProperty(this, "onConnectedCallback", void 0);

    _defineProperty(this, "onStreamTimeoutFirstReceiveCallback", void 0);

    this.url = url;
    this.options = options;
    this.reconnectInterval = options.reconnectInterval !== undefined ? options.reconnectInterval : 5;
    this.shouldAttemptReconnect = !!this.reconnectInterval;
    this.eventBus = options.eventBus;
    this.onEstablishedCallback = options.onSourceEstablished;
    this.onCompletedCallback = options.onSourceCompleted; // Never used

    this.onClosedCallback = options.onSourceClosed;
    this.onConnectedCallback = options.onSourceConnected;
    this.onStreamInterruptCallback = options.onSourceStreamInterrupt;
    this.onStreamContinueCallback = options.onSourceStreamContinue;
  }

  connect(destination) {
    this.destination = destination;
  }

  changeUrl(url = '') {
    clearTimeout(this.timer.streamInterrupt);

    if (typeof url === 'string' && url !== '') {
      if (this.url !== url) {
        this.destroy();
        this.url = url;
        this.start();
      }
    } else {
      this.destroy();
      this.url = '';
    }
  }

  reload() {
    this.destroy();
    this.start();
  }

  destroy() {
    clearTimeout(this.reconnectTimeoutId);
    this.reconnectTimeoutId = 0;
    this.shouldAttemptReconnect = false;
    this.socket?.close();

    if (this.socket) {
      this.socket.onmessage = null;
      this.socket.onopen = null;
      this.socket.onerror = null;
      this.socket.onclose = null;
      this.socket.onmessage = null;
      this.socket = null;
    }
  }

  start() {
    this.reconnectTimeoutId = 0;
    this.reconnectCount = 0;
    this.shouldAttemptReconnect = !!this.reconnectInterval;
    this.progress = 0;
    this.established = false;
    this.isPaused = false;
    this.wsConnect();
  }

  wsConnect() {
    if (!this.url) return; // 连java的websocket时,第二个参数要么传值,要么不传值,不能传null,否则会一直出现连接失败的问题

    try {
      this.socket = new WebSocket(this.url, this.options?.protocols);
      this.socket.binaryType = 'arraybuffer';
      this.socket.onmessage = this.onMessage.bind(this);
      this.socket.onopen = this.onOpen.bind(this);
      this.socket.onerror = this.onError.bind(this);
      this.socket.onclose = this.onClose.bind(this);
    } catch (error) {
      console.error('websocket connect error: ', error);
    }
  }

  pause() {
    if (!this.isPaused) {
      clearTimeout(this.timer.streamInterrupt);
      this.isPaused = true;

      if (this.socket?.readyState === WebSocket.OPEN) {
        this.socket.onmessage = null;
      }
    } //  if (this.reconnectTimeoutId) {
    //   clearTimeout(this.reconnectTimeoutId)
    //   this.reconnectTimeoutId = null
    // }

  }

  continue() {
    // Nothing to do here
    if (this.isPaused) {
      this.isPaused = false;

      if (this.socket == null) {
        this.start();
      } else if (this.socket?.readyState === WebSocket.OPEN) {
        this.socket.onmessage = this.onMessage.bind(this);
        this.startStreamTimeoutTimer();
      }
    }
  }

  onOpen() {
    this.progress = 1;
    this.reconnectTimeoutId = 0;
    this.reconnectCount = 0;
    this.isOpened = true;

    if (this.onConnectedCallback) {
      this.onConnectedCallback(this);
      this.eventBus?.emit('source-connected', this);
    }

    this.startStreamTimeoutTimer();
  }

  onError(err) {// console.error(err)
  }

  onClose() {
    this.established = false;

    if (this.progress >= 1) {
      // progress>=1,表示已经建立连接后的断开
      this.progress = 0;

      if (this.onClosedCallback) {
        this.onClosedCallback(this);
        this.eventBus?.emit('source-closed', this);
      }

      clearTimeout(this.reconnectTimeoutId);
      this.reconnectTimeoutId = setTimeout(this.start.bind(this), 5000);
      return;
    }

    if (this.shouldAttemptReconnect && this.reconnectCount < 10) {
      // 最多重连10次
      clearTimeout(this.reconnectTimeoutId);
      this.reconnectTimeoutId = setTimeout(this.wsConnect.bind(this), this.reconnectInterval * 1000);
      this.reconnectCount += 1;
      console.log('websocket 重连次数: ', this.reconnectCount);
    }
  }
  /**
   *
   * @param {MessageEvent} ev
   */


  onMessage(ev) {
    this.startStreamTimeoutTimer();

    try {
      if (!this.established) {
        this.established = true;
        this.isStreamInterrupt = false;
        this.onEstablishedCallback?.(this);
        this.eventBus?.emit('source-established', this);
        console.log(ev);
      } else if (this.isStreamInterrupt) {
        this.isStreamInterrupt = false;
        this.onStreamContinueCallback?.(this);
        this.eventBus?.emit('source-continue', this);
      }

      if (this.destination) {
        this.destination.write(ev.data);
      }
    } catch (error) {
      if (error.message?.indexOf('memory access out of bounds') > -1) {
        this.reload();
      } else {
        console.error(error);
      }
    }

    if (this.recorder) {
      try {
        this.recorder.write?.(ev.data);
      } catch (error) {
        this.recorder = null;
      }
    }
  }

  startStreamTimeoutTimer() {
    if (this.timer.streamInterrupt) {
      clearTimeout(this.timer.streamInterrupt);
    }

    this.timer.streamInterrupt = setTimeout(() => {
      console.warn('[JSMpeg]: 等待视频流超时');
      this.timer.streamInterrupt = null;
      this.isStreamInterrupt = true;

      if (this.onStreamInterruptCallback) {
        this.onStreamInterruptCallback();
        this.eventBus?.emit('source-interrupt', this);
      }
    }, 5000);
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/source/index.js




const Source = {
  Ajax: AjaxSource,
  AjaxProgressive: AjaxProgressiveSource,
  Fetch: FetchSource,
  WebSocket: WSSource
};
/* harmony default export */ var source = (Source);
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/wasm-module.js





class WASM {
  constructor() {
    this.stackSize = 5 * 1024 * 1024; // emscripten default

    this.pageSize = 64 * 1024; // wasm page size

    this.onInitCallback = null;
    this.ready = false;
  }

  write(buffer) {
    this.loadFromBuffer(buffer, this.onInitCallback);
  }

  loadFromFile(url, callback) {
    this.onInitCallback = callback;
    let ajax = new source.Ajax(url, {});
    ajax.connect(this);
    ajax.start();
  }

  loadFromBuffer(buffer, callback) {
    this.moduleInfo = this.readDylinkSection(buffer);

    if (!this.moduleInfo) {
      this.callback && this.callback(null);
      return;
    }

    this.memory = new WebAssembly.Memory({
      initial: 256
    });
    let env = {
      memory: this.memory,
      memoryBase: 0,
      __memory_base: 0,
      table: new WebAssembly.Table({
        initial: this.moduleInfo.tableSize,
        element: 'anyfunc'
      }),
      tableBase: 0,
      __table_base: 0,
      abort: this.c_abort.bind(this),
      ___assert_fail: this.c_assertFail.bind(this),
      _sbrk: this.c_sbrk.bind(this)
    };
    this.brk = this.align(this.moduleInfo.memorySize + this.stackSize);
    WebAssembly.instantiate(buffer, {
      env: env
    }).then(function (results) {
      this.instance = results.instance;

      if (this.instance.exports.__post_instantiate) {
        this.instance.exports.__post_instantiate();
      }

      this.createHeapViews();
      this.ready = true;
      callback && callback(this);
    }.bind(this));
  }

  createHeapViews() {
    this.instance.heapU8 = new Uint8Array(this.memory.buffer);
    this.instance.heapU32 = new Uint32Array(this.memory.buffer);
    this.instance.heapF32 = new Float32Array(this.memory.buffer);
  }

  align(addr) {
    let a = Math.pow(2, this.moduleInfo.memoryAlignment);
    return Math.ceil(addr / a) * a;
  }

  c_sbrk(size) {
    let previousBrk = this.brk;
    this.brk += size;

    if (this.brk > this.memory.buffer.byteLength) {
      let bytesNeeded = this.brk - this.memory.buffer.byteLength;
      let pagesNeeded = Math.ceil(bytesNeeded / this.pageSize);
      this.memory.grow(pagesNeeded);
      this.createHeapViews();
    }

    return previousBrk;
  }

  c_abort(size) {
    console.warn('JSMPeg: WASM abort', arguments);
  }

  c_assertFail(size) {
    console.warn('JSMPeg: WASM ___assert_fail', arguments);
  }

  readDylinkSection(buffer) {
    // Read the WASM header and dylink section of the .wasm binary data
    // to get the needed table size and static data size.
    // https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md
    // https://github.com/kripken/emscripten/blob/20602efb955a7c6c20865a495932427e205651d2/src/support.js
    let bytes = new Uint8Array(buffer);
    let next = 0;

    function readVarUint() {
      let ret = 0;
      let mul = 1;

      while (1) {
        let byte = bytes[next++];
        ret += (byte & 0x7f) * mul;
        mul *= 0x80;

        if (!(byte & 0x80)) {
          return ret;
        }
      }
    }

    function matchNextBytes(expected) {
      for (let i = 0; i < expected.length; i++) {
        let b = typeof expected[i] === 'string' ? expected[i].charCodeAt(0) : expected[i];

        if (bytes[next++] !== b) {
          return false;
        }
      }

      return true;
    } // Make sure we have a wasm header


    if (!matchNextBytes([0, 'a', 's', 'm'])) {
      console.warn('JSMpeg: WASM header not found');
      return null;
    } // Make sure we have a dylink section


    next = 9;
    let sectionSize = readVarUint();

    if (!matchNextBytes([6, 'd', 'y', 'l', 'i', 'n', 'k'])) {
      console.warn('JSMpeg: No dylink section found in WASM');
      return null;
    }

    return {
      memorySize: readVarUint(),
      memoryAlignment: readVarUint(),
      tableSize: readVarUint(),
      tableAlignment: readVarUint()
    };
  }

  static IsSupported() {
    return !!window.WebAssembly;
  }

  static GetModule() {
    WASM.CACHED_MODULE = WASM.CACHED_MODULE || new WASM();
    return WASM.CACHED_MODULE;
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/utils/event-bus.js


/*
 * @Author: lcm
 * @Date: 2022-12-27 10:48:00
 * @LastEditors: lcm
 * @LastEditTime: 2022-12-27 17:24:02
 * @Description:
 */
class EventBus extends EventTarget {
  constructor() {
    super();

    _defineProperty(this, "eventMap", {});
  }

  _removeEvent(type, callback) {
    if (callback) {
      let values = this.eventMap[type];
      let index = values.findIndex(item => {
        return item.callback === callback;
      });

      if (index > -1) {
        values.splice(index, 1);
      }
    } else {
      this.eventMap[type] = null;
    }
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {import("../types/events").JSMpegEventMap[T]} callback
   * @param {AddEventListenerOptions|boolean} options
   */


  on(type, callback, options) {
    if (!this.eventMap[type]) {
      this.eventMap[type] = [{
        callback
      }];
    } else {
      this.eventMap[type].push({
        callback
      });
    }

    const wrapCallback = (
    /** @type {CustomEvent} */
    ev) => {
      callback?.(...ev.detail);

      if (options?.once) {
        this._removeEvent(type, callback);
      }
    };

    this.addEventListener(type, wrapCallback, options);
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {import("../types/events").JSMpegEventMap[T]} callback
   * @param {AddEventListenerOptions|boolean} options
   */


  once(type, callback, options = {}) {
    options = options ?? {};
    options.once = true;
    this.on(type, callback, options);
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {import("../types/events").JSMpegEventMap[T]} callback
   */


  off(type, callback = null) {
    this.removeEventListener(type, callback);

    this._removeEvent(type, callback);
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {any} data
   */


  emit(type, ...data) {
    let event = new CustomEvent(type, {
      detail: data ?? [],
      bubbles: true,
      cancelable: true
    });
    this.dispatchEvent(event);
  }

  offAll() {
    let keys = Object.keys(this.eventMap);

    for (let key of keys) {
      this.off(key);
    }

    this.eventMap = {};
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/recorder.js




/*
 * @Author: cloudsail
 * @Date: 2022-12-14 16:23:11
 * @LastEditors: lcm
 * @LastEditTime: 2022-12-28 14:59:51
 * @Description:
 */

class Recorder {
  /**
   * @type {EventBus}
   */

  /**
   * 录制持续时间(毫秒)
   */

  /**
   * 计时器
   */

  /**
   * 录制模式
   * @type {'auto'|'canvas'|'ws'}
   */

  /**
   * 是否运行中
   */

  /**
   * 媒体录制器
   * @type {MediaRecorder}
   */

  /**
   * 视频流(仅mode='canvas'时有效)
   * @type {MediaStream}
   */

  /**
   * 视频数据块
   * @type {ArrayBuffer[]}
   */

  /**
   * 播放器的source
   * @type {import('./source/websocket').default}
   */

  /**
   * 播放器的canvas
   * @type {HTMLCanvasElement}
   */

  /**
   *
   * @param {object} param
   * @param {HTMLCanvasElement} param.canvas
   * @param {string} param.mode
   * @param {any} param.source
   * @param {any} param.eventBus
   */
  constructor({
    canvas,
    mode = 'auto',
    source,
    eventBus
  } = {}) {
    _defineProperty(this, "eventBus", void 0);

    _defineProperty(this, "duration", 0);

    _defineProperty(this, "timer", null);

    _defineProperty(this, "mode", 'auto');

    _defineProperty(this, "running", false);

    _defineProperty(this, "paused", false);

    _defineProperty(this, "mediaRecorder", null);

    _defineProperty(this, "mediaStream", null);

    _defineProperty(this, "chunks", null);

    _defineProperty(this, "source", null);

    _defineProperty(this, "canvas", null);

    if (!/^auto|canvas|ws$/.test(mode)) {
      throw new Error('[Recorder] 不支持此录制模式: ' + mode);
    } // super()


    this.canvas = canvas;
    this.source = source;
    this.eventBus = eventBus;

    if (mode === 'auto') {
      this.mode = 'ws';
    } else {
      this.mode = mode;
    }
  }
  /**
   * 开始录制
   */


  start() {
    if (this.running) {
      return;
    }

    this.duration = 0;
    this.chunks = []; // 开始录制

    if (this.mode === 'canvas') {
      /**
       * 注意,此方法兼容性较差,captureStream、MediaRecorder好像都是新规范,有些浏览器不支持
       * 具体见:https://developer.mozilla.org/zh-CN/docs/Web/API/MediaRecorder
       */
      this.mediaStream = this.canvas?.captureStream();
      this.mediaRecorder = new MediaRecorder(this.mediaStream, {
        mimeType: this.mimeType
      });

      this.mediaRecorder.ondataavailable = e => {
        if (e.data && e.data.size > 0) {
          this.eventBus?.emit('recording-data', e.data);
          this.chunks.push(e.data);
        }
      }; // 这里尽量传一个切片时间,不然ondataavailable只会在stop时触发,而且会产生一个超大的blob


      this.mediaRecorder.start(1000);
      this.mimeType = 'video/webm;codecs=vp9';
    } else if (this.mode === 'ws') {
      // 服务端转发过来的流就是ffmpeg已转码的ts视频流数据,所以在websocket收到数据的时候,存放到数组中即可实现录制
      this.chunks.write = function (data) {
        this.eventBus?.emit('recording-data', data);
        this.push(data);
      };

      this.source.recorder = this.chunks;
      this.mimeType = 'video/MP2T';
    } else {
      return null;
    } // 计时器


    this.paused = false;
    this.startTime = Now();
    this.timer = setInterval(() => {
      if (this.paused) return;
      this.eventBus?.emit('recording-tick', this.duration); // 对比Date.now()差值的方式比单纯++更加精准

      this.duration = Now() - this.startTime;
    }, 500);
    this.running = true;
    this.eventBus?.emit('recording-start');
  }
  /**
   * 暂停录制
   * PS:暂停后running还是为true
   */


  pause() {
    this.pauseTime = Now();
    this.paused = true;

    if (this.mediaRecorder) {
      this.mediaRecorder.pause(this.pauseTime);
    }

    if (this.source) {
      this.source.recorder = null;
    } // this.running = false


    this.eventBus?.emit('recording-pause');
  }
  /**
   * 继续录制
   */


  continue() {
    let now = Now(),
        offsetTime = now - this.pauseTime;
    this.pauseTime = null;
    this.startTime += offsetTime;
    this.paused = false;

    if (this.mediaRecorder) {
      this.mediaRecorder.resume();
    }

    if (this.source) {
      this.source.recorder = this.chunks;
    } // this.running = true


    this.eventBus?.emit('recording-continue');
  }
  /**
   * 停止录制
   * @param {string} saveName 保存文件名称,不传则不保存,需要手动保存
   */


  stop(saveName = null) {
    this.pause();

    if (this.mediaRecorder) {
      this.mediaRecorder.stop();
    }

    saveName && this.save(saveName);
    this.running = false;
    this.eventBus?.emit('recording-end', this.chunks);
  }
  /**
   * 保存
   * @returns
   */


  save(name = 'jsmpeg') {
    if (!this.chunks) return;
    let outputName = `${name}_录制_${new Date().toLocaleTimeString()}`;
    let extension;

    if (this.mode === 'canvas' && this.mediaRecorder && this.mediaStream) {
      extension = 'webm';
    } else if (this.mode === 'ws' && this.chunks instanceof Array) {
      extension = 'ts';
    }

    download(this.chunks, `${outputName}.${extension}`, this.mimeType);
  }
  /**
   * 销毁录制器
   */


  destroy() {
    this.stop();
    this.mediaRecorder = null;
    this.mediaStream = null;
    this.chunks = null;
    this.duration = 0;
  }

}
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/player.js














 // The build process may append `JSMpeg.WASM_BINARY_INLINED = base64data;`
// to the minified source.
// If this property is present, jsmpeg will use the inlined binary data
// instead of trying to load a jsmpeg.wasm file via Ajax.

/**
 * @class {import('../jsmpeg').JSMpegPlayer}
 * @author cloudsail
 * @description 基于jsmpeg二次开发
 *
 */

class Player {
  /**
   * @type {import('../types/player').PlayerOptions}
   */

  /** @type {WSSource|AjaxSource|AjaxProgressiveSource} */

  /** @type {HTMLCanvasElement} */

  /** @type {HTMLElement} */

  /**
   * 录制器
   * @type {import('./recorder').default}
   */

  /** 播放器状态 */

  /** 是否循环播放 */

  /** 是否正在播放 */
  get isRecording() {
    return !!this.recorder?.running;
  }
  /** 录制持续时间 */


  get recordingDuration() {
    return this.recorder?.duration;
  }
  /** @type {number} */


  /**
   *
   * @param {string} url
   * @param {import('../types').PlayerOptions} options
   */
  constructor(url, options = {}) {
    _defineProperty(this, "options", void 0);

    _defineProperty(this, "source", null);

    _defineProperty(this, "canvas", null);

    _defineProperty(this, "contianer", null);

    _defineProperty(this, "recorder", null);

    _defineProperty(this, "status", {
      canvasAngle: 0,

      /** 表示播放器处于后台(不可见状态) */
      isBackground: false
    });

    _defineProperty(this, "loop", false);

    _defineProperty(this, "isPlaying", false);

    _defineProperty(this, "currentTime", void 0);

    _defineProperty(this, "volume", void 0);

    Object.defineProperty(this, 'currentTime', {
      get: this.getCurrentTime,
      set: this.setCurrentTime
    });
    Object.defineProperty(this, 'volume', {
      get: this.getVolume,
      set: this.setVolume
    });
    this.init(url, options);
  }
  /**
   *
   * @param {string} url
   * @param {import('../types/player').PlayerOptions} options
   */


  init(url, options) {
    this.options = options;
    this.eventBus = this.options.eventBus = new EventBus();
    this.initCanvas();
    this.initSource(url);
    this.maxAudioLag = options.maxAudioLag || 0.25;
    this.loop = options.loop !== false;
    this.autoplay = !!options.autoplay || options.streaming;
    this.demuxer = new demuxer.TS(options);
    this.source.connect(this.demuxer);

    if (!options.disableWebAssembly && WASM.IsSupported()) {
      this.wasmModule = WASM.GetModule();
      options.wasmModule = this.wasmModule;
    }

    this.initVideo();
    this.initAudio();
    this.paused = true;
    this.unpauseOnShow = false;
    document.addEventListener('visibilitychange', this.showHide.bind(this)); // If we have WebAssembly support, wait until the module is compiled before
    // loading the source. Otherwise the decoders won't know what to do with
    // the source data.

    if (this.wasmModule) {
      if (this.wasmModule.ready) {
        this.startLoading();
      } else if (Player.WASM_BINARY_INLINED) {
        let wasm = Base64ToArrayBuffer(Player.WASM_BINARY_INLINED);
        this.wasmModule.loadFromBuffer(wasm, this.startLoading.bind(this));
      } else {
        this.wasmModule.loadFromFile('jsmpeg.wasm', this.startLoading.bind(this));
      }
    } else {
      this.startLoading();
    }

    this.renderer.clear();
  }

  initCanvas() {
    const options = this.options;

    if (!(options.canvas instanceof HTMLCanvasElement)) {
      options.canvas = document.createElement('canvas');
    }

    this.canvas = options.canvas;

    if (typeof options.contianer === 'string') {
      options.contianer = document.querySelector(options.contianer);
    } else if (!options.contianer && this.canvas.parentElement) {
      options.contianer = this.canvas.parentElement;
    }

    if (!(options.contianer instanceof HTMLElement)) {
      throw new Error('[Player] 找不到容器元素');
    }

    this.contianer = options.contianer;

    if (!this.contianer.contains(this.canvas)) {
      this.contianer.appendChild(this.canvas);
    }
  }

  initSource(url = null) {
    const options = this.options;
    this.url = url;

    if (options.source) {
      this.source = new options.source(url, options);
      options.streaming = !!this.source.streaming;
    } else if (url.match(/^wss?:\/\//)) {
      this.source = new source.WebSocket(url, { ...options,
        onSourceEstablished: this.handleSourceEstablished.bind(this),
        onSourceClosedCallback: this.handleSourceClosed.bind(this),
        onSourceStreamInterrupt: this.handleSourceStreamInterrupt.bind(this),
        onSourceConnected: this.handleSourceConnected.bind(this)
      });
      options.streaming = true;
    } else if (options.progressive !== false) {
      this.source = new source.AjaxProgressive(url, options);
      options.streaming = false;
    } else {
      this.source = new source.Ajax(url, options);
      options.streaming = false;
    }

    if (this.source.destination == null && this.demuxer) {
      this.source.connect(this.demuxer);
    }
  }

  initVideo() {
    const options = this.options;

    if (options.video !== false) {
      this.video = options.wasmModule ? new decoder.MPEG1VideoWASM(options) : new decoder.MPEG1Video(options);
      this.video.player = this;
      this.renderer = !options.disableGl && renderer.WebGL.IsSupported() ? new renderer.WebGL(options) : new renderer.Canvas2D(options);
      this.demuxer.connect(demuxer.TS.STREAM.VIDEO_1, this.video);
      this.video.connect(this.renderer);
    }
  }

  initAudio() {
    const options = this.options;

    if (options.audio !== false && audio_output.WebAudio.IsSupported()) {
      this.audio = options.wasmModule ? new decoder.MP2AudioWASM(options) : new decoder.MP2Audio(options);
      this.audioOut = new audio_output.WebAudio(options);
      this.demuxer.connect(demuxer.TS.STREAM.AUDIO_1, this.audio);
      this.audio.connect(this.audioOut);
    }
  }
  /**
   * 设置source的url
   * @param {*} url
   */


  setUrl(url = '') {
    if (this.isPlaying) this.stop(true);

    if (this.source instanceof WSSource) {
      this.source.changeUrl(url);
    } else {
      this.source.url = url;

      if (!!url && !this.status.isBackground) {
        this.play();
      }
    }
  }
  /**
   * 设置选项
   * @param {keyof import('../types').PlayerOptions} name
   * @param {any} value
   */


  setOption(name, value) {
    console.log('setOption: ', name, value);
    if (typeof value === undefined) return;

    switch (name) {
      case 'pauseWhenHidden':
        this.options.pauseWhenHidden = value;
        break;
    }
  }
  /** 进入前台 */


  intoFront() {
    this.status.isBackground = false;

    if (this.paused) {
      this.play();
    }
  }
  /** 进入后台 */


  intoBackground() {
    this.status.isBackground = true;

    if (this.options.pauseWhenHidden) {
      this.pause();
    }
  }
  /**
   * 旋转画布
   * @param {number} angle 角度
   * @param {boolean} append 是否为追加角度
   * @returns
   */


  rotate(angle, append = false) {
    if (!this.canvas || typeof angle !== 'number') return;
    const canvas = this.canvas;
    angle = append ? this.status.canvasAngle + angle : angle;
    angle = angle >= 360 ? angle - 360 : angle <= -360 ? angle + 360 : angle;

    if (Math.abs(angle) / 90 % 2 === 1) {
      // 如果是90整数倍,表示为垂直状态
      const containerBound = this.contianer.getBoundingClientRect(),
            canvasBound = canvas.getBoundingClientRect();

      if (canvas.width > canvas.height) {
        // 宽>高,取容器高度作为canvas最大宽度
        canvas.style.width = containerBound.height + 'px';
      } else {
        // 宽<=高,取容器宽度作为canvas最大高度
        canvas.style.height = containerBound.width + 'px';
      }
    } else {
      canvas.style.width = null;
      canvas.style.height = null;
    }

    canvas.style.transform = `rotate(${angle}deg)`;
    this.status.canvasAngle = angle;
  }
  /**
   * 截图
   * @author cloudsail
   * @param {string} name 图片文件名称
   * @param {'png'|'jpg'} type 图片类型
   * @param {number} quality 图片质量,可以控制输出图片大小,仅jpg有效(png无效)
   */


  snapshot(name = 'jsmpeg', type = 'png', quality) {
    if (!this.isPlaying) {
      console.warn('[JSMpegPlayer] 播放器没有播放源,无法截屏');
      return;
    }

    if (this.canvas) {
      if (!/^jpg|png$/.test(type)) {
        type = 'png';
      }

      const mime = 'image/' + type,
            url = this.canvas.toDataURL(mime, quality);
      download(url.replace(mime, 'image/octet-stream'), `${name}_snapshot_${Date.now()}.png`, mime);
    }
  }
  /**
   * 视频录制
   * @author cloudsail
   * @param {string} name
   * @param {'ws'|'canvas'} mode
   */


  startRecording(mode = 'ws') {
    if (!this.isPlaying) {
      console.warn('[JSMpegPlayer] 播放器没有播放源,无法录屏');
      return;
    }

    if (this.recorder?.running) {
      console.warn('[JSMpegPlayer] 已处于录制状态,请勿重复录制');

      if (this.recorder.paused) {
        this.recorder.continue();
      }

      return;
    }

    try {
      this.recorder = new Recorder({
        canvas: this.canvas,
        mode,
        source: this.source,
        eventBus: this.eventBus
      });
      this.recorder.start();
    } catch (error) {
      console.error(error);
    }
  }

  stopRecording(name = 'JSMpeg') {
    if (!this.recorder?.running) return;
    this.recorder.stop();
    this.recorder.save(name);
    this.recorder = null;
  }

  clearPlayer() {
    this.renderer.clear();

    if (this.video.hasSequenceHeader) {
      let bufferSize = this.options.videoBufferSize ?? 512 * 1024;
      let bufferMode = this.options.streaming ? BitBuffer.MODE.EVICT : BitBuffer.MODE.EXPAND;
      this.video.bits = new BitBuffer(bufferSize, bufferMode); // this.demuxer.write(new BitBuffer(bufferSize, bufferMode))
    }
  } // reload() {}
  // #region 事件

  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {import("../types/events").JSMpegEventMap[T]} callback
   * @param {AddEventListenerOptions|boolean} options
   */


  on(type, callback, options) {
    this.eventBus.on(type, callback, options);
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {import("../types/events").JSMpegEventMap[T]} callback
   * @param {AddEventListenerOptions|boolean} options
   */


  once(type, callback, options = {}) {
    this.eventBus.once(type, callback, options);
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {import("../types/events").JSMpegEventMap[T]} callback
   */


  off(type, callback) {
    this.eventBus.off(type, callback);
  }
  /**
   * @template {keyof import("../types/events").JSMpegEventMap} T
   * @param {T} type
   * @param {any} data
   */


  emit(type, data) {
    this.eventBus.emit(type, data);
  } // #endregion
  // #region 原生方法

  /**
   * 显示Loading(貌似无效果)
   */


  startLoading() {
    this.source?.start();

    if (this.autoplay) {
      this.play();
    }
  }
  /**
   *
   * @param {*} ev
   * @returns
   */


  showHide(ev) {
    if (!this.options.pauseWhenHidden) {
      this.play();
      return;
    }

    if (document.visibilityState === 'hidden') {
      this.unpauseOnShow = this.wantsToPlay;
      this.intoBackground();
    } else if (this.unpauseOnShow) {
      this.intoFront();
    }
  }
  /**
   * 获取当前音量
   * @returns
   */


  getVolume() {
    return this.audioOut ? this.audioOut.volume : 0;
  }
  /**
   * 设置当前音量
   * @param {number} volume
   */


  setVolume(volume) {
    if (this.audioOut) {
      this.audioOut.volume = volume;
    }
  }
  /**
   * 播放
   * @author cloudsail
   * @returns
   */


  play() {
    if (this.animationId) {
      return;
    } else if (this.status.isBackground) {
      this.wantsToPlay = true;
      return;
    }

    this.animationId = requestAnimationFrame(this.update.bind(this));
    this.wantsToPlay = true;
    this.paused = false;

    if (this.source.isPaused) {
      this.source.continue();
    }

    if (this.recorder?.running) {
      this.recorder.continue();
    }
  }
  /**
   * 暂停播放
   * @author cloudsail
   * @returns
   */


  pause() {
    if (this.paused) {
      return;
    }

    cancelAnimationFrame(this.animationId);
    this.source?.pause();
    this.animationId = null;
    this.wantsToPlay = false;
    this.isPlaying = false;
    this.paused = true;

    if (this.audio && this.audio.canPlay) {
      // Seek to the currentTime again - audio may already be enqueued a bit
      // further, so we have to rewind it.
      this.audioOut.stop();
      this.seek(this.currentTime);
    }

    this.options?.onPause?.(this);
    this.emit('pause', this);

    if (this.recorder?.running) {
      this.recorder.pause();
    }
  }

  stop(clear = true) {
    this.pause();
    this.seek(0);

    if (this.video && this.options.decodeFirstFrame !== false) {
      this.video.decode();
    }

    if (clear) {
      this.clearPlayer();
    }
  }

  destroy() {
    this.pause();
    this.eventBus.offAll();
    this.source.destroy();
    this.video && this.video.destroy();
    this.renderer && this.renderer.destroy();
    this.audio && this.audio.destroy();
    this.audioOut && this.audioOut.destroy();
    this.recorder && this.recorder.destroy();
    this.canvas?.remove();
    this.canvas = null;
    this.options.canvas = null;
  }

  seek(time) {
    let startOffset = this.audio && this.audio.canPlay ? this.audio.startTime : this.video.startTime;

    if (this.video) {
      this.video.seek(time + startOffset);
    }

    if (this.audio) {
      this.audio.seek(time + startOffset);
    }

    this.startTime = Now() - time;
  }

  getCurrentTime() {
    return this.video.currentTime - this.video.startTime; // return this.audio && this.audio.canPlay ? this.audio.currentTime - this.audio.startTime : this.video.currentTime - this.video.startTime
  }

  setCurrentTime(time) {
    this.seek(time);
  }

  update() {
    this.animationId = requestAnimationFrame(this.update.bind(this));

    if (!this.source.established) {
      if (this.renderer) {
        this.renderer.clear(); // this.renderer.renderProgress(this.source.progress)
      }

      return;
    }

    if (!this.isPlaying) {
      this.isPlaying = true;
      this.startTime = Now() - this.currentTime;
      this.options?.onPlay?.(this);
      this.emit('play', this);
    }

    try {
      if (this.options.streaming) {
        this.updateForStreaming();
      } else {
        this.updateForStaticFile();
      }
    } catch (error) {
      if (error.message?.includes('memory access out of bounds')) {
        console.error('内存溢出,尝试重新加载');
        this.destroy();
        setTimeout(() => this.init(this.url, this.options), 3000);
      } else {
        console.error(error);
      }
    }

    this.options.onUpdate?.();
  }

  updateForStreaming() {
    // 当流到达时,立即解码所有已经缓冲的,以减少播放延迟。
    if (this.video) {
      // console.log('update')
      this.video.decode();
    }

    if (this.audio) {
      let decoded = false;

      do {
        // 如果已经有很多音频流排队,禁用输出并跟上编码。
        if (this.audioOut.enqueuedTime > this.maxAudioLag) {
          this.audioOut.resetEnqueuedTime();
          this.audioOut.enabled = false;
        }

        decoded = this.audio.decode();
      } while (decoded);

      this.audioOut.enabled = true;
    }
  }

  nextFrame() {
    if (this.source.established && this.video) {
      return this.video.decode();
    }

    return false;
  }

  updateForStaticFile() {
    let notEnoughData = false,
        headroom = 0; // If we have an audio track, we always try to sync the video to the audio.
    // Gaps and discontinuities are far more percetable in audio than in video.

    if (this.audio && this.audio.canPlay) {
      // Do we have to decode and enqueue some more audio data?
      while (!notEnoughData && this.audio.decodedTime - this.audio.currentTime < 0.25) {
        notEnoughData = !this.audio.decode();
      } // Sync video to audio


      if (this.video && this.video.currentTime < this.audio.currentTime) {
        notEnoughData = !this.video.decode();
      }

      headroom = this.demuxer.currentTime - this.audio.currentTime;
    } else if (this.video) {
      // Video only - sync it to player's wallclock
      let targetTime = Now() - this.startTime + this.video.startTime,
          lateTime = targetTime - this.video.currentTime,
          frameTime = 1 / this.video.frameRate;

      if (this.video && lateTime > 0) {
        // If the video is too far behind (>2 frames), simply reset the
        // target time to the next frame instead of trying to catch up.
        if (lateTime > frameTime * 2) {
          this.startTime += lateTime;
        }

        notEnoughData = !this.video.decode();
      }

      headroom = this.demuxer.currentTime - targetTime;
    } // Notify the source of the playhead headroom, so it can decide whether to
    // continue loading further data.


    this.source.continue(headroom);

    if (notEnoughData && this.source.completed) {
      // If we failed to decode and the source is complete, it means we reached
      // the end of our data. We may want to loop.
      if (this.loop) {
        this.seek(0);
      } else {
        this.pause();
        this.options?.onEnded?.(this);
        this.emit('ended', this);
      }
    } else if (notEnoughData) {
      // If there's not enough data and the source is not completed, we have
      // just stalled.
      this.options?.onStalled?.(this);
      this.emit('stalled', this);
    }
  } // #endregion
  // #region 事件处理


  handleSourceConnected() {
    // if (this.isRecording) {
    //   this.recorder.pause()
    // }
    this.options.onSourceConnected?.(this);
  }

  handleSourceEstablished() {
    if (this.status.isBackground) {
      this.source.pause();
    } else if (this.paused) {
      this.play();
    }

    this.options.onSourceEstablished?.(this);
  }

  handleSourceStreamInterrupt() {
    if (this.options.onSourceStreamInterrupt) {
      this.options.onSourceStreamInterrupt(this);
    }
  }

  handleSourceClosed() {
    this.pause();

    if (this.isRecording) {
      this.recorder.pause();
    }

    if (this.options.onSourceClosed) {
      this.options.onSourceClosed(this);
    }
  } // #endregion

  /** wasm模块编译压缩后的字符串 */


}

_defineProperty(Player, "WASM_BINARY_INLINED", 'AGFzbQE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CmAE2AgggACAAKQKEATcCkAEgACAAKAKMATYCmAEgACACKQIANwKEASAAIAIoAgg2AowBIAIkAQuSAQAgAEEBNgJIIAAgACgCDCABQX9qbEF/ajYCTCAAQgA3AmQgAEIANwJsIABBgAE2AnQgAEGAATYCeCAAQYABNgJ8IAAgACgCgAFBBRAwNgJEIAAoAoABQQEQMARAA0AgACgCgAEiASABKAIEQQhqNgIEIAAoAoABQQEQMA0ACwsDQCAAEBQgACgCgAEQL0UNAAsLngkBBH8gACgCgAEhAgJAAkADQAJAIAJBARAwIAFqIQEjAEHAAWogAUECdGooAgAiAUF/TA0AIwBBwAFqIAFBAnRqKAIADQEMAgsLIAFBAmohAkEAIQEMAQsgAUECaiIBQbwBRgRAAkADQAJAIAAoAoABIQJBACEBA0AgAkEBEDAgAWohASMAQcABaiABQQJ0aigCACIBQX9MDQEjAEHAAWogAUECdGooAgANAAsgAUECaiIBQbwBRg0BDAILCyABQQJqIQJBACEBDAILCyABQbkBRgRAQQAhAQNAAkAgAUEhaiEBIAAoAoABIQNBACECA0AgA0EBEDAgAmohAiMAQcABaiACQQJ0aigCACICQX9MDQEjAEHAAWogAkECdGooAgANAAsgAkECaiICQbkBRg0BDAMLCyACQQJqIQIFIAEhAkEAIQELCyABIwBBwAFqIAJBAnRqKAIAaiECIAAoAkgEQCAAQQA2AkggACAAKAJMIAJqIgE2AkwFAkAgACgCTCIBIAJqIAAoAhROBEAPCyACQQFMBEAgACABQQFqIgE2AkwMAQsgAEGAATYCdCAAQYABNgJ4IABBgAE2AnwgACgCLEECRgRAIABCADcCZCAAQgA3AmwLIAAgAUEBaiIBNgJMA0AgACABIAAoAgwiBG0iAzYCUCAAIAEgAyAEbGs2AlQgACAAKAJkIAAoAmggACgCkAEgACgClAEgACgCmAEQFSACQX9qIQMgACAAKAJMQQFqIgE2AkwgAkECSgRAIAMhAgwBCwsLCyAAIAEgACgCDCIDbSICNgJQIAAgASACIANsazYCVAJAAkACQAJAIAAoAixBAWsOAgABAgsgAC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AAsgACgCgAFBCBAwDAILIAAoAoABQQgQMEGAfmoMAQsgBEGAfmogBCAEQYABShsLCyEEDAELIAZB/wFxIgNBACADayAAKAKAAUEBEDBFGyEEIAZBCHUhAwsgAiADaiIGIwBBQGtqLQAAIgMgBWotAAAgACgCREEAIARBAXQiAkEfdUEBciAAKAJcGyACamxsIgJBBHVBAEEBQX8gAkEPShsgAkEQcRtrIgJBgHAgAkGAcEobIQIgAEGcAWogA0ECdGogAyMAQZA1amotAAAgAkH/DyACQf8PSBtsNgIAIAZBAWohAgwBCwsgAUEESARAIABBhAFqIQUgAUEDdEEIcSAAKAJUIAAoAhgiAyAAKAJQbGpBBHRyIANBA3RBACABQQJxG2ohBAUgAEGMAWogAEGIAWogAUEERhshBSAAKAJQIAAoAhgiAUECdGwgACgCVEEDdGohBCABQQF1IQMLIANBeGohAyAFKAIAIQUgAkEBRiECIABBnAFqIQEgACgCXARAIAIEQCABKAIAQYABakEIdSAFIAQgAxAYIAFBADYCAAUgARAZIAEgBSAEIAMQGiABQQBBgAIQPBoLBSACBEAgASgCAEGAAWpBCHUgBSAEIAMQGyABQQA2AgAFIAEQGSABIAUgBCADEBwgAUEAQYACEDwaCwsL7AYAIAEgAmogAEEAIABBAEobIgBB/wEgAEH/AUgbQf8BcSIAOgAAIAEgAkEBamogADoAACABIAJBAmpqIAA6AAAgASACQQNqaiAAOgAAIAEgAkEEamogADoAACABIAJBBWpqIAA6AAAgASACQQZqaiAAOgAAIAEgAkEHamogADoAACABIAIgA0EIaiIDaiICaiAAOgAAIAEgAkEBamogADoAACABIAJBAmpqIAA6AAAgASACQQNqaiAAOgAAIAEgAkEEamogADoAACABIAJBBWpqIAA6AAAgASACQQZqaiAAOgAAIAEgAkEHamogADoAACABIAIgA2oiAmogADoAACABIAJBAWpqIAA6AAAgASACQQJqaiAAOgAAIAEgAkEDamogADoAACABIAJBBGpqIAA6AAAgASACQQVqaiAAOgAAIAEgAkEGamogADoAACABIAJBB2pqIAA6AAAgASACIANqIgJqIAA6AAAgASACQQFqaiAAOgAAIAEgAkECamogADoAACABIAJBA2pqIAA6AAAgASACQQRqaiAAOgAAIAEgAkEFamogADoAACABIAJBBmpqIAA6AAAgASACQQdqaiAAOgAAIAEgAiADaiICaiAAOgAAIAEgAkEBamogADoAACABIAJBAmpqIAA6AAAgASACQQNqaiAAOgAAIAEgAkEEamogADoAACABIAJBBWpqIAA6AAAgASACQQZqaiAAOgAAIAEgAkEHamogADoAACABIAIgA2oiAmogADoAACABIAJBAWpqIAA6AAAgASACQQJqaiAAOgAAIAEgAkEDamogADoAACABIAJBBGpqIAA6AAAgASACQQVqaiAAOgAAIAEgAkEGamogADoAACABIAJBB2pqIAA6AAAgASACIANqIgJqIAA6AAAgASACQQFqaiAAOgAAIAEgAkECamogADoAACABIAJBA2pqIAA6AAAgASACQQRqaiAAOgAAIAEgAkEFamogADoAACABIAJBBmpqIAA6AAAgASACQQdqaiAAOgAAIAEgAiADaiICaiAAOgAAIAEgAkEBamogADoAACABIAJBAmpqIAA6AAAgASACQQNqaiAAOgAAIAEgAkEEamogADoAACABIAJBBWpqIAA6AAAgASACQQZqaiAAOgAAIAEgAkEHamogADoAAAubBgEUfwNAIAFBEGpBAnQgAGoiBygCACIGIAFBMGpBAnQgAGoiDSgCACIJaiEFIAFBCGpBAnQgAGoiDigCACICIAFBOGpBAnQgAGoiDygCACIDaiEEIAIgA2siEEHZA2wgAUEoakECdCAAaiIKKAIAIgIgAUEYakECdCAAaiIRKAIAIgNrIgtBvH5sQYABampBCHUgBCACIANqIghqIgJrIgMgBCAIa0HqAmxBgAFqQQh1ayEEIAFBAnQgAGoiCCgCACIMIAFBIGpBAnQgAGoiEigCACITayIUIAYgCWtB6gJsQYABakEIdSAFayIJaiEGIAggAiAMIBNqIgggBWoiDGo2AgAgDiADIAZqNgIAIAcgFCAJayIHIARrNgIAIBEgC0HZA2xBgAFqIBBBxAFsakEIdSAEaiIJIAggBWsiBWo2AgAgEiAFIAlrNgIAIAogBCAHajYCAC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AAIAFBDGxqKALUAjYC1AUgAUEBaiIBIAtHDQALBUEAIQEDQEEAIQMDQCAAQQxqIANBB3RqIAFBAnRqKAIABEACQCAAQcwCaiADQYADbGogAUEMbGohBQJAAkACQAJAAkAgASAAQYwCaiADQQV0amosAAAOBAABAgMECyAFIAAoAghBBhAwNgIAIAAgA0GAA2xqIAFBDGxqIAAoAghBBhAwNgLQAiAAIANBgANsaiABQQxsaiAAKAIIQQYQMDYC1AIMBAsgACADQYADbGogAUEMbGogACgCCEEGEDAiAjYC0AIgBSACNgIAIAAgA0GAA2xqIAFBDGxqIAAoAghBBhAwNgLUAgwDCyAAIANBgANsaiABQQxsaiAAKAIIQQYQMCICNgLUAiAAIANBgANsaiABQQxsaiACNgLQAiAFIAI2AgAMAgsgBSAAKAIIQQYQMDYCACAAIANBgANsaiABQQxsaiAAKAIIQQYQMCICNgLUAiAAIANBgANsaiABQQxsaiACNgLQAgsLCyADQQFqIgMgCEkNAAsgAUEBaiIBIAtHDQALCwsLaiALQSBJIRsgAEHMtgFqIQQgAEHMCGohHCAAQcz2AGohHSAAQcwLaiEeIABBzJYBaiEfA0BBACEWIBQhAwNAIBgEQEEAIQEDQCAAQQAgASAOECggAEEBIAEgDhAoIAFBAWoiASANSA0ACwsgGQRAIA0hAQNAIABBACABIA4QKCAAQcwLaiABQQxsaiAAQcwIaiABQQxsaigCADYCACAAIAFBDGxqQdALaiAAIAFBDGxqQdAIaigCADYCACAAIAFBDGxqQdQLaiAAIAFBDGxqQdQIaigCADYCACABQQFqIgEgC0gNAAsLIBsEQCALIQEDQCAAQcwIaiABQQxsakEANgIAIAAgAUEMbGpB0AhqQQA2AgAgACABQQxsakHUCGpBADYCACAAQcwLaiABQQxsakEANgIAIAAgAUEMbGpB0AtqQQA2AgAgACABQQxsakHUC2pBADYCACABQQFqIgFBIEcNAAsLIAAoAgQhASADIRFBACESA0AgACABQcAHakH/B3EiATYCBCAcIBIgHSABECkgBEIANwIAIARCADcCCCAEQgA3AhAgBEI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qQQJ0IAJqICo4AgAgA0EWakECdCACaiA7IC6SIjGMOAIAIANBCmpBAnQgAmogMTgCACADQRVqQQJ0IAJqIEMgJpIiMYw4AgAgA0ELakECdCACaiAxOAIAIANBFGpBAnQgAmogNYw4AgAgA0EMakECdCACaiA1OAIAIANBE2pBAnQgAmogJiAlkiImjDgCACADQQ1qQQJ0IAJqICY4AgAgA0ESakECdCACaiAujDgCACADQQ5qQQJ0IAJqIC44AgAgA0ERakECdCACaiAljDgCACADQQ9qQQJ0IAJqICU4AgAgA0EQakECdCACakMAAAAAOAIACy8BAX9BFBAxIgIgATYCECACIAAQMTYCACACIAA2AgggAkEANgIMIAJBADYCBCACCw0AIAAoAgAQOCAAEDgL6QEBBH8gACgCCCIDIAAoAgwiAmsiBCABSQRAAkAgACgCEEECRgRAIAAgACgCACABIARrIANBAXQiAiACIARqIAFJGyIBEDk2AgAgACABNgIIIAAoAgQgACgCDCIBQQN0IgJNDQEgACACNgIEDAELIAIgACgCBCIFQQN2IgNGIAMgBGogAUlyBEAgAEEANgIMIABBADYCBEEAIQEMAQsgAwRAIAAoAgAiASABIANqIAIgA2sQOxogACAAKAIMIANrIgE2AgwgACAAKAIEIAVBeHFrNgIEBSACIQELCwUgAiEBCyAAKAIAIAFqC40BAQR/IAAoAgRBB2pBA3YiASAAKAIMIgRJBEACQCAAKAIAIQIDQAJAIAFBAWohAyABIAJqLAAARQRAIAIgA2osAABFBEAgAiABQQJqaiwAAEEBRg0CCwsgAyAETw0CIAMhAQwBCwsgACABQQN0QSBqNgIEIAIgAUEDamotAAAPCwsgACAEQQN0NgIEQX8LqQEBBH8gACgCBEEHakEDdiICIAAoAgwiBUkEQAJAIAAoAgAhBANAAkAgAkEBaiEDAkACQCACIARqLAAADQAgAyAEaiwAAA0AIAQgAkECamosAABBAUcNACAAIAJBA3QiA0EgajYCBCABIAQgAkEDamotAABGDQIgA0EnakEDdiICIAVPDQQMAQsgAyAFTw0DIAMhAgsMAQsLIAEPCwsgACAFQQN0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IQMgAUEIagUgAQshAiAEQQRxBH8gAyACKAIANgIAIAJBBGohAiADQQRqBSADCyEBIARBAnEEQCABIAIsAAA6AAAgASACLAABOgABIAFBAmohASACQQJqIQILIARBAXFFBEAgAA8LIAEgAiwAADoAACAADwsgAkEfSwRAAkACQAJAAkAgA0EDcUEBaw4DAAECAwsgAyABKAIAIgU6AAAgAyABLAABOgABIAMgASwAAjoAAiACQWxqQXBxIghBE2oiCSABaiACQW1qIANBA2ohBCACQX1qIQYgAUEDaiECIAUhAQNAIAQgAigCASIFQQh0IAFBGHZyNgIAIAQgAigCBSIBQQh0IAVBGHZyNgIEIAQgAigCCSIFQQh0IAFBGHZyNgIIIAQgAigCDSIBQQh0IAVBGHZyNgIMIAJBEGohAiAEQRBqIQQgBkFwaiIGQRBLDQALIAMgCWohAyAIayECIQEMAgsgAyABKAIAIgU6AAAgAyABLAABOgABIAJBbGpBcHEiCEESaiIJIAFqIAJBbmogA0ECaiEEIAJBfmohBiABQQJqIQIgBSEBA0AgBCACKAICIgVBEHQgAUEQdnI2AgAgBCACKAIGIgFBEHQgBUEQdnI2AgQgBCACKAIKIgVBEHQgAUEQdnI2AgggBCACKAIOIgFBEHQgBUEQdnI2AgwgAkEQaiECIARBEGohBCAGQXBqIgZBEUsNAAsgAyAJaiEDIAhrIQIhAQwBCyADIAEoAgAiBToAACACQWxqQXBxIghBEWoiCSABaiACQW9qIANBAWohBCACQX9qIQYgAUEBaiECIAUhAQNAIAQgAigCAyIFQRh0IAFBCHZyNgIAIAQgAigCByIBQRh0IAVBCHZyNgIEIAQgAigCCyIFQRh0IAFBCHZyNgIIIAQgAigCDyIBQRh0IAVBCHZyNgIMIAJBEGohAiAEQRBqIQQgBkFwaiIGQRJLDQALIAMgCWohAyAIayECIQELCyACQRBxBEAgAyABLAAAOgAAIAMgASwAAToAASADIAEsAAI6AAIgAyABLAADOgADIAMgASwABDoABCADIAEsAAU6AAUgAyABLAAGOgAGIAMgASwABzoAByADIAEsAAg6AAggAyABLAAJOgAJIAMgASwACjoACiADIAEsAAs6AAsgAyABLAAMOgAMIAMgASwADToADSADIAEsAA46AA4gAyABLAAPOgAPIANBEGohAyABQRBqIQELIAJBCHEEQCADIAEsAAA6AAAgAyABLAABOgABIAMgASwAAjoAAiADIAEsAAM6AAMgAyABLAAEOgAEIAMgASwABToABSADIAEsAAY6AAYgAyABLAAHOgAHIANBCGohAyABQQhqIQELIAJBBHEEQCADIAEsAAA6AAAgAyABLAABOgABIAMgASwAAjoAAiADIAEsAAM6AAMgA0EEaiEDIAFBBGohAQsgAkECcQRAIAMgASwAADoAACADIAEsAAE6AAEgA0ECaiEDIAFBAmohAQsgAkEBcUUEQCAADwsgAyABLAAAOgAAIAALwAMBBn8gACABRgRAIAAPCyABIAJqIABLIAAgAmoiBSABS3FFBEAgACABIAIQOhogAA8LIAEgACIDc0EDcUUhBCADIAFJBH8gBARAIANBA3EEQAJAA0AgAgRAIAJBf2ohAiABQQFqIQQgAyABLAAAOgAAIANBAWoiA0EDcQRAIAQhAQwCBSAEIQEMAwsACwsgAA8LCyACQQNLBEAgAkF8aiIGQXxxIgdBBGoiCCADaiACIQQgASECA0AgAyACKAIANgIAIANBBGohAyACQQRqIQIgBEF8aiIEQQNLDQALIQMgBiAHayECIAEgCGohAQsLIAJFBEAgAA8LA0AgAUEBaiEEIANBAWohBSADIAEsAAA6AAAgAkF/aiICBEAgBSEDIAQhAQwBCwsgAAUgBARAIAVBA3EEQAJAA0AgAgRAIAMgAkF/aiICaiIAIAEgAmosAAA6AAAgAEEDcUUNAgwBCwsgAw8LCyACQQNLBEAgAiEAA0AgAyAAQXxqIgBqIAAgAWooAgA2AgAgAEEDSw0ACyACQQNxIQILCyACRQRAIAMPCwNAIAMgAkF/aiICaiABIAJqLAAAOgAAIAINAAsgAwsLgwMCA38BfgJAIAJFDQAgACACQX9qaiABQf8BcSIDOgAAIAAgAzoAACACQQNJDQAgACACQX5qaiADOgAAIAAgAzoAASAAIAJBfWpqIAM6AAAgACADOg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ZG9taW5pYy9wcm9qZWN0cy9lbXNkay9mYXN0Y29tcC9lbXNjcmlwdGVuLy9zeXN0ZW0vbGliL2VtbWFsbG9jLmNwcABnZXRGcmVlTGlzdEluZGV4AE1JTl9GUkVFTElTVF9JTkRFWCA8PSBpbmRleCAmJiBpbmRleCA8IE1BWF9GUkVFTElTVF9JTkRFWABnZXRBZnRlcihyZWdpb24pIDw9IHNicmsoMCkAZW1tYWxsb2NfbWFsbG9jAHJlZ2lvbi0+Z2V0VXNlZCgpAGdldFBheWxvYWQAKGNoYXIqKWV4dHJhUHRyID09IChjaGFyKilwdHIgKyBzYnJrU2l6ZQBhbGxvY2F0ZVJlZ2lvbgAhbGFzdFJlZ2lvbgAhZmlyc3RSZWdpb24AZmlyc3RSZWdpb24AcHRyID09IGdldEFmdGVyKGxhc3RSZWdpb24pAGV4dGVuZExhc3RSZWdpb24AYWRkVG9GcmVlTGlzdABnZXRCaWdFbm91Z2hGcmVlTGlzdEluZGV4AHBheWxvYWRTaXplID49IHNpemUAcG9zc2libHlTcGxpdFJlbWFpbmRlcgBleHRyYSA+PSBNSU5fUkVHSU9OX1NJWkUAdG90YWxTcGxpdFNpemUgPj0gTUlOX1JFR0lPTl9TSVpFAG1lcmdlSW50b0V4aXN0aW5nRnJlZVJlZ2lvbgByZWdpb24gPT0gbGFzdFJlZ2lvbgBlbW1hbGxvY19yZWFsbG9j');
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/video-element.js


class VideoElement {
  constructor(element) {
    let url = element.dataset.url;

    if (!url) {
      throw 'VideoElement has no `data-url` attribute';
    } // Setup the div container, canvas and play button


    function addStyles(element, styles) {
      for (let name in styles) {
        element.style[name] = styles[name];
      }
    }

    this.container = element;
    addStyles(this.container, {
      display: 'inline-block',
      position: 'relative',
      minWidth: '80px',
      minHeight: '80px'
    });
    this.canvas = document.createElement('canvas');
    this.canvas.width = 960;
    this.canvas.height = 540;
    addStyles(this.canvas, {
      display: 'block',
      width: '100%'
    });
    this.container.appendChild(this.canvas);
    this.playButton = document.createElement('div');
    this.playButton.innerHTML = VideoElement.PLAY_BUTTON;
    addStyles(this.playButton, {
      zIndex: 2,
      position: 'absolute',
      top: '0',
      bottom: '0',
      left: '0',
      right: '0',
      maxWidth: '75px',
      maxHeight: '75px',
      margin: 'auto',
      opacity: '0.7',
      cursor: 'pointer'
    });
    this.container.appendChild(this.playButton); // Parse the data-options - we try to decode the values as json. This way
    // we can get proper boolean and number values. If JSON.parse() fails,
    // treat it as a string.

    let options = {
      canvas: this.canvas
    };

    for (let option in element.dataset) {
      try {
        options[option] = JSON.parse(element.dataset[option]);
      } catch (err) {
        options[option] = element.dataset[option];
      }
    } // Create the player instance


    this.player = new Player(url, options);
    element.playerInstance = this.player; // Setup the poster element, if any

    if (options.poster && !options.autoplay && !this.player.options.streaming) {
      options.decodeFirstFrame = false;
      this.poster = new Image();
      this.poster.src = options.poster;
      this.poster.addEventListener('load', this.posterLoaded);
      addStyles(this.poster, {
        display: 'block',
        zIndex: 1,
        position: 'absolute',
        top: 0,
        left: 0,
        bottom: 0,
        right: 0
      });
      this.container.appendChild(this.poster);
    } // Add the click handler if this video is pausable


    if (!this.player.options.streaming) {
      this.container.addEventListener('click', this.onClick.bind(this));
    } // Hide the play button if this video immediately begins playing


    if (options.autoplay || this.player.options.streaming) {
      this.playButton.style.display = 'none';
    } // Set up the unlock audio buton for iOS devices. iOS only allows us to
    // play audio after a user action has initiated playing. For autoplay or
    // streaming players we set up a muted speaker icon as the button. For all
    // others, we can simply use the play button.


    if (this.player.audioOut && !this.player.audioOut.unlocked) {
      let unlockAudioElement = this.container;

      if (options.autoplay || this.player.options.streaming) {
        this.unmuteButton = document.createElement('div');
        this.unmuteButton.innerHTML = VideoElement.UNMUTE_BUTTON;
        addStyles(this.unmuteButton, {
          zIndex: 2,
          position: 'absolute',
          bottom: '10px',
          right: '20px',
          width: '75px',
          height: '75px',
          margin: 'auto',
          opacity: '0.7',
          cursor: 'pointer'
        });
        this.container.appendChild(this.unmuteButton);
        unlockAudioElement = this.unmuteButton;
      }

      this.unlockAudioBound = this.onUnlockAudio.bind(this, unlockAudioElement);
      unlockAudioElement.addEventListener('touchstart', this.unlockAudioBound, false);
      unlockAudioElement.addEventListener('click', this.unlockAudioBound, true);
    }
  }

  onUnlockAudio(element, ev) {
    if (this.unmuteButton) {
      ev.preventDefault();
      ev.stopPropagation();
    }

    this.player.audioOut.unlock(function () {
      if (this.unmuteButton) {
        this.unmuteButton.style.display = 'none';
      }

      element.removeEventListener('touchstart', this.unlockAudioBound);
      element.removeEventListener('click', this.unlockAudioBound);
    }.bind(this));
  }

  onClick(ev) {
    if (this.player.isPlaying) {
      this.player.pause();
      this.playButton.style.display = 'block';
    } else {
      this.player.play();
      this.playButton.style.display = 'none';

      if (this.poster) {
        this.poster.style.display = 'none';
      }
    }
  }

}

_defineProperty(VideoElement, "PLAY_BUTTON", '<svg style="max-width: 75px; max-height: 75px;" ' + 'viewBox="0 0 200 200" alt="Play video">' + '<circle cx="100" cy="100" r="90" fill="none" ' + 'stroke-width="15" stroke="#fff"/>' + '<polygon points="70, 55 70, 145 145, 100" fill="#fff"/>' + '</svg>');

_defineProperty(VideoElement, "UNMUTE_BUTTON", '<svg style="max-width: 75px; max-height: 75px;" viewBox="0 0 75 75">' + '<polygon class="audio-speaker" stroke="none" fill="#fff" ' + 'points="39,13 22,28 6,28 6,47 21,47 39,62 39,13"/>' + '<g stroke="#fff" stroke-width="5">' + '<path d="M 49,50 69,26"/>' + '<path d="M 69,50 49,26"/>' + '</g>' + '</svg>');
;// CONCATENATED MODULE: ./src/class/jsmpeg/modules/jsmpeg.js


/*! jsmpeg v1.0 | (c) Dominic Szablewski | MIT license */







 // This sets up the JSMpeg "Namespace". The object is empty apart from the Now()
// utility function and the automatic CreateVideoElements() after DOMReady.

class JSMpeg {
  // The Player sets up the connections between source, demuxer, decoders,
  // renderer and audio output. It ties everything together, is responsible
  // of scheduling decoding and provides some convenience methods for
  // external users.
  // A Video Element wraps the Player, shows HTML controls to start/pause
  // the video and handles Audio unlocking on iOS. VideoElements can be
  // created directly in HTML using the <div class="jsmpeg"/> tag.
  // The BitBuffer wraps a Uint8Array and allows reading an arbitrary number
  // of bits at a time. On writing, the BitBuffer either expands its
  // internal buffer (for static files) or deletes old data (for streaming).
  // A Source provides raw data from HTTP, a WebSocket connection or any
  // other mean. Sources must support the following API:
  //   .connect(destinationNode)
  //   .write(buffer)
  //   .start() - start reading
  //   .resume(headroom) - continue reading; headroom to play pos in seconds
  //   .established - boolean, true after connection is established
  //   .completed - boolean, true if the source is completely loaded
  //   .progress - float 0-1
  // A Demuxer may sit between a Source and a Decoder. It separates the
  // incoming raw data into Video, Audio and other Streams. API:
  //   .connect(streamId, destinationNode)
  //   .write(buffer)
  //   .currentTime – float, in seconds
  //   .startTime - float, in seconds
  // A Decoder accepts an incoming Stream of raw Audio or Video data, buffers
  // it and upon `.decode()` decodes a single frame of data. Video decoders
  // call `destinationNode.render(Y, Cr, CB)` with the decoded pixel data;
  // Audio decoders call `destinationNode.play(left, right)` with the decoded
  // PCM data. API:
  //   .connect(destinationNode)
  //   .write(pts, buffer)
  //   .decode()
  //   .seek(time)
  //   .currentTime - float, in seconds
  //   .startTime - float, in seconds
  // A Renderer accepts raw YCrCb data in 3 separate buffers via the render()
  // method. Renderers typically convert the data into the RGBA color space
  // and draw it on a Canvas, but other output - such as writing PNGs - would
  // be conceivable. API:
  //   .render(y, cr, cb) - pixel data as Uint8Arrays
  //   .enabled - wether the renderer does anything upon receiving data
  // Audio Outputs accept raw Stero PCM data in 2 separate buffers via the
  // play() method. Outputs typically play the audio on the user's device.
  // API:
  //   .play(sampleRate, left, right) - rate in herz; PCM data as Uint8Arrays
  //   .stop()
  //   .enqueuedTime - float, in seconds
  //   .enabled - wether the output does anything upon receiving data
  static CreateVideoElements() {
    let elements = document.querySelectorAll('.jsmpeg');

    for (let i = 0; i < elements.length; i++) {
      new VideoElement(elements[i]);
    }
  }

} // Automatically create players for all found <div class="jsmpeg"/> elements.
// if (document.readyState === 'complete') {
// 	JSMpeg.CreateVideoElements();
// }
// else {
// 	document.addEventListener('DOMContentLoaded', JSMpeg.CreateVideoElements);
// }

_defineProperty(JSMpeg, "Player", Player);

_defineProperty(JSMpeg, "VideoElement", VideoElement);

_defineProperty(JSMpeg, "BitBuffer", BitBuffer);

_defineProperty(JSMpeg, "Source", source);

_defineProperty(JSMpeg, "Demuxer", demuxer);

_defineProperty(JSMpeg, "Decoder", decoder);

_defineProperty(JSMpeg, "Renderer", renderer);

_defineProperty(JSMpeg, "AudioOutput", audio_output);
;// CONCATENATED MODULE: ./src/class/jsmpeg/index.js

/* harmony default export */ var jsmpeg = (JSMpeg);
;// CONCATENATED MODULE: ./src/class/jsmpeg/utils/fullscreen.js
const fullscreen = {
  get element() {
    return document.fullscreenElement ?? document.msFullscreenElement ?? document.mozFullScreenElement ?? document.webkitFullscreenElement ?? null;
  },

  /**
   *
   * @param {HTMLElement} el
   * @param {()=>void} exitCb
   */
  request(el, exitCb) {
    if (el instanceof HTMLElement) {
      const cb = ev => {
        console.log('fullscreen -> resize ', ev);
        el.scrollIntoView({
          block: 'nearest',
          behavior: 'smooth'
        });

        if (!this.element) {
          exitCb?.();
          window.removeEventListener('resize', cb);
          console.log('此元素请求的全屏已退出', el);
        }
      };

      window.addEventListener('resize', cb, false);
      const requestMethod = el.requestFullScreen ?? //W3C
      el.webkitRequestFullScreen ?? //FireFox
      el.mozRequestFullScreen ?? //Chrome等
      el.msRequestFullScreen; //IE11

      requestMethod?.call(el);
    }
  },

  exit(el) {
    if (!this.isFullscreen()) return;
    const exitMethod = document.exitFullscreen ?? //W3C
    document.mozCancelFullScreen ?? //FireFox
    document.webkitCancelFullScreen ?? //Chrome等
    document.msExiFullscreen; //IE11

    exitMethod?.call(document);
  },

  isFullscreen() {
    return this.element != null;
  }

};
/* harmony default export */ var utils_fullscreen = (fullscreen);
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/loading.vue?vue&type=script&lang=js&
/**
 * loading
 * @author cloudsail
 * @createTime
 * @description
 */
/* harmony default export */ var loadingvue_type_script_lang_js_ = ({
  name: 'loading',
  functional: true,
  // #region 组件基础
  components: {},
  props: {
    text: String
  },

  // #endregion
  render(h, context) {
    const {
      text
    } = context.props;
    return [h("svg", {
      "class": 'loading-icon',
      "attrs": {
        "xmlns": 'http://www.w3.org/2000/svg',
        "viewBox": '0 0 32 32',
        "width": '32',
        "height": '32',
        "fill": '#409eff'
      }
    }, [h("path", {
      "attrs": {
        "opacity": '.25',
        "d": 'M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4'
      }
    }), h("path", {
      "attrs": {
        "d": 'M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z'
      }
    }, [h("animateTransform", {
      "attrs": {
        "attributeName": 'transform',
        "type": 'rotate',
        "from": '0 16 16',
        "to": '360 16 16',
        "dur": '0.8s',
        "repeatCount": 'indefinite'
      }
    })])]), h("span", {
      "class": 'loading-text'
    }, [text])];
  }

});
;// CONCATENATED MODULE: ./src/components/loading.vue?vue&type=script&lang=js&
 /* harmony default export */ var components_loadingvue_type_script_lang_js_ = (loadingvue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

function normalizeComponent(
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */,
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options =
    typeof scriptExports === 'function' ? scriptExports.options : scriptExports

  // render functions
  if (render) {
    options.render = render
    options.staticRenderFns = staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + scopeId
  }

  var hook
  if (moduleIdentifier) {
    // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = shadowMode
      ? function () {
          injectStyles.call(
            this,
            (options.functional ? this.parent : this).$root.$options.shadowRoot
          )
        }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functional component in vue file
      var originalRender = options.render
      options.render = function renderWithStyleInjection(h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}

;// CONCATENATED MODULE: ./src/components/loading.vue
var loading_render, loading_staticRenderFns
;



/* normalize component */
;
var component = normalizeComponent(
  components_loadingvue_type_script_lang_js_,
  loading_render,
  loading_staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var loading = (component.exports);
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/jsmpeg-player.vue?vue&type=script&lang=js&



 // import Contextmenu from './components/contextmenu.vue'

const defaultOptions = () => ({
  /** 是否循环播放视频(仅静态文件)。默认true */
  autoplay: true,

  /** 是否解码音频。默认true */
  audio: true,

  /** 是否解码视频。默认true */
  video: true,

  /** 预览图像的URL,用来在视频播放之前作为海报显示。 */
  poster: null,

  /** 是否禁用后台播放,当web页面处于非活动状态时是否暂停播放,默认true(注意,浏览器通常会在非活动标签中限制JS) */
  pauseWhenHidden: true,

  /** 是否禁用WebGL,始终使用Canvas2D渲染器。默认false */
  disableGl: false,

  /** 是否禁用WebAssembly并始终使用JavaScript解码器。默认false */
  disableWebAssembly: false,

  /** WebGL上下文是否创建必要的“截图”。默认false */
  preserveDrawingBuffer: true,

  /** 是否以块的形式加载数据(仅静态文件)。当启用时,回放可以在完整加载源之前开始,默认true */
  progressive: true,

  /** 当不需要回放时是否推迟加载块。默认=progressive */
  throttled: true,

  /** 使用时,以字节为单位加载的块大小。默认(1 mb)1024*1024 */
  chunkSize: 1024 * 1024,

  /** 是否解码并显示视频的第一帧,一般用于设置画布大小以及使用初始帧作为"poster"图像。当使用自动播放或流媒体资源时,此参数不受影响。默认true */
  decodeFirstFrame: true,

  /** 流媒体时,以秒为单位的最大排队音频长度。(可以理解为能接受的最大音画不同步时间) */
  maxAudioLag: 0.25,

  /** 流媒体时,视频解码缓冲区的字节大小。默认的512 * 1024 (512 kb)。对于非常高的比特率,您可能需要增加此值。 */
  videoBufferSize: 1024 * 1024,

  /** 流媒体时,音频解码缓冲区的字节大小。默认的128 * 1024 (128 kb)。对于非常高的比特率,您可能需要增加此值。 */
  audioBufferSize: 256 * 1024
});

/* harmony default export */ var jsmpeg_playervue_type_script_lang_js_ = ({
  name: 'jsmpeg-player',
  inheritAttrs: false,
  // #region 组件基础
  props: {
    url: String,
    title: String,
    options: {
      type: Object,
      default: defaultOptions
    },

    /** 是否可关闭(单击关闭按钮,仅抛出事件) */
    closeable: Boolean,

    /** 是否处于后台,如el-tabs的切换,路由的切换等 */
    inBackground: Boolean,

    /** 是否现实持续播放时间 */
    showDuration: {
      type: Boolean,
      default: true
    },

    /** 默认静音 */
    defaultMute: {
      type: Boolean,
      default: true
    },

    /** 是否需要工具栏 */
    withToolbar: {
      type: Boolean,
      default: true
    },
    popoverVisibleArrow: {
      type: Boolean,
      default: true
    },
    noSignalText: {
      type: String,
      default: '无信号'
    },
    loadingText: {
      type: String,
      default: '拼命加载中'
    }
  },
  directives: {},
  components: {
    Loading: loading
  },
  inject: {
    /** @returns {any} */
    rootTabs: {
      default: ''
    }
  },

  provide() {
    return {
      player: this
    };
  },

  // #endregion
  // #region 数据相关
  data() {
    return {
      loading: false,
      lastVolume: 0,
      syncTimer: null,
      playerStatus: {
        /**
         * 是否处于无信号状态
         * 1. 当流中断事件触发后,15秒后还没有收到ws消息
         * 2. ws关闭事件触发
         */
        noSignal: false,

        /** 是否已获取到视频分辨率 */
        gotResolution: false,

        /** 是否鼠标悬停在播放器内部 */
        playerHover: false,

        /** 是否处于全屏播放 */
        fullscreen: false,
        //
        playing: false,
        backgroud: false,
        currentTime: 0,
        recording: false,
        recordingDuration: 0,
        volume: 0,
        paused: true
      },
      playerSettings: {
        disableGl: false,

        /** canvas旋转角度 */
        rotationAngle: 0,

        /** 后台播放 */
        backgroudPlay: false,

        /** 自动拉伸 */
        autoStretch: false
      },
      timers: {
        noSignal: null,
        canvasMouseMove: null
      }
    };
  },

  computed: {
    /** @returns {string} */
    displayTitle() {
      return this.title || this.url;
    },

    /** @returns {boolean} */
    paused() {
      return this.playerStatus?.paused ?? true;
    },

    /** @returns {number} */
    volume: {
      /** @returns {number} */
      set(val) {
        if (!this.player) return;
        let volume;

        if (val >= 1) {
          volume = 1;
        } else if (val <= 0) {
          volume = 0;
        } else {
          volume = val;
        }

        if (volume === 0) {
          this.$emit('muted');
        }

        this.playerStatus.volume = this.player.volume = volume;
      },

      /** @returns {number} */
      get() {
        return this.playerStatus.volume;
      }

    },

    /** @returns {number} */
    volumePercent() {
      return parseInt(this.volume * 100);
    },

    /** @returns {string} */
    currentTimeLabel() {
      return formatTimestamp(this.playerStatus.currentTime * 1000);
    },

    /** @returns {boolean} */
    isMuted() {
      return this.volume === 0;
    },

    /** @returns {string} */
    recordingDurationLabel() {
      return formatTimestamp(this.playerStatus.recordingDuration * 1000);
    },

    /** @returns {boolean} */
    showCloseBtn() {
      return this.closeable && !this.playerStatus.fullscreen;
    },

    /** @returns {boolean} */
    showTitle() {
      return this.playerStatus.playerHover;
    },

    /** @returns {boolean} */
    hasLoadingSlot() {
      return this.$slots['loading'] || this.$scopedSlots['loading'];
    }

  },
  watch: {
    url(nval) {
      // this.rotate(0)
      // if (this.player) {
      //   this.player.setUrl(nval)
      // } else {
      //   this.initPlayer()
      // }
      this.player?.destroy();

      if (this.url == null || this.url == '') {
        this.player = null;
      } else {
        this.initPlayer();
      }
    },

    options: {
      deep: true,

      handler() {
        this.destroyPlayer();
        this.initPlayer();
      }

    },

    inBackground(nval) {
      if (nval) {
        this.intoBackground();
      } else {
        this.intoFront();
      }
    }

  },

  // #endregion
  // #region 生命周期
  mounted() {
    if (this.rootTabs) {
      this.rootTabs.$on('tab-click', tab => {
        try {
          // 处理el-tabs切换标签时,进入后台播放
          if (!tab.$el?.contains(this.$el)) {
            this.intoBackground();
            this.$emit('update:inBackground', true);
          }
        } catch (error) {}
      });
    }

    window.addEventListener('unload', () => {
      this.destroyPlayer();
    });
    this.init();
    this.syncTimer = setInterval(() => {
      if (this.player) {
        this.playerStatus.currentTime = this.player.currentTime;
      }
    }, 500);
  },

  beforeDestroy() {
    if (this.syncTimer) {
      clearInterval(this.syncTimer);
    }

    this.destroyPlayer();
  },

  // #endregion
  methods: {
    init() {
      this.initPlayer();
    },

    initPlayer() {
      if (!this.url) return;
      this.loading = true;
      let player = new jsmpeg.Player(this.url, {
        contianer: this.$refs['player-main'],
        ...this.options
      });
      this.$emit('player-loaded', player);
      let events = Object.keys(this.$listeners);

      for (let event of events) {
        player.on(event, () => {
          this.$emit(event, ...arguments);
        });
      } // #region 原生事件
      // player.on('video-decode', () => {
      //   // console.log('[JSMpegPlayer] 事件触发 -> 视频帧解码')
      // })
      // player.on('audio-decode', () => {
      //   // console.log('[JSMpegPlayer] 事件触发 -> 音频帧解码')
      // })


      player.on('play', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 播放开始');
        this.playerStatus.playing = player.isPlaying;
        this.playerStatus.paused = player.paused;
        this.loading = false;
      });
      player.on('pause', arg => {
        console.log('[JSMpegPlayer] 事件触发 -> 播放暂停');
        this.playerStatus.playing = player.isPlaying;
        this.playerStatus.paused = player.paused;
        this.loading = false;
        console.log('onPause');
      });
      player.on('stalled', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 播放停滞');
        this.playerStatus.playing = player.isPlaying;
        this.playerStatus.paused = player.paused;
      });
      player.on('ended', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 播放结束');
        this.playerStatus.currentTime = player.currentTime;
        this.playerStatus.playing = player.isPlaying;
        this.playerStatus.paused = player.paused;
      });
      player.on('source-established', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 源通道建立');
        this.playerStatus.noSignal = false;
        this.loading = false;
        clearTimeout(this.timers.noSignal);
        this.timers.noSignal = null;
      }); // player.on('source-completed', () => {
      //   console.log('[JSMpegPlayer] 事件触发 -> 源播放完成')
      //   console.log('onSourceCompleted')
      //   this.$emit('source-completed', ...arguments)
      // })
      // #endregion
      // #region 扩展事件

      player.on('resolution-decode', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 分辨率解码');
        this.playerStatus.gotResolution = true;
        this.settingPlayer('autoStretch', this.playerSettings.autoStretch);
      }); // #region 录制相关

      player.on('recording-start', () => {
        // console.log('[JSMpegPlayer] 事件触发 -> 录制器tick')
        this.playerStatus.recording = player.recorder.running;
      });
      player.on('recording-pause', () => {// console.log('[JSMpegPlayer] 事件触发 -> 录制器tick')
      });
      player.on('recording-continue', () => {// console.log('[JSMpegPlayer] 事件触发 -> 录制器tick')
      });
      player.on('recording-end', () => {
        // console.log('[JSMpegPlayer] 事件触发 -> 录制器tick')
        this.playerStatus.recording = player.recorder.running;
      });
      player.on('recording-tick', () => {
        // console.log('[JSMpegPlayer] 事件触发 -> 录制器tick')
        this.playerStatus.recordingDuration = player.recorder.duration;
      });
      player.on('recording-data', () => {// console.log('[JSMpegPlayer] 事件触发 -> 录制器tick')
      }); // #endregion

      player.on('source-connected', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 源连接');
        clearTimeout(this.timers.noSignal);
        this.loading = true;
        this.playerStatus.noSignal = false;
      });
      player.on('source-interrupt', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 源传输中断');
        this.loading = true;
        clearTimeout(this.timers.noSignal);
        this.timers.noSignal = setTimeout(this.handleNoSignal, 15000);
      });
      player.on('source-continue', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 源传输恢复/继续');
        clearTimeout(this.timers.noSignal);
        this.timers.noSignal = null;
        this.loading = false;
        this.playerStatus.noSignal = false;
      });
      player.on('source-closed', () => {
        console.log('[JSMpegPlayer] 事件触发 -> 源关闭');
        clearTimeout(this.timers.noSignal);
        this.handleNoSignal();
      }); // #endregion

      this.player = player;
      this.playerSettings.backgroudPlay = !this.options.pauseWhenHidden;

      if (this.defaultMute) {
        this.volume = 0;
      }

      this.timers.noSignal = setTimeout(this.handleNoSignal, 15000);

      for (const key in this.playerSettings) {
        this.settingPlayer(key, this.playerSettings[key]);
      }

      console.log('player', player);
    },

    // #region 方法

    /** 旋转 */
    rotate(angle, append = false) {
      this.player.rotate(angle, append);
    },

    /**
     * 进入画中画模式
     * @deprecated 未实现
     */
    requesPip() {// if (!document.pictureInPictureElement) {
      //   this.$refs.canvas.requestPictureInPicture()
      // }
    },

    /**
     * 退出画中画模式
     * @deprecated 未实现
     */
    exitPip() {// document.exitPictureInPicture()
    },

    /**
     * 切换全屏模式
     */
    toggleFullscreen() {
      if (this.playerStatus.fullscreen) {
        utils_fullscreen.exit(this.$el);
      } else {
        utils_fullscreen.request(this.$el, () => {
          this.playerStatus.fullscreen = false;
        });
      }

      this.playerStatus.fullscreen = !this.playerStatus.fullscreen;
    },

    /**
     * 切换播放模式
     */
    togglePlay() {
      if (this.paused) {
        this.play();
      } else {
        this.pause();
      }
    },

    play() {
      if (!this.url) return;
      this.loading = true;

      if (!this.player) {
        this.initPlayer();
      }

      this.player?.play();
    },

    pause() {
      this.player?.pause();
    },

    intoFront() {
      this.player?.intoFront();
    },

    intoBackground() {
      this.player?.intoBackground();
    },

    stop(clear) {
      this.player?.stop(clear);
    },

    nextFrame() {
      this.player?.nextFrame();
    },

    destroyPlayer() {
      this.stop();
      this.player?.destroy();
      this.player = null;
    },

    mute() {
      this.lastVolume = this.volume;
      this.volume = 0;
    },

    toggleMute() {
      if (this.isMuted) {
        this.volume = this.lastVolume ? this.lastVolume : 1;
      } else {
        this.mute();
      }

      this.$emit('volume-change', this.volume);
    },

    /** 截图 */
    snapshot() {
      this.player?.snapshot(this.displayTitle);
    },

    toggleRecording() {
      if (this.player?.isRecording) {
        this.player?.stopRecording(this.title);
      } else {
        this.player?.startRecording('auto');
      }
    },

    /**
     * @param
     */
    settingPlayer(optionName, value) {
      if (!this.player) return;

      switch (optionName) {
        case 'autoStretch':
          if (!this.playerStatus.gotResolution) return;
          const canvas = this.player.canvas;

          if (value) {
            if (canvas.width > canvas.height) {
              canvas.style.width = '100%';
            } else {
              canvas.style.height = '100%';
            }
          } else {
            canvas.style.width = '';
            canvas.style.height = '';
          }

          break;

        default:
          this.player?.setOption(optionName, value);
          break;
      }
    },

    // #endregion
    handleToolbar(cmd) {
      if (!this.player) return;

      switch (cmd) {
        case 'play':
          this.togglePlay();
          break;

        case 'stop':
          this.stop();
          break;

        case 'mute':
          this.toggleMute();
          break;

        case 'snapshot':
          this.snapshot();
          break;

        case 'recording':
          this.toggleRecording();
          break;

        case 'fullscreen':
          this.toggleFullscreen();
          break;
      }
    },

    handleNoSignal() {
      this.playerStatus.noSignal = true;
      this.loading = false;
      this.stop();
      this.$emit('no-signal');
    },

    handlePlayerMouseEnter() {
      this.playerStatus.playerHover = true;
    },

    handleCanvasMouseMove() {
      this.playerStatus.playerHover = true;
      clearTimeout(this.timers.canvasMouseMove);
      this.timers.canvasMouseMove = setTimeout(() => {
        this.playerStatus.playerHover = false;
      }, 3000);
    },

    handlePlayerMouseLeave() {
      clearTimeout(this.timers.canvasMouseMove);
      this.playerStatus.playerHover = false;
    },

    handleCanvasClick() {},

    handleToolbarMouseEnter() {
      this.playerStatus.playerHover = true;
      clearTimeout(this.timers.canvasMouseMove);
    },

    handleToolbarMouseLeave() {}

  }
});
;// CONCATENATED MODULE: ./src/jsmpeg-player.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_jsmpeg_playervue_type_script_lang_js_ = (jsmpeg_playervue_type_script_lang_js_); 
;// CONCATENATED MODULE: ./src/jsmpeg-player.vue



;


/* normalize component */

var jsmpeg_player_component = normalizeComponent(
  src_jsmpeg_playervue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* harmony default export */ var jsmpeg_player = (jsmpeg_player_component.exports);
;// CONCATENATED MODULE: ./src/index.js


function install(Vue) {
  if (install.installed) return;
  install.installed = true;
  Vue.component(jsmpeg_player.name, jsmpeg_player);
}
const src_plugin = {
  install
};
let GlobalVue = null;

if (typeof window !== 'undefined') {
  GlobalVue = window.Vue;
} else if (typeof __webpack_require__.g !== 'undefined') {
  GlobalVue = __webpack_require__.g.Vue;
}

if (GlobalVue) {
  GlobalVue.use(src_plugin);
}

/* harmony default export */ var src_0 = ({
  install,
  JsmpegPlayer: jsmpeg_player,
  JSMpeg: jsmpeg
});
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js


/* harmony default export */ var entry_lib = (src_0);


}();
module.exports = __webpack_exports__["default"];
/******/ })()
;