(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["vendors~about"],{

/***/ "./node_modules/@amap/amap-jsapi-loader/dist/index.js":
/*!************************************************************!*\
  !*** ./node_modules/@amap/amap-jsapi-loader/dist/index.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("(function(m,p){ true?module.exports=p():undefined})(this,function(){function m(a){var b=[];a.AMapUI&&b.push(p(a.AMapUI));a.Loca&&b.push(r(a.Loca));return Promise.all(b)}function p(a){return new Promise(function(h,c){var f=[];if(a.plugins)for(var e=0;e<a.plugins.length;e+=1)-1==d.AMapUI.plugins.indexOf(a.plugins[e])&&f.push(a.plugins[e]);if(g.AMapUI===b.failed)c(\"\\u524d\\u6b21\\u8bf7\\u6c42 AMapUI \\u5931\\u8d25\");\nelse if(g.AMapUI===b.notload){g.AMapUI=b.loading;d.AMapUI.version=a.version||d.AMapUI.version;e=d.AMapUI.version;var l=document.body||document.head,k=document.createElement(\"script\");k.type=\"text/javascript\";k.src=\"https://webapi.amap.com/ui/\"+e+\"/main.js\";k.onerror=function(a){g.AMapUI=b.failed;c(\"\\u8bf7\\u6c42 AMapUI \\u5931\\u8d25\")};k.onload=function(){g.AMapUI=b.loaded;if(f.length)window.AMapUI.loadUI(f,function(){for(var a=0,b=f.length;a<b;a++){var c=f[a].split(\"/\").slice(-1)[0];window.AMapUI[c]=\narguments[a]}for(h();n.AMapUI.length;)n.AMapUI.splice(0,1)[0]()});else for(h();n.AMapUI.length;)n.AMapUI.splice(0,1)[0]()};l.appendChild(k)}else g.AMapUI===b.loaded?a.version&&a.version!==d.AMapUI.version?c(\"\\u4e0d\\u5141\\u8bb8\\u591a\\u4e2a\\u7248\\u672c AMapUI \\u6df7\\u7528\"):f.length?window.AMapUI.loadUI(f,function(){for(var a=0,b=f.length;a<b;a++){var c=f[a].split(\"/\").slice(-1)[0];window.AMapUI[c]=arguments[a]}h()}):h():a.version&&a.version!==d.AMapUI.version?c(\"\\u4e0d\\u5141\\u8bb8\\u591a\\u4e2a\\u7248\\u672c AMapUI \\u6df7\\u7528\"):\nn.AMapUI.push(function(a){a?c(a):f.length?window.AMapUI.loadUI(f,function(){for(var a=0,b=f.length;a<b;a++){var c=f[a].split(\"/\").slice(-1)[0];window.AMapUI[c]=arguments[a]}h()}):h()})})}function r(a){return new Promise(function(h,c){if(g.Loca===b.failed)c(\"\\u524d\\u6b21\\u8bf7\\u6c42 Loca \\u5931\\u8d25\");else if(g.Loca===b.notload){g.Loca=b.loading;d.Loca.version=a.version||d.Loca.version;var f=d.Loca.version,e=d.AMap.version.startsWith(\"2\"),l=f.startsWith(\"2\");if(e&&!l||!e&&l)c(\"JSAPI \\u4e0e Loca \\u7248\\u672c\\u4e0d\\u5bf9\\u5e94\\uff01\\uff01\");\nelse{e=d.key;l=document.body||document.head;var k=document.createElement(\"script\");k.type=\"text/javascript\";k.src=\"https://webapi.amap.com/loca?v=\"+f+\"&key=\"+e;k.onerror=function(a){g.Loca=b.failed;c(\"\\u8bf7\\u6c42 AMapUI \\u5931\\u8d25\")};k.onload=function(){g.Loca=b.loaded;for(h();n.Loca.length;)n.Loca.splice(0,1)[0]()};l.appendChild(k)}}else g.Loca===b.loaded?a.version&&a.version!==d.Loca.version?c(\"\\u4e0d\\u5141\\u8bb8\\u591a\\u4e2a\\u7248\\u672c Loca \\u6df7\\u7528\"):h():a.version&&a.version!==d.Loca.version?\nc(\"\\u4e0d\\u5141\\u8bb8\\u591a\\u4e2a\\u7248\\u672c Loca \\u6df7\\u7528\"):n.Loca.push(function(a){a?c(a):c()})})}if(!window)throw Error(\"AMap JSAPI can only be used in Browser.\");var b;(function(a){a.notload=\"notload\";a.loading=\"loading\";a.loaded=\"loaded\";a.failed=\"failed\"})(b||(b={}));var d={key:\"\",AMap:{version:\"1.4.15\",plugins:[]},AMapUI:{version:\"1.1\",plugins:[]},Loca:{version:\"1.3.2\"}},g={AMap:b.notload,AMapUI:b.notload,Loca:b.notload},n={AMap:[],AMapUI:[],Loca:[]},q=[],t=function(a){\"function\"==typeof a&&\n(g.AMap===b.loaded?a(window.AMap):q.push(a))};return{load:function(a){return new Promise(function(h,c){if(g.AMap==b.failed)c(\"\");else if(g.AMap==b.notload){var f=a.key,e=a.version,l=a.plugins;f?(window.AMap&&\"lbs.amap.com\"!==location.host&&c(\"\\u7981\\u6b62\\u591a\\u79cdAPI\\u52a0\\u8f7d\\u65b9\\u5f0f\\u6df7\\u7528\"),d.key=f,d.AMap.version=e||d.AMap.version,d.AMap.plugins=l||d.AMap.plugins,g.AMap=b.loading,e=document.body||document.head,window.___onAPILoaded=function(d){delete window.___onAPILoaded;if(d)g.AMap=\nb.failed,c(d);else for(g.AMap=b.loaded,m(a).then(function(){h(window.AMap)})[\"catch\"](c);q.length;)q.splice(0,1)[0]()},l=document.createElement(\"script\"),l.type=\"text/javascript\",l.src=\"https://webapi.amap.com/maps?callback=___onAPILoaded&v=\"+d.AMap.version+\"&key=\"+f+\"&plugin=\"+d.AMap.plugins.join(\",\"),l.onerror=function(a){g.AMap=b.failed;c(a)},e.appendChild(l)):c(\"\\u8bf7\\u586b\\u5199key\")}else if(g.AMap==b.loaded)if(a.key&&a.key!==d.key)c(\"\\u591a\\u4e2a\\u4e0d\\u4e00\\u81f4\\u7684 key\");else if(a.version&&\na.version!==d.AMap.version)c(\"\\u4e0d\\u5141\\u8bb8\\u591a\\u4e2a\\u7248\\u672c JSAPI \\u6df7\\u7528\");else{f=[];if(a.plugins)for(e=0;e<a.plugins.length;e+=1)-1==d.AMap.plugins.indexOf(a.plugins[e])&&f.push(a.plugins[e]);if(f.length)window.AMap.plugin(f,function(){m(a).then(function(){h(window.AMap)})[\"catch\"](c)});else m(a).then(function(){h(window.AMap)})[\"catch\"](c)}else if(a.key&&a.key!==d.key)c(\"\\u591a\\u4e2a\\u4e0d\\u4e00\\u81f4\\u7684 key\");else if(a.version&&a.version!==d.AMap.version)c(\"\\u4e0d\\u5141\\u8bb8\\u591a\\u4e2a\\u7248\\u672c JSAPI \\u6df7\\u7528\");\nelse{var k=[];if(a.plugins)for(e=0;e<a.plugins.length;e+=1)-1==d.AMap.plugins.indexOf(a.plugins[e])&&k.push(a.plugins[e]);t(function(){if(k.length)window.AMap.plugin(k,function(){m(a).then(function(){h(window.AMap)})[\"catch\"](c)});else m(a).then(function(){h(window.AMap)})[\"catch\"](c)})}})},reset:function(){delete window.AMap;delete window.AMapUI;delete window.Loca;d={key:\"\",AMap:{version:\"1.4.15\",plugins:[]},AMapUI:{version:\"1.1\",plugins:[]},Loca:{version:\"1.3.2\"}};g={AMap:b.notload,AMapUI:b.notload,\nLoca:b.notload};n={AMap:[],AMapUI:[],Loca:[]}}}})\n\n\n//# sourceURL=webpack:///./node_modules/@amap/amap-jsapi-loader/dist/index.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n  return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithHoles.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _arrayWithoutHoles(arr) {\n  if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\nmodule.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js":
/*!***************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ \"./node_modules/@babel/runtime/helpers/toPropertyKey.js\");\nfunction _defineProperty(obj, key, value) {\n  key = toPropertyKey(key);\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/defineProperty.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/construct.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/construct.js ***!
  \**************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _construct; });\n/* harmony import */ var core_js_modules_es_reflect_to_string_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.reflect.to-string-tag.js */ \"./node_modules/core-js/modules/es.reflect.to-string-tag.js\");\n/* harmony import */ var core_js_modules_es_reflect_to_string_tag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_to_string_tag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n/* harmony import */ var _isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isNativeReflectConstruct.js */ \"./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js\");\n\n\n\n\nfunction _construct(Parent, args, Class) {\n  if (Object(_isNativeReflectConstruct_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])()) {\n    _construct = Reflect.construct.bind();\n  } else {\n    _construct = function _construct(Parent, args, Class) {\n      var a = [null];\n      a.push.apply(a, args);\n      var Constructor = Function.bind.apply(Parent, a);\n      var instance = new Constructor();\n      if (Class) Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(instance, Class.prototype);\n      return instance;\n    };\n  }\n  return _construct.apply(null, arguments);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/construct.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***!
  \*****************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _isNativeReflectConstruct; });\n/* harmony import */ var core_js_modules_es_reflect_to_string_tag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.reflect.to-string-tag.js */ \"./node_modules/core-js/modules/es.reflect.to-string-tag.js\");\n/* harmony import */ var core_js_modules_es_reflect_to_string_tag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_to_string_tag_js__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction _isNativeReflectConstruct() {\n  if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n  if (Reflect.construct.sham) return false;\n  if (typeof Proxy === \"function\") return true;\n  try {\n    Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n    return true;\n  } catch (e) {\n    return false;\n  }\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
/*!*******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
  \*******************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _setPrototypeOf; });\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function _iterableToArray(iter) {\n  if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\nmodule.exports = _iterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
/*!*********************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\nfunction _iterableToArrayLimit(arr, i) {\n  var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n  if (null != _i) {\n    var _s,\n      _e,\n      _x,\n      _r,\n      _arr = [],\n      _n = !0,\n      _d = !1;\n    try {\n      if (_x = (_i = _i.call(arr)).next, 0 === i) {\n        if (Object(_i) !== _i) return;\n        _n = !1;\n      } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n    } catch (err) {\n      _d = !0, _e = err;\n    } finally {\n      try {\n        if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n      } finally {\n        if (_d) throw _e;\n      }\n    }\n    return _arr;\n  }\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js":
/*!****************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\nfunction _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableRest.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\nfunction _nonIterableSpread() {\n  throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/slicedToArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
/*!******************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ \"./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js\");\nvar iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ \"./node_modules/@babel/runtime/helpers/iterableToArray.js\");\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\nvar nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ \"./node_modules/@babel/runtime/helpers/nonIterableSpread.js\");\nfunction _toConsumableArray(arr) {\n  return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\nmodule.exports = _toConsumableArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/toPrimitive.js":
/*!************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("__webpack_require__(/*! core-js/modules/es.error.cause.js */ \"./node_modules/core-js/modules/es.error.cause.js\");\nvar _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nfunction _toPrimitive(input, hint) {\n  if (_typeof(input) !== \"object\" || input === null) return input;\n  var prim = input[Symbol.toPrimitive];\n  if (prim !== undefined) {\n    var res = prim.call(input, hint || \"default\");\n    if (_typeof(res) !== \"object\") return res;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (hint === \"string\" ? String : Number)(input);\n}\nmodule.exports = _toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/toPrimitive.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/toPropertyKey.js":
/*!**************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var _typeof = __webpack_require__(/*! ./typeof.js */ \"./node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"];\nvar toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ \"./node_modules/@babel/runtime/helpers/toPrimitive.js\");\nfunction _toPropertyKey(arg) {\n  var key = toPrimitive(arg, \"string\");\n  return _typeof(key) === \"symbol\" ? key : String(key);\n}\nmodule.exports = _toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/toPropertyKey.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
/*!*******************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/typeof.js?");

/***/ }),

/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
/*!***************************************************************************!*\
  !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js?");

/***/ }),

/***/ "./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.cjs.js":
/*!*************************************************************************!*\
  !*** ./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.cjs.js ***!
  \*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/*!\n * vue-treeselect v0.4.0 | (c) 2017-2019 Riophae Lee\n * Released under the MIT License.\n * https://vue-treeselect.js.org/\n */\nmodule.exports =\n/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 16);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ \"./node_modules/@babel/runtime/helpers/slicedToArray.js\");\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/toConsumableArray.js\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! fuzzysearch */ \"./node_modules/fuzzysearch/index.js\");\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! lodash/noop */ \"./node_modules/lodash/noop.js\");\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\");\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! watch-size */ \"./node_modules/watch-size/index.es.mjs\");\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! is-promise */ \"./node_modules/is-promise/index.js\");\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! lodash/once */ \"./node_modules/lodash/once.js\");\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! lodash/identity */ \"./node_modules/lodash/identity.js\");\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! lodash/constant */ \"./node_modules/lodash/constant.js\");\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\");\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! lodash/last */ \"./node_modules/lodash/last.js\");\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! babel-helper-vue-jsx-merge-props */ \"./node_modules/babel-helper-vue-jsx-merge-props/index.js\");\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n// extracted by mini-css-extract-plugin\n\n/***/ }),\n/* 16 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: external \"@babel/runtime/helpers/slicedToArray\"\nvar slicedToArray_ = __webpack_require__(0);\nvar slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray_);\n\n// EXTERNAL MODULE: external \"@babel/runtime/helpers/toConsumableArray\"\nvar toConsumableArray_ = __webpack_require__(1);\nvar toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray_);\n\n// EXTERNAL MODULE: external \"@babel/runtime/helpers/defineProperty\"\nvar defineProperty_ = __webpack_require__(2);\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty_);\n\n// EXTERNAL MODULE: external \"fuzzysearch\"\nvar external_fuzzysearch_ = __webpack_require__(3);\nvar external_fuzzysearch_default = /*#__PURE__*/__webpack_require__.n(external_fuzzysearch_);\n\n// EXTERNAL MODULE: external \"lodash/noop\"\nvar noop_ = __webpack_require__(4);\nvar noop_default = /*#__PURE__*/__webpack_require__.n(noop_);\n\n// CONCATENATED MODULE: ./src/utils/noop.js\n\n// CONCATENATED MODULE: ./src/utils/warning.js\n\n\nvar warning_warning =  false ? undefined : function warning(checker, complainer) {\n  if (!checker()) {\n    var _console;\n\n    var message = ['[Vue-Treeselect Warning]'].concat(complainer());\n\n    (_console = console).error.apply(_console, toConsumableArray_default()(message));\n  }\n};\n// CONCATENATED MODULE: ./src/utils/onLeftClick.js\nfunction onLeftClick(mouseDownHandler) {\n  return function onMouseDown(evt) {\n    if (evt.type === 'mousedown' && evt.button === 0) {\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      mouseDownHandler.call.apply(mouseDownHandler, [this, evt].concat(args));\n    }\n  };\n}\n// CONCATENATED MODULE: ./src/utils/scrollIntoView.js\nfunction scrollIntoView($scrollingEl, $focusedEl) {\n  var scrollingReact = $scrollingEl.getBoundingClientRect();\n  var focusedRect = $focusedEl.getBoundingClientRect();\n  var overScroll = $focusedEl.offsetHeight / 3;\n\n  if (focusedRect.bottom + overScroll > scrollingReact.bottom) {\n    $scrollingEl.scrollTop = Math.min($focusedEl.offsetTop + $focusedEl.clientHeight - $scrollingEl.offsetHeight + overScroll, $scrollingEl.scrollHeight);\n  } else if (focusedRect.top - overScroll < scrollingReact.top) {\n    $scrollingEl.scrollTop = Math.max($focusedEl.offsetTop - overScroll, 0);\n  }\n}\n// EXTERNAL MODULE: external \"lodash/debounce\"\nvar debounce_ = __webpack_require__(5);\nvar debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);\n\n// CONCATENATED MODULE: ./src/utils/debounce.js\n\n// EXTERNAL MODULE: external \"watch-size\"\nvar external_watch_size_ = __webpack_require__(6);\nvar external_watch_size_default = /*#__PURE__*/__webpack_require__.n(external_watch_size_);\n\n// CONCATENATED MODULE: ./src/utils/removeFromArray.js\nfunction removeFromArray(arr, elem) {\n  var idx = arr.indexOf(elem);\n  if (idx !== -1) arr.splice(idx, 1);\n}\n// CONCATENATED MODULE: ./src/utils/watchSize.js\n\n\nvar intervalId;\nvar registered = [];\nvar INTERVAL_DURATION = 100;\n\nfunction run() {\n  intervalId = setInterval(function () {\n    registered.forEach(test);\n  }, INTERVAL_DURATION);\n}\n\nfunction stop() {\n  clearInterval(intervalId);\n  intervalId = null;\n}\n\nfunction test(item) {\n  var $el = item.$el,\n      listener = item.listener,\n      lastWidth = item.lastWidth,\n      lastHeight = item.lastHeight;\n  var width = $el.offsetWidth;\n  var height = $el.offsetHeight;\n\n  if (lastWidth !== width || lastHeight !== height) {\n    item.lastWidth = width;\n    item.lastHeight = height;\n    listener({\n      width: width,\n      height: height\n    });\n  }\n}\n\nfunction watchSizeForIE9($el, listener) {\n  var item = {\n    $el: $el,\n    listener: listener,\n    lastWidth: null,\n    lastHeight: null\n  };\n\n  var unwatch = function unwatch() {\n    removeFromArray(registered, item);\n    if (!registered.length) stop();\n  };\n\n  registered.push(item);\n  test(item);\n  run();\n  return unwatch;\n}\n\nfunction watchSize($el, listener) {\n  var isIE9 = document.documentMode === 9;\n  var locked = true;\n\n  var wrappedListener = function wrappedListener() {\n    return locked || listener.apply(void 0, arguments);\n  };\n\n  var implementation = isIE9 ? watchSizeForIE9 : external_watch_size_default.a;\n  var removeSizeWatcher = implementation($el, wrappedListener);\n  locked = false;\n  return removeSizeWatcher;\n}\n// CONCATENATED MODULE: ./src/utils/setupResizeAndScrollEventListeners.js\nfunction findScrollParents($el) {\n  var $scrollParents = [];\n  var $parent = $el.parentNode;\n\n  while ($parent && $parent.nodeName !== 'BODY' && $parent.nodeType === document.ELEMENT_NODE) {\n    if (isScrollElment($parent)) $scrollParents.push($parent);\n    $parent = $parent.parentNode;\n  }\n\n  $scrollParents.push(window);\n  return $scrollParents;\n}\n\nfunction isScrollElment($el) {\n  var _getComputedStyle = getComputedStyle($el),\n      overflow = _getComputedStyle.overflow,\n      overflowX = _getComputedStyle.overflowX,\n      overflowY = _getComputedStyle.overflowY;\n\n  return /(auto|scroll|overlay)/.test(overflow + overflowY + overflowX);\n}\n\nfunction setupResizeAndScrollEventListeners($el, listener) {\n  var $scrollParents = findScrollParents($el);\n  window.addEventListener('resize', listener, {\n    passive: true\n  });\n  $scrollParents.forEach(function (scrollParent) {\n    scrollParent.addEventListener('scroll', listener, {\n      passive: true\n    });\n  });\n  return function removeEventListeners() {\n    window.removeEventListener('resize', listener, {\n      passive: true\n    });\n    $scrollParents.forEach(function ($scrollParent) {\n      $scrollParent.removeEventListener('scroll', listener, {\n        passive: true\n      });\n    });\n  };\n}\n// CONCATENATED MODULE: ./src/utils/isNaN.js\nfunction isNaN_isNaN(x) {\n  return x !== x;\n}\n// EXTERNAL MODULE: external \"is-promise\"\nvar external_is_promise_ = __webpack_require__(7);\nvar external_is_promise_default = /*#__PURE__*/__webpack_require__.n(external_is_promise_);\n\n// CONCATENATED MODULE: ./src/utils/isPromise.js\n\n// EXTERNAL MODULE: external \"lodash/once\"\nvar once_ = __webpack_require__(8);\nvar once_default = /*#__PURE__*/__webpack_require__.n(once_);\n\n// CONCATENATED MODULE: ./src/utils/once.js\n\n// EXTERNAL MODULE: external \"lodash/identity\"\nvar identity_ = __webpack_require__(9);\nvar identity_default = /*#__PURE__*/__webpack_require__.n(identity_);\n\n// CONCATENATED MODULE: ./src/utils/identity.js\n\n// EXTERNAL MODULE: external \"lodash/constant\"\nvar constant_ = __webpack_require__(10);\nvar constant_default = /*#__PURE__*/__webpack_require__.n(constant_);\n\n// CONCATENATED MODULE: ./src/utils/constant.js\n\n// CONCATENATED MODULE: ./src/utils/createMap.js\nvar createMap = function createMap() {\n  return Object.create(null);\n};\n// EXTERNAL MODULE: external \"@babel/runtime/helpers/typeof\"\nvar typeof_ = __webpack_require__(11);\nvar typeof_default = /*#__PURE__*/__webpack_require__.n(typeof_);\n\n// CONCATENATED MODULE: ./src/utils/deepExtend.js\n\n\nfunction isPlainObject(value) {\n  if (value == null || typeof_default()(value) !== 'object') return false;\n  return Object.getPrototypeOf(value) === Object.prototype;\n}\n\nfunction copy(obj, key, value) {\n  if (isPlainObject(value)) {\n    obj[key] || (obj[key] = {});\n    deepExtend(obj[key], value);\n  } else {\n    obj[key] = value;\n  }\n}\n\nfunction deepExtend(target, source) {\n  if (isPlainObject(source)) {\n    var keys = Object.keys(source);\n\n    for (var i = 0, len = keys.length; i < len; i++) {\n      copy(target, keys[i], source[keys[i]]);\n    }\n  }\n\n  return target;\n}\n// EXTERNAL MODULE: external \"lodash/last\"\nvar last_ = __webpack_require__(12);\nvar last_default = /*#__PURE__*/__webpack_require__.n(last_);\n\n// CONCATENATED MODULE: ./src/utils/last.js\n\n// CONCATENATED MODULE: ./src/utils/includes.js\nfunction includes(arrOrStr, elem) {\n  return arrOrStr.indexOf(elem) !== -1;\n}\n// CONCATENATED MODULE: ./src/utils/find.js\nfunction find(arr, predicate, ctx) {\n  for (var i = 0, len = arr.length; i < len; i++) {\n    if (predicate.call(ctx, arr[i], i, arr)) return arr[i];\n  }\n\n  return undefined;\n}\n// CONCATENATED MODULE: ./src/utils/quickDiff.js\nfunction quickDiff(arrA, arrB) {\n  if (arrA.length !== arrB.length) return true;\n\n  for (var i = 0; i < arrA.length; i++) {\n    if (arrA[i] !== arrB[i]) return true;\n  }\n\n  return false;\n}\n// CONCATENATED MODULE: ./src/utils/index.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// CONCATENATED MODULE: ./src/constants.js\nvar NO_PARENT_NODE = null;\nvar UNCHECKED = 0;\nvar INDETERMINATE = 1;\nvar CHECKED = 2;\nvar ALL_CHILDREN = 'ALL_CHILDREN';\nvar ALL_DESCENDANTS = 'ALL_DESCENDANTS';\nvar LEAF_CHILDREN = 'LEAF_CHILDREN';\nvar LEAF_DESCENDANTS = 'LEAF_DESCENDANTS';\nvar LOAD_ROOT_OPTIONS = 'LOAD_ROOT_OPTIONS';\nvar LOAD_CHILDREN_OPTIONS = 'LOAD_CHILDREN_OPTIONS';\nvar ASYNC_SEARCH = 'ASYNC_SEARCH';\nvar ALL = 'ALL';\nvar BRANCH_PRIORITY = 'BRANCH_PRIORITY';\nvar LEAF_PRIORITY = 'LEAF_PRIORITY';\nvar ALL_WITH_INDETERMINATE = 'ALL_WITH_INDETERMINATE';\nvar ORDER_SELECTED = 'ORDER_SELECTED';\nvar LEVEL = 'LEVEL';\nvar INDEX = 'INDEX';\nvar KEY_CODES = {\n  BACKSPACE: 8,\n  ENTER: 13,\n  ESCAPE: 27,\n  END: 35,\n  HOME: 36,\n  ARROW_LEFT: 37,\n  ARROW_UP: 38,\n  ARROW_RIGHT: 39,\n  ARROW_DOWN: 40,\n  DELETE: 46\n};\nvar INPUT_DEBOUNCE_DELAY =  false ? undefined : 200;\nvar MIN_INPUT_WIDTH = 5;\nvar MENU_BUFFER = 40;\n// CONCATENATED MODULE: ./src/mixins/treeselectMixin.js\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\n\n\nfunction sortValueByIndex(a, b) {\n  var i = 0;\n\n  do {\n    if (a.level < i) return -1;\n    if (b.level < i) return 1;\n    if (a.index[i] !== b.index[i]) return a.index[i] - b.index[i];\n    i++;\n  } while (true);\n}\n\nfunction sortValueByLevel(a, b) {\n  return a.level === b.level ? sortValueByIndex(a, b) : a.level - b.level;\n}\n\nfunction createAsyncOptionsStates() {\n  return {\n    isLoaded: false,\n    isLoading: false,\n    loadingError: ''\n  };\n}\n\nfunction stringifyOptionPropValue(value) {\n  if (typeof value === 'string') return value;\n  if (typeof value === 'number' && !isNaN_isNaN(value)) return value + '';\n  return '';\n}\n\nfunction match(enableFuzzyMatch, needle, haystack) {\n  return enableFuzzyMatch ? external_fuzzysearch_default()(needle, haystack) : includes(haystack, needle);\n}\n\nfunction getErrorMessage(err) {\n  return err.message || String(err);\n}\n\nvar instanceId = 0;\n/* harmony default export */ var treeselectMixin = ({\n  provide: function provide() {\n    return {\n      instance: this\n    };\n  },\n  props: {\n    allowClearingDisabled: {\n      type: Boolean,\n      default: false\n    },\n    allowSelectingDisabledDescendants: {\n      type: Boolean,\n      default: false\n    },\n    alwaysOpen: {\n      type: Boolean,\n      default: false\n    },\n    appendToBody: {\n      type: Boolean,\n      default: false\n    },\n    async: {\n      type: Boolean,\n      default: false\n    },\n    autoFocus: {\n      type: Boolean,\n      default: false\n    },\n    autoLoadRootOptions: {\n      type: Boolean,\n      default: true\n    },\n    autoDeselectAncestors: {\n      type: Boolean,\n      default: false\n    },\n    autoDeselectDescendants: {\n      type: Boolean,\n      default: false\n    },\n    autoSelectAncestors: {\n      type: Boolean,\n      default: false\n    },\n    autoSelectDescendants: {\n      type: Boolean,\n      default: false\n    },\n    backspaceRemoves: {\n      type: Boolean,\n      default: true\n    },\n    beforeClearAll: {\n      type: Function,\n      default: constant_default()(true)\n    },\n    branchNodesFirst: {\n      type: Boolean,\n      default: false\n    },\n    cacheOptions: {\n      type: Boolean,\n      default: true\n    },\n    clearable: {\n      type: Boolean,\n      default: true\n    },\n    clearAllText: {\n      type: String,\n      default: 'Clear all'\n    },\n    clearOnSelect: {\n      type: Boolean,\n      default: false\n    },\n    clearValueText: {\n      type: String,\n      default: 'Clear value'\n    },\n    closeOnSelect: {\n      type: Boolean,\n      default: true\n    },\n    defaultExpandLevel: {\n      type: Number,\n      default: 0\n    },\n    defaultOptions: {\n      default: false\n    },\n    deleteRemoves: {\n      type: Boolean,\n      default: true\n    },\n    delimiter: {\n      type: String,\n      default: ','\n    },\n    flattenSearchResults: {\n      type: Boolean,\n      default: false\n    },\n    disableBranchNodes: {\n      type: Boolean,\n      default: false\n    },\n    disabled: {\n      type: Boolean,\n      default: false\n    },\n    disableFuzzyMatching: {\n      type: Boolean,\n      default: false\n    },\n    flat: {\n      type: Boolean,\n      default: false\n    },\n    instanceId: {\n      default: function _default() {\n        return \"\".concat(instanceId++, \"$$\");\n      },\n      type: [String, Number]\n    },\n    joinValues: {\n      type: Boolean,\n      default: false\n    },\n    limit: {\n      type: Number,\n      default: Infinity\n    },\n    limitText: {\n      type: Function,\n      default: function limitTextDefault(count) {\n        return \"and \".concat(count, \" more\");\n      }\n    },\n    loadingText: {\n      type: String,\n      default: 'Loading...'\n    },\n    loadOptions: {\n      type: Function\n    },\n    matchKeys: {\n      type: Array,\n      default: constant_default()(['label'])\n    },\n    maxHeight: {\n      type: Number,\n      default: 300\n    },\n    multiple: {\n      type: Boolean,\n      default: false\n    },\n    name: {\n      type: String\n    },\n    noChildrenText: {\n      type: String,\n      default: 'No sub-options.'\n    },\n    noOptionsText: {\n      type: String,\n      default: 'No options available.'\n    },\n    noResultsText: {\n      type: String,\n      default: 'No results found...'\n    },\n    normalizer: {\n      type: Function,\n      default: identity_default.a\n    },\n    openDirection: {\n      type: String,\n      default: 'auto',\n      validator: function validator(value) {\n        var acceptableValues = ['auto', 'top', 'bottom', 'above', 'below'];\n        return includes(acceptableValues, value);\n      }\n    },\n    openOnClick: {\n      type: Boolean,\n      default: true\n    },\n    openOnFocus: {\n      type: Boolean,\n      default: false\n    },\n    options: {\n      type: Array\n    },\n    placeholder: {\n      type: String,\n      default: 'Select...'\n    },\n    required: {\n      type: Boolean,\n      default: false\n    },\n    retryText: {\n      type: String,\n      default: 'Retry?'\n    },\n    retryTitle: {\n      type: String,\n      default: 'Click to retry'\n    },\n    searchable: {\n      type: Boolean,\n      default: true\n    },\n    searchNested: {\n      type: Boolean,\n      default: false\n    },\n    searchPromptText: {\n      type: String,\n      default: 'Type to search...'\n    },\n    showCount: {\n      type: Boolean,\n      default: false\n    },\n    showCountOf: {\n      type: String,\n      default: ALL_CHILDREN,\n      validator: function validator(value) {\n        var acceptableValues = [ALL_CHILDREN, ALL_DESCENDANTS, LEAF_CHILDREN, LEAF_DESCENDANTS];\n        return includes(acceptableValues, value);\n      }\n    },\n    showCountOnSearch: null,\n    sortValueBy: {\n      type: String,\n      default: ORDER_SELECTED,\n      validator: function validator(value) {\n        var acceptableValues = [ORDER_SELECTED, LEVEL, INDEX];\n        return includes(acceptableValues, value);\n      }\n    },\n    tabIndex: {\n      type: Number,\n      default: 0\n    },\n    value: null,\n    valueConsistsOf: {\n      type: String,\n      default: BRANCH_PRIORITY,\n      validator: function validator(value) {\n        var acceptableValues = [ALL, BRANCH_PRIORITY, LEAF_PRIORITY, ALL_WITH_INDETERMINATE];\n        return includes(acceptableValues, value);\n      }\n    },\n    valueFormat: {\n      type: String,\n      default: 'id'\n    },\n    zIndex: {\n      type: [Number, String],\n      default: 999\n    }\n  },\n  data: function data() {\n    return {\n      trigger: {\n        isFocused: false,\n        searchQuery: ''\n      },\n      menu: {\n        isOpen: false,\n        current: null,\n        lastScrollPosition: 0,\n        placement: 'bottom'\n      },\n      forest: {\n        normalizedOptions: [],\n        nodeMap: createMap(),\n        checkedStateMap: createMap(),\n        selectedNodeIds: this.extractCheckedNodeIdsFromValue(),\n        selectedNodeMap: createMap()\n      },\n      rootOptionsStates: createAsyncOptionsStates(),\n      localSearch: {\n        active: false,\n        noResults: true,\n        countMap: createMap()\n      },\n      remoteSearch: createMap()\n    };\n  },\n  computed: {\n    selectedNodes: function selectedNodes() {\n      return this.forest.selectedNodeIds.map(this.getNode);\n    },\n    internalValue: function internalValue() {\n      var _this = this;\n\n      var internalValue;\n\n      if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\n        internalValue = this.forest.selectedNodeIds.slice();\n      } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\n        internalValue = this.forest.selectedNodeIds.filter(function (id) {\n          var node = _this.getNode(id);\n\n          if (node.isRootNode) return true;\n          return !_this.isSelected(node.parentNode);\n        });\n      } else if (this.valueConsistsOf === LEAF_PRIORITY) {\n        internalValue = this.forest.selectedNodeIds.filter(function (id) {\n          var node = _this.getNode(id);\n\n          if (node.isLeaf) return true;\n          return node.children.length === 0;\n        });\n      } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\n        var _internalValue;\n\n        var indeterminateNodeIds = [];\n        internalValue = this.forest.selectedNodeIds.slice();\n        this.selectedNodes.forEach(function (selectedNode) {\n          selectedNode.ancestors.forEach(function (ancestor) {\n            if (includes(indeterminateNodeIds, ancestor.id)) return;\n            if (includes(internalValue, ancestor.id)) return;\n            indeterminateNodeIds.push(ancestor.id);\n          });\n        });\n\n        (_internalValue = internalValue).push.apply(_internalValue, indeterminateNodeIds);\n      }\n\n      if (this.sortValueBy === LEVEL) {\n        internalValue.sort(function (a, b) {\n          return sortValueByLevel(_this.getNode(a), _this.getNode(b));\n        });\n      } else if (this.sortValueBy === INDEX) {\n        internalValue.sort(function (a, b) {\n          return sortValueByIndex(_this.getNode(a), _this.getNode(b));\n        });\n      }\n\n      return internalValue;\n    },\n    hasValue: function hasValue() {\n      return this.internalValue.length > 0;\n    },\n    single: function single() {\n      return !this.multiple;\n    },\n    visibleOptionIds: function visibleOptionIds() {\n      var _this2 = this;\n\n      var visibleOptionIds = [];\n      this.traverseAllNodesByIndex(function (node) {\n        if (!_this2.localSearch.active || _this2.shouldOptionBeIncludedInSearchResult(node)) {\n          visibleOptionIds.push(node.id);\n        }\n\n        if (node.isBranch && !_this2.shouldExpand(node)) {\n          return false;\n        }\n      });\n      return visibleOptionIds;\n    },\n    hasVisibleOptions: function hasVisibleOptions() {\n      return this.visibleOptionIds.length !== 0;\n    },\n    showCountOnSearchComputed: function showCountOnSearchComputed() {\n      return typeof this.showCountOnSearch === 'boolean' ? this.showCountOnSearch : this.showCount;\n    },\n    hasBranchNodes: function hasBranchNodes() {\n      return this.forest.normalizedOptions.some(function (rootNode) {\n        return rootNode.isBranch;\n      });\n    },\n    shouldFlattenOptions: function shouldFlattenOptions() {\n      return this.localSearch.active && this.flattenSearchResults;\n    }\n  },\n  watch: {\n    alwaysOpen: function alwaysOpen(newValue) {\n      if (newValue) this.openMenu();else this.closeMenu();\n    },\n    branchNodesFirst: function branchNodesFirst() {\n      this.initialize();\n    },\n    disabled: function disabled(newValue) {\n      if (newValue && this.menu.isOpen) this.closeMenu();else if (!newValue && !this.menu.isOpen && this.alwaysOpen) this.openMenu();\n    },\n    flat: function flat() {\n      this.initialize();\n    },\n    internalValue: function internalValue(newValue, oldValue) {\n      var hasChanged = quickDiff(newValue, oldValue);\n      if (hasChanged) this.$emit('input', this.getValue(), this.getInstanceId());\n    },\n    matchKeys: function matchKeys() {\n      this.initialize();\n    },\n    multiple: function multiple(newValue) {\n      if (newValue) this.buildForestState();\n    },\n    options: {\n      handler: function handler() {\n        if (this.async) return;\n        this.initialize();\n        this.rootOptionsStates.isLoaded = Array.isArray(this.options);\n      },\n      deep: true,\n      immediate: true\n    },\n    'trigger.searchQuery': function triggerSearchQuery() {\n      if (this.async) {\n        this.handleRemoteSearch();\n      } else {\n        this.handleLocalSearch();\n      }\n\n      this.$emit('search-change', this.trigger.searchQuery, this.getInstanceId());\n    },\n    value: function value() {\n      var nodeIdsFromValue = this.extractCheckedNodeIdsFromValue();\n      var hasChanged = quickDiff(nodeIdsFromValue, this.internalValue);\n      if (hasChanged) this.fixSelectedNodeIds(nodeIdsFromValue);\n    }\n  },\n  methods: {\n    verifyProps: function verifyProps() {\n      var _this3 = this;\n\n      warning_warning(function () {\n        return _this3.async ? _this3.searchable : true;\n      }, function () {\n        return 'For async search mode, the value of \"searchable\" prop must be true.';\n      });\n\n      if (this.options == null && !this.loadOptions) {\n        warning_warning(function () {\n          return false;\n        }, function () {\n          return 'Are you meant to dynamically load options? You need to use \"loadOptions\" prop.';\n        });\n      }\n\n      if (this.flat) {\n        warning_warning(function () {\n          return _this3.multiple;\n        }, function () {\n          return 'You are using flat mode. But you forgot to add \"multiple=true\"?';\n        });\n      }\n\n      if (!this.flat) {\n        var propNames = ['autoSelectAncestors', 'autoSelectDescendants', 'autoDeselectAncestors', 'autoDeselectDescendants'];\n        propNames.forEach(function (propName) {\n          warning_warning(function () {\n            return !_this3[propName];\n          }, function () {\n            return \"\\\"\".concat(propName, \"\\\" only applies to flat mode.\");\n          });\n        });\n      }\n    },\n    resetFlags: function resetFlags() {\n      this._blurOnSelect = false;\n    },\n    initialize: function initialize() {\n      var options = this.async ? this.getRemoteSearchEntry().options : this.options;\n\n      if (Array.isArray(options)) {\n        var prevNodeMap = this.forest.nodeMap;\n        this.forest.nodeMap = createMap();\n        this.keepDataOfSelectedNodes(prevNodeMap);\n        this.forest.normalizedOptions = this.normalize(NO_PARENT_NODE, options, prevNodeMap);\n        this.fixSelectedNodeIds(this.internalValue);\n      } else {\n        this.forest.normalizedOptions = [];\n      }\n    },\n    getInstanceId: function getInstanceId() {\n      return this.instanceId == null ? this.id : this.instanceId;\n    },\n    getValue: function getValue() {\n      var _this4 = this;\n\n      if (this.valueFormat === 'id') {\n        return this.multiple ? this.internalValue.slice() : this.internalValue[0];\n      }\n\n      var rawNodes = this.internalValue.map(function (id) {\n        return _this4.getNode(id).raw;\n      });\n      return this.multiple ? rawNodes : rawNodes[0];\n    },\n    getNode: function getNode(nodeId) {\n      warning_warning(function () {\n        return nodeId != null;\n      }, function () {\n        return \"Invalid node id: \".concat(nodeId);\n      });\n      if (nodeId == null) return null;\n      return nodeId in this.forest.nodeMap ? this.forest.nodeMap[nodeId] : this.createFallbackNode(nodeId);\n    },\n    createFallbackNode: function createFallbackNode(id) {\n      var raw = this.extractNodeFromValue(id);\n      var label = this.enhancedNormalizer(raw).label || \"\".concat(id, \" (unknown)\");\n      var fallbackNode = {\n        id: id,\n        label: label,\n        ancestors: [],\n        parentNode: NO_PARENT_NODE,\n        isFallbackNode: true,\n        isRootNode: true,\n        isLeaf: true,\n        isBranch: false,\n        isDisabled: false,\n        isNew: false,\n        index: [-1],\n        level: 0,\n        raw: raw\n      };\n      return this.$set(this.forest.nodeMap, id, fallbackNode);\n    },\n    extractCheckedNodeIdsFromValue: function extractCheckedNodeIdsFromValue() {\n      var _this5 = this;\n\n      if (this.value == null) return [];\n\n      if (this.valueFormat === 'id') {\n        return this.multiple ? this.value.slice() : [this.value];\n      }\n\n      return (this.multiple ? this.value : [this.value]).map(function (node) {\n        return _this5.enhancedNormalizer(node);\n      }).map(function (node) {\n        return node.id;\n      });\n    },\n    extractNodeFromValue: function extractNodeFromValue(id) {\n      var _this6 = this;\n\n      var defaultNode = {\n        id: id\n      };\n\n      if (this.valueFormat === 'id') {\n        return defaultNode;\n      }\n\n      var valueArray = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : [];\n      var matched = find(valueArray, function (node) {\n        return node && _this6.enhancedNormalizer(node).id === id;\n      });\n      return matched || defaultNode;\n    },\n    fixSelectedNodeIds: function fixSelectedNodeIds(nodeIdListOfPrevValue) {\n      var _this7 = this;\n\n      var nextSelectedNodeIds = [];\n\n      if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === ALL) {\n        nextSelectedNodeIds = nodeIdListOfPrevValue;\n      } else if (this.valueConsistsOf === BRANCH_PRIORITY) {\n        nodeIdListOfPrevValue.forEach(function (nodeId) {\n          nextSelectedNodeIds.push(nodeId);\n\n          var node = _this7.getNode(nodeId);\n\n          if (node.isBranch) _this7.traverseDescendantsBFS(node, function (descendant) {\n            nextSelectedNodeIds.push(descendant.id);\n          });\n        });\n      } else if (this.valueConsistsOf === LEAF_PRIORITY) {\n        var map = createMap();\n        var queue = nodeIdListOfPrevValue.slice();\n\n        while (queue.length) {\n          var nodeId = queue.shift();\n          var node = this.getNode(nodeId);\n          nextSelectedNodeIds.push(nodeId);\n          if (node.isRootNode) continue;\n          if (!(node.parentNode.id in map)) map[node.parentNode.id] = node.parentNode.children.length;\n          if (--map[node.parentNode.id] === 0) queue.push(node.parentNode.id);\n        }\n      } else if (this.valueConsistsOf === ALL_WITH_INDETERMINATE) {\n        var _map = createMap();\n\n        var _queue = nodeIdListOfPrevValue.filter(function (nodeId) {\n          var node = _this7.getNode(nodeId);\n\n          return node.isLeaf || node.children.length === 0;\n        });\n\n        while (_queue.length) {\n          var _nodeId = _queue.shift();\n\n          var _node = this.getNode(_nodeId);\n\n          nextSelectedNodeIds.push(_nodeId);\n          if (_node.isRootNode) continue;\n          if (!(_node.parentNode.id in _map)) _map[_node.parentNode.id] = _node.parentNode.children.length;\n          if (--_map[_node.parentNode.id] === 0) _queue.push(_node.parentNode.id);\n        }\n      }\n\n      var hasChanged = quickDiff(this.forest.selectedNodeIds, nextSelectedNodeIds);\n      if (hasChanged) this.forest.selectedNodeIds = nextSelectedNodeIds;\n      this.buildForestState();\n    },\n    keepDataOfSelectedNodes: function keepDataOfSelectedNodes(prevNodeMap) {\n      var _this8 = this;\n\n      this.forest.selectedNodeIds.forEach(function (id) {\n        if (!prevNodeMap[id]) return;\n\n        var node = _objectSpread({}, prevNodeMap[id], {\n          isFallbackNode: true\n        });\n\n        _this8.$set(_this8.forest.nodeMap, id, node);\n      });\n    },\n    isSelected: function isSelected(node) {\n      return this.forest.selectedNodeMap[node.id] === true;\n    },\n    traverseDescendantsBFS: function traverseDescendantsBFS(parentNode, callback) {\n      if (!parentNode.isBranch) return;\n      var queue = parentNode.children.slice();\n\n      while (queue.length) {\n        var currNode = queue[0];\n        if (currNode.isBranch) queue.push.apply(queue, toConsumableArray_default()(currNode.children));\n        callback(currNode);\n        queue.shift();\n      }\n    },\n    traverseDescendantsDFS: function traverseDescendantsDFS(parentNode, callback) {\n      var _this9 = this;\n\n      if (!parentNode.isBranch) return;\n      parentNode.children.forEach(function (child) {\n        _this9.traverseDescendantsDFS(child, callback);\n\n        callback(child);\n      });\n    },\n    traverseAllNodesDFS: function traverseAllNodesDFS(callback) {\n      var _this10 = this;\n\n      this.forest.normalizedOptions.forEach(function (rootNode) {\n        _this10.traverseDescendantsDFS(rootNode, callback);\n\n        callback(rootNode);\n      });\n    },\n    traverseAllNodesByIndex: function traverseAllNodesByIndex(callback) {\n      var walk = function walk(parentNode) {\n        parentNode.children.forEach(function (child) {\n          if (callback(child) !== false && child.isBranch) {\n            walk(child);\n          }\n        });\n      };\n\n      walk({\n        children: this.forest.normalizedOptions\n      });\n    },\n    toggleClickOutsideEvent: function toggleClickOutsideEvent(enabled) {\n      if (enabled) {\n        document.addEventListener('mousedown', this.handleClickOutside, false);\n      } else {\n        document.removeEventListener('mousedown', this.handleClickOutside, false);\n      }\n    },\n    getValueContainer: function getValueContainer() {\n      return this.$refs.control.$refs['value-container'];\n    },\n    getInput: function getInput() {\n      return this.getValueContainer().$refs.input;\n    },\n    focusInput: function focusInput() {\n      this.getInput().focus();\n    },\n    blurInput: function blurInput() {\n      this.getInput().blur();\n    },\n    handleMouseDown: onLeftClick(function handleMouseDown(evt) {\n      evt.preventDefault();\n      evt.stopPropagation();\n      if (this.disabled) return;\n      var isClickedOnValueContainer = this.getValueContainer().$el.contains(evt.target);\n\n      if (isClickedOnValueContainer && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused)) {\n        this.openMenu();\n      }\n\n      if (this._blurOnSelect) {\n        this.blurInput();\n      } else {\n        this.focusInput();\n      }\n\n      this.resetFlags();\n    }),\n    handleClickOutside: function handleClickOutside(evt) {\n      if (this.$refs.wrapper && !this.$refs.wrapper.contains(evt.target)) {\n        this.blurInput();\n        this.closeMenu();\n      }\n    },\n    handleLocalSearch: function handleLocalSearch() {\n      var _this11 = this;\n\n      var searchQuery = this.trigger.searchQuery;\n\n      var done = function done() {\n        return _this11.resetHighlightedOptionWhenNecessary(true);\n      };\n\n      if (!searchQuery) {\n        this.localSearch.active = false;\n        return done();\n      }\n\n      this.localSearch.active = true;\n      this.localSearch.noResults = true;\n      this.traverseAllNodesDFS(function (node) {\n        if (node.isBranch) {\n          var _this11$$set;\n\n          node.isExpandedOnSearch = false;\n          node.showAllChildrenOnSearch = false;\n          node.isMatched = false;\n          node.hasMatchedDescendants = false;\n\n          _this11.$set(_this11.localSearch.countMap, node.id, (_this11$$set = {}, defineProperty_default()(_this11$$set, ALL_CHILDREN, 0), defineProperty_default()(_this11$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this11$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this11$$set, LEAF_DESCENDANTS, 0), _this11$$set));\n        }\n      });\n      var lowerCasedSearchQuery = searchQuery.trim().toLocaleLowerCase();\n      var splitSearchQuery = lowerCasedSearchQuery.replace(/\\s+/g, ' ').split(' ');\n      this.traverseAllNodesDFS(function (node) {\n        if (_this11.searchNested && splitSearchQuery.length > 1) {\n          node.isMatched = splitSearchQuery.every(function (filterValue) {\n            return match(false, filterValue, node.nestedSearchLabel);\n          });\n        } else {\n          node.isMatched = _this11.matchKeys.some(function (matchKey) {\n            return match(!_this11.disableFuzzyMatching, lowerCasedSearchQuery, node.lowerCased[matchKey]);\n          });\n        }\n\n        if (node.isMatched) {\n          _this11.localSearch.noResults = false;\n          node.ancestors.forEach(function (ancestor) {\n            return _this11.localSearch.countMap[ancestor.id][ALL_DESCENDANTS]++;\n          });\n          if (node.isLeaf) node.ancestors.forEach(function (ancestor) {\n            return _this11.localSearch.countMap[ancestor.id][LEAF_DESCENDANTS]++;\n          });\n\n          if (node.parentNode !== NO_PARENT_NODE) {\n            _this11.localSearch.countMap[node.parentNode.id][ALL_CHILDREN] += 1;\n            if (node.isLeaf) _this11.localSearch.countMap[node.parentNode.id][LEAF_CHILDREN] += 1;\n          }\n        }\n\n        if ((node.isMatched || node.isBranch && node.isExpandedOnSearch) && node.parentNode !== NO_PARENT_NODE) {\n          node.parentNode.isExpandedOnSearch = true;\n          node.parentNode.hasMatchedDescendants = true;\n        }\n      });\n      done();\n    },\n    handleRemoteSearch: function handleRemoteSearch() {\n      var _this12 = this;\n\n      var searchQuery = this.trigger.searchQuery;\n      var entry = this.getRemoteSearchEntry();\n\n      var done = function done() {\n        _this12.initialize();\n\n        _this12.resetHighlightedOptionWhenNecessary(true);\n      };\n\n      if ((searchQuery === '' || this.cacheOptions) && entry.isLoaded) {\n        return done();\n      }\n\n      this.callLoadOptionsProp({\n        action: ASYNC_SEARCH,\n        args: {\n          searchQuery: searchQuery\n        },\n        isPending: function isPending() {\n          return entry.isLoading;\n        },\n        start: function start() {\n          entry.isLoading = true;\n          entry.isLoaded = false;\n          entry.loadingError = '';\n        },\n        succeed: function succeed(options) {\n          entry.isLoaded = true;\n          entry.options = options;\n          if (_this12.trigger.searchQuery === searchQuery) done();\n        },\n        fail: function fail(err) {\n          entry.loadingError = getErrorMessage(err);\n        },\n        end: function end() {\n          entry.isLoading = false;\n        }\n      });\n    },\n    getRemoteSearchEntry: function getRemoteSearchEntry() {\n      var _this13 = this;\n\n      var searchQuery = this.trigger.searchQuery;\n\n      var entry = this.remoteSearch[searchQuery] || _objectSpread({}, createAsyncOptionsStates(), {\n        options: []\n      });\n\n      this.$watch(function () {\n        return entry.options;\n      }, function () {\n        if (_this13.trigger.searchQuery === searchQuery) _this13.initialize();\n      }, {\n        deep: true\n      });\n\n      if (searchQuery === '') {\n        if (Array.isArray(this.defaultOptions)) {\n          entry.options = this.defaultOptions;\n          entry.isLoaded = true;\n          return entry;\n        } else if (this.defaultOptions !== true) {\n          entry.isLoaded = true;\n          return entry;\n        }\n      }\n\n      if (!this.remoteSearch[searchQuery]) {\n        this.$set(this.remoteSearch, searchQuery, entry);\n      }\n\n      return entry;\n    },\n    shouldExpand: function shouldExpand(node) {\n      return this.localSearch.active ? node.isExpandedOnSearch : node.isExpanded;\n    },\n    shouldOptionBeIncludedInSearchResult: function shouldOptionBeIncludedInSearchResult(node) {\n      if (node.isMatched) return true;\n      if (node.isBranch && node.hasMatchedDescendants && !this.flattenSearchResults) return true;\n      if (!node.isRootNode && node.parentNode.showAllChildrenOnSearch) return true;\n      return false;\n    },\n    shouldShowOptionInMenu: function shouldShowOptionInMenu(node) {\n      if (this.localSearch.active && !this.shouldOptionBeIncludedInSearchResult(node)) {\n        return false;\n      }\n\n      return true;\n    },\n    getControl: function getControl() {\n      return this.$refs.control.$el;\n    },\n    getMenu: function getMenu() {\n      var ref = this.appendToBody ? this.$refs.portal.portalTarget : this;\n      var $menu = ref.$refs.menu.$refs.menu;\n      return $menu && $menu.nodeName !== '#comment' ? $menu : null;\n    },\n    setCurrentHighlightedOption: function setCurrentHighlightedOption(node) {\n      var _this14 = this;\n\n      var scroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n      var prev = this.menu.current;\n\n      if (prev != null && prev in this.forest.nodeMap) {\n        this.forest.nodeMap[prev].isHighlighted = false;\n      }\n\n      this.menu.current = node.id;\n      node.isHighlighted = true;\n\n      if (this.menu.isOpen && scroll) {\n        var scrollToOption = function scrollToOption() {\n          var $menu = _this14.getMenu();\n\n          var $option = $menu.querySelector(\".vue-treeselect__option[data-id=\\\"\".concat(node.id, \"\\\"]\"));\n          if ($option) scrollIntoView($menu, $option);\n        };\n\n        if (this.getMenu()) {\n          scrollToOption();\n        } else {\n          this.$nextTick(scrollToOption);\n        }\n      }\n    },\n    resetHighlightedOptionWhenNecessary: function resetHighlightedOptionWhenNecessary() {\n      var forceReset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n      var current = this.menu.current;\n\n      if (forceReset || current == null || !(current in this.forest.nodeMap) || !this.shouldShowOptionInMenu(this.getNode(current))) {\n        this.highlightFirstOption();\n      }\n    },\n    highlightFirstOption: function highlightFirstOption() {\n      if (!this.hasVisibleOptions) return;\n      var first = this.visibleOptionIds[0];\n      this.setCurrentHighlightedOption(this.getNode(first));\n    },\n    highlightPrevOption: function highlightPrevOption() {\n      if (!this.hasVisibleOptions) return;\n      var prev = this.visibleOptionIds.indexOf(this.menu.current) - 1;\n      if (prev === -1) return this.highlightLastOption();\n      this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[prev]));\n    },\n    highlightNextOption: function highlightNextOption() {\n      if (!this.hasVisibleOptions) return;\n      var next = this.visibleOptionIds.indexOf(this.menu.current) + 1;\n      if (next === this.visibleOptionIds.length) return this.highlightFirstOption();\n      this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[next]));\n    },\n    highlightLastOption: function highlightLastOption() {\n      if (!this.hasVisibleOptions) return;\n      var last = last_default()(this.visibleOptionIds);\n      this.setCurrentHighlightedOption(this.getNode(last));\n    },\n    resetSearchQuery: function resetSearchQuery() {\n      this.trigger.searchQuery = '';\n    },\n    closeMenu: function closeMenu() {\n      if (!this.menu.isOpen || !this.disabled && this.alwaysOpen) return;\n      this.saveMenuScrollPosition();\n      this.menu.isOpen = false;\n      this.toggleClickOutsideEvent(false);\n      this.resetSearchQuery();\n      this.$emit('close', this.getValue(), this.getInstanceId());\n    },\n    openMenu: function openMenu() {\n      if (this.disabled || this.menu.isOpen) return;\n      this.menu.isOpen = true;\n      this.$nextTick(this.resetHighlightedOptionWhenNecessary);\n      this.$nextTick(this.restoreMenuScrollPosition);\n      if (!this.options && !this.async) this.loadRootOptions();\n      this.toggleClickOutsideEvent(true);\n      this.$emit('open', this.getInstanceId());\n    },\n    toggleMenu: function toggleMenu() {\n      if (this.menu.isOpen) {\n        this.closeMenu();\n      } else {\n        this.openMenu();\n      }\n    },\n    toggleExpanded: function toggleExpanded(node) {\n      var nextState;\n\n      if (this.localSearch.active) {\n        nextState = node.isExpandedOnSearch = !node.isExpandedOnSearch;\n        if (nextState) node.showAllChildrenOnSearch = true;\n      } else {\n        nextState = node.isExpanded = !node.isExpanded;\n      }\n\n      if (nextState && !node.childrenStates.isLoaded) {\n        this.loadChildrenOptions(node);\n      }\n    },\n    buildForestState: function buildForestState() {\n      var _this15 = this;\n\n      var selectedNodeMap = createMap();\n      this.forest.selectedNodeIds.forEach(function (selectedNodeId) {\n        selectedNodeMap[selectedNodeId] = true;\n      });\n      this.forest.selectedNodeMap = selectedNodeMap;\n      var checkedStateMap = createMap();\n\n      if (this.multiple) {\n        this.traverseAllNodesByIndex(function (node) {\n          checkedStateMap[node.id] = UNCHECKED;\n        });\n        this.selectedNodes.forEach(function (selectedNode) {\n          checkedStateMap[selectedNode.id] = CHECKED;\n\n          if (!_this15.flat && !_this15.disableBranchNodes) {\n            selectedNode.ancestors.forEach(function (ancestorNode) {\n              if (!_this15.isSelected(ancestorNode)) {\n                checkedStateMap[ancestorNode.id] = INDETERMINATE;\n              }\n            });\n          }\n        });\n      }\n\n      this.forest.checkedStateMap = checkedStateMap;\n    },\n    enhancedNormalizer: function enhancedNormalizer(raw) {\n      return _objectSpread({}, raw, {}, this.normalizer(raw, this.getInstanceId()));\n    },\n    normalize: function normalize(parentNode, nodes, prevNodeMap) {\n      var _this16 = this;\n\n      var normalizedOptions = nodes.map(function (node) {\n        return [_this16.enhancedNormalizer(node), node];\n      }).map(function (_ref, index) {\n        var _ref2 = slicedToArray_default()(_ref, 2),\n            node = _ref2[0],\n            raw = _ref2[1];\n\n        _this16.checkDuplication(node);\n\n        _this16.verifyNodeShape(node);\n\n        var id = node.id,\n            label = node.label,\n            children = node.children,\n            isDefaultExpanded = node.isDefaultExpanded;\n        var isRootNode = parentNode === NO_PARENT_NODE;\n        var level = isRootNode ? 0 : parentNode.level + 1;\n        var isBranch = Array.isArray(children) || children === null;\n        var isLeaf = !isBranch;\n        var isDisabled = !!node.isDisabled || !_this16.flat && !isRootNode && parentNode.isDisabled;\n        var isNew = !!node.isNew;\n\n        var lowerCased = _this16.matchKeys.reduce(function (prev, key) {\n          return _objectSpread({}, prev, defineProperty_default()({}, key, stringifyOptionPropValue(node[key]).toLocaleLowerCase()));\n        }, {});\n\n        var nestedSearchLabel = isRootNode ? lowerCased.label : parentNode.nestedSearchLabel + ' ' + lowerCased.label;\n\n        var normalized = _this16.$set(_this16.forest.nodeMap, id, createMap());\n\n        _this16.$set(normalized, 'id', id);\n\n        _this16.$set(normalized, 'label', label);\n\n        _this16.$set(normalized, 'level', level);\n\n        _this16.$set(normalized, 'ancestors', isRootNode ? [] : [parentNode].concat(parentNode.ancestors));\n\n        _this16.$set(normalized, 'index', (isRootNode ? [] : parentNode.index).concat(index));\n\n        _this16.$set(normalized, 'parentNode', parentNode);\n\n        _this16.$set(normalized, 'lowerCased', lowerCased);\n\n        _this16.$set(normalized, 'nestedSearchLabel', nestedSearchLabel);\n\n        _this16.$set(normalized, 'isDisabled', isDisabled);\n\n        _this16.$set(normalized, 'isNew', isNew);\n\n        _this16.$set(normalized, 'isMatched', false);\n\n        _this16.$set(normalized, 'isHighlighted', false);\n\n        _this16.$set(normalized, 'isBranch', isBranch);\n\n        _this16.$set(normalized, 'isLeaf', isLeaf);\n\n        _this16.$set(normalized, 'isRootNode', isRootNode);\n\n        _this16.$set(normalized, 'raw', raw);\n\n        if (isBranch) {\n          var _this16$$set;\n\n          var isLoaded = Array.isArray(children);\n\n          _this16.$set(normalized, 'childrenStates', _objectSpread({}, createAsyncOptionsStates(), {\n            isLoaded: isLoaded\n          }));\n\n          _this16.$set(normalized, 'isExpanded', typeof isDefaultExpanded === 'boolean' ? isDefaultExpanded : level < _this16.defaultExpandLevel);\n\n          _this16.$set(normalized, 'hasMatchedDescendants', false);\n\n          _this16.$set(normalized, 'hasDisabledDescendants', false);\n\n          _this16.$set(normalized, 'isExpandedOnSearch', false);\n\n          _this16.$set(normalized, 'showAllChildrenOnSearch', false);\n\n          _this16.$set(normalized, 'count', (_this16$$set = {}, defineProperty_default()(_this16$$set, ALL_CHILDREN, 0), defineProperty_default()(_this16$$set, ALL_DESCENDANTS, 0), defineProperty_default()(_this16$$set, LEAF_CHILDREN, 0), defineProperty_default()(_this16$$set, LEAF_DESCENDANTS, 0), _this16$$set));\n\n          _this16.$set(normalized, 'children', isLoaded ? _this16.normalize(normalized, children, prevNodeMap) : []);\n\n          if (isDefaultExpanded === true) normalized.ancestors.forEach(function (ancestor) {\n            ancestor.isExpanded = true;\n          });\n\n          if (!isLoaded && typeof _this16.loadOptions !== 'function') {\n            warning_warning(function () {\n              return false;\n            }, function () {\n              return 'Unloaded branch node detected. \"loadOptions\" prop is required to load its children.';\n            });\n          } else if (!isLoaded && normalized.isExpanded) {\n            _this16.loadChildrenOptions(normalized);\n          }\n        }\n\n        normalized.ancestors.forEach(function (ancestor) {\n          return ancestor.count[ALL_DESCENDANTS]++;\n        });\n        if (isLeaf) normalized.ancestors.forEach(function (ancestor) {\n          return ancestor.count[LEAF_DESCENDANTS]++;\n        });\n\n        if (!isRootNode) {\n          parentNode.count[ALL_CHILDREN] += 1;\n          if (isLeaf) parentNode.count[LEAF_CHILDREN] += 1;\n          if (isDisabled) parentNode.hasDisabledDescendants = true;\n        }\n\n        if (prevNodeMap && prevNodeMap[id]) {\n          var prev = prevNodeMap[id];\n          normalized.isMatched = prev.isMatched;\n          normalized.showAllChildrenOnSearch = prev.showAllChildrenOnSearch;\n          normalized.isHighlighted = prev.isHighlighted;\n\n          if (prev.isBranch && normalized.isBranch) {\n            normalized.isExpanded = prev.isExpanded;\n            normalized.isExpandedOnSearch = prev.isExpandedOnSearch;\n\n            if (prev.childrenStates.isLoaded && !normalized.childrenStates.isLoaded) {\n              normalized.isExpanded = false;\n            } else {\n              normalized.childrenStates = _objectSpread({}, prev.childrenStates);\n            }\n          }\n        }\n\n        return normalized;\n      });\n\n      if (this.branchNodesFirst) {\n        var branchNodes = normalizedOptions.filter(function (option) {\n          return option.isBranch;\n        });\n        var leafNodes = normalizedOptions.filter(function (option) {\n          return option.isLeaf;\n        });\n        normalizedOptions = branchNodes.concat(leafNodes);\n      }\n\n      return normalizedOptions;\n    },\n    loadRootOptions: function loadRootOptions() {\n      var _this17 = this;\n\n      this.callLoadOptionsProp({\n        action: LOAD_ROOT_OPTIONS,\n        isPending: function isPending() {\n          return _this17.rootOptionsStates.isLoading;\n        },\n        start: function start() {\n          _this17.rootOptionsStates.isLoading = true;\n          _this17.rootOptionsStates.loadingError = '';\n        },\n        succeed: function succeed() {\n          _this17.rootOptionsStates.isLoaded = true;\n\n          _this17.$nextTick(function () {\n            _this17.resetHighlightedOptionWhenNecessary(true);\n          });\n        },\n        fail: function fail(err) {\n          _this17.rootOptionsStates.loadingError = getErrorMessage(err);\n        },\n        end: function end() {\n          _this17.rootOptionsStates.isLoading = false;\n        }\n      });\n    },\n    loadChildrenOptions: function loadChildrenOptions(parentNode) {\n      var _this18 = this;\n\n      var id = parentNode.id,\n          raw = parentNode.raw;\n      this.callLoadOptionsProp({\n        action: LOAD_CHILDREN_OPTIONS,\n        args: {\n          parentNode: raw\n        },\n        isPending: function isPending() {\n          return _this18.getNode(id).childrenStates.isLoading;\n        },\n        start: function start() {\n          _this18.getNode(id).childrenStates.isLoading = true;\n          _this18.getNode(id).childrenStates.loadingError = '';\n        },\n        succeed: function succeed() {\n          _this18.getNode(id).childrenStates.isLoaded = true;\n        },\n        fail: function fail(err) {\n          _this18.getNode(id).childrenStates.loadingError = getErrorMessage(err);\n        },\n        end: function end() {\n          _this18.getNode(id).childrenStates.isLoading = false;\n        }\n      });\n    },\n    callLoadOptionsProp: function callLoadOptionsProp(_ref3) {\n      var action = _ref3.action,\n          args = _ref3.args,\n          isPending = _ref3.isPending,\n          start = _ref3.start,\n          succeed = _ref3.succeed,\n          fail = _ref3.fail,\n          end = _ref3.end;\n\n      if (!this.loadOptions || isPending()) {\n        return;\n      }\n\n      start();\n      var callback = once_default()(function (err, result) {\n        if (err) {\n          fail(err);\n        } else {\n          succeed(result);\n        }\n\n        end();\n      });\n      var result = this.loadOptions(_objectSpread({\n        id: this.getInstanceId(),\n        instanceId: this.getInstanceId(),\n        action: action\n      }, args, {\n        callback: callback\n      }));\n\n      if (external_is_promise_default()(result)) {\n        result.then(function () {\n          callback();\n        }, function (err) {\n          callback(err);\n        }).catch(function (err) {\n          console.error(err);\n        });\n      }\n    },\n    checkDuplication: function checkDuplication(node) {\n      var _this19 = this;\n\n      warning_warning(function () {\n        return !(node.id in _this19.forest.nodeMap && !_this19.forest.nodeMap[node.id].isFallbackNode);\n      }, function () {\n        return \"Detected duplicate presence of node id \".concat(JSON.stringify(node.id), \". \") + \"Their labels are \\\"\".concat(_this19.forest.nodeMap[node.id].label, \"\\\" and \\\"\").concat(node.label, \"\\\" respectively.\");\n      });\n    },\n    verifyNodeShape: function verifyNodeShape(node) {\n      warning_warning(function () {\n        return !(node.children === undefined && node.isBranch === true);\n      }, function () {\n        return 'Are you meant to declare an unloaded branch node? ' + '`isBranch: true` is no longer supported, please use `children: null` instead.';\n      });\n    },\n    select: function select(node) {\n      if (this.disabled || node.isDisabled) {\n        return;\n      }\n\n      if (this.single) {\n        this.clear();\n      }\n\n      var nextState = this.multiple && !this.flat ? this.forest.checkedStateMap[node.id] === UNCHECKED : !this.isSelected(node);\n\n      if (nextState) {\n        this._selectNode(node);\n      } else {\n        this._deselectNode(node);\n      }\n\n      this.buildForestState();\n\n      if (nextState) {\n        this.$emit('select', node.raw, this.getInstanceId());\n      } else {\n        this.$emit('deselect', node.raw, this.getInstanceId());\n      }\n\n      if (this.localSearch.active && nextState && (this.single || this.clearOnSelect)) {\n        this.resetSearchQuery();\n      }\n\n      if (this.single && this.closeOnSelect) {\n        this.closeMenu();\n\n        if (this.searchable) {\n          this._blurOnSelect = true;\n        }\n      }\n    },\n    clear: function clear() {\n      var _this20 = this;\n\n      if (this.hasValue) {\n        if (this.single || this.allowClearingDisabled) {\n          this.forest.selectedNodeIds = [];\n        } else {\n            this.forest.selectedNodeIds = this.forest.selectedNodeIds.filter(function (nodeId) {\n              return _this20.getNode(nodeId).isDisabled;\n            });\n          }\n\n        this.buildForestState();\n      }\n    },\n    _selectNode: function _selectNode(node) {\n      var _this21 = this;\n\n      if (this.single || this.disableBranchNodes) {\n        return this.addValue(node);\n      }\n\n      if (this.flat) {\n        this.addValue(node);\n\n        if (this.autoSelectAncestors) {\n          node.ancestors.forEach(function (ancestor) {\n            if (!_this21.isSelected(ancestor) && !ancestor.isDisabled) _this21.addValue(ancestor);\n          });\n        } else if (this.autoSelectDescendants) {\n          this.traverseDescendantsBFS(node, function (descendant) {\n            if (!_this21.isSelected(descendant) && !descendant.isDisabled) _this21.addValue(descendant);\n          });\n        }\n\n        return;\n      }\n\n      var isFullyChecked = node.isLeaf || !node.hasDisabledDescendants || this.allowSelectingDisabledDescendants;\n\n      if (isFullyChecked) {\n        this.addValue(node);\n      }\n\n      if (node.isBranch) {\n        this.traverseDescendantsBFS(node, function (descendant) {\n          if (!descendant.isDisabled || _this21.allowSelectingDisabledDescendants) {\n            _this21.addValue(descendant);\n          }\n        });\n      }\n\n      if (isFullyChecked) {\n        var curr = node;\n\n        while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\n          if (curr.children.every(this.isSelected)) this.addValue(curr);else break;\n        }\n      }\n    },\n    _deselectNode: function _deselectNode(node) {\n      var _this22 = this;\n\n      if (this.disableBranchNodes) {\n        return this.removeValue(node);\n      }\n\n      if (this.flat) {\n        this.removeValue(node);\n\n        if (this.autoDeselectAncestors) {\n          node.ancestors.forEach(function (ancestor) {\n            if (_this22.isSelected(ancestor) && !ancestor.isDisabled) _this22.removeValue(ancestor);\n          });\n        } else if (this.autoDeselectDescendants) {\n          this.traverseDescendantsBFS(node, function (descendant) {\n            if (_this22.isSelected(descendant) && !descendant.isDisabled) _this22.removeValue(descendant);\n          });\n        }\n\n        return;\n      }\n\n      var hasUncheckedSomeDescendants = false;\n\n      if (node.isBranch) {\n        this.traverseDescendantsDFS(node, function (descendant) {\n          if (!descendant.isDisabled || _this22.allowSelectingDisabledDescendants) {\n            _this22.removeValue(descendant);\n\n            hasUncheckedSomeDescendants = true;\n          }\n        });\n      }\n\n      if (node.isLeaf || hasUncheckedSomeDescendants || node.children.length === 0) {\n        this.removeValue(node);\n        var curr = node;\n\n        while ((curr = curr.parentNode) !== NO_PARENT_NODE) {\n          if (this.isSelected(curr)) this.removeValue(curr);else break;\n        }\n      }\n    },\n    addValue: function addValue(node) {\n      this.forest.selectedNodeIds.push(node.id);\n      this.forest.selectedNodeMap[node.id] = true;\n    },\n    removeValue: function removeValue(node) {\n      removeFromArray(this.forest.selectedNodeIds, node.id);\n      delete this.forest.selectedNodeMap[node.id];\n    },\n    removeLastValue: function removeLastValue() {\n      if (!this.hasValue) return;\n      if (this.single) return this.clear();\n      var lastValue = last_default()(this.internalValue);\n      var lastSelectedNode = this.getNode(lastValue);\n      this.select(lastSelectedNode);\n    },\n    saveMenuScrollPosition: function saveMenuScrollPosition() {\n      var $menu = this.getMenu();\n      if ($menu) this.menu.lastScrollPosition = $menu.scrollTop;\n    },\n    restoreMenuScrollPosition: function restoreMenuScrollPosition() {\n      var $menu = this.getMenu();\n      if ($menu) $menu.scrollTop = this.menu.lastScrollPosition;\n    }\n  },\n  created: function created() {\n    this.verifyProps();\n    this.resetFlags();\n  },\n  mounted: function mounted() {\n    if (this.autoFocus) this.focusInput();\n    if (!this.options && !this.async && this.autoLoadRootOptions) this.loadRootOptions();\n    if (this.alwaysOpen) this.openMenu();\n    if (this.async && this.defaultOptions) this.handleRemoteSearch();\n  },\n  destroyed: function destroyed() {\n    this.toggleClickOutsideEvent(false);\n  }\n});\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HiddenFields.vue?vue&type=script&lang=js&\n\n\nfunction stringifyValue(value) {\n  if (typeof value === 'string') return value;\n  if (value != null && !isNaN_isNaN(value)) return JSON.stringify(value);\n  return '';\n}\n\n/* harmony default export */ var HiddenFieldsvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--hidden-fields',\n  inject: ['instance'],\n  functional: true,\n  render: function render(_, context) {\n    var h = arguments[0];\n    var instance = context.injections.instance;\n    if (!instance.name || instance.disabled || !instance.hasValue) return null;\n    var stringifiedValues = instance.internalValue.map(stringifyValue);\n    if (instance.multiple && instance.joinValues) stringifiedValues = [stringifiedValues.join(instance.delimiter)];\n    return stringifiedValues.map(function (stringifiedValue, i) {\n      return h(\"input\", {\n        attrs: {\n          type: \"hidden\",\n          name: instance.name\n        },\n        domProps: {\n          \"value\": stringifiedValue\n        },\n        key: 'hidden-field-' + i\n      });\n    });\n  }\n});\n// CONCATENATED MODULE: ./src/components/HiddenFields.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_HiddenFieldsvue_type_script_lang_js_ = (HiddenFieldsvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js\n/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nfunction normalizeComponent (\n  scriptExports,\n  render,\n  staticRenderFns,\n  functionalTemplate,\n  injectStyles,\n  scopeId,\n  moduleIdentifier, /* server only */\n  shadowMode /* vue-cli only */\n) {\n  // Vue.extend constructor export interop\n  var options = typeof scriptExports === 'function'\n    ? scriptExports.options\n    : scriptExports\n\n  // render functions\n  if (render) {\n    options.render = render\n    options.staticRenderFns = staticRenderFns\n    options._compiled = true\n  }\n\n  // functional template\n  if (functionalTemplate) {\n    options.functional = true\n  }\n\n  // scopedId\n  if (scopeId) {\n    options._scopeId = 'data-v-' + scopeId\n  }\n\n  var hook\n  if (moduleIdentifier) { // server build\n    hook = function (context) {\n      // 2.3 injection\n      context =\n        context || // cached call\n        (this.$vnode && this.$vnode.ssrContext) || // stateful\n        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n      // 2.2 with runInNewContext: true\n      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n        context = __VUE_SSR_CONTEXT__\n      }\n      // inject component styles\n      if (injectStyles) {\n        injectStyles.call(this, context)\n      }\n      // register component module identifier for async chunk inferrence\n      if (context && context._registeredComponents) {\n        context._registeredComponents.add(moduleIdentifier)\n      }\n    }\n    // used by ssr in case component is cached and beforeCreate\n    // never gets called\n    options._ssrRegister = hook\n  } else if (injectStyles) {\n    hook = shadowMode\n      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n      : injectStyles\n  }\n\n  if (hook) {\n    if (options.functional) {\n      // for template-only hot-reload because in that case the render fn doesn't\n      // go through the normalizer\n      options._injectStyles = hook\n      // register for functioal component in vue file\n      var originalRender = options.render\n      options.render = function renderWithStyleInjection (h, context) {\n        hook.call(context)\n        return originalRender(h, context)\n      }\n    } else {\n      // inject component registration as beforeCreate hook\n      var existing = options.beforeCreate\n      options.beforeCreate = existing\n        ? [].concat(existing, hook)\n        : [hook]\n    }\n  }\n\n  return {\n    exports: scriptExports,\n    options: options\n  }\n}\n\n// CONCATENATED MODULE: ./src/components/HiddenFields.vue\nvar HiddenFields_render, staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar component = normalizeComponent(\n  components_HiddenFieldsvue_type_script_lang_js_,\n  HiddenFields_render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"src/components/HiddenFields.vue\"\n/* harmony default export */ var HiddenFields = (component.exports);\n// EXTERNAL MODULE: external \"babel-helper-vue-jsx-merge-props\"\nvar external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(13);\nvar external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);\n\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Input.vue?vue&type=script&lang=js&\n\n\n\nvar keysThatRequireMenuBeingOpen = [KEY_CODES.ENTER, KEY_CODES.END, KEY_CODES.HOME, KEY_CODES.ARROW_LEFT, KEY_CODES.ARROW_UP, KEY_CODES.ARROW_RIGHT, KEY_CODES.ARROW_DOWN];\n/* harmony default export */ var Inputvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--input',\n  inject: ['instance'],\n  data: function data() {\n    return {\n      inputWidth: MIN_INPUT_WIDTH,\n      value: ''\n    };\n  },\n  computed: {\n    needAutoSize: function needAutoSize() {\n      var instance = this.instance;\n      return instance.searchable && !instance.disabled && instance.multiple;\n    },\n    inputStyle: function inputStyle() {\n      return {\n        width: this.needAutoSize ? \"\".concat(this.inputWidth, \"px\") : null\n      };\n    }\n  },\n  watch: {\n    'instance.trigger.searchQuery': function instanceTriggerSearchQuery(newValue) {\n      this.value = newValue;\n    },\n    value: function value() {\n      if (this.needAutoSize) this.$nextTick(this.updateInputWidth);\n    }\n  },\n  created: function created() {\n    this.debouncedCallback = debounce_default()(this.updateSearchQuery, INPUT_DEBOUNCE_DELAY, {\n      leading: true,\n      trailing: true\n    });\n  },\n  methods: {\n    clear: function clear() {\n      this.onInput({\n        target: {\n          value: ''\n        }\n      });\n    },\n    focus: function focus() {\n      var instance = this.instance;\n\n      if (!instance.disabled) {\n        this.$refs.input && this.$refs.input.focus();\n      }\n    },\n    blur: function blur() {\n      this.$refs.input && this.$refs.input.blur();\n    },\n    onFocus: function onFocus() {\n      var instance = this.instance;\n      instance.trigger.isFocused = true;\n      if (instance.openOnFocus) instance.openMenu();\n    },\n    onBlur: function onBlur() {\n      var instance = this.instance;\n      var menu = instance.getMenu();\n\n      if (menu && document.activeElement === menu) {\n        return this.focus();\n      }\n\n      instance.trigger.isFocused = false;\n      instance.closeMenu();\n    },\n    onInput: function onInput(evt) {\n      var value = evt.target.value;\n      this.value = value;\n\n      if (value) {\n        this.debouncedCallback();\n      } else {\n        this.debouncedCallback.cancel();\n        this.updateSearchQuery();\n      }\n    },\n    onKeyDown: function onKeyDown(evt) {\n      var instance = this.instance;\n      var key = 'which' in evt ? evt.which : evt.keyCode;\n      if (evt.ctrlKey || evt.shiftKey || evt.altKey || evt.metaKey) return;\n\n      if (!instance.menu.isOpen && includes(keysThatRequireMenuBeingOpen, key)) {\n        evt.preventDefault();\n        return instance.openMenu();\n      }\n\n      switch (key) {\n        case KEY_CODES.BACKSPACE:\n          {\n            if (instance.backspaceRemoves && !this.value.length) {\n              instance.removeLastValue();\n            }\n\n            break;\n          }\n\n        case KEY_CODES.ENTER:\n          {\n            evt.preventDefault();\n            if (instance.menu.current === null) return;\n            var current = instance.getNode(instance.menu.current);\n            if (current.isBranch && instance.disableBranchNodes) return;\n            instance.select(current);\n            break;\n          }\n\n        case KEY_CODES.ESCAPE:\n          {\n            if (this.value.length) {\n              this.clear();\n            } else if (instance.menu.isOpen) {\n              instance.closeMenu();\n            }\n\n            break;\n          }\n\n        case KEY_CODES.END:\n          {\n            evt.preventDefault();\n            instance.highlightLastOption();\n            break;\n          }\n\n        case KEY_CODES.HOME:\n          {\n            evt.preventDefault();\n            instance.highlightFirstOption();\n            break;\n          }\n\n        case KEY_CODES.ARROW_LEFT:\n          {\n            var _current = instance.getNode(instance.menu.current);\n\n            if (_current.isBranch && instance.shouldExpand(_current)) {\n              evt.preventDefault();\n              instance.toggleExpanded(_current);\n            } else if (!_current.isRootNode && (_current.isLeaf || _current.isBranch && !instance.shouldExpand(_current))) {\n              evt.preventDefault();\n              instance.setCurrentHighlightedOption(_current.parentNode);\n            }\n\n            break;\n          }\n\n        case KEY_CODES.ARROW_UP:\n          {\n            evt.preventDefault();\n            instance.highlightPrevOption();\n            break;\n          }\n\n        case KEY_CODES.ARROW_RIGHT:\n          {\n            var _current2 = instance.getNode(instance.menu.current);\n\n            if (_current2.isBranch && !instance.shouldExpand(_current2)) {\n              evt.preventDefault();\n              instance.toggleExpanded(_current2);\n            }\n\n            break;\n          }\n\n        case KEY_CODES.ARROW_DOWN:\n          {\n            evt.preventDefault();\n            instance.highlightNextOption();\n            break;\n          }\n\n        case KEY_CODES.DELETE:\n          {\n            if (instance.deleteRemoves && !this.value.length) {\n              instance.removeLastValue();\n            }\n\n            break;\n          }\n\n        default:\n          {\n            instance.openMenu();\n          }\n      }\n    },\n    onMouseDown: function onMouseDown(evt) {\n      if (this.value.length) {\n        evt.stopPropagation();\n      }\n    },\n    renderInputContainer: function renderInputContainer() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      var props = {};\n      var children = [];\n\n      if (instance.searchable && !instance.disabled) {\n        children.push(this.renderInput());\n        if (this.needAutoSize) children.push(this.renderSizer());\n      }\n\n      if (!instance.searchable) {\n        deepExtend(props, {\n          on: {\n            focus: this.onFocus,\n            blur: this.onBlur,\n            keydown: this.onKeyDown\n          },\n          ref: 'input'\n        });\n      }\n\n      if (!instance.searchable && !instance.disabled) {\n        deepExtend(props, {\n          attrs: {\n            tabIndex: instance.tabIndex\n          }\n        });\n      }\n\n      return h(\"div\", external_babel_helper_vue_jsx_merge_props_default()([{\n        \"class\": \"vue-treeselect__input-container\"\n      }, props]), [children]);\n    },\n    renderInput: function renderInput() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(\"input\", {\n        ref: \"input\",\n        \"class\": \"vue-treeselect__input\",\n        attrs: {\n          type: \"text\",\n          autocomplete: \"off\",\n          tabIndex: instance.tabIndex,\n          required: instance.required && !instance.hasValue\n        },\n        domProps: {\n          \"value\": this.value\n        },\n        style: this.inputStyle,\n        on: {\n          \"focus\": this.onFocus,\n          \"input\": this.onInput,\n          \"blur\": this.onBlur,\n          \"keydown\": this.onKeyDown,\n          \"mousedown\": this.onMouseDown\n        }\n      });\n    },\n    renderSizer: function renderSizer() {\n      var h = this.$createElement;\n      return h(\"div\", {\n        ref: \"sizer\",\n        \"class\": \"vue-treeselect__sizer\"\n      }, [this.value]);\n    },\n    updateInputWidth: function updateInputWidth() {\n      this.inputWidth = Math.max(MIN_INPUT_WIDTH, this.$refs.sizer.scrollWidth + 15);\n    },\n    updateSearchQuery: function updateSearchQuery() {\n      var instance = this.instance;\n      instance.trigger.searchQuery = this.value;\n    }\n  },\n  render: function render() {\n    return this.renderInputContainer();\n  }\n});\n// CONCATENATED MODULE: ./src/components/Input.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Inputvue_type_script_lang_js_ = (Inputvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Input.vue\nvar Input_render, Input_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Input_component = normalizeComponent(\n  components_Inputvue_type_script_lang_js_,\n  Input_render,\n  Input_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Input_api; }\nInput_component.options.__file = \"src/components/Input.vue\"\n/* harmony default export */ var Input = (Input_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Placeholder.vue?vue&type=script&lang=js&\n/* harmony default export */ var Placeholdervue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--placeholder',\n  inject: ['instance'],\n  render: function render() {\n    var h = arguments[0];\n    var instance = this.instance;\n    var placeholderClass = {\n      'vue-treeselect__placeholder': true,\n      'vue-treeselect-helper-zoom-effect-off': true,\n      'vue-treeselect-helper-hide': instance.hasValue || instance.trigger.searchQuery\n    };\n    return h(\"div\", {\n      \"class\": placeholderClass\n    }, [instance.placeholder]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/Placeholder.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Placeholdervue_type_script_lang_js_ = (Placeholdervue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Placeholder.vue\nvar Placeholder_render, Placeholder_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Placeholder_component = normalizeComponent(\n  components_Placeholdervue_type_script_lang_js_,\n  Placeholder_render,\n  Placeholder_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Placeholder_api; }\nPlaceholder_component.options.__file = \"src/components/Placeholder.vue\"\n/* harmony default export */ var Placeholder = (Placeholder_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SingleValue.vue?vue&type=script&lang=js&\n\n\n/* harmony default export */ var SingleValuevue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--single-value',\n  inject: ['instance'],\n  methods: {\n    renderSingleValueLabel: function renderSingleValueLabel() {\n      var instance = this.instance;\n      var node = instance.selectedNodes[0];\n      var customValueLabelRenderer = instance.$scopedSlots['value-label'];\n      return customValueLabelRenderer ? customValueLabelRenderer({\n        node: node\n      }) : node.label;\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var instance = this.instance,\n        renderValueContainer = this.$parent.renderValueContainer;\n    var shouldShowValue = instance.hasValue && !instance.trigger.searchQuery;\n    return renderValueContainer([shouldShowValue && h(\"div\", {\n      \"class\": \"vue-treeselect__single-value\"\n    }, [this.renderSingleValueLabel()]), h(Placeholder), h(Input, {\n      ref: \"input\"\n    })]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/SingleValue.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_SingleValuevue_type_script_lang_js_ = (SingleValuevue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/SingleValue.vue\nvar SingleValue_render, SingleValue_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar SingleValue_component = normalizeComponent(\n  components_SingleValuevue_type_script_lang_js_,\n  SingleValue_render,\n  SingleValue_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var SingleValue_api; }\nSingleValue_component.options.__file = \"src/components/SingleValue.vue\"\n/* harmony default export */ var SingleValue = (SingleValue_component.exports);\n// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=template&id=364b6320&\nvar Deletevue_type_template_id_364b6320_render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"svg\",\n    {\n      attrs: {\n        xmlns: \"http://www.w3.org/2000/svg\",\n        viewBox: \"0 0 348.333 348.333\"\n      }\n    },\n    [\n      _c(\"path\", {\n        attrs: {\n          d:\n            \"M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z\"\n        }\n      })\n    ]\n  )\n}\nvar Deletevue_type_template_id_364b6320_staticRenderFns = []\nDeletevue_type_template_id_364b6320_render._withStripped = true\n\n\n// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=template&id=364b6320&\n\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Delete.vue?vue&type=script&lang=js&\n/* harmony default export */ var Deletevue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--x'\n});\n// CONCATENATED MODULE: ./src/components/icons/Delete.vue?vue&type=script&lang=js&\n /* harmony default export */ var icons_Deletevue_type_script_lang_js_ = (Deletevue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/icons/Delete.vue\n\n\n\n\n\n/* normalize component */\n\nvar Delete_component = normalizeComponent(\n  icons_Deletevue_type_script_lang_js_,\n  Deletevue_type_template_id_364b6320_render,\n  Deletevue_type_template_id_364b6320_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Delete_api; }\nDelete_component.options.__file = \"src/components/icons/Delete.vue\"\n/* harmony default export */ var Delete = (Delete_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValueItem.vue?vue&type=script&lang=js&\n\n\n/* harmony default export */ var MultiValueItemvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--multi-value-item',\n  inject: ['instance'],\n  props: {\n    node: {\n      type: Object,\n      required: true\n    }\n  },\n  methods: {\n    handleMouseDown: onLeftClick(function handleMouseDown() {\n      var instance = this.instance,\n          node = this.node;\n      instance.select(node);\n    })\n  },\n  render: function render() {\n    var h = arguments[0];\n    var instance = this.instance,\n        node = this.node;\n    var itemClass = {\n      'vue-treeselect__multi-value-item': true,\n      'vue-treeselect__multi-value-item-disabled': node.isDisabled,\n      'vue-treeselect__multi-value-item-new': node.isNew\n    };\n    var customValueLabelRenderer = instance.$scopedSlots['value-label'];\n    var labelRenderer = customValueLabelRenderer ? customValueLabelRenderer({\n      node: node\n    }) : node.label;\n    return h(\"div\", {\n      \"class\": \"vue-treeselect__multi-value-item-container\"\n    }, [h(\"div\", {\n      \"class\": itemClass,\n      on: {\n        \"mousedown\": this.handleMouseDown\n      }\n    }, [h(\"span\", {\n      \"class\": \"vue-treeselect__multi-value-label\"\n    }, [labelRenderer]), h(\"span\", {\n      \"class\": \"vue-treeselect__icon vue-treeselect__value-remove\"\n    }, [h(Delete)])])]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/MultiValueItem.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_MultiValueItemvue_type_script_lang_js_ = (MultiValueItemvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/MultiValueItem.vue\nvar MultiValueItem_render, MultiValueItem_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar MultiValueItem_component = normalizeComponent(\n  components_MultiValueItemvue_type_script_lang_js_,\n  MultiValueItem_render,\n  MultiValueItem_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var MultiValueItem_api; }\nMultiValueItem_component.options.__file = \"src/components/MultiValueItem.vue\"\n/* harmony default export */ var MultiValueItem = (MultiValueItem_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MultiValue.vue?vue&type=script&lang=js&\n\n\n\n\n/* harmony default export */ var MultiValuevue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--multi-value',\n  inject: ['instance'],\n  methods: {\n    renderMultiValueItems: function renderMultiValueItems() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return instance.internalValue.slice(0, instance.limit).map(instance.getNode).map(function (node) {\n        return h(MultiValueItem, {\n          key: \"multi-value-item-\".concat(node.id),\n          attrs: {\n            node: node\n          }\n        });\n      });\n    },\n    renderExceedLimitTip: function renderExceedLimitTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      var count = instance.internalValue.length - instance.limit;\n      if (count <= 0) return null;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off\",\n        key: \"exceed-limit-tip\"\n      }, [h(\"span\", {\n        \"class\": \"vue-treeselect__limit-tip-text\"\n      }, [instance.limitText(count)])]);\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var renderValueContainer = this.$parent.renderValueContainer;\n    var transitionGroupProps = {\n      props: {\n        tag: 'div',\n        name: 'vue-treeselect__multi-value-item--transition',\n        appear: true\n      }\n    };\n    return renderValueContainer(h(\"transition-group\", external_babel_helper_vue_jsx_merge_props_default()([{\n      \"class\": \"vue-treeselect__multi-value\"\n    }, transitionGroupProps]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), h(Placeholder, {\n      key: \"placeholder\"\n    }), h(Input, {\n      ref: \"input\",\n      key: \"input\"\n    })]));\n  }\n});\n// CONCATENATED MODULE: ./src/components/MultiValue.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_MultiValuevue_type_script_lang_js_ = (MultiValuevue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/MultiValue.vue\nvar MultiValue_render, MultiValue_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar MultiValue_component = normalizeComponent(\n  components_MultiValuevue_type_script_lang_js_,\n  MultiValue_render,\n  MultiValue_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var MultiValue_api; }\nMultiValue_component.options.__file = \"src/components/MultiValue.vue\"\n/* harmony default export */ var MultiValue = (MultiValue_component.exports);\n// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4&\nvar Arrowvue_type_template_id_11186cd4_render = function() {\n  var _vm = this\n  var _h = _vm.$createElement\n  var _c = _vm._self._c || _h\n  return _c(\n    \"svg\",\n    {\n      attrs: {\n        xmlns: \"http://www.w3.org/2000/svg\",\n        viewBox: \"0 0 292.362 292.362\"\n      }\n    },\n    [\n      _c(\"path\", {\n        attrs: {\n          d:\n            \"M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z\"\n        }\n      })\n    ]\n  )\n}\nvar Arrowvue_type_template_id_11186cd4_staticRenderFns = []\nArrowvue_type_template_id_11186cd4_render._withStripped = true\n\n\n// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=template&id=11186cd4&\n\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/icons/Arrow.vue?vue&type=script&lang=js&\n/* harmony default export */ var Arrowvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--arrow'\n});\n// CONCATENATED MODULE: ./src/components/icons/Arrow.vue?vue&type=script&lang=js&\n /* harmony default export */ var icons_Arrowvue_type_script_lang_js_ = (Arrowvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/icons/Arrow.vue\n\n\n\n\n\n/* normalize component */\n\nvar Arrow_component = normalizeComponent(\n  icons_Arrowvue_type_script_lang_js_,\n  Arrowvue_type_template_id_11186cd4_render,\n  Arrowvue_type_template_id_11186cd4_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Arrow_api; }\nArrow_component.options.__file = \"src/components/icons/Arrow.vue\"\n/* harmony default export */ var Arrow = (Arrow_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Control.vue?vue&type=script&lang=js&\n\n\n\n\n\n/* harmony default export */ var Controlvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--control',\n  inject: ['instance'],\n  computed: {\n    shouldShowX: function shouldShowX() {\n      var instance = this.instance;\n      return instance.clearable && !instance.disabled && instance.hasValue && (this.hasUndisabledValue || instance.allowClearingDisabled);\n    },\n    shouldShowArrow: function shouldShowArrow() {\n      var instance = this.instance;\n      if (!instance.alwaysOpen) return true;\n      return !instance.menu.isOpen;\n    },\n    hasUndisabledValue: function hasUndisabledValue() {\n      var instance = this.instance;\n      return instance.hasValue && instance.internalValue.some(function (id) {\n        return !instance.getNode(id).isDisabled;\n      });\n    }\n  },\n  methods: {\n    renderX: function renderX() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      var title = instance.multiple ? instance.clearAllText : instance.clearValueText;\n      if (!this.shouldShowX) return null;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__x-container\",\n        attrs: {\n          title: title\n        },\n        on: {\n          \"mousedown\": this.handleMouseDownOnX\n        }\n      }, [h(Delete, {\n        \"class\": \"vue-treeselect__x\"\n      })]);\n    },\n    renderArrow: function renderArrow() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      var arrowClass = {\n        'vue-treeselect__control-arrow': true,\n        'vue-treeselect__control-arrow--rotated': instance.menu.isOpen\n      };\n      if (!this.shouldShowArrow) return null;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__control-arrow-container\",\n        on: {\n          \"mousedown\": this.handleMouseDownOnArrow\n        }\n      }, [h(Arrow, {\n        \"class\": arrowClass\n      })]);\n    },\n    handleMouseDownOnX: onLeftClick(function handleMouseDownOnX(evt) {\n      evt.stopPropagation();\n      evt.preventDefault();\n      var instance = this.instance;\n      var result = instance.beforeClearAll();\n\n      var handler = function handler(shouldClear) {\n        if (shouldClear) instance.clear();\n      };\n\n      if (external_is_promise_default()(result)) {\n        result.then(handler);\n      } else {\n        setTimeout(function () {\n          return handler(result);\n        }, 0);\n      }\n    }),\n    handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnArrow(evt) {\n      evt.preventDefault();\n      evt.stopPropagation();\n      var instance = this.instance;\n      instance.focusInput();\n      instance.toggleMenu();\n    }),\n    renderValueContainer: function renderValueContainer(children) {\n      var h = this.$createElement;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__value-container\"\n      }, [children]);\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var instance = this.instance;\n    var ValueContainer = instance.single ? SingleValue : MultiValue;\n    return h(\"div\", {\n      \"class\": \"vue-treeselect__control\",\n      on: {\n        \"mousedown\": instance.handleMouseDown\n      }\n    }, [h(ValueContainer, {\n      ref: \"value-container\"\n    }), this.renderX(), this.renderArrow()]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/Control.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Controlvue_type_script_lang_js_ = (Controlvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Control.vue\nvar Control_render, Control_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Control_component = normalizeComponent(\n  components_Controlvue_type_script_lang_js_,\n  Control_render,\n  Control_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Control_api; }\nControl_component.options.__file = \"src/components/Control.vue\"\n/* harmony default export */ var Control = (Control_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Tip.vue?vue&type=script&lang=js&\n/* harmony default export */ var Tipvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--tip',\n  functional: true,\n  props: {\n    type: {\n      type: String,\n      required: true\n    },\n    icon: {\n      type: String,\n      required: true\n    }\n  },\n  render: function render(_, context) {\n    var h = arguments[0];\n    var props = context.props,\n        children = context.children;\n    return h(\"div\", {\n      \"class\": \"vue-treeselect__tip vue-treeselect__\".concat(props.type, \"-tip\")\n    }, [h(\"div\", {\n      \"class\": \"vue-treeselect__icon-container\"\n    }, [h(\"span\", {\n      \"class\": \"vue-treeselect__icon-\".concat(props.icon)\n    })]), h(\"span\", {\n      \"class\": \"vue-treeselect__tip-text vue-treeselect__\".concat(props.type, \"-tip-text\")\n    }, [children])]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/Tip.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Tipvue_type_script_lang_js_ = (Tipvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Tip.vue\nvar Tip_render, Tip_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Tip_component = normalizeComponent(\n  components_Tipvue_type_script_lang_js_,\n  Tip_render,\n  Tip_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Tip_api; }\nTip_component.options.__file = \"src/components/Tip.vue\"\n/* harmony default export */ var Tip = (Tip_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Option.vue?vue&type=script&lang=js&\n\n\n\n\n\nvar arrowPlaceholder, checkMark, minusMark;\nvar Option = {\n  name: 'vue-treeselect--option',\n  inject: ['instance'],\n  props: {\n    node: {\n      type: Object,\n      required: true\n    }\n  },\n  computed: {\n    shouldExpand: function shouldExpand() {\n      var instance = this.instance,\n          node = this.node;\n      return node.isBranch && instance.shouldExpand(node);\n    },\n    shouldShow: function shouldShow() {\n      var instance = this.instance,\n          node = this.node;\n      return instance.shouldShowOptionInMenu(node);\n    }\n  },\n  methods: {\n    renderOption: function renderOption() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      var optionClass = {\n        'vue-treeselect__option': true,\n        'vue-treeselect__option--disabled': node.isDisabled,\n        'vue-treeselect__option--selected': instance.isSelected(node),\n        'vue-treeselect__option--highlight': node.isHighlighted,\n        'vue-treeselect__option--matched': instance.localSearch.active && node.isMatched,\n        'vue-treeselect__option--hide': !this.shouldShow\n      };\n      return h(\"div\", {\n        \"class\": optionClass,\n        on: {\n          \"mouseenter\": this.handleMouseEnterOption\n        },\n        attrs: {\n          \"data-id\": node.id\n        }\n      }, [this.renderArrow(), this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]), this.renderLabel()])]);\n    },\n    renderSubOptionsList: function renderSubOptionsList() {\n      var h = this.$createElement;\n      if (!this.shouldExpand) return null;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__list\"\n      }, [this.renderSubOptions(), this.renderNoChildrenTip(), this.renderLoadingChildrenTip(), this.renderLoadingChildrenErrorTip()]);\n    },\n    renderArrow: function renderArrow() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      if (instance.shouldFlattenOptions && this.shouldShow) return null;\n\n      if (node.isBranch) {\n        var transitionProps = {\n          props: {\n            name: 'vue-treeselect__option-arrow--prepare',\n            appear: true\n          }\n        };\n        var arrowClass = {\n          'vue-treeselect__option-arrow': true,\n          'vue-treeselect__option-arrow--rotated': this.shouldExpand\n        };\n        return h(\"div\", {\n          \"class\": \"vue-treeselect__option-arrow-container\",\n          on: {\n            \"mousedown\": this.handleMouseDownOnArrow\n          }\n        }, [h(\"transition\", transitionProps, [h(Arrow, {\n          \"class\": arrowClass\n        })])]);\n      }\n\n      if (instance.hasBranchNodes) {\n        if (!arrowPlaceholder) arrowPlaceholder = h(\"div\", {\n          \"class\": \"vue-treeselect__option-arrow-placeholder\"\n        }, [\"\\xA0\"]);\n        return arrowPlaceholder;\n      }\n\n      return null;\n    },\n    renderLabelContainer: function renderLabelContainer(children) {\n      var h = this.$createElement;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__label-container\",\n        on: {\n          \"mousedown\": this.handleMouseDownOnLabelContainer\n        }\n      }, [children]);\n    },\n    renderCheckboxContainer: function renderCheckboxContainer(children) {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      if (instance.single) return null;\n      if (instance.disableBranchNodes && node.isBranch) return null;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__checkbox-container\"\n      }, [children]);\n    },\n    renderCheckbox: function renderCheckbox() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      var checkedState = instance.forest.checkedStateMap[node.id];\n      var checkboxClass = {\n        'vue-treeselect__checkbox': true,\n        'vue-treeselect__checkbox--checked': checkedState === CHECKED,\n        'vue-treeselect__checkbox--indeterminate': checkedState === INDETERMINATE,\n        'vue-treeselect__checkbox--unchecked': checkedState === UNCHECKED,\n        'vue-treeselect__checkbox--disabled': node.isDisabled\n      };\n      if (!checkMark) checkMark = h(\"span\", {\n        \"class\": \"vue-treeselect__check-mark\"\n      });\n      if (!minusMark) minusMark = h(\"span\", {\n        \"class\": \"vue-treeselect__minus-mark\"\n      });\n      return h(\"span\", {\n        \"class\": checkboxClass\n      }, [checkMark, minusMark]);\n    },\n    renderLabel: function renderLabel() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      var shouldShowCount = node.isBranch && (instance.localSearch.active ? instance.showCountOnSearchComputed : instance.showCount);\n      var count = shouldShowCount ? instance.localSearch.active ? instance.localSearch.countMap[node.id][instance.showCountOf] : node.count[instance.showCountOf] : NaN;\n      var labelClassName = 'vue-treeselect__label';\n      var countClassName = 'vue-treeselect__count';\n      var customLabelRenderer = instance.$scopedSlots['option-label'];\n      if (customLabelRenderer) return customLabelRenderer({\n        node: node,\n        shouldShowCount: shouldShowCount,\n        count: count,\n        labelClassName: labelClassName,\n        countClassName: countClassName\n      });\n      return h(\"label\", {\n        \"class\": labelClassName\n      }, [node.label, shouldShowCount && h(\"span\", {\n        \"class\": countClassName\n      }, [\"(\", count, \")\"])]);\n    },\n    renderSubOptions: function renderSubOptions() {\n      var h = this.$createElement;\n      var node = this.node;\n      if (!node.childrenStates.isLoaded) return null;\n      return node.children.map(function (childNode) {\n        return h(Option, {\n          attrs: {\n            node: childNode\n          },\n          key: childNode.id\n        });\n      });\n    },\n    renderNoChildrenTip: function renderNoChildrenTip() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      if (!node.childrenStates.isLoaded || node.children.length) return null;\n      return h(Tip, {\n        attrs: {\n          type: \"no-children\",\n          icon: \"warning\"\n        }\n      }, [instance.noChildrenText]);\n    },\n    renderLoadingChildrenTip: function renderLoadingChildrenTip() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      if (!node.childrenStates.isLoading) return null;\n      return h(Tip, {\n        attrs: {\n          type: \"loading\",\n          icon: \"loader\"\n        }\n      }, [instance.loadingText]);\n    },\n    renderLoadingChildrenErrorTip: function renderLoadingChildrenErrorTip() {\n      var h = this.$createElement;\n      var instance = this.instance,\n          node = this.node;\n      if (!node.childrenStates.loadingError) return null;\n      return h(Tip, {\n        attrs: {\n          type: \"error\",\n          icon: \"error\"\n        }\n      }, [node.childrenStates.loadingError, h(\"a\", {\n        \"class\": \"vue-treeselect__retry\",\n        attrs: {\n          title: instance.retryTitle\n        },\n        on: {\n          \"mousedown\": this.handleMouseDownOnRetry\n        }\n      }, [instance.retryText])]);\n    },\n    handleMouseEnterOption: function handleMouseEnterOption(evt) {\n      var instance = this.instance,\n          node = this.node;\n      if (evt.target !== evt.currentTarget) return;\n      instance.setCurrentHighlightedOption(node, false);\n    },\n    handleMouseDownOnArrow: onLeftClick(function handleMouseDownOnOptionArrow() {\n      var instance = this.instance,\n          node = this.node;\n      instance.toggleExpanded(node);\n    }),\n    handleMouseDownOnLabelContainer: onLeftClick(function handleMouseDownOnLabelContainer() {\n      var instance = this.instance,\n          node = this.node;\n\n      if (node.isBranch && instance.disableBranchNodes) {\n        instance.toggleExpanded(node);\n      } else {\n        instance.select(node);\n      }\n    }),\n    handleMouseDownOnRetry: onLeftClick(function handleMouseDownOnRetry() {\n      var instance = this.instance,\n          node = this.node;\n      instance.loadChildrenOptions(node);\n    })\n  },\n  render: function render() {\n    var h = arguments[0];\n    var node = this.node;\n    var indentLevel = this.instance.shouldFlattenOptions ? 0 : node.level;\n\n    var listItemClass = defineProperty_default()({\n      'vue-treeselect__list-item': true\n    }, \"vue-treeselect__indent-level-\".concat(indentLevel), true);\n\n    var transitionProps = {\n      props: {\n        name: 'vue-treeselect__list--transition'\n      }\n    };\n    return h(\"div\", {\n      \"class\": listItemClass\n    }, [this.renderOption(), node.isBranch && h(\"transition\", transitionProps, [this.renderSubOptionsList()])]);\n  }\n};\n/* harmony default export */ var Optionvue_type_script_lang_js_ = (Option);\n// CONCATENATED MODULE: ./src/components/Option.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Optionvue_type_script_lang_js_ = (Optionvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Option.vue\nvar Option_render, Option_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Option_component = normalizeComponent(\n  components_Optionvue_type_script_lang_js_,\n  Option_render,\n  Option_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Option_api; }\nOption_component.options.__file = \"src/components/Option.vue\"\n/* harmony default export */ var components_Option = (Option_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Menu.vue?vue&type=script&lang=js&\n\n\n\n\nvar directionMap = {\n  top: 'top',\n  bottom: 'bottom',\n  above: 'top',\n  below: 'bottom'\n};\n/* harmony default export */ var Menuvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--menu',\n  inject: ['instance'],\n  computed: {\n    menuStyle: function menuStyle() {\n      var instance = this.instance;\n      return {\n        maxHeight: instance.maxHeight + 'px'\n      };\n    },\n    menuContainerStyle: function menuContainerStyle() {\n      var instance = this.instance;\n      return {\n        zIndex: instance.appendToBody ? null : instance.zIndex\n      };\n    }\n  },\n  watch: {\n    'instance.menu.isOpen': function instanceMenuIsOpen(newValue) {\n      if (newValue) {\n        this.$nextTick(this.onMenuOpen);\n      } else {\n        this.onMenuClose();\n      }\n    }\n  },\n  created: function created() {\n    this.menuSizeWatcher = null;\n    this.menuResizeAndScrollEventListeners = null;\n  },\n  mounted: function mounted() {\n    var instance = this.instance;\n    if (instance.menu.isOpen) this.$nextTick(this.onMenuOpen);\n  },\n  destroyed: function destroyed() {\n    this.onMenuClose();\n  },\n  methods: {\n    renderMenu: function renderMenu() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      if (!instance.menu.isOpen) return null;\n      return h(\"div\", {\n        ref: \"menu\",\n        \"class\": \"vue-treeselect__menu\",\n        on: {\n          \"mousedown\": instance.handleMouseDown\n        },\n        style: this.menuStyle\n      }, [this.renderBeforeList(), instance.async ? this.renderAsyncSearchMenuInner() : instance.localSearch.active ? this.renderLocalSearchMenuInner() : this.renderNormalMenuInner(), this.renderAfterList()]);\n    },\n    renderBeforeList: function renderBeforeList() {\n      var instance = this.instance;\n      var beforeListRenderer = instance.$scopedSlots['before-list'];\n      return beforeListRenderer ? beforeListRenderer() : null;\n    },\n    renderAfterList: function renderAfterList() {\n      var instance = this.instance;\n      var afterListRenderer = instance.$scopedSlots['after-list'];\n      return afterListRenderer ? afterListRenderer() : null;\n    },\n    renderNormalMenuInner: function renderNormalMenuInner() {\n      var instance = this.instance;\n\n      if (instance.rootOptionsStates.isLoading) {\n        return this.renderLoadingOptionsTip();\n      } else if (instance.rootOptionsStates.loadingError) {\n        return this.renderLoadingRootOptionsErrorTip();\n      } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) {\n        return this.renderNoAvailableOptionsTip();\n      } else {\n        return this.renderOptionList();\n      }\n    },\n    renderLocalSearchMenuInner: function renderLocalSearchMenuInner() {\n      var instance = this.instance;\n\n      if (instance.rootOptionsStates.isLoading) {\n        return this.renderLoadingOptionsTip();\n      } else if (instance.rootOptionsStates.loadingError) {\n        return this.renderLoadingRootOptionsErrorTip();\n      } else if (instance.rootOptionsStates.isLoaded && instance.forest.normalizedOptions.length === 0) {\n        return this.renderNoAvailableOptionsTip();\n      } else if (instance.localSearch.noResults) {\n        return this.renderNoResultsTip();\n      } else {\n        return this.renderOptionList();\n      }\n    },\n    renderAsyncSearchMenuInner: function renderAsyncSearchMenuInner() {\n      var instance = this.instance;\n      var entry = instance.getRemoteSearchEntry();\n      var shouldShowSearchPromptTip = instance.trigger.searchQuery === '' && !instance.defaultOptions;\n      var shouldShowNoResultsTip = shouldShowSearchPromptTip ? false : entry.isLoaded && entry.options.length === 0;\n\n      if (shouldShowSearchPromptTip) {\n        return this.renderSearchPromptTip();\n      } else if (entry.isLoading) {\n        return this.renderLoadingOptionsTip();\n      } else if (entry.loadingError) {\n        return this.renderAsyncSearchLoadingErrorTip();\n      } else if (shouldShowNoResultsTip) {\n        return this.renderNoResultsTip();\n      } else {\n        return this.renderOptionList();\n      }\n    },\n    renderOptionList: function renderOptionList() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(\"div\", {\n        \"class\": \"vue-treeselect__list\"\n      }, [instance.forest.normalizedOptions.map(function (rootNode) {\n        return h(components_Option, {\n          attrs: {\n            node: rootNode\n          },\n          key: rootNode.id\n        });\n      })]);\n    },\n    renderSearchPromptTip: function renderSearchPromptTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(Tip, {\n        attrs: {\n          type: \"search-prompt\",\n          icon: \"warning\"\n        }\n      }, [instance.searchPromptText]);\n    },\n    renderLoadingOptionsTip: function renderLoadingOptionsTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(Tip, {\n        attrs: {\n          type: \"loading\",\n          icon: \"loader\"\n        }\n      }, [instance.loadingText]);\n    },\n    renderLoadingRootOptionsErrorTip: function renderLoadingRootOptionsErrorTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(Tip, {\n        attrs: {\n          type: \"error\",\n          icon: \"error\"\n        }\n      }, [instance.rootOptionsStates.loadingError, h(\"a\", {\n        \"class\": \"vue-treeselect__retry\",\n        on: {\n          \"click\": instance.loadRootOptions\n        },\n        attrs: {\n          title: instance.retryTitle\n        }\n      }, [instance.retryText])]);\n    },\n    renderAsyncSearchLoadingErrorTip: function renderAsyncSearchLoadingErrorTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      var entry = instance.getRemoteSearchEntry();\n      return h(Tip, {\n        attrs: {\n          type: \"error\",\n          icon: \"error\"\n        }\n      }, [entry.loadingError, h(\"a\", {\n        \"class\": \"vue-treeselect__retry\",\n        on: {\n          \"click\": instance.handleRemoteSearch\n        },\n        attrs: {\n          title: instance.retryTitle\n        }\n      }, [instance.retryText])]);\n    },\n    renderNoAvailableOptionsTip: function renderNoAvailableOptionsTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(Tip, {\n        attrs: {\n          type: \"no-options\",\n          icon: \"warning\"\n        }\n      }, [instance.noOptionsText]);\n    },\n    renderNoResultsTip: function renderNoResultsTip() {\n      var h = this.$createElement;\n      var instance = this.instance;\n      return h(Tip, {\n        attrs: {\n          type: \"no-results\",\n          icon: \"warning\"\n        }\n      }, [instance.noResultsText]);\n    },\n    onMenuOpen: function onMenuOpen() {\n      this.adjustMenuOpenDirection();\n      this.setupMenuSizeWatcher();\n      this.setupMenuResizeAndScrollEventListeners();\n    },\n    onMenuClose: function onMenuClose() {\n      this.removeMenuSizeWatcher();\n      this.removeMenuResizeAndScrollEventListeners();\n    },\n    adjustMenuOpenDirection: function adjustMenuOpenDirection() {\n      var instance = this.instance;\n      if (!instance.menu.isOpen) return;\n      var $menu = instance.getMenu();\n      var $control = instance.getControl();\n      var menuRect = $menu.getBoundingClientRect();\n      var controlRect = $control.getBoundingClientRect();\n      var menuHeight = menuRect.height;\n      var viewportHeight = window.innerHeight;\n      var spaceAbove = controlRect.top;\n      var spaceBelow = window.innerHeight - controlRect.bottom;\n      var isControlInViewport = controlRect.top >= 0 && controlRect.top <= viewportHeight || controlRect.top < 0 && controlRect.bottom > 0;\n      var hasEnoughSpaceBelow = spaceBelow > menuHeight + MENU_BUFFER;\n      var hasEnoughSpaceAbove = spaceAbove > menuHeight + MENU_BUFFER;\n\n      if (!isControlInViewport) {\n        instance.closeMenu();\n      } else if (instance.openDirection !== 'auto') {\n        instance.menu.placement = directionMap[instance.openDirection];\n      } else if (hasEnoughSpaceBelow || !hasEnoughSpaceAbove) {\n        instance.menu.placement = 'bottom';\n      } else {\n        instance.menu.placement = 'top';\n      }\n    },\n    setupMenuSizeWatcher: function setupMenuSizeWatcher() {\n      var instance = this.instance;\n      var $menu = instance.getMenu();\n      if (this.menuSizeWatcher) return;\n      this.menuSizeWatcher = {\n        remove: watchSize($menu, this.adjustMenuOpenDirection)\n      };\n    },\n    setupMenuResizeAndScrollEventListeners: function setupMenuResizeAndScrollEventListeners() {\n      var instance = this.instance;\n      var $control = instance.getControl();\n      if (this.menuResizeAndScrollEventListeners) return;\n      this.menuResizeAndScrollEventListeners = {\n        remove: setupResizeAndScrollEventListeners($control, this.adjustMenuOpenDirection)\n      };\n    },\n    removeMenuSizeWatcher: function removeMenuSizeWatcher() {\n      if (!this.menuSizeWatcher) return;\n      this.menuSizeWatcher.remove();\n      this.menuSizeWatcher = null;\n    },\n    removeMenuResizeAndScrollEventListeners: function removeMenuResizeAndScrollEventListeners() {\n      if (!this.menuResizeAndScrollEventListeners) return;\n      this.menuResizeAndScrollEventListeners.remove();\n      this.menuResizeAndScrollEventListeners = null;\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      ref: \"menu-container\",\n      \"class\": \"vue-treeselect__menu-container\",\n      style: this.menuContainerStyle\n    }, [h(\"transition\", {\n      attrs: {\n        name: \"vue-treeselect__menu--transition\"\n      }\n    }, [this.renderMenu()])]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/Menu.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Menuvue_type_script_lang_js_ = (Menuvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Menu.vue\nvar Menu_render, Menu_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Menu_component = normalizeComponent(\n  components_Menuvue_type_script_lang_js_,\n  Menu_render,\n  Menu_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Menu_api; }\nMenu_component.options.__file = \"src/components/Menu.vue\"\n/* harmony default export */ var Menu = (Menu_component.exports);\n// EXTERNAL MODULE: external \"vue\"\nvar external_vue_ = __webpack_require__(14);\nvar external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);\n\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/MenuPortal.vue?vue&type=script&lang=js&\n\n\nfunction MenuPortalvue_type_script_lang_js_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction MenuPortalvue_type_script_lang_js_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { MenuPortalvue_type_script_lang_js_ownKeys(source, true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { MenuPortalvue_type_script_lang_js_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\n\nvar PortalTarget = {\n  name: 'vue-treeselect--portal-target',\n  inject: ['instance'],\n  watch: {\n    'instance.menu.isOpen': function instanceMenuIsOpen(newValue) {\n      if (newValue) {\n        this.setupHandlers();\n      } else {\n        this.removeHandlers();\n      }\n    },\n    'instance.menu.placement': function instanceMenuPlacement() {\n      this.updateMenuContainerOffset();\n    }\n  },\n  created: function created() {\n    this.controlResizeAndScrollEventListeners = null;\n    this.controlSizeWatcher = null;\n  },\n  mounted: function mounted() {\n    var instance = this.instance;\n    if (instance.menu.isOpen) this.setupHandlers();\n  },\n  methods: {\n    setupHandlers: function setupHandlers() {\n      this.updateWidth();\n      this.updateMenuContainerOffset();\n      this.setupControlResizeAndScrollEventListeners();\n      this.setupControlSizeWatcher();\n    },\n    removeHandlers: function removeHandlers() {\n      this.removeControlResizeAndScrollEventListeners();\n      this.removeControlSizeWatcher();\n    },\n    setupControlResizeAndScrollEventListeners: function setupControlResizeAndScrollEventListeners() {\n      var instance = this.instance;\n      var $control = instance.getControl();\n      if (this.controlResizeAndScrollEventListeners) return;\n      this.controlResizeAndScrollEventListeners = {\n        remove: setupResizeAndScrollEventListeners($control, this.updateMenuContainerOffset)\n      };\n    },\n    setupControlSizeWatcher: function setupControlSizeWatcher() {\n      var _this = this;\n\n      var instance = this.instance;\n      var $control = instance.getControl();\n      if (this.controlSizeWatcher) return;\n      this.controlSizeWatcher = {\n        remove: watchSize($control, function () {\n          _this.updateWidth();\n\n          _this.updateMenuContainerOffset();\n        })\n      };\n    },\n    removeControlResizeAndScrollEventListeners: function removeControlResizeAndScrollEventListeners() {\n      if (!this.controlResizeAndScrollEventListeners) return;\n      this.controlResizeAndScrollEventListeners.remove();\n      this.controlResizeAndScrollEventListeners = null;\n    },\n    removeControlSizeWatcher: function removeControlSizeWatcher() {\n      if (!this.controlSizeWatcher) return;\n      this.controlSizeWatcher.remove();\n      this.controlSizeWatcher = null;\n    },\n    updateWidth: function updateWidth() {\n      var instance = this.instance;\n      var $portalTarget = this.$el;\n      var $control = instance.getControl();\n      var controlRect = $control.getBoundingClientRect();\n      $portalTarget.style.width = controlRect.width + 'px';\n    },\n    updateMenuContainerOffset: function updateMenuContainerOffset() {\n      var instance = this.instance;\n      var $control = instance.getControl();\n      var $portalTarget = this.$el;\n      var controlRect = $control.getBoundingClientRect();\n      var portalTargetRect = $portalTarget.getBoundingClientRect();\n      var offsetY = instance.menu.placement === 'bottom' ? controlRect.height : 0;\n      var left = Math.round(controlRect.left - portalTargetRect.left) + 'px';\n      var top = Math.round(controlRect.top - portalTargetRect.top + offsetY) + 'px';\n      var menuContainerStyle = this.$refs.menu.$refs['menu-container'].style;\n      var transformVariations = ['transform', 'webkitTransform', 'MozTransform', 'msTransform'];\n      var transform = find(transformVariations, function (t) {\n        return t in document.body.style;\n      });\n      menuContainerStyle[transform] = \"translate(\".concat(left, \", \").concat(top, \")\");\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var instance = this.instance;\n    var portalTargetClass = ['vue-treeselect__portal-target', instance.wrapperClass];\n    var portalTargetStyle = {\n      zIndex: instance.zIndex\n    };\n    return h(\"div\", {\n      \"class\": portalTargetClass,\n      style: portalTargetStyle,\n      attrs: {\n        \"data-instance-id\": instance.getInstanceId()\n      }\n    }, [h(Menu, {\n      ref: \"menu\"\n    })]);\n  },\n  destroyed: function destroyed() {\n    this.removeHandlers();\n  }\n};\nvar placeholder;\n/* harmony default export */ var MenuPortalvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect--menu-portal',\n  created: function created() {\n    this.portalTarget = null;\n  },\n  mounted: function mounted() {\n    this.setup();\n  },\n  destroyed: function destroyed() {\n    this.teardown();\n  },\n  methods: {\n    setup: function setup() {\n      var el = document.createElement('div');\n      document.body.appendChild(el);\n      this.portalTarget = new external_vue_default.a(MenuPortalvue_type_script_lang_js_objectSpread({\n        el: el,\n        parent: this\n      }, PortalTarget));\n    },\n    teardown: function teardown() {\n      document.body.removeChild(this.portalTarget.$el);\n      this.portalTarget.$el.innerHTML = '';\n      this.portalTarget.$destroy();\n      this.portalTarget = null;\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    if (!placeholder) placeholder = h(\"div\", {\n      \"class\": \"vue-treeselect__menu-placeholder\"\n    });\n    return placeholder;\n  }\n});\n// CONCATENATED MODULE: ./src/components/MenuPortal.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_MenuPortalvue_type_script_lang_js_ = (MenuPortalvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/MenuPortal.vue\nvar MenuPortal_render, MenuPortal_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar MenuPortal_component = normalizeComponent(\n  components_MenuPortalvue_type_script_lang_js_,\n  MenuPortal_render,\n  MenuPortal_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var MenuPortal_api; }\nMenuPortal_component.options.__file = \"src/components/MenuPortal.vue\"\n/* harmony default export */ var MenuPortal = (MenuPortal_component.exports);\n// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Treeselect.vue?vue&type=script&lang=js&\n\n\n\n\n\n/* harmony default export */ var Treeselectvue_type_script_lang_js_ = ({\n  name: 'vue-treeselect',\n  mixins: [treeselectMixin],\n  computed: {\n    wrapperClass: function wrapperClass() {\n      return {\n        'vue-treeselect': true,\n        'vue-treeselect--single': this.single,\n        'vue-treeselect--multi': this.multiple,\n        'vue-treeselect--searchable': this.searchable,\n        'vue-treeselect--disabled': this.disabled,\n        'vue-treeselect--focused': this.trigger.isFocused,\n        'vue-treeselect--has-value': this.hasValue,\n        'vue-treeselect--open': this.menu.isOpen,\n        'vue-treeselect--open-above': this.menu.placement === 'top',\n        'vue-treeselect--open-below': this.menu.placement === 'bottom',\n        'vue-treeselect--branch-nodes-disabled': this.disableBranchNodes,\n        'vue-treeselect--append-to-body': this.appendToBody\n      };\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      ref: \"wrapper\",\n      \"class\": this.wrapperClass\n    }, [h(HiddenFields), h(Control, {\n      ref: \"control\"\n    }), this.appendToBody ? h(MenuPortal, {\n      ref: \"portal\"\n    }) : h(Menu, {\n      ref: \"menu\"\n    })]);\n  }\n});\n// CONCATENATED MODULE: ./src/components/Treeselect.vue?vue&type=script&lang=js&\n /* harmony default export */ var components_Treeselectvue_type_script_lang_js_ = (Treeselectvue_type_script_lang_js_); \n// CONCATENATED MODULE: ./src/components/Treeselect.vue\nvar Treeselect_render, Treeselect_staticRenderFns\n\n\n\n\n/* normalize component */\n\nvar Treeselect_component = normalizeComponent(\n  components_Treeselectvue_type_script_lang_js_,\n  Treeselect_render,\n  Treeselect_staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\n/* hot reload */\nif (false) { var Treeselect_api; }\nTreeselect_component.options.__file = \"src/components/Treeselect.vue\"\n/* harmony default export */ var Treeselect = (Treeselect_component.exports);\n// EXTERNAL MODULE: ./src/style.less\nvar style = __webpack_require__(15);\n\n// CONCATENATED MODULE: ./src/index.js\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"VERSION\", function() { return VERSION; });\n/* concated harmony reexport Treeselect */__webpack_require__.d(__webpack_exports__, \"Treeselect\", function() { return Treeselect; });\n/* concated harmony reexport treeselectMixin */__webpack_require__.d(__webpack_exports__, \"treeselectMixin\", function() { return treeselectMixin; });\n/* concated harmony reexport LOAD_ROOT_OPTIONS */__webpack_require__.d(__webpack_exports__, \"LOAD_ROOT_OPTIONS\", function() { return LOAD_ROOT_OPTIONS; });\n/* concated harmony reexport LOAD_CHILDREN_OPTIONS */__webpack_require__.d(__webpack_exports__, \"LOAD_CHILDREN_OPTIONS\", function() { return LOAD_CHILDREN_OPTIONS; });\n/* concated harmony reexport ASYNC_SEARCH */__webpack_require__.d(__webpack_exports__, \"ASYNC_SEARCH\", function() { return ASYNC_SEARCH; });\n\n\n\n/* harmony default export */ var src = __webpack_exports__[\"default\"] = (Treeselect);\n\n\nvar VERSION = \"0.4.0\";\n\n/***/ })\n/******/ ]);\n//# sourceMappingURL=vue-treeselect.cjs.js.map\n\n//# sourceURL=webpack:///./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.cjs.js?");

/***/ }),

/***/ "./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css":
/*!**********************************************************************!*\
  !*** ./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--7-oneOf-3-1!../../../postcss-loader/src??ref--7-oneOf-3-2!./vue-treeselect.css */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"6012f152\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css?");

/***/ }),

/***/ "./node_modules/babel-helper-vue-jsx-merge-props/index.js":
/*!****************************************************************!*\
  !*** ./node_modules/babel-helper-vue-jsx-merge-props/index.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("var nestRE = /^(attrs|props|on|nativeOn|class|style|hook)$/\n\nmodule.exports = function mergeJSXProps (objs) {\n  return objs.reduce(function (a, b) {\n    var aa, bb, key, nestedKey, temp\n    for (key in b) {\n      aa = a[key]\n      bb = b[key]\n      if (aa && nestRE.test(key)) {\n        // normalize class\n        if (key === 'class') {\n          if (typeof aa === 'string') {\n            temp = aa\n            a[key] = aa = {}\n            aa[temp] = true\n          }\n          if (typeof bb === 'string') {\n            temp = bb\n            b[key] = bb = {}\n            bb[temp] = true\n          }\n        }\n        if (key === 'on' || key === 'nativeOn' || key === 'hook') {\n          // merge functions\n          for (nestedKey in bb) {\n            aa[nestedKey] = mergeFn(aa[nestedKey], bb[nestedKey])\n          }\n        } else if (Array.isArray(aa)) {\n          a[key] = aa.concat(bb)\n        } else if (Array.isArray(bb)) {\n          a[key] = [aa].concat(bb)\n        } else {\n          for (nestedKey in bb) {\n            aa[nestedKey] = bb[nestedKey]\n          }\n        }\n      } else {\n        a[key] = b[key]\n      }\n    }\n    return a\n  }, {})\n}\n\nfunction mergeFn (a, b) {\n  return function () {\n    a && a.apply(this, arguments)\n    b && b.apply(this, arguments)\n  }\n}\n\n\n//# sourceURL=webpack:///./node_modules/babel-helper-vue-jsx-merge-props/index.js?");

/***/ }),

/***/ "./node_modules/core-js/internals/set-to-string-tag.js":
/*!*************************************************************!*\
  !*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar defineProperty = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f;\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (target, TAG, STATIC) {\n  if (target && !STATIC) target = target.prototype;\n  if (target && !hasOwn(target, TO_STRING_TAG)) {\n    defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n  }\n};\n\n\n//# sourceURL=webpack:///./node_modules/core-js/internals/set-to-string-tag.js?");

/***/ }),

/***/ "./node_modules/core-js/modules/es.reflect.to-string-tag.js":
/*!******************************************************************!*\
  !*** ./node_modules/core-js/modules/es.reflect.to-string-tag.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\n\n$({ global: true }, { Reflect: {} });\n\n// Reflect[@@toStringTag] property\n// https://tc39.es/ecma262/#sec-reflect-@@tostringtag\nsetToStringTag(global.Reflect, 'Reflect', true);\n\n\n//# sourceURL=webpack:///./node_modules/core-js/modules/es.reflect.to-string-tag.js?");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css":
/*!**********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/postcss-loader/src??ref--7-oneOf-3-2!./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css ***!
  \**********************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \"/*!\\n * vue-treeselect v0.4.0 | (c) 2017-2019 Riophae Lee\\n * Released under the MIT License.\\n * https://vue-treeselect.js.org/\\n */\\n/**\\n * Dependencies\\n */\\n/**\\n * Variables\\n */\\n/**\\n * Mixins\\n */\\n/**\\n * Helpers\\n */\\n.vue-treeselect-helper-hide {\\n  display: none;\\n}\\n.vue-treeselect-helper-zoom-effect-off {\\n  transform: none !important;\\n}\\n/**\\n * Animations\\n */\\n@keyframes vue-treeselect-animation-fade-in {\\n  0% {\\n    opacity: 0;\\n  }\\n}\\n@keyframes vue-treeselect-animation-bounce {\\n  0%,\\n  100% {\\n    transform: scale(0);\\n  }\\n  50% {\\n    transform: scale(1);\\n  }\\n}\\n@keyframes vue-treeselect-animation-rotate {\\n  100% {\\n    transform: rotate(360deg);\\n  }\\n}\\n/**\\n * Transitions\\n */\\n.vue-treeselect__multi-value-item--transition-enter-active,\\n.vue-treeselect__multi-value-item--transition-leave-active {\\n  transition-duration: 200ms;\\n  transition-property: transform, opacity;\\n}\\n.vue-treeselect__multi-value-item--transition-enter-active {\\n  transition-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);\\n}\\n.vue-treeselect__multi-value-item--transition-leave-active {\\n  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\n  position: absolute;\\n}\\n.vue-treeselect__multi-value-item--transition-enter,\\n.vue-treeselect__multi-value-item--transition-leave-to {\\n  transform: scale(0.7);\\n  opacity: 0;\\n}\\n.vue-treeselect__multi-value-item--transition-move {\\n  transition: 200ms transform cubic-bezier(0.165, 0.84, 0.44, 1);\\n}\\n/**\\n * Namespace\\n */\\n.vue-treeselect {\\n  position: relative;\\n  text-align: left;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect {\\n  text-align: right;\\n}\\n.vue-treeselect div,\\n.vue-treeselect span {\\n  box-sizing: border-box;\\n}\\n.vue-treeselect svg {\\n  fill: currentColor;\\n}\\n/**\\n * Control\\n */\\n.vue-treeselect__control {\\n  padding-left: 5px;\\n  padding-right: 5px;\\n  display: table;\\n  table-layout: fixed;\\n  width: 100%;\\n  height: 36px;\\n  border: 1px solid #ddd;\\n  border-radius: 5px;\\n  background: #fff;\\n  transition-duration: 200ms;\\n  transition-property: border-color, box-shadow, width, height, background-color, opacity;\\n  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\\n}\\n.vue-treeselect:not(.vue-treeselect--disabled):not(.vue-treeselect--focused) .vue-treeselect__control:hover {\\n  border-color: #cfcfcf;\\n}\\n.vue-treeselect--focused:not(.vue-treeselect--open) .vue-treeselect__control {\\n  border-color: #039be5;\\n  box-shadow: 0 0 0 3px rgba(3, 155, 229, 0.1);\\n}\\n.vue-treeselect--disabled .vue-treeselect__control {\\n  background-color: #f9f9f9;\\n}\\n.vue-treeselect--open .vue-treeselect__control {\\n  border-color: #cfcfcf;\\n}\\n.vue-treeselect--open.vue-treeselect--open-below .vue-treeselect__control {\\n  border-bottom-left-radius: 0;\\n  border-bottom-right-radius: 0;\\n}\\n.vue-treeselect--open.vue-treeselect--open-above .vue-treeselect__control {\\n  border-top-left-radius: 0;\\n  border-top-right-radius: 0;\\n}\\n.vue-treeselect__value-container,\\n.vue-treeselect__multi-value {\\n  width: 100%;\\n  vertical-align: middle;\\n}\\n.vue-treeselect__value-container {\\n  display: table-cell;\\n  position: relative;\\n}\\n.vue-treeselect--searchable:not(.vue-treeselect--disabled) .vue-treeselect__value-container {\\n  cursor: text;\\n}\\n.vue-treeselect__multi-value {\\n  display: inline-block;\\n}\\n.vue-treeselect--has-value .vue-treeselect__multi-value {\\n  margin-bottom: 5px;\\n}\\n.vue-treeselect__placeholder,\\n.vue-treeselect__single-value {\\n  overflow: hidden;\\n  text-overflow: ellipsis;\\n  white-space: nowrap;\\n  padding-left: 5px;\\n  padding-right: 5px;\\n  position: absolute;\\n  top: 0;\\n  right: 0;\\n  bottom: 0;\\n  left: 0;\\n  line-height: 34px;\\n  -webkit-user-select: none;\\n     -moz-user-select: none;\\n          user-select: none;\\n  pointer-events: none;\\n}\\n.vue-treeselect__placeholder {\\n  color: #bdbdbd;\\n}\\n.vue-treeselect__single-value {\\n  color: #333;\\n}\\n.vue-treeselect--focused.vue-treeselect--searchable .vue-treeselect__single-value {\\n  color: #bdbdbd;\\n}\\n.vue-treeselect--disabled .vue-treeselect__single-value {\\n  position: static;\\n}\\n.vue-treeselect__multi-value-item-container {\\n  display: inline-block;\\n  padding-top: 5px;\\n  padding-right: 5px;\\n  vertical-align: top;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__multi-value-item-container {\\n  padding-right: 0;\\n  padding-left: 5px;\\n}\\n.vue-treeselect__multi-value-item {\\n  cursor: pointer;\\n  display: inline-table;\\n  background: #e3f2fd;\\n  padding: 2px 0;\\n  border: 1px solid transparent;\\n  border-radius: 2px;\\n  color: #039be5;\\n  font-size: 12px;\\n  vertical-align: top;\\n}\\n.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-disabled):hover .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new) .vue-treeselect__multi-value-item:not(.vue-treeselect__multi-value-item-new):hover {\\n  cursor: pointer;\\n  background: #e3f2fd;\\n  color: #039be5;\\n}\\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-disabled {\\n  cursor: default;\\n  background: #f5f5f5;\\n  color: #757575;\\n}\\n.vue-treeselect--disabled .vue-treeselect__multi-value-item {\\n  cursor: default;\\n  background: #fff;\\n  border-color: #e5e5e5;\\n  color: #555;\\n}\\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new {\\n  background: #e8f5e9;\\n}\\n.vue-treeselect__multi-value-item.vue-treeselect__multi-value-item-new:hover {\\n  background: #e8f5e9;\\n}\\n.vue-treeselect__value-remove,\\n.vue-treeselect__multi-value-label {\\n  display: table-cell;\\n  padding: 0 5px;\\n  vertical-align: middle;\\n}\\n.vue-treeselect__value-remove {\\n  color: #039be5;\\n  padding-left: 5px;\\n  border-left: 1px solid #fff;\\n  line-height: 0;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__value-remove {\\n  border-left: 0 none;\\n  border-right: 1px solid #fff;\\n}\\n.vue-treeselect__multi-value-item:hover .vue-treeselect__value-remove {\\n  color: #e53935;\\n}\\n.vue-treeselect--disabled .vue-treeselect__value-remove,\\n.vue-treeselect__multi-value-item-disabled .vue-treeselect__value-remove {\\n  display: none;\\n}\\n.vue-treeselect__value-remove > svg {\\n  width: 6px;\\n  height: 6px;\\n}\\n.vue-treeselect__multi-value-label {\\n  padding-right: 5px;\\n  white-space: pre-line;\\n  -webkit-user-select: none;\\n     -moz-user-select: none;\\n          user-select: none;\\n}\\n.vue-treeselect__limit-tip {\\n  display: inline-block;\\n  padding-top: 5px;\\n  padding-right: 5px;\\n  vertical-align: top;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__limit-tip {\\n  padding-right: 0;\\n  padding-left: 5px;\\n}\\n.vue-treeselect__limit-tip-text {\\n  cursor: default;\\n  display: block;\\n  margin: 2px 0;\\n  padding: 1px 0;\\n  color: #bdbdbd;\\n  font-size: 12px;\\n  font-weight: 600;\\n}\\n.vue-treeselect__input-container {\\n  display: block;\\n  max-width: 100%;\\n  outline: none;\\n}\\n.vue-treeselect--single .vue-treeselect__input-container {\\n  font-size: inherit;\\n  height: 100%;\\n}\\n.vue-treeselect--multi .vue-treeselect__input-container {\\n  display: inline-block;\\n  font-size: 12px;\\n  vertical-align: top;\\n}\\n.vue-treeselect--searchable .vue-treeselect__input-container {\\n  padding-left: 5px;\\n  padding-right: 5px;\\n}\\n.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container {\\n  padding-top: 5px;\\n  padding-left: 0;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value .vue-treeselect__input-container {\\n  padding-left: 5px;\\n  padding-right: 0;\\n}\\n.vue-treeselect--disabled .vue-treeselect__input-container {\\n  display: none;\\n}\\n.vue-treeselect__input,\\n.vue-treeselect__sizer {\\n  margin: 0;\\n  line-height: inherit;\\n  font-family: inherit;\\n  font-size: inherit;\\n}\\n.vue-treeselect__input {\\n  max-width: 100%;\\n  margin: 0;\\n  padding: 0;\\n  border: 0;\\n  outline: none;\\n  box-sizing: content-box;\\n  box-shadow: none;\\n  background: none transparent;\\n  line-height: 1;\\n  vertical-align: middle;\\n}\\n.vue-treeselect__input::-ms-clear {\\n  display: none;\\n}\\n.vue-treeselect--single .vue-treeselect__input {\\n  width: 100%;\\n  height: 100%;\\n}\\n.vue-treeselect--multi .vue-treeselect__input {\\n  padding-top: 3px;\\n  padding-bottom: 3px;\\n}\\n.vue-treeselect--has-value .vue-treeselect__input {\\n  line-height: inherit;\\n  vertical-align: top;\\n}\\n.vue-treeselect__sizer {\\n  position: absolute;\\n  top: 0;\\n  left: 0;\\n  visibility: hidden;\\n  height: 0;\\n  overflow: scroll;\\n  white-space: pre;\\n}\\n.vue-treeselect__x-container {\\n  display: table-cell;\\n  vertical-align: middle;\\n  width: 20px;\\n  text-align: center;\\n  line-height: 0;\\n  cursor: pointer;\\n  color: #ccc;\\n  animation: 200ms vue-treeselect-animation-fade-in cubic-bezier(0.075, 0.82, 0.165, 1);\\n}\\n.vue-treeselect__x-container:hover {\\n  color: #e53935;\\n}\\n.vue-treeselect__x {\\n  width: 8px;\\n  height: 8px;\\n}\\n.vue-treeselect__control-arrow-container {\\n  display: table-cell;\\n  vertical-align: middle;\\n  width: 20px;\\n  text-align: center;\\n  line-height: 0;\\n  cursor: pointer;\\n}\\n.vue-treeselect--disabled .vue-treeselect__control-arrow-container {\\n  cursor: default;\\n}\\n.vue-treeselect__control-arrow {\\n  width: 9px;\\n  height: 9px;\\n  color: #ccc;\\n}\\n.vue-treeselect:not(.vue-treeselect--disabled) .vue-treeselect__control-arrow-container:hover .vue-treeselect__control-arrow {\\n  color: #616161;\\n}\\n.vue-treeselect--disabled .vue-treeselect__control-arrow {\\n  opacity: 0.35;\\n}\\n.vue-treeselect__control-arrow--rotated {\\n  transform: rotateZ(180deg);\\n}\\n/**\\n * Menu\\n */\\n.vue-treeselect__menu-container {\\n  position: absolute;\\n  left: 0;\\n  width: 100%;\\n  overflow: visible;\\n  transition: 0s;\\n}\\n.vue-treeselect--open-below:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container {\\n  top: 100%;\\n}\\n.vue-treeselect--open-above:not(.vue-treeselect--append-to-body) .vue-treeselect__menu-container {\\n  bottom: 100%;\\n}\\n.vue-treeselect__menu {\\n  cursor: default;\\n  padding-top: 5px;\\n  padding-bottom: 5px;\\n  display: block;\\n  position: absolute;\\n  overflow-x: hidden;\\n  overflow-y: auto;\\n  width: auto;\\n  border: 1px solid #cfcfcf;\\n  background: #fff;\\n  line-height: 180%;\\n  -webkit-overflow-scrolling: touch;\\n}\\n.vue-treeselect--open-below .vue-treeselect__menu {\\n  border-bottom-left-radius: 5px;\\n  border-bottom-right-radius: 5px;\\n  top: 0;\\n  margin-top: -1px;\\n  border-top-color: #f2f2f2;\\n  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\\n}\\n.vue-treeselect--open-above .vue-treeselect__menu {\\n  border-top-left-radius: 5px;\\n  border-top-right-radius: 5px;\\n  bottom: 0;\\n  margin-bottom: -1px;\\n  border-bottom-color: #f2f2f2;\\n}\\n.vue-treeselect__indent-level-0 .vue-treeselect__option {\\n  padding-left: 5px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-0 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 5px;\\n}\\n.vue-treeselect__indent-level-0 .vue-treeselect__tip {\\n  padding-left: 25px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-0 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 25px;\\n}\\n.vue-treeselect__indent-level-1 .vue-treeselect__option {\\n  padding-left: 25px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-1 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 25px;\\n}\\n.vue-treeselect__indent-level-1 .vue-treeselect__tip {\\n  padding-left: 45px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-1 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 45px;\\n}\\n.vue-treeselect__indent-level-2 .vue-treeselect__option {\\n  padding-left: 45px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-2 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 45px;\\n}\\n.vue-treeselect__indent-level-2 .vue-treeselect__tip {\\n  padding-left: 65px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-2 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 65px;\\n}\\n.vue-treeselect__indent-level-3 .vue-treeselect__option {\\n  padding-left: 65px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-3 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 65px;\\n}\\n.vue-treeselect__indent-level-3 .vue-treeselect__tip {\\n  padding-left: 85px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-3 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 85px;\\n}\\n.vue-treeselect__indent-level-4 .vue-treeselect__option {\\n  padding-left: 85px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-4 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 85px;\\n}\\n.vue-treeselect__indent-level-4 .vue-treeselect__tip {\\n  padding-left: 105px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-4 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 105px;\\n}\\n.vue-treeselect__indent-level-5 .vue-treeselect__option {\\n  padding-left: 105px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-5 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 105px;\\n}\\n.vue-treeselect__indent-level-5 .vue-treeselect__tip {\\n  padding-left: 125px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-5 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 125px;\\n}\\n.vue-treeselect__indent-level-6 .vue-treeselect__option {\\n  padding-left: 125px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-6 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 125px;\\n}\\n.vue-treeselect__indent-level-6 .vue-treeselect__tip {\\n  padding-left: 145px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-6 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 145px;\\n}\\n.vue-treeselect__indent-level-7 .vue-treeselect__option {\\n  padding-left: 145px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-7 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 145px;\\n}\\n.vue-treeselect__indent-level-7 .vue-treeselect__tip {\\n  padding-left: 165px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-7 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 165px;\\n}\\n.vue-treeselect__indent-level-8 .vue-treeselect__option {\\n  padding-left: 165px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-8 .vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 165px;\\n}\\n.vue-treeselect__indent-level-8 .vue-treeselect__tip {\\n  padding-left: 185px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__indent-level-8 .vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 185px;\\n}\\n.vue-treeselect__option {\\n  padding-left: 5px;\\n  padding-right: 5px;\\n  display: table;\\n  table-layout: fixed;\\n  width: 100%;\\n}\\n.vue-treeselect__option--highlight {\\n  background: #f5f5f5;\\n}\\n.vue-treeselect--single .vue-treeselect__option--selected {\\n  background: #e3f2fd;\\n  font-weight: 600;\\n}\\n.vue-treeselect--single .vue-treeselect__option--selected:hover {\\n  background: #e3f2fd;\\n}\\n.vue-treeselect__option--hide {\\n  display: none;\\n}\\n.vue-treeselect__option-arrow-container,\\n.vue-treeselect__option-arrow-placeholder {\\n  display: table-cell;\\n  vertical-align: middle;\\n  width: 20px;\\n  text-align: center;\\n  line-height: 0;\\n}\\n.vue-treeselect__option-arrow-container {\\n  cursor: pointer;\\n}\\n.vue-treeselect__option-arrow {\\n  display: inline-block;\\n  width: 9px;\\n  height: 9px;\\n  color: #ccc;\\n  vertical-align: middle;\\n  transition: 200ms transform cubic-bezier(0.19, 1, 0.22, 1);\\n  transform: rotateZ(-90deg);\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__option-arrow {\\n  transform: rotateZ(90deg);\\n}\\n.vue-treeselect__option-arrow-container:hover .vue-treeselect__option-arrow,\\n.vue-treeselect--branch-nodes-disabled .vue-treeselect__option:hover .vue-treeselect__option-arrow {\\n  color: #616161;\\n}\\n.vue-treeselect__option-arrow--rotated {\\n  transform: rotateZ(0);\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__option-arrow--rotated {\\n  transform: rotateZ(0);\\n}\\n.vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter {\\n  transform: rotateZ(-90deg) !important;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__option-arrow--rotated.vue-treeselect__option-arrow--prepare-enter {\\n  transform: rotateZ(90deg) !important;\\n}\\n.vue-treeselect__label-container {\\n  display: table-cell;\\n  vertical-align: middle;\\n  cursor: pointer;\\n  display: table;\\n  width: 100%;\\n  table-layout: fixed;\\n  color: inherit;\\n}\\n.vue-treeselect__option--disabled .vue-treeselect__label-container {\\n  cursor: not-allowed;\\n  color: rgba(0, 0, 0, 0.25);\\n}\\n.vue-treeselect__checkbox-container {\\n  display: table-cell;\\n  width: 20px;\\n  min-width: 20px;\\n  height: 100%;\\n  text-align: center;\\n  vertical-align: middle;\\n}\\n.vue-treeselect__checkbox {\\n  display: block;\\n  margin: auto;\\n  width: 12px;\\n  height: 12px;\\n  border-width: 1px;\\n  border-style: solid;\\n  border-radius: 2px;\\n  position: relative;\\n  transition: 200ms all cubic-bezier(0.075, 0.82, 0.165, 1);\\n}\\n.vue-treeselect__check-mark,\\n.vue-treeselect__minus-mark {\\n  display: block;\\n  position: absolute;\\n  left: 1px;\\n  top: 1px;\\n  background-repeat: no-repeat;\\n  opacity: 0;\\n  transition: 200ms all ease;\\n}\\n.vue-treeselect__minus-mark {\\n  width: 8px;\\n  height: 8px;\\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAAD///////9zeKVjAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=);\\n  background-size: 8px 8px;\\n}\\n@media (min-resolution: 1.5dppx) {\\n  .vue-treeselect__minus-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==);\\n  }\\n}\\n@media (min-resolution: 192dpi) {\\n  .vue-treeselect__minus-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAAD///////////84wDuoAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==);\\n  }\\n}\\n@media (min-resolution: 288dpi) {\\n  .vue-treeselect__minus-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAAD///////////////+PQt5oAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==);\\n  }\\n}\\n.vue-treeselect__checkbox--indeterminate > .vue-treeselect__minus-mark {\\n  opacity: 1;\\n}\\n.vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAgMAAAC5YVYYAAAACVBMVEUAAADi4uLh4eHOxeSRAAAAAnRSTlMAuLMp9oYAAAAPSURBVAjXY4CDrJUgBAMAGaECJ9dz3BAAAAAASUVORK5CYII=);\\n}\\n@media (min-resolution: 1.5dppx) {\\n  .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==);\\n  }\\n}\\n@media (min-resolution: 192dpi) {\\n  .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEUAAADi4uLi4uLh4eE5RQaIAAAAA3RSTlMAyTzPIdReAAAAGUlEQVQI12PAD+b///+Nof7//79gAsLFCwAx/w4blADeeQAAAABJRU5ErkJggg==);\\n  }\\n}\\n@media (min-resolution: 288dpi) {\\n  .vue-treeselect__checkbox--disabled .vue-treeselect__minus-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYBAMAAAASWSDLAAAAD1BMVEUAAADh4eHg4ODNzc3h4eEYfw2wAAAABHRSTlMAy2EFIuWxUgAAACRJREFUGNNjGBBgJOICBY7KDCoucODEAJSAS6FwUJShGjAQAADBPRGrK2/FhgAAAABJRU5ErkJggg==);\\n  }\\n}\\n.vue-treeselect__check-mark {\\n  width: 8px;\\n  height: 8px;\\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAQlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////8IX9KGAAAAFXRSTlMA8u24NxILB+Tawb6jiH1zRz0xIQIIP3GUAAAAMklEQVQI1y3FtQEAMQDDQD+EGbz/qkEVOpyEOP6PudKjZNSXn4Jm2CKRdBKzSLsFWl8fMG0Bl6Jk1rMAAAAASUVORK5CYII=);\\n  background-size: 8px 8px;\\n  transform: scaleY(0.125);\\n}\\n@media (min-resolution: 1.5dppx) {\\n  .vue-treeselect__check-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC);\\n  }\\n}\\n@media (min-resolution: 192dpi) {\\n  .vue-treeselect__check-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAYFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////98JRy6AAAAH3RSTlMAzu4sDenl38fBvo1OMyIdEQrj1cSihX5hYFpHNycIcQOASAAAAF9JREFUGNN9zEcOgDAMRFHTS0LvNfe/JRmHKAIJ/mqeLJn+k9uDtaeUeFnFziGsBucUTirrprfe81RqZ3Bb6hPWeuZwDFOHyf+ig9CCzQ7INBn7bG5kF+QSt13BHNJnF7AaCT4Y+CW7AAAAAElFTkSuQmCC);\\n  }\\n}\\n@media (min-resolution: 288dpi) {\\n  .vue-treeselect__check-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAWlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////9ZMre9AAAAHXRSTlMA/PiJhGNI9XlEHJB/b2ldV08+Oibk49vPp6QhAYgGBuwAAACCSURBVCjPrdHdDoIwDAXgTWAqCigo/+f9X5OwnoUwtis4V92XNWladUl+rzQPeQJAN2EHxoOnsPn7/oYk8fxBv08Rr/deOH/aZ2Nm8ZJ+s573QGfWKnNuZGzWm3+lv2V3pcU1XQ385/yjmBoM3Z+dXvlbYLLD3ujhTaOM3KaIXvNkFkuSEvYy1LqOAAAAAElFTkSuQmCC);\\n  }\\n}\\n.vue-treeselect__checkbox--checked > .vue-treeselect__check-mark {\\n  opacity: 1;\\n  transform: scaleY(1);\\n}\\n.vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\\n  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEUAAADj4+Pf39/h4eHh4eHh4eHk5OTh4eHg4ODi4uLh4eHh4eHg4ODh4eHh4eHg4ODh4eHh4eHp6en////h4eFqcyvUAAAAFHRSTlMAOQfy7bgS5NrBvqOIfXNHMSELAgQ/iFsAAAA2SURBVAjXY4AANjYIzcjMAaVFuBkY+RkEWERYmRjYRXjANAOfiIgIFxNIAa8IpxBEi6AwiAQAK2MBd7xY8csAAAAASUVORK5CYII=);\\n}\\n@media (min-resolution: 1.5dppx) {\\n  .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==);\\n  }\\n}\\n@media (min-resolution: 192dpi) {\\n  .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAADh4eHh4eHh4eHi4uLb29vh4eHh4eHh4eHh4eHh4eHh4eHh4eHi4uLi4uLj4+Pi4uLk5OTo6Ojh4eHh4eHi4uLg4ODg4ODh4eHg4ODh4eHf39/g4OD////h4eEzIk+wAAAAHnRSTlMAzu6/LA3p5eLZx8ONTjYiHRIKooV+YWBaRzEnCANnm5rnAAAAZElEQVQY033P2wqAIAyA4VWaaWrnc/n+j5mbhBjUf7WPoTD47TJb4i5zTr/sRDRHuyFaoWX7uK/RlbctlPEuyI1f4WY9yQINEkf6rzzo8YIzmUFoCs7J1EjeIaa9bXIEmzl8dgOZEAj/+2IvzAAAAABJRU5ErkJggg==);\\n  }\\n}\\n@media (min-resolution: 288dpi) {\\n  .vue-treeselect__checkbox--disabled .vue-treeselect__check-mark {\\n    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAUVBMVEUAAADh4eHh4eHh4eHh4eHi4uLi4uLh4eHh4eHh4eHf39/j4+Ph4eHh4eHh4eHg4ODi4uLh4eHh4eHi4uLh4eHh4eHh4eHh4eHh4eH////h4eF3FMFTAAAAGnRSTlMA+/eJhGhfSHE9JBzz5KaQf3pXT0Xbz0I5AYDw8F0AAAB+SURBVCjPrdHbDoMgEEVRKAii1dZe9fz/hxplTiKIT7qfYCWTEEZdUvOwbckNAD2WHeh3brHW5f5EzGQ+iN+b1Gt6KPvtv16Dn6JX9M9ya3/A1yfu5dlyduL6Hec7mXY6ddXLPP2lpABGZ8PWXfYLTJxZekVhhl7eTX24zZPNKXoRC7zQLjUAAAAASUVORK5CYII=);\\n  }\\n}\\n.vue-treeselect__checkbox--unchecked {\\n  border-color: #e0e0e0;\\n  background: #fff;\\n}\\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--unchecked {\\n  border-color: #039be5;\\n  background: #fff;\\n}\\n.vue-treeselect__checkbox--indeterminate {\\n  border-color: #039be5;\\n  background: #039be5;\\n}\\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--indeterminate {\\n  border-color: #039be5;\\n  background: #039be5;\\n}\\n.vue-treeselect__checkbox--checked {\\n  border-color: #039be5;\\n  background: #039be5;\\n}\\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--checked {\\n  border-color: #039be5;\\n  background: #039be5;\\n}\\n.vue-treeselect__checkbox--disabled {\\n  border-color: #e0e0e0;\\n  background-color: #f7f7f7;\\n}\\n.vue-treeselect__label-container:hover .vue-treeselect__checkbox--disabled {\\n  border-color: #e0e0e0;\\n  background-color: #f7f7f7;\\n}\\n.vue-treeselect__label {\\n  overflow: hidden;\\n  text-overflow: ellipsis;\\n  white-space: nowrap;\\n  display: table-cell;\\n  padding-left: 5px;\\n  max-width: 100%;\\n  vertical-align: middle;\\n  cursor: inherit;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__label {\\n  padding-left: 0;\\n  padding-right: 5px;\\n}\\n.vue-treeselect__count {\\n  margin-left: 5px;\\n  font-weight: 400;\\n  opacity: 0.6;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__count {\\n  margin-left: 0;\\n  margin-right: 5px;\\n}\\n.vue-treeselect__tip {\\n  padding-left: 5px;\\n  padding-right: 5px;\\n  display: table;\\n  table-layout: fixed;\\n  width: 100%;\\n  color: #757575;\\n}\\n.vue-treeselect__tip-text {\\n  display: table-cell;\\n  vertical-align: middle;\\n  padding-left: 5px;\\n  padding-right: 5px;\\n  overflow: hidden;\\n  text-overflow: ellipsis;\\n  white-space: nowrap;\\n  width: 100%;\\n  font-size: 12px;\\n}\\n.vue-treeselect__error-tip .vue-treeselect__retry {\\n  cursor: pointer;\\n  margin-left: 5px;\\n  font-style: normal;\\n  font-weight: 600;\\n  text-decoration: none;\\n  color: #039be5;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect__error-tip .vue-treeselect__retry {\\n  margin-left: 0;\\n  margin-right: 5px;\\n}\\n.vue-treeselect__icon-container {\\n  display: table-cell;\\n  vertical-align: middle;\\n  width: 20px;\\n  text-align: center;\\n  line-height: 0;\\n}\\n.vue-treeselect--single .vue-treeselect__icon-container {\\n  padding-left: 5px;\\n}\\n[dir=\\\"rtl\\\"] .vue-treeselect--single .vue-treeselect__icon-container {\\n  padding-left: 0;\\n  padding-right: 5px;\\n}\\n.vue-treeselect__icon-warning {\\n  display: block;\\n  margin: auto;\\n  border-radius: 50%;\\n  position: relative;\\n  width: 12px;\\n  height: 12px;\\n  background: #fb8c00;\\n}\\n.vue-treeselect__icon-warning::after {\\n  display: block;\\n  position: absolute;\\n  content: \\\"\\\";\\n  left: 5px;\\n  top: 2.5px;\\n  width: 2px;\\n  height: 1px;\\n  border: 0 solid #fff;\\n  border-top-width: 5px;\\n  border-bottom-width: 1px;\\n}\\n.vue-treeselect__icon-error {\\n  display: block;\\n  margin: auto;\\n  border-radius: 50%;\\n  position: relative;\\n  width: 12px;\\n  height: 12px;\\n  background: #e53935;\\n}\\n.vue-treeselect__icon-error::before,\\n.vue-treeselect__icon-error::after {\\n  display: block;\\n  position: absolute;\\n  content: \\\"\\\";\\n  background: #fff;\\n  transform: rotate(45deg);\\n}\\n.vue-treeselect__icon-error::before {\\n  width: 6px;\\n  height: 2px;\\n  left: 3px;\\n  top: 5px;\\n}\\n.vue-treeselect__icon-error::after {\\n  width: 2px;\\n  height: 6px;\\n  left: 5px;\\n  top: 3px;\\n}\\n.vue-treeselect__icon-loader {\\n  display: block;\\n  margin: auto;\\n  position: relative;\\n  width: 12px;\\n  height: 12px;\\n  text-align: center;\\n  animation: 1.6s vue-treeselect-animation-rotate linear infinite;\\n}\\n.vue-treeselect__icon-loader::before,\\n.vue-treeselect__icon-loader::after {\\n  border-radius: 50%;\\n  position: absolute;\\n  content: \\\"\\\";\\n  left: 0;\\n  top: 0;\\n  display: block;\\n  width: 100%;\\n  height: 100%;\\n  opacity: 0.6;\\n  animation: 1.6s vue-treeselect-animation-bounce ease-in-out infinite;\\n}\\n.vue-treeselect__icon-loader::before {\\n  background: #039be5;\\n}\\n.vue-treeselect__icon-loader::after {\\n  background: #b3e5fc;\\n  animation-delay: -0.8s;\\n}\\n/**\\n * Menu Portal\\n */\\n.vue-treeselect__menu-placeholder {\\n  display: none;\\n}\\n.vue-treeselect__portal-target {\\n  position: absolute;\\n  display: block;\\n  left: 0;\\n  top: 0;\\n  height: 0;\\n  width: 0;\\n  padding: 0;\\n  margin: 0;\\n  border: 0;\\n  overflow: visible;\\n  box-sizing: border-box;\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/@riophae/vue-treeselect/dist/vue-treeselect.css?./node_modules/css-loader/dist/cjs.js??ref--7-oneOf-3-1!./node_modules/postcss-loader/src??ref--7-oneOf-3-2");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/action-sheet/index.less":
/*!******************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/action-sheet/index.less ***!
  \******************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-action-sheet {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-orient: vertical;\\n  -webkit-box-direction: normal;\\n  -webkit-flex-direction: column;\\n          flex-direction: column;\\n  max-height: 80%;\\n  overflow: hidden;\\n  color: #323233;\\n}\\n.van-action-sheet__content {\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1 auto;\\n          flex: 1 auto;\\n  overflow-y: auto;\\n  -webkit-overflow-scrolling: touch;\\n}\\n.van-action-sheet__item,\\n.van-action-sheet__cancel {\\n  display: block;\\n  width: 100%;\\n  padding: 14px 16px;\\n  font-size: 16px;\\n  background-color: #fff;\\n  border: none;\\n  cursor: pointer;\\n}\\n.van-action-sheet__item:active,\\n.van-action-sheet__cancel:active {\\n  background-color: #f2f3f5;\\n}\\n.van-action-sheet__item {\\n  line-height: 22px;\\n}\\n.van-action-sheet__item--loading,\\n.van-action-sheet__item--disabled {\\n  color: #c8c9cc;\\n}\\n.van-action-sheet__item--loading:active,\\n.van-action-sheet__item--disabled:active {\\n  background-color: #fff;\\n}\\n.van-action-sheet__item--disabled {\\n  cursor: not-allowed;\\n}\\n.van-action-sheet__item--loading {\\n  cursor: default;\\n}\\n.van-action-sheet__cancel {\\n  -webkit-flex-shrink: 0;\\n          flex-shrink: 0;\\n  box-sizing: border-box;\\n  color: #646566;\\n}\\n.van-action-sheet__subname {\\n  margin-top: 8px;\\n  color: #969799;\\n  font-size: 12px;\\n  line-height: 18px;\\n}\\n.van-action-sheet__gap {\\n  display: block;\\n  height: 8px;\\n  background-color: #f7f8fa;\\n}\\n.van-action-sheet__header {\\n  -webkit-flex-shrink: 0;\\n          flex-shrink: 0;\\n  font-weight: 500;\\n  font-size: 16px;\\n  line-height: 48px;\\n  text-align: center;\\n}\\n.van-action-sheet__description {\\n  position: relative;\\n  -webkit-flex-shrink: 0;\\n          flex-shrink: 0;\\n  padding: 20px 16px;\\n  color: #969799;\\n  font-size: 14px;\\n  line-height: 20px;\\n  text-align: center;\\n}\\n.van-action-sheet__description::after {\\n  position: absolute;\\n  box-sizing: border-box;\\n  content: ' ';\\n  pointer-events: none;\\n  right: 16px;\\n  bottom: 0;\\n  left: 16px;\\n  border-bottom: 1px solid #ebedf0;\\n  -webkit-transform: scaleY(0.5);\\n          transform: scaleY(0.5);\\n}\\n.van-action-sheet__loading-icon .van-loading__spinner {\\n  width: 22px;\\n  height: 22px;\\n}\\n.van-action-sheet__close {\\n  position: absolute;\\n  top: 0;\\n  right: 0;\\n  z-index: 1;\\n  padding: 0 16px;\\n  color: #c8c9cc;\\n  font-size: 22px;\\n  line-height: inherit;\\n}\\n.van-action-sheet__close:active {\\n  color: #969799;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/action-sheet/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/cascader/index.less":
/*!**************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/cascader/index.less ***!
  \**************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-cascader__header {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: justify;\\n  -webkit-justify-content: space-between;\\n          justify-content: space-between;\\n  height: 48px;\\n  padding: 0 16px;\\n}\\n.van-cascader__title {\\n  font-weight: 500;\\n  font-size: 16px;\\n  line-height: 20px;\\n}\\n.van-cascader__close-icon {\\n  color: #c8c9cc;\\n  font-size: 22px;\\n}\\n.van-cascader__close-icon:active {\\n  color: #969799;\\n}\\n.van-cascader__tabs .van-tab {\\n  -webkit-box-flex: 0;\\n  -webkit-flex: none;\\n          flex: none;\\n  padding: 0 10px;\\n}\\n.van-cascader__tabs.van-tabs--line .van-tabs__wrap {\\n  height: 48px;\\n}\\n.van-cascader__tabs .van-tabs__nav--complete {\\n  padding-right: 6px;\\n  padding-left: 6px;\\n}\\n.van-cascader__tab {\\n  color: #323233;\\n  font-weight: 500;\\n}\\n.van-cascader__tab--unselected {\\n  color: #969799;\\n  font-weight: normal;\\n}\\n.van-cascader__option {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: justify;\\n  -webkit-justify-content: space-between;\\n          justify-content: space-between;\\n  padding: 10px 16px;\\n  font-size: 14px;\\n  line-height: 20px;\\n}\\n.van-cascader__option:active {\\n  background-color: #f2f3f5;\\n}\\n.van-cascader__option--selected {\\n  color: #ee0a24;\\n  font-weight: 500;\\n}\\n.van-cascader__selected-icon {\\n  font-size: 18px;\\n}\\n.van-cascader__options {\\n  box-sizing: border-box;\\n  height: 384px;\\n  padding-top: 6px;\\n  overflow-y: auto;\\n  -webkit-overflow-scrolling: touch;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/cascader/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/cell/index.less":
/*!**********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/cell/index.less ***!
  \**********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-cell {\\n  position: relative;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  box-sizing: border-box;\\n  width: 100%;\\n  padding: 10px 16px;\\n  overflow: hidden;\\n  color: #323233;\\n  font-size: 14px;\\n  line-height: 24px;\\n  background-color: #fff;\\n}\\n.van-cell::after {\\n  position: absolute;\\n  box-sizing: border-box;\\n  content: ' ';\\n  pointer-events: none;\\n  right: 16px;\\n  bottom: 0;\\n  left: 16px;\\n  border-bottom: 1px solid #ebedf0;\\n  -webkit-transform: scaleY(0.5);\\n          transform: scaleY(0.5);\\n}\\n.van-cell:last-child::after,\\n.van-cell--borderless::after {\\n  display: none;\\n}\\n.van-cell__label {\\n  margin-top: 4px;\\n  color: #969799;\\n  font-size: 12px;\\n  line-height: 18px;\\n}\\n.van-cell__title,\\n.van-cell__value {\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1;\\n          flex: 1;\\n}\\n.van-cell__value {\\n  position: relative;\\n  overflow: hidden;\\n  color: #969799;\\n  text-align: right;\\n  vertical-align: middle;\\n  word-wrap: break-word;\\n}\\n.van-cell__value--alone {\\n  color: #323233;\\n  text-align: left;\\n}\\n.van-cell__left-icon,\\n.van-cell__right-icon {\\n  height: 24px;\\n  font-size: 16px;\\n  line-height: 24px;\\n}\\n.van-cell__left-icon {\\n  margin-right: 4px;\\n}\\n.van-cell__right-icon {\\n  margin-left: 4px;\\n  color: #969799;\\n}\\n.van-cell--clickable {\\n  cursor: pointer;\\n}\\n.van-cell--clickable:active {\\n  background-color: #f2f3f5;\\n}\\n.van-cell--required {\\n  overflow: visible;\\n}\\n.van-cell--required::before {\\n  position: absolute;\\n  left: 8px;\\n  color: #ee0a24;\\n  font-size: 14px;\\n  content: '*';\\n}\\n.van-cell--center {\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n}\\n.van-cell--large {\\n  padding-top: 12px;\\n  padding-bottom: 12px;\\n}\\n.van-cell--large .van-cell__title {\\n  font-size: 16px;\\n}\\n.van-cell--large .van-cell__label {\\n  font-size: 14px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/cell/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/checkbox-group/index.less":
/*!********************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/checkbox-group/index.less ***!
  \********************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-checkbox-group--horizontal {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-flex-wrap: wrap;\\n          flex-wrap: wrap;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox-group/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/checkbox/index.less":
/*!**************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/checkbox/index.less ***!
  \**************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-checkbox {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  overflow: hidden;\\n  cursor: pointer;\\n  -webkit-user-select: none;\\n          user-select: none;\\n}\\n.van-checkbox--disabled {\\n  cursor: not-allowed;\\n}\\n.van-checkbox--label-disabled {\\n  cursor: default;\\n}\\n.van-checkbox--horizontal {\\n  margin-right: 12px;\\n}\\n.van-checkbox__icon {\\n  -webkit-box-flex: 0;\\n  -webkit-flex: none;\\n          flex: none;\\n  height: 1em;\\n  font-size: 20px;\\n  line-height: 1em;\\n  cursor: pointer;\\n}\\n.van-checkbox__icon .van-icon {\\n  display: block;\\n  box-sizing: border-box;\\n  width: 1.25em;\\n  height: 1.25em;\\n  color: transparent;\\n  font-size: 0.8em;\\n  line-height: 1.25;\\n  text-align: center;\\n  border: 1px solid #c8c9cc;\\n  -webkit-transition-duration: 0.2s;\\n          transition-duration: 0.2s;\\n  -webkit-transition-property: color, border-color, background-color;\\n  transition-property: color, border-color, background-color;\\n}\\n.van-checkbox__icon--round .van-icon {\\n  border-radius: 100%;\\n}\\n.van-checkbox__icon--checked .van-icon {\\n  color: #fff;\\n  background-color: #1989fa;\\n  border-color: #1989fa;\\n}\\n.van-checkbox__icon--disabled {\\n  cursor: not-allowed;\\n}\\n.van-checkbox__icon--disabled .van-icon {\\n  background-color: #ebedf0;\\n  border-color: #c8c9cc;\\n}\\n.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon {\\n  color: #c8c9cc;\\n}\\n.van-checkbox__label {\\n  margin-left: 8px;\\n  color: #323233;\\n  line-height: 20px;\\n}\\n.van-checkbox__label--left {\\n  margin: 0 8px 0 0;\\n}\\n.van-checkbox__label--disabled {\\n  color: #c8c9cc;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/col/index.less":
/*!*********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/col/index.less ***!
  \*********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-col {\\n  float: left;\\n  box-sizing: border-box;\\n  min-height: 1px;\\n}\\n.van-col--1 {\\n  width: 4.16666667%;\\n}\\n.van-col--offset-1 {\\n  margin-left: 4.16666667%;\\n}\\n.van-col--2 {\\n  width: 8.33333333%;\\n}\\n.van-col--offset-2 {\\n  margin-left: 8.33333333%;\\n}\\n.van-col--3 {\\n  width: 12.5%;\\n}\\n.van-col--offset-3 {\\n  margin-left: 12.5%;\\n}\\n.van-col--4 {\\n  width: 16.66666667%;\\n}\\n.van-col--offset-4 {\\n  margin-left: 16.66666667%;\\n}\\n.van-col--5 {\\n  width: 20.83333333%;\\n}\\n.van-col--offset-5 {\\n  margin-left: 20.83333333%;\\n}\\n.van-col--6 {\\n  width: 25%;\\n}\\n.van-col--offset-6 {\\n  margin-left: 25%;\\n}\\n.van-col--7 {\\n  width: 29.16666667%;\\n}\\n.van-col--offset-7 {\\n  margin-left: 29.16666667%;\\n}\\n.van-col--8 {\\n  width: 33.33333333%;\\n}\\n.van-col--offset-8 {\\n  margin-left: 33.33333333%;\\n}\\n.van-col--9 {\\n  width: 37.5%;\\n}\\n.van-col--offset-9 {\\n  margin-left: 37.5%;\\n}\\n.van-col--10 {\\n  width: 41.66666667%;\\n}\\n.van-col--offset-10 {\\n  margin-left: 41.66666667%;\\n}\\n.van-col--11 {\\n  width: 45.83333333%;\\n}\\n.van-col--offset-11 {\\n  margin-left: 45.83333333%;\\n}\\n.van-col--12 {\\n  width: 50%;\\n}\\n.van-col--offset-12 {\\n  margin-left: 50%;\\n}\\n.van-col--13 {\\n  width: 54.16666667%;\\n}\\n.van-col--offset-13 {\\n  margin-left: 54.16666667%;\\n}\\n.van-col--14 {\\n  width: 58.33333333%;\\n}\\n.van-col--offset-14 {\\n  margin-left: 58.33333333%;\\n}\\n.van-col--15 {\\n  width: 62.5%;\\n}\\n.van-col--offset-15 {\\n  margin-left: 62.5%;\\n}\\n.van-col--16 {\\n  width: 66.66666667%;\\n}\\n.van-col--offset-16 {\\n  margin-left: 66.66666667%;\\n}\\n.van-col--17 {\\n  width: 70.83333333%;\\n}\\n.van-col--offset-17 {\\n  margin-left: 70.83333333%;\\n}\\n.van-col--18 {\\n  width: 75%;\\n}\\n.van-col--offset-18 {\\n  margin-left: 75%;\\n}\\n.van-col--19 {\\n  width: 79.16666667%;\\n}\\n.van-col--offset-19 {\\n  margin-left: 79.16666667%;\\n}\\n.van-col--20 {\\n  width: 83.33333333%;\\n}\\n.van-col--offset-20 {\\n  margin-left: 83.33333333%;\\n}\\n.van-col--21 {\\n  width: 87.5%;\\n}\\n.van-col--offset-21 {\\n  margin-left: 87.5%;\\n}\\n.van-col--22 {\\n  width: 91.66666667%;\\n}\\n.van-col--offset-22 {\\n  margin-left: 91.66666667%;\\n}\\n.van-col--23 {\\n  width: 95.83333333%;\\n}\\n.van-col--offset-23 {\\n  margin-left: 95.83333333%;\\n}\\n.van-col--24 {\\n  width: 100%;\\n}\\n.van-col--offset-24 {\\n  margin-left: 100%;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/col/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/empty/index.less":
/*!***********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/empty/index.less ***!
  \***********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-empty {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-orient: vertical;\\n  -webkit-box-direction: normal;\\n  -webkit-flex-direction: column;\\n          flex-direction: column;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  box-sizing: border-box;\\n  padding: 32px 0;\\n}\\n.van-empty__image {\\n  width: 160px;\\n  height: 160px;\\n}\\n.van-empty__image img {\\n  width: 100%;\\n  height: 100%;\\n}\\n.van-empty__description {\\n  margin-top: 16px;\\n  padding: 0 60px;\\n  color: #969799;\\n  font-size: 14px;\\n  line-height: 20px;\\n}\\n.van-empty__bottom {\\n  margin-top: 24px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/empty/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/field/index.less":
/*!***********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/field/index.less ***!
  \***********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-field__label {\\n  -webkit-box-flex: 0;\\n  -webkit-flex: none;\\n          flex: none;\\n  box-sizing: border-box;\\n  width: 6.2em;\\n  margin-right: 12px;\\n  color: #646566;\\n  text-align: left;\\n  word-wrap: break-word;\\n}\\n.van-field__label--center {\\n  text-align: center;\\n}\\n.van-field__label--right {\\n  text-align: right;\\n}\\n.van-field--disabled .van-field__label {\\n  color: #c8c9cc;\\n}\\n.van-field__value {\\n  overflow: visible;\\n}\\n.van-field__body {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n}\\n.van-field__control {\\n  display: block;\\n  box-sizing: border-box;\\n  width: 100%;\\n  min-width: 0;\\n  margin: 0;\\n  padding: 0;\\n  color: #323233;\\n  line-height: inherit;\\n  text-align: left;\\n  background-color: transparent;\\n  border: 0;\\n  resize: none;\\n}\\n.van-field__control::-webkit-input-placeholder {\\n  color: #c8c9cc;\\n}\\n.van-field__control::placeholder {\\n  color: #c8c9cc;\\n}\\n.van-field__control:disabled {\\n  color: #c8c9cc;\\n  cursor: not-allowed;\\n  opacity: 1;\\n  -webkit-text-fill-color: #c8c9cc;\\n}\\n.van-field__control:read-only {\\n  cursor: default;\\n}\\n.van-field__control--center {\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  text-align: center;\\n}\\n.van-field__control--right {\\n  -webkit-box-pack: end;\\n  -webkit-justify-content: flex-end;\\n          justify-content: flex-end;\\n  text-align: right;\\n}\\n.van-field__control--custom {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  min-height: 24px;\\n}\\n.van-field__control[type='date'],\\n.van-field__control[type='time'],\\n.van-field__control[type='datetime-local'] {\\n  min-height: 24px;\\n}\\n.van-field__control[type='search'] {\\n  -webkit-appearance: none;\\n}\\n.van-field__clear,\\n.van-field__icon,\\n.van-field__button,\\n.van-field__right-icon {\\n  -webkit-flex-shrink: 0;\\n          flex-shrink: 0;\\n}\\n.van-field__clear,\\n.van-field__right-icon {\\n  margin-right: -8px;\\n  padding: 0 8px;\\n  line-height: inherit;\\n}\\n.van-field__clear {\\n  color: #c8c9cc;\\n  font-size: 16px;\\n  cursor: pointer;\\n}\\n.van-field__left-icon .van-icon,\\n.van-field__right-icon .van-icon {\\n  display: block;\\n  font-size: 16px;\\n  line-height: inherit;\\n}\\n.van-field__left-icon {\\n  margin-right: 4px;\\n}\\n.van-field__right-icon {\\n  color: #969799;\\n}\\n.van-field__button {\\n  padding-left: 8px;\\n}\\n.van-field__error-message {\\n  color: #ee0a24;\\n  font-size: 12px;\\n  text-align: left;\\n}\\n.van-field__error-message--center {\\n  text-align: center;\\n}\\n.van-field__error-message--right {\\n  text-align: right;\\n}\\n.van-field__word-limit {\\n  margin-top: 4px;\\n  color: #646566;\\n  font-size: 12px;\\n  line-height: 16px;\\n  text-align: right;\\n}\\n.van-field--error .van-field__control::-webkit-input-placeholder {\\n  color: #ee0a24;\\n  -webkit-text-fill-color: currentColor;\\n}\\n.van-field--error .van-field__control,\\n.van-field--error .van-field__control::placeholder {\\n  color: #ee0a24;\\n  -webkit-text-fill-color: currentColor;\\n}\\n.van-field--min-height .van-field__control {\\n  min-height: 60px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/field/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/image/index.less":
/*!***********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/image/index.less ***!
  \***********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-image {\\n  position: relative;\\n  display: inline-block;\\n}\\n.van-image--round {\\n  overflow: hidden;\\n  border-radius: 50%;\\n}\\n.van-image--round img {\\n  border-radius: inherit;\\n}\\n.van-image__img,\\n.van-image__error,\\n.van-image__loading {\\n  display: block;\\n  width: 100%;\\n  height: 100%;\\n}\\n.van-image__error,\\n.van-image__loading {\\n  position: absolute;\\n  top: 0;\\n  left: 0;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-orient: vertical;\\n  -webkit-box-direction: normal;\\n  -webkit-flex-direction: column;\\n          flex-direction: column;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  color: #969799;\\n  font-size: 14px;\\n  background-color: #f7f8fa;\\n}\\n.van-image__loading-icon {\\n  color: #dcdee0;\\n  font-size: 32px;\\n}\\n.van-image__error-icon {\\n  color: #dcdee0;\\n  font-size: 32px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/image/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/list/index.less":
/*!**********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/list/index.less ***!
  \**********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-list__loading,\\n.van-list__finished-text,\\n.van-list__error-text {\\n  color: #969799;\\n  font-size: 14px;\\n  line-height: 50px;\\n  text-align: center;\\n}\\n.van-list__placeholder {\\n  height: 0;\\n  pointer-events: none;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/list/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/nav-bar/index.less":
/*!*************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/nav-bar/index.less ***!
  \*************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-nav-bar {\\n  position: relative;\\n  z-index: 1;\\n  line-height: 22px;\\n  text-align: center;\\n  background-color: #fff;\\n  -webkit-user-select: none;\\n          user-select: none;\\n}\\n.van-nav-bar--fixed {\\n  position: fixed;\\n  top: 0;\\n  left: 0;\\n  width: 100%;\\n}\\n.van-nav-bar--safe-area-inset-top {\\n  padding-top: constant(safe-area-inset-top);\\n  padding-top: env(safe-area-inset-top);\\n}\\n.van-nav-bar .van-icon {\\n  color: #1989fa;\\n}\\n.van-nav-bar__content {\\n  position: relative;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  height: 46px;\\n}\\n.van-nav-bar__arrow {\\n  margin-right: 4px;\\n  font-size: 16px;\\n}\\n.van-nav-bar__title {\\n  max-width: 60%;\\n  margin: 0 auto;\\n  color: #323233;\\n  font-weight: 500;\\n  font-size: 16px;\\n}\\n.van-nav-bar__left,\\n.van-nav-bar__right {\\n  position: absolute;\\n  top: 0;\\n  bottom: 0;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  padding: 0 16px;\\n  font-size: 14px;\\n  cursor: pointer;\\n}\\n.van-nav-bar__left:active,\\n.van-nav-bar__right:active {\\n  opacity: 0.7;\\n}\\n.van-nav-bar__left {\\n  left: 0;\\n}\\n.van-nav-bar__right {\\n  right: 0;\\n}\\n.van-nav-bar__text {\\n  color: #1989fa;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/nav-bar/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/notify/index.less":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/notify/index.less ***!
  \************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-notify {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  box-sizing: border-box;\\n  padding: 8px 16px;\\n  color: #fff;\\n  font-size: 14px;\\n  line-height: 20px;\\n  white-space: pre-wrap;\\n  text-align: center;\\n  word-wrap: break-word;\\n}\\n.van-notify--primary {\\n  background-color: #1989fa;\\n}\\n.van-notify--success {\\n  background-color: #07c160;\\n}\\n.van-notify--danger {\\n  background-color: #ee0a24;\\n}\\n.van-notify--warning {\\n  background-color: #ff976a;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/notify/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/picker/index.less":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/picker/index.less ***!
  \************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-picker {\\n  position: relative;\\n  background-color: #fff;\\n  -webkit-user-select: none;\\n          user-select: none;\\n}\\n.van-picker__toolbar {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: justify;\\n  -webkit-justify-content: space-between;\\n          justify-content: space-between;\\n  height: 44px;\\n}\\n.van-picker__cancel,\\n.van-picker__confirm {\\n  height: 100%;\\n  padding: 0 16px;\\n  font-size: 14px;\\n  background-color: transparent;\\n  border: none;\\n  cursor: pointer;\\n}\\n.van-picker__cancel:active,\\n.van-picker__confirm:active {\\n  opacity: 0.7;\\n}\\n.van-picker__confirm {\\n  color: #576b95;\\n}\\n.van-picker__cancel {\\n  color: #969799;\\n}\\n.van-picker__title {\\n  max-width: 50%;\\n  font-weight: 500;\\n  font-size: 16px;\\n  line-height: 20px;\\n  text-align: center;\\n}\\n.van-picker__columns {\\n  position: relative;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  cursor: grab;\\n}\\n.van-picker__loading {\\n  position: absolute;\\n  top: 0;\\n  right: 0;\\n  bottom: 0;\\n  left: 0;\\n  z-index: 3;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  color: #1989fa;\\n  background-color: rgba(255, 255, 255, 0.9);\\n}\\n.van-picker__frame {\\n  position: absolute;\\n  top: 50%;\\n  right: 16px;\\n  left: 16px;\\n  z-index: 2;\\n  -webkit-transform: translateY(-50%);\\n          transform: translateY(-50%);\\n  pointer-events: none;\\n}\\n.van-picker__mask {\\n  position: absolute;\\n  top: 0;\\n  left: 0;\\n  z-index: 1;\\n  width: 100%;\\n  height: 100%;\\n  background-image: -webkit-linear-gradient(top, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4)), -webkit-linear-gradient(bottom, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4));\\n  background-image: linear-gradient(180deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4)), linear-gradient(0deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.4));\\n  background-repeat: no-repeat;\\n  background-position: top, bottom;\\n  -webkit-transform: translateZ(0);\\n          transform: translateZ(0);\\n  pointer-events: none;\\n}\\n.van-picker-column {\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1;\\n          flex: 1;\\n  overflow: hidden;\\n  font-size: 16px;\\n}\\n.van-picker-column__wrapper {\\n  -webkit-transition-timing-function: cubic-bezier(0.23, 1, 0.68, 1);\\n          transition-timing-function: cubic-bezier(0.23, 1, 0.68, 1);\\n}\\n.van-picker-column__item {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  padding: 0 4px;\\n  color: #000;\\n}\\n.van-picker-column__item--disabled {\\n  cursor: not-allowed;\\n  opacity: 0.3;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/picker/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/progress/index.less":
/*!**************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/progress/index.less ***!
  \**************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-progress {\\n  position: relative;\\n  height: 4px;\\n  background: #ebedf0;\\n  border-radius: 4px;\\n}\\n.van-progress__portion {\\n  position: absolute;\\n  left: 0;\\n  height: 100%;\\n  background: #1989fa;\\n  border-radius: inherit;\\n}\\n.van-progress__pivot {\\n  position: absolute;\\n  top: 50%;\\n  box-sizing: border-box;\\n  min-width: 3.6em;\\n  padding: 0 5px;\\n  color: #fff;\\n  font-size: 10px;\\n  line-height: 1.6;\\n  text-align: center;\\n  word-break: keep-all;\\n  background-color: #1989fa;\\n  border-radius: 1em;\\n  -webkit-transform: translate(0, -50%);\\n          transform: translate(0, -50%);\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/progress/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/radio-group/index.less":
/*!*****************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/radio-group/index.less ***!
  \*****************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-radio-group--horizontal {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-flex-wrap: wrap;\\n          flex-wrap: wrap;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio-group/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/radio/index.less":
/*!***********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/radio/index.less ***!
  \***********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-radio {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  overflow: hidden;\\n  cursor: pointer;\\n  -webkit-user-select: none;\\n          user-select: none;\\n}\\n.van-radio--disabled {\\n  cursor: not-allowed;\\n}\\n.van-radio--label-disabled {\\n  cursor: default;\\n}\\n.van-radio--horizontal {\\n  margin-right: 12px;\\n}\\n.van-radio__icon {\\n  -webkit-box-flex: 0;\\n  -webkit-flex: none;\\n          flex: none;\\n  height: 1em;\\n  font-size: 20px;\\n  line-height: 1em;\\n  cursor: pointer;\\n}\\n.van-radio__icon .van-icon {\\n  display: block;\\n  box-sizing: border-box;\\n  width: 1.25em;\\n  height: 1.25em;\\n  color: transparent;\\n  font-size: 0.8em;\\n  line-height: 1.25;\\n  text-align: center;\\n  border: 1px solid #c8c9cc;\\n  -webkit-transition-duration: 0.2s;\\n          transition-duration: 0.2s;\\n  -webkit-transition-property: color, border-color, background-color;\\n  transition-property: color, border-color, background-color;\\n}\\n.van-radio__icon--round .van-icon {\\n  border-radius: 100%;\\n}\\n.van-radio__icon--checked .van-icon {\\n  color: #fff;\\n  background-color: #1989fa;\\n  border-color: #1989fa;\\n}\\n.van-radio__icon--disabled {\\n  cursor: not-allowed;\\n}\\n.van-radio__icon--disabled .van-icon {\\n  background-color: #ebedf0;\\n  border-color: #c8c9cc;\\n}\\n.van-radio__icon--disabled.van-radio__icon--checked .van-icon {\\n  color: #c8c9cc;\\n}\\n.van-radio__label {\\n  margin-left: 8px;\\n  color: #323233;\\n  line-height: 20px;\\n}\\n.van-radio__label--left {\\n  margin: 0 8px 0 0;\\n}\\n.van-radio__label--disabled {\\n  color: #c8c9cc;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/row/index.less":
/*!*********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/row/index.less ***!
  \*********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-row::after {\\n  display: table;\\n  clear: both;\\n  content: '';\\n}\\n.van-row--flex {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-flex-wrap: wrap;\\n          flex-wrap: wrap;\\n}\\n.van-row--flex::after {\\n  display: none;\\n}\\n.van-row--justify-center {\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n}\\n.van-row--justify-end {\\n  -webkit-box-pack: end;\\n  -webkit-justify-content: flex-end;\\n          justify-content: flex-end;\\n}\\n.van-row--justify-space-between {\\n  -webkit-box-pack: justify;\\n  -webkit-justify-content: space-between;\\n          justify-content: space-between;\\n}\\n.van-row--justify-space-around {\\n  -webkit-justify-content: space-around;\\n          justify-content: space-around;\\n}\\n.van-row--align-center {\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n}\\n.van-row--align-bottom {\\n  -webkit-box-align: end;\\n  -webkit-align-items: flex-end;\\n          align-items: flex-end;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/row/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/search/index.less":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/search/index.less ***!
  \************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-search {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  box-sizing: border-box;\\n  padding: 5px 8px;\\n  background-color: #fff;\\n}\\n.van-search__content {\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1;\\n          flex: 1;\\n  padding-left: 12px;\\n  background-color: #f7f8fa;\\n  border-radius: 2px;\\n}\\n.van-search__content--round {\\n  border-radius: 999px;\\n}\\n.van-search__label {\\n  padding: 0 5px;\\n  color: #323233;\\n  font-size: 14px;\\n  line-height: 24px;\\n}\\n.van-search .van-cell {\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1;\\n          flex: 1;\\n  padding: 5px 8px 5px 0;\\n  background-color: transparent;\\n}\\n.van-search .van-cell .van-field__left-icon {\\n  color: #969799;\\n}\\n.van-search--show-action {\\n  padding-right: 0;\\n}\\n.van-search input::-webkit-search-decoration,\\n.van-search input::-webkit-search-cancel-button,\\n.van-search input::-webkit-search-results-button,\\n.van-search input::-webkit-search-results-decoration {\\n  display: none;\\n}\\n.van-search__action {\\n  padding: 0 12px 0 7px;\\n  color: #323233;\\n  font-size: 14px;\\n  line-height: 24px;\\n  cursor: pointer;\\n  -webkit-user-select: none;\\n          user-select: none;\\n}\\n.van-search__action:active {\\n  background-color: #f2f3f5;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/search/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/sticky/index.less":
/*!************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/sticky/index.less ***!
  \************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-sticky--fixed {\\n  position: fixed;\\n  top: 0;\\n  right: 0;\\n  left: 0;\\n  z-index: 99;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/sticky/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/tab/index.less":
/*!*********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/tab/index.less ***!
  \*********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-tab__pane,\\n.van-tab__pane-wrapper {\\n  -webkit-flex-shrink: 0;\\n          flex-shrink: 0;\\n  box-sizing: border-box;\\n  width: 100%;\\n}\\n.van-tab__pane-wrapper--inactive {\\n  height: 0;\\n  overflow: visible;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/tab/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/tabs/index.less":
/*!**********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/tabs/index.less ***!
  \**********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-tab {\\n  position: relative;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1;\\n          flex: 1;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  box-sizing: border-box;\\n  padding: 0 4px;\\n  color: #646566;\\n  font-size: 14px;\\n  line-height: 20px;\\n  cursor: pointer;\\n}\\n.van-tab--active {\\n  color: #323233;\\n  font-weight: 500;\\n}\\n.van-tab--disabled {\\n  color: #c8c9cc;\\n  cursor: not-allowed;\\n}\\n.van-tab__text--ellipsis {\\n  display: -webkit-box;\\n  overflow: hidden;\\n  -webkit-line-clamp: 1;\\n  -webkit-box-orient: vertical;\\n}\\n.van-tab__text-wrapper {\\n  position: relative;\\n}\\n.van-tabs {\\n  position: relative;\\n}\\n.van-tabs__wrap {\\n  overflow: hidden;\\n}\\n.van-tabs__wrap--page-top {\\n  position: fixed;\\n}\\n.van-tabs__wrap--content-bottom {\\n  top: auto;\\n  bottom: 0;\\n}\\n.van-tabs__wrap--scrollable .van-tab {\\n  -webkit-box-flex: 1;\\n  -webkit-flex: 1 0 auto;\\n          flex: 1 0 auto;\\n  padding: 0 12px;\\n}\\n.van-tabs__wrap--scrollable .van-tabs__nav {\\n  overflow-x: auto;\\n  overflow-y: hidden;\\n  -webkit-overflow-scrolling: touch;\\n}\\n.van-tabs__wrap--scrollable .van-tabs__nav::-webkit-scrollbar {\\n  display: none;\\n}\\n.van-tabs__nav {\\n  position: relative;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  background-color: #fff;\\n  -webkit-user-select: none;\\n          user-select: none;\\n}\\n.van-tabs__nav--line {\\n  box-sizing: content-box;\\n  height: 100%;\\n  padding-bottom: 15px;\\n  /* 15px padding to hide scrollbar in mobile safari */\\n}\\n.van-tabs__nav--line.van-tabs__nav--complete {\\n  padding-right: 8px;\\n  padding-left: 8px;\\n}\\n.van-tabs__nav--card {\\n  box-sizing: border-box;\\n  height: 30px;\\n  margin: 0 16px;\\n  border: 1px solid #ee0a24;\\n  border-radius: 2px;\\n}\\n.van-tabs__nav--card .van-tab {\\n  color: #ee0a24;\\n  border-right: 1px solid #ee0a24;\\n}\\n.van-tabs__nav--card .van-tab:last-child {\\n  border-right: none;\\n}\\n.van-tabs__nav--card .van-tab.van-tab--active {\\n  color: #fff;\\n  background-color: #ee0a24;\\n}\\n.van-tabs__nav--card .van-tab--disabled {\\n  color: #c8c9cc;\\n}\\n.van-tabs__line {\\n  position: absolute;\\n  bottom: 15px;\\n  left: 0;\\n  z-index: 1;\\n  width: 40px;\\n  height: 3px;\\n  background-color: #1677FF;\\n  border-radius: 3px;\\n}\\n.van-tabs__track {\\n  position: relative;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  width: 100%;\\n  height: 100%;\\n  will-change: left;\\n}\\n.van-tabs__content--animated {\\n  overflow: hidden;\\n}\\n.van-tabs--line .van-tabs__wrap {\\n  height: 44px;\\n}\\n.van-tabs--card > .van-tabs__wrap {\\n  height: 30px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/toast/index.less":
/*!***********************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3!./node_modules/vant/es/toast/index.less ***!
  \***********************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \".van-toast {\\n  position: fixed;\\n  top: 50%;\\n  left: 50%;\\n  display: -webkit-box;\\n  display: -webkit-flex;\\n  display: flex;\\n  -webkit-box-orient: vertical;\\n  -webkit-box-direction: normal;\\n  -webkit-flex-direction: column;\\n          flex-direction: column;\\n  -webkit-box-align: center;\\n  -webkit-align-items: center;\\n          align-items: center;\\n  -webkit-box-pack: center;\\n  -webkit-justify-content: center;\\n          justify-content: center;\\n  box-sizing: content-box;\\n  width: 88px;\\n  max-width: 70%;\\n  min-height: 88px;\\n  padding: 16px;\\n  color: #fff;\\n  font-size: 14px;\\n  line-height: 20px;\\n  white-space: pre-wrap;\\n  text-align: center;\\n  word-break: break-all;\\n  background-color: rgba(0, 0, 0, 0.7);\\n  border-radius: 8px;\\n  -webkit-transform: translate3d(-50%, -50%, 0);\\n          transform: translate3d(-50%, -50%, 0);\\n}\\n.van-toast--unclickable {\\n  overflow: hidden;\\n}\\n.van-toast--unclickable * {\\n  pointer-events: none;\\n}\\n.van-toast--text,\\n.van-toast--html {\\n  width: -webkit-fit-content;\\n  width: fit-content;\\n  min-width: 96px;\\n  min-height: 0;\\n  padding: 8px 12px;\\n}\\n.van-toast--text .van-toast__text,\\n.van-toast--html .van-toast__text {\\n  margin-top: 0;\\n}\\n.van-toast--top {\\n  top: 20%;\\n}\\n.van-toast--bottom {\\n  top: auto;\\n  bottom: 20%;\\n}\\n.van-toast__icon {\\n  font-size: 36px;\\n}\\n.van-toast__loading {\\n  padding: 4px;\\n  color: #fff;\\n}\\n.van-toast__text {\\n  margin-top: 8px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/toast/index.less?./node_modules/css-loader/dist/cjs.js??ref--11-oneOf-3-1!./node_modules/postcss-loader/src??ref--11-oneOf-3-2!./node_modules/less-loader/dist/cjs.js??ref--11-oneOf-3-3");

/***/ }),

/***/ "./node_modules/css-loader/dist/runtime/getUrl.js":
/*!********************************************************!*\
  !*** ./node_modules/css-loader/dist/runtime/getUrl.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nmodule.exports = function (url, options) {\n  if (!options) {\n    // eslint-disable-next-line no-param-reassign\n    options = {};\n  } // eslint-disable-next-line no-underscore-dangle, no-param-reassign\n\n\n  url = url && url.__esModule ? url.default : url;\n\n  if (typeof url !== 'string') {\n    return url;\n  } // If url is already wrapped in quotes, remove them\n\n\n  if (/^['\"].*['\"]$/.test(url)) {\n    // eslint-disable-next-line no-param-reassign\n    url = url.slice(1, -1);\n  }\n\n  if (options.hash) {\n    // eslint-disable-next-line no-param-reassign\n    url += options.hash;\n  } // Should url be wrapped?\n  // See https://drafts.csswg.org/css-values-3/#urls\n\n\n  if (/[\"'() \\t\\n]/.test(url) || options.needQuotes) {\n    return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, '\\\\n'), \"\\\"\");\n  }\n\n  return url;\n};\n\n//# sourceURL=webpack:///./node_modules/css-loader/dist/runtime/getUrl.js?");

/***/ }),

/***/ "./node_modules/dayjs/dayjs.min.js":
/*!*****************************************!*\
  !*** ./node_modules/dayjs/dayjs.min.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("!function(t,e){ true?module.exports=e():undefined}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof b},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,f=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=O.p(f),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return O.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return O.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return O.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return O.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return O.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return O.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return O.s(e.$s,2,\"0\");case\"SSS\":return O.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=O.p(d),m=w(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return O.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:O.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),_=b.prototype;return w.prototype=_,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,b,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));\n\n//# sourceURL=webpack:///./node_modules/dayjs/dayjs.min.js?");

/***/ }),

/***/ "./node_modules/dayjs/plugin/duration.js":
/*!***********************************************!*\
  !*** ./node_modules/dayjs/plugin/duration.js ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("!function(t,s){ true?module.exports=s():undefined}(this,(function(){\"use strict\";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2592e6,a=/^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+\"s\"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:\"\"+y(t)+s}:{negative:!1,format:\"\"+t+s}:{negative:!1,format:\"\"}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if(\"number\"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if(\"object\"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if(\"string\"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,\"Y\"),s=v(this.$d.months,\"M\"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,\"D\"),e=v(this.$d.hours,\"H\"),r=v(this.$d.minutes,\"M\"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=v(o,\"S\"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?\"T\":\"\",h=(d?\"-\":\"\")+\"P\"+t.format+s.format+i.format+a+e.format+r.format+u.format;return\"P\"===h||\"-P\"===h?\"P0D\":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||\"YYYY-MM-DDTHH:mm:ss\",i={Y:this.$d.years,YY:s.s(this.$d.years,2,\"0\"),YYYY:s.s(this.$d.years,4,\"0\"),M:this.$d.months,MM:s.s(this.$d.months,2,\"0\"),D:this.$d.days,DD:s.s(this.$d.days,2,\"0\"),H:this.$d.hours,HH:s.s(this.$d.hours,2,\"0\"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,\"0\"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,\"0\"),SSS:s.s(this.$d.milliseconds,3,\"0\")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return\"milliseconds\"===n?s%=1e3:s=\"weeks\"===n?$(s/h[n]):this.$d[n],0===s?0:s},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,\"ms\").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get(\"milliseconds\")},y.asMilliseconds=function(){return this.as(\"milliseconds\")},y.seconds=function(){return this.get(\"seconds\")},y.asSeconds=function(){return this.as(\"seconds\")},y.minutes=function(){return this.get(\"minutes\")},y.asMinutes=function(){return this.as(\"minutes\")},y.hours=function(){return this.get(\"hours\")},y.asHours=function(){return this.as(\"hours\")},y.days=function(){return this.get(\"days\")},y.asDays=function(){return this.as(\"days\")},y.weeks=function(){return this.get(\"weeks\")},y.asWeeks=function(){return this.as(\"weeks\")},y.months=function(){return this.get(\"months\")},y.asMonths=function(){return this.as(\"months\")},y.years=function(){return this.get(\"years\")},y.asYears=function(){return this.as(\"years\")},l}(),p=function(t,s,n){return t.add(s.years()*n,\"y\").add(s.months()*n,\"M\").add(s.days()*n,\"d\").add(s.hours()*n,\"h\").add(s.minutes()*n,\"m\").add(s.seconds()*n,\"s\").add(s.milliseconds()*n,\"ms\")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));\n\n//# sourceURL=webpack:///./node_modules/dayjs/plugin/duration.js?");

/***/ }),

/***/ "./node_modules/flv.js/dist/flv.js":
/*!*****************************************!*\
  !*** ./node_modules/flv.js/dist/flv.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(process) {(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(self, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/es6-promise/dist/es6-promise.js\":\n/*!******************************************************!*\\\n  !*** ./node_modules/es6-promise/dist/es6-promise.js ***!\n  \\******************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license   Licensed under MIT license\n *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version   v4.2.8+1e68dce6\n */\n(function (global, factory) {\n     true ? module.exports = factory() :\n        undefined;\n}(this, (function () {\n    'use strict';\n    function objectOrFunction(x) {\n        var type = typeof x;\n        return x !== null && (type === 'object' || type === 'function');\n    }\n    function isFunction(x) {\n        return typeof x === 'function';\n    }\n    var _isArray = void 0;\n    if (Array.isArray) {\n        _isArray = Array.isArray;\n    }\n    else {\n        _isArray = function (x) {\n            return Object.prototype.toString.call(x) === '[object Array]';\n        };\n    }\n    var isArray = _isArray;\n    var len = 0;\n    var vertxNext = void 0;\n    var customSchedulerFn = void 0;\n    var asap = function asap(callback, arg) {\n        queue[len] = callback;\n        queue[len + 1] = arg;\n        len += 2;\n        if (len === 2) {\n            // If len is 2, that means that we need to schedule an async flush.\n            // If additional callbacks are queued before the queue is flushed, they\n            // will be processed by this flush that we are scheduling.\n            if (customSchedulerFn) {\n                customSchedulerFn(flush);\n            }\n            else {\n                scheduleFlush();\n            }\n        }\n    };\n    function setScheduler(scheduleFn) {\n        customSchedulerFn = scheduleFn;\n    }\n    function setAsap(asapFn) {\n        asap = asapFn;\n    }\n    var browserWindow = typeof window !== 'undefined' ? window : undefined;\n    var browserGlobal = browserWindow || {};\n    var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\n    var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n    // test for web worker but not in IE10\n    var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n    // node\n    function useNextTick() {\n        // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n        // see https://github.com/cujojs/when/issues/410 for details\n        return function () {\n            return process.nextTick(flush);\n        };\n    }\n    // vertx\n    function useVertxTimer() {\n        if (typeof vertxNext !== 'undefined') {\n            return function () {\n                vertxNext(flush);\n            };\n        }\n        return useSetTimeout();\n    }\n    function useMutationObserver() {\n        var iterations = 0;\n        var observer = new BrowserMutationObserver(flush);\n        var node = document.createTextNode('');\n        observer.observe(node, { characterData: true });\n        return function () {\n            node.data = iterations = ++iterations % 2;\n        };\n    }\n    // web worker\n    function useMessageChannel() {\n        var channel = new MessageChannel();\n        channel.port1.onmessage = flush;\n        return function () {\n            return channel.port2.postMessage(0);\n        };\n    }\n    function useSetTimeout() {\n        // Store setTimeout reference so es6-promise will be unaffected by\n        // other code modifying setTimeout (like sinon.useFakeTimers())\n        var globalSetTimeout = setTimeout;\n        return function () {\n            return globalSetTimeout(flush, 1);\n        };\n    }\n    var queue = new Array(1000);\n    function flush() {\n        for (var i = 0; i < len; i += 2) {\n            var callback = queue[i];\n            var arg = queue[i + 1];\n            callback(arg);\n            queue[i] = undefined;\n            queue[i + 1] = undefined;\n        }\n        len = 0;\n    }\n    function attemptVertx() {\n        try {\n            var vertx = Function('return this')().require('vertx');\n            vertxNext = vertx.runOnLoop || vertx.runOnContext;\n            return useVertxTimer();\n        }\n        catch (e) {\n            return useSetTimeout();\n        }\n    }\n    var scheduleFlush = void 0;\n    // Decide what async method to use to triggering processing of queued callbacks:\n    if (isNode) {\n        scheduleFlush = useNextTick();\n    }\n    else if (BrowserMutationObserver) {\n        scheduleFlush = useMutationObserver();\n    }\n    else if (isWorker) {\n        scheduleFlush = useMessageChannel();\n    }\n    else if (browserWindow === undefined && \"function\" === 'function') {\n        scheduleFlush = attemptVertx();\n    }\n    else {\n        scheduleFlush = useSetTimeout();\n    }\n    function then(onFulfillment, onRejection) {\n        var parent = this;\n        var child = new this.constructor(noop);\n        if (child[PROMISE_ID] === undefined) {\n            makePromise(child);\n        }\n        var _state = parent._state;\n        if (_state) {\n            var callback = arguments[_state - 1];\n            asap(function () {\n                return invokeCallback(_state, child, callback, parent._result);\n            });\n        }\n        else {\n            subscribe(parent, child, onFulfillment, onRejection);\n        }\n        return child;\n    }\n    /**\n      `Promise.resolve` returns a promise that will become resolved with the\n      passed `value`. It is shorthand for the following:\n    \n      ```javascript\n      let promise = new Promise(function(resolve, reject){\n        resolve(1);\n      });\n    \n      promise.then(function(value){\n        // value === 1\n      });\n      ```\n    \n      Instead of writing the above, your code now simply becomes the following:\n    \n      ```javascript\n      let promise = Promise.resolve(1);\n    \n      promise.then(function(value){\n        // value === 1\n      });\n      ```\n    \n      @method resolve\n      @static\n      @param {Any} value value that the returned promise will be resolved with\n      Useful for tooling.\n      @return {Promise} a promise that will become fulfilled with the given\n      `value`\n    */\n    function resolve$1(object) {\n        /*jshint validthis:true */\n        var Constructor = this;\n        if (object && typeof object === 'object' && object.constructor === Constructor) {\n            return object;\n        }\n        var promise = new Constructor(noop);\n        resolve(promise, object);\n        return promise;\n    }\n    var PROMISE_ID = Math.random().toString(36).substring(2);\n    function noop() { }\n    var PENDING = void 0;\n    var FULFILLED = 1;\n    var REJECTED = 2;\n    function selfFulfillment() {\n        return new TypeError(\"You cannot resolve a promise with itself\");\n    }\n    function cannotReturnOwn() {\n        return new TypeError('A promises callback cannot return that same promise.');\n    }\n    function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n        try {\n            then$$1.call(value, fulfillmentHandler, rejectionHandler);\n        }\n        catch (e) {\n            return e;\n        }\n    }\n    function handleForeignThenable(promise, thenable, then$$1) {\n        asap(function (promise) {\n            var sealed = false;\n            var error = tryThen(then$$1, thenable, function (value) {\n                if (sealed) {\n                    return;\n                }\n                sealed = true;\n                if (thenable !== value) {\n                    resolve(promise, value);\n                }\n                else {\n                    fulfill(promise, value);\n                }\n            }, function (reason) {\n                if (sealed) {\n                    return;\n                }\n                sealed = true;\n                reject(promise, reason);\n            }, 'Settle: ' + (promise._label || ' unknown promise'));\n            if (!sealed && error) {\n                sealed = true;\n                reject(promise, error);\n            }\n        }, promise);\n    }\n    function handleOwnThenable(promise, thenable) {\n        if (thenable._state === FULFILLED) {\n            fulfill(promise, thenable._result);\n        }\n        else if (thenable._state === REJECTED) {\n            reject(promise, thenable._result);\n        }\n        else {\n            subscribe(thenable, undefined, function (value) {\n                return resolve(promise, value);\n            }, function (reason) {\n                return reject(promise, reason);\n            });\n        }\n    }\n    function handleMaybeThenable(promise, maybeThenable, then$$1) {\n        if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n            handleOwnThenable(promise, maybeThenable);\n        }\n        else {\n            if (then$$1 === undefined) {\n                fulfill(promise, maybeThenable);\n            }\n            else if (isFunction(then$$1)) {\n                handleForeignThenable(promise, maybeThenable, then$$1);\n            }\n            else {\n                fulfill(promise, maybeThenable);\n            }\n        }\n    }\n    function resolve(promise, value) {\n        if (promise === value) {\n            reject(promise, selfFulfillment());\n        }\n        else if (objectOrFunction(value)) {\n            var then$$1 = void 0;\n            try {\n                then$$1 = value.then;\n            }\n            catch (error) {\n                reject(promise, error);\n                return;\n            }\n            handleMaybeThenable(promise, value, then$$1);\n        }\n        else {\n            fulfill(promise, value);\n        }\n    }\n    function publishRejection(promise) {\n        if (promise._onerror) {\n            promise._onerror(promise._result);\n        }\n        publish(promise);\n    }\n    function fulfill(promise, value) {\n        if (promise._state !== PENDING) {\n            return;\n        }\n        promise._result = value;\n        promise._state = FULFILLED;\n        if (promise._subscribers.length !== 0) {\n            asap(publish, promise);\n        }\n    }\n    function reject(promise, reason) {\n        if (promise._state !== PENDING) {\n            return;\n        }\n        promise._state = REJECTED;\n        promise._result = reason;\n        asap(publishRejection, promise);\n    }\n    function subscribe(parent, child, onFulfillment, onRejection) {\n        var _subscribers = parent._subscribers;\n        var length = _subscribers.length;\n        parent._onerror = null;\n        _subscribers[length] = child;\n        _subscribers[length + FULFILLED] = onFulfillment;\n        _subscribers[length + REJECTED] = onRejection;\n        if (length === 0 && parent._state) {\n            asap(publish, parent);\n        }\n    }\n    function publish(promise) {\n        var subscribers = promise._subscribers;\n        var settled = promise._state;\n        if (subscribers.length === 0) {\n            return;\n        }\n        var child = void 0, callback = void 0, detail = promise._result;\n        for (var i = 0; i < subscribers.length; i += 3) {\n            child = subscribers[i];\n            callback = subscribers[i + settled];\n            if (child) {\n                invokeCallback(settled, child, callback, detail);\n            }\n            else {\n                callback(detail);\n            }\n        }\n        promise._subscribers.length = 0;\n    }\n    function invokeCallback(settled, promise, callback, detail) {\n        var hasCallback = isFunction(callback), value = void 0, error = void 0, succeeded = true;\n        if (hasCallback) {\n            try {\n                value = callback(detail);\n            }\n            catch (e) {\n                succeeded = false;\n                error = e;\n            }\n            if (promise === value) {\n                reject(promise, cannotReturnOwn());\n                return;\n            }\n        }\n        else {\n            value = detail;\n        }\n        if (promise._state !== PENDING) {\n            // noop\n        }\n        else if (hasCallback && succeeded) {\n            resolve(promise, value);\n        }\n        else if (succeeded === false) {\n            reject(promise, error);\n        }\n        else if (settled === FULFILLED) {\n            fulfill(promise, value);\n        }\n        else if (settled === REJECTED) {\n            reject(promise, value);\n        }\n    }\n    function initializePromise(promise, resolver) {\n        try {\n            resolver(function resolvePromise(value) {\n                resolve(promise, value);\n            }, function rejectPromise(reason) {\n                reject(promise, reason);\n            });\n        }\n        catch (e) {\n            reject(promise, e);\n        }\n    }\n    var id = 0;\n    function nextId() {\n        return id++;\n    }\n    function makePromise(promise) {\n        promise[PROMISE_ID] = id++;\n        promise._state = undefined;\n        promise._result = undefined;\n        promise._subscribers = [];\n    }\n    function validationError() {\n        return new Error('Array Methods must be provided an Array');\n    }\n    var Enumerator = function () {\n        function Enumerator(Constructor, input) {\n            this._instanceConstructor = Constructor;\n            this.promise = new Constructor(noop);\n            if (!this.promise[PROMISE_ID]) {\n                makePromise(this.promise);\n            }\n            if (isArray(input)) {\n                this.length = input.length;\n                this._remaining = input.length;\n                this._result = new Array(this.length);\n                if (this.length === 0) {\n                    fulfill(this.promise, this._result);\n                }\n                else {\n                    this.length = this.length || 0;\n                    this._enumerate(input);\n                    if (this._remaining === 0) {\n                        fulfill(this.promise, this._result);\n                    }\n                }\n            }\n            else {\n                reject(this.promise, validationError());\n            }\n        }\n        Enumerator.prototype._enumerate = function _enumerate(input) {\n            for (var i = 0; this._state === PENDING && i < input.length; i++) {\n                this._eachEntry(input[i], i);\n            }\n        };\n        Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n            var c = this._instanceConstructor;\n            var resolve$$1 = c.resolve;\n            if (resolve$$1 === resolve$1) {\n                var _then = void 0;\n                var error = void 0;\n                var didError = false;\n                try {\n                    _then = entry.then;\n                }\n                catch (e) {\n                    didError = true;\n                    error = e;\n                }\n                if (_then === then && entry._state !== PENDING) {\n                    this._settledAt(entry._state, i, entry._result);\n                }\n                else if (typeof _then !== 'function') {\n                    this._remaining--;\n                    this._result[i] = entry;\n                }\n                else if (c === Promise$1) {\n                    var promise = new c(noop);\n                    if (didError) {\n                        reject(promise, error);\n                    }\n                    else {\n                        handleMaybeThenable(promise, entry, _then);\n                    }\n                    this._willSettleAt(promise, i);\n                }\n                else {\n                    this._willSettleAt(new c(function (resolve$$1) {\n                        return resolve$$1(entry);\n                    }), i);\n                }\n            }\n            else {\n                this._willSettleAt(resolve$$1(entry), i);\n            }\n        };\n        Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n            var promise = this.promise;\n            if (promise._state === PENDING) {\n                this._remaining--;\n                if (state === REJECTED) {\n                    reject(promise, value);\n                }\n                else {\n                    this._result[i] = value;\n                }\n            }\n            if (this._remaining === 0) {\n                fulfill(promise, this._result);\n            }\n        };\n        Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n            var enumerator = this;\n            subscribe(promise, undefined, function (value) {\n                return enumerator._settledAt(FULFILLED, i, value);\n            }, function (reason) {\n                return enumerator._settledAt(REJECTED, i, reason);\n            });\n        };\n        return Enumerator;\n    }();\n    /**\n      `Promise.all` accepts an array of promises, and returns a new promise which\n      is fulfilled with an array of fulfillment values for the passed promises, or\n      rejected with the reason of the first passed promise to be rejected. It casts all\n      elements of the passed iterable to promises as it runs this algorithm.\n    \n      Example:\n    \n      ```javascript\n      let promise1 = resolve(1);\n      let promise2 = resolve(2);\n      let promise3 = resolve(3);\n      let promises = [ promise1, promise2, promise3 ];\n    \n      Promise.all(promises).then(function(array){\n        // The array here would be [ 1, 2, 3 ];\n      });\n      ```\n    \n      If any of the `promises` given to `all` are rejected, the first promise\n      that is rejected will be given as an argument to the returned promises's\n      rejection handler. For example:\n    \n      Example:\n    \n      ```javascript\n      let promise1 = resolve(1);\n      let promise2 = reject(new Error(\"2\"));\n      let promise3 = reject(new Error(\"3\"));\n      let promises = [ promise1, promise2, promise3 ];\n    \n      Promise.all(promises).then(function(array){\n        // Code here never runs because there are rejected promises!\n      }, function(error) {\n        // error.message === \"2\"\n      });\n      ```\n    \n      @method all\n      @static\n      @param {Array} entries array of promises\n      @param {String} label optional string for labeling the promise.\n      Useful for tooling.\n      @return {Promise} promise that is fulfilled when all `promises` have been\n      fulfilled, or rejected if any of them become rejected.\n      @static\n    */\n    function all(entries) {\n        return new Enumerator(this, entries).promise;\n    }\n    /**\n      `Promise.race` returns a new promise which is settled in the same way as the\n      first passed promise to settle.\n    \n      Example:\n    \n      ```javascript\n      let promise1 = new Promise(function(resolve, reject){\n        setTimeout(function(){\n          resolve('promise 1');\n        }, 200);\n      });\n    \n      let promise2 = new Promise(function(resolve, reject){\n        setTimeout(function(){\n          resolve('promise 2');\n        }, 100);\n      });\n    \n      Promise.race([promise1, promise2]).then(function(result){\n        // result === 'promise 2' because it was resolved before promise1\n        // was resolved.\n      });\n      ```\n    \n      `Promise.race` is deterministic in that only the state of the first\n      settled promise matters. For example, even if other promises given to the\n      `promises` array argument are resolved, but the first settled promise has\n      become rejected before the other promises became fulfilled, the returned\n      promise will become rejected:\n    \n      ```javascript\n      let promise1 = new Promise(function(resolve, reject){\n        setTimeout(function(){\n          resolve('promise 1');\n        }, 200);\n      });\n    \n      let promise2 = new Promise(function(resolve, reject){\n        setTimeout(function(){\n          reject(new Error('promise 2'));\n        }, 100);\n      });\n    \n      Promise.race([promise1, promise2]).then(function(result){\n        // Code here never runs\n      }, function(reason){\n        // reason.message === 'promise 2' because promise 2 became rejected before\n        // promise 1 became fulfilled\n      });\n      ```\n    \n      An example real-world use case is implementing timeouts:\n    \n      ```javascript\n      Promise.race([ajax('foo.json'), timeout(5000)])\n      ```\n    \n      @method race\n      @static\n      @param {Array} promises array of promises to observe\n      Useful for tooling.\n      @return {Promise} a promise which settles in the same way as the first passed\n      promise to settle.\n    */\n    function race(entries) {\n        /*jshint validthis:true */\n        var Constructor = this;\n        if (!isArray(entries)) {\n            return new Constructor(function (_, reject) {\n                return reject(new TypeError('You must pass an array to race.'));\n            });\n        }\n        else {\n            return new Constructor(function (resolve, reject) {\n                var length = entries.length;\n                for (var i = 0; i < length; i++) {\n                    Constructor.resolve(entries[i]).then(resolve, reject);\n                }\n            });\n        }\n    }\n    /**\n      `Promise.reject` returns a promise rejected with the passed `reason`.\n      It is shorthand for the following:\n    \n      ```javascript\n      let promise = new Promise(function(resolve, reject){\n        reject(new Error('WHOOPS'));\n      });\n    \n      promise.then(function(value){\n        // Code here doesn't run because the promise is rejected!\n      }, function(reason){\n        // reason.message === 'WHOOPS'\n      });\n      ```\n    \n      Instead of writing the above, your code now simply becomes the following:\n    \n      ```javascript\n      let promise = Promise.reject(new Error('WHOOPS'));\n    \n      promise.then(function(value){\n        // Code here doesn't run because the promise is rejected!\n      }, function(reason){\n        // reason.message === 'WHOOPS'\n      });\n      ```\n    \n      @method reject\n      @static\n      @param {Any} reason value that the returned promise will be rejected with.\n      Useful for tooling.\n      @return {Promise} a promise rejected with the given `reason`.\n    */\n    function reject$1(reason) {\n        /*jshint validthis:true */\n        var Constructor = this;\n        var promise = new Constructor(noop);\n        reject(promise, reason);\n        return promise;\n    }\n    function needsResolver() {\n        throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n    }\n    function needsNew() {\n        throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n    }\n    /**\n      Promise objects represent the eventual result of an asynchronous operation. The\n      primary way of interacting with a promise is through its `then` method, which\n      registers callbacks to receive either a promise's eventual value or the reason\n      why the promise cannot be fulfilled.\n    \n      Terminology\n      -----------\n    \n      - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n      - `thenable` is an object or function that defines a `then` method.\n      - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n      - `exception` is a value that is thrown using the throw statement.\n      - `reason` is a value that indicates why a promise was rejected.\n      - `settled` the final resting state of a promise, fulfilled or rejected.\n    \n      A promise can be in one of three states: pending, fulfilled, or rejected.\n    \n      Promises that are fulfilled have a fulfillment value and are in the fulfilled\n      state.  Promises that are rejected have a rejection reason and are in the\n      rejected state.  A fulfillment value is never a thenable.\n    \n      Promises can also be said to *resolve* a value.  If this value is also a\n      promise, then the original promise's settled state will match the value's\n      settled state.  So a promise that *resolves* a promise that rejects will\n      itself reject, and a promise that *resolves* a promise that fulfills will\n      itself fulfill.\n    \n    \n      Basic Usage:\n      ------------\n    \n      ```js\n      let promise = new Promise(function(resolve, reject) {\n        // on success\n        resolve(value);\n    \n        // on failure\n        reject(reason);\n      });\n    \n      promise.then(function(value) {\n        // on fulfillment\n      }, function(reason) {\n        // on rejection\n      });\n      ```\n    \n      Advanced Usage:\n      ---------------\n    \n      Promises shine when abstracting away asynchronous interactions such as\n      `XMLHttpRequest`s.\n    \n      ```js\n      function getJSON(url) {\n        return new Promise(function(resolve, reject){\n          let xhr = new XMLHttpRequest();\n    \n          xhr.open('GET', url);\n          xhr.onreadystatechange = handler;\n          xhr.responseType = 'json';\n          xhr.setRequestHeader('Accept', 'application/json');\n          xhr.send();\n    \n          function handler() {\n            if (this.readyState === this.DONE) {\n              if (this.status === 200) {\n                resolve(this.response);\n              } else {\n                reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n              }\n            }\n          };\n        });\n      }\n    \n      getJSON('/posts.json').then(function(json) {\n        // on fulfillment\n      }, function(reason) {\n        // on rejection\n      });\n      ```\n    \n      Unlike callbacks, promises are great composable primitives.\n    \n      ```js\n      Promise.all([\n        getJSON('/posts'),\n        getJSON('/comments')\n      ]).then(function(values){\n        values[0] // => postsJSON\n        values[1] // => commentsJSON\n    \n        return values;\n      });\n      ```\n    \n      @class Promise\n      @param {Function} resolver\n      Useful for tooling.\n      @constructor\n    */\n    var Promise$1 = function () {\n        function Promise(resolver) {\n            this[PROMISE_ID] = nextId();\n            this._result = this._state = undefined;\n            this._subscribers = [];\n            if (noop !== resolver) {\n                typeof resolver !== 'function' && needsResolver();\n                this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n            }\n        }\n        /**\n        The primary way of interacting with a promise is through its `then` method,\n        which registers callbacks to receive either a promise's eventual value or the\n        reason why the promise cannot be fulfilled.\n         ```js\n        findUser().then(function(user){\n          // user is available\n        }, function(reason){\n          // user is unavailable, and you are given the reason why\n        });\n        ```\n         Chaining\n        --------\n         The return value of `then` is itself a promise.  This second, 'downstream'\n        promise is resolved with the return value of the first promise's fulfillment\n        or rejection handler, or rejected if the handler throws an exception.\n         ```js\n        findUser().then(function (user) {\n          return user.name;\n        }, function (reason) {\n          return 'default name';\n        }).then(function (userName) {\n          // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n          // will be `'default name'`\n        });\n         findUser().then(function (user) {\n          throw new Error('Found user, but still unhappy');\n        }, function (reason) {\n          throw new Error('`findUser` rejected and we're unhappy');\n        }).then(function (value) {\n          // never reached\n        }, function (reason) {\n          // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n          // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n        });\n        ```\n        If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n         ```js\n        findUser().then(function (user) {\n          throw new PedagogicalException('Upstream error');\n        }).then(function (value) {\n          // never reached\n        }).then(function (value) {\n          // never reached\n        }, function (reason) {\n          // The `PedgagocialException` is propagated all the way down to here\n        });\n        ```\n         Assimilation\n        ------------\n         Sometimes the value you want to propagate to a downstream promise can only be\n        retrieved asynchronously. This can be achieved by returning a promise in the\n        fulfillment or rejection handler. The downstream promise will then be pending\n        until the returned promise is settled. This is called *assimilation*.\n         ```js\n        findUser().then(function (user) {\n          return findCommentsByAuthor(user);\n        }).then(function (comments) {\n          // The user's comments are now available\n        });\n        ```\n         If the assimliated promise rejects, then the downstream promise will also reject.\n         ```js\n        findUser().then(function (user) {\n          return findCommentsByAuthor(user);\n        }).then(function (comments) {\n          // If `findCommentsByAuthor` fulfills, we'll have the value here\n        }, function (reason) {\n          // If `findCommentsByAuthor` rejects, we'll have the reason here\n        });\n        ```\n         Simple Example\n        --------------\n         Synchronous Example\n         ```javascript\n        let result;\n         try {\n          result = findResult();\n          // success\n        } catch(reason) {\n          // failure\n        }\n        ```\n         Errback Example\n         ```js\n        findResult(function(result, err){\n          if (err) {\n            // failure\n          } else {\n            // success\n          }\n        });\n        ```\n         Promise Example;\n         ```javascript\n        findResult().then(function(result){\n          // success\n        }, function(reason){\n          // failure\n        });\n        ```\n         Advanced Example\n        --------------\n         Synchronous Example\n         ```javascript\n        let author, books;\n         try {\n          author = findAuthor();\n          books  = findBooksByAuthor(author);\n          // success\n        } catch(reason) {\n          // failure\n        }\n        ```\n         Errback Example\n         ```js\n         function foundBooks(books) {\n         }\n         function failure(reason) {\n         }\n         findAuthor(function(author, err){\n          if (err) {\n            failure(err);\n            // failure\n          } else {\n            try {\n              findBoooksByAuthor(author, function(books, err) {\n                if (err) {\n                  failure(err);\n                } else {\n                  try {\n                    foundBooks(books);\n                  } catch(reason) {\n                    failure(reason);\n                  }\n                }\n              });\n            } catch(error) {\n              failure(err);\n            }\n            // success\n          }\n        });\n        ```\n         Promise Example;\n         ```javascript\n        findAuthor().\n          then(findBooksByAuthor).\n          then(function(books){\n            // found books\n        }).catch(function(reason){\n          // something went wrong\n        });\n        ```\n         @method then\n        @param {Function} onFulfilled\n        @param {Function} onRejected\n        Useful for tooling.\n        @return {Promise}\n        */\n        /**\n        `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n        as the catch block of a try/catch statement.\n        ```js\n        function findAuthor(){\n        throw new Error('couldn't find that author');\n        }\n        // synchronous\n        try {\n        findAuthor();\n        } catch(reason) {\n        // something went wrong\n        }\n        // async with promises\n        findAuthor().catch(function(reason){\n        // something went wrong\n        });\n        ```\n        @method catch\n        @param {Function} onRejection\n        Useful for tooling.\n        @return {Promise}\n        */\n        Promise.prototype.catch = function _catch(onRejection) {\n            return this.then(null, onRejection);\n        };\n        /**\n          `finally` will be invoked regardless of the promise's fate just as native\n          try/catch/finally behaves\n        \n          Synchronous example:\n        \n          ```js\n          findAuthor() {\n            if (Math.random() > 0.5) {\n              throw new Error();\n            }\n            return new Author();\n          }\n        \n          try {\n            return findAuthor(); // succeed or fail\n          } catch(error) {\n            return findOtherAuther();\n          } finally {\n            // always runs\n            // doesn't affect the return value\n          }\n          ```\n        \n          Asynchronous example:\n        \n          ```js\n          findAuthor().catch(function(reason){\n            return findOtherAuther();\n          }).finally(function(){\n            // author was either found, or not\n          });\n          ```\n        \n          @method finally\n          @param {Function} callback\n          @return {Promise}\n        */\n        Promise.prototype.finally = function _finally(callback) {\n            var promise = this;\n            var constructor = promise.constructor;\n            if (isFunction(callback)) {\n                return promise.then(function (value) {\n                    return constructor.resolve(callback()).then(function () {\n                        return value;\n                    });\n                }, function (reason) {\n                    return constructor.resolve(callback()).then(function () {\n                        throw reason;\n                    });\n                });\n            }\n            return promise.then(callback, callback);\n        };\n        return Promise;\n    }();\n    Promise$1.prototype.then = then;\n    Promise$1.all = all;\n    Promise$1.race = race;\n    Promise$1.resolve = resolve$1;\n    Promise$1.reject = reject$1;\n    Promise$1._setScheduler = setScheduler;\n    Promise$1._setAsap = setAsap;\n    Promise$1._asap = asap;\n    /*global self*/\n    function polyfill() {\n        var local = void 0;\n        if (typeof __webpack_require__.g !== 'undefined') {\n            local = __webpack_require__.g;\n        }\n        else if (typeof self !== 'undefined') {\n            local = self;\n        }\n        else {\n            try {\n                local = Function('return this')();\n            }\n            catch (e) {\n                throw new Error('polyfill failed because global object is unavailable in this environment');\n            }\n        }\n        var P = local.Promise;\n        if (P) {\n            var promiseToString = null;\n            try {\n                promiseToString = Object.prototype.toString.call(P.resolve());\n            }\n            catch (e) {\n                // silently ignored\n            }\n            if (promiseToString === '[object Promise]' && !P.cast) {\n                return;\n            }\n        }\n        local.Promise = Promise$1;\n    }\n    // Strange compat..\n    Promise$1.polyfill = polyfill;\n    Promise$1.Promise = Promise$1;\n    return Promise$1;\n})));\n\n\n/***/ }),\n\n/***/ \"./node_modules/events/events.js\":\n/*!***************************************!*\\\n  !*** ./node_modules/events/events.js ***!\n  \\***************************************/\n/***/ (function(module) {\n\n\"use strict\";\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar R = typeof Reflect === 'object' ? Reflect : null;\nvar ReflectApply = R && typeof R.apply === 'function'\n    ? R.apply\n    : function ReflectApply(target, receiver, args) {\n        return Function.prototype.apply.call(target, receiver, args);\n    };\nvar ReflectOwnKeys;\nif (R && typeof R.ownKeys === 'function') {\n    ReflectOwnKeys = R.ownKeys;\n}\nelse if (Object.getOwnPropertySymbols) {\n    ReflectOwnKeys = function ReflectOwnKeys(target) {\n        return Object.getOwnPropertyNames(target)\n            .concat(Object.getOwnPropertySymbols(target));\n    };\n}\nelse {\n    ReflectOwnKeys = function ReflectOwnKeys(target) {\n        return Object.getOwnPropertyNames(target);\n    };\n}\nfunction ProcessEmitWarning(warning) {\n    if (console && console.warn)\n        console.warn(warning);\n}\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n    return value !== value;\n};\nfunction EventEmitter() {\n    EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\nfunction checkListener(listener) {\n    if (typeof listener !== 'function') {\n        throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n    }\n}\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n    enumerable: true,\n    get: function () {\n        return defaultMaxListeners;\n    },\n    set: function (arg) {\n        if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n            throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n        }\n        defaultMaxListeners = arg;\n    }\n});\nEventEmitter.init = function () {\n    if (this._events === undefined ||\n        this._events === Object.getPrototypeOf(this)._events) {\n        this._events = Object.create(null);\n        this._eventsCount = 0;\n    }\n    this._maxListeners = this._maxListeners || undefined;\n};\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n    if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n        throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n    }\n    this._maxListeners = n;\n    return this;\n};\nfunction _getMaxListeners(that) {\n    if (that._maxListeners === undefined)\n        return EventEmitter.defaultMaxListeners;\n    return that._maxListeners;\n}\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n    return _getMaxListeners(this);\n};\nEventEmitter.prototype.emit = function emit(type) {\n    var args = [];\n    for (var i = 1; i < arguments.length; i++)\n        args.push(arguments[i]);\n    var doError = (type === 'error');\n    var events = this._events;\n    if (events !== undefined)\n        doError = (doError && events.error === undefined);\n    else if (!doError)\n        return false;\n    // If there is no 'error' event listener then throw.\n    if (doError) {\n        var er;\n        if (args.length > 0)\n            er = args[0];\n        if (er instanceof Error) {\n            // Note: The comments on the `throw` lines are intentional, they show\n            // up in Node's output if this results in an unhandled exception.\n            throw er; // Unhandled 'error' event\n        }\n        // At least give some kind of context to the user\n        var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n        err.context = er;\n        throw err; // Unhandled 'error' event\n    }\n    var handler = events[type];\n    if (handler === undefined)\n        return false;\n    if (typeof handler === 'function') {\n        ReflectApply(handler, this, args);\n    }\n    else {\n        var len = handler.length;\n        var listeners = arrayClone(handler, len);\n        for (var i = 0; i < len; ++i)\n            ReflectApply(listeners[i], this, args);\n    }\n    return true;\n};\nfunction _addListener(target, type, listener, prepend) {\n    var m;\n    var events;\n    var existing;\n    checkListener(listener);\n    events = target._events;\n    if (events === undefined) {\n        events = target._events = Object.create(null);\n        target._eventsCount = 0;\n    }\n    else {\n        // To avoid recursion in the case that type === \"newListener\"! Before\n        // adding it to the listeners, first emit \"newListener\".\n        if (events.newListener !== undefined) {\n            target.emit('newListener', type, listener.listener ? listener.listener : listener);\n            // Re-assign `events` because a newListener handler could have caused the\n            // this._events to be assigned to a new object\n            events = target._events;\n        }\n        existing = events[type];\n    }\n    if (existing === undefined) {\n        // Optimize the case of one listener. Don't need the extra array object.\n        existing = events[type] = listener;\n        ++target._eventsCount;\n    }\n    else {\n        if (typeof existing === 'function') {\n            // Adding the second element, need to change to array.\n            existing = events[type] =\n                prepend ? [listener, existing] : [existing, listener];\n            // If we've already got an array, just append.\n        }\n        else if (prepend) {\n            existing.unshift(listener);\n        }\n        else {\n            existing.push(listener);\n        }\n        // Check for listener leak\n        m = _getMaxListeners(target);\n        if (m > 0 && existing.length > m && !existing.warned) {\n            existing.warned = true;\n            // No error code for this since it is a Warning\n            // eslint-disable-next-line no-restricted-syntax\n            var w = new Error('Possible EventEmitter memory leak detected. ' +\n                existing.length + ' ' + String(type) + ' listeners ' +\n                'added. Use emitter.setMaxListeners() to ' +\n                'increase limit');\n            w.name = 'MaxListenersExceededWarning';\n            w.emitter = target;\n            w.type = type;\n            w.count = existing.length;\n            ProcessEmitWarning(w);\n        }\n    }\n    return target;\n}\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n    return _addListener(this, type, listener, false);\n};\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\nEventEmitter.prototype.prependListener =\n    function prependListener(type, listener) {\n        return _addListener(this, type, listener, true);\n    };\nfunction onceWrapper() {\n    if (!this.fired) {\n        this.target.removeListener(this.type, this.wrapFn);\n        this.fired = true;\n        if (arguments.length === 0)\n            return this.listener.call(this.target);\n        return this.listener.apply(this.target, arguments);\n    }\n}\nfunction _onceWrap(target, type, listener) {\n    var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n    var wrapped = onceWrapper.bind(state);\n    wrapped.listener = listener;\n    state.wrapFn = wrapped;\n    return wrapped;\n}\nEventEmitter.prototype.once = function once(type, listener) {\n    checkListener(listener);\n    this.on(type, _onceWrap(this, type, listener));\n    return this;\n};\nEventEmitter.prototype.prependOnceListener =\n    function prependOnceListener(type, listener) {\n        checkListener(listener);\n        this.prependListener(type, _onceWrap(this, type, listener));\n        return this;\n    };\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n    function removeListener(type, listener) {\n        var list, events, position, i, originalListener;\n        checkListener(listener);\n        events = this._events;\n        if (events === undefined)\n            return this;\n        list = events[type];\n        if (list === undefined)\n            return this;\n        if (list === listener || list.listener === listener) {\n            if (--this._eventsCount === 0)\n                this._events = Object.create(null);\n            else {\n                delete events[type];\n                if (events.removeListener)\n                    this.emit('removeListener', type, list.listener || listener);\n            }\n        }\n        else if (typeof list !== 'function') {\n            position = -1;\n            for (i = list.length - 1; i >= 0; i--) {\n                if (list[i] === listener || list[i].listener === listener) {\n                    originalListener = list[i].listener;\n                    position = i;\n                    break;\n                }\n            }\n            if (position < 0)\n                return this;\n            if (position === 0)\n                list.shift();\n            else {\n                spliceOne(list, position);\n            }\n            if (list.length === 1)\n                events[type] = list[0];\n            if (events.removeListener !== undefined)\n                this.emit('removeListener', type, originalListener || listener);\n        }\n        return this;\n    };\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.removeAllListeners =\n    function removeAllListeners(type) {\n        var listeners, events, i;\n        events = this._events;\n        if (events === undefined)\n            return this;\n        // not listening for removeListener, no need to emit\n        if (events.removeListener === undefined) {\n            if (arguments.length === 0) {\n                this._events = Object.create(null);\n                this._eventsCount = 0;\n            }\n            else if (events[type] !== undefined) {\n                if (--this._eventsCount === 0)\n                    this._events = Object.create(null);\n                else\n                    delete events[type];\n            }\n            return this;\n        }\n        // emit removeListener for all listeners on all events\n        if (arguments.length === 0) {\n            var keys = Object.keys(events);\n            var key;\n            for (i = 0; i < keys.length; ++i) {\n                key = keys[i];\n                if (key === 'removeListener')\n                    continue;\n                this.removeAllListeners(key);\n            }\n            this.removeAllListeners('removeListener');\n            this._events = Object.create(null);\n            this._eventsCount = 0;\n            return this;\n        }\n        listeners = events[type];\n        if (typeof listeners === 'function') {\n            this.removeListener(type, listeners);\n        }\n        else if (listeners !== undefined) {\n            // LIFO order\n            for (i = listeners.length - 1; i >= 0; i--) {\n                this.removeListener(type, listeners[i]);\n            }\n        }\n        return this;\n    };\nfunction _listeners(target, type, unwrap) {\n    var events = target._events;\n    if (events === undefined)\n        return [];\n    var evlistener = events[type];\n    if (evlistener === undefined)\n        return [];\n    if (typeof evlistener === 'function')\n        return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n    return unwrap ?\n        unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\nEventEmitter.prototype.listeners = function listeners(type) {\n    return _listeners(this, type, true);\n};\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n    return _listeners(this, type, false);\n};\nEventEmitter.listenerCount = function (emitter, type) {\n    if (typeof emitter.listenerCount === 'function') {\n        return emitter.listenerCount(type);\n    }\n    else {\n        return listenerCount.call(emitter, type);\n    }\n};\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n    var events = this._events;\n    if (events !== undefined) {\n        var evlistener = events[type];\n        if (typeof evlistener === 'function') {\n            return 1;\n        }\n        else if (evlistener !== undefined) {\n            return evlistener.length;\n        }\n    }\n    return 0;\n}\nEventEmitter.prototype.eventNames = function eventNames() {\n    return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\nfunction arrayClone(arr, n) {\n    var copy = new Array(n);\n    for (var i = 0; i < n; ++i)\n        copy[i] = arr[i];\n    return copy;\n}\nfunction spliceOne(list, index) {\n    for (; index + 1 < list.length; index++)\n        list[index] = list[index + 1];\n    list.pop();\n}\nfunction unwrapListeners(arr) {\n    var ret = new Array(arr.length);\n    for (var i = 0; i < ret.length; ++i) {\n        ret[i] = arr[i].listener || arr[i];\n    }\n    return ret;\n}\nfunction once(emitter, name) {\n    return new Promise(function (resolve, reject) {\n        function errorListener(err) {\n            emitter.removeListener(name, resolver);\n            reject(err);\n        }\n        function resolver() {\n            if (typeof emitter.removeListener === 'function') {\n                emitter.removeListener('error', errorListener);\n            }\n            resolve([].slice.call(arguments));\n        }\n        ;\n        eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n        if (name !== 'error') {\n            addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n        }\n    });\n}\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n    if (typeof emitter.on === 'function') {\n        eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n    }\n}\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n    if (typeof emitter.on === 'function') {\n        if (flags.once) {\n            emitter.once(name, listener);\n        }\n        else {\n            emitter.on(name, listener);\n        }\n    }\n    else if (typeof emitter.addEventListener === 'function') {\n        // EventTarget does not have `error` event semantics like Node\n        // EventEmitters, we do not listen for `error` events here.\n        emitter.addEventListener(name, function wrapListener(arg) {\n            // IE does not have builtin `{ once: true }` support so we\n            // have to do it manually.\n            if (flags.once) {\n                emitter.removeEventListener(name, wrapListener);\n            }\n            listener(arg);\n        });\n    }\n    else {\n        throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n    }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/webworkify-webpack/index.js\":\n/*!**************************************************!*\\\n  !*** ./node_modules/webworkify-webpack/index.js ***!\n  \\**************************************************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\nfunction webpackBootstrapFunc(modules) {\n    /******/ // The module cache\n    /******/ var installedModules = {};\n    /******/ // The require function\n    /******/ function __nested_webpack_require_164__(moduleId) {\n        /******/ // Check if module is in cache\n        /******/ if (installedModules[moduleId])\n            /******/ return installedModules[moduleId].exports;\n        /******/ // Create a new module (and put it into the cache)\n        /******/ var module = installedModules[moduleId] = {\n            /******/ i: moduleId,\n            /******/ l: false,\n            /******/ exports: {}\n            /******/ \n        };\n        /******/ // Execute the module function\n        /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_164__);\n        /******/ // Flag the module as loaded\n        /******/ module.l = true;\n        /******/ // Return the exports of the module\n        /******/ return module.exports;\n        /******/ \n    }\n    /******/ // expose the modules object (__webpack_modules__)\n    /******/ __nested_webpack_require_164__.m = modules;\n    /******/ // expose the module cache\n    /******/ __nested_webpack_require_164__.c = installedModules;\n    /******/ // identity function for calling harmony imports with the correct context\n    /******/ __nested_webpack_require_164__.i = function (value) { return value; };\n    /******/ // define getter function for harmony exports\n    /******/ __nested_webpack_require_164__.d = function (exports, name, getter) {\n        /******/ if (!__nested_webpack_require_164__.o(exports, name)) {\n            /******/ Object.defineProperty(exports, name, {\n                /******/ configurable: false,\n                /******/ enumerable: true,\n                /******/ get: getter\n                /******/ \n            });\n            /******/ }\n        /******/ \n    };\n    /******/ // define __esModule on exports\n    /******/ __nested_webpack_require_164__.r = function (exports) {\n        /******/ Object.defineProperty(exports, '__esModule', { value: true });\n        /******/ \n    };\n    /******/ // getDefaultExport function for compatibility with non-harmony modules\n    /******/ __nested_webpack_require_164__.n = function (module) {\n        /******/ var getter = module && module.__esModule ?\n            /******/ function getDefault() { return module['default']; } :\n            /******/ function getModuleExports() { return module; };\n        /******/ __nested_webpack_require_164__.d(getter, 'a', getter);\n        /******/ return getter;\n        /******/ \n    };\n    /******/ // Object.prototype.hasOwnProperty.call\n    /******/ __nested_webpack_require_164__.o = function (object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n    /******/ // __webpack_public_path__\n    /******/ __nested_webpack_require_164__.p = \"/\";\n    /******/ // on error function for async loading\n    /******/ __nested_webpack_require_164__.oe = function (err) { console.error(err); throw err; };\n    var f = __nested_webpack_require_164__(__nested_webpack_require_164__.s = ENTRY_MODULE);\n    return f.default || f; // try to call default if defined to also support babel esmodule exports\n}\nvar moduleNameReqExp = '[\\\\.|\\\\-|\\\\+|\\\\w|\\/|@]+';\nvar dependencyRegExp = '\\\\(\\\\s*(\\/\\\\*.*?\\\\*\\/)?\\\\s*.*?(' + moduleNameReqExp + ').*?\\\\)'; // additional chars when output.pathinfo is true\n// http://stackoverflow.com/a/2593661/130442\nfunction quoteRegExp(str) {\n    return (str + '').replace(/[.?*+^$[\\]\\\\(){}|-]/g, '\\\\$&');\n}\nfunction isNumeric(n) {\n    return !isNaN(1 * n); // 1 * n converts integers, integers as string (\"123\"), 1e3 and \"1e3\" to integers and strings to NaN\n}\nfunction getModuleDependencies(sources, module, queueName) {\n    var retval = {};\n    retval[queueName] = [];\n    var fnString = module.toString();\n    var wrapperSignature = fnString.match(/^function\\s?\\w*\\(\\w+,\\s*\\w+,\\s*(\\w+)\\)/);\n    if (!wrapperSignature)\n        return retval;\n    var webpackRequireName = wrapperSignature[1];\n    // main bundle deps\n    var re = new RegExp('(\\\\\\\\n|\\\\W)' + quoteRegExp(webpackRequireName) + dependencyRegExp, 'g');\n    var match;\n    while ((match = re.exec(fnString))) {\n        if (match[3] === 'dll-reference')\n            continue;\n        retval[queueName].push(match[3]);\n    }\n    // dll deps\n    re = new RegExp('\\\\(' + quoteRegExp(webpackRequireName) + '\\\\(\"(dll-reference\\\\s(' + moduleNameReqExp + '))\"\\\\)\\\\)' + dependencyRegExp, 'g');\n    while ((match = re.exec(fnString))) {\n        if (!sources[match[2]]) {\n            retval[queueName].push(match[1]);\n            sources[match[2]] = __webpack_require__(match[1]).m;\n        }\n        retval[match[2]] = retval[match[2]] || [];\n        retval[match[2]].push(match[4]);\n    }\n    // convert 1e3 back to 1000 - this can be important after uglify-js converted 1000 to 1e3\n    var keys = Object.keys(retval);\n    for (var i = 0; i < keys.length; i++) {\n        for (var j = 0; j < retval[keys[i]].length; j++) {\n            if (isNumeric(retval[keys[i]][j])) {\n                retval[keys[i]][j] = 1 * retval[keys[i]][j];\n            }\n        }\n    }\n    return retval;\n}\nfunction hasValuesInQueues(queues) {\n    var keys = Object.keys(queues);\n    return keys.reduce(function (hasValues, key) {\n        return hasValues || queues[key].length > 0;\n    }, false);\n}\nfunction getRequiredModules(sources, moduleId) {\n    var modulesQueue = {\n        main: [moduleId]\n    };\n    var requiredModules = {\n        main: []\n    };\n    var seenModules = {\n        main: {}\n    };\n    while (hasValuesInQueues(modulesQueue)) {\n        var queues = Object.keys(modulesQueue);\n        for (var i = 0; i < queues.length; i++) {\n            var queueName = queues[i];\n            var queue = modulesQueue[queueName];\n            var moduleToCheck = queue.pop();\n            seenModules[queueName] = seenModules[queueName] || {};\n            if (seenModules[queueName][moduleToCheck] || !sources[queueName][moduleToCheck])\n                continue;\n            seenModules[queueName][moduleToCheck] = true;\n            requiredModules[queueName] = requiredModules[queueName] || [];\n            requiredModules[queueName].push(moduleToCheck);\n            var newModules = getModuleDependencies(sources, sources[queueName][moduleToCheck], queueName);\n            var newModulesKeys = Object.keys(newModules);\n            for (var j = 0; j < newModulesKeys.length; j++) {\n                modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]] || [];\n                modulesQueue[newModulesKeys[j]] = modulesQueue[newModulesKeys[j]].concat(newModules[newModulesKeys[j]]);\n            }\n        }\n    }\n    return requiredModules;\n}\nmodule.exports = function (moduleId, options) {\n    options = options || {};\n    var sources = {\n        main: __webpack_require__.m\n    };\n    var requiredModules = options.all ? { main: Object.keys(sources.main) } : getRequiredModules(sources, moduleId);\n    var src = '';\n    Object.keys(requiredModules).filter(function (m) { return m !== 'main'; }).forEach(function (module) {\n        var entryModule = 0;\n        while (requiredModules[module][entryModule]) {\n            entryModule++;\n        }\n        requiredModules[module].push(entryModule);\n        sources[module][entryModule] = '(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })';\n        src = src + 'var ' + module + ' = (' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(entryModule)) + ')({' + requiredModules[module].map(function (id) { return '' + JSON.stringify(id) + ': ' + sources[module][id].toString(); }).join(',') + '});\\n';\n    });\n    src = src + 'new ((' + webpackBootstrapFunc.toString().replace('ENTRY_MODULE', JSON.stringify(moduleId)) + ')({' + requiredModules.main.map(function (id) { return '' + JSON.stringify(id) + ': ' + sources.main[id].toString(); }).join(',') + '}))(self);';\n    var blob = new window.Blob([src], { type: 'text/javascript' });\n    if (options.bare) {\n        return blob;\n    }\n    var URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\n    var workerUrl = URL.createObjectURL(blob);\n    var worker = new window.Worker(workerUrl);\n    worker.objectURL = workerUrl;\n    return worker;\n};\n\n\n/***/ }),\n\n/***/ \"./src/config.js\":\n/*!***********************!*\\\n  !*** ./src/config.js ***!\n  \\***********************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"defaultConfig\": function() { return /* binding */ defaultConfig; },\n/* harmony export */   \"createDefaultConfig\": function() { return /* binding */ createDefaultConfig; }\n/* harmony export */ });\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar defaultConfig = {\n    enableWorker: false,\n    enableStashBuffer: true,\n    stashInitialSize: undefined,\n    isLive: false,\n    lazyLoad: true,\n    lazyLoadMaxDuration: 3 * 60,\n    lazyLoadRecoverDuration: 30,\n    deferLoadAfterSourceOpen: true,\n    // autoCleanupSourceBuffer: default as false, leave unspecified\n    autoCleanupMaxBackwardDuration: 3 * 60,\n    autoCleanupMinBackwardDuration: 2 * 60,\n    statisticsInfoReportInterval: 600,\n    fixAudioTimestampGap: true,\n    accurateSeek: false,\n    seekType: 'range',\n    seekParamStart: 'bstart',\n    seekParamEnd: 'bend',\n    rangeLoadZeroStart: false,\n    customSeekHandler: undefined,\n    reuseRedirectedURL: false,\n    // referrerPolicy: leave as unspecified\n    headers: undefined,\n    customLoader: undefined\n};\nfunction createDefaultConfig() {\n    return Object.assign({}, defaultConfig);\n}\n\n\n/***/ }),\n\n/***/ \"./src/core/features.js\":\n/*!******************************!*\\\n  !*** ./src/core/features.js ***!\n  \\******************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _io_io_controller_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../io/io-controller.js */ \"./src/io/io-controller.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../config.js */ \"./src/config.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar Features = /** @class */ (function () {\n    function Features() {\n    }\n    Features.supportMSEH264Playback = function () {\n        return window.MediaSource &&\n            window.MediaSource.isTypeSupported('video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"');\n    };\n    Features.supportNetworkStreamIO = function () {\n        var ioctl = new _io_io_controller_js__WEBPACK_IMPORTED_MODULE_0__.default({}, (0,_config_js__WEBPACK_IMPORTED_MODULE_1__.createDefaultConfig)());\n        var loaderType = ioctl.loaderType;\n        ioctl.destroy();\n        return loaderType == 'fetch-stream-loader' || loaderType == 'xhr-moz-chunked-loader';\n    };\n    Features.getNetworkLoaderTypeName = function () {\n        var ioctl = new _io_io_controller_js__WEBPACK_IMPORTED_MODULE_0__.default({}, (0,_config_js__WEBPACK_IMPORTED_MODULE_1__.createDefaultConfig)());\n        var loaderType = ioctl.loaderType;\n        ioctl.destroy();\n        return loaderType;\n    };\n    Features.supportNativeMediaPlayback = function (mimeType) {\n        if (Features.videoElement == undefined) {\n            Features.videoElement = window.document.createElement('video');\n        }\n        var canPlay = Features.videoElement.canPlayType(mimeType);\n        return canPlay === 'probably' || canPlay == 'maybe';\n    };\n    Features.getFeatureList = function () {\n        var features = {\n            mseFlvPlayback: false,\n            mseLiveFlvPlayback: false,\n            networkStreamIO: false,\n            networkLoaderName: '',\n            nativeMP4H264Playback: false,\n            nativeWebmVP8Playback: false,\n            nativeWebmVP9Playback: false\n        };\n        features.mseFlvPlayback = Features.supportMSEH264Playback();\n        features.networkStreamIO = Features.supportNetworkStreamIO();\n        features.networkLoaderName = Features.getNetworkLoaderTypeName();\n        features.mseLiveFlvPlayback = features.mseFlvPlayback && features.networkStreamIO;\n        features.nativeMP4H264Playback = Features.supportNativeMediaPlayback('video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"');\n        features.nativeWebmVP8Playback = Features.supportNativeMediaPlayback('video/webm; codecs=\"vp8.0, vorbis\"');\n        features.nativeWebmVP9Playback = Features.supportNativeMediaPlayback('video/webm; codecs=\"vp9\"');\n        return features;\n    };\n    return Features;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (Features);\n\n\n/***/ }),\n\n/***/ \"./src/core/media-info.js\":\n/*!********************************!*\\\n  !*** ./src/core/media-info.js ***!\n  \\********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MediaInfo = /** @class */ (function () {\n    function MediaInfo() {\n        this.mimeType = null;\n        this.duration = null;\n        this.hasAudio = null;\n        this.hasVideo = null;\n        this.audioCodec = null;\n        this.videoCodec = null;\n        this.audioDataRate = null;\n        this.videoDataRate = null;\n        this.audioSampleRate = null;\n        this.audioChannelCount = null;\n        this.width = null;\n        this.height = null;\n        this.fps = null;\n        this.profile = null;\n        this.level = null;\n        this.refFrames = null;\n        this.chromaFormat = null;\n        this.sarNum = null;\n        this.sarDen = null;\n        this.metadata = null;\n        this.segments = null; // MediaInfo[]\n        this.segmentCount = null;\n        this.hasKeyframesIndex = null;\n        this.keyframesIndex = null;\n    }\n    MediaInfo.prototype.isComplete = function () {\n        var audioInfoComplete = (this.hasAudio === false) ||\n            (this.hasAudio === true &&\n                this.audioCodec != null &&\n                this.audioSampleRate != null &&\n                this.audioChannelCount != null);\n        var videoInfoComplete = (this.hasVideo === false) ||\n            (this.hasVideo === true &&\n                this.videoCodec != null &&\n                this.width != null &&\n                this.height != null &&\n                this.fps != null &&\n                this.profile != null &&\n                this.level != null &&\n                this.refFrames != null &&\n                this.chromaFormat != null &&\n                this.sarNum != null &&\n                this.sarDen != null);\n        // keyframesIndex may not be present\n        return this.mimeType != null &&\n            this.duration != null &&\n            this.metadata != null &&\n            this.hasKeyframesIndex != null &&\n            audioInfoComplete &&\n            videoInfoComplete;\n    };\n    MediaInfo.prototype.isSeekable = function () {\n        return this.hasKeyframesIndex === true;\n    };\n    MediaInfo.prototype.getNearestKeyframe = function (milliseconds) {\n        if (this.keyframesIndex == null) {\n            return null;\n        }\n        var table = this.keyframesIndex;\n        var keyframeIdx = this._search(table.times, milliseconds);\n        return {\n            index: keyframeIdx,\n            milliseconds: table.times[keyframeIdx],\n            fileposition: table.filepositions[keyframeIdx]\n        };\n    };\n    MediaInfo.prototype._search = function (list, value) {\n        var idx = 0;\n        var last = list.length - 1;\n        var mid = 0;\n        var lbound = 0;\n        var ubound = last;\n        if (value < list[0]) {\n            idx = 0;\n            lbound = ubound + 1; // skip search\n        }\n        while (lbound <= ubound) {\n            mid = lbound + Math.floor((ubound - lbound) / 2);\n            if (mid === last || (value >= list[mid] && value < list[mid + 1])) {\n                idx = mid;\n                break;\n            }\n            else if (list[mid] < value) {\n                lbound = mid + 1;\n            }\n            else {\n                ubound = mid - 1;\n            }\n        }\n        return idx;\n    };\n    return MediaInfo;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MediaInfo);\n\n\n/***/ }),\n\n/***/ \"./src/core/media-segment-info.js\":\n/*!****************************************!*\\\n  !*** ./src/core/media-segment-info.js ***!\n  \\****************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"SampleInfo\": function() { return /* binding */ SampleInfo; },\n/* harmony export */   \"MediaSegmentInfo\": function() { return /* binding */ MediaSegmentInfo; },\n/* harmony export */   \"IDRSampleList\": function() { return /* binding */ IDRSampleList; },\n/* harmony export */   \"MediaSegmentInfoList\": function() { return /* binding */ MediaSegmentInfoList; }\n/* harmony export */ });\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Represents an media sample (audio / video)\nvar SampleInfo = /** @class */ (function () {\n    function SampleInfo(dts, pts, duration, originalDts, isSync) {\n        this.dts = dts;\n        this.pts = pts;\n        this.duration = duration;\n        this.originalDts = originalDts;\n        this.isSyncPoint = isSync;\n        this.fileposition = null;\n    }\n    return SampleInfo;\n}());\n\n// Media Segment concept is defined in Media Source Extensions spec.\n// Particularly in ISO BMFF format, an Media Segment contains a moof box followed by a mdat box.\nvar MediaSegmentInfo = /** @class */ (function () {\n    function MediaSegmentInfo() {\n        this.beginDts = 0;\n        this.endDts = 0;\n        this.beginPts = 0;\n        this.endPts = 0;\n        this.originalBeginDts = 0;\n        this.originalEndDts = 0;\n        this.syncPoints = []; // SampleInfo[n], for video IDR frames only\n        this.firstSample = null; // SampleInfo\n        this.lastSample = null; // SampleInfo\n    }\n    MediaSegmentInfo.prototype.appendSyncPoint = function (sampleInfo) {\n        sampleInfo.isSyncPoint = true;\n        this.syncPoints.push(sampleInfo);\n    };\n    return MediaSegmentInfo;\n}());\n\n// Ordered list for recording video IDR frames, sorted by originalDts\nvar IDRSampleList = /** @class */ (function () {\n    function IDRSampleList() {\n        this._list = [];\n    }\n    IDRSampleList.prototype.clear = function () {\n        this._list = [];\n    };\n    IDRSampleList.prototype.appendArray = function (syncPoints) {\n        var list = this._list;\n        if (syncPoints.length === 0) {\n            return;\n        }\n        if (list.length > 0 && syncPoints[0].originalDts < list[list.length - 1].originalDts) {\n            this.clear();\n        }\n        Array.prototype.push.apply(list, syncPoints);\n    };\n    IDRSampleList.prototype.getLastSyncPointBeforeDts = function (dts) {\n        if (this._list.length == 0) {\n            return null;\n        }\n        var list = this._list;\n        var idx = 0;\n        var last = list.length - 1;\n        var mid = 0;\n        var lbound = 0;\n        var ubound = last;\n        if (dts < list[0].dts) {\n            idx = 0;\n            lbound = ubound + 1;\n        }\n        while (lbound <= ubound) {\n            mid = lbound + Math.floor((ubound - lbound) / 2);\n            if (mid === last || (dts >= list[mid].dts && dts < list[mid + 1].dts)) {\n                idx = mid;\n                break;\n            }\n            else if (list[mid].dts < dts) {\n                lbound = mid + 1;\n            }\n            else {\n                ubound = mid - 1;\n            }\n        }\n        return this._list[idx];\n    };\n    return IDRSampleList;\n}());\n\n// Data structure for recording information of media segments in single track.\nvar MediaSegmentInfoList = /** @class */ (function () {\n    function MediaSegmentInfoList(type) {\n        this._type = type;\n        this._list = [];\n        this._lastAppendLocation = -1; // cached last insert location\n    }\n    Object.defineProperty(MediaSegmentInfoList.prototype, \"type\", {\n        get: function () {\n            return this._type;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MediaSegmentInfoList.prototype, \"length\", {\n        get: function () {\n            return this._list.length;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MediaSegmentInfoList.prototype.isEmpty = function () {\n        return this._list.length === 0;\n    };\n    MediaSegmentInfoList.prototype.clear = function () {\n        this._list = [];\n        this._lastAppendLocation = -1;\n    };\n    MediaSegmentInfoList.prototype._searchNearestSegmentBefore = function (originalBeginDts) {\n        var list = this._list;\n        if (list.length === 0) {\n            return -2;\n        }\n        var last = list.length - 1;\n        var mid = 0;\n        var lbound = 0;\n        var ubound = last;\n        var idx = 0;\n        if (originalBeginDts < list[0].originalBeginDts) {\n            idx = -1;\n            return idx;\n        }\n        while (lbound <= ubound) {\n            mid = lbound + Math.floor((ubound - lbound) / 2);\n            if (mid === last || (originalBeginDts > list[mid].lastSample.originalDts &&\n                (originalBeginDts < list[mid + 1].originalBeginDts))) {\n                idx = mid;\n                break;\n            }\n            else if (list[mid].originalBeginDts < originalBeginDts) {\n                lbound = mid + 1;\n            }\n            else {\n                ubound = mid - 1;\n            }\n        }\n        return idx;\n    };\n    MediaSegmentInfoList.prototype._searchNearestSegmentAfter = function (originalBeginDts) {\n        return this._searchNearestSegmentBefore(originalBeginDts) + 1;\n    };\n    MediaSegmentInfoList.prototype.append = function (mediaSegmentInfo) {\n        var list = this._list;\n        var msi = mediaSegmentInfo;\n        var lastAppendIdx = this._lastAppendLocation;\n        var insertIdx = 0;\n        if (lastAppendIdx !== -1 && lastAppendIdx < list.length &&\n            msi.originalBeginDts >= list[lastAppendIdx].lastSample.originalDts &&\n            ((lastAppendIdx === list.length - 1) ||\n                (lastAppendIdx < list.length - 1 &&\n                    msi.originalBeginDts < list[lastAppendIdx + 1].originalBeginDts))) {\n            insertIdx = lastAppendIdx + 1; // use cached location idx\n        }\n        else {\n            if (list.length > 0) {\n                insertIdx = this._searchNearestSegmentBefore(msi.originalBeginDts) + 1;\n            }\n        }\n        this._lastAppendLocation = insertIdx;\n        this._list.splice(insertIdx, 0, msi);\n    };\n    MediaSegmentInfoList.prototype.getLastSegmentBefore = function (originalBeginDts) {\n        var idx = this._searchNearestSegmentBefore(originalBeginDts);\n        if (idx >= 0) {\n            return this._list[idx];\n        }\n        else { // -1\n            return null;\n        }\n    };\n    MediaSegmentInfoList.prototype.getLastSampleBefore = function (originalBeginDts) {\n        var segment = this.getLastSegmentBefore(originalBeginDts);\n        if (segment != null) {\n            return segment.lastSample;\n        }\n        else {\n            return null;\n        }\n    };\n    MediaSegmentInfoList.prototype.getLastSyncPointBefore = function (originalBeginDts) {\n        var segmentIdx = this._searchNearestSegmentBefore(originalBeginDts);\n        var syncPoints = this._list[segmentIdx].syncPoints;\n        while (syncPoints.length === 0 && segmentIdx > 0) {\n            segmentIdx--;\n            syncPoints = this._list[segmentIdx].syncPoints;\n        }\n        if (syncPoints.length > 0) {\n            return syncPoints[syncPoints.length - 1];\n        }\n        else {\n            return null;\n        }\n    };\n    return MediaSegmentInfoList;\n}());\n\n\n\n/***/ }),\n\n/***/ \"./src/core/mse-controller.js\":\n/*!************************************!*\\\n  !*** ./src/core/mse-controller.js ***!\n  \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/browser.js */ \"./src/utils/browser.js\");\n/* harmony import */ var _mse_events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mse-events.js */ \"./src/core/mse-events.js\");\n/* harmony import */ var _media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./media-segment-info.js */ \"./src/core/media-segment-info.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n// Media Source Extensions controller\nvar MSEController = /** @class */ (function () {\n    function MSEController(config) {\n        this.TAG = 'MSEController';\n        this._config = config;\n        this._emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n        if (this._config.isLive && this._config.autoCleanupSourceBuffer == undefined) {\n            // For live stream, do auto cleanup by default\n            this._config.autoCleanupSourceBuffer = true;\n        }\n        this.e = {\n            onSourceOpen: this._onSourceOpen.bind(this),\n            onSourceEnded: this._onSourceEnded.bind(this),\n            onSourceClose: this._onSourceClose.bind(this),\n            onSourceBufferError: this._onSourceBufferError.bind(this),\n            onSourceBufferUpdateEnd: this._onSourceBufferUpdateEnd.bind(this)\n        };\n        this._mediaSource = null;\n        this._mediaSourceObjectURL = null;\n        this._mediaElement = null;\n        this._isBufferFull = false;\n        this._hasPendingEos = false;\n        this._requireSetMediaDuration = false;\n        this._pendingMediaDuration = 0;\n        this._pendingSourceBufferInit = [];\n        this._mimeTypes = {\n            video: null,\n            audio: null\n        };\n        this._sourceBuffers = {\n            video: null,\n            audio: null\n        };\n        this._lastInitSegments = {\n            video: null,\n            audio: null\n        };\n        this._pendingSegments = {\n            video: [],\n            audio: []\n        };\n        this._pendingRemoveRanges = {\n            video: [],\n            audio: []\n        };\n        this._idrList = new _media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.IDRSampleList();\n    }\n    MSEController.prototype.destroy = function () {\n        if (this._mediaElement || this._mediaSource) {\n            this.detachMediaElement();\n        }\n        this.e = null;\n        this._emitter.removeAllListeners();\n        this._emitter = null;\n    };\n    MSEController.prototype.on = function (event, listener) {\n        this._emitter.addListener(event, listener);\n    };\n    MSEController.prototype.off = function (event, listener) {\n        this._emitter.removeListener(event, listener);\n    };\n    MSEController.prototype.attachMediaElement = function (mediaElement) {\n        if (this._mediaSource) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__.IllegalStateException('MediaSource has been attached to an HTMLMediaElement!');\n        }\n        var ms = this._mediaSource = new window.MediaSource();\n        ms.addEventListener('sourceopen', this.e.onSourceOpen);\n        ms.addEventListener('sourceended', this.e.onSourceEnded);\n        ms.addEventListener('sourceclose', this.e.onSourceClose);\n        this._mediaElement = mediaElement;\n        this._mediaSourceObjectURL = window.URL.createObjectURL(this._mediaSource);\n        mediaElement.src = this._mediaSourceObjectURL;\n    };\n    MSEController.prototype.detachMediaElement = function () {\n        if (this._mediaSource) {\n            var ms = this._mediaSource;\n            for (var type in this._sourceBuffers) {\n                // pending segments should be discard\n                var ps = this._pendingSegments[type];\n                ps.splice(0, ps.length);\n                this._pendingSegments[type] = null;\n                this._pendingRemoveRanges[type] = null;\n                this._lastInitSegments[type] = null;\n                // remove all sourcebuffers\n                var sb = this._sourceBuffers[type];\n                if (sb) {\n                    if (ms.readyState !== 'closed') {\n                        // ms edge can throw an error: Unexpected call to method or property access\n                        try {\n                            ms.removeSourceBuffer(sb);\n                        }\n                        catch (error) {\n                            _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, error.message);\n                        }\n                        sb.removeEventListener('error', this.e.onSourceBufferError);\n                        sb.removeEventListener('updateend', this.e.onSourceBufferUpdateEnd);\n                    }\n                    this._mimeTypes[type] = null;\n                    this._sourceBuffers[type] = null;\n                }\n            }\n            if (ms.readyState === 'open') {\n                try {\n                    ms.endOfStream();\n                }\n                catch (error) {\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, error.message);\n                }\n            }\n            ms.removeEventListener('sourceopen', this.e.onSourceOpen);\n            ms.removeEventListener('sourceended', this.e.onSourceEnded);\n            ms.removeEventListener('sourceclose', this.e.onSourceClose);\n            this._pendingSourceBufferInit = [];\n            this._isBufferFull = false;\n            this._idrList.clear();\n            this._mediaSource = null;\n        }\n        if (this._mediaElement) {\n            this._mediaElement.src = '';\n            this._mediaElement.removeAttribute('src');\n            this._mediaElement = null;\n        }\n        if (this._mediaSourceObjectURL) {\n            window.URL.revokeObjectURL(this._mediaSourceObjectURL);\n            this._mediaSourceObjectURL = null;\n        }\n    };\n    MSEController.prototype.appendInitSegment = function (initSegment, deferred) {\n        if (!this._mediaSource || this._mediaSource.readyState !== 'open') {\n            // sourcebuffer creation requires mediaSource.readyState === 'open'\n            // so we defer the sourcebuffer creation, until sourceopen event triggered\n            this._pendingSourceBufferInit.push(initSegment);\n            // make sure that this InitSegment is in the front of pending segments queue\n            this._pendingSegments[initSegment.type].push(initSegment);\n            return;\n        }\n        var is = initSegment;\n        var mimeType = \"\" + is.container;\n        if (is.codec && is.codec.length > 0) {\n            mimeType += \";codecs=\" + is.codec;\n        }\n        var firstInitSegment = false;\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'Received Initialization Segment, mimeType: ' + mimeType);\n        this._lastInitSegments[is.type] = is;\n        if (mimeType !== this._mimeTypes[is.type]) {\n            if (!this._mimeTypes[is.type]) { // empty, first chance create sourcebuffer\n                firstInitSegment = true;\n                try {\n                    var sb = this._sourceBuffers[is.type] = this._mediaSource.addSourceBuffer(mimeType);\n                    sb.addEventListener('error', this.e.onSourceBufferError);\n                    sb.addEventListener('updateend', this.e.onSourceBufferUpdateEnd);\n                }\n                catch (error) {\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, error.message);\n                    this._emitter.emit(_mse_events_js__WEBPACK_IMPORTED_MODULE_3__.default.ERROR, { code: error.code, msg: error.message });\n                    return;\n                }\n            }\n            else {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, \"Notice: \" + is.type + \" mimeType changed, origin: \" + this._mimeTypes[is.type] + \", target: \" + mimeType);\n            }\n            this._mimeTypes[is.type] = mimeType;\n        }\n        if (!deferred) {\n            // deferred means this InitSegment has been pushed to pendingSegments queue\n            this._pendingSegments[is.type].push(is);\n        }\n        if (!firstInitSegment) { // append immediately only if init segment in subsequence\n            if (this._sourceBuffers[is.type] && !this._sourceBuffers[is.type].updating) {\n                this._doAppendSegments();\n            }\n        }\n        if (_utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari && is.container === 'audio/mpeg' && is.mediaDuration > 0) {\n            // 'audio/mpeg' track under Safari may cause MediaElement's duration to be NaN\n            // Manually correct MediaSource.duration to make progress bar seekable, and report right duration\n            this._requireSetMediaDuration = true;\n            this._pendingMediaDuration = is.mediaDuration / 1000; // in seconds\n            this._updateMediaSourceDuration();\n        }\n    };\n    MSEController.prototype.appendMediaSegment = function (mediaSegment) {\n        var ms = mediaSegment;\n        this._pendingSegments[ms.type].push(ms);\n        if (this._config.autoCleanupSourceBuffer && this._needCleanupSourceBuffer()) {\n            this._doCleanupSourceBuffer();\n        }\n        var sb = this._sourceBuffers[ms.type];\n        if (sb && !sb.updating && !this._hasPendingRemoveRanges()) {\n            this._doAppendSegments();\n        }\n    };\n    MSEController.prototype.seek = function (seconds) {\n        // remove all appended buffers\n        for (var type in this._sourceBuffers) {\n            if (!this._sourceBuffers[type]) {\n                continue;\n            }\n            // abort current buffer append algorithm\n            var sb = this._sourceBuffers[type];\n            if (this._mediaSource.readyState === 'open') {\n                try {\n                    // If range removal algorithm is running, InvalidStateError will be throwed\n                    // Ignore it.\n                    sb.abort();\n                }\n                catch (error) {\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, error.message);\n                }\n            }\n            // IDRList should be clear\n            this._idrList.clear();\n            // pending segments should be discard\n            var ps = this._pendingSegments[type];\n            ps.splice(0, ps.length);\n            if (this._mediaSource.readyState === 'closed') {\n                // Parent MediaSource object has been detached from HTMLMediaElement\n                continue;\n            }\n            // record ranges to be remove from SourceBuffer\n            for (var i = 0; i < sb.buffered.length; i++) {\n                var start = sb.buffered.start(i);\n                var end = sb.buffered.end(i);\n                this._pendingRemoveRanges[type].push({ start: start, end: end });\n            }\n            // if sb is not updating, let's remove ranges now!\n            if (!sb.updating) {\n                this._doRemoveRanges();\n            }\n            // Safari 10 may get InvalidStateError in the later appendBuffer() after SourceBuffer.remove() call\n            // Internal parser's state may be invalid at this time. Re-append last InitSegment to workaround.\n            // Related issue: https://bugs.webkit.org/show_bug.cgi?id=159230\n            if (_utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari) {\n                var lastInitSegment = this._lastInitSegments[type];\n                if (lastInitSegment) {\n                    this._pendingSegments[type].push(lastInitSegment);\n                    if (!sb.updating) {\n                        this._doAppendSegments();\n                    }\n                }\n            }\n        }\n    };\n    MSEController.prototype.endOfStream = function () {\n        var ms = this._mediaSource;\n        var sb = this._sourceBuffers;\n        if (!ms || ms.readyState !== 'open') {\n            if (ms && ms.readyState === 'closed' && this._hasPendingSegments()) {\n                // If MediaSource hasn't turned into open state, and there're pending segments\n                // Mark pending endOfStream, defer call until all pending segments appended complete\n                this._hasPendingEos = true;\n            }\n            return;\n        }\n        if (sb.video && sb.video.updating || sb.audio && sb.audio.updating) {\n            // If any sourcebuffer is updating, defer endOfStream operation\n            // See _onSourceBufferUpdateEnd()\n            this._hasPendingEos = true;\n        }\n        else {\n            this._hasPendingEos = false;\n            // Notify media data loading complete\n            // This is helpful for correcting total duration to match last media segment\n            // Otherwise MediaElement's ended event may not be triggered\n            ms.endOfStream();\n        }\n    };\n    MSEController.prototype.getNearestKeyframe = function (dts) {\n        return this._idrList.getLastSyncPointBeforeDts(dts);\n    };\n    MSEController.prototype._needCleanupSourceBuffer = function () {\n        if (!this._config.autoCleanupSourceBuffer) {\n            return false;\n        }\n        var currentTime = this._mediaElement.currentTime;\n        for (var type in this._sourceBuffers) {\n            var sb = this._sourceBuffers[type];\n            if (sb) {\n                var buffered = sb.buffered;\n                if (buffered.length >= 1) {\n                    if (currentTime - buffered.start(0) >= this._config.autoCleanupMaxBackwardDuration) {\n                        return true;\n                    }\n                }\n            }\n        }\n        return false;\n    };\n    MSEController.prototype._doCleanupSourceBuffer = function () {\n        var currentTime = this._mediaElement.currentTime;\n        for (var type in this._sourceBuffers) {\n            var sb = this._sourceBuffers[type];\n            if (sb) {\n                var buffered = sb.buffered;\n                var doRemove = false;\n                for (var i = 0; i < buffered.length; i++) {\n                    var start = buffered.start(i);\n                    var end = buffered.end(i);\n                    if (start <= currentTime && currentTime < end + 3) { // padding 3 seconds\n                        if (currentTime - start >= this._config.autoCleanupMaxBackwardDuration) {\n                            doRemove = true;\n                            var removeEnd = currentTime - this._config.autoCleanupMinBackwardDuration;\n                            this._pendingRemoveRanges[type].push({ start: start, end: removeEnd });\n                        }\n                    }\n                    else if (end < currentTime) {\n                        doRemove = true;\n                        this._pendingRemoveRanges[type].push({ start: start, end: end });\n                    }\n                }\n                if (doRemove && !sb.updating) {\n                    this._doRemoveRanges();\n                }\n            }\n        }\n    };\n    MSEController.prototype._updateMediaSourceDuration = function () {\n        var sb = this._sourceBuffers;\n        if (this._mediaElement.readyState === 0 || this._mediaSource.readyState !== 'open') {\n            return;\n        }\n        if ((sb.video && sb.video.updating) || (sb.audio && sb.audio.updating)) {\n            return;\n        }\n        var current = this._mediaSource.duration;\n        var target = this._pendingMediaDuration;\n        if (target > 0 && (isNaN(current) || target > current)) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, \"Update MediaSource duration from \" + current + \" to \" + target);\n            this._mediaSource.duration = target;\n        }\n        this._requireSetMediaDuration = false;\n        this._pendingMediaDuration = 0;\n    };\n    MSEController.prototype._doRemoveRanges = function () {\n        for (var type in this._pendingRemoveRanges) {\n            if (!this._sourceBuffers[type] || this._sourceBuffers[type].updating) {\n                continue;\n            }\n            var sb = this._sourceBuffers[type];\n            var ranges = this._pendingRemoveRanges[type];\n            while (ranges.length && !sb.updating) {\n                var range = ranges.shift();\n                sb.remove(range.start, range.end);\n            }\n        }\n    };\n    MSEController.prototype._doAppendSegments = function () {\n        var pendingSegments = this._pendingSegments;\n        for (var type in pendingSegments) {\n            if (!this._sourceBuffers[type] || this._sourceBuffers[type].updating) {\n                continue;\n            }\n            if (pendingSegments[type].length > 0) {\n                var segment = pendingSegments[type].shift();\n                if (segment.timestampOffset) {\n                    // For MPEG audio stream in MSE, if unbuffered-seeking occurred\n                    // We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer.\n                    var currentOffset = this._sourceBuffers[type].timestampOffset;\n                    var targetOffset = segment.timestampOffset / 1000; // in seconds\n                    var delta = Math.abs(currentOffset - targetOffset);\n                    if (delta > 0.1) { // If time delta > 100ms\n                        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, \"Update MPEG audio timestampOffset from \" + currentOffset + \" to \" + targetOffset);\n                        this._sourceBuffers[type].timestampOffset = targetOffset;\n                    }\n                    delete segment.timestampOffset;\n                }\n                if (!segment.data || segment.data.byteLength === 0) {\n                    // Ignore empty buffer\n                    continue;\n                }\n                try {\n                    this._sourceBuffers[type].appendBuffer(segment.data);\n                    this._isBufferFull = false;\n                    if (type === 'video' && segment.hasOwnProperty('info')) {\n                        this._idrList.appendArray(segment.info.syncPoints);\n                    }\n                }\n                catch (error) {\n                    this._pendingSegments[type].unshift(segment);\n                    if (error.code === 22) { // QuotaExceededError\n                        /* Notice that FireFox may not throw QuotaExceededError if SourceBuffer is full\n                         * Currently we can only do lazy-load to avoid SourceBuffer become scattered.\n                         * SourceBuffer eviction policy may be changed in future version of FireFox.\n                         *\n                         * Related issues:\n                         * https://bugzilla.mozilla.org/show_bug.cgi?id=1279885\n                         * https://bugzilla.mozilla.org/show_bug.cgi?id=1280023\n                         */\n                        // report buffer full, abort network IO\n                        if (!this._isBufferFull) {\n                            this._emitter.emit(_mse_events_js__WEBPACK_IMPORTED_MODULE_3__.default.BUFFER_FULL);\n                        }\n                        this._isBufferFull = true;\n                    }\n                    else {\n                        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, error.message);\n                        this._emitter.emit(_mse_events_js__WEBPACK_IMPORTED_MODULE_3__.default.ERROR, { code: error.code, msg: error.message });\n                    }\n                }\n            }\n        }\n    };\n    MSEController.prototype._onSourceOpen = function () {\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'MediaSource onSourceOpen');\n        this._mediaSource.removeEventListener('sourceopen', this.e.onSourceOpen);\n        // deferred sourcebuffer creation / initialization\n        if (this._pendingSourceBufferInit.length > 0) {\n            var pendings = this._pendingSourceBufferInit;\n            while (pendings.length) {\n                var segment = pendings.shift();\n                this.appendInitSegment(segment, true);\n            }\n        }\n        // there may be some pending media segments, append them\n        if (this._hasPendingSegments()) {\n            this._doAppendSegments();\n        }\n        this._emitter.emit(_mse_events_js__WEBPACK_IMPORTED_MODULE_3__.default.SOURCE_OPEN);\n    };\n    MSEController.prototype._onSourceEnded = function () {\n        // fired on endOfStream\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'MediaSource onSourceEnded');\n    };\n    MSEController.prototype._onSourceClose = function () {\n        // fired on detaching from media element\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'MediaSource onSourceClose');\n        if (this._mediaSource && this.e != null) {\n            this._mediaSource.removeEventListener('sourceopen', this.e.onSourceOpen);\n            this._mediaSource.removeEventListener('sourceended', this.e.onSourceEnded);\n            this._mediaSource.removeEventListener('sourceclose', this.e.onSourceClose);\n        }\n    };\n    MSEController.prototype._hasPendingSegments = function () {\n        var ps = this._pendingSegments;\n        return ps.video.length > 0 || ps.audio.length > 0;\n    };\n    MSEController.prototype._hasPendingRemoveRanges = function () {\n        var prr = this._pendingRemoveRanges;\n        return prr.video.length > 0 || prr.audio.length > 0;\n    };\n    MSEController.prototype._onSourceBufferUpdateEnd = function () {\n        if (this._requireSetMediaDuration) {\n            this._updateMediaSourceDuration();\n        }\n        else if (this._hasPendingRemoveRanges()) {\n            this._doRemoveRanges();\n        }\n        else if (this._hasPendingSegments()) {\n            this._doAppendSegments();\n        }\n        else if (this._hasPendingEos) {\n            this.endOfStream();\n        }\n        this._emitter.emit(_mse_events_js__WEBPACK_IMPORTED_MODULE_3__.default.UPDATE_END);\n    };\n    MSEController.prototype._onSourceBufferError = function (e) {\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, \"SourceBuffer Error: \" + e);\n        // this error might not always be fatal, just ignore it\n    };\n    return MSEController;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MSEController);\n\n\n/***/ }),\n\n/***/ \"./src/core/mse-events.js\":\n/*!********************************!*\\\n  !*** ./src/core/mse-events.js ***!\n  \\********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar MSEEvents = {\n    ERROR: 'error',\n    SOURCE_OPEN: 'source_open',\n    UPDATE_END: 'update_end',\n    BUFFER_FULL: 'buffer_full'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MSEEvents);\n\n\n/***/ }),\n\n/***/ \"./src/core/transmuxer.js\":\n/*!********************************!*\\\n  !*** ./src/core/transmuxer.js ***!\n  \\********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var webworkify_webpack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! webworkify-webpack */ \"./node_modules/webworkify-webpack/index.js\");\n/* harmony import */ var webworkify_webpack__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(webworkify_webpack__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/logging-control.js */ \"./src/utils/logging-control.js\");\n/* harmony import */ var _transmuxing_controller_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./transmuxing-controller.js */ \"./src/core/transmuxing-controller.js\");\n/* harmony import */ var _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transmuxing-events.js */ \"./src/core/transmuxing-events.js\");\n/* harmony import */ var _media_info_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./media-info.js */ \"./src/core/media-info.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\nvar Transmuxer = /** @class */ (function () {\n    function Transmuxer(mediaDataSource, config) {\n        this.TAG = 'Transmuxer';\n        this._emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n        if (config.enableWorker && typeof (Worker) !== 'undefined') {\n            try {\n                this._worker = webworkify_webpack__WEBPACK_IMPORTED_MODULE_1___default()(/*require.resolve*/(/*! ./transmuxing-worker */ \"./src/core/transmuxing-worker.js\"));\n                this._workerDestroying = false;\n                this._worker.addEventListener('message', this._onWorkerMessage.bind(this));\n                this._worker.postMessage({ cmd: 'init', param: [mediaDataSource, config] });\n                this.e = {\n                    onLoggingConfigChanged: this._onLoggingConfigChanged.bind(this)\n                };\n                _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_3__.default.registerListener(this.e.onLoggingConfigChanged);\n                this._worker.postMessage({ cmd: 'logging_config', param: _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_3__.default.getConfig() });\n            }\n            catch (error) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_2__.default.e(this.TAG, 'Error while initialize transmuxing worker, fallback to inline transmuxing');\n                this._worker = null;\n                this._controller = new _transmuxing_controller_js__WEBPACK_IMPORTED_MODULE_4__.default(mediaDataSource, config);\n            }\n        }\n        else {\n            this._controller = new _transmuxing_controller_js__WEBPACK_IMPORTED_MODULE_4__.default(mediaDataSource, config);\n        }\n        if (this._controller) {\n            var ctl = this._controller;\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.IO_ERROR, this._onIOError.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.DEMUX_ERROR, this._onDemuxError.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_SEGMENT, this._onInitSegment.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_SEGMENT, this._onMediaSegment.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.LOADING_COMPLETE, this._onLoadingComplete.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOVERED_EARLY_EOF, this._onRecoveredEarlyEof.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_INFO, this._onMediaInfo.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.METADATA_ARRIVED, this._onMetaDataArrived.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.SCRIPTDATA_ARRIVED, this._onScriptDataArrived.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.STATISTICS_INFO, this._onStatisticsInfo.bind(this));\n            ctl.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this));\n        }\n    }\n    Transmuxer.prototype.destroy = function () {\n        if (this._worker) {\n            if (!this._workerDestroying) {\n                this._workerDestroying = true;\n                this._worker.postMessage({ cmd: 'destroy' });\n                _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_3__.default.removeListener(this.e.onLoggingConfigChanged);\n                this.e = null;\n            }\n        }\n        else {\n            this._controller.destroy();\n            this._controller = null;\n        }\n        this._emitter.removeAllListeners();\n        this._emitter = null;\n    };\n    Transmuxer.prototype.on = function (event, listener) {\n        this._emitter.addListener(event, listener);\n    };\n    Transmuxer.prototype.off = function (event, listener) {\n        this._emitter.removeListener(event, listener);\n    };\n    Transmuxer.prototype.hasWorker = function () {\n        return this._worker != null;\n    };\n    Transmuxer.prototype.open = function () {\n        if (this._worker) {\n            this._worker.postMessage({ cmd: 'start' });\n        }\n        else {\n            this._controller.start();\n        }\n    };\n    Transmuxer.prototype.close = function () {\n        if (this._worker) {\n            this._worker.postMessage({ cmd: 'stop' });\n        }\n        else {\n            this._controller.stop();\n        }\n    };\n    Transmuxer.prototype.seek = function (milliseconds) {\n        if (this._worker) {\n            this._worker.postMessage({ cmd: 'seek', param: milliseconds });\n        }\n        else {\n            this._controller.seek(milliseconds);\n        }\n    };\n    Transmuxer.prototype.pause = function () {\n        if (this._worker) {\n            this._worker.postMessage({ cmd: 'pause' });\n        }\n        else {\n            this._controller.pause();\n        }\n    };\n    Transmuxer.prototype.resume = function () {\n        if (this._worker) {\n            this._worker.postMessage({ cmd: 'resume' });\n        }\n        else {\n            this._controller.resume();\n        }\n    };\n    Transmuxer.prototype._onInitSegment = function (type, initSegment) {\n        var _this = this;\n        // do async invoke\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_SEGMENT, type, initSegment);\n        });\n    };\n    Transmuxer.prototype._onMediaSegment = function (type, mediaSegment) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_SEGMENT, type, mediaSegment);\n        });\n    };\n    Transmuxer.prototype._onLoadingComplete = function () {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.LOADING_COMPLETE);\n        });\n    };\n    Transmuxer.prototype._onRecoveredEarlyEof = function () {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOVERED_EARLY_EOF);\n        });\n    };\n    Transmuxer.prototype._onMediaInfo = function (mediaInfo) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_INFO, mediaInfo);\n        });\n    };\n    Transmuxer.prototype._onMetaDataArrived = function (metadata) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.METADATA_ARRIVED, metadata);\n        });\n    };\n    Transmuxer.prototype._onScriptDataArrived = function (data) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.SCRIPTDATA_ARRIVED, data);\n        });\n    };\n    Transmuxer.prototype._onStatisticsInfo = function (statisticsInfo) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.STATISTICS_INFO, statisticsInfo);\n        });\n    };\n    Transmuxer.prototype._onIOError = function (type, info) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.IO_ERROR, type, info);\n        });\n    };\n    Transmuxer.prototype._onDemuxError = function (type, info) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.DEMUX_ERROR, type, info);\n        });\n    };\n    Transmuxer.prototype._onRecommendSeekpoint = function (milliseconds) {\n        var _this = this;\n        Promise.resolve().then(function () {\n            _this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOMMEND_SEEKPOINT, milliseconds);\n        });\n    };\n    Transmuxer.prototype._onLoggingConfigChanged = function (config) {\n        if (this._worker) {\n            this._worker.postMessage({ cmd: 'logging_config', param: config });\n        }\n    };\n    Transmuxer.prototype._onWorkerMessage = function (e) {\n        var message = e.data;\n        var data = message.data;\n        if (message.msg === 'destroyed' || this._workerDestroying) {\n            this._workerDestroying = false;\n            this._worker.terminate();\n            this._worker = null;\n            return;\n        }\n        switch (message.msg) {\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_SEGMENT:\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_SEGMENT:\n                this._emitter.emit(message.msg, data.type, data.data);\n                break;\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.LOADING_COMPLETE:\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOVERED_EARLY_EOF:\n                this._emitter.emit(message.msg);\n                break;\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_INFO:\n                Object.setPrototypeOf(data, _media_info_js__WEBPACK_IMPORTED_MODULE_6__.default.prototype);\n                this._emitter.emit(message.msg, data);\n                break;\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.METADATA_ARRIVED:\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.SCRIPTDATA_ARRIVED:\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.STATISTICS_INFO:\n                this._emitter.emit(message.msg, data);\n                break;\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.IO_ERROR:\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.DEMUX_ERROR:\n                this._emitter.emit(message.msg, data.type, data.info);\n                break;\n            case _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOMMEND_SEEKPOINT:\n                this._emitter.emit(message.msg, data);\n                break;\n            case 'logcat_callback':\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_2__.default.emitter.emit('log', data.type, data.logcat);\n                break;\n            default:\n                break;\n        }\n    };\n    return Transmuxer;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (Transmuxer);\n\n\n/***/ }),\n\n/***/ \"./src/core/transmuxing-controller.js\":\n/*!********************************************!*\\\n  !*** ./src/core/transmuxing-controller.js ***!\n  \\********************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/browser.js */ \"./src/utils/browser.js\");\n/* harmony import */ var _media_info_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./media-info.js */ \"./src/core/media-info.js\");\n/* harmony import */ var _demux_flv_demuxer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../demux/flv-demuxer.js */ \"./src/demux/flv-demuxer.js\");\n/* harmony import */ var _remux_mp4_remuxer_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../remux/mp4-remuxer.js */ \"./src/remux/mp4-remuxer.js\");\n/* harmony import */ var _demux_demux_errors_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../demux/demux-errors.js */ \"./src/demux/demux-errors.js\");\n/* harmony import */ var _io_io_controller_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../io/io-controller.js */ \"./src/io/io-controller.js\");\n/* harmony import */ var _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./transmuxing-events.js */ \"./src/core/transmuxing-events.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n// Transmuxing (IO, Demuxing, Remuxing) controller, with multipart support\nvar TransmuxingController = /** @class */ (function () {\n    function TransmuxingController(mediaDataSource, config) {\n        this.TAG = 'TransmuxingController';\n        this._emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n        this._config = config;\n        // treat single part media as multipart media, which has only one segment\n        if (!mediaDataSource.segments) {\n            mediaDataSource.segments = [{\n                    duration: mediaDataSource.duration,\n                    filesize: mediaDataSource.filesize,\n                    url: mediaDataSource.url\n                }];\n        }\n        // fill in default IO params if not exists\n        if (typeof mediaDataSource.cors !== 'boolean') {\n            mediaDataSource.cors = true;\n        }\n        if (typeof mediaDataSource.withCredentials !== 'boolean') {\n            mediaDataSource.withCredentials = false;\n        }\n        this._mediaDataSource = mediaDataSource;\n        this._currentSegmentIndex = 0;\n        var totalDuration = 0;\n        this._mediaDataSource.segments.forEach(function (segment) {\n            // timestampBase for each segment, and calculate total duration\n            segment.timestampBase = totalDuration;\n            totalDuration += segment.duration;\n            // params needed by IOController\n            segment.cors = mediaDataSource.cors;\n            segment.withCredentials = mediaDataSource.withCredentials;\n            // referrer policy control, if exist\n            if (config.referrerPolicy) {\n                segment.referrerPolicy = config.referrerPolicy;\n            }\n        });\n        if (!isNaN(totalDuration) && this._mediaDataSource.duration !== totalDuration) {\n            this._mediaDataSource.duration = totalDuration;\n        }\n        this._mediaInfo = null;\n        this._demuxer = null;\n        this._remuxer = null;\n        this._ioctl = null;\n        this._pendingSeekTime = null;\n        this._pendingResolveSeekPoint = null;\n        this._statisticsReporter = null;\n    }\n    TransmuxingController.prototype.destroy = function () {\n        this._mediaInfo = null;\n        this._mediaDataSource = null;\n        if (this._statisticsReporter) {\n            this._disableStatisticsReporter();\n        }\n        if (this._ioctl) {\n            this._ioctl.destroy();\n            this._ioctl = null;\n        }\n        if (this._demuxer) {\n            this._demuxer.destroy();\n            this._demuxer = null;\n        }\n        if (this._remuxer) {\n            this._remuxer.destroy();\n            this._remuxer = null;\n        }\n        this._emitter.removeAllListeners();\n        this._emitter = null;\n    };\n    TransmuxingController.prototype.on = function (event, listener) {\n        this._emitter.addListener(event, listener);\n    };\n    TransmuxingController.prototype.off = function (event, listener) {\n        this._emitter.removeListener(event, listener);\n    };\n    TransmuxingController.prototype.start = function () {\n        this._loadSegment(0);\n        this._enableStatisticsReporter();\n    };\n    TransmuxingController.prototype._loadSegment = function (segmentIndex, optionalFrom) {\n        this._currentSegmentIndex = segmentIndex;\n        var dataSource = this._mediaDataSource.segments[segmentIndex];\n        var ioctl = this._ioctl = new _io_io_controller_js__WEBPACK_IMPORTED_MODULE_7__.default(dataSource, this._config, segmentIndex);\n        ioctl.onError = this._onIOException.bind(this);\n        ioctl.onSeeked = this._onIOSeeked.bind(this);\n        ioctl.onComplete = this._onIOComplete.bind(this);\n        ioctl.onRedirect = this._onIORedirect.bind(this);\n        ioctl.onRecoveredEarlyEof = this._onIORecoveredEarlyEof.bind(this);\n        if (optionalFrom) {\n            this._demuxer.bindDataSource(this._ioctl);\n        }\n        else {\n            ioctl.onDataArrival = this._onInitChunkArrival.bind(this);\n        }\n        ioctl.open(optionalFrom);\n    };\n    TransmuxingController.prototype.stop = function () {\n        this._internalAbort();\n        this._disableStatisticsReporter();\n    };\n    TransmuxingController.prototype._internalAbort = function () {\n        if (this._ioctl) {\n            this._ioctl.destroy();\n            this._ioctl = null;\n        }\n    };\n    TransmuxingController.prototype.pause = function () {\n        if (this._ioctl && this._ioctl.isWorking()) {\n            this._ioctl.pause();\n            this._disableStatisticsReporter();\n        }\n    };\n    TransmuxingController.prototype.resume = function () {\n        if (this._ioctl && this._ioctl.isPaused()) {\n            this._ioctl.resume();\n            this._enableStatisticsReporter();\n        }\n    };\n    TransmuxingController.prototype.seek = function (milliseconds) {\n        if (this._mediaInfo == null || !this._mediaInfo.isSeekable()) {\n            return;\n        }\n        var targetSegmentIndex = this._searchSegmentIndexContains(milliseconds);\n        if (targetSegmentIndex === this._currentSegmentIndex) {\n            // intra-segment seeking\n            var segmentInfo = this._mediaInfo.segments[targetSegmentIndex];\n            if (segmentInfo == undefined) {\n                // current segment loading started, but mediainfo hasn't received yet\n                // wait for the metadata loaded, then seek to expected position\n                this._pendingSeekTime = milliseconds;\n            }\n            else {\n                var keyframe = segmentInfo.getNearestKeyframe(milliseconds);\n                this._remuxer.seek(keyframe.milliseconds);\n                this._ioctl.seek(keyframe.fileposition);\n                // Will be resolved in _onRemuxerMediaSegmentArrival()\n                this._pendingResolveSeekPoint = keyframe.milliseconds;\n            }\n        }\n        else {\n            // cross-segment seeking\n            var targetSegmentInfo = this._mediaInfo.segments[targetSegmentIndex];\n            if (targetSegmentInfo == undefined) {\n                // target segment hasn't been loaded. We need metadata then seek to expected time\n                this._pendingSeekTime = milliseconds;\n                this._internalAbort();\n                this._remuxer.seek();\n                this._remuxer.insertDiscontinuity();\n                this._loadSegment(targetSegmentIndex);\n                // Here we wait for the metadata loaded, then seek to expected position\n            }\n            else {\n                // We have target segment's metadata, direct seek to target position\n                var keyframe = targetSegmentInfo.getNearestKeyframe(milliseconds);\n                this._internalAbort();\n                this._remuxer.seek(milliseconds);\n                this._remuxer.insertDiscontinuity();\n                this._demuxer.resetMediaInfo();\n                this._demuxer.timestampBase = this._mediaDataSource.segments[targetSegmentIndex].timestampBase;\n                this._loadSegment(targetSegmentIndex, keyframe.fileposition);\n                this._pendingResolveSeekPoint = keyframe.milliseconds;\n                this._reportSegmentMediaInfo(targetSegmentIndex);\n            }\n        }\n        this._enableStatisticsReporter();\n    };\n    TransmuxingController.prototype._searchSegmentIndexContains = function (milliseconds) {\n        var segments = this._mediaDataSource.segments;\n        var idx = segments.length - 1;\n        for (var i = 0; i < segments.length; i++) {\n            if (milliseconds < segments[i].timestampBase) {\n                idx = i - 1;\n                break;\n            }\n        }\n        return idx;\n    };\n    TransmuxingController.prototype._onInitChunkArrival = function (data, byteStart) {\n        var _this = this;\n        var probeData = null;\n        var consumed = 0;\n        if (byteStart > 0) {\n            // IOController seeked immediately after opened, byteStart > 0 callback may received\n            this._demuxer.bindDataSource(this._ioctl);\n            this._demuxer.timestampBase = this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase;\n            consumed = this._demuxer.parseChunks(data, byteStart);\n        }\n        else if ((probeData = _demux_flv_demuxer_js__WEBPACK_IMPORTED_MODULE_4__.default.probe(data)).match) {\n            // Always create new FLVDemuxer\n            this._demuxer = new _demux_flv_demuxer_js__WEBPACK_IMPORTED_MODULE_4__.default(probeData, this._config);\n            if (!this._remuxer) {\n                this._remuxer = new _remux_mp4_remuxer_js__WEBPACK_IMPORTED_MODULE_5__.default(this._config);\n            }\n            var mds = this._mediaDataSource;\n            if (mds.duration != undefined && !isNaN(mds.duration)) {\n                this._demuxer.overridedDuration = mds.duration;\n            }\n            if (typeof mds.hasAudio === 'boolean') {\n                this._demuxer.overridedHasAudio = mds.hasAudio;\n            }\n            if (typeof mds.hasVideo === 'boolean') {\n                this._demuxer.overridedHasVideo = mds.hasVideo;\n            }\n            this._demuxer.timestampBase = mds.segments[this._currentSegmentIndex].timestampBase;\n            this._demuxer.onError = this._onDemuxException.bind(this);\n            this._demuxer.onMediaInfo = this._onMediaInfo.bind(this);\n            this._demuxer.onMetaDataArrived = this._onMetaDataArrived.bind(this);\n            this._demuxer.onScriptDataArrived = this._onScriptDataArrived.bind(this);\n            this._remuxer.bindDataSource(this._demuxer\n                .bindDataSource(this._ioctl));\n            this._remuxer.onInitSegment = this._onRemuxerInitSegmentArrival.bind(this);\n            this._remuxer.onMediaSegment = this._onRemuxerMediaSegmentArrival.bind(this);\n            consumed = this._demuxer.parseChunks(data, byteStart);\n        }\n        else {\n            probeData = null;\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, 'Non-FLV, Unsupported media type!');\n            Promise.resolve().then(function () {\n                _this._internalAbort();\n            });\n            this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.DEMUX_ERROR, _demux_demux_errors_js__WEBPACK_IMPORTED_MODULE_6__.default.FORMAT_UNSUPPORTED, 'Non-FLV, Unsupported media type');\n            consumed = 0;\n        }\n        return consumed;\n    };\n    TransmuxingController.prototype._onMediaInfo = function (mediaInfo) {\n        var _this = this;\n        if (this._mediaInfo == null) {\n            // Store first segment's mediainfo as global mediaInfo\n            this._mediaInfo = Object.assign({}, mediaInfo);\n            this._mediaInfo.keyframesIndex = null;\n            this._mediaInfo.segments = [];\n            this._mediaInfo.segmentCount = this._mediaDataSource.segments.length;\n            Object.setPrototypeOf(this._mediaInfo, _media_info_js__WEBPACK_IMPORTED_MODULE_3__.default.prototype);\n        }\n        var segmentInfo = Object.assign({}, mediaInfo);\n        Object.setPrototypeOf(segmentInfo, _media_info_js__WEBPACK_IMPORTED_MODULE_3__.default.prototype);\n        this._mediaInfo.segments[this._currentSegmentIndex] = segmentInfo;\n        // notify mediaInfo update\n        this._reportSegmentMediaInfo(this._currentSegmentIndex);\n        if (this._pendingSeekTime != null) {\n            Promise.resolve().then(function () {\n                var target = _this._pendingSeekTime;\n                _this._pendingSeekTime = null;\n                _this.seek(target);\n            });\n        }\n    };\n    TransmuxingController.prototype._onMetaDataArrived = function (metadata) {\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.METADATA_ARRIVED, metadata);\n    };\n    TransmuxingController.prototype._onScriptDataArrived = function (data) {\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.SCRIPTDATA_ARRIVED, data);\n    };\n    TransmuxingController.prototype._onIOSeeked = function () {\n        this._remuxer.insertDiscontinuity();\n    };\n    TransmuxingController.prototype._onIOComplete = function (extraData) {\n        var segmentIndex = extraData;\n        var nextSegmentIndex = segmentIndex + 1;\n        if (nextSegmentIndex < this._mediaDataSource.segments.length) {\n            this._internalAbort();\n            this._remuxer.flushStashedSamples();\n            this._loadSegment(nextSegmentIndex);\n        }\n        else {\n            this._remuxer.flushStashedSamples();\n            this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.LOADING_COMPLETE);\n            this._disableStatisticsReporter();\n        }\n    };\n    TransmuxingController.prototype._onIORedirect = function (redirectedURL) {\n        var segmentIndex = this._ioctl.extraData;\n        this._mediaDataSource.segments[segmentIndex].redirectedURL = redirectedURL;\n    };\n    TransmuxingController.prototype._onIORecoveredEarlyEof = function () {\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.RECOVERED_EARLY_EOF);\n    };\n    TransmuxingController.prototype._onIOException = function (type, info) {\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, \"IOException: type = \" + type + \", code = \" + info.code + \", msg = \" + info.msg);\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.IO_ERROR, type, info);\n        this._disableStatisticsReporter();\n    };\n    TransmuxingController.prototype._onDemuxException = function (type, info) {\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.e(this.TAG, \"DemuxException: type = \" + type + \", info = \" + info);\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.DEMUX_ERROR, type, info);\n    };\n    TransmuxingController.prototype._onRemuxerInitSegmentArrival = function (type, initSegment) {\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.INIT_SEGMENT, type, initSegment);\n    };\n    TransmuxingController.prototype._onRemuxerMediaSegmentArrival = function (type, mediaSegment) {\n        if (this._pendingSeekTime != null) {\n            // Media segments after new-segment cross-seeking should be dropped.\n            return;\n        }\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.MEDIA_SEGMENT, type, mediaSegment);\n        // Resolve pending seekPoint\n        if (this._pendingResolveSeekPoint != null && type === 'video') {\n            var syncPoints = mediaSegment.info.syncPoints;\n            var seekpoint = this._pendingResolveSeekPoint;\n            this._pendingResolveSeekPoint = null;\n            // Safari: Pass PTS for recommend_seekpoint\n            if (_utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari && syncPoints.length > 0 && syncPoints[0].originalDts === seekpoint) {\n                seekpoint = syncPoints[0].pts;\n            }\n            // else: use original DTS (keyframe.milliseconds)\n            this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.RECOMMEND_SEEKPOINT, seekpoint);\n        }\n    };\n    TransmuxingController.prototype._enableStatisticsReporter = function () {\n        if (this._statisticsReporter == null) {\n            this._statisticsReporter = self.setInterval(this._reportStatisticsInfo.bind(this), this._config.statisticsInfoReportInterval);\n        }\n    };\n    TransmuxingController.prototype._disableStatisticsReporter = function () {\n        if (this._statisticsReporter) {\n            self.clearInterval(this._statisticsReporter);\n            this._statisticsReporter = null;\n        }\n    };\n    TransmuxingController.prototype._reportSegmentMediaInfo = function (segmentIndex) {\n        var segmentInfo = this._mediaInfo.segments[segmentIndex];\n        var exportInfo = Object.assign({}, segmentInfo);\n        exportInfo.duration = this._mediaInfo.duration;\n        exportInfo.segmentCount = this._mediaInfo.segmentCount;\n        delete exportInfo.segments;\n        delete exportInfo.keyframesIndex;\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.MEDIA_INFO, exportInfo);\n    };\n    TransmuxingController.prototype._reportStatisticsInfo = function () {\n        var info = {};\n        info.url = this._ioctl.currentURL;\n        info.hasRedirect = this._ioctl.hasRedirect;\n        if (info.hasRedirect) {\n            info.redirectedURL = this._ioctl.currentRedirectedURL;\n        }\n        info.speed = this._ioctl.currentSpeed;\n        info.loaderType = this._ioctl.loaderType;\n        info.currentSegmentIndex = this._currentSegmentIndex;\n        info.totalSegmentCount = this._mediaDataSource.segments.length;\n        this._emitter.emit(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_8__.default.STATISTICS_INFO, info);\n    };\n    return TransmuxingController;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (TransmuxingController);\n\n\n/***/ }),\n\n/***/ \"./src/core/transmuxing-events.js\":\n/*!****************************************!*\\\n  !*** ./src/core/transmuxing-events.js ***!\n  \\****************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TransmuxingEvents = {\n    IO_ERROR: 'io_error',\n    DEMUX_ERROR: 'demux_error',\n    INIT_SEGMENT: 'init_segment',\n    MEDIA_SEGMENT: 'media_segment',\n    LOADING_COMPLETE: 'loading_complete',\n    RECOVERED_EARLY_EOF: 'recovered_early_eof',\n    MEDIA_INFO: 'media_info',\n    METADATA_ARRIVED: 'metadata_arrived',\n    SCRIPTDATA_ARRIVED: 'scriptdata_arrived',\n    STATISTICS_INFO: 'statistics_info',\n    RECOMMEND_SEEKPOINT: 'recommend_seekpoint'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (TransmuxingEvents);\n\n\n/***/ }),\n\n/***/ \"./src/core/transmuxing-worker.js\":\n/*!****************************************!*\\\n  !*** ./src/core/transmuxing-worker.js ***!\n  \\****************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logging-control.js */ \"./src/utils/logging-control.js\");\n/* harmony import */ var _utils_polyfill_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/polyfill.js */ \"./src/utils/polyfill.js\");\n/* harmony import */ var _transmuxing_controller_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transmuxing-controller.js */ \"./src/core/transmuxing-controller.js\");\n/* harmony import */ var _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./transmuxing-events.js */ \"./src/core/transmuxing-events.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n/* post message to worker:\n   data: {\n       cmd: string\n       param: any\n   }\n\n   receive message from worker:\n   data: {\n       msg: string,\n       data: any\n   }\n */\nvar TransmuxingWorker = function (self) {\n    var TAG = 'TransmuxingWorker';\n    var controller = null;\n    var logcatListener = onLogcatCallback.bind(this);\n    _utils_polyfill_js__WEBPACK_IMPORTED_MODULE_1__.default.install();\n    self.addEventListener('message', function (e) {\n        switch (e.data.cmd) {\n            case 'init':\n                controller = new _transmuxing_controller_js__WEBPACK_IMPORTED_MODULE_2__.default(e.data.param[0], e.data.param[1]);\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.IO_ERROR, onIOError.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.DEMUX_ERROR, onDemuxError.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.INIT_SEGMENT, onInitSegment.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_SEGMENT, onMediaSegment.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.LOADING_COMPLETE, onLoadingComplete.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.RECOVERED_EARLY_EOF, onRecoveredEarlyEof.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_INFO, onMediaInfo.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.METADATA_ARRIVED, onMetaDataArrived.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.SCRIPTDATA_ARRIVED, onScriptDataArrived.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.STATISTICS_INFO, onStatisticsInfo.bind(this));\n                controller.on(_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.RECOMMEND_SEEKPOINT, onRecommendSeekpoint.bind(this));\n                break;\n            case 'destroy':\n                if (controller) {\n                    controller.destroy();\n                    controller = null;\n                }\n                self.postMessage({ msg: 'destroyed' });\n                break;\n            case 'start':\n                controller.start();\n                break;\n            case 'stop':\n                controller.stop();\n                break;\n            case 'seek':\n                controller.seek(e.data.param);\n                break;\n            case 'pause':\n                controller.pause();\n                break;\n            case 'resume':\n                controller.resume();\n                break;\n            case 'logging_config': {\n                var config = e.data.param;\n                _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_0__.default.applyConfig(config);\n                if (config.enableCallback === true) {\n                    _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_0__.default.addLogListener(logcatListener);\n                }\n                else {\n                    _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_0__.default.removeLogListener(logcatListener);\n                }\n                break;\n            }\n        }\n    });\n    function onInitSegment(type, initSegment) {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.INIT_SEGMENT,\n            data: {\n                type: type,\n                data: initSegment\n            }\n        };\n        self.postMessage(obj, [initSegment.data]); // data: ArrayBuffer\n    }\n    function onMediaSegment(type, mediaSegment) {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_SEGMENT,\n            data: {\n                type: type,\n                data: mediaSegment\n            }\n        };\n        self.postMessage(obj, [mediaSegment.data]); // data: ArrayBuffer\n    }\n    function onLoadingComplete() {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.LOADING_COMPLETE\n        };\n        self.postMessage(obj);\n    }\n    function onRecoveredEarlyEof() {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.RECOVERED_EARLY_EOF\n        };\n        self.postMessage(obj);\n    }\n    function onMediaInfo(mediaInfo) {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_INFO,\n            data: mediaInfo\n        };\n        self.postMessage(obj);\n    }\n    function onMetaDataArrived(metadata) {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.METADATA_ARRIVED,\n            data: metadata\n        };\n        self.postMessage(obj);\n    }\n    function onScriptDataArrived(data) {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.SCRIPTDATA_ARRIVED,\n            data: data\n        };\n        self.postMessage(obj);\n    }\n    function onStatisticsInfo(statInfo) {\n        var obj = {\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.STATISTICS_INFO,\n            data: statInfo\n        };\n        self.postMessage(obj);\n    }\n    function onIOError(type, info) {\n        self.postMessage({\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.IO_ERROR,\n            data: {\n                type: type,\n                info: info\n            }\n        });\n    }\n    function onDemuxError(type, info) {\n        self.postMessage({\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.DEMUX_ERROR,\n            data: {\n                type: type,\n                info: info\n            }\n        });\n    }\n    function onRecommendSeekpoint(milliseconds) {\n        self.postMessage({\n            msg: _transmuxing_events_js__WEBPACK_IMPORTED_MODULE_3__.default.RECOMMEND_SEEKPOINT,\n            data: milliseconds\n        });\n    }\n    function onLogcatCallback(type, str) {\n        self.postMessage({\n            msg: 'logcat_callback',\n            data: {\n                type: type,\n                logcat: str\n            }\n        });\n    }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (TransmuxingWorker);\n\n\n/***/ }),\n\n/***/ \"./src/demux/amf-parser.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/amf-parser.js ***!\n  \\*********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _utils_utf8_conv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/utf8-conv.js */ \"./src/utils/utf8-conv.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\nvar le = (function () {\n    var buf = new ArrayBuffer(2);\n    (new DataView(buf)).setInt16(0, 256, true); // little-endian write\n    return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE\n})();\nvar AMF = /** @class */ (function () {\n    function AMF() {\n    }\n    AMF.parseScriptData = function (arrayBuffer, dataOffset, dataSize) {\n        var data = {};\n        try {\n            var name_1 = AMF.parseValue(arrayBuffer, dataOffset, dataSize);\n            var value = AMF.parseValue(arrayBuffer, dataOffset + name_1.size, dataSize - name_1.size);\n            data[name_1.data] = value.data;\n        }\n        catch (e) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.e('AMF', e.toString());\n        }\n        return data;\n    };\n    AMF.parseObject = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize < 3) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.IllegalStateException('Data not enough when parse ScriptDataObject');\n        }\n        var name = AMF.parseString(arrayBuffer, dataOffset, dataSize);\n        var value = AMF.parseValue(arrayBuffer, dataOffset + name.size, dataSize - name.size);\n        var isObjectEnd = value.objectEnd;\n        return {\n            data: {\n                name: name.data,\n                value: value.data\n            },\n            size: name.size + value.size,\n            objectEnd: isObjectEnd\n        };\n    };\n    AMF.parseVariable = function (arrayBuffer, dataOffset, dataSize) {\n        return AMF.parseObject(arrayBuffer, dataOffset, dataSize);\n    };\n    AMF.parseString = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize < 2) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.IllegalStateException('Data not enough when parse String');\n        }\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var length = v.getUint16(0, !le);\n        var str;\n        if (length > 0) {\n            str = (0,_utils_utf8_conv_js__WEBPACK_IMPORTED_MODULE_1__.default)(new Uint8Array(arrayBuffer, dataOffset + 2, length));\n        }\n        else {\n            str = '';\n        }\n        return {\n            data: str,\n            size: 2 + length\n        };\n    };\n    AMF.parseLongString = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize < 4) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.IllegalStateException('Data not enough when parse LongString');\n        }\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var length = v.getUint32(0, !le);\n        var str;\n        if (length > 0) {\n            str = (0,_utils_utf8_conv_js__WEBPACK_IMPORTED_MODULE_1__.default)(new Uint8Array(arrayBuffer, dataOffset + 4, length));\n        }\n        else {\n            str = '';\n        }\n        return {\n            data: str,\n            size: 4 + length\n        };\n    };\n    AMF.parseDate = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize < 10) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.IllegalStateException('Data size invalid when parse Date');\n        }\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var timestamp = v.getFloat64(0, !le);\n        var localTimeOffset = v.getInt16(8, !le);\n        timestamp += localTimeOffset * 60 * 1000; // get UTC time\n        return {\n            data: new Date(timestamp),\n            size: 8 + 2\n        };\n    };\n    AMF.parseValue = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize < 1) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.IllegalStateException('Data not enough when parse Value');\n        }\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var offset = 1;\n        var type = v.getUint8(0);\n        var value;\n        var objectEnd = false;\n        try {\n            switch (type) {\n                case 0: // Number(Double) type\n                    value = v.getFloat64(1, !le);\n                    offset += 8;\n                    break;\n                case 1: { // Boolean type\n                    var b = v.getUint8(1);\n                    value = b ? true : false;\n                    offset += 1;\n                    break;\n                }\n                case 2: { // String type\n                    var amfstr = AMF.parseString(arrayBuffer, dataOffset + 1, dataSize - 1);\n                    value = amfstr.data;\n                    offset += amfstr.size;\n                    break;\n                }\n                case 3: { // Object(s) type\n                    value = {};\n                    var terminal = 0; // workaround for malformed Objects which has missing ScriptDataObjectEnd\n                    if ((v.getUint32(dataSize - 4, !le) & 0x00FFFFFF) === 9) {\n                        terminal = 3;\n                    }\n                    while (offset < dataSize - 4) { // 4 === type(UI8) + ScriptDataObjectEnd(UI24)\n                        var amfobj = AMF.parseObject(arrayBuffer, dataOffset + offset, dataSize - offset - terminal);\n                        if (amfobj.objectEnd)\n                            break;\n                        value[amfobj.data.name] = amfobj.data.value;\n                        offset += amfobj.size;\n                    }\n                    if (offset <= dataSize - 3) {\n                        var marker = v.getUint32(offset - 1, !le) & 0x00FFFFFF;\n                        if (marker === 9) {\n                            offset += 3;\n                        }\n                    }\n                    break;\n                }\n                case 8: { // ECMA array type (Mixed array)\n                    value = {};\n                    offset += 4; // ECMAArrayLength(UI32)\n                    var terminal = 0; // workaround for malformed MixedArrays which has missing ScriptDataObjectEnd\n                    if ((v.getUint32(dataSize - 4, !le) & 0x00FFFFFF) === 9) {\n                        terminal = 3;\n                    }\n                    while (offset < dataSize - 8) { // 8 === type(UI8) + ECMAArrayLength(UI32) + ScriptDataVariableEnd(UI24)\n                        var amfvar = AMF.parseVariable(arrayBuffer, dataOffset + offset, dataSize - offset - terminal);\n                        if (amfvar.objectEnd)\n                            break;\n                        value[amfvar.data.name] = amfvar.data.value;\n                        offset += amfvar.size;\n                    }\n                    if (offset <= dataSize - 3) {\n                        var marker = v.getUint32(offset - 1, !le) & 0x00FFFFFF;\n                        if (marker === 9) {\n                            offset += 3;\n                        }\n                    }\n                    break;\n                }\n                case 9: // ScriptDataObjectEnd\n                    value = undefined;\n                    offset = 1;\n                    objectEnd = true;\n                    break;\n                case 10: { // Strict array type\n                    // ScriptDataValue[n]. NOTE: according to video_file_format_spec_v10_1.pdf\n                    value = [];\n                    var strictArrayLength = v.getUint32(1, !le);\n                    offset += 4;\n                    for (var i = 0; i < strictArrayLength; i++) {\n                        var val = AMF.parseValue(arrayBuffer, dataOffset + offset, dataSize - offset);\n                        value.push(val.data);\n                        offset += val.size;\n                    }\n                    break;\n                }\n                case 11: { // Date type\n                    var date = AMF.parseDate(arrayBuffer, dataOffset + 1, dataSize - 1);\n                    value = date.data;\n                    offset += date.size;\n                    break;\n                }\n                case 12: { // Long string type\n                    var amfLongStr = AMF.parseString(arrayBuffer, dataOffset + 1, dataSize - 1);\n                    value = amfLongStr.data;\n                    offset += amfLongStr.size;\n                    break;\n                }\n                default:\n                    // ignore and skip\n                    offset = dataSize;\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w('AMF', 'Unsupported AMF value type ' + type);\n            }\n        }\n        catch (e) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.e('AMF', e.toString());\n        }\n        return {\n            data: value,\n            size: offset,\n            objectEnd: objectEnd\n        };\n    };\n    return AMF;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (AMF);\n\n\n/***/ }),\n\n/***/ \"./src/demux/demux-errors.js\":\n/*!***********************************!*\\\n  !*** ./src/demux/demux-errors.js ***!\n  \\***********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar DemuxErrors = {\n    OK: 'OK',\n    FORMAT_ERROR: 'FormatError',\n    FORMAT_UNSUPPORTED: 'FormatUnsupported',\n    CODEC_UNSUPPORTED: 'CodecUnsupported'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (DemuxErrors);\n\n\n/***/ }),\n\n/***/ \"./src/demux/exp-golomb.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/exp-golomb.js ***!\n  \\*********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Exponential-Golomb buffer decoder\nvar ExpGolomb = /** @class */ (function () {\n    function ExpGolomb(uint8array) {\n        this.TAG = 'ExpGolomb';\n        this._buffer = uint8array;\n        this._buffer_index = 0;\n        this._total_bytes = uint8array.byteLength;\n        this._total_bits = uint8array.byteLength * 8;\n        this._current_word = 0;\n        this._current_word_bits_left = 0;\n    }\n    ExpGolomb.prototype.destroy = function () {\n        this._buffer = null;\n    };\n    ExpGolomb.prototype._fillCurrentWord = function () {\n        var buffer_bytes_left = this._total_bytes - this._buffer_index;\n        if (buffer_bytes_left <= 0)\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_0__.IllegalStateException('ExpGolomb: _fillCurrentWord() but no bytes available');\n        var bytes_read = Math.min(4, buffer_bytes_left);\n        var word = new Uint8Array(4);\n        word.set(this._buffer.subarray(this._buffer_index, this._buffer_index + bytes_read));\n        this._current_word = new DataView(word.buffer).getUint32(0, false);\n        this._buffer_index += bytes_read;\n        this._current_word_bits_left = bytes_read * 8;\n    };\n    ExpGolomb.prototype.readBits = function (bits) {\n        if (bits > 32)\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_0__.InvalidArgumentException('ExpGolomb: readBits() bits exceeded max 32bits!');\n        if (bits <= this._current_word_bits_left) {\n            var result_1 = this._current_word >>> (32 - bits);\n            this._current_word <<= bits;\n            this._current_word_bits_left -= bits;\n            return result_1;\n        }\n        var result = this._current_word_bits_left ? this._current_word : 0;\n        result = result >>> (32 - this._current_word_bits_left);\n        var bits_need_left = bits - this._current_word_bits_left;\n        this._fillCurrentWord();\n        var bits_read_next = Math.min(bits_need_left, this._current_word_bits_left);\n        var result2 = this._current_word >>> (32 - bits_read_next);\n        this._current_word <<= bits_read_next;\n        this._current_word_bits_left -= bits_read_next;\n        result = (result << bits_read_next) | result2;\n        return result;\n    };\n    ExpGolomb.prototype.readBool = function () {\n        return this.readBits(1) === 1;\n    };\n    ExpGolomb.prototype.readByte = function () {\n        return this.readBits(8);\n    };\n    ExpGolomb.prototype._skipLeadingZero = function () {\n        var zero_count;\n        for (zero_count = 0; zero_count < this._current_word_bits_left; zero_count++) {\n            if (0 !== (this._current_word & (0x80000000 >>> zero_count))) {\n                this._current_word <<= zero_count;\n                this._current_word_bits_left -= zero_count;\n                return zero_count;\n            }\n        }\n        this._fillCurrentWord();\n        return zero_count + this._skipLeadingZero();\n    };\n    ExpGolomb.prototype.readUEG = function () {\n        var leading_zeros = this._skipLeadingZero();\n        return this.readBits(leading_zeros + 1) - 1;\n    };\n    ExpGolomb.prototype.readSEG = function () {\n        var value = this.readUEG();\n        if (value & 0x01) {\n            return (value + 1) >>> 1;\n        }\n        else {\n            return -1 * (value >>> 1);\n        }\n    };\n    return ExpGolomb;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (ExpGolomb);\n\n\n/***/ }),\n\n/***/ \"./src/demux/flv-demuxer.js\":\n/*!**********************************!*\\\n  !*** ./src/demux/flv-demuxer.js ***!\n  \\**********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _amf_parser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./amf-parser.js */ \"./src/demux/amf-parser.js\");\n/* harmony import */ var _sps_parser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sps-parser.js */ \"./src/demux/sps-parser.js\");\n/* harmony import */ var _demux_errors_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./demux-errors.js */ \"./src/demux/demux-errors.js\");\n/* harmony import */ var _core_media_info_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/media-info.js */ \"./src/core/media-info.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\nfunction Swap16(src) {\n    return (((src >>> 8) & 0xFF) |\n        ((src & 0xFF) << 8));\n}\nfunction Swap32(src) {\n    return (((src & 0xFF000000) >>> 24) |\n        ((src & 0x00FF0000) >>> 8) |\n        ((src & 0x0000FF00) << 8) |\n        ((src & 0x000000FF) << 24));\n}\nfunction ReadBig32(array, index) {\n    return ((array[index] << 24) |\n        (array[index + 1] << 16) |\n        (array[index + 2] << 8) |\n        (array[index + 3]));\n}\nvar FLVDemuxer = /** @class */ (function () {\n    function FLVDemuxer(probeData, config) {\n        this.TAG = 'FLVDemuxer';\n        this._config = config;\n        this._onError = null;\n        this._onMediaInfo = null;\n        this._onMetaDataArrived = null;\n        this._onScriptDataArrived = null;\n        this._onTrackMetadata = null;\n        this._onDataAvailable = null;\n        this._dataOffset = probeData.dataOffset;\n        this._firstParse = true;\n        this._dispatch = false;\n        this._hasAudio = probeData.hasAudioTrack;\n        this._hasVideo = probeData.hasVideoTrack;\n        this._hasAudioFlagOverrided = false;\n        this._hasVideoFlagOverrided = false;\n        this._audioInitialMetadataDispatched = false;\n        this._videoInitialMetadataDispatched = false;\n        this._mediaInfo = new _core_media_info_js__WEBPACK_IMPORTED_MODULE_4__.default();\n        this._mediaInfo.hasAudio = this._hasAudio;\n        this._mediaInfo.hasVideo = this._hasVideo;\n        this._metadata = null;\n        this._audioMetadata = null;\n        this._videoMetadata = null;\n        this._naluLengthSize = 4;\n        this._timestampBase = 0; // int32, in milliseconds\n        this._timescale = 1000;\n        this._duration = 0; // int32, in milliseconds\n        this._durationOverrided = false;\n        this._referenceFrameRate = {\n            fixed: true,\n            fps: 23.976,\n            fps_num: 23976,\n            fps_den: 1000\n        };\n        this._flvSoundRateTable = [5500, 11025, 22050, 44100, 48000];\n        this._mpegSamplingRates = [\n            96000, 88200, 64000, 48000, 44100, 32000,\n            24000, 22050, 16000, 12000, 11025, 8000, 7350\n        ];\n        this._mpegAudioV10SampleRateTable = [44100, 48000, 32000, 0];\n        this._mpegAudioV20SampleRateTable = [22050, 24000, 16000, 0];\n        this._mpegAudioV25SampleRateTable = [11025, 12000, 8000, 0];\n        this._mpegAudioL1BitRateTable = [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1];\n        this._mpegAudioL2BitRateTable = [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1];\n        this._mpegAudioL3BitRateTable = [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1];\n        this._videoTrack = { type: 'video', id: 1, sequenceNumber: 0, samples: [], length: 0 };\n        this._audioTrack = { type: 'audio', id: 2, sequenceNumber: 0, samples: [], length: 0 };\n        this._littleEndian = (function () {\n            var buf = new ArrayBuffer(2);\n            (new DataView(buf)).setInt16(0, 256, true); // little-endian write\n            return (new Int16Array(buf))[0] === 256; // platform-spec read, if equal then LE\n        })();\n    }\n    FLVDemuxer.prototype.destroy = function () {\n        this._mediaInfo = null;\n        this._metadata = null;\n        this._audioMetadata = null;\n        this._videoMetadata = null;\n        this._videoTrack = null;\n        this._audioTrack = null;\n        this._onError = null;\n        this._onMediaInfo = null;\n        this._onMetaDataArrived = null;\n        this._onScriptDataArrived = null;\n        this._onTrackMetadata = null;\n        this._onDataAvailable = null;\n    };\n    FLVDemuxer.probe = function (buffer) {\n        var data = new Uint8Array(buffer);\n        var mismatch = { match: false };\n        if (data[0] !== 0x46 || data[1] !== 0x4C || data[2] !== 0x56 || data[3] !== 0x01) {\n            return mismatch;\n        }\n        var hasAudio = ((data[4] & 4) >>> 2) !== 0;\n        var hasVideo = (data[4] & 1) !== 0;\n        var offset = ReadBig32(data, 5);\n        if (offset < 9) {\n            return mismatch;\n        }\n        return {\n            match: true,\n            consumed: offset,\n            dataOffset: offset,\n            hasAudioTrack: hasAudio,\n            hasVideoTrack: hasVideo\n        };\n    };\n    FLVDemuxer.prototype.bindDataSource = function (loader) {\n        loader.onDataArrival = this.parseChunks.bind(this);\n        return this;\n    };\n    Object.defineProperty(FLVDemuxer.prototype, \"onTrackMetadata\", {\n        // prototype: function(type: string, metadata: any): void\n        get: function () {\n            return this._onTrackMetadata;\n        },\n        set: function (callback) {\n            this._onTrackMetadata = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"onMediaInfo\", {\n        // prototype: function(mediaInfo: MediaInfo): void\n        get: function () {\n            return this._onMediaInfo;\n        },\n        set: function (callback) {\n            this._onMediaInfo = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"onMetaDataArrived\", {\n        get: function () {\n            return this._onMetaDataArrived;\n        },\n        set: function (callback) {\n            this._onMetaDataArrived = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"onScriptDataArrived\", {\n        get: function () {\n            return this._onScriptDataArrived;\n        },\n        set: function (callback) {\n            this._onScriptDataArrived = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"onError\", {\n        // prototype: function(type: number, info: string): void\n        get: function () {\n            return this._onError;\n        },\n        set: function (callback) {\n            this._onError = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"onDataAvailable\", {\n        // prototype: function(videoTrack: any, audioTrack: any): void\n        get: function () {\n            return this._onDataAvailable;\n        },\n        set: function (callback) {\n            this._onDataAvailable = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"timestampBase\", {\n        // timestamp base for output samples, must be in milliseconds\n        get: function () {\n            return this._timestampBase;\n        },\n        set: function (base) {\n            this._timestampBase = base;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"overridedDuration\", {\n        get: function () {\n            return this._duration;\n        },\n        // Force-override media duration. Must be in milliseconds, int32\n        set: function (duration) {\n            this._durationOverrided = true;\n            this._duration = duration;\n            this._mediaInfo.duration = duration;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"overridedHasAudio\", {\n        // Force-override audio track present flag, boolean\n        set: function (hasAudio) {\n            this._hasAudioFlagOverrided = true;\n            this._hasAudio = hasAudio;\n            this._mediaInfo.hasAudio = hasAudio;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FLVDemuxer.prototype, \"overridedHasVideo\", {\n        // Force-override video track present flag, boolean\n        set: function (hasVideo) {\n            this._hasVideoFlagOverrided = true;\n            this._hasVideo = hasVideo;\n            this._mediaInfo.hasVideo = hasVideo;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    FLVDemuxer.prototype.resetMediaInfo = function () {\n        this._mediaInfo = new _core_media_info_js__WEBPACK_IMPORTED_MODULE_4__.default();\n    };\n    FLVDemuxer.prototype._isInitialMetadataDispatched = function () {\n        if (this._hasAudio && this._hasVideo) { // both audio & video\n            return this._audioInitialMetadataDispatched && this._videoInitialMetadataDispatched;\n        }\n        if (this._hasAudio && !this._hasVideo) { // audio only\n            return this._audioInitialMetadataDispatched;\n        }\n        if (!this._hasAudio && this._hasVideo) { // video only\n            return this._videoInitialMetadataDispatched;\n        }\n        return false;\n    };\n    // function parseChunks(chunk: ArrayBuffer, byteStart: number): number;\n    FLVDemuxer.prototype.parseChunks = function (chunk, byteStart) {\n        if (!this._onError || !this._onMediaInfo || !this._onTrackMetadata || !this._onDataAvailable) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__.IllegalStateException('Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified');\n        }\n        var offset = 0;\n        var le = this._littleEndian;\n        if (byteStart === 0) { // buffer with FLV header\n            if (chunk.byteLength > 13) {\n                var probeData = FLVDemuxer.probe(chunk);\n                offset = probeData.dataOffset;\n            }\n            else {\n                return 0;\n            }\n        }\n        if (this._firstParse) { // handle PreviousTagSize0 before Tag1\n            this._firstParse = false;\n            if (byteStart + offset !== this._dataOffset) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'First time parsing but chunk byteStart invalid!');\n            }\n            var v = new DataView(chunk, offset);\n            var prevTagSize0 = v.getUint32(0, !le);\n            if (prevTagSize0 !== 0) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'PrevTagSize0 !== 0 !!!');\n            }\n            offset += 4;\n        }\n        while (offset < chunk.byteLength) {\n            this._dispatch = true;\n            var v = new DataView(chunk, offset);\n            if (offset + 11 + 4 > chunk.byteLength) {\n                // data not enough for parsing an flv tag\n                break;\n            }\n            var tagType = v.getUint8(0);\n            var dataSize = v.getUint32(0, !le) & 0x00FFFFFF;\n            if (offset + 11 + dataSize + 4 > chunk.byteLength) {\n                // data not enough for parsing actual data body\n                break;\n            }\n            if (tagType !== 8 && tagType !== 9 && tagType !== 18) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Unsupported tag type \" + tagType + \", skipped\");\n                // consume the whole tag (skip it)\n                offset += 11 + dataSize + 4;\n                continue;\n            }\n            var ts2 = v.getUint8(4);\n            var ts1 = v.getUint8(5);\n            var ts0 = v.getUint8(6);\n            var ts3 = v.getUint8(7);\n            var timestamp = ts0 | (ts1 << 8) | (ts2 << 16) | (ts3 << 24);\n            var streamId = v.getUint32(7, !le) & 0x00FFFFFF;\n            if (streamId !== 0) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Meet tag which has StreamID != 0!');\n            }\n            var dataOffset = offset + 11;\n            switch (tagType) {\n                case 8: // Audio\n                    this._parseAudioData(chunk, dataOffset, dataSize, timestamp);\n                    break;\n                case 9: // Video\n                    this._parseVideoData(chunk, dataOffset, dataSize, timestamp, byteStart + offset);\n                    break;\n                case 18: // ScriptDataObject\n                    this._parseScriptData(chunk, dataOffset, dataSize);\n                    break;\n            }\n            var prevTagSize = v.getUint32(11 + dataSize, !le);\n            if (prevTagSize !== 11 + dataSize) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Invalid PrevTagSize \" + prevTagSize);\n            }\n            offset += 11 + dataSize + 4; // tagBody + dataSize + prevTagSize\n        }\n        // dispatch parsed frames to consumer (typically, the remuxer)\n        if (this._isInitialMetadataDispatched()) {\n            if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) {\n                this._onDataAvailable(this._audioTrack, this._videoTrack);\n            }\n        }\n        return offset; // consumed bytes, just equals latest offset index\n    };\n    FLVDemuxer.prototype._parseScriptData = function (arrayBuffer, dataOffset, dataSize) {\n        var scriptData = _amf_parser_js__WEBPACK_IMPORTED_MODULE_1__.default.parseScriptData(arrayBuffer, dataOffset, dataSize);\n        if (scriptData.hasOwnProperty('onMetaData')) {\n            if (scriptData.onMetaData == null || typeof scriptData.onMetaData !== 'object') {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Invalid onMetaData structure!');\n                return;\n            }\n            if (this._metadata) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Found another onMetaData tag!');\n            }\n            this._metadata = scriptData;\n            var onMetaData = this._metadata.onMetaData;\n            if (this._onMetaDataArrived) {\n                this._onMetaDataArrived(Object.assign({}, onMetaData));\n            }\n            if (typeof onMetaData.hasAudio === 'boolean') { // hasAudio\n                if (this._hasAudioFlagOverrided === false) {\n                    this._hasAudio = onMetaData.hasAudio;\n                    this._mediaInfo.hasAudio = this._hasAudio;\n                }\n            }\n            if (typeof onMetaData.hasVideo === 'boolean') { // hasVideo\n                if (this._hasVideoFlagOverrided === false) {\n                    this._hasVideo = onMetaData.hasVideo;\n                    this._mediaInfo.hasVideo = this._hasVideo;\n                }\n            }\n            if (typeof onMetaData.audiodatarate === 'number') { // audiodatarate\n                this._mediaInfo.audioDataRate = onMetaData.audiodatarate;\n            }\n            if (typeof onMetaData.videodatarate === 'number') { // videodatarate\n                this._mediaInfo.videoDataRate = onMetaData.videodatarate;\n            }\n            if (typeof onMetaData.width === 'number') { // width\n                this._mediaInfo.width = onMetaData.width;\n            }\n            if (typeof onMetaData.height === 'number') { // height\n                this._mediaInfo.height = onMetaData.height;\n            }\n            if (typeof onMetaData.duration === 'number') { // duration\n                if (!this._durationOverrided) {\n                    var duration = Math.floor(onMetaData.duration * this._timescale);\n                    this._duration = duration;\n                    this._mediaInfo.duration = duration;\n                }\n            }\n            else {\n                this._mediaInfo.duration = 0;\n            }\n            if (typeof onMetaData.framerate === 'number') { // framerate\n                var fps_num = Math.floor(onMetaData.framerate * 1000);\n                if (fps_num > 0) {\n                    var fps = fps_num / 1000;\n                    this._referenceFrameRate.fixed = true;\n                    this._referenceFrameRate.fps = fps;\n                    this._referenceFrameRate.fps_num = fps_num;\n                    this._referenceFrameRate.fps_den = 1000;\n                    this._mediaInfo.fps = fps;\n                }\n            }\n            if (typeof onMetaData.keyframes === 'object') { // keyframes\n                this._mediaInfo.hasKeyframesIndex = true;\n                var keyframes = onMetaData.keyframes;\n                this._mediaInfo.keyframesIndex = this._parseKeyframesIndex(keyframes);\n                onMetaData.keyframes = null; // keyframes has been extracted, remove it\n            }\n            else {\n                this._mediaInfo.hasKeyframesIndex = false;\n            }\n            this._dispatch = false;\n            this._mediaInfo.metadata = onMetaData;\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.v(this.TAG, 'Parsed onMetaData');\n            if (this._mediaInfo.isComplete()) {\n                this._onMediaInfo(this._mediaInfo);\n            }\n        }\n        if (Object.keys(scriptData).length > 0) {\n            if (this._onScriptDataArrived) {\n                this._onScriptDataArrived(Object.assign({}, scriptData));\n            }\n        }\n    };\n    FLVDemuxer.prototype._parseKeyframesIndex = function (keyframes) {\n        var times = [];\n        var filepositions = [];\n        // ignore first keyframe which is actually AVC Sequence Header (AVCDecoderConfigurationRecord)\n        for (var i = 1; i < keyframes.times.length; i++) {\n            var time = this._timestampBase + Math.floor(keyframes.times[i] * 1000);\n            times.push(time);\n            filepositions.push(keyframes.filepositions[i]);\n        }\n        return {\n            times: times,\n            filepositions: filepositions\n        };\n    };\n    FLVDemuxer.prototype._parseAudioData = function (arrayBuffer, dataOffset, dataSize, tagTimestamp) {\n        if (dataSize <= 1) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Flv: Invalid audio packet, missing SoundData payload!');\n            return;\n        }\n        if (this._hasAudioFlagOverrided === true && this._hasAudio === false) {\n            // If hasAudio: false indicated explicitly in MediaDataSource,\n            // Ignore all the audio packets\n            return;\n        }\n        var le = this._littleEndian;\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var soundSpec = v.getUint8(0);\n        var soundFormat = soundSpec >>> 4;\n        if (soundFormat !== 2 && soundFormat !== 10) { // MP3 or AAC\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.CODEC_UNSUPPORTED, 'Flv: Unsupported audio codec idx: ' + soundFormat);\n            return;\n        }\n        var soundRate = 0;\n        var soundRateIndex = (soundSpec & 12) >>> 2;\n        if (soundRateIndex >= 0 && soundRateIndex <= 4) {\n            soundRate = this._flvSoundRateTable[soundRateIndex];\n        }\n        else {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, 'Flv: Invalid audio sample rate idx: ' + soundRateIndex);\n            return;\n        }\n        var soundSize = (soundSpec & 2) >>> 1; // unused\n        var soundType = (soundSpec & 1);\n        var meta = this._audioMetadata;\n        var track = this._audioTrack;\n        if (!meta) {\n            if (this._hasAudio === false && this._hasAudioFlagOverrided === false) {\n                this._hasAudio = true;\n                this._mediaInfo.hasAudio = true;\n            }\n            // initial metadata\n            meta = this._audioMetadata = {};\n            meta.type = 'audio';\n            meta.id = track.id;\n            meta.timescale = this._timescale;\n            meta.duration = this._duration;\n            meta.audioSampleRate = soundRate;\n            meta.channelCount = (soundType === 0 ? 1 : 2);\n        }\n        if (soundFormat === 10) { // AAC\n            var aacData = this._parseAACAudioData(arrayBuffer, dataOffset + 1, dataSize - 1);\n            if (aacData == undefined) {\n                return;\n            }\n            if (aacData.packetType === 0) { // AAC sequence header (AudioSpecificConfig)\n                if (meta.config) {\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Found another AudioSpecificConfig!');\n                }\n                var misc = aacData.data;\n                meta.audioSampleRate = misc.samplingRate;\n                meta.channelCount = misc.channelCount;\n                meta.codec = misc.codec;\n                meta.originalCodec = misc.originalCodec;\n                meta.config = misc.config;\n                // The decode result of an aac sample is 1024 PCM samples\n                meta.refSampleDuration = 1024 / meta.audioSampleRate * meta.timescale;\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.v(this.TAG, 'Parsed AudioSpecificConfig');\n                if (this._isInitialMetadataDispatched()) {\n                    // Non-initial metadata, force dispatch (or flush) parsed frames to remuxer\n                    if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) {\n                        this._onDataAvailable(this._audioTrack, this._videoTrack);\n                    }\n                }\n                else {\n                    this._audioInitialMetadataDispatched = true;\n                }\n                // then notify new metadata\n                this._dispatch = false;\n                this._onTrackMetadata('audio', meta);\n                var mi = this._mediaInfo;\n                mi.audioCodec = meta.originalCodec;\n                mi.audioSampleRate = meta.audioSampleRate;\n                mi.audioChannelCount = meta.channelCount;\n                if (mi.hasVideo) {\n                    if (mi.videoCodec != null) {\n                        mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + ',' + mi.audioCodec + '\"';\n                    }\n                }\n                else {\n                    mi.mimeType = 'video/x-flv; codecs=\"' + mi.audioCodec + '\"';\n                }\n                if (mi.isComplete()) {\n                    this._onMediaInfo(mi);\n                }\n            }\n            else if (aacData.packetType === 1) { // AAC raw frame data\n                var dts = this._timestampBase + tagTimestamp;\n                var aacSample = { unit: aacData.data, length: aacData.data.byteLength, dts: dts, pts: dts };\n                track.samples.push(aacSample);\n                track.length += aacData.data.length;\n            }\n            else {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.e(this.TAG, \"Flv: Unsupported AAC data type \" + aacData.packetType);\n            }\n        }\n        else if (soundFormat === 2) { // MP3\n            if (!meta.codec) {\n                // We need metadata for mp3 audio track, extract info from frame header\n                var misc = this._parseMP3AudioData(arrayBuffer, dataOffset + 1, dataSize - 1, true);\n                if (misc == undefined) {\n                    return;\n                }\n                meta.audioSampleRate = misc.samplingRate;\n                meta.channelCount = misc.channelCount;\n                meta.codec = misc.codec;\n                meta.originalCodec = misc.originalCodec;\n                // The decode result of an mp3 sample is 1152 PCM samples\n                meta.refSampleDuration = 1152 / meta.audioSampleRate * meta.timescale;\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.v(this.TAG, 'Parsed MPEG Audio Frame Header');\n                this._audioInitialMetadataDispatched = true;\n                this._onTrackMetadata('audio', meta);\n                var mi = this._mediaInfo;\n                mi.audioCodec = meta.codec;\n                mi.audioSampleRate = meta.audioSampleRate;\n                mi.audioChannelCount = meta.channelCount;\n                mi.audioDataRate = misc.bitRate;\n                if (mi.hasVideo) {\n                    if (mi.videoCodec != null) {\n                        mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + ',' + mi.audioCodec + '\"';\n                    }\n                }\n                else {\n                    mi.mimeType = 'video/x-flv; codecs=\"' + mi.audioCodec + '\"';\n                }\n                if (mi.isComplete()) {\n                    this._onMediaInfo(mi);\n                }\n            }\n            // This packet is always a valid audio packet, extract it\n            var data = this._parseMP3AudioData(arrayBuffer, dataOffset + 1, dataSize - 1, false);\n            if (data == undefined) {\n                return;\n            }\n            var dts = this._timestampBase + tagTimestamp;\n            var mp3Sample = { unit: data, length: data.byteLength, dts: dts, pts: dts };\n            track.samples.push(mp3Sample);\n            track.length += data.length;\n        }\n    };\n    FLVDemuxer.prototype._parseAACAudioData = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize <= 1) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Flv: Invalid AAC packet, missing AACPacketType or/and Data!');\n            return;\n        }\n        var result = {};\n        var array = new Uint8Array(arrayBuffer, dataOffset, dataSize);\n        result.packetType = array[0];\n        if (array[0] === 0) {\n            result.data = this._parseAACAudioSpecificConfig(arrayBuffer, dataOffset + 1, dataSize - 1);\n        }\n        else {\n            result.data = array.subarray(1);\n        }\n        return result;\n    };\n    FLVDemuxer.prototype._parseAACAudioSpecificConfig = function (arrayBuffer, dataOffset, dataSize) {\n        var array = new Uint8Array(arrayBuffer, dataOffset, dataSize);\n        var config = null;\n        /* Audio Object Type:\n           0: Null\n           1: AAC Main\n           2: AAC LC\n           3: AAC SSR (Scalable Sample Rate)\n           4: AAC LTP (Long Term Prediction)\n           5: HE-AAC / SBR (Spectral Band Replication)\n           6: AAC Scalable\n        */\n        var audioObjectType = 0;\n        var originalAudioObjectType = 0;\n        var audioExtensionObjectType = null;\n        var samplingIndex = 0;\n        var extensionSamplingIndex = null;\n        // 5 bits\n        audioObjectType = originalAudioObjectType = array[0] >>> 3;\n        // 4 bits\n        samplingIndex = ((array[0] & 0x07) << 1) | (array[1] >>> 7);\n        if (samplingIndex < 0 || samplingIndex >= this._mpegSamplingRates.length) {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, 'Flv: AAC invalid sampling frequency index!');\n            return;\n        }\n        var samplingFrequence = this._mpegSamplingRates[samplingIndex];\n        // 4 bits\n        var channelConfig = (array[1] & 0x78) >>> 3;\n        if (channelConfig < 0 || channelConfig >= 8) {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, 'Flv: AAC invalid channel configuration');\n            return;\n        }\n        if (audioObjectType === 5) { // HE-AAC?\n            // 4 bits\n            extensionSamplingIndex = ((array[1] & 0x07) << 1) | (array[2] >>> 7);\n            // 5 bits\n            audioExtensionObjectType = (array[2] & 0x7C) >>> 2;\n        }\n        // workarounds for various browsers\n        var userAgent = self.navigator.userAgent.toLowerCase();\n        if (userAgent.indexOf('firefox') !== -1) {\n            // firefox: use SBR (HE-AAC) if freq less than 24kHz\n            if (samplingIndex >= 6) {\n                audioObjectType = 5;\n                config = new Array(4);\n                extensionSamplingIndex = samplingIndex - 3;\n            }\n            else { // use LC-AAC\n                audioObjectType = 2;\n                config = new Array(2);\n                extensionSamplingIndex = samplingIndex;\n            }\n        }\n        else if (userAgent.indexOf('android') !== -1) {\n            // android: always use LC-AAC\n            audioObjectType = 2;\n            config = new Array(2);\n            extensionSamplingIndex = samplingIndex;\n        }\n        else {\n            // for other browsers, e.g. chrome...\n            // Always use HE-AAC to make it easier to switch aac codec profile\n            audioObjectType = 5;\n            extensionSamplingIndex = samplingIndex;\n            config = new Array(4);\n            if (samplingIndex >= 6) {\n                extensionSamplingIndex = samplingIndex - 3;\n            }\n            else if (channelConfig === 1) { // Mono channel\n                audioObjectType = 2;\n                config = new Array(2);\n                extensionSamplingIndex = samplingIndex;\n            }\n        }\n        config[0] = audioObjectType << 3;\n        config[0] |= (samplingIndex & 0x0F) >>> 1;\n        config[1] = (samplingIndex & 0x0F) << 7;\n        config[1] |= (channelConfig & 0x0F) << 3;\n        if (audioObjectType === 5) {\n            config[1] |= ((extensionSamplingIndex & 0x0F) >>> 1);\n            config[2] = (extensionSamplingIndex & 0x01) << 7;\n            // extended audio object type: force to 2 (LC-AAC)\n            config[2] |= (2 << 2);\n            config[3] = 0;\n        }\n        return {\n            config: config,\n            samplingRate: samplingFrequence,\n            channelCount: channelConfig,\n            codec: 'mp4a.40.' + audioObjectType,\n            originalCodec: 'mp4a.40.' + originalAudioObjectType\n        };\n    };\n    FLVDemuxer.prototype._parseMP3AudioData = function (arrayBuffer, dataOffset, dataSize, requestHeader) {\n        if (dataSize < 4) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Flv: Invalid MP3 packet, header missing!');\n            return;\n        }\n        var le = this._littleEndian;\n        var array = new Uint8Array(arrayBuffer, dataOffset, dataSize);\n        var result = null;\n        if (requestHeader) {\n            if (array[0] !== 0xFF) {\n                return;\n            }\n            var ver = (array[1] >>> 3) & 0x03;\n            var layer = (array[1] & 0x06) >> 1;\n            var bitrate_index = (array[2] & 0xF0) >>> 4;\n            var sampling_freq_index = (array[2] & 0x0C) >>> 2;\n            var channel_mode = (array[3] >>> 6) & 0x03;\n            var channel_count = channel_mode !== 3 ? 2 : 1;\n            var sample_rate = 0;\n            var bit_rate = 0;\n            var object_type = 34; // Layer-3, listed in MPEG-4 Audio Object Types\n            var codec = 'mp3';\n            switch (ver) {\n                case 0: // MPEG 2.5\n                    sample_rate = this._mpegAudioV25SampleRateTable[sampling_freq_index];\n                    break;\n                case 2: // MPEG 2\n                    sample_rate = this._mpegAudioV20SampleRateTable[sampling_freq_index];\n                    break;\n                case 3: // MPEG 1\n                    sample_rate = this._mpegAudioV10SampleRateTable[sampling_freq_index];\n                    break;\n            }\n            switch (layer) {\n                case 1: // Layer 3\n                    object_type = 34;\n                    if (bitrate_index < this._mpegAudioL3BitRateTable.length) {\n                        bit_rate = this._mpegAudioL3BitRateTable[bitrate_index];\n                    }\n                    break;\n                case 2: // Layer 2\n                    object_type = 33;\n                    if (bitrate_index < this._mpegAudioL2BitRateTable.length) {\n                        bit_rate = this._mpegAudioL2BitRateTable[bitrate_index];\n                    }\n                    break;\n                case 3: // Layer 1\n                    object_type = 32;\n                    if (bitrate_index < this._mpegAudioL1BitRateTable.length) {\n                        bit_rate = this._mpegAudioL1BitRateTable[bitrate_index];\n                    }\n                    break;\n            }\n            result = {\n                bitRate: bit_rate,\n                samplingRate: sample_rate,\n                channelCount: channel_count,\n                codec: codec,\n                originalCodec: codec\n            };\n        }\n        else {\n            result = array;\n        }\n        return result;\n    };\n    FLVDemuxer.prototype._parseVideoData = function (arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition) {\n        if (dataSize <= 1) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Flv: Invalid video packet, missing VideoData payload!');\n            return;\n        }\n        if (this._hasVideoFlagOverrided === true && this._hasVideo === false) {\n            // If hasVideo: false indicated explicitly in MediaDataSource,\n            // Ignore all the video packets\n            return;\n        }\n        var spec = (new Uint8Array(arrayBuffer, dataOffset, dataSize))[0];\n        var frameType = (spec & 240) >>> 4;\n        var codecId = spec & 15;\n        if (codecId !== 7) {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.CODEC_UNSUPPORTED, \"Flv: Unsupported codec in video frame: \" + codecId);\n            return;\n        }\n        this._parseAVCVideoPacket(arrayBuffer, dataOffset + 1, dataSize - 1, tagTimestamp, tagPosition, frameType);\n    };\n    FLVDemuxer.prototype._parseAVCVideoPacket = function (arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition, frameType) {\n        if (dataSize < 4) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime');\n            return;\n        }\n        var le = this._littleEndian;\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var packetType = v.getUint8(0);\n        var cts_unsigned = v.getUint32(0, !le) & 0x00FFFFFF;\n        var cts = (cts_unsigned << 8) >> 8; // convert to 24-bit signed int\n        if (packetType === 0) { // AVCDecoderConfigurationRecord\n            this._parseAVCDecoderConfigurationRecord(arrayBuffer, dataOffset + 4, dataSize - 4);\n        }\n        else if (packetType === 1) { // One or more Nalus\n            this._parseAVCVideoData(arrayBuffer, dataOffset + 4, dataSize - 4, tagTimestamp, tagPosition, frameType, cts);\n        }\n        else if (packetType === 2) {\n            // empty, AVC end of sequence\n        }\n        else {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, \"Flv: Invalid video packet type \" + packetType);\n            return;\n        }\n    };\n    FLVDemuxer.prototype._parseAVCDecoderConfigurationRecord = function (arrayBuffer, dataOffset, dataSize) {\n        if (dataSize < 7) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Flv: Invalid AVCDecoderConfigurationRecord, lack of data!');\n            return;\n        }\n        var meta = this._videoMetadata;\n        var track = this._videoTrack;\n        var le = this._littleEndian;\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        if (!meta) {\n            if (this._hasVideo === false && this._hasVideoFlagOverrided === false) {\n                this._hasVideo = true;\n                this._mediaInfo.hasVideo = true;\n            }\n            meta = this._videoMetadata = {};\n            meta.type = 'video';\n            meta.id = track.id;\n            meta.timescale = this._timescale;\n            meta.duration = this._duration;\n        }\n        else {\n            if (typeof meta.avcc !== 'undefined') {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Found another AVCDecoderConfigurationRecord!');\n            }\n        }\n        var version = v.getUint8(0); // configurationVersion\n        var avcProfile = v.getUint8(1); // avcProfileIndication\n        var profileCompatibility = v.getUint8(2); // profile_compatibility\n        var avcLevel = v.getUint8(3); // AVCLevelIndication\n        if (version !== 1 || avcProfile === 0) {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord');\n            return;\n        }\n        this._naluLengthSize = (v.getUint8(4) & 3) + 1; // lengthSizeMinusOne\n        if (this._naluLengthSize !== 3 && this._naluLengthSize !== 4) { // holy shit!!!\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, \"Flv: Strange NaluLengthSizeMinusOne: \" + (this._naluLengthSize - 1));\n            return;\n        }\n        var spsCount = v.getUint8(5) & 31; // numOfSequenceParameterSets\n        if (spsCount === 0) {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord: No SPS');\n            return;\n        }\n        else if (spsCount > 1) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = \" + spsCount);\n        }\n        var offset = 6;\n        for (var i = 0; i < spsCount; i++) {\n            var len = v.getUint16(offset, !le); // sequenceParameterSetLength\n            offset += 2;\n            if (len === 0) {\n                continue;\n            }\n            // Notice: Nalu without startcode header (00 00 00 01)\n            var sps = new Uint8Array(arrayBuffer, dataOffset + offset, len);\n            offset += len;\n            var config = _sps_parser_js__WEBPACK_IMPORTED_MODULE_2__.default.parseSPS(sps);\n            if (i !== 0) {\n                // ignore other sps's config\n                continue;\n            }\n            meta.codecWidth = config.codec_size.width;\n            meta.codecHeight = config.codec_size.height;\n            meta.presentWidth = config.present_size.width;\n            meta.presentHeight = config.present_size.height;\n            meta.profile = config.profile_string;\n            meta.level = config.level_string;\n            meta.bitDepth = config.bit_depth;\n            meta.chromaFormat = config.chroma_format;\n            meta.sarRatio = config.sar_ratio;\n            meta.frameRate = config.frame_rate;\n            if (config.frame_rate.fixed === false ||\n                config.frame_rate.fps_num === 0 ||\n                config.frame_rate.fps_den === 0) {\n                meta.frameRate = this._referenceFrameRate;\n            }\n            var fps_den = meta.frameRate.fps_den;\n            var fps_num = meta.frameRate.fps_num;\n            meta.refSampleDuration = meta.timescale * (fps_den / fps_num);\n            var codecArray = sps.subarray(1, 4);\n            var codecString = 'avc1.';\n            for (var j = 0; j < 3; j++) {\n                var h = codecArray[j].toString(16);\n                if (h.length < 2) {\n                    h = '0' + h;\n                }\n                codecString += h;\n            }\n            meta.codec = codecString;\n            var mi = this._mediaInfo;\n            mi.width = meta.codecWidth;\n            mi.height = meta.codecHeight;\n            mi.fps = meta.frameRate.fps;\n            mi.profile = meta.profile;\n            mi.level = meta.level;\n            mi.refFrames = config.ref_frames;\n            mi.chromaFormat = config.chroma_format_string;\n            mi.sarNum = meta.sarRatio.width;\n            mi.sarDen = meta.sarRatio.height;\n            mi.videoCodec = codecString;\n            if (mi.hasAudio) {\n                if (mi.audioCodec != null) {\n                    mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + ',' + mi.audioCodec + '\"';\n                }\n            }\n            else {\n                mi.mimeType = 'video/x-flv; codecs=\"' + mi.videoCodec + '\"';\n            }\n            if (mi.isComplete()) {\n                this._onMediaInfo(mi);\n            }\n        }\n        var ppsCount = v.getUint8(offset); // numOfPictureParameterSets\n        if (ppsCount === 0) {\n            this._onError(_demux_errors_js__WEBPACK_IMPORTED_MODULE_3__.default.FORMAT_ERROR, 'Flv: Invalid AVCDecoderConfigurationRecord: No PPS');\n            return;\n        }\n        else if (ppsCount > 1) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = \" + ppsCount);\n        }\n        offset++;\n        for (var i = 0; i < ppsCount; i++) {\n            var len = v.getUint16(offset, !le); // pictureParameterSetLength\n            offset += 2;\n            if (len === 0) {\n                continue;\n            }\n            // pps is useless for extracting video information\n            offset += len;\n        }\n        meta.avcc = new Uint8Array(dataSize);\n        meta.avcc.set(new Uint8Array(arrayBuffer, dataOffset, dataSize), 0);\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.v(this.TAG, 'Parsed AVCDecoderConfigurationRecord');\n        if (this._isInitialMetadataDispatched()) {\n            // flush parsed frames\n            if (this._dispatch && (this._audioTrack.length || this._videoTrack.length)) {\n                this._onDataAvailable(this._audioTrack, this._videoTrack);\n            }\n        }\n        else {\n            this._videoInitialMetadataDispatched = true;\n        }\n        // notify new metadata\n        this._dispatch = false;\n        this._onTrackMetadata('video', meta);\n    };\n    FLVDemuxer.prototype._parseAVCVideoData = function (arrayBuffer, dataOffset, dataSize, tagTimestamp, tagPosition, frameType, cts) {\n        var le = this._littleEndian;\n        var v = new DataView(arrayBuffer, dataOffset, dataSize);\n        var units = [], length = 0;\n        var offset = 0;\n        var lengthSize = this._naluLengthSize;\n        var dts = this._timestampBase + tagTimestamp;\n        var keyframe = (frameType === 1); // from FLV Frame Type constants\n        while (offset < dataSize) {\n            if (offset + 4 >= dataSize) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Malformed Nalu near timestamp \" + dts + \", offset = \" + offset + \", dataSize = \" + dataSize);\n                break; // data not enough for next Nalu\n            }\n            // Nalu with length-header (AVC1)\n            var naluSize = v.getUint32(offset, !le); // Big-Endian read\n            if (lengthSize === 3) {\n                naluSize >>>= 8;\n            }\n            if (naluSize > dataSize - lengthSize) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Malformed Nalus near timestamp \" + dts + \", NaluSize > DataSize!\");\n                return;\n            }\n            var unitType = v.getUint8(offset + lengthSize) & 0x1F;\n            if (unitType === 5) { // IDR\n                keyframe = true;\n            }\n            var data = new Uint8Array(arrayBuffer, dataOffset + offset, lengthSize + naluSize);\n            var unit = { type: unitType, data: data };\n            units.push(unit);\n            length += data.byteLength;\n            offset += lengthSize + naluSize;\n        }\n        if (units.length) {\n            var track = this._videoTrack;\n            var avcSample = {\n                units: units,\n                length: length,\n                isKeyframe: keyframe,\n                dts: dts,\n                cts: cts,\n                pts: (dts + cts)\n            };\n            if (keyframe) {\n                avcSample.fileposition = tagPosition;\n            }\n            track.samples.push(avcSample);\n            track.length += length;\n        }\n    };\n    return FLVDemuxer;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (FLVDemuxer);\n\n\n/***/ }),\n\n/***/ \"./src/demux/sps-parser.js\":\n/*!*********************************!*\\\n  !*** ./src/demux/sps-parser.js ***!\n  \\*********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _exp_golomb_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exp-golomb.js */ \"./src/demux/exp-golomb.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar SPSParser = /** @class */ (function () {\n    function SPSParser() {\n    }\n    SPSParser._ebsp2rbsp = function (uint8array) {\n        var src = uint8array;\n        var src_length = src.byteLength;\n        var dst = new Uint8Array(src_length);\n        var dst_idx = 0;\n        for (var i = 0; i < src_length; i++) {\n            if (i >= 2) {\n                // Unescape: Skip 0x03 after 00 00\n                if (src[i] === 0x03 && src[i - 1] === 0x00 && src[i - 2] === 0x00) {\n                    continue;\n                }\n            }\n            dst[dst_idx] = src[i];\n            dst_idx++;\n        }\n        return new Uint8Array(dst.buffer, 0, dst_idx);\n    };\n    SPSParser.parseSPS = function (uint8array) {\n        var rbsp = SPSParser._ebsp2rbsp(uint8array);\n        var gb = new _exp_golomb_js__WEBPACK_IMPORTED_MODULE_0__.default(rbsp);\n        gb.readByte();\n        var profile_idc = gb.readByte(); // profile_idc\n        gb.readByte(); // constraint_set_flags[5] + reserved_zero[3]\n        var level_idc = gb.readByte(); // level_idc\n        gb.readUEG(); // seq_parameter_set_id\n        var profile_string = SPSParser.getProfileString(profile_idc);\n        var level_string = SPSParser.getLevelString(level_idc);\n        var chroma_format_idc = 1;\n        var chroma_format = 420;\n        var chroma_format_table = [0, 420, 422, 444];\n        var bit_depth = 8;\n        if (profile_idc === 100 || profile_idc === 110 || profile_idc === 122 ||\n            profile_idc === 244 || profile_idc === 44 || profile_idc === 83 ||\n            profile_idc === 86 || profile_idc === 118 || profile_idc === 128 ||\n            profile_idc === 138 || profile_idc === 144) {\n            chroma_format_idc = gb.readUEG();\n            if (chroma_format_idc === 3) {\n                gb.readBits(1); // separate_colour_plane_flag\n            }\n            if (chroma_format_idc <= 3) {\n                chroma_format = chroma_format_table[chroma_format_idc];\n            }\n            bit_depth = gb.readUEG() + 8; // bit_depth_luma_minus8\n            gb.readUEG(); // bit_depth_chroma_minus8\n            gb.readBits(1); // qpprime_y_zero_transform_bypass_flag\n            if (gb.readBool()) { // seq_scaling_matrix_present_flag\n                var scaling_list_count = (chroma_format_idc !== 3) ? 8 : 12;\n                for (var i = 0; i < scaling_list_count; i++) {\n                    if (gb.readBool()) { // seq_scaling_list_present_flag\n                        if (i < 6) {\n                            SPSParser._skipScalingList(gb, 16);\n                        }\n                        else {\n                            SPSParser._skipScalingList(gb, 64);\n                        }\n                    }\n                }\n            }\n        }\n        gb.readUEG(); // log2_max_frame_num_minus4\n        var pic_order_cnt_type = gb.readUEG();\n        if (pic_order_cnt_type === 0) {\n            gb.readUEG(); // log2_max_pic_order_cnt_lsb_minus_4\n        }\n        else if (pic_order_cnt_type === 1) {\n            gb.readBits(1); // delta_pic_order_always_zero_flag\n            gb.readSEG(); // offset_for_non_ref_pic\n            gb.readSEG(); // offset_for_top_to_bottom_field\n            var num_ref_frames_in_pic_order_cnt_cycle = gb.readUEG();\n            for (var i = 0; i < num_ref_frames_in_pic_order_cnt_cycle; i++) {\n                gb.readSEG(); // offset_for_ref_frame\n            }\n        }\n        var ref_frames = gb.readUEG(); // max_num_ref_frames\n        gb.readBits(1); // gaps_in_frame_num_value_allowed_flag\n        var pic_width_in_mbs_minus1 = gb.readUEG();\n        var pic_height_in_map_units_minus1 = gb.readUEG();\n        var frame_mbs_only_flag = gb.readBits(1);\n        if (frame_mbs_only_flag === 0) {\n            gb.readBits(1); // mb_adaptive_frame_field_flag\n        }\n        gb.readBits(1); // direct_8x8_inference_flag\n        var frame_crop_left_offset = 0;\n        var frame_crop_right_offset = 0;\n        var frame_crop_top_offset = 0;\n        var frame_crop_bottom_offset = 0;\n        var frame_cropping_flag = gb.readBool();\n        if (frame_cropping_flag) {\n            frame_crop_left_offset = gb.readUEG();\n            frame_crop_right_offset = gb.readUEG();\n            frame_crop_top_offset = gb.readUEG();\n            frame_crop_bottom_offset = gb.readUEG();\n        }\n        var sar_width = 1, sar_height = 1;\n        var fps = 0, fps_fixed = true, fps_num = 0, fps_den = 0;\n        var vui_parameters_present_flag = gb.readBool();\n        if (vui_parameters_present_flag) {\n            if (gb.readBool()) { // aspect_ratio_info_present_flag\n                var aspect_ratio_idc = gb.readByte();\n                var sar_w_table = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2];\n                var sar_h_table = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1];\n                if (aspect_ratio_idc > 0 && aspect_ratio_idc < 16) {\n                    sar_width = sar_w_table[aspect_ratio_idc - 1];\n                    sar_height = sar_h_table[aspect_ratio_idc - 1];\n                }\n                else if (aspect_ratio_idc === 255) {\n                    sar_width = gb.readByte() << 8 | gb.readByte();\n                    sar_height = gb.readByte() << 8 | gb.readByte();\n                }\n            }\n            if (gb.readBool()) { // overscan_info_present_flag\n                gb.readBool(); // overscan_appropriate_flag\n            }\n            if (gb.readBool()) { // video_signal_type_present_flag\n                gb.readBits(4); // video_format & video_full_range_flag\n                if (gb.readBool()) { // colour_description_present_flag\n                    gb.readBits(24); // colour_primaries & transfer_characteristics & matrix_coefficients\n                }\n            }\n            if (gb.readBool()) { // chroma_loc_info_present_flag\n                gb.readUEG(); // chroma_sample_loc_type_top_field\n                gb.readUEG(); // chroma_sample_loc_type_bottom_field\n            }\n            if (gb.readBool()) { // timing_info_present_flag\n                var num_units_in_tick = gb.readBits(32);\n                var time_scale = gb.readBits(32);\n                fps_fixed = gb.readBool(); // fixed_frame_rate_flag\n                fps_num = time_scale;\n                fps_den = num_units_in_tick * 2;\n                fps = fps_num / fps_den;\n            }\n        }\n        var sarScale = 1;\n        if (sar_width !== 1 || sar_height !== 1) {\n            sarScale = sar_width / sar_height;\n        }\n        var crop_unit_x = 0, crop_unit_y = 0;\n        if (chroma_format_idc === 0) {\n            crop_unit_x = 1;\n            crop_unit_y = 2 - frame_mbs_only_flag;\n        }\n        else {\n            var sub_wc = (chroma_format_idc === 3) ? 1 : 2;\n            var sub_hc = (chroma_format_idc === 1) ? 2 : 1;\n            crop_unit_x = sub_wc;\n            crop_unit_y = sub_hc * (2 - frame_mbs_only_flag);\n        }\n        var codec_width = (pic_width_in_mbs_minus1 + 1) * 16;\n        var codec_height = (2 - frame_mbs_only_flag) * ((pic_height_in_map_units_minus1 + 1) * 16);\n        codec_width -= (frame_crop_left_offset + frame_crop_right_offset) * crop_unit_x;\n        codec_height -= (frame_crop_top_offset + frame_crop_bottom_offset) * crop_unit_y;\n        var present_width = Math.ceil(codec_width * sarScale);\n        gb.destroy();\n        gb = null;\n        return {\n            profile_string: profile_string,\n            level_string: level_string,\n            bit_depth: bit_depth,\n            ref_frames: ref_frames,\n            chroma_format: chroma_format,\n            chroma_format_string: SPSParser.getChromaFormatString(chroma_format),\n            frame_rate: {\n                fixed: fps_fixed,\n                fps: fps,\n                fps_den: fps_den,\n                fps_num: fps_num\n            },\n            sar_ratio: {\n                width: sar_width,\n                height: sar_height\n            },\n            codec_size: {\n                width: codec_width,\n                height: codec_height\n            },\n            present_size: {\n                width: present_width,\n                height: codec_height\n            }\n        };\n    };\n    SPSParser._skipScalingList = function (gb, count) {\n        var last_scale = 8, next_scale = 8;\n        var delta_scale = 0;\n        for (var i = 0; i < count; i++) {\n            if (next_scale !== 0) {\n                delta_scale = gb.readSEG();\n                next_scale = (last_scale + delta_scale + 256) % 256;\n            }\n            last_scale = (next_scale === 0) ? last_scale : next_scale;\n        }\n    };\n    SPSParser.getProfileString = function (profile_idc) {\n        switch (profile_idc) {\n            case 66:\n                return 'Baseline';\n            case 77:\n                return 'Main';\n            case 88:\n                return 'Extended';\n            case 100:\n                return 'High';\n            case 110:\n                return 'High10';\n            case 122:\n                return 'High422';\n            case 244:\n                return 'High444';\n            default:\n                return 'Unknown';\n        }\n    };\n    SPSParser.getLevelString = function (level_idc) {\n        return (level_idc / 10).toFixed(1);\n    };\n    SPSParser.getChromaFormatString = function (chroma) {\n        switch (chroma) {\n            case 420:\n                return '4:2:0';\n            case 422:\n                return '4:2:2';\n            case 444:\n                return '4:4:4';\n            default:\n                return 'Unknown';\n        }\n    };\n    return SPSParser;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (SPSParser);\n\n\n/***/ }),\n\n/***/ \"./src/flv.js\":\n/*!********************!*\\\n  !*** ./src/flv.js ***!\n  \\********************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_polyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/polyfill.js */ \"./src/utils/polyfill.js\");\n/* harmony import */ var _core_features_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./core/features.js */ \"./src/core/features.js\");\n/* harmony import */ var _io_loader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./io/loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _player_flv_player_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./player/flv-player.js */ \"./src/player/flv-player.js\");\n/* harmony import */ var _player_native_player_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./player/native-player.js */ \"./src/player/native-player.js\");\n/* harmony import */ var _player_player_events_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./player/player-events.js */ \"./src/player/player-events.js\");\n/* harmony import */ var _player_player_errors_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./player/player-errors.js */ \"./src/player/player-errors.js\");\n/* harmony import */ var _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/logging-control.js */ \"./src/utils/logging-control.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n// here are all the interfaces\n// install polyfills\n_utils_polyfill_js__WEBPACK_IMPORTED_MODULE_0__.default.install();\n// factory method\nfunction createPlayer(mediaDataSource, optionalConfig) {\n    var mds = mediaDataSource;\n    if (mds == null || typeof mds !== 'object') {\n        throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_8__.InvalidArgumentException('MediaDataSource must be an javascript object!');\n    }\n    if (!mds.hasOwnProperty('type')) {\n        throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_8__.InvalidArgumentException('MediaDataSource must has type field to indicate video file type!');\n    }\n    switch (mds.type) {\n        case 'flv':\n            return new _player_flv_player_js__WEBPACK_IMPORTED_MODULE_3__.default(mds, optionalConfig);\n        default:\n            return new _player_native_player_js__WEBPACK_IMPORTED_MODULE_4__.default(mds, optionalConfig);\n    }\n}\n// feature detection\nfunction isSupported() {\n    return _core_features_js__WEBPACK_IMPORTED_MODULE_1__.default.supportMSEH264Playback();\n}\nfunction getFeatureList() {\n    return _core_features_js__WEBPACK_IMPORTED_MODULE_1__.default.getFeatureList();\n}\n// interfaces\nvar flvjs = {};\nflvjs.createPlayer = createPlayer;\nflvjs.isSupported = isSupported;\nflvjs.getFeatureList = getFeatureList;\nflvjs.BaseLoader = _io_loader_js__WEBPACK_IMPORTED_MODULE_2__.BaseLoader;\nflvjs.LoaderStatus = _io_loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus;\nflvjs.LoaderErrors = _io_loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors;\nflvjs.Events = _player_player_events_js__WEBPACK_IMPORTED_MODULE_5__.default;\nflvjs.ErrorTypes = _player_player_errors_js__WEBPACK_IMPORTED_MODULE_6__.ErrorTypes;\nflvjs.ErrorDetails = _player_player_errors_js__WEBPACK_IMPORTED_MODULE_6__.ErrorDetails;\nflvjs.FlvPlayer = _player_flv_player_js__WEBPACK_IMPORTED_MODULE_3__.default;\nflvjs.NativePlayer = _player_native_player_js__WEBPACK_IMPORTED_MODULE_4__.default;\nflvjs.LoggingControl = _utils_logging_control_js__WEBPACK_IMPORTED_MODULE_7__.default;\nObject.defineProperty(flvjs, 'version', {\n    enumerable: true,\n    get: function () {\n        // replace by webpack.DefinePlugin\n        return \"1.6.2\";\n    }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (flvjs);\n\n\n/***/ }),\n\n/***/ \"./src/index.js\":\n/*!**********************!*\\\n  !*** ./src/index.js ***!\n  \\**********************/\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n// entry/index file\n// make it compatible with browserify's umd wrapper\nmodule.exports = __webpack_require__(/*! ./flv.js */ \"./src/flv.js\").default;\n\n\n/***/ }),\n\n/***/ \"./src/io/fetch-stream-loader.js\":\n/*!***************************************!*\\\n  !*** ./src/io/fetch-stream-loader.js ***!\n  \\***************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_browser_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/browser.js */ \"./src/utils/browser.js\");\n/* harmony import */ var _loader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n/* fetch + stream IO loader. Currently working on chrome 43+.\n * fetch provides a better alternative http API to XMLHttpRequest\n *\n * fetch spec   https://fetch.spec.whatwg.org/\n * stream spec  https://streams.spec.whatwg.org/\n */\nvar FetchStreamLoader = /** @class */ (function (_super) {\n    __extends(FetchStreamLoader, _super);\n    function FetchStreamLoader(seekHandler, config) {\n        var _this = _super.call(this, 'fetch-stream-loader') || this;\n        _this.TAG = 'FetchStreamLoader';\n        _this._seekHandler = seekHandler;\n        _this._config = config;\n        _this._needStash = true;\n        _this._requestAbort = false;\n        _this._contentLength = null;\n        _this._receivedLength = 0;\n        return _this;\n    }\n    FetchStreamLoader.isSupported = function () {\n        try {\n            // fetch + stream is broken on Microsoft Edge. Disable before build 15048.\n            // see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8196907/\n            // Fixed in Jan 10, 2017. Build 15048+ removed from blacklist.\n            var isWorkWellEdge = _utils_browser_js__WEBPACK_IMPORTED_MODULE_0__.default.msedge && _utils_browser_js__WEBPACK_IMPORTED_MODULE_0__.default.version.minor >= 15048;\n            var browserNotBlacklisted = _utils_browser_js__WEBPACK_IMPORTED_MODULE_0__.default.msedge ? isWorkWellEdge : true;\n            return (self.fetch && self.ReadableStream && browserNotBlacklisted);\n        }\n        catch (e) {\n            return false;\n        }\n    };\n    FetchStreamLoader.prototype.destroy = function () {\n        if (this.isWorking()) {\n            this.abort();\n        }\n        _super.prototype.destroy.call(this);\n    };\n    FetchStreamLoader.prototype.open = function (dataSource, range) {\n        var _this = this;\n        this._dataSource = dataSource;\n        this._range = range;\n        var sourceURL = dataSource.url;\n        if (this._config.reuseRedirectedURL && dataSource.redirectedURL != undefined) {\n            sourceURL = dataSource.redirectedURL;\n        }\n        var seekConfig = this._seekHandler.getConfig(sourceURL, range);\n        var headers = new self.Headers();\n        if (typeof seekConfig.headers === 'object') {\n            var configHeaders = seekConfig.headers;\n            for (var key in configHeaders) {\n                if (configHeaders.hasOwnProperty(key)) {\n                    headers.append(key, configHeaders[key]);\n                }\n            }\n        }\n        var params = {\n            method: 'GET',\n            headers: headers,\n            mode: 'cors',\n            cache: 'default',\n            // The default policy of Fetch API in the whatwg standard\n            // Safari incorrectly indicates 'no-referrer' as default policy, fuck it\n            referrerPolicy: 'no-referrer-when-downgrade'\n        };\n        // add additional headers\n        if (typeof this._config.headers === 'object') {\n            for (var key in this._config.headers) {\n                headers.append(key, this._config.headers[key]);\n            }\n        }\n        // cors is enabled by default\n        if (dataSource.cors === false) {\n            // no-cors means 'disregard cors policy', which can only be used in ServiceWorker\n            params.mode = 'same-origin';\n        }\n        // withCredentials is disabled by default\n        if (dataSource.withCredentials) {\n            params.credentials = 'include';\n        }\n        // referrerPolicy from config\n        if (dataSource.referrerPolicy) {\n            params.referrerPolicy = dataSource.referrerPolicy;\n        }\n        // add abort controller, by wmlgl 2019-5-10 12:21:27\n        if (self.AbortController) {\n            this._abortController = new self.AbortController();\n            params.signal = this._abortController.signal;\n        }\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kConnecting;\n        self.fetch(seekConfig.url, params).then(function (res) {\n            if (_this._requestAbort) {\n                _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kIdle;\n                res.body.cancel();\n                return;\n            }\n            if (res.ok && (res.status >= 200 && res.status <= 299)) {\n                if (res.url !== seekConfig.url) {\n                    if (_this._onURLRedirect) {\n                        var redirectedURL = _this._seekHandler.removeURLParameters(res.url);\n                        _this._onURLRedirect(redirectedURL);\n                    }\n                }\n                var lengthHeader = res.headers.get('Content-Length');\n                if (lengthHeader != null) {\n                    _this._contentLength = parseInt(lengthHeader);\n                    if (_this._contentLength !== 0) {\n                        if (_this._onContentLengthKnown) {\n                            _this._onContentLengthKnown(_this._contentLength);\n                        }\n                    }\n                }\n                return _this._pump.call(_this, res.body.getReader());\n            }\n            else {\n                _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError;\n                if (_this._onError) {\n                    _this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.HTTP_STATUS_CODE_INVALID, { code: res.status, msg: res.statusText });\n                }\n                else {\n                    throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.RuntimeException('FetchStreamLoader: Http code invalid, ' + res.status + ' ' + res.statusText);\n                }\n            }\n        }).catch(function (e) {\n            if (_this._abortController && _this._abortController.signal.aborted) {\n                return;\n            }\n            _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError;\n            if (_this._onError) {\n                _this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.EXCEPTION, { code: -1, msg: e.message });\n            }\n            else {\n                throw e;\n            }\n        });\n    };\n    FetchStreamLoader.prototype.abort = function () {\n        this._requestAbort = true;\n        if (this._status !== _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kBuffering || !_utils_browser_js__WEBPACK_IMPORTED_MODULE_0__.default.chrome) {\n            // Chrome may throw Exception-like things here, avoid using if is buffering\n            if (this._abortController) {\n                try {\n                    this._abortController.abort();\n                }\n                catch (e) { }\n            }\n        }\n    };\n    FetchStreamLoader.prototype._pump = function (reader) {\n        var _this = this;\n        return reader.read().then(function (result) {\n            if (result.done) {\n                // First check received length\n                if (_this._contentLength !== null && _this._receivedLength < _this._contentLength) {\n                    // Report Early-EOF\n                    _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError;\n                    var type = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.EARLY_EOF;\n                    var info = { code: -1, msg: 'Fetch stream meet Early-EOF' };\n                    if (_this._onError) {\n                        _this._onError(type, info);\n                    }\n                    else {\n                        throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.RuntimeException(info.msg);\n                    }\n                }\n                else {\n                    // OK. Download complete\n                    _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kComplete;\n                    if (_this._onComplete) {\n                        _this._onComplete(_this._range.from, _this._range.from + _this._receivedLength - 1);\n                    }\n                }\n            }\n            else {\n                if (_this._abortController && _this._abortController.signal.aborted) {\n                    _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kComplete;\n                    return;\n                }\n                else if (_this._requestAbort === true) {\n                    _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kComplete;\n                    return reader.cancel();\n                }\n                _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kBuffering;\n                var chunk = result.value.buffer;\n                var byteStart = _this._range.from + _this._receivedLength;\n                _this._receivedLength += chunk.byteLength;\n                if (_this._onDataArrival) {\n                    _this._onDataArrival(chunk, byteStart, _this._receivedLength);\n                }\n                _this._pump(reader);\n            }\n        }).catch(function (e) {\n            if (_this._abortController && _this._abortController.signal.aborted) {\n                _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kComplete;\n                return;\n            }\n            if (e.code === 11 && _utils_browser_js__WEBPACK_IMPORTED_MODULE_0__.default.msedge) { // InvalidStateError on Microsoft Edge\n                // Workaround: Edge may throw InvalidStateError after ReadableStreamReader.cancel() call\n                // Ignore the unknown exception.\n                // Related issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11265202/\n                return;\n            }\n            _this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError;\n            var type = 0;\n            var info = null;\n            if ((e.code === 19 || e.message === 'network error') && // NETWORK_ERR\n                (_this._contentLength === null ||\n                    (_this._contentLength !== null && _this._receivedLength < _this._contentLength))) {\n                type = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.EARLY_EOF;\n                info = { code: e.code, msg: 'Fetch stream meet Early-EOF' };\n            }\n            else {\n                type = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.EXCEPTION;\n                info = { code: e.code, msg: e.message };\n            }\n            if (_this._onError) {\n                _this._onError(type, info);\n            }\n            else {\n                throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.RuntimeException(info.msg);\n            }\n        });\n    };\n    return FetchStreamLoader;\n}(_loader_js__WEBPACK_IMPORTED_MODULE_1__.BaseLoader));\n/* harmony default export */ __webpack_exports__[\"default\"] = (FetchStreamLoader);\n\n\n/***/ }),\n\n/***/ \"./src/io/io-controller.js\":\n/*!*********************************!*\\\n  !*** ./src/io/io-controller.js ***!\n  \\*********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _speed_sampler_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./speed-sampler.js */ \"./src/io/speed-sampler.js\");\n/* harmony import */ var _loader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _fetch_stream_loader_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fetch-stream-loader.js */ \"./src/io/fetch-stream-loader.js\");\n/* harmony import */ var _xhr_moz_chunked_loader_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./xhr-moz-chunked-loader.js */ \"./src/io/xhr-moz-chunked-loader.js\");\n/* harmony import */ var _xhr_range_loader_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./xhr-range-loader.js */ \"./src/io/xhr-range-loader.js\");\n/* harmony import */ var _websocket_loader_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./websocket-loader.js */ \"./src/io/websocket-loader.js\");\n/* harmony import */ var _range_seek_handler_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./range-seek-handler.js */ \"./src/io/range-seek-handler.js\");\n/* harmony import */ var _param_seek_handler_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./param-seek-handler.js */ \"./src/io/param-seek-handler.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n/**\n * DataSource: {\n *     url: string,\n *     filesize: number,\n *     cors: boolean,\n *     withCredentials: boolean\n * }\n *\n */\n// Manage IO Loaders\nvar IOController = /** @class */ (function () {\n    function IOController(dataSource, config, extraData) {\n        this.TAG = 'IOController';\n        this._config = config;\n        this._extraData = extraData;\n        this._stashInitialSize = 1024 * 384; // default initial size: 384KB\n        if (config.stashInitialSize != undefined && config.stashInitialSize > 0) {\n            // apply from config\n            this._stashInitialSize = config.stashInitialSize;\n        }\n        this._stashUsed = 0;\n        this._stashSize = this._stashInitialSize;\n        this._bufferSize = 1024 * 1024 * 3; // initial size: 3MB\n        this._stashBuffer = new ArrayBuffer(this._bufferSize);\n        this._stashByteStart = 0;\n        this._enableStash = true;\n        if (config.enableStashBuffer === false) {\n            this._enableStash = false;\n        }\n        this._loader = null;\n        this._loaderClass = null;\n        this._seekHandler = null;\n        this._dataSource = dataSource;\n        this._isWebSocketURL = /wss?:\\/\\/(.+?)/.test(dataSource.url);\n        this._refTotalLength = dataSource.filesize ? dataSource.filesize : null;\n        this._totalLength = this._refTotalLength;\n        this._fullRequestFlag = false;\n        this._currentRange = null;\n        this._redirectedURL = null;\n        this._speedNormalized = 0;\n        this._speedSampler = new _speed_sampler_js__WEBPACK_IMPORTED_MODULE_1__.default();\n        this._speedNormalizeList = [64, 128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096];\n        this._isEarlyEofReconnecting = false;\n        this._paused = false;\n        this._resumeFrom = 0;\n        this._onDataArrival = null;\n        this._onSeeked = null;\n        this._onError = null;\n        this._onComplete = null;\n        this._onRedirect = null;\n        this._onRecoveredEarlyEof = null;\n        this._selectSeekHandler();\n        this._selectLoader();\n        this._createLoader();\n    }\n    IOController.prototype.destroy = function () {\n        if (this._loader.isWorking()) {\n            this._loader.abort();\n        }\n        this._loader.destroy();\n        this._loader = null;\n        this._loaderClass = null;\n        this._dataSource = null;\n        this._stashBuffer = null;\n        this._stashUsed = this._stashSize = this._bufferSize = this._stashByteStart = 0;\n        this._currentRange = null;\n        this._speedSampler = null;\n        this._isEarlyEofReconnecting = false;\n        this._onDataArrival = null;\n        this._onSeeked = null;\n        this._onError = null;\n        this._onComplete = null;\n        this._onRedirect = null;\n        this._onRecoveredEarlyEof = null;\n        this._extraData = null;\n    };\n    IOController.prototype.isWorking = function () {\n        return this._loader && this._loader.isWorking() && !this._paused;\n    };\n    IOController.prototype.isPaused = function () {\n        return this._paused;\n    };\n    Object.defineProperty(IOController.prototype, \"status\", {\n        get: function () {\n            return this._loader.status;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"extraData\", {\n        get: function () {\n            return this._extraData;\n        },\n        set: function (data) {\n            this._extraData = data;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"onDataArrival\", {\n        // prototype: function onDataArrival(chunks: ArrayBuffer, byteStart: number): number\n        get: function () {\n            return this._onDataArrival;\n        },\n        set: function (callback) {\n            this._onDataArrival = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"onSeeked\", {\n        get: function () {\n            return this._onSeeked;\n        },\n        set: function (callback) {\n            this._onSeeked = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"onError\", {\n        // prototype: function onError(type: number, info: {code: number, msg: string}): void\n        get: function () {\n            return this._onError;\n        },\n        set: function (callback) {\n            this._onError = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"onComplete\", {\n        get: function () {\n            return this._onComplete;\n        },\n        set: function (callback) {\n            this._onComplete = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"onRedirect\", {\n        get: function () {\n            return this._onRedirect;\n        },\n        set: function (callback) {\n            this._onRedirect = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"onRecoveredEarlyEof\", {\n        get: function () {\n            return this._onRecoveredEarlyEof;\n        },\n        set: function (callback) {\n            this._onRecoveredEarlyEof = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"currentURL\", {\n        get: function () {\n            return this._dataSource.url;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"hasRedirect\", {\n        get: function () {\n            return (this._redirectedURL != null || this._dataSource.redirectedURL != undefined);\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"currentRedirectedURL\", {\n        get: function () {\n            return this._redirectedURL || this._dataSource.redirectedURL;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"currentSpeed\", {\n        // in KB/s\n        get: function () {\n            if (this._loaderClass === _xhr_range_loader_js__WEBPACK_IMPORTED_MODULE_5__.default) {\n                // SpeedSampler is inaccuracy if loader is RangeLoader\n                return this._loader.currentSpeed;\n            }\n            return this._speedSampler.lastSecondKBps;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(IOController.prototype, \"loaderType\", {\n        get: function () {\n            return this._loader.type;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    IOController.prototype._selectSeekHandler = function () {\n        var config = this._config;\n        if (config.seekType === 'range') {\n            this._seekHandler = new _range_seek_handler_js__WEBPACK_IMPORTED_MODULE_7__.default(this._config.rangeLoadZeroStart);\n        }\n        else if (config.seekType === 'param') {\n            var paramStart = config.seekParamStart || 'bstart';\n            var paramEnd = config.seekParamEnd || 'bend';\n            this._seekHandler = new _param_seek_handler_js__WEBPACK_IMPORTED_MODULE_8__.default(paramStart, paramEnd);\n        }\n        else if (config.seekType === 'custom') {\n            if (typeof config.customSeekHandler !== 'function') {\n                throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__.InvalidArgumentException('Custom seekType specified in config but invalid customSeekHandler!');\n            }\n            this._seekHandler = new config.customSeekHandler();\n        }\n        else {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__.InvalidArgumentException(\"Invalid seekType in config: \" + config.seekType);\n        }\n    };\n    IOController.prototype._selectLoader = function () {\n        if (this._config.customLoader != null) {\n            this._loaderClass = this._config.customLoader;\n        }\n        else if (this._isWebSocketURL) {\n            this._loaderClass = _websocket_loader_js__WEBPACK_IMPORTED_MODULE_6__.default;\n        }\n        else if (_fetch_stream_loader_js__WEBPACK_IMPORTED_MODULE_3__.default.isSupported()) {\n            this._loaderClass = _fetch_stream_loader_js__WEBPACK_IMPORTED_MODULE_3__.default;\n        }\n        else if (_xhr_moz_chunked_loader_js__WEBPACK_IMPORTED_MODULE_4__.default.isSupported()) {\n            this._loaderClass = _xhr_moz_chunked_loader_js__WEBPACK_IMPORTED_MODULE_4__.default;\n        }\n        else if (_xhr_range_loader_js__WEBPACK_IMPORTED_MODULE_5__.default.isSupported()) {\n            this._loaderClass = _xhr_range_loader_js__WEBPACK_IMPORTED_MODULE_5__.default;\n        }\n        else {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__.RuntimeException('Your browser doesn\\'t support xhr with arraybuffer responseType!');\n        }\n    };\n    IOController.prototype._createLoader = function () {\n        this._loader = new this._loaderClass(this._seekHandler, this._config);\n        if (this._loader.needStashBuffer === false) {\n            this._enableStash = false;\n        }\n        this._loader.onContentLengthKnown = this._onContentLengthKnown.bind(this);\n        this._loader.onURLRedirect = this._onURLRedirect.bind(this);\n        this._loader.onDataArrival = this._onLoaderChunkArrival.bind(this);\n        this._loader.onComplete = this._onLoaderComplete.bind(this);\n        this._loader.onError = this._onLoaderError.bind(this);\n    };\n    IOController.prototype.open = function (optionalFrom) {\n        this._currentRange = { from: 0, to: -1 };\n        if (optionalFrom) {\n            this._currentRange.from = optionalFrom;\n        }\n        this._speedSampler.reset();\n        if (!optionalFrom) {\n            this._fullRequestFlag = true;\n        }\n        this._loader.open(this._dataSource, Object.assign({}, this._currentRange));\n    };\n    IOController.prototype.abort = function () {\n        this._loader.abort();\n        if (this._paused) {\n            this._paused = false;\n            this._resumeFrom = 0;\n        }\n    };\n    IOController.prototype.pause = function () {\n        if (this.isWorking()) {\n            this._loader.abort();\n            if (this._stashUsed !== 0) {\n                this._resumeFrom = this._stashByteStart;\n                this._currentRange.to = this._stashByteStart - 1;\n            }\n            else {\n                this._resumeFrom = this._currentRange.to + 1;\n            }\n            this._stashUsed = 0;\n            this._stashByteStart = 0;\n            this._paused = true;\n        }\n    };\n    IOController.prototype.resume = function () {\n        if (this._paused) {\n            this._paused = false;\n            var bytes = this._resumeFrom;\n            this._resumeFrom = 0;\n            this._internalSeek(bytes, true);\n        }\n    };\n    IOController.prototype.seek = function (bytes) {\n        this._paused = false;\n        this._stashUsed = 0;\n        this._stashByteStart = 0;\n        this._internalSeek(bytes, true);\n    };\n    /**\n     * When seeking request is from media seeking, unconsumed stash data should be dropped\n     * However, stash data shouldn't be dropped if seeking requested from http reconnection\n     *\n     * @dropUnconsumed: Ignore and discard all unconsumed data in stash buffer\n     */\n    IOController.prototype._internalSeek = function (bytes, dropUnconsumed) {\n        if (this._loader.isWorking()) {\n            this._loader.abort();\n        }\n        // dispatch & flush stash buffer before seek\n        this._flushStashBuffer(dropUnconsumed);\n        this._loader.destroy();\n        this._loader = null;\n        var requestRange = { from: bytes, to: -1 };\n        this._currentRange = { from: requestRange.from, to: -1 };\n        this._speedSampler.reset();\n        this._stashSize = this._stashInitialSize;\n        this._createLoader();\n        this._loader.open(this._dataSource, requestRange);\n        if (this._onSeeked) {\n            this._onSeeked();\n        }\n    };\n    IOController.prototype.updateUrl = function (url) {\n        if (!url || typeof url !== 'string' || url.length === 0) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__.InvalidArgumentException('Url must be a non-empty string!');\n        }\n        this._dataSource.url = url;\n        // TODO: replace with new url\n    };\n    IOController.prototype._expandBuffer = function (expectedBytes) {\n        var bufferNewSize = this._stashSize;\n        while (bufferNewSize + 1024 * 1024 * 1 < expectedBytes) {\n            bufferNewSize *= 2;\n        }\n        bufferNewSize += 1024 * 1024 * 1; // bufferSize = stashSize + 1MB\n        if (bufferNewSize === this._bufferSize) {\n            return;\n        }\n        var newBuffer = new ArrayBuffer(bufferNewSize);\n        if (this._stashUsed > 0) { // copy existing data into new buffer\n            var stashOldArray = new Uint8Array(this._stashBuffer, 0, this._stashUsed);\n            var stashNewArray = new Uint8Array(newBuffer, 0, bufferNewSize);\n            stashNewArray.set(stashOldArray, 0);\n        }\n        this._stashBuffer = newBuffer;\n        this._bufferSize = bufferNewSize;\n    };\n    IOController.prototype._normalizeSpeed = function (input) {\n        var list = this._speedNormalizeList;\n        var last = list.length - 1;\n        var mid = 0;\n        var lbound = 0;\n        var ubound = last;\n        if (input < list[0]) {\n            return list[0];\n        }\n        // binary search\n        while (lbound <= ubound) {\n            mid = lbound + Math.floor((ubound - lbound) / 2);\n            if (mid === last || (input >= list[mid] && input < list[mid + 1])) {\n                return list[mid];\n            }\n            else if (list[mid] < input) {\n                lbound = mid + 1;\n            }\n            else {\n                ubound = mid - 1;\n            }\n        }\n    };\n    IOController.prototype._adjustStashSize = function (normalized) {\n        var stashSizeKB = 0;\n        if (this._config.isLive) {\n            // live stream: always use single normalized speed for size of stashSizeKB\n            stashSizeKB = normalized;\n        }\n        else {\n            if (normalized < 512) {\n                stashSizeKB = normalized;\n            }\n            else if (normalized >= 512 && normalized <= 1024) {\n                stashSizeKB = Math.floor(normalized * 1.5);\n            }\n            else {\n                stashSizeKB = normalized * 2;\n            }\n        }\n        if (stashSizeKB > 8192) {\n            stashSizeKB = 8192;\n        }\n        var bufferSize = stashSizeKB * 1024 + 1024 * 1024 * 1; // stashSize + 1MB\n        if (this._bufferSize < bufferSize) {\n            this._expandBuffer(bufferSize);\n        }\n        this._stashSize = stashSizeKB * 1024;\n    };\n    IOController.prototype._dispatchChunks = function (chunks, byteStart) {\n        this._currentRange.to = byteStart + chunks.byteLength - 1;\n        return this._onDataArrival(chunks, byteStart);\n    };\n    IOController.prototype._onURLRedirect = function (redirectedURL) {\n        this._redirectedURL = redirectedURL;\n        if (this._onRedirect) {\n            this._onRedirect(redirectedURL);\n        }\n    };\n    IOController.prototype._onContentLengthKnown = function (contentLength) {\n        if (contentLength && this._fullRequestFlag) {\n            this._totalLength = contentLength;\n            this._fullRequestFlag = false;\n        }\n    };\n    IOController.prototype._onLoaderChunkArrival = function (chunk, byteStart, receivedLength) {\n        if (!this._onDataArrival) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__.IllegalStateException('IOController: No existing consumer (onDataArrival) callback!');\n        }\n        if (this._paused) {\n            return;\n        }\n        if (this._isEarlyEofReconnecting) {\n            // Auto-reconnect for EarlyEof succeed, notify to upper-layer by callback\n            this._isEarlyEofReconnecting = false;\n            if (this._onRecoveredEarlyEof) {\n                this._onRecoveredEarlyEof();\n            }\n        }\n        this._speedSampler.addBytes(chunk.byteLength);\n        // adjust stash buffer size according to network speed dynamically\n        var KBps = this._speedSampler.lastSecondKBps;\n        if (KBps !== 0) {\n            var normalized = this._normalizeSpeed(KBps);\n            if (this._speedNormalized !== normalized) {\n                this._speedNormalized = normalized;\n                this._adjustStashSize(normalized);\n            }\n        }\n        if (!this._enableStash) { // disable stash\n            if (this._stashUsed === 0) {\n                // dispatch chunk directly to consumer;\n                // check ret value (consumed bytes) and stash unconsumed to stashBuffer\n                var consumed = this._dispatchChunks(chunk, byteStart);\n                if (consumed < chunk.byteLength) { // unconsumed data remain.\n                    var remain = chunk.byteLength - consumed;\n                    if (remain > this._bufferSize) {\n                        this._expandBuffer(remain);\n                    }\n                    var stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n                    stashArray.set(new Uint8Array(chunk, consumed), 0);\n                    this._stashUsed += remain;\n                    this._stashByteStart = byteStart + consumed;\n                }\n            }\n            else {\n                // else: Merge chunk into stashBuffer, and dispatch stashBuffer to consumer.\n                if (this._stashUsed + chunk.byteLength > this._bufferSize) {\n                    this._expandBuffer(this._stashUsed + chunk.byteLength);\n                }\n                var stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n                stashArray.set(new Uint8Array(chunk), this._stashUsed);\n                this._stashUsed += chunk.byteLength;\n                var consumed = this._dispatchChunks(this._stashBuffer.slice(0, this._stashUsed), this._stashByteStart);\n                if (consumed < this._stashUsed && consumed > 0) { // unconsumed data remain\n                    var remainArray = new Uint8Array(this._stashBuffer, consumed);\n                    stashArray.set(remainArray, 0);\n                }\n                this._stashUsed -= consumed;\n                this._stashByteStart += consumed;\n            }\n        }\n        else { // enable stash\n            if (this._stashUsed === 0 && this._stashByteStart === 0) { // seeked? or init chunk?\n                // This is the first chunk after seek action\n                this._stashByteStart = byteStart;\n            }\n            if (this._stashUsed + chunk.byteLength <= this._stashSize) {\n                // just stash\n                var stashArray = new Uint8Array(this._stashBuffer, 0, this._stashSize);\n                stashArray.set(new Uint8Array(chunk), this._stashUsed);\n                this._stashUsed += chunk.byteLength;\n            }\n            else { // stashUsed + chunkSize > stashSize, size limit exceeded\n                var stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n                if (this._stashUsed > 0) { // There're stash datas in buffer\n                    // dispatch the whole stashBuffer, and stash remain data\n                    // then append chunk to stashBuffer (stash)\n                    var buffer = this._stashBuffer.slice(0, this._stashUsed);\n                    var consumed = this._dispatchChunks(buffer, this._stashByteStart);\n                    if (consumed < buffer.byteLength) {\n                        if (consumed > 0) {\n                            var remainArray = new Uint8Array(buffer, consumed);\n                            stashArray.set(remainArray, 0);\n                            this._stashUsed = remainArray.byteLength;\n                            this._stashByteStart += consumed;\n                        }\n                    }\n                    else {\n                        this._stashUsed = 0;\n                        this._stashByteStart += consumed;\n                    }\n                    if (this._stashUsed + chunk.byteLength > this._bufferSize) {\n                        this._expandBuffer(this._stashUsed + chunk.byteLength);\n                        stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n                    }\n                    stashArray.set(new Uint8Array(chunk), this._stashUsed);\n                    this._stashUsed += chunk.byteLength;\n                }\n                else { // stash buffer empty, but chunkSize > stashSize (oh, holy shit)\n                    // dispatch chunk directly and stash remain data\n                    var consumed = this._dispatchChunks(chunk, byteStart);\n                    if (consumed < chunk.byteLength) {\n                        var remain = chunk.byteLength - consumed;\n                        if (remain > this._bufferSize) {\n                            this._expandBuffer(remain);\n                            stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n                        }\n                        stashArray.set(new Uint8Array(chunk, consumed), 0);\n                        this._stashUsed += remain;\n                        this._stashByteStart = byteStart + consumed;\n                    }\n                }\n            }\n        }\n    };\n    IOController.prototype._flushStashBuffer = function (dropUnconsumed) {\n        if (this._stashUsed > 0) {\n            var buffer = this._stashBuffer.slice(0, this._stashUsed);\n            var consumed = this._dispatchChunks(buffer, this._stashByteStart);\n            var remain = buffer.byteLength - consumed;\n            if (consumed < buffer.byteLength) {\n                if (dropUnconsumed) {\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, remain + \" bytes unconsumed data remain when flush buffer, dropped\");\n                }\n                else {\n                    if (consumed > 0) {\n                        var stashArray = new Uint8Array(this._stashBuffer, 0, this._bufferSize);\n                        var remainArray = new Uint8Array(buffer, consumed);\n                        stashArray.set(remainArray, 0);\n                        this._stashUsed = remainArray.byteLength;\n                        this._stashByteStart += consumed;\n                    }\n                    return 0;\n                }\n            }\n            this._stashUsed = 0;\n            this._stashByteStart = 0;\n            return remain;\n        }\n        return 0;\n    };\n    IOController.prototype._onLoaderComplete = function (from, to) {\n        // Force-flush stash buffer, and drop unconsumed data\n        this._flushStashBuffer(true);\n        if (this._onComplete) {\n            this._onComplete(this._extraData);\n        }\n    };\n    IOController.prototype._onLoaderError = function (type, data) {\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.e(this.TAG, \"Loader error, code = \" + data.code + \", msg = \" + data.msg);\n        this._flushStashBuffer(false);\n        if (this._isEarlyEofReconnecting) {\n            // Auto-reconnect for EarlyEof failed, throw UnrecoverableEarlyEof error to upper-layer\n            this._isEarlyEofReconnecting = false;\n            type = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.UNRECOVERABLE_EARLY_EOF;\n        }\n        switch (type) {\n            case _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.EARLY_EOF: {\n                if (!this._config.isLive) {\n                    // Do internal http reconnect if not live stream\n                    if (this._totalLength) {\n                        var nextFrom = this._currentRange.to + 1;\n                        if (nextFrom < this._totalLength) {\n                            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Connection lost, trying reconnect...');\n                            this._isEarlyEofReconnecting = true;\n                            this._internalSeek(nextFrom, false);\n                        }\n                        return;\n                    }\n                    // else: We don't know totalLength, throw UnrecoverableEarlyEof\n                }\n                // live stream: throw UnrecoverableEarlyEof error to upper-layer\n                type = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.UNRECOVERABLE_EARLY_EOF;\n                break;\n            }\n            case _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.UNRECOVERABLE_EARLY_EOF:\n            case _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.CONNECTING_TIMEOUT:\n            case _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.HTTP_STATUS_CODE_INVALID:\n            case _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.EXCEPTION:\n                break;\n        }\n        if (this._onError) {\n            this._onError(type, data);\n        }\n        else {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_9__.RuntimeException('IOException: ' + data.msg);\n        }\n    };\n    return IOController;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (IOController);\n\n\n/***/ }),\n\n/***/ \"./src/io/loader.js\":\n/*!**************************!*\\\n  !*** ./src/io/loader.js ***!\n  \\**************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"LoaderStatus\": function() { return /* binding */ LoaderStatus; },\n/* harmony export */   \"LoaderErrors\": function() { return /* binding */ LoaderErrors; },\n/* harmony export */   \"BaseLoader\": function() { return /* binding */ BaseLoader; }\n/* harmony export */ });\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar LoaderStatus = {\n    kIdle: 0,\n    kConnecting: 1,\n    kBuffering: 2,\n    kError: 3,\n    kComplete: 4\n};\nvar LoaderErrors = {\n    OK: 'OK',\n    EXCEPTION: 'Exception',\n    HTTP_STATUS_CODE_INVALID: 'HttpStatusCodeInvalid',\n    CONNECTING_TIMEOUT: 'ConnectingTimeout',\n    EARLY_EOF: 'EarlyEof',\n    UNRECOVERABLE_EARLY_EOF: 'UnrecoverableEarlyEof'\n};\n/* Loader has callbacks which have following prototypes:\n *     function onContentLengthKnown(contentLength: number): void\n *     function onURLRedirect(url: string): void\n *     function onDataArrival(chunk: ArrayBuffer, byteStart: number, receivedLength: number): void\n *     function onError(errorType: number, errorInfo: {code: number, msg: string}): void\n *     function onComplete(rangeFrom: number, rangeTo: number): void\n */\nvar BaseLoader = /** @class */ (function () {\n    function BaseLoader(typeName) {\n        this._type = typeName || 'undefined';\n        this._status = LoaderStatus.kIdle;\n        this._needStash = false;\n        // callbacks\n        this._onContentLengthKnown = null;\n        this._onURLRedirect = null;\n        this._onDataArrival = null;\n        this._onError = null;\n        this._onComplete = null;\n    }\n    BaseLoader.prototype.destroy = function () {\n        this._status = LoaderStatus.kIdle;\n        this._onContentLengthKnown = null;\n        this._onURLRedirect = null;\n        this._onDataArrival = null;\n        this._onError = null;\n        this._onComplete = null;\n    };\n    BaseLoader.prototype.isWorking = function () {\n        return this._status === LoaderStatus.kConnecting || this._status === LoaderStatus.kBuffering;\n    };\n    Object.defineProperty(BaseLoader.prototype, \"type\", {\n        get: function () {\n            return this._type;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"status\", {\n        get: function () {\n            return this._status;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"needStashBuffer\", {\n        get: function () {\n            return this._needStash;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"onContentLengthKnown\", {\n        get: function () {\n            return this._onContentLengthKnown;\n        },\n        set: function (callback) {\n            this._onContentLengthKnown = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"onURLRedirect\", {\n        get: function () {\n            return this._onURLRedirect;\n        },\n        set: function (callback) {\n            this._onURLRedirect = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"onDataArrival\", {\n        get: function () {\n            return this._onDataArrival;\n        },\n        set: function (callback) {\n            this._onDataArrival = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"onError\", {\n        get: function () {\n            return this._onError;\n        },\n        set: function (callback) {\n            this._onError = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(BaseLoader.prototype, \"onComplete\", {\n        get: function () {\n            return this._onComplete;\n        },\n        set: function (callback) {\n            this._onComplete = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    // pure virtual\n    BaseLoader.prototype.open = function (dataSource, range) {\n        throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_0__.NotImplementedException('Unimplemented abstract function!');\n    };\n    BaseLoader.prototype.abort = function () {\n        throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_0__.NotImplementedException('Unimplemented abstract function!');\n    };\n    return BaseLoader;\n}());\n\n\n\n/***/ }),\n\n/***/ \"./src/io/param-seek-handler.js\":\n/*!**************************************!*\\\n  !*** ./src/io/param-seek-handler.js ***!\n  \\**************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar ParamSeekHandler = /** @class */ (function () {\n    function ParamSeekHandler(paramStart, paramEnd) {\n        this._startName = paramStart;\n        this._endName = paramEnd;\n    }\n    ParamSeekHandler.prototype.getConfig = function (baseUrl, range) {\n        var url = baseUrl;\n        if (range.from !== 0 || range.to !== -1) {\n            var needAnd = true;\n            if (url.indexOf('?') === -1) {\n                url += '?';\n                needAnd = false;\n            }\n            if (needAnd) {\n                url += '&';\n            }\n            url += this._startName + \"=\" + range.from.toString();\n            if (range.to !== -1) {\n                url += \"&\" + this._endName + \"=\" + range.to.toString();\n            }\n        }\n        return {\n            url: url,\n            headers: {}\n        };\n    };\n    ParamSeekHandler.prototype.removeURLParameters = function (seekedURL) {\n        var baseURL = seekedURL.split('?')[0];\n        var params = undefined;\n        var queryIndex = seekedURL.indexOf('?');\n        if (queryIndex !== -1) {\n            params = seekedURL.substring(queryIndex + 1);\n        }\n        var resultParams = '';\n        if (params != undefined && params.length > 0) {\n            var pairs = params.split('&');\n            for (var i = 0; i < pairs.length; i++) {\n                var pair = pairs[i].split('=');\n                var requireAnd = (i > 0);\n                if (pair[0] !== this._startName && pair[0] !== this._endName) {\n                    if (requireAnd) {\n                        resultParams += '&';\n                    }\n                    resultParams += pairs[i];\n                }\n            }\n        }\n        return (resultParams.length === 0) ? baseURL : baseURL + '?' + resultParams;\n    };\n    return ParamSeekHandler;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (ParamSeekHandler);\n\n\n/***/ }),\n\n/***/ \"./src/io/range-seek-handler.js\":\n/*!**************************************!*\\\n  !*** ./src/io/range-seek-handler.js ***!\n  \\**************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar RangeSeekHandler = /** @class */ (function () {\n    function RangeSeekHandler(zeroStart) {\n        this._zeroStart = zeroStart || false;\n    }\n    RangeSeekHandler.prototype.getConfig = function (url, range) {\n        var headers = {};\n        if (range.from !== 0 || range.to !== -1) {\n            var param = void 0;\n            if (range.to !== -1) {\n                param = \"bytes=\" + range.from.toString() + \"-\" + range.to.toString();\n            }\n            else {\n                param = \"bytes=\" + range.from.toString() + \"-\";\n            }\n            headers['Range'] = param;\n        }\n        else if (this._zeroStart) {\n            headers['Range'] = 'bytes=0-';\n        }\n        return {\n            url: url,\n            headers: headers\n        };\n    };\n    RangeSeekHandler.prototype.removeURLParameters = function (seekedURL) {\n        return seekedURL;\n    };\n    return RangeSeekHandler;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (RangeSeekHandler);\n\n\n/***/ }),\n\n/***/ \"./src/io/speed-sampler.js\":\n/*!*********************************!*\\\n  !*** ./src/io/speed-sampler.js ***!\n  \\*********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Utility class to calculate realtime network I/O speed\nvar SpeedSampler = /** @class */ (function () {\n    function SpeedSampler() {\n        // milliseconds\n        this._firstCheckpoint = 0;\n        this._lastCheckpoint = 0;\n        this._intervalBytes = 0;\n        this._totalBytes = 0;\n        this._lastSecondBytes = 0;\n        // compatibility detection\n        if (self.performance && self.performance.now) {\n            this._now = self.performance.now.bind(self.performance);\n        }\n        else {\n            this._now = Date.now;\n        }\n    }\n    SpeedSampler.prototype.reset = function () {\n        this._firstCheckpoint = this._lastCheckpoint = 0;\n        this._totalBytes = this._intervalBytes = 0;\n        this._lastSecondBytes = 0;\n    };\n    SpeedSampler.prototype.addBytes = function (bytes) {\n        if (this._firstCheckpoint === 0) {\n            this._firstCheckpoint = this._now();\n            this._lastCheckpoint = this._firstCheckpoint;\n            this._intervalBytes += bytes;\n            this._totalBytes += bytes;\n        }\n        else if (this._now() - this._lastCheckpoint < 1000) {\n            this._intervalBytes += bytes;\n            this._totalBytes += bytes;\n        }\n        else { // duration >= 1000\n            this._lastSecondBytes = this._intervalBytes;\n            this._intervalBytes = bytes;\n            this._totalBytes += bytes;\n            this._lastCheckpoint = this._now();\n        }\n    };\n    Object.defineProperty(SpeedSampler.prototype, \"currentKBps\", {\n        get: function () {\n            this.addBytes(0);\n            var durationSeconds = (this._now() - this._lastCheckpoint) / 1000;\n            if (durationSeconds == 0)\n                durationSeconds = 1;\n            return (this._intervalBytes / durationSeconds) / 1024;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(SpeedSampler.prototype, \"lastSecondKBps\", {\n        get: function () {\n            this.addBytes(0);\n            if (this._lastSecondBytes !== 0) {\n                return this._lastSecondBytes / 1024;\n            }\n            else { // lastSecondBytes === 0\n                if (this._now() - this._lastCheckpoint >= 500) {\n                    // if time interval since last checkpoint has exceeded 500ms\n                    // the speed is nearly accurate\n                    return this.currentKBps;\n                }\n                else {\n                    // We don't know\n                    return 0;\n                }\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(SpeedSampler.prototype, \"averageKBps\", {\n        get: function () {\n            var durationSeconds = (this._now() - this._firstCheckpoint) / 1000;\n            return (this._totalBytes / durationSeconds) / 1024;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return SpeedSampler;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (SpeedSampler);\n\n\n/***/ }),\n\n/***/ \"./src/io/websocket-loader.js\":\n/*!************************************!*\\\n  !*** ./src/io/websocket-loader.js ***!\n  \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _loader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n// For FLV over WebSocket live stream\nvar WebSocketLoader = /** @class */ (function (_super) {\n    __extends(WebSocketLoader, _super);\n    function WebSocketLoader() {\n        var _this = _super.call(this, 'websocket-loader') || this;\n        _this.TAG = 'WebSocketLoader';\n        _this._needStash = true;\n        _this._ws = null;\n        _this._requestAbort = false;\n        _this._receivedLength = 0;\n        return _this;\n    }\n    WebSocketLoader.isSupported = function () {\n        try {\n            return (typeof self.WebSocket !== 'undefined');\n        }\n        catch (e) {\n            return false;\n        }\n    };\n    WebSocketLoader.prototype.destroy = function () {\n        if (this._ws) {\n            this.abort();\n        }\n        _super.prototype.destroy.call(this);\n    };\n    WebSocketLoader.prototype.open = function (dataSource) {\n        try {\n            var ws = this._ws = new self.WebSocket(dataSource.url);\n            ws.binaryType = 'arraybuffer';\n            ws.onopen = this._onWebSocketOpen.bind(this);\n            ws.onclose = this._onWebSocketClose.bind(this);\n            ws.onmessage = this._onWebSocketMessage.bind(this);\n            ws.onerror = this._onWebSocketError.bind(this);\n            this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kConnecting;\n        }\n        catch (e) {\n            this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kError;\n            var info = { code: e.code, msg: e.message };\n            if (this._onError) {\n                this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.EXCEPTION, info);\n            }\n            else {\n                throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_1__.RuntimeException(info.msg);\n            }\n        }\n    };\n    WebSocketLoader.prototype.abort = function () {\n        var ws = this._ws;\n        if (ws && (ws.readyState === 0 || ws.readyState === 1)) { // CONNECTING || OPEN\n            this._requestAbort = true;\n            ws.close();\n        }\n        this._ws = null;\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kComplete;\n    };\n    WebSocketLoader.prototype._onWebSocketOpen = function (e) {\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kBuffering;\n    };\n    WebSocketLoader.prototype._onWebSocketClose = function (e) {\n        if (this._requestAbort === true) {\n            this._requestAbort = false;\n            return;\n        }\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kComplete;\n        if (this._onComplete) {\n            this._onComplete(0, this._receivedLength - 1);\n        }\n    };\n    WebSocketLoader.prototype._onWebSocketMessage = function (e) {\n        var _this = this;\n        if (e.data instanceof ArrayBuffer) {\n            this._dispatchArrayBuffer(e.data);\n        }\n        else if (e.data instanceof Blob) {\n            var reader_1 = new FileReader();\n            reader_1.onload = function () {\n                _this._dispatchArrayBuffer(reader_1.result);\n            };\n            reader_1.readAsArrayBuffer(e.data);\n        }\n        else {\n            this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kError;\n            var info = { code: -1, msg: 'Unsupported WebSocket message type: ' + e.data.constructor.name };\n            if (this._onError) {\n                this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.EXCEPTION, info);\n            }\n            else {\n                throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_1__.RuntimeException(info.msg);\n            }\n        }\n    };\n    WebSocketLoader.prototype._dispatchArrayBuffer = function (arraybuffer) {\n        var chunk = arraybuffer;\n        var byteStart = this._receivedLength;\n        this._receivedLength += chunk.byteLength;\n        if (this._onDataArrival) {\n            this._onDataArrival(chunk, byteStart, this._receivedLength);\n        }\n    };\n    WebSocketLoader.prototype._onWebSocketError = function (e) {\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderStatus.kError;\n        var info = {\n            code: e.code,\n            msg: e.message\n        };\n        if (this._onError) {\n            this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.EXCEPTION, info);\n        }\n        else {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_1__.RuntimeException(info.msg);\n        }\n    };\n    return WebSocketLoader;\n}(_loader_js__WEBPACK_IMPORTED_MODULE_0__.BaseLoader));\n/* harmony default export */ __webpack_exports__[\"default\"] = (WebSocketLoader);\n\n\n/***/ }),\n\n/***/ \"./src/io/xhr-moz-chunked-loader.js\":\n/*!******************************************!*\\\n  !*** ./src/io/xhr-moz-chunked-loader.js ***!\n  \\******************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _loader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n// For FireFox browser which supports `xhr.responseType = 'moz-chunked-arraybuffer'`\nvar MozChunkedLoader = /** @class */ (function (_super) {\n    __extends(MozChunkedLoader, _super);\n    function MozChunkedLoader(seekHandler, config) {\n        var _this = _super.call(this, 'xhr-moz-chunked-loader') || this;\n        _this.TAG = 'MozChunkedLoader';\n        _this._seekHandler = seekHandler;\n        _this._config = config;\n        _this._needStash = true;\n        _this._xhr = null;\n        _this._requestAbort = false;\n        _this._contentLength = null;\n        _this._receivedLength = 0;\n        return _this;\n    }\n    MozChunkedLoader.isSupported = function () {\n        try {\n            var xhr = new XMLHttpRequest();\n            // Firefox 37- requires .open() to be called before setting responseType\n            xhr.open('GET', 'https://example.com', true);\n            xhr.responseType = 'moz-chunked-arraybuffer';\n            return (xhr.responseType === 'moz-chunked-arraybuffer');\n        }\n        catch (e) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w('MozChunkedLoader', e.message);\n            return false;\n        }\n    };\n    MozChunkedLoader.prototype.destroy = function () {\n        if (this.isWorking()) {\n            this.abort();\n        }\n        if (this._xhr) {\n            this._xhr.onreadystatechange = null;\n            this._xhr.onprogress = null;\n            this._xhr.onloadend = null;\n            this._xhr.onerror = null;\n            this._xhr = null;\n        }\n        _super.prototype.destroy.call(this);\n    };\n    MozChunkedLoader.prototype.open = function (dataSource, range) {\n        this._dataSource = dataSource;\n        this._range = range;\n        var sourceURL = dataSource.url;\n        if (this._config.reuseRedirectedURL && dataSource.redirectedURL != undefined) {\n            sourceURL = dataSource.redirectedURL;\n        }\n        var seekConfig = this._seekHandler.getConfig(sourceURL, range);\n        this._requestURL = seekConfig.url;\n        var xhr = this._xhr = new XMLHttpRequest();\n        xhr.open('GET', seekConfig.url, true);\n        xhr.responseType = 'moz-chunked-arraybuffer';\n        xhr.onreadystatechange = this._onReadyStateChange.bind(this);\n        xhr.onprogress = this._onProgress.bind(this);\n        xhr.onloadend = this._onLoadEnd.bind(this);\n        xhr.onerror = this._onXhrError.bind(this);\n        // cors is auto detected and enabled by xhr\n        // withCredentials is disabled by default\n        if (dataSource.withCredentials) {\n            xhr.withCredentials = true;\n        }\n        if (typeof seekConfig.headers === 'object') {\n            var headers = seekConfig.headers;\n            for (var key in headers) {\n                if (headers.hasOwnProperty(key)) {\n                    xhr.setRequestHeader(key, headers[key]);\n                }\n            }\n        }\n        // add additional headers\n        if (typeof this._config.headers === 'object') {\n            var headers = this._config.headers;\n            for (var key in headers) {\n                if (headers.hasOwnProperty(key)) {\n                    xhr.setRequestHeader(key, headers[key]);\n                }\n            }\n        }\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kConnecting;\n        xhr.send();\n    };\n    MozChunkedLoader.prototype.abort = function () {\n        this._requestAbort = true;\n        if (this._xhr) {\n            this._xhr.abort();\n        }\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kComplete;\n    };\n    MozChunkedLoader.prototype._onReadyStateChange = function (e) {\n        var xhr = e.target;\n        if (xhr.readyState === 2) { // HEADERS_RECEIVED\n            if (xhr.responseURL != undefined && xhr.responseURL !== this._requestURL) {\n                if (this._onURLRedirect) {\n                    var redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL);\n                    this._onURLRedirect(redirectedURL);\n                }\n            }\n            if (xhr.status !== 0 && (xhr.status < 200 || xhr.status > 299)) {\n                this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError;\n                if (this._onError) {\n                    this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.HTTP_STATUS_CODE_INVALID, { code: xhr.status, msg: xhr.statusText });\n                }\n                else {\n                    throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.RuntimeException('MozChunkedLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText);\n                }\n            }\n            else {\n                this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kBuffering;\n            }\n        }\n    };\n    MozChunkedLoader.prototype._onProgress = function (e) {\n        if (this._status === _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError) {\n            // Ignore error response\n            return;\n        }\n        if (this._contentLength === null) {\n            if (e.total !== null && e.total !== 0) {\n                this._contentLength = e.total;\n                if (this._onContentLengthKnown) {\n                    this._onContentLengthKnown(this._contentLength);\n                }\n            }\n        }\n        var chunk = e.target.response;\n        var byteStart = this._range.from + this._receivedLength;\n        this._receivedLength += chunk.byteLength;\n        if (this._onDataArrival) {\n            this._onDataArrival(chunk, byteStart, this._receivedLength);\n        }\n    };\n    MozChunkedLoader.prototype._onLoadEnd = function (e) {\n        if (this._requestAbort === true) {\n            this._requestAbort = false;\n            return;\n        }\n        else if (this._status === _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError) {\n            return;\n        }\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kComplete;\n        if (this._onComplete) {\n            this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);\n        }\n    };\n    MozChunkedLoader.prototype._onXhrError = function (e) {\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderStatus.kError;\n        var type = 0;\n        var info = null;\n        if (this._contentLength && e.loaded < this._contentLength) {\n            type = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.EARLY_EOF;\n            info = { code: -1, msg: 'Moz-Chunked stream meet Early-Eof' };\n        }\n        else {\n            type = _loader_js__WEBPACK_IMPORTED_MODULE_1__.LoaderErrors.EXCEPTION;\n            info = { code: -1, msg: e.constructor.name + ' ' + e.type };\n        }\n        if (this._onError) {\n            this._onError(type, info);\n        }\n        else {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_2__.RuntimeException(info.msg);\n        }\n    };\n    return MozChunkedLoader;\n}(_loader_js__WEBPACK_IMPORTED_MODULE_1__.BaseLoader));\n/* harmony default export */ __webpack_exports__[\"default\"] = (MozChunkedLoader);\n\n\n/***/ }),\n\n/***/ \"./src/io/xhr-range-loader.js\":\n/*!************************************!*\\\n  !*** ./src/io/xhr-range-loader.js ***!\n  \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _speed_sampler_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./speed-sampler.js */ \"./src/io/speed-sampler.js\");\n/* harmony import */ var _loader_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n\n\n\n\n// Universal IO Loader, implemented by adding Range header in xhr's request header\nvar RangeLoader = /** @class */ (function (_super) {\n    __extends(RangeLoader, _super);\n    function RangeLoader(seekHandler, config) {\n        var _this = _super.call(this, 'xhr-range-loader') || this;\n        _this.TAG = 'RangeLoader';\n        _this._seekHandler = seekHandler;\n        _this._config = config;\n        _this._needStash = false;\n        _this._chunkSizeKBList = [\n            128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 5120, 6144, 7168, 8192\n        ];\n        _this._currentChunkSizeKB = 384;\n        _this._currentSpeedNormalized = 0;\n        _this._zeroSpeedChunkCount = 0;\n        _this._xhr = null;\n        _this._speedSampler = new _speed_sampler_js__WEBPACK_IMPORTED_MODULE_1__.default();\n        _this._requestAbort = false;\n        _this._waitForTotalLength = false;\n        _this._totalLengthReceived = false;\n        _this._currentRequestURL = null;\n        _this._currentRedirectedURL = null;\n        _this._currentRequestRange = null;\n        _this._totalLength = null; // size of the entire file\n        _this._contentLength = null; // Content-Length of entire request range\n        _this._receivedLength = 0; // total received bytes\n        _this._lastTimeLoaded = 0; // received bytes of current request sub-range\n        return _this;\n    }\n    RangeLoader.isSupported = function () {\n        try {\n            var xhr = new XMLHttpRequest();\n            xhr.open('GET', 'https://example.com', true);\n            xhr.responseType = 'arraybuffer';\n            return (xhr.responseType === 'arraybuffer');\n        }\n        catch (e) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w('RangeLoader', e.message);\n            return false;\n        }\n    };\n    RangeLoader.prototype.destroy = function () {\n        if (this.isWorking()) {\n            this.abort();\n        }\n        if (this._xhr) {\n            this._xhr.onreadystatechange = null;\n            this._xhr.onprogress = null;\n            this._xhr.onload = null;\n            this._xhr.onerror = null;\n            this._xhr = null;\n        }\n        _super.prototype.destroy.call(this);\n    };\n    Object.defineProperty(RangeLoader.prototype, \"currentSpeed\", {\n        get: function () {\n            return this._speedSampler.lastSecondKBps;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    RangeLoader.prototype.open = function (dataSource, range) {\n        this._dataSource = dataSource;\n        this._range = range;\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kConnecting;\n        var useRefTotalLength = false;\n        if (this._dataSource.filesize != undefined && this._dataSource.filesize !== 0) {\n            useRefTotalLength = true;\n            this._totalLength = this._dataSource.filesize;\n        }\n        if (!this._totalLengthReceived && !useRefTotalLength) {\n            // We need total filesize\n            this._waitForTotalLength = true;\n            this._internalOpen(this._dataSource, { from: 0, to: -1 });\n        }\n        else {\n            // We have filesize, start loading\n            this._openSubRange();\n        }\n    };\n    RangeLoader.prototype._openSubRange = function () {\n        var chunkSize = this._currentChunkSizeKB * 1024;\n        var from = this._range.from + this._receivedLength;\n        var to = from + chunkSize;\n        if (this._contentLength != null) {\n            if (to - this._range.from >= this._contentLength) {\n                to = this._range.from + this._contentLength - 1;\n            }\n        }\n        this._currentRequestRange = { from: from, to: to };\n        this._internalOpen(this._dataSource, this._currentRequestRange);\n    };\n    RangeLoader.prototype._internalOpen = function (dataSource, range) {\n        this._lastTimeLoaded = 0;\n        var sourceURL = dataSource.url;\n        if (this._config.reuseRedirectedURL) {\n            if (this._currentRedirectedURL != undefined) {\n                sourceURL = this._currentRedirectedURL;\n            }\n            else if (dataSource.redirectedURL != undefined) {\n                sourceURL = dataSource.redirectedURL;\n            }\n        }\n        var seekConfig = this._seekHandler.getConfig(sourceURL, range);\n        this._currentRequestURL = seekConfig.url;\n        var xhr = this._xhr = new XMLHttpRequest();\n        xhr.open('GET', seekConfig.url, true);\n        xhr.responseType = 'arraybuffer';\n        xhr.onreadystatechange = this._onReadyStateChange.bind(this);\n        xhr.onprogress = this._onProgress.bind(this);\n        xhr.onload = this._onLoad.bind(this);\n        xhr.onerror = this._onXhrError.bind(this);\n        if (dataSource.withCredentials) {\n            xhr.withCredentials = true;\n        }\n        if (typeof seekConfig.headers === 'object') {\n            var headers = seekConfig.headers;\n            for (var key in headers) {\n                if (headers.hasOwnProperty(key)) {\n                    xhr.setRequestHeader(key, headers[key]);\n                }\n            }\n        }\n        // add additional headers\n        if (typeof this._config.headers === 'object') {\n            var headers = this._config.headers;\n            for (var key in headers) {\n                if (headers.hasOwnProperty(key)) {\n                    xhr.setRequestHeader(key, headers[key]);\n                }\n            }\n        }\n        xhr.send();\n    };\n    RangeLoader.prototype.abort = function () {\n        this._requestAbort = true;\n        this._internalAbort();\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kComplete;\n    };\n    RangeLoader.prototype._internalAbort = function () {\n        if (this._xhr) {\n            this._xhr.onreadystatechange = null;\n            this._xhr.onprogress = null;\n            this._xhr.onload = null;\n            this._xhr.onerror = null;\n            this._xhr.abort();\n            this._xhr = null;\n        }\n    };\n    RangeLoader.prototype._onReadyStateChange = function (e) {\n        var xhr = e.target;\n        if (xhr.readyState === 2) { // HEADERS_RECEIVED\n            if (xhr.responseURL != undefined) { // if the browser support this property\n                var redirectedURL = this._seekHandler.removeURLParameters(xhr.responseURL);\n                if (xhr.responseURL !== this._currentRequestURL && redirectedURL !== this._currentRedirectedURL) {\n                    this._currentRedirectedURL = redirectedURL;\n                    if (this._onURLRedirect) {\n                        this._onURLRedirect(redirectedURL);\n                    }\n                }\n            }\n            if ((xhr.status >= 200 && xhr.status <= 299)) {\n                if (this._waitForTotalLength) {\n                    return;\n                }\n                this._status = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kBuffering;\n            }\n            else {\n                this._status = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kError;\n                if (this._onError) {\n                    this._onError(_loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.HTTP_STATUS_CODE_INVALID, { code: xhr.status, msg: xhr.statusText });\n                }\n                else {\n                    throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__.RuntimeException('RangeLoader: Http code invalid, ' + xhr.status + ' ' + xhr.statusText);\n                }\n            }\n        }\n    };\n    RangeLoader.prototype._onProgress = function (e) {\n        if (this._status === _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kError) {\n            // Ignore error response\n            return;\n        }\n        if (this._contentLength === null) {\n            var openNextRange = false;\n            if (this._waitForTotalLength) {\n                this._waitForTotalLength = false;\n                this._totalLengthReceived = true;\n                openNextRange = true;\n                var total = e.total;\n                this._internalAbort();\n                if (total != null & total !== 0) {\n                    this._totalLength = total;\n                }\n            }\n            // calculate currrent request range's contentLength\n            if (this._range.to === -1) {\n                this._contentLength = this._totalLength - this._range.from;\n            }\n            else { // to !== -1\n                this._contentLength = this._range.to - this._range.from + 1;\n            }\n            if (openNextRange) {\n                this._openSubRange();\n                return;\n            }\n            if (this._onContentLengthKnown) {\n                this._onContentLengthKnown(this._contentLength);\n            }\n        }\n        var delta = e.loaded - this._lastTimeLoaded;\n        this._lastTimeLoaded = e.loaded;\n        this._speedSampler.addBytes(delta);\n    };\n    RangeLoader.prototype._normalizeSpeed = function (input) {\n        var list = this._chunkSizeKBList;\n        var last = list.length - 1;\n        var mid = 0;\n        var lbound = 0;\n        var ubound = last;\n        if (input < list[0]) {\n            return list[0];\n        }\n        while (lbound <= ubound) {\n            mid = lbound + Math.floor((ubound - lbound) / 2);\n            if (mid === last || (input >= list[mid] && input < list[mid + 1])) {\n                return list[mid];\n            }\n            else if (list[mid] < input) {\n                lbound = mid + 1;\n            }\n            else {\n                ubound = mid - 1;\n            }\n        }\n    };\n    RangeLoader.prototype._onLoad = function (e) {\n        if (this._status === _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kError) {\n            // Ignore error response\n            return;\n        }\n        if (this._waitForTotalLength) {\n            this._waitForTotalLength = false;\n            return;\n        }\n        this._lastTimeLoaded = 0;\n        var KBps = this._speedSampler.lastSecondKBps;\n        if (KBps === 0) {\n            this._zeroSpeedChunkCount++;\n            if (this._zeroSpeedChunkCount >= 3) {\n                // Try get currentKBps after 3 chunks\n                KBps = this._speedSampler.currentKBps;\n            }\n        }\n        if (KBps !== 0) {\n            var normalized = this._normalizeSpeed(KBps);\n            if (this._currentSpeedNormalized !== normalized) {\n                this._currentSpeedNormalized = normalized;\n                this._currentChunkSizeKB = normalized;\n            }\n        }\n        var chunk = e.target.response;\n        var byteStart = this._range.from + this._receivedLength;\n        this._receivedLength += chunk.byteLength;\n        var reportComplete = false;\n        if (this._contentLength != null && this._receivedLength < this._contentLength) {\n            // continue load next chunk\n            this._openSubRange();\n        }\n        else {\n            reportComplete = true;\n        }\n        // dispatch received chunk\n        if (this._onDataArrival) {\n            this._onDataArrival(chunk, byteStart, this._receivedLength);\n        }\n        if (reportComplete) {\n            this._status = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kComplete;\n            if (this._onComplete) {\n                this._onComplete(this._range.from, this._range.from + this._receivedLength - 1);\n            }\n        }\n    };\n    RangeLoader.prototype._onXhrError = function (e) {\n        this._status = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderStatus.kError;\n        var type = 0;\n        var info = null;\n        if (this._contentLength && this._receivedLength > 0\n            && this._receivedLength < this._contentLength) {\n            type = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.EARLY_EOF;\n            info = { code: -1, msg: 'RangeLoader meet Early-Eof' };\n        }\n        else {\n            type = _loader_js__WEBPACK_IMPORTED_MODULE_2__.LoaderErrors.EXCEPTION;\n            info = { code: -1, msg: e.constructor.name + ' ' + e.type };\n        }\n        if (this._onError) {\n            this._onError(type, info);\n        }\n        else {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__.RuntimeException(info.msg);\n        }\n    };\n    return RangeLoader;\n}(_loader_js__WEBPACK_IMPORTED_MODULE_2__.BaseLoader));\n/* harmony default export */ __webpack_exports__[\"default\"] = (RangeLoader);\n\n\n/***/ }),\n\n/***/ \"./src/player/flv-player.js\":\n/*!**********************************!*\\\n  !*** ./src/player/flv-player.js ***!\n  \\**********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/browser.js */ \"./src/utils/browser.js\");\n/* harmony import */ var _player_events_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./player-events.js */ \"./src/player/player-events.js\");\n/* harmony import */ var _core_transmuxer_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/transmuxer.js */ \"./src/core/transmuxer.js\");\n/* harmony import */ var _core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/transmuxing-events.js */ \"./src/core/transmuxing-events.js\");\n/* harmony import */ var _core_mse_controller_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../core/mse-controller.js */ \"./src/core/mse-controller.js\");\n/* harmony import */ var _core_mse_events_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/mse-events.js */ \"./src/core/mse-events.js\");\n/* harmony import */ var _player_errors_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./player-errors.js */ \"./src/player/player-errors.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../config.js */ \"./src/config.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n\n\n\n\n\nvar FlvPlayer = /** @class */ (function () {\n    function FlvPlayer(mediaDataSource, config) {\n        this.TAG = 'FlvPlayer';\n        this._type = 'FlvPlayer';\n        this._emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n        this._config = (0,_config_js__WEBPACK_IMPORTED_MODULE_9__.createDefaultConfig)();\n        if (typeof config === 'object') {\n            Object.assign(this._config, config);\n        }\n        if (mediaDataSource.type.toLowerCase() !== 'flv') {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_10__.InvalidArgumentException('FlvPlayer requires an flv MediaDataSource input!');\n        }\n        if (mediaDataSource.isLive === true) {\n            this._config.isLive = true;\n        }\n        this.e = {\n            onvLoadedMetadata: this._onvLoadedMetadata.bind(this),\n            onvSeeking: this._onvSeeking.bind(this),\n            onvCanPlay: this._onvCanPlay.bind(this),\n            onvStalled: this._onvStalled.bind(this),\n            onvProgress: this._onvProgress.bind(this)\n        };\n        if (self.performance && self.performance.now) {\n            this._now = self.performance.now.bind(self.performance);\n        }\n        else {\n            this._now = Date.now;\n        }\n        this._pendingSeekTime = null; // in seconds\n        this._requestSetTime = false;\n        this._seekpointRecord = null;\n        this._progressChecker = null;\n        this._mediaDataSource = mediaDataSource;\n        this._mediaElement = null;\n        this._msectl = null;\n        this._transmuxer = null;\n        this._mseSourceOpened = false;\n        this._hasPendingLoad = false;\n        this._receivedCanPlay = false;\n        this._mediaInfo = null;\n        this._statisticsInfo = null;\n        var chromeNeedIDRFix = (_utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.chrome &&\n            (_utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.version.major < 50 ||\n                (_utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.version.major === 50 && _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.version.build < 2661)));\n        this._alwaysSeekKeyframe = (chromeNeedIDRFix || _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.msedge || _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.msie) ? true : false;\n        if (this._alwaysSeekKeyframe) {\n            this._config.accurateSeek = false;\n        }\n    }\n    FlvPlayer.prototype.destroy = function () {\n        if (this._progressChecker != null) {\n            window.clearInterval(this._progressChecker);\n            this._progressChecker = null;\n        }\n        if (this._transmuxer) {\n            this.unload();\n        }\n        if (this._mediaElement) {\n            this.detachMediaElement();\n        }\n        this.e = null;\n        this._mediaDataSource = null;\n        this._emitter.removeAllListeners();\n        this._emitter = null;\n    };\n    FlvPlayer.prototype.on = function (event, listener) {\n        var _this = this;\n        if (event === _player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_INFO) {\n            if (this._mediaInfo != null) {\n                Promise.resolve().then(function () {\n                    _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_INFO, _this.mediaInfo);\n                });\n            }\n        }\n        else if (event === _player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.STATISTICS_INFO) {\n            if (this._statisticsInfo != null) {\n                Promise.resolve().then(function () {\n                    _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.STATISTICS_INFO, _this.statisticsInfo);\n                });\n            }\n        }\n        this._emitter.addListener(event, listener);\n    };\n    FlvPlayer.prototype.off = function (event, listener) {\n        this._emitter.removeListener(event, listener);\n    };\n    FlvPlayer.prototype.attachMediaElement = function (mediaElement) {\n        var _this = this;\n        this._mediaElement = mediaElement;\n        mediaElement.addEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n        mediaElement.addEventListener('seeking', this.e.onvSeeking);\n        mediaElement.addEventListener('canplay', this.e.onvCanPlay);\n        mediaElement.addEventListener('stalled', this.e.onvStalled);\n        mediaElement.addEventListener('progress', this.e.onvProgress);\n        this._msectl = new _core_mse_controller_js__WEBPACK_IMPORTED_MODULE_6__.default(this._config);\n        this._msectl.on(_core_mse_events_js__WEBPACK_IMPORTED_MODULE_7__.default.UPDATE_END, this._onmseUpdateEnd.bind(this));\n        this._msectl.on(_core_mse_events_js__WEBPACK_IMPORTED_MODULE_7__.default.BUFFER_FULL, this._onmseBufferFull.bind(this));\n        this._msectl.on(_core_mse_events_js__WEBPACK_IMPORTED_MODULE_7__.default.SOURCE_OPEN, function () {\n            _this._mseSourceOpened = true;\n            if (_this._hasPendingLoad) {\n                _this._hasPendingLoad = false;\n                _this.load();\n            }\n        });\n        this._msectl.on(_core_mse_events_js__WEBPACK_IMPORTED_MODULE_7__.default.ERROR, function (info) {\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.ERROR, _player_errors_js__WEBPACK_IMPORTED_MODULE_8__.ErrorTypes.MEDIA_ERROR, _player_errors_js__WEBPACK_IMPORTED_MODULE_8__.ErrorDetails.MEDIA_MSE_ERROR, info);\n        });\n        this._msectl.attachMediaElement(mediaElement);\n        if (this._pendingSeekTime != null) {\n            try {\n                mediaElement.currentTime = this._pendingSeekTime;\n                this._pendingSeekTime = null;\n            }\n            catch (e) {\n                // IE11 may throw InvalidStateError if readyState === 0\n                // We can defer set currentTime operation after loadedmetadata\n            }\n        }\n    };\n    FlvPlayer.prototype.detachMediaElement = function () {\n        if (this._mediaElement) {\n            this._msectl.detachMediaElement();\n            this._mediaElement.removeEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n            this._mediaElement.removeEventListener('seeking', this.e.onvSeeking);\n            this._mediaElement.removeEventListener('canplay', this.e.onvCanPlay);\n            this._mediaElement.removeEventListener('stalled', this.e.onvStalled);\n            this._mediaElement.removeEventListener('progress', this.e.onvProgress);\n            this._mediaElement = null;\n        }\n        if (this._msectl) {\n            this._msectl.destroy();\n            this._msectl = null;\n        }\n    };\n    FlvPlayer.prototype.load = function () {\n        var _this = this;\n        if (!this._mediaElement) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_10__.IllegalStateException('HTMLMediaElement must be attached before load()!');\n        }\n        if (this._transmuxer) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_10__.IllegalStateException('FlvPlayer.load() has been called, please call unload() first!');\n        }\n        if (this._hasPendingLoad) {\n            return;\n        }\n        if (this._config.deferLoadAfterSourceOpen && this._mseSourceOpened === false) {\n            this._hasPendingLoad = true;\n            return;\n        }\n        if (this._mediaElement.readyState > 0) {\n            this._requestSetTime = true;\n            // IE11 may throw InvalidStateError if readyState === 0\n            this._mediaElement.currentTime = 0;\n        }\n        this._transmuxer = new _core_transmuxer_js__WEBPACK_IMPORTED_MODULE_4__.default(this._mediaDataSource, this._config);\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.INIT_SEGMENT, function (type, is) {\n            _this._msectl.appendInitSegment(is);\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_SEGMENT, function (type, ms) {\n            _this._msectl.appendMediaSegment(ms);\n            // lazyLoad check\n            if (_this._config.lazyLoad && !_this._config.isLive) {\n                var currentTime = _this._mediaElement.currentTime;\n                if (ms.info.endDts >= (currentTime + _this._config.lazyLoadMaxDuration) * 1000) {\n                    if (_this._progressChecker == null) {\n                        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(_this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task');\n                        _this._suspendTransmuxer();\n                    }\n                }\n            }\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.LOADING_COMPLETE, function () {\n            _this._msectl.endOfStream();\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.LOADING_COMPLETE);\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOVERED_EARLY_EOF, function () {\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.RECOVERED_EARLY_EOF);\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.IO_ERROR, function (detail, info) {\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.ERROR, _player_errors_js__WEBPACK_IMPORTED_MODULE_8__.ErrorTypes.NETWORK_ERROR, detail, info);\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.DEMUX_ERROR, function (detail, info) {\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.ERROR, _player_errors_js__WEBPACK_IMPORTED_MODULE_8__.ErrorTypes.MEDIA_ERROR, detail, { code: -1, msg: info });\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.MEDIA_INFO, function (mediaInfo) {\n            _this._mediaInfo = mediaInfo;\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.MEDIA_INFO, Object.assign({}, mediaInfo));\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.METADATA_ARRIVED, function (metadata) {\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.METADATA_ARRIVED, metadata);\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.SCRIPTDATA_ARRIVED, function (data) {\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.SCRIPTDATA_ARRIVED, data);\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.STATISTICS_INFO, function (statInfo) {\n            _this._statisticsInfo = _this._fillStatisticsInfo(statInfo);\n            _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_3__.default.STATISTICS_INFO, Object.assign({}, _this._statisticsInfo));\n        });\n        this._transmuxer.on(_core_transmuxing_events_js__WEBPACK_IMPORTED_MODULE_5__.default.RECOMMEND_SEEKPOINT, function (milliseconds) {\n            if (_this._mediaElement && !_this._config.accurateSeek) {\n                _this._requestSetTime = true;\n                _this._mediaElement.currentTime = milliseconds / 1000;\n            }\n        });\n        this._transmuxer.open();\n    };\n    FlvPlayer.prototype.unload = function () {\n        if (this._mediaElement) {\n            this._mediaElement.pause();\n        }\n        if (this._msectl) {\n            this._msectl.seek(0);\n        }\n        if (this._transmuxer) {\n            this._transmuxer.close();\n            this._transmuxer.destroy();\n            this._transmuxer = null;\n        }\n    };\n    FlvPlayer.prototype.play = function () {\n        return this._mediaElement.play();\n    };\n    FlvPlayer.prototype.pause = function () {\n        this._mediaElement.pause();\n    };\n    Object.defineProperty(FlvPlayer.prototype, \"type\", {\n        get: function () {\n            return this._type;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"buffered\", {\n        get: function () {\n            return this._mediaElement.buffered;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"duration\", {\n        get: function () {\n            return this._mediaElement.duration;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"volume\", {\n        get: function () {\n            return this._mediaElement.volume;\n        },\n        set: function (value) {\n            this._mediaElement.volume = value;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"muted\", {\n        get: function () {\n            return this._mediaElement.muted;\n        },\n        set: function (muted) {\n            this._mediaElement.muted = muted;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"currentTime\", {\n        get: function () {\n            if (this._mediaElement) {\n                return this._mediaElement.currentTime;\n            }\n            return 0;\n        },\n        set: function (seconds) {\n            if (this._mediaElement) {\n                this._internalSeek(seconds);\n            }\n            else {\n                this._pendingSeekTime = seconds;\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"mediaInfo\", {\n        get: function () {\n            return Object.assign({}, this._mediaInfo);\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(FlvPlayer.prototype, \"statisticsInfo\", {\n        get: function () {\n            if (this._statisticsInfo == null) {\n                this._statisticsInfo = {};\n            }\n            this._statisticsInfo = this._fillStatisticsInfo(this._statisticsInfo);\n            return Object.assign({}, this._statisticsInfo);\n        },\n        enumerable: false,\n        configurable: true\n    });\n    FlvPlayer.prototype._fillStatisticsInfo = function (statInfo) {\n        statInfo.playerType = this._type;\n        if (!(this._mediaElement instanceof HTMLVideoElement)) {\n            return statInfo;\n        }\n        var hasQualityInfo = true;\n        var decoded = 0;\n        var dropped = 0;\n        if (this._mediaElement.getVideoPlaybackQuality) {\n            var quality = this._mediaElement.getVideoPlaybackQuality();\n            decoded = quality.totalVideoFrames;\n            dropped = quality.droppedVideoFrames;\n        }\n        else if (this._mediaElement.webkitDecodedFrameCount != undefined) {\n            decoded = this._mediaElement.webkitDecodedFrameCount;\n            dropped = this._mediaElement.webkitDroppedFrameCount;\n        }\n        else {\n            hasQualityInfo = false;\n        }\n        if (hasQualityInfo) {\n            statInfo.decodedFrames = decoded;\n            statInfo.droppedFrames = dropped;\n        }\n        return statInfo;\n    };\n    FlvPlayer.prototype._onmseUpdateEnd = function () {\n        if (!this._config.lazyLoad || this._config.isLive) {\n            return;\n        }\n        var buffered = this._mediaElement.buffered;\n        var currentTime = this._mediaElement.currentTime;\n        var currentRangeStart = 0;\n        var currentRangeEnd = 0;\n        for (var i = 0; i < buffered.length; i++) {\n            var start = buffered.start(i);\n            var end = buffered.end(i);\n            if (start <= currentTime && currentTime < end) {\n                currentRangeStart = start;\n                currentRangeEnd = end;\n                break;\n            }\n        }\n        if (currentRangeEnd >= currentTime + this._config.lazyLoadMaxDuration && this._progressChecker == null) {\n            _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'Maximum buffering duration exceeded, suspend transmuxing task');\n            this._suspendTransmuxer();\n        }\n    };\n    FlvPlayer.prototype._onmseBufferFull = function () {\n        _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'MSE SourceBuffer is full, suspend transmuxing task');\n        if (this._progressChecker == null) {\n            this._suspendTransmuxer();\n        }\n    };\n    FlvPlayer.prototype._suspendTransmuxer = function () {\n        if (this._transmuxer) {\n            this._transmuxer.pause();\n            if (this._progressChecker == null) {\n                this._progressChecker = window.setInterval(this._checkProgressAndResume.bind(this), 1000);\n            }\n        }\n    };\n    FlvPlayer.prototype._checkProgressAndResume = function () {\n        var currentTime = this._mediaElement.currentTime;\n        var buffered = this._mediaElement.buffered;\n        var needResume = false;\n        for (var i = 0; i < buffered.length; i++) {\n            var from = buffered.start(i);\n            var to = buffered.end(i);\n            if (currentTime >= from && currentTime < to) {\n                if (currentTime >= to - this._config.lazyLoadRecoverDuration) {\n                    needResume = true;\n                }\n                break;\n            }\n        }\n        if (needResume) {\n            window.clearInterval(this._progressChecker);\n            this._progressChecker = null;\n            if (needResume) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.v(this.TAG, 'Continue loading from paused position');\n                this._transmuxer.resume();\n            }\n        }\n    };\n    FlvPlayer.prototype._isTimepointBuffered = function (seconds) {\n        var buffered = this._mediaElement.buffered;\n        for (var i = 0; i < buffered.length; i++) {\n            var from = buffered.start(i);\n            var to = buffered.end(i);\n            if (seconds >= from && seconds < to) {\n                return true;\n            }\n        }\n        return false;\n    };\n    FlvPlayer.prototype._internalSeek = function (seconds) {\n        var directSeek = this._isTimepointBuffered(seconds);\n        var directSeekBegin = false;\n        var directSeekBeginTime = 0;\n        if (seconds < 1.0 && this._mediaElement.buffered.length > 0) {\n            var videoBeginTime = this._mediaElement.buffered.start(0);\n            if ((videoBeginTime < 1.0 && seconds < videoBeginTime) || _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari) {\n                directSeekBegin = true;\n                // also workaround for Safari: Seek to 0 may cause video stuck, use 0.1 to avoid\n                directSeekBeginTime = _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari ? 0.1 : videoBeginTime;\n            }\n        }\n        if (directSeekBegin) { // seek to video begin, set currentTime directly if beginPTS buffered\n            this._requestSetTime = true;\n            this._mediaElement.currentTime = directSeekBeginTime;\n        }\n        else if (directSeek) { // buffered position\n            if (!this._alwaysSeekKeyframe) {\n                this._requestSetTime = true;\n                this._mediaElement.currentTime = seconds;\n            }\n            else {\n                var idr = this._msectl.getNearestKeyframe(Math.floor(seconds * 1000));\n                this._requestSetTime = true;\n                if (idr != null) {\n                    this._mediaElement.currentTime = idr.dts / 1000;\n                }\n                else {\n                    this._mediaElement.currentTime = seconds;\n                }\n            }\n            if (this._progressChecker != null) {\n                this._checkProgressAndResume();\n            }\n        }\n        else {\n            if (this._progressChecker != null) {\n                window.clearInterval(this._progressChecker);\n                this._progressChecker = null;\n            }\n            this._msectl.seek(seconds);\n            this._transmuxer.seek(Math.floor(seconds * 1000)); // in milliseconds\n            // no need to set mediaElement.currentTime if non-accurateSeek,\n            // just wait for the recommend_seekpoint callback\n            if (this._config.accurateSeek) {\n                this._requestSetTime = true;\n                this._mediaElement.currentTime = seconds;\n            }\n        }\n    };\n    FlvPlayer.prototype._checkAndApplyUnbufferedSeekpoint = function () {\n        if (this._seekpointRecord) {\n            if (this._seekpointRecord.recordTime <= this._now() - 100) {\n                var target = this._mediaElement.currentTime;\n                this._seekpointRecord = null;\n                if (!this._isTimepointBuffered(target)) {\n                    if (this._progressChecker != null) {\n                        window.clearTimeout(this._progressChecker);\n                        this._progressChecker = null;\n                    }\n                    // .currentTime is consists with .buffered timestamp\n                    // Chrome/Edge use DTS, while FireFox/Safari use PTS\n                    this._msectl.seek(target);\n                    this._transmuxer.seek(Math.floor(target * 1000));\n                    // set currentTime if accurateSeek, or wait for recommend_seekpoint callback\n                    if (this._config.accurateSeek) {\n                        this._requestSetTime = true;\n                        this._mediaElement.currentTime = target;\n                    }\n                }\n            }\n            else {\n                window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);\n            }\n        }\n    };\n    FlvPlayer.prototype._checkAndResumeStuckPlayback = function (stalled) {\n        var media = this._mediaElement;\n        if (stalled || !this._receivedCanPlay || media.readyState < 2) { // HAVE_CURRENT_DATA\n            var buffered = media.buffered;\n            if (buffered.length > 0 && media.currentTime < buffered.start(0)) {\n                _utils_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.w(this.TAG, \"Playback seems stuck at \" + media.currentTime + \", seek to \" + buffered.start(0));\n                this._requestSetTime = true;\n                this._mediaElement.currentTime = buffered.start(0);\n                this._mediaElement.removeEventListener('progress', this.e.onvProgress);\n            }\n        }\n        else {\n            // Playback didn't stuck, remove progress event listener\n            this._mediaElement.removeEventListener('progress', this.e.onvProgress);\n        }\n    };\n    FlvPlayer.prototype._onvLoadedMetadata = function (e) {\n        if (this._pendingSeekTime != null) {\n            this._mediaElement.currentTime = this._pendingSeekTime;\n            this._pendingSeekTime = null;\n        }\n    };\n    FlvPlayer.prototype._onvSeeking = function (e) {\n        var target = this._mediaElement.currentTime;\n        var buffered = this._mediaElement.buffered;\n        if (this._requestSetTime) {\n            this._requestSetTime = false;\n            return;\n        }\n        if (target < 1.0 && buffered.length > 0) {\n            // seek to video begin, set currentTime directly if beginPTS buffered\n            var videoBeginTime = buffered.start(0);\n            if ((videoBeginTime < 1.0 && target < videoBeginTime) || _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari) {\n                this._requestSetTime = true;\n                // also workaround for Safari: Seek to 0 may cause video stuck, use 0.1 to avoid\n                this._mediaElement.currentTime = _utils_browser_js__WEBPACK_IMPORTED_MODULE_2__.default.safari ? 0.1 : videoBeginTime;\n                return;\n            }\n        }\n        if (this._isTimepointBuffered(target)) {\n            if (this._alwaysSeekKeyframe) {\n                var idr = this._msectl.getNearestKeyframe(Math.floor(target * 1000));\n                if (idr != null) {\n                    this._requestSetTime = true;\n                    this._mediaElement.currentTime = idr.dts / 1000;\n                }\n            }\n            if (this._progressChecker != null) {\n                this._checkProgressAndResume();\n            }\n            return;\n        }\n        this._seekpointRecord = {\n            seekPoint: target,\n            recordTime: this._now()\n        };\n        window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);\n    };\n    FlvPlayer.prototype._onvCanPlay = function (e) {\n        this._receivedCanPlay = true;\n        this._mediaElement.removeEventListener('canplay', this.e.onvCanPlay);\n    };\n    FlvPlayer.prototype._onvStalled = function (e) {\n        this._checkAndResumeStuckPlayback(true);\n    };\n    FlvPlayer.prototype._onvProgress = function (e) {\n        this._checkAndResumeStuckPlayback();\n    };\n    return FlvPlayer;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (FlvPlayer);\n\n\n/***/ }),\n\n/***/ \"./src/player/native-player.js\":\n/*!*************************************!*\\\n  !*** ./src/player/native-player.js ***!\n  \\*************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _player_events_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./player-events.js */ \"./src/player/player-events.js\");\n/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config.js */ \"./src/config.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n// Player wrapper for browser's native player (HTMLVideoElement) without MediaSource src. \nvar NativePlayer = /** @class */ (function () {\n    function NativePlayer(mediaDataSource, config) {\n        this.TAG = 'NativePlayer';\n        this._type = 'NativePlayer';\n        this._emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n        this._config = (0,_config_js__WEBPACK_IMPORTED_MODULE_2__.createDefaultConfig)();\n        if (typeof config === 'object') {\n            Object.assign(this._config, config);\n        }\n        if (mediaDataSource.type.toLowerCase() === 'flv') {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__.InvalidArgumentException('NativePlayer does\\'t support flv MediaDataSource input!');\n        }\n        if (mediaDataSource.hasOwnProperty('segments')) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__.InvalidArgumentException(\"NativePlayer(\" + mediaDataSource.type + \") doesn't support multipart playback!\");\n        }\n        this.e = {\n            onvLoadedMetadata: this._onvLoadedMetadata.bind(this)\n        };\n        this._pendingSeekTime = null;\n        this._statisticsReporter = null;\n        this._mediaDataSource = mediaDataSource;\n        this._mediaElement = null;\n    }\n    NativePlayer.prototype.destroy = function () {\n        if (this._mediaElement) {\n            this.unload();\n            this.detachMediaElement();\n        }\n        this.e = null;\n        this._mediaDataSource = null;\n        this._emitter.removeAllListeners();\n        this._emitter = null;\n    };\n    NativePlayer.prototype.on = function (event, listener) {\n        var _this = this;\n        if (event === _player_events_js__WEBPACK_IMPORTED_MODULE_1__.default.MEDIA_INFO) {\n            if (this._mediaElement != null && this._mediaElement.readyState !== 0) { // HAVE_NOTHING\n                Promise.resolve().then(function () {\n                    _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_1__.default.MEDIA_INFO, _this.mediaInfo);\n                });\n            }\n        }\n        else if (event === _player_events_js__WEBPACK_IMPORTED_MODULE_1__.default.STATISTICS_INFO) {\n            if (this._mediaElement != null && this._mediaElement.readyState !== 0) {\n                Promise.resolve().then(function () {\n                    _this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_1__.default.STATISTICS_INFO, _this.statisticsInfo);\n                });\n            }\n        }\n        this._emitter.addListener(event, listener);\n    };\n    NativePlayer.prototype.off = function (event, listener) {\n        this._emitter.removeListener(event, listener);\n    };\n    NativePlayer.prototype.attachMediaElement = function (mediaElement) {\n        this._mediaElement = mediaElement;\n        mediaElement.addEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n        if (this._pendingSeekTime != null) {\n            try {\n                mediaElement.currentTime = this._pendingSeekTime;\n                this._pendingSeekTime = null;\n            }\n            catch (e) {\n                // IE11 may throw InvalidStateError if readyState === 0\n                // Defer set currentTime operation after loadedmetadata\n            }\n        }\n    };\n    NativePlayer.prototype.detachMediaElement = function () {\n        if (this._mediaElement) {\n            this._mediaElement.src = '';\n            this._mediaElement.removeAttribute('src');\n            this._mediaElement.removeEventListener('loadedmetadata', this.e.onvLoadedMetadata);\n            this._mediaElement = null;\n        }\n        if (this._statisticsReporter != null) {\n            window.clearInterval(this._statisticsReporter);\n            this._statisticsReporter = null;\n        }\n    };\n    NativePlayer.prototype.load = function () {\n        if (!this._mediaElement) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_3__.IllegalStateException('HTMLMediaElement must be attached before load()!');\n        }\n        this._mediaElement.src = this._mediaDataSource.url;\n        if (this._mediaElement.readyState > 0) {\n            this._mediaElement.currentTime = 0;\n        }\n        this._mediaElement.preload = 'auto';\n        this._mediaElement.load();\n        this._statisticsReporter = window.setInterval(this._reportStatisticsInfo.bind(this), this._config.statisticsInfoReportInterval);\n    };\n    NativePlayer.prototype.unload = function () {\n        if (this._mediaElement) {\n            this._mediaElement.src = '';\n            this._mediaElement.removeAttribute('src');\n        }\n        if (this._statisticsReporter != null) {\n            window.clearInterval(this._statisticsReporter);\n            this._statisticsReporter = null;\n        }\n    };\n    NativePlayer.prototype.play = function () {\n        return this._mediaElement.play();\n    };\n    NativePlayer.prototype.pause = function () {\n        this._mediaElement.pause();\n    };\n    Object.defineProperty(NativePlayer.prototype, \"type\", {\n        get: function () {\n            return this._type;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"buffered\", {\n        get: function () {\n            return this._mediaElement.buffered;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"duration\", {\n        get: function () {\n            return this._mediaElement.duration;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"volume\", {\n        get: function () {\n            return this._mediaElement.volume;\n        },\n        set: function (value) {\n            this._mediaElement.volume = value;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"muted\", {\n        get: function () {\n            return this._mediaElement.muted;\n        },\n        set: function (muted) {\n            this._mediaElement.muted = muted;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"currentTime\", {\n        get: function () {\n            if (this._mediaElement) {\n                return this._mediaElement.currentTime;\n            }\n            return 0;\n        },\n        set: function (seconds) {\n            if (this._mediaElement) {\n                this._mediaElement.currentTime = seconds;\n            }\n            else {\n                this._pendingSeekTime = seconds;\n            }\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"mediaInfo\", {\n        get: function () {\n            var mediaPrefix = (this._mediaElement instanceof HTMLAudioElement) ? 'audio/' : 'video/';\n            var info = {\n                mimeType: mediaPrefix + this._mediaDataSource.type\n            };\n            if (this._mediaElement) {\n                info.duration = Math.floor(this._mediaElement.duration * 1000);\n                if (this._mediaElement instanceof HTMLVideoElement) {\n                    info.width = this._mediaElement.videoWidth;\n                    info.height = this._mediaElement.videoHeight;\n                }\n            }\n            return info;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(NativePlayer.prototype, \"statisticsInfo\", {\n        get: function () {\n            var info = {\n                playerType: this._type,\n                url: this._mediaDataSource.url\n            };\n            if (!(this._mediaElement instanceof HTMLVideoElement)) {\n                return info;\n            }\n            var hasQualityInfo = true;\n            var decoded = 0;\n            var dropped = 0;\n            if (this._mediaElement.getVideoPlaybackQuality) {\n                var quality = this._mediaElement.getVideoPlaybackQuality();\n                decoded = quality.totalVideoFrames;\n                dropped = quality.droppedVideoFrames;\n            }\n            else if (this._mediaElement.webkitDecodedFrameCount != undefined) {\n                decoded = this._mediaElement.webkitDecodedFrameCount;\n                dropped = this._mediaElement.webkitDroppedFrameCount;\n            }\n            else {\n                hasQualityInfo = false;\n            }\n            if (hasQualityInfo) {\n                info.decodedFrames = decoded;\n                info.droppedFrames = dropped;\n            }\n            return info;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    NativePlayer.prototype._onvLoadedMetadata = function (e) {\n        if (this._pendingSeekTime != null) {\n            this._mediaElement.currentTime = this._pendingSeekTime;\n            this._pendingSeekTime = null;\n        }\n        this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_1__.default.MEDIA_INFO, this.mediaInfo);\n    };\n    NativePlayer.prototype._reportStatisticsInfo = function () {\n        this._emitter.emit(_player_events_js__WEBPACK_IMPORTED_MODULE_1__.default.STATISTICS_INFO, this.statisticsInfo);\n    };\n    return NativePlayer;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (NativePlayer);\n\n\n/***/ }),\n\n/***/ \"./src/player/player-errors.js\":\n/*!*************************************!*\\\n  !*** ./src/player/player-errors.js ***!\n  \\*************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"ErrorTypes\": function() { return /* binding */ ErrorTypes; },\n/* harmony export */   \"ErrorDetails\": function() { return /* binding */ ErrorDetails; }\n/* harmony export */ });\n/* harmony import */ var _io_loader_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../io/loader.js */ \"./src/io/loader.js\");\n/* harmony import */ var _demux_demux_errors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../demux/demux-errors.js */ \"./src/demux/demux-errors.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar ErrorTypes = {\n    NETWORK_ERROR: 'NetworkError',\n    MEDIA_ERROR: 'MediaError',\n    OTHER_ERROR: 'OtherError'\n};\nvar ErrorDetails = {\n    NETWORK_EXCEPTION: _io_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.EXCEPTION,\n    NETWORK_STATUS_CODE_INVALID: _io_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.HTTP_STATUS_CODE_INVALID,\n    NETWORK_TIMEOUT: _io_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.CONNECTING_TIMEOUT,\n    NETWORK_UNRECOVERABLE_EARLY_EOF: _io_loader_js__WEBPACK_IMPORTED_MODULE_0__.LoaderErrors.UNRECOVERABLE_EARLY_EOF,\n    MEDIA_MSE_ERROR: 'MediaMSEError',\n    MEDIA_FORMAT_ERROR: _demux_demux_errors_js__WEBPACK_IMPORTED_MODULE_1__.default.FORMAT_ERROR,\n    MEDIA_FORMAT_UNSUPPORTED: _demux_demux_errors_js__WEBPACK_IMPORTED_MODULE_1__.default.FORMAT_UNSUPPORTED,\n    MEDIA_CODEC_UNSUPPORTED: _demux_demux_errors_js__WEBPACK_IMPORTED_MODULE_1__.default.CODEC_UNSUPPORTED\n};\n\n\n/***/ }),\n\n/***/ \"./src/player/player-events.js\":\n/*!*************************************!*\\\n  !*** ./src/player/player-events.js ***!\n  \\*************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar PlayerEvents = {\n    ERROR: 'error',\n    LOADING_COMPLETE: 'loading_complete',\n    RECOVERED_EARLY_EOF: 'recovered_early_eof',\n    MEDIA_INFO: 'media_info',\n    METADATA_ARRIVED: 'metadata_arrived',\n    SCRIPTDATA_ARRIVED: 'scriptdata_arrived',\n    STATISTICS_INFO: 'statistics_info'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PlayerEvents);\n\n\n/***/ }),\n\n/***/ \"./src/remux/aac-silent.js\":\n/*!*********************************!*\\\n  !*** ./src/remux/aac-silent.js ***!\n  \\*********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * This file is modified from dailymotion's hls.js library (hls.js/src/helper/aac.js)\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar AAC = /** @class */ (function () {\n    function AAC() {\n    }\n    AAC.getSilentFrame = function (codec, channelCount) {\n        if (codec === 'mp4a.40.2') {\n            // handle LC-AAC\n            if (channelCount === 1) {\n                return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x23, 0x80]);\n            }\n            else if (channelCount === 2) {\n                return new Uint8Array([0x21, 0x00, 0x49, 0x90, 0x02, 0x19, 0x00, 0x23, 0x80]);\n            }\n            else if (channelCount === 3) {\n                return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x8e]);\n            }\n            else if (channelCount === 4) {\n                return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x80, 0x2c, 0x80, 0x08, 0x02, 0x38]);\n            }\n            else if (channelCount === 5) {\n                return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x38]);\n            }\n            else if (channelCount === 6) {\n                return new Uint8Array([0x00, 0xc8, 0x00, 0x80, 0x20, 0x84, 0x01, 0x26, 0x40, 0x08, 0x64, 0x00, 0x82, 0x30, 0x04, 0x99, 0x00, 0x21, 0x90, 0x02, 0x00, 0xb2, 0x00, 0x20, 0x08, 0xe0]);\n            }\n        }\n        else {\n            // handle HE-AAC (mp4a.40.5 / mp4a.40.29)\n            if (channelCount === 1) {\n                // ffmpeg -y -f lavfi -i \"aevalsrc=0:d=0.05\" -c:a libfdk_aac -profile:a aac_he -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n                return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x4e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x1c, 0x6, 0xf1, 0xc1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n            }\n            else if (channelCount === 2) {\n                // ffmpeg -y -f lavfi -i \"aevalsrc=0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n                return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n            }\n            else if (channelCount === 3) {\n                // ffmpeg -y -f lavfi -i \"aevalsrc=0|0|0:d=0.05\" -c:a libfdk_aac -profile:a aac_he_v2 -b:a 4k output.aac && hexdump -v -e '16/1 \"0x%x,\" \"\\n\"' -v output.aac\n                return new Uint8Array([0x1, 0x40, 0x22, 0x80, 0xa3, 0x5e, 0xe6, 0x80, 0xba, 0x8, 0x0, 0x0, 0x0, 0x0, 0x95, 0x0, 0x6, 0xf1, 0xa1, 0xa, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5e]);\n            }\n        }\n        return null;\n    };\n    return AAC;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (AAC);\n\n\n/***/ }),\n\n/***/ \"./src/remux/mp4-generator.js\":\n/*!************************************!*\\\n  !*** ./src/remux/mp4-generator.js ***!\n  \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * This file is derived from dailymotion's hls.js library (hls.js/src/remux/mp4-generator.js)\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//  MP4 boxes generator for ISO BMFF (ISO Base Media File Format, defined in ISO/IEC 14496-12)\nvar MP4 = /** @class */ (function () {\n    function MP4() {\n    }\n    MP4.init = function () {\n        MP4.types = {\n            avc1: [], avcC: [], btrt: [], dinf: [],\n            dref: [], esds: [], ftyp: [], hdlr: [],\n            mdat: [], mdhd: [], mdia: [], mfhd: [],\n            minf: [], moof: [], moov: [], mp4a: [],\n            mvex: [], mvhd: [], sdtp: [], stbl: [],\n            stco: [], stsc: [], stsd: [], stsz: [],\n            stts: [], tfdt: [], tfhd: [], traf: [],\n            trak: [], trun: [], trex: [], tkhd: [],\n            vmhd: [], smhd: [], '.mp3': []\n        };\n        for (var name_1 in MP4.types) {\n            if (MP4.types.hasOwnProperty(name_1)) {\n                MP4.types[name_1] = [\n                    name_1.charCodeAt(0),\n                    name_1.charCodeAt(1),\n                    name_1.charCodeAt(2),\n                    name_1.charCodeAt(3)\n                ];\n            }\n        }\n        var constants = MP4.constants = {};\n        constants.FTYP = new Uint8Array([\n            0x69, 0x73, 0x6F, 0x6D,\n            0x0, 0x0, 0x0, 0x1,\n            0x69, 0x73, 0x6F, 0x6D,\n            0x61, 0x76, 0x63, 0x31 // avc1\n        ]);\n        constants.STSD_PREFIX = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01 // entry_count\n        ]);\n        constants.STTS = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00 // entry_count\n        ]);\n        constants.STSC = constants.STCO = constants.STTS;\n        constants.STSZ = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00 // sample_count\n        ]);\n        constants.HDLR_VIDEO = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x76, 0x69, 0x64, 0x65,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x56, 0x69, 0x64, 0x65,\n            0x6F, 0x48, 0x61, 0x6E,\n            0x64, 0x6C, 0x65, 0x72, 0x00 // name: VideoHandler\n        ]);\n        constants.HDLR_AUDIO = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x73, 0x6F, 0x75, 0x6E,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x53, 0x6F, 0x75, 0x6E,\n            0x64, 0x48, 0x61, 0x6E,\n            0x64, 0x6C, 0x65, 0x72, 0x00 // name: SoundHandler\n        ]);\n        constants.DREF = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x0C,\n            0x75, 0x72, 0x6C, 0x20,\n            0x00, 0x00, 0x00, 0x01 // version(0) + flags\n        ]);\n        // Sound media header\n        constants.SMHD = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00 // balance(2) + reserved(2)\n        ]);\n        // video media header\n        constants.VMHD = new Uint8Array([\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00\n        ]);\n    };\n    // Generate a box\n    MP4.box = function (type) {\n        var size = 8;\n        var result = null;\n        var datas = Array.prototype.slice.call(arguments, 1);\n        var arrayCount = datas.length;\n        for (var i = 0; i < arrayCount; i++) {\n            size += datas[i].byteLength;\n        }\n        result = new Uint8Array(size);\n        result[0] = (size >>> 24) & 0xFF; // size\n        result[1] = (size >>> 16) & 0xFF;\n        result[2] = (size >>> 8) & 0xFF;\n        result[3] = (size) & 0xFF;\n        result.set(type, 4); // type\n        var offset = 8;\n        for (var i = 0; i < arrayCount; i++) { // data body\n            result.set(datas[i], offset);\n            offset += datas[i].byteLength;\n        }\n        return result;\n    };\n    // emit ftyp & moov\n    MP4.generateInitSegment = function (meta) {\n        var ftyp = MP4.box(MP4.types.ftyp, MP4.constants.FTYP);\n        var moov = MP4.moov(meta);\n        var result = new Uint8Array(ftyp.byteLength + moov.byteLength);\n        result.set(ftyp, 0);\n        result.set(moov, ftyp.byteLength);\n        return result;\n    };\n    // Movie metadata box\n    MP4.moov = function (meta) {\n        var mvhd = MP4.mvhd(meta.timescale, meta.duration);\n        var trak = MP4.trak(meta);\n        var mvex = MP4.mvex(meta);\n        return MP4.box(MP4.types.moov, mvhd, trak, mvex);\n    };\n    // Movie header box\n    MP4.mvhd = function (timescale, duration) {\n        return MP4.box(MP4.types.mvhd, new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            (timescale >>> 24) & 0xFF,\n            (timescale >>> 16) & 0xFF,\n            (timescale >>> 8) & 0xFF,\n            (timescale) & 0xFF,\n            (duration >>> 24) & 0xFF,\n            (duration >>> 16) & 0xFF,\n            (duration >>> 8) & 0xFF,\n            (duration) & 0xFF,\n            0x00, 0x01, 0x00, 0x00,\n            0x01, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x40, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0xFF, 0xFF, 0xFF, 0xFF // next_track_ID\n        ]));\n    };\n    // Track box\n    MP4.trak = function (meta) {\n        return MP4.box(MP4.types.trak, MP4.tkhd(meta), MP4.mdia(meta));\n    };\n    // Track header box\n    MP4.tkhd = function (meta) {\n        var trackId = meta.id, duration = meta.duration;\n        var width = meta.presentWidth, height = meta.presentHeight;\n        return MP4.box(MP4.types.tkhd, new Uint8Array([\n            0x00, 0x00, 0x00, 0x07,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            (trackId >>> 24) & 0xFF,\n            (trackId >>> 16) & 0xFF,\n            (trackId >>> 8) & 0xFF,\n            (trackId) & 0xFF,\n            0x00, 0x00, 0x00, 0x00,\n            (duration >>> 24) & 0xFF,\n            (duration >>> 16) & 0xFF,\n            (duration >>> 8) & 0xFF,\n            (duration) & 0xFF,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x40, 0x00, 0x00, 0x00,\n            (width >>> 8) & 0xFF,\n            (width) & 0xFF,\n            0x00, 0x00,\n            (height >>> 8) & 0xFF,\n            (height) & 0xFF,\n            0x00, 0x00\n        ]));\n    };\n    // Media Box\n    MP4.mdia = function (meta) {\n        return MP4.box(MP4.types.mdia, MP4.mdhd(meta), MP4.hdlr(meta), MP4.minf(meta));\n    };\n    // Media header box\n    MP4.mdhd = function (meta) {\n        var timescale = meta.timescale;\n        var duration = meta.duration;\n        return MP4.box(MP4.types.mdhd, new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            (timescale >>> 24) & 0xFF,\n            (timescale >>> 16) & 0xFF,\n            (timescale >>> 8) & 0xFF,\n            (timescale) & 0xFF,\n            (duration >>> 24) & 0xFF,\n            (duration >>> 16) & 0xFF,\n            (duration >>> 8) & 0xFF,\n            (duration) & 0xFF,\n            0x55, 0xC4,\n            0x00, 0x00 // pre_defined = 0\n        ]));\n    };\n    // Media handler reference box\n    MP4.hdlr = function (meta) {\n        var data = null;\n        if (meta.type === 'audio') {\n            data = MP4.constants.HDLR_AUDIO;\n        }\n        else {\n            data = MP4.constants.HDLR_VIDEO;\n        }\n        return MP4.box(MP4.types.hdlr, data);\n    };\n    // Media infomation box\n    MP4.minf = function (meta) {\n        var xmhd = null;\n        if (meta.type === 'audio') {\n            xmhd = MP4.box(MP4.types.smhd, MP4.constants.SMHD);\n        }\n        else {\n            xmhd = MP4.box(MP4.types.vmhd, MP4.constants.VMHD);\n        }\n        return MP4.box(MP4.types.minf, xmhd, MP4.dinf(), MP4.stbl(meta));\n    };\n    // Data infomation box\n    MP4.dinf = function () {\n        var result = MP4.box(MP4.types.dinf, MP4.box(MP4.types.dref, MP4.constants.DREF));\n        return result;\n    };\n    // Sample table box\n    MP4.stbl = function (meta) {\n        var result = MP4.box(MP4.types.stbl, // type: stbl\n        MP4.stsd(meta), // Sample Description Table\n        MP4.box(MP4.types.stts, MP4.constants.STTS), // Time-To-Sample\n        MP4.box(MP4.types.stsc, MP4.constants.STSC), // Sample-To-Chunk\n        MP4.box(MP4.types.stsz, MP4.constants.STSZ), // Sample size\n        MP4.box(MP4.types.stco, MP4.constants.STCO) // Chunk offset\n        );\n        return result;\n    };\n    // Sample description box\n    MP4.stsd = function (meta) {\n        if (meta.type === 'audio') {\n            if (meta.codec === 'mp3') {\n                return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp3(meta));\n            }\n            // else: aac -> mp4a\n            return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.mp4a(meta));\n        }\n        else {\n            return MP4.box(MP4.types.stsd, MP4.constants.STSD_PREFIX, MP4.avc1(meta));\n        }\n    };\n    MP4.mp3 = function (meta) {\n        var channelCount = meta.channelCount;\n        var sampleRate = meta.audioSampleRate;\n        var data = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, channelCount,\n            0x00, 0x10,\n            0x00, 0x00, 0x00, 0x00,\n            (sampleRate >>> 8) & 0xFF,\n            (sampleRate) & 0xFF,\n            0x00, 0x00\n        ]);\n        return MP4.box(MP4.types['.mp3'], data);\n    };\n    MP4.mp4a = function (meta) {\n        var channelCount = meta.channelCount;\n        var sampleRate = meta.audioSampleRate;\n        var data = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, channelCount,\n            0x00, 0x10,\n            0x00, 0x00, 0x00, 0x00,\n            (sampleRate >>> 8) & 0xFF,\n            (sampleRate) & 0xFF,\n            0x00, 0x00\n        ]);\n        return MP4.box(MP4.types.mp4a, data, MP4.esds(meta));\n    };\n    MP4.esds = function (meta) {\n        var config = meta.config || [];\n        var configSize = config.length;\n        var data = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x03,\n            0x17 + configSize,\n            0x00, 0x01,\n            0x00,\n            0x04,\n            0x0F + configSize,\n            0x40,\n            0x15,\n            0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x05 // descriptor_type\n        ].concat([\n            configSize\n        ]).concat(config).concat([\n            0x06, 0x01, 0x02 // GASpecificConfig\n        ]));\n        return MP4.box(MP4.types.esds, data);\n    };\n    MP4.avc1 = function (meta) {\n        var avcc = meta.avcc;\n        var width = meta.codecWidth, height = meta.codecHeight;\n        var data = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            (width >>> 8) & 0xFF,\n            (width) & 0xFF,\n            (height >>> 8) & 0xFF,\n            (height) & 0xFF,\n            0x00, 0x48, 0x00, 0x00,\n            0x00, 0x48, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01,\n            0x0A,\n            0x78, 0x71, 0x71, 0x2F,\n            0x66, 0x6C, 0x76, 0x2E,\n            0x6A, 0x73, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00,\n            0x00, 0x18,\n            0xFF, 0xFF // pre_defined = -1\n        ]);\n        return MP4.box(MP4.types.avc1, data, MP4.box(MP4.types.avcC, avcc));\n    };\n    // Movie Extends box\n    MP4.mvex = function (meta) {\n        return MP4.box(MP4.types.mvex, MP4.trex(meta));\n    };\n    // Track Extends box\n    MP4.trex = function (meta) {\n        var trackId = meta.id;\n        var data = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            (trackId >>> 24) & 0xFF,\n            (trackId >>> 16) & 0xFF,\n            (trackId >>> 8) & 0xFF,\n            (trackId) & 0xFF,\n            0x00, 0x00, 0x00, 0x01,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x00, 0x00, 0x00,\n            0x00, 0x01, 0x00, 0x01 // default_sample_flags\n        ]);\n        return MP4.box(MP4.types.trex, data);\n    };\n    // Movie fragment box\n    MP4.moof = function (track, baseMediaDecodeTime) {\n        return MP4.box(MP4.types.moof, MP4.mfhd(track.sequenceNumber), MP4.traf(track, baseMediaDecodeTime));\n    };\n    MP4.mfhd = function (sequenceNumber) {\n        var data = new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            (sequenceNumber >>> 24) & 0xFF,\n            (sequenceNumber >>> 16) & 0xFF,\n            (sequenceNumber >>> 8) & 0xFF,\n            (sequenceNumber) & 0xFF\n        ]);\n        return MP4.box(MP4.types.mfhd, data);\n    };\n    // Track fragment box\n    MP4.traf = function (track, baseMediaDecodeTime) {\n        var trackId = track.id;\n        // Track fragment header box\n        var tfhd = MP4.box(MP4.types.tfhd, new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            (trackId >>> 24) & 0xFF,\n            (trackId >>> 16) & 0xFF,\n            (trackId >>> 8) & 0xFF,\n            (trackId) & 0xFF\n        ]));\n        // Track Fragment Decode Time\n        var tfdt = MP4.box(MP4.types.tfdt, new Uint8Array([\n            0x00, 0x00, 0x00, 0x00,\n            (baseMediaDecodeTime >>> 24) & 0xFF,\n            (baseMediaDecodeTime >>> 16) & 0xFF,\n            (baseMediaDecodeTime >>> 8) & 0xFF,\n            (baseMediaDecodeTime) & 0xFF\n        ]));\n        var sdtp = MP4.sdtp(track);\n        var trun = MP4.trun(track, sdtp.byteLength + 16 + 16 + 8 + 16 + 8 + 8);\n        return MP4.box(MP4.types.traf, tfhd, tfdt, trun, sdtp);\n    };\n    // Sample Dependency Type box\n    MP4.sdtp = function (track) {\n        var samples = track.samples || [];\n        var sampleCount = samples.length;\n        var data = new Uint8Array(4 + sampleCount);\n        // 0~4 bytes: version(0) & flags\n        for (var i = 0; i < sampleCount; i++) {\n            var flags = samples[i].flags;\n            data[i + 4] = (flags.isLeading << 6) // is_leading: 2 (bit)\n                | (flags.dependsOn << 4) // sample_depends_on\n                | (flags.isDependedOn << 2) // sample_is_depended_on\n                | (flags.hasRedundancy); // sample_has_redundancy\n        }\n        return MP4.box(MP4.types.sdtp, data);\n    };\n    // Track fragment run box\n    MP4.trun = function (track, offset) {\n        var samples = track.samples || [];\n        var sampleCount = samples.length;\n        var dataSize = 12 + 16 * sampleCount;\n        var data = new Uint8Array(dataSize);\n        offset += 8 + dataSize;\n        data.set([\n            0x00, 0x00, 0x0F, 0x01,\n            (sampleCount >>> 24) & 0xFF,\n            (sampleCount >>> 16) & 0xFF,\n            (sampleCount >>> 8) & 0xFF,\n            (sampleCount) & 0xFF,\n            (offset >>> 24) & 0xFF,\n            (offset >>> 16) & 0xFF,\n            (offset >>> 8) & 0xFF,\n            (offset) & 0xFF\n        ], 0);\n        for (var i = 0; i < sampleCount; i++) {\n            var duration = samples[i].duration;\n            var size = samples[i].size;\n            var flags = samples[i].flags;\n            var cts = samples[i].cts;\n            data.set([\n                (duration >>> 24) & 0xFF,\n                (duration >>> 16) & 0xFF,\n                (duration >>> 8) & 0xFF,\n                (duration) & 0xFF,\n                (size >>> 24) & 0xFF,\n                (size >>> 16) & 0xFF,\n                (size >>> 8) & 0xFF,\n                (size) & 0xFF,\n                (flags.isLeading << 2) | flags.dependsOn,\n                (flags.isDependedOn << 6) | (flags.hasRedundancy << 4) | flags.isNonSync,\n                0x00, 0x00,\n                (cts >>> 24) & 0xFF,\n                (cts >>> 16) & 0xFF,\n                (cts >>> 8) & 0xFF,\n                (cts) & 0xFF\n            ], 12 + 16 * i);\n        }\n        return MP4.box(MP4.types.trun, data);\n    };\n    MP4.mdat = function (data) {\n        return MP4.box(MP4.types.mdat, data);\n    };\n    return MP4;\n}());\nMP4.init();\n/* harmony default export */ __webpack_exports__[\"default\"] = (MP4);\n\n\n/***/ }),\n\n/***/ \"./src/remux/mp4-remuxer.js\":\n/*!**********************************!*\\\n  !*** ./src/remux/mp4-remuxer.js ***!\n  \\**********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/logger.js */ \"./src/utils/logger.js\");\n/* harmony import */ var _mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mp4-generator.js */ \"./src/remux/mp4-generator.js\");\n/* harmony import */ var _aac_silent_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./aac-silent.js */ \"./src/remux/aac-silent.js\");\n/* harmony import */ var _utils_browser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/browser.js */ \"./src/utils/browser.js\");\n/* harmony import */ var _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/media-segment-info.js */ \"./src/core/media-segment-info.js\");\n/* harmony import */ var _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/exception.js */ \"./src/utils/exception.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n\n\n\n\n// Fragmented mp4 remuxer\nvar MP4Remuxer = /** @class */ (function () {\n    function MP4Remuxer(config) {\n        this.TAG = 'MP4Remuxer';\n        this._config = config;\n        this._isLive = (config.isLive === true) ? true : false;\n        this._dtsBase = -1;\n        this._dtsBaseInited = false;\n        this._audioDtsBase = Infinity;\n        this._videoDtsBase = Infinity;\n        this._audioNextDts = undefined;\n        this._videoNextDts = undefined;\n        this._audioStashedLastSample = null;\n        this._videoStashedLastSample = null;\n        this._audioMeta = null;\n        this._videoMeta = null;\n        this._audioSegmentInfoList = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.MediaSegmentInfoList('audio');\n        this._videoSegmentInfoList = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.MediaSegmentInfoList('video');\n        this._onInitSegment = null;\n        this._onMediaSegment = null;\n        // Workaround for chrome < 50: Always force first sample as a Random Access Point in media segment\n        // see https://bugs.chromium.org/p/chromium/issues/detail?id=229412\n        this._forceFirstIDR = (_utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.chrome &&\n            (_utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.version.major < 50 ||\n                (_utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.version.major === 50 && _utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.version.build < 2661))) ? true : false;\n        // Workaround for IE11/Edge: Fill silent aac frame after keyframe-seeking\n        // Make audio beginDts equals with video beginDts, in order to fix seek freeze\n        this._fillSilentAfterSeek = (_utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.msedge || _utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.msie);\n        // While only FireFox supports 'audio/mp4, codecs=\"mp3\"', use 'audio/mpeg' for chrome, safari, ...\n        this._mp3UseMpegAudio = !_utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.firefox;\n        this._fillAudioTimestampGap = this._config.fixAudioTimestampGap;\n    }\n    MP4Remuxer.prototype.destroy = function () {\n        this._dtsBase = -1;\n        this._dtsBaseInited = false;\n        this._audioMeta = null;\n        this._videoMeta = null;\n        this._audioSegmentInfoList.clear();\n        this._audioSegmentInfoList = null;\n        this._videoSegmentInfoList.clear();\n        this._videoSegmentInfoList = null;\n        this._onInitSegment = null;\n        this._onMediaSegment = null;\n    };\n    MP4Remuxer.prototype.bindDataSource = function (producer) {\n        producer.onDataAvailable = this.remux.bind(this);\n        producer.onTrackMetadata = this._onTrackMetadataReceived.bind(this);\n        return this;\n    };\n    Object.defineProperty(MP4Remuxer.prototype, \"onInitSegment\", {\n        /* prototype: function onInitSegment(type: string, initSegment: ArrayBuffer): void\n           InitSegment: {\n               type: string,\n               data: ArrayBuffer,\n               codec: string,\n               container: string\n           }\n        */\n        get: function () {\n            return this._onInitSegment;\n        },\n        set: function (callback) {\n            this._onInitSegment = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(MP4Remuxer.prototype, \"onMediaSegment\", {\n        /* prototype: function onMediaSegment(type: string, mediaSegment: MediaSegment): void\n           MediaSegment: {\n               type: string,\n               data: ArrayBuffer,\n               sampleCount: int32\n               info: MediaSegmentInfo\n           }\n        */\n        get: function () {\n            return this._onMediaSegment;\n        },\n        set: function (callback) {\n            this._onMediaSegment = callback;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    MP4Remuxer.prototype.insertDiscontinuity = function () {\n        this._audioNextDts = this._videoNextDts = undefined;\n    };\n    MP4Remuxer.prototype.seek = function (originalDts) {\n        this._audioStashedLastSample = null;\n        this._videoStashedLastSample = null;\n        this._videoSegmentInfoList.clear();\n        this._audioSegmentInfoList.clear();\n    };\n    MP4Remuxer.prototype.remux = function (audioTrack, videoTrack) {\n        if (!this._onMediaSegment) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__.IllegalStateException('MP4Remuxer: onMediaSegment callback must be specificed!');\n        }\n        if (!this._dtsBaseInited) {\n            this._calculateDtsBase(audioTrack, videoTrack);\n        }\n        this._remuxVideo(videoTrack);\n        this._remuxAudio(audioTrack);\n    };\n    MP4Remuxer.prototype._onTrackMetadataReceived = function (type, metadata) {\n        var metabox = null;\n        var container = 'mp4';\n        var codec = metadata.codec;\n        if (type === 'audio') {\n            this._audioMeta = metadata;\n            if (metadata.codec === 'mp3' && this._mp3UseMpegAudio) {\n                // 'audio/mpeg' for MP3 audio track\n                container = 'mpeg';\n                codec = '';\n                metabox = new Uint8Array();\n            }\n            else {\n                // 'audio/mp4, codecs=\"codec\"'\n                metabox = _mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__.default.generateInitSegment(metadata);\n            }\n        }\n        else if (type === 'video') {\n            this._videoMeta = metadata;\n            metabox = _mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__.default.generateInitSegment(metadata);\n        }\n        else {\n            return;\n        }\n        // dispatch metabox (Initialization Segment)\n        if (!this._onInitSegment) {\n            throw new _utils_exception_js__WEBPACK_IMPORTED_MODULE_5__.IllegalStateException('MP4Remuxer: onInitSegment callback must be specified!');\n        }\n        this._onInitSegment(type, {\n            type: type,\n            data: metabox.buffer,\n            codec: codec,\n            container: type + \"/\" + container,\n            mediaDuration: metadata.duration // in timescale 1000 (milliseconds)\n        });\n    };\n    MP4Remuxer.prototype._calculateDtsBase = function (audioTrack, videoTrack) {\n        if (this._dtsBaseInited) {\n            return;\n        }\n        if (audioTrack.samples && audioTrack.samples.length) {\n            this._audioDtsBase = audioTrack.samples[0].dts;\n        }\n        if (videoTrack.samples && videoTrack.samples.length) {\n            this._videoDtsBase = videoTrack.samples[0].dts;\n        }\n        this._dtsBase = Math.min(this._audioDtsBase, this._videoDtsBase);\n        this._dtsBaseInited = true;\n    };\n    MP4Remuxer.prototype.flushStashedSamples = function () {\n        var videoSample = this._videoStashedLastSample;\n        var audioSample = this._audioStashedLastSample;\n        var videoTrack = {\n            type: 'video',\n            id: 1,\n            sequenceNumber: 0,\n            samples: [],\n            length: 0\n        };\n        if (videoSample != null) {\n            videoTrack.samples.push(videoSample);\n            videoTrack.length = videoSample.length;\n        }\n        var audioTrack = {\n            type: 'audio',\n            id: 2,\n            sequenceNumber: 0,\n            samples: [],\n            length: 0\n        };\n        if (audioSample != null) {\n            audioTrack.samples.push(audioSample);\n            audioTrack.length = audioSample.length;\n        }\n        this._videoStashedLastSample = null;\n        this._audioStashedLastSample = null;\n        this._remuxVideo(videoTrack, true);\n        this._remuxAudio(audioTrack, true);\n    };\n    MP4Remuxer.prototype._remuxAudio = function (audioTrack, force) {\n        if (this._audioMeta == null) {\n            return;\n        }\n        var track = audioTrack;\n        var samples = track.samples;\n        var dtsCorrection = undefined;\n        var firstDts = -1, lastDts = -1, lastPts = -1;\n        var refSampleDuration = this._audioMeta.refSampleDuration;\n        var mpegRawTrack = this._audioMeta.codec === 'mp3' && this._mp3UseMpegAudio;\n        var firstSegmentAfterSeek = this._dtsBaseInited && this._audioNextDts === undefined;\n        var insertPrefixSilentFrame = false;\n        if (!samples || samples.length === 0) {\n            return;\n        }\n        if (samples.length === 1 && !force) {\n            // If [sample count in current batch] === 1 && (force != true)\n            // Ignore and keep in demuxer's queue\n            return;\n        } // else if (force === true) do remux\n        var offset = 0;\n        var mdatbox = null;\n        var mdatBytes = 0;\n        // calculate initial mdat size\n        if (mpegRawTrack) {\n            // for raw mpeg buffer\n            offset = 0;\n            mdatBytes = track.length;\n        }\n        else {\n            // for fmp4 mdat box\n            offset = 8; // size + type\n            mdatBytes = 8 + track.length;\n        }\n        var lastSample = null;\n        // Pop the lastSample and waiting for stash\n        if (samples.length > 1) {\n            lastSample = samples.pop();\n            mdatBytes -= lastSample.length;\n        }\n        // Insert [stashed lastSample in the previous batch] to the front\n        if (this._audioStashedLastSample != null) {\n            var sample = this._audioStashedLastSample;\n            this._audioStashedLastSample = null;\n            samples.unshift(sample);\n            mdatBytes += sample.length;\n        }\n        // Stash the lastSample of current batch, waiting for next batch\n        if (lastSample != null) {\n            this._audioStashedLastSample = lastSample;\n        }\n        var firstSampleOriginalDts = samples[0].dts - this._dtsBase;\n        // calculate dtsCorrection\n        if (this._audioNextDts) {\n            dtsCorrection = firstSampleOriginalDts - this._audioNextDts;\n        }\n        else { // this._audioNextDts == undefined\n            if (this._audioSegmentInfoList.isEmpty()) {\n                dtsCorrection = 0;\n                if (this._fillSilentAfterSeek && !this._videoSegmentInfoList.isEmpty()) {\n                    if (this._audioMeta.originalCodec !== 'mp3') {\n                        insertPrefixSilentFrame = true;\n                    }\n                }\n            }\n            else {\n                var lastSample_1 = this._audioSegmentInfoList.getLastSampleBefore(firstSampleOriginalDts);\n                if (lastSample_1 != null) {\n                    var distance = (firstSampleOriginalDts - (lastSample_1.originalDts + lastSample_1.duration));\n                    if (distance <= 3) {\n                        distance = 0;\n                    }\n                    var expectedDts = lastSample_1.dts + lastSample_1.duration + distance;\n                    dtsCorrection = firstSampleOriginalDts - expectedDts;\n                }\n                else { // lastSample == null, cannot found\n                    dtsCorrection = 0;\n                }\n            }\n        }\n        if (insertPrefixSilentFrame) {\n            // align audio segment beginDts to match with current video segment's beginDts\n            var firstSampleDts = firstSampleOriginalDts - dtsCorrection;\n            var videoSegment = this._videoSegmentInfoList.getLastSegmentBefore(firstSampleOriginalDts);\n            if (videoSegment != null && videoSegment.beginDts < firstSampleDts) {\n                var silentUnit = _aac_silent_js__WEBPACK_IMPORTED_MODULE_2__.default.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount);\n                if (silentUnit) {\n                    var dts = videoSegment.beginDts;\n                    var silentFrameDuration = firstSampleDts - videoSegment.beginDts;\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.v(this.TAG, \"InsertPrefixSilentAudio: dts: \" + dts + \", duration: \" + silentFrameDuration);\n                    samples.unshift({ unit: silentUnit, dts: dts, pts: dts });\n                    mdatBytes += silentUnit.byteLength;\n                } // silentUnit == null: Cannot generate, skip\n            }\n            else {\n                insertPrefixSilentFrame = false;\n            }\n        }\n        var mp4Samples = [];\n        // Correct dts for each sample, and calculate sample duration. Then output to mp4Samples\n        for (var i = 0; i < samples.length; i++) {\n            var sample = samples[i];\n            var unit = sample.unit;\n            var originalDts = sample.dts - this._dtsBase;\n            var dts = originalDts;\n            var needFillSilentFrames = false;\n            var silentFrames = null;\n            var sampleDuration = 0;\n            if (originalDts < -0.001) {\n                continue; //pass the first sample with the invalid dts\n            }\n            if (this._audioMeta.codec !== 'mp3') {\n                // for AAC codec, we need to keep dts increase based on refSampleDuration\n                var curRefDts = originalDts;\n                var maxAudioFramesDrift = 3;\n                if (this._audioNextDts) {\n                    curRefDts = this._audioNextDts;\n                }\n                dtsCorrection = originalDts - curRefDts;\n                if (dtsCorrection <= -maxAudioFramesDrift * refSampleDuration) {\n                    // If we're overlapping by more than maxAudioFramesDrift number of frame, drop this sample\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, \"Dropping 1 audio frame (originalDts: \" + originalDts + \" ms ,curRefDts: \" + curRefDts + \" ms)  due to dtsCorrection: \" + dtsCorrection + \" ms overlap.\");\n                    continue;\n                }\n                else if (dtsCorrection >= maxAudioFramesDrift * refSampleDuration && this._fillAudioTimestampGap && !_utils_browser_js__WEBPACK_IMPORTED_MODULE_3__.default.safari) {\n                    // Silent frame generation, if large timestamp gap detected && config.fixAudioTimestampGap\n                    needFillSilentFrames = true;\n                    // We need to insert silent frames to fill timestamp gap\n                    var frameCount = Math.floor(dtsCorrection / refSampleDuration);\n                    _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Large audio timestamp gap detected, may cause AV sync to drift. ' +\n                        'Silent frames will be generated to avoid unsync.\\n' +\n                        (\"originalDts: \" + originalDts + \" ms, curRefDts: \" + curRefDts + \" ms, \") +\n                        (\"dtsCorrection: \" + Math.round(dtsCorrection) + \" ms, generate: \" + frameCount + \" frames\"));\n                    dts = Math.floor(curRefDts);\n                    sampleDuration = Math.floor(curRefDts + refSampleDuration) - dts;\n                    var silentUnit = _aac_silent_js__WEBPACK_IMPORTED_MODULE_2__.default.getSilentFrame(this._audioMeta.originalCodec, this._audioMeta.channelCount);\n                    if (silentUnit == null) {\n                        _utils_logger_js__WEBPACK_IMPORTED_MODULE_0__.default.w(this.TAG, 'Unable to generate silent frame for ' +\n                            (this._audioMeta.originalCodec + \" with \" + this._audioMeta.channelCount + \" channels, repeat last frame\"));\n                        // Repeat last frame\n                        silentUnit = unit;\n                    }\n                    silentFrames = [];\n                    for (var j = 0; j < frameCount; j++) {\n                        curRefDts = curRefDts + refSampleDuration;\n                        var intDts = Math.floor(curRefDts); // change to integer\n                        var intDuration = Math.floor(curRefDts + refSampleDuration) - intDts;\n                        var frame = {\n                            dts: intDts,\n                            pts: intDts,\n                            cts: 0,\n                            unit: silentUnit,\n                            size: silentUnit.byteLength,\n                            duration: intDuration,\n                            originalDts: originalDts,\n                            flags: {\n                                isLeading: 0,\n                                dependsOn: 1,\n                                isDependedOn: 0,\n                                hasRedundancy: 0\n                            }\n                        };\n                        silentFrames.push(frame);\n                        mdatBytes += frame.size;\n                        ;\n                    }\n                    this._audioNextDts = curRefDts + refSampleDuration;\n                }\n                else {\n                    dts = Math.floor(curRefDts);\n                    sampleDuration = Math.floor(curRefDts + refSampleDuration) - dts;\n                    this._audioNextDts = curRefDts + refSampleDuration;\n                }\n            }\n            else {\n                // keep the original dts calculate algorithm for mp3\n                dts = originalDts - dtsCorrection;\n                if (i !== samples.length - 1) {\n                    var nextDts = samples[i + 1].dts - this._dtsBase - dtsCorrection;\n                    sampleDuration = nextDts - dts;\n                }\n                else { // the last sample\n                    if (lastSample != null) { // use stashed sample's dts to calculate sample duration\n                        var nextDts = lastSample.dts - this._dtsBase - dtsCorrection;\n                        sampleDuration = nextDts - dts;\n                    }\n                    else if (mp4Samples.length >= 1) { // use second last sample duration\n                        sampleDuration = mp4Samples[mp4Samples.length - 1].duration;\n                    }\n                    else { // the only one sample, use reference sample duration\n                        sampleDuration = Math.floor(refSampleDuration);\n                    }\n                }\n                this._audioNextDts = dts + sampleDuration;\n            }\n            if (firstDts === -1) {\n                firstDts = dts;\n            }\n            mp4Samples.push({\n                dts: dts,\n                pts: dts,\n                cts: 0,\n                unit: sample.unit,\n                size: sample.unit.byteLength,\n                duration: sampleDuration,\n                originalDts: originalDts,\n                flags: {\n                    isLeading: 0,\n                    dependsOn: 1,\n                    isDependedOn: 0,\n                    hasRedundancy: 0\n                }\n            });\n            if (needFillSilentFrames) {\n                // Silent frames should be inserted after wrong-duration frame\n                mp4Samples.push.apply(mp4Samples, silentFrames);\n            }\n        }\n        if (mp4Samples.length === 0) {\n            //no samples need to remux\n            track.samples = [];\n            track.length = 0;\n            return;\n        }\n        // allocate mdatbox\n        if (mpegRawTrack) {\n            // allocate for raw mpeg buffer\n            mdatbox = new Uint8Array(mdatBytes);\n        }\n        else {\n            // allocate for fmp4 mdat box\n            mdatbox = new Uint8Array(mdatBytes);\n            // size field\n            mdatbox[0] = (mdatBytes >>> 24) & 0xFF;\n            mdatbox[1] = (mdatBytes >>> 16) & 0xFF;\n            mdatbox[2] = (mdatBytes >>> 8) & 0xFF;\n            mdatbox[3] = (mdatBytes) & 0xFF;\n            // type field (fourCC)\n            mdatbox.set(_mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__.default.types.mdat, 4);\n        }\n        // Write samples into mdatbox\n        for (var i = 0; i < mp4Samples.length; i++) {\n            var unit = mp4Samples[i].unit;\n            mdatbox.set(unit, offset);\n            offset += unit.byteLength;\n        }\n        var latest = mp4Samples[mp4Samples.length - 1];\n        lastDts = latest.dts + latest.duration;\n        //this._audioNextDts = lastDts;\n        // fill media segment info & add to info list\n        var info = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.MediaSegmentInfo();\n        info.beginDts = firstDts;\n        info.endDts = lastDts;\n        info.beginPts = firstDts;\n        info.endPts = lastDts;\n        info.originalBeginDts = mp4Samples[0].originalDts;\n        info.originalEndDts = latest.originalDts + latest.duration;\n        info.firstSample = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.SampleInfo(mp4Samples[0].dts, mp4Samples[0].pts, mp4Samples[0].duration, mp4Samples[0].originalDts, false);\n        info.lastSample = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.SampleInfo(latest.dts, latest.pts, latest.duration, latest.originalDts, false);\n        if (!this._isLive) {\n            this._audioSegmentInfoList.append(info);\n        }\n        track.samples = mp4Samples;\n        track.sequenceNumber++;\n        var moofbox = null;\n        if (mpegRawTrack) {\n            // Generate empty buffer, because useless for raw mpeg\n            moofbox = new Uint8Array();\n        }\n        else {\n            // Generate moof for fmp4 segment\n            moofbox = _mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__.default.moof(track, firstDts);\n        }\n        track.samples = [];\n        track.length = 0;\n        var segment = {\n            type: 'audio',\n            data: this._mergeBoxes(moofbox, mdatbox).buffer,\n            sampleCount: mp4Samples.length,\n            info: info\n        };\n        if (mpegRawTrack && firstSegmentAfterSeek) {\n            // For MPEG audio stream in MSE, if seeking occurred, before appending new buffer\n            // We need explicitly set timestampOffset to the desired point in timeline for mpeg SourceBuffer.\n            segment.timestampOffset = firstDts;\n        }\n        this._onMediaSegment('audio', segment);\n    };\n    MP4Remuxer.prototype._remuxVideo = function (videoTrack, force) {\n        if (this._videoMeta == null) {\n            return;\n        }\n        var track = videoTrack;\n        var samples = track.samples;\n        var dtsCorrection = undefined;\n        var firstDts = -1, lastDts = -1;\n        var firstPts = -1, lastPts = -1;\n        if (!samples || samples.length === 0) {\n            return;\n        }\n        if (samples.length === 1 && !force) {\n            // If [sample count in current batch] === 1 && (force != true)\n            // Ignore and keep in demuxer's queue\n            return;\n        } // else if (force === true) do remux\n        var offset = 8;\n        var mdatbox = null;\n        var mdatBytes = 8 + videoTrack.length;\n        var lastSample = null;\n        // Pop the lastSample and waiting for stash\n        if (samples.length > 1) {\n            lastSample = samples.pop();\n            mdatBytes -= lastSample.length;\n        }\n        // Insert [stashed lastSample in the previous batch] to the front\n        if (this._videoStashedLastSample != null) {\n            var sample = this._videoStashedLastSample;\n            this._videoStashedLastSample = null;\n            samples.unshift(sample);\n            mdatBytes += sample.length;\n        }\n        // Stash the lastSample of current batch, waiting for next batch\n        if (lastSample != null) {\n            this._videoStashedLastSample = lastSample;\n        }\n        var firstSampleOriginalDts = samples[0].dts - this._dtsBase;\n        // calculate dtsCorrection\n        if (this._videoNextDts) {\n            dtsCorrection = firstSampleOriginalDts - this._videoNextDts;\n        }\n        else { // this._videoNextDts == undefined\n            if (this._videoSegmentInfoList.isEmpty()) {\n                dtsCorrection = 0;\n            }\n            else {\n                var lastSample_2 = this._videoSegmentInfoList.getLastSampleBefore(firstSampleOriginalDts);\n                if (lastSample_2 != null) {\n                    var distance = (firstSampleOriginalDts - (lastSample_2.originalDts + lastSample_2.duration));\n                    if (distance <= 3) {\n                        distance = 0;\n                    }\n                    var expectedDts = lastSample_2.dts + lastSample_2.duration + distance;\n                    dtsCorrection = firstSampleOriginalDts - expectedDts;\n                }\n                else { // lastSample == null, cannot found\n                    dtsCorrection = 0;\n                }\n            }\n        }\n        var info = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.MediaSegmentInfo();\n        var mp4Samples = [];\n        // Correct dts for each sample, and calculate sample duration. Then output to mp4Samples\n        for (var i = 0; i < samples.length; i++) {\n            var sample = samples[i];\n            var originalDts = sample.dts - this._dtsBase;\n            var isKeyframe = sample.isKeyframe;\n            var dts = originalDts - dtsCorrection;\n            var cts = sample.cts;\n            var pts = dts + cts;\n            if (firstDts === -1) {\n                firstDts = dts;\n                firstPts = pts;\n            }\n            var sampleDuration = 0;\n            if (i !== samples.length - 1) {\n                var nextDts = samples[i + 1].dts - this._dtsBase - dtsCorrection;\n                sampleDuration = nextDts - dts;\n            }\n            else { // the last sample\n                if (lastSample != null) { // use stashed sample's dts to calculate sample duration\n                    var nextDts = lastSample.dts - this._dtsBase - dtsCorrection;\n                    sampleDuration = nextDts - dts;\n                }\n                else if (mp4Samples.length >= 1) { // use second last sample duration\n                    sampleDuration = mp4Samples[mp4Samples.length - 1].duration;\n                }\n                else { // the only one sample, use reference sample duration\n                    sampleDuration = Math.floor(this._videoMeta.refSampleDuration);\n                }\n            }\n            if (isKeyframe) {\n                var syncPoint = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.SampleInfo(dts, pts, sampleDuration, sample.dts, true);\n                syncPoint.fileposition = sample.fileposition;\n                info.appendSyncPoint(syncPoint);\n            }\n            mp4Samples.push({\n                dts: dts,\n                pts: pts,\n                cts: cts,\n                units: sample.units,\n                size: sample.length,\n                isKeyframe: isKeyframe,\n                duration: sampleDuration,\n                originalDts: originalDts,\n                flags: {\n                    isLeading: 0,\n                    dependsOn: isKeyframe ? 2 : 1,\n                    isDependedOn: isKeyframe ? 1 : 0,\n                    hasRedundancy: 0,\n                    isNonSync: isKeyframe ? 0 : 1\n                }\n            });\n        }\n        // allocate mdatbox\n        mdatbox = new Uint8Array(mdatBytes);\n        mdatbox[0] = (mdatBytes >>> 24) & 0xFF;\n        mdatbox[1] = (mdatBytes >>> 16) & 0xFF;\n        mdatbox[2] = (mdatBytes >>> 8) & 0xFF;\n        mdatbox[3] = (mdatBytes) & 0xFF;\n        mdatbox.set(_mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__.default.types.mdat, 4);\n        // Write samples into mdatbox\n        for (var i = 0; i < mp4Samples.length; i++) {\n            var units = mp4Samples[i].units;\n            while (units.length) {\n                var unit = units.shift();\n                var data = unit.data;\n                mdatbox.set(data, offset);\n                offset += data.byteLength;\n            }\n        }\n        var latest = mp4Samples[mp4Samples.length - 1];\n        lastDts = latest.dts + latest.duration;\n        lastPts = latest.pts + latest.duration;\n        this._videoNextDts = lastDts;\n        // fill media segment info & add to info list\n        info.beginDts = firstDts;\n        info.endDts = lastDts;\n        info.beginPts = firstPts;\n        info.endPts = lastPts;\n        info.originalBeginDts = mp4Samples[0].originalDts;\n        info.originalEndDts = latest.originalDts + latest.duration;\n        info.firstSample = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.SampleInfo(mp4Samples[0].dts, mp4Samples[0].pts, mp4Samples[0].duration, mp4Samples[0].originalDts, mp4Samples[0].isKeyframe);\n        info.lastSample = new _core_media_segment_info_js__WEBPACK_IMPORTED_MODULE_4__.SampleInfo(latest.dts, latest.pts, latest.duration, latest.originalDts, latest.isKeyframe);\n        if (!this._isLive) {\n            this._videoSegmentInfoList.append(info);\n        }\n        track.samples = mp4Samples;\n        track.sequenceNumber++;\n        // workaround for chrome < 50: force first sample as a random access point\n        // see https://bugs.chromium.org/p/chromium/issues/detail?id=229412\n        if (this._forceFirstIDR) {\n            var flags = mp4Samples[0].flags;\n            flags.dependsOn = 2;\n            flags.isNonSync = 0;\n        }\n        var moofbox = _mp4_generator_js__WEBPACK_IMPORTED_MODULE_1__.default.moof(track, firstDts);\n        track.samples = [];\n        track.length = 0;\n        this._onMediaSegment('video', {\n            type: 'video',\n            data: this._mergeBoxes(moofbox, mdatbox).buffer,\n            sampleCount: mp4Samples.length,\n            info: info\n        });\n    };\n    MP4Remuxer.prototype._mergeBoxes = function (moof, mdat) {\n        var result = new Uint8Array(moof.byteLength + mdat.byteLength);\n        result.set(moof, 0);\n        result.set(mdat, moof.byteLength);\n        return result;\n    };\n    return MP4Remuxer;\n}());\n/* harmony default export */ __webpack_exports__[\"default\"] = (MP4Remuxer);\n\n\n/***/ }),\n\n/***/ \"./src/utils/browser.js\":\n/*!******************************!*\\\n  !*** ./src/utils/browser.js ***!\n  \\******************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar Browser = {};\nfunction detect() {\n    // modified from jquery-browser-plugin\n    var ua = self.navigator.userAgent.toLowerCase();\n    var match = /(edge)\\/([\\w.]+)/.exec(ua) ||\n        /(opr)[\\/]([\\w.]+)/.exec(ua) ||\n        /(chrome)[ \\/]([\\w.]+)/.exec(ua) ||\n        /(iemobile)[\\/]([\\w.]+)/.exec(ua) ||\n        /(version)(applewebkit)[ \\/]([\\w.]+).*(safari)[ \\/]([\\w.]+)/.exec(ua) ||\n        /(webkit)[ \\/]([\\w.]+).*(version)[ \\/]([\\w.]+).*(safari)[ \\/]([\\w.]+)/.exec(ua) ||\n        /(webkit)[ \\/]([\\w.]+)/.exec(ua) ||\n        /(opera)(?:.*version|)[ \\/]([\\w.]+)/.exec(ua) ||\n        /(msie) ([\\w.]+)/.exec(ua) ||\n        ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n        ua.indexOf('compatible') < 0 && /(firefox)[ \\/]([\\w.]+)/.exec(ua) ||\n        [];\n    var platform_match = /(ipad)/.exec(ua) ||\n        /(ipod)/.exec(ua) ||\n        /(windows phone)/.exec(ua) ||\n        /(iphone)/.exec(ua) ||\n        /(kindle)/.exec(ua) ||\n        /(android)/.exec(ua) ||\n        /(windows)/.exec(ua) ||\n        /(mac)/.exec(ua) ||\n        /(linux)/.exec(ua) ||\n        /(cros)/.exec(ua) ||\n        [];\n    var matched = {\n        browser: match[5] || match[3] || match[1] || '',\n        version: match[2] || match[4] || '0',\n        majorVersion: match[4] || match[2] || '0',\n        platform: platform_match[0] || ''\n    };\n    var browser = {};\n    if (matched.browser) {\n        browser[matched.browser] = true;\n        var versionArray = matched.majorVersion.split('.');\n        browser.version = {\n            major: parseInt(matched.majorVersion, 10),\n            string: matched.version\n        };\n        if (versionArray.length > 1) {\n            browser.version.minor = parseInt(versionArray[1], 10);\n        }\n        if (versionArray.length > 2) {\n            browser.version.build = parseInt(versionArray[2], 10);\n        }\n    }\n    if (matched.platform) {\n        browser[matched.platform] = true;\n    }\n    if (browser.chrome || browser.opr || browser.safari) {\n        browser.webkit = true;\n    }\n    // MSIE. IE11 has 'rv' identifer\n    if (browser.rv || browser.iemobile) {\n        if (browser.rv) {\n            delete browser.rv;\n        }\n        var msie = 'msie';\n        matched.browser = msie;\n        browser[msie] = true;\n    }\n    // Microsoft Edge\n    if (browser.edge) {\n        delete browser.edge;\n        var msedge = 'msedge';\n        matched.browser = msedge;\n        browser[msedge] = true;\n    }\n    // Opera 15+\n    if (browser.opr) {\n        var opera = 'opera';\n        matched.browser = opera;\n        browser[opera] = true;\n    }\n    // Stock android browsers are marked as Safari\n    if (browser.safari && browser.android) {\n        var android = 'android';\n        matched.browser = android;\n        browser[android] = true;\n    }\n    browser.name = matched.browser;\n    browser.platform = matched.platform;\n    for (var key in Browser) {\n        if (Browser.hasOwnProperty(key)) {\n            delete Browser[key];\n        }\n    }\n    Object.assign(Browser, browser);\n}\ndetect();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Browser);\n\n\n/***/ }),\n\n/***/ \"./src/utils/exception.js\":\n/*!********************************!*\\\n  !*** ./src/utils/exception.js ***!\n  \\********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   \"RuntimeException\": function() { return /* binding */ RuntimeException; },\n/* harmony export */   \"IllegalStateException\": function() { return /* binding */ IllegalStateException; },\n/* harmony export */   \"InvalidArgumentException\": function() { return /* binding */ InvalidArgumentException; },\n/* harmony export */   \"NotImplementedException\": function() { return /* binding */ NotImplementedException; }\n/* harmony export */ });\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nvar RuntimeException = /** @class */ (function () {\n    function RuntimeException(message) {\n        this._message = message;\n    }\n    Object.defineProperty(RuntimeException.prototype, \"name\", {\n        get: function () {\n            return 'RuntimeException';\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(RuntimeException.prototype, \"message\", {\n        get: function () {\n            return this._message;\n        },\n        enumerable: false,\n        configurable: true\n    });\n    RuntimeException.prototype.toString = function () {\n        return this.name + ': ' + this.message;\n    };\n    return RuntimeException;\n}());\n\nvar IllegalStateException = /** @class */ (function (_super) {\n    __extends(IllegalStateException, _super);\n    function IllegalStateException(message) {\n        return _super.call(this, message) || this;\n    }\n    Object.defineProperty(IllegalStateException.prototype, \"name\", {\n        get: function () {\n            return 'IllegalStateException';\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return IllegalStateException;\n}(RuntimeException));\n\nvar InvalidArgumentException = /** @class */ (function (_super) {\n    __extends(InvalidArgumentException, _super);\n    function InvalidArgumentException(message) {\n        return _super.call(this, message) || this;\n    }\n    Object.defineProperty(InvalidArgumentException.prototype, \"name\", {\n        get: function () {\n            return 'InvalidArgumentException';\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return InvalidArgumentException;\n}(RuntimeException));\n\nvar NotImplementedException = /** @class */ (function (_super) {\n    __extends(NotImplementedException, _super);\n    function NotImplementedException(message) {\n        return _super.call(this, message) || this;\n    }\n    Object.defineProperty(NotImplementedException.prototype, \"name\", {\n        get: function () {\n            return 'NotImplementedException';\n        },\n        enumerable: false,\n        configurable: true\n    });\n    return NotImplementedException;\n}(RuntimeException));\n\n\n\n/***/ }),\n\n/***/ \"./src/utils/logger.js\":\n/*!*****************************!*\\\n  !*** ./src/utils/logger.js ***!\n  \\*****************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nvar Log = /** @class */ (function () {\n    function Log() {\n    }\n    Log.e = function (tag, msg) {\n        if (!tag || Log.FORCE_GLOBAL_TAG)\n            tag = Log.GLOBAL_TAG;\n        var str = \"[\" + tag + \"] > \" + msg;\n        if (Log.ENABLE_CALLBACK) {\n            Log.emitter.emit('log', 'error', str);\n        }\n        if (!Log.ENABLE_ERROR) {\n            return;\n        }\n        if (console.error) {\n            console.error(str);\n        }\n        else if (console.warn) {\n            console.warn(str);\n        }\n        else {\n            console.log(str);\n        }\n    };\n    Log.i = function (tag, msg) {\n        if (!tag || Log.FORCE_GLOBAL_TAG)\n            tag = Log.GLOBAL_TAG;\n        var str = \"[\" + tag + \"] > \" + msg;\n        if (Log.ENABLE_CALLBACK) {\n            Log.emitter.emit('log', 'info', str);\n        }\n        if (!Log.ENABLE_INFO) {\n            return;\n        }\n        if (console.info) {\n            console.info(str);\n        }\n        else {\n            console.log(str);\n        }\n    };\n    Log.w = function (tag, msg) {\n        if (!tag || Log.FORCE_GLOBAL_TAG)\n            tag = Log.GLOBAL_TAG;\n        var str = \"[\" + tag + \"] > \" + msg;\n        if (Log.ENABLE_CALLBACK) {\n            Log.emitter.emit('log', 'warn', str);\n        }\n        if (!Log.ENABLE_WARN) {\n            return;\n        }\n        if (console.warn) {\n            console.warn(str);\n        }\n        else {\n            console.log(str);\n        }\n    };\n    Log.d = function (tag, msg) {\n        if (!tag || Log.FORCE_GLOBAL_TAG)\n            tag = Log.GLOBAL_TAG;\n        var str = \"[\" + tag + \"] > \" + msg;\n        if (Log.ENABLE_CALLBACK) {\n            Log.emitter.emit('log', 'debug', str);\n        }\n        if (!Log.ENABLE_DEBUG) {\n            return;\n        }\n        if (console.debug) {\n            console.debug(str);\n        }\n        else {\n            console.log(str);\n        }\n    };\n    Log.v = function (tag, msg) {\n        if (!tag || Log.FORCE_GLOBAL_TAG)\n            tag = Log.GLOBAL_TAG;\n        var str = \"[\" + tag + \"] > \" + msg;\n        if (Log.ENABLE_CALLBACK) {\n            Log.emitter.emit('log', 'verbose', str);\n        }\n        if (!Log.ENABLE_VERBOSE) {\n            return;\n        }\n        console.log(str);\n    };\n    return Log;\n}());\nLog.GLOBAL_TAG = 'flv.js';\nLog.FORCE_GLOBAL_TAG = false;\nLog.ENABLE_ERROR = true;\nLog.ENABLE_INFO = true;\nLog.ENABLE_WARN = true;\nLog.ENABLE_DEBUG = true;\nLog.ENABLE_VERBOSE = true;\nLog.ENABLE_CALLBACK = false;\nLog.emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Log);\n\n\n/***/ }),\n\n/***/ \"./src/utils/logging-control.js\":\n/*!**************************************!*\\\n  !*** ./src/utils/logging-control.js ***!\n  \\**************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! events */ \"./node_modules/events/events.js\");\n/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger.js */ \"./src/utils/logger.js\");\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\nvar LoggingControl = /** @class */ (function () {\n    function LoggingControl() {\n    }\n    Object.defineProperty(LoggingControl, \"forceGlobalTag\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.FORCE_GLOBAL_TAG;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.FORCE_GLOBAL_TAG = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"globalTag\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.GLOBAL_TAG;\n        },\n        set: function (tag) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.GLOBAL_TAG = tag;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"enableAll\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_VERBOSE\n                && _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_DEBUG\n                && _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_INFO\n                && _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_WARN\n                && _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_ERROR;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_VERBOSE = enable;\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_DEBUG = enable;\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_INFO = enable;\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_WARN = enable;\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_ERROR = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"enableDebug\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_DEBUG;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_DEBUG = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"enableVerbose\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_VERBOSE;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_VERBOSE = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"enableInfo\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_INFO;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_INFO = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"enableWarn\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_WARN;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_WARN = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    Object.defineProperty(LoggingControl, \"enableError\", {\n        get: function () {\n            return _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_ERROR;\n        },\n        set: function (enable) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_ERROR = enable;\n            LoggingControl._notifyChange();\n        },\n        enumerable: false,\n        configurable: true\n    });\n    LoggingControl.getConfig = function () {\n        return {\n            globalTag: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.GLOBAL_TAG,\n            forceGlobalTag: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.FORCE_GLOBAL_TAG,\n            enableVerbose: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_VERBOSE,\n            enableDebug: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_DEBUG,\n            enableInfo: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_INFO,\n            enableWarn: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_WARN,\n            enableError: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_ERROR,\n            enableCallback: _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_CALLBACK\n        };\n    };\n    LoggingControl.applyConfig = function (config) {\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.GLOBAL_TAG = config.globalTag;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.FORCE_GLOBAL_TAG = config.forceGlobalTag;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_VERBOSE = config.enableVerbose;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_DEBUG = config.enableDebug;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_INFO = config.enableInfo;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_WARN = config.enableWarn;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_ERROR = config.enableError;\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_CALLBACK = config.enableCallback;\n    };\n    LoggingControl._notifyChange = function () {\n        var emitter = LoggingControl.emitter;\n        if (emitter.listenerCount('change') > 0) {\n            var config = LoggingControl.getConfig();\n            emitter.emit('change', config);\n        }\n    };\n    LoggingControl.registerListener = function (listener) {\n        LoggingControl.emitter.addListener('change', listener);\n    };\n    LoggingControl.removeListener = function (listener) {\n        LoggingControl.emitter.removeListener('change', listener);\n    };\n    LoggingControl.addLogListener = function (listener) {\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.emitter.addListener('log', listener);\n        if (_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.emitter.listenerCount('log') > 0) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_CALLBACK = true;\n            LoggingControl._notifyChange();\n        }\n    };\n    LoggingControl.removeLogListener = function (listener) {\n        _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.emitter.removeListener('log', listener);\n        if (_logger_js__WEBPACK_IMPORTED_MODULE_1__.default.emitter.listenerCount('log') === 0) {\n            _logger_js__WEBPACK_IMPORTED_MODULE_1__.default.ENABLE_CALLBACK = false;\n            LoggingControl._notifyChange();\n        }\n    };\n    return LoggingControl;\n}());\nLoggingControl.emitter = new (events__WEBPACK_IMPORTED_MODULE_0___default())();\n/* harmony default export */ __webpack_exports__[\"default\"] = (LoggingControl);\n\n\n/***/ }),\n\n/***/ \"./src/utils/polyfill.js\":\n/*!*******************************!*\\\n  !*** ./src/utils/polyfill.js ***!\n  \\*******************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar Polyfill = /** @class */ (function () {\n    function Polyfill() {\n    }\n    Polyfill.install = function () {\n        // ES6 Object.setPrototypeOf\n        Object.setPrototypeOf = Object.setPrototypeOf || function (obj, proto) {\n            obj.__proto__ = proto;\n            return obj;\n        };\n        // ES6 Object.assign\n        Object.assign = Object.assign || function (target) {\n            if (target === undefined || target === null) {\n                throw new TypeError('Cannot convert undefined or null to object');\n            }\n            var output = Object(target);\n            for (var i = 1; i < arguments.length; i++) {\n                var source = arguments[i];\n                if (source !== undefined && source !== null) {\n                    for (var key in source) {\n                        if (source.hasOwnProperty(key)) {\n                            output[key] = source[key];\n                        }\n                    }\n                }\n            }\n            return output;\n        };\n        // ES6 Promise (missing support in IE11)\n        if (typeof self.Promise !== 'function') {\n            __webpack_require__(/*! es6-promise */ \"./node_modules/es6-promise/dist/es6-promise.js\").polyfill();\n        }\n    };\n    return Polyfill;\n}());\nPolyfill.install();\n/* harmony default export */ __webpack_exports__[\"default\"] = (Polyfill);\n\n\n/***/ }),\n\n/***/ \"./src/utils/utf8-conv.js\":\n/*!********************************!*\\\n  !*** ./src/utils/utf8-conv.js ***!\n  \\********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/*\n * Copyright (C) 2016 Bilibili. All Rights Reserved.\n *\n * This file is derived from C++ project libWinTF8 (https://github.com/m13253/libWinTF8)\n * @author zheng qian <xqq@xqq.im>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction checkContinuation(uint8array, start, checkLength) {\n    var array = uint8array;\n    if (start + checkLength < array.length) {\n        while (checkLength--) {\n            if ((array[++start] & 0xC0) !== 0x80)\n                return false;\n        }\n        return true;\n    }\n    else {\n        return false;\n    }\n}\nfunction decodeUTF8(uint8array) {\n    var out = [];\n    var input = uint8array;\n    var i = 0;\n    var length = uint8array.length;\n    while (i < length) {\n        if (input[i] < 0x80) {\n            out.push(String.fromCharCode(input[i]));\n            ++i;\n            continue;\n        }\n        else if (input[i] < 0xC0) {\n            // fallthrough\n        }\n        else if (input[i] < 0xE0) {\n            if (checkContinuation(input, i, 1)) {\n                var ucs4 = (input[i] & 0x1F) << 6 | (input[i + 1] & 0x3F);\n                if (ucs4 >= 0x80) {\n                    out.push(String.fromCharCode(ucs4 & 0xFFFF));\n                    i += 2;\n                    continue;\n                }\n            }\n        }\n        else if (input[i] < 0xF0) {\n            if (checkContinuation(input, i, 2)) {\n                var ucs4 = (input[i] & 0xF) << 12 | (input[i + 1] & 0x3F) << 6 | input[i + 2] & 0x3F;\n                if (ucs4 >= 0x800 && (ucs4 & 0xF800) !== 0xD800) {\n                    out.push(String.fromCharCode(ucs4 & 0xFFFF));\n                    i += 3;\n                    continue;\n                }\n            }\n        }\n        else if (input[i] < 0xF8) {\n            if (checkContinuation(input, i, 3)) {\n                var ucs4 = (input[i] & 0x7) << 18 | (input[i + 1] & 0x3F) << 12\n                    | (input[i + 2] & 0x3F) << 6 | (input[i + 3] & 0x3F);\n                if (ucs4 > 0x10000 && ucs4 < 0x110000) {\n                    ucs4 -= 0x10000;\n                    out.push(String.fromCharCode((ucs4 >>> 10) | 0xD800));\n                    out.push(String.fromCharCode((ucs4 & 0x3FF) | 0xDC00));\n                    i += 4;\n                    continue;\n                }\n            }\n        }\n        out.push(String.fromCharCode(0xFFFD));\n        ++i;\n    }\n    return out.join('');\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (decodeUTF8);\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = __webpack_modules__;\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/global */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.g = (function() {\n/******/ \t\t\tif (typeof globalThis === 'object') return globalThis;\n/******/ \t\t\ttry {\n/******/ \t\t\t\treturn this || new Function('return this')();\n/******/ \t\t\t} catch (e) {\n/******/ \t\t\t\tif (typeof window === 'object') return window;\n/******/ \t\t\t}\n/******/ \t\t})();\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// module factories are used so entry inlining is disabled\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \tvar __webpack_exports__ = __webpack_require__(\"./src/index.js\");\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});\n//# sourceMappingURL=flv.js.map\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ \"./node_modules/node-libs-browser/mock/process.js\")))\n\n//# sourceURL=webpack:///./node_modules/flv.js/dist/flv.js?");

/***/ }),

/***/ "./node_modules/fuzzysearch/index.js":
/*!*******************************************!*\
  !*** ./node_modules/fuzzysearch/index.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
eval("\n\nfunction fuzzysearch (needle, haystack) {\n  var tlen = haystack.length;\n  var qlen = needle.length;\n  if (qlen > tlen) {\n    return false;\n  }\n  if (qlen === tlen) {\n    return needle === haystack;\n  }\n  outer: for (var i = 0, j = 0; i < qlen; i++) {\n    var nch = needle.charCodeAt(i);\n    while (j < tlen) {\n      if (haystack.charCodeAt(j++) === nch) {\n        continue outer;\n      }\n    }\n    return false;\n  }\n  return true;\n}\n\nmodule.exports = fuzzysearch;\n\n\n//# sourceURL=webpack:///./node_modules/fuzzysearch/index.js?");

/***/ }),

/***/ "./node_modules/is-promise/index.js":
/*!******************************************!*\
  !*** ./node_modules/is-promise/index.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n  return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n\n\n//# sourceURL=webpack:///./node_modules/is-promise/index.js?");

/***/ }),

/***/ "./node_modules/lodash/_Symbol.js":
/*!****************************************!*\
  !*** ./node_modules/lodash/_Symbol.js ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_Symbol.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseGetTag.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_baseGetTag.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\"),\n    getRawTag = __webpack_require__(/*! ./_getRawTag */ \"./node_modules/lodash/_getRawTag.js\"),\n    objectToString = __webpack_require__(/*! ./_objectToString */ \"./node_modules/lodash/_objectToString.js\");\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_baseGetTag.js?");

/***/ }),

/***/ "./node_modules/lodash/_baseTrim.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/_baseTrim.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ \"./node_modules/lodash/_trimmedEndIndex.js\");\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_baseTrim.js?");

/***/ }),

/***/ "./node_modules/lodash/_freeGlobal.js":
/*!********************************************!*\
  !*** ./node_modules/lodash/_freeGlobal.js ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/lodash/_freeGlobal.js?");

/***/ }),

/***/ "./node_modules/lodash/_getRawTag.js":
/*!*******************************************!*\
  !*** ./node_modules/lodash/_getRawTag.js ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var Symbol = __webpack_require__(/*! ./_Symbol */ \"./node_modules/lodash/_Symbol.js\");\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_getRawTag.js?");

/***/ }),

/***/ "./node_modules/lodash/_objectToString.js":
/*!************************************************!*\
  !*** ./node_modules/lodash/_objectToString.js ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_objectToString.js?");

/***/ }),

/***/ "./node_modules/lodash/_root.js":
/*!**************************************!*\
  !*** ./node_modules/lodash/_root.js ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ \"./node_modules/lodash/_freeGlobal.js\");\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_root.js?");

/***/ }),

/***/ "./node_modules/lodash/_trimmedEndIndex.js":
/*!*************************************************!*\
  !*** ./node_modules/lodash/_trimmedEndIndex.js ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/_trimmedEndIndex.js?");

/***/ }),

/***/ "./node_modules/lodash/before.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/before.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var toInteger = __webpack_require__(/*! ./toInteger */ \"./node_modules/lodash/toInteger.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that invokes `func`, with the `this` binding and arguments\n * of the created function, while it's called less than `n` times. Subsequent\n * calls to the created function return the result of the last `func` invocation.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Function\n * @param {number} n The number of calls at which `func` is no longer invoked.\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * jQuery(element).on('click', _.before(5, addContactToList));\n * // => Allows adding up to 4 contacts to the list.\n */\nfunction before(n, func) {\n  var result;\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  n = toInteger(n);\n  return function() {\n    if (--n > 0) {\n      result = func.apply(this, arguments);\n    }\n    if (n <= 1) {\n      func = undefined;\n    }\n    return result;\n  };\n}\n\nmodule.exports = before;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/before.js?");

/***/ }),

/***/ "./node_modules/lodash/constant.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/constant.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n  return function() {\n    return value;\n  };\n}\n\nmodule.exports = constant;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/constant.js?");

/***/ }),

/***/ "./node_modules/lodash/debounce.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/debounce.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    now = __webpack_require__(/*! ./now */ \"./node_modules/lodash/now.js\"),\n    toNumber = __webpack_require__(/*! ./toNumber */ \"./node_modules/lodash/toNumber.js\");\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nmodule.exports = debounce;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/debounce.js?");

/***/ }),

/***/ "./node_modules/lodash/identity.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/identity.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n  return value;\n}\n\nmodule.exports = identity;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/identity.js?");

/***/ }),

/***/ "./node_modules/lodash/isObject.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/isObject.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/isObject.js?");

/***/ }),

/***/ "./node_modules/lodash/isObjectLike.js":
/*!*********************************************!*\
  !*** ./node_modules/lodash/isObjectLike.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/isObjectLike.js?");

/***/ }),

/***/ "./node_modules/lodash/isSymbol.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/isSymbol.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ \"./node_modules/lodash/_baseGetTag.js\"),\n    isObjectLike = __webpack_require__(/*! ./isObjectLike */ \"./node_modules/lodash/isObjectLike.js\");\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/isSymbol.js?");

/***/ }),

/***/ "./node_modules/lodash/last.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/last.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n  var length = array == null ? 0 : array.length;\n  return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/last.js?");

/***/ }),

/***/ "./node_modules/lodash/lodash.js":
/*!***************************************!*\
  !*** ./node_modules/lodash/lodash.js ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash <https://lodash.com/>\n * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n;(function() {\n\n  /** Used as a safe reference for `undefined` in pre-ES5 environments. */\n  var undefined;\n\n  /** Used as the semantic version number. */\n  var VERSION = '4.17.21';\n\n  /** Used as the size to enable large array optimizations. */\n  var LARGE_ARRAY_SIZE = 200;\n\n  /** Error message constants. */\n  var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',\n      FUNC_ERROR_TEXT = 'Expected a function',\n      INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';\n\n  /** Used to stand-in for `undefined` hash values. */\n  var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n  /** Used as the maximum memoize cache size. */\n  var MAX_MEMOIZE_SIZE = 500;\n\n  /** Used as the internal argument placeholder. */\n  var PLACEHOLDER = '__lodash_placeholder__';\n\n  /** Used to compose bitmasks for cloning. */\n  var CLONE_DEEP_FLAG = 1,\n      CLONE_FLAT_FLAG = 2,\n      CLONE_SYMBOLS_FLAG = 4;\n\n  /** Used to compose bitmasks for value comparisons. */\n  var COMPARE_PARTIAL_FLAG = 1,\n      COMPARE_UNORDERED_FLAG = 2;\n\n  /** Used to compose bitmasks for function metadata. */\n  var WRAP_BIND_FLAG = 1,\n      WRAP_BIND_KEY_FLAG = 2,\n      WRAP_CURRY_BOUND_FLAG = 4,\n      WRAP_CURRY_FLAG = 8,\n      WRAP_CURRY_RIGHT_FLAG = 16,\n      WRAP_PARTIAL_FLAG = 32,\n      WRAP_PARTIAL_RIGHT_FLAG = 64,\n      WRAP_ARY_FLAG = 128,\n      WRAP_REARG_FLAG = 256,\n      WRAP_FLIP_FLAG = 512;\n\n  /** Used as default options for `_.truncate`. */\n  var DEFAULT_TRUNC_LENGTH = 30,\n      DEFAULT_TRUNC_OMISSION = '...';\n\n  /** Used to detect hot functions by number of calls within a span of milliseconds. */\n  var HOT_COUNT = 800,\n      HOT_SPAN = 16;\n\n  /** Used to indicate the type of lazy iteratees. */\n  var LAZY_FILTER_FLAG = 1,\n      LAZY_MAP_FLAG = 2,\n      LAZY_WHILE_FLAG = 3;\n\n  /** Used as references for various `Number` constants. */\n  var INFINITY = 1 / 0,\n      MAX_SAFE_INTEGER = 9007199254740991,\n      MAX_INTEGER = 1.7976931348623157e+308,\n      NAN = 0 / 0;\n\n  /** Used as references for the maximum length and index of an array. */\n  var MAX_ARRAY_LENGTH = 4294967295,\n      MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,\n      HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\n\n  /** Used to associate wrap methods with their bit flags. */\n  var wrapFlags = [\n    ['ary', WRAP_ARY_FLAG],\n    ['bind', WRAP_BIND_FLAG],\n    ['bindKey', WRAP_BIND_KEY_FLAG],\n    ['curry', WRAP_CURRY_FLAG],\n    ['curryRight', WRAP_CURRY_RIGHT_FLAG],\n    ['flip', WRAP_FLIP_FLAG],\n    ['partial', WRAP_PARTIAL_FLAG],\n    ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\n    ['rearg', WRAP_REARG_FLAG]\n  ];\n\n  /** `Object#toString` result references. */\n  var argsTag = '[object Arguments]',\n      arrayTag = '[object Array]',\n      asyncTag = '[object AsyncFunction]',\n      boolTag = '[object Boolean]',\n      dateTag = '[object Date]',\n      domExcTag = '[object DOMException]',\n      errorTag = '[object Error]',\n      funcTag = '[object Function]',\n      genTag = '[object GeneratorFunction]',\n      mapTag = '[object Map]',\n      numberTag = '[object Number]',\n      nullTag = '[object Null]',\n      objectTag = '[object Object]',\n      promiseTag = '[object Promise]',\n      proxyTag = '[object Proxy]',\n      regexpTag = '[object RegExp]',\n      setTag = '[object Set]',\n      stringTag = '[object String]',\n      symbolTag = '[object Symbol]',\n      undefinedTag = '[object Undefined]',\n      weakMapTag = '[object WeakMap]',\n      weakSetTag = '[object WeakSet]';\n\n  var arrayBufferTag = '[object ArrayBuffer]',\n      dataViewTag = '[object DataView]',\n      float32Tag = '[object Float32Array]',\n      float64Tag = '[object Float64Array]',\n      int8Tag = '[object Int8Array]',\n      int16Tag = '[object Int16Array]',\n      int32Tag = '[object Int32Array]',\n      uint8Tag = '[object Uint8Array]',\n      uint8ClampedTag = '[object Uint8ClampedArray]',\n      uint16Tag = '[object Uint16Array]',\n      uint32Tag = '[object Uint32Array]';\n\n  /** Used to match empty string literals in compiled template source. */\n  var reEmptyStringLeading = /\\b__p \\+= '';/g,\n      reEmptyStringMiddle = /\\b(__p \\+=) '' \\+/g,\n      reEmptyStringTrailing = /(__e\\(.*?\\)|\\b__t\\)) \\+\\n'';/g;\n\n  /** Used to match HTML entities and HTML characters. */\n  var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,\n      reUnescapedHtml = /[&<>\"']/g,\n      reHasEscapedHtml = RegExp(reEscapedHtml.source),\n      reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\n\n  /** Used to match template delimiters. */\n  var reEscape = /<%-([\\s\\S]+?)%>/g,\n      reEvaluate = /<%([\\s\\S]+?)%>/g,\n      reInterpolate = /<%=([\\s\\S]+?)%>/g;\n\n  /** Used to match property names within property paths. */\n  var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n      reIsPlainProp = /^\\w*$/,\n      rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n  /**\n   * Used to match `RegExp`\n   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n   */\n  var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n      reHasRegExpChar = RegExp(reRegExpChar.source);\n\n  /** Used to match leading whitespace. */\n  var reTrimStart = /^\\s+/;\n\n  /** Used to match a single whitespace character. */\n  var reWhitespace = /\\s/;\n\n  /** Used to match wrap detail comments. */\n  var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\n      reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n      reSplitDetails = /,? & /;\n\n  /** Used to match words composed of alphanumeric characters. */\n  var reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n  /**\n   * Used to validate the `validate` option in `_.template` variable.\n   *\n   * Forbids characters which could potentially change the meaning of the function argument definition:\n   * - \"(),\" (modification of function parameters)\n   * - \"=\" (default value)\n   * - \"[]{}\" (destructuring of function parameters)\n   * - \"/\" (beginning of a comment)\n   * - whitespace\n   */\n  var reForbiddenIdentifierChars = /[()=,{}\\[\\]\\/\\s]/;\n\n  /** Used to match backslashes in property paths. */\n  var reEscapeChar = /\\\\(\\\\)?/g;\n\n  /**\n   * Used to match\n   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).\n   */\n  var reEsTemplate = /\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g;\n\n  /** Used to match `RegExp` flags from their coerced string values. */\n  var reFlags = /\\w*$/;\n\n  /** Used to detect bad signed hexadecimal string values. */\n  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n  /** Used to detect binary string values. */\n  var reIsBinary = /^0b[01]+$/i;\n\n  /** Used to detect host constructors (Safari). */\n  var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n  /** Used to detect octal string values. */\n  var reIsOctal = /^0o[0-7]+$/i;\n\n  /** Used to detect unsigned integer values. */\n  var reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n  /** Used to match Latin Unicode letters (excluding mathematical operators). */\n  var reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n  /** Used to ensure capturing order of template delimiters. */\n  var reNoMatch = /($^)/;\n\n  /** Used to match unescaped characters in compiled string literals. */\n  var reUnescapedString = /['\\n\\r\\u2028\\u2029\\\\]/g;\n\n  /** Used to compose unicode character classes. */\n  var rsAstralRange = '\\\\ud800-\\\\udfff',\n      rsComboMarksRange = '\\\\u0300-\\\\u036f',\n      reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n      rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n      rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n      rsDingbatRange = '\\\\u2700-\\\\u27bf',\n      rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n      rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n      rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n      rsPunctuationRange = '\\\\u2000-\\\\u206f',\n      rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n      rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n      rsVarRange = '\\\\ufe0e\\\\ufe0f',\n      rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n  /** Used to compose unicode capture groups. */\n  var rsApos = \"['\\u2019]\",\n      rsAstral = '[' + rsAstralRange + ']',\n      rsBreak = '[' + rsBreakRange + ']',\n      rsCombo = '[' + rsComboRange + ']',\n      rsDigits = '\\\\d+',\n      rsDingbat = '[' + rsDingbatRange + ']',\n      rsLower = '[' + rsLowerRange + ']',\n      rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n      rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n      rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n      rsNonAstral = '[^' + rsAstralRange + ']',\n      rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n      rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n      rsUpper = '[' + rsUpperRange + ']',\n      rsZWJ = '\\\\u200d';\n\n  /** Used to compose unicode regexes. */\n  var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n      rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n      rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n      rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n      reOptMod = rsModifier + '?',\n      rsOptVar = '[' + rsVarRange + ']?',\n      rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n      rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n      rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n      rsSeq = rsOptVar + reOptMod + rsOptJoin,\n      rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,\n      rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n  /** Used to match apostrophes. */\n  var reApos = RegExp(rsApos, 'g');\n\n  /**\n   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n   */\n  var reComboMark = RegExp(rsCombo, 'g');\n\n  /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\n  var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n  /** Used to match complex or compound words. */\n  var reUnicodeWord = RegExp([\n    rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n    rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n    rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n    rsUpper + '+' + rsOptContrUpper,\n    rsOrdUpper,\n    rsOrdLower,\n    rsDigits,\n    rsEmoji\n  ].join('|'), 'g');\n\n  /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\n  var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');\n\n  /** Used to detect strings that need a more robust regexp to match words. */\n  var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n  /** Used to assign default `context` object properties. */\n  var contextProps = [\n    'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',\n    'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',\n    'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',\n    'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',\n    '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'\n  ];\n\n  /** Used to make template sourceURLs easier to identify. */\n  var templateCounter = -1;\n\n  /** Used to identify `toStringTag` values of typed arrays. */\n  var typedArrayTags = {};\n  typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\n  typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\n  typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\n  typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\n  typedArrayTags[uint32Tag] = true;\n  typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\n  typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\n  typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\n  typedArrayTags[errorTag] = typedArrayTags[funcTag] =\n  typedArrayTags[mapTag] = typedArrayTags[numberTag] =\n  typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\n  typedArrayTags[setTag] = typedArrayTags[stringTag] =\n  typedArrayTags[weakMapTag] = false;\n\n  /** Used to identify `toStringTag` values supported by `_.clone`. */\n  var cloneableTags = {};\n  cloneableTags[argsTag] = cloneableTags[arrayTag] =\n  cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\n  cloneableTags[boolTag] = cloneableTags[dateTag] =\n  cloneableTags[float32Tag] = cloneableTags[float64Tag] =\n  cloneableTags[int8Tag] = cloneableTags[int16Tag] =\n  cloneableTags[int32Tag] = cloneableTags[mapTag] =\n  cloneableTags[numberTag] = cloneableTags[objectTag] =\n  cloneableTags[regexpTag] = cloneableTags[setTag] =\n  cloneableTags[stringTag] = cloneableTags[symbolTag] =\n  cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\n  cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\n  cloneableTags[errorTag] = cloneableTags[funcTag] =\n  cloneableTags[weakMapTag] = false;\n\n  /** Used to map Latin Unicode letters to basic Latin letters. */\n  var deburredLetters = {\n    // Latin-1 Supplement block.\n    '\\xc0': 'A',  '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n    '\\xe0': 'a',  '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n    '\\xc7': 'C',  '\\xe7': 'c',\n    '\\xd0': 'D',  '\\xf0': 'd',\n    '\\xc8': 'E',  '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n    '\\xe8': 'e',  '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n    '\\xcc': 'I',  '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n    '\\xec': 'i',  '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n    '\\xd1': 'N',  '\\xf1': 'n',\n    '\\xd2': 'O',  '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n    '\\xf2': 'o',  '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n    '\\xd9': 'U',  '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n    '\\xf9': 'u',  '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n    '\\xdd': 'Y',  '\\xfd': 'y', '\\xff': 'y',\n    '\\xc6': 'Ae', '\\xe6': 'ae',\n    '\\xde': 'Th', '\\xfe': 'th',\n    '\\xdf': 'ss',\n    // Latin Extended-A block.\n    '\\u0100': 'A',  '\\u0102': 'A', '\\u0104': 'A',\n    '\\u0101': 'a',  '\\u0103': 'a', '\\u0105': 'a',\n    '\\u0106': 'C',  '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n    '\\u0107': 'c',  '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n    '\\u010e': 'D',  '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n    '\\u0112': 'E',  '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n    '\\u0113': 'e',  '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n    '\\u011c': 'G',  '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n    '\\u011d': 'g',  '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n    '\\u0124': 'H',  '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n    '\\u0128': 'I',  '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n    '\\u0129': 'i',  '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n    '\\u0134': 'J',  '\\u0135': 'j',\n    '\\u0136': 'K',  '\\u0137': 'k', '\\u0138': 'k',\n    '\\u0139': 'L',  '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n    '\\u013a': 'l',  '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n    '\\u0143': 'N',  '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n    '\\u0144': 'n',  '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n    '\\u014c': 'O',  '\\u014e': 'O', '\\u0150': 'O',\n    '\\u014d': 'o',  '\\u014f': 'o', '\\u0151': 'o',\n    '\\u0154': 'R',  '\\u0156': 'R', '\\u0158': 'R',\n    '\\u0155': 'r',  '\\u0157': 'r', '\\u0159': 'r',\n    '\\u015a': 'S',  '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n    '\\u015b': 's',  '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n    '\\u0162': 'T',  '\\u0164': 'T', '\\u0166': 'T',\n    '\\u0163': 't',  '\\u0165': 't', '\\u0167': 't',\n    '\\u0168': 'U',  '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n    '\\u0169': 'u',  '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n    '\\u0174': 'W',  '\\u0175': 'w',\n    '\\u0176': 'Y',  '\\u0177': 'y', '\\u0178': 'Y',\n    '\\u0179': 'Z',  '\\u017b': 'Z', '\\u017d': 'Z',\n    '\\u017a': 'z',  '\\u017c': 'z', '\\u017e': 'z',\n    '\\u0132': 'IJ', '\\u0133': 'ij',\n    '\\u0152': 'Oe', '\\u0153': 'oe',\n    '\\u0149': \"'n\", '\\u017f': 's'\n  };\n\n  /** Used to map characters to HTML entities. */\n  var htmlEscapes = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#39;'\n  };\n\n  /** Used to map HTML entities to characters. */\n  var htmlUnescapes = {\n    '&amp;': '&',\n    '&lt;': '<',\n    '&gt;': '>',\n    '&quot;': '\"',\n    '&#39;': \"'\"\n  };\n\n  /** Used to escape characters for inclusion in compiled string literals. */\n  var stringEscapes = {\n    '\\\\': '\\\\',\n    \"'\": \"'\",\n    '\\n': 'n',\n    '\\r': 'r',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  /** Built-in method references without a dependency on `root`. */\n  var freeParseFloat = parseFloat,\n      freeParseInt = parseInt;\n\n  /** Detect free variable `global` from Node.js. */\n  var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n  /** Detect free variable `self`. */\n  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n  /** Used as a reference to the global object. */\n  var root = freeGlobal || freeSelf || Function('return this')();\n\n  /** Detect free variable `exports`. */\n  var freeExports =  true && exports && !exports.nodeType && exports;\n\n  /** Detect free variable `module`. */\n  var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n  /** Detect the popular CommonJS extension `module.exports`. */\n  var moduleExports = freeModule && freeModule.exports === freeExports;\n\n  /** Detect free variable `process` from Node.js. */\n  var freeProcess = moduleExports && freeGlobal.process;\n\n  /** Used to access faster Node.js helpers. */\n  var nodeUtil = (function() {\n    try {\n      // Use `util.types` for Node.js 10+.\n      var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n      if (types) {\n        return types;\n      }\n\n      // Legacy `process.binding('util')` for Node.js < 10.\n      return freeProcess && freeProcess.binding && freeProcess.binding('util');\n    } catch (e) {}\n  }());\n\n  /* Node.js helper references. */\n  var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,\n      nodeIsDate = nodeUtil && nodeUtil.isDate,\n      nodeIsMap = nodeUtil && nodeUtil.isMap,\n      nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\n      nodeIsSet = nodeUtil && nodeUtil.isSet,\n      nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * A faster alternative to `Function#apply`, this function invokes `func`\n   * with the `this` binding of `thisArg` and the arguments of `args`.\n   *\n   * @private\n   * @param {Function} func The function to invoke.\n   * @param {*} thisArg The `this` binding of `func`.\n   * @param {Array} args The arguments to invoke `func` with.\n   * @returns {*} Returns the result of `func`.\n   */\n  function apply(func, thisArg, args) {\n    switch (args.length) {\n      case 0: return func.call(thisArg);\n      case 1: return func.call(thisArg, args[0]);\n      case 2: return func.call(thisArg, args[0], args[1]);\n      case 3: return func.call(thisArg, args[0], args[1], args[2]);\n    }\n    return func.apply(thisArg, args);\n  }\n\n  /**\n   * A specialized version of `baseAggregator` for arrays.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} setter The function to set `accumulator` values.\n   * @param {Function} iteratee The iteratee to transform keys.\n   * @param {Object} accumulator The initial aggregated object.\n   * @returns {Function} Returns `accumulator`.\n   */\n  function arrayAggregator(array, setter, iteratee, accumulator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      var value = array[index];\n      setter(accumulator, value, iteratee(value), array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.forEach` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEach(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (iteratee(array[index], index, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.forEachRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayEachRight(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n\n    while (length--) {\n      if (iteratee(array[length], length, array) === false) {\n        break;\n      }\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.every` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if all elements pass the predicate check,\n   *  else `false`.\n   */\n  function arrayEvery(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (!predicate(array[index], index, array)) {\n        return false;\n      }\n    }\n    return true;\n  }\n\n  /**\n   * A specialized version of `_.filter` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {Array} Returns the new filtered array.\n   */\n  function arrayFilter(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (predicate(value, index, array)) {\n        result[resIndex++] = value;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.includes` for arrays without support for\n   * specifying an index to search from.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludes(array, value) {\n    var length = array == null ? 0 : array.length;\n    return !!length && baseIndexOf(array, value, 0) > -1;\n  }\n\n  /**\n   * This function is like `arrayIncludes` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} [array] The array to inspect.\n   * @param {*} target The value to search for.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {boolean} Returns `true` if `target` is found, else `false`.\n   */\n  function arrayIncludesWith(array, value, comparator) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (comparator(value, array[index])) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * A specialized version of `_.map` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the new mapped array.\n   */\n  function arrayMap(array, iteratee) {\n    var index = -1,\n        length = array == null ? 0 : array.length,\n        result = Array(length);\n\n    while (++index < length) {\n      result[index] = iteratee(array[index], index, array);\n    }\n    return result;\n  }\n\n  /**\n   * Appends the elements of `values` to `array`.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {Array} values The values to append.\n   * @returns {Array} Returns `array`.\n   */\n  function arrayPush(array, values) {\n    var index = -1,\n        length = values.length,\n        offset = array.length;\n\n    while (++index < length) {\n      array[offset + index] = values[index];\n    }\n    return array;\n  }\n\n  /**\n   * A specialized version of `_.reduce` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the first element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduce(array, iteratee, accumulator, initAccum) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    if (initAccum && length) {\n      accumulator = array[++index];\n    }\n    while (++index < length) {\n      accumulator = iteratee(accumulator, array[index], index, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.reduceRight` for arrays without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} [accumulator] The initial value.\n   * @param {boolean} [initAccum] Specify using the last element of `array` as\n   *  the initial value.\n   * @returns {*} Returns the accumulated value.\n   */\n  function arrayReduceRight(array, iteratee, accumulator, initAccum) {\n    var length = array == null ? 0 : array.length;\n    if (initAccum && length) {\n      accumulator = array[--length];\n    }\n    while (length--) {\n      accumulator = iteratee(accumulator, array[length], length, array);\n    }\n    return accumulator;\n  }\n\n  /**\n   * A specialized version of `_.some` for arrays without support for iteratee\n   * shorthands.\n   *\n   * @private\n   * @param {Array} [array] The array to iterate over.\n   * @param {Function} predicate The function invoked per iteration.\n   * @returns {boolean} Returns `true` if any element passes the predicate check,\n   *  else `false`.\n   */\n  function arraySome(array, predicate) {\n    var index = -1,\n        length = array == null ? 0 : array.length;\n\n    while (++index < length) {\n      if (predicate(array[index], index, array)) {\n        return true;\n      }\n    }\n    return false;\n  }\n\n  /**\n   * Gets the size of an ASCII `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  var asciiSize = baseProperty('length');\n\n  /**\n   * Converts an ASCII `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function asciiToArray(string) {\n    return string.split('');\n  }\n\n  /**\n   * Splits an ASCII `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function asciiWords(string) {\n    return string.match(reAsciiWord) || [];\n  }\n\n  /**\n   * The base implementation of methods like `_.findKey` and `_.findLastKey`,\n   * without support for iteratee shorthands, which iterates over `collection`\n   * using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the found element or its key, else `undefined`.\n   */\n  function baseFindKey(collection, predicate, eachFunc) {\n    var result;\n    eachFunc(collection, function(value, key, collection) {\n      if (predicate(value, key, collection)) {\n        result = key;\n        return false;\n      }\n    });\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.findIndex` and `_.findLastIndex` without\n   * support for iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {Function} predicate The function invoked per iteration.\n   * @param {number} fromIndex The index to search from.\n   * @param {boolean} [fromRight] Specify iterating from right to left.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseFindIndex(array, predicate, fromIndex, fromRight) {\n    var length = array.length,\n        index = fromIndex + (fromRight ? 1 : -1);\n\n    while ((fromRight ? index-- : ++index < length)) {\n      if (predicate(array[index], index, array)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOf(array, value, fromIndex) {\n    return value === value\n      ? strictIndexOf(array, value, fromIndex)\n      : baseFindIndex(array, baseIsNaN, fromIndex);\n  }\n\n  /**\n   * This function is like `baseIndexOf` except that it accepts a comparator.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @param {Function} comparator The comparator invoked per element.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function baseIndexOfWith(array, value, fromIndex, comparator) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (comparator(array[index], value)) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * The base implementation of `_.isNaN` without support for number objects.\n   *\n   * @private\n   * @param {*} value The value to check.\n   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n   */\n  function baseIsNaN(value) {\n    return value !== value;\n  }\n\n  /**\n   * The base implementation of `_.mean` and `_.meanBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the mean.\n   */\n  function baseMean(array, iteratee) {\n    var length = array == null ? 0 : array.length;\n    return length ? (baseSum(array, iteratee) / length) : NAN;\n  }\n\n  /**\n   * The base implementation of `_.property` without support for deep paths.\n   *\n   * @private\n   * @param {string} key The key of the property to get.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function baseProperty(key) {\n    return function(object) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.propertyOf` without support for deep paths.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @returns {Function} Returns the new accessor function.\n   */\n  function basePropertyOf(object) {\n    return function(key) {\n      return object == null ? undefined : object[key];\n    };\n  }\n\n  /**\n   * The base implementation of `_.reduce` and `_.reduceRight`, without support\n   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\n   *\n   * @private\n   * @param {Array|Object} collection The collection to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @param {*} accumulator The initial value.\n   * @param {boolean} initAccum Specify using the first or last element of\n   *  `collection` as the initial value.\n   * @param {Function} eachFunc The function to iterate over `collection`.\n   * @returns {*} Returns the accumulated value.\n   */\n  function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\n    eachFunc(collection, function(value, index, collection) {\n      accumulator = initAccum\n        ? (initAccum = false, value)\n        : iteratee(accumulator, value, index, collection);\n    });\n    return accumulator;\n  }\n\n  /**\n   * The base implementation of `_.sortBy` which uses `comparer` to define the\n   * sort order of `array` and replaces criteria objects with their corresponding\n   * values.\n   *\n   * @private\n   * @param {Array} array The array to sort.\n   * @param {Function} comparer The function to define sort order.\n   * @returns {Array} Returns `array`.\n   */\n  function baseSortBy(array, comparer) {\n    var length = array.length;\n\n    array.sort(comparer);\n    while (length--) {\n      array[length] = array[length].value;\n    }\n    return array;\n  }\n\n  /**\n   * The base implementation of `_.sum` and `_.sumBy` without support for\n   * iteratee shorthands.\n   *\n   * @private\n   * @param {Array} array The array to iterate over.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {number} Returns the sum.\n   */\n  function baseSum(array, iteratee) {\n    var result,\n        index = -1,\n        length = array.length;\n\n    while (++index < length) {\n      var current = iteratee(array[index]);\n      if (current !== undefined) {\n        result = result === undefined ? current : (result + current);\n      }\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.times` without support for iteratee shorthands\n   * or max array length checks.\n   *\n   * @private\n   * @param {number} n The number of times to invoke `iteratee`.\n   * @param {Function} iteratee The function invoked per iteration.\n   * @returns {Array} Returns the array of results.\n   */\n  function baseTimes(n, iteratee) {\n    var index = -1,\n        result = Array(n);\n\n    while (++index < n) {\n      result[index] = iteratee(index);\n    }\n    return result;\n  }\n\n  /**\n   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array\n   * of key-value pairs for `object` corresponding to the property names of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the key-value pairs.\n   */\n  function baseToPairs(object, props) {\n    return arrayMap(props, function(key) {\n      return [key, object[key]];\n    });\n  }\n\n  /**\n   * The base implementation of `_.trim`.\n   *\n   * @private\n   * @param {string} string The string to trim.\n   * @returns {string} Returns the trimmed string.\n   */\n  function baseTrim(string) {\n    return string\n      ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n      : string;\n  }\n\n  /**\n   * The base implementation of `_.unary` without support for storing metadata.\n   *\n   * @private\n   * @param {Function} func The function to cap arguments for.\n   * @returns {Function} Returns the new capped function.\n   */\n  function baseUnary(func) {\n    return function(value) {\n      return func(value);\n    };\n  }\n\n  /**\n   * The base implementation of `_.values` and `_.valuesIn` which creates an\n   * array of `object` property values corresponding to the property names\n   * of `props`.\n   *\n   * @private\n   * @param {Object} object The object to query.\n   * @param {Array} props The property names to get values for.\n   * @returns {Object} Returns the array of property values.\n   */\n  function baseValues(object, props) {\n    return arrayMap(props, function(key) {\n      return object[key];\n    });\n  }\n\n  /**\n   * Checks if a `cache` value for `key` exists.\n   *\n   * @private\n   * @param {Object} cache The cache to query.\n   * @param {string} key The key of the entry to check.\n   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n   */\n  function cacheHas(cache, key) {\n    return cache.has(key);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the first unmatched string symbol.\n   */\n  function charsStartIndex(strSymbols, chrSymbols) {\n    var index = -1,\n        length = strSymbols.length;\n\n    while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\n   * that is not found in the character symbols.\n   *\n   * @private\n   * @param {Array} strSymbols The string symbols to inspect.\n   * @param {Array} chrSymbols The character symbols to find.\n   * @returns {number} Returns the index of the last unmatched string symbol.\n   */\n  function charsEndIndex(strSymbols, chrSymbols) {\n    var index = strSymbols.length;\n\n    while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\n    return index;\n  }\n\n  /**\n   * Gets the number of `placeholder` occurrences in `array`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} placeholder The placeholder to search for.\n   * @returns {number} Returns the placeholder count.\n   */\n  function countHolders(array, placeholder) {\n    var length = array.length,\n        result = 0;\n\n    while (length--) {\n      if (array[length] === placeholder) {\n        ++result;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n   * letters to basic Latin letters.\n   *\n   * @private\n   * @param {string} letter The matched letter to deburr.\n   * @returns {string} Returns the deburred letter.\n   */\n  var deburrLetter = basePropertyOf(deburredLetters);\n\n  /**\n   * Used by `_.escape` to convert characters to HTML entities.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  var escapeHtmlChar = basePropertyOf(htmlEscapes);\n\n  /**\n   * Used by `_.template` to escape characters for inclusion in compiled string literals.\n   *\n   * @private\n   * @param {string} chr The matched character to escape.\n   * @returns {string} Returns the escaped character.\n   */\n  function escapeStringChar(chr) {\n    return '\\\\' + stringEscapes[chr];\n  }\n\n  /**\n   * Gets the value at `key` of `object`.\n   *\n   * @private\n   * @param {Object} [object] The object to query.\n   * @param {string} key The key of the property to get.\n   * @returns {*} Returns the property value.\n   */\n  function getValue(object, key) {\n    return object == null ? undefined : object[key];\n  }\n\n  /**\n   * Checks if `string` contains Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n   */\n  function hasUnicode(string) {\n    return reHasUnicode.test(string);\n  }\n\n  /**\n   * Checks if `string` contains a word composed of Unicode symbols.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {boolean} Returns `true` if a word is found, else `false`.\n   */\n  function hasUnicodeWord(string) {\n    return reHasUnicodeWord.test(string);\n  }\n\n  /**\n   * Converts `iterator` to an array.\n   *\n   * @private\n   * @param {Object} iterator The iterator to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function iteratorToArray(iterator) {\n    var data,\n        result = [];\n\n    while (!(data = iterator.next()).done) {\n      result.push(data.value);\n    }\n    return result;\n  }\n\n  /**\n   * Converts `map` to its key-value pairs.\n   *\n   * @private\n   * @param {Object} map The map to convert.\n   * @returns {Array} Returns the key-value pairs.\n   */\n  function mapToArray(map) {\n    var index = -1,\n        result = Array(map.size);\n\n    map.forEach(function(value, key) {\n      result[++index] = [key, value];\n    });\n    return result;\n  }\n\n  /**\n   * Creates a unary function that invokes `func` with its argument transformed.\n   *\n   * @private\n   * @param {Function} func The function to wrap.\n   * @param {Function} transform The argument transform.\n   * @returns {Function} Returns the new function.\n   */\n  function overArg(func, transform) {\n    return function(arg) {\n      return func(transform(arg));\n    };\n  }\n\n  /**\n   * Replaces all `placeholder` elements in `array` with an internal placeholder\n   * and returns an array of their indexes.\n   *\n   * @private\n   * @param {Array} array The array to modify.\n   * @param {*} placeholder The placeholder to replace.\n   * @returns {Array} Returns the new array of placeholder indexes.\n   */\n  function replaceHolders(array, placeholder) {\n    var index = -1,\n        length = array.length,\n        resIndex = 0,\n        result = [];\n\n    while (++index < length) {\n      var value = array[index];\n      if (value === placeholder || value === PLACEHOLDER) {\n        array[index] = PLACEHOLDER;\n        result[resIndex++] = index;\n      }\n    }\n    return result;\n  }\n\n  /**\n   * Converts `set` to an array of its values.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the values.\n   */\n  function setToArray(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = value;\n    });\n    return result;\n  }\n\n  /**\n   * Converts `set` to its value-value pairs.\n   *\n   * @private\n   * @param {Object} set The set to convert.\n   * @returns {Array} Returns the value-value pairs.\n   */\n  function setToPairs(set) {\n    var index = -1,\n        result = Array(set.size);\n\n    set.forEach(function(value) {\n      result[++index] = [value, value];\n    });\n    return result;\n  }\n\n  /**\n   * A specialized version of `_.indexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictIndexOf(array, value, fromIndex) {\n    var index = fromIndex - 1,\n        length = array.length;\n\n    while (++index < length) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return -1;\n  }\n\n  /**\n   * A specialized version of `_.lastIndexOf` which performs strict equality\n   * comparisons of values, i.e. `===`.\n   *\n   * @private\n   * @param {Array} array The array to inspect.\n   * @param {*} value The value to search for.\n   * @param {number} fromIndex The index to search from.\n   * @returns {number} Returns the index of the matched value, else `-1`.\n   */\n  function strictLastIndexOf(array, value, fromIndex) {\n    var index = fromIndex + 1;\n    while (index--) {\n      if (array[index] === value) {\n        return index;\n      }\n    }\n    return index;\n  }\n\n  /**\n   * Gets the number of symbols in `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the string size.\n   */\n  function stringSize(string) {\n    return hasUnicode(string)\n      ? unicodeSize(string)\n      : asciiSize(string);\n  }\n\n  /**\n   * Converts `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function stringToArray(string) {\n    return hasUnicode(string)\n      ? unicodeToArray(string)\n      : asciiToArray(string);\n  }\n\n  /**\n   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n   * character of `string`.\n   *\n   * @private\n   * @param {string} string The string to inspect.\n   * @returns {number} Returns the index of the last non-whitespace character.\n   */\n  function trimmedEndIndex(string) {\n    var index = string.length;\n\n    while (index-- && reWhitespace.test(string.charAt(index))) {}\n    return index;\n  }\n\n  /**\n   * Used by `_.unescape` to convert HTML entities to characters.\n   *\n   * @private\n   * @param {string} chr The matched character to unescape.\n   * @returns {string} Returns the unescaped character.\n   */\n  var unescapeHtmlChar = basePropertyOf(htmlUnescapes);\n\n  /**\n   * Gets the size of a Unicode `string`.\n   *\n   * @private\n   * @param {string} string The string inspect.\n   * @returns {number} Returns the string size.\n   */\n  function unicodeSize(string) {\n    var result = reUnicode.lastIndex = 0;\n    while (reUnicode.test(string)) {\n      ++result;\n    }\n    return result;\n  }\n\n  /**\n   * Converts a Unicode `string` to an array.\n   *\n   * @private\n   * @param {string} string The string to convert.\n   * @returns {Array} Returns the converted array.\n   */\n  function unicodeToArray(string) {\n    return string.match(reUnicode) || [];\n  }\n\n  /**\n   * Splits a Unicode `string` into an array of its words.\n   *\n   * @private\n   * @param {string} The string to inspect.\n   * @returns {Array} Returns the words of `string`.\n   */\n  function unicodeWords(string) {\n    return string.match(reUnicodeWord) || [];\n  }\n\n  /*--------------------------------------------------------------------------*/\n\n  /**\n   * Create a new pristine `lodash` function using the `context` object.\n   *\n   * @static\n   * @memberOf _\n   * @since 1.1.0\n   * @category Util\n   * @param {Object} [context=root] The context object.\n   * @returns {Function} Returns a new `lodash` function.\n   * @example\n   *\n   * _.mixin({ 'foo': _.constant('foo') });\n   *\n   * var lodash = _.runInContext();\n   * lodash.mixin({ 'bar': lodash.constant('bar') });\n   *\n   * _.isFunction(_.foo);\n   * // => true\n   * _.isFunction(_.bar);\n   * // => false\n   *\n   * lodash.isFunction(lodash.foo);\n   * // => false\n   * lodash.isFunction(lodash.bar);\n   * // => true\n   *\n   * // Create a suped-up `defer` in Node.js.\n   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;\n   */\n  var runInContext = (function runInContext(context) {\n    context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));\n\n    /** Built-in constructor references. */\n    var Array = context.Array,\n        Date = context.Date,\n        Error = context.Error,\n        Function = context.Function,\n        Math = context.Math,\n        Object = context.Object,\n        RegExp = context.RegExp,\n        String = context.String,\n        TypeError = context.TypeError;\n\n    /** Used for built-in method references. */\n    var arrayProto = Array.prototype,\n        funcProto = Function.prototype,\n        objectProto = Object.prototype;\n\n    /** Used to detect overreaching core-js shims. */\n    var coreJsData = context['__core-js_shared__'];\n\n    /** Used to resolve the decompiled source of functions. */\n    var funcToString = funcProto.toString;\n\n    /** Used to check objects for own properties. */\n    var hasOwnProperty = objectProto.hasOwnProperty;\n\n    /** Used to generate unique IDs. */\n    var idCounter = 0;\n\n    /** Used to detect methods masquerading as native. */\n    var maskSrcKey = (function() {\n      var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n      return uid ? ('Symbol(src)_1.' + uid) : '';\n    }());\n\n    /**\n     * Used to resolve the\n     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n     * of values.\n     */\n    var nativeObjectToString = objectProto.toString;\n\n    /** Used to infer the `Object` constructor. */\n    var objectCtorString = funcToString.call(Object);\n\n    /** Used to restore the original `_` reference in `_.noConflict`. */\n    var oldDash = root._;\n\n    /** Used to detect if a method is native. */\n    var reIsNative = RegExp('^' +\n      funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n      .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n    );\n\n    /** Built-in value references. */\n    var Buffer = moduleExports ? context.Buffer : undefined,\n        Symbol = context.Symbol,\n        Uint8Array = context.Uint8Array,\n        allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n        getPrototype = overArg(Object.getPrototypeOf, Object),\n        objectCreate = Object.create,\n        propertyIsEnumerable = objectProto.propertyIsEnumerable,\n        splice = arrayProto.splice,\n        spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\n        symIterator = Symbol ? Symbol.iterator : undefined,\n        symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n    var defineProperty = (function() {\n      try {\n        var func = getNative(Object, 'defineProperty');\n        func({}, '', {});\n        return func;\n      } catch (e) {}\n    }());\n\n    /** Mocked built-ins. */\n    var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,\n        ctxNow = Date && Date.now !== root.Date.now && Date.now,\n        ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;\n\n    /* Built-in method references for those with the same name as other `lodash` methods. */\n    var nativeCeil = Math.ceil,\n        nativeFloor = Math.floor,\n        nativeGetSymbols = Object.getOwnPropertySymbols,\n        nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n        nativeIsFinite = context.isFinite,\n        nativeJoin = arrayProto.join,\n        nativeKeys = overArg(Object.keys, Object),\n        nativeMax = Math.max,\n        nativeMin = Math.min,\n        nativeNow = Date.now,\n        nativeParseInt = context.parseInt,\n        nativeRandom = Math.random,\n        nativeReverse = arrayProto.reverse;\n\n    /* Built-in method references that are verified to be native. */\n    var DataView = getNative(context, 'DataView'),\n        Map = getNative(context, 'Map'),\n        Promise = getNative(context, 'Promise'),\n        Set = getNative(context, 'Set'),\n        WeakMap = getNative(context, 'WeakMap'),\n        nativeCreate = getNative(Object, 'create');\n\n    /** Used to store function metadata. */\n    var metaMap = WeakMap && new WeakMap;\n\n    /** Used to lookup unminified function names. */\n    var realNames = {};\n\n    /** Used to detect maps, sets, and weakmaps. */\n    var dataViewCtorString = toSource(DataView),\n        mapCtorString = toSource(Map),\n        promiseCtorString = toSource(Promise),\n        setCtorString = toSource(Set),\n        weakMapCtorString = toSource(WeakMap);\n\n    /** Used to convert symbols to primitives and strings. */\n    var symbolProto = Symbol ? Symbol.prototype : undefined,\n        symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\n        symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` object which wraps `value` to enable implicit method\n     * chain sequences. Methods that operate on and return arrays, collections,\n     * and functions can be chained together. Methods that retrieve a single value\n     * or may return a primitive value will automatically end the chain sequence\n     * and return the unwrapped value. Otherwise, the value must be unwrapped\n     * with `_#value`.\n     *\n     * Explicit chain sequences, which must be unwrapped with `_#value`, may be\n     * enabled using `_.chain`.\n     *\n     * The execution of chained methods is lazy, that is, it's deferred until\n     * `_#value` is implicitly or explicitly called.\n     *\n     * Lazy evaluation allows several methods to support shortcut fusion.\n     * Shortcut fusion is an optimization to merge iteratee calls; this avoids\n     * the creation of intermediate arrays and can greatly reduce the number of\n     * iteratee executions. Sections of a chain sequence qualify for shortcut\n     * fusion if the section is applied to an array and iteratees accept only\n     * one argument. The heuristic for whether a section qualifies for shortcut\n     * fusion is subject to change.\n     *\n     * Chaining is supported in custom builds as long as the `_#value` method is\n     * directly or indirectly included in the build.\n     *\n     * In addition to lodash methods, wrappers have `Array` and `String` methods.\n     *\n     * The wrapper `Array` methods are:\n     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\n     *\n     * The wrapper `String` methods are:\n     * `replace` and `split`\n     *\n     * The wrapper methods that support shortcut fusion are:\n     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\n     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\n     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\n     *\n     * The chainable wrapper methods are:\n     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\n     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\n     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\n     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\n     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\n     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\n     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\n     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\n     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\n     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\n     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\n     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\n     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\n     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\n     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\n     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\n     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\n     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\n     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\n     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\n     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\n     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\n     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\n     * `zipObject`, `zipObjectDeep`, and `zipWith`\n     *\n     * The wrapper methods that are **not** chainable by default are:\n     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\n     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\n     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\n     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\n     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\n     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\n     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\n     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\n     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\n     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\n     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\n     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\n     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\n     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\n     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\n     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\n     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\n     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\n     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\n     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\n     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\n     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\n     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\n     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\n     * `upperFirst`, `value`, and `words`\n     *\n     * @name _\n     * @constructor\n     * @category Seq\n     * @param {*} value The value to wrap in a `lodash` instance.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2, 3]);\n     *\n     * // Returns an unwrapped value.\n     * wrapped.reduce(_.add);\n     * // => 6\n     *\n     * // Returns a wrapped value.\n     * var squares = wrapped.map(square);\n     *\n     * _.isArray(squares);\n     * // => false\n     *\n     * _.isArray(squares.value());\n     * // => true\n     */\n    function lodash(value) {\n      if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\n        if (value instanceof LodashWrapper) {\n          return value;\n        }\n        if (hasOwnProperty.call(value, '__wrapped__')) {\n          return wrapperClone(value);\n        }\n      }\n      return new LodashWrapper(value);\n    }\n\n    /**\n     * The base implementation of `_.create` without support for assigning\n     * properties to the created object.\n     *\n     * @private\n     * @param {Object} proto The object to inherit from.\n     * @returns {Object} Returns the new object.\n     */\n    var baseCreate = (function() {\n      function object() {}\n      return function(proto) {\n        if (!isObject(proto)) {\n          return {};\n        }\n        if (objectCreate) {\n          return objectCreate(proto);\n        }\n        object.prototype = proto;\n        var result = new object;\n        object.prototype = undefined;\n        return result;\n      };\n    }());\n\n    /**\n     * The function whose prototype chain sequence wrappers inherit from.\n     *\n     * @private\n     */\n    function baseLodash() {\n      // No operation performed.\n    }\n\n    /**\n     * The base constructor for creating `lodash` wrapper objects.\n     *\n     * @private\n     * @param {*} value The value to wrap.\n     * @param {boolean} [chainAll] Enable explicit method chain sequences.\n     */\n    function LodashWrapper(value, chainAll) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__chain__ = !!chainAll;\n      this.__index__ = 0;\n      this.__values__ = undefined;\n    }\n\n    /**\n     * By default, the template delimiters used by lodash are like those in\n     * embedded Ruby (ERB) as well as ES2015 template strings. Change the\n     * following template settings to use alternative delimiters.\n     *\n     * @static\n     * @memberOf _\n     * @type {Object}\n     */\n    lodash.templateSettings = {\n\n      /**\n       * Used to detect `data` property values to be HTML-escaped.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'escape': reEscape,\n\n      /**\n       * Used to detect code to be evaluated.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'evaluate': reEvaluate,\n\n      /**\n       * Used to detect `data` property values to inject.\n       *\n       * @memberOf _.templateSettings\n       * @type {RegExp}\n       */\n      'interpolate': reInterpolate,\n\n      /**\n       * Used to reference the data object in the template text.\n       *\n       * @memberOf _.templateSettings\n       * @type {string}\n       */\n      'variable': '',\n\n      /**\n       * Used to import variables into the compiled template.\n       *\n       * @memberOf _.templateSettings\n       * @type {Object}\n       */\n      'imports': {\n\n        /**\n         * A reference to the `lodash` function.\n         *\n         * @memberOf _.templateSettings.imports\n         * @type {Function}\n         */\n        '_': lodash\n      }\n    };\n\n    // Ensure wrappers are instances of `baseLodash`.\n    lodash.prototype = baseLodash.prototype;\n    lodash.prototype.constructor = lodash;\n\n    LodashWrapper.prototype = baseCreate(baseLodash.prototype);\n    LodashWrapper.prototype.constructor = LodashWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n     *\n     * @private\n     * @constructor\n     * @param {*} value The value to wrap.\n     */\n    function LazyWrapper(value) {\n      this.__wrapped__ = value;\n      this.__actions__ = [];\n      this.__dir__ = 1;\n      this.__filtered__ = false;\n      this.__iteratees__ = [];\n      this.__takeCount__ = MAX_ARRAY_LENGTH;\n      this.__views__ = [];\n    }\n\n    /**\n     * Creates a clone of the lazy wrapper object.\n     *\n     * @private\n     * @name clone\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the cloned `LazyWrapper` object.\n     */\n    function lazyClone() {\n      var result = new LazyWrapper(this.__wrapped__);\n      result.__actions__ = copyArray(this.__actions__);\n      result.__dir__ = this.__dir__;\n      result.__filtered__ = this.__filtered__;\n      result.__iteratees__ = copyArray(this.__iteratees__);\n      result.__takeCount__ = this.__takeCount__;\n      result.__views__ = copyArray(this.__views__);\n      return result;\n    }\n\n    /**\n     * Reverses the direction of lazy iteration.\n     *\n     * @private\n     * @name reverse\n     * @memberOf LazyWrapper\n     * @returns {Object} Returns the new reversed `LazyWrapper` object.\n     */\n    function lazyReverse() {\n      if (this.__filtered__) {\n        var result = new LazyWrapper(this);\n        result.__dir__ = -1;\n        result.__filtered__ = true;\n      } else {\n        result = this.clone();\n        result.__dir__ *= -1;\n      }\n      return result;\n    }\n\n    /**\n     * Extracts the unwrapped value from its lazy wrapper.\n     *\n     * @private\n     * @name value\n     * @memberOf LazyWrapper\n     * @returns {*} Returns the unwrapped value.\n     */\n    function lazyValue() {\n      var array = this.__wrapped__.value(),\n          dir = this.__dir__,\n          isArr = isArray(array),\n          isRight = dir < 0,\n          arrLength = isArr ? array.length : 0,\n          view = getView(0, arrLength, this.__views__),\n          start = view.start,\n          end = view.end,\n          length = end - start,\n          index = isRight ? end : (start - 1),\n          iteratees = this.__iteratees__,\n          iterLength = iteratees.length,\n          resIndex = 0,\n          takeCount = nativeMin(length, this.__takeCount__);\n\n      if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\n        return baseWrapperValue(array, this.__actions__);\n      }\n      var result = [];\n\n      outer:\n      while (length-- && resIndex < takeCount) {\n        index += dir;\n\n        var iterIndex = -1,\n            value = array[index];\n\n        while (++iterIndex < iterLength) {\n          var data = iteratees[iterIndex],\n              iteratee = data.iteratee,\n              type = data.type,\n              computed = iteratee(value);\n\n          if (type == LAZY_MAP_FLAG) {\n            value = computed;\n          } else if (!computed) {\n            if (type == LAZY_FILTER_FLAG) {\n              continue outer;\n            } else {\n              break outer;\n            }\n          }\n        }\n        result[resIndex++] = value;\n      }\n      return result;\n    }\n\n    // Ensure `LazyWrapper` is an instance of `baseLodash`.\n    LazyWrapper.prototype = baseCreate(baseLodash.prototype);\n    LazyWrapper.prototype.constructor = LazyWrapper;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a hash object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Hash(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the hash.\n     *\n     * @private\n     * @name clear\n     * @memberOf Hash\n     */\n    function hashClear() {\n      this.__data__ = nativeCreate ? nativeCreate(null) : {};\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the hash.\n     *\n     * @private\n     * @name delete\n     * @memberOf Hash\n     * @param {Object} hash The hash to modify.\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function hashDelete(key) {\n      var result = this.has(key) && delete this.__data__[key];\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the hash value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Hash\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function hashGet(key) {\n      var data = this.__data__;\n      if (nativeCreate) {\n        var result = data[key];\n        return result === HASH_UNDEFINED ? undefined : result;\n      }\n      return hasOwnProperty.call(data, key) ? data[key] : undefined;\n    }\n\n    /**\n     * Checks if a hash value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Hash\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function hashHas(key) {\n      var data = this.__data__;\n      return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n    }\n\n    /**\n     * Sets the hash `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Hash\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the hash instance.\n     */\n    function hashSet(key, value) {\n      var data = this.__data__;\n      this.size += this.has(key) ? 0 : 1;\n      data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n      return this;\n    }\n\n    // Add methods to `Hash`.\n    Hash.prototype.clear = hashClear;\n    Hash.prototype['delete'] = hashDelete;\n    Hash.prototype.get = hashGet;\n    Hash.prototype.has = hashHas;\n    Hash.prototype.set = hashSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an list cache object.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function ListCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the list cache.\n     *\n     * @private\n     * @name clear\n     * @memberOf ListCache\n     */\n    function listCacheClear() {\n      this.__data__ = [];\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the list cache.\n     *\n     * @private\n     * @name delete\n     * @memberOf ListCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function listCacheDelete(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        return false;\n      }\n      var lastIndex = data.length - 1;\n      if (index == lastIndex) {\n        data.pop();\n      } else {\n        splice.call(data, index, 1);\n      }\n      --this.size;\n      return true;\n    }\n\n    /**\n     * Gets the list cache value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf ListCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function listCacheGet(key) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      return index < 0 ? undefined : data[index][1];\n    }\n\n    /**\n     * Checks if a list cache value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf ListCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function listCacheHas(key) {\n      return assocIndexOf(this.__data__, key) > -1;\n    }\n\n    /**\n     * Sets the list cache `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf ListCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the list cache instance.\n     */\n    function listCacheSet(key, value) {\n      var data = this.__data__,\n          index = assocIndexOf(data, key);\n\n      if (index < 0) {\n        ++this.size;\n        data.push([key, value]);\n      } else {\n        data[index][1] = value;\n      }\n      return this;\n    }\n\n    // Add methods to `ListCache`.\n    ListCache.prototype.clear = listCacheClear;\n    ListCache.prototype['delete'] = listCacheDelete;\n    ListCache.prototype.get = listCacheGet;\n    ListCache.prototype.has = listCacheHas;\n    ListCache.prototype.set = listCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a map cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function MapCache(entries) {\n      var index = -1,\n          length = entries == null ? 0 : entries.length;\n\n      this.clear();\n      while (++index < length) {\n        var entry = entries[index];\n        this.set(entry[0], entry[1]);\n      }\n    }\n\n    /**\n     * Removes all key-value entries from the map.\n     *\n     * @private\n     * @name clear\n     * @memberOf MapCache\n     */\n    function mapCacheClear() {\n      this.size = 0;\n      this.__data__ = {\n        'hash': new Hash,\n        'map': new (Map || ListCache),\n        'string': new Hash\n      };\n    }\n\n    /**\n     * Removes `key` and its value from the map.\n     *\n     * @private\n     * @name delete\n     * @memberOf MapCache\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function mapCacheDelete(key) {\n      var result = getMapData(this, key)['delete'](key);\n      this.size -= result ? 1 : 0;\n      return result;\n    }\n\n    /**\n     * Gets the map value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf MapCache\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function mapCacheGet(key) {\n      return getMapData(this, key).get(key);\n    }\n\n    /**\n     * Checks if a map value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf MapCache\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function mapCacheHas(key) {\n      return getMapData(this, key).has(key);\n    }\n\n    /**\n     * Sets the map `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf MapCache\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the map cache instance.\n     */\n    function mapCacheSet(key, value) {\n      var data = getMapData(this, key),\n          size = data.size;\n\n      data.set(key, value);\n      this.size += data.size == size ? 0 : 1;\n      return this;\n    }\n\n    // Add methods to `MapCache`.\n    MapCache.prototype.clear = mapCacheClear;\n    MapCache.prototype['delete'] = mapCacheDelete;\n    MapCache.prototype.get = mapCacheGet;\n    MapCache.prototype.has = mapCacheHas;\n    MapCache.prototype.set = mapCacheSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     *\n     * Creates an array cache object to store unique values.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [values] The values to cache.\n     */\n    function SetCache(values) {\n      var index = -1,\n          length = values == null ? 0 : values.length;\n\n      this.__data__ = new MapCache;\n      while (++index < length) {\n        this.add(values[index]);\n      }\n    }\n\n    /**\n     * Adds `value` to the array cache.\n     *\n     * @private\n     * @name add\n     * @memberOf SetCache\n     * @alias push\n     * @param {*} value The value to cache.\n     * @returns {Object} Returns the cache instance.\n     */\n    function setCacheAdd(value) {\n      this.__data__.set(value, HASH_UNDEFINED);\n      return this;\n    }\n\n    /**\n     * Checks if `value` is in the array cache.\n     *\n     * @private\n     * @name has\n     * @memberOf SetCache\n     * @param {*} value The value to search for.\n     * @returns {number} Returns `true` if `value` is found, else `false`.\n     */\n    function setCacheHas(value) {\n      return this.__data__.has(value);\n    }\n\n    // Add methods to `SetCache`.\n    SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\n    SetCache.prototype.has = setCacheHas;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a stack cache object to store key-value pairs.\n     *\n     * @private\n     * @constructor\n     * @param {Array} [entries] The key-value pairs to cache.\n     */\n    function Stack(entries) {\n      var data = this.__data__ = new ListCache(entries);\n      this.size = data.size;\n    }\n\n    /**\n     * Removes all key-value entries from the stack.\n     *\n     * @private\n     * @name clear\n     * @memberOf Stack\n     */\n    function stackClear() {\n      this.__data__ = new ListCache;\n      this.size = 0;\n    }\n\n    /**\n     * Removes `key` and its value from the stack.\n     *\n     * @private\n     * @name delete\n     * @memberOf Stack\n     * @param {string} key The key of the value to remove.\n     * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n     */\n    function stackDelete(key) {\n      var data = this.__data__,\n          result = data['delete'](key);\n\n      this.size = data.size;\n      return result;\n    }\n\n    /**\n     * Gets the stack value for `key`.\n     *\n     * @private\n     * @name get\n     * @memberOf Stack\n     * @param {string} key The key of the value to get.\n     * @returns {*} Returns the entry value.\n     */\n    function stackGet(key) {\n      return this.__data__.get(key);\n    }\n\n    /**\n     * Checks if a stack value for `key` exists.\n     *\n     * @private\n     * @name has\n     * @memberOf Stack\n     * @param {string} key The key of the entry to check.\n     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n     */\n    function stackHas(key) {\n      return this.__data__.has(key);\n    }\n\n    /**\n     * Sets the stack `key` to `value`.\n     *\n     * @private\n     * @name set\n     * @memberOf Stack\n     * @param {string} key The key of the value to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns the stack cache instance.\n     */\n    function stackSet(key, value) {\n      var data = this.__data__;\n      if (data instanceof ListCache) {\n        var pairs = data.__data__;\n        if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n          pairs.push([key, value]);\n          this.size = ++data.size;\n          return this;\n        }\n        data = this.__data__ = new MapCache(pairs);\n      }\n      data.set(key, value);\n      this.size = data.size;\n      return this;\n    }\n\n    // Add methods to `Stack`.\n    Stack.prototype.clear = stackClear;\n    Stack.prototype['delete'] = stackDelete;\n    Stack.prototype.get = stackGet;\n    Stack.prototype.has = stackHas;\n    Stack.prototype.set = stackSet;\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of the enumerable property names of the array-like `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @param {boolean} inherited Specify returning inherited property names.\n     * @returns {Array} Returns the array of property names.\n     */\n    function arrayLikeKeys(value, inherited) {\n      var isArr = isArray(value),\n          isArg = !isArr && isArguments(value),\n          isBuff = !isArr && !isArg && isBuffer(value),\n          isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n          skipIndexes = isArr || isArg || isBuff || isType,\n          result = skipIndexes ? baseTimes(value.length, String) : [],\n          length = result.length;\n\n      for (var key in value) {\n        if ((inherited || hasOwnProperty.call(value, key)) &&\n            !(skipIndexes && (\n               // Safari 9 has enumerable `arguments.length` in strict mode.\n               key == 'length' ||\n               // Node.js 0.10 has enumerable non-index properties on buffers.\n               (isBuff && (key == 'offset' || key == 'parent')) ||\n               // PhantomJS 2 has enumerable non-index properties on typed arrays.\n               (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n               // Skip index properties.\n               isIndex(key, length)\n            ))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `_.sample` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @returns {*} Returns the random element.\n     */\n    function arraySample(array) {\n      var length = array.length;\n      return length ? array[baseRandom(0, length - 1)] : undefined;\n    }\n\n    /**\n     * A specialized version of `_.sampleSize` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function arraySampleSize(array, n) {\n      return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * A specialized version of `_.shuffle` for arrays.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function arrayShuffle(array) {\n      return shuffleSelf(copyArray(array));\n    }\n\n    /**\n     * This function is like `assignValue` except that it doesn't assign\n     * `undefined` values.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignMergeValue(object, key, value) {\n      if ((value !== undefined && !eq(object[key], value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Assigns `value` to `key` of `object` if the existing value is not equivalent\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function assignValue(object, key, value) {\n      var objValue = object[key];\n      if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n          (value === undefined && !(key in object))) {\n        baseAssignValue(object, key, value);\n      }\n    }\n\n    /**\n     * Gets the index at which the `key` is found in `array` of key-value pairs.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {*} key The key to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     */\n    function assocIndexOf(array, key) {\n      var length = array.length;\n      while (length--) {\n        if (eq(array[length][0], key)) {\n          return length;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * Aggregates elements of `collection` on `accumulator` with keys transformed\n     * by `iteratee` and values set by `setter`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform keys.\n     * @param {Object} accumulator The initial aggregated object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseAggregator(collection, setter, iteratee, accumulator) {\n      baseEach(collection, function(value, key, collection) {\n        setter(accumulator, value, iteratee(value), collection);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.assign` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssign(object, source) {\n      return object && copyObject(source, keys(source), object);\n    }\n\n    /**\n     * The base implementation of `_.assignIn` without support for multiple sources\n     * or `customizer` functions.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @returns {Object} Returns `object`.\n     */\n    function baseAssignIn(object, source) {\n      return object && copyObject(source, keysIn(source), object);\n    }\n\n    /**\n     * The base implementation of `assignValue` and `assignMergeValue` without\n     * value checks.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {string} key The key of the property to assign.\n     * @param {*} value The value to assign.\n     */\n    function baseAssignValue(object, key, value) {\n      if (key == '__proto__' && defineProperty) {\n        defineProperty(object, key, {\n          'configurable': true,\n          'enumerable': true,\n          'value': value,\n          'writable': true\n        });\n      } else {\n        object[key] = value;\n      }\n    }\n\n    /**\n     * The base implementation of `_.at` without support for individual paths.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Array} Returns the picked elements.\n     */\n    function baseAt(object, paths) {\n      var index = -1,\n          length = paths.length,\n          result = Array(length),\n          skip = object == null;\n\n      while (++index < length) {\n        result[index] = skip ? undefined : get(object, paths[index]);\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.clamp` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     */\n    function baseClamp(number, lower, upper) {\n      if (number === number) {\n        if (upper !== undefined) {\n          number = number <= upper ? number : upper;\n        }\n        if (lower !== undefined) {\n          number = number >= lower ? number : lower;\n        }\n      }\n      return number;\n    }\n\n    /**\n     * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n     * traversed objects.\n     *\n     * @private\n     * @param {*} value The value to clone.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Deep clone\n     *  2 - Flatten inherited properties\n     *  4 - Clone symbols\n     * @param {Function} [customizer] The function to customize cloning.\n     * @param {string} [key] The key of `value`.\n     * @param {Object} [object] The parent object of `value`.\n     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n     * @returns {*} Returns the cloned value.\n     */\n    function baseClone(value, bitmask, customizer, key, object, stack) {\n      var result,\n          isDeep = bitmask & CLONE_DEEP_FLAG,\n          isFlat = bitmask & CLONE_FLAT_FLAG,\n          isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n      if (customizer) {\n        result = object ? customizer(value, key, object, stack) : customizer(value);\n      }\n      if (result !== undefined) {\n        return result;\n      }\n      if (!isObject(value)) {\n        return value;\n      }\n      var isArr = isArray(value);\n      if (isArr) {\n        result = initCloneArray(value);\n        if (!isDeep) {\n          return copyArray(value, result);\n        }\n      } else {\n        var tag = getTag(value),\n            isFunc = tag == funcTag || tag == genTag;\n\n        if (isBuffer(value)) {\n          return cloneBuffer(value, isDeep);\n        }\n        if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n          result = (isFlat || isFunc) ? {} : initCloneObject(value);\n          if (!isDeep) {\n            return isFlat\n              ? copySymbolsIn(value, baseAssignIn(result, value))\n              : copySymbols(value, baseAssign(result, value));\n          }\n        } else {\n          if (!cloneableTags[tag]) {\n            return object ? value : {};\n          }\n          result = initCloneByTag(value, tag, isDeep);\n        }\n      }\n      // Check for circular references and return its corresponding clone.\n      stack || (stack = new Stack);\n      var stacked = stack.get(value);\n      if (stacked) {\n        return stacked;\n      }\n      stack.set(value, result);\n\n      if (isSet(value)) {\n        value.forEach(function(subValue) {\n          result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n        });\n      } else if (isMap(value)) {\n        value.forEach(function(subValue, key) {\n          result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n        });\n      }\n\n      var keysFunc = isFull\n        ? (isFlat ? getAllKeysIn : getAllKeys)\n        : (isFlat ? keysIn : keys);\n\n      var props = isArr ? undefined : keysFunc(value);\n      arrayEach(props || value, function(subValue, key) {\n        if (props) {\n          key = subValue;\n          subValue = value[key];\n        }\n        // Recursively populate clone (susceptible to call stack limits).\n        assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.conforms` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseConforms(source) {\n      var props = keys(source);\n      return function(object) {\n        return baseConformsTo(object, source, props);\n      };\n    }\n\n    /**\n     * The base implementation of `_.conformsTo` which accepts `props` to check.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     */\n    function baseConformsTo(object, source, props) {\n      var length = props.length;\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (length--) {\n        var key = props[length],\n            predicate = source[key],\n            value = object[key];\n\n        if ((value === undefined && !(key in object)) || !predicate(value)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.delay` and `_.defer` which accepts `args`\n     * to provide to `func`.\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {Array} args The arguments to provide to `func`.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    function baseDelay(func, wait, args) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return setTimeout(function() { func.apply(undefined, args); }, wait);\n    }\n\n    /**\n     * The base implementation of methods like `_.difference` without support\n     * for excluding multiple arrays or iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Array} values The values to exclude.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     */\n    function baseDifference(array, values, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          isCommon = true,\n          length = array.length,\n          result = [],\n          valuesLength = values.length;\n\n      if (!length) {\n        return result;\n      }\n      if (iteratee) {\n        values = arrayMap(values, baseUnary(iteratee));\n      }\n      if (comparator) {\n        includes = arrayIncludesWith;\n        isCommon = false;\n      }\n      else if (values.length >= LARGE_ARRAY_SIZE) {\n        includes = cacheHas;\n        isCommon = false;\n        values = new SetCache(values);\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee == null ? value : iteratee(value);\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var valuesIndex = valuesLength;\n          while (valuesIndex--) {\n            if (values[valuesIndex] === computed) {\n              continue outer;\n            }\n          }\n          result.push(value);\n        }\n        else if (!includes(values, computed, comparator)) {\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.forEach` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEach = createBaseEach(baseForOwn);\n\n    /**\n     * The base implementation of `_.forEachRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     */\n    var baseEachRight = createBaseEach(baseForOwnRight, true);\n\n    /**\n     * The base implementation of `_.every` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`\n     */\n    function baseEvery(collection, predicate) {\n      var result = true;\n      baseEach(collection, function(value, index, collection) {\n        result = !!predicate(value, index, collection);\n        return result;\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of methods like `_.max` and `_.min` which accepts a\n     * `comparator` to determine the extremum value.\n     *\n     * @private\n     * @param {Array} array The array to iterate over.\n     * @param {Function} iteratee The iteratee invoked per iteration.\n     * @param {Function} comparator The comparator used to compare values.\n     * @returns {*} Returns the extremum value.\n     */\n    function baseExtremum(array, iteratee, comparator) {\n      var index = -1,\n          length = array.length;\n\n      while (++index < length) {\n        var value = array[index],\n            current = iteratee(value);\n\n        if (current != null && (computed === undefined\n              ? (current === current && !isSymbol(current))\n              : comparator(current, computed)\n            )) {\n          var computed = current,\n              result = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.fill` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     */\n    function baseFill(array, value, start, end) {\n      var length = array.length;\n\n      start = toInteger(start);\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = (end === undefined || end > length) ? length : toInteger(end);\n      if (end < 0) {\n        end += length;\n      }\n      end = start > end ? 0 : toLength(end);\n      while (start < end) {\n        array[start++] = value;\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.filter` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     */\n    function baseFilter(collection, predicate) {\n      var result = [];\n      baseEach(collection, function(value, index, collection) {\n        if (predicate(value, index, collection)) {\n          result.push(value);\n        }\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.flatten` with support for restricting flattening.\n     *\n     * @private\n     * @param {Array} array The array to flatten.\n     * @param {number} depth The maximum recursion depth.\n     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n     * @param {Array} [result=[]] The initial result value.\n     * @returns {Array} Returns the new flattened array.\n     */\n    function baseFlatten(array, depth, predicate, isStrict, result) {\n      var index = -1,\n          length = array.length;\n\n      predicate || (predicate = isFlattenable);\n      result || (result = []);\n\n      while (++index < length) {\n        var value = array[index];\n        if (depth > 0 && predicate(value)) {\n          if (depth > 1) {\n            // Recursively flatten arrays (susceptible to call stack limits).\n            baseFlatten(value, depth - 1, predicate, isStrict, result);\n          } else {\n            arrayPush(result, value);\n          }\n        } else if (!isStrict) {\n          result[result.length] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `baseForOwn` which iterates over `object`\n     * properties returned by `keysFunc` and invokes `iteratee` for each property.\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseFor = createBaseFor();\n\n    /**\n     * This function is like `baseFor` except that it iterates over properties\n     * in the opposite order.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @returns {Object} Returns `object`.\n     */\n    var baseForRight = createBaseFor(true);\n\n    /**\n     * The base implementation of `_.forOwn` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwn(object, iteratee) {\n      return object && baseFor(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     */\n    function baseForOwnRight(object, iteratee) {\n      return object && baseForRight(object, iteratee, keys);\n    }\n\n    /**\n     * The base implementation of `_.functions` which creates an array of\n     * `object` function property names filtered from `props`.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Array} props The property names to filter.\n     * @returns {Array} Returns the function names.\n     */\n    function baseFunctions(object, props) {\n      return arrayFilter(props, function(key) {\n        return isFunction(object[key]);\n      });\n    }\n\n    /**\n     * The base implementation of `_.get` without support for default values.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseGet(object, path) {\n      path = castPath(path, object);\n\n      var index = 0,\n          length = path.length;\n\n      while (object != null && index < length) {\n        object = object[toKey(path[index++])];\n      }\n      return (index && index == length) ? object : undefined;\n    }\n\n    /**\n     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n     * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Function} keysFunc The function to get the keys of `object`.\n     * @param {Function} symbolsFunc The function to get the symbols of `object`.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function baseGetAllKeys(object, keysFunc, symbolsFunc) {\n      var result = keysFunc(object);\n      return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n    }\n\n    /**\n     * The base implementation of `getTag` without fallbacks for buggy environments.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    function baseGetTag(value) {\n      if (value == null) {\n        return value === undefined ? undefinedTag : nullTag;\n      }\n      return (symToStringTag && symToStringTag in Object(value))\n        ? getRawTag(value)\n        : objectToString(value);\n    }\n\n    /**\n     * The base implementation of `_.gt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     */\n    function baseGt(value, other) {\n      return value > other;\n    }\n\n    /**\n     * The base implementation of `_.has` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHas(object, key) {\n      return object != null && hasOwnProperty.call(object, key);\n    }\n\n    /**\n     * The base implementation of `_.hasIn` without support for deep paths.\n     *\n     * @private\n     * @param {Object} [object] The object to query.\n     * @param {Array|string} key The key to check.\n     * @returns {boolean} Returns `true` if `key` exists, else `false`.\n     */\n    function baseHasIn(object, key) {\n      return object != null && key in Object(object);\n    }\n\n    /**\n     * The base implementation of `_.inRange` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {number} number The number to check.\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     */\n    function baseInRange(number, start, end) {\n      return number >= nativeMin(start, end) && number < nativeMax(start, end);\n    }\n\n    /**\n     * The base implementation of methods like `_.intersection`, without support\n     * for iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of shared values.\n     */\n    function baseIntersection(arrays, iteratee, comparator) {\n      var includes = comparator ? arrayIncludesWith : arrayIncludes,\n          length = arrays[0].length,\n          othLength = arrays.length,\n          othIndex = othLength,\n          caches = Array(othLength),\n          maxLength = Infinity,\n          result = [];\n\n      while (othIndex--) {\n        var array = arrays[othIndex];\n        if (othIndex && iteratee) {\n          array = arrayMap(array, baseUnary(iteratee));\n        }\n        maxLength = nativeMin(array.length, maxLength);\n        caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\n          ? new SetCache(othIndex && array)\n          : undefined;\n      }\n      array = arrays[0];\n\n      var index = -1,\n          seen = caches[0];\n\n      outer:\n      while (++index < length && result.length < maxLength) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (!(seen\n              ? cacheHas(seen, computed)\n              : includes(result, computed, comparator)\n            )) {\n          othIndex = othLength;\n          while (--othIndex) {\n            var cache = caches[othIndex];\n            if (!(cache\n                  ? cacheHas(cache, computed)\n                  : includes(arrays[othIndex], computed, comparator))\n                ) {\n              continue outer;\n            }\n          }\n          if (seen) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.invert` and `_.invertBy` which inverts\n     * `object` with values transformed by `iteratee` and set by `setter`.\n     *\n     * @private\n     * @param {Object} object The object to iterate over.\n     * @param {Function} setter The function to set `accumulator` values.\n     * @param {Function} iteratee The iteratee to transform values.\n     * @param {Object} accumulator The initial inverted object.\n     * @returns {Function} Returns `accumulator`.\n     */\n    function baseInverter(object, setter, iteratee, accumulator) {\n      baseForOwn(object, function(value, key, object) {\n        setter(accumulator, iteratee(value), key, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * The base implementation of `_.invoke` without support for individual\n     * method arguments.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {Array} args The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     */\n    function baseInvoke(object, path, args) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      var func = object == null ? object : object[toKey(last(path))];\n      return func == null ? undefined : apply(func, object, args);\n    }\n\n    /**\n     * The base implementation of `_.isArguments`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     */\n    function baseIsArguments(value) {\n      return isObjectLike(value) && baseGetTag(value) == argsTag;\n    }\n\n    /**\n     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     */\n    function baseIsArrayBuffer(value) {\n      return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;\n    }\n\n    /**\n     * The base implementation of `_.isDate` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     */\n    function baseIsDate(value) {\n      return isObjectLike(value) && baseGetTag(value) == dateTag;\n    }\n\n    /**\n     * The base implementation of `_.isEqual` which supports partial comparisons\n     * and tracks traversed objects.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {boolean} bitmask The bitmask flags.\n     *  1 - Unordered comparison\n     *  2 - Partial comparison\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     */\n    function baseIsEqual(value, other, bitmask, customizer, stack) {\n      if (value === other) {\n        return true;\n      }\n      if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n        return value !== value && other !== other;\n      }\n      return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n    }\n\n    /**\n     * A specialized version of `baseIsEqual` for arrays and objects which performs\n     * deep comparisons and tracks traversed objects enabling objects with circular\n     * references to be compared.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n      var objIsArr = isArray(object),\n          othIsArr = isArray(other),\n          objTag = objIsArr ? arrayTag : getTag(object),\n          othTag = othIsArr ? arrayTag : getTag(other);\n\n      objTag = objTag == argsTag ? objectTag : objTag;\n      othTag = othTag == argsTag ? objectTag : othTag;\n\n      var objIsObj = objTag == objectTag,\n          othIsObj = othTag == objectTag,\n          isSameTag = objTag == othTag;\n\n      if (isSameTag && isBuffer(object)) {\n        if (!isBuffer(other)) {\n          return false;\n        }\n        objIsArr = true;\n        objIsObj = false;\n      }\n      if (isSameTag && !objIsObj) {\n        stack || (stack = new Stack);\n        return (objIsArr || isTypedArray(object))\n          ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n          : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n      }\n      if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n        var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n            othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n        if (objIsWrapped || othIsWrapped) {\n          var objUnwrapped = objIsWrapped ? object.value() : object,\n              othUnwrapped = othIsWrapped ? other.value() : other;\n\n          stack || (stack = new Stack);\n          return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n        }\n      }\n      if (!isSameTag) {\n        return false;\n      }\n      stack || (stack = new Stack);\n      return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n    }\n\n    /**\n     * The base implementation of `_.isMap` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     */\n    function baseIsMap(value) {\n      return isObjectLike(value) && getTag(value) == mapTag;\n    }\n\n    /**\n     * The base implementation of `_.isMatch` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Array} matchData The property names, values, and compare flags to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     */\n    function baseIsMatch(object, source, matchData, customizer) {\n      var index = matchData.length,\n          length = index,\n          noCustomizer = !customizer;\n\n      if (object == null) {\n        return !length;\n      }\n      object = Object(object);\n      while (index--) {\n        var data = matchData[index];\n        if ((noCustomizer && data[2])\n              ? data[1] !== object[data[0]]\n              : !(data[0] in object)\n            ) {\n          return false;\n        }\n      }\n      while (++index < length) {\n        data = matchData[index];\n        var key = data[0],\n            objValue = object[key],\n            srcValue = data[1];\n\n        if (noCustomizer && data[2]) {\n          if (objValue === undefined && !(key in object)) {\n            return false;\n          }\n        } else {\n          var stack = new Stack;\n          if (customizer) {\n            var result = customizer(objValue, srcValue, key, object, source, stack);\n          }\n          if (!(result === undefined\n                ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n                : result\n              )) {\n            return false;\n          }\n        }\n      }\n      return true;\n    }\n\n    /**\n     * The base implementation of `_.isNative` without bad shim checks.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     */\n    function baseIsNative(value) {\n      if (!isObject(value) || isMasked(value)) {\n        return false;\n      }\n      var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n      return pattern.test(toSource(value));\n    }\n\n    /**\n     * The base implementation of `_.isRegExp` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     */\n    function baseIsRegExp(value) {\n      return isObjectLike(value) && baseGetTag(value) == regexpTag;\n    }\n\n    /**\n     * The base implementation of `_.isSet` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     */\n    function baseIsSet(value) {\n      return isObjectLike(value) && getTag(value) == setTag;\n    }\n\n    /**\n     * The base implementation of `_.isTypedArray` without Node.js optimizations.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     */\n    function baseIsTypedArray(value) {\n      return isObjectLike(value) &&\n        isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n    }\n\n    /**\n     * The base implementation of `_.iteratee`.\n     *\n     * @private\n     * @param {*} [value=_.identity] The value to convert to an iteratee.\n     * @returns {Function} Returns the iteratee.\n     */\n    function baseIteratee(value) {\n      // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n      // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n      if (typeof value == 'function') {\n        return value;\n      }\n      if (value == null) {\n        return identity;\n      }\n      if (typeof value == 'object') {\n        return isArray(value)\n          ? baseMatchesProperty(value[0], value[1])\n          : baseMatches(value);\n      }\n      return property(value);\n    }\n\n    /**\n     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeys(object) {\n      if (!isPrototype(object)) {\n        return nativeKeys(object);\n      }\n      var result = [];\n      for (var key in Object(object)) {\n        if (hasOwnProperty.call(object, key) && key != 'constructor') {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function baseKeysIn(object) {\n      if (!isObject(object)) {\n        return nativeKeysIn(object);\n      }\n      var isProto = isPrototype(object),\n          result = [];\n\n      for (var key in object) {\n        if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.lt` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     */\n    function baseLt(value, other) {\n      return value < other;\n    }\n\n    /**\n     * The base implementation of `_.map` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} iteratee The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     */\n    function baseMap(collection, iteratee) {\n      var index = -1,\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value, key, collection) {\n        result[++index] = iteratee(value, key, collection);\n      });\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.matches` which doesn't clone `source`.\n     *\n     * @private\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatches(source) {\n      var matchData = getMatchData(source);\n      if (matchData.length == 1 && matchData[0][2]) {\n        return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n      }\n      return function(object) {\n        return object === source || baseIsMatch(object, source, matchData);\n      };\n    }\n\n    /**\n     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n     *\n     * @private\n     * @param {string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function baseMatchesProperty(path, srcValue) {\n      if (isKey(path) && isStrictComparable(srcValue)) {\n        return matchesStrictComparable(toKey(path), srcValue);\n      }\n      return function(object) {\n        var objValue = get(object, path);\n        return (objValue === undefined && objValue === srcValue)\n          ? hasIn(object, path)\n          : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n      };\n    }\n\n    /**\n     * The base implementation of `_.merge` without support for multiple sources.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} [customizer] The function to customize merged values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMerge(object, source, srcIndex, customizer, stack) {\n      if (object === source) {\n        return;\n      }\n      baseFor(source, function(srcValue, key) {\n        stack || (stack = new Stack);\n        if (isObject(srcValue)) {\n          baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n        }\n        else {\n          var newValue = customizer\n            ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n            : undefined;\n\n          if (newValue === undefined) {\n            newValue = srcValue;\n          }\n          assignMergeValue(object, key, newValue);\n        }\n      }, keysIn);\n    }\n\n    /**\n     * A specialized version of `baseMerge` for arrays and objects which performs\n     * deep merges and tracks traversed objects enabling objects with circular\n     * references to be merged.\n     *\n     * @private\n     * @param {Object} object The destination object.\n     * @param {Object} source The source object.\n     * @param {string} key The key of the value to merge.\n     * @param {number} srcIndex The index of `source`.\n     * @param {Function} mergeFunc The function to merge values.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     */\n    function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n      var objValue = safeGet(object, key),\n          srcValue = safeGet(source, key),\n          stacked = stack.get(srcValue);\n\n      if (stacked) {\n        assignMergeValue(object, key, stacked);\n        return;\n      }\n      var newValue = customizer\n        ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n        : undefined;\n\n      var isCommon = newValue === undefined;\n\n      if (isCommon) {\n        var isArr = isArray(srcValue),\n            isBuff = !isArr && isBuffer(srcValue),\n            isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n        newValue = srcValue;\n        if (isArr || isBuff || isTyped) {\n          if (isArray(objValue)) {\n            newValue = objValue;\n          }\n          else if (isArrayLikeObject(objValue)) {\n            newValue = copyArray(objValue);\n          }\n          else if (isBuff) {\n            isCommon = false;\n            newValue = cloneBuffer(srcValue, true);\n          }\n          else if (isTyped) {\n            isCommon = false;\n            newValue = cloneTypedArray(srcValue, true);\n          }\n          else {\n            newValue = [];\n          }\n        }\n        else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n          newValue = objValue;\n          if (isArguments(objValue)) {\n            newValue = toPlainObject(objValue);\n          }\n          else if (!isObject(objValue) || isFunction(objValue)) {\n            newValue = initCloneObject(srcValue);\n          }\n        }\n        else {\n          isCommon = false;\n        }\n      }\n      if (isCommon) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, newValue);\n        mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n        stack['delete'](srcValue);\n      }\n      assignMergeValue(object, key, newValue);\n    }\n\n    /**\n     * The base implementation of `_.nth` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {number} n The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     */\n    function baseNth(array, n) {\n      var length = array.length;\n      if (!length) {\n        return;\n      }\n      n += n < 0 ? length : 0;\n      return isIndex(n, length) ? array[n] : undefined;\n    }\n\n    /**\n     * The base implementation of `_.orderBy` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n     * @param {string[]} orders The sort orders of `iteratees`.\n     * @returns {Array} Returns the new sorted array.\n     */\n    function baseOrderBy(collection, iteratees, orders) {\n      if (iteratees.length) {\n        iteratees = arrayMap(iteratees, function(iteratee) {\n          if (isArray(iteratee)) {\n            return function(value) {\n              return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n            }\n          }\n          return iteratee;\n        });\n      } else {\n        iteratees = [identity];\n      }\n\n      var index = -1;\n      iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n\n      var result = baseMap(collection, function(value, key, collection) {\n        var criteria = arrayMap(iteratees, function(iteratee) {\n          return iteratee(value);\n        });\n        return { 'criteria': criteria, 'index': ++index, 'value': value };\n      });\n\n      return baseSortBy(result, function(object, other) {\n        return compareMultiple(object, other, orders);\n      });\n    }\n\n    /**\n     * The base implementation of `_.pick` without support for individual\n     * property identifiers.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @returns {Object} Returns the new object.\n     */\n    function basePick(object, paths) {\n      return basePickBy(object, paths, function(value, path) {\n        return hasIn(object, path);\n      });\n    }\n\n    /**\n     * The base implementation of  `_.pickBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Object} object The source object.\n     * @param {string[]} paths The property paths to pick.\n     * @param {Function} predicate The function invoked per property.\n     * @returns {Object} Returns the new object.\n     */\n    function basePickBy(object, paths, predicate) {\n      var index = -1,\n          length = paths.length,\n          result = {};\n\n      while (++index < length) {\n        var path = paths[index],\n            value = baseGet(object, path);\n\n        if (predicate(value, path)) {\n          baseSet(result, castPath(path, object), value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseProperty` which supports deep paths.\n     *\n     * @private\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     */\n    function basePropertyDeep(path) {\n      return function(object) {\n        return baseGet(object, path);\n      };\n    }\n\n    /**\n     * The base implementation of `_.pullAllBy` without support for iteratee\n     * shorthands.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAll(array, values, iteratee, comparator) {\n      var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n          index = -1,\n          length = values.length,\n          seen = array;\n\n      if (array === values) {\n        values = copyArray(values);\n      }\n      if (iteratee) {\n        seen = arrayMap(array, baseUnary(iteratee));\n      }\n      while (++index < length) {\n        var fromIndex = 0,\n            value = values[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n          if (seen !== array) {\n            splice.call(seen, fromIndex, 1);\n          }\n          splice.call(array, fromIndex, 1);\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.pullAt` without support for individual\n     * indexes or capturing the removed elements.\n     *\n     * @private\n     * @param {Array} array The array to modify.\n     * @param {number[]} indexes The indexes of elements to remove.\n     * @returns {Array} Returns `array`.\n     */\n    function basePullAt(array, indexes) {\n      var length = array ? indexes.length : 0,\n          lastIndex = length - 1;\n\n      while (length--) {\n        var index = indexes[length];\n        if (length == lastIndex || index !== previous) {\n          var previous = index;\n          if (isIndex(index)) {\n            splice.call(array, index, 1);\n          } else {\n            baseUnset(array, index);\n          }\n        }\n      }\n      return array;\n    }\n\n    /**\n     * The base implementation of `_.random` without support for returning\n     * floating-point numbers.\n     *\n     * @private\n     * @param {number} lower The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the random number.\n     */\n    function baseRandom(lower, upper) {\n      return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\n    }\n\n    /**\n     * The base implementation of `_.range` and `_.rangeRight` which doesn't\n     * coerce arguments.\n     *\n     * @private\n     * @param {number} start The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} step The value to increment or decrement by.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the range of numbers.\n     */\n    function baseRange(start, end, step, fromRight) {\n      var index = -1,\n          length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n          result = Array(length);\n\n      while (length--) {\n        result[fromRight ? length : ++index] = start;\n        start += step;\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.repeat` which doesn't coerce arguments.\n     *\n     * @private\n     * @param {string} string The string to repeat.\n     * @param {number} n The number of times to repeat the string.\n     * @returns {string} Returns the repeated string.\n     */\n    function baseRepeat(string, n) {\n      var result = '';\n      if (!string || n < 1 || n > MAX_SAFE_INTEGER) {\n        return result;\n      }\n      // Leverage the exponentiation by squaring algorithm for a faster repeat.\n      // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.\n      do {\n        if (n % 2) {\n          result += string;\n        }\n        n = nativeFloor(n / 2);\n        if (n) {\n          string += string;\n        }\n      } while (n);\n\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     */\n    function baseRest(func, start) {\n      return setToString(overRest(func, start, identity), func + '');\n    }\n\n    /**\n     * The base implementation of `_.sample`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     */\n    function baseSample(collection) {\n      return arraySample(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.sampleSize` without param guards.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} n The number of elements to sample.\n     * @returns {Array} Returns the random elements.\n     */\n    function baseSampleSize(collection, n) {\n      var array = values(collection);\n      return shuffleSelf(array, baseClamp(n, 0, array.length));\n    }\n\n    /**\n     * The base implementation of `_.set`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseSet(object, path, value, customizer) {\n      if (!isObject(object)) {\n        return object;\n      }\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          lastIndex = length - 1,\n          nested = object;\n\n      while (nested != null && ++index < length) {\n        var key = toKey(path[index]),\n            newValue = value;\n\n        if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n          return object;\n        }\n\n        if (index != lastIndex) {\n          var objValue = nested[key];\n          newValue = customizer ? customizer(objValue, key, nested) : undefined;\n          if (newValue === undefined) {\n            newValue = isObject(objValue)\n              ? objValue\n              : (isIndex(path[index + 1]) ? [] : {});\n          }\n        }\n        assignValue(nested, key, newValue);\n        nested = nested[key];\n      }\n      return object;\n    }\n\n    /**\n     * The base implementation of `setData` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetData = !metaMap ? identity : function(func, data) {\n      metaMap.set(func, data);\n      return func;\n    };\n\n    /**\n     * The base implementation of `setToString` without support for hot loop shorting.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var baseSetToString = !defineProperty ? identity : function(func, string) {\n      return defineProperty(func, 'toString', {\n        'configurable': true,\n        'enumerable': false,\n        'value': constant(string),\n        'writable': true\n      });\n    };\n\n    /**\n     * The base implementation of `_.shuffle`.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     */\n    function baseShuffle(collection) {\n      return shuffleSelf(values(collection));\n    }\n\n    /**\n     * The base implementation of `_.slice` without an iteratee call guard.\n     *\n     * @private\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseSlice(array, start, end) {\n      var index = -1,\n          length = array.length;\n\n      if (start < 0) {\n        start = -start > length ? 0 : (length + start);\n      }\n      end = end > length ? length : end;\n      if (end < 0) {\n        end += length;\n      }\n      length = start > end ? 0 : ((end - start) >>> 0);\n      start >>>= 0;\n\n      var result = Array(length);\n      while (++index < length) {\n        result[index] = array[index + start];\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.some` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} predicate The function invoked per iteration.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     */\n    function baseSome(collection, predicate) {\n      var result;\n\n      baseEach(collection, function(value, index, collection) {\n        result = predicate(value, index, collection);\n        return !result;\n      });\n      return !!result;\n    }\n\n    /**\n     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which\n     * performs a binary search of `array` to determine the index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndex(array, value, retHighest) {\n      var low = 0,\n          high = array == null ? low : array.length;\n\n      if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\n        while (low < high) {\n          var mid = (low + high) >>> 1,\n              computed = array[mid];\n\n          if (computed !== null && !isSymbol(computed) &&\n              (retHighest ? (computed <= value) : (computed < value))) {\n            low = mid + 1;\n          } else {\n            high = mid;\n          }\n        }\n        return high;\n      }\n      return baseSortedIndexBy(array, value, identity, retHighest);\n    }\n\n    /**\n     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`\n     * which invokes `iteratee` for `value` and each element of `array` to compute\n     * their sort ranking. The iteratee is invoked with one argument; (value).\n     *\n     * @private\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} iteratee The iteratee invoked per element.\n     * @param {boolean} [retHighest] Specify returning the highest qualified index.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     */\n    function baseSortedIndexBy(array, value, iteratee, retHighest) {\n      var low = 0,\n          high = array == null ? 0 : array.length;\n      if (high === 0) {\n        return 0;\n      }\n\n      value = iteratee(value);\n      var valIsNaN = value !== value,\n          valIsNull = value === null,\n          valIsSymbol = isSymbol(value),\n          valIsUndefined = value === undefined;\n\n      while (low < high) {\n        var mid = nativeFloor((low + high) / 2),\n            computed = iteratee(array[mid]),\n            othIsDefined = computed !== undefined,\n            othIsNull = computed === null,\n            othIsReflexive = computed === computed,\n            othIsSymbol = isSymbol(computed);\n\n        if (valIsNaN) {\n          var setLow = retHighest || othIsReflexive;\n        } else if (valIsUndefined) {\n          setLow = othIsReflexive && (retHighest || othIsDefined);\n        } else if (valIsNull) {\n          setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);\n        } else if (valIsSymbol) {\n          setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);\n        } else if (othIsNull || othIsSymbol) {\n          setLow = false;\n        } else {\n          setLow = retHighest ? (computed <= value) : (computed < value);\n        }\n        if (setLow) {\n          low = mid + 1;\n        } else {\n          high = mid;\n        }\n      }\n      return nativeMin(high, MAX_ARRAY_INDEX);\n    }\n\n    /**\n     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without\n     * support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseSortedUniq(array, iteratee) {\n      var index = -1,\n          length = array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        if (!index || !eq(computed, seen)) {\n          var seen = computed;\n          result[resIndex++] = value === 0 ? 0 : value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.toNumber` which doesn't ensure correct\n     * conversions of binary, hexadecimal, or octal string values.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     */\n    function baseToNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      return +value;\n    }\n\n    /**\n     * The base implementation of `_.toString` which doesn't convert nullish\n     * values to empty strings.\n     *\n     * @private\n     * @param {*} value The value to process.\n     * @returns {string} Returns the string.\n     */\n    function baseToString(value) {\n      // Exit early for strings to avoid a performance hit in some environments.\n      if (typeof value == 'string') {\n        return value;\n      }\n      if (isArray(value)) {\n        // Recursively convert values (susceptible to call stack limits).\n        return arrayMap(value, baseToString) + '';\n      }\n      if (isSymbol(value)) {\n        return symbolToString ? symbolToString.call(value) : '';\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     */\n    function baseUniq(array, iteratee, comparator) {\n      var index = -1,\n          includes = arrayIncludes,\n          length = array.length,\n          isCommon = true,\n          result = [],\n          seen = result;\n\n      if (comparator) {\n        isCommon = false;\n        includes = arrayIncludesWith;\n      }\n      else if (length >= LARGE_ARRAY_SIZE) {\n        var set = iteratee ? null : createSet(array);\n        if (set) {\n          return setToArray(set);\n        }\n        isCommon = false;\n        includes = cacheHas;\n        seen = new SetCache;\n      }\n      else {\n        seen = iteratee ? [] : result;\n      }\n      outer:\n      while (++index < length) {\n        var value = array[index],\n            computed = iteratee ? iteratee(value) : value;\n\n        value = (comparator || value !== 0) ? value : 0;\n        if (isCommon && computed === computed) {\n          var seenIndex = seen.length;\n          while (seenIndex--) {\n            if (seen[seenIndex] === computed) {\n              continue outer;\n            }\n          }\n          if (iteratee) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n        else if (!includes(seen, computed, comparator)) {\n          if (seen !== result) {\n            seen.push(computed);\n          }\n          result.push(value);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * The base implementation of `_.unset`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The property path to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     */\n    function baseUnset(object, path) {\n      path = castPath(path, object);\n      object = parent(object, path);\n      return object == null || delete object[toKey(last(path))];\n    }\n\n    /**\n     * The base implementation of `_.update`.\n     *\n     * @private\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to update.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize path creation.\n     * @returns {Object} Returns `object`.\n     */\n    function baseUpdate(object, path, updater, customizer) {\n      return baseSet(object, path, updater(baseGet(object, path)), customizer);\n    }\n\n    /**\n     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`\n     * without support for iteratee shorthands.\n     *\n     * @private\n     * @param {Array} array The array to query.\n     * @param {Function} predicate The function invoked per iteration.\n     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function baseWhile(array, predicate, isDrop, fromRight) {\n      var length = array.length,\n          index = fromRight ? length : -1;\n\n      while ((fromRight ? index-- : ++index < length) &&\n        predicate(array[index], index, array)) {}\n\n      return isDrop\n        ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))\n        : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));\n    }\n\n    /**\n     * The base implementation of `wrapperValue` which returns the result of\n     * performing a sequence of actions on the unwrapped `value`, where each\n     * successive action is supplied the return value of the previous.\n     *\n     * @private\n     * @param {*} value The unwrapped value.\n     * @param {Array} actions Actions to perform to resolve the unwrapped value.\n     * @returns {*} Returns the resolved value.\n     */\n    function baseWrapperValue(value, actions) {\n      var result = value;\n      if (result instanceof LazyWrapper) {\n        result = result.value();\n      }\n      return arrayReduce(actions, function(result, action) {\n        return action.func.apply(action.thisArg, arrayPush([result], action.args));\n      }, result);\n    }\n\n    /**\n     * The base implementation of methods like `_.xor`, without support for\n     * iteratee shorthands, that accepts an array of arrays to inspect.\n     *\n     * @private\n     * @param {Array} arrays The arrays to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of values.\n     */\n    function baseXor(arrays, iteratee, comparator) {\n      var length = arrays.length;\n      if (length < 2) {\n        return length ? baseUniq(arrays[0]) : [];\n      }\n      var index = -1,\n          result = Array(length);\n\n      while (++index < length) {\n        var array = arrays[index],\n            othIndex = -1;\n\n        while (++othIndex < length) {\n          if (othIndex != index) {\n            result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);\n          }\n        }\n      }\n      return baseUniq(baseFlatten(result, 1), iteratee, comparator);\n    }\n\n    /**\n     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\n     *\n     * @private\n     * @param {Array} props The property identifiers.\n     * @param {Array} values The property values.\n     * @param {Function} assignFunc The function to assign values.\n     * @returns {Object} Returns the new object.\n     */\n    function baseZipObject(props, values, assignFunc) {\n      var index = -1,\n          length = props.length,\n          valsLength = values.length,\n          result = {};\n\n      while (++index < length) {\n        var value = index < valsLength ? values[index] : undefined;\n        assignFunc(result, props[index], value);\n      }\n      return result;\n    }\n\n    /**\n     * Casts `value` to an empty array if it's not an array like object.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Array|Object} Returns the cast array-like object.\n     */\n    function castArrayLikeObject(value) {\n      return isArrayLikeObject(value) ? value : [];\n    }\n\n    /**\n     * Casts `value` to `identity` if it's not a function.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {Function} Returns cast function.\n     */\n    function castFunction(value) {\n      return typeof value == 'function' ? value : identity;\n    }\n\n    /**\n     * Casts `value` to a path array if it's not one.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {Array} Returns the cast property path array.\n     */\n    function castPath(value, object) {\n      if (isArray(value)) {\n        return value;\n      }\n      return isKey(value, object) ? [value] : stringToPath(toString(value));\n    }\n\n    /**\n     * A `baseRest` alias which can be replaced with `identity` by module\n     * replacement plugins.\n     *\n     * @private\n     * @type {Function}\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    var castRest = baseRest;\n\n    /**\n     * Casts `array` to a slice if it's needed.\n     *\n     * @private\n     * @param {Array} array The array to inspect.\n     * @param {number} start The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the cast slice.\n     */\n    function castSlice(array, start, end) {\n      var length = array.length;\n      end = end === undefined ? length : end;\n      return (!start && end >= length) ? array : baseSlice(array, start, end);\n    }\n\n    /**\n     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).\n     *\n     * @private\n     * @param {number|Object} id The timer id or timeout object of the timer to clear.\n     */\n    var clearTimeout = ctxClearTimeout || function(id) {\n      return root.clearTimeout(id);\n    };\n\n    /**\n     * Creates a clone of  `buffer`.\n     *\n     * @private\n     * @param {Buffer} buffer The buffer to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Buffer} Returns the cloned buffer.\n     */\n    function cloneBuffer(buffer, isDeep) {\n      if (isDeep) {\n        return buffer.slice();\n      }\n      var length = buffer.length,\n          result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n      buffer.copy(result);\n      return result;\n    }\n\n    /**\n     * Creates a clone of `arrayBuffer`.\n     *\n     * @private\n     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n     * @returns {ArrayBuffer} Returns the cloned array buffer.\n     */\n    function cloneArrayBuffer(arrayBuffer) {\n      var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n      new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n      return result;\n    }\n\n    /**\n     * Creates a clone of `dataView`.\n     *\n     * @private\n     * @param {Object} dataView The data view to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned data view.\n     */\n    function cloneDataView(dataView, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n      return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n    }\n\n    /**\n     * Creates a clone of `regexp`.\n     *\n     * @private\n     * @param {Object} regexp The regexp to clone.\n     * @returns {Object} Returns the cloned regexp.\n     */\n    function cloneRegExp(regexp) {\n      var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n      result.lastIndex = regexp.lastIndex;\n      return result;\n    }\n\n    /**\n     * Creates a clone of the `symbol` object.\n     *\n     * @private\n     * @param {Object} symbol The symbol object to clone.\n     * @returns {Object} Returns the cloned symbol object.\n     */\n    function cloneSymbol(symbol) {\n      return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n    }\n\n    /**\n     * Creates a clone of `typedArray`.\n     *\n     * @private\n     * @param {Object} typedArray The typed array to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the cloned typed array.\n     */\n    function cloneTypedArray(typedArray, isDeep) {\n      var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n      return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n    }\n\n    /**\n     * Compares values to sort them in ascending order.\n     *\n     * @private\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {number} Returns the sort order indicator for `value`.\n     */\n    function compareAscending(value, other) {\n      if (value !== other) {\n        var valIsDefined = value !== undefined,\n            valIsNull = value === null,\n            valIsReflexive = value === value,\n            valIsSymbol = isSymbol(value);\n\n        var othIsDefined = other !== undefined,\n            othIsNull = other === null,\n            othIsReflexive = other === other,\n            othIsSymbol = isSymbol(other);\n\n        if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n            (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n            (valIsNull && othIsDefined && othIsReflexive) ||\n            (!valIsDefined && othIsReflexive) ||\n            !valIsReflexive) {\n          return 1;\n        }\n        if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n            (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n            (othIsNull && valIsDefined && valIsReflexive) ||\n            (!othIsDefined && valIsReflexive) ||\n            !othIsReflexive) {\n          return -1;\n        }\n      }\n      return 0;\n    }\n\n    /**\n     * Used by `_.orderBy` to compare multiple properties of a value to another\n     * and stable sort them.\n     *\n     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n     * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n     * of corresponding values.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {boolean[]|string[]} orders The order to sort by for each property.\n     * @returns {number} Returns the sort order indicator for `object`.\n     */\n    function compareMultiple(object, other, orders) {\n      var index = -1,\n          objCriteria = object.criteria,\n          othCriteria = other.criteria,\n          length = objCriteria.length,\n          ordersLength = orders.length;\n\n      while (++index < length) {\n        var result = compareAscending(objCriteria[index], othCriteria[index]);\n        if (result) {\n          if (index >= ordersLength) {\n            return result;\n          }\n          var order = orders[index];\n          return result * (order == 'desc' ? -1 : 1);\n        }\n      }\n      // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n      // that causes it, under certain circumstances, to provide the same value for\n      // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n      // for more details.\n      //\n      // This also ensures a stable sort in V8 and other engines.\n      // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n      return object.index - other.index;\n    }\n\n    /**\n     * Creates an array that is the composition of partially applied arguments,\n     * placeholders, and provided arguments into a single array of arguments.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to prepend to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgs(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersLength = holders.length,\n          leftIndex = -1,\n          leftLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(leftLength + rangeLength),\n          isUncurried = !isCurried;\n\n      while (++leftIndex < leftLength) {\n        result[leftIndex] = partials[leftIndex];\n      }\n      while (++argsIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[holders[argsIndex]] = args[argsIndex];\n        }\n      }\n      while (rangeLength--) {\n        result[leftIndex++] = args[argsIndex++];\n      }\n      return result;\n    }\n\n    /**\n     * This function is like `composeArgs` except that the arguments composition\n     * is tailored for `_.partialRight`.\n     *\n     * @private\n     * @param {Array} args The provided arguments.\n     * @param {Array} partials The arguments to append to those provided.\n     * @param {Array} holders The `partials` placeholder indexes.\n     * @params {boolean} [isCurried] Specify composing for a curried function.\n     * @returns {Array} Returns the new array of composed arguments.\n     */\n    function composeArgsRight(args, partials, holders, isCurried) {\n      var argsIndex = -1,\n          argsLength = args.length,\n          holdersIndex = -1,\n          holdersLength = holders.length,\n          rightIndex = -1,\n          rightLength = partials.length,\n          rangeLength = nativeMax(argsLength - holdersLength, 0),\n          result = Array(rangeLength + rightLength),\n          isUncurried = !isCurried;\n\n      while (++argsIndex < rangeLength) {\n        result[argsIndex] = args[argsIndex];\n      }\n      var offset = argsIndex;\n      while (++rightIndex < rightLength) {\n        result[offset + rightIndex] = partials[rightIndex];\n      }\n      while (++holdersIndex < holdersLength) {\n        if (isUncurried || argsIndex < argsLength) {\n          result[offset + holders[holdersIndex]] = args[argsIndex++];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Copies the values of `source` to `array`.\n     *\n     * @private\n     * @param {Array} source The array to copy values from.\n     * @param {Array} [array=[]] The array to copy values to.\n     * @returns {Array} Returns `array`.\n     */\n    function copyArray(source, array) {\n      var index = -1,\n          length = source.length;\n\n      array || (array = Array(length));\n      while (++index < length) {\n        array[index] = source[index];\n      }\n      return array;\n    }\n\n    /**\n     * Copies properties of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy properties from.\n     * @param {Array} props The property identifiers to copy.\n     * @param {Object} [object={}] The object to copy properties to.\n     * @param {Function} [customizer] The function to customize copied values.\n     * @returns {Object} Returns `object`.\n     */\n    function copyObject(source, props, object, customizer) {\n      var isNew = !object;\n      object || (object = {});\n\n      var index = -1,\n          length = props.length;\n\n      while (++index < length) {\n        var key = props[index];\n\n        var newValue = customizer\n          ? customizer(object[key], source[key], key, object, source)\n          : undefined;\n\n        if (newValue === undefined) {\n          newValue = source[key];\n        }\n        if (isNew) {\n          baseAssignValue(object, key, newValue);\n        } else {\n          assignValue(object, key, newValue);\n        }\n      }\n      return object;\n    }\n\n    /**\n     * Copies own symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbols(source, object) {\n      return copyObject(source, getSymbols(source), object);\n    }\n\n    /**\n     * Copies own and inherited symbols of `source` to `object`.\n     *\n     * @private\n     * @param {Object} source The object to copy symbols from.\n     * @param {Object} [object={}] The object to copy symbols to.\n     * @returns {Object} Returns `object`.\n     */\n    function copySymbolsIn(source, object) {\n      return copyObject(source, getSymbolsIn(source), object);\n    }\n\n    /**\n     * Creates a function like `_.groupBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} [initializer] The accumulator object initializer.\n     * @returns {Function} Returns the new aggregator function.\n     */\n    function createAggregator(setter, initializer) {\n      return function(collection, iteratee) {\n        var func = isArray(collection) ? arrayAggregator : baseAggregator,\n            accumulator = initializer ? initializer() : {};\n\n        return func(collection, setter, getIteratee(iteratee, 2), accumulator);\n      };\n    }\n\n    /**\n     * Creates a function like `_.assign`.\n     *\n     * @private\n     * @param {Function} assigner The function to assign values.\n     * @returns {Function} Returns the new assigner function.\n     */\n    function createAssigner(assigner) {\n      return baseRest(function(object, sources) {\n        var index = -1,\n            length = sources.length,\n            customizer = length > 1 ? sources[length - 1] : undefined,\n            guard = length > 2 ? sources[2] : undefined;\n\n        customizer = (assigner.length > 3 && typeof customizer == 'function')\n          ? (length--, customizer)\n          : undefined;\n\n        if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n          customizer = length < 3 ? undefined : customizer;\n          length = 1;\n        }\n        object = Object(object);\n        while (++index < length) {\n          var source = sources[index];\n          if (source) {\n            assigner(object, source, index, customizer);\n          }\n        }\n        return object;\n      });\n    }\n\n    /**\n     * Creates a `baseEach` or `baseEachRight` function.\n     *\n     * @private\n     * @param {Function} eachFunc The function to iterate over a collection.\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseEach(eachFunc, fromRight) {\n      return function(collection, iteratee) {\n        if (collection == null) {\n          return collection;\n        }\n        if (!isArrayLike(collection)) {\n          return eachFunc(collection, iteratee);\n        }\n        var length = collection.length,\n            index = fromRight ? length : -1,\n            iterable = Object(collection);\n\n        while ((fromRight ? index-- : ++index < length)) {\n          if (iteratee(iterable[index], index, iterable) === false) {\n            break;\n          }\n        }\n        return collection;\n      };\n    }\n\n    /**\n     * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new base function.\n     */\n    function createBaseFor(fromRight) {\n      return function(object, iteratee, keysFunc) {\n        var index = -1,\n            iterable = Object(object),\n            props = keysFunc(object),\n            length = props.length;\n\n        while (length--) {\n          var key = props[fromRight ? length : ++index];\n          if (iteratee(iterable[key], key, iterable) === false) {\n            break;\n          }\n        }\n        return object;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the optional `this`\n     * binding of `thisArg`.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createBind(func, bitmask, thisArg) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return fn.apply(isBind ? thisArg : this, arguments);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.lowerFirst`.\n     *\n     * @private\n     * @param {string} methodName The name of the `String` case method to use.\n     * @returns {Function} Returns the new case function.\n     */\n    function createCaseFirst(methodName) {\n      return function(string) {\n        string = toString(string);\n\n        var strSymbols = hasUnicode(string)\n          ? stringToArray(string)\n          : undefined;\n\n        var chr = strSymbols\n          ? strSymbols[0]\n          : string.charAt(0);\n\n        var trailing = strSymbols\n          ? castSlice(strSymbols, 1).join('')\n          : string.slice(1);\n\n        return chr[methodName]() + trailing;\n      };\n    }\n\n    /**\n     * Creates a function like `_.camelCase`.\n     *\n     * @private\n     * @param {Function} callback The function to combine each word.\n     * @returns {Function} Returns the new compounder function.\n     */\n    function createCompounder(callback) {\n      return function(string) {\n        return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n      };\n    }\n\n    /**\n     * Creates a function that produces an instance of `Ctor` regardless of\n     * whether it was invoked as part of a `new` expression or by `call` or `apply`.\n     *\n     * @private\n     * @param {Function} Ctor The constructor to wrap.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCtor(Ctor) {\n      return function() {\n        // Use a `switch` statement to work with class constructors. See\n        // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\n        // for more details.\n        var args = arguments;\n        switch (args.length) {\n          case 0: return new Ctor;\n          case 1: return new Ctor(args[0]);\n          case 2: return new Ctor(args[0], args[1]);\n          case 3: return new Ctor(args[0], args[1], args[2]);\n          case 4: return new Ctor(args[0], args[1], args[2], args[3]);\n          case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\n          case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\n          case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\n        }\n        var thisBinding = baseCreate(Ctor.prototype),\n            result = Ctor.apply(thisBinding, args);\n\n        // Mimic the constructor's `return` behavior.\n        // See https://es5.github.io/#x13.2.2 for more details.\n        return isObject(result) ? result : thisBinding;\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to enable currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {number} arity The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createCurry(func, bitmask, arity) {\n      var Ctor = createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length,\n            placeholder = getHolder(wrapper);\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n          ? []\n          : replaceHolders(args, placeholder);\n\n        length -= holders.length;\n        if (length < arity) {\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, undefined,\n            args, holders, undefined, undefined, arity - length);\n        }\n        var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n        return apply(fn, this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.find` or `_.findLast` function.\n     *\n     * @private\n     * @param {Function} findIndexFunc The function to find the collection index.\n     * @returns {Function} Returns the new find function.\n     */\n    function createFind(findIndexFunc) {\n      return function(collection, predicate, fromIndex) {\n        var iterable = Object(collection);\n        if (!isArrayLike(collection)) {\n          var iteratee = getIteratee(predicate, 3);\n          collection = keys(collection);\n          predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n        }\n        var index = findIndexFunc(collection, predicate, fromIndex);\n        return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n      };\n    }\n\n    /**\n     * Creates a `_.flow` or `_.flowRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new flow function.\n     */\n    function createFlow(fromRight) {\n      return flatRest(function(funcs) {\n        var length = funcs.length,\n            index = length,\n            prereq = LodashWrapper.prototype.thru;\n\n        if (fromRight) {\n          funcs.reverse();\n        }\n        while (index--) {\n          var func = funcs[index];\n          if (typeof func != 'function') {\n            throw new TypeError(FUNC_ERROR_TEXT);\n          }\n          if (prereq && !wrapper && getFuncName(func) == 'wrapper') {\n            var wrapper = new LodashWrapper([], true);\n          }\n        }\n        index = wrapper ? index : length;\n        while (++index < length) {\n          func = funcs[index];\n\n          var funcName = getFuncName(func),\n              data = funcName == 'wrapper' ? getData(func) : undefined;\n\n          if (data && isLaziable(data[0]) &&\n                data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&\n                !data[4].length && data[9] == 1\n              ) {\n            wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);\n          } else {\n            wrapper = (func.length == 1 && isLaziable(func))\n              ? wrapper[funcName]()\n              : wrapper.thru(func);\n          }\n        }\n        return function() {\n          var args = arguments,\n              value = args[0];\n\n          if (wrapper && args.length == 1 && isArray(value)) {\n            return wrapper.plant(value).value();\n          }\n          var index = 0,\n              result = length ? funcs[index].apply(this, args) : value;\n\n          while (++index < length) {\n            result = funcs[index].call(this, result);\n          }\n          return result;\n        };\n      });\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with optional `this`\n     * binding of `thisArg`, partial application, and currying.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [partialsRight] The arguments to append to those provided\n     *  to the new function.\n     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n      var isAry = bitmask & WRAP_ARY_FLAG,\n          isBind = bitmask & WRAP_BIND_FLAG,\n          isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n          isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n          isFlip = bitmask & WRAP_FLIP_FLAG,\n          Ctor = isBindKey ? undefined : createCtor(func);\n\n      function wrapper() {\n        var length = arguments.length,\n            args = Array(length),\n            index = length;\n\n        while (index--) {\n          args[index] = arguments[index];\n        }\n        if (isCurried) {\n          var placeholder = getHolder(wrapper),\n              holdersCount = countHolders(args, placeholder);\n        }\n        if (partials) {\n          args = composeArgs(args, partials, holders, isCurried);\n        }\n        if (partialsRight) {\n          args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n        }\n        length -= holdersCount;\n        if (isCurried && length < arity) {\n          var newHolders = replaceHolders(args, placeholder);\n          return createRecurry(\n            func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n            args, newHolders, argPos, ary, arity - length\n          );\n        }\n        var thisBinding = isBind ? thisArg : this,\n            fn = isBindKey ? thisBinding[func] : func;\n\n        length = args.length;\n        if (argPos) {\n          args = reorder(args, argPos);\n        } else if (isFlip && length > 1) {\n          args.reverse();\n        }\n        if (isAry && ary < length) {\n          args.length = ary;\n        }\n        if (this && this !== root && this instanceof wrapper) {\n          fn = Ctor || createCtor(fn);\n        }\n        return fn.apply(thisBinding, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a function like `_.invertBy`.\n     *\n     * @private\n     * @param {Function} setter The function to set accumulator values.\n     * @param {Function} toIteratee The function to resolve iteratees.\n     * @returns {Function} Returns the new inverter function.\n     */\n    function createInverter(setter, toIteratee) {\n      return function(object, iteratee) {\n        return baseInverter(object, setter, toIteratee(iteratee), {});\n      };\n    }\n\n    /**\n     * Creates a function that performs a mathematical operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @param {number} [defaultValue] The value used for `undefined` arguments.\n     * @returns {Function} Returns the new mathematical operation function.\n     */\n    function createMathOperation(operator, defaultValue) {\n      return function(value, other) {\n        var result;\n        if (value === undefined && other === undefined) {\n          return defaultValue;\n        }\n        if (value !== undefined) {\n          result = value;\n        }\n        if (other !== undefined) {\n          if (result === undefined) {\n            return other;\n          }\n          if (typeof value == 'string' || typeof other == 'string') {\n            value = baseToString(value);\n            other = baseToString(other);\n          } else {\n            value = baseToNumber(value);\n            other = baseToNumber(other);\n          }\n          result = operator(value, other);\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function like `_.over`.\n     *\n     * @private\n     * @param {Function} arrayFunc The function to iterate over iteratees.\n     * @returns {Function} Returns the new over function.\n     */\n    function createOver(arrayFunc) {\n      return flatRest(function(iteratees) {\n        iteratees = arrayMap(iteratees, baseUnary(getIteratee()));\n        return baseRest(function(args) {\n          var thisArg = this;\n          return arrayFunc(iteratees, function(iteratee) {\n            return apply(iteratee, thisArg, args);\n          });\n        });\n      });\n    }\n\n    /**\n     * Creates the padding for `string` based on `length`. The `chars` string\n     * is truncated if the number of characters exceeds `length`.\n     *\n     * @private\n     * @param {number} length The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padding for `string`.\n     */\n    function createPadding(length, chars) {\n      chars = chars === undefined ? ' ' : baseToString(chars);\n\n      var charsLength = chars.length;\n      if (charsLength < 2) {\n        return charsLength ? baseRepeat(chars, length) : chars;\n      }\n      var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));\n      return hasUnicode(chars)\n        ? castSlice(stringToArray(result), 0, length).join('')\n        : result.slice(0, length);\n    }\n\n    /**\n     * Creates a function that wraps `func` to invoke it with the `this` binding\n     * of `thisArg` and `partials` prepended to the arguments it receives.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {Array} partials The arguments to prepend to those provided to\n     *  the new function.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createPartial(func, bitmask, thisArg, partials) {\n      var isBind = bitmask & WRAP_BIND_FLAG,\n          Ctor = createCtor(func);\n\n      function wrapper() {\n        var argsIndex = -1,\n            argsLength = arguments.length,\n            leftIndex = -1,\n            leftLength = partials.length,\n            args = Array(leftLength + argsLength),\n            fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n\n        while (++leftIndex < leftLength) {\n          args[leftIndex] = partials[leftIndex];\n        }\n        while (argsLength--) {\n          args[leftIndex++] = arguments[++argsIndex];\n        }\n        return apply(fn, isBind ? thisArg : this, args);\n      }\n      return wrapper;\n    }\n\n    /**\n     * Creates a `_.range` or `_.rangeRight` function.\n     *\n     * @private\n     * @param {boolean} [fromRight] Specify iterating from right to left.\n     * @returns {Function} Returns the new range function.\n     */\n    function createRange(fromRight) {\n      return function(start, end, step) {\n        if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n          end = step = undefined;\n        }\n        // Ensure the sign of `-0` is preserved.\n        start = toFinite(start);\n        if (end === undefined) {\n          end = start;\n          start = 0;\n        } else {\n          end = toFinite(end);\n        }\n        step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n        return baseRange(start, end, step, fromRight);\n      };\n    }\n\n    /**\n     * Creates a function that performs a relational operation on two values.\n     *\n     * @private\n     * @param {Function} operator The function to perform the operation.\n     * @returns {Function} Returns the new relational operation function.\n     */\n    function createRelationalOperation(operator) {\n      return function(value, other) {\n        if (!(typeof value == 'string' && typeof other == 'string')) {\n          value = toNumber(value);\n          other = toNumber(other);\n        }\n        return operator(value, other);\n      };\n    }\n\n    /**\n     * Creates a function that wraps `func` to continue currying.\n     *\n     * @private\n     * @param {Function} func The function to wrap.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @param {Function} wrapFunc The function to create the `func` wrapper.\n     * @param {*} placeholder The placeholder value.\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to prepend to those provided to\n     *  the new function.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\n      var isCurry = bitmask & WRAP_CURRY_FLAG,\n          newHolders = isCurry ? holders : undefined,\n          newHoldersRight = isCurry ? undefined : holders,\n          newPartials = isCurry ? partials : undefined,\n          newPartialsRight = isCurry ? undefined : partials;\n\n      bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\n      bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\n\n      if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\n        bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\n      }\n      var newData = [\n        func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\n        newHoldersRight, argPos, ary, arity\n      ];\n\n      var result = wrapFunc.apply(undefined, newData);\n      if (isLaziable(func)) {\n        setData(result, newData);\n      }\n      result.placeholder = placeholder;\n      return setWrapToString(result, func, bitmask);\n    }\n\n    /**\n     * Creates a function like `_.round`.\n     *\n     * @private\n     * @param {string} methodName The name of the `Math` method to use when rounding.\n     * @returns {Function} Returns the new round function.\n     */\n    function createRound(methodName) {\n      var func = Math[methodName];\n      return function(number, precision) {\n        number = toNumber(number);\n        precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);\n        if (precision && nativeIsFinite(number)) {\n          // Shift with exponential notation to avoid floating-point issues.\n          // See [MDN](https://mdn.io/round#Examples) for more details.\n          var pair = (toString(number) + 'e').split('e'),\n              value = func(pair[0] + 'e' + (+pair[1] + precision));\n\n          pair = (toString(value) + 'e').split('e');\n          return +(pair[0] + 'e' + (+pair[1] - precision));\n        }\n        return func(number);\n      };\n    }\n\n    /**\n     * Creates a set object of `values`.\n     *\n     * @private\n     * @param {Array} values The values to add to the set.\n     * @returns {Object} Returns the new set.\n     */\n    var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n      return new Set(values);\n    };\n\n    /**\n     * Creates a `_.toPairs` or `_.toPairsIn` function.\n     *\n     * @private\n     * @param {Function} keysFunc The function to get the keys of a given object.\n     * @returns {Function} Returns the new pairs function.\n     */\n    function createToPairs(keysFunc) {\n      return function(object) {\n        var tag = getTag(object);\n        if (tag == mapTag) {\n          return mapToArray(object);\n        }\n        if (tag == setTag) {\n          return setToPairs(object);\n        }\n        return baseToPairs(object, keysFunc(object));\n      };\n    }\n\n    /**\n     * Creates a function that either curries or invokes `func` with optional\n     * `this` binding and partially applied arguments.\n     *\n     * @private\n     * @param {Function|string} func The function or method name to wrap.\n     * @param {number} bitmask The bitmask flags.\n     *    1 - `_.bind`\n     *    2 - `_.bindKey`\n     *    4 - `_.curry` or `_.curryRight` of a bound function\n     *    8 - `_.curry`\n     *   16 - `_.curryRight`\n     *   32 - `_.partial`\n     *   64 - `_.partialRight`\n     *  128 - `_.rearg`\n     *  256 - `_.ary`\n     *  512 - `_.flip`\n     * @param {*} [thisArg] The `this` binding of `func`.\n     * @param {Array} [partials] The arguments to be partially applied.\n     * @param {Array} [holders] The `partials` placeholder indexes.\n     * @param {Array} [argPos] The argument positions of the new function.\n     * @param {number} [ary] The arity cap of `func`.\n     * @param {number} [arity] The arity of `func`.\n     * @returns {Function} Returns the new wrapped function.\n     */\n    function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\n      var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\n      if (!isBindKey && typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var length = partials ? partials.length : 0;\n      if (!length) {\n        bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\n        partials = holders = undefined;\n      }\n      ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\n      arity = arity === undefined ? arity : toInteger(arity);\n      length -= holders ? holders.length : 0;\n\n      if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\n        var partialsRight = partials,\n            holdersRight = holders;\n\n        partials = holders = undefined;\n      }\n      var data = isBindKey ? undefined : getData(func);\n\n      var newData = [\n        func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\n        argPos, ary, arity\n      ];\n\n      if (data) {\n        mergeData(newData, data);\n      }\n      func = newData[0];\n      bitmask = newData[1];\n      thisArg = newData[2];\n      partials = newData[3];\n      holders = newData[4];\n      arity = newData[9] = newData[9] === undefined\n        ? (isBindKey ? 0 : func.length)\n        : nativeMax(newData[9] - length, 0);\n\n      if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\n        bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\n      }\n      if (!bitmask || bitmask == WRAP_BIND_FLAG) {\n        var result = createBind(func, bitmask, thisArg);\n      } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\n        result = createCurry(func, bitmask, arity);\n      } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\n        result = createPartial(func, bitmask, thisArg, partials);\n      } else {\n        result = createHybrid.apply(undefined, newData);\n      }\n      var setter = data ? baseSetData : setData;\n      return setWrapToString(setter(result, newData), func, bitmask);\n    }\n\n    /**\n     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties\n     * of source objects to the destination object for all destination properties\n     * that resolve to `undefined`.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to assign.\n     * @param {Object} object The parent object of `objValue`.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsAssignIn(objValue, srcValue, key, object) {\n      if (objValue === undefined ||\n          (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n        return srcValue;\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\n     * objects into destination objects that are passed thru.\n     *\n     * @private\n     * @param {*} objValue The destination value.\n     * @param {*} srcValue The source value.\n     * @param {string} key The key of the property to merge.\n     * @param {Object} object The parent object of `objValue`.\n     * @param {Object} source The parent object of `srcValue`.\n     * @param {Object} [stack] Tracks traversed source values and their merged\n     *  counterparts.\n     * @returns {*} Returns the value to assign.\n     */\n    function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\n      if (isObject(objValue) && isObject(srcValue)) {\n        // Recursively merge objects and arrays (susceptible to call stack limits).\n        stack.set(srcValue, objValue);\n        baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\n        stack['delete'](srcValue);\n      }\n      return objValue;\n    }\n\n    /**\n     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\n     * objects.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @param {string} key The key of the property to inspect.\n     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\n     */\n    function customOmitClone(value) {\n      return isPlainObject(value) ? undefined : value;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for arrays with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Array} array The array to compare.\n     * @param {Array} other The other array to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `array` and `other` objects.\n     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n     */\n    function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          arrLength = array.length,\n          othLength = other.length;\n\n      if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n        return false;\n      }\n      // Check that cyclic values are equal.\n      var arrStacked = stack.get(array);\n      var othStacked = stack.get(other);\n      if (arrStacked && othStacked) {\n        return arrStacked == other && othStacked == array;\n      }\n      var index = -1,\n          result = true,\n          seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n      stack.set(array, other);\n      stack.set(other, array);\n\n      // Ignore non-index properties.\n      while (++index < arrLength) {\n        var arrValue = array[index],\n            othValue = other[index];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, arrValue, index, other, array, stack)\n            : customizer(arrValue, othValue, index, array, other, stack);\n        }\n        if (compared !== undefined) {\n          if (compared) {\n            continue;\n          }\n          result = false;\n          break;\n        }\n        // Recursively compare arrays (susceptible to call stack limits).\n        if (seen) {\n          if (!arraySome(other, function(othValue, othIndex) {\n                if (!cacheHas(seen, othIndex) &&\n                    (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n                  return seen.push(othIndex);\n                }\n              })) {\n            result = false;\n            break;\n          }\n        } else if (!(\n              arrValue === othValue ||\n                equalFunc(arrValue, othValue, bitmask, customizer, stack)\n            )) {\n          result = false;\n          break;\n        }\n      }\n      stack['delete'](array);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for comparing objects of\n     * the same `toStringTag`.\n     *\n     * **Note:** This function only supports comparing values with tags of\n     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {string} tag The `toStringTag` of the objects to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n      switch (tag) {\n        case dataViewTag:\n          if ((object.byteLength != other.byteLength) ||\n              (object.byteOffset != other.byteOffset)) {\n            return false;\n          }\n          object = object.buffer;\n          other = other.buffer;\n\n        case arrayBufferTag:\n          if ((object.byteLength != other.byteLength) ||\n              !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n            return false;\n          }\n          return true;\n\n        case boolTag:\n        case dateTag:\n        case numberTag:\n          // Coerce booleans to `1` or `0` and dates to milliseconds.\n          // Invalid dates are coerced to `NaN`.\n          return eq(+object, +other);\n\n        case errorTag:\n          return object.name == other.name && object.message == other.message;\n\n        case regexpTag:\n        case stringTag:\n          // Coerce regexes to strings and treat strings, primitives and objects,\n          // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n          // for more details.\n          return object == (other + '');\n\n        case mapTag:\n          var convert = mapToArray;\n\n        case setTag:\n          var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n          convert || (convert = setToArray);\n\n          if (object.size != other.size && !isPartial) {\n            return false;\n          }\n          // Assume cyclic values are equal.\n          var stacked = stack.get(object);\n          if (stacked) {\n            return stacked == other;\n          }\n          bitmask |= COMPARE_UNORDERED_FLAG;\n\n          // Recursively compare objects (susceptible to call stack limits).\n          stack.set(object, other);\n          var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n          stack['delete'](object);\n          return result;\n\n        case symbolTag:\n          if (symbolValueOf) {\n            return symbolValueOf.call(object) == symbolValueOf.call(other);\n          }\n      }\n      return false;\n    }\n\n    /**\n     * A specialized version of `baseIsEqualDeep` for objects with support for\n     * partial deep comparisons.\n     *\n     * @private\n     * @param {Object} object The object to compare.\n     * @param {Object} other The other object to compare.\n     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n     * @param {Function} customizer The function to customize comparisons.\n     * @param {Function} equalFunc The function to determine equivalents of values.\n     * @param {Object} stack Tracks traversed `object` and `other` objects.\n     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n     */\n    function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n      var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n          objProps = getAllKeys(object),\n          objLength = objProps.length,\n          othProps = getAllKeys(other),\n          othLength = othProps.length;\n\n      if (objLength != othLength && !isPartial) {\n        return false;\n      }\n      var index = objLength;\n      while (index--) {\n        var key = objProps[index];\n        if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n          return false;\n        }\n      }\n      // Check that cyclic values are equal.\n      var objStacked = stack.get(object);\n      var othStacked = stack.get(other);\n      if (objStacked && othStacked) {\n        return objStacked == other && othStacked == object;\n      }\n      var result = true;\n      stack.set(object, other);\n      stack.set(other, object);\n\n      var skipCtor = isPartial;\n      while (++index < objLength) {\n        key = objProps[index];\n        var objValue = object[key],\n            othValue = other[key];\n\n        if (customizer) {\n          var compared = isPartial\n            ? customizer(othValue, objValue, key, other, object, stack)\n            : customizer(objValue, othValue, key, object, other, stack);\n        }\n        // Recursively compare objects (susceptible to call stack limits).\n        if (!(compared === undefined\n              ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n              : compared\n            )) {\n          result = false;\n          break;\n        }\n        skipCtor || (skipCtor = key == 'constructor');\n      }\n      if (result && !skipCtor) {\n        var objCtor = object.constructor,\n            othCtor = other.constructor;\n\n        // Non `Object` object instances with different constructors are not equal.\n        if (objCtor != othCtor &&\n            ('constructor' in object && 'constructor' in other) &&\n            !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n              typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n          result = false;\n        }\n      }\n      stack['delete'](object);\n      stack['delete'](other);\n      return result;\n    }\n\n    /**\n     * A specialized version of `baseRest` which flattens the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @returns {Function} Returns the new function.\n     */\n    function flatRest(func) {\n      return setToString(overRest(func, undefined, flatten), func + '');\n    }\n\n    /**\n     * Creates an array of own enumerable property names and symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeys(object) {\n      return baseGetAllKeys(object, keys, getSymbols);\n    }\n\n    /**\n     * Creates an array of own and inherited enumerable property names and\n     * symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names and symbols.\n     */\n    function getAllKeysIn(object) {\n      return baseGetAllKeys(object, keysIn, getSymbolsIn);\n    }\n\n    /**\n     * Gets metadata for `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {*} Returns the metadata for `func`.\n     */\n    var getData = !metaMap ? noop : function(func) {\n      return metaMap.get(func);\n    };\n\n    /**\n     * Gets the name of `func`.\n     *\n     * @private\n     * @param {Function} func The function to query.\n     * @returns {string} Returns the function name.\n     */\n    function getFuncName(func) {\n      var result = (func.name + ''),\n          array = realNames[result],\n          length = hasOwnProperty.call(realNames, result) ? array.length : 0;\n\n      while (length--) {\n        var data = array[length],\n            otherFunc = data.func;\n        if (otherFunc == null || otherFunc == func) {\n          return data.name;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Gets the argument placeholder value for `func`.\n     *\n     * @private\n     * @param {Function} func The function to inspect.\n     * @returns {*} Returns the placeholder value.\n     */\n    function getHolder(func) {\n      var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\n      return object.placeholder;\n    }\n\n    /**\n     * Gets the appropriate \"iteratee\" function. If `_.iteratee` is customized,\n     * this function returns the custom method, otherwise it returns `baseIteratee`.\n     * If arguments are provided, the chosen function is invoked with them and\n     * its result is returned.\n     *\n     * @private\n     * @param {*} [value] The value to convert to an iteratee.\n     * @param {number} [arity] The arity of the created iteratee.\n     * @returns {Function} Returns the chosen function or its result.\n     */\n    function getIteratee() {\n      var result = lodash.iteratee || iteratee;\n      result = result === iteratee ? baseIteratee : result;\n      return arguments.length ? result(arguments[0], arguments[1]) : result;\n    }\n\n    /**\n     * Gets the data for `map`.\n     *\n     * @private\n     * @param {Object} map The map to query.\n     * @param {string} key The reference key.\n     * @returns {*} Returns the map data.\n     */\n    function getMapData(map, key) {\n      var data = map.__data__;\n      return isKeyable(key)\n        ? data[typeof key == 'string' ? 'string' : 'hash']\n        : data.map;\n    }\n\n    /**\n     * Gets the property names, values, and compare flags of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the match data of `object`.\n     */\n    function getMatchData(object) {\n      var result = keys(object),\n          length = result.length;\n\n      while (length--) {\n        var key = result[length],\n            value = object[key];\n\n        result[length] = [key, value, isStrictComparable(value)];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the native function at `key` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the method to get.\n     * @returns {*} Returns the function if it's native, else `undefined`.\n     */\n    function getNative(object, key) {\n      var value = getValue(object, key);\n      return baseIsNative(value) ? value : undefined;\n    }\n\n    /**\n     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the raw `toStringTag`.\n     */\n    function getRawTag(value) {\n      var isOwn = hasOwnProperty.call(value, symToStringTag),\n          tag = value[symToStringTag];\n\n      try {\n        value[symToStringTag] = undefined;\n        var unmasked = true;\n      } catch (e) {}\n\n      var result = nativeObjectToString.call(value);\n      if (unmasked) {\n        if (isOwn) {\n          value[symToStringTag] = tag;\n        } else {\n          delete value[symToStringTag];\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array of the own enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n      if (object == null) {\n        return [];\n      }\n      object = Object(object);\n      return arrayFilter(nativeGetSymbols(object), function(symbol) {\n        return propertyIsEnumerable.call(object, symbol);\n      });\n    };\n\n    /**\n     * Creates an array of the own and inherited enumerable symbols of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of symbols.\n     */\n    var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n      var result = [];\n      while (object) {\n        arrayPush(result, getSymbols(object));\n        object = getPrototype(object);\n      }\n      return result;\n    };\n\n    /**\n     * Gets the `toStringTag` of `value`.\n     *\n     * @private\n     * @param {*} value The value to query.\n     * @returns {string} Returns the `toStringTag`.\n     */\n    var getTag = baseGetTag;\n\n    // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\n    if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n        (Map && getTag(new Map) != mapTag) ||\n        (Promise && getTag(Promise.resolve()) != promiseTag) ||\n        (Set && getTag(new Set) != setTag) ||\n        (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n      getTag = function(value) {\n        var result = baseGetTag(value),\n            Ctor = result == objectTag ? value.constructor : undefined,\n            ctorString = Ctor ? toSource(Ctor) : '';\n\n        if (ctorString) {\n          switch (ctorString) {\n            case dataViewCtorString: return dataViewTag;\n            case mapCtorString: return mapTag;\n            case promiseCtorString: return promiseTag;\n            case setCtorString: return setTag;\n            case weakMapCtorString: return weakMapTag;\n          }\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Gets the view, applying any `transforms` to the `start` and `end` positions.\n     *\n     * @private\n     * @param {number} start The start of the view.\n     * @param {number} end The end of the view.\n     * @param {Array} transforms The transformations to apply to the view.\n     * @returns {Object} Returns an object containing the `start` and `end`\n     *  positions of the view.\n     */\n    function getView(start, end, transforms) {\n      var index = -1,\n          length = transforms.length;\n\n      while (++index < length) {\n        var data = transforms[index],\n            size = data.size;\n\n        switch (data.type) {\n          case 'drop':      start += size; break;\n          case 'dropRight': end -= size; break;\n          case 'take':      end = nativeMin(end, start + size); break;\n          case 'takeRight': start = nativeMax(start, end - size); break;\n        }\n      }\n      return { 'start': start, 'end': end };\n    }\n\n    /**\n     * Extracts wrapper details from the `source` body comment.\n     *\n     * @private\n     * @param {string} source The source to inspect.\n     * @returns {Array} Returns the wrapper details.\n     */\n    function getWrapDetails(source) {\n      var match = source.match(reWrapDetails);\n      return match ? match[1].split(reSplitDetails) : [];\n    }\n\n    /**\n     * Checks if `path` exists on `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @param {Function} hasFunc The function to check properties.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     */\n    function hasPath(object, path, hasFunc) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length,\n          result = false;\n\n      while (++index < length) {\n        var key = toKey(path[index]);\n        if (!(result = object != null && hasFunc(object, key))) {\n          break;\n        }\n        object = object[key];\n      }\n      if (result || ++index != length) {\n        return result;\n      }\n      length = object == null ? 0 : object.length;\n      return !!length && isLength(length) && isIndex(key, length) &&\n        (isArray(object) || isArguments(object));\n    }\n\n    /**\n     * Initializes an array clone.\n     *\n     * @private\n     * @param {Array} array The array to clone.\n     * @returns {Array} Returns the initialized clone.\n     */\n    function initCloneArray(array) {\n      var length = array.length,\n          result = new array.constructor(length);\n\n      // Add properties assigned by `RegExp#exec`.\n      if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n        result.index = array.index;\n        result.input = array.input;\n      }\n      return result;\n    }\n\n    /**\n     * Initializes an object clone.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneObject(object) {\n      return (typeof object.constructor == 'function' && !isPrototype(object))\n        ? baseCreate(getPrototype(object))\n        : {};\n    }\n\n    /**\n     * Initializes an object clone based on its `toStringTag`.\n     *\n     * **Note:** This function only supports cloning values with tags of\n     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n     *\n     * @private\n     * @param {Object} object The object to clone.\n     * @param {string} tag The `toStringTag` of the object to clone.\n     * @param {boolean} [isDeep] Specify a deep clone.\n     * @returns {Object} Returns the initialized clone.\n     */\n    function initCloneByTag(object, tag, isDeep) {\n      var Ctor = object.constructor;\n      switch (tag) {\n        case arrayBufferTag:\n          return cloneArrayBuffer(object);\n\n        case boolTag:\n        case dateTag:\n          return new Ctor(+object);\n\n        case dataViewTag:\n          return cloneDataView(object, isDeep);\n\n        case float32Tag: case float64Tag:\n        case int8Tag: case int16Tag: case int32Tag:\n        case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n          return cloneTypedArray(object, isDeep);\n\n        case mapTag:\n          return new Ctor;\n\n        case numberTag:\n        case stringTag:\n          return new Ctor(object);\n\n        case regexpTag:\n          return cloneRegExp(object);\n\n        case setTag:\n          return new Ctor;\n\n        case symbolTag:\n          return cloneSymbol(object);\n      }\n    }\n\n    /**\n     * Inserts wrapper `details` in a comment at the top of the `source` body.\n     *\n     * @private\n     * @param {string} source The source to modify.\n     * @returns {Array} details The details to insert.\n     * @returns {string} Returns the modified source.\n     */\n    function insertWrapDetails(source, details) {\n      var length = details.length;\n      if (!length) {\n        return source;\n      }\n      var lastIndex = length - 1;\n      details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\n      details = details.join(length > 2 ? ', ' : ' ');\n      return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\n    }\n\n    /**\n     * Checks if `value` is a flattenable `arguments` object or array.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n     */\n    function isFlattenable(value) {\n      return isArray(value) || isArguments(value) ||\n        !!(spreadableSymbol && value && value[spreadableSymbol]);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like index.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n     */\n    function isIndex(value, length) {\n      var type = typeof value;\n      length = length == null ? MAX_SAFE_INTEGER : length;\n\n      return !!length &&\n        (type == 'number' ||\n          (type != 'symbol' && reIsUint.test(value))) &&\n            (value > -1 && value % 1 == 0 && value < length);\n    }\n\n    /**\n     * Checks if the given arguments are from an iteratee call.\n     *\n     * @private\n     * @param {*} value The potential iteratee value argument.\n     * @param {*} index The potential iteratee index or key argument.\n     * @param {*} object The potential iteratee object argument.\n     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n     *  else `false`.\n     */\n    function isIterateeCall(value, index, object) {\n      if (!isObject(object)) {\n        return false;\n      }\n      var type = typeof index;\n      if (type == 'number'\n            ? (isArrayLike(object) && isIndex(index, object.length))\n            : (type == 'string' && index in object)\n          ) {\n        return eq(object[index], value);\n      }\n      return false;\n    }\n\n    /**\n     * Checks if `value` is a property name and not a property path.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @param {Object} [object] The object to query keys on.\n     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n     */\n    function isKey(value, object) {\n      if (isArray(value)) {\n        return false;\n      }\n      var type = typeof value;\n      if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n          value == null || isSymbol(value)) {\n        return true;\n      }\n      return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n        (object != null && value in Object(object));\n    }\n\n    /**\n     * Checks if `value` is suitable for use as unique object key.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n     */\n    function isKeyable(value) {\n      var type = typeof value;\n      return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n        ? (value !== '__proto__')\n        : (value === null);\n    }\n\n    /**\n     * Checks if `func` has a lazy counterpart.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\n     *  else `false`.\n     */\n    function isLaziable(func) {\n      var funcName = getFuncName(func),\n          other = lodash[funcName];\n\n      if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\n        return false;\n      }\n      if (func === other) {\n        return true;\n      }\n      var data = getData(other);\n      return !!data && func === data[0];\n    }\n\n    /**\n     * Checks if `func` has its source masked.\n     *\n     * @private\n     * @param {Function} func The function to check.\n     * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n     */\n    function isMasked(func) {\n      return !!maskSrcKey && (maskSrcKey in func);\n    }\n\n    /**\n     * Checks if `func` is capable of being masked.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.\n     */\n    var isMaskable = coreJsData ? isFunction : stubFalse;\n\n    /**\n     * Checks if `value` is likely a prototype object.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n     */\n    function isPrototype(value) {\n      var Ctor = value && value.constructor,\n          proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n      return value === proto;\n    }\n\n    /**\n     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` if suitable for strict\n     *  equality comparisons, else `false`.\n     */\n    function isStrictComparable(value) {\n      return value === value && !isObject(value);\n    }\n\n    /**\n     * A specialized version of `matchesProperty` for source values suitable\n     * for strict equality comparisons, i.e. `===`.\n     *\n     * @private\n     * @param {string} key The key of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     */\n    function matchesStrictComparable(key, srcValue) {\n      return function(object) {\n        if (object == null) {\n          return false;\n        }\n        return object[key] === srcValue &&\n          (srcValue !== undefined || (key in Object(object)));\n      };\n    }\n\n    /**\n     * A specialized version of `_.memoize` which clears the memoized function's\n     * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n     *\n     * @private\n     * @param {Function} func The function to have its output memoized.\n     * @returns {Function} Returns the new memoized function.\n     */\n    function memoizeCapped(func) {\n      var result = memoize(func, function(key) {\n        if (cache.size === MAX_MEMOIZE_SIZE) {\n          cache.clear();\n        }\n        return key;\n      });\n\n      var cache = result.cache;\n      return result;\n    }\n\n    /**\n     * Merges the function metadata of `source` into `data`.\n     *\n     * Merging metadata reduces the number of wrappers used to invoke a function.\n     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n     * may be applied regardless of execution order. Methods like `_.ary` and\n     * `_.rearg` modify function arguments, making the order in which they are\n     * executed important, preventing the merging of metadata. However, we make\n     * an exception for a safe combined case where curried functions have `_.ary`\n     * and or `_.rearg` applied.\n     *\n     * @private\n     * @param {Array} data The destination metadata.\n     * @param {Array} source The source metadata.\n     * @returns {Array} Returns `data`.\n     */\n    function mergeData(data, source) {\n      var bitmask = data[1],\n          srcBitmask = source[1],\n          newBitmask = bitmask | srcBitmask,\n          isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n      var isCombo =\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n        ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n        ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n      // Exit early if metadata can't be merged.\n      if (!(isCommon || isCombo)) {\n        return data;\n      }\n      // Use source `thisArg` if available.\n      if (srcBitmask & WRAP_BIND_FLAG) {\n        data[2] = source[2];\n        // Set when currying a bound function.\n        newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n      }\n      // Compose partial arguments.\n      var value = source[3];\n      if (value) {\n        var partials = data[3];\n        data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n        data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n      }\n      // Compose partial right arguments.\n      value = source[5];\n      if (value) {\n        partials = data[5];\n        data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n        data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n      }\n      // Use source `argPos` if available.\n      value = source[7];\n      if (value) {\n        data[7] = value;\n      }\n      // Use source `ary` if it's smaller.\n      if (srcBitmask & WRAP_ARY_FLAG) {\n        data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n      }\n      // Use source `arity` if one is not provided.\n      if (data[9] == null) {\n        data[9] = source[9];\n      }\n      // Use source `func` and merge bitmasks.\n      data[0] = source[0];\n      data[1] = newBitmask;\n\n      return data;\n    }\n\n    /**\n     * This function is like\n     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * except that it includes inherited enumerable properties.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     */\n    function nativeKeysIn(object) {\n      var result = [];\n      if (object != null) {\n        for (var key in Object(object)) {\n          result.push(key);\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a string using `Object.prototype.toString`.\n     *\n     * @private\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     */\n    function objectToString(value) {\n      return nativeObjectToString.call(value);\n    }\n\n    /**\n     * A specialized version of `baseRest` which transforms the rest array.\n     *\n     * @private\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @param {Function} transform The rest array transform.\n     * @returns {Function} Returns the new function.\n     */\n    function overRest(func, start, transform) {\n      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n      return function() {\n        var args = arguments,\n            index = -1,\n            length = nativeMax(args.length - start, 0),\n            array = Array(length);\n\n        while (++index < length) {\n          array[index] = args[start + index];\n        }\n        index = -1;\n        var otherArgs = Array(start + 1);\n        while (++index < start) {\n          otherArgs[index] = args[index];\n        }\n        otherArgs[start] = transform(array);\n        return apply(func, this, otherArgs);\n      };\n    }\n\n    /**\n     * Gets the parent value at `path` of `object`.\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {Array} path The path to get the parent value of.\n     * @returns {*} Returns the parent value.\n     */\n    function parent(object, path) {\n      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n    }\n\n    /**\n     * Reorder `array` according to the specified indexes where the element at\n     * the first index is assigned as the first element, the element at\n     * the second index is assigned as the second element, and so on.\n     *\n     * @private\n     * @param {Array} array The array to reorder.\n     * @param {Array} indexes The arranged array indexes.\n     * @returns {Array} Returns `array`.\n     */\n    function reorder(array, indexes) {\n      var arrLength = array.length,\n          length = nativeMin(indexes.length, arrLength),\n          oldArray = copyArray(array);\n\n      while (length--) {\n        var index = indexes[length];\n        array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n      }\n      return array;\n    }\n\n    /**\n     * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n     *\n     * @private\n     * @param {Object} object The object to query.\n     * @param {string} key The key of the property to get.\n     * @returns {*} Returns the property value.\n     */\n    function safeGet(object, key) {\n      if (key === 'constructor' && typeof object[key] === 'function') {\n        return;\n      }\n\n      if (key == '__proto__') {\n        return;\n      }\n\n      return object[key];\n    }\n\n    /**\n     * Sets metadata for `func`.\n     *\n     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\n     * period of time, it will trip its breaker and transition to an identity\n     * function to avoid garbage collection pauses in V8. See\n     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\n     * for more details.\n     *\n     * @private\n     * @param {Function} func The function to associate metadata with.\n     * @param {*} data The metadata.\n     * @returns {Function} Returns `func`.\n     */\n    var setData = shortOut(baseSetData);\n\n    /**\n     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).\n     *\n     * @private\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @returns {number|Object} Returns the timer id or timeout object.\n     */\n    var setTimeout = ctxSetTimeout || function(func, wait) {\n      return root.setTimeout(func, wait);\n    };\n\n    /**\n     * Sets the `toString` method of `func` to return `string`.\n     *\n     * @private\n     * @param {Function} func The function to modify.\n     * @param {Function} string The `toString` result.\n     * @returns {Function} Returns `func`.\n     */\n    var setToString = shortOut(baseSetToString);\n\n    /**\n     * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n     * with wrapper details in a comment at the top of the source body.\n     *\n     * @private\n     * @param {Function} wrapper The function to modify.\n     * @param {Function} reference The reference function.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Function} Returns `wrapper`.\n     */\n    function setWrapToString(wrapper, reference, bitmask) {\n      var source = (reference + '');\n      return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n    }\n\n    /**\n     * Creates a function that'll short out and invoke `identity` instead\n     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n     * milliseconds.\n     *\n     * @private\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new shortable function.\n     */\n    function shortOut(func) {\n      var count = 0,\n          lastCalled = 0;\n\n      return function() {\n        var stamp = nativeNow(),\n            remaining = HOT_SPAN - (stamp - lastCalled);\n\n        lastCalled = stamp;\n        if (remaining > 0) {\n          if (++count >= HOT_COUNT) {\n            return arguments[0];\n          }\n        } else {\n          count = 0;\n        }\n        return func.apply(undefined, arguments);\n      };\n    }\n\n    /**\n     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.\n     *\n     * @private\n     * @param {Array} array The array to shuffle.\n     * @param {number} [size=array.length] The size of `array`.\n     * @returns {Array} Returns `array`.\n     */\n    function shuffleSelf(array, size) {\n      var index = -1,\n          length = array.length,\n          lastIndex = length - 1;\n\n      size = size === undefined ? length : size;\n      while (++index < size) {\n        var rand = baseRandom(index, lastIndex),\n            value = array[rand];\n\n        array[rand] = array[index];\n        array[index] = value;\n      }\n      array.length = size;\n      return array;\n    }\n\n    /**\n     * Converts `string` to a property path array.\n     *\n     * @private\n     * @param {string} string The string to convert.\n     * @returns {Array} Returns the property path array.\n     */\n    var stringToPath = memoizeCapped(function(string) {\n      var result = [];\n      if (string.charCodeAt(0) === 46 /* . */) {\n        result.push('');\n      }\n      string.replace(rePropName, function(match, number, quote, subString) {\n        result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n      });\n      return result;\n    });\n\n    /**\n     * Converts `value` to a string key if it's not a string or symbol.\n     *\n     * @private\n     * @param {*} value The value to inspect.\n     * @returns {string|symbol} Returns the key.\n     */\n    function toKey(value) {\n      if (typeof value == 'string' || isSymbol(value)) {\n        return value;\n      }\n      var result = (value + '');\n      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n    }\n\n    /**\n     * Converts `func` to its source code.\n     *\n     * @private\n     * @param {Function} func The function to convert.\n     * @returns {string} Returns the source code.\n     */\n    function toSource(func) {\n      if (func != null) {\n        try {\n          return funcToString.call(func);\n        } catch (e) {}\n        try {\n          return (func + '');\n        } catch (e) {}\n      }\n      return '';\n    }\n\n    /**\n     * Updates wrapper `details` based on `bitmask` flags.\n     *\n     * @private\n     * @returns {Array} details The details to modify.\n     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n     * @returns {Array} Returns `details`.\n     */\n    function updateWrapDetails(details, bitmask) {\n      arrayEach(wrapFlags, function(pair) {\n        var value = '_.' + pair[0];\n        if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\n          details.push(value);\n        }\n      });\n      return details.sort();\n    }\n\n    /**\n     * Creates a clone of `wrapper`.\n     *\n     * @private\n     * @param {Object} wrapper The wrapper to clone.\n     * @returns {Object} Returns the cloned wrapper.\n     */\n    function wrapperClone(wrapper) {\n      if (wrapper instanceof LazyWrapper) {\n        return wrapper.clone();\n      }\n      var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n      result.__actions__ = copyArray(wrapper.__actions__);\n      result.__index__  = wrapper.__index__;\n      result.__values__ = wrapper.__values__;\n      return result;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an array of elements split into groups the length of `size`.\n     * If `array` can't be split evenly, the final chunk will be the remaining\n     * elements.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to process.\n     * @param {number} [size=1] The length of each chunk\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the new array of chunks.\n     * @example\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 2);\n     * // => [['a', 'b'], ['c', 'd']]\n     *\n     * _.chunk(['a', 'b', 'c', 'd'], 3);\n     * // => [['a', 'b', 'c'], ['d']]\n     */\n    function chunk(array, size, guard) {\n      if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {\n        size = 1;\n      } else {\n        size = nativeMax(toInteger(size), 0);\n      }\n      var length = array == null ? 0 : array.length;\n      if (!length || size < 1) {\n        return [];\n      }\n      var index = 0,\n          resIndex = 0,\n          result = Array(nativeCeil(length / size));\n\n      while (index < length) {\n        result[resIndex++] = baseSlice(array, index, (index += size));\n      }\n      return result;\n    }\n\n    /**\n     * Creates an array with all falsey values removed. The values `false`, `null`,\n     * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to compact.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.compact([0, 1, false, 2, '', 3]);\n     * // => [1, 2, 3]\n     */\n    function compact(array) {\n      var index = -1,\n          length = array == null ? 0 : array.length,\n          resIndex = 0,\n          result = [];\n\n      while (++index < length) {\n        var value = array[index];\n        if (value) {\n          result[resIndex++] = value;\n        }\n      }\n      return result;\n    }\n\n    /**\n     * Creates a new array concatenating `array` with any additional arrays\n     * and/or values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to concatenate.\n     * @param {...*} [values] The values to concatenate.\n     * @returns {Array} Returns the new concatenated array.\n     * @example\n     *\n     * var array = [1];\n     * var other = _.concat(array, 2, [3], [[4]]);\n     *\n     * console.log(other);\n     * // => [1, 2, 3, [4]]\n     *\n     * console.log(array);\n     * // => [1]\n     */\n    function concat() {\n      var length = arguments.length;\n      if (!length) {\n        return [];\n      }\n      var args = Array(length - 1),\n          array = arguments[0],\n          index = length;\n\n      while (index--) {\n        args[index - 1] = arguments[index];\n      }\n      return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\n    }\n\n    /**\n     * Creates an array of `array` values not included in the other given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * **Note:** Unlike `_.pullAll`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.without, _.xor\n     * @example\n     *\n     * _.difference([2, 1], [2, 3]);\n     * // => [1]\n     */\n    var difference = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `iteratee` which\n     * is invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var differenceBy = baseRest(function(array, values) {\n      var iteratee = last(values);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.difference` except that it accepts `comparator`\n     * which is invoked to compare elements of `array` to `values`. The order and\n     * references of result values are determined by the first array. The comparator\n     * is invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...Array} [values] The values to exclude.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     *\n     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }]\n     */\n    var differenceWith = baseRest(function(array, values) {\n      var comparator = last(values);\n      if (isArrayLikeObject(comparator)) {\n        comparator = undefined;\n      }\n      return isArrayLikeObject(array)\n        ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.drop([1, 2, 3]);\n     * // => [2, 3]\n     *\n     * _.drop([1, 2, 3], 2);\n     * // => [3]\n     *\n     * _.drop([1, 2, 3], 5);\n     * // => []\n     *\n     * _.drop([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function drop(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements dropped from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to drop.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.dropRight([1, 2, 3]);\n     * // => [1, 2]\n     *\n     * _.dropRight([1, 2, 3], 2);\n     * // => [1]\n     *\n     * _.dropRight([1, 2, 3], 5);\n     * // => []\n     *\n     * _.dropRight([1, 2, 3], 0);\n     * // => [1, 2, 3]\n     */\n    function dropRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the end.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.dropRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropRightWhile(users, ['active', false]);\n     * // => objects for ['barney']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropRightWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` excluding elements dropped from the beginning.\n     * Elements are dropped until `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.dropWhile(users, function(o) { return !o.active; });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.dropWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.dropWhile(users, ['active', false]);\n     * // => objects for ['pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.dropWhile(users, 'active');\n     * // => objects for ['barney', 'fred', 'pebbles']\n     */\n    function dropWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), true)\n        : [];\n    }\n\n    /**\n     * Fills elements of `array` with `value` from `start` up to, but not\n     * including, `end`.\n     *\n     * **Note:** This method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Array\n     * @param {Array} array The array to fill.\n     * @param {*} value The value to fill `array` with.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.fill(array, 'a');\n     * console.log(array);\n     * // => ['a', 'a', 'a']\n     *\n     * _.fill(Array(3), 2);\n     * // => [2, 2, 2]\n     *\n     * _.fill([4, 6, 8, 10], '*', 1, 3);\n     * // => [4, '*', '*', 10]\n     */\n    function fill(array, value, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {\n        start = 0;\n        end = length;\n      }\n      return baseFill(array, value, start, end);\n    }\n\n    /**\n     * This method is like `_.find` except that it returns the index of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.findIndex(users, function(o) { return o.user == 'barney'; });\n     * // => 0\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findIndex(users, { 'user': 'fred', 'active': false });\n     * // => 1\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findIndex(users, ['active', false]);\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findIndex(users, 'active');\n     * // => 2\n     */\n    function findIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index);\n    }\n\n    /**\n     * This method is like `_.findIndex` except that it iterates over elements\n     * of `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the found element, else `-1`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\n     * // => 2\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastIndex(users, { 'user': 'barney', 'active': true });\n     * // => 0\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastIndex(users, ['active', false]);\n     * // => 2\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastIndex(users, 'active');\n     * // => 0\n     */\n    function findLastIndex(array, predicate, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length - 1;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = fromIndex < 0\n          ? nativeMax(length + index, 0)\n          : nativeMin(index, length - 1);\n      }\n      return baseFindIndex(array, getIteratee(predicate, 3), index, true);\n    }\n\n    /**\n     * Flattens `array` a single level deep.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flatten([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, [3, [4]], 5]\n     */\n    function flatten(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, 1) : [];\n    }\n\n    /**\n     * Recursively flattens `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * _.flattenDeep([1, [2, [3, [4]], 5]]);\n     * // => [1, 2, 3, 4, 5]\n     */\n    function flattenDeep(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseFlatten(array, INFINITY) : [];\n    }\n\n    /**\n     * Recursively flatten `array` up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Array\n     * @param {Array} array The array to flatten.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * var array = [1, [2, [3, [4]], 5]];\n     *\n     * _.flattenDepth(array, 1);\n     * // => [1, 2, [3, [4]], 5]\n     *\n     * _.flattenDepth(array, 2);\n     * // => [1, 2, 3, [4], 5]\n     */\n    function flattenDepth(array, depth) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(array, depth);\n    }\n\n    /**\n     * The inverse of `_.toPairs`; this method returns an object composed\n     * from key-value `pairs`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} pairs The key-value pairs.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.fromPairs([['a', 1], ['b', 2]]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function fromPairs(pairs) {\n      var index = -1,\n          length = pairs == null ? 0 : pairs.length,\n          result = {};\n\n      while (++index < length) {\n        var pair = pairs[index];\n        result[pair[0]] = pair[1];\n      }\n      return result;\n    }\n\n    /**\n     * Gets the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias first\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the first element of `array`.\n     * @example\n     *\n     * _.head([1, 2, 3]);\n     * // => 1\n     *\n     * _.head([]);\n     * // => undefined\n     */\n    function head(array) {\n      return (array && array.length) ? array[0] : undefined;\n    }\n\n    /**\n     * Gets the index at which the first occurrence of `value` is found in `array`\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. If `fromIndex` is negative, it's used as the\n     * offset from the end of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.indexOf([1, 2, 1, 2], 2);\n     * // => 1\n     *\n     * // Search from the `fromIndex`.\n     * _.indexOf([1, 2, 1, 2], 2, 2);\n     * // => 3\n     */\n    function indexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = fromIndex == null ? 0 : toInteger(fromIndex);\n      if (index < 0) {\n        index = nativeMax(length + index, 0);\n      }\n      return baseIndexOf(array, value, index);\n    }\n\n    /**\n     * Gets all but the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.initial([1, 2, 3]);\n     * // => [1, 2]\n     */\n    function initial(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 0, -1) : [];\n    }\n\n    /**\n     * Creates an array of unique values that are included in all given arrays\n     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons. The order and references of result values are\n     * determined by the first array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersection([2, 1], [2, 3]);\n     * // => [2]\n     */\n    var intersection = baseRest(function(arrays) {\n      var mapped = arrayMap(arrays, castArrayLikeObject);\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped)\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `iteratee`\n     * which is invoked for each element of each `arrays` to generate the criterion\n     * by which they're compared. The order and references of result values are\n     * determined by the first array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [2.1]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }]\n     */\n    var intersectionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      if (iteratee === last(mapped)) {\n        iteratee = undefined;\n      } else {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, getIteratee(iteratee, 2))\n        : [];\n    });\n\n    /**\n     * This method is like `_.intersection` except that it accepts `comparator`\n     * which is invoked to compare elements of `arrays`. The order and references\n     * of result values are determined by the first array. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of intersecting values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.intersectionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }]\n     */\n    var intersectionWith = baseRest(function(arrays) {\n      var comparator = last(arrays),\n          mapped = arrayMap(arrays, castArrayLikeObject);\n\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      if (comparator) {\n        mapped.pop();\n      }\n      return (mapped.length && mapped[0] === arrays[0])\n        ? baseIntersection(mapped, undefined, comparator)\n        : [];\n    });\n\n    /**\n     * Converts all elements in `array` into a string separated by `separator`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to convert.\n     * @param {string} [separator=','] The element separator.\n     * @returns {string} Returns the joined string.\n     * @example\n     *\n     * _.join(['a', 'b', 'c'], '~');\n     * // => 'a~b~c'\n     */\n    function join(array, separator) {\n      return array == null ? '' : nativeJoin.call(array, separator);\n    }\n\n    /**\n     * Gets the last element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {*} Returns the last element of `array`.\n     * @example\n     *\n     * _.last([1, 2, 3]);\n     * // => 3\n     */\n    function last(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? array[length - 1] : undefined;\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it iterates over elements of\n     * `array` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=array.length-1] The index to search from.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.lastIndexOf([1, 2, 1, 2], 2);\n     * // => 3\n     *\n     * // Search from the `fromIndex`.\n     * _.lastIndexOf([1, 2, 1, 2], 2, 2);\n     * // => 1\n     */\n    function lastIndexOf(array, value, fromIndex) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return -1;\n      }\n      var index = length;\n      if (fromIndex !== undefined) {\n        index = toInteger(fromIndex);\n        index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);\n      }\n      return value === value\n        ? strictLastIndexOf(array, value, index)\n        : baseFindIndex(array, baseIsNaN, index, true);\n    }\n\n    /**\n     * Gets the element at index `n` of `array`. If `n` is negative, the nth\n     * element from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.11.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=0] The index of the element to return.\n     * @returns {*} Returns the nth element of `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     *\n     * _.nth(array, 1);\n     * // => 'b'\n     *\n     * _.nth(array, -2);\n     * // => 'c';\n     */\n    function nth(array, n) {\n      return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;\n    }\n\n    /**\n     * Removes all given values from `array` using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n     * to remove elements from an array by predicate.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...*} [values] The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pull(array, 'a', 'c');\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    var pull = baseRest(pullAll);\n\n    /**\n     * This method is like `_.pull` except that it accepts an array of values to remove.\n     *\n     * **Note:** Unlike `_.difference`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n     *\n     * _.pullAll(array, ['a', 'c']);\n     * console.log(array);\n     * // => ['b', 'b']\n     */\n    function pullAll(array, values) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values)\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `iteratee` which is\n     * invoked for each element of `array` and `values` to generate the criterion\n     * by which they're compared. The iteratee is invoked with one argument: (value).\n     *\n     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];\n     *\n     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');\n     * console.log(array);\n     * // => [{ 'x': 2 }]\n     */\n    function pullAllBy(array, values, iteratee) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, getIteratee(iteratee, 2))\n        : array;\n    }\n\n    /**\n     * This method is like `_.pullAll` except that it accepts `comparator` which\n     * is invoked to compare elements of `array` to `values`. The comparator is\n     * invoked with two arguments: (arrVal, othVal).\n     *\n     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Array} values The values to remove.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];\n     *\n     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);\n     * console.log(array);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]\n     */\n    function pullAllWith(array, values, comparator) {\n      return (array && array.length && values && values.length)\n        ? basePullAll(array, values, undefined, comparator)\n        : array;\n    }\n\n    /**\n     * Removes elements from `array` corresponding to `indexes` and returns an\n     * array of removed elements.\n     *\n     * **Note:** Unlike `_.at`, this method mutates `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {...(number|number[])} [indexes] The indexes of elements to remove.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = ['a', 'b', 'c', 'd'];\n     * var pulled = _.pullAt(array, [1, 3]);\n     *\n     * console.log(array);\n     * // => ['a', 'c']\n     *\n     * console.log(pulled);\n     * // => ['b', 'd']\n     */\n    var pullAt = flatRest(function(array, indexes) {\n      var length = array == null ? 0 : array.length,\n          result = baseAt(array, indexes);\n\n      basePullAt(array, arrayMap(indexes, function(index) {\n        return isIndex(index, length) ? +index : index;\n      }).sort(compareAscending));\n\n      return result;\n    });\n\n    /**\n     * Removes all elements from `array` that `predicate` returns truthy for\n     * and returns an array of the removed elements. The predicate is invoked\n     * with three arguments: (value, index, array).\n     *\n     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`\n     * to pull elements from an array by value.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new array of removed elements.\n     * @example\n     *\n     * var array = [1, 2, 3, 4];\n     * var evens = _.remove(array, function(n) {\n     *   return n % 2 == 0;\n     * });\n     *\n     * console.log(array);\n     * // => [1, 3]\n     *\n     * console.log(evens);\n     * // => [2, 4]\n     */\n    function remove(array, predicate) {\n      var result = [];\n      if (!(array && array.length)) {\n        return result;\n      }\n      var index = -1,\n          indexes = [],\n          length = array.length;\n\n      predicate = getIteratee(predicate, 3);\n      while (++index < length) {\n        var value = array[index];\n        if (predicate(value, index, array)) {\n          result.push(value);\n          indexes.push(index);\n        }\n      }\n      basePullAt(array, indexes);\n      return result;\n    }\n\n    /**\n     * Reverses `array` so that the first element becomes the last, the second\n     * element becomes the second to last, and so on.\n     *\n     * **Note:** This method mutates `array` and is based on\n     * [`Array#reverse`](https://mdn.io/Array/reverse).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to modify.\n     * @returns {Array} Returns `array`.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _.reverse(array);\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function reverse(array) {\n      return array == null ? array : nativeReverse.call(array);\n    }\n\n    /**\n     * Creates a slice of `array` from `start` up to, but not including, `end`.\n     *\n     * **Note:** This method is used instead of\n     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\n     * returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to slice.\n     * @param {number} [start=0] The start position.\n     * @param {number} [end=array.length] The end position.\n     * @returns {Array} Returns the slice of `array`.\n     */\n    function slice(array, start, end) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\n        start = 0;\n        end = length;\n      }\n      else {\n        start = start == null ? 0 : toInteger(start);\n        end = end === undefined ? length : toInteger(end);\n      }\n      return baseSlice(array, start, end);\n    }\n\n    /**\n     * Uses a binary search to determine the lowest index at which `value`\n     * should be inserted into `array` in order to maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedIndex([30, 50], 40);\n     * // => 1\n     */\n    function sortedIndex(array, value) {\n      return baseSortedIndex(array, value);\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 0\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 0\n     */\n    function sortedIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * This method is like `_.indexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 1\n     */\n    function sortedIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value);\n        if (index < length && eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.sortedIndex` except that it returns the highest\n     * index at which `value` should be inserted into `array` in order to\n     * maintain its sort order.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);\n     * // => 4\n     */\n    function sortedLastIndex(array, value) {\n      return baseSortedIndex(array, value, true);\n    }\n\n    /**\n     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`\n     * which is invoked for `value` and each element of `array` to compute their\n     * sort ranking. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The sorted array to inspect.\n     * @param {*} value The value to evaluate.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the index at which `value` should be inserted\n     *  into `array`.\n     * @example\n     *\n     * var objects = [{ 'x': 4 }, { 'x': 5 }];\n     *\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });\n     * // => 1\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');\n     * // => 1\n     */\n    function sortedLastIndexBy(array, value, iteratee) {\n      return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);\n    }\n\n    /**\n     * This method is like `_.lastIndexOf` except that it performs a binary\n     * search on a sorted `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {*} value The value to search for.\n     * @returns {number} Returns the index of the matched value, else `-1`.\n     * @example\n     *\n     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);\n     * // => 3\n     */\n    function sortedLastIndexOf(array, value) {\n      var length = array == null ? 0 : array.length;\n      if (length) {\n        var index = baseSortedIndex(array, value, true) - 1;\n        if (eq(array[index], value)) {\n          return index;\n        }\n      }\n      return -1;\n    }\n\n    /**\n     * This method is like `_.uniq` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniq([1, 1, 2]);\n     * // => [1, 2]\n     */\n    function sortedUniq(array) {\n      return (array && array.length)\n        ? baseSortedUniq(array)\n        : [];\n    }\n\n    /**\n     * This method is like `_.uniqBy` except that it's designed and optimized\n     * for sorted arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);\n     * // => [1.1, 2.3]\n     */\n    function sortedUniqBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSortedUniq(array, getIteratee(iteratee, 2))\n        : [];\n    }\n\n    /**\n     * Gets all but the first element of `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.tail([1, 2, 3]);\n     * // => [2, 3]\n     */\n    function tail(array) {\n      var length = array == null ? 0 : array.length;\n      return length ? baseSlice(array, 1, length) : [];\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the beginning.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.take([1, 2, 3]);\n     * // => [1]\n     *\n     * _.take([1, 2, 3], 2);\n     * // => [1, 2]\n     *\n     * _.take([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.take([1, 2, 3], 0);\n     * // => []\n     */\n    function take(array, n, guard) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      return baseSlice(array, 0, n < 0 ? 0 : n);\n    }\n\n    /**\n     * Creates a slice of `array` with `n` elements taken from the end.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {number} [n=1] The number of elements to take.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * _.takeRight([1, 2, 3]);\n     * // => [3]\n     *\n     * _.takeRight([1, 2, 3], 2);\n     * // => [2, 3]\n     *\n     * _.takeRight([1, 2, 3], 5);\n     * // => [1, 2, 3]\n     *\n     * _.takeRight([1, 2, 3], 0);\n     * // => []\n     */\n    function takeRight(array, n, guard) {\n      var length = array == null ? 0 : array.length;\n      if (!length) {\n        return [];\n      }\n      n = (guard || n === undefined) ? 1 : toInteger(n);\n      n = length - n;\n      return baseSlice(array, n < 0 ? 0 : n, length);\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the end. Elements are\n     * taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': true },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': false }\n     * ];\n     *\n     * _.takeRightWhile(users, function(o) { return !o.active; });\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });\n     * // => objects for ['pebbles']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeRightWhile(users, ['active', false]);\n     * // => objects for ['fred', 'pebbles']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeRightWhile(users, 'active');\n     * // => []\n     */\n    function takeRightWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3), false, true)\n        : [];\n    }\n\n    /**\n     * Creates a slice of `array` with elements taken from the beginning. Elements\n     * are taken until `predicate` returns falsey. The predicate is invoked with\n     * three arguments: (value, index, array).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Array\n     * @param {Array} array The array to query.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the slice of `array`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'active': false },\n     *   { 'user': 'fred',    'active': false },\n     *   { 'user': 'pebbles', 'active': true }\n     * ];\n     *\n     * _.takeWhile(users, function(o) { return !o.active; });\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.takeWhile(users, { 'user': 'barney', 'active': false });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.takeWhile(users, ['active', false]);\n     * // => objects for ['barney', 'fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.takeWhile(users, 'active');\n     * // => []\n     */\n    function takeWhile(array, predicate) {\n      return (array && array.length)\n        ? baseWhile(array, getIteratee(predicate, 3))\n        : [];\n    }\n\n    /**\n     * Creates an array of unique values, in order, from all given arrays using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.union([2], [1, 2]);\n     * // => [2, 1]\n     */\n    var union = baseRest(function(arrays) {\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which uniqueness is computed. Result values are chosen from the first\n     * array in which the value occurs. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * _.unionBy([2.1], [1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    var unionBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.union` except that it accepts `comparator` which\n     * is invoked to compare elements of `arrays`. Result values are chosen from\n     * the first array in which the value occurs. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of combined values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.unionWith(objects, others, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var unionWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);\n    });\n\n    /**\n     * Creates a duplicate-free version of an array, using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons, in which only the first occurrence of each element\n     * is kept. The order of result values is determined by the order they occur\n     * in the array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniq([2, 1, 2]);\n     * // => [2, 1]\n     */\n    function uniq(array) {\n      return (array && array.length) ? baseUniq(array) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * uniqueness is computed. The order of result values is determined by the\n     * order they occur in the array. The iteratee is invoked with one argument:\n     * (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n     * // => [2.1, 1.2]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 1 }, { 'x': 2 }]\n     */\n    function uniqBy(array, iteratee) {\n      return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];\n    }\n\n    /**\n     * This method is like `_.uniq` except that it accepts `comparator` which\n     * is invoked to compare elements of `array`. The order of result values is\n     * determined by the order they occur in the array.The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new duplicate free array.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.uniqWith(objects, _.isEqual);\n     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]\n     */\n    function uniqWith(array, comparator) {\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return (array && array.length) ? baseUniq(array, undefined, comparator) : [];\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts an array of grouped\n     * elements and creates an array regrouping the elements to their pre-zip\n     * configuration.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.2.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     *\n     * _.unzip(zipped);\n     * // => [['a', 'b'], [1, 2], [true, false]]\n     */\n    function unzip(array) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var length = 0;\n      array = arrayFilter(array, function(group) {\n        if (isArrayLikeObject(group)) {\n          length = nativeMax(group.length, length);\n          return true;\n        }\n      });\n      return baseTimes(length, function(index) {\n        return arrayMap(array, baseProperty(index));\n      });\n    }\n\n    /**\n     * This method is like `_.unzip` except that it accepts `iteratee` to specify\n     * how regrouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {Array} array The array of grouped elements to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  regrouped values.\n     * @returns {Array} Returns the new array of regrouped elements.\n     * @example\n     *\n     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);\n     * // => [[1, 10, 100], [2, 20, 200]]\n     *\n     * _.unzipWith(zipped, _.add);\n     * // => [3, 30, 300]\n     */\n    function unzipWith(array, iteratee) {\n      if (!(array && array.length)) {\n        return [];\n      }\n      var result = unzip(array);\n      if (iteratee == null) {\n        return result;\n      }\n      return arrayMap(result, function(group) {\n        return apply(iteratee, undefined, group);\n      });\n    }\n\n    /**\n     * Creates an array excluding all given values using\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * for equality comparisons.\n     *\n     * **Note:** Unlike `_.pull`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {Array} array The array to inspect.\n     * @param {...*} [values] The values to exclude.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.xor\n     * @example\n     *\n     * _.without([2, 1, 2, 3], 1, 2);\n     * // => [3]\n     */\n    var without = baseRest(function(array, values) {\n      return isArrayLikeObject(array)\n        ? baseDifference(array, values)\n        : [];\n    });\n\n    /**\n     * Creates an array of unique values that is the\n     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)\n     * of the given arrays. The order of result values is determined by the order\n     * they occur in the arrays.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @returns {Array} Returns the new array of filtered values.\n     * @see _.difference, _.without\n     * @example\n     *\n     * _.xor([2, 1], [2, 3]);\n     * // => [1, 3]\n     */\n    var xor = baseRest(function(arrays) {\n      return baseXor(arrayFilter(arrays, isArrayLikeObject));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `iteratee` which is\n     * invoked for each element of each `arrays` to generate the criterion by\n     * which by which they're compared. The order of result values is determined\n     * by the order they occur in the arrays. The iteratee is invoked with one\n     * argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);\n     * // => [1.2, 3.4]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');\n     * // => [{ 'x': 2 }]\n     */\n    var xorBy = baseRest(function(arrays) {\n      var iteratee = last(arrays);\n      if (isArrayLikeObject(iteratee)) {\n        iteratee = undefined;\n      }\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));\n    });\n\n    /**\n     * This method is like `_.xor` except that it accepts `comparator` which is\n     * invoked to compare elements of `arrays`. The order of result values is\n     * determined by the order they occur in the arrays. The comparator is invoked\n     * with two arguments: (arrVal, othVal).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to inspect.\n     * @param {Function} [comparator] The comparator invoked per element.\n     * @returns {Array} Returns the new array of filtered values.\n     * @example\n     *\n     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];\n     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];\n     *\n     * _.xorWith(objects, others, _.isEqual);\n     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]\n     */\n    var xorWith = baseRest(function(arrays) {\n      var comparator = last(arrays);\n      comparator = typeof comparator == 'function' ? comparator : undefined;\n      return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);\n    });\n\n    /**\n     * Creates an array of grouped elements, the first of which contains the\n     * first elements of the given arrays, the second of which contains the\n     * second elements of the given arrays, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zip(['a', 'b'], [1, 2], [true, false]);\n     * // => [['a', 1, true], ['b', 2, false]]\n     */\n    var zip = baseRest(unzip);\n\n    /**\n     * This method is like `_.fromPairs` except that it accepts two arrays,\n     * one of property identifiers and one of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.4.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObject(['a', 'b'], [1, 2]);\n     * // => { 'a': 1, 'b': 2 }\n     */\n    function zipObject(props, values) {\n      return baseZipObject(props || [], values || [], assignValue);\n    }\n\n    /**\n     * This method is like `_.zipObject` except that it supports property paths.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Array\n     * @param {Array} [props=[]] The property identifiers.\n     * @param {Array} [values=[]] The property values.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);\n     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }\n     */\n    function zipObjectDeep(props, values) {\n      return baseZipObject(props || [], values || [], baseSet);\n    }\n\n    /**\n     * This method is like `_.zip` except that it accepts `iteratee` to specify\n     * how grouped values should be combined. The iteratee is invoked with the\n     * elements of each group: (...group).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Array\n     * @param {...Array} [arrays] The arrays to process.\n     * @param {Function} [iteratee=_.identity] The function to combine\n     *  grouped values.\n     * @returns {Array} Returns the new array of grouped elements.\n     * @example\n     *\n     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {\n     *   return a + b + c;\n     * });\n     * // => [111, 222]\n     */\n    var zipWith = baseRest(function(arrays) {\n      var length = arrays.length,\n          iteratee = length > 1 ? arrays[length - 1] : undefined;\n\n      iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;\n      return unzipWith(arrays, iteratee);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates a `lodash` wrapper instance that wraps `value` with explicit method\n     * chain sequences enabled. The result of such sequences must be unwrapped\n     * with `_#value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Seq\n     * @param {*} value The value to wrap.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36 },\n     *   { 'user': 'fred',    'age': 40 },\n     *   { 'user': 'pebbles', 'age': 1 }\n     * ];\n     *\n     * var youngest = _\n     *   .chain(users)\n     *   .sortBy('age')\n     *   .map(function(o) {\n     *     return o.user + ' is ' + o.age;\n     *   })\n     *   .head()\n     *   .value();\n     * // => 'pebbles is 1'\n     */\n    function chain(value) {\n      var result = lodash(value);\n      result.__chain__ = true;\n      return result;\n    }\n\n    /**\n     * This method invokes `interceptor` and returns `value`. The interceptor\n     * is invoked with one argument; (value). The purpose of this method is to\n     * \"tap into\" a method chain sequence in order to modify intermediate results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * _([1, 2, 3])\n     *  .tap(function(array) {\n     *    // Mutate input array.\n     *    array.pop();\n     *  })\n     *  .reverse()\n     *  .value();\n     * // => [2, 1]\n     */\n    function tap(value, interceptor) {\n      interceptor(value);\n      return value;\n    }\n\n    /**\n     * This method is like `_.tap` except that it returns the result of `interceptor`.\n     * The purpose of this method is to \"pass thru\" values replacing intermediate\n     * results in a method chain sequence.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Seq\n     * @param {*} value The value to provide to `interceptor`.\n     * @param {Function} interceptor The function to invoke.\n     * @returns {*} Returns the result of `interceptor`.\n     * @example\n     *\n     * _('  abc  ')\n     *  .chain()\n     *  .trim()\n     *  .thru(function(value) {\n     *    return [value];\n     *  })\n     *  .value();\n     * // => ['abc']\n     */\n    function thru(value, interceptor) {\n      return interceptor(value);\n    }\n\n    /**\n     * This method is the wrapper version of `_.at`.\n     *\n     * @name at\n     * @memberOf _\n     * @since 1.0.0\n     * @category Seq\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _(object).at(['a[0].b.c', 'a[1]']).value();\n     * // => [3, 4]\n     */\n    var wrapperAt = flatRest(function(paths) {\n      var length = paths.length,\n          start = length ? paths[0] : 0,\n          value = this.__wrapped__,\n          interceptor = function(object) { return baseAt(object, paths); };\n\n      if (length > 1 || this.__actions__.length ||\n          !(value instanceof LazyWrapper) || !isIndex(start)) {\n        return this.thru(interceptor);\n      }\n      value = value.slice(start, +start + (length ? 1 : 0));\n      value.__actions__.push({\n        'func': thru,\n        'args': [interceptor],\n        'thisArg': undefined\n      });\n      return new LodashWrapper(value, this.__chain__).thru(function(array) {\n        if (length && !array.length) {\n          array.push(undefined);\n        }\n        return array;\n      });\n    });\n\n    /**\n     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\n     *\n     * @name chain\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 40 }\n     * ];\n     *\n     * // A sequence without explicit chaining.\n     * _(users).head();\n     * // => { 'user': 'barney', 'age': 36 }\n     *\n     * // A sequence with explicit chaining.\n     * _(users)\n     *   .chain()\n     *   .head()\n     *   .pick('user')\n     *   .value();\n     * // => { 'user': 'barney' }\n     */\n    function wrapperChain() {\n      return chain(this);\n    }\n\n    /**\n     * Executes the chain sequence and returns the wrapped result.\n     *\n     * @name commit\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2];\n     * var wrapped = _(array).push(3);\n     *\n     * console.log(array);\n     * // => [1, 2]\n     *\n     * wrapped = wrapped.commit();\n     * console.log(array);\n     * // => [1, 2, 3]\n     *\n     * wrapped.last();\n     * // => 3\n     *\n     * console.log(array);\n     * // => [1, 2, 3]\n     */\n    function wrapperCommit() {\n      return new LodashWrapper(this.value(), this.__chain__);\n    }\n\n    /**\n     * Gets the next value on a wrapped object following the\n     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\n     *\n     * @name next\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the next iterator value.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 1 }\n     *\n     * wrapped.next();\n     * // => { 'done': false, 'value': 2 }\n     *\n     * wrapped.next();\n     * // => { 'done': true, 'value': undefined }\n     */\n    function wrapperNext() {\n      if (this.__values__ === undefined) {\n        this.__values__ = toArray(this.value());\n      }\n      var done = this.__index__ >= this.__values__.length,\n          value = done ? undefined : this.__values__[this.__index__++];\n\n      return { 'done': done, 'value': value };\n    }\n\n    /**\n     * Enables the wrapper to be iterable.\n     *\n     * @name Symbol.iterator\n     * @memberOf _\n     * @since 4.0.0\n     * @category Seq\n     * @returns {Object} Returns the wrapper object.\n     * @example\n     *\n     * var wrapped = _([1, 2]);\n     *\n     * wrapped[Symbol.iterator]() === wrapped;\n     * // => true\n     *\n     * Array.from(wrapped);\n     * // => [1, 2]\n     */\n    function wrapperToIterator() {\n      return this;\n    }\n\n    /**\n     * Creates a clone of the chain sequence planting `value` as the wrapped value.\n     *\n     * @name plant\n     * @memberOf _\n     * @since 3.2.0\n     * @category Seq\n     * @param {*} value The value to plant.\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var wrapped = _([1, 2]).map(square);\n     * var other = wrapped.plant([3, 4]);\n     *\n     * other.value();\n     * // => [9, 16]\n     *\n     * wrapped.value();\n     * // => [1, 4]\n     */\n    function wrapperPlant(value) {\n      var result,\n          parent = this;\n\n      while (parent instanceof baseLodash) {\n        var clone = wrapperClone(parent);\n        clone.__index__ = 0;\n        clone.__values__ = undefined;\n        if (result) {\n          previous.__wrapped__ = clone;\n        } else {\n          result = clone;\n        }\n        var previous = clone;\n        parent = parent.__wrapped__;\n      }\n      previous.__wrapped__ = value;\n      return result;\n    }\n\n    /**\n     * This method is the wrapper version of `_.reverse`.\n     *\n     * **Note:** This method mutates the wrapped array.\n     *\n     * @name reverse\n     * @memberOf _\n     * @since 0.1.0\n     * @category Seq\n     * @returns {Object} Returns the new `lodash` wrapper instance.\n     * @example\n     *\n     * var array = [1, 2, 3];\n     *\n     * _(array).reverse().value()\n     * // => [3, 2, 1]\n     *\n     * console.log(array);\n     * // => [3, 2, 1]\n     */\n    function wrapperReverse() {\n      var value = this.__wrapped__;\n      if (value instanceof LazyWrapper) {\n        var wrapped = value;\n        if (this.__actions__.length) {\n          wrapped = new LazyWrapper(this);\n        }\n        wrapped = wrapped.reverse();\n        wrapped.__actions__.push({\n          'func': thru,\n          'args': [reverse],\n          'thisArg': undefined\n        });\n        return new LodashWrapper(wrapped, this.__chain__);\n      }\n      return this.thru(reverse);\n    }\n\n    /**\n     * Executes the chain sequence to resolve the unwrapped value.\n     *\n     * @name value\n     * @memberOf _\n     * @since 0.1.0\n     * @alias toJSON, valueOf\n     * @category Seq\n     * @returns {*} Returns the resolved unwrapped value.\n     * @example\n     *\n     * _([1, 2, 3]).value();\n     * // => [1, 2, 3]\n     */\n    function wrapperValue() {\n      return baseWrapperValue(this.__wrapped__, this.__actions__);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the number of times the key was returned by `iteratee`. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.countBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': 1, '6': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.countBy(['one', 'two', 'three'], 'length');\n     * // => { '3': 2, '5': 1 }\n     */\n    var countBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        ++result[key];\n      } else {\n        baseAssignValue(result, key, 1);\n      }\n    });\n\n    /**\n     * Checks if `predicate` returns truthy for **all** elements of `collection`.\n     * Iteration is stopped once `predicate` returns falsey. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * **Note:** This method returns `true` for\n     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n     * elements of empty collections.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if all elements pass the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.every([true, 1, null, 'yes'], Boolean);\n     * // => false\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.every(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.every(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.every(users, 'active');\n     * // => false\n     */\n    function every(collection, predicate, guard) {\n      var func = isArray(collection) ? arrayEvery : baseEvery;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning an array of all elements\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * **Note:** Unlike `_.remove`, this method returns a new array.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.reject\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * _.filter(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, { 'age': 36, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.filter(users, 'active');\n     * // => objects for ['barney']\n     *\n     * // Combining several predicates using `_.overEvery` or `_.overSome`.\n     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n     * // => objects for ['fred', 'barney']\n     */\n    function filter(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Iterates over elements of `collection`, returning the first element\n     * `predicate` returns truthy for. The predicate is invoked with three\n     * arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': true },\n     *   { 'user': 'fred',    'age': 40, 'active': false },\n     *   { 'user': 'pebbles', 'age': 1,  'active': true }\n     * ];\n     *\n     * _.find(users, function(o) { return o.age < 40; });\n     * // => object for 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.find(users, { 'age': 1, 'active': true });\n     * // => object for 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.find(users, ['active', false]);\n     * // => object for 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.find(users, 'active');\n     * // => object for 'barney'\n     */\n    var find = createFind(findIndex);\n\n    /**\n     * This method is like `_.find` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param {number} [fromIndex=collection.length-1] The index to search from.\n     * @returns {*} Returns the matched element, else `undefined`.\n     * @example\n     *\n     * _.findLast([1, 2, 3, 4], function(n) {\n     *   return n % 2 == 1;\n     * });\n     * // => 3\n     */\n    var findLast = createFind(findLastIndex);\n\n    /**\n     * Creates a flattened array of values by running each element in `collection`\n     * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n     * with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [n, n];\n     * }\n     *\n     * _.flatMap([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMap(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), 1);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDeep([1, 2], duplicate);\n     * // => [1, 1, 2, 2]\n     */\n    function flatMapDeep(collection, iteratee) {\n      return baseFlatten(map(collection, iteratee), INFINITY);\n    }\n\n    /**\n     * This method is like `_.flatMap` except that it recursively flattens the\n     * mapped results up to `depth` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {number} [depth=1] The maximum recursion depth.\n     * @returns {Array} Returns the new flattened array.\n     * @example\n     *\n     * function duplicate(n) {\n     *   return [[[n, n]]];\n     * }\n     *\n     * _.flatMapDepth([1, 2], duplicate, 2);\n     * // => [[1, 1], [2, 2]]\n     */\n    function flatMapDepth(collection, iteratee, depth) {\n      depth = depth === undefined ? 1 : toInteger(depth);\n      return baseFlatten(map(collection, iteratee), depth);\n    }\n\n    /**\n     * Iterates over elements of `collection` and invokes `iteratee` for each element.\n     * The iteratee is invoked with three arguments: (value, index|key, collection).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n     * property are iterated like arrays. To avoid this behavior use `_.forIn`\n     * or `_.forOwn` for object iteration.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @alias each\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEachRight\n     * @example\n     *\n     * _.forEach([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `1` then `2`.\n     *\n     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forEach(collection, iteratee) {\n      var func = isArray(collection) ? arrayEach : baseEach;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forEach` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @alias eachRight\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array|Object} Returns `collection`.\n     * @see _.forEach\n     * @example\n     *\n     * _.forEachRight([1, 2], function(value) {\n     *   console.log(value);\n     * });\n     * // => Logs `2` then `1`.\n     */\n    function forEachRight(collection, iteratee) {\n      var func = isArray(collection) ? arrayEachRight : baseEachRight;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The order of grouped values\n     * is determined by the order they occur in `collection`. The corresponding\n     * value of each key is an array of elements responsible for generating the\n     * key. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * _.groupBy([6.1, 4.2, 6.3], Math.floor);\n     * // => { '4': [4.2], '6': [6.1, 6.3] }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.groupBy(['one', 'two', 'three'], 'length');\n     * // => { '3': ['one', 'two'], '5': ['three'] }\n     */\n    var groupBy = createAggregator(function(result, value, key) {\n      if (hasOwnProperty.call(result, key)) {\n        result[key].push(value);\n      } else {\n        baseAssignValue(result, key, [value]);\n      }\n    });\n\n    /**\n     * Checks if `value` is in `collection`. If `collection` is a string, it's\n     * checked for a substring of `value`, otherwise\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * is used for equality comparisons. If `fromIndex` is negative, it's used as\n     * the offset from the end of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @param {*} value The value to search for.\n     * @param {number} [fromIndex=0] The index to search from.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {boolean} Returns `true` if `value` is found, else `false`.\n     * @example\n     *\n     * _.includes([1, 2, 3], 1);\n     * // => true\n     *\n     * _.includes([1, 2, 3], 1, 2);\n     * // => false\n     *\n     * _.includes({ 'a': 1, 'b': 2 }, 1);\n     * // => true\n     *\n     * _.includes('abcd', 'bc');\n     * // => true\n     */\n    function includes(collection, value, fromIndex, guard) {\n      collection = isArrayLike(collection) ? collection : values(collection);\n      fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n      var length = collection.length;\n      if (fromIndex < 0) {\n        fromIndex = nativeMax(length + fromIndex, 0);\n      }\n      return isString(collection)\n        ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n        : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n    }\n\n    /**\n     * Invokes the method at `path` of each element in `collection`, returning\n     * an array of the results of each invoked method. Any additional arguments\n     * are provided to each invoked method. If `path` is a function, it's invoked\n     * for, and `this` bound to, each element in `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array|Function|string} path The path of the method to invoke or\n     *  the function invoked per iteration.\n     * @param {...*} [args] The arguments to invoke each method with.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');\n     * // => [[1, 5, 7], [1, 2, 3]]\n     *\n     * _.invokeMap([123, 456], String.prototype.split, '');\n     * // => [['1', '2', '3'], ['4', '5', '6']]\n     */\n    var invokeMap = baseRest(function(collection, path, args) {\n      var index = -1,\n          isFunc = typeof path == 'function',\n          result = isArrayLike(collection) ? Array(collection.length) : [];\n\n      baseEach(collection, function(value) {\n        result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);\n      });\n      return result;\n    });\n\n    /**\n     * Creates an object composed of keys generated from the results of running\n     * each element of `collection` thru `iteratee`. The corresponding value of\n     * each key is the last element responsible for generating the key. The\n     * iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n     * @returns {Object} Returns the composed aggregate object.\n     * @example\n     *\n     * var array = [\n     *   { 'dir': 'left', 'code': 97 },\n     *   { 'dir': 'right', 'code': 100 }\n     * ];\n     *\n     * _.keyBy(array, function(o) {\n     *   return String.fromCharCode(o.code);\n     * });\n     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }\n     *\n     * _.keyBy(array, 'dir');\n     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }\n     */\n    var keyBy = createAggregator(function(result, value, key) {\n      baseAssignValue(result, key, value);\n    });\n\n    /**\n     * Creates an array of values by running each element in `collection` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n     *\n     * The guarded methods are:\n     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new mapped array.\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * _.map([4, 8], square);\n     * // => [16, 64]\n     *\n     * _.map({ 'a': 4, 'b': 8 }, square);\n     * // => [16, 64] (iteration order is not guaranteed)\n     *\n     * var users = [\n     *   { 'user': 'barney' },\n     *   { 'user': 'fred' }\n     * ];\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, 'user');\n     * // => ['barney', 'fred']\n     */\n    function map(collection, iteratee) {\n      var func = isArray(collection) ? arrayMap : baseMap;\n      return func(collection, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.sortBy` except that it allows specifying the sort\n     * orders of the iteratees to sort by. If `orders` is unspecified, all values\n     * are sorted in ascending order. Otherwise, specify an order of \"desc\" for\n     * descending or \"asc\" for ascending sort order of corresponding values.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @param {string[]} [orders] The sort orders of `iteratees`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 34 },\n     *   { 'user': 'fred',   'age': 40 },\n     *   { 'user': 'barney', 'age': 36 }\n     * ];\n     *\n     * // Sort by `user` in ascending order and by `age` in descending order.\n     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n     */\n    function orderBy(collection, iteratees, orders, guard) {\n      if (collection == null) {\n        return [];\n      }\n      if (!isArray(iteratees)) {\n        iteratees = iteratees == null ? [] : [iteratees];\n      }\n      orders = guard ? undefined : orders;\n      if (!isArray(orders)) {\n        orders = orders == null ? [] : [orders];\n      }\n      return baseOrderBy(collection, iteratees, orders);\n    }\n\n    /**\n     * Creates an array of elements split into two groups, the first of which\n     * contains elements `predicate` returns truthy for, the second of which\n     * contains elements `predicate` returns falsey for. The predicate is\n     * invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of grouped elements.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney',  'age': 36, 'active': false },\n     *   { 'user': 'fred',    'age': 40, 'active': true },\n     *   { 'user': 'pebbles', 'age': 1,  'active': false }\n     * ];\n     *\n     * _.partition(users, function(o) { return o.active; });\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.partition(users, { 'age': 1, 'active': false });\n     * // => objects for [['pebbles'], ['barney', 'fred']]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.partition(users, ['active', false]);\n     * // => objects for [['barney', 'pebbles'], ['fred']]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.partition(users, 'active');\n     * // => objects for [['fred'], ['barney', 'pebbles']]\n     */\n    var partition = createAggregator(function(result, value, key) {\n      result[key ? 0 : 1].push(value);\n    }, function() { return [[], []]; });\n\n    /**\n     * Reduces `collection` to a value which is the accumulated result of running\n     * each element in `collection` thru `iteratee`, where each successive\n     * invocation is supplied the return value of the previous. If `accumulator`\n     * is not given, the first element of `collection` is used as the initial\n     * value. The iteratee is invoked with four arguments:\n     * (accumulator, value, index|key, collection).\n     *\n     * Many lodash methods are guarded to work as iteratees for methods like\n     * `_.reduce`, `_.reduceRight`, and `_.transform`.\n     *\n     * The guarded methods are:\n     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\n     * and `sortBy`\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduceRight\n     * @example\n     *\n     * _.reduce([1, 2], function(sum, n) {\n     *   return sum + n;\n     * }, 0);\n     * // => 3\n     *\n     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     *   return result;\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\n     */\n    function reduce(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduce : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);\n    }\n\n    /**\n     * This method is like `_.reduce` except that it iterates over elements of\n     * `collection` from right to left.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The initial value.\n     * @returns {*} Returns the accumulated value.\n     * @see _.reduce\n     * @example\n     *\n     * var array = [[0, 1], [2, 3], [4, 5]];\n     *\n     * _.reduceRight(array, function(flattened, other) {\n     *   return flattened.concat(other);\n     * }, []);\n     * // => [4, 5, 2, 3, 0, 1]\n     */\n    function reduceRight(collection, iteratee, accumulator) {\n      var func = isArray(collection) ? arrayReduceRight : baseReduce,\n          initAccum = arguments.length < 3;\n\n      return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);\n    }\n\n    /**\n     * The opposite of `_.filter`; this method returns the elements of `collection`\n     * that `predicate` does **not** return truthy for.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the new filtered array.\n     * @see _.filter\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': false },\n     *   { 'user': 'fred',   'age': 40, 'active': true }\n     * ];\n     *\n     * _.reject(users, function(o) { return !o.active; });\n     * // => objects for ['fred']\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.reject(users, { 'age': 40, 'active': true });\n     * // => objects for ['barney']\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.reject(users, ['active', false]);\n     * // => objects for ['fred']\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.reject(users, 'active');\n     * // => objects for ['barney']\n     */\n    function reject(collection, predicate) {\n      var func = isArray(collection) ? arrayFilter : baseFilter;\n      return func(collection, negate(getIteratee(predicate, 3)));\n    }\n\n    /**\n     * Gets a random element from `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @returns {*} Returns the random element.\n     * @example\n     *\n     * _.sample([1, 2, 3, 4]);\n     * // => 2\n     */\n    function sample(collection) {\n      var func = isArray(collection) ? arraySample : baseSample;\n      return func(collection);\n    }\n\n    /**\n     * Gets `n` random elements at unique keys from `collection` up to the\n     * size of `collection`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to sample.\n     * @param {number} [n=1] The number of elements to sample.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the random elements.\n     * @example\n     *\n     * _.sampleSize([1, 2, 3], 2);\n     * // => [3, 1]\n     *\n     * _.sampleSize([1, 2, 3], 4);\n     * // => [2, 3, 1]\n     */\n    function sampleSize(collection, n, guard) {\n      if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      var func = isArray(collection) ? arraySampleSize : baseSampleSize;\n      return func(collection, n);\n    }\n\n    /**\n     * Creates an array of shuffled values, using a version of the\n     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to shuffle.\n     * @returns {Array} Returns the new shuffled array.\n     * @example\n     *\n     * _.shuffle([1, 2, 3, 4]);\n     * // => [4, 1, 3, 2]\n     */\n    function shuffle(collection) {\n      var func = isArray(collection) ? arrayShuffle : baseShuffle;\n      return func(collection);\n    }\n\n    /**\n     * Gets the size of `collection` by returning its length for array-like\n     * values or the number of own enumerable string keyed properties for objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object|string} collection The collection to inspect.\n     * @returns {number} Returns the collection size.\n     * @example\n     *\n     * _.size([1, 2, 3]);\n     * // => 3\n     *\n     * _.size({ 'a': 1, 'b': 2 });\n     * // => 2\n     *\n     * _.size('pebbles');\n     * // => 7\n     */\n    function size(collection) {\n      if (collection == null) {\n        return 0;\n      }\n      if (isArrayLike(collection)) {\n        return isString(collection) ? stringSize(collection) : collection.length;\n      }\n      var tag = getTag(collection);\n      if (tag == mapTag || tag == setTag) {\n        return collection.size;\n      }\n      return baseKeys(collection).length;\n    }\n\n    /**\n     * Checks if `predicate` returns truthy for **any** element of `collection`.\n     * Iteration is stopped once `predicate` returns truthy. The predicate is\n     * invoked with three arguments: (value, index|key, collection).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {boolean} Returns `true` if any element passes the predicate check,\n     *  else `false`.\n     * @example\n     *\n     * _.some([null, 0, 'yes', false], Boolean);\n     * // => true\n     *\n     * var users = [\n     *   { 'user': 'barney', 'active': true },\n     *   { 'user': 'fred',   'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.some(users, { 'user': 'barney', 'active': false });\n     * // => false\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.some(users, ['active', false]);\n     * // => true\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.some(users, 'active');\n     * // => true\n     */\n    function some(collection, predicate, guard) {\n      var func = isArray(collection) ? arraySome : baseSome;\n      if (guard && isIterateeCall(collection, predicate, guard)) {\n        predicate = undefined;\n      }\n      return func(collection, getIteratee(predicate, 3));\n    }\n\n    /**\n     * Creates an array of elements, sorted in ascending order by the results of\n     * running each element in a collection thru each iteratee. This method\n     * performs a stable sort, that is, it preserves the original sort order of\n     * equal elements. The iteratees are invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Collection\n     * @param {Array|Object} collection The collection to iterate over.\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to sort by.\n     * @returns {Array} Returns the new sorted array.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'fred',   'age': 48 },\n     *   { 'user': 'barney', 'age': 36 },\n     *   { 'user': 'fred',   'age': 30 },\n     *   { 'user': 'barney', 'age': 34 }\n     * ];\n     *\n     * _.sortBy(users, [function(o) { return o.user; }]);\n     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]\n     *\n     * _.sortBy(users, ['user', 'age']);\n     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]\n     */\n    var sortBy = baseRest(function(collection, iteratees) {\n      if (collection == null) {\n        return [];\n      }\n      var length = iteratees.length;\n      if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n        iteratees = [];\n      } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n        iteratees = [iteratees[0]];\n      }\n      return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n    });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Gets the timestamp of the number of milliseconds that have elapsed since\n     * the Unix epoch (1 January 1970 00:00:00 UTC).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Date\n     * @returns {number} Returns the timestamp.\n     * @example\n     *\n     * _.defer(function(stamp) {\n     *   console.log(_.now() - stamp);\n     * }, _.now());\n     * // => Logs the number of milliseconds it took for the deferred invocation.\n     */\n    var now = ctxNow || function() {\n      return root.Date.now();\n    };\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The opposite of `_.before`; this method creates a function that invokes\n     * `func` once it's called `n` or more times.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {number} n The number of calls before `func` is invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var saves = ['profile', 'settings'];\n     *\n     * var done = _.after(saves.length, function() {\n     *   console.log('done saving!');\n     * });\n     *\n     * _.forEach(saves, function(type) {\n     *   asyncSave({ 'type': type, 'complete': done });\n     * });\n     * // => Logs 'done saving!' after the two async saves have completed.\n     */\n    function after(n, func) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n < 1) {\n          return func.apply(this, arguments);\n        }\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func`, with up to `n` arguments,\n     * ignoring any additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @param {number} [n=func.length] The arity cap.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.ary(parseInt, 1));\n     * // => [6, 8, 10]\n     */\n    function ary(func, n, guard) {\n      n = guard ? undefined : n;\n      n = (func && n == null) ? func.length : n;\n      return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);\n    }\n\n    /**\n     * Creates a function that invokes `func`, with the `this` binding and arguments\n     * of the created function, while it's called less than `n` times. Subsequent\n     * calls to the created function return the result of the last `func` invocation.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {number} n The number of calls at which `func` is no longer invoked.\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * jQuery(element).on('click', _.before(5, addContactToList));\n     * // => Allows adding up to 4 contacts to the list.\n     */\n    function before(n, func) {\n      var result;\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      n = toInteger(n);\n      return function() {\n        if (--n > 0) {\n          result = func.apply(this, arguments);\n        }\n        if (n <= 1) {\n          func = undefined;\n        }\n        return result;\n      };\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of `thisArg`\n     * and `partials` prepended to the arguments it receives.\n     *\n     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\n     * property of bound functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to bind.\n     * @param {*} thisArg The `this` binding of `func`.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * function greet(greeting, punctuation) {\n     *   return greeting + ' ' + this.user + punctuation;\n     * }\n     *\n     * var object = { 'user': 'fred' };\n     *\n     * var bound = _.bind(greet, object, 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bind(greet, object, _, '!');\n     * bound('hi');\n     * // => 'hi fred!'\n     */\n    var bind = baseRest(function(func, thisArg, partials) {\n      var bitmask = WRAP_BIND_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bind));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(func, bitmask, thisArg, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes the method at `object[key]` with `partials`\n     * prepended to the arguments it receives.\n     *\n     * This method differs from `_.bind` by allowing bound functions to reference\n     * methods that may be redefined or don't yet exist. See\n     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)\n     * for more details.\n     *\n     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Function\n     * @param {Object} object The object to invoke the method on.\n     * @param {string} key The key of the method.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new bound function.\n     * @example\n     *\n     * var object = {\n     *   'user': 'fred',\n     *   'greet': function(greeting, punctuation) {\n     *     return greeting + ' ' + this.user + punctuation;\n     *   }\n     * };\n     *\n     * var bound = _.bindKey(object, 'greet', 'hi');\n     * bound('!');\n     * // => 'hi fred!'\n     *\n     * object.greet = function(greeting, punctuation) {\n     *   return greeting + 'ya ' + this.user + punctuation;\n     * };\n     *\n     * bound('!');\n     * // => 'hiya fred!'\n     *\n     * // Bound with placeholders.\n     * var bound = _.bindKey(object, 'greet', _, '!');\n     * bound('hi');\n     * // => 'hiya fred!'\n     */\n    var bindKey = baseRest(function(object, key, partials) {\n      var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;\n      if (partials.length) {\n        var holders = replaceHolders(partials, getHolder(bindKey));\n        bitmask |= WRAP_PARTIAL_FLAG;\n      }\n      return createWrap(key, bitmask, object, partials, holders);\n    });\n\n    /**\n     * Creates a function that accepts arguments of `func` and either invokes\n     * `func` returning its result, if at least `arity` number of arguments have\n     * been provided, or returns a function that accepts the remaining `func`\n     * arguments, and so on. The arity of `func` may be specified if `func.length`\n     * is not sufficient.\n     *\n     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,\n     * may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curry(abc);\n     *\n     * curried(1)(2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2)(3);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(1)(_, 3)(2);\n     * // => [1, 2, 3]\n     */\n    function curry(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curry.placeholder;\n      return result;\n    }\n\n    /**\n     * This method is like `_.curry` except that arguments are applied to `func`\n     * in the manner of `_.partialRight` instead of `_.partial`.\n     *\n     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for provided arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of curried functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to curry.\n     * @param {number} [arity=func.length] The arity of `func`.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the new curried function.\n     * @example\n     *\n     * var abc = function(a, b, c) {\n     *   return [a, b, c];\n     * };\n     *\n     * var curried = _.curryRight(abc);\n     *\n     * curried(3)(2)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(2, 3)(1);\n     * // => [1, 2, 3]\n     *\n     * curried(1, 2, 3);\n     * // => [1, 2, 3]\n     *\n     * // Curried with placeholders.\n     * curried(3)(1, _)(2);\n     * // => [1, 2, 3]\n     */\n    function curryRight(func, arity, guard) {\n      arity = guard ? undefined : arity;\n      var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);\n      result.placeholder = curryRight.placeholder;\n      return result;\n    }\n\n    /**\n     * Creates a debounced function that delays invoking `func` until after `wait`\n     * milliseconds have elapsed since the last time the debounced function was\n     * invoked. The debounced function comes with a `cancel` method to cancel\n     * delayed `func` invocations and a `flush` method to immediately invoke them.\n     * Provide `options` to indicate whether `func` should be invoked on the\n     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n     * with the last arguments provided to the debounced function. Subsequent\n     * calls to the debounced function return the result of the last `func`\n     * invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the debounced function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.debounce` and `_.throttle`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to debounce.\n     * @param {number} [wait=0] The number of milliseconds to delay.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=false]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {number} [options.maxWait]\n     *  The maximum time `func` is allowed to be delayed before it's invoked.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new debounced function.\n     * @example\n     *\n     * // Avoid costly calculations while the window size is in flux.\n     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n     *\n     * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n     * jQuery(element).on('click', _.debounce(sendMail, 300, {\n     *   'leading': true,\n     *   'trailing': false\n     * }));\n     *\n     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n     * var source = new EventSource('/stream');\n     * jQuery(source).on('message', debounced);\n     *\n     * // Cancel the trailing debounced invocation.\n     * jQuery(window).on('popstate', debounced.cancel);\n     */\n    function debounce(func, wait, options) {\n      var lastArgs,\n          lastThis,\n          maxWait,\n          result,\n          timerId,\n          lastCallTime,\n          lastInvokeTime = 0,\n          leading = false,\n          maxing = false,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      wait = toNumber(wait) || 0;\n      if (isObject(options)) {\n        leading = !!options.leading;\n        maxing = 'maxWait' in options;\n        maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n\n      function invokeFunc(time) {\n        var args = lastArgs,\n            thisArg = lastThis;\n\n        lastArgs = lastThis = undefined;\n        lastInvokeTime = time;\n        result = func.apply(thisArg, args);\n        return result;\n      }\n\n      function leadingEdge(time) {\n        // Reset any `maxWait` timer.\n        lastInvokeTime = time;\n        // Start the timer for the trailing edge.\n        timerId = setTimeout(timerExpired, wait);\n        // Invoke the leading edge.\n        return leading ? invokeFunc(time) : result;\n      }\n\n      function remainingWait(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime,\n            timeWaiting = wait - timeSinceLastCall;\n\n        return maxing\n          ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n          : timeWaiting;\n      }\n\n      function shouldInvoke(time) {\n        var timeSinceLastCall = time - lastCallTime,\n            timeSinceLastInvoke = time - lastInvokeTime;\n\n        // Either this is the first call, activity has stopped and we're at the\n        // trailing edge, the system time has gone backwards and we're treating\n        // it as the trailing edge, or we've hit the `maxWait` limit.\n        return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n          (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n      }\n\n      function timerExpired() {\n        var time = now();\n        if (shouldInvoke(time)) {\n          return trailingEdge(time);\n        }\n        // Restart the timer.\n        timerId = setTimeout(timerExpired, remainingWait(time));\n      }\n\n      function trailingEdge(time) {\n        timerId = undefined;\n\n        // Only invoke if we have `lastArgs` which means `func` has been\n        // debounced at least once.\n        if (trailing && lastArgs) {\n          return invokeFunc(time);\n        }\n        lastArgs = lastThis = undefined;\n        return result;\n      }\n\n      function cancel() {\n        if (timerId !== undefined) {\n          clearTimeout(timerId);\n        }\n        lastInvokeTime = 0;\n        lastArgs = lastCallTime = lastThis = timerId = undefined;\n      }\n\n      function flush() {\n        return timerId === undefined ? result : trailingEdge(now());\n      }\n\n      function debounced() {\n        var time = now(),\n            isInvoking = shouldInvoke(time);\n\n        lastArgs = arguments;\n        lastThis = this;\n        lastCallTime = time;\n\n        if (isInvoking) {\n          if (timerId === undefined) {\n            return leadingEdge(lastCallTime);\n          }\n          if (maxing) {\n            // Handle invocations in a tight loop.\n            clearTimeout(timerId);\n            timerId = setTimeout(timerExpired, wait);\n            return invokeFunc(lastCallTime);\n          }\n        }\n        if (timerId === undefined) {\n          timerId = setTimeout(timerExpired, wait);\n        }\n        return result;\n      }\n      debounced.cancel = cancel;\n      debounced.flush = flush;\n      return debounced;\n    }\n\n    /**\n     * Defers invoking the `func` until the current call stack has cleared. Any\n     * additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to defer.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.defer(function(text) {\n     *   console.log(text);\n     * }, 'deferred');\n     * // => Logs 'deferred' after one millisecond.\n     */\n    var defer = baseRest(function(func, args) {\n      return baseDelay(func, 1, args);\n    });\n\n    /**\n     * Invokes `func` after `wait` milliseconds. Any additional arguments are\n     * provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to delay.\n     * @param {number} wait The number of milliseconds to delay invocation.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {number} Returns the timer id.\n     * @example\n     *\n     * _.delay(function(text) {\n     *   console.log(text);\n     * }, 1000, 'later');\n     * // => Logs 'later' after one second.\n     */\n    var delay = baseRest(function(func, wait, args) {\n      return baseDelay(func, toNumber(wait) || 0, args);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments reversed.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to flip arguments for.\n     * @returns {Function} Returns the new flipped function.\n     * @example\n     *\n     * var flipped = _.flip(function() {\n     *   return _.toArray(arguments);\n     * });\n     *\n     * flipped('a', 'b', 'c', 'd');\n     * // => ['d', 'c', 'b', 'a']\n     */\n    function flip(func) {\n      return createWrap(func, WRAP_FLIP_FLAG);\n    }\n\n    /**\n     * Creates a function that memoizes the result of `func`. If `resolver` is\n     * provided, it determines the cache key for storing the result based on the\n     * arguments provided to the memoized function. By default, the first argument\n     * provided to the memoized function is used as the map cache key. The `func`\n     * is invoked with the `this` binding of the memoized function.\n     *\n     * **Note:** The cache is exposed as the `cache` property on the memoized\n     * function. Its creation may be customized by replacing the `_.memoize.Cache`\n     * constructor with one whose instances implement the\n     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n     * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to have its output memoized.\n     * @param {Function} [resolver] The function to resolve the cache key.\n     * @returns {Function} Returns the new memoized function.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     * var other = { 'c': 3, 'd': 4 };\n     *\n     * var values = _.memoize(_.values);\n     * values(object);\n     * // => [1, 2]\n     *\n     * values(other);\n     * // => [3, 4]\n     *\n     * object.a = 2;\n     * values(object);\n     * // => [1, 2]\n     *\n     * // Modify the result cache.\n     * values.cache.set(object, ['a', 'b']);\n     * values(object);\n     * // => ['a', 'b']\n     *\n     * // Replace `_.memoize.Cache`.\n     * _.memoize.Cache = WeakMap;\n     */\n    function memoize(func, resolver) {\n      if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      var memoized = function() {\n        var args = arguments,\n            key = resolver ? resolver.apply(this, args) : args[0],\n            cache = memoized.cache;\n\n        if (cache.has(key)) {\n          return cache.get(key);\n        }\n        var result = func.apply(this, args);\n        memoized.cache = cache.set(key, result) || cache;\n        return result;\n      };\n      memoized.cache = new (memoize.Cache || MapCache);\n      return memoized;\n    }\n\n    // Expose `MapCache`.\n    memoize.Cache = MapCache;\n\n    /**\n     * Creates a function that negates the result of the predicate `func`. The\n     * `func` predicate is invoked with the `this` binding and arguments of the\n     * created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} predicate The predicate to negate.\n     * @returns {Function} Returns the new negated function.\n     * @example\n     *\n     * function isEven(n) {\n     *   return n % 2 == 0;\n     * }\n     *\n     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\n     * // => [1, 3, 5]\n     */\n    function negate(predicate) {\n      if (typeof predicate != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      return function() {\n        var args = arguments;\n        switch (args.length) {\n          case 0: return !predicate.call(this);\n          case 1: return !predicate.call(this, args[0]);\n          case 2: return !predicate.call(this, args[0], args[1]);\n          case 3: return !predicate.call(this, args[0], args[1], args[2]);\n        }\n        return !predicate.apply(this, args);\n      };\n    }\n\n    /**\n     * Creates a function that is restricted to invoking `func` once. Repeat calls\n     * to the function return the value of the first invocation. The `func` is\n     * invoked with the `this` binding and arguments of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to restrict.\n     * @returns {Function} Returns the new restricted function.\n     * @example\n     *\n     * var initialize = _.once(createApplication);\n     * initialize();\n     * initialize();\n     * // => `createApplication` is invoked once\n     */\n    function once(func) {\n      return before(2, func);\n    }\n\n    /**\n     * Creates a function that invokes `func` with its arguments transformed.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Function\n     * @param {Function} func The function to wrap.\n     * @param {...(Function|Function[])} [transforms=[_.identity]]\n     *  The argument transforms.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * function doubled(n) {\n     *   return n * 2;\n     * }\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var func = _.overArgs(function(x, y) {\n     *   return [x, y];\n     * }, [square, doubled]);\n     *\n     * func(9, 3);\n     * // => [81, 6]\n     *\n     * func(10, 5);\n     * // => [100, 10]\n     */\n    var overArgs = castRest(function(func, transforms) {\n      transforms = (transforms.length == 1 && isArray(transforms[0]))\n        ? arrayMap(transforms[0], baseUnary(getIteratee()))\n        : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));\n\n      var funcsLength = transforms.length;\n      return baseRest(function(args) {\n        var index = -1,\n            length = nativeMin(args.length, funcsLength);\n\n        while (++index < length) {\n          args[index] = transforms[index].call(this, args[index]);\n        }\n        return apply(func, this, args);\n      });\n    });\n\n    /**\n     * Creates a function that invokes `func` with `partials` prepended to the\n     * arguments it receives. This method is like `_.bind` except it does **not**\n     * alter the `this` binding.\n     *\n     * The `_.partial.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.2.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var sayHelloTo = _.partial(greet, 'hello');\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     *\n     * // Partially applied with placeholders.\n     * var greetFred = _.partial(greet, _, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     */\n    var partial = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partial));\n      return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * This method is like `_.partial` except that partially applied arguments\n     * are appended to the arguments it receives.\n     *\n     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic\n     * builds, may be used as a placeholder for partially applied arguments.\n     *\n     * **Note:** This method doesn't set the \"length\" property of partially\n     * applied functions.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Function\n     * @param {Function} func The function to partially apply arguments to.\n     * @param {...*} [partials] The arguments to be partially applied.\n     * @returns {Function} Returns the new partially applied function.\n     * @example\n     *\n     * function greet(greeting, name) {\n     *   return greeting + ' ' + name;\n     * }\n     *\n     * var greetFred = _.partialRight(greet, 'fred');\n     * greetFred('hi');\n     * // => 'hi fred'\n     *\n     * // Partially applied with placeholders.\n     * var sayHelloTo = _.partialRight(greet, 'hello', _);\n     * sayHelloTo('fred');\n     * // => 'hello fred'\n     */\n    var partialRight = baseRest(function(func, partials) {\n      var holders = replaceHolders(partials, getHolder(partialRight));\n      return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);\n    });\n\n    /**\n     * Creates a function that invokes `func` with arguments arranged according\n     * to the specified `indexes` where the argument value at the first index is\n     * provided as the first argument, the argument value at the second index is\n     * provided as the second argument, and so on.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Function\n     * @param {Function} func The function to rearrange arguments for.\n     * @param {...(number|number[])} indexes The arranged argument indexes.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var rearged = _.rearg(function(a, b, c) {\n     *   return [a, b, c];\n     * }, [2, 0, 1]);\n     *\n     * rearged('b', 'c', 'a')\n     * // => ['a', 'b', 'c']\n     */\n    var rearg = flatRest(function(func, indexes) {\n      return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);\n    });\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * created function and arguments from `start` and beyond provided as\n     * an array.\n     *\n     * **Note:** This method is based on the\n     * [rest parameter](https://mdn.io/rest_parameters).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to apply a rest parameter to.\n     * @param {number} [start=func.length-1] The start position of the rest parameter.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.rest(function(what, names) {\n     *   return what + ' ' + _.initial(names).join(', ') +\n     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n     * });\n     *\n     * say('hello', 'fred', 'barney', 'pebbles');\n     * // => 'hello fred, barney, & pebbles'\n     */\n    function rest(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start === undefined ? start : toInteger(start);\n      return baseRest(func, start);\n    }\n\n    /**\n     * Creates a function that invokes `func` with the `this` binding of the\n     * create function and an array of arguments much like\n     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).\n     *\n     * **Note:** This method is based on the\n     * [spread operator](https://mdn.io/spread_operator).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Function\n     * @param {Function} func The function to spread arguments over.\n     * @param {number} [start=0] The start position of the spread.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var say = _.spread(function(who, what) {\n     *   return who + ' says ' + what;\n     * });\n     *\n     * say(['fred', 'hello']);\n     * // => 'fred says hello'\n     *\n     * var numbers = Promise.all([\n     *   Promise.resolve(40),\n     *   Promise.resolve(36)\n     * ]);\n     *\n     * numbers.then(_.spread(function(x, y) {\n     *   return x + y;\n     * }));\n     * // => a Promise of 76\n     */\n    function spread(func, start) {\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      start = start == null ? 0 : nativeMax(toInteger(start), 0);\n      return baseRest(function(args) {\n        var array = args[start],\n            otherArgs = castSlice(args, 0, start);\n\n        if (array) {\n          arrayPush(otherArgs, array);\n        }\n        return apply(func, this, otherArgs);\n      });\n    }\n\n    /**\n     * Creates a throttled function that only invokes `func` at most once per\n     * every `wait` milliseconds. The throttled function comes with a `cancel`\n     * method to cancel delayed `func` invocations and a `flush` method to\n     * immediately invoke them. Provide `options` to indicate whether `func`\n     * should be invoked on the leading and/or trailing edge of the `wait`\n     * timeout. The `func` is invoked with the last arguments provided to the\n     * throttled function. Subsequent calls to the throttled function return the\n     * result of the last `func` invocation.\n     *\n     * **Note:** If `leading` and `trailing` options are `true`, `func` is\n     * invoked on the trailing edge of the timeout only if the throttled function\n     * is invoked more than once during the `wait` timeout.\n     *\n     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n     * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n     *\n     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n     * for details over the differences between `_.throttle` and `_.debounce`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {Function} func The function to throttle.\n     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.leading=true]\n     *  Specify invoking on the leading edge of the timeout.\n     * @param {boolean} [options.trailing=true]\n     *  Specify invoking on the trailing edge of the timeout.\n     * @returns {Function} Returns the new throttled function.\n     * @example\n     *\n     * // Avoid excessively updating the position while scrolling.\n     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n     *\n     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n     * jQuery(element).on('click', throttled);\n     *\n     * // Cancel the trailing throttled invocation.\n     * jQuery(window).on('popstate', throttled.cancel);\n     */\n    function throttle(func, wait, options) {\n      var leading = true,\n          trailing = true;\n\n      if (typeof func != 'function') {\n        throw new TypeError(FUNC_ERROR_TEXT);\n      }\n      if (isObject(options)) {\n        leading = 'leading' in options ? !!options.leading : leading;\n        trailing = 'trailing' in options ? !!options.trailing : trailing;\n      }\n      return debounce(func, wait, {\n        'leading': leading,\n        'maxWait': wait,\n        'trailing': trailing\n      });\n    }\n\n    /**\n     * Creates a function that accepts up to one argument, ignoring any\n     * additional arguments.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Function\n     * @param {Function} func The function to cap arguments for.\n     * @returns {Function} Returns the new capped function.\n     * @example\n     *\n     * _.map(['6', '8', '10'], _.unary(parseInt));\n     * // => [6, 8, 10]\n     */\n    function unary(func) {\n      return ary(func, 1);\n    }\n\n    /**\n     * Creates a function that provides `value` to `wrapper` as its first\n     * argument. Any additional arguments provided to the function are appended\n     * to those provided to the `wrapper`. The wrapper is invoked with the `this`\n     * binding of the created function.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Function\n     * @param {*} value The value to wrap.\n     * @param {Function} [wrapper=identity] The wrapper function.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var p = _.wrap(_.escape, function(func, text) {\n     *   return '<p>' + func(text) + '</p>';\n     * });\n     *\n     * p('fred, barney, & pebbles');\n     * // => '<p>fred, barney, &amp; pebbles</p>'\n     */\n    function wrap(value, wrapper) {\n      return partial(castFunction(wrapper), value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Casts `value` as an array if it's not one.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.4.0\n     * @category Lang\n     * @param {*} value The value to inspect.\n     * @returns {Array} Returns the cast array.\n     * @example\n     *\n     * _.castArray(1);\n     * // => [1]\n     *\n     * _.castArray({ 'a': 1 });\n     * // => [{ 'a': 1 }]\n     *\n     * _.castArray('abc');\n     * // => ['abc']\n     *\n     * _.castArray(null);\n     * // => [null]\n     *\n     * _.castArray(undefined);\n     * // => [undefined]\n     *\n     * _.castArray();\n     * // => []\n     *\n     * var array = [1, 2, 3];\n     * console.log(_.castArray(array) === array);\n     * // => true\n     */\n    function castArray() {\n      if (!arguments.length) {\n        return [];\n      }\n      var value = arguments[0];\n      return isArray(value) ? value : [value];\n    }\n\n    /**\n     * Creates a shallow clone of `value`.\n     *\n     * **Note:** This method is loosely based on the\n     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\n     * and supports cloning arrays, array buffers, booleans, date objects, maps,\n     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\n     * arrays. The own enumerable properties of `arguments` objects are cloned\n     * as plain objects. An empty object is returned for uncloneable values such\n     * as error objects, functions, DOM nodes, and WeakMaps.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeep\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var shallow = _.clone(objects);\n     * console.log(shallow[0] === objects[0]);\n     * // => true\n     */\n    function clone(value) {\n      return baseClone(value, CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.clone` except that it accepts `customizer` which\n     * is invoked to produce the cloned value. If `customizer` returns `undefined`,\n     * cloning is handled by the method instead. The `customizer` is invoked with\n     * up to four arguments; (value [, index|key, object, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the cloned value.\n     * @see _.cloneDeepWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(false);\n     *   }\n     * }\n     *\n     * var el = _.cloneWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 0\n     */\n    function cloneWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * This method is like `_.clone` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.clone\n     * @example\n     *\n     * var objects = [{ 'a': 1 }, { 'b': 2 }];\n     *\n     * var deep = _.cloneDeep(objects);\n     * console.log(deep[0] === objects[0]);\n     * // => false\n     */\n    function cloneDeep(value) {\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n    }\n\n    /**\n     * This method is like `_.cloneWith` except that it recursively clones `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to recursively clone.\n     * @param {Function} [customizer] The function to customize cloning.\n     * @returns {*} Returns the deep cloned value.\n     * @see _.cloneWith\n     * @example\n     *\n     * function customizer(value) {\n     *   if (_.isElement(value)) {\n     *     return value.cloneNode(true);\n     *   }\n     * }\n     *\n     * var el = _.cloneDeepWith(document.body, customizer);\n     *\n     * console.log(el === document.body);\n     * // => false\n     * console.log(el.nodeName);\n     * // => 'BODY'\n     * console.log(el.childNodes.length);\n     * // => 20\n     */\n    function cloneDeepWith(value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);\n    }\n\n    /**\n     * Checks if `object` conforms to `source` by invoking the predicate\n     * properties of `source` with the corresponding property values of `object`.\n     *\n     * **Note:** This method is equivalent to `_.conforms` when `source` is\n     * partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {boolean} Returns `true` if `object` conforms, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });\n     * // => true\n     *\n     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });\n     * // => false\n     */\n    function conformsTo(object, source) {\n      return source == null || baseConformsTo(object, source, keys(source));\n    }\n\n    /**\n     * Performs a\n     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n     * comparison between two values to determine if they are equivalent.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.eq(object, object);\n     * // => true\n     *\n     * _.eq(object, other);\n     * // => false\n     *\n     * _.eq('a', 'a');\n     * // => true\n     *\n     * _.eq('a', Object('a'));\n     * // => false\n     *\n     * _.eq(NaN, NaN);\n     * // => true\n     */\n    function eq(value, other) {\n      return value === other || (value !== value && other !== other);\n    }\n\n    /**\n     * Checks if `value` is greater than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than `other`,\n     *  else `false`.\n     * @see _.lt\n     * @example\n     *\n     * _.gt(3, 1);\n     * // => true\n     *\n     * _.gt(3, 3);\n     * // => false\n     *\n     * _.gt(1, 3);\n     * // => false\n     */\n    var gt = createRelationalOperation(baseGt);\n\n    /**\n     * Checks if `value` is greater than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is greater than or equal to\n     *  `other`, else `false`.\n     * @see _.lte\n     * @example\n     *\n     * _.gte(3, 1);\n     * // => true\n     *\n     * _.gte(3, 3);\n     * // => true\n     *\n     * _.gte(1, 3);\n     * // => false\n     */\n    var gte = createRelationalOperation(function(value, other) {\n      return value >= other;\n    });\n\n    /**\n     * Checks if `value` is likely an `arguments` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArguments(function() { return arguments; }());\n     * // => true\n     *\n     * _.isArguments([1, 2, 3]);\n     * // => false\n     */\n    var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n      return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n        !propertyIsEnumerable.call(value, 'callee');\n    };\n\n    /**\n     * Checks if `value` is classified as an `Array` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n     * @example\n     *\n     * _.isArray([1, 2, 3]);\n     * // => true\n     *\n     * _.isArray(document.body.children);\n     * // => false\n     *\n     * _.isArray('abc');\n     * // => false\n     *\n     * _.isArray(_.noop);\n     * // => false\n     */\n    var isArray = Array.isArray;\n\n    /**\n     * Checks if `value` is classified as an `ArrayBuffer` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.\n     * @example\n     *\n     * _.isArrayBuffer(new ArrayBuffer(2));\n     * // => true\n     *\n     * _.isArrayBuffer(new Array(2));\n     * // => false\n     */\n    var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;\n\n    /**\n     * Checks if `value` is array-like. A value is considered array-like if it's\n     * not a function and has a `value.length` that's an integer greater than or\n     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n     * @example\n     *\n     * _.isArrayLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLike(document.body.children);\n     * // => true\n     *\n     * _.isArrayLike('abc');\n     * // => true\n     *\n     * _.isArrayLike(_.noop);\n     * // => false\n     */\n    function isArrayLike(value) {\n      return value != null && isLength(value.length) && !isFunction(value);\n    }\n\n    /**\n     * This method is like `_.isArrayLike` except that it also checks if `value`\n     * is an object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an array-like object,\n     *  else `false`.\n     * @example\n     *\n     * _.isArrayLikeObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isArrayLikeObject(document.body.children);\n     * // => true\n     *\n     * _.isArrayLikeObject('abc');\n     * // => false\n     *\n     * _.isArrayLikeObject(_.noop);\n     * // => false\n     */\n    function isArrayLikeObject(value) {\n      return isObjectLike(value) && isArrayLike(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a boolean primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\n     * @example\n     *\n     * _.isBoolean(false);\n     * // => true\n     *\n     * _.isBoolean(null);\n     * // => false\n     */\n    function isBoolean(value) {\n      return value === true || value === false ||\n        (isObjectLike(value) && baseGetTag(value) == boolTag);\n    }\n\n    /**\n     * Checks if `value` is a buffer.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n     * @example\n     *\n     * _.isBuffer(new Buffer(2));\n     * // => true\n     *\n     * _.isBuffer(new Uint8Array(2));\n     * // => false\n     */\n    var isBuffer = nativeIsBuffer || stubFalse;\n\n    /**\n     * Checks if `value` is classified as a `Date` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n     * @example\n     *\n     * _.isDate(new Date);\n     * // => true\n     *\n     * _.isDate('Mon April 23 2012');\n     * // => false\n     */\n    var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\n    /**\n     * Checks if `value` is likely a DOM element.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.\n     * @example\n     *\n     * _.isElement(document.body);\n     * // => true\n     *\n     * _.isElement('<body>');\n     * // => false\n     */\n    function isElement(value) {\n      return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);\n    }\n\n    /**\n     * Checks if `value` is an empty object, collection, map, or set.\n     *\n     * Objects are considered empty if they have no own enumerable string keyed\n     * properties.\n     *\n     * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n     * jQuery-like collections are considered empty if they have a `length` of `0`.\n     * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n     * @example\n     *\n     * _.isEmpty(null);\n     * // => true\n     *\n     * _.isEmpty(true);\n     * // => true\n     *\n     * _.isEmpty(1);\n     * // => true\n     *\n     * _.isEmpty([1, 2, 3]);\n     * // => false\n     *\n     * _.isEmpty({ 'a': 1 });\n     * // => false\n     */\n    function isEmpty(value) {\n      if (value == null) {\n        return true;\n      }\n      if (isArrayLike(value) &&\n          (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n            isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n        return !value.length;\n      }\n      var tag = getTag(value);\n      if (tag == mapTag || tag == setTag) {\n        return !value.size;\n      }\n      if (isPrototype(value)) {\n        return !baseKeys(value).length;\n      }\n      for (var key in value) {\n        if (hasOwnProperty.call(value, key)) {\n          return false;\n        }\n      }\n      return true;\n    }\n\n    /**\n     * Performs a deep comparison between two values to determine if they are\n     * equivalent.\n     *\n     * **Note:** This method supports comparing arrays, array buffers, booleans,\n     * date objects, error objects, maps, numbers, `Object` objects, regexes,\n     * sets, strings, symbols, and typed arrays. `Object` objects are compared\n     * by their own, not inherited, enumerable properties. Functions and DOM\n     * nodes are compared by strict equality, i.e. `===`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     * var other = { 'a': 1 };\n     *\n     * _.isEqual(object, other);\n     * // => true\n     *\n     * object === other;\n     * // => false\n     */\n    function isEqual(value, other) {\n      return baseIsEqual(value, other);\n    }\n\n    /**\n     * This method is like `_.isEqual` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with up to\n     * six arguments: (objValue, othValue [, index|key, object, other, stack]).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, othValue) {\n     *   if (isGreeting(objValue) && isGreeting(othValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var array = ['hello', 'goodbye'];\n     * var other = ['hi', 'goodbye'];\n     *\n     * _.isEqualWith(array, other, customizer);\n     * // => true\n     */\n    function isEqualWith(value, other, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      var result = customizer ? customizer(value, other) : undefined;\n      return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;\n    }\n\n    /**\n     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,\n     * `SyntaxError`, `TypeError`, or `URIError` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.\n     * @example\n     *\n     * _.isError(new Error);\n     * // => true\n     *\n     * _.isError(Error);\n     * // => false\n     */\n    function isError(value) {\n      if (!isObjectLike(value)) {\n        return false;\n      }\n      var tag = baseGetTag(value);\n      return tag == errorTag || tag == domExcTag ||\n        (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));\n    }\n\n    /**\n     * Checks if `value` is a finite primitive number.\n     *\n     * **Note:** This method is based on\n     * [`Number.isFinite`](https://mdn.io/Number/isFinite).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\n     * @example\n     *\n     * _.isFinite(3);\n     * // => true\n     *\n     * _.isFinite(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isFinite(Infinity);\n     * // => false\n     *\n     * _.isFinite('3');\n     * // => false\n     */\n    function isFinite(value) {\n      return typeof value == 'number' && nativeIsFinite(value);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Function` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n     * @example\n     *\n     * _.isFunction(_);\n     * // => true\n     *\n     * _.isFunction(/abc/);\n     * // => false\n     */\n    function isFunction(value) {\n      if (!isObject(value)) {\n        return false;\n      }\n      // The use of `Object#toString` avoids issues with the `typeof` operator\n      // in Safari 9 which returns 'object' for typed arrays and other constructors.\n      var tag = baseGetTag(value);\n      return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n    }\n\n    /**\n     * Checks if `value` is an integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n     * @example\n     *\n     * _.isInteger(3);\n     * // => true\n     *\n     * _.isInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isInteger(Infinity);\n     * // => false\n     *\n     * _.isInteger('3');\n     * // => false\n     */\n    function isInteger(value) {\n      return typeof value == 'number' && value == toInteger(value);\n    }\n\n    /**\n     * Checks if `value` is a valid array-like length.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n     * @example\n     *\n     * _.isLength(3);\n     * // => true\n     *\n     * _.isLength(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isLength(Infinity);\n     * // => false\n     *\n     * _.isLength('3');\n     * // => false\n     */\n    function isLength(value) {\n      return typeof value == 'number' &&\n        value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is the\n     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n     * @example\n     *\n     * _.isObject({});\n     * // => true\n     *\n     * _.isObject([1, 2, 3]);\n     * // => true\n     *\n     * _.isObject(_.noop);\n     * // => true\n     *\n     * _.isObject(null);\n     * // => false\n     */\n    function isObject(value) {\n      var type = typeof value;\n      return value != null && (type == 'object' || type == 'function');\n    }\n\n    /**\n     * Checks if `value` is object-like. A value is object-like if it's not `null`\n     * and has a `typeof` result of \"object\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n     * @example\n     *\n     * _.isObjectLike({});\n     * // => true\n     *\n     * _.isObjectLike([1, 2, 3]);\n     * // => true\n     *\n     * _.isObjectLike(_.noop);\n     * // => false\n     *\n     * _.isObjectLike(null);\n     * // => false\n     */\n    function isObjectLike(value) {\n      return value != null && typeof value == 'object';\n    }\n\n    /**\n     * Checks if `value` is classified as a `Map` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n     * @example\n     *\n     * _.isMap(new Map);\n     * // => true\n     *\n     * _.isMap(new WeakMap);\n     * // => false\n     */\n    var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\n    /**\n     * Performs a partial deep comparison between `object` and `source` to\n     * determine if `object` contains equivalent property values.\n     *\n     * **Note:** This method is equivalent to `_.matches` when `source` is\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2 };\n     *\n     * _.isMatch(object, { 'b': 2 });\n     * // => true\n     *\n     * _.isMatch(object, { 'b': 1 });\n     * // => false\n     */\n    function isMatch(object, source) {\n      return object === source || baseIsMatch(object, source, getMatchData(source));\n    }\n\n    /**\n     * This method is like `_.isMatch` except that it accepts `customizer` which\n     * is invoked to compare values. If `customizer` returns `undefined`, comparisons\n     * are handled by the method instead. The `customizer` is invoked with five\n     * arguments: (objValue, srcValue, index|key, object, source).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {Object} object The object to inspect.\n     * @param {Object} source The object of property values to match.\n     * @param {Function} [customizer] The function to customize comparisons.\n     * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n     * @example\n     *\n     * function isGreeting(value) {\n     *   return /^h(?:i|ello)$/.test(value);\n     * }\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (isGreeting(objValue) && isGreeting(srcValue)) {\n     *     return true;\n     *   }\n     * }\n     *\n     * var object = { 'greeting': 'hello' };\n     * var source = { 'greeting': 'hi' };\n     *\n     * _.isMatchWith(object, source, customizer);\n     * // => true\n     */\n    function isMatchWith(object, source, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return baseIsMatch(object, source, getMatchData(source), customizer);\n    }\n\n    /**\n     * Checks if `value` is `NaN`.\n     *\n     * **Note:** This method is based on\n     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n     * `undefined` and other non-number values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n     * @example\n     *\n     * _.isNaN(NaN);\n     * // => true\n     *\n     * _.isNaN(new Number(NaN));\n     * // => true\n     *\n     * isNaN(undefined);\n     * // => true\n     *\n     * _.isNaN(undefined);\n     * // => false\n     */\n    function isNaN(value) {\n      // An `NaN` primitive is the only value that is not equal to itself.\n      // Perform the `toStringTag` check first to avoid errors with some\n      // ActiveX objects in IE.\n      return isNumber(value) && value != +value;\n    }\n\n    /**\n     * Checks if `value` is a pristine native function.\n     *\n     * **Note:** This method can't reliably detect native functions in the presence\n     * of the core-js package because core-js circumvents this kind of detection.\n     * Despite multiple requests, the core-js maintainer has made it clear: any\n     * attempt to fix the detection will be obstructed. As a result, we're left\n     * with little choice but to throw an error. Unfortunately, this also affects\n     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),\n     * which rely on core-js.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a native function,\n     *  else `false`.\n     * @example\n     *\n     * _.isNative(Array.prototype.push);\n     * // => true\n     *\n     * _.isNative(_);\n     * // => false\n     */\n    function isNative(value) {\n      if (isMaskable(value)) {\n        throw new Error(CORE_ERROR_TEXT);\n      }\n      return baseIsNative(value);\n    }\n\n    /**\n     * Checks if `value` is `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n     * @example\n     *\n     * _.isNull(null);\n     * // => true\n     *\n     * _.isNull(void 0);\n     * // => false\n     */\n    function isNull(value) {\n      return value === null;\n    }\n\n    /**\n     * Checks if `value` is `null` or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n     * @example\n     *\n     * _.isNil(null);\n     * // => true\n     *\n     * _.isNil(void 0);\n     * // => true\n     *\n     * _.isNil(NaN);\n     * // => false\n     */\n    function isNil(value) {\n      return value == null;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Number` primitive or object.\n     *\n     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n     * classified as numbers, use the `_.isFinite` method.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n     * @example\n     *\n     * _.isNumber(3);\n     * // => true\n     *\n     * _.isNumber(Number.MIN_VALUE);\n     * // => true\n     *\n     * _.isNumber(Infinity);\n     * // => true\n     *\n     * _.isNumber('3');\n     * // => false\n     */\n    function isNumber(value) {\n      return typeof value == 'number' ||\n        (isObjectLike(value) && baseGetTag(value) == numberTag);\n    }\n\n    /**\n     * Checks if `value` is a plain object, that is, an object created by the\n     * `Object` constructor or one with a `[[Prototype]]` of `null`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.8.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * _.isPlainObject(new Foo);\n     * // => false\n     *\n     * _.isPlainObject([1, 2, 3]);\n     * // => false\n     *\n     * _.isPlainObject({ 'x': 0, 'y': 0 });\n     * // => true\n     *\n     * _.isPlainObject(Object.create(null));\n     * // => true\n     */\n    function isPlainObject(value) {\n      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n        return false;\n      }\n      var proto = getPrototype(value);\n      if (proto === null) {\n        return true;\n      }\n      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n      return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n        funcToString.call(Ctor) == objectCtorString;\n    }\n\n    /**\n     * Checks if `value` is classified as a `RegExp` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.1.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\n     * @example\n     *\n     * _.isRegExp(/abc/);\n     * // => true\n     *\n     * _.isRegExp('/abc/');\n     * // => false\n     */\n    var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\n\n    /**\n     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754\n     * double precision number which isn't the result of a rounded unsafe integer.\n     *\n     * **Note:** This method is based on\n     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.\n     * @example\n     *\n     * _.isSafeInteger(3);\n     * // => true\n     *\n     * _.isSafeInteger(Number.MIN_VALUE);\n     * // => false\n     *\n     * _.isSafeInteger(Infinity);\n     * // => false\n     *\n     * _.isSafeInteger('3');\n     * // => false\n     */\n    function isSafeInteger(value) {\n      return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;\n    }\n\n    /**\n     * Checks if `value` is classified as a `Set` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n     * @example\n     *\n     * _.isSet(new Set);\n     * // => true\n     *\n     * _.isSet(new WeakSet);\n     * // => false\n     */\n    var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\n    /**\n     * Checks if `value` is classified as a `String` primitive or object.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n     * @example\n     *\n     * _.isString('abc');\n     * // => true\n     *\n     * _.isString(1);\n     * // => false\n     */\n    function isString(value) {\n      return typeof value == 'string' ||\n        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a `Symbol` primitive or object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n     * @example\n     *\n     * _.isSymbol(Symbol.iterator);\n     * // => true\n     *\n     * _.isSymbol('abc');\n     * // => false\n     */\n    function isSymbol(value) {\n      return typeof value == 'symbol' ||\n        (isObjectLike(value) && baseGetTag(value) == symbolTag);\n    }\n\n    /**\n     * Checks if `value` is classified as a typed array.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n     * @example\n     *\n     * _.isTypedArray(new Uint8Array);\n     * // => true\n     *\n     * _.isTypedArray([]);\n     * // => false\n     */\n    var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n    /**\n     * Checks if `value` is `undefined`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n     * @example\n     *\n     * _.isUndefined(void 0);\n     * // => true\n     *\n     * _.isUndefined(null);\n     * // => false\n     */\n    function isUndefined(value) {\n      return value === undefined;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakMap` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.\n     * @example\n     *\n     * _.isWeakMap(new WeakMap);\n     * // => true\n     *\n     * _.isWeakMap(new Map);\n     * // => false\n     */\n    function isWeakMap(value) {\n      return isObjectLike(value) && getTag(value) == weakMapTag;\n    }\n\n    /**\n     * Checks if `value` is classified as a `WeakSet` object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.3.0\n     * @category Lang\n     * @param {*} value The value to check.\n     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.\n     * @example\n     *\n     * _.isWeakSet(new WeakSet);\n     * // => true\n     *\n     * _.isWeakSet(new Set);\n     * // => false\n     */\n    function isWeakSet(value) {\n      return isObjectLike(value) && baseGetTag(value) == weakSetTag;\n    }\n\n    /**\n     * Checks if `value` is less than `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than `other`,\n     *  else `false`.\n     * @see _.gt\n     * @example\n     *\n     * _.lt(1, 3);\n     * // => true\n     *\n     * _.lt(3, 3);\n     * // => false\n     *\n     * _.lt(3, 1);\n     * // => false\n     */\n    var lt = createRelationalOperation(baseLt);\n\n    /**\n     * Checks if `value` is less than or equal to `other`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.9.0\n     * @category Lang\n     * @param {*} value The value to compare.\n     * @param {*} other The other value to compare.\n     * @returns {boolean} Returns `true` if `value` is less than or equal to\n     *  `other`, else `false`.\n     * @see _.gte\n     * @example\n     *\n     * _.lte(1, 3);\n     * // => true\n     *\n     * _.lte(3, 3);\n     * // => true\n     *\n     * _.lte(3, 1);\n     * // => false\n     */\n    var lte = createRelationalOperation(function(value, other) {\n      return value <= other;\n    });\n\n    /**\n     * Converts `value` to an array.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the converted array.\n     * @example\n     *\n     * _.toArray({ 'a': 1, 'b': 2 });\n     * // => [1, 2]\n     *\n     * _.toArray('abc');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toArray(1);\n     * // => []\n     *\n     * _.toArray(null);\n     * // => []\n     */\n    function toArray(value) {\n      if (!value) {\n        return [];\n      }\n      if (isArrayLike(value)) {\n        return isString(value) ? stringToArray(value) : copyArray(value);\n      }\n      if (symIterator && value[symIterator]) {\n        return iteratorToArray(value[symIterator]());\n      }\n      var tag = getTag(value),\n          func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\n\n      return func(value);\n    }\n\n    /**\n     * Converts `value` to a finite number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.12.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted number.\n     * @example\n     *\n     * _.toFinite(3.2);\n     * // => 3.2\n     *\n     * _.toFinite(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toFinite(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toFinite('3.2');\n     * // => 3.2\n     */\n    function toFinite(value) {\n      if (!value) {\n        return value === 0 ? value : 0;\n      }\n      value = toNumber(value);\n      if (value === INFINITY || value === -INFINITY) {\n        var sign = (value < 0 ? -1 : 1);\n        return sign * MAX_INTEGER;\n      }\n      return value === value ? value : 0;\n    }\n\n    /**\n     * Converts `value` to an integer.\n     *\n     * **Note:** This method is loosely based on\n     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toInteger(3.2);\n     * // => 3\n     *\n     * _.toInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toInteger(Infinity);\n     * // => 1.7976931348623157e+308\n     *\n     * _.toInteger('3.2');\n     * // => 3\n     */\n    function toInteger(value) {\n      var result = toFinite(value),\n          remainder = result % 1;\n\n      return result === result ? (remainder ? result - remainder : result) : 0;\n    }\n\n    /**\n     * Converts `value` to an integer suitable for use as the length of an\n     * array-like object.\n     *\n     * **Note:** This method is based on\n     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toLength(3.2);\n     * // => 3\n     *\n     * _.toLength(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toLength(Infinity);\n     * // => 4294967295\n     *\n     * _.toLength('3.2');\n     * // => 3\n     */\n    function toLength(value) {\n      return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;\n    }\n\n    /**\n     * Converts `value` to a number.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to process.\n     * @returns {number} Returns the number.\n     * @example\n     *\n     * _.toNumber(3.2);\n     * // => 3.2\n     *\n     * _.toNumber(Number.MIN_VALUE);\n     * // => 5e-324\n     *\n     * _.toNumber(Infinity);\n     * // => Infinity\n     *\n     * _.toNumber('3.2');\n     * // => 3.2\n     */\n    function toNumber(value) {\n      if (typeof value == 'number') {\n        return value;\n      }\n      if (isSymbol(value)) {\n        return NAN;\n      }\n      if (isObject(value)) {\n        var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n        value = isObject(other) ? (other + '') : other;\n      }\n      if (typeof value != 'string') {\n        return value === 0 ? value : +value;\n      }\n      value = baseTrim(value);\n      var isBinary = reIsBinary.test(value);\n      return (isBinary || reIsOctal.test(value))\n        ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n        : (reIsBadHex.test(value) ? NAN : +value);\n    }\n\n    /**\n     * Converts `value` to a plain object flattening inherited enumerable string\n     * keyed properties of `value` to own properties of the plain object.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {Object} Returns the converted plain object.\n     * @example\n     *\n     * function Foo() {\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.assign({ 'a': 1 }, new Foo);\n     * // => { 'a': 1, 'b': 2 }\n     *\n     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n     * // => { 'a': 1, 'b': 2, 'c': 3 }\n     */\n    function toPlainObject(value) {\n      return copyObject(value, keysIn(value));\n    }\n\n    /**\n     * Converts `value` to a safe integer. A safe integer can be compared and\n     * represented correctly.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.toSafeInteger(3.2);\n     * // => 3\n     *\n     * _.toSafeInteger(Number.MIN_VALUE);\n     * // => 0\n     *\n     * _.toSafeInteger(Infinity);\n     * // => 9007199254740991\n     *\n     * _.toSafeInteger('3.2');\n     * // => 3\n     */\n    function toSafeInteger(value) {\n      return value\n        ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\n        : (value === 0 ? value : 0);\n    }\n\n    /**\n     * Converts `value` to a string. An empty string is returned for `null`\n     * and `undefined` values. The sign of `-0` is preserved.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Lang\n     * @param {*} value The value to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.toString(null);\n     * // => ''\n     *\n     * _.toString(-0);\n     * // => '-0'\n     *\n     * _.toString([1, 2, 3]);\n     * // => '1,2,3'\n     */\n    function toString(value) {\n      return value == null ? '' : baseToString(value);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Assigns own enumerable string keyed properties of source objects to the\n     * destination object. Source objects are applied from left to right.\n     * Subsequent sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object` and is loosely based on\n     * [`Object.assign`](https://mdn.io/Object/assign).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assignIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assign({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var assign = createAssigner(function(object, source) {\n      if (isPrototype(source) || isArrayLike(source)) {\n        copyObject(source, keys(source), object);\n        return;\n      }\n      for (var key in source) {\n        if (hasOwnProperty.call(source, key)) {\n          assignValue(object, key, source[key]);\n        }\n      }\n    });\n\n    /**\n     * This method is like `_.assign` except that it iterates over own and\n     * inherited source properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extend\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.assign\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     * }\n     *\n     * function Bar() {\n     *   this.c = 3;\n     * }\n     *\n     * Foo.prototype.b = 2;\n     * Bar.prototype.d = 4;\n     *\n     * _.assignIn({ 'a': 0 }, new Foo, new Bar);\n     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\n     */\n    var assignIn = createAssigner(function(object, source) {\n      copyObject(source, keysIn(source), object);\n    });\n\n    /**\n     * This method is like `_.assignIn` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias extendWith\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignInWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keysIn(source), object, customizer);\n    });\n\n    /**\n     * This method is like `_.assign` except that it accepts `customizer`\n     * which is invoked to produce the assigned values. If `customizer` returns\n     * `undefined`, assignment is handled by the method instead. The `customizer`\n     * is invoked with five arguments: (objValue, srcValue, key, object, source).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @see _.assignInWith\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   return _.isUndefined(objValue) ? srcValue : objValue;\n     * }\n     *\n     * var defaults = _.partialRight(_.assignWith, customizer);\n     *\n     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var assignWith = createAssigner(function(object, source, srcIndex, customizer) {\n      copyObject(source, keys(source), object, customizer);\n    });\n\n    /**\n     * Creates an array of values corresponding to `paths` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Array} Returns the picked values.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\n     *\n     * _.at(object, ['a[0].b.c', 'a[1]']);\n     * // => [3, 4]\n     */\n    var at = flatRest(baseAt);\n\n    /**\n     * Creates an object that inherits from the `prototype` object. If a\n     * `properties` object is given, its own enumerable string keyed properties\n     * are assigned to the created object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Object\n     * @param {Object} prototype The object to inherit from.\n     * @param {Object} [properties] The properties to assign to the object.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * function Shape() {\n     *   this.x = 0;\n     *   this.y = 0;\n     * }\n     *\n     * function Circle() {\n     *   Shape.call(this);\n     * }\n     *\n     * Circle.prototype = _.create(Shape.prototype, {\n     *   'constructor': Circle\n     * });\n     *\n     * var circle = new Circle;\n     * circle instanceof Circle;\n     * // => true\n     *\n     * circle instanceof Shape;\n     * // => true\n     */\n    function create(prototype, properties) {\n      var result = baseCreate(prototype);\n      return properties == null ? result : baseAssign(result, properties);\n    }\n\n    /**\n     * Assigns own and inherited enumerable string keyed properties of source\n     * objects to the destination object for all destination properties that\n     * resolve to `undefined`. Source objects are applied from left to right.\n     * Once a property is set, additional values of the same property are ignored.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaultsDeep\n     * @example\n     *\n     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n     * // => { 'a': 1, 'b': 2 }\n     */\n    var defaults = baseRest(function(object, sources) {\n      object = Object(object);\n\n      var index = -1;\n      var length = sources.length;\n      var guard = length > 2 ? sources[2] : undefined;\n\n      if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n        length = 1;\n      }\n\n      while (++index < length) {\n        var source = sources[index];\n        var props = keysIn(source);\n        var propsIndex = -1;\n        var propsLength = props.length;\n\n        while (++propsIndex < propsLength) {\n          var key = props[propsIndex];\n          var value = object[key];\n\n          if (value === undefined ||\n              (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n            object[key] = source[key];\n          }\n        }\n      }\n\n      return object;\n    });\n\n    /**\n     * This method is like `_.defaults` except that it recursively assigns\n     * default properties.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @see _.defaults\n     * @example\n     *\n     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\n     * // => { 'a': { 'b': 2, 'c': 3 } }\n     */\n    var defaultsDeep = baseRest(function(args) {\n      args.push(undefined, customDefaultsMerge);\n      return apply(mergeWith, undefined, args);\n    });\n\n    /**\n     * This method is like `_.find` except that it returns the key of the first\n     * element `predicate` returns truthy for instead of the element itself.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findKey(users, function(o) { return o.age < 40; });\n     * // => 'barney' (iteration order is not guaranteed)\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findKey(users, { 'age': 1, 'active': true });\n     * // => 'pebbles'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findKey(users, 'active');\n     * // => 'barney'\n     */\n    function findKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);\n    }\n\n    /**\n     * This method is like `_.findKey` except that it iterates over elements of\n     * a collection in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @param {Function} [predicate=_.identity] The function invoked per iteration.\n     * @returns {string|undefined} Returns the key of the matched element,\n     *  else `undefined`.\n     * @example\n     *\n     * var users = {\n     *   'barney':  { 'age': 36, 'active': true },\n     *   'fred':    { 'age': 40, 'active': false },\n     *   'pebbles': { 'age': 1,  'active': true }\n     * };\n     *\n     * _.findLastKey(users, function(o) { return o.age < 40; });\n     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.findLastKey(users, { 'age': 36, 'active': true });\n     * // => 'barney'\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.findLastKey(users, ['active', false]);\n     * // => 'fred'\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.findLastKey(users, 'active');\n     * // => 'pebbles'\n     */\n    function findLastKey(object, predicate) {\n      return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);\n    }\n\n    /**\n     * Iterates over own and inherited enumerable string keyed properties of an\n     * object and invokes `iteratee` for each property. The iteratee is invoked\n     * with three arguments: (value, key, object). Iteratee functions may exit\n     * iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forInRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forIn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).\n     */\n    function forIn(object, iteratee) {\n      return object == null\n        ? object\n        : baseFor(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * This method is like `_.forIn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forInRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.\n     */\n    function forInRight(object, iteratee) {\n      return object == null\n        ? object\n        : baseForRight(object, getIteratee(iteratee, 3), keysIn);\n    }\n\n    /**\n     * Iterates over own enumerable string keyed properties of an object and\n     * invokes `iteratee` for each property. The iteratee is invoked with three\n     * arguments: (value, key, object). Iteratee functions may exit iteration\n     * early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwnRight\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwn(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n     */\n    function forOwn(object, iteratee) {\n      return object && baseForOwn(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * This method is like `_.forOwn` except that it iterates over properties of\n     * `object` in the opposite order.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.0.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns `object`.\n     * @see _.forOwn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.forOwnRight(new Foo, function(value, key) {\n     *   console.log(key);\n     * });\n     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.\n     */\n    function forOwnRight(object, iteratee) {\n      return object && baseForOwnRight(object, getIteratee(iteratee, 3));\n    }\n\n    /**\n     * Creates an array of function property names from own enumerable properties\n     * of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functionsIn\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functions(new Foo);\n     * // => ['a', 'b']\n     */\n    function functions(object) {\n      return object == null ? [] : baseFunctions(object, keys(object));\n    }\n\n    /**\n     * Creates an array of function property names from own and inherited\n     * enumerable properties of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to inspect.\n     * @returns {Array} Returns the function names.\n     * @see _.functions\n     * @example\n     *\n     * function Foo() {\n     *   this.a = _.constant('a');\n     *   this.b = _.constant('b');\n     * }\n     *\n     * Foo.prototype.c = _.constant('c');\n     *\n     * _.functionsIn(new Foo);\n     * // => ['a', 'b', 'c']\n     */\n    function functionsIn(object) {\n      return object == null ? [] : baseFunctions(object, keysIn(object));\n    }\n\n    /**\n     * Gets the value at `path` of `object`. If the resolved value is\n     * `undefined`, the `defaultValue` is returned in its place.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.get(object, 'a[0].b.c');\n     * // => 3\n     *\n     * _.get(object, ['a', '0', 'b', 'c']);\n     * // => 3\n     *\n     * _.get(object, 'a.b.c', 'default');\n     * // => 'default'\n     */\n    function get(object, path, defaultValue) {\n      var result = object == null ? undefined : baseGet(object, path);\n      return result === undefined ? defaultValue : result;\n    }\n\n    /**\n     * Checks if `path` is a direct property of `object`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = { 'a': { 'b': 2 } };\n     * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.has(object, 'a');\n     * // => true\n     *\n     * _.has(object, 'a.b');\n     * // => true\n     *\n     * _.has(object, ['a', 'b']);\n     * // => true\n     *\n     * _.has(other, 'a');\n     * // => false\n     */\n    function has(object, path) {\n      return object != null && hasPath(object, path, baseHas);\n    }\n\n    /**\n     * Checks if `path` is a direct or inherited property of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path to check.\n     * @returns {boolean} Returns `true` if `path` exists, else `false`.\n     * @example\n     *\n     * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n     *\n     * _.hasIn(object, 'a');\n     * // => true\n     *\n     * _.hasIn(object, 'a.b');\n     * // => true\n     *\n     * _.hasIn(object, ['a', 'b']);\n     * // => true\n     *\n     * _.hasIn(object, 'b');\n     * // => false\n     */\n    function hasIn(object, path) {\n      return object != null && hasPath(object, path, baseHasIn);\n    }\n\n    /**\n     * Creates an object composed of the inverted keys and values of `object`.\n     * If `object` contains duplicate values, subsequent values overwrite\n     * property assignments of previous values.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invert(object);\n     * // => { '1': 'c', '2': 'b' }\n     */\n    var invert = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      result[value] = key;\n    }, constant(identity));\n\n    /**\n     * This method is like `_.invert` except that the inverted object is generated\n     * from the results of running each element of `object` thru `iteratee`. The\n     * corresponding inverted value of each inverted key is an array of keys\n     * responsible for generating the inverted value. The iteratee is invoked\n     * with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.1.0\n     * @category Object\n     * @param {Object} object The object to invert.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {Object} Returns the new inverted object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': 2, 'c': 1 };\n     *\n     * _.invertBy(object);\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     *\n     * _.invertBy(object, function(value) {\n     *   return 'group' + value;\n     * });\n     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\n     */\n    var invertBy = createInverter(function(result, value, key) {\n      if (value != null &&\n          typeof value.toString != 'function') {\n        value = nativeObjectToString.call(value);\n      }\n\n      if (hasOwnProperty.call(result, value)) {\n        result[value].push(key);\n      } else {\n        result[value] = [key];\n      }\n    }, getIteratee);\n\n    /**\n     * Invokes the method at `path` of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {*} Returns the result of the invoked method.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };\n     *\n     * _.invoke(object, 'a[0].b.c.slice', 1, 3);\n     * // => [2, 3]\n     */\n    var invoke = baseRest(baseInvoke);\n\n    /**\n     * Creates an array of the own enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects. See the\n     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n     * for more details.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keys(new Foo);\n     * // => ['a', 'b'] (iteration order is not guaranteed)\n     *\n     * _.keys('hi');\n     * // => ['0', '1']\n     */\n    function keys(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable property names of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property names.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.keysIn(new Foo);\n     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n     */\n    function keysIn(object) {\n      return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n    }\n\n    /**\n     * The opposite of `_.mapValues`; this method creates an object with the\n     * same values as `object` and keys generated by running each own enumerable\n     * string keyed property of `object` thru `iteratee`. The iteratee is invoked\n     * with three arguments: (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.8.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapValues\n     * @example\n     *\n     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {\n     *   return key + value;\n     * });\n     * // => { 'a1': 1, 'b2': 2 }\n     */\n    function mapKeys(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, iteratee(value, key, object), value);\n      });\n      return result;\n    }\n\n    /**\n     * Creates an object with the same keys as `object` and values generated\n     * by running each own enumerable string keyed property of `object` thru\n     * `iteratee`. The iteratee is invoked with three arguments:\n     * (value, key, object).\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Object} Returns the new mapped object.\n     * @see _.mapKeys\n     * @example\n     *\n     * var users = {\n     *   'fred':    { 'user': 'fred',    'age': 40 },\n     *   'pebbles': { 'user': 'pebbles', 'age': 1 }\n     * };\n     *\n     * _.mapValues(users, function(o) { return o.age; });\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.mapValues(users, 'age');\n     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n     */\n    function mapValues(object, iteratee) {\n      var result = {};\n      iteratee = getIteratee(iteratee, 3);\n\n      baseForOwn(object, function(value, key, object) {\n        baseAssignValue(result, key, iteratee(value, key, object));\n      });\n      return result;\n    }\n\n    /**\n     * This method is like `_.assign` except that it recursively merges own and\n     * inherited enumerable string keyed properties of source objects into the\n     * destination object. Source properties that resolve to `undefined` are\n     * skipped if a destination value exists. Array and plain object properties\n     * are merged recursively. Other objects and value types are overridden by\n     * assignment. Source objects are applied from left to right. Subsequent\n     * sources overwrite property assignments of previous sources.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.5.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} [sources] The source objects.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {\n     *   'a': [{ 'b': 2 }, { 'd': 4 }]\n     * };\n     *\n     * var other = {\n     *   'a': [{ 'c': 3 }, { 'e': 5 }]\n     * };\n     *\n     * _.merge(object, other);\n     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n     */\n    var merge = createAssigner(function(object, source, srcIndex) {\n      baseMerge(object, source, srcIndex);\n    });\n\n    /**\n     * This method is like `_.merge` except that it accepts `customizer` which\n     * is invoked to produce the merged values of the destination and source\n     * properties. If `customizer` returns `undefined`, merging is handled by the\n     * method instead. The `customizer` is invoked with six arguments:\n     * (objValue, srcValue, key, object, source, stack).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The destination object.\n     * @param {...Object} sources The source objects.\n     * @param {Function} customizer The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * function customizer(objValue, srcValue) {\n     *   if (_.isArray(objValue)) {\n     *     return objValue.concat(srcValue);\n     *   }\n     * }\n     *\n     * var object = { 'a': [1], 'b': [2] };\n     * var other = { 'a': [3], 'b': [4] };\n     *\n     * _.mergeWith(object, other, customizer);\n     * // => { 'a': [1, 3], 'b': [2, 4] }\n     */\n    var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\n      baseMerge(object, source, srcIndex, customizer);\n    });\n\n    /**\n     * The opposite of `_.pick`; this method creates an object composed of the\n     * own and inherited enumerable property paths of `object` that are not omitted.\n     *\n     * **Note:** This method is considerably slower than `_.pick`.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to omit.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omit(object, ['a', 'c']);\n     * // => { 'b': '2' }\n     */\n    var omit = flatRest(function(object, paths) {\n      var result = {};\n      if (object == null) {\n        return result;\n      }\n      var isDeep = false;\n      paths = arrayMap(paths, function(path) {\n        path = castPath(path, object);\n        isDeep || (isDeep = path.length > 1);\n        return path;\n      });\n      copyObject(object, getAllKeysIn(object), result);\n      if (isDeep) {\n        result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\n      }\n      var length = paths.length;\n      while (length--) {\n        baseUnset(result, paths[length]);\n      }\n      return result;\n    });\n\n    /**\n     * The opposite of `_.pickBy`; this method creates an object composed of\n     * the own and inherited enumerable string keyed properties of `object` that\n     * `predicate` doesn't return truthy for. The predicate is invoked with two\n     * arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.omitBy(object, _.isNumber);\n     * // => { 'b': '2' }\n     */\n    function omitBy(object, predicate) {\n      return pickBy(object, negate(getIteratee(predicate)));\n    }\n\n    /**\n     * Creates an object composed of the picked `object` properties.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {...(string|string[])} [paths] The property paths to pick.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pick(object, ['a', 'c']);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    var pick = flatRest(function(object, paths) {\n      return object == null ? {} : basePick(object, paths);\n    });\n\n    /**\n     * Creates an object composed of the `object` properties `predicate` returns\n     * truthy for. The predicate is invoked with two arguments: (value, key).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The source object.\n     * @param {Function} [predicate=_.identity] The function invoked per property.\n     * @returns {Object} Returns the new object.\n     * @example\n     *\n     * var object = { 'a': 1, 'b': '2', 'c': 3 };\n     *\n     * _.pickBy(object, _.isNumber);\n     * // => { 'a': 1, 'c': 3 }\n     */\n    function pickBy(object, predicate) {\n      if (object == null) {\n        return {};\n      }\n      var props = arrayMap(getAllKeysIn(object), function(prop) {\n        return [prop];\n      });\n      predicate = getIteratee(predicate);\n      return basePickBy(object, props, function(value, path) {\n        return predicate(value, path[0]);\n      });\n    }\n\n    /**\n     * This method is like `_.get` except that if the resolved value is a\n     * function it's invoked with the `this` binding of its parent object and\n     * its result is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @param {Array|string} path The path of the property to resolve.\n     * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\n     *\n     * _.result(object, 'a[0].b.c1');\n     * // => 3\n     *\n     * _.result(object, 'a[0].b.c2');\n     * // => 4\n     *\n     * _.result(object, 'a[0].b.c3', 'default');\n     * // => 'default'\n     *\n     * _.result(object, 'a[0].b.c3', _.constant('default'));\n     * // => 'default'\n     */\n    function result(object, path, defaultValue) {\n      path = castPath(path, object);\n\n      var index = -1,\n          length = path.length;\n\n      // Ensure the loop is entered when path is empty.\n      if (!length) {\n        length = 1;\n        object = undefined;\n      }\n      while (++index < length) {\n        var value = object == null ? undefined : object[toKey(path[index])];\n        if (value === undefined) {\n          index = length;\n          value = defaultValue;\n        }\n        object = isFunction(value) ? value.call(object) : value;\n      }\n      return object;\n    }\n\n    /**\n     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n     * it's created. Arrays are created for missing index properties while objects\n     * are created for all other missing properties. Use `_.setWith` to customize\n     * `path` creation.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.set(object, 'a[0].b.c', 4);\n     * console.log(object.a[0].b.c);\n     * // => 4\n     *\n     * _.set(object, ['x', '0', 'y', 'z'], 5);\n     * console.log(object.x[0].y.z);\n     * // => 5\n     */\n    function set(object, path, value) {\n      return object == null ? object : baseSet(object, path, value);\n    }\n\n    /**\n     * This method is like `_.set` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {*} value The value to set.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.setWith(object, '[0][1]', 'a', Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function setWith(object, path, value, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseSet(object, path, value, customizer);\n    }\n\n    /**\n     * Creates an array of own enumerable string keyed-value pairs for `object`\n     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its\n     * entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entries\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairs(new Foo);\n     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)\n     */\n    var toPairs = createToPairs(keys);\n\n    /**\n     * Creates an array of own and inherited enumerable string keyed-value pairs\n     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map\n     * or set, its entries are returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @alias entriesIn\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the key-value pairs.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.toPairsIn(new Foo);\n     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)\n     */\n    var toPairsIn = createToPairs(keysIn);\n\n    /**\n     * An alternative to `_.reduce`; this method transforms `object` to a new\n     * `accumulator` object which is the result of running each of its own\n     * enumerable string keyed properties thru `iteratee`, with each invocation\n     * potentially mutating the `accumulator` object. If `accumulator` is not\n     * provided, a new object with the same `[[Prototype]]` will be used. The\n     * iteratee is invoked with four arguments: (accumulator, value, key, object).\n     * Iteratee functions may exit iteration early by explicitly returning `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.3.0\n     * @category Object\n     * @param {Object} object The object to iterate over.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @param {*} [accumulator] The custom accumulator value.\n     * @returns {*} Returns the accumulated value.\n     * @example\n     *\n     * _.transform([2, 3, 4], function(result, n) {\n     *   result.push(n *= n);\n     *   return n % 2 == 0;\n     * }, []);\n     * // => [4, 9]\n     *\n     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\n     *   (result[value] || (result[value] = [])).push(key);\n     * }, {});\n     * // => { '1': ['a', 'c'], '2': ['b'] }\n     */\n    function transform(object, iteratee, accumulator) {\n      var isArr = isArray(object),\n          isArrLike = isArr || isBuffer(object) || isTypedArray(object);\n\n      iteratee = getIteratee(iteratee, 4);\n      if (accumulator == null) {\n        var Ctor = object && object.constructor;\n        if (isArrLike) {\n          accumulator = isArr ? new Ctor : [];\n        }\n        else if (isObject(object)) {\n          accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};\n        }\n        else {\n          accumulator = {};\n        }\n      }\n      (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {\n        return iteratee(accumulator, value, index, object);\n      });\n      return accumulator;\n    }\n\n    /**\n     * Removes the property at `path` of `object`.\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to unset.\n     * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 7 } }] };\n     * _.unset(object, 'a[0].b.c');\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     *\n     * _.unset(object, ['a', '0', 'b', 'c']);\n     * // => true\n     *\n     * console.log(object);\n     * // => { 'a': [{ 'b': {} }] };\n     */\n    function unset(object, path) {\n      return object == null ? true : baseUnset(object, path);\n    }\n\n    /**\n     * This method is like `_.set` except that accepts `updater` to produce the\n     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`\n     * is invoked with one argument: (value).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n     *\n     * _.update(object, 'a[0].b.c', function(n) { return n * n; });\n     * console.log(object.a[0].b.c);\n     * // => 9\n     *\n     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });\n     * console.log(object.x[0].y.z);\n     * // => 0\n     */\n    function update(object, path, updater) {\n      return object == null ? object : baseUpdate(object, path, castFunction(updater));\n    }\n\n    /**\n     * This method is like `_.update` except that it accepts `customizer` which is\n     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`\n     * path creation is handled by the method instead. The `customizer` is invoked\n     * with three arguments: (nsValue, key, nsObject).\n     *\n     * **Note:** This method mutates `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.6.0\n     * @category Object\n     * @param {Object} object The object to modify.\n     * @param {Array|string} path The path of the property to set.\n     * @param {Function} updater The function to produce the updated value.\n     * @param {Function} [customizer] The function to customize assigned values.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var object = {};\n     *\n     * _.updateWith(object, '[0][1]', _.constant('a'), Object);\n     * // => { '0': { '1': 'a' } }\n     */\n    function updateWith(object, path, updater, customizer) {\n      customizer = typeof customizer == 'function' ? customizer : undefined;\n      return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);\n    }\n\n    /**\n     * Creates an array of the own enumerable string keyed property values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.values(new Foo);\n     * // => [1, 2] (iteration order is not guaranteed)\n     *\n     * _.values('hi');\n     * // => ['h', 'i']\n     */\n    function values(object) {\n      return object == null ? [] : baseValues(object, keys(object));\n    }\n\n    /**\n     * Creates an array of the own and inherited enumerable string keyed property\n     * values of `object`.\n     *\n     * **Note:** Non-object values are coerced to objects.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Object\n     * @param {Object} object The object to query.\n     * @returns {Array} Returns the array of property values.\n     * @example\n     *\n     * function Foo() {\n     *   this.a = 1;\n     *   this.b = 2;\n     * }\n     *\n     * Foo.prototype.c = 3;\n     *\n     * _.valuesIn(new Foo);\n     * // => [1, 2, 3] (iteration order is not guaranteed)\n     */\n    function valuesIn(object) {\n      return object == null ? [] : baseValues(object, keysIn(object));\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Clamps `number` within the inclusive `lower` and `upper` bounds.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Number\n     * @param {number} number The number to clamp.\n     * @param {number} [lower] The lower bound.\n     * @param {number} upper The upper bound.\n     * @returns {number} Returns the clamped number.\n     * @example\n     *\n     * _.clamp(-10, -5, 5);\n     * // => -5\n     *\n     * _.clamp(10, -5, 5);\n     * // => 5\n     */\n    function clamp(number, lower, upper) {\n      if (upper === undefined) {\n        upper = lower;\n        lower = undefined;\n      }\n      if (upper !== undefined) {\n        upper = toNumber(upper);\n        upper = upper === upper ? upper : 0;\n      }\n      if (lower !== undefined) {\n        lower = toNumber(lower);\n        lower = lower === lower ? lower : 0;\n      }\n      return baseClamp(toNumber(number), lower, upper);\n    }\n\n    /**\n     * Checks if `n` is between `start` and up to, but not including, `end`. If\n     * `end` is not specified, it's set to `start` with `start` then set to `0`.\n     * If `start` is greater than `end` the params are swapped to support\n     * negative ranges.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.3.0\n     * @category Number\n     * @param {number} number The number to check.\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.\n     * @see _.range, _.rangeRight\n     * @example\n     *\n     * _.inRange(3, 2, 4);\n     * // => true\n     *\n     * _.inRange(4, 8);\n     * // => true\n     *\n     * _.inRange(4, 2);\n     * // => false\n     *\n     * _.inRange(2, 2);\n     * // => false\n     *\n     * _.inRange(1.2, 2);\n     * // => true\n     *\n     * _.inRange(5.2, 4);\n     * // => false\n     *\n     * _.inRange(-3, -2, -6);\n     * // => true\n     */\n    function inRange(number, start, end) {\n      start = toFinite(start);\n      if (end === undefined) {\n        end = start;\n        start = 0;\n      } else {\n        end = toFinite(end);\n      }\n      number = toNumber(number);\n      return baseInRange(number, start, end);\n    }\n\n    /**\n     * Produces a random number between the inclusive `lower` and `upper` bounds.\n     * If only one argument is provided a number between `0` and the given number\n     * is returned. If `floating` is `true`, or either `lower` or `upper` are\n     * floats, a floating-point number is returned instead of an integer.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @memberOf _\n     * @since 0.7.0\n     * @category Number\n     * @param {number} [lower=0] The lower bound.\n     * @param {number} [upper=1] The upper bound.\n     * @param {boolean} [floating] Specify returning a floating-point number.\n     * @returns {number} Returns the random number.\n     * @example\n     *\n     * _.random(0, 5);\n     * // => an integer between 0 and 5\n     *\n     * _.random(5);\n     * // => also an integer between 0 and 5\n     *\n     * _.random(5, true);\n     * // => a floating-point number between 0 and 5\n     *\n     * _.random(1.2, 5.2);\n     * // => a floating-point number between 1.2 and 5.2\n     */\n    function random(lower, upper, floating) {\n      if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\n        upper = floating = undefined;\n      }\n      if (floating === undefined) {\n        if (typeof upper == 'boolean') {\n          floating = upper;\n          upper = undefined;\n        }\n        else if (typeof lower == 'boolean') {\n          floating = lower;\n          lower = undefined;\n        }\n      }\n      if (lower === undefined && upper === undefined) {\n        lower = 0;\n        upper = 1;\n      }\n      else {\n        lower = toFinite(lower);\n        if (upper === undefined) {\n          upper = lower;\n          lower = 0;\n        } else {\n          upper = toFinite(upper);\n        }\n      }\n      if (lower > upper) {\n        var temp = lower;\n        lower = upper;\n        upper = temp;\n      }\n      if (floating || lower % 1 || upper % 1) {\n        var rand = nativeRandom();\n        return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\n      }\n      return baseRandom(lower, upper);\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the camel cased string.\n     * @example\n     *\n     * _.camelCase('Foo Bar');\n     * // => 'fooBar'\n     *\n     * _.camelCase('--foo-bar--');\n     * // => 'fooBar'\n     *\n     * _.camelCase('__FOO_BAR__');\n     * // => 'fooBar'\n     */\n    var camelCase = createCompounder(function(result, word, index) {\n      word = word.toLowerCase();\n      return result + (index ? capitalize(word) : word);\n    });\n\n    /**\n     * Converts the first character of `string` to upper case and the remaining\n     * to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to capitalize.\n     * @returns {string} Returns the capitalized string.\n     * @example\n     *\n     * _.capitalize('FRED');\n     * // => 'Fred'\n     */\n    function capitalize(string) {\n      return upperFirst(toString(string).toLowerCase());\n    }\n\n    /**\n     * Deburrs `string` by converting\n     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n     * letters to basic Latin letters and removing\n     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to deburr.\n     * @returns {string} Returns the deburred string.\n     * @example\n     *\n     * _.deburr('déjà vu');\n     * // => 'deja vu'\n     */\n    function deburr(string) {\n      string = toString(string);\n      return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n    }\n\n    /**\n     * Checks if `string` ends with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=string.length] The position to search up to.\n     * @returns {boolean} Returns `true` if `string` ends with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.endsWith('abc', 'c');\n     * // => true\n     *\n     * _.endsWith('abc', 'b');\n     * // => false\n     *\n     * _.endsWith('abc', 'b', 2);\n     * // => true\n     */\n    function endsWith(string, target, position) {\n      string = toString(string);\n      target = baseToString(target);\n\n      var length = string.length;\n      position = position === undefined\n        ? length\n        : baseClamp(toInteger(position), 0, length);\n\n      var end = position;\n      position -= target.length;\n      return position >= 0 && string.slice(position, end) == target;\n    }\n\n    /**\n     * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\n     * corresponding HTML entities.\n     *\n     * **Note:** No other characters are escaped. To escape additional\n     * characters use a third-party library like [_he_](https://mths.be/he).\n     *\n     * Though the \">\" character is escaped for symmetry, characters like\n     * \">\" and \"/\" don't need escaping in HTML and have no special meaning\n     * unless they're part of a tag or unquoted attribute value. See\n     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\n     * (under \"semi-related fun fact\") for more details.\n     *\n     * When working with HTML you should always\n     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\n     * XSS vectors.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escape('fred, barney, & pebbles');\n     * // => 'fred, barney, &amp; pebbles'\n     */\n    function escape(string) {\n      string = toString(string);\n      return (string && reHasUnescapedHtml.test(string))\n        ? string.replace(reUnescapedHtml, escapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n     * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to escape.\n     * @returns {string} Returns the escaped string.\n     * @example\n     *\n     * _.escapeRegExp('[lodash](https://lodash.com/)');\n     * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n     */\n    function escapeRegExp(string) {\n      string = toString(string);\n      return (string && reHasRegExpChar.test(string))\n        ? string.replace(reRegExpChar, '\\\\$&')\n        : string;\n    }\n\n    /**\n     * Converts `string` to\n     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the kebab cased string.\n     * @example\n     *\n     * _.kebabCase('Foo Bar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('fooBar');\n     * // => 'foo-bar'\n     *\n     * _.kebabCase('__FOO_BAR__');\n     * // => 'foo-bar'\n     */\n    var kebabCase = createCompounder(function(result, word, index) {\n      return result + (index ? '-' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts `string`, as space separated words, to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.lowerCase('--Foo-Bar--');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('fooBar');\n     * // => 'foo bar'\n     *\n     * _.lowerCase('__FOO_BAR__');\n     * // => 'foo bar'\n     */\n    var lowerCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Converts the first character of `string` to lower case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.lowerFirst('Fred');\n     * // => 'fred'\n     *\n     * _.lowerFirst('FRED');\n     * // => 'fRED'\n     */\n    var lowerFirst = createCaseFirst('toLowerCase');\n\n    /**\n     * Pads `string` on the left and right sides if it's shorter than `length`.\n     * Padding characters are truncated if they can't be evenly divided by `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.pad('abc', 8);\n     * // => '  abc   '\n     *\n     * _.pad('abc', 8, '_-');\n     * // => '_-abc_-_'\n     *\n     * _.pad('abc', 3);\n     * // => 'abc'\n     */\n    function pad(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      if (!length || strLength >= length) {\n        return string;\n      }\n      var mid = (length - strLength) / 2;\n      return (\n        createPadding(nativeFloor(mid), chars) +\n        string +\n        createPadding(nativeCeil(mid), chars)\n      );\n    }\n\n    /**\n     * Pads `string` on the right side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padEnd('abc', 6);\n     * // => 'abc   '\n     *\n     * _.padEnd('abc', 6, '_-');\n     * // => 'abc_-_'\n     *\n     * _.padEnd('abc', 3);\n     * // => 'abc'\n     */\n    function padEnd(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (string + createPadding(length - strLength, chars))\n        : string;\n    }\n\n    /**\n     * Pads `string` on the left side if it's shorter than `length`. Padding\n     * characters are truncated if they exceed `length`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to pad.\n     * @param {number} [length=0] The padding length.\n     * @param {string} [chars=' '] The string used as padding.\n     * @returns {string} Returns the padded string.\n     * @example\n     *\n     * _.padStart('abc', 6);\n     * // => '   abc'\n     *\n     * _.padStart('abc', 6, '_-');\n     * // => '_-_abc'\n     *\n     * _.padStart('abc', 3);\n     * // => 'abc'\n     */\n    function padStart(string, length, chars) {\n      string = toString(string);\n      length = toInteger(length);\n\n      var strLength = length ? stringSize(string) : 0;\n      return (length && strLength < length)\n        ? (createPadding(length - strLength, chars) + string)\n        : string;\n    }\n\n    /**\n     * Converts `string` to an integer of the specified radix. If `radix` is\n     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a\n     * hexadecimal, in which case a `radix` of `16` is used.\n     *\n     * **Note:** This method aligns with the\n     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.\n     *\n     * @static\n     * @memberOf _\n     * @since 1.1.0\n     * @category String\n     * @param {string} string The string to convert.\n     * @param {number} [radix=10] The radix to interpret `value` by.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {number} Returns the converted integer.\n     * @example\n     *\n     * _.parseInt('08');\n     * // => 8\n     *\n     * _.map(['6', '08', '10'], _.parseInt);\n     * // => [6, 8, 10]\n     */\n    function parseInt(string, radix, guard) {\n      if (guard || radix == null) {\n        radix = 0;\n      } else if (radix) {\n        radix = +radix;\n      }\n      return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);\n    }\n\n    /**\n     * Repeats the given string `n` times.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to repeat.\n     * @param {number} [n=1] The number of times to repeat the string.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the repeated string.\n     * @example\n     *\n     * _.repeat('*', 3);\n     * // => '***'\n     *\n     * _.repeat('abc', 2);\n     * // => 'abcabc'\n     *\n     * _.repeat('abc', 0);\n     * // => ''\n     */\n    function repeat(string, n, guard) {\n      if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {\n        n = 1;\n      } else {\n        n = toInteger(n);\n      }\n      return baseRepeat(toString(string), n);\n    }\n\n    /**\n     * Replaces matches for `pattern` in `string` with `replacement`.\n     *\n     * **Note:** This method is based on\n     * [`String#replace`](https://mdn.io/String/replace).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to modify.\n     * @param {RegExp|string} pattern The pattern to replace.\n     * @param {Function|string} replacement The match replacement.\n     * @returns {string} Returns the modified string.\n     * @example\n     *\n     * _.replace('Hi Fred', 'Fred', 'Barney');\n     * // => 'Hi Barney'\n     */\n    function replace() {\n      var args = arguments,\n          string = toString(args[0]);\n\n      return args.length < 3 ? string : string.replace(args[1], args[2]);\n    }\n\n    /**\n     * Converts `string` to\n     * [snake case](https://en.wikipedia.org/wiki/Snake_case).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the snake cased string.\n     * @example\n     *\n     * _.snakeCase('Foo Bar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('fooBar');\n     * // => 'foo_bar'\n     *\n     * _.snakeCase('--FOO-BAR--');\n     * // => 'foo_bar'\n     */\n    var snakeCase = createCompounder(function(result, word, index) {\n      return result + (index ? '_' : '') + word.toLowerCase();\n    });\n\n    /**\n     * Splits `string` by `separator`.\n     *\n     * **Note:** This method is based on\n     * [`String#split`](https://mdn.io/String/split).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to split.\n     * @param {RegExp|string} separator The separator pattern to split by.\n     * @param {number} [limit] The length to truncate results to.\n     * @returns {Array} Returns the string segments.\n     * @example\n     *\n     * _.split('a-b-c', '-', 2);\n     * // => ['a', 'b']\n     */\n    function split(string, separator, limit) {\n      if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {\n        separator = limit = undefined;\n      }\n      limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;\n      if (!limit) {\n        return [];\n      }\n      string = toString(string);\n      if (string && (\n            typeof separator == 'string' ||\n            (separator != null && !isRegExp(separator))\n          )) {\n        separator = baseToString(separator);\n        if (!separator && hasUnicode(string)) {\n          return castSlice(stringToArray(string), 0, limit);\n        }\n      }\n      return string.split(separator, limit);\n    }\n\n    /**\n     * Converts `string` to\n     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).\n     *\n     * @static\n     * @memberOf _\n     * @since 3.1.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the start cased string.\n     * @example\n     *\n     * _.startCase('--foo-bar--');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('fooBar');\n     * // => 'Foo Bar'\n     *\n     * _.startCase('__FOO_BAR__');\n     * // => 'FOO BAR'\n     */\n    var startCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + upperFirst(word);\n    });\n\n    /**\n     * Checks if `string` starts with the given target string.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {string} [target] The string to search for.\n     * @param {number} [position=0] The position to search from.\n     * @returns {boolean} Returns `true` if `string` starts with `target`,\n     *  else `false`.\n     * @example\n     *\n     * _.startsWith('abc', 'a');\n     * // => true\n     *\n     * _.startsWith('abc', 'b');\n     * // => false\n     *\n     * _.startsWith('abc', 'b', 1);\n     * // => true\n     */\n    function startsWith(string, target, position) {\n      string = toString(string);\n      position = position == null\n        ? 0\n        : baseClamp(toInteger(position), 0, string.length);\n\n      target = baseToString(target);\n      return string.slice(position, position + target.length) == target;\n    }\n\n    /**\n     * Creates a compiled template function that can interpolate data properties\n     * in \"interpolate\" delimiters, HTML-escape interpolated data properties in\n     * \"escape\" delimiters, and execute JavaScript in \"evaluate\" delimiters. Data\n     * properties may be accessed as free variables in the template. If a setting\n     * object is given, it takes precedence over `_.templateSettings` values.\n     *\n     * **Note:** In the development build `_.template` utilizes\n     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)\n     * for easier debugging.\n     *\n     * For more information on precompiling templates see\n     * [lodash's custom builds documentation](https://lodash.com/custom-builds).\n     *\n     * For more information on Chrome extension sandboxes see\n     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category String\n     * @param {string} [string=''] The template string.\n     * @param {Object} [options={}] The options object.\n     * @param {RegExp} [options.escape=_.templateSettings.escape]\n     *  The HTML \"escape\" delimiter.\n     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]\n     *  The \"evaluate\" delimiter.\n     * @param {Object} [options.imports=_.templateSettings.imports]\n     *  An object to import into the template as free variables.\n     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]\n     *  The \"interpolate\" delimiter.\n     * @param {string} [options.sourceURL='lodash.templateSources[n]']\n     *  The sourceURL of the compiled template.\n     * @param {string} [options.variable='obj']\n     *  The data object variable name.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Function} Returns the compiled template function.\n     * @example\n     *\n     * // Use the \"interpolate\" delimiter to create a compiled template.\n     * var compiled = _.template('hello <%= user %>!');\n     * compiled({ 'user': 'fred' });\n     * // => 'hello fred!'\n     *\n     * // Use the HTML \"escape\" delimiter to escape data property values.\n     * var compiled = _.template('<b><%- value %></b>');\n     * compiled({ 'value': '<script>' });\n     * // => '<b>&lt;script&gt;</b>'\n     *\n     * // Use the \"evaluate\" delimiter to execute JavaScript and generate HTML.\n     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the internal `print` function in \"evaluate\" delimiters.\n     * var compiled = _.template('<% print(\"hello \" + user); %>!');\n     * compiled({ 'user': 'barney' });\n     * // => 'hello barney!'\n     *\n     * // Use the ES template literal delimiter as an \"interpolate\" delimiter.\n     * // Disable support by replacing the \"interpolate\" delimiter.\n     * var compiled = _.template('hello ${ user }!');\n     * compiled({ 'user': 'pebbles' });\n     * // => 'hello pebbles!'\n     *\n     * // Use backslashes to treat delimiters as plain text.\n     * var compiled = _.template('<%= \"\\\\<%- value %\\\\>\" %>');\n     * compiled({ 'value': 'ignored' });\n     * // => '<%- value %>'\n     *\n     * // Use the `imports` option to import `jQuery` as `jq`.\n     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';\n     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });\n     * compiled({ 'users': ['fred', 'barney'] });\n     * // => '<li>fred</li><li>barney</li>'\n     *\n     * // Use the `sourceURL` option to specify a custom sourceURL for the template.\n     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });\n     * compiled(data);\n     * // => Find the source of \"greeting.jst\" under the Sources tab or Resources panel of the web inspector.\n     *\n     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.\n     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });\n     * compiled.source;\n     * // => function(data) {\n     * //   var __t, __p = '';\n     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';\n     * //   return __p;\n     * // }\n     *\n     * // Use custom template delimiters.\n     * _.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n     * var compiled = _.template('hello {{ user }}!');\n     * compiled({ 'user': 'mustache' });\n     * // => 'hello mustache!'\n     *\n     * // Use the `source` property to inline compiled templates for meaningful\n     * // line numbers in error messages and stack traces.\n     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\\\n     *   var JST = {\\\n     *     \"main\": ' + _.template(mainText).source + '\\\n     *   };\\\n     * ');\n     */\n    function template(string, options, guard) {\n      // Based on John Resig's `tmpl` implementation\n      // (http://ejohn.org/blog/javascript-micro-templating/)\n      // and Laura Doktorova's doT.js (https://github.com/olado/doT).\n      var settings = lodash.templateSettings;\n\n      if (guard && isIterateeCall(string, options, guard)) {\n        options = undefined;\n      }\n      string = toString(string);\n      options = assignInWith({}, options, settings, customDefaultsAssignIn);\n\n      var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),\n          importsKeys = keys(imports),\n          importsValues = baseValues(imports, importsKeys);\n\n      var isEscaping,\n          isEvaluating,\n          index = 0,\n          interpolate = options.interpolate || reNoMatch,\n          source = \"__p += '\";\n\n      // Compile the regexp to match each delimiter.\n      var reDelimiters = RegExp(\n        (options.escape || reNoMatch).source + '|' +\n        interpolate.source + '|' +\n        (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +\n        (options.evaluate || reNoMatch).source + '|$'\n      , 'g');\n\n      // Use a sourceURL for easier debugging.\n      // The sourceURL gets injected into the source that's eval-ed, so be careful\n      // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in\n      // and escape the comment, thus injecting code that gets evaled.\n      var sourceURL = '//# sourceURL=' +\n        (hasOwnProperty.call(options, 'sourceURL')\n          ? (options.sourceURL + '').replace(/\\s/g, ' ')\n          : ('lodash.templateSources[' + (++templateCounter) + ']')\n        ) + '\\n';\n\n      string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {\n        interpolateValue || (interpolateValue = esTemplateValue);\n\n        // Escape characters that can't be included in string literals.\n        source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);\n\n        // Replace delimiters with snippets.\n        if (escapeValue) {\n          isEscaping = true;\n          source += \"' +\\n__e(\" + escapeValue + \") +\\n'\";\n        }\n        if (evaluateValue) {\n          isEvaluating = true;\n          source += \"';\\n\" + evaluateValue + \";\\n__p += '\";\n        }\n        if (interpolateValue) {\n          source += \"' +\\n((__t = (\" + interpolateValue + \")) == null ? '' : __t) +\\n'\";\n        }\n        index = offset + match.length;\n\n        // The JS engine embedded in Adobe products needs `match` returned in\n        // order to produce the correct `offset` value.\n        return match;\n      });\n\n      source += \"';\\n\";\n\n      // If `variable` is not specified wrap a with-statement around the generated\n      // code to add the data object to the top of the scope chain.\n      var variable = hasOwnProperty.call(options, 'variable') && options.variable;\n      if (!variable) {\n        source = 'with (obj) {\\n' + source + '\\n}\\n';\n      }\n      // Throw an error if a forbidden character was found in `variable`, to prevent\n      // potential command injection attacks.\n      else if (reForbiddenIdentifierChars.test(variable)) {\n        throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);\n      }\n\n      // Cleanup code by stripping empty strings.\n      source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)\n        .replace(reEmptyStringMiddle, '$1')\n        .replace(reEmptyStringTrailing, '$1;');\n\n      // Frame code as the function body.\n      source = 'function(' + (variable || 'obj') + ') {\\n' +\n        (variable\n          ? ''\n          : 'obj || (obj = {});\\n'\n        ) +\n        \"var __t, __p = ''\" +\n        (isEscaping\n           ? ', __e = _.escape'\n           : ''\n        ) +\n        (isEvaluating\n          ? ', __j = Array.prototype.join;\\n' +\n            \"function print() { __p += __j.call(arguments, '') }\\n\"\n          : ';\\n'\n        ) +\n        source +\n        'return __p\\n}';\n\n      var result = attempt(function() {\n        return Function(importsKeys, sourceURL + 'return ' + source)\n          .apply(undefined, importsValues);\n      });\n\n      // Provide the compiled function's source by its `toString` method or\n      // the `source` property as a convenience for inlining compiled templates.\n      result.source = source;\n      if (isError(result)) {\n        throw result;\n      }\n      return result;\n    }\n\n    /**\n     * Converts `string`, as a whole, to lower case just like\n     * [String#toLowerCase](https://mdn.io/toLowerCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the lower cased string.\n     * @example\n     *\n     * _.toLower('--Foo-Bar--');\n     * // => '--foo-bar--'\n     *\n     * _.toLower('fooBar');\n     * // => 'foobar'\n     *\n     * _.toLower('__FOO_BAR__');\n     * // => '__foo_bar__'\n     */\n    function toLower(value) {\n      return toString(value).toLowerCase();\n    }\n\n    /**\n     * Converts `string`, as a whole, to upper case just like\n     * [String#toUpperCase](https://mdn.io/toUpperCase).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.toUpper('--foo-bar--');\n     * // => '--FOO-BAR--'\n     *\n     * _.toUpper('fooBar');\n     * // => 'FOOBAR'\n     *\n     * _.toUpper('__foo_bar__');\n     * // => '__FOO_BAR__'\n     */\n    function toUpper(value) {\n      return toString(value).toUpperCase();\n    }\n\n    /**\n     * Removes leading and trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trim('  abc  ');\n     * // => 'abc'\n     *\n     * _.trim('-_-abc-_-', '_-');\n     * // => 'abc'\n     *\n     * _.map(['  foo  ', '  bar  '], _.trim);\n     * // => ['foo', 'bar']\n     */\n    function trim(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return baseTrim(string);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          chrSymbols = stringToArray(chars),\n          start = charsStartIndex(strSymbols, chrSymbols),\n          end = charsEndIndex(strSymbols, chrSymbols) + 1;\n\n      return castSlice(strSymbols, start, end).join('');\n    }\n\n    /**\n     * Removes trailing whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimEnd('  abc  ');\n     * // => '  abc'\n     *\n     * _.trimEnd('-_-abc-_-', '_-');\n     * // => '-_-abc'\n     */\n    function trimEnd(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.slice(0, trimmedEndIndex(string) + 1);\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;\n\n      return castSlice(strSymbols, 0, end).join('');\n    }\n\n    /**\n     * Removes leading whitespace or specified characters from `string`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to trim.\n     * @param {string} [chars=whitespace] The characters to trim.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {string} Returns the trimmed string.\n     * @example\n     *\n     * _.trimStart('  abc  ');\n     * // => 'abc  '\n     *\n     * _.trimStart('-_-abc-_-', '_-');\n     * // => 'abc-_-'\n     */\n    function trimStart(string, chars, guard) {\n      string = toString(string);\n      if (string && (guard || chars === undefined)) {\n        return string.replace(reTrimStart, '');\n      }\n      if (!string || !(chars = baseToString(chars))) {\n        return string;\n      }\n      var strSymbols = stringToArray(string),\n          start = charsStartIndex(strSymbols, stringToArray(chars));\n\n      return castSlice(strSymbols, start).join('');\n    }\n\n    /**\n     * Truncates `string` if it's longer than the given maximum string length.\n     * The last characters of the truncated string are replaced with the omission\n     * string which defaults to \"...\".\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to truncate.\n     * @param {Object} [options={}] The options object.\n     * @param {number} [options.length=30] The maximum string length.\n     * @param {string} [options.omission='...'] The string to indicate text is omitted.\n     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.\n     * @returns {string} Returns the truncated string.\n     * @example\n     *\n     * _.truncate('hi-diddly-ho there, neighborino');\n     * // => 'hi-diddly-ho there, neighbo...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': ' '\n     * });\n     * // => 'hi-diddly-ho there,...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'length': 24,\n     *   'separator': /,? +/\n     * });\n     * // => 'hi-diddly-ho there...'\n     *\n     * _.truncate('hi-diddly-ho there, neighborino', {\n     *   'omission': ' [...]'\n     * });\n     * // => 'hi-diddly-ho there, neig [...]'\n     */\n    function truncate(string, options) {\n      var length = DEFAULT_TRUNC_LENGTH,\n          omission = DEFAULT_TRUNC_OMISSION;\n\n      if (isObject(options)) {\n        var separator = 'separator' in options ? options.separator : separator;\n        length = 'length' in options ? toInteger(options.length) : length;\n        omission = 'omission' in options ? baseToString(options.omission) : omission;\n      }\n      string = toString(string);\n\n      var strLength = string.length;\n      if (hasUnicode(string)) {\n        var strSymbols = stringToArray(string);\n        strLength = strSymbols.length;\n      }\n      if (length >= strLength) {\n        return string;\n      }\n      var end = length - stringSize(omission);\n      if (end < 1) {\n        return omission;\n      }\n      var result = strSymbols\n        ? castSlice(strSymbols, 0, end).join('')\n        : string.slice(0, end);\n\n      if (separator === undefined) {\n        return result + omission;\n      }\n      if (strSymbols) {\n        end += (result.length - end);\n      }\n      if (isRegExp(separator)) {\n        if (string.slice(end).search(separator)) {\n          var match,\n              substring = result;\n\n          if (!separator.global) {\n            separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');\n          }\n          separator.lastIndex = 0;\n          while ((match = separator.exec(substring))) {\n            var newEnd = match.index;\n          }\n          result = result.slice(0, newEnd === undefined ? end : newEnd);\n        }\n      } else if (string.indexOf(baseToString(separator), end) != end) {\n        var index = result.lastIndexOf(separator);\n        if (index > -1) {\n          result = result.slice(0, index);\n        }\n      }\n      return result + omission;\n    }\n\n    /**\n     * The inverse of `_.escape`; this method converts the HTML entities\n     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to\n     * their corresponding characters.\n     *\n     * **Note:** No other HTML entities are unescaped. To unescape additional\n     * HTML entities use a third-party library like [_he_](https://mths.be/he).\n     *\n     * @static\n     * @memberOf _\n     * @since 0.6.0\n     * @category String\n     * @param {string} [string=''] The string to unescape.\n     * @returns {string} Returns the unescaped string.\n     * @example\n     *\n     * _.unescape('fred, barney, &amp; pebbles');\n     * // => 'fred, barney, & pebbles'\n     */\n    function unescape(string) {\n      string = toString(string);\n      return (string && reHasEscapedHtml.test(string))\n        ? string.replace(reEscapedHtml, unescapeHtmlChar)\n        : string;\n    }\n\n    /**\n     * Converts `string`, as space separated words, to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the upper cased string.\n     * @example\n     *\n     * _.upperCase('--foo-bar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('fooBar');\n     * // => 'FOO BAR'\n     *\n     * _.upperCase('__foo_bar__');\n     * // => 'FOO BAR'\n     */\n    var upperCase = createCompounder(function(result, word, index) {\n      return result + (index ? ' ' : '') + word.toUpperCase();\n    });\n\n    /**\n     * Converts the first character of `string` to upper case.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category String\n     * @param {string} [string=''] The string to convert.\n     * @returns {string} Returns the converted string.\n     * @example\n     *\n     * _.upperFirst('fred');\n     * // => 'Fred'\n     *\n     * _.upperFirst('FRED');\n     * // => 'FRED'\n     */\n    var upperFirst = createCaseFirst('toUpperCase');\n\n    /**\n     * Splits `string` into an array of its words.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category String\n     * @param {string} [string=''] The string to inspect.\n     * @param {RegExp|string} [pattern] The pattern to match words.\n     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n     * @returns {Array} Returns the words of `string`.\n     * @example\n     *\n     * _.words('fred, barney, & pebbles');\n     * // => ['fred', 'barney', 'pebbles']\n     *\n     * _.words('fred, barney, & pebbles', /[^, ]+/g);\n     * // => ['fred', 'barney', '&', 'pebbles']\n     */\n    function words(string, pattern, guard) {\n      string = toString(string);\n      pattern = guard ? undefined : pattern;\n\n      if (pattern === undefined) {\n        return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n      }\n      return string.match(pattern) || [];\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Attempts to invoke `func`, returning either the result or the caught error\n     * object. Any additional arguments are provided to `func` when it's invoked.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Function} func The function to attempt.\n     * @param {...*} [args] The arguments to invoke `func` with.\n     * @returns {*} Returns the `func` result or error object.\n     * @example\n     *\n     * // Avoid throwing errors for invalid selectors.\n     * var elements = _.attempt(function(selector) {\n     *   return document.querySelectorAll(selector);\n     * }, '>_>');\n     *\n     * if (_.isError(elements)) {\n     *   elements = [];\n     * }\n     */\n    var attempt = baseRest(function(func, args) {\n      try {\n        return apply(func, undefined, args);\n      } catch (e) {\n        return isError(e) ? e : new Error(e);\n      }\n    });\n\n    /**\n     * Binds methods of an object to the object itself, overwriting the existing\n     * method.\n     *\n     * **Note:** This method doesn't set the \"length\" property of bound functions.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Object} object The object to bind and assign the bound methods to.\n     * @param {...(string|string[])} methodNames The object method names to bind.\n     * @returns {Object} Returns `object`.\n     * @example\n     *\n     * var view = {\n     *   'label': 'docs',\n     *   'click': function() {\n     *     console.log('clicked ' + this.label);\n     *   }\n     * };\n     *\n     * _.bindAll(view, ['click']);\n     * jQuery(element).on('click', view.click);\n     * // => Logs 'clicked docs' when clicked.\n     */\n    var bindAll = flatRest(function(object, methodNames) {\n      arrayEach(methodNames, function(key) {\n        key = toKey(key);\n        baseAssignValue(object, key, bind(object[key], object));\n      });\n      return object;\n    });\n\n    /**\n     * Creates a function that iterates over `pairs` and invokes the corresponding\n     * function of the first predicate to return truthy. The predicate-function\n     * pairs are invoked with the `this` binding and arguments of the created\n     * function.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Array} pairs The predicate-function pairs.\n     * @returns {Function} Returns the new composite function.\n     * @example\n     *\n     * var func = _.cond([\n     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],\n     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],\n     *   [_.stubTrue,                      _.constant('no match')]\n     * ]);\n     *\n     * func({ 'a': 1, 'b': 2 });\n     * // => 'matches A'\n     *\n     * func({ 'a': 0, 'b': 1 });\n     * // => 'matches B'\n     *\n     * func({ 'a': '1', 'b': '2' });\n     * // => 'no match'\n     */\n    function cond(pairs) {\n      var length = pairs == null ? 0 : pairs.length,\n          toIteratee = getIteratee();\n\n      pairs = !length ? [] : arrayMap(pairs, function(pair) {\n        if (typeof pair[1] != 'function') {\n          throw new TypeError(FUNC_ERROR_TEXT);\n        }\n        return [toIteratee(pair[0]), pair[1]];\n      });\n\n      return baseRest(function(args) {\n        var index = -1;\n        while (++index < length) {\n          var pair = pairs[index];\n          if (apply(pair[0], this, args)) {\n            return apply(pair[1], this, args);\n          }\n        }\n      });\n    }\n\n    /**\n     * Creates a function that invokes the predicate properties of `source` with\n     * the corresponding property values of a given object, returning `true` if\n     * all predicates return truthy, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.conformsTo` with\n     * `source` partially applied.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {Object} source The object of property predicates to conform to.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 2, 'b': 1 },\n     *   { 'a': 1, 'b': 2 }\n     * ];\n     *\n     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));\n     * // => [{ 'a': 1, 'b': 2 }]\n     */\n    function conforms(source) {\n      return baseConforms(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that returns `value`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {*} value The value to return from the new function.\n     * @returns {Function} Returns the new constant function.\n     * @example\n     *\n     * var objects = _.times(2, _.constant({ 'a': 1 }));\n     *\n     * console.log(objects);\n     * // => [{ 'a': 1 }, { 'a': 1 }]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => true\n     */\n    function constant(value) {\n      return function() {\n        return value;\n      };\n    }\n\n    /**\n     * Checks `value` to determine whether a default value should be returned in\n     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,\n     * or `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.14.0\n     * @category Util\n     * @param {*} value The value to check.\n     * @param {*} defaultValue The default value.\n     * @returns {*} Returns the resolved value.\n     * @example\n     *\n     * _.defaultTo(1, 10);\n     * // => 1\n     *\n     * _.defaultTo(undefined, 10);\n     * // => 10\n     */\n    function defaultTo(value, defaultValue) {\n      return (value == null || value !== value) ? defaultValue : value;\n    }\n\n    /**\n     * Creates a function that returns the result of invoking the given functions\n     * with the `this` binding of the created function, where each successive\n     * invocation is supplied the return value of the previous.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flowRight\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flow([_.add, square]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flow = createFlow();\n\n    /**\n     * This method is like `_.flow` except that it creates a function that\n     * invokes the given functions from right to left.\n     *\n     * @static\n     * @since 3.0.0\n     * @memberOf _\n     * @category Util\n     * @param {...(Function|Function[])} [funcs] The functions to invoke.\n     * @returns {Function} Returns the new composite function.\n     * @see _.flow\n     * @example\n     *\n     * function square(n) {\n     *   return n * n;\n     * }\n     *\n     * var addSquare = _.flowRight([square, _.add]);\n     * addSquare(1, 2);\n     * // => 9\n     */\n    var flowRight = createFlow(true);\n\n    /**\n     * This method returns the first argument it receives.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {*} value Any value.\n     * @returns {*} Returns `value`.\n     * @example\n     *\n     * var object = { 'a': 1 };\n     *\n     * console.log(_.identity(object) === object);\n     * // => true\n     */\n    function identity(value) {\n      return value;\n    }\n\n    /**\n     * Creates a function that invokes `func` with the arguments of the created\n     * function. If `func` is a property name, the created function returns the\n     * property value for a given element. If `func` is an array or object, the\n     * created function returns `true` for elements that contain the equivalent\n     * source properties, otherwise it returns `false`.\n     *\n     * @static\n     * @since 4.0.0\n     * @memberOf _\n     * @category Util\n     * @param {*} [func=_.identity] The value to convert to a callback.\n     * @returns {Function} Returns the callback.\n     * @example\n     *\n     * var users = [\n     *   { 'user': 'barney', 'age': 36, 'active': true },\n     *   { 'user': 'fred',   'age': 40, 'active': false }\n     * ];\n     *\n     * // The `_.matches` iteratee shorthand.\n     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\n     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\n     *\n     * // The `_.matchesProperty` iteratee shorthand.\n     * _.filter(users, _.iteratee(['user', 'fred']));\n     * // => [{ 'user': 'fred', 'age': 40 }]\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.map(users, _.iteratee('user'));\n     * // => ['barney', 'fred']\n     *\n     * // Create custom iteratee shorthands.\n     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\n     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {\n     *     return func.test(string);\n     *   };\n     * });\n     *\n     * _.filter(['abc', 'def'], /ef/);\n     * // => ['def']\n     */\n    function iteratee(func) {\n      return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between a given\n     * object and `source`, returning `true` if the given object has equivalent\n     * property values, else `false`.\n     *\n     * **Note:** The created function is equivalent to `_.isMatch` with `source`\n     * partially applied.\n     *\n     * Partial comparisons will match empty array and empty object `source`\n     * values against any array or object value, respectively. See `_.isEqual`\n     * for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} source The object of property values to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\n     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matches(source) {\n      return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that performs a partial deep comparison between the\n     * value at `path` of a given object to `srcValue`, returning `true` if the\n     * object value is equivalent, else `false`.\n     *\n     * **Note:** Partial comparisons will match empty array and empty object\n     * `srcValue` values against any array or object value, respectively. See\n     * `_.isEqual` for a list of supported value comparisons.\n     *\n     * **Note:** Multiple values can be checked by combining several matchers\n     * using `_.overSome`\n     *\n     * @static\n     * @memberOf _\n     * @since 3.2.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @param {*} srcValue The value to match.\n     * @returns {Function} Returns the new spec function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': 1, 'b': 2, 'c': 3 },\n     *   { 'a': 4, 'b': 5, 'c': 6 }\n     * ];\n     *\n     * _.find(objects, _.matchesProperty('a', 4));\n     * // => { 'a': 4, 'b': 5, 'c': 6 }\n     *\n     * // Checking for several possible values\n     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));\n     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]\n     */\n    function matchesProperty(path, srcValue) {\n      return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));\n    }\n\n    /**\n     * Creates a function that invokes the method at `path` of a given object.\n     * Any additional arguments are provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Array|string} path The path of the method to invoke.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': _.constant(2) } },\n     *   { 'a': { 'b': _.constant(1) } }\n     * ];\n     *\n     * _.map(objects, _.method('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(objects, _.method(['a', 'b']));\n     * // => [2, 1]\n     */\n    var method = baseRest(function(path, args) {\n      return function(object) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * The opposite of `_.method`; this method creates a function that invokes\n     * the method at a given path of `object`. Any additional arguments are\n     * provided to the invoked method.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.7.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @param {...*} [args] The arguments to invoke the method with.\n     * @returns {Function} Returns the new invoker function.\n     * @example\n     *\n     * var array = _.times(3, _.constant),\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.methodOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));\n     * // => [2, 0]\n     */\n    var methodOf = baseRest(function(object, args) {\n      return function(path) {\n        return baseInvoke(object, path, args);\n      };\n    });\n\n    /**\n     * Adds all own enumerable string keyed function properties of a source\n     * object to the destination object. If `object` is a function, then methods\n     * are added to its prototype as well.\n     *\n     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\n     * avoid conflicts caused by modifying the original.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {Function|Object} [object=lodash] The destination object.\n     * @param {Object} source The object of functions to add.\n     * @param {Object} [options={}] The options object.\n     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\n     * @returns {Function|Object} Returns `object`.\n     * @example\n     *\n     * function vowels(string) {\n     *   return _.filter(string, function(v) {\n     *     return /[aeiou]/i.test(v);\n     *   });\n     * }\n     *\n     * _.mixin({ 'vowels': vowels });\n     * _.vowels('fred');\n     * // => ['e']\n     *\n     * _('fred').vowels().value();\n     * // => ['e']\n     *\n     * _.mixin({ 'vowels': vowels }, { 'chain': false });\n     * _('fred').vowels();\n     * // => ['e']\n     */\n    function mixin(object, source, options) {\n      var props = keys(source),\n          methodNames = baseFunctions(source, props);\n\n      if (options == null &&\n          !(isObject(source) && (methodNames.length || !props.length))) {\n        options = source;\n        source = object;\n        object = this;\n        methodNames = baseFunctions(source, keys(source));\n      }\n      var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\n          isFunc = isFunction(object);\n\n      arrayEach(methodNames, function(methodName) {\n        var func = source[methodName];\n        object[methodName] = func;\n        if (isFunc) {\n          object.prototype[methodName] = function() {\n            var chainAll = this.__chain__;\n            if (chain || chainAll) {\n              var result = object(this.__wrapped__),\n                  actions = result.__actions__ = copyArray(this.__actions__);\n\n              actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\n              result.__chain__ = chainAll;\n              return result;\n            }\n            return func.apply(object, arrayPush([this.value()], arguments));\n          };\n        }\n      });\n\n      return object;\n    }\n\n    /**\n     * Reverts the `_` variable to its previous value and returns a reference to\n     * the `lodash` function.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @returns {Function} Returns the `lodash` function.\n     * @example\n     *\n     * var lodash = _.noConflict();\n     */\n    function noConflict() {\n      if (root._ === this) {\n        root._ = oldDash;\n      }\n      return this;\n    }\n\n    /**\n     * This method returns `undefined`.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.3.0\n     * @category Util\n     * @example\n     *\n     * _.times(2, _.noop);\n     * // => [undefined, undefined]\n     */\n    function noop() {\n      // No operation performed.\n    }\n\n    /**\n     * Creates a function that gets the argument at index `n`. If `n` is negative,\n     * the nth argument from the end is returned.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [n=0] The index of the argument to return.\n     * @returns {Function} Returns the new pass-thru function.\n     * @example\n     *\n     * var func = _.nthArg(1);\n     * func('a', 'b', 'c', 'd');\n     * // => 'b'\n     *\n     * var func = _.nthArg(-2);\n     * func('a', 'b', 'c', 'd');\n     * // => 'c'\n     */\n    function nthArg(n) {\n      n = toInteger(n);\n      return baseRest(function(args) {\n        return baseNth(args, n);\n      });\n    }\n\n    /**\n     * Creates a function that invokes `iteratees` with the arguments it receives\n     * and returns their results.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [iteratees=[_.identity]]\n     *  The iteratees to invoke.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.over([Math.max, Math.min]);\n     *\n     * func(1, 2, 3, 4);\n     * // => [4, 1]\n     */\n    var over = createOver(arrayMap);\n\n    /**\n     * Creates a function that checks if **all** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overEvery([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => false\n     *\n     * func(NaN);\n     * // => false\n     */\n    var overEvery = createOver(arrayEvery);\n\n    /**\n     * Creates a function that checks if **any** of the `predicates` return\n     * truthy when invoked with the arguments it receives.\n     *\n     * Following shorthands are possible for providing predicates.\n     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.\n     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {...(Function|Function[])} [predicates=[_.identity]]\n     *  The predicates to check.\n     * @returns {Function} Returns the new function.\n     * @example\n     *\n     * var func = _.overSome([Boolean, isFinite]);\n     *\n     * func('1');\n     * // => true\n     *\n     * func(null);\n     * // => true\n     *\n     * func(NaN);\n     * // => false\n     *\n     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])\n     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])\n     */\n    var overSome = createOver(arraySome);\n\n    /**\n     * Creates a function that returns the value at `path` of a given object.\n     *\n     * @static\n     * @memberOf _\n     * @since 2.4.0\n     * @category Util\n     * @param {Array|string} path The path of the property to get.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var objects = [\n     *   { 'a': { 'b': 2 } },\n     *   { 'a': { 'b': 1 } }\n     * ];\n     *\n     * _.map(objects, _.property('a.b'));\n     * // => [2, 1]\n     *\n     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n     * // => [1, 2]\n     */\n    function property(path) {\n      return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n    }\n\n    /**\n     * The opposite of `_.property`; this method creates a function that returns\n     * the value at a given path of `object`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.0.0\n     * @category Util\n     * @param {Object} object The object to query.\n     * @returns {Function} Returns the new accessor function.\n     * @example\n     *\n     * var array = [0, 1, 2],\n     *     object = { 'a': array, 'b': array, 'c': array };\n     *\n     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));\n     * // => [2, 0]\n     *\n     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));\n     * // => [2, 0]\n     */\n    function propertyOf(object) {\n      return function(path) {\n        return object == null ? undefined : baseGet(object, path);\n      };\n    }\n\n    /**\n     * Creates an array of numbers (positive and/or negative) progressing from\n     * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n     * `start` is specified without an `end` or `step`. If `end` is not specified,\n     * it's set to `start` with `start` then set to `0`.\n     *\n     * **Note:** JavaScript follows the IEEE-754 standard for resolving\n     * floating-point values which can produce unexpected results.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.rangeRight\n     * @example\n     *\n     * _.range(4);\n     * // => [0, 1, 2, 3]\n     *\n     * _.range(-4);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 5);\n     * // => [1, 2, 3, 4]\n     *\n     * _.range(0, 20, 5);\n     * // => [0, 5, 10, 15]\n     *\n     * _.range(0, -4, -1);\n     * // => [0, -1, -2, -3]\n     *\n     * _.range(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.range(0);\n     * // => []\n     */\n    var range = createRange();\n\n    /**\n     * This method is like `_.range` except that it populates values in\n     * descending order.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {number} [start=0] The start of the range.\n     * @param {number} end The end of the range.\n     * @param {number} [step=1] The value to increment or decrement by.\n     * @returns {Array} Returns the range of numbers.\n     * @see _.inRange, _.range\n     * @example\n     *\n     * _.rangeRight(4);\n     * // => [3, 2, 1, 0]\n     *\n     * _.rangeRight(-4);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 5);\n     * // => [4, 3, 2, 1]\n     *\n     * _.rangeRight(0, 20, 5);\n     * // => [15, 10, 5, 0]\n     *\n     * _.rangeRight(0, -4, -1);\n     * // => [-3, -2, -1, 0]\n     *\n     * _.rangeRight(1, 4, 0);\n     * // => [1, 1, 1]\n     *\n     * _.rangeRight(0);\n     * // => []\n     */\n    var rangeRight = createRange(true);\n\n    /**\n     * This method returns a new empty array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Array} Returns the new empty array.\n     * @example\n     *\n     * var arrays = _.times(2, _.stubArray);\n     *\n     * console.log(arrays);\n     * // => [[], []]\n     *\n     * console.log(arrays[0] === arrays[1]);\n     * // => false\n     */\n    function stubArray() {\n      return [];\n    }\n\n    /**\n     * This method returns `false`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `false`.\n     * @example\n     *\n     * _.times(2, _.stubFalse);\n     * // => [false, false]\n     */\n    function stubFalse() {\n      return false;\n    }\n\n    /**\n     * This method returns a new empty object.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {Object} Returns the new empty object.\n     * @example\n     *\n     * var objects = _.times(2, _.stubObject);\n     *\n     * console.log(objects);\n     * // => [{}, {}]\n     *\n     * console.log(objects[0] === objects[1]);\n     * // => false\n     */\n    function stubObject() {\n      return {};\n    }\n\n    /**\n     * This method returns an empty string.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {string} Returns the empty string.\n     * @example\n     *\n     * _.times(2, _.stubString);\n     * // => ['', '']\n     */\n    function stubString() {\n      return '';\n    }\n\n    /**\n     * This method returns `true`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.13.0\n     * @category Util\n     * @returns {boolean} Returns `true`.\n     * @example\n     *\n     * _.times(2, _.stubTrue);\n     * // => [true, true]\n     */\n    function stubTrue() {\n      return true;\n    }\n\n    /**\n     * Invokes the iteratee `n` times, returning an array of the results of\n     * each invocation. The iteratee is invoked with one argument; (index).\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {number} n The number of times to invoke `iteratee`.\n     * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n     * @returns {Array} Returns the array of results.\n     * @example\n     *\n     * _.times(3, String);\n     * // => ['0', '1', '2']\n     *\n     *  _.times(4, _.constant(0));\n     * // => [0, 0, 0, 0]\n     */\n    function times(n, iteratee) {\n      n = toInteger(n);\n      if (n < 1 || n > MAX_SAFE_INTEGER) {\n        return [];\n      }\n      var index = MAX_ARRAY_LENGTH,\n          length = nativeMin(n, MAX_ARRAY_LENGTH);\n\n      iteratee = getIteratee(iteratee);\n      n -= MAX_ARRAY_LENGTH;\n\n      var result = baseTimes(length, iteratee);\n      while (++index < n) {\n        iteratee(index);\n      }\n      return result;\n    }\n\n    /**\n     * Converts `value` to a property path array.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Util\n     * @param {*} value The value to convert.\n     * @returns {Array} Returns the new property path array.\n     * @example\n     *\n     * _.toPath('a.b.c');\n     * // => ['a', 'b', 'c']\n     *\n     * _.toPath('a[0].b.c');\n     * // => ['a', '0', 'b', 'c']\n     */\n    function toPath(value) {\n      if (isArray(value)) {\n        return arrayMap(value, toKey);\n      }\n      return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));\n    }\n\n    /**\n     * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Util\n     * @param {string} [prefix=''] The value to prefix the ID with.\n     * @returns {string} Returns the unique ID.\n     * @example\n     *\n     * _.uniqueId('contact_');\n     * // => 'contact_104'\n     *\n     * _.uniqueId();\n     * // => '105'\n     */\n    function uniqueId(prefix) {\n      var id = ++idCounter;\n      return toString(prefix) + id;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * Adds two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {number} augend The first number in an addition.\n     * @param {number} addend The second number in an addition.\n     * @returns {number} Returns the total.\n     * @example\n     *\n     * _.add(6, 4);\n     * // => 10\n     */\n    var add = createMathOperation(function(augend, addend) {\n      return augend + addend;\n    }, 0);\n\n    /**\n     * Computes `number` rounded up to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round up.\n     * @param {number} [precision=0] The precision to round up to.\n     * @returns {number} Returns the rounded up number.\n     * @example\n     *\n     * _.ceil(4.006);\n     * // => 5\n     *\n     * _.ceil(6.004, 2);\n     * // => 6.01\n     *\n     * _.ceil(6040, -2);\n     * // => 6100\n     */\n    var ceil = createRound('ceil');\n\n    /**\n     * Divide two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} dividend The first number in a division.\n     * @param {number} divisor The second number in a division.\n     * @returns {number} Returns the quotient.\n     * @example\n     *\n     * _.divide(6, 4);\n     * // => 1.5\n     */\n    var divide = createMathOperation(function(dividend, divisor) {\n      return dividend / divisor;\n    }, 1);\n\n    /**\n     * Computes `number` rounded down to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round down.\n     * @param {number} [precision=0] The precision to round down to.\n     * @returns {number} Returns the rounded down number.\n     * @example\n     *\n     * _.floor(4.006);\n     * // => 4\n     *\n     * _.floor(0.046, 2);\n     * // => 0.04\n     *\n     * _.floor(4060, -2);\n     * // => 4000\n     */\n    var floor = createRound('floor');\n\n    /**\n     * Computes the maximum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * _.max([4, 2, 8, 6]);\n     * // => 8\n     *\n     * _.max([]);\n     * // => undefined\n     */\n    function max(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseGt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.max` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the maximum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.maxBy(objects, function(o) { return o.n; });\n     * // => { 'n': 2 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.maxBy(objects, 'n');\n     * // => { 'n': 2 }\n     */\n    function maxBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)\n        : undefined;\n    }\n\n    /**\n     * Computes the mean of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * _.mean([4, 2, 8, 6]);\n     * // => 5\n     */\n    function mean(array) {\n      return baseMean(array, identity);\n    }\n\n    /**\n     * This method is like `_.mean` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be averaged.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the mean.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.meanBy(objects, function(o) { return o.n; });\n     * // => 5\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.meanBy(objects, 'n');\n     * // => 5\n     */\n    function meanBy(array, iteratee) {\n      return baseMean(array, getIteratee(iteratee, 2));\n    }\n\n    /**\n     * Computes the minimum value of `array`. If `array` is empty or falsey,\n     * `undefined` is returned.\n     *\n     * @static\n     * @since 0.1.0\n     * @memberOf _\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * _.min([4, 2, 8, 6]);\n     * // => 2\n     *\n     * _.min([]);\n     * // => undefined\n     */\n    function min(array) {\n      return (array && array.length)\n        ? baseExtremum(array, identity, baseLt)\n        : undefined;\n    }\n\n    /**\n     * This method is like `_.min` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the criterion by which\n     * the value is ranked. The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {*} Returns the minimum value.\n     * @example\n     *\n     * var objects = [{ 'n': 1 }, { 'n': 2 }];\n     *\n     * _.minBy(objects, function(o) { return o.n; });\n     * // => { 'n': 1 }\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.minBy(objects, 'n');\n     * // => { 'n': 1 }\n     */\n    function minBy(array, iteratee) {\n      return (array && array.length)\n        ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)\n        : undefined;\n    }\n\n    /**\n     * Multiply two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.7.0\n     * @category Math\n     * @param {number} multiplier The first number in a multiplication.\n     * @param {number} multiplicand The second number in a multiplication.\n     * @returns {number} Returns the product.\n     * @example\n     *\n     * _.multiply(6, 4);\n     * // => 24\n     */\n    var multiply = createMathOperation(function(multiplier, multiplicand) {\n      return multiplier * multiplicand;\n    }, 1);\n\n    /**\n     * Computes `number` rounded to `precision`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.10.0\n     * @category Math\n     * @param {number} number The number to round.\n     * @param {number} [precision=0] The precision to round to.\n     * @returns {number} Returns the rounded number.\n     * @example\n     *\n     * _.round(4.006);\n     * // => 4\n     *\n     * _.round(4.006, 2);\n     * // => 4.01\n     *\n     * _.round(4060, -2);\n     * // => 4100\n     */\n    var round = createRound('round');\n\n    /**\n     * Subtract two numbers.\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {number} minuend The first number in a subtraction.\n     * @param {number} subtrahend The second number in a subtraction.\n     * @returns {number} Returns the difference.\n     * @example\n     *\n     * _.subtract(6, 4);\n     * // => 2\n     */\n    var subtract = createMathOperation(function(minuend, subtrahend) {\n      return minuend - subtrahend;\n    }, 0);\n\n    /**\n     * Computes the sum of the values in `array`.\n     *\n     * @static\n     * @memberOf _\n     * @since 3.4.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * _.sum([4, 2, 8, 6]);\n     * // => 20\n     */\n    function sum(array) {\n      return (array && array.length)\n        ? baseSum(array, identity)\n        : 0;\n    }\n\n    /**\n     * This method is like `_.sum` except that it accepts `iteratee` which is\n     * invoked for each element in `array` to generate the value to be summed.\n     * The iteratee is invoked with one argument: (value).\n     *\n     * @static\n     * @memberOf _\n     * @since 4.0.0\n     * @category Math\n     * @param {Array} array The array to iterate over.\n     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n     * @returns {number} Returns the sum.\n     * @example\n     *\n     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];\n     *\n     * _.sumBy(objects, function(o) { return o.n; });\n     * // => 20\n     *\n     * // The `_.property` iteratee shorthand.\n     * _.sumBy(objects, 'n');\n     * // => 20\n     */\n    function sumBy(array, iteratee) {\n      return (array && array.length)\n        ? baseSum(array, getIteratee(iteratee, 2))\n        : 0;\n    }\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return wrapped values in chain sequences.\n    lodash.after = after;\n    lodash.ary = ary;\n    lodash.assign = assign;\n    lodash.assignIn = assignIn;\n    lodash.assignInWith = assignInWith;\n    lodash.assignWith = assignWith;\n    lodash.at = at;\n    lodash.before = before;\n    lodash.bind = bind;\n    lodash.bindAll = bindAll;\n    lodash.bindKey = bindKey;\n    lodash.castArray = castArray;\n    lodash.chain = chain;\n    lodash.chunk = chunk;\n    lodash.compact = compact;\n    lodash.concat = concat;\n    lodash.cond = cond;\n    lodash.conforms = conforms;\n    lodash.constant = constant;\n    lodash.countBy = countBy;\n    lodash.create = create;\n    lodash.curry = curry;\n    lodash.curryRight = curryRight;\n    lodash.debounce = debounce;\n    lodash.defaults = defaults;\n    lodash.defaultsDeep = defaultsDeep;\n    lodash.defer = defer;\n    lodash.delay = delay;\n    lodash.difference = difference;\n    lodash.differenceBy = differenceBy;\n    lodash.differenceWith = differenceWith;\n    lodash.drop = drop;\n    lodash.dropRight = dropRight;\n    lodash.dropRightWhile = dropRightWhile;\n    lodash.dropWhile = dropWhile;\n    lodash.fill = fill;\n    lodash.filter = filter;\n    lodash.flatMap = flatMap;\n    lodash.flatMapDeep = flatMapDeep;\n    lodash.flatMapDepth = flatMapDepth;\n    lodash.flatten = flatten;\n    lodash.flattenDeep = flattenDeep;\n    lodash.flattenDepth = flattenDepth;\n    lodash.flip = flip;\n    lodash.flow = flow;\n    lodash.flowRight = flowRight;\n    lodash.fromPairs = fromPairs;\n    lodash.functions = functions;\n    lodash.functionsIn = functionsIn;\n    lodash.groupBy = groupBy;\n    lodash.initial = initial;\n    lodash.intersection = intersection;\n    lodash.intersectionBy = intersectionBy;\n    lodash.intersectionWith = intersectionWith;\n    lodash.invert = invert;\n    lodash.invertBy = invertBy;\n    lodash.invokeMap = invokeMap;\n    lodash.iteratee = iteratee;\n    lodash.keyBy = keyBy;\n    lodash.keys = keys;\n    lodash.keysIn = keysIn;\n    lodash.map = map;\n    lodash.mapKeys = mapKeys;\n    lodash.mapValues = mapValues;\n    lodash.matches = matches;\n    lodash.matchesProperty = matchesProperty;\n    lodash.memoize = memoize;\n    lodash.merge = merge;\n    lodash.mergeWith = mergeWith;\n    lodash.method = method;\n    lodash.methodOf = methodOf;\n    lodash.mixin = mixin;\n    lodash.negate = negate;\n    lodash.nthArg = nthArg;\n    lodash.omit = omit;\n    lodash.omitBy = omitBy;\n    lodash.once = once;\n    lodash.orderBy = orderBy;\n    lodash.over = over;\n    lodash.overArgs = overArgs;\n    lodash.overEvery = overEvery;\n    lodash.overSome = overSome;\n    lodash.partial = partial;\n    lodash.partialRight = partialRight;\n    lodash.partition = partition;\n    lodash.pick = pick;\n    lodash.pickBy = pickBy;\n    lodash.property = property;\n    lodash.propertyOf = propertyOf;\n    lodash.pull = pull;\n    lodash.pullAll = pullAll;\n    lodash.pullAllBy = pullAllBy;\n    lodash.pullAllWith = pullAllWith;\n    lodash.pullAt = pullAt;\n    lodash.range = range;\n    lodash.rangeRight = rangeRight;\n    lodash.rearg = rearg;\n    lodash.reject = reject;\n    lodash.remove = remove;\n    lodash.rest = rest;\n    lodash.reverse = reverse;\n    lodash.sampleSize = sampleSize;\n    lodash.set = set;\n    lodash.setWith = setWith;\n    lodash.shuffle = shuffle;\n    lodash.slice = slice;\n    lodash.sortBy = sortBy;\n    lodash.sortedUniq = sortedUniq;\n    lodash.sortedUniqBy = sortedUniqBy;\n    lodash.split = split;\n    lodash.spread = spread;\n    lodash.tail = tail;\n    lodash.take = take;\n    lodash.takeRight = takeRight;\n    lodash.takeRightWhile = takeRightWhile;\n    lodash.takeWhile = takeWhile;\n    lodash.tap = tap;\n    lodash.throttle = throttle;\n    lodash.thru = thru;\n    lodash.toArray = toArray;\n    lodash.toPairs = toPairs;\n    lodash.toPairsIn = toPairsIn;\n    lodash.toPath = toPath;\n    lodash.toPlainObject = toPlainObject;\n    lodash.transform = transform;\n    lodash.unary = unary;\n    lodash.union = union;\n    lodash.unionBy = unionBy;\n    lodash.unionWith = unionWith;\n    lodash.uniq = uniq;\n    lodash.uniqBy = uniqBy;\n    lodash.uniqWith = uniqWith;\n    lodash.unset = unset;\n    lodash.unzip = unzip;\n    lodash.unzipWith = unzipWith;\n    lodash.update = update;\n    lodash.updateWith = updateWith;\n    lodash.values = values;\n    lodash.valuesIn = valuesIn;\n    lodash.without = without;\n    lodash.words = words;\n    lodash.wrap = wrap;\n    lodash.xor = xor;\n    lodash.xorBy = xorBy;\n    lodash.xorWith = xorWith;\n    lodash.zip = zip;\n    lodash.zipObject = zipObject;\n    lodash.zipObjectDeep = zipObjectDeep;\n    lodash.zipWith = zipWith;\n\n    // Add aliases.\n    lodash.entries = toPairs;\n    lodash.entriesIn = toPairsIn;\n    lodash.extend = assignIn;\n    lodash.extendWith = assignInWith;\n\n    // Add methods to `lodash.prototype`.\n    mixin(lodash, lodash);\n\n    /*------------------------------------------------------------------------*/\n\n    // Add methods that return unwrapped values in chain sequences.\n    lodash.add = add;\n    lodash.attempt = attempt;\n    lodash.camelCase = camelCase;\n    lodash.capitalize = capitalize;\n    lodash.ceil = ceil;\n    lodash.clamp = clamp;\n    lodash.clone = clone;\n    lodash.cloneDeep = cloneDeep;\n    lodash.cloneDeepWith = cloneDeepWith;\n    lodash.cloneWith = cloneWith;\n    lodash.conformsTo = conformsTo;\n    lodash.deburr = deburr;\n    lodash.defaultTo = defaultTo;\n    lodash.divide = divide;\n    lodash.endsWith = endsWith;\n    lodash.eq = eq;\n    lodash.escape = escape;\n    lodash.escapeRegExp = escapeRegExp;\n    lodash.every = every;\n    lodash.find = find;\n    lodash.findIndex = findIndex;\n    lodash.findKey = findKey;\n    lodash.findLast = findLast;\n    lodash.findLastIndex = findLastIndex;\n    lodash.findLastKey = findLastKey;\n    lodash.floor = floor;\n    lodash.forEach = forEach;\n    lodash.forEachRight = forEachRight;\n    lodash.forIn = forIn;\n    lodash.forInRight = forInRight;\n    lodash.forOwn = forOwn;\n    lodash.forOwnRight = forOwnRight;\n    lodash.get = get;\n    lodash.gt = gt;\n    lodash.gte = gte;\n    lodash.has = has;\n    lodash.hasIn = hasIn;\n    lodash.head = head;\n    lodash.identity = identity;\n    lodash.includes = includes;\n    lodash.indexOf = indexOf;\n    lodash.inRange = inRange;\n    lodash.invoke = invoke;\n    lodash.isArguments = isArguments;\n    lodash.isArray = isArray;\n    lodash.isArrayBuffer = isArrayBuffer;\n    lodash.isArrayLike = isArrayLike;\n    lodash.isArrayLikeObject = isArrayLikeObject;\n    lodash.isBoolean = isBoolean;\n    lodash.isBuffer = isBuffer;\n    lodash.isDate = isDate;\n    lodash.isElement = isElement;\n    lodash.isEmpty = isEmpty;\n    lodash.isEqual = isEqual;\n    lodash.isEqualWith = isEqualWith;\n    lodash.isError = isError;\n    lodash.isFinite = isFinite;\n    lodash.isFunction = isFunction;\n    lodash.isInteger = isInteger;\n    lodash.isLength = isLength;\n    lodash.isMap = isMap;\n    lodash.isMatch = isMatch;\n    lodash.isMatchWith = isMatchWith;\n    lodash.isNaN = isNaN;\n    lodash.isNative = isNative;\n    lodash.isNil = isNil;\n    lodash.isNull = isNull;\n    lodash.isNumber = isNumber;\n    lodash.isObject = isObject;\n    lodash.isObjectLike = isObjectLike;\n    lodash.isPlainObject = isPlainObject;\n    lodash.isRegExp = isRegExp;\n    lodash.isSafeInteger = isSafeInteger;\n    lodash.isSet = isSet;\n    lodash.isString = isString;\n    lodash.isSymbol = isSymbol;\n    lodash.isTypedArray = isTypedArray;\n    lodash.isUndefined = isUndefined;\n    lodash.isWeakMap = isWeakMap;\n    lodash.isWeakSet = isWeakSet;\n    lodash.join = join;\n    lodash.kebabCase = kebabCase;\n    lodash.last = last;\n    lodash.lastIndexOf = lastIndexOf;\n    lodash.lowerCase = lowerCase;\n    lodash.lowerFirst = lowerFirst;\n    lodash.lt = lt;\n    lodash.lte = lte;\n    lodash.max = max;\n    lodash.maxBy = maxBy;\n    lodash.mean = mean;\n    lodash.meanBy = meanBy;\n    lodash.min = min;\n    lodash.minBy = minBy;\n    lodash.stubArray = stubArray;\n    lodash.stubFalse = stubFalse;\n    lodash.stubObject = stubObject;\n    lodash.stubString = stubString;\n    lodash.stubTrue = stubTrue;\n    lodash.multiply = multiply;\n    lodash.nth = nth;\n    lodash.noConflict = noConflict;\n    lodash.noop = noop;\n    lodash.now = now;\n    lodash.pad = pad;\n    lodash.padEnd = padEnd;\n    lodash.padStart = padStart;\n    lodash.parseInt = parseInt;\n    lodash.random = random;\n    lodash.reduce = reduce;\n    lodash.reduceRight = reduceRight;\n    lodash.repeat = repeat;\n    lodash.replace = replace;\n    lodash.result = result;\n    lodash.round = round;\n    lodash.runInContext = runInContext;\n    lodash.sample = sample;\n    lodash.size = size;\n    lodash.snakeCase = snakeCase;\n    lodash.some = some;\n    lodash.sortedIndex = sortedIndex;\n    lodash.sortedIndexBy = sortedIndexBy;\n    lodash.sortedIndexOf = sortedIndexOf;\n    lodash.sortedLastIndex = sortedLastIndex;\n    lodash.sortedLastIndexBy = sortedLastIndexBy;\n    lodash.sortedLastIndexOf = sortedLastIndexOf;\n    lodash.startCase = startCase;\n    lodash.startsWith = startsWith;\n    lodash.subtract = subtract;\n    lodash.sum = sum;\n    lodash.sumBy = sumBy;\n    lodash.template = template;\n    lodash.times = times;\n    lodash.toFinite = toFinite;\n    lodash.toInteger = toInteger;\n    lodash.toLength = toLength;\n    lodash.toLower = toLower;\n    lodash.toNumber = toNumber;\n    lodash.toSafeInteger = toSafeInteger;\n    lodash.toString = toString;\n    lodash.toUpper = toUpper;\n    lodash.trim = trim;\n    lodash.trimEnd = trimEnd;\n    lodash.trimStart = trimStart;\n    lodash.truncate = truncate;\n    lodash.unescape = unescape;\n    lodash.uniqueId = uniqueId;\n    lodash.upperCase = upperCase;\n    lodash.upperFirst = upperFirst;\n\n    // Add aliases.\n    lodash.each = forEach;\n    lodash.eachRight = forEachRight;\n    lodash.first = head;\n\n    mixin(lodash, (function() {\n      var source = {};\n      baseForOwn(lodash, function(func, methodName) {\n        if (!hasOwnProperty.call(lodash.prototype, methodName)) {\n          source[methodName] = func;\n        }\n      });\n      return source;\n    }()), { 'chain': false });\n\n    /*------------------------------------------------------------------------*/\n\n    /**\n     * The semantic version number.\n     *\n     * @static\n     * @memberOf _\n     * @type {string}\n     */\n    lodash.VERSION = VERSION;\n\n    // Assign default placeholders.\n    arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {\n      lodash[methodName].placeholder = lodash;\n    });\n\n    // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\n    arrayEach(['drop', 'take'], function(methodName, index) {\n      LazyWrapper.prototype[methodName] = function(n) {\n        n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\n\n        var result = (this.__filtered__ && !index)\n          ? new LazyWrapper(this)\n          : this.clone();\n\n        if (result.__filtered__) {\n          result.__takeCount__ = nativeMin(n, result.__takeCount__);\n        } else {\n          result.__views__.push({\n            'size': nativeMin(n, MAX_ARRAY_LENGTH),\n            'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\n          });\n        }\n        return result;\n      };\n\n      LazyWrapper.prototype[methodName + 'Right'] = function(n) {\n        return this.reverse()[methodName](n).reverse();\n      };\n    });\n\n    // Add `LazyWrapper` methods that accept an `iteratee` value.\n    arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\n      var type = index + 1,\n          isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\n\n      LazyWrapper.prototype[methodName] = function(iteratee) {\n        var result = this.clone();\n        result.__iteratees__.push({\n          'iteratee': getIteratee(iteratee, 3),\n          'type': type\n        });\n        result.__filtered__ = result.__filtered__ || isFilter;\n        return result;\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.head` and `_.last`.\n    arrayEach(['head', 'last'], function(methodName, index) {\n      var takeName = 'take' + (index ? 'Right' : '');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this[takeName](1).value()[0];\n      };\n    });\n\n    // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\n    arrayEach(['initial', 'tail'], function(methodName, index) {\n      var dropName = 'drop' + (index ? '' : 'Right');\n\n      LazyWrapper.prototype[methodName] = function() {\n        return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\n      };\n    });\n\n    LazyWrapper.prototype.compact = function() {\n      return this.filter(identity);\n    };\n\n    LazyWrapper.prototype.find = function(predicate) {\n      return this.filter(predicate).head();\n    };\n\n    LazyWrapper.prototype.findLast = function(predicate) {\n      return this.reverse().find(predicate);\n    };\n\n    LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\n      if (typeof path == 'function') {\n        return new LazyWrapper(this);\n      }\n      return this.map(function(value) {\n        return baseInvoke(value, path, args);\n      });\n    });\n\n    LazyWrapper.prototype.reject = function(predicate) {\n      return this.filter(negate(getIteratee(predicate)));\n    };\n\n    LazyWrapper.prototype.slice = function(start, end) {\n      start = toInteger(start);\n\n      var result = this;\n      if (result.__filtered__ && (start > 0 || end < 0)) {\n        return new LazyWrapper(result);\n      }\n      if (start < 0) {\n        result = result.takeRight(-start);\n      } else if (start) {\n        result = result.drop(start);\n      }\n      if (end !== undefined) {\n        end = toInteger(end);\n        result = end < 0 ? result.dropRight(-end) : result.take(end - start);\n      }\n      return result;\n    };\n\n    LazyWrapper.prototype.takeRightWhile = function(predicate) {\n      return this.reverse().takeWhile(predicate).reverse();\n    };\n\n    LazyWrapper.prototype.toArray = function() {\n      return this.take(MAX_ARRAY_LENGTH);\n    };\n\n    // Add `LazyWrapper` methods to `lodash.prototype`.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\n          isTaker = /^(?:head|last)$/.test(methodName),\n          lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\n          retUnwrapped = isTaker || /^find/.test(methodName);\n\n      if (!lodashFunc) {\n        return;\n      }\n      lodash.prototype[methodName] = function() {\n        var value = this.__wrapped__,\n            args = isTaker ? [1] : arguments,\n            isLazy = value instanceof LazyWrapper,\n            iteratee = args[0],\n            useLazy = isLazy || isArray(value);\n\n        var interceptor = function(value) {\n          var result = lodashFunc.apply(lodash, arrayPush([value], args));\n          return (isTaker && chainAll) ? result[0] : result;\n        };\n\n        if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\n          // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\n          isLazy = useLazy = false;\n        }\n        var chainAll = this.__chain__,\n            isHybrid = !!this.__actions__.length,\n            isUnwrapped = retUnwrapped && !chainAll,\n            onlyLazy = isLazy && !isHybrid;\n\n        if (!retUnwrapped && useLazy) {\n          value = onlyLazy ? value : new LazyWrapper(this);\n          var result = func.apply(value, args);\n          result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\n          return new LodashWrapper(result, chainAll);\n        }\n        if (isUnwrapped && onlyLazy) {\n          return func.apply(this, args);\n        }\n        result = this.thru(interceptor);\n        return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\n      };\n    });\n\n    // Add `Array` methods to `lodash.prototype`.\n    arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\n      var func = arrayProto[methodName],\n          chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\n          retUnwrapped = /^(?:pop|shift)$/.test(methodName);\n\n      lodash.prototype[methodName] = function() {\n        var args = arguments;\n        if (retUnwrapped && !this.__chain__) {\n          var value = this.value();\n          return func.apply(isArray(value) ? value : [], args);\n        }\n        return this[chainName](function(value) {\n          return func.apply(isArray(value) ? value : [], args);\n        });\n      };\n    });\n\n    // Map minified method names to their real names.\n    baseForOwn(LazyWrapper.prototype, function(func, methodName) {\n      var lodashFunc = lodash[methodName];\n      if (lodashFunc) {\n        var key = lodashFunc.name + '';\n        if (!hasOwnProperty.call(realNames, key)) {\n          realNames[key] = [];\n        }\n        realNames[key].push({ 'name': methodName, 'func': lodashFunc });\n      }\n    });\n\n    realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\n      'name': 'wrapper',\n      'func': undefined\n    }];\n\n    // Add methods to `LazyWrapper`.\n    LazyWrapper.prototype.clone = lazyClone;\n    LazyWrapper.prototype.reverse = lazyReverse;\n    LazyWrapper.prototype.value = lazyValue;\n\n    // Add chain sequence methods to the `lodash` wrapper.\n    lodash.prototype.at = wrapperAt;\n    lodash.prototype.chain = wrapperChain;\n    lodash.prototype.commit = wrapperCommit;\n    lodash.prototype.next = wrapperNext;\n    lodash.prototype.plant = wrapperPlant;\n    lodash.prototype.reverse = wrapperReverse;\n    lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;\n\n    // Add lazy aliases.\n    lodash.prototype.first = lodash.prototype.head;\n\n    if (symIterator) {\n      lodash.prototype[symIterator] = wrapperToIterator;\n    }\n    return lodash;\n  });\n\n  /*--------------------------------------------------------------------------*/\n\n  // Export lodash.\n  var _ = runInContext();\n\n  // Some AMD build optimizers, like r.js, check for condition patterns like:\n  if (true) {\n    // Expose Lodash on the global object to prevent errors when Lodash is\n    // loaded by a script tag in the presence of an AMD loader.\n    // See http://requirejs.org/docs/errors.html#mismatch for more details.\n    // Use `_.noConflict` to remove Lodash from the global object.\n    root._ = _;\n\n    // Define as an anonymous module so, through path mapping, it can be\n    // referenced as the \"underscore\" module.\n    !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {\n      return _;\n    }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n  }\n  // Check for `exports` after `define` in case a build optimizer adds it.\n  else {}\n}.call(this));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))\n\n//# sourceURL=webpack:///./node_modules/lodash/lodash.js?");

/***/ }),

/***/ "./node_modules/lodash/noop.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/noop.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n  // No operation performed.\n}\n\nmodule.exports = noop;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/noop.js?");

/***/ }),

/***/ "./node_modules/lodash/now.js":
/*!************************************!*\
  !*** ./node_modules/lodash/now.js ***!
  \************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var root = __webpack_require__(/*! ./_root */ \"./node_modules/lodash/_root.js\");\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/now.js?");

/***/ }),

/***/ "./node_modules/lodash/once.js":
/*!*************************************!*\
  !*** ./node_modules/lodash/once.js ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var before = __webpack_require__(/*! ./before */ \"./node_modules/lodash/before.js\");\n\n/**\n * Creates a function that is restricted to invoking `func` once. Repeat calls\n * to the function return the value of the first invocation. The `func` is\n * invoked with the `this` binding and arguments of the created function.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new restricted function.\n * @example\n *\n * var initialize = _.once(createApplication);\n * initialize();\n * initialize();\n * // => `createApplication` is invoked once\n */\nfunction once(func) {\n  return before(2, func);\n}\n\nmodule.exports = once;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/once.js?");

/***/ }),

/***/ "./node_modules/lodash/toFinite.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/toFinite.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var toNumber = __webpack_require__(/*! ./toNumber */ \"./node_modules/lodash/toNumber.js\");\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n    MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n  if (!value) {\n    return value === 0 ? value : 0;\n  }\n  value = toNumber(value);\n  if (value === INFINITY || value === -INFINITY) {\n    var sign = (value < 0 ? -1 : 1);\n    return sign * MAX_INTEGER;\n  }\n  return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/toFinite.js?");

/***/ }),

/***/ "./node_modules/lodash/toInteger.js":
/*!******************************************!*\
  !*** ./node_modules/lodash/toInteger.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var toFinite = __webpack_require__(/*! ./toFinite */ \"./node_modules/lodash/toFinite.js\");\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n  var result = toFinite(value),\n      remainder = result % 1;\n\n  return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/toInteger.js?");

/***/ }),

/***/ "./node_modules/lodash/toNumber.js":
/*!*****************************************!*\
  !*** ./node_modules/lodash/toNumber.js ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var baseTrim = __webpack_require__(/*! ./_baseTrim */ \"./node_modules/lodash/_baseTrim.js\"),\n    isObject = __webpack_require__(/*! ./isObject */ \"./node_modules/lodash/isObject.js\"),\n    isSymbol = __webpack_require__(/*! ./isSymbol */ \"./node_modules/lodash/isSymbol.js\");\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n\n\n//# sourceURL=webpack:///./node_modules/lodash/toNumber.js?");

/***/ }),

/***/ "./node_modules/nanoid/index.browser.js":
/*!**********************************************!*\
  !*** ./node_modules/nanoid/index.browser.js ***!
  \**********************************************/
/*! exports provided: urlAlphabet, random, customRandom, customAlphabet, nanoid */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"random\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"customRandom\", function() { return customRandom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"customAlphabet\", function() { return customAlphabet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"nanoid\", function() { return nanoid; });\n/* harmony import */ var _url_alphabet_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url-alphabet/index.js */ \"./node_modules/nanoid/url-alphabet/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"urlAlphabet\", function() { return _url_alphabet_index_js__WEBPACK_IMPORTED_MODULE_0__[\"urlAlphabet\"]; });\n\n\nlet random = bytes => crypto.getRandomValues(new Uint8Array(bytes))\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n  let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1\n  let step = -~((1.6 * mask * defaultSize) / alphabet.length)\n  return (size = defaultSize) => {\n    let id = ''\n    while (true) {\n      let bytes = getRandom(step)\n      let j = step\n      while (j--) {\n        id += alphabet[bytes[j] & mask] || ''\n        if (id.length === size) return id\n      }\n    }\n  }\n}\nlet customAlphabet = (alphabet, size = 21) =>\n  customRandom(alphabet, size, random)\nlet nanoid = (size = 21) =>\n  crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {\n    byte &= 63\n    if (byte < 36) {\n      id += byte.toString(36)\n    } else if (byte < 62) {\n      id += (byte - 26).toString(36).toUpperCase()\n    } else if (byte > 62) {\n      id += '-'\n    } else {\n      id += '_'\n    }\n    return id\n  }, '')\n\n\n//# sourceURL=webpack:///./node_modules/nanoid/index.browser.js?");

/***/ }),

/***/ "./node_modules/nanoid/url-alphabet/index.js":
/*!***************************************************!*\
  !*** ./node_modules/nanoid/url-alphabet/index.js ***!
  \***************************************************/
/*! exports provided: urlAlphabet */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"urlAlphabet\", function() { return urlAlphabet; });\nconst urlAlphabet =\n  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'\n\n\n//# sourceURL=webpack:///./node_modules/nanoid/url-alphabet/index.js?");

/***/ }),

/***/ "./node_modules/trtc-js-sdk/trtc.js":
/*!******************************************!*\
  !*** ./node_modules/trtc-js-sdk/trtc.js ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("/* WEBPACK VAR INJECTION */(function(global) {!function(e,t){ true?module.exports=t():undefined}(this,(function(){function e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function n(){n=function(){return e};var e={},t=Object.prototype,i=t.hasOwnProperty,r=\"function\"==typeof Symbol?Symbol:{},a=r.iterator||\"@@iterator\",o=r.asyncIterator||\"@@asyncIterator\",s=r.toStringTag||\"@@toStringTag\";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},\"\")}catch(R){c=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var r=t&&t.prototype instanceof h?t:h,a=Object.create(r.prototype),o=new T(i||[]);return a._invoke=function(e,t,n){var i=\"suspendedStart\";return function(r,a){if(\"executing\"===i)throw new Error(\"Generator is already running\");if(\"completed\"===i){if(\"throw\"===r)throw a;return E()}for(n.method=r,n.arg=a;;){var o=n.delegate;if(o){var s=b(o,n);if(s){if(s===l)continue;return s}}if(\"next\"===n.method)n.sent=n._sent=n.arg;else if(\"throw\"===n.method){if(\"suspendedStart\"===i)throw i=\"completed\",n.arg;n.dispatchException(n.arg)}else\"return\"===n.method&&n.abrupt(\"return\",n.arg);i=\"executing\";var c=d(e,t,n);if(\"normal\"===c.type){if(i=n.done?\"completed\":\"suspendedYield\",c.arg===l)continue;return{value:c.arg,done:n.done}}\"throw\"===c.type&&(i=\"completed\",n.method=\"throw\",n.arg=c.arg)}}}(e,n,o),a}function d(e,t,n){try{return{type:\"normal\",arg:e.call(t,n)}}catch(R){return{type:\"throw\",arg:R}}}e.wrap=u;var l={};function h(){}function p(){}function f(){}var m={};c(m,a,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(w([])));v&&v!==t&&i.call(v,a)&&(m=v);var g=f.prototype=h.prototype=Object.create(m);function y(e){[\"next\",\"throw\",\"return\"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,a,o,s){var c=d(e[r],e,a);if(\"throw\"!==c.type){var u=c.arg,l=u.value;return l&&\"object\"==typeof l&&i.call(l,\"__await\")?t.resolve(l.__await).then((function(e){n(\"next\",e,o,s)}),(function(e){n(\"throw\",e,o,s)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return n(\"throw\",e,o,s)}))}s(c.arg)}var r;this._invoke=function(e,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,\"throw\"===t.method){if(e.iterator.return&&(t.method=\"return\",t.arg=void 0,b(e,t),\"throw\"===t.method))return l;t.method=\"throw\",t.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return l}var i=d(n,e.iterator,t.arg);if(\"throw\"===i.type)return t.method=\"throw\",t.arg=i.arg,t.delegate=null,l;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,\"return\"!==t.method&&(t.method=\"next\",t.arg=void 0),t.delegate=null,l):r:(t.method=\"throw\",t.arg=new TypeError(\"iterator result is not an object\"),t.delegate=null,l)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type=\"normal\",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:\"root\"}],e.forEach(k,this),this.reset(!0)}function w(e){if(e){var t=e[a];if(t)return t.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=f,c(g,\"constructor\",f),c(f,\"constructor\",p),p.displayName=c(f,s,\"GeneratorFunction\"),e.isGeneratorFunction=function(e){var t=\"function\"==typeof e&&e.constructor;return!!t&&(t===p||\"GeneratorFunction\"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,s,\"GeneratorFunction\")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(S.prototype),c(S.prototype,o,(function(){return this})),e.AsyncIterator=S,e.async=function(t,n,i,r,a){void 0===a&&(a=Promise);var o=new S(u(t,n,i,r),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},y(g),c(g,s,\"Generator\"),c(g,a,(function(){return this})),c(g,\"toString\",(function(){return\"[object Generator]\"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},e.values=w,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=void 0,this.tryEntries.forEach(I),!e)for(var t in this)\"t\"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(\"throw\"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return o.type=\"throw\",o.arg=e,t.next=n,i&&(t.method=\"next\",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],o=a.completion;if(\"root\"===a.tryLoc)return n(\"end\");if(a.tryLoc<=this.prev){var s=i.call(a,\"catchLoc\"),c=i.call(a,\"finallyLoc\");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error(\"try statement without catch or finally\");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,\"finallyLoc\")&&this.prev<r.finallyLoc){var a=r;break}}a&&(\"break\"===e||\"continue\"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method=\"next\",this.next=a.finallyLoc,l):this.complete(o)},complete:function(e,t){if(\"throw\"===e.type)throw e.arg;return\"break\"===e.type||\"continue\"===e.type?this.next=e.arg:\"return\"===e.type?(this.rval=this.arg=e.arg,this.method=\"return\",this.next=\"end\"):\"normal\"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if(\"throw\"===i.type){var r=i.arg;I(n)}return r}}throw new Error(\"illegal catch attempt\")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},\"next\"===this.method&&(this.arg=void 0),l}},e}function i(e){return i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},i(e)}function r(e,t,n,i,r,a,o){try{var s=e[a](o),c=s.value}catch(u){return void n(u)}s.done?t(c):Promise.resolve(c).then(i,r)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(i,a){var o=e.apply(t,n);function s(e){r(o,i,a,s,c,\"next\",e)}function c(e){r(o,i,a,s,c,\"throw\",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function c(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,\"prototype\",{writable:!1}),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),t&&h(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function f(e,t,n){return f=p()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&h(r,n.prototype),r},f.apply(null,arguments)}function m(e){var t=\"function\"==typeof Map?new Map:void 0;return m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf(\"[native code]\")))return e;var n;if(\"function\"!=typeof e)throw new TypeError(\"Super expression must either be null or a function\");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return f(e,arguments,l(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),h(i,e)},m(e)}function _(e,t){if(t&&(\"object\"==typeof t||\"function\"==typeof t))return t;if(void 0!==t)throw new TypeError(\"Derived constructors may only return object or undefined\");return function(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}(e)}function v(e){var t=p();return function(){var n,i=l(e);if(t){var r=l(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return _(this,n)}}function g(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}function y(){return y=\"undefined\"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=g(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},y.apply(this,arguments)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(null==n)return;var i,r,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(i=n.next()).done)&&(a.push(i.value),!t||a.length!==t);o=!0);}catch(c){s=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(s)throw r}}return a}(e,t)||k(e,t)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function b(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function k(e,t){if(e){if(\"string\"==typeof e)return I(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function T(e,t){var n=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!n){if(Array.isArray(e)||(n=k(e))||t&&e&&\"number\"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function w(e,t,n,i,r){var a={};return Object.keys(i).forEach((function(e){a[e]=i[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,(\"value\"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce((function(n,i){return i(e,t,n)||n}),a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}var E=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},R=function(e){return e&&e.Math==Math&&e},C=R(\"object\"==typeof globalThis&&globalThis)||R(\"object\"==typeof window&&window)||R(\"object\"==typeof self&&self)||R(\"object\"==typeof E&&E)||function(){return this}()||Function(\"return this\")(),A={},x=function(e){try{return!!e()}catch(t){return!0}},P=!x((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),D=!x((function(){var e=function(){}.bind();return\"function\"!=typeof e||e.hasOwnProperty(\"prototype\")})),O=D,M=Function.prototype.call,N=O?M.bind(M):function(){return M.apply(M,arguments)},L={},U={}.propertyIsEnumerable,V=Object.getOwnPropertyDescriptor,j=V&&!U.call({1:2},1);L.f=j?function(e){var t=V(this,e);return!!t&&t.enumerable}:U;var F,B,H=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},W=D,G=Function.prototype,z=G.call,J=W&&G.bind.bind(z,z),q=function(e){return W?J(e):function(){return z.apply(e,arguments)}},K=q,Q=K({}.toString),X=K(\"\".slice),Y=function(e){return X(Q(e),8,-1)},$=Y,Z=q,ee=function(e){if(\"Function\"===$(e))return Z(e)},te=x,ne=Y,ie=Object,re=ee(\"\".split),ae=te((function(){return!ie(\"z\").propertyIsEnumerable(0)}))?function(e){return\"String\"==ne(e)?re(e,\"\"):ie(e)}:ie,oe=function(e){return null==e},se=oe,ce=TypeError,ue=function(e){if(se(e))throw ce(\"Can't call method on \"+e);return e},de=ae,le=ue,he=function(e){return de(le(e))},pe=\"object\"==typeof document&&document.all,fe={all:pe,IS_HTMLDDA:void 0===pe&&void 0!==pe},me=fe.all,_e=fe.IS_HTMLDDA?function(e){return\"function\"==typeof e||e===me}:function(e){return\"function\"==typeof e},ve=_e,ge=fe.all,ye=fe.IS_HTMLDDA?function(e){return\"object\"==typeof e?null!==e:ve(e)||e===ge}:function(e){return\"object\"==typeof e?null!==e:ve(e)},Se=C,be=_e,ke=function(e){return be(e)?e:void 0},Ie=function(e,t){return arguments.length<2?ke(Se[e]):Se[e]&&Se[e][t]},Te=ee({}.isPrototypeOf),we=Ie(\"navigator\",\"userAgent\")||\"\",Ee=C,Re=we,Ce=Ee.process,Ae=Ee.Deno,xe=Ce&&Ce.versions||Ae&&Ae.version,Pe=xe&&xe.v8;Pe&&(B=(F=Pe.split(\".\"))[0]>0&&F[0]<4?1:+(F[0]+F[1])),!B&&Re&&(!(F=Re.match(/Edge\\/(\\d+)/))||F[1]>=74)&&(F=Re.match(/Chrome\\/(\\d+)/))&&(B=+F[1]);var De=B,Oe=De,Me=x,Ne=!!Object.getOwnPropertySymbols&&!Me((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Oe&&Oe<41})),Le=Ne&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator,Ue=Ie,Ve=_e,je=Te,Fe=Object,Be=Le?function(e){return\"symbol\"==typeof e}:function(e){var t=Ue(\"Symbol\");return Ve(t)&&je(t.prototype,Fe(e))},He=String,We=function(e){try{return He(e)}catch(t){return\"Object\"}},Ge=_e,ze=We,Je=TypeError,qe=function(e){if(Ge(e))return e;throw Je(ze(e)+\" is not a function\")},Ke=qe,Qe=oe,Xe=function(e,t){var n=e[t];return Qe(n)?void 0:Ke(n)},Ye=N,$e=_e,Ze=ye,et=TypeError,tt={exports:{}},nt=C,it=Object.defineProperty,rt=function(e,t){try{it(nt,e,{value:t,configurable:!0,writable:!0})}catch(n){nt[e]=t}return t},at=rt,ot=\"__core-js_shared__\",st=C[ot]||at(ot,{}),ct=st;(tt.exports=function(e,t){return ct[e]||(ct[e]=void 0!==t?t:{})})(\"versions\",[]).push({version:\"3.25.5\",mode:\"global\",copyright:\"© 2014-2022 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE\",source:\"https://github.com/zloirock/core-js\"});var ut=ue,dt=Object,lt=function(e){return dt(ut(e))},ht=lt,pt=ee({}.hasOwnProperty),ft=Object.hasOwn||function(e,t){return pt(ht(e),t)},mt=ee,_t=0,vt=Math.random(),gt=mt(1..toString),yt=function(e){return\"Symbol(\"+(void 0===e?\"\":e)+\")_\"+gt(++_t+vt,36)},St=C,bt=tt.exports,kt=ft,It=yt,Tt=Ne,wt=Le,Et=bt(\"wks\"),Rt=St.Symbol,Ct=Rt&&Rt.for,At=wt?Rt:Rt&&Rt.withoutSetter||It,xt=function(e){if(!kt(Et,e)||!Tt&&\"string\"!=typeof Et[e]){var t=\"Symbol.\"+e;Tt&&kt(Rt,e)?Et[e]=Rt[e]:Et[e]=wt&&Ct?Ct(t):At(t)}return Et[e]},Pt=N,Dt=ye,Ot=Be,Mt=Xe,Nt=function(e,t){var n,i;if(\"string\"===t&&$e(n=e.toString)&&!Ze(i=Ye(n,e)))return i;if($e(n=e.valueOf)&&!Ze(i=Ye(n,e)))return i;if(\"string\"!==t&&$e(n=e.toString)&&!Ze(i=Ye(n,e)))return i;throw et(\"Can't convert object to primitive value\")},Lt=TypeError,Ut=xt(\"toPrimitive\"),Vt=function(e,t){if(!Dt(e)||Ot(e))return e;var n,i=Mt(e,Ut);if(i){if(void 0===t&&(t=\"default\"),n=Pt(i,e,t),!Dt(n)||Ot(n))return n;throw Lt(\"Can't convert object to primitive value\")}return void 0===t&&(t=\"number\"),Nt(e,t)},jt=Vt,Ft=Be,Bt=function(e){var t=jt(e,\"string\");return Ft(t)?t:t+\"\"},Ht=ye,Wt=C.document,Gt=Ht(Wt)&&Ht(Wt.createElement),zt=function(e){return Gt?Wt.createElement(e):{}},Jt=zt,qt=!P&&!x((function(){return 7!=Object.defineProperty(Jt(\"div\"),\"a\",{get:function(){return 7}}).a})),Kt=P,Qt=N,Xt=L,Yt=H,$t=he,Zt=Bt,en=ft,tn=qt,nn=Object.getOwnPropertyDescriptor;A.f=Kt?nn:function(e,t){if(e=$t(e),t=Zt(t),tn)try{return nn(e,t)}catch(n){}if(en(e,t))return Yt(!Qt(Xt.f,e,t),e[t])};var rn={},an=P&&x((function(){return 42!=Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype})),on=ye,sn=String,cn=TypeError,un=function(e){if(on(e))return e;throw cn(sn(e)+\" is not an object\")},dn=P,ln=qt,hn=an,pn=un,fn=Bt,mn=TypeError,_n=Object.defineProperty,vn=Object.getOwnPropertyDescriptor,gn=\"enumerable\",yn=\"configurable\",Sn=\"writable\";rn.f=dn?hn?function(e,t,n){if(pn(e),t=fn(t),pn(n),\"function\"==typeof e&&\"prototype\"===t&&\"value\"in n&&Sn in n&&!n.writable){var i=vn(e,t);i&&i.writable&&(e[t]=n.value,n={configurable:yn in n?n.configurable:i.configurable,enumerable:gn in n?n.enumerable:i.enumerable,writable:!1})}return _n(e,t,n)}:_n:function(e,t,n){if(pn(e),t=fn(t),pn(n),ln)try{return _n(e,t,n)}catch(i){}if(\"get\"in n||\"set\"in n)throw mn(\"Accessors not supported\");return\"value\"in n&&(e[t]=n.value),e};var bn=rn,kn=H,In=P?function(e,t,n){return bn.f(e,t,kn(1,n))}:function(e,t,n){return e[t]=n,e},Tn={exports:{}},wn=P,En=ft,Rn=Function.prototype,Cn=wn&&Object.getOwnPropertyDescriptor,An=En(Rn,\"name\"),xn={EXISTS:An,PROPER:An&&\"something\"===function(){}.name,CONFIGURABLE:An&&(!wn||wn&&Cn(Rn,\"name\").configurable)},Pn=_e,Dn=st,On=ee(Function.toString);Pn(Dn.inspectSource)||(Dn.inspectSource=function(e){return On(e)});var Mn,Nn,Ln,Un=Dn.inspectSource,Vn=_e,jn=C.WeakMap,Fn=Vn(jn)&&/native code/.test(String(jn)),Bn=tt.exports,Hn=yt,Wn=Bn(\"keys\"),Gn=function(e){return Wn[e]||(Wn[e]=Hn(e))},zn={},Jn=Fn,qn=C,Kn=ye,Qn=In,Xn=ft,Yn=st,$n=Gn,Zn=zn,ei=\"Object already initialized\",ti=qn.TypeError,ni=qn.WeakMap;if(Jn||Yn.state){var ii=Yn.state||(Yn.state=new ni);ii.get=ii.get,ii.has=ii.has,ii.set=ii.set,Mn=function(e,t){if(ii.has(e))throw ti(ei);return t.facade=e,ii.set(e,t),t},Nn=function(e){return ii.get(e)||{}},Ln=function(e){return ii.has(e)}}else{var ri=$n(\"state\");Zn[ri]=!0,Mn=function(e,t){if(Xn(e,ri))throw ti(ei);return t.facade=e,Qn(e,ri,t),t},Nn=function(e){return Xn(e,ri)?e[ri]:{}},Ln=function(e){return Xn(e,ri)}}var ai={set:Mn,get:Nn,has:Ln,enforce:function(e){return Ln(e)?Nn(e):Mn(e,{})},getterFor:function(e){return function(t){var n;if(!Kn(t)||(n=Nn(t)).type!==e)throw ti(\"Incompatible receiver, \"+e+\" required\");return n}}},oi=x,si=_e,ci=ft,ui=P,di=xn.CONFIGURABLE,li=Un,hi=ai.enforce,pi=ai.get,fi=Object.defineProperty,mi=ui&&!oi((function(){return 8!==fi((function(){}),\"length\",{value:8}).length})),_i=String(String).split(\"String\"),vi=Tn.exports=function(e,t,n){\"Symbol(\"===String(t).slice(0,7)&&(t=\"[\"+String(t).replace(/^Symbol\\(([^)]*)\\)/,\"$1\")+\"]\"),n&&n.getter&&(t=\"get \"+t),n&&n.setter&&(t=\"set \"+t),(!ci(e,\"name\")||di&&e.name!==t)&&(ui?fi(e,\"name\",{value:t,configurable:!0}):e.name=t),mi&&n&&ci(n,\"arity\")&&e.length!==n.arity&&fi(e,\"length\",{value:n.arity});try{n&&ci(n,\"constructor\")&&n.constructor?ui&&fi(e,\"prototype\",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(r){}var i=hi(e);return ci(i,\"source\")||(i.source=_i.join(\"string\"==typeof t?t:\"\")),e};Function.prototype.toString=vi((function(){return si(this)&&pi(this).source||li(this)}),\"toString\");var gi=_e,yi=rn,Si=Tn.exports,bi=rt,ki=function(e,t,n,i){i||(i={});var r=i.enumerable,a=void 0!==i.name?i.name:t;if(gi(n)&&Si(n,a,i),i.global)r?e[t]=n:bi(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(o){}r?e[t]=n:yi.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},Ii={},Ti=Math.ceil,wi=Math.floor,Ei=Math.trunc||function(e){var t=+e;return(t>0?wi:Ti)(t)},Ri=function(e){var t=+e;return t!=t||0===t?0:Ei(t)},Ci=Ri,Ai=Math.max,xi=Math.min,Pi=function(e,t){var n=Ci(e);return n<0?Ai(n+t,0):xi(n,t)},Di=Ri,Oi=Math.min,Mi=function(e){return e>0?Oi(Di(e),9007199254740991):0},Ni=Mi,Li=function(e){return Ni(e.length)},Ui=he,Vi=Pi,ji=Li,Fi=function(e){return function(t,n,i){var r,a=Ui(t),o=ji(a),s=Vi(i,o);if(e&&n!=n){for(;o>s;)if((r=a[s++])!=r)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===n)return e||s||0;return!e&&-1}},Bi={includes:Fi(!0),indexOf:Fi(!1)},Hi=ft,Wi=he,Gi=Bi.indexOf,zi=zn,Ji=ee([].push),qi=function(e,t){var n,i=Wi(e),r=0,a=[];for(n in i)!Hi(zi,n)&&Hi(i,n)&&Ji(a,n);for(;t.length>r;)Hi(i,n=t[r++])&&(~Gi(a,n)||Ji(a,n));return a},Ki=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"],Qi=qi,Xi=Ki.concat(\"length\",\"prototype\");Ii.f=Object.getOwnPropertyNames||function(e){return Qi(e,Xi)};var Yi={};Yi.f=Object.getOwnPropertySymbols;var $i=Ie,Zi=Ii,er=Yi,tr=un,nr=ee([].concat),ir=$i(\"Reflect\",\"ownKeys\")||function(e){var t=Zi.f(tr(e)),n=er.f;return n?nr(t,n(e)):t},rr=ft,ar=ir,or=A,sr=rn,cr=x,ur=_e,dr=/#|\\.prototype\\./,lr=function(e,t){var n=pr[hr(e)];return n==mr||n!=fr&&(ur(t)?cr(t):!!t)},hr=lr.normalize=function(e){return String(e).replace(dr,\".\").toLowerCase()},pr=lr.data={},fr=lr.NATIVE=\"N\",mr=lr.POLYFILL=\"P\",_r=lr,vr=C,gr=A.f,yr=In,Sr=ki,br=rt,kr=function(e,t,n){for(var i=ar(t),r=sr.f,a=or.f,o=0;o<i.length;o++){var s=i[o];rr(e,s)||n&&rr(n,s)||r(e,s,a(t,s))}},Ir=_r,Tr=function(e,t){var n,i,r,a,o,s=e.target,c=e.global,u=e.stat;if(n=c?vr:u?vr[s]||br(s,{}):(vr[s]||{}).prototype)for(i in t){if(a=t[i],r=e.dontCallGetSet?(o=gr(n,i))&&o.value:n[i],!Ir(c?i:s+(u?\".\":\"#\")+i,e.forced)&&void 0!==r){if(typeof a==typeof r)continue;kr(a,r)}(e.sham||r&&r.sham)&&yr(a,\"sham\",!0),Sr(n,i,a,e)}},wr=Tr,Er=x,Rr=he,Cr=A.f,Ar=P,xr=Er((function(){Cr(1)}));function Pr(e){throw new Error('Could not dynamically require \"'+e+'\". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}wr({target:\"Object\",stat:!0,forced:!Ar||xr,sham:!Ar},{getOwnPropertyDescriptor:function(e,t){return Cr(Rr(e),t)}});!function(e,t){e.exports=function(){function e(t,n,i){function r(o,s){if(!n[o]){if(!t[o]){if(!s&&Pr)return Pr(o);if(a)return a(o,!0);var c=new Error(\"Cannot find module '\"+o+\"'\");throw c.code=\"MODULE_NOT_FOUND\",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,(function(e){return r(t[o][1][e]||e)}),u,u.exports,e,t,n,i)}return n[o].exports}for(var a=Pr,o=0;o<i.length;o++)r(i[o]);return r}return e}()({1:[function(e,t,n){var i=(0,e(\"./adapter_factory.js\").adapterFactory)({window:\"undefined\"==typeof window?void 0:window});t.exports=i},{\"./adapter_factory.js\":2}],2:[function(e,t,n){function i(e){return i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},i(e)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.adapterFactory=h;var r=l(e(\"./utils\")),a=l(e(\"./chrome/chrome_shim\")),o=l(e(\"./firefox/firefox_shim\")),s=l(e(\"./safari/safari_shim\")),c=l(e(\"./common_shim\")),u=l(e(\"sdp\"));function d(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function l(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==i(e)&&\"function\"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(\"default\"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function h(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0},n=r.log,i=r.detectBrowser(e),d={browserDetails:i,commonShim:c,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings,sdp:u};switch(i.browser){case\"chrome\":if(!a||!a.shimPeerConnection||!t.shimChrome)return n(\"Chrome shim is not included in this adapter release.\"),d;if(null===i.version)return n(\"Chrome shim can not determine version, not shimming.\"),d;n(\"adapter.js shimming chrome.\"),d.browserShim=a,c.shimAddIceCandidateNullOrEmpty(e,i),c.shimParameterlessSetLocalDescription(e,i),a.shimGetUserMedia(e,i),a.shimMediaStream(e,i),a.shimPeerConnection(e,i),a.shimOnTrack(e,i),a.shimAddTrackRemoveTrack(e,i),a.shimGetSendersWithDtmf(e,i),a.shimGetStats(e,i),a.shimSenderReceiverGetStats(e,i),a.fixNegotiationNeeded(e,i),c.shimRTCIceCandidate(e,i),c.shimRTCIceCandidateRelayProtocol(e,i),c.shimConnectionState(e,i),c.shimMaxMessageSize(e,i),c.shimSendThrowTypeError(e,i),c.removeExtmapAllowMixed(e,i);break;case\"firefox\":if(!o||!o.shimPeerConnection||!t.shimFirefox)return n(\"Firefox shim is not included in this adapter release.\"),d;n(\"adapter.js shimming firefox.\"),d.browserShim=o,c.shimAddIceCandidateNullOrEmpty(e,i),c.shimParameterlessSetLocalDescription(e,i),o.shimGetUserMedia(e,i),o.shimPeerConnection(e,i),o.shimOnTrack(e,i),o.shimRemoveStream(e,i),o.shimSenderGetStats(e,i),o.shimReceiverGetStats(e,i),o.shimRTCDataChannel(e,i),o.shimAddTransceiver(e,i),o.shimGetParameters(e,i),o.shimCreateOffer(e,i),o.shimCreateAnswer(e,i),c.shimRTCIceCandidate(e,i),c.shimConnectionState(e,i),c.shimMaxMessageSize(e,i),c.shimSendThrowTypeError(e,i);break;case\"safari\":if(!s||!t.shimSafari)return n(\"Safari shim is not included in this adapter release.\"),d;n(\"adapter.js shimming safari.\"),d.browserShim=s,c.shimAddIceCandidateNullOrEmpty(e,i),c.shimParameterlessSetLocalDescription(e,i),s.shimRTCIceServerUrls(e,i),s.shimCreateOfferLegacy(e,i),s.shimCallbacksAPI(e,i),s.shimLocalStreamsAPI(e,i),s.shimRemoteStreamsAPI(e,i),s.shimTrackEventTransceiver(e,i),s.shimGetUserMedia(e,i),s.shimAudioContext(e,i),c.shimRTCIceCandidate(e,i),c.shimRTCIceCandidateRelayProtocol(e,i),c.shimMaxMessageSize(e,i),c.shimSendThrowTypeError(e,i),c.removeExtmapAllowMixed(e,i);break;default:n(\"Unsupported browser!\")}return d}},{\"./chrome/chrome_shim\":3,\"./common_shim\":6,\"./firefox/firefox_shim\":7,\"./safari/safari_shim\":10,\"./utils\":11,sdp:12}],3:[function(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.fixNegotiationNeeded=S,n.shimAddTrackRemoveTrack=g,n.shimAddTrackRemoveTrackWithNative=v,Object.defineProperty(n,\"shimGetDisplayMedia\",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),n.shimGetSendersWithDtmf=f,n.shimGetStats=m,Object.defineProperty(n,\"shimGetUserMedia\",{enumerable:!0,get:function(){return r.shimGetUserMedia}}),n.shimMediaStream=h,n.shimOnTrack=p,n.shimPeerConnection=y,n.shimSenderReceiverGetStats=_;var i=s(e(\"../utils.js\")),r=e(\"./getusermedia\"),a=e(\"./getdisplaymedia\");function o(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==l(e)&&\"function\"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(\"default\"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}function c(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){var t=d(e,\"string\");return\"symbol\"===l(t)?t:String(t)}function d(e,t){if(\"object\"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||\"default\");if(\"object\"!==l(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}function l(e){return l=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},l(e)}function h(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function p(e){if(\"object\"===l(e)&&e.RTCPeerConnection&&!(\"ontrack\"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,\"ontrack\",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener(\"track\",this._ontrack),this.addEventListener(\"track\",this._ontrack=e)},enumerable:!0,configurable:!0});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var n=this;return this._ontrackpoly||(this._ontrackpoly=function(t){t.stream.addEventListener(\"addtrack\",(function(i){var r;r=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===i.track.id})):{track:i.track};var a=new Event(\"track\");a.track=i.track,a.receiver=r,a.transceiver={receiver:r},a.streams=[t.stream],n.dispatchEvent(a)})),t.stream.getTracks().forEach((function(i){var r;r=e.RTCPeerConnection.prototype.getReceivers?n.getReceivers().find((function(e){return e.track&&e.track.id===i.id})):{track:i};var a=new Event(\"track\");a.track=i,a.receiver=r,a.transceiver={receiver:r},a.streams=[t.stream],n.dispatchEvent(a)}))},this.addEventListener(\"addstream\",this._ontrackpoly)),t.apply(this,arguments)}}else i.wrapPeerConnectionEvent(e,\"track\",(function(e){return e.transceiver||Object.defineProperty(e,\"transceiver\",{value:{receiver:e.receiver}}),e}))}function f(e){if(\"object\"===l(e)&&e.RTCPeerConnection&&!(\"getSenders\"in e.RTCPeerConnection.prototype)&&\"createDTMFSender\"in e.RTCPeerConnection.prototype){var t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&(\"audio\"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){var r=n.apply(this,arguments);return r||(r=t(this,e),this._senders.push(r)),r};var i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){i.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach((function(e){n._senders.push(t(n,e))}))};var a=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._senders=this._senders||[],a.apply(this,[e]),e.getTracks().forEach((function(e){var n=t._senders.find((function(t){return t.track===e}));n&&t._senders.splice(t._senders.indexOf(n),1)}))}}else if(\"object\"===l(e)&&e.RTCPeerConnection&&\"getSenders\"in e.RTCPeerConnection.prototype&&\"createDTMFSender\"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!(\"dtmf\"in e.RTCRtpSender.prototype)){var o=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var e=this,t=o.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t},Object.defineProperty(e.RTCRtpSender.prototype,\"dtmf\",{get:function(){return void 0===this._dtmf&&(\"audio\"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function m(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=this,n=Array.prototype.slice.call(arguments),i=n[0],r=n[1],a=n[2];if(arguments.length>0&&\"function\"==typeof i)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||\"function\"!=typeof i))return t.apply(this,[]);var o=function(e){var t={};return e.result().forEach((function(e){var n={id:e.id,timestamp:e.timestamp,type:{localcandidate:\"local-candidate\",remotecandidate:\"remote-candidate\"}[e.type]||e.type};e.names().forEach((function(t){n[t]=e.stat(t)})),t[n.id]=n})),t},s=function(e){return new Map(Object.keys(e).map((function(t){return[t,e[t]]})))};if(arguments.length>=2){var c=function(e){r(s(o(e)))};return t.apply(this,[c,i])}return new Promise((function(n,i){t.apply(e,[function(e){n(s(o(e)))},i])})).then(r,a)}}}function _(e){if(\"object\"===l(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver){if(!(\"getStats\"in e.RTCRtpSender.prototype)){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return i.filterStats(t,e.track,!0)}))}}if(!(\"getStats\"in e.RTCRtpReceiver.prototype)){var r=e.RTCPeerConnection.prototype.getReceivers;r&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,t=r.apply(this,[]);return t.forEach((function(t){return t._pc=e})),t}),i.wrapPeerConnectionEvent(e,\"track\",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){var e=this;return this._pc.getStats().then((function(t){return i.filterStats(t,e.track,!1)}))}}if(\"getStats\"in e.RTCRtpSender.prototype&&\"getStats\"in e.RTCRtpReceiver.prototype){var a=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){var t,n,i,r=arguments[0];return this.getSenders().forEach((function(e){e.track===r&&(t?i=!0:t=e)})),this.getReceivers().forEach((function(e){return e.track===r&&(n?i=!0:n=e),e.track===r})),i||t&&n?Promise.reject(new DOMException(\"There are more than one sender or receiver for the track.\",\"InvalidAccessError\")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException(\"There is no sender or receiver for the track.\",\"InvalidAccessError\"))}return a.apply(this,arguments)}}}}function v(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((function(t){return e._shimmedLocalStreams[t][0]}))};var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var i=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(i)&&this._shimmedLocalStreams[n.id].push(i):this._shimmedLocalStreams[n.id]=[n,i],i};var n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((function(e){if(t.getSenders().find((function(t){return t.track===e})))throw new DOMException(\"Track already exists.\",\"InvalidAccessError\")}));var i=this.getSenders();n.apply(this,arguments);var r=this.getSenders().filter((function(e){return-1===i.indexOf(e)}));this._shimmedLocalStreams[e.id]=[e].concat(r)};var i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],i.apply(this,arguments)};var r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((function(n){var i=t._shimmedLocalStreams[n].indexOf(e);-1!==i&&t._shimmedLocalStreams[n].splice(i,1),1===t._shimmedLocalStreams[n].length&&delete t._shimmedLocalStreams[n]})),r.apply(this,arguments)}}function g(e,t){if(e.RTCPeerConnection){if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return v(e);var n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){var e=this,t=n.apply(this);return this._reverseStreams=this._reverseStreams||{},t.map((function(t){return e._reverseStreams[t.id]}))};var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){var n=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((function(e){if(n.getSenders().find((function(t){return t.track===e})))throw new DOMException(\"Track already exists.\",\"InvalidAccessError\")})),!this._reverseStreams[t.id]){var r=new e.MediaStream(t.getTracks());this._streams[t.id]=r,this._reverseStreams[r.id]=t,t=r}i.apply(this,[t])};var r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},r.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){var i=this;if(\"closed\"===this.signalingState)throw new DOMException(\"The RTCPeerConnection's signalingState is 'closed'.\",\"InvalidStateError\");var r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find((function(e){return e===t})))throw new DOMException(\"The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.\",\"NotSupportedError\");if(this.getSenders().find((function(e){return e.track===t})))throw new DOMException(\"Track already exists.\",\"InvalidAccessError\");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var a=this._streams[n.id];if(a)a.addTrack(t),Promise.resolve().then((function(){i.dispatchEvent(new Event(\"negotiationneeded\"))}));else{var o=new e.MediaStream([t]);this._streams[n.id]=o,this._reverseStreams[o.id]=n,this.addStream(o)}return this.getSenders().find((function(e){return e.track===t}))},[\"createOffer\",\"createAnswer\"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],i=c({},t,(function(){var e=this,t=arguments;return arguments.length&&\"function\"==typeof arguments[0]?n.apply(this,[function(n){var i=s(e,n);t[0].apply(null,[i])},function(e){t[1]&&t[1].apply(null,e)},arguments[2]]):n.apply(this,arguments).then((function(t){return s(e,t)}))}));e.RTCPeerConnection.prototype[t]=i[t]}));var a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=u(this,arguments[0]),a.apply(this,arguments)):a.apply(this,arguments)};var o=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,\"localDescription\");Object.defineProperty(e.RTCPeerConnection.prototype,\"localDescription\",{get:function(){var e=o.get.apply(this);return\"\"===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){var t,n=this;if(\"closed\"===this.signalingState)throw new DOMException(\"The RTCPeerConnection's signalingState is 'closed'.\",\"InvalidStateError\");if(!e._pc)throw new DOMException(\"Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.\",\"TypeError\");if(e._pc!==this)throw new DOMException(\"Sender was not created by this connection.\",\"InvalidAccessError\");this._streams=this._streams||{},Object.keys(this._streams).forEach((function(i){n._streams[i].getTracks().find((function(t){return e.track===t}))&&(t=n._streams[i])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event(\"negotiationneeded\")))}}function s(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var i=e._reverseStreams[t],r=e._streams[i.id];n=n.replace(new RegExp(r.id,\"g\"),i.id)})),new RTCSessionDescription({type:t.type,sdp:n})}function u(e,t){var n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((function(t){var i=e._reverseStreams[t],r=e._streams[i.id];n=n.replace(new RegExp(i.id,\"g\"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}}function y(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&[\"setLocalDescription\",\"setRemoteDescription\",\"addIceCandidate\"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],i=c({},t,(function(){return arguments[0]=new(\"addIceCandidate\"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=i[t]}))}function S(e,t){i.wrapPeerConnectionEvent(e,\"negotiationneeded\",(function(e){var n=e.target;if(!(t.version<72||n.getConfiguration&&\"plan-b\"===n.getConfiguration().sdpSemantics)||\"stable\"===n.signalingState)return e}))}},{\"../utils.js\":11,\"./getdisplaymedia\":4,\"./getusermedia\":5}],4:[function(e,t,n){function i(e,t){e.navigator.mediaDevices&&\"getDisplayMedia\"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(\"function\"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((function(t){var i=n.video&&n.video.width,r=n.video&&n.video.height,a=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:\"desktop\",chromeMediaSourceId:t,maxFrameRate:a||3}},i&&(n.video.mandatory.maxWidth=i),r&&(n.video.mandatory.maxHeight=r),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error(\"shimGetDisplayMedia: getSourceId argument is not a function\"))}Object.defineProperty(n,\"__esModule\",{value:!0}),n.shimGetDisplayMedia=i},{}],5:[function(e,t,n){function i(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function r(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==a(e)&&\"function\"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(\"default\"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=o?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(r,s,c):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function a(e){return a=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},a(e)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.shimGetUserMedia=s;var o=r(e(\"../utils.js\")).log;function s(e,t){var n=e&&e.navigator;if(n.mediaDevices){var i=function(e){if(\"object\"!==a(e)||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach((function(n){if(\"require\"!==n&&\"advanced\"!==n&&\"mediaSource\"!==n){var i=\"object\"===a(e[n])?e[n]:{ideal:e[n]};void 0!==i.exact&&\"number\"==typeof i.exact&&(i.min=i.max=i.exact);var r=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):\"deviceId\"===t?\"sourceId\":t};if(void 0!==i.ideal){t.optional=t.optional||[];var o={};\"number\"==typeof i.ideal?(o[r(\"min\",n)]=i.ideal,t.optional.push(o),(o={})[r(\"max\",n)]=i.ideal,t.optional.push(o)):(o[r(\"\",n)]=i.ideal,t.optional.push(o))}void 0!==i.exact&&\"number\"!=typeof i.exact?(t.mandatory=t.mandatory||{},t.mandatory[r(\"\",n)]=i.exact):[\"min\",\"max\"].forEach((function(e){void 0!==i[e]&&(t.mandatory=t.mandatory||{},t.mandatory[r(e,n)]=i[e])}))}})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},r=function(e,r){if(t.version>=61)return r(e);if((e=JSON.parse(JSON.stringify(e)))&&\"object\"===a(e.audio)){var s=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};s((e=JSON.parse(JSON.stringify(e))).audio,\"autoGainControl\",\"googAutoGainControl\"),s(e.audio,\"noiseSuppression\",\"googNoiseSuppression\"),e.audio=i(e.audio)}if(e&&\"object\"===a(e.video)){var c=e.video.facingMode;c=c&&(\"object\"===a(c)?c:{ideal:c});var u,d=t.version<66;if(c&&(\"user\"===c.exact||\"environment\"===c.exact||\"user\"===c.ideal||\"environment\"===c.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||d)&&(delete e.video.facingMode,\"environment\"===c.exact||\"environment\"===c.ideal?u=[\"back\",\"rear\"]:\"user\"!==c.exact&&\"user\"!==c.ideal||(u=[\"front\"]),u))return n.mediaDevices.enumerateDevices().then((function(t){var n=(t=t.filter((function(e){return\"videoinput\"===e.kind}))).find((function(e){return u.some((function(t){return e.label.toLowerCase().includes(t)}))}));return!n&&t.length&&u.includes(\"back\")&&(n=t[t.length-1]),n&&(e.video.deviceId=c.exact?{exact:n.deviceId}:{ideal:n.deviceId}),e.video=i(e.video),o(\"chrome: \"+JSON.stringify(e)),r(e)}));e.video=i(e.video)}return o(\"chrome: \"+JSON.stringify(e)),r(e)},s=function(e){return t.version>=64?e:{name:{PermissionDeniedError:\"NotAllowedError\",PermissionDismissedError:\"NotAllowedError\",InvalidStateError:\"NotAllowedError\",DevicesNotFoundError:\"NotFoundError\",ConstraintNotSatisfiedError:\"OverconstrainedError\",TrackStartError:\"NotReadableError\",MediaDeviceFailedDueToShutdown:\"NotAllowedError\",MediaDeviceKillSwitchOn:\"NotAllowedError\",TabCaptureError:\"AbortError\",ScreenCaptureError:\"AbortError\",DeviceCaptureError:\"AbortError\"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString:function(){return this.name+(this.message&&\": \")+this.message}}},c=function(e,t,i){r(e,(function(e){n.webkitGetUserMedia(e,t,(function(e){i&&i(s(e))}))}))};if(n.getUserMedia=c.bind(n),n.mediaDevices.getUserMedia){var u=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(e){return r(e,(function(e){return u(e).then((function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach((function(e){e.stop()})),new DOMException(\"\",\"NotFoundError\");return t}),(function(e){return Promise.reject(s(e))}))}))}}}}},{\"../utils.js\":11}],6:[function(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.removeExtmapAllowMixed=f,n.shimAddIceCandidateNullOrEmpty=m,n.shimConnectionState=p,n.shimMaxMessageSize=l,n.shimParameterlessSetLocalDescription=_,n.shimRTCIceCandidate=u,n.shimRTCIceCandidateRelayProtocol=d,n.shimSendThrowTypeError=h;var i=s(e(\"sdp\")),r=o(e(\"./utils\"));function a(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==c(e)&&\"function\"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(\"default\"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=r?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}return i.default=e,n&&n.set(e,i),i}function s(e){return e&&e.__esModule?e:{default:e}}function c(e){return c=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},c(e)}function u(e){if(!(!e.RTCIceCandidate||e.RTCIceCandidate&&\"foundation\"in e.RTCIceCandidate.prototype)){var t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if(\"object\"===c(e)&&e.candidate&&0===e.candidate.indexOf(\"a=\")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){var n=new t(e),r=i.default.parseCandidate(e.candidate);for(var a in r)a in n||Object.defineProperty(n,a,{value:r[a]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,r.wrapPeerConnectionEvent(e,\"icecandidate\",(function(t){return t.candidate&&Object.defineProperty(t,\"candidate\",{value:new e.RTCIceCandidate(t.candidate),writable:\"false\"}),t}))}}function d(e){!e.RTCIceCandidate||e.RTCIceCandidate&&\"relayProtocol\"in e.RTCIceCandidate.prototype||r.wrapPeerConnectionEvent(e,\"icecandidate\",(function(e){if(e.candidate){var t=i.default.parseCandidate(e.candidate.candidate);\"relay\"===t.type&&(e.candidate.relayProtocol={0:\"tls\",1:\"tcp\",2:\"udp\"}[t.priority>>24])}return e}))}function l(e,t){if(e.RTCPeerConnection){\"sctp\"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,\"sctp\",{get:function(){return void 0===this._sctp?null:this._sctp}});var n=function(e){if(!e||!e.sdp)return!1;var t=i.default.splitSections(e.sdp);return t.shift(),t.some((function(e){var t=i.default.parseMLine(e);return t&&\"application\"===t.kind&&-1!==t.protocol.indexOf(\"SCTP\")}))},r=function(e){var t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\\d+)/);if(null===t||t.length<2)return-1;var n=parseInt(t[1],10);return n!=n?-1:n},a=function(e){var n=65536;return\"firefox\"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n},o=function(e,n){var r=65536;\"firefox\"===t.browser&&57===t.version&&(r=65535);var a=i.default.matchPrefix(e.sdp,\"a=max-message-size:\");return a.length>0?r=parseInt(a[0].substring(19),10):\"firefox\"===t.browser&&-1!==n&&(r=2147483637),r},s=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,\"chrome\"===t.browser&&t.version>=76&&\"plan-b\"===this.getConfiguration().sdpSemantics&&Object.defineProperty(this,\"sctp\",{get:function(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0}),n(arguments[0])){var e,i=r(arguments[0]),c=a(i),u=o(arguments[0],i);e=0===c&&0===u?Number.POSITIVE_INFINITY:0===c||0===u?Math.max(c,u):Math.min(c,u);var d={};Object.defineProperty(d,\"maxMessageSize\",{get:function(){return e}}),this._sctp=d}return s.apply(this,arguments)}}}function h(e){if(e.RTCPeerConnection&&\"createDataChannel\"in e.RTCPeerConnection.prototype){var t=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){var e=t.apply(this,arguments);return n(e,this),e},r.wrapPeerConnectionEvent(e,\"datachannel\",(function(e){return n(e.channel,e.target),e}))}function n(e,t){var n=e.send;e.send=function(){var i=arguments[0],r=i.length||i.size||i.byteLength;if(\"open\"===e.readyState&&t.sctp&&r>t.sctp.maxMessageSize)throw new TypeError(\"Message too large (can send a maximum of \"+t.sctp.maxMessageSize+\" bytes)\");return n.apply(e,arguments)}}}function p(e){if(e.RTCPeerConnection&&!(\"connectionState\"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype;Object.defineProperty(t,\"connectionState\",{get:function(){return{completed:\"connected\",checking:\"connecting\"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"onconnectionstatechange\",{get:function(){return this._onconnectionstatechange||null},set:function(e){this._onconnectionstatechange&&(this.removeEventListener(\"connectionstatechange\",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener(\"connectionstatechange\",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),[\"setLocalDescription\",\"setRemoteDescription\"].forEach((function(e){var n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(e){var t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;var n=new Event(\"connectionstatechange\",e);t.dispatchEvent(n)}return e},this.addEventListener(\"iceconnectionstatechange\",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}}function f(e,t){if(e.RTCPeerConnection&&!(\"chrome\"===t.browser&&t.version>=71||\"safari\"===t.browser&&t.version>=605)){var n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf(\"\\na=extmap-allow-mixed\")){var i=t.sdp.split(\"\\n\").filter((function(e){return\"a=extmap-allow-mixed\"!==e.trim()})).join(\"\\n\");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:i}):t.sdp=i}return n.apply(this,arguments)}}}function m(e,t){if(e.RTCPeerConnection&&e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?(\"chrome\"===t.browser&&t.version<78||\"firefox\"===t.browser&&t.version<68||\"safari\"===t.browser)&&arguments[0]&&\"\"===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}}function _(e,t){if(e.RTCPeerConnection&&e.RTCPeerConnection.prototype){var n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){var e=this,t=arguments[0]||{};if(\"object\"!==c(t)||t.type&&t.sdp)return n.apply(this,arguments);if(!(t={type:t.type,sdp:t.sdp}).type)switch(this.signalingState){case\"stable\":case\"have-local-offer\":case\"have-remote-pranswer\":t.type=\"offer\";break;default:t.type=\"answer\"}return t.sdp||\"offer\"!==t.type&&\"answer\"!==t.type?n.apply(this,[t]):(\"offer\"===t.type?this.createOffer:this.createAnswer).apply(this).then((function(t){return n.apply(e,[t])}))})}}},{\"./utils\":11,sdp:12}],7:[function(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.shimAddTransceiver=T,n.shimCreateAnswer=R,n.shimCreateOffer=E,Object.defineProperty(n,\"shimGetDisplayMedia\",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),n.shimGetParameters=w,Object.defineProperty(n,\"shimGetUserMedia\",{enumerable:!0,get:function(){return r.shimGetUserMedia}}),n.shimOnTrack=g,n.shimPeerConnection=y,n.shimRTCDataChannel=I,n.shimReceiverGetStats=b,n.shimRemoveStream=k,n.shimSenderGetStats=S;var i=s(e(\"../utils\")),r=e(\"./getusermedia\"),a=e(\"./getdisplaymedia\");function o(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function s(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==v(e)&&\"function\"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var i={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(\"default\"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=r?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}return i.default=e,n&&n.set(e,i),i}function c(e){return h(e)||l(e)||d(e)||u()}function u(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}function d(e,t){if(e){if(\"string\"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===n&&e.constructor&&(n=e.constructor.name),\"Map\"===n||\"Set\"===n?Array.from(e):\"Arguments\"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function l(e){if(\"undefined\"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e[\"@@iterator\"])return Array.from(e)}function h(e){if(Array.isArray(e))return p(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function f(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=_(e,\"string\");return\"symbol\"===v(t)?t:String(t)}function _(e,t){if(\"object\"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||\"default\");if(\"object\"!==v(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}function v(e){return v=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},v(e)}function g(e){\"object\"===v(e)&&e.RTCTrackEvent&&\"receiver\"in e.RTCTrackEvent.prototype&&!(\"transceiver\"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,\"transceiver\",{get:function(){return{receiver:this.receiver}}})}function y(e,t){if(\"object\"===v(e)&&(e.RTCPeerConnection||e.mozRTCPeerConnection)){!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&[\"setLocalDescription\",\"setRemoteDescription\",\"addIceCandidate\"].forEach((function(t){var n=e.RTCPeerConnection.prototype[t],i=f({},t,(function(){return arguments[0]=new(\"addIceCandidate\"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}));e.RTCPeerConnection.prototype[t]=i[t]}));var n={inboundrtp:\"inbound-rtp\",outboundrtp:\"outbound-rtp\",candidatepair:\"candidate-pair\",localcandidate:\"local-candidate\",remotecandidate:\"remote-candidate\"},i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){var e=Array.prototype.slice.call(arguments),r=e[0],a=e[1],o=e[2];return i.apply(this,[r||null]).then((function(e){if(t.version<53&&!a)try{e.forEach((function(e){e.type=n[e.type]||e.type}))}catch(i){if(\"TypeError\"!==i.name)throw i;e.forEach((function(t,i){e.set(i,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(a,o)}}}function S(e){if(\"object\"===v(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!(\"getStats\"in e.RTCRtpSender.prototype))){var t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n});var n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){var e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function b(e){if(\"object\"===v(e)&&e.RTCPeerConnection&&e.RTCRtpSender&&(!e.RTCRtpSender||!(\"getStats\"in e.RTCRtpReceiver.prototype))){var t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){var e=this,n=t.apply(this,[]);return n.forEach((function(t){return t._pc=e})),n}),i.wrapPeerConnectionEvent(e,\"track\",(function(e){return e.receiver._pc=e.srcElement,e})),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function k(e){e.RTCPeerConnection&&!(\"removeStream\"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;i.deprecated(\"removeStream\",\"removeTrack\"),this.getSenders().forEach((function(n){n.track&&e.getTracks().includes(n.track)&&t.removeTrack(n)}))})}function I(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function T(e){if(\"object\"===v(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]);var n=(e=c(e)).length>0;n&&e.forEach((function(e){if(\"rid\"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError(\"Invalid RID value provided.\");if(\"scaleResolutionDownBy\"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError(\"scale_resolution_down_by must be >= 1.0\");if(\"maxFramerate\"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError(\"max_framerate must be >= 0.0\")}));var i=t.apply(this,arguments);if(n){var r=i.sender,a=r.getParameters();(!(\"encodings\"in a)||1===a.encodings.length&&0===Object.keys(a.encodings[0]).length)&&(a.encodings=e,r.sendEncodings=e,this.setParametersPromises.push(r.setParameters(a).then((function(){delete r.sendEncodings})).catch((function(){delete r.sendEncodings}))))}return i})}}function w(e){if(\"object\"===v(e)&&e.RTCRtpSender){var t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){var e=t.apply(this,arguments);return\"encodings\"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}}function E(e){if(\"object\"===v(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}}function R(e){if(\"object\"===v(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){var e=arguments,n=this;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((function(){return t.apply(n,e)})).finally((function(){n.setParametersPromises=[]})):t.apply(this,arguments)}}}},{\"../utils\":11,\"./getdisplaymedia\":8,\"./getusermedia\":9}],8:[function(e,t,n){function i(e,t){e.navigator.mediaDevices&&\"getDisplayMedia\"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){var i=new DOMException(\"getDisplayMedia without video constraints is undefined\");return i.name=\"NotFoundError\",i.code=8,Promise.reject(i)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}Object.defineProperty(n,\"__esModule\",{value:!0}),n.shimGetDisplayMedia=i},{}],9:[function(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.shimGetUserMedia=s;var i=a(e(\"../utils\"));function r(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==o(e)&&\"function\"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(\"default\"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=a?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(i,s,c):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}function o(e){return o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},o(e)}function s(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){i.deprecated(\"navigator.getUserMedia\",\"navigator.mediaDevices.getUserMedia\"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&\"autoGainControl\"in n.mediaDevices.getSupportedConstraints())){var a=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},s=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(e){return\"object\"===o(e)&&\"object\"===o(e.audio)&&(e=JSON.parse(JSON.stringify(e)),a(e.audio,\"autoGainControl\",\"mozAutoGainControl\"),a(e.audio,\"noiseSuppression\",\"mozNoiseSuppression\")),s(e)},r&&r.prototype.getSettings){var c=r.prototype.getSettings;r.prototype.getSettings=function(){var e=c.apply(this,arguments);return a(e,\"mozAutoGainControl\",\"autoGainControl\"),a(e,\"mozNoiseSuppression\",\"noiseSuppression\"),e}}if(r&&r.prototype.applyConstraints){var u=r.prototype.applyConstraints;r.prototype.applyConstraints=function(e){return\"audio\"===this.kind&&\"object\"===o(e)&&(e=JSON.parse(JSON.stringify(e)),a(e,\"autoGainControl\",\"mozAutoGainControl\"),a(e,\"noiseSuppression\",\"mozNoiseSuppression\")),u.apply(this,[e])}}}}},{\"../utils\":11}],10:[function(e,t,n){Object.defineProperty(n,\"__esModule\",{value:!0}),n.shimAudioContext=p,n.shimCallbacksAPI=s,n.shimConstraints=u,n.shimCreateOfferLegacy=h,n.shimGetUserMedia=c,n.shimLocalStreamsAPI=shimLocalStreamsAPI,n.shimRTCIceServerUrls=d,n.shimRemoteStreamsAPI=shimRemoteStreamsAPI,n.shimTrackEventTransceiver=l;var i=a(e(\"../utils\"));function r(e){if(\"function\"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}function a(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||\"object\"!==o(e)&&\"function\"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(\"default\"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var c=a?Object.getOwnPropertyDescriptor(e,s):null;c&&(c.get||c.set)?Object.defineProperty(i,s,c):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}function o(e){return o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},o(e)}function shimLocalStreamsAPI(e){if(\"object\"===o(e)&&e.RTCPeerConnection){if(\"getLocalStreams\"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!(\"addStream\"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((function(i){return t.call(n,i,e)})),e.getVideoTracks().forEach((function(i){return t.call(n,i,e)}))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=this,i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];return r&&r.forEach((function(e){n._localStreams?n._localStreams.includes(e)||n._localStreams.push(e):n._localStreams=[e]})),t.apply(this,arguments)}}\"removeStream\"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){var t=this;this._localStreams||(this._localStreams=[]);var n=this._localStreams.indexOf(e);if(-1!==n){this._localStreams.splice(n,1);var i=e.getTracks();this.getSenders().forEach((function(e){i.includes(e.track)&&t.removeTrack(e)}))}})}}function shimRemoteStreamsAPI(e){if(\"object\"===o(e)&&e.RTCPeerConnection&&(\"getRemoteStreams\"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!(\"onaddstream\"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,\"onaddstream\",{get:function(){return this._onaddstream},set:function(e){var t=this;this._onaddstream&&(this.removeEventListener(\"addstream\",this._onaddstream),this.removeEventListener(\"track\",this._onaddstreampoly)),this.addEventListener(\"addstream\",this._onaddstream=e),this.addEventListener(\"track\",this._onaddstreampoly=function(e){e.streams.forEach((function(e){if(t._remoteStreams||(t._remoteStreams=[]),!t._remoteStreams.includes(e)){t._remoteStreams.push(e);var n=new Event(\"addstream\");n.stream=e,t.dispatchEvent(n)}}))})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var e=this;return this._onaddstreampoly||this.addEventListener(\"track\",this._onaddstreampoly=function(t){t.streams.forEach((function(t){if(e._remoteStreams||(e._remoteStreams=[]),!(e._remoteStreams.indexOf(t)>=0)){e._remoteStreams.push(t);var n=new Event(\"addstream\");n.stream=t,e.dispatchEvent(n)}}))}),t.apply(e,arguments)}}}function s(e){if(\"object\"===o(e)&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,n=t.createOffer,i=t.createAnswer,r=t.setLocalDescription,a=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){var i=arguments.length>=2?arguments[2]:arguments[0],r=n.apply(this,[i]);return t?(r.then(e,t),Promise.resolve()):r},t.createAnswer=function(e,t){var n=arguments.length>=2?arguments[2]:arguments[0],r=i.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r};var c=function(e,t,n){var i=r.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i};t.setLocalDescription=c,c=function(e,t,n){var i=a.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.setRemoteDescription=c,c=function(e,t,n){var i=s.apply(this,[e]);return n?(i.then(t,n),Promise.resolve()):i},t.addIceCandidate=c}}function c(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,i=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(e){return i(u(e))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,i){t.mediaDevices.getUserMedia(e).then(n,i)}.bind(t))}function u(e){return e&&void 0!==e.video?Object.assign({},e,{video:i.compactObject(e.video)}):e}function d(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){for(var r=[],a=0;a<e.iceServers.length;a++){var o=e.iceServers[a];void 0===o.urls&&o.url?(i.deprecated(\"RTCIceServer.url\",\"RTCIceServer.urls\"),(o=JSON.parse(JSON.stringify(o))).urls=o.url,delete o.url,r.push(o)):r.push(e.iceServers[a])}e.iceServers=r}return new t(e,n)},e.RTCPeerConnection.prototype=t.prototype,\"generateCertificate\"in t&&Object.defineProperty(e.RTCPeerConnection,\"generateCertificate\",{get:function(){return t.generateCertificate}})}}function l(e){\"object\"===o(e)&&e.RTCTrackEvent&&\"receiver\"in e.RTCTrackEvent.prototype&&!(\"transceiver\"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,\"transceiver\",{get:function(){return{receiver:this.receiver}}})}function h(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);var n=this.getTransceivers().find((function(e){return\"audio\"===e.receiver.track.kind}));!1===e.offerToReceiveAudio&&n?\"sendrecv\"===n.direction?n.setDirection?n.setDirection(\"sendonly\"):n.direction=\"sendonly\":\"recvonly\"===n.direction&&(n.setDirection?n.setDirection(\"inactive\"):n.direction=\"inactive\"):!0!==e.offerToReceiveAudio||n||this.addTransceiver(\"audio\",{direction:\"recvonly\"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);var i=this.getTransceivers().find((function(e){return\"video\"===e.receiver.track.kind}));!1===e.offerToReceiveVideo&&i?\"sendrecv\"===i.direction?i.setDirection?i.setDirection(\"sendonly\"):i.direction=\"sendonly\":\"recvonly\"===i.direction&&(i.setDirection?i.setDirection(\"inactive\"):i.direction=\"inactive\"):!0!==e.offerToReceiveVideo||i||this.addTransceiver(\"video\",{direction:\"recvonly\"})}return t.apply(this,arguments)}}function p(e){\"object\"!==o(e)||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}},{\"../utils\":11}],11:[function(e,t,n){function i(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){var t=a(e,\"string\");return\"symbol\"===o(t)?t:String(t)}function a(e,t){if(\"object\"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||\"default\");if(\"object\"!==o(i))return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}function o(e){return o=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},o(e)}Object.defineProperty(n,\"__esModule\",{value:!0}),n.compactObject=v,n.deprecated=f,n.detectBrowser=m,n.disableLog=l,n.disableWarnings=h,n.extractVersion=u,n.filterStats=y,n.log=p,n.walkStats=g,n.wrapPeerConnectionEvent=d;var s=!0,c=!0;function u(e,t,n){var i=e.match(t);return i&&i.length>=n&&parseInt(i[n],10)}function d(e,t,n){if(e.RTCPeerConnection){var i=e.RTCPeerConnection.prototype,r=i.addEventListener;i.addEventListener=function(e,i){if(e!==t)return r.apply(this,arguments);var a=function(e){var t=n(e);t&&(i.handleEvent?i.handleEvent(t):i(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(i,a),r.apply(this,[e,a])};var a=i.removeEventListener;i.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return a.apply(this,arguments);if(!this._eventMap[t].has(n))return a.apply(this,arguments);var i=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,a.apply(this,[e,i])},Object.defineProperty(i,\"on\"+t,{get:function(){return this[\"_on\"+t]},set:function(e){this[\"_on\"+t]&&(this.removeEventListener(t,this[\"_on\"+t]),delete this[\"_on\"+t]),e&&this.addEventListener(t,this[\"_on\"+t]=e)},enumerable:!0,configurable:!0})}}function l(e){return\"boolean\"!=typeof e?new Error(\"Argument type: \"+o(e)+\". Please use a boolean.\"):(s=e,e?\"adapter.js logging disabled\":\"adapter.js logging enabled\")}function h(e){return\"boolean\"!=typeof e?new Error(\"Argument type: \"+o(e)+\". Please use a boolean.\"):(c=!e,\"adapter.js deprecation warnings \"+(e?\"disabled\":\"enabled\"))}function p(){if(\"object\"===(\"undefined\"==typeof window?\"undefined\":o(window))){if(s)return;\"undefined\"!=typeof console&&\"function\"==typeof console.log&&console.log.apply(console,arguments)}}function f(e,t){c&&console.warn(e+\" is deprecated, please use \"+t+\" instead.\")}function m(e){var t={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return t.browser=\"Not a browser.\",t;var n=e.navigator;if(n.mozGetUserMedia)t.browser=\"firefox\",t.version=u(n.userAgent,/Firefox\\/(\\d+)\\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser=\"chrome\",t.version=u(n.userAgent,/Chrom(e|ium)\\/(\\d+)\\./,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\\/(\\d+)\\./))return t.browser=\"Not a supported browser.\",t;t.browser=\"safari\",t.version=u(n.userAgent,/AppleWebKit\\/(\\d+)\\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&\"currentDirection\"in e.RTCRtpTransceiver.prototype}return t}function _(e){return\"[object Object]\"===Object.prototype.toString.call(e)}function v(e){return _(e)?Object.keys(e).reduce((function(t,n){var r=_(e[n]),a=r?v(e[n]):e[n],o=r&&!Object.keys(a).length;return void 0===a||o?t:Object.assign(t,i({},n,a))}),{}):e}function g(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((function(i){i.endsWith(\"Id\")?g(e,e.get(t[i]),n):i.endsWith(\"Ids\")&&t[i].forEach((function(t){g(e,e.get(t),n)}))})))}function y(e,t,n){var i=n?\"outbound-rtp\":\"inbound-rtp\",r=new Map;if(null===t)return r;var a=[];return e.forEach((function(e){\"track\"===e.type&&e.trackIdentifier===t.id&&a.push(e)})),a.forEach((function(t){e.forEach((function(n){n.type===i&&n.trackId===t.id&&g(e,n,r)}))})),r}},{}],12:[function(e,t,n){var i=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},r={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};r.localCName=r.generateIdentifier(),r.splitLines=function(e){return e.trim().split(\"\\n\").map((function(e){return e.trim()}))},r.splitSections=function(e){return e.split(\"\\nm=\").map((function(e,t){return(t>0?\"m=\"+e:e).trim()+\"\\r\\n\"}))},r.getDescription=function(e){var t=r.splitSections(e);return t&&t[0]},r.getMediaSections=function(e){var t=r.splitSections(e);return t.shift(),t},r.matchPrefix=function(e,t){return r.splitLines(e).filter((function(e){return 0===e.indexOf(t)}))},r.parseCandidate=function(e){for(var t=void 0,n={foundation:(t=0===e.indexOf(\"a=candidate:\")?e.substring(12).split(\" \"):e.substring(10).split(\" \"))[0],component:{1:\"rtp\",2:\"rtcp\"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]},i=8;i<t.length;i+=2)switch(t[i]){case\"raddr\":n.relatedAddress=t[i+1];break;case\"rport\":n.relatedPort=parseInt(t[i+1],10);break;case\"tcptype\":n.tcpType=t[i+1];break;case\"ufrag\":n.ufrag=t[i+1],n.usernameFragment=t[i+1];break;default:void 0===n[t[i]]&&(n[t[i]]=t[i+1])}return n},r.writeCandidate=function(e){var t=[];t.push(e.foundation);var n=e.component;\"rtp\"===n?t.push(1):\"rtcp\"===n?t.push(2):t.push(n),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);var i=e.type;return t.push(\"typ\"),t.push(i),\"host\"!==i&&e.relatedAddress&&e.relatedPort&&(t.push(\"raddr\"),t.push(e.relatedAddress),t.push(\"rport\"),t.push(e.relatedPort)),e.tcpType&&\"tcp\"===e.protocol.toLowerCase()&&(t.push(\"tcptype\"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push(\"ufrag\"),t.push(e.usernameFragment||e.ufrag)),\"candidate:\"+t.join(\" \")},r.parseIceOptions=function(e){return e.substring(14).split(\" \")},r.parseRtpMap=function(e){var t=e.substring(9).split(\" \"),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split(\"/\"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.channels=3===t.length?parseInt(t[2],10):1,n.numChannels=n.channels,n},r.writeRtpMap=function(e){var t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);var n=e.channels||e.numChannels||1;return\"a=rtpmap:\"+t+\" \"+e.name+\"/\"+e.clockRate+(1!==n?\"/\"+n:\"\")+\"\\r\\n\"},r.parseExtmap=function(e){var t=e.substring(9).split(\" \");return{id:parseInt(t[0],10),direction:t[0].indexOf(\"/\")>0?t[0].split(\"/\")[1]:\"sendrecv\",uri:t[1],attributes:t.slice(2).join(\" \")}},r.writeExtmap=function(e){return\"a=extmap:\"+(e.id||e.preferredId)+(e.direction&&\"sendrecv\"!==e.direction?\"/\"+e.direction:\"\")+\" \"+e.uri+(e.attributes?\" \"+e.attributes:\"\")+\"\\r\\n\"},r.parseFmtp=function(e){for(var t={},n=void 0,i=e.substring(e.indexOf(\" \")+1).split(\";\"),r=0;r<i.length;r++)t[(n=i[r].trim().split(\"=\"))[0].trim()]=n[1];return t},r.writeFmtp=function(e){var t=\"\",n=e.payloadType;if(void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){var i=[];Object.keys(e.parameters).forEach((function(t){void 0!==e.parameters[t]?i.push(t+\"=\"+e.parameters[t]):i.push(t)})),t+=\"a=fmtp:\"+n+\" \"+i.join(\";\")+\"\\r\\n\"}return t},r.parseRtcpFb=function(e){var t=e.substring(e.indexOf(\" \")+1).split(\" \");return{type:t.shift(),parameter:t.join(\" \")}},r.writeRtcpFb=function(e){var t=\"\",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((function(e){t+=\"a=rtcp-fb:\"+n+\" \"+e.type+(e.parameter&&e.parameter.length?\" \"+e.parameter:\"\")+\"\\r\\n\"})),t},r.parseSsrcMedia=function(e){var t=e.indexOf(\" \"),n={ssrc:parseInt(e.substring(7,t),10)},i=e.indexOf(\":\",t);return i>-1?(n.attribute=e.substring(t+1,i),n.value=e.substring(i+1)):n.attribute=e.substring(t+1),n},r.parseSsrcGroup=function(e){var t=e.substring(13).split(\" \");return{semantics:t.shift(),ssrcs:t.map((function(e){return parseInt(e,10)}))}},r.getMid=function(e){var t=r.matchPrefix(e,\"a=mid:\")[0];if(t)return t.substring(6)},r.parseFingerprint=function(e){var t=e.substring(14).split(\" \");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},r.getDtlsParameters=function(e,t){return{role:\"auto\",fingerprints:r.matchPrefix(e+t,\"a=fingerprint:\").map(r.parseFingerprint)}},r.writeDtlsParameters=function(e,t){var n=\"a=setup:\"+t+\"\\r\\n\";return e.fingerprints.forEach((function(e){n+=\"a=fingerprint:\"+e.algorithm+\" \"+e.value+\"\\r\\n\"})),n},r.parseCryptoLine=function(e){var t=e.substring(9).split(\" \");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},r.writeCryptoLine=function(e){return\"a=crypto:\"+e.tag+\" \"+e.cryptoSuite+\" \"+(\"object\"===i(e.keyParams)?r.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?\" \"+e.sessionParams.join(\" \"):\"\")+\"\\r\\n\"},r.parseCryptoKeyParams=function(e){if(0!==e.indexOf(\"inline:\"))return null;var t=e.substring(7).split(\"|\");return{keyMethod:\"inline\",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(\":\")[0]:void 0,mkiLength:t[2]?t[2].split(\":\")[1]:void 0}},r.writeCryptoKeyParams=function(e){return e.keyMethod+\":\"+e.keySalt+(e.lifeTime?\"|\"+e.lifeTime:\"\")+(e.mkiValue&&e.mkiLength?\"|\"+e.mkiValue+\":\"+e.mkiLength:\"\")},r.getCryptoParameters=function(e,t){return r.matchPrefix(e+t,\"a=crypto:\").map(r.parseCryptoLine)},r.getIceParameters=function(e,t){var n=r.matchPrefix(e+t,\"a=ice-ufrag:\")[0],i=r.matchPrefix(e+t,\"a=ice-pwd:\")[0];return n&&i?{usernameFragment:n.substring(12),password:i.substring(10)}:null},r.writeIceParameters=function(e){var t=\"a=ice-ufrag:\"+e.usernameFragment+\"\\r\\na=ice-pwd:\"+e.password+\"\\r\\n\";return e.iceLite&&(t+=\"a=ice-lite\\r\\n\"),t},r.parseRtpParameters=function(e){var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=r.splitLines(e)[0].split(\" \");t.profile=n[2];for(var i=3;i<n.length;i++){var a=n[i],o=r.matchPrefix(e,\"a=rtpmap:\"+a+\" \")[0];if(o){var s=r.parseRtpMap(o),c=r.matchPrefix(e,\"a=fmtp:\"+a+\" \");switch(s.parameters=c.length?r.parseFmtp(c[0]):{},s.rtcpFeedback=r.matchPrefix(e,\"a=rtcp-fb:\"+a+\" \").map(r.parseRtcpFb),t.codecs.push(s),s.name.toUpperCase()){case\"RED\":case\"ULPFEC\":t.fecMechanisms.push(s.name.toUpperCase())}}}r.matchPrefix(e,\"a=extmap:\").forEach((function(e){t.headerExtensions.push(r.parseExtmap(e))}));var u=r.matchPrefix(e,\"a=rtcp-fb:* \").map(r.parseRtcpFb);return t.codecs.forEach((function(e){u.forEach((function(t){e.rtcpFeedback.find((function(e){return e.type===t.type&&e.parameter===t.parameter}))||e.rtcpFeedback.push(t)}))})),t},r.writeRtpDescription=function(e,t){var n=\"\";n+=\"m=\"+e+\" \",n+=t.codecs.length>0?\"9\":\"0\",n+=\" \"+(t.profile||\"UDP/TLS/RTP/SAVPF\")+\" \",n+=t.codecs.map((function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType})).join(\" \")+\"\\r\\n\",n+=\"c=IN IP4 0.0.0.0\\r\\n\",n+=\"a=rtcp:9 IN IP4 0.0.0.0\\r\\n\",t.codecs.forEach((function(e){n+=r.writeRtpMap(e),n+=r.writeFmtp(e),n+=r.writeRtcpFb(e)}));var i=0;return t.codecs.forEach((function(e){e.maxptime>i&&(i=e.maxptime)})),i>0&&(n+=\"a=maxptime:\"+i+\"\\r\\n\"),t.headerExtensions&&t.headerExtensions.forEach((function(e){n+=r.writeExtmap(e)})),n},r.parseRtpEncodingParameters=function(e){var t=[],n=r.parseRtpParameters(e),i=-1!==n.fecMechanisms.indexOf(\"RED\"),a=-1!==n.fecMechanisms.indexOf(\"ULPFEC\"),o=r.matchPrefix(e,\"a=ssrc:\").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return\"cname\"===e.attribute})),s=o.length>0&&o[0].ssrc,c=void 0,u=r.matchPrefix(e,\"a=ssrc-group:FID\").map((function(e){return e.substring(17).split(\" \").map((function(e){return parseInt(e,10)}))}));u.length>0&&u[0].length>1&&u[0][0]===s&&(c=u[0][1]),n.codecs.forEach((function(e){if(\"RTX\"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10)};s&&c&&(n.rtx={ssrc:c}),t.push(n),i&&((n=JSON.parse(JSON.stringify(n))).fec={ssrc:s,mechanism:a?\"red+ulpfec\":\"red\"},t.push(n))}})),0===t.length&&s&&t.push({ssrc:s});var d=r.matchPrefix(e,\"b=\");return d.length&&(d=0===d[0].indexOf(\"b=TIAS:\")?parseInt(d[0].substring(7),10):0===d[0].indexOf(\"b=AS:\")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,t.forEach((function(e){e.maxBitrate=d}))),t},r.parseRtcpParameters=function(e){var t={},n=r.matchPrefix(e,\"a=ssrc:\").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return\"cname\"===e.attribute}))[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var i=r.matchPrefix(e,\"a=rtcp-rsize\");t.reducedSize=i.length>0,t.compound=0===i.length;var a=r.matchPrefix(e,\"a=rtcp-mux\");return t.mux=a.length>0,t},r.writeRtcpParameters=function(e){var t=\"\";return e.reducedSize&&(t+=\"a=rtcp-rsize\\r\\n\"),e.mux&&(t+=\"a=rtcp-mux\\r\\n\"),void 0!==e.ssrc&&e.cname&&(t+=\"a=ssrc:\"+e.ssrc+\" cname:\"+e.cname+\"\\r\\n\"),t},r.parseMsid=function(e){var t=void 0,n=r.matchPrefix(e,\"a=msid:\");if(1===n.length)return{stream:(t=n[0].substring(7).split(\" \"))[0],track:t[1]};var i=r.matchPrefix(e,\"a=ssrc:\").map((function(e){return r.parseSsrcMedia(e)})).filter((function(e){return\"msid\"===e.attribute}));return i.length>0?{stream:(t=i[0].value.split(\" \"))[0],track:t[1]}:void 0},r.parseSctpDescription=function(e){var t=r.parseMLine(e),n=r.matchPrefix(e,\"a=max-message-size:\"),i=void 0;n.length>0&&(i=parseInt(n[0].substring(19),10)),isNaN(i)&&(i=65536);var a=r.matchPrefix(e,\"a=sctp-port:\");if(a.length>0)return{port:parseInt(a[0].substring(12),10),protocol:t.fmt,maxMessageSize:i};var o=r.matchPrefix(e,\"a=sctpmap:\");if(o.length>0){var s=o[0].substring(10).split(\" \");return{port:parseInt(s[0],10),protocol:s[1],maxMessageSize:i}}},r.writeSctpDescription=function(e,t){var n=[];return n=\"DTLS/SCTP\"!==e.protocol?[\"m=\"+e.kind+\" 9 \"+e.protocol+\" \"+t.protocol+\"\\r\\n\",\"c=IN IP4 0.0.0.0\\r\\n\",\"a=sctp-port:\"+t.port+\"\\r\\n\"]:[\"m=\"+e.kind+\" 9 \"+e.protocol+\" \"+t.port+\"\\r\\n\",\"c=IN IP4 0.0.0.0\\r\\n\",\"a=sctpmap:\"+t.port+\" \"+t.protocol+\" 65535\\r\\n\"],void 0!==t.maxMessageSize&&n.push(\"a=max-message-size:\"+t.maxMessageSize+\"\\r\\n\"),n.join(\"\")},r.generateSessionId=function(){return Math.random().toString().substr(2,22)},r.writeSessionBoilerplate=function(e,t,n){var i=void 0!==t?t:2;return\"v=0\\r\\no=\"+(n||\"thisisadapterortc\")+\" \"+(e||r.generateSessionId())+\" \"+i+\" IN IP4 127.0.0.1\\r\\ns=-\\r\\nt=0 0\\r\\n\"},r.getDirection=function(e,t){for(var n=r.splitLines(e),i=0;i<n.length;i++)switch(n[i]){case\"a=sendrecv\":case\"a=sendonly\":case\"a=recvonly\":case\"a=inactive\":return n[i].substring(2)}return t?r.getDirection(t):\"sendrecv\"},r.getKind=function(e){return r.splitLines(e)[0].split(\" \")[0].substring(2)},r.isRejected=function(e){return\"0\"===e.split(\" \",2)[1]},r.parseMLine=function(e){var t=r.splitLines(e)[0].substring(2).split(\" \");return{kind:t[0],port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(\" \")}},r.parseOLine=function(e){var t=r.matchPrefix(e,\"o=\")[0].substring(2).split(\" \");return{username:t[0],sessionId:t[1],sessionVersion:parseInt(t[2],10),netType:t[3],addressType:t[4],address:t[5]}},r.isValidSDP=function(e){if(\"string\"!=typeof e||0===e.length)return!1;for(var t=r.splitLines(e),n=0;n<t.length;n++)if(t[n].length<2||\"=\"!==t[n].charAt(1))return!1;return!0},\"object\"===(void 0===t?\"undefined\":i(t))&&(t.exports=r)},{}]},{},[1])(1)}({exports:{}});var Dr=\"4.15.14\",Or={},Mr=qi,Nr=Ki,Lr=Object.keys||function(e){return Mr(e,Nr)},Ur=P,Vr=an,jr=rn,Fr=un,Br=he,Hr=Lr;Or.f=Ur&&!Vr?Object.defineProperties:function(e,t){Fr(e);for(var n,i=Br(t),r=Hr(t),a=r.length,o=0;a>o;)jr.f(e,n=r[o++],i[n]);return e};var Wr,Gr=Ie(\"document\",\"documentElement\"),zr=un,Jr=Or,qr=Ki,Kr=zn,Qr=Gr,Xr=zt,Yr=Gn(\"IE_PROTO\"),$r=function(){},Zr=function(e){return\"<script>\"+e+\"</\"+\"script>\"},ea=function(e){e.write(Zr(\"\")),e.close();var t=e.parentWindow.Object;return e=null,t},ta=function(){try{Wr=new ActiveXObject(\"htmlfile\")}catch(i){}var e,t;ta=\"undefined\"!=typeof document?document.domain&&Wr?ea(Wr):((t=Xr(\"iframe\")).style.display=\"none\",Qr.appendChild(t),t.src=String(\"javascript:\"),(e=t.contentWindow.document).open(),e.write(Zr(\"document.F=Object\")),e.close(),e.F):ea(Wr);for(var n=qr.length;n--;)delete ta.prototype[qr[n]];return ta()};Kr[Yr]=!0;var na=Object.create||function(e,t){var n;return null!==e?($r.prototype=zr(e),n=new $r,$r.prototype=null,n[Yr]=e):n=ta(),void 0===t?n:Jr.f(n,t)},ia=xt,ra=na,aa=rn.f,oa=ia(\"unscopables\"),sa=Array.prototype;null==sa[oa]&&aa(sa,oa,{configurable:!0,value:ra(null)});var ca,ua,da,la=function(e){sa[oa][e]=!0},ha={},pa=!x((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),fa=ft,ma=_e,_a=lt,va=pa,ga=Gn(\"IE_PROTO\"),ya=Object,Sa=ya.prototype,ba=va?ya.getPrototypeOf:function(e){var t=_a(e);if(fa(t,ga))return t[ga];var n=t.constructor;return ma(n)&&t instanceof n?n.prototype:t instanceof ya?Sa:null},ka=x,Ia=_e,Ta=ye,wa=ba,Ea=ki,Ra=xt(\"iterator\"),Ca=!1;[].keys&&(\"next\"in(da=[].keys())?(ua=wa(wa(da)))!==Object.prototype&&(ca=ua):Ca=!0);var Aa=!Ta(ca)||ka((function(){var e={};return ca[Ra].call(e)!==e}));Aa&&(ca={}),Ia(ca[Ra])||Ea(ca,Ra,(function(){return this}));var xa={IteratorPrototype:ca,BUGGY_SAFARI_ITERATORS:Ca},Pa=rn.f,Da=ft,Oa=xt(\"toStringTag\"),Ma=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Da(e,Oa)&&Pa(e,Oa,{configurable:!0,value:t})},Na=xa.IteratorPrototype,La=na,Ua=H,Va=Ma,ja=ha,Fa=function(){return this},Ba=function(e,t,n,i){var r=t+\" Iterator\";return e.prototype=La(Na,{next:Ua(+!i,n)}),Va(e,r,!1),ja[r]=Fa,e},Ha=_e,Wa=String,Ga=TypeError,za=ee,Ja=un,qa=function(e){if(\"object\"==typeof e||Ha(e))return e;throw Ga(\"Can't set \"+Wa(e)+\" as a prototype\")},Ka=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var e,t=!1,n={};try{(e=za(Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set))(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return Ja(n),qa(i),t?e(n,i):n.__proto__=i,n}}():void 0),Qa=Tr,Xa=N,Ya=_e,$a=Ba,Za=ba,eo=Ka,to=Ma,no=In,io=ki,ro=ha,ao=xn.PROPER,oo=xn.CONFIGURABLE,so=xa.IteratorPrototype,co=xa.BUGGY_SAFARI_ITERATORS,uo=xt(\"iterator\"),lo=\"keys\",ho=\"values\",po=\"entries\",fo=function(){return this},mo=function(e,t,n,i,r,a,o){$a(n,t,i);var s,c,u,d=function(e){if(e===r&&m)return m;if(!co&&e in p)return p[e];switch(e){case lo:case ho:case po:return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+\" Iterator\",h=!1,p=e.prototype,f=p[uo]||p[\"@@iterator\"]||r&&p[r],m=!co&&f||d(r),_=\"Array\"==t&&p.entries||f;if(_&&(s=Za(_.call(new e)))!==Object.prototype&&s.next&&(Za(s)!==so&&(eo?eo(s,so):Ya(s[uo])||io(s,uo,fo)),to(s,l,!0)),ao&&r==ho&&f&&f.name!==ho&&(oo?no(p,\"name\",ho):(h=!0,m=function(){return Xa(f,this)})),r)if(c={values:d(ho),keys:a?m:d(lo),entries:d(po)},o)for(u in c)(co||h||!(u in p))&&io(p,u,c[u]);else Qa({target:t,proto:!0,forced:co||h},c);return p[uo]!==m&&io(p,uo,m,{name:r}),ro[t]=m,c},_o=function(e,t){return{value:e,done:t}},vo=he,go=la,yo=ha,So=ai,bo=rn.f,ko=mo,Io=_o,To=P,wo=\"Array Iterator\",Eo=So.set,Ro=So.getterFor(wo),Co=ko(Array,\"Array\",(function(e,t){Eo(this,{type:wo,target:vo(e),index:0,kind:t})}),(function(){var e=Ro(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,Io(void 0,!0)):Io(\"keys\"==n?i:\"values\"==n?t[i]:[i,t[i]],!1)}),\"values\"),Ao=yo.Arguments=yo.Array;if(go(\"keys\"),go(\"values\"),go(\"entries\"),To&&\"values\"!==Ao.name)try{bo(Ao,\"name\",{value:\"values\"})}catch(qq){}var xo={};xo[xt(\"toStringTag\")]=\"z\";var Po=\"[object z]\"===String(xo),Do=Po,Oo=_e,Mo=Y,No=xt(\"toStringTag\"),Lo=Object,Uo=\"Arguments\"==Mo(function(){return arguments}()),Vo=Do?Mo:function(e){var t,n,i;return void 0===e?\"Undefined\":null===e?\"Null\":\"string\"==typeof(n=function(e,t){try{return e[t]}catch(qq){}}(t=Lo(e),No))?n:Uo?Mo(t):\"Object\"==(i=Mo(t))&&Oo(t.callee)?\"Arguments\":i},jo=Vo,Fo=Po?{}.toString:function(){return\"[object \"+jo(this)+\"]\"};Po||ki(Object.prototype,\"toString\",Fo,{unsafe:!0});var Bo={exports:{}},Ho={},Wo=Bt,Go=rn,zo=H,Jo=function(e,t,n){var i=Wo(t);i in e?Go.f(e,i,zo(0,n)):e[i]=n},qo=Pi,Ko=Li,Qo=Jo,Xo=Array,Yo=Math.max,$o=function(e,t,n){for(var i=Ko(e),r=qo(t,i),a=qo(void 0===n?i:n,i),o=Xo(Yo(a-r,0)),s=0;r<a;r++,s++)Qo(o,s,e[r]);return o.length=s,o},Zo=Y,es=he,ts=Ii.f,ns=$o,is=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ho.f=function(e){return is&&\"Window\"==Zo(e)?function(e){try{return ts(e)}catch(qq){return ns(is)}}(e):ts(es(e))};var rs=x((function(){if(\"function\"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,\"a\",{value:8})}})),as=x,os=ye,ss=Y,cs=rs,us=Object.isExtensible,ds=as((function(){us(1)}))||cs?function(e){return!!os(e)&&((!cs||\"ArrayBuffer\"!=ss(e))&&(!us||us(e)))}:us,ls=!x((function(){return Object.isExtensible(Object.preventExtensions({}))})),hs=Tr,ps=ee,fs=zn,ms=ye,_s=ft,vs=rn.f,gs=Ii,ys=Ho,Ss=ds,bs=ls,ks=!1,Is=yt(\"meta\"),Ts=0,ws=function(e){vs(e,Is,{value:{objectID:\"O\"+Ts++,weakData:{}}})},Es=Bo.exports={enable:function(){Es.enable=function(){},ks=!0;var e=gs.f,t=ps([].splice),n={};n[Is]=1,e(n).length&&(gs.f=function(n){for(var i=e(n),r=0,a=i.length;r<a;r++)if(i[r]===Is){t(i,r,1);break}return i},hs({target:\"Object\",stat:!0,forced:!0},{getOwnPropertyNames:ys.f}))},fastKey:function(e,t){if(!ms(e))return\"symbol\"==typeof e?e:(\"string\"==typeof e?\"S\":\"P\")+e;if(!_s(e,Is)){if(!Ss(e))return\"F\";if(!t)return\"E\";ws(e)}return e[Is].objectID},getWeakData:function(e,t){if(!_s(e,Is)){if(!Ss(e))return!0;if(!t)return!1;ws(e)}return e[Is].weakData},onFreeze:function(e){return bs&&ks&&Ss(e)&&!_s(e,Is)&&ws(e),e}};fs[Is]=!0;var Rs=qe,Cs=D,As=ee(ee.bind),xs=function(e,t){return Rs(e),void 0===t?e:Cs?As(e,t):function(){return e.apply(t,arguments)}},Ps=ha,Ds=xt(\"iterator\"),Os=Array.prototype,Ms=function(e){return void 0!==e&&(Ps.Array===e||Os[Ds]===e)},Ns=Vo,Ls=Xe,Us=oe,Vs=ha,js=xt(\"iterator\"),Fs=function(e){if(!Us(e))return Ls(e,js)||Ls(e,\"@@iterator\")||Vs[Ns(e)]},Bs=N,Hs=qe,Ws=un,Gs=We,zs=Fs,Js=TypeError,qs=function(e,t){var n=arguments.length<2?zs(e):t;if(Hs(n))return Ws(Bs(n,e));throw Js(Gs(e)+\" is not iterable\")},Ks=N,Qs=un,Xs=Xe,Ys=function(e,t,n){var i,r;Qs(e);try{if(!(i=Xs(e,\"return\"))){if(\"throw\"===t)throw n;return n}i=Ks(i,e)}catch(qq){r=!0,i=qq}if(\"throw\"===t)throw n;if(r)throw i;return Qs(i),n},$s=xs,Zs=N,ec=un,tc=We,nc=Ms,ic=Li,rc=Te,ac=qs,oc=Fs,sc=Ys,cc=TypeError,uc=function(e,t){this.stopped=e,this.result=t},dc=uc.prototype,lc=function(e,t,n){var i,r,a,o,s,c,u,d=n&&n.that,l=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),m=$s(t,d),_=function(e){return i&&sc(i,\"normal\",e),new uc(!0,e)},v=function(e){return l?(ec(e),f?m(e[0],e[1],_):m(e[0],e[1])):f?m(e,_):m(e)};if(h)i=e.iterator;else if(p)i=e;else{if(!(r=oc(e)))throw cc(tc(e)+\" is not iterable\");if(nc(r)){for(a=0,o=ic(e);o>a;a++)if((s=v(e[a]))&&rc(dc,s))return s;return new uc(!1)}i=ac(e,r)}for(c=h?e.next:i.next;!(u=Zs(c,i)).done;){try{s=v(u.value)}catch(qq){sc(i,\"throw\",qq)}if(\"object\"==typeof s&&s&&rc(dc,s))return s}return new uc(!1)},hc=Te,pc=TypeError,fc=function(e,t){if(hc(t,e))return e;throw pc(\"Incorrect invocation\")},mc=xt(\"iterator\"),_c=!1;try{var vc=0,gc={next:function(){return{done:!!vc++}},return:function(){_c=!0}};gc[mc]=function(){return this},Array.from(gc,(function(){throw 2}))}catch(qq){}var yc=function(e,t){if(!t&&!_c)return!1;var n=!1;try{var i={};i[mc]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(qq){}return n},Sc=_e,bc=ye,kc=Ka,Ic=function(e,t,n){var i,r;return kc&&Sc(i=t.constructor)&&i!==n&&bc(r=i.prototype)&&r!==n.prototype&&kc(e,r),e},Tc=Tr,wc=C,Ec=ee,Rc=_r,Cc=ki,Ac=Bo.exports,xc=lc,Pc=fc,Dc=_e,Oc=oe,Mc=ye,Nc=x,Lc=yc,Uc=Ma,Vc=Ic,jc=function(e,t,n){var i=-1!==e.indexOf(\"Map\"),r=-1!==e.indexOf(\"Weak\"),a=i?\"set\":\"add\",o=wc[e],s=o&&o.prototype,c=o,u={},d=function(e){var t=Ec(s[e]);Cc(s,e,\"add\"==e?function(e){return t(this,0===e?0:e),this}:\"delete\"==e?function(e){return!(r&&!Mc(e))&&t(this,0===e?0:e)}:\"get\"==e?function(e){return r&&!Mc(e)?void 0:t(this,0===e?0:e)}:\"has\"==e?function(e){return!(r&&!Mc(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Rc(e,!Dc(o)||!(r||s.forEach&&!Nc((function(){(new o).entries().next()})))))c=n.getConstructor(t,e,i,a),Ac.enable();else if(Rc(e,!0)){var l=new c,h=l[a](r?{}:-0,1)!=l,p=Nc((function(){l.has(1)})),f=Lc((function(e){new o(e)})),m=!r&&Nc((function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)}));f||((c=t((function(e,t){Pc(e,s);var n=Vc(new o,e,c);return Oc(t)||xc(t,n[a],{that:n,AS_ENTRIES:i}),n}))).prototype=s,s.constructor=c),(p||m)&&(d(\"delete\"),d(\"has\"),i&&d(\"get\")),(m||h)&&d(a),r&&s.clear&&delete s.clear}return u[e]=c,Tc({global:!0,constructor:!0,forced:c!=o},u),Uc(c,e),r||n.setStrong(c,e,i),c},Fc=ki,Bc=function(e,t,n){for(var i in t)Fc(e,i,t[i],n);return e},Hc=Ie,Wc=rn,Gc=P,zc=xt(\"species\"),Jc=function(e){var t=Hc(e),n=Wc.f;Gc&&t&&!t[zc]&&n(t,zc,{configurable:!0,get:function(){return this}})},qc=rn.f,Kc=na,Qc=Bc,Xc=xs,Yc=fc,$c=oe,Zc=lc,eu=mo,tu=_o,nu=Jc,iu=P,ru=Bo.exports.fastKey,au=ai.set,ou=ai.getterFor,su={getConstructor:function(e,t,n,i){var r=e((function(e,r){Yc(e,a),au(e,{type:t,index:Kc(null),first:void 0,last:void 0,size:0}),iu||(e.size=0),$c(r)||Zc(r,e[i],{that:e,AS_ENTRIES:n})})),a=r.prototype,o=ou(t),s=function(e,t,n){var i,r,a=o(e),s=c(e,t);return s?s.value=n:(a.last=s={index:r=ru(t,!0),key:t,value:n,previous:i=a.last,next:void 0,removed:!1},a.first||(a.first=s),i&&(i.next=s),iu?a.size++:e.size++,\"F\"!==r&&(a.index[r]=s)),e},c=function(e,t){var n,i=o(e),r=ru(t);if(\"F\"!==r)return i.index[r];for(n=i.first;n;n=n.next)if(n.key==t)return n};return Qc(a,{clear:function(){for(var e=o(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,iu?e.size=0:this.size=0},delete:function(e){var t=this,n=o(t),i=c(t,e);if(i){var r=i.next,a=i.previous;delete n.index[i.index],i.removed=!0,a&&(a.next=r),r&&(r.previous=a),n.first==i&&(n.first=r),n.last==i&&(n.last=a),iu?n.size--:t.size--}return!!i},forEach:function(e){for(var t,n=o(this),i=Xc(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!c(this,e)}}),Qc(a,n?{get:function(e){var t=c(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),iu&&qc(a,\"size\",{get:function(){return o(this).size}}),r},setStrong:function(e,t,n){var i=t+\" Iterator\",r=ou(t),a=ou(i);eu(e,t,(function(e,t){au(this,{type:i,target:e,state:r(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?tu(\"keys\"==t?n.key:\"values\"==t?n.value:[n.key,n.value],!1):(e.target=void 0,tu(void 0,!0))}),n?\"entries\":\"values\",!n,!0),nu(t)}};jc(\"Set\",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),su);var cu=Vo,uu=String,du=function(e){if(\"Symbol\"===cu(e))throw TypeError(\"Cannot convert a Symbol value to a string\");return uu(e)},lu=ee,hu=Ri,pu=du,fu=ue,mu=lu(\"\".charAt),_u=lu(\"\".charCodeAt),vu=lu(\"\".slice),gu=function(e){return function(t,n){var i,r,a=pu(fu(t)),o=hu(n),s=a.length;return o<0||o>=s?e?\"\":void 0:(i=_u(a,o))<55296||i>56319||o+1===s||(r=_u(a,o+1))<56320||r>57343?e?mu(a,o):i:e?vu(a,o,o+2):r-56320+(i-55296<<10)+65536}},yu={codeAt:gu(!1),charAt:gu(!0)},Su=yu.charAt,bu=du,ku=ai,Iu=mo,Tu=_o,wu=\"String Iterator\",Eu=ku.set,Ru=ku.getterFor(wu);Iu(String,\"String\",(function(e){Eu(this,{type:wu,string:bu(e),index:0})}),(function(){var e,t=Ru(this),n=t.string,i=t.index;return i>=n.length?Tu(void 0,!0):(e=Su(n,i),t.index+=e.length,Tu(e,!1))}));var Cu={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Au=zt(\"span\").classList,xu=Au&&Au.constructor&&Au.constructor.prototype,Pu=xu===Object.prototype?void 0:xu,Du=C,Ou=Cu,Mu=Pu,Nu=Co,Lu=In,Uu=xt,Vu=Uu(\"iterator\"),ju=Uu(\"toStringTag\"),Fu=Nu.values,Bu=function(e,t){if(e){if(e[Vu]!==Fu)try{Lu(e,Vu,Fu)}catch(qq){e[Vu]=Fu}if(e[ju]||Lu(e,ju,t),Ou[t])for(var n in Nu)if(e[n]!==Nu[n])try{Lu(e,n,Nu[n])}catch(qq){e[n]=Nu[n]}}};for(var Hu in Ou)Bu(Du[Hu]&&Du[Hu].prototype,Hu);Bu(Mu,\"DOMTokenList\");var Wu=D,Gu=Function.prototype,zu=Gu.apply,Ju=Gu.call,qu=\"object\"==typeof Reflect&&Reflect.apply||(Wu?Ju.bind(zu):function(){return Ju.apply(zu,arguments)}),Ku=ee([].slice),Qu=TypeError,Xu=function(e,t){if(e<t)throw Qu(\"Not enough arguments\");return e},Yu=C,$u=qu,Zu=_e,ed=Ku,td=Xu,nd=/MSIE .\\./.test(we),id=Yu.Function,rd=function(e){return nd?function(t,n){var i=td(arguments.length,1)>2,r=Zu(t)?t:id(t),a=i?ed(arguments,2):void 0;return e(i?function(){$u(r,this,a)}:r,n)}:e},ad={setTimeout:rd(Yu.setTimeout),setInterval:rd(Yu.setInterval)},od=ad.setInterval;Tr({global:!0,bind:!0,forced:C.setInterval!==od},{setInterval:od});var sd=ad.setTimeout;Tr({global:!0,bind:!0,forced:C.setTimeout!==sd},{setTimeout:sd}),jc(\"Map\",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),su);var cd=Y,ud=Array.isArray||function(e){return\"Array\"==cd(e)},dd=ee,ld=x,hd=_e,pd=Vo,fd=Un,md=function(){},_d=[],vd=Ie(\"Reflect\",\"construct\"),gd=/^\\s*(?:class|function)\\b/,yd=dd(gd.exec),Sd=!gd.exec(md),bd=function(e){if(!hd(e))return!1;try{return vd(md,_d,e),!0}catch(qq){return!1}},kd=function(e){if(!hd(e))return!1;switch(pd(e)){case\"AsyncFunction\":case\"GeneratorFunction\":case\"AsyncGeneratorFunction\":return!1}try{return Sd||!!yd(gd,fd(e))}catch(qq){return!0}};kd.sham=!0;var Id=!vd||ld((function(){var e;return bd(bd.call)||!bd(Object)||!bd((function(){e=!0}))||e}))?kd:bd,Td=ud,wd=Id,Ed=ye,Rd=xt(\"species\"),Cd=Array,Ad=function(e){var t;return Td(e)&&(t=e.constructor,(wd(t)&&(t===Cd||Td(t.prototype))||Ed(t)&&null===(t=t[Rd]))&&(t=void 0)),void 0===t?Cd:t},xd=function(e,t){return new(Ad(e))(0===t?0:t)},Pd=xs,Dd=ae,Od=lt,Md=Li,Nd=xd,Ld=ee([].push),Ud=function(e){var t=1==e,n=2==e,i=3==e,r=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,u,d,l){for(var h,p,f=Od(c),m=Dd(f),_=Pd(u,d),v=Md(m),g=0,y=l||Nd,S=t?y(c,v):n||o?y(c,0):void 0;v>g;g++)if((s||g in m)&&(p=_(h=m[g],g,f),e))if(t)S[g]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return g;case 2:Ld(S,h)}else switch(e){case 4:return!1;case 7:Ld(S,h)}return a?-1:i||r?r:S}},Vd={forEach:Ud(0),map:Ud(1),filter:Ud(2),some:Ud(3),every:Ud(4),find:Ud(5),findIndex:Ud(6),filterReject:Ud(7)},jd=x,Fd=De,Bd=xt(\"species\"),Hd=function(e){return Fd>=51||!jd((function(){var t=[];return(t.constructor={})[Bd]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Wd=Vd.map;Tr({target:\"Array\",proto:!0,forced:!Hd(\"map\")},{map:function(e){return Wd(this,e,arguments.length>1?arguments[1]:void 0)}});var Gd=P,zd=ud,Jd=TypeError,qd=Object.getOwnPropertyDescriptor,Kd=Gd&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],\"length\",{writable:!1}).length=1}catch(qq){return qq instanceof TypeError}}(),Qd=TypeError,Xd=function(e){if(e>9007199254740991)throw Qd(\"Maximum allowed index exceeded\");return e},Yd=We,$d=TypeError,Zd=function(e,t){if(!delete e[t])throw $d(\"Cannot delete property \"+Yd(t)+\" of \"+Yd(e))},el=Tr,tl=lt,nl=Pi,il=Ri,rl=Li,al=Kd?function(e,t){if(zd(e)&&!qd(e,\"length\").writable)throw Jd(\"Cannot set read only .length\");return e.length=t}:function(e,t){return e.length=t},ol=Xd,sl=xd,cl=Jo,ul=Zd,dl=Hd(\"splice\"),ll=Math.max,hl=Math.min;el({target:\"Array\",proto:!0,forced:!dl},{splice:function(e,t){var n,i,r,a,o,s,c=tl(this),u=rl(c),d=nl(e,u),l=arguments.length;for(0===l?n=i=0:1===l?(n=0,i=u-d):(n=l-2,i=hl(ll(il(t),0),u-d)),ol(u+n-i),r=sl(c,i),a=0;a<i;a++)(o=d+a)in c&&cl(r,a,c[o]);if(r.length=i,n<i){for(a=d;a<u-i;a++)s=a+n,(o=a+i)in c?c[s]=c[o]:ul(c,s);for(a=u;a>u-i+n;a--)ul(c,a-1)}else if(n>i)for(a=u-i;a>d;a--)s=a+n-1,(o=a+i-1)in c?c[s]=c[o]:ul(c,s);for(a=0;a<n;a++)c[a+d]=arguments[a+2];return al(c,u-i+n),r}});var pl=x,fl=function(e,t){var n=[][e];return!!n&&pl((function(){n.call(null,t||function(){return 1},1)}))},ml=Vd.forEach,_l=fl(\"forEach\")?[].forEach:function(e){return ml(this,e,arguments.length>1?arguments[1]:void 0)};Tr({target:\"Array\",proto:!0,forced:[].forEach!=_l},{forEach:_l});var vl=C,gl=Cu,yl=Pu,Sl=_l,bl=In,kl=function(e){if(e&&e.forEach!==Sl)try{bl(e,\"forEach\",Sl)}catch(qq){e.forEach=Sl}};for(var Il in gl)gl[Il]&&kl(vl[Il]&&vl[Il].prototype);kl(yl);var Tl=Tr,wl=ae,El=he,Rl=fl,Cl=ee([].join),Al=wl!=Object,xl=Rl(\"join\",\",\");Tl({target:\"Array\",proto:!0,forced:Al||!xl},{join:function(e){return Cl(El(this),void 0===e?\",\":e)}});var Pl=Vd.filter;Tr({target:\"Array\",proto:!0,forced:!Hd(\"filter\")},{filter:function(e){return Pl(this,e,arguments.length>1?arguments[1]:void 0)}});var Dl=Tr,Ol=x,Ml=ud,Nl=ye,Ll=lt,Ul=Li,Vl=Xd,jl=Jo,Fl=xd,Bl=Hd,Hl=De,Wl=xt(\"isConcatSpreadable\"),Gl=Hl>=51||!Ol((function(){var e=[];return e[Wl]=!1,e.concat()[0]!==e})),zl=Bl(\"concat\"),Jl=function(e){if(!Nl(e))return!1;var t=e[Wl];return void 0!==t?!!t:Ml(e)};Dl({target:\"Array\",proto:!0,arity:1,forced:!Gl||!zl},{concat:function(e){var t,n,i,r,a,o=Ll(this),s=Fl(o,0),c=0;for(t=-1,i=arguments.length;t<i;t++)if(Jl(a=-1===t?o:arguments[t]))for(r=Ul(a),Vl(c+r),n=0;n<r;n++,c++)n in a&&jl(s,c,a[n]);else Vl(c+1),jl(s,c++,a);return s.length=c,s}});var ql=ee,Kl=ki,Ql=Date.prototype,Xl=\"Invalid Date\",Yl=\"toString\",$l=ql(Ql.toString),Zl=ql(Ql.getTime);String(new Date(NaN))!=Xl&&Kl(Ql,Yl,(function(){var e=Zl(this);return e==e?$l(this):Xl}));var eh=Ri,th=du,nh=ue,ih=RangeError,rh=function(e){var t=th(nh(this)),n=\"\",i=eh(e);if(i<0||Infinity==i)throw ih(\"Wrong number of repetitions\");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n},ah=ee,oh=Mi,sh=du,ch=ue,uh=ah(rh),dh=ah(\"\".slice),lh=Math.ceil,hh=function(e){return function(t,n,i){var r,a,o=sh(ch(t)),s=oh(n),c=o.length,u=void 0===i?\" \":sh(i);return s<=c||\"\"==u?o:((a=uh(u,lh((r=s-c)/u.length))).length>r&&(a=dh(a,0,r)),e?o+a:a+o)}},ph={start:hh(!1),end:hh(!0)},fh=/Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(we),mh=ph.start;Tr({target:\"String\",proto:!0,forced:fh},{padStart:function(e){return mh(this,e,arguments.length>1?arguments[1]:void 0)}});var _h=un,vh=function(){var e=_h(this),t=\"\";return e.hasIndices&&(t+=\"d\"),e.global&&(t+=\"g\"),e.ignoreCase&&(t+=\"i\"),e.multiline&&(t+=\"m\"),e.dotAll&&(t+=\"s\"),e.unicode&&(t+=\"u\"),e.unicodeSets&&(t+=\"v\"),e.sticky&&(t+=\"y\"),t},gh=x,yh=C.RegExp,Sh=gh((function(){var e=yh(\"a\",\"y\");return e.lastIndex=2,null!=e.exec(\"abcd\")})),bh=Sh||gh((function(){return!yh(\"a\",\"y\").sticky})),kh={BROKEN_CARET:Sh||gh((function(){var e=yh(\"^r\",\"gy\");return e.lastIndex=2,null!=e.exec(\"str\")})),MISSED_STICKY:bh,UNSUPPORTED_Y:Sh},Ih=x,Th=C.RegExp,wh=Ih((function(){var e=Th(\".\",\"s\");return!(e.dotAll&&e.exec(\"\\n\")&&\"s\"===e.flags)})),Eh=x,Rh=C.RegExp,Ch=Eh((function(){var e=Rh(\"(?<a>b)\",\"g\");return\"b\"!==e.exec(\"b\").groups.a||\"bc\"!==\"b\".replace(e,\"$<a>c\")})),Ah=N,xh=ee,Ph=du,Dh=vh,Oh=kh,Mh=tt.exports,Nh=na,Lh=ai.get,Uh=wh,Vh=Ch,jh=Mh(\"native-string-replace\",String.prototype.replace),Fh=RegExp.prototype.exec,Bh=Fh,Hh=xh(\"\".charAt),Wh=xh(\"\".indexOf),Gh=xh(\"\".replace),zh=xh(\"\".slice),Jh=function(){var e=/a/,t=/b*/g;return Ah(Fh,e,\"a\"),Ah(Fh,t,\"a\"),0!==e.lastIndex||0!==t.lastIndex}(),qh=Oh.BROKEN_CARET,Kh=void 0!==/()??/.exec(\"\")[1];(Jh||Kh||qh||Uh||Vh)&&(Bh=function(e){var t,n,i,r,a,o,s,c=this,u=Lh(c),d=Ph(e),l=u.raw;if(l)return l.lastIndex=c.lastIndex,t=Ah(Bh,l,d),c.lastIndex=l.lastIndex,t;var h=u.groups,p=qh&&c.sticky,f=Ah(Dh,c),m=c.source,_=0,v=d;if(p&&(f=Gh(f,\"y\",\"\"),-1===Wh(f,\"g\")&&(f+=\"g\"),v=zh(d,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&\"\\n\"!==Hh(d,c.lastIndex-1))&&(m=\"(?: \"+m+\")\",v=\" \"+v,_++),n=new RegExp(\"^(?:\"+m+\")\",f)),Kh&&(n=new RegExp(\"^\"+m+\"$(?!\\\\s)\",f)),Jh&&(i=c.lastIndex),r=Ah(Fh,p?n:c,v),p?r?(r.input=zh(r.input,_),r[0]=zh(r[0],_),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:Jh&&r&&(c.lastIndex=c.global?r.index+r[0].length:i),Kh&&r&&r.length>1&&Ah(jh,r[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(r[a]=void 0)})),r&&h)for(r.groups=o=Nh(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=r[s[1]];return r});var Qh=Bh;Tr({target:\"RegExp\",proto:!0,forced:/./.exec!==Qh},{exec:Qh});var Xh=ee,Yh=ki,$h=Qh,Zh=x,ep=xt,tp=In,np=ep(\"species\"),ip=RegExp.prototype,rp=function(e,t,n,i){var r=ep(e),a=!Zh((function(){var t={};return t[r]=function(){return 7},7!=\"\"[e](t)})),o=a&&!Zh((function(){var t=!1,n=/a/;return\"split\"===e&&((n={}).constructor={},n.constructor[np]=function(){return n},n.flags=\"\",n[r]=/./[r]),n.exec=function(){return t=!0,null},n[r](\"\"),!t}));if(!a||!o||n){var s=Xh(/./[r]),c=t(r,\"\"[e],(function(e,t,n,i,r){var o=Xh(e),c=t.exec;return c===$h||c===ip.exec?a&&!r?{done:!0,value:s(t,n,i)}:{done:!0,value:o(n,t,i)}:{done:!1}}));Yh(String.prototype,e,c[0]),Yh(ip,r,c[1])}i&&tp(ip[r],\"sham\",!0)},ap=yu.charAt,op=function(e,t,n){return t+(n?ap(e,t).length:1)},sp=ee,cp=lt,up=Math.floor,dp=sp(\"\".charAt),lp=sp(\"\".replace),hp=sp(\"\".slice),pp=/\\$([$&'`]|\\d{1,2}|<[^>]*>)/g,fp=/\\$([$&'`]|\\d{1,2})/g,mp=N,_p=un,vp=_e,gp=Y,yp=Qh,Sp=TypeError,bp=function(e,t){var n=e.exec;if(vp(n)){var i=mp(n,e,t);return null!==i&&_p(i),i}if(\"RegExp\"===gp(e))return mp(yp,e,t);throw Sp(\"RegExp#exec called on incompatible receiver\")},kp=qu,Ip=N,Tp=ee,wp=rp,Ep=x,Rp=un,Cp=_e,Ap=oe,xp=Ri,Pp=Mi,Dp=du,Op=ue,Mp=op,Np=Xe,Lp=function(e,t,n,i,r,a){var o=n+e.length,s=i.length,c=fp;return void 0!==r&&(r=cp(r),c=pp),lp(a,c,(function(a,c){var u;switch(dp(c,0)){case\"$\":return\"$\";case\"&\":return e;case\"`\":return hp(t,0,n);case\"'\":return hp(t,o);case\"<\":u=r[hp(c,1,-1)];break;default:var d=+c;if(0===d)return a;if(d>s){var l=up(d/10);return 0===l?a:l<=s?void 0===i[l-1]?dp(c,1):i[l-1]+dp(c,1):a}u=i[d-1]}return void 0===u?\"\":u}))},Up=bp,Vp=xt(\"replace\"),jp=Math.max,Fp=Math.min,Bp=Tp([].concat),Hp=Tp([].push),Wp=Tp(\"\".indexOf),Gp=Tp(\"\".slice),zp=\"$0\"===\"a\".replace(/./,\"$0\"),Jp=!!/./[Vp]&&\"\"===/./[Vp](\"a\",\"$0\"),qp=!Ep((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:\"7\"},e},\"7\"!==\"\".replace(e,\"$<a>\")}));wp(\"replace\",(function(e,t,n){var i=Jp?\"$\":\"$0\";return[function(e,n){var i=Op(this),r=Ap(e)?void 0:Np(e,Vp);return r?Ip(r,e,i,n):Ip(t,Dp(i),e,n)},function(e,r){var a=Rp(this),o=Dp(e);if(\"string\"==typeof r&&-1===Wp(r,i)&&-1===Wp(r,\"$<\")){var s=n(t,a,o,r);if(s.done)return s.value}var c=Cp(r);c||(r=Dp(r));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var l=[];;){var h=Up(a,o);if(null===h)break;if(Hp(l,h),!u)break;\"\"===Dp(h[0])&&(a.lastIndex=Mp(o,Pp(a.lastIndex),d))}for(var p,f=\"\",m=0,_=0;_<l.length;_++){for(var v=Dp((h=l[_])[0]),g=jp(Fp(xp(h.index),o.length),0),y=[],S=1;S<h.length;S++)Hp(y,void 0===(p=h[S])?p:String(p));var b=h.groups;if(c){var k=Bp([v],y,g,o);void 0!==b&&Hp(k,b);var I=Dp(kp(r,void 0,k))}else I=Lp(v,o,g,y,b,r);g>=m&&(f+=Gp(o,m,g)+I,m=g+v.length)}return f+Gp(o,m)}]}),!qp||!zp||Jp);var Kp=N,Qp=ft,Xp=Te,Yp=vh,$p=RegExp.prototype,Zp=function(e){var t=e.flags;return void 0!==t||\"flags\"in $p||Qp(e,\"flags\")||!Xp($p,e)?t:Kp(Yp,e)},ef=xn.PROPER,tf=ki,nf=un,rf=du,af=x,of=Zp,sf=\"toString\",cf=RegExp.prototype.toString,uf=af((function(){return\"/a/b\"!=cf.call({source:\"a\",flags:\"b\"})})),df=ef&&cf.name!=sf;(uf||df)&&tf(RegExp.prototype,sf,(function(){var e=nf(this);return\"/\"+rf(e.source)+\"/\"+rf(of(e))}),{unsafe:!0});var lf=x,hf=xt(\"iterator\"),pf=!lf((function(){var e=new URL(\"b?a=1&b=2&c=3\",\"http://a\"),t=e.searchParams,n=\"\";return e.pathname=\"c%20d\",t.forEach((function(e,i){t.delete(\"b\"),n+=i+e})),!t.sort||\"http://a/c%20d?a=1&c=3\"!==e.href||\"3\"!==t.get(\"c\")||\"a=1\"!==String(new URLSearchParams(\"?a=1\"))||!t[hf]||\"a\"!==new URL(\"https://a@b\").username||\"b\"!==new URLSearchParams(new URLSearchParams(\"a=b\")).get(\"a\")||\"xn--e1aybc\"!==new URL(\"http://тест\").host||\"#%D0%B1\"!==new URL(\"http://a#б\").hash||\"a1c3\"!==n||\"x\"!==new URL(\"http://x\",void 0).host})),ff=$o,mf=Math.floor,_f=function(e,t){var n=e.length,i=mf(n/2);return n<8?vf(e,t):gf(e,_f(ff(e,0,i),t),_f(ff(e,i),t),t)},vf=function(e,t){for(var n,i,r=e.length,a=1;a<r;){for(i=a,n=e[a];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==a++&&(e[i]=n)}return e},gf=function(e,t,n,i){for(var r=t.length,a=n.length,o=0,s=0;o<r||s<a;)e[o+s]=o<r&&s<a?i(t[o],n[s])<=0?t[o++]:n[s++]:o<r?t[o++]:n[s++];return e},yf=_f,Sf=Tr,bf=C,kf=N,If=ee,Tf=P,wf=pf,Ef=ki,Rf=Bc,Cf=Ma,Af=Ba,xf=ai,Pf=fc,Df=_e,Of=ft,Mf=xs,Nf=Vo,Lf=un,Uf=ye,Vf=du,jf=na,Ff=H,Bf=qs,Hf=Fs,Wf=Xu,Gf=yf,zf=xt(\"iterator\"),Jf=\"URLSearchParams\",qf=\"URLSearchParamsIterator\",Kf=xf.set,Qf=xf.getterFor(Jf),Xf=xf.getterFor(qf),Yf=Object.getOwnPropertyDescriptor,$f=function(e){if(!Tf)return bf[e];var t=Yf(bf,e);return t&&t.value},Zf=$f(\"fetch\"),em=$f(\"Request\"),tm=$f(\"Headers\"),nm=em&&em.prototype,im=tm&&tm.prototype,rm=bf.RegExp,am=bf.TypeError,om=bf.decodeURIComponent,sm=bf.encodeURIComponent,cm=If(\"\".charAt),um=If([].join),dm=If([].push),lm=If(\"\".replace),hm=If([].shift),pm=If([].splice),fm=If(\"\".split),mm=If(\"\".slice),_m=/\\+/g,vm=Array(4),gm=function(e){return vm[e-1]||(vm[e-1]=rm(\"((?:%[\\\\da-f]{2}){\"+e+\"})\",\"gi\"))},ym=function(e){try{return om(e)}catch(qq){return e}},Sm=function(e){var t=lm(e,_m,\" \"),n=4;try{return om(t)}catch(qq){for(;n;)t=lm(t,gm(n--),ym);return t}},bm=/[!'()~]|%20/g,km={\"!\":\"%21\",\"'\":\"%27\",\"(\":\"%28\",\")\":\"%29\",\"~\":\"%7E\",\"%20\":\"+\"},Im=function(e){return km[e]},Tm=function(e){return lm(sm(e),bm,Im)},wm=Af((function(e,t){Kf(this,{type:qf,iterator:Bf(Qf(e).entries),kind:t})}),\"Iterator\",(function(){var e=Xf(this),t=e.kind,n=e.iterator.next(),i=n.value;return n.done||(n.value=\"keys\"===t?i.key:\"values\"===t?i.value:[i.key,i.value]),n}),!0),Em=function(e){this.entries=[],this.url=null,void 0!==e&&(Uf(e)?this.parseObject(e):this.parseQuery(\"string\"==typeof e?\"?\"===cm(e,0)?mm(e,1):e:Vf(e)))};Em.prototype={type:Jf,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,i,r,a,o,s,c=Hf(e);if(c)for(n=(t=Bf(e,c)).next;!(i=kf(n,t)).done;){if(a=(r=Bf(Lf(i.value))).next,(o=kf(a,r)).done||(s=kf(a,r)).done||!kf(a,r).done)throw am(\"Expected sequence with length 2\");dm(this.entries,{key:Vf(o.value),value:Vf(s.value)})}else for(var u in e)Of(e,u)&&dm(this.entries,{key:u,value:Vf(e[u])})},parseQuery:function(e){if(e)for(var t,n,i=fm(e,\"&\"),r=0;r<i.length;)(t=i[r++]).length&&(n=fm(t,\"=\"),dm(this.entries,{key:Sm(hm(n)),value:Sm(um(n,\"=\"))}))},serialize:function(){for(var e,t=this.entries,n=[],i=0;i<t.length;)e=t[i++],dm(n,Tm(e.key)+\"=\"+Tm(e.value));return um(n,\"&\")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Rm=function(){Pf(this,Cm);var e=arguments.length>0?arguments[0]:void 0;Kf(this,new Em(e))},Cm=Rm.prototype;if(Rf(Cm,{append:function(e,t){Wf(arguments.length,2);var n=Qf(this);dm(n.entries,{key:Vf(e),value:Vf(t)}),n.updateURL()},delete:function(e){Wf(arguments.length,1);for(var t=Qf(this),n=t.entries,i=Vf(e),r=0;r<n.length;)n[r].key===i?pm(n,r,1):r++;t.updateURL()},get:function(e){Wf(arguments.length,1);for(var t=Qf(this).entries,n=Vf(e),i=0;i<t.length;i++)if(t[i].key===n)return t[i].value;return null},getAll:function(e){Wf(arguments.length,1);for(var t=Qf(this).entries,n=Vf(e),i=[],r=0;r<t.length;r++)t[r].key===n&&dm(i,t[r].value);return i},has:function(e){Wf(arguments.length,1);for(var t=Qf(this).entries,n=Vf(e),i=0;i<t.length;)if(t[i++].key===n)return!0;return!1},set:function(e,t){Wf(arguments.length,1);for(var n,i=Qf(this),r=i.entries,a=!1,o=Vf(e),s=Vf(t),c=0;c<r.length;c++)(n=r[c]).key===o&&(a?pm(r,c--,1):(a=!0,n.value=s));a||dm(r,{key:o,value:s}),i.updateURL()},sort:function(){var e=Qf(this);Gf(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=Qf(this).entries,i=Mf(e,arguments.length>1?arguments[1]:void 0),r=0;r<n.length;)i((t=n[r++]).value,t.key,this)},keys:function(){return new wm(this,\"keys\")},values:function(){return new wm(this,\"values\")},entries:function(){return new wm(this,\"entries\")}},{enumerable:!0}),Ef(Cm,zf,Cm.entries,{name:\"entries\"}),Ef(Cm,\"toString\",(function(){return Qf(this).serialize()}),{enumerable:!0}),Cf(Rm,Jf),Sf({global:!0,constructor:!0,forced:!wf},{URLSearchParams:Rm}),!wf&&Df(tm)){var Am=If(im.has),xm=If(im.set),Pm=function(e){if(Uf(e)){var t,n=e.body;if(Nf(n)===Jf)return t=e.headers?new tm(e.headers):new tm,Am(t,\"content-type\")||xm(t,\"content-type\",\"application/x-www-form-urlencoded;charset=UTF-8\"),jf(e,{body:Ff(0,Vf(n)),headers:Ff(0,t)})}return e};if(Df(Zf)&&Sf({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Zf(e,arguments.length>1?Pm(arguments[1]):{})}}),Df(em)){var Dm=function(e){return Pf(this,nm),new em(e,arguments.length>1?Pm(arguments[1]):{})};nm.constructor=Dm,Dm.prototype=nm,Sf({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Dm})}}var Om={URLSearchParams:Rm,getState:Qf},Mm=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},Nm=N,Lm=un,Um=oe,Vm=ue,jm=Mm,Fm=du,Bm=Xe,Hm=bp;rp(\"search\",(function(e,t,n){return[function(t){var n=Vm(this),i=Um(t)?void 0:Bm(t,e);return i?Nm(i,t,n):new RegExp(t)[e](Fm(n))},function(e){var i=Lm(this),r=Fm(e),a=n(t,i,r);if(a.done)return a.value;var o=i.lastIndex;jm(o,0)||(i.lastIndex=0);var s=Hm(i,r);return jm(i.lastIndex,o)||(i.lastIndex=o),null===s?-1:s.index}]}));(new Date).getTime();var Wm=0,Gm=function(){return(new Date).getTime()+Wm},zm=function(){var e=new Date;return e.setTime(Gm()),e.toLocaleString()},Jm=N,qm=un,Km=oe,Qm=Mi,Xm=du,Ym=ue,$m=Xe,Zm=op,e_=bp;rp(\"match\",(function(e,t,n){return[function(t){var n=Ym(this),i=Km(t)?void 0:$m(t,e);return i?Jm(i,t,n):new RegExp(t)[e](Xm(n))},function(e){var i=qm(this),r=Xm(e),a=n(t,i,r);if(a.done)return a.value;if(!i.global)return e_(i,r);var o=i.unicode;i.lastIndex=0;for(var s,c=[],u=0;null!==(s=e_(i,r));){var d=Xm(s[0]);c[u]=d,\"\"===d&&(i.lastIndex=Zm(r,Qm(i.lastIndex),o)),u++}return 0===u?null:c}]}));var t_=ye,n_=Y,i_=xt(\"match\"),r_=function(e){var t;return t_(e)&&(void 0!==(t=e[i_])?!!t:\"RegExp\"==n_(e))},a_=rn.f,o_=P,s_=C,c_=ee,u_=_r,d_=Ic,l_=In,h_=Ii.f,p_=Te,f_=r_,m_=du,__=Zp,v_=kh,g_=function(e,t,n){n in e||a_(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},y_=ki,S_=x,b_=ft,k_=ai.enforce,I_=Jc,T_=wh,w_=Ch,E_=xt(\"match\"),R_=s_.RegExp,C_=R_.prototype,A_=s_.SyntaxError,x_=c_(C_.exec),P_=c_(\"\".charAt),D_=c_(\"\".replace),O_=c_(\"\".indexOf),M_=c_(\"\".slice),N_=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,L_=/a/g,U_=/a/g,V_=new R_(L_)!==L_,j_=v_.MISSED_STICKY,F_=v_.UNSUPPORTED_Y,B_=o_&&(!V_||j_||T_||w_||S_((function(){return U_[E_]=!1,R_(L_)!=L_||R_(U_)==U_||\"/a/i\"!=R_(L_,\"i\")})));if(u_(\"RegExp\",B_)){for(var H_=function(e,t){var n,i,r,a,o,s,c=p_(C_,this),u=f_(e),d=void 0===t,l=[],h=e;if(!c&&u&&d&&e.constructor===H_)return e;if((u||p_(C_,e))&&(e=e.source,d&&(t=__(h))),e=void 0===e?\"\":m_(e),t=void 0===t?\"\":m_(t),h=e,T_&&\"dotAll\"in L_&&(i=!!t&&O_(t,\"s\")>-1)&&(t=D_(t,/s/g,\"\")),n=t,j_&&\"sticky\"in L_&&(r=!!t&&O_(t,\"y\")>-1)&&F_&&(t=D_(t,/y/g,\"\")),w_&&(a=function(e){for(var t,n=e.length,i=0,r=\"\",a=[],o={},s=!1,c=!1,u=0,d=\"\";i<=n;i++){if(\"\\\\\"===(t=P_(e,i)))t+=P_(e,++i);else if(\"]\"===t)s=!1;else if(!s)switch(!0){case\"[\"===t:s=!0;break;case\"(\"===t:x_(N_,M_(e,i+1))&&(i+=2,c=!0),r+=t,u++;continue;case\">\"===t&&c:if(\"\"===d||b_(o,d))throw new A_(\"Invalid capture group name\");o[d]=!0,a[a.length]=[d,u],c=!1,d=\"\";continue}c?d+=t:r+=t}return[r,a]}(e),e=a[0],l=a[1]),o=d_(R_(e,t),c?this:C_,H_),(i||r||l.length)&&(s=k_(o),i&&(s.dotAll=!0,s.raw=H_(function(e){for(var t,n=e.length,i=0,r=\"\",a=!1;i<=n;i++)\"\\\\\"!==(t=P_(e,i))?a||\".\"!==t?(\"[\"===t?a=!0:\"]\"===t&&(a=!1),r+=t):r+=\"[\\\\s\\\\S]\":r+=t+P_(e,++i);return r}(e),n)),r&&(s.sticky=!0),l.length&&(s.groups=l)),e!==h)try{l_(o,\"source\",\"\"===h?\"(?:)\":h)}catch(qq){}return o},W_=h_(R_),G_=0;W_.length>G_;)g_(H_,R_,W_[G_++]);C_.constructor=H_,H_.prototype=C_,y_(s_,\"RegExp\",H_,{constructor:!0})}I_(\"RegExp\");var z_=ee(1..valueOf),J_=\"\\t\\n\\v\\f\\r                　\\u2028\\u2029\\ufeff\",q_=ue,K_=du,Q_=ee(\"\".replace),X_=\"[\\t\\n\\v\\f\\r                　\\u2028\\u2029\\ufeff]\",Y_=RegExp(\"^\"+X_+X_+\"*\"),$_=RegExp(X_+X_+\"*$\"),Z_=function(e){return function(t){var n=K_(q_(t));return 1&e&&(n=Q_(n,Y_,\"\")),2&e&&(n=Q_(n,$_,\"\")),n}},ev={start:Z_(1),end:Z_(2),trim:Z_(3)},tv=P,nv=C,iv=ee,rv=_r,av=ki,ov=ft,sv=Ic,cv=Te,uv=Be,dv=Vt,lv=x,hv=Ii.f,pv=A.f,fv=rn.f,mv=z_,_v=ev.trim,vv=\"Number\",gv=nv.Number,yv=gv.prototype,Sv=nv.TypeError,bv=iv(\"\".slice),kv=iv(\"\".charCodeAt),Iv=function(e){var t=dv(e,\"number\");return\"bigint\"==typeof t?t:Tv(t)},Tv=function(e){var t,n,i,r,a,o,s,c,u=dv(e,\"number\");if(uv(u))throw Sv(\"Cannot convert a Symbol value to a number\");if(\"string\"==typeof u&&u.length>2)if(u=_v(u),43===(t=kv(u,0))||45===t){if(88===(n=kv(u,2))||120===n)return NaN}else if(48===t){switch(kv(u,1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+u}for(o=(a=bv(u,2)).length,s=0;s<o;s++)if((c=kv(a,s))<48||c>r)return NaN;return parseInt(a,i)}return+u};if(rv(vv,!gv(\" 0o1\")||!gv(\"0b1\")||gv(\"+0x1\"))){for(var wv,Ev=function(e){var t=arguments.length<1?0:gv(Iv(e)),n=this;return cv(yv,n)&&lv((function(){mv(n)}))?sv(Object(t),n,Ev):t},Rv=tv?hv(gv):\"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range\".split(\",\"),Cv=0;Rv.length>Cv;Cv++)ov(gv,wv=Rv[Cv])&&!ov(Ev,wv)&&fv(Ev,wv,pv(gv,wv));Ev.prototype=yv,yv.constructor=Ev,av(nv,vv,Ev,{constructor:!0})}var Av=Bi.includes,xv=la;Tr({target:\"Array\",proto:!0,forced:x((function(){return!Array(1).includes()}))},{includes:function(e){return Av(this,e,arguments.length>1?arguments[1]:void 0)}}),xv(\"includes\");var Pv=r_,Dv=TypeError,Ov=function(e){if(Pv(e))throw Dv(\"The method doesn't accept regular expressions\");return e},Mv=xt(\"match\"),Nv=function(e){var t=/./;try{\"/./\"[e](t)}catch(n){try{return t[Mv]=!1,\"/./\"[e](t)}catch(i){}}return!1},Lv=Tr,Uv=Ov,Vv=ue,jv=du,Fv=Nv,Bv=ee(\"\".indexOf);Lv({target:\"String\",proto:!0,forced:!Fv(\"includes\")},{includes:function(e){return!!~Bv(jv(Vv(this)),jv(Uv(e)),arguments.length>1?arguments[1]:void 0)}});var Hv=Tr,Wv=Bi.indexOf,Gv=fl,zv=ee([].indexOf),Jv=!!zv&&1/zv([1],1,-0)<0,qv=Gv(\"indexOf\");Hv({target:\"Array\",proto:!0,forced:Jv||!qv},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return Jv?zv(this,e,t)||0:Wv(this,e,t)}});var Kv=lt,Qv=ba,Xv=pa;Tr({target:\"Object\",stat:!0,forced:x((function(){Qv(1)})),sham:!Xv},{getPrototypeOf:function(e){return Qv(Kv(e))}});var Yv=qu,$v=qe,Zv=un;Tr({target:\"Reflect\",stat:!0,forced:!x((function(){Reflect.apply((function(){}))}))},{apply:function(e,t,n){return Yv($v(e),t,Zv(n))}});var eg=P,tg=xn.EXISTS,ng=ee,ig=rn.f,rg=Function.prototype,ag=ng(rg.toString),og=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,sg=ng(og.exec);eg&&!tg&&ig(rg,\"name\",{configurable:!0,get:function(){try{return sg(og,ag(this))[1]}catch(qq){return\"\"}}});var cg=Tr,ug=Date,dg=ee(ug.prototype.getTime);cg({target:\"Date\",stat:!0},{now:function(){return dg(new ug)}});var lg,hg,pg,fg,mg=\"process\"==Y(C.process),_g=Id,vg=We,gg=TypeError,yg=function(e){if(_g(e))return e;throw gg(vg(e)+\" is not a constructor\")},Sg=un,bg=yg,kg=oe,Ig=xt(\"species\"),Tg=function(e,t){var n,i=Sg(e).constructor;return void 0===i||kg(n=Sg(i)[Ig])?t:bg(n)},wg=/(?:ipad|iphone|ipod).*applewebkit/i.test(we),Eg=C,Rg=qu,Cg=xs,Ag=_e,xg=ft,Pg=x,Dg=Gr,Og=Ku,Mg=zt,Ng=Xu,Lg=wg,Ug=mg,Vg=Eg.setImmediate,jg=Eg.clearImmediate,Fg=Eg.process,Bg=Eg.Dispatch,Hg=Eg.Function,Wg=Eg.MessageChannel,Gg=Eg.String,zg=0,Jg={},qg=\"onreadystatechange\";try{lg=Eg.location}catch(qq){}var Kg=function(e){if(xg(Jg,e)){var t=Jg[e];delete Jg[e],t()}},Qg=function(e){return function(){Kg(e)}},Xg=function(e){Kg(e.data)},Yg=function(e){Eg.postMessage(Gg(e),lg.protocol+\"//\"+lg.host)};Vg&&jg||(Vg=function(e){Ng(arguments.length,1);var t=Ag(e)?e:Hg(e),n=Og(arguments,1);return Jg[++zg]=function(){Rg(t,void 0,n)},hg(zg),zg},jg=function(e){delete Jg[e]},Ug?hg=function(e){Fg.nextTick(Qg(e))}:Bg&&Bg.now?hg=function(e){Bg.now(Qg(e))}:Wg&&!Lg?(fg=(pg=new Wg).port2,pg.port1.onmessage=Xg,hg=Cg(fg.postMessage,fg)):Eg.addEventListener&&Ag(Eg.postMessage)&&!Eg.importScripts&&lg&&\"file:\"!==lg.protocol&&!Pg(Yg)?(hg=Yg,Eg.addEventListener(\"message\",Xg,!1)):hg=qg in Mg(\"script\")?function(e){Dg.appendChild(Mg(\"script\")).onreadystatechange=function(){Dg.removeChild(this),Kg(e)}}:function(e){setTimeout(Qg(e),0)});var $g,Zg,ey,ty,ny,iy,ry,ay,oy={set:Vg,clear:jg},sy=C,cy=/ipad|iphone|ipod/i.test(we)&&void 0!==sy.Pebble,uy=/web0s(?!.*chrome)/i.test(we),dy=C,ly=xs,hy=A.f,py=oy.set,fy=wg,my=cy,_y=uy,vy=mg,gy=dy.MutationObserver||dy.WebKitMutationObserver,yy=dy.document,Sy=dy.process,by=dy.Promise,ky=hy(dy,\"queueMicrotask\"),Iy=ky&&ky.value;Iy||($g=function(){var e,t;for(vy&&(e=Sy.domain)&&e.exit();Zg;){t=Zg.fn,Zg=Zg.next;try{t()}catch(qq){throw Zg?ty():ey=void 0,qq}}ey=void 0,e&&e.enter()},fy||vy||_y||!gy||!yy?!my&&by&&by.resolve?((ry=by.resolve(void 0)).constructor=by,ay=ly(ry.then,ry),ty=function(){ay($g)}):vy?ty=function(){Sy.nextTick($g)}:(py=ly(py,dy),ty=function(){py($g)}):(ny=!0,iy=yy.createTextNode(\"\"),new gy($g).observe(iy,{characterData:!0}),ty=function(){iy.data=ny=!ny}));var Ty=Iy||function(e){var t={fn:e,next:void 0};ey&&(ey.next=t),Zg||(Zg=t,ty()),ey=t},wy=C,Ey=function(e){try{return{error:!1,value:e()}}catch(qq){return{error:!0,value:qq}}},Ry=function(){this.head=null,this.tail=null};Ry.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Cy=Ry,Ay=C.Promise,xy=\"object\"==typeof Deno&&Deno&&\"object\"==typeof Deno.version,Py=!xy&&!mg&&\"object\"==typeof window&&\"object\"==typeof document,Dy=C,Oy=Ay,My=_e,Ny=_r,Ly=Un,Uy=xt,Vy=Py,jy=xy,Fy=De;Oy&&Oy.prototype;var By=Uy(\"species\"),Hy=!1,Wy=My(Dy.PromiseRejectionEvent),Gy=Ny(\"Promise\",(function(){var e=Ly(Oy),t=e!==String(Oy);if(!t&&66===Fy)return!0;if(!Fy||Fy<51||!/native code/.test(e)){var n=new Oy((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))};if((n.constructor={})[By]=i,!(Hy=n.then((function(){}))instanceof i))return!0}return!t&&(Vy||jy)&&!Wy})),zy={CONSTRUCTOR:Gy,REJECTION_EVENT:Wy,SUBCLASSING:Hy},Jy={},qy=qe,Ky=TypeError,Qy=function(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw Ky(\"Bad Promise constructor\");t=e,n=i})),this.resolve=qy(t),this.reject=qy(n)};Jy.f=function(e){return new Qy(e)};var Xy,Yy,$y,Zy=Tr,eS=mg,tS=C,nS=N,iS=ki,rS=Ka,aS=Ma,oS=Jc,sS=qe,cS=_e,uS=ye,dS=fc,lS=Tg,hS=oy.set,pS=Ty,fS=function(e,t){var n=wy.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},mS=Ey,_S=Cy,vS=ai,gS=Ay,yS=Jy,SS=\"Promise\",bS=zy.CONSTRUCTOR,kS=zy.REJECTION_EVENT,IS=zy.SUBCLASSING,TS=vS.getterFor(SS),wS=vS.set,ES=gS&&gS.prototype,RS=gS,CS=ES,AS=tS.TypeError,xS=tS.document,PS=tS.process,DS=yS.f,OS=DS,MS=!!(xS&&xS.createEvent&&tS.dispatchEvent),NS=\"unhandledrejection\",LS=function(e){var t;return!(!uS(e)||!cS(t=e.then))&&t},US=function(e,t){var n,i,r,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,u=e.reject,d=e.domain;try{s?(o||(2===t.rejection&&HS(t),t.rejection=1),!0===s?n=a:(d&&d.enter(),n=s(a),d&&(d.exit(),r=!0)),n===e.promise?u(AS(\"Promise-chain cycle\")):(i=LS(n))?nS(i,n,c,u):c(n)):u(a)}catch(qq){d&&!r&&d.exit(),u(qq)}},VS=function(e,t){e.notified||(e.notified=!0,pS((function(){for(var n,i=e.reactions;n=i.get();)US(n,e);e.notified=!1,t&&!e.rejection&&FS(e)})))},jS=function(e,t,n){var i,r;MS?((i=xS.createEvent(\"Event\")).promise=t,i.reason=n,i.initEvent(e,!1,!0),tS.dispatchEvent(i)):i={promise:t,reason:n},!kS&&(r=tS[\"on\"+e])?r(i):e===NS&&fS(\"Unhandled promise rejection\",n)},FS=function(e){nS(hS,tS,(function(){var t,n=e.facade,i=e.value;if(BS(e)&&(t=mS((function(){eS?PS.emit(\"unhandledRejection\",i,n):jS(NS,n,i)})),e.rejection=eS||BS(e)?2:1,t.error))throw t.value}))},BS=function(e){return 1!==e.rejection&&!e.parent},HS=function(e){nS(hS,tS,(function(){var t=e.facade;eS?PS.emit(\"rejectionHandled\",t):jS(\"rejectionhandled\",t,e.value)}))},WS=function(e,t,n){return function(i){e(t,i,n)}},GS=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,VS(e,!0))},zS=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw AS(\"Promise can't be resolved itself\");var i=LS(t);i?pS((function(){var n={done:!1};try{nS(i,t,WS(zS,n,e),WS(GS,n,e))}catch(qq){GS(n,qq,e)}})):(e.value=t,e.state=1,VS(e,!1))}catch(qq){GS({done:!1},qq,e)}}};if(bS&&(CS=(RS=function(e){dS(this,CS),sS(e),nS(Xy,this);var t=TS(this);try{e(WS(zS,t),WS(GS,t))}catch(qq){GS(t,qq)}}).prototype,(Xy=function(e){wS(this,{type:SS,done:!1,notified:!1,parent:!1,reactions:new _S,rejection:!1,state:0,value:void 0})}).prototype=iS(CS,\"then\",(function(e,t){var n=TS(this),i=DS(lS(this,RS));return n.parent=!0,i.ok=!cS(e)||e,i.fail=cS(t)&&t,i.domain=eS?PS.domain:void 0,0==n.state?n.reactions.add(i):pS((function(){US(i,n)})),i.promise})),Yy=function(){var e=new Xy,t=TS(e);this.promise=e,this.resolve=WS(zS,t),this.reject=WS(GS,t)},yS.f=DS=function(e){return e===RS||undefined===e?new Yy(e):OS(e)},cS(gS)&&ES!==Object.prototype)){$y=ES.then,IS||iS(ES,\"then\",(function(e,t){var n=this;return new RS((function(e,t){nS($y,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete ES.constructor}catch(qq){}rS&&rS(ES,CS)}Zy({global:!0,constructor:!0,wrap:!0,forced:bS},{Promise:RS}),aS(RS,SS,!1),oS(SS);var JS=Ay,qS=zy.CONSTRUCTOR||!yc((function(e){JS.all(e).then(void 0,(function(){}))})),KS=N,QS=qe,XS=Jy,YS=Ey,$S=lc;Tr({target:\"Promise\",stat:!0,forced:qS},{all:function(e){var t=this,n=XS.f(t),i=n.resolve,r=n.reject,a=YS((function(){var n=QS(t.resolve),a=[],o=0,s=1;$S(e,(function(e){var c=o++,u=!1;s++,KS(n,t,e).then((function(e){u||(u=!0,a[c]=e,--s||i(a))}),r)})),--s||i(a)}));return a.error&&r(a.value),n.promise}});var ZS=Tr,eb=zy.CONSTRUCTOR,tb=Ay,nb=Ie,ib=_e,rb=ki,ab=tb&&tb.prototype;if(ZS({target:\"Promise\",proto:!0,forced:eb,real:!0},{catch:function(e){return this.then(void 0,e)}}),ib(tb)){var ob=nb(\"Promise\").prototype.catch;ab.catch!==ob&&rb(ab,\"catch\",ob,{unsafe:!0})}var sb=N,cb=qe,ub=Jy,db=Ey,lb=lc;Tr({target:\"Promise\",stat:!0,forced:qS},{race:function(e){var t=this,n=ub.f(t),i=n.reject,r=db((function(){var r=cb(t.resolve);lb(e,(function(e){sb(r,t,e).then(n.resolve,i)}))}));return r.error&&i(r.value),n.promise}});var hb=N,pb=Jy;Tr({target:\"Promise\",stat:!0,forced:zy.CONSTRUCTOR},{reject:function(e){var t=pb.f(this);return hb(t.reject,void 0,e),t.promise}});var fb=un,mb=ye,_b=Jy,vb=function(e,t){if(fb(e),mb(t)&&t.constructor===e)return t;var n=_b.f(e);return(0,n.resolve)(t),n.promise},gb=Tr,yb=zy.CONSTRUCTOR,Sb=vb;Ie(\"Promise\"),gb({target:\"Promise\",stat:!0,forced:yb},{resolve:function(e){return Sb(this,e)}});var bb=lt,kb=Lr;Tr({target:\"Object\",stat:!0,forced:x((function(){kb(1)}))},{keys:function(e){return kb(bb(e))}});var Ib=\"canvas\",Tb=\"audio\",wb=\"video\",Eb=\"screen\",Rb=\"small\",Cb=\"big\",Ab=\"auxiliary\",xb=\"aux\",Pb=\"smallVideo\",Db=\"user\",Ob=\"environment\",Mb=\"mute\",Nb=\"unmute\",Lb=\"ended\",Ub=\"playing\",Vb=\"pause\",jb=\"error\",Fb=\"loadeddata\",Bb=\"audioinput\",Hb=\"videoinput\",Wb=\"detail\",Gb=\"text\",zb=\"main\",Jb=\"backup\",qb=\"banned\",Kb=\"kick\",Qb=\"user_time_out\",Xb=\"room_disband\",Yb=\"sei-message\",$b=\"PLAYING\",Zb=\"PAUSED\",ek=\"STOPPED\",tk=\"inactive\",nk=\"sendonly\",ik=\"recvonly\",rk=\"add\",ak=\"remove\",ok=\"replace\",sk=\"track\",ck=\"wss://trtc.rtc.qq.com\",uk=\"wss://webrtc.qq.com\",dk=\"qcloud\",lk=\"trtc\",hk=\"webrtc\",pk=\"\",fk=\"jssdk_log\",mk=\"jssdk_event\",_k=\"jssdk_new_endreport\",vk=function(e){return pk=e},gk=1,yk=2,Sk=\"live\",bk=20,kk=21,Ik=\"anchor\",Tk=\"audience\",wk=\"5Y2wZK8nANNAoVw6dSAHVjNxrD1ObBM2kBPV\",Ek=\"224d130c-7b5c-415b-aaa2-79c2eb5a6df2\",Rk=2,Ck=zb,Ak=Ab,xk=\"unknown\",Pk=\"DISCONNECTED\",Dk=\"CONNECTING\",Ok=\"RECONNECTING\",Mk=\"CONNECTED\",Nk=\"new\",Lk=\"connecting\",Uk=\"failed\",Vk=\"closed\",jk=\"disconnected\",Fk=\"connected\",Bk=\"completed\",Hk=30,Wk=\"join\",Gk=\"delta-join\",zk=\"rejoin\",Jk=\"leave\",qk=\"delta-leave\",Kk=\"publish\",Qk=\"delta-publish\",Xk=\"unpublish\",Yk=\"subscribe\",$k=\"unsubscribe\",Zk=\"uplink-connection\",eI=\"uplink-reconnection\",tI=\"downlink-connection\",nI=\"downlink-reconnection\",iI=\"setLocalDescription\",rI=\"setRemoteDescription\",aI=\"iceConnectionState\",oI=\"stream-initialize\",sI=\"websocketConnectionState\",cI=\"websocketReconnectionState\",uI=\"update-stream\",dI=\"recover-subscription\",lI=\"start-mix-transcode\",hI=\"stop-mix-transcode\",pI=\"player-error\",fI=\"schedule\",mI=\"unsubscribe\",_I=\"subscribe_change\",vI=\"unified-plan\",gI=\"plan-b\",yI={MANUAL:\"manual\",PRESET_LAYOUT:\"preset-layout\"},SI={REMOTE:\"$PLACE_HOLDER_REMOTE$\"},bI={IT_AUDIO_VIDEO:0,IT_PICTURE:2,IT_CANVAS:3,IT_PURE_AUDIO:4,IT_PURE_VIDEO:5},kI=\"string\",II=\"number\",TI=\"boolean\",wI=\"array\",EI=\"object\",RI={ADD:rk,REMOVE:ak},CI={unknown:0,wifi:1,\"4g\":2,\"3g\":3,\"2g\":4,wired:5},AI=-1,xI=0,PI=1,DI=Cb,OI=Rb,MI=6048e5,NI=\"schedule.rtc.qq.com\",LI=\"schedule.rtc.qcloud.com\",UI=\"schedule.rtc.tencentcloud.com\",VI=\"schedule-ecdn.rtc.tencentcloud.com\",jI=\"\",FI=function(e){return jI=e},BI=\"TRTC\",HI=\"Client\",WI=\"LocalStream\",GI=\"RemoteStream\",zI=\"Stream\",JI=\"web.sdk.qcloud.com\",qI=\"web.sdk.tencent.cn\",KI=\"web.sdk.cloud.tencent.cn\",QI=\"https://console.cloud.tencent.com/trtc\",XI=\"https://\".concat(JI,\"/trtc/webrtc/doc\"),YI=\"\".concat(XI,\"/zh-cn/\"),$I=\"trtc_error_assistance\",ZI=\"default\",eT=\"communications\",tT={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,NONE:5},nT=1,iT=2,rT=1,aT=2,oT=Object.keys(tT),sT=[\"normal leave\",\"timeout leave\",\"kick\",\"role change\"],cT=2e3,uT=\"ric\",dT=\"raf\",lT=\"interval\",hT=\"timeout\",pT=\"Resolution reset to 1080p, need to upgrade ability here https://cloud.tencent.com/document/product/647/85386\",fT={\"TRTC.checkSystemRequirements\":40001,\"TRTC.isScreenShareSupported\":40002,\"TRTC.isSmallStreamSupported\":40003,\"TRTC.createClient.rtc\":40004,\"TRTC.createClient.live\":40005,\"TRTC.createClient.intRoomId\":40006,\"TRTC.createClient.stringRoomId\":40007,\"TRTC.createClient.autoSubscribe\":40008,\"TRTC.createClient.manualSubscribe\":40009,\"TRTC.enableUploadLog\":40010,\"TRTC.disableUploadLog\":40011,\"Client.publish\":40012,\"Client.publish.isAuxiliary\":40013,\"Client.switchRole\":40014,\"Client.startPublishCDNStream\":40015,\"Client.stopPublishCDNStream\":40016,\"Client.startMixTranscode\":40017,\"Client.stopMixTranscode\":40018,\"Client.enableAudioVolumeEvaluation\":40019,\"Client.enableSmallStream\":40020,\"Client.disableSmallStream\":40021,\"Client.setSmallStreamProfile\":40022,\"Client.setRemoteVideoStreamType\":40023,\"Client.sendSEIMessage\":40024,\"Client.setProxyServer\":40025,\"Client.setTurnServer\":40026,\"LocalStream.setAudioProfile.standard\":40027,\"LocalStream.setAudioProfile.high\":40028,\"LocalStream.setAudioProfile.standard-stereo\":40029,\"LocalStream.setAudioProfile.high-stereo\":40030,\"LocalStream.setVideoProfile.120p\":40031,\"LocalStream.setVideoProfile.120p_2\":40032,\"LocalStream.setVideoProfile.180p\":40033,\"LocalStream.setVideoProfile.180p_2\":40034,\"LocalStream.setVideoProfile.240p\":40035,\"LocalStream.setVideoProfile.240p_2\":40036,\"LocalStream.setVideoProfile.360p\":40037,\"LocalStream.setVideoProfile.360p_2\":40038,\"LocalStream.setVideoProfile.480p\":40039,\"LocalStream.setVideoProfile.480p_2\":40040,\"LocalStream.setVideoProfile.720p\":40041,\"LocalStream.setVideoProfile.1080p\":40042,\"LocalStream.setVideoProfile.1440p\":40043,\"LocalStream.setVideoProfile.4K\":40044,\"LocalStream.setScreenProfile.480p\":40045,\"LocalStream.setScreenProfile.480p_2\":40046,\"LocalStream.setScreenProfile.720p\":40047,\"LocalStream.setScreenProfile.720p_2\":40048,\"LocalStream.setScreenProfile.1080p\":40049,\"LocalStream.setScreenProfile.1080p_2\":40050,\"LocalStream.setVideoContentHint.motion\":40051,\"LocalStream.setVideoContentHint.detail\":40052,\"LocalStream.setVideoContentHint.text\":40053,\"LocalStream.setAudioCaptureVolume\":40054,\"LocalStream.getVideoFrame\":40055,\"RemoteStream.setAudioOutput\":40056,\"RemoteStream.getVideoFrame\":40057,AI_DENOISER:1700,SPATIAL_AUDIO:1701,\"2K_4K\":1704},mT=[\"width\",\"height\",\"frameRate\",\"facingMode\",\"sampleRate\",\"sampleSize\",\"channelCount\",\"deviceId\"],_T=ue,vT=du,gT=/\"/g,yT=ee(\"\".replace),ST=function(e,t,n,i){var r=vT(_T(e)),a=\"<\"+t;return\"\"!==n&&(a+=\" \"+n+'=\"'+yT(vT(i),gT,\"&quot;\")+'\"'),a+\">\"+r+\"</\"+t+\">\"},bT=x,kT=function(e){return bT((function(){var t=\"\"[e]('\"');return t!==t.toLowerCase()||t.split('\"').length>3}))},IT=ST;Tr({target:\"String\",proto:!0,forced:kT(\"link\")},{link:function(e){return IT(this,\"a\",\"href\",e)}}),Tr({target:\"Array\",stat:!0},{isArray:ud});var TT=\"AVOID_REPEATED_CALL\",wT=\"INVALID_PARAMETER_REQUIRED\",ET=\"INVALID_PARAMETER_TYPE\",RT=\"INVALID_PARAMETER_EMPTY\",CT=\"INVALID_PARAMETER_INSTANCE\",AT=\"INVALID_PARAMETER_RANGE\",xT=\"API_CALL_TIMEOUT\",PT=\"SIGNAL_CHANNEL_RECONNECTION_FAILED\",DT=\"SIGNAL_CHANNEL_SETUP_FAILED\",OT=\"ERROR_MESSAGE\",MT=\"EXCHANGE_SDP_TIMEOUT\",NT=\"DOWNLINK_RECONNECTION_FAILED\",LT=\"EXCHANGE_SDP_FAILED\",UT=\"UPLINK_RECONNECTION_FAILED\",VT=\"INVALID_PURE_AUDIO\",jT=\"INVALID_STREAMID\",FT=\"INVALID_USER_DEFINE_RECORDID\",BT=\"INVALID_USER_DEFINE_PUSH_ARGS\",HT=\"INVALID_PROXY\",WT=\"INVALID_JOIN\",GT=\"INVALID_ROOMID_STRING\",zT=\"INVALID_ROOMID_INTEGER\",JT=\"JOIN_ROOM_TIMEOUT\",qT=\"JOIN_ROOM_FAILED\",KT=\"REJOIN_ROOM_FAILED\",QT=\"INVALID_DESTROY\",XT=\"INVALID_PUBLISH\",YT=\"INVALID_UNPUBLISH\",$T=\"INVALID_AUDIENCE\",ZT=\"INVALID_INITIALIZE\",ew=\"INVALID_DUPLICATE_PUBLISHING\",tw=\"INVALID_REMOTE_STREAM\",nw=\"SUBSCRIBE_FAILED\",iw=\"INVALID_ROLE\",rw=\"INVALID_OPERATION_SWITCH_ROLE\",aw=\"SWITCH_ROLE_TIMEOUT\",ow=\"SWITCH_ROLE_FAILED\",sw=\"CLIENT_BANNED\",cw=\"INVALID_OPERATION_START_PUBLISH_CDN\",uw=\"INVALID_OPERATION_STOP_PUBLISH_CDN\",dw=\"INVALID_STREAM_ID\",lw=\"START_PUBLISH_CDN_FAILED\",hw=\"STOP_PUBLISH_CDN_FAILED\",pw=\"START_MIX_TRANSCODE\",fw=\"STOP_MIX_TRANSCODE\",mw=\"INVALID_AUDIO_VOLUME\",_w=\"ENABLE_SMALL_STREAM_PUBLISHED\",vw=\"DISABLE_SMALL_STREAM_PUBLISHED\",gw=\"NOT_SUPPORTED_SMALL_STREAM\",yw=\"INVALID_SMALL_STREAM_PROFILE\",Sw=\"INVALID_PARAMETER_REMOTE_STREAM\",bw=\"INVALID_SWITCH_DEVICE\",kw=\"INVALID_SWITCH_DEVICE_PUBLISHING\",Iw=\"INVALID_REPLACE_TRACK\",Tw=\"INVALID_INITIALIZE_LOCAL_STREAM\",ww=\"INVALID_ADD_TRACK_REPETITIVE\",Ew=\"INVALID_ADD_TRACK_REMOVING\",Rw=\"INVALID_ADD_TRACK_PUBLISHING\",Cw=\"INVALID_STREAM_INITIALIZED\",Aw=\"INVALID_ADD_TRACK_NUMBER\",xw=\"INVALID_REMOVE_AUDIO_TRACK\",Pw=\"INVALID_REMOVE_AUDIO_ADDING\",Dw=\"INVALID_REMOVE_AUDIO_ON\",Ow=\"INVALID_REMOVE_TRACK_PUBLISHING\",Mw=\"INVALID_REMOVE_TRACK_NOT_PUBLISHING\",Nw=\"INVALID_REMOVE_TRACK_NUMBER\",Lw=\"INVALID_REPLACE_TRACK_NO_TRACK\",Uw=\"REPEAT_JOIN\",Vw=\"CLIENT_DESTROYED\",jw=\"START_MIX_TRANSCODE_FAILED\",Fw=\"STOP_MIX_TRANSCODE_FAILED\",Bw=\"MIX_TRANSCODE_NOT_STARTED\",Hw=\"CANNOT_LESS_THAN_ZERO\",Ww=\"MIX_PARAMS_VIDEO_FRAMERATE\",Gw=\"MIX_PARAMS_VIDEO_GOP\",zw=\"MIX_PARAMS_AUDIO_BITRATE\",Jw=\"MIX_PARAMS_USER_Z_ORDER\",qw=\"MIX_PARAMS_NOT_SELF\",Kw=\"MIX_PARAMS_USER_STREAM\",Qw=\"INVALID_ELEMENT_ID\",Xw=\"INVALID_ELEMENT_ID_TYPE\",Yw=\"PLAY_FAILED\",$w=\"INVALID_CREATE_STREAM_SOURCE\",Zw=\"INVALID_CREATE_STREAM_SCREEN\",eE=\"INVALID_CREATE_STREAM_AUDIO\",tE=\"INVALID_CREATE_STREAM_SCREEN_AUDIO\",nE=\"NOT_SUPPORTED_HTTP\",iE=\"NOT_SUPPORTED_WEBRTC\",rE=\"NOT_SUPPORTED_PROFILE\",aE=\"NOT_SUPPORTED_H264ENCODE\",oE=\"NOT_SUPPORTED_H264DECODE\",sE=\"NOT_SUPPORTED_TRACK\",cE=\"NOT_SUPPORTED_SWITCH_DEVICE\",uE=\"NOT_SUPPORTED_CAPTURE\",dE=\"NOT_SUPPORTED_AUX\",lE=\"MICROPHONE_NOT_FOUND\",hE=\"CAMERA_NOT_FOUND\",pE=\"SIGNAL_RESPONSE_FAILED\",fE=\"CATCH_HANDLER_ERROR\",mE=\"API_NOT_EXIST\",_E=\"CONNECTION_CLOSED\",vE=\"SUBSCRIBE_ALL_FALSE\",gE=\"SEI_NOT_SUPPORT\",yE=\"SEI_DISABLED\",SE=\"SEI_EMPTY\",bE=\"SEI_OVERSIZE\",kE=\"SEI_BEFORE_PUBLISH\",IE=\"SEI_NOT_VIDEO\",TE=\"CALL_FREQUENCY_LIMIT\",wE=\"CONNECTION_ABORTED\",EE=\"API_CALL_ABORTED\",RE=\"DUPLICATE_AUX\",CE={AVOID_REPEATED_CALL:function(e){return\"previous \".concat(e.name,\"() is ongoing, please avoid repeated calls.\")},INVALID_PARAMETER_REQUIRED:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value;return\"'\".concat(t||n.name,\"' is a required param when calling \").concat(i,\"(), received: \").concat(r,\".\")},INVALID_PARAMETER_TYPE:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value,a=\"\".concat(t||n.name),o=\"\";return o=Array.isArray(n.type)?n.type.join(\"|\"):n.type,\"'\".concat(a,\"' must be type of \").concat(o,\" when calling \").concat(i,\"(), received type: \").concat(mC(r),\".\")},INVALID_PARAMETER_EMPTY:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value;return\"'\".concat(t||n.name,\"' cannot be '\").concat(r,\"' when calling \").concat(i,\"().\")},INVALID_PARAMETER_INSTANCE:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value,a=\"\".concat(t||n.name),o=\"\".concat(n.instanceOf.name||n.instanceOf);return\"'\".concat(a,\"' must be instanceof \").concat(o,\" when calling \").concat(i,\"(), received type: \").concat(mC(r),\".\")},INVALID_PARAMETER_RANGE:function(e){var t=e.key,n=e.rule,i=e.fnName,r=e.value;return\"'\".concat(t||n.name,\"' must be one of \").concat(n.values.join(\"|\"),\" when calling \").concat(i,\"(), received: \").concat(r,\".\")},API_CALL_TIMEOUT:function(e){return\"\".concat(e.commandDesc||e.command,\" timeout observed.\")},SIGNAL_CHANNEL_RECONNECTION_FAILED:\"signal channel reconnection failed, please check your network.\",SIGNAL_CHANNEL_SETUP_FAILED:function(e){return\"SignalChannel setup failure: (errorCode: \".concat(e.errorCode,\", errorMsg: \").concat(e.errorMsg,\" }).\")},ERROR_MESSAGE:function(e){var t=\"\".concat(e.type,\" failed\");return e.message&&(t=\"\".concat(t,\": \").concat(e.message,\".\")),t},EXCHANGE_SDP_TIMEOUT:\"exchange sdp timeout.\",DOWNLINK_RECONNECTION_FAILED:\"downlink reconnection failed, please check your network and re-join room.\",EXCHANGE_SDP_FAILED:function(e){return\"exchange sdp failed \".concat(e.errMsg,\".\")},UPDATE_OFFER_TIMEOUT:\"update offer timeout observed.\",UPLINK_RECONNECTION_FAILED:\"uplink reconnection failed, please check your network and publish again.\",INVALID_RECORDID:\"recordId must be an integer number.\",INVALID_PURE_AUDIO:\"pureAudioPushMode must be 1 or 2.\",INVALID_STREAMID:\"streamId must be a sting literal within 64 bytes, and not be empty.\",INVALID_USER_DEFINE_RECORDID:\"userDefineRecordId must be a sting literal contains (a-zA-Z),(0-9), underline and hyphen, within 64 bytes, and not be empty.\",INVALID_USER_DEFINE_PUSH_ARGS:\"userDefinePushArgs must be a sting literal within 256 bytes, and not be empty.\",INVALID_PROXY:'proxy server url must start with \"wss://\".',INVALID_JOIN:\"duplicate join() called.\",INVALID_ROOMID_STRING:function(e){return\"'\".concat(e,\"' must be validate string when useStringRoomId is true.\")},INVALID_ROOMID_INTEGER:function(e){return\"'\".concat(e,\"' must be an integer between [1, 4294967294] when useStringRoomId is false.\")},INVALID_SIGNAL_CHANNEL:\"SignalChannel is not ready yet.\",JOIN_ROOM_TIMEOUT:\"join room timeout.\",JOIN_ROOM_FAILED:function(e){var t=e.error,n=e.code;return\"Failed to join room - \".concat(t,\" code: \").concat(n)},REJOIN_ROOM_FAILED:function(e){return\"reJoin room: \".concat(e.roomId,\" failed, please check your network.\")},INVALID_DESTROY:\"please call leave() before destroy().\",INVALID_PUBLISH:\"please call join() before publish().\",INVALID_UNPUBLISH:\"stream has not been published yet.\",INVALID_AUDIENCE:\"no permission to publish() under live/\".concat(Tk,', please call switchRole(\"').concat(Ik,'\") firstly before publish().'),INVALID_INITIALIZE:\"cannot publish stream because stream is not initialized, is switching device, or has been closed.\",INVALID_DUPLICATE_PUBLISHING:function(e){return\"duplicate \".concat(e,\" stream publishing, please unpublish your prev \").concat(e,\" stream and then re-publish.\")},INVALID_SUBSCRIBE_UNDEFINED:\"stream is undefined or null.\",INVALID_SUBSCRIBE_LOCAL:\"stream cannot be LocalStream.\",INVALID_REMOTE_STREAM:\"remoteStream does not exist because it has been unpublished by remote peer.\",SUBSCRIBE_FAILED:function(e){var t=e.message,n=e.stream;return\"failed to subscribe \".concat(n.getUserId(),\" \").concat(n.getType(),\" stream, reason: \").concat(t,\".\")},INVALID_ROLE:\"switchRole can only be called in live mode.\",INVALID_PARAMETER_SWITCH_ROLE:\"role could only be set to a value as \".concat(Ik,\" or \").concat(Tk,\".\"),INVALID_OPERATION_SWITCH_ROLE:\"please call join() before switchRole().\",SWITCH_ROLE_TIMEOUT:\"switchRole timeout.\",SWITCH_ROLE_FAILED:function(e){return\"switchRole failed, errCode: \".concat(e.code,\" errMsg: \").concat(e.message,\".\")},CLIENT_BANNED:function(e){return\"client was banned because of \"+e.message+\".\"},INVALID_OPERATION_START_PUBLISH_CDN:\"please call startPublishCDNStream() before client join the room or after client join the room and successfully publish the local stream.\",INVALID_OPERATION_STOP_PUBLISH_CDN:\"please call startPublishCDNStream() before stopPublishCDNStream().\",START_PUBLISH_CDN_FAILED:function(e){return\"startPublishCDNStream failed, errMsg: \".concat(e.message,\".\")},STOP_PUBLISH_CDN_FAILED:function(e){return\"stopPublishCDNStream failed, errMsg: \".concat(e.message,\".\")},INVALID_STREAM_ID:function(e){return\"'\".concat(e,\"' can only consist of uppercase and lowercase english letters (a-zA-Z), numbers (0-9), hyphens and underscores.\")},START_MIX_TRANSCODE:\"please call startMixTranscode() after join().\",STOP_MIX_TRANSCODE:\"please call stopMixTranscode() after startMixTranscode().\",INVALID_AUDIO_VOLUME:\"interval must be a number.\",ENABLE_SMALL_STREAM_PUBLISHED:\"Cannot enable small stream after localStream published.\",DISABLE_SMALL_STREAM_PUBLISHED:\"Cannot disable small stream after localStream published.\",NOT_SUPPORTED_SMALL_STREAM:\"your browser does not support opening small stream.\",INVALID_SMALL_STREAM_PROFILE:\"small stream profile is invalid.\",INVALID_PARAMETER_REMOTE_STREAM:\"remoteStream is invalid.\",INVALID_OPERATION_CHANGE_SMALL:\"cannot switch to the small stream without subscribing to the video of remoteStream.\",REMOTE_NOT_PUBLISH_SMALL_STREAM:\"remote peer does not publish small stream.\",INVALID_SWITCH_DEVICE:\"cannot switch device on current stream.\",INVALID_SWITCH_DEVICE_PUBLISHING:\"cannot switch device when publishing localStream.\",INVALID_REPLACE_TRACK:\"cannot replace track when publishing localStream.\",INVALID_INITIALIZE_LOCAL_STREAM:\"local stream has not initialized yet.\",INVALID_ADD_TRACK_REPETITIVE:\"previous addTrack is ongoing, please avoid repetitive execution.\",INVALID_ADD_TRACK_REMOVING:\"cannot add track when a track is removing.\",INVALID_ADD_TRACK_PUBLISHING:\"cannot add track when publishing localStream.\",INVALID_STREAM_INITIALIZED:\"your local stream haven't been initialized yet.\",INVALID_ADD_TRACK_NUMBER:\"a Stream has at most one audio track and one video track.\",INVALID_REMOVE_AUDIO_TRACK:\"remove audio track is not supported on your browser.\",INVALID_REMOVE_AUDIO_ADDING:\"cannot remove track when a track is adding.\",INVALID_REMOVE_AUDIO_ON:\"previous removeTrack is ongoing, please avoid repetitive execution.\",INVALID_REMOVE_TRACK_PUBLISHING:\"cannot remove track when publishing localStream.\",INVALID_REMOVE_TRACK_NOT_PUBLISHING:\"the track to be removed is not being publishing.\",INVALID_REMOVE_TRACK_NUMBER:\"remove the only video track is not supported, please use replaceTrack or muteVideo.\",INVALID_REPLACE_TRACK_NO_TRACK:function(e){return\"cannot replace \".concat(e.kind,\" track because stream has not \").concat(e.kind,\" track\")},START_MIX_TRANSCODE_FAILED:function(e){return\"startMixTranscode failed, errMsg: \".concat(e.message,\".\")},STOP_MIX_TRANSCODE_FAILED:function(e){return\"stopMixTranscode failed, errMsg: \".concat(e.message,\".\")},MIX_TRANSCODE_NOT_STARTED:\"mixTranscode has not been started.\",CANNOT_LESS_THAN_ZERO:function(e){var t=e.key,n=e.rule,i=e.fnName;return e.value,\"'\".concat(t||n.name,\"' cannot be less than 0 when calling \").concat(i,\"().\")},MIX_PARAMS_VIDEO_FRAMERATE:\"'config.videoFramerate' should be an integer between 0 and 30, excluding 0.\",MIX_PARAMS_VIDEO_GOP:\"'config.videoGOP' should be an integer between 1 and 8.\",MIX_PARAMS_AUDIO_BITRATE:\"'config.audioBitrate' should be an integer between 32 and 192.\",MIX_PARAMS_USER_Z_ORDER:function(e){return\"'\".concat(e,\"' is required and must be between 1 and 15.\")},MIX_PARAMS_NOT_SELF:\"'config.mixUsers' must contain self.\",MIX_PARAMS_USER_STREAM:\"'config.videoWidth' and 'config.videoHeight' of output stream should be contain all mix stream.\",INVALID_PLAY:\"duplicate play() call observed, please stop() firstly.\",INVALID_ELEMENT_ID:function(e){var t=e.key,n=e.fnName;return\"'\".concat(t,\"' is not found in the document object when calling \").concat(n,\"().\")},INVALID_ELEMENT_ID_TYPE:function(e){var t=e.key,n=e.fnName,i=e.type;return\"the element corresponding to '\".concat(t,\"' must be instanceof HTMLDivElement when calling \").concat(n,\"(), received: \").concat(i,\".\")},PLAY_FAILED:function(e){return\"\".concat(e.media,\" play failed，browser exception: \").concat(e.error.toString())},INVALID_USERID:\"userId cannot be all spaces.\",INVALID_CREATE_STREAM_SOURCE:\"LocalStream must be created by createStream() with either audio/video or audioSource/videoSource, but can not be mixed with audio/video and audioSource/videoSource.\",INVALID_CREATE_STREAM_SCREEN:\"screen/video cannot be both true.\",INVALID_CREATE_STREAM_AUDIO:\"audio/screenAudio cannot be both true.\",INVALID_CREATE_STREAM_SCREEN_AUDIO:\"when screen is true, screenAudio can be configured.\",NOT_SUPPORTED_HTTP:\"http protocol does not support the ability to capture and publish streams, please use the https protocol.\",NOT_SUPPORTED_WEBRTC:\"your browser or environment does not support full WebRTC capabilities.\",NOT_SUPPORTED_PROFILE:\"your browser does not support setVideoProfile.\",NOT_SUPPORTED_MEDIA:\"your browser or environment does not support navigator.mediaDevices.\",NOT_SUPPORTED_H264ENCODE:\"your device does not support H.264 encoding.\",NOT_SUPPORTED_H264DECODE:\"your device does not support H.264 decoding.\",NOT_SUPPORTED_TRACK:function(e){return\"\".concat(e,\"Track is not supported on your browser.\")},NOT_SUPPORTED_SWITCH_DEVICE:\"switchDevice is not supported on your browser.\",NOT_SUPPORTED_CAPTURE:\"Your browser or environment does not support screen sharing, please check whether the browser version.\",MICROPHONE_NOT_FOUND:\"no microphone detected, please check your microphone and the configuration on TRTC.createStream.\",CAMERA_NOT_FOUND:\"no camera detected, please check your camera and the configuration on TRTC.createStream.\",SIGNAL_RESPONSE_FAILED:function(e){return\"\".concat(e.signalResponse,\" failed, response code is \").concat(e.code,\" , errMsg: \").concat(e.message,\".\")},CATCH_HANDLER_ERROR:function(e){var t=e.name,n=e.event;return\"an error was caught on \".concat(t,\".on('\").concat(n,\"', handler), please check your code on 'handler'.\")},API_NOT_EXIST:function(e){var t=e.name;return\"experimental api \".concat(t,\" does not exist.\")},REPEAT_JOIN:function(e){return\"[\".concat(e,\"] is calling client.join api or has already joined room, please avoid repeated join.\")},CONNECTION_CLOSED:\"remoteStream has been unsubscribed or unpublished by remote user.\",SUBSCRIBE_ALL_FALSE:\"cannot subscribe when both audio & video are false, use client.unsubscribe() instead\",CLIENT_DESTROYED:function(e){var t=e.funName;return\"failed to call \".concat(t,\"() because client was destroyed.\")},SEI_NOT_SUPPORT:function(e){return\"not support to sendSEIMessage\".concat(!1===e?\" without using h264 codec\":\"\")},SEI_DISABLED:\"SEI is disabled, to enable SEI: TRTC.createClient({ enableSEI: true })\",SEI_EMPTY:\"buffer cannot be empty\",SEI_OVERSIZE:function(e){return\"buffer size(\".concat(e,\") is over 1000 Bytes\")},SEI_BEFORE_PUBLISH:\"please call sendSEIMessage() after publish() success\",SEI_NOT_VIDEO:\"cannot send sei when localStream has not video.\",CALL_FREQUENCY_LIMIT:function(e){var t=e.isSize,n=e.name,i=e.timesInSecond,r=e.maxSizeInSecond;return\"api \".concat(n,\" call \").concat(t?\"size\":\"times\",\" is over \").concat(t?r+\" bytes\":i,\" in a second.\")},CONNECTION_ABORTED:function(e){return\"connection aborted due to: \"+e},API_CALL_ABORTED:function(e){return e.message.includes(\"REMOTE_STREAM_NOT_EXIST\")?\"Subscribe \".concat(e.stream.getUserId(),\" \").concat(e.stream.getType(),\" stream aborted, reason: remote user \").concat(e.stream.getUserId(),\" unpublished stream.\"):\"API aborted, reason: \".concat(e.message)},DUPLICATE_AUX:\"only one auxiliary stream can be published in a room.\",NOT_SUPPORTED_AUX:\"publish auxiliary stream is not supported on your browser.\"},AE=C,xE=x,PE=du,DE=ev.trim,OE=ee(\"\".charAt),ME=AE.parseFloat,NE=AE.Symbol,LE=NE&&NE.iterator,UE=1/ME(\"\\t\\n\\v\\f\\r                　\\u2028\\u2029\\ufeff-0\")!=-Infinity||LE&&!xE((function(){ME(Object(LE))}))?function(e){var t=DE(PE(e)),n=ME(t);return 0===n&&\"-\"==OE(t,0)?-0:n}:ME;Tr({global:!0,forced:parseFloat!=UE},{parseFloat:UE});var VE=window.navigator&&window.navigator.userAgent||\"\",jE=/AppleWebKit\\/([\\d.]+)/i.exec(VE);jE&&parseFloat(jE.pop());var FE=/iPad/i.test(VE),BE=navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/Macintosh/.test(VE),HE=/iPhone/i.test(VE)&&!FE,WE=/iPod/i.test(VE),GE=HE||FE||WE||BE,zE=/Android/i.test(VE);zE&&function(){var e=VE.match(/Android (\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);t&&n&&parseFloat(e[1]+\".\"+e[2])}();zE&&/webkit/i.test(VE);var JE=/Firefox/i.test(VE),qE=JE&&function(){var e=VE.match(/Firefox\\/(\\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),KE=/Edge\\//i.test(VE),QE=KE&&function(){var e=VE.match(/Edge\\/(\\d+)/i);if(e&&e[1])return e[1]}(),XE=/Edg\\//i.test(VE),YE=XE&&function(){var e=VE.match(/Edg\\/(\\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),$E=/SogouMobileBrowser\\//i.test(VE),ZE=$E&&function(){var e=VE.match(/SogouMobileBrowser\\/(\\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),eR=/MetaSr\\s/i.test(VE),tR=eR&&function(){var e=VE.match(/MetaSr(\\s\\d+(\\.\\d+)+)/);return e&&e[1]?parseFloat(e[1]):null}(),nR=/TBS\\/\\d+/i.test(VE),iR=nR&&function(){var e=VE.match(/TBS\\/(\\d+)/i);if(e&&e[1])return e[1]}(),rR=/XWEB\\/\\d+/i.test(VE),aR=rR&&function(){var e=VE.match(/XWEB\\/(\\d+)/i);if(e&&e[1])return e[1]}();/MSIE\\s8\\.0/.test(VE),/MSIE\\/\\d+/i.test(VE)&&function(){var e=/MSIE\\s(\\d+)\\.\\d/.exec(VE),t=e&&parseFloat(e[1]);!t&&/Trident\\/7.0/i.test(VE)&&/rv:11.0/.test(VE)&&(t=11)}();var oR=/(micromessenger|webbrowser)/i.test(VE),sR=oR&&function(){var e=VE.match(/MicroMessenger\\/(\\d+)/i);if(e&&e[1])return e[1]}(),cR=!nR&&/MQQBrowser\\/\\d+/i.test(VE)&&/COVC\\/\\d+/i.test(VE),uR=!nR&&/MQQBrowser\\/\\d+/i.test(VE)&&!/COVC\\/\\d+/i.test(VE),dR=(uR||cR)&&function(){var e=VE.match(/ MQQBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),lR=!nR&&/ QQBrowser\\/\\d+/i.test(VE),hR=lR&&function(){var e=VE.match(/ QQBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),pR=!nR&&/QQBrowserLite\\/\\d+/i.test(VE),fR=pR&&function(){var e=VE.match(/QQBrowserLite\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),mR=!nR&&/MQBHD\\/\\d+/i.test(VE),_R=mR&&function(){var e=VE.match(/MQBHD\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),vR=/Windows/i.test(VE),gR=!GE&&/MAC OS X/i.test(VE),yR=!zE&&/Linux/i.test(VE);/MicroMessenger/i.test(VE);var SR=/UCBrowser/i.test(VE);/Electron/i.test(VE);var bR,kR,IR=/MiuiBrowser/i.test(VE),TR=IR&&function(){var e=VE.match(/MiuiBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),wR=/HuaweiBrowser/i.test(VE),ER=/Huawei/i.test(VE),RR=wR&&function(){var e=VE.match(/HuaweiBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),CR=/SamsungBrowser/i.test(VE),AR=CR&&function(){var e=VE.match(/SamsungBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),xR=/HeyTapBrowser/i.test(VE),PR=xR&&function(){var e=VE.match(/HeyTapBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),DR=/VivoBrowser/i.test(VE),OR=DR&&function(){var e=VE.match(/VivoBrowser\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),MR=function(){var e=VE.match(/Chrome\\/(\\d+)/);return e&&e[1]?Number(e[1]):null},NR=/Chrome/i.test(VE),LR=!KE&&!eR&&!$E&&!nR&&!rR&&!XE&&!lR&&!IR&&!wR&&!CR&&!xR&&!DR&&/Chrome/i.test(VE),UR=LR&&MR(),VR=LR&&function(){var e=VE.match(/Chrome\\/([\\d.]+)/);return e&&e[1]?e[1]:null}(),jR=!NR&&!uR&&!cR&&!pR&&!mR&&/Safari/i.test(VE),FR=function(){if(jR){var e=VE.match(/Version\\/([\\d.]+)/);if(e&&e[1])return e[1]}return\"\"}(),BR=/Android.*(wv|.0.0.0)/.test(VE),HR=function(){if(BE)return FR;if(GE){var e=VE.match(/OS (\\d+)_(\\d+)/i);if(e&&e[1]){var t=e[1];return e[2]&&(t+=\".\".concat(e[2])),t}}return\"\"}(),WR=Number(HR.split(\".\")[0]),GR=\"15.1\"===FR,zR=\"15.1\"===HR,JR=14===(bR=Number(HR.split(\".\")[0]))||13===bR,qR=\"file:\"===location.protocol||\"localhost\"===location.hostname||\"127.0.0.1\"===location.hostname,KR=function(){if(cC(kR))try{kR=window.localStorage}catch(qq){MA.warn(qq),kR=!1}return kR},QR=new Map([[JE,[\"Firefox\",qE]],[XE,[\"Edg\",YE]],[LR,[\"Chrome\",VR]],[jR,[\"Safari\",FR]],[nR,[\"TBS\",iR]],[rR,[\"XWEB\",aR]],[oR&&HE,[\"WeChat\",sR]],[lR,[\"QQ(Win)\",hR]],[uR,[\"QQ(Mobile)\",dR]],[cR,[\"QQ(Mobile X5)\",dR]],[pR,[\"QQ(Mac)\",fR]],[mR,[\"QQ(iPad)\",_R]],[IR,[\"MI\",TR]],[wR,[\"HW\",RR]],[CR,[\"Samsung\",AR]],[xR,[\"OPPO\",PR]],[DR,[\"VIVO\",OR]],[KE,[\"EDGE\",QE]],[$E,[\"SogouMobile\",ZE]],[eR,[\"Sogou\",tR]]]);function XR(){var e=\"unknown\",t=\"unknown\";return QR.get(!0)&&(e=QR.get(!0)[0],t=QR.get(!0)[1]),{name:e,version:t}}var YR=function(e,t){return t?XI+\"/\"+e+\"/\"+t:XI+\"/\"+e+\"/index.html\"},$R=function(){if(!KR())return!1;var e=localStorage.getItem($I);e&&!function(e){var t=e.saveTime&&(new Date).getTime()-e.saveTime>=MI,n=!e.saveVersion||e.saveVersion!==Dr;return t||n}(JSON.parse(e))||(MA.info(\"init debug info\"),function(){var e=new XMLHttpRequest;if(e.open(\"GET\",\"https://web.sdk.qcloud.com/trtc/webrtc/download/error-message/0.0.3/script.js\",!1),e.send(null),4===e.readyState&&200===e.status){var t=document.createElement(\"script\");t.type=\"text/javascript\",t.text=e.responseText,document.body.appendChild(t),localStorage.setItem($I,JSON.stringify({message:e.responseText,saveTime:(new Date).getTime(),saveVersion:Dr})),document.body.removeChild(t)}}())};function ZR(e){var t=e.key,n=e.data,i=e.link,r=e.addDocLink,a=void 0===r||r,o=\"\",s=\"\",c=\"\";sC(CE[t])?o=CE[t](n):uC(CE[t])&&(o=CE[t]);var u=function(){if(window.TRTC_ERROR_INFO&&window.TRTC_ERROR_LINK)return{TRTC_ERROR_INFO:window.TRTC_ERROR_INFO,TRTC_ERROR_LINK:window.TRTC_ERROR_LINK};var e=localStorage.getItem($I);if(e){e=JSON.parse(e);var t=document.createElement(\"script\");t.type=\"text/javascript\",t.text=e.message,document.body.appendChild(t);var n=window.TRTC_ERROR_INFO,i=window.TRTC_ERROR_LINK;return document.body.removeChild(t),{TRTC_ERROR_INFO:n,TRTC_ERROR_LINK:i}}return{}}(),d=u.TRTC_ERROR_INFO,l=u.TRTC_ERROR_LINK;i?c=\"\".concat(i.className,\".html#\").concat(i.fnName):l&&l[t]&&(sC(l[t])?c=l[t](n):uC(l[t])&&(c=l[t]));var h=o;return bC()&&(d&&d[t]&&(sC(d[t])?s=d[t](n):uC(d[t])&&(s=d[t])),s&&(h=a?s+\"\\n请查看文档: \"+YR(\"zh-cn\",c)+\"\\n\\n\":s+\"\\n\\n\",h+=o)),a&&(h+=\" \\nRefer to: \"+YR(\"en\",c)+\"\\n\"),h}var eC=function(){return function(e){var t=window.location.search.match(new RegExp(\"(\\\\?|&)\"+e+\"=([^&]*)(&|$)\"));return t?decodeURIComponent(t[2]):\"\"}(\"trtc_env\")},tC=function(e){return(e=Number(e))>0&&e<14e8},nC=function(e,t){var n;n=pk?pk.includes(\"http\")?pk:\"https://\"+pk:tC(e)?\"https://apisgp.my-imcloud.com\":\"https://yun.tim.qq.com\";var i=Math.floor(Math.random()*Math.pow(2,31));return\"\".concat(n,\"/v5/AVQualityReportSvc/C2S?random=\").concat(i,\"&sdkappid=\").concat(e,\"&cmdtype=\").concat(t)};function iC(){var e=navigator.userAgent,t=navigator.connection,n=e.match(/NetType\\/\\w+/)?e.match(/NetType\\/\\w+/)[0]:\"\";\"3gnet\"===(n=n.toLowerCase().replace(\"nettype/\",\"\"))&&(n=\"3g\");var i=t&&t.type&&t.type.toLowerCase(),r=t&&t.effectiveType&&t.effectiveType.toLowerCase();\"slow-2\"===r&&(r=\"2g\");var a=n||\"unknown\";if(i)switch(i){case\"cellular\":case\"wimax\":a=r||\"unknown\";break;case\"wifi\":a=\"wifi\";break;case\"ethernet\":a=\"wired\";break;case\"none\":case\"other\":case\"unknown\":a=\"unknown\"}return a}var rC=function(e){if(!e||\"object\"!==i(e)||\"[object Object]\"!=Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.prototype.hasOwnProperty.call(t,\"constructor\")&&t.constructor;return\"function\"==typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)};function aC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<=1?n:aC(e-1,n,t+n)}function oC(e){var t=Math.round(e/2)+1;return t>6?13e3:1e3*aC(t)}var sC=function(e){return\"function\"==typeof e},cC=function(e){return void 0===e},uC=function(e){return\"string\"==typeof e},dC=function(e){return\"number\"==typeof e},lC=function(e){return\"boolean\"==typeof e},hC=function(e){return\"object\"===mC(e)},pC=function(e){return\"array\"===mC(e)},fC=function(e){return mC(e)===\"MediaStreamTrack\".toLowerCase()};function mC(e){return Reflect.apply(Object.prototype.toString,e,[]).replace(/^\\[object\\s(\\w+)\\]$/,\"$1\").toLowerCase()}function _C(e){var t={};return t.urls=\"turn:\".concat(e.url),cC(e.username)||cC(e.credential)||(t.username=e.username,t.credential=e.credential,t.credentialType=\"password\",cC(e.credentialType)||(t.credentialType=e.credentialType)),t}function vC(){return performance&&performance.now?Math.floor(performance.now()):Date.now()}function gC(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"big\";if(!uC(e))return 0;var n=e.split(\".\");return\"big\"===t?(Number(n[0])<<24|Number(n[1])<<16|Number(n[2])<<8|Number(n[3]))>>>0:(Number(n[3])<<24|Number(n[2])<<16|Number(n[1])<<8|Number(n[0]))>>>0}var yC,SC,bC=function(){var e=navigator.language||navigator.userLanguage;return\"zh\"===(e=e.substr(0,2))},kC=(yC=!1,SC=document.visibilityState,function(){document.visibilityState!==SC&&MA.info(\"visibility change: \".concat(document.visibilityState)),yC||(document.addEventListener(\"visibilitychange\",(function(){MA.info(\"visibility change: \"+document.visibilityState),SC=document.visibilityState})),yC=!0)});window.AudioContext=window.AudioContext||window.webkitAudioContext||window.mozAudioContext;var IC=function(){return new window.AudioContext},TC=function(){var e;return function(){if(e)return e;e=new window.AudioContext;return e.onstatechange=function(){MA.info(\"gain context state: \".concat(e.state)),\"suspended\"===e.state?(e.resume(),document.addEventListener(\"click\",e.resume)):\"interrupted\"===e.state?e.resume():document.removeEventListener(\"click\",e.resume)},e}}(),wC=!!window.AudioWorkletNode,EC=function(e,t){var n=e.emit;return e.emit=function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];try{n.apply(e,r)}catch(qq){var o=ZR({key:fE,data:{name:t,event:r[0]},addDocLink:!1});MA.warn(o+\"\\n\\n\"+qq.stack)}},e},RC=function(e){return+e<10?\"0\".concat(e):e},CC=function(e){var t=e.match(/^\\d+\\.\\d+\\.\\d+/)[0];if(!t)return e;var n=t.split(\".\"),i=RC(n[1])+RC(n[2]);return n[1]-15>0&&(n[1]=\"15\"),n[2]-15>0&&(n[2]=\"15\"),n.join(\".\")+\".\"+i};function AC(e,t){try{if(pC(e))return\"[\".concat(e.map((function(e){return AC(e,t)})).join(\",\"),\"]\");if(!rC(e)||!pC(t))return JSON.stringify(e);var n={},i=new Set(t);return Object.keys(e).forEach((function(t){i.has(t)&&(n[t]=e[t])})),JSON.stringify(n)}catch(qq){return\"{}\"}}function xC(e){var t=e.url,n=e.body,i=e.method,r=e.timeout,a=new XMLHttpRequest;return new Promise((function(e,o){a.onload=function(t){if(a.status>=200&&a.status<300&&a.responseText.length>0)try{var n=JSON.parse(a.response);e({data:n})}catch(qq){e({data:a.response})}else a.status>0&&o({code:a.status,message:\"request failed, readyState:\".concat(a.readyState,\" status:\").concat(a.status,\" loaded size:\").concat(t.loaded)})};var s=function(e){o({code:a.readyState,message:\"request \".concat(e.type,\", readyState:\").concat(a.readyState,\" status:\").concat(a.status,\" loaded size:\").concat(e.loaded)})};a.onerror=s,a.onabort=s,a.ontimeout=s,a.timeout=r||5e3,a.open(i||\"POST\",t,!0),a.send(n)}))}var PC={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n=\"~\";function i(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,i,a,o){if(\"function\"!=typeof i)throw new TypeError(\"The listener must be a function\");var s=new r(i,a||e,o),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function s(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,i,r=[];if(0===this._eventsCount)return r;for(i in e=this._events)t.call(e,i)&&r.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},s.prototype.listeners=function(e){var t=n?n+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,a=i.length,o=new Array(a);r<a;r++)o[r]=i[r].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,i=this._events[t];return i?i.fn?1:i.length:0},s.prototype.emit=function(e,t,i,r,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var c,u,d=this._events[s],l=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),l){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,t),!0;case 3:return d.fn.call(d.context,t,i),!0;case 4:return d.fn.call(d.context,t,i,r),!0;case 5:return d.fn.call(d.context,t,i,r,a),!0;case 6:return d.fn.call(d.context,t,i,r,a,o),!0}for(u=1,c=new Array(l-1);u<l;u++)c[u-1]=arguments[u];d.fn.apply(d.context,c)}else{var h,p=d.length;for(u=0;u<p;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),l){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,t);break;case 3:d[u].fn.call(d[u].context,t,i);break;case 4:d[u].fn.call(d[u].context,t,i,r);break;default:if(!c)for(h=1,c=new Array(l-1);h<l;h++)c[h-1]=arguments[h];d[u].fn.apply(d[u].context,c)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,i,r){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||r&&!s.once||i&&s.context!==i||o(this,a);else{for(var c=0,u=[],d=s.length;c<d;c++)(s[c].fn!==t||r&&!s[c].once||i&&s[c].context!==i)&&u.push(s[c]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(PC);var DC=PC.exports,OC=new DC,MC=1,NC=2,LC=3,UC=4,VC=5,jC=20,FC=21,BC=22,HC=23,WC=24,GC=27,zC=28,JC=29,qC=30,KC=31,QC=32,XC=33,YC=40,$C=41,ZC=52,eA=100,tA=101,nA=102,iA=103,rA=110,aA=111,oA=112,sA=113,cA=114,uA=115,dA=116,lA=120,hA=121,pA=122,fA=123,mA=130,_A=131,vA=132,gA=133,yA=134,SA=135,bA=136,kA=137,IA=200,TA=201,wA=300,EA=301,RA=302,CA=303;function AA(e){var t=e.retryFunction,i=e.settings,r=e.onError,o=e.onRetrying,s=e.onRetryFailed,c=e.context;return function(){for(var e=this,u=arguments.length,d=new Array(u),l=0;l<u;l++)d[l]=arguments[l];var h=i.retries||5,p=0,f=-1,m=0,_=function(){var u=a(n().mark((function a(u,l){var v,g,y,S;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return v=c||e,n.prev=1,n.next=4,t.apply(v,d);case 4:g=n.sent,p=0,u(g),n.next=14;break;case 9:n.prev=9,n.t0=n.catch(1),y=function(){clearTimeout(f),p=0,m=2,l(n.t0)},S=function(){2!==m&&p<h?(p++,m=1,sC(o)&&o.call(v,p,y),f=setTimeout((function(){f=-1,_(u,l)}),cC(i.timeout)?1e3:i.timeout)):(y(),sC(s)&&s.call(v,n.t0))},sC(r)?r.call(v,n.t0,S,l,d):S();case 14:case\"end\":return n.stop()}}),a,null,[[1,9]])})));return function(e,t){return u.apply(this,arguments)}}();return new Promise(_)}}var xA=c((function e(t){o(this,e),this.log=t.log,this.level=t.level,this.userId=t.userId,this.sdkAppId=t.sdkAppId,this.forAllJoinedClients=t.forAllJoinedClients,this.uploaded=!1})),PA=function(){function e(t){o(this,e),this.id_=t.id,this.userId_=t.userId,this.sdkAppId_=t.sdkAppId,this.type_=t.type,this.isLocal_=!lC(t.isLocal)||t.isLocal}return c(e,[{key:\"setUserId\",value:function(e){this.userId_=e}},{key:\"setSdkAppId\",value:function(e){this.sdkAppId_=e}},{key:\"log\",value:function(e,t){MA.log({log:\"[\".concat(this.isLocal_?\"↑\":\"↓\").concat(this.id_,\"] \").concat(this.type_?this.type_+\" \":\"\").concat(t),level:e,forAllJoinedClients:cC(this.userId_),userId:this.userId_,sdkAppId:this.sdkAppId_})}},{key:\"info\",value:function(e){this.log(tT.INFO,e)}},{key:\"debug\",value:function(e){this.log(tT.DEBUG,e)}},{key:\"warn\",value:function(e){this.log(tT.WARN,e)}},{key:\"error\",value:function(e){this.log(tT.ERROR,e)}}]),e}(),DA=!(GE||zE),OA=function(){function e(){var t=this;o(this,e),this.clients_=new Set,this.queue_=[],this.timeoutId_=-1,this.logLevel_=tT.DEBUG,this.logLevelToUpload_=tT.INFO,this.enableUploadLog_=!0,this.isAbleToUpload_=!1,this.checkURLParam(),OC.on(qC,(function(e){var n=e.client;-1===t.timeoutId_&&t.startUpload(),t.clients_.add(n)})),OC.on(XC,(function(e){var n=e.client;return t.clients_.delete(n)})),OC.on(KC,(function(e){e&&rC(e.config)&&oT[e.config.logLevelToUpload]&&(t.logLevelToUpload_=e.config.logLevelToUpload)})),OC.on(UC,this.setIsAbleToUpload,this),OC.on(VC,this.setIsAbleToUpload,this)}var t,i;return c(e,[{key:\"getIsAbleToUpload\",value:function(){return this.isAbleToUpload_}},{key:\"setIsAbleToUpload\",value:function(){this.isAbleToUpload_=!0,OC.off(UC,this.setIsAbleToUpload,this),OC.off(VC,this.setIsAbleToUpload,this)}},{key:\"startUpload\",value:(i=a(n().mark((function e(){var t=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.upload();case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:this.timeoutId_=setTimeout((function(){return t.startUpload()}),2e3);case 8:case\"end\":return e.stop()}}),e,this,[[0,5]])}))),function(){return i.apply(this,arguments)})},{key:\"getLogsToUpload\",value:function(){var e=this,t={map:new Map,splicedQueue:[]};if(this.queue_[0].forAllJoinedClients&&0===this.clients_.size)return t;for(var n=0,i=function(){if(50===n)return\"break\";var i=e.queue_[n];i.forAllJoinedClients?e.clients_.forEach((function(e){if(e.getIsJoined()){var n=e.getUserId(),r=e.getSDKAppId();if(t.map.has(n))t.map.get(n).logs.push(i);else t.map.set(n,{userId:n,sdkAppId:r,logs:[i]})}})):t.map.has(i.userId)?t.map.get(i.userId).logs.push(i):t.map.set(i.userId,{userId:i.userId,sdkAppId:i.sdkAppId,logs:[i]})};n<this.queue_.length;n++){if(\"break\"===i())break}return t.map.size>0&&(t.splicedQueue=this.queue_.splice(0,n)),t}},{key:\"upload\",value:(t=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==this.queue_.length&&this.isAbleToUpload_){e.next=2;break}return e.abrupt(\"return\");case 2:if(t=this.getLogsToUpload(),i=t.map,r=t.splicedQueue,0!==i.size){e.next=5;break}return e.abrupt(\"return\");case 5:e.prev=5,a=b(i.values()),o=0;case 8:if(!(o<a.length)){e.next=16;break}return s=a[o],c=s.userId,u=s.sdkAppId,d=s.logs,e.next=12,this.uploadLogWithRetry(JSON.stringify({timestamp:zm(),sdkAppId:String(u),userId:c,version:Dr,log:d.map((function(e){return e.log})).join(\"\\n\")}),u);case 12:d.forEach((function(e){return e.uploaded=!0}));case 13:o++,e.next=8;break;case 16:e.next=20;break;case 18:e.prev=18,e.t0=e.catch(5);case 20:l=r.filter((function(e){return!e.uploaded})),l.length>0&&(this.queue_=l.concat(this.queue_));case 22:case\"end\":return e.stop()}}),e,this,[[5,18]])}))),function(){return t.apply(this,arguments)})},{key:\"uploadLogWithRetry\",value:function(e,t){return AA({retryFunction:function(){return xC({url:nC(t,fk),body:e,timeout:5e3})},settings:{retries:3,timeout:1e3},onError:function(e,t){t()}})()}},{key:\"getPrefix\",value:function(e){var t=new Date;return t.setTime(Gm()),String.prototype.padStart?\"[\".concat(t.toTimeString().replace(/.*(\\d{2}:\\d{2}:\\d{2}).*/,\"$1\"),\":\").concat(t.getMilliseconds().toString().padStart(3,\"0\"),\"] <\").concat(oT[e],\">\"):\"[\".concat(t.toTimeString().replace(/.*(\\d{2}:\\d{2}:\\d{2}).*/,\"$1\"),\":\").concat(t.getMilliseconds(),\"] <\").concat(oT[e],\">\")}},{key:\"getLogLevel\",value:function(){return this.logLevel_}},{key:\"setLogLevel\",value:function(e){cC(oT[e])||(this.logLevel_!==e&&this.info(\"setLogLevel \".concat(e)),this.logLevel_=e)}},{key:\"enableUploadLog\",value:function(){this.enableUploadLog_=!0}},{key:\"disableUploadLog\",value:function(){this.enableUploadLog_=!1}},{key:\"log\",value:function(e){var t=e.log,n=e.level,i=e.forAllJoinedClients,r=void 0===i||i,a=e.userId,o=e.sdkAppId;if(t=\"\".concat(this.getPrefix(n),\" \").concat(t),this.enableUploadLog_&&n>=this.logLevelToUpload_&&this.queue_.push(new xA({log:t,level:n,userId:a,sdkAppId:o,forAllJoinedClients:r})),!(n<this.logLevel_)){var s=oT[n]?oT[n].toLowerCase():\"info\";DA?console[s](\"%cTRTC%c%s\",\"padding: 1px 4px;border-radius: 3px;color: #fff;background: #1E88E5;\",\"display: inline\",t):console[s](t)}}},{key:\"debug\",value:function(e){this.log({log:e,level:tT.DEBUG})}},{key:\"info\",value:function(e){this.log({log:e,level:tT.INFO})}},{key:\"warn\",value:function(e){this.log({log:e,level:tT.WARN})}},{key:\"error\",value:function(e){this.log({log:e,level:tT.ERROR})}},{key:\"createLogger\",value:function(e){return new PA(e)}},{key:\"checkURLParam\",value:function(){var e=new URLSearchParams(location.search).get(\"logLevelToUpload\");oT[e]&&(this.logLevelToUpload_=e)}}]),e}(),MA=new OA,NA=!0,LA=ye,UA=Math.floor,VA=Number.isInteger||function(e){return!LA(e)&&isFinite(e)&&UA(e)===e};Tr({target:\"Number\",stat:!0},{isInteger:VA});var jA,FA=Tr,BA=ee,HA=A.f,WA=Mi,GA=du,zA=Ov,JA=ue,qA=Nv,KA=BA(\"\".startsWith),QA=BA(\"\".slice),XA=Math.min,YA=qA(\"startsWith\");FA({target:\"String\",proto:!0,forced:!!(YA||(jA=HA(String.prototype,\"startsWith\"),!jA||jA.writable))&&!YA},{startsWith:function(e){var t=GA(JA(this));zA(e);var n=WA(XA(arguments.length>1?arguments[1]:void 0,t.length)),i=GA(e);return KA?KA(t,i,n):QA(t,n,n+i.length)===i}});var $A=P,ZA=ee,ex=N,tx=x,nx=Lr,ix=Yi,rx=L,ax=lt,ox=ae,sx=Object.assign,cx=Object.defineProperty,ux=ZA([].concat),dx=!sx||tx((function(){if($A&&1!==sx({b:1},sx(cx({},\"a\",{enumerable:!0,get:function(){cx(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i=\"abcdefghijklmnopqrst\";return e[n]=7,i.split(\"\").forEach((function(e){t[e]=e})),7!=sx({},e)[n]||nx(sx({},t)).join(\"\")!=i}))?function(e,t){for(var n=ax(e),i=arguments.length,r=1,a=ix.f,o=rx.f;i>r;)for(var s,c=ox(arguments[r++]),u=a?ux(nx(c),a(c)):nx(c),d=u.length,l=0;d>l;)s=u[l++],$A&&!ex(o,c,s)||(n[s]=c[s]);return n}:sx,lx=dx;Tr({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==lx},{assign:lx});var hx=ee,px=qe,fx=ye,mx=ft,_x=Ku,vx=D,gx=Function,yx=hx([].concat),Sx=hx([].join),bx={},kx=function(e,t,n){if(!mx(bx,t)){for(var i=[],r=0;r<t;r++)i[r]=\"a[\"+r+\"]\";bx[t]=gx(\"C,a\",\"return new C(\"+Sx(i,\",\")+\")\")}return bx[t](e,n)},Ix=vx?gx.bind:function(e){var t=px(this),n=t.prototype,i=_x(arguments,1),r=function(){var n=yx(i,_x(arguments));return this instanceof r?kx(t,n.length,n):t.apply(e,n)};return fx(n)&&(r.prototype=n),r},Tx=Ix;Tr({target:\"Function\",proto:!0,forced:Function.bind!==Tx},{bind:Tx});var wx=Tr,Ex=Vd.findIndex,Rx=la,Cx=\"findIndex\",Ax=!0;Cx in[]&&Array(1).findIndex((function(){Ax=!1})),wx({target:\"Array\",proto:!0,forced:Ax},{findIndex:function(e){return Ex(this,e,arguments.length>1?arguments[1]:void 0)}}),Rx(Cx);var xx=P,Px=ee,Dx=Lr,Ox=he,Mx=Px(L.f),Nx=Px([].push),Lx=function(e){return function(t){for(var n,i=Ox(t),r=Dx(i),a=r.length,o=0,s=[];a>o;)n=r[o++],xx&&!Mx(i,n)||Nx(s,e?[n,i[n]]:i[n]);return s}},Ux={entries:Lx(!0),values:Lx(!1)}.values;Tr({target:\"Object\",stat:!0},{values:function(e){return Ux(e)}});var Vx=1,jx=5,Fx=2,Bx=3,Hx=4,Wx=\"DISCONNECTED\",Gx=\"CONNECTING\",zx=\"RECONNECTING\",Jx=\"CONNECTED\",qx={CLIENT_BANNED:9,CHANNEL_SETUP_RESULT:19,CHANNEL_RECONNECT_RESULT:514,JOIN_ROOM_RESULT:20,PEER_JOIN:4134,PEER_LEAVE:4135,STREAM_ADDED:16,STREAM_REMOVED:18,UPLINK_NETWORK_STATS:22,UPDATE_REMOTE_MUTE_STAT:23,PUBLISH_RESULT:4098,PUBLISH_STATE_CHANGE_RESULT:4112,UNPUBLISH_RESULT:4100,SUBSCRIBE_RESULT:4102,UNSUBSCRIBE_RESULT:4104,SUBSCRIBE_CHANGE_RESULT:4106,MUTE_RESULT:4108,UPDATE_OFFER_RESULT:4128,START_PUBLISH_TENCENT_CDN_RES:1286,STOP_PUBLISH_TENCENT_CDN_RES:1288,START_PUBLISH_GIVEN_CDN_RES:777,STOP_PUBLISH_GIVEN_CDN_RES:779,START_MIX_TRANSCODE_RES:781,STOP_MIX_TRANSCODE_RES:783,USER_LIST_RES:4137,SWITCH_ROLE_RES:4110,UPDATE_CONSTRAINT_CONFIG_RES:772},Kx=[qx.UPDATE_REMOTE_MUTE_STAT,qx.UPLINK_NETWORK_STATS,qx.USER_LIST_RES,qx.MUTE_RESULT],Qx={CLIENT_BANNED:\"client-banned\",CHANNEL_SETUP_RESULT:\"channel-setup-result\",CHANNEL_RECONNECT_RESULT:\"channel-reconnect-result\",JOIN_ROOM_RESULT:\"join-room-result\",PEER_JOIN:\"peer-join\",PEER_LEAVE:\"peer-leave\",STREAM_ADDED:\"stream-added\",STREAM_REMOVED:\"stream-removed\",UPLINK_NETWORK_STATS:\"uplink-network-stats\",UPDATE_REMOTE_MUTE_STAT:\"update-remote-mute-stat\",PUBLISH_RESULT:\"publish-result\",PUBLISH_STATE_CHANGE_RESULT:\"publish-state-change-result\",UNPUBLISH_RESULT:\"unpublish-result\",SUBSCRIBE_RESULT:\"subscribe-result\",SUBSCRIBE_CHANGE_RESULT:\"subscribe-change-result\",UNSUBSCRIBE_RESULT:\"unsubscribe-result\",UPDATE_OFFER_RESULT:\"update-offer-result\",START_PUBLISH_TENCENT_CDN_RES:\"start-publish-tencent-cdn-res\",STOP_PUBLISH_TENCENT_CDN_RES:\"stop-publish-tencent-cdn-res\",START_PUBLISH_GIVEN_CDN_RES:\"start-publish-given-cdn-res\",STOP_PUBLISH_GIVEN_CDN_RES:\"stop-publish-given-cdn-res\",START_MIX_TRANSCODE_RES:\"start-mix-transcode-res\",STOP_MIX_TRANSCODE_RES:\"stop-mix-transcode-res\",USER_LIST_RES:\"user-list-res\",SWITCH_ROLE_RES:\"switch_role_res\",MUTE_RESULT:\"mute-result\",UPDATE_CONSTRAINT_CONFIG_RES:\"update-contraint-config-res\"},Xx=\"publish_change\",Yx=\"publish_state_change\",$x=\"join\",Zx=\"leave\",eP=\"quality_report\",tP=\"mute_uplink\",nP=\"publish\",iP=\"unpublish\",rP=\"subscribe\",aP=\"unsubscribe\",oP=\"subscribe_change\",sP=\"start_publishing\",cP=\"stop_publishing\",uP=\"start_push_user_cdn\",dP=\"stop_push_user_cdn\",lP=\"start_mcu_mix\",hP=\"stop_mcu_mix\",pP=\"get_user_list\",fP=\"change_role\",mP=\"update_constraint_config\",_P={INVALID_PARAMETER:4096,INVALID_OPERATION:4097,NOT_SUPPORTED:4098,DEVICE_NOT_FOUND:4099,INITIALIZE_FAILED:4100,SIGNAL_CHANNEL_SETUP_FAILED:16385,SIGNAL_CHANNEL_ERROR:16386,ICE_TRANSPORT_ERROR:16387,JOIN_ROOM_FAILED:16388,CREATE_OFFER_FAILED:16389,SIGNAL_CHANNEL_RECONNECTION_FAILED:16390,UPLINK_RECONNECTION_FAILED:16391,DOWNLINK_RECONNECTION_FAILED:16392,REMOTE_STREAM_NOT_EXIST:16400,CLIENT_BANNED:16448,SERVER_TIMEOUT:16449,SUBSCRIPTION_TIMEOUT:16450,PLAY_NOT_ALLOWED:16451,DEVICE_AUTO_RECOVER_FAILED:16452,START_PUBLISH_CDN_FAILED:16453,STOP_PUBLISH_CDN_FAILED:16454,START_MIX_TRANSCODE_FAILED:16455,STOP_MIX_TRANSCODE_FAILED:16456,NOT_SUPPORTED_H264:16457,SWITCH_ROLE_FAILED:16458,API_CALL_TIMEOUT:16459,SCHEDULE_FAILED:16460,API_CALL_ABORTED:16461,UNKNOWN:65535},vP=function(e){d(n,e);var t=v(n);function n(e){var i,r=e.name,a=void 0===r?\"RtcError\":r,s=e.message,c=e.code,u=void 0===c?_P.UNKNOWN:c,d=e.extraCode,l=void 0===d?0:d,h=e.constraint;o(this,n);var p=\"<\".concat(function(e){for(var t in _P)if(_P[t]===e)return t;return\"UNKNOWN\"}(u),\" 0x\").concat(u.toString(16),\">\");return(i=t.call(this,s+\"\".concat(h?\" constraint: \".concat(h):\"\")+\"\".concat(null!=s&&s.includes(p)?\"\":\" \"+p))).code_=u,i.extraCode_=l,i.name=a,i.message_=s,h&&(i.constraint=h),i}return c(n,[{key:\"getCode\",value:function(){return this.code_}},{key:\"getExtraCode\",value:function(){return this.extraCode_}}]),n}(m(Error)),gP=32768,yP=32769,SP=32770,bP=32771,kP=32772,IP=32773,TP=32774,wP=32775,EP=32777,RP=32778,CP=32779,AP=32780,xP=32781,PP=32782,DP=32783,OP=32784,MP=32785,NP=32786,LP=32787,UP=32788,VP=32789,jP=32790,FP=32791,BP=32792,HP=32793,WP=32794,GP=32795,zP=32796,JP=32797,qP=32798,KP=32799,QP=32800,XP=32801,YP=32802,$P=32803,ZP=32804,eD=new Map,tD=function(e,t){var n=eD.get(e);n||(eD.set(e,[]),n=eD.get(e)),n.push(t)},nD=function(e){var t=eD.get(e),n=[];return t?(eD.delete(e),n=t.map((function(e){return{uint32_event_id:e.eventId,uint64_date:e.timestamp,str_userid:e.remoteUserId,str_event_json:e.eventDesc}}))):n=[],n},iD=Object.prototype.hasOwnProperty;function rD(e){if(null==e)return!0;if(\"boolean\"==typeof e)return!1;if(\"number\"==typeof e)return 0===e;if(\"string\"==typeof e)return 0===e.length;if(\"function\"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return\"\"===e.message;if(rC(e))switch(Object.prototype.toString.call(e)){case\"[object File]\":case\"[object Map]\":case\"[object Set]\":return 0===e.size;case\"[object Object]\":for(var t in e)if(iD.call(e,t))return!1;return!0}return!1}var aD=function(){function e(){o(this,e);var t=XR(),n=t.name,i=t.version;this.roomIdMap_=new Map,this.configs_={sdkAppId:\"\",userId:\"\",version:Dr,env:dk,browserVersion:n+i,ua:navigator.userAgent}}return c(e,[{key:\"setConfig\",value:function(e){var t=e.sdkAppId,n=e.env,i=e.userId,r=e.roomId;t!==this.configs_.sdkAppId&&(this.configs_.sdkAppId=String(t)),this.configs_.env=n,this.configs_.userId=i,this.roomIdMap_.set(i,String(r))}},{key:\"logEvent\",value:function(e){if(!qR){var n=t(t(t({},e),this.configs_),{},{userId:e.userId||this.configs_.userId});cC(n.code)&&(n.code=\"failed\"===n.result?_P.UNKNOWN:0),this.sendRequest(nC(this.configs_.sdkAppId,mk),n)}}},{key:\"logSuccessEvent\",value:function(e){qR||(this.logEvent(t(t({},e),{},{result:\"success\",roomId:this.roomIdMap_.get(e.userId)})),this.configs_.env===dk&&this.uploadEventToKibana(t(t({},e),{},{result:\"success\"})))}},{key:\"logFailedEvent\",value:function(e){if(!qR){var n=e.eventType,i=e.code,r=e.error,a=e.userId,o={roomId:this.roomIdMap_.get(a),userId:a,eventType:n,result:\"failed\",code:i||(r instanceof vP?r.getExtraCode()||r.getCode():_P.UNKNOWN)};this.logEvent(o),this.configs_.env===dk&&this.uploadEventToKibana(t(t({},o),{},{error:r}))}}},{key:\"uploadEventToKibana\",value:function(e){var t=\"stat-\".concat(e.eventType,\"-\").concat(e.result);\"delta-join\"!==e.eventType&&\"delta-leave\"!==e.eventType&&\"delta-publish\"!==e.eventType||(t=\"\".concat(e.eventType,\":\").concat(e.delta)),this.uploadEvent({log:t,userId:e.userId}),\"failed\"===e.result&&(t=\"stat-\".concat(e.eventType,\"-\").concat(e.result,\"-\").concat(e.code),this.uploadEvent({log:t,userId:e.userId,error:e.error}))}},{key:\"uploadEvent\",value:function(e){var t=e.log,n=e.userId,i=e.error,r={timestamp:zm(),sdkAppId:this.configs_.sdkAppId,userId:n||this.configs_.userId,version:this.configs_.version,log:t};i&&(r.errorInfo=i.message),this.sendRequest(nC(this.configs_.sdkAppId,fk),r)}},{key:\"sendRequest\",value:function(e,t){var n=this;MA.getIsAbleToUpload()?xC({url:e,body:JSON.stringify(t)}).catch((function(){})):setTimeout((function(){n.sendRequest(e,t)}),1e3)}}]),e}(),oD=new aD,sD=function(){function e(t){o(this,e),this.client_=t.client,this.sdkAppId_=t.sdkAppId,this.userId_=t.userId,this.userSig_=t.userSig,this.url_=t.url,this.backupUrl_=t.backupUrl;var n=\"?sdkAppId=\".concat(encodeURIComponent(this.sdkAppId_),\"&userId=\").concat(encodeURIComponent(this.userId_),\"&userSig=\").concat(encodeURIComponent(this.userSig_),\"&roomId=\").concat(encodeURIComponent(t.roomId)),i=this.client_.getSystemResult();if(i&&i.detail){var r=i.detail,a=r.isH264EncodeSupported,s=r.isVp8EncodeSupported,c=r.isH264DecodeSupported,u=r.isVp8DecodeSupported;n+=\"&enc264=\".concat(Number(a),\"&dec264=\").concat(Number(c),\"&encVp8=\").concat(Number(s),\"&decVp8=\").concat(Number(u))}t.signalDomainWhenUnifiedProxy&&(n+=\"&signalDomain=\".concat(encodeURIComponent(t.signalDomainWhenUnifiedProxy))),this.urlWithParam_=\"\".concat(this.url_).concat(n),this.backupUrlWithParam_=\"\".concat(this.backupUrl_).concat(n),this.isConnected_=!1,this.isConnecting_=!1,this.socketInUse_=null,this.socket_=null,this.backupSocket_=null,this.backupTimer_=-1,this.signalInfo_={},this.currentState_=Wx,this.reconnectionCount_=0,this.reconnectionTimer_=-1,this.lastMessageTime_=-1,this.seq_=0,this.log_=MA.createLogger({id:\"ws|\"+this.userId_,userId:this.userId_,sdkAppId:this.sdkAppId_}),this.emitter_=new DC}return c(e,[{key:\"isOnline\",get:function(){return this.currentState_===Jx&&Date.now()-this.lastMessageTime_<12e3}},{key:\"connect\",value:function(){var e=this;return new Promise((function(t,n){e.log_.info(\"connect to url: \".concat(e.urlWithParam_)),e.emitConnectionStateChanged(Gx),e.socket_=new WebSocket(e.urlWithParam_),e.bindSocket(e.socket_),e.backupTimer_=setTimeout((function(){e.isConnected_||(e.log_.info(\"trying to connect to backupUrl\"),e.tryConnectBackup())}),5e3);var i=setTimeout((function(){e.close(),n(new vP({code:_P.JOIN_ROOM_FAILED,message:\"join room timeout\"}))}),1e4);e.once(Bx,(function(){clearTimeout(i),t()})),e.once(Hx,(function(e){clearTimeout(i),n(e)}))}))}},{key:\"tryConnectBackup\",value:function(){this.backupSocket_||(this.unbindAndCloseSocket(zb),this.log_.debug(\"try to connect to url: \".concat(this.backupUrlWithParam_)),this.backupSocket_=new WebSocket(this.backupUrlWithParam_),this.bindSocket(this.backupSocket_))}},{key:\"bindSocket\",value:function(e){e.onopen=this.onopen.bind(this),e.onclose=this.onclose.bind(this),e.onerror=this.onerror.bind(this),e.onmessage=this.onmessage.bind(this)}},{key:\"unbindSocket\",value:function(e){e.onopen=function(){},e.onclose=function(){},e.onerror=function(){},e.onmessage=function(){}}},{key:\"unbindAndCloseSocket\",value:function(e){if(e===zb){if(this.socket_){this.unbindSocket(this.socket_);try{this.socket_.close(1e3)}catch(qq){}this.socket_=null}}else if(this.backupSocket_){this.unbindSocket(this.backupSocket_);try{this.backupSocket_.close(1e3)}catch(qq){}this.backupSocket_=null}}},{key:\"clearBackupTimer\",value:function(){-1!==this.backupTimer_&&(clearTimeout(this.backupTimer_),this.backupTimer_=-1)}},{key:\"clearReconnectionTimer\",value:function(){-1!==this.reconnectionTimer_&&(clearTimeout(this.reconnectionTimer_),this.reconnectionTimer_=-1)}},{key:\"onopen\",value:function(e){if(!this.isConnected_){this.isConnected_=!0,this.isConnecting_=!1,this.isReconnecting_&&rD(this.signalInfo_)&&this.stopReconnection(),this.clearBackupTimer(),e.target===this.socket_?(this.unbindAndCloseSocket(Jb),this.socketInUse_=this.socket_):(this.unbindAndCloseSocket(zb),this.socketInUse_=this.backupSocket_);var t=e.target.url;this.log_.info(\"websocket[\".concat(t,\"] is connected\")),this.currentState_===Gx?this.addSignalEvent(FP,\"signal channel is connected\"):this.currentState_===zx&&this.addSignalEvent(GP,\"signal channel reconnect success\"),this.emitConnectionStateChanged(Jx),this.emitter_.emit(Bx)}}},{key:\"onclose\",value:function(e){var t=e.target.url,n=e.target===this.socketInUse_;if(this.log_.info(\"websocket[\".concat(t,\" InUse: \").concat(n,\"] is closed with code: \").concat(e.code)),n&&(this.isConnected_=!1,this.emitConnectionStateChanged(Wx),this.addSignalEvent(jP,\"signal channel is disconnected\"),!e.wasClean||1e3!==e.code)){this.log_.warn(\"onclose code:\".concat(e.code,\" reason:\").concat(e.reason)),this.log_.warn(\"close current websocket and schedule a reconnect timeout\"),this.socketInUse_.onclose=function(){},this.socketInUse_.close(4011);var i=this.socketInUse_===this.socket_;this.socket_=this.backupSocket_=this.socketInUse_=null,this.reconnect(i?Jb:zb)}}},{key:\"onerror\",value:function(e){var t=e.target.url;if(this.log_.error(\"websocket[\".concat(t,\"] error observed\")),this.isConnected_){if(e.target===this.socketInUse_){this.isConnected_=!1,this.unbindAndCloseSocket(zb),this.unbindAndCloseSocket(Jb);var n=this.socketInUse_===this.socket_;this.socketInUse_=null,this.reconnect(n?Jb:zb)}}else this.isReconnecting_||oD.logFailedEvent({userId:this.client_.getUserId(),eventType:sI,code:_P.UNKNOWN}),e.target==this.socket_?(this.unbindAndCloseSocket(zb),this.reconnect(Jb)):(this.unbindAndCloseSocket(Jb),this.reconnect(zb));this.isConnecting_=!1,this.isConnected_=!1}},{key:\"onmessage\",value:function(e){if(this.isConnected_){this.lastMessageTime_=Date.now();var t=JSON.parse(e.data),n=t.cmd,i=t.data,r=Object.values(qx),a=Object.keys(qx)[r.indexOf(n)],o=Qx[a];switch(Kx.includes(n)||(this.log_.debug(\"received msg: \".concat(e.data)),this.log_.info(\"Received event: [ \".concat(o||\"unknown cmd: \"+n,\" ]\"))),n){case qx.CHANNEL_SETUP_RESULT:if(0===t.code)this.signalInfo_.clientIp=i.clientIp,this.signalInfo_.signalIp=i.signalInnerIp,this.signalInfo_.tinyId=t.tinyId,i.svrTime&&function(e){Wm=e-(new Date).getTime();var t=new Date;t.setTime(e),MA.info(\"baseTime from server: \"+t+\" offset: \"+Wm)}(i.svrTime),this.log_.info(\"ChannelSetup Success\"),oD.logSuccessEvent({userId:this.userId_,eventType:sI}),this.emitter_.emit(Vx,{signalInfo:this.signalInfo_});else{var s=new vP({code:_P.SIGNAL_CHANNEL_SETUP_FAILED,extraCode:t.code,message:ZR({key:DT,data:{errorCode:t.code,errorMsg:t.message}})});this.log_.error(\"\".concat(t.code,\", \").concat(t.message)),this.close(),oD.logFailedEvent({userId:this.userId_,eventType:sI,error:s}),this.emitter_.emit(jx,s)}break;case qx.JOIN_ROOM_RESULT:0===t.code&&(this.signalInfo_.relayIp=i.relayOuterIp,this.signalInfo_.relayInnerIp=i.relayInnerIp,this.signalInfo_.relayPort=i.relayPort,this.log_.info(\"signalIp:\".concat(this.signalInfo_.signalIp,\" clientIp:\").concat(this.signalInfo_.clientIp,\" relayIp: \").concat(this.signalInfo_.relayIp))),this.emitter_.emit(o,{data:t});break;case qx.CHANNEL_RECONNECT_RESULT:0===t.code?(this.log_.warn(\"reconnect success\"),this.stopReconnection(),oD.logSuccessEvent({userId:this.userId_,eventType:cI}),this.client_.syncUserList(),this.client_.checkConnectionsToReconnect()):(this.log_.warn(\"reconnect failed, \".concat(t.code,\" \").concat(t.message)),this.client_.reJoin());break;default:this.emitter_.emit(o,{data:t})}}}},{key:\"addSignalEvent\",value:function(e,t){tD(this.userId_,{eventId:e,eventDesc:t,timestamp:Gm(),userId:this.userId_,tinyId:this.signalInfo_.tinyId})}},{key:\"reconnect\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zb;if(this.isConnecting_||-1!==this.reconnectionTimer_)this.log_.info(\"signal channel is reconnecting, ignoring current reconnection\");else{if(OC.emit(YC,this.client_),this.reconnectionCount_>=Hk){this.log_.warn(\"SDK has tried reconnect signal channel for \".concat(Hk,\" times, but all failed. please check your network\"));var n=new vP({code:_P.SIGNAL_CHANNEL_RECONNECTION_FAILED,message:ZR({key:PT})});return oD.logFailedEvent({userId:this.client_.getUserId(),eventType:cI,error:n}),this.addSignalEvent(zP,\"signal channel reconnect fail\"),void this.emitter_.emit(Hx,n)}this.isConnecting_=!0,this.reconnectionCount_++,this.currentState_!==zx&&(this.emitConnectionStateChanged(zx),this.addSignalEvent(WP,\"signal channel is reconnecting\")),this.log_.warn(\"reconnecting to \".concat(t,\" signal channel [\").concat(this.reconnectionCount_,\"/\").concat(Hk,\"]\"));var i=this.getReconnectionUrl(t);t===zb?(this.socket_=new WebSocket(i),this.bindSocket(this.socket_)):(this.backupSocket_=new WebSocket(i),this.bindSocket(this.backupSocket_));var r=oC(this.reconnectionCount_);this.reconnectionTimer_=setTimeout((function(){e.log_.warn(\"reconnect \".concat(t,\" signal channel timeout(\").concat(r/1e3,\"s), close and try again\")),e.isConnecting_=!1,e.clearReconnectionTimer(),e.unbindAndCloseSocket(t),e.reconnect(t===zb?Jb:zb)}),r)}}},{key:\"isConnected\",value:function(){return this.isConnected_}},{key:\"isReconnecting_\",get:function(){return-1!==this.reconnectionTimer_}},{key:\"getReconnectionUrl\",value:function(e){var t=e===zb?this.urlWithParam_:this.backupUrlWithParam_;if(!rD(this.signalInfo_)&&-1===t.indexOf(\"&rc=1\")){var n=this.client_.getRoomId(),i=this.client_.getUseStringRoomId();t+=\"&rc=1&relayInnerIp=\".concat(this.signalInfo_.relayInnerIp,\"&relayOuterIp=\").concat(this.signalInfo_.relayIp,\"&relayPort=\").concat(this.signalInfo_.relayPort,\"&roomId=\").concat(n,\"&useStringRoomId=\").concat(i)}return t}},{key:\"send\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isConnected_){var n={cmd:e,data:t,userId:this.userId_,tinyId:this.signalInfo_.tinyId,seq:++this.seq_};return this.socketInUse_.send(JSON.stringify(n)),n.seq}}},{key:\"sendWaitForResponse\",value:function(e){var t=this,n=e.command,i=e.data,r=e.timeout,a=void 0===r?5e3:r,o=e.responseCommand,s=e.commandDesc,c=e.enableLog,u=void 0===c||c;return new Promise((function(e,r){var c=setTimeout((function(){t.off(o,d);var e=new vP({code:_P.API_CALL_TIMEOUT,message:ZR({key:xT,data:{commandDesc:s,command:n}})});u&&t.log_.warn(e),r(e)}),a),d=function n(i){i.data.seq===l&&(clearTimeout(c),t.off(o,n),e(i))};t.on(o,d);var l=t.send(n,i)}))}},{key:\"sendWaitForResponseWithRetry\",value:function(){var e=this,t=arguments.length<=0?void 0:arguments[0],n=t.commandDesc,i=t.command,r=t.retries,a=void 0===r?0:r,o=t.retryTimeout,s=void 0===o?0:o;return AA({retryFunction:this.sendWaitForResponse,onRetrying:function(t){e.log_.warn(\"\".concat(n||i,\" timeout observed, retrying [\").concat(t,\"/\").concat(a,\"]\"))},settings:{retries:a,timeout:s},context:this}).apply(void 0,arguments)}},{key:\"getCurrentState\",value:function(){return this.currentState_}},{key:\"getSignalInfo\",value:function(){return this.signalInfo_}},{key:\"stopReconnection\",value:function(){this.isReconnecting_&&(this.reconnectionCount_=0,this.clearReconnectionTimer())}},{key:\"close\",value:function(){this.log_.info(\"close SignalChannel\"),this.clearBackupTimer(),this.stopReconnection(),this.signalInfo_={},this.isConnecting_=!1,this.isConnected_=!1,this.socketInUse_=null,this.unbindAndCloseSocket(zb),this.unbindAndCloseSocket(Jb),this.emitConnectionStateChanged(Wx)}},{key:\"on\",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:\"removeListener\",value:function(e,t,n){this.emitter_.removeListener(e,t,n)}},{key:\"once\",value:function(e,t,n){this.emitter_.once(e,t,n)}},{key:\"off\",value:function(e,t,n){this.emitter_.off(e,t,n)}},{key:\"emitConnectionStateChanged\",value:function(e){e!==this.currentState_&&(this.emitter_.emit(Fx,{prevState:this.currentState_,state:e}),this.currentState_=e)}}]),e}(),cD=Tr,uD=Vd.find,dD=la,lD=\"find\",hD=!0;lD in[]&&Array(1).find((function(){hD=!1})),cD({target:\"Array\",proto:!0,forced:hD},{find:function(e){return uD(this,e,arguments.length>1?arguments[1]:void 0)}}),dD(lD);var pD={},fD={},mD={exports:{}},_D=mD.exports={v:[{name:\"version\",reg:/^(\\d*)$/}],o:[{name:\"origin\",reg:/^(\\S*) (\\d*) (\\d*) (\\S*) IP(\\d) (\\S*)/,names:[\"username\",\"sessionId\",\"sessionVersion\",\"netType\",\"ipVer\",\"address\"],format:\"%s %s %d %s IP%d %s\"}],s:[{name:\"name\"}],i:[{name:\"description\"}],u:[{name:\"uri\"}],e:[{name:\"email\"}],p:[{name:\"phone\"}],z:[{name:\"timezones\"}],r:[{name:\"repeats\"}],t:[{name:\"timing\",reg:/^(\\d*) (\\d*)/,names:[\"start\",\"stop\"],format:\"%d %d\"}],c:[{name:\"connection\",reg:/^IN IP(\\d) (\\S*)/,names:[\"version\",\"ip\"],format:\"IN IP%d %s\"}],b:[{push:\"bandwidth\",reg:/^(TIAS|AS|CT|RR|RS):(\\d*)/,names:[\"type\",\"limit\"],format:\"%s:%s\"}],m:[{reg:/^(\\w*) (\\d*) ([\\w/]*)(?: (.*))?/,names:[\"type\",\"port\",\"protocol\",\"payloads\"],format:\"%s %d %s %s\"}],a:[{push:\"rtp\",reg:/^rtpmap:(\\d*) ([\\w\\-.]*)(?:\\s*\\/(\\d*)(?:\\s*\\/(\\S*))?)?/,names:[\"payload\",\"codec\",\"rate\",\"encoding\"],format:function(e){return e.encoding?\"rtpmap:%d %s/%s/%s\":e.rate?\"rtpmap:%d %s/%s\":\"rtpmap:%d %s\"}},{push:\"fmtp\",reg:/^fmtp:(\\d*) ([\\S| ]*)/,names:[\"payload\",\"config\"],format:\"fmtp:%d %s\"},{name:\"control\",reg:/^control:(.*)/,format:\"control:%s\"},{name:\"rtcp\",reg:/^rtcp:(\\d*)(?: (\\S*) IP(\\d) (\\S*))?/,names:[\"port\",\"netType\",\"ipVer\",\"address\"],format:function(e){return null!=e.address?\"rtcp:%d %s IP%d %s\":\"rtcp:%d\"}},{push:\"rtcpFbTrrInt\",reg:/^rtcp-fb:(\\*|\\d*) trr-int (\\d*)/,names:[\"payload\",\"value\"],format:\"rtcp-fb:%s trr-int %d\"},{push:\"rtcpFb\",reg:/^rtcp-fb:(\\*|\\d*) ([\\w-_]*)(?: ([\\w-_]*))?/,names:[\"payload\",\"type\",\"subtype\"],format:function(e){return null!=e.subtype?\"rtcp-fb:%s %s %s\":\"rtcp-fb:%s %s\"}},{push:\"ext\",reg:/^extmap:(\\d+)(?:\\/(\\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\\S*)(?: (\\S*))?/,names:[\"value\",\"direction\",\"encrypt-uri\",\"uri\",\"config\"],format:function(e){return\"extmap:%d\"+(e.direction?\"/%s\":\"%v\")+(e[\"encrypt-uri\"]?\" %s\":\"%v\")+\" %s\"+(e.config?\" %s\":\"\")}},{name:\"extmapAllowMixed\",reg:/^(extmap-allow-mixed)/},{push:\"crypto\",reg:/^crypto:(\\d*) ([\\w_]*) (\\S*)(?: (\\S*))?/,names:[\"id\",\"suite\",\"config\",\"sessionConfig\"],format:function(e){return null!=e.sessionConfig?\"crypto:%d %s %s %s\":\"crypto:%d %s %s\"}},{name:\"setup\",reg:/^setup:(\\w*)/,format:\"setup:%s\"},{name:\"connectionType\",reg:/^connection:(new|existing)/,format:\"connection:%s\"},{name:\"mid\",reg:/^mid:([^\\s]*)/,format:\"mid:%s\"},{name:\"msid\",reg:/^msid:(.*)/,format:\"msid:%s\"},{name:\"ptime\",reg:/^ptime:(\\d*(?:\\.\\d*)*)/,format:\"ptime:%d\"},{name:\"maxptime\",reg:/^maxptime:(\\d*(?:\\.\\d*)*)/,format:\"maxptime:%d\"},{name:\"direction\",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:\"icelite\",reg:/^(ice-lite)/},{name:\"iceUfrag\",reg:/^ice-ufrag:(\\S*)/,format:\"ice-ufrag:%s\"},{name:\"icePwd\",reg:/^ice-pwd:(\\S*)/,format:\"ice-pwd:%s\"},{name:\"fingerprint\",reg:/^fingerprint:(\\S*) (\\S*)/,names:[\"type\",\"hash\"],format:\"fingerprint:%s %s\"},{push:\"candidates\",reg:/^candidate:(\\S*) (\\d*) (\\S*) (\\d*) (\\S*) (\\d*) typ (\\S*)(?: raddr (\\S*) rport (\\d*))?(?: tcptype (\\S*))?(?: generation (\\d*))?(?: network-id (\\d*))?(?: network-cost (\\d*))?/,names:[\"foundation\",\"component\",\"transport\",\"priority\",\"ip\",\"port\",\"type\",\"raddr\",\"rport\",\"tcptype\",\"generation\",\"network-id\",\"network-cost\"],format:function(e){var t=\"candidate:%s %d %s %d %s %d typ %s\";return t+=null!=e.raddr?\" raddr %s rport %d\":\"%v%v\",t+=null!=e.tcptype?\" tcptype %s\":\"%v\",null!=e.generation&&(t+=\" generation %d\"),t+=null!=e[\"network-id\"]?\" network-id %d\":\"%v\",t+=null!=e[\"network-cost\"]?\" network-cost %d\":\"%v\"}},{name:\"endOfCandidates\",reg:/^(end-of-candidates)/},{name:\"remoteCandidates\",reg:/^remote-candidates:(.*)/,format:\"remote-candidates:%s\"},{name:\"iceOptions\",reg:/^ice-options:(\\S*)/,format:\"ice-options:%s\"},{push:\"ssrcs\",reg:/^ssrc:(\\d*) ([\\w_-]*)(?::(.*))?/,names:[\"id\",\"attribute\",\"value\"],format:function(e){var t=\"ssrc:%d\";return null!=e.attribute&&(t+=\" %s\",null!=e.value&&(t+=\":%s\")),t}},{push:\"ssrcGroups\",reg:/^ssrc-group:([\\x21\\x23\\x24\\x25\\x26\\x27\\x2A\\x2B\\x2D\\x2E\\w]*) (.*)/,names:[\"semantics\",\"ssrcs\"],format:\"ssrc-group:%s %s\"},{name:\"msidSemantic\",reg:/^msid-semantic:\\s?(\\w*) (\\S*)/,names:[\"semantic\",\"token\"],format:\"msid-semantic: %s %s\"},{push:\"groups\",reg:/^group:(\\w*) (.*)/,names:[\"type\",\"mids\"],format:\"group:%s %s\"},{name:\"rtcpMux\",reg:/^(rtcp-mux)/},{name:\"rtcpRsize\",reg:/^(rtcp-rsize)/},{name:\"sctpmap\",reg:/^sctpmap:([\\w_/]*) (\\S*)(?: (\\S*))?/,names:[\"sctpmapNumber\",\"app\",\"maxMessageSize\"],format:function(e){return null!=e.maxMessageSize?\"sctpmap:%s %s %s\":\"sctpmap:%s %s\"}},{name:\"xGoogleFlag\",reg:/^x-google-flag:([^\\s]*)/,format:\"x-google-flag:%s\"},{push:\"rids\",reg:/^rid:([\\d\\w]+) (\\w+)(?: ([\\S| ]*))?/,names:[\"id\",\"direction\",\"params\"],format:function(e){return e.params?\"rid:%s %s %s\":\"rid:%s %s\"}},{push:\"imageattrs\",reg:new RegExp(\"^imageattr:(\\\\d+|\\\\*)[\\\\s\\\\t]+(send|recv)[\\\\s\\\\t]+(\\\\*|\\\\[\\\\S+\\\\](?:[\\\\s\\\\t]+\\\\[\\\\S+\\\\])*)(?:[\\\\s\\\\t]+(recv|send)[\\\\s\\\\t]+(\\\\*|\\\\[\\\\S+\\\\](?:[\\\\s\\\\t]+\\\\[\\\\S+\\\\])*))?\"),names:[\"pt\",\"dir1\",\"attrs1\",\"dir2\",\"attrs2\"],format:function(e){return\"imageattr:%s %s %s\"+(e.dir2?\" %s %s\":\"\")}},{name:\"simulcast\",reg:new RegExp(\"^simulcast:(send|recv) ([a-zA-Z0-9\\\\-_~;,]+)(?:\\\\s?(send|recv) ([a-zA-Z0-9\\\\-_~;,]+))?$\"),names:[\"dir1\",\"list1\",\"dir2\",\"list2\"],format:function(e){return\"simulcast:%s %s\"+(e.dir2?\" %s %s\":\"\")}},{name:\"simulcast_03\",reg:/^simulcast:[\\s\\t]+([\\S+\\s\\t]+)$/,names:[\"value\"],format:\"simulcast: %s\"},{name:\"framerate\",reg:/^framerate:(\\d+(?:$|\\.\\d+))/,format:\"framerate:%s\"},{name:\"sourceFilter\",reg:/^source-filter: *(excl|incl) (\\S*) (IP4|IP6|\\*) (\\S*) (.*)/,names:[\"filterMode\",\"netType\",\"addressTypes\",\"destAddress\",\"srcList\"],format:\"source-filter: %s %s %s %s %s\"},{name:\"bundleOnly\",reg:/^(bundle-only)/},{name:\"label\",reg:/^label:(.+)/,format:\"label:%s\"},{name:\"sctpPort\",reg:/^sctp-port:(\\d+)$/,format:\"sctp-port:%s\"},{name:\"maxMessageSize\",reg:/^max-message-size:(\\d+)$/,format:\"max-message-size:%s\"},{push:\"tsRefClocks\",reg:/^ts-refclk:([^\\s=]*)(?:=(\\S*))?/,names:[\"clksrc\",\"clksrcExt\"],format:function(e){return\"ts-refclk:%s\"+(null!=e.clksrcExt?\"=%s\":\"\")}},{name:\"mediaClk\",reg:/^mediaclk:(?:id=(\\S*))? *([^\\s=]*)(?:=(\\S*))?(?: *rate=(\\d+)\\/(\\d+))?/,names:[\"id\",\"mediaClockName\",\"mediaClockValue\",\"rateNumerator\",\"rateDenominator\"],format:function(e){var t=\"mediaclk:\";return t+=null!=e.id?\"id=%s %s\":\"%v%s\",t+=null!=e.mediaClockValue?\"=%s\":\"\",t+=null!=e.rateNumerator?\" rate=%s\":\"\",t+=null!=e.rateDenominator?\"/%s\":\"\"}},{name:\"keywords\",reg:/^keywds:(.+)$/,format:\"keywds:%s\"},{name:\"content\",reg:/^content:(.+)/,format:\"content:%s\"},{name:\"bfcpFloorCtrl\",reg:/^floorctrl:(c-only|s-only|c-s)/,format:\"floorctrl:%s\"},{name:\"bfcpConfId\",reg:/^confid:(\\d+)/,format:\"confid:%s\"},{name:\"bfcpUserId\",reg:/^userid:(\\d+)/,format:\"userid:%s\"},{name:\"bfcpFloorId\",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:[\"id\",\"mStream\"],format:\"floorid:%s mstrm:%s\"},{push:\"invalid\",names:[\"value\"]}]};Object.keys(_D).forEach((function(e){_D[e].forEach((function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format=\"%s\")}))})),function(e){var t=function(e){return String(Number(e))===e?Number(e):e},n=function(e,n,i){var r=e.name&&e.names;e.push&&!n[e.push]?n[e.push]=[]:r&&!n[e.name]&&(n[e.name]={});var a=e.push?{}:r?n[e.name]:n;!function(e,n,i,r){if(r&&!i)n[r]=t(e[1]);else for(var a=0;a<i.length;a+=1)null!=e[a+1]&&(n[i[a]]=t(e[a+1]))}(i.match(e.reg),a,e.names,e.name),e.push&&n[e.push].push(a)},i=mD.exports,r=RegExp.prototype.test.bind(/^([a-z])=(.*)/);e.parse=function(e){var t={},a=[],o=t;return e.split(/(\\r\\n|\\r|\\n)/).filter(r).forEach((function(e){var t=e[0],r=e.slice(2);\"m\"===t&&(a.push({rtp:[],fmtp:[]}),o=a[a.length-1]);for(var s=0;s<(i[t]||[]).length;s+=1){var c=i[t][s];if(c.reg.test(r))return n(c,o,r)}})),t.media=a,t};var a=function(e,n){var i=n.split(/=(.+)/,2);return 2===i.length?e[i[0]]=t(i[1]):1===i.length&&n.length>1&&(e[i[0]]=void 0),e};e.parseParams=function(e){return e.split(/;\\s?/).reduce(a,{})},e.parseFmtpConfig=e.parseParams,e.parsePayloads=function(e){return e.toString().split(\" \").map(Number)},e.parseRemoteCandidates=function(e){for(var n=[],i=e.split(\" \").map(t),r=0;r<i.length;r+=3)n.push({component:i[r],ip:i[r+1],port:i[r+2]});return n},e.parseImageAttributes=function(e){return e.split(\" \").map((function(e){return e.substring(1,e.length-1).split(\",\").reduce(a,{})}))},e.parseSimulcastStreamList=function(e){return e.split(\";\").map((function(e){return e.split(\",\").map((function(e){var n,i=!1;return\"~\"!==e[0]?n=t(e):(n=t(e.substring(1,e.length)),i=!0),{scid:n,paused:i}}))}))}}(fD);var vD=mD.exports,gD=/%[sdv%]/g,yD=function(e){var t=1,n=arguments,i=n.length;return e.replace(gD,(function(e){if(t>=i)return e;var r=n[t];switch(t+=1,e){case\"%%\":return\"%\";case\"%s\":return String(r);case\"%d\":return Number(r);case\"%v\":return\"\"}}))},SD=function(e,t,n){var i=[e+\"=\"+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var r=0;r<t.names.length;r+=1){var a=t.names[r];t.name?i.push(n[t.name][a]):i.push(n[t.names[r]])}else i.push(n[t.name]);return yD.apply(null,i)},bD=[\"v\",\"o\",\"s\",\"i\",\"u\",\"e\",\"p\",\"c\",\"b\",\"t\",\"r\",\"z\",\"a\"],kD=[\"i\",\"c\",\"b\",\"a\"],ID=fD,TD=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=\" \"),e.media.forEach((function(e){null==e.payloads&&(e.payloads=\"\")}));var n=t.outerOrder||bD,i=t.innerOrder||kD,r=[];return n.forEach((function(t){vD[t].forEach((function(n){n.name in e&&null!=e[n.name]?r.push(SD(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){r.push(SD(t,n,e))}))}))})),e.media.forEach((function(e){r.push(SD(\"m\",vD.m[0],e)),i.forEach((function(t){vD[t].forEach((function(n){n.name in e&&null!=e[n.name]?r.push(SD(t,n,e)):n.push in e&&null!=e[n.push]&&e[n.push].forEach((function(e){r.push(SD(t,n,e))}))}))}))})),r.join(\"\\r\\n\")+\"\\r\\n\"};pD.write=TD,pD.parse=ID.parse,pD.parseParams=ID.parseParams,pD.parseFmtpConfig=ID.parseFmtpConfig,pD.parsePayloads=ID.parsePayloads,pD.parseRemoteCandidates=ID.parseRemoteCandidates,pD.parseImageAttributes=ID.parseImageAttributes,pD.parseSimulcastStreamList=ID.parseSimulcastStreamList;var wD=function(e){return pD.parse(e)},ED=function(e){return pD.write(e)},RD=function(e){var t=wD(e);return t.media.forEach((function(e){e.type===Tb&&e.fmtp.forEach((function(e){e.config+=\";sprop-stereo=1;stereo=1\"}))})),ED(t)};var CD,AD,xD,PD,DD=Tr,OD=ee,MD=Ri,ND=z_,LD=rh,UD=x,VD=RangeError,jD=String,FD=Math.floor,BD=OD(LD),HD=OD(\"\".slice),WD=OD(1..toFixed),GD=function(e,t,n){return 0===t?n:t%2==1?GD(e,t-1,n*e):GD(e*e,t/2,n)},zD=function(e,t,n){for(var i=-1,r=n;++i<6;)r+=t*e[i],e[i]=r%1e7,r=FD(r/1e7)},JD=function(e,t){for(var n=6,i=0;--n>=0;)i+=e[n],e[n]=FD(i/t),i=i%t*1e7},qD=function(e){for(var t=6,n=\"\";--t>=0;)if(\"\"!==n||0===t||0!==e[t]){var i=jD(e[t]);n=\"\"===n?i:n+BD(\"0\",7-i.length)+i}return n};DD({target:\"Number\",proto:!0,forced:UD((function(){return\"0.000\"!==WD(8e-5,3)||\"1\"!==WD(.9,0)||\"1.25\"!==WD(1.255,2)||\"1000000000000000128\"!==WD(0xde0b6b3a7640080,0)}))||!UD((function(){WD({})}))},{toFixed:function(e){var t,n,i,r,a=ND(this),o=MD(e),s=[0,0,0,0,0,0],c=\"\",u=\"0\";if(o<0||o>20)throw VD(\"Incorrect fraction digits\");if(a!=a)return\"NaN\";if(a<=-1e21||a>=1e21)return jD(a);if(a<0&&(c=\"-\",a=-a),a>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(a*GD(2,69,1))-69)<0?a*GD(2,-t,1):a/GD(2,t,1),n*=4503599627370496,(t=52-t)>0){for(zD(s,0,n),i=o;i>=7;)zD(s,1e7,0),i-=7;for(zD(s,GD(10,i,1),0),i=t-1;i>=23;)JD(s,1<<23),i-=23;JD(s,1<<i),zD(s,1,1),JD(s,2),u=qD(s)}else zD(s,0,n),zD(s,1<<-t,0),u=qD(s)+BD(\"0\",o);return u=o>0?c+((r=u.length)<=o?\"0.\"+BD(\"0\",o-r)+u:HD(u,0,r-o)+\".\"+HD(u,r-o)):c+u}});var KD=(null===(CD=window)||void 0===CD?void 0:CD.requestIdleCallback)||function(e){var t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1e3)},QD=(null===(AD=window)||void 0===AD?void 0:AD.cancelIdleCallback)||function(e){clearTimeout(e)},XD=(null===(xD=window)||void 0===xD?void 0:xD.cancelAnimationFrame)||(null===(PD=window)||void 0===PD?void 0:PD.mozCancelAnimationFrame),YD=function(){function e(){o(this,e)}return c(e,null,[{key:\"generateTaskID\",value:function(){return this.currentTaskID++}},{key:\"run\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hT,n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;i=t(t({},e===lT?{delay:2e3,count:0,backgroundTask:!0}:e===uT?{delay:1e4,count:0}:e===dT?{fps:60,delay:16.6,count:0,backgroundTask:!0}:{delay:2e3,count:0,backgroundTask:!0}),i),hC(n)&&(i=t(t({},i),n)),sC(e)&&(n=e,e=hT);var r=t({taskID:this.generateTaskID(),loopCount:0,intervalID:null,timeoutID:null,rafID:null,ricID:null,taskName:e,callback:n},i);return this.taskMap.set(r.taskID,r),this[e](r),r.taskID}},{key:\"interval\",value:function(e){var t=this;return e.intervalID=setInterval((function(){e.callback(),e.loopCount+=1,t.isBreakLoop(e)}),e.delay)}},{key:\"timeout\",value:function(e){var t=this;return e.timeoutID=setTimeout((function n(){if(e.callback(),e.loopCount+=1,!t.isBreakLoop(e))return e.timeoutID=setTimeout(n,e.delay)}),e.delay)}},{key:\"ric\",value:function(e){var t,n=this,i=vC();return e.ricID=KD((function r(){if((t=vC()-i)>=e.delay&&(i=vC()-Math.floor(t%e.delay),e.callback(),e.loopCount+=1),!n.isBreakLoop(e))return e.ricID=KD(r,{timeout:e.delay})}),{timeout:e.delay})}},{key:\"raf\",value:function(e){var t=this;e.delay=(1e3/e.fps).toFixed(2);var n,i=vC(),r=function r(){if(document.hidden&&e.backgroundTask){if(n=vC()-i,i=vC(),e.callback(),e.loopCount+=1,t.isBreakLoop(e))return;return e.timeoutID=setTimeout(r,e.delay-Math.floor(n%e.delay))}if((n=vC()-i)>=e.delay&&(i=vC()-Math.floor(n%e.delay),e.callback(),e.loopCount+=1),!t.isBreakLoop(e))return e.rafID=requestAnimationFrame(r)};if(e.rafID=requestAnimationFrame(r),e.backgroundTask){var a=function(){if(document.hidden){var t=vC()-i;t>=e.delay?r():e.timeoutID=setTimeout(r,e.delay-t)}};document.addEventListener(\"visibilitychange\",a),e.onVisibilitychange=a,document.hidden&&a()}return e.taskID}},{key:\"hasTask\",value:function(e){return this.taskMap.has(e)}},{key:\"clearTask\",value:function(e){if(!this.taskMap.has(e))return!0;var t=this.taskMap.get(e),n=t.intervalID,i=t.timeoutID,r=t.rafID,a=t.ricID,o=t.onVisibilitychange;return n&&clearInterval(n),i&&clearTimeout(i),r&&XD(r),a&&QD(a),o&&document.removeEventListener(\"visibilitychange\",o),this.taskMap.delete(e),!0}},{key:\"isBreakLoop\",value:function(e){return!this.taskMap.has(e.taskID)||0!==e.count&&e.loopCount>=e.count&&(this.clearTask(e.taskID),!0)}}]),e}();u(YD,\"taskMap\",new Map),u(YD,\"currentTaskID\",1);var $D=function(){function e(){o(this,e),this.prefix_=\"TRTC\",this.queue_=new Map,this.checkStorage()}return c(e,[{key:\"getRealKey\",value:function(e){return\"\".concat(this.prefix_,\"_\").concat(e)}},{key:\"checkStorage\",value:function(){var e=this;if(KR()){var t=Object.keys(localStorage).filter((function(t){if(t.startsWith(e.prefix_)){var n=JSON.parse(localStorage.getItem(t));if(n&&n.expiresIn<Date.now())return!0}return!1}));t.forEach((function(e){return localStorage.removeItem(e)}))}}},{key:\"doFlush\",value:function(){if(KR())try{var e,t=T(this.queue_);try{for(t.s();!(e=t.n()).done;){var n=S(e.value,2),i=n[0],r=n[1];localStorage.setItem(i,JSON.stringify(r))}}catch(a){t.e(a)}finally{t.f()}}catch(qq){MA.warn(qq)}}},{key:\"getItem\",value:function(e){if(!KR())return null;try{var t=JSON.parse(localStorage.getItem(this.getRealKey(e)));return t&&t.expiresIn>=Date.now()?t.value:null}catch(qq){MA.warn(qq)}}},{key:\"setItem\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(KR())try{var i={expiresIn:Date.now()+MI,value:t};n?localStorage.setItem(this.getRealKey(e),JSON.stringify(i)):(this.queue_.set(this.getRealKey(e),i),YD.hasTask(this.intervalId_)||(this.intervalId_=YD.run(uT,this.doFlush.bind(this),{count:1})))}catch(qq){MA.warn(qq)}}},{key:\"deleteItem\",value:function(e){if(!KR())return!1;try{return e=this.getRealKey(e),this.queue_.delete(e),localStorage.removeItem(e),!0}catch(qq){return MA.warn(qq),!1}}},{key:\"clear\",value:function(){if(KR())try{localStorage.clear()}catch(qq){MA.warn(qq)}}}]),e}(),ZD=new $D,eO={result:!1,detail:{isBrowserSupported:!1,isWebRTCSupported:!1,isMediaDevicesSupported:!1,isH264EncodeSupported:!1,isVp8EncodeSupported:!1,isH264DecodeSupported:!1,isVp8DecodeSupported:!1}},tO=\"checkResult\";var nO=function(){return!SR&&!KE&&(!(XE&&YE<80)&&!(JE&&qE<56))},iO=function(){return[\"RTCPeerConnection\",\"webkitRTCPeerConnection\",\"RTCIceGatherer\"].filter((function(e){return e in window})).length>0},rO=function(){if(!navigator.mediaDevices)return!1;var e=[\"getUserMedia\",\"enumerateDevices\"];return e.filter((function(e){return e in navigator.mediaDevices})).length===e.length},aO=function(){var e=a(n().mark((function e(){var t,i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!eO.detail.isH264EncodeSupported||!eO.detail.isVp8EncodeSupported){e.next=2;break}return e.abrupt(\"return\",{isH264EncodeSupported:eO.detail.isH264EncodeSupported,isVp8EncodeSupported:eO.detail.isVp8EncodeSupported});case 2:return t=\"\",i=!1,r=!1,e.prev=5,a=new RTCPeerConnection,(o=document.createElement(Ib)).getContext(\"2d\"),s=o.captureStream(0),a.addTrack(s.getVideoTracks()[0],s),e.next=13,a.createOffer();case 13:return-1!==(t=e.sent).sdp.toLowerCase().indexOf(\"h264\")&&(i=!0),-1!==t.sdp.toLowerCase().indexOf(\"vp8\")&&(r=!0),a.close(),eO.detail.isH264EncodeSupported=i,eO.detail.isVp8EncodeSupported=r,e.abrupt(\"return\",{isH264EncodeSupported:eO.detail.isH264EncodeSupported,isVp8EncodeSupported:eO.detail.isVp8EncodeSupported});case 22:return e.prev=22,e.t0=e.catch(5),e.abrupt(\"return\",{isH264EncodeSupported:!1,isVp8EncodeSupported:!1});case 25:case\"end\":return e.stop()}}),e,null,[[5,22]])})));return function(){return e.apply(this,arguments)}}();function oO(){return sO.apply(this,arguments)}function sO(){return sO=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt(\"return\",new Promise(function(){var e=a(n().mark((function e(t){var i,r,o,s,c,u,d,l,h,p,f,m,_,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={encode:!1,decode:!1},r=null,e.prev=2,o=document.createElement(\"canvas\"),s=o.getContext(\"2d\"),o.width=640,o.height=480,c=setInterval((function(){s.fillText(\"test\",Math.floor(640*Math.random()),Math.floor(480*Math.random()))}),33),u=-1,d=-1,r=function(){clearInterval(u),clearInterval(c),clearTimeout(d),h.close(),p.close(),l.getTracks().forEach((function(e){return e.stop()}))},d=setTimeout((function(){r(),t(i)}),3e3),l=o.captureStream(),h=new RTCPeerConnection({}),p=new RTCPeerConnection({offerToReceiveAudio:!0,offerToReceiveVideo:!0}),h.addEventListener(\"icecandidate\",(function(e){return p.addIceCandidate(e.candidate)})),p.addEventListener(\"icecandidate\",(function(e){return h.addIceCandidate(e.candidate)})),h.addTrack(l.getVideoTracks()[0],l),e.next=20,h.createOffer();case 20:return f=e.sent,e.next=23,h.setLocalDescription(f);case 23:return e.next=25,p.setRemoteDescription(f);case 25:return e.next=27,p.createAnswer();case 27:return m=e.sent,_=wD(m.sdp),v=_.media[0].rtp.findIndex((function(e){return\"H264\"===e.codec})),_.media[0].rtp=[_.media[0].rtp[v]],_.media[0].fmtp=_.media[0].fmtp.filter((function(e){return e.payload===_.media[0].rtp[0].payload})),_.media[0].rtcpFb=_.media[0].rtcpFb.filter((function(e){return e.payload===_.media[0].rtp[0].payload})),m.sdp=ED(_),e.next=36,p.setLocalDescription(m);case 36:return e.next=38,h.setRemoteDescription(m);case 38:u=setInterval(a(n().mark((function e(){var a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.encode&&i.decode&&(r(),t(i)),e.next=3,h.getStats();case 3:return a=e.sent,e.next=6,p.getStats();case 6:o=e.sent,i.encode||a.forEach((function(e){\"outbound-rtp\"===e.type&&e.mediaType===wb&&e.framesEncoded>0&&(i.encode=!0)})),i.decode||o.forEach((function(e){\"inbound-rtp\"===e.type&&e.mediaType===wb&&e.framesDecoded>0&&(i.decode=!0)}));case 9:case\"end\":return e.stop()}}),e)}))),500),e.next=46;break;case 41:e.prev=41,e.t0=e.catch(2),r(),MA.warn(e.t0),t(i);case 46:case\"end\":return e.stop()}}),e,null,[[2,41]])})));return function(t){return e.apply(this,arguments)}}()));case 1:case\"end\":return e.stop()}}),e)}))),sO.apply(this,arguments)}var cO=function(){var e=a(n().mark((function e(){var t,i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!eO.detail.isH264DecodeSupported||!eO.detail.isVp8DecodeSupported){e.next=2;break}return e.abrupt(\"return\",{isH264DecodeSupported:eO.detail.isH264DecodeSupported,isVp8DecodeSupported:eO.detail.isVp8DecodeSupported});case 2:return t=\"\",i=!1,r=!1,e.prev=5,a=new RTCPeerConnection,e.next=9,a.createOffer({offerToReceiveAudio:1,offerToReceiveVideo:1});case 9:return-1!==(t=e.sent).sdp.toLowerCase().indexOf(\"h264\")&&(i=!0),-1!==t.sdp.toLowerCase().indexOf(\"vp8\")&&(r=!0),a.close(),e.abrupt(\"return\",{isH264DecodeSupported:i,isVp8DecodeSupported:r});case 16:return e.prev=16,e.t0=e.catch(5),e.abrupt(\"return\",{isH264DecodeSupported:!1,isVp8DecodeSupported:!1});case 19:case\"end\":return e.stop()}}),e,null,[[5,16]])})));return function(){return e.apply(this,arguments)}}(),uO=function(){var e=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h,p,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(lO()){e.next=2;break}return e.abrupt(\"return\",eO);case 2:return t=nO(),i=iO(),r=rO(),e.next=7,aO();case 7:return a=e.sent,o=a.isH264EncodeSupported,s=a.isVp8EncodeSupported,e.next=12,cO();case 12:if(c=e.sent,u=c.isH264DecodeSupported,d=c.isVp8DecodeSupported,o&&s){e.next=21;break}return e.next=18,aO();case 18:l=e.sent,o=l.isH264EncodeSupported,s=l.isVp8EncodeSupported;case 21:if(!(o&&u&&(xR||DR||BR)&&!nR&&MR()<79)){e.next=29;break}return e.next=24,oO();case 24:h=e.sent,p=h.encode,f=h.decode,o=p,u=f;case 29:return eO.result=t&&i&&r&&(o||s)&&(u||d),eO.detail.isBrowserSupported=t,eO.detail.isWebRTCSupported=i,eO.detail.isMediaDevicesSupported=r,eO.detail.isH264EncodeSupported=o,eO.detail.isVp8EncodeSupported=s,eO.detail.isH264DecodeSupported=u,eO.detail.isVp8DecodeSupported=d,hO(),ZD.setItem(tO,{ua:navigator.userAgent,checkResult:eO},!0),e.abrupt(\"return\",eO);case 40:case\"end\":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),dO=function(e,t){var n=null;return function(){if(n)return n;for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return(n=e.apply(t||this,r)).then((function(e){return n=null,e})).catch((function(e){throw n=null,e})),n}}(uO);function lO(){return Object.keys(eO.detail).findIndex((function(e){return!eO.detail[e]}))>=0}function hO(){lO()&&(MA.warn(ZR({key:iE})),MA.info(\"\".concat(navigator.userAgent,\" \").concat(JSON.stringify(eO.detail))))}function pO(){return!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia)}function fO(){return\"RTCPeerConnection\"in window&&\"getReceivers\"in window.RTCPeerConnection.prototype}function mO(){return\"RTCPeerConnection\"in window&&\"getSenders\"in window.RTCPeerConnection.prototype}function _O(){return\"RTCPeerConnection\"in window&&\"getTransceivers\"in window.RTCPeerConnection.prototype}function vO(){return\"RTCPeerConnection\"in window&&\"addTransceiver\"in window.RTCPeerConnection.prototype}function gO(){return\"RTCRtpSender\"in window&&\"replaceTrack\"in window.RTCRtpSender.prototype}function yO(){return\"RTCRtpSender\"in window&&\"setParameters\"in window.RTCRtpSender.prototype&&mO()}function SO(){return!!cC(navigator.mediaDevices)&&(MA.error(CE.NOT_SUPPORTED_MEDIA),!0)}function bO(){return\"http:\"===location.protocol&&!qR&&(MA.warn(ZR({key:nE})),!0)}var kO=\"RTCRtpSender\"in window&&\"createEncodedStreams\"in window.RTCRtpSender.prototype&&MR()>=86;function IO(e){return!(\"candidate-pair\"!==e.type||!e.nominated||\"in-progress\"!==e.state&&\"succeeded\"!==e.state)&&!(lC(e.selected)&&!e.selected)}var TO=new Map([[zE,\"Android\"],[GE,\"iOS\"],[vR,\"Windows\"],[gR,\"MacOS\"],[yR,\"Linux\"]]);function wO(){var e=\"unknown\";return TO.get(!0)&&(e=TO.get(!0)),e}function EO(){var e=\"\";screen.width&&(e+=(screen.width?screen.width*window.devicePixelRatio:\"\")+\" * \"+(screen.height?screen.height*window.devicePixelRatio:\"\"));return e}function RO(){var e=!1;return(navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)&&(e=!0),e}function CO(){for(var e={isSupported:!1},t=[\"AudioContext\",\"webkitAudioContext\",\"mozAudioContext\",\"msAudioContext\"],n=0;n<t.length;n++)if(t[n]in window){e.isSupported=!0;break}return e.isSupported}function AO(){return!(oR&&MR()<86)&&(!(GE&&dC(HR)&&HR<15)&&(!(UR&&UR<63)&&!(!nO()||!(\"captureStream\"in HTMLCanvasElement.prototype))))}var xO=window.MediaStreamTrack&&\"getSettings\"in MediaStreamTrack.prototype,PO=window.MediaStreamTrack&&\"getCapabilities\"in MediaStreamTrack.prototype;var DO=function(){var e,t,n;return(null===(e=window)||void 0===e?void 0:e.OffscreenCanvas)&&(null===(t=window)||void 0===t?void 0:t.MediaStreamTrackProcessor)&&(null===(n=window)||void 0===n?void 0:n.MediaStreamTrackGenerator)};!function(){bO();var e=ZD.getItem(tO);e&&e.ua===navigator.userAgent&&(eO=e.checkResult),dO()}();var OO={STREAM_ADDED:\"stream-added\",STREAM_REMOVED:\"stream-removed\",STREAM_UPDATED:\"stream-updated\",STREAM_PUBLISHED:\"stream-published\",STREAM_SUBSCRIBED:\"stream-subscribed\",STREAM_UNSUBSCRIBED:\"stream-unsubscribed\",STATE_CHANGED:\"state-changed\",ERROR:\"error\",CONNECTION_STATE_CHANGED:\"connection-state-changed\",SEI_MESSAGE:Yb},MO={STREAM_ADDED:\"stream-added\",STREAM_REMOVED:\"stream-removed\",STREAM_UPDATED:\"stream-updated\",STREAM_SUBSCRIBED:\"stream-subscribed\",CONNECTION_STATE_CHANGED:\"connection-state-changed\",PEER_JOIN:\"peer-join\",PEER_LEAVE:\"peer-leave\",MUTE_AUDIO:\"mute-audio\",MUTE_VIDEO:\"mute-video\",UNMUTE_AUDIO:\"unmute-audio\",UNMUTE_VIDEO:\"unmute-video\",CLIENT_BANNED:\"client-banned\",NETWORK_QUALITY:\"network-quality\",AUDIO_VOLUME:\"audio-volume\",SEI_MESSAGE:Yb,ERROR:\"error\"},NO=\"player-state-changed\",LO=\"screen-sharing-stopped\",UO=\"connection-state-changed\",VO=\"device-auto-recovered\",jO=\"error\",FO=\"player-state-changed\",BO=ST;Tr({target:\"String\",proto:!0,forced:kT(\"small\")},{small:function(){return BO(this,\"small\",\"\",\"\")}});var HO=function(){function e(t){o(this,e);var n=t.getUserId();this.log_=MA.createLogger({id:n,userId:n,sdkAppId:t.getSDKAppId()}),this.prevReportTime_=0,this.prevReport_={},this.prevEncoderImplementation_=\"\",this.prevQualityLimitationReason_=\"\",this.prevDecoderImplementationMap_=new Map}var t,i,r,s;return c(e,[{key:\"statInterval\",get:function(){return 0===this.prevReportTime_?2:(Date.now()-this.prevReportTime_)/1e3}},{key:\"getSenderStats\",value:(s=a(n().mark((function e(t){var i,r,a,o,s=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={audio:{bytesSent:0,packetsSent:0,audioLevel:0,totalAudioEnergy:0},video:{bytesSent:0,packetsSent:0,framesEncoded:0,frameWidth:0,frameHeight:0,framesSent:0,fpsCapture:0},small:{bytesSent:0,packetsSent:0,framesEncoded:0,frameWidth:0,frameHeight:0,framesSent:0,fpsCapture:0},auxiliary:{bytesSent:0,packetsSent:0,framesEncoded:0,frameWidth:0,frameHeight:0,framesSent:0,fpsCapture:0},rtt:0},r=t.getPeerConnection(),a=t.getSSRC(),!r){e.next=15;break}return e.prev=4,e.next=7,r.getStats();case 7:e.sent.forEach((function(e){if(\"outbound-rtp\"===e.type)if(e.mediaType===wb){if(!JE&&0===e.bytesSent)return;e.ssrc!==a.video||cC(e.encoderImplementation)||s.prevEncoderImplementation_===e.encoderImplementation||(s.log_.info(\"encoderImplementation change to \".concat(e.encoderImplementation)),s.prevEncoderImplementation_=e.encoderImplementation),e.ssrc!==a.video||cC(e.qualityLimitationReason)||s.prevQualityLimitationReason_===e.qualityLimitationReason||(s.log_.info(\"qualityLimitationReason change to \".concat(e.qualityLimitationReason)),s.prevQualityLimitationReason_=e.qualityLimitationReason);var n=wb;e.ssrc===a.small?n=Rb:e.ssrc===a.auxiliary&&(n=Ab),i[n].bytesSent=e.bytesSent,i[n].packetsSent=e.packetsSent,i[n].framesEncoded=e.framesEncoded}else e.mediaType===Tb&&(i.audio.bytesSent=e.bytesSent,i.audio.packetsSent=e.packetsSent);else\"candidate-pair\"===e.type?IO(e)&&dC(e.currentRoundTripTime)&&(i.rtt=Math.floor(1e3*e.currentRoundTripTime)):\"media-source\"===e.type&&(e.kind===Tb?(i.audio.audioLevel=e.audioLevel||0,i.audio.totalAudioEnergy=e.totalAudioEnergy||0):e.kind===wb&&(e.trackIdentifier===t.getVideoTrackId(wb)?i.video.fpsCapture=e.framesPerSecond:e.trackIdentifier===t.getVideoTrackId(Ab)?i.auxiliary.fpsCapture=e.framesPerSecond:i.small.fpsCapture=e.framesPerSecond));var r;cC(e.audioLevel)||(i.audio.audioLevel=e.audioLevel||0,i.audio.totalAudioEnergy=e.totalAudioEnergy||0),cC(e.frameWidth)||(e.trackIdentifier===t.getVideoTrackId(wb)||e.ssrc===a.video?r=wb:e.trackIdentifier===t.getVideoTrackId(Ab)||e.ssrc===a.auxiliary?r=Ab:e.trackIdentifier!==t.getVideoTrackId(Rb)&&e.ssrc!==a.small||(r=Rb),r&&(i[r].frameWidth=e.frameWidth,i[r].frameHeight=e.frameHeight,i[r].framesSent=e.framesSent))})),0===i.audio.audioLevel&&(i.audio.audioLevel=(null===(o=t.getLocalStream())||void 0===o?void 0:o.getInternalAudioLevel())||0),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(4),this.log_.warn(\"failed to getStats on sender connection \"+e.t0);case 15:return e.abrupt(\"return\",i);case 16:case\"end\":return e.stop()}}),e,this,[[4,12]])}))),function(e){return s.apply(this,arguments)})},{key:\"getReceiverStats\",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={tinyId:t.getTinyId(),userId:t.getUserId(),rtt:0,hasAudio:!1,hasVideo:!1,hasAuxiliary:!1,audio:{bytesReceived:0,packetsReceived:0,packetsLost:0,jitter:0,audioLevel:0,totalAudioEnergy:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesReceived:0,framesDecoded:0,frameWidth:0,frameHeight:0},auxiliary:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesReceived:0,framesDecoded:0,frameWidth:0,frameHeight:0}},!(r=t.getPeerConnection())){e.next=16;break}return e.prev=3,a=t.getSSRC(),o=t.getTrackState(),e.next=8,r.getStats();case 8:e.sent.forEach((function(e){if(\"inbound-rtp\"===e.type){if(e.mediaType===Tb&&e.ssrc===a.audio&&o.audio)i.audio.packetsReceived=e.packetsReceived,i.audio.bytesReceived=e.bytesReceived,i.audio.packetsLost=e.packetsLost,i.audio.jitter=e.jitter,i.hasAudio=!0;else if(e.mediaType===wb){if(JE&&0===e.bytesReceived)return;e.ssrc===a.video&&o.video&&(i.video.packetsReceived=e.packetsReceived,i.video.bytesReceived=e.bytesReceived,i.video.packetsLost=e.packetsLost,i.video.framesReceived=e.framesReceived,i.video.framesDecoded=e.framesDecoded,i.video.fpsDecoded=e.framesPerSecond,i.hasVideo=!0,!e.decoderImplementation||c.prevDecoderImplementationMap_.has(i.userId)&&c.prevDecoderImplementationMap_.get(i.userId)===e.decoderImplementation||(c.log_.info(\"\".concat(i.userId,\" decoderImplementation change to \").concat(e.decoderImplementation)),c.prevDecoderImplementationMap_.set(i.userId,e.decoderImplementation))),e.ssrc===a.auxiliary&&o.auxiliary&&(i.auxiliary.packetsReceived=e.packetsReceived,i.auxiliary.bytesReceived=e.bytesReceived,i.auxiliary.packetsLost=e.packetsLost,i.auxiliary.framesReceived=e.framesReceived,i.auxiliary.framesDecoded=e.framesDecoded,i.auxiliary.fpsDecoded=e.framesPerSecond,i.hasAuxiliary=!0)}}else\"candidate-pair\"===e.type&&IO(e)&&dC(e.currentRoundTripTime)&&(i.rtt=Math.floor(1e3*e.currentRoundTripTime));cC(e.frameWidth)||(e.trackIdentifier!==t.getMainStreamVideoTrackId()&&e.ssrc!==a.video||(i.video.frameWidth=e.frameWidth,i.video.frameHeight=e.frameHeight),e.trackIdentifier!==t.getAuxStreamVideoTrackId()&&e.ssrc!==a.auxiliary||(i.auxiliary.frameWidth=e.frameWidth,i.auxiliary.frameHeight=e.frameHeight)),cC(e.audioLevel)||(i.audio.audioLevel=e.audioLevel||0,i.audio.totalAudioEnergy=e.totalAudioEnergy||0)})),0===i.audio.audioLevel&&(i.audio.audioLevel=(null===(s=t.getMainStream())||void 0===s?void 0:s.getInternalAudioLevel())||0),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),this.log_.warn(\"failed to getStats on receiver connection \"+e.t0);case 16:return e.abrupt(\"return\",i);case 17:case\"end\":return e.stop()}}),e,this,[[3,13]])}))),function(e){return r.apply(this,arguments)})},{key:\"getStats\",value:(i=a(n().mark((function e(t,i){var r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={},!t){e.next=5;break}return e.next=4,this.getSenderStats(t);case 4:r=e.sent;case 5:a=[],o=T(i),e.prev=7,o.s();case 9:if((s=o.n()).done){e.next=17;break}return(c=S(s.value,2))[0],u=c[1],e.next=13,this.getReceiverStats(u);case 13:d=e.sent,a.push(d);case 15:e.next=9;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(7),o.e(e.t0);case 22:return e.prev=22,o.f(),e.finish(22);case 25:return e.abrupt(\"return\",{senderStats:r,receiverStats:a});case 26:case\"end\":return e.stop()}}),e,this,[[7,19,22,25]])}))),function(e,t){return i.apply(this,arguments)})},{key:\"getDifferenceValue\",value:function(e,t){if(rD(e))return t;var n=t-e;return n<0?0:n}},{key:\"prepareReport\",value:function(e){var t=this,n=e.stats,i=e.report,r=e.freezeMap;if(!rD(n.senderStats)){var a;a={uint32_audio_level:1e8*n.senderStats.audio.audioLevel,uint32_audio_energy:1e6*n.senderStats.audio.totalAudioEnergy,uint32_audio_codec_bitrate:n.senderStats.audio.bytesSent,audioLevel:n.senderStats.audio.audioLevel};var o=[],s={uint32_video_stream_type:2,uint32_video_codec_fps:n.senderStats.video.framesSent,uint32_video_capture_fps:n.senderStats.video.fpsCapture,uint32_video_width:n.senderStats.video.frameWidth,uint32_video_height:n.senderStats.video.frameHeight,uint32_video_codec_bitrate:n.senderStats.video.bytesSent,uint32_video_enc_fps:n.senderStats.video.framesEncoded};if(o.push(s),n.senderStats.small.bytesSent){var c={uint32_video_stream_type:3,uint32_video_codec_fps:n.senderStats.small.framesSent||0,uint32_video_capture_fps:n.senderStats.small.fpsCapture||0,uint32_video_width:n.senderStats.small.frameWidth||0,uint32_video_height:n.senderStats.small.frameHeight||0,uint32_video_codec_bitrate:n.senderStats.small.bytesSent,uint32_video_enc_fps:n.senderStats.small.framesEncoded||0};o.push(c)}if(n.senderStats.auxiliary.bytesSent){var u={uint32_video_stream_type:7,uint32_video_codec_fps:n.senderStats.auxiliary.framesSent||0,uint32_video_capture_fps:n.senderStats.auxiliary.fpsCapture||0,uint32_video_width:n.senderStats.auxiliary.frameWidth||0,uint32_video_height:n.senderStats.auxiliary.frameHeight||0,uint32_video_codec_bitrate:n.senderStats.auxiliary.bytesSent,uint32_video_enc_fps:n.senderStats.auxiliary.framesEncoded||0};o.push(u)}var d={uint32_bitrate:0,uint32_rtt:n.senderStats.rtt};i.msg_up_stream_info={msg_audio_status:a,msg_video_status:o,msg_network_status:d}}var l=this.statInterval;i.msg_down_stream_info=[],n.receiverStats.forEach((function(e){var t={};if(t.msg_user_info={str_identifier:e.userId,uint64_tinyid:e.tinyId},t.msg_network_status={uint32_rtt:e.rtt},t.msg_video_status={},e.hasAudio){var n={uint32_audio_codec_bitrate:e.audio.bytesReceived,uint32_audio_total_bitrate:e.audio.bytesReceived,uint32_audio_level:1e8*e.audio.audioLevel,uint32_audio_energy:1e6*e.audio.totalAudioEnergy,uint32_audio_receive:e.audio.packetsReceived,uint32_audio_origin_lost:e.audio.packetsLost,audioLevel:e.audio.audioLevel};t.msg_audio_status=n}if(t.msg_video_status=[],e.hasVideo){var a=r.get(e.userId+\"_\"+Ck),o=a?a.duration:0,s={uint32_video_stream_type:2,uint32_video_receive_fps:e.video.framesReceived,uint32_video_width:e.video.frameWidth,uint32_video_height:e.video.frameHeight,uint32_video_codec_bitrate:e.video.bytesReceived,uint32_video_receive:e.video.packetsReceived,uint32_video_origin_lost:e.video.packetsLost,uint32_video_block_time:o,uint32_video_dec_fps:e.video.framesDecoded};t.msg_video_status.push(s)}if(e.hasAuxiliary){var c=r.get(e.userId+\"_\"+Ak),u=c?c.duration:0,d={uint32_video_stream_type:7,uint32_video_receive_fps:e.auxiliary.framesReceived,uint32_video_width:e.auxiliary.frameWidth,uint32_video_height:e.auxiliary.frameHeight,uint32_video_codec_bitrate:e.auxiliary.bytesReceived,uint32_video_receive:e.auxiliary.packetsReceived+e.auxiliary.packetsLost,uint32_video_origin_lost:e.auxiliary.packetsLost,uint32_video_block_time:u,uint32_video_dec_fps:e.auxiliary.framesDecoded};t.msg_video_status.push(d)}i.msg_down_stream_info.push(t)}));var h=this.prevReport_;if(this.prevReport_=JSON.parse(JSON.stringify(i)),i.msg_up_stream_info.msg_audio_status&&h.msg_up_stream_info.msg_audio_status){var p=h.msg_up_stream_info.msg_audio_status,f=i.msg_up_stream_info.msg_audio_status,m=this.getDifferenceValue(p.uint32_audio_codec_bitrate,f.uint32_audio_codec_bitrate);f.uint32_audio_codec_bitrate=Math.round(8*m/l),i.msg_up_stream_info.msg_network_status.uint32_bitrate+=f.uint32_audio_codec_bitrate}var _=h.msg_up_stream_info.msg_video_status;i.msg_up_stream_info.msg_video_status.forEach((function(e){var n=_.find((function(t){return t.uint32_video_stream_type===e.uint32_video_stream_type}));if(!n||0===n.uint32_video_codec_bitrate)return e.uint32_video_codec_bitrate=0,e.uint32_video_enc_fps=0,void(e.uint32_video_codec_fps=0);var r=n.uint32_video_codec_bitrate,a=n.uint32_video_enc_fps,o=n.uint32_video_codec_fps,s=t.getDifferenceValue(r,e.uint32_video_codec_bitrate);e.uint32_video_codec_bitrate=Math.round(8*s/l),i.msg_up_stream_info.msg_network_status.uint32_bitrate+=e.uint32_video_codec_bitrate,e.uint32_video_enc_fps=Math.round(t.getDifferenceValue(a,e.uint32_video_enc_fps)/l),e.uint32_video_codec_fps=Math.round(t.getDifferenceValue(o,e.uint32_video_codec_fps)/l)}));var v=i.msg_down_stream_info,g=h.msg_down_stream_info;return v.forEach((function(e){var n=g.find((function(t){return t.msg_user_info.uint64_tinyid===e.msg_user_info.uint64_tinyid}));if(n){if(e.msg_audio_status&&n.msg_audio_status){var i=e.msg_audio_status,r=n.msg_audio_status;i.uint32_audio_origin_lost=t.getDifferenceValue(r.uint32_audio_origin_lost,i.uint32_audio_origin_lost),i.uint32_audio_receive=t.getDifferenceValue(r.uint32_audio_receive,i.uint32_audio_receive),i.uint32_audio_receive+=i.uint32_audio_origin_lost;var a=t.getDifferenceValue(r.uint32_audio_codec_bitrate,i.uint32_audio_codec_bitrate);i.uint32_audio_codec_bitrate=Math.round(8*a/l),i.uint32_audio_total_bitrate=Math.round(8*a/l)}if(e.msg_video_status&&n.msg_video_status){var o=e.msg_video_status,s=n.msg_video_status;o.forEach((function(e){var n=s.find((function(t){return t.uint32_video_stream_type===e.uint32_video_stream_type}));if(!n)return e.uint32_video_receive=0,e.uint32_video_origin_lost=0,e.uint32_video_codec_bitrate=0,e.uint32_video_receive_fps=0,void(e.uint32_video_dec_fps=0);var i=n.uint32_video_receive,r=n.uint32_video_origin_lost,a=n.uint32_video_codec_bitrate,o=n.uint32_video_receive_fps,c=n.uint32_video_dec_fps;e.uint32_video_origin_lost=t.getDifferenceValue(r,e.uint32_video_origin_lost),e.uint32_video_receive=t.getDifferenceValue(i,e.uint32_video_receive)+e.uint32_video_origin_lost;var u=t.getDifferenceValue(a,e.uint32_video_codec_bitrate);e.uint32_video_codec_bitrate=Math.round(8*u/l);var d=t.getDifferenceValue(o,e.uint32_video_receive_fps);e.uint32_video_receive_fps=Math.round(d/l),e.uint32_video_dec_fps=Math.round(t.getDifferenceValue(c,e.uint32_video_dec_fps)/l)}))}}})),i}},{key:\"getStatsReport\",value:(t=a(n().mark((function e(t){var i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.uplinkConnection,r=t.downlinkConnections,a=t.freezeMap,o={msg_up_stream_info:{msg_audio_status:{uint32_audio_format:0,uint32_audio_sample_rate:0,uint32_audio_codec_bitrate:0,uint32_audio_receive:0,uint32_audio_origin_lost:0,uint32_audio_level:0,uint32_audio_energy:0,audioLevel:0},msg_video_status:[{uint32_video_stream_type:0,uint32_video_codec_fps:0,uint32_video_capture_fps:0,uint32_video_width:0,uint32_video_height:0,uint32_video_codec_bitrate:0,uint32_video_receive:0,uint32_video_origin_lost:0,uint32_video_final_lost:0,uint32_video_enc_fps:0}],msg_network_status:{uint32_bitrate:0,uint32_rtt:0,uint32_lost:0}},msg_down_stream_info:[{msg_user_info:{str_identifier:\"\",uint64_tinyid:\"\"},msg_audio_status:{uint32_audio_format:0,uint32_audio_sample_rate:0,uint32_audio_codec_bitrate:0,uint32_audio_total_bitrate:0,uint32_audio_level:0,uint32_audio_energy:0,uint32_audio_receive:0,uint32_audio_origin_lost:0,uint32_audio_final_lost:0,audioLevel:0},msg_video_status:[{uint32_video_stream_type:0,uint32_video_receive_fps:0,uint32_video_width:0,uint32_video_height:0,uint32_video_codec_bitrate:0,uint32_video_receive:0,uint32_video_origin_lost:0,uint32_video_block_time:0,uint32_video_dec_fps:0}],msg_network_status:{uint32_bitrate:0,uint32_rtt:0,uint32_lost:0,uint32_jitter:0}}]},e.next=4,this.getStats(i,r);case 4:return s=e.sent,\"{}\"===JSON.stringify(this.prevReport_)&&(this.prevReport_=JSON.parse(JSON.stringify(o))),this.prepareReport({stats:s,report:o,freezeMap:a,uplinkConnection:i,downlinkConnections:r}),this.prevReportTime_=Date.now(),e.abrupt(\"return\",o);case 9:case\"end\":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:\"reset\",value:function(){this.prevReportTime_=0,this.prevReport_={},this.prevEncoderImplementation_=\"\",this.prevQualityLimitationReason_=\"\",this.prevDecoderImplementationMap_=new Map}}]),e}(),WO=function(){function e(t){var n=t.signalChannel,i=t.connections,r=t.client;o(this,e),this.client_=r,this.signalChannel_=n,this.connections_=i,this.client_=r,this.log_=MA.createLogger({id:\"q|\"+this.client_.getUserId(),userId:this.client_.getUserId(),sdkAppId:this.client_.getSDKAppId()}),this.uplinkConnection_=null,this.uplinkNetworkQuality_=0,this.uplinkRTT_=0,this.uplinkLoss_=0,this.downlinkNetworkQuality_=0,this.downlinkRTT_=0,this.downlinkLoss_=0,this.downlinkPrevStatMap_=new Map,this.downlinkLossAndRTTMap_=new Map,this.interval_=-1,this.emitter_=new DC,this.initialize()}var t,i;return c(e,[{key:\"uplinkNetworkQuality\",get:function(){return this.uplinkNetworkQuality_},set:function(e){e!==this.uplinkNetworkQuality_&&this.log_.info(\"uplink network quality change \".concat(this.uplinkNetworkQuality,\" -> \").concat(e,\", rtt: \").concat(this.uplinkRTT_,\", loss: \").concat(this.uplinkLoss_)),this.uplinkNetworkQuality_=e}},{key:\"downlinkNetworkQuality\",get:function(){return this.downlinkNetworkQuality_},set:function(e){if(e!==this.downlinkNetworkQuality_){var t=this.getAverageLossAndRTT(b(this.downlinkLossAndRTTMap_.values())),n=t.rtt,i=t.loss;this.log_.info(\"downlink network quality change \".concat(this.downlinkNetworkQuality,\" -> \").concat(e,\", rtt: \").concat(n,\", loss: \").concat(i))}this.downlinkNetworkQuality_=e}},{key:\"initialize\",value:function(){var e=this;this.signalChannel_.on(Qx.UPLINK_NETWORK_STATS,(function(t){e.handleUplinkNetworkQuality(t)})),this.signalChannel_.on(Fx,this.handleSignalConnectionStateChange.bind(this)),this.start()}},{key:\"handleUplinkNetworkQuality\",value:function(e){if(!this.uplinkConnection_)return this.uplinkNetworkQuality=0,this.uplinkLoss_=0,void(this.uplinkRTT_=0);var t=this.uplinkConnection_.getPeerConnection();if(t&&this.isPeerConnectionDisconnected(t))return this.uplinkNetworkQuality=6,this.uplinkLoss_=0,void(this.uplinkRTT_=0);if(0===e.data.code){var n=e.data.data,i=n.expectAudPkg+n.expectVidPkg,r=n.recvAudPkg+n.recvVidPkg,a=i-r,o=n.delay;if(o&&this.updateDelay(o),0===i&&0===r)return;this.uplinkLoss_=a<=0?0:Math.round(a/i*100),this.uplinkRTT_=n.rtt,this.uplinkNetworkQuality=this.getNetworkQuality(this.uplinkLoss_,this.uplinkRTT_)}}},{key:\"handleDownlinkNetworkQuality\",value:(i=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h,p,f,m,_,v=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connections_&&0!==this.connections_.size){e.next=3;break}return this.downlinkNetworkQuality=0,e.abrupt(\"return\");case 3:if(t=b(this.connections_.values()),i=t.filter((function(e){return e.getPeerConnection()&&e.getPeerConnection().connectionState===Fk})),t.filter((function(e){return e.getPeerConnection()&&v.isPeerConnectionDisconnected(e.getPeerConnection())})).length!==t.length){e.next=9;break}return this.downlinkNetworkQuality=6,e.abrupt(\"return\");case 9:r=0;case 10:if(!(r<i.length)){e.next=31;break}return a=i[r].getPeerConnection(),e.next=14,this.getStat(a);case 14:if(o=e.sent,s=o.rtt,c=o.totalPacketsLost,u=o.totalPacketsReceived,this.downlinkPrevStatMap_.has(a)){e.next=21;break}return this.downlinkPrevStatMap_.set(a,{totalPacketsLost:c,totalPacketsReceived:u}),e.abrupt(\"continue\",28);case 21:d=0,l=this.downlinkPrevStatMap_.get(a),h=c-l.totalPacketsLost,p=u-l.totalPacketsReceived,d=h<=0||p<0?0:Math.round(h/(h+p)*100),this.downlinkPrevStatMap_.set(a,{totalPacketsLost:c,totalPacketsReceived:u}),this.downlinkLossAndRTTMap_.set(a,{rtt:s,loss:d,userId:i[r].getUserId()});case 28:r++,e.next=10;break;case 31:if(b(this.downlinkPrevStatMap_.keys()).forEach((function(e){v.isPeerConnectionDisconnected(e)&&(v.downlinkPrevStatMap_.delete(e),v.downlinkLossAndRTTMap_.delete(e))})),0!==this.downlinkLossAndRTTMap_.size){e.next=34;break}return e.abrupt(\"return\");case 34:f=this.getAverageLossAndRTT(b(this.downlinkLossAndRTTMap_.values())),m=f.rtt,_=f.loss,this.downlinkRTT_=m,this.downlinkLoss_=_,this.downlinkNetworkQuality=this.getNetworkQuality(_,m);case 38:case\"end\":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:\"getStat\",value:(t=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i={rtt:0,totalPacketsLost:0,totalPacketsReceived:0},t&&fO()){e.next=3;break}return e.abrupt(\"return\",i);case 3:r=t.getReceivers(),e.prev=4,a=0;case 6:if(!(a<r.length)){e.next=15;break}return o=r[a],e.next=10,o.getStats();case 10:e.sent.forEach((function(e){\"candidate-pair\"===e.type&&dC(e.currentRoundTripTime)&&(i.rtt=Math.round(1e3*e.currentRoundTripTime)),\"inbound-rtp\"!==e.type||e.mediaType!==Tb&&e.mediaType!==wb||(i.totalPacketsLost+=e.packetsLost,i.totalPacketsReceived+=e.packetsReceived)}));case 12:a++,e.next=6;break;case 15:return e.abrupt(\"return\",i);case 18:return e.prev=18,e.t0=e.catch(4),e.abrupt(\"return\",i);case 21:case\"end\":return e.stop()}}),e,null,[[4,18]])}))),function(e){return t.apply(this,arguments)})},{key:\"getAverageLossAndRTT\",value:function(e){var t={rtt:0,loss:0};return Array.isArray(e)&&e.length>0&&(e.forEach((function(e){t.rtt+=e.rtt,t.loss+=e.loss})),Object.keys(t).forEach((function(n){t[n]=Math.round(t[n]/e.length)}))),t}},{key:\"getNetworkQuality\",value:function(e,t){return e>50||t>500?5:e>30||t>350?4:e>20||t>200?3:e>10||t>100?2:e>=0||t>=0?1:0}},{key:\"handleSignalConnectionStateChange\",value:function(e){e.state===Wx?(this.uplinkRTT_=0,this.uplinkLoss_=0,this.uplinkNetworkQuality=6):e.state===Jx&&6===this.uplinkNetworkQuality&&(this.uplinkNetworkQuality=5)}},{key:\"handleUplinkConnectionStateChange\",value:function(e){var t=e.state;t===Pk?(this.uplinkLoss_=0,this.uplinkRTT_=0,this.uplinkNetworkQuality=6):t===Mk&&6===this.uplinkNetworkQuality&&(this.uplinkNetworkQuality=5)}},{key:\"isPeerConnectionDisconnected\",value:function(e){return!(!e||e.connectionState!==jk&&e.connectionState!==Uk&&e.connectionState!==Vk)}},{key:\"setUplinkConnection\",value:function(e){this.uplinkConnection_=e,this.uplinkConnection_?this.uplinkConnection_.on(OO.CONNECTION_STATE_CHANGED,this.handleUplinkConnectionStateChange.bind(this)):(this.uplinkNetworkQuality=0,this.uplinkRTT_=0,this.uplinkLoss_=0)}},{key:\"start\",value:function(){var e=this;-1===this.interval_?(this.log_.info(\"start network quality calculating\"),this.interval_=YD.run(uT,(function(){e.handleDownlinkNetworkQuality(),OC.emit(wA,{client:e.client_,uplinkNetworkQuality:e.uplinkNetworkQuality,downlinkNetworkQuality:e.downlinkNetworkQuality,uplinkRTT:e.uplinkRTT_,uplinkLoss:e.uplinkLoss_,downlinkRTT:e.downlinkRTT_,downlinkLoss:e.downlinkLoss_,downlinkLossAndRTTMap:e.downlinkLossAndRTTMap_}),e.emitter_.emit(MO.NETWORK_QUALITY,{uplinkNetworkQuality:e.uplinkNetworkQuality,downlinkNetworkQuality:e.downlinkNetworkQuality,uplinkRTT:e.uplinkRTT_,uplinkLoss:e.uplinkLoss_,downlinkRTT:e.downlinkRTT_,downlinkLoss:e.downlinkLoss_})}),{delay:2e3})):this.log_.info(\"network quality calculating is already started\")}},{key:\"stop\",value:function(){this.log_.info(\"stop network quality calculating\"),-1!==this.interval_&&(YD.clearTask(this.interval_),this.interval_=-1),this.downlinkLossAndRTTMap_.clear(),this.downlinkPrevStatMap_.clear()}},{key:\"on\",value:function(e,t){this.emitter_.on(e,t)}},{key:\"updateDelay\",value:function(e){var t=this;e.forEach((function(e){var n=e.srcTinyId,i=e.videoDelay,r=e.audioDelay,a=t.connections_.get(n);a&&a.setDelay({videoDelay:i,audioDelay:r})}))}}]),e}(),GO=function(){function e(t){o(this,e),this.log_=MA.createLogger({id:t.client.getUserId(),userId:t.client.getUserId(),sdkAppId:t.client.getSDKAppId()}),this.localStream_=null,this.prevDevices_=[],this.initialize()}var t,i;return c(e,[{key:\"initialize\",value:function(){navigator.mediaDevices&&navigator.mediaDevices.addEventListener&&(this.onDeviceChange=this.onDeviceChange.bind(this),navigator.mediaDevices.addEventListener(\"devicechange\",this.onDeviceChange))}},{key:\"destroy\",value:function(){navigator.mediaDevices&&navigator.mediaDevices.removeEventListener&&navigator.mediaDevices.removeEventListener(\"devicechange\",this.onDeviceChange)}},{key:\"onDeviceChange\",value:(i=a(n().mark((function e(){var t,i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.localStream_&&this.localStream_.getMediaStream()&&!this.localStream_.getScreen()){e.next=2;break}return e.abrupt(\"return\");case 2:return e.next=4,QO();case 4:t=e.sent,i=t.filter((function(e){return a.prevDevices_.findIndex((function(t){var n=t.deviceId;return e.deviceId===n}))<0})),r=this.prevDevices_.filter((function(e){return t.findIndex((function(t){var n=t.deviceId;return e.deviceId===n}))<0})),i.length>0&&this.handleDeviceAdded(this.prevDevices_,i),r.length>0&&this.handleDeviceRemoved(t,r),this.prevDevices_=t;case 10:case\"end\":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:\"setLocalStream\",value:(t=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=4;break}return e.next=3,QO();case 3:this.prevDevices_=e.sent;case 4:this.localStream_=t;case 5:case\"end\":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:\"handleDeviceAdded\",value:function(e,t){var n,i;if(this.localStream_){this.log_.warn(\"devicesAdded: \".concat(JSON.stringify(t))),this.localStream_.updateDeviceIdInUse();var r=t.filter((function(e){return e.kind===Hb})),a=t.filter((function(e){return e.kind===Bb})),o=e.filter((function(e){return e.kind===Hb})),s=e.filter((function(e){return e.kind===Bb})),c=r.length>0&&0===o.length&&\"live\"!==(null===(n=this.localStream_.getVideoTrack())||void 0===n?void 0:n.readyState),u=a.length>0&&0===s.length&&\"live\"!==(null===(i=this.localStream_.getAudioTrack())||void 0===i?void 0:i.readyState);if(u&&c)return this.log_.info(\"new microphone and camera detected, but there was no device before.\"),void this.localStream_.recoverCapture({audio:!0,video:!0,cameraId:r[0].deviceId,microphoneId:a[0].deviceId});c&&(this.log_.info(\"new camera detected, but there was no camera before.\"),this.localStream_.recoverCapture({audio:!1,video:!0,cameraId:r[0].deviceId})),u&&(this.log_.info(\"new microphone detected, but there was no microphone before.\"),this.localStream_.recoverCapture({audio:!0,video:!1,microphoneId:a[0].deviceId}))}}},{key:\"handleDeviceRemoved\",value:function(e,t){if(this.localStream_){this.log_.warn(\"devicesRemoved: \".concat(JSON.stringify(t))),this.localStream_.updateDeviceIdInUse();var n=!1,i=!1,r=this.localStream_.getCameraId(),a=this.localStream_.getMicrophoneId();if(a===ZI){var o=this.localStream_.getMicrophoneGroupId(),s=e.filter((function(e){return e.deviceId===ZI&&e.kind===Bb}))[0];s&&s.groupId!==o&&(i=!0)}if(t.forEach((function(e){var t=e.deviceId;r.length>0&&t===r?n=!0:a.length>0&&t===a&&(i=!0)})),n&&i)return this.log_.warn(\"current camera and microphone in use is lost, cameraId: \".concat(r,\", microphoneId: \").concat(a)),void((this.localStream_.getAudio()||this.localStream_.getVideo())&&this.localStream_.recoverCapture({video:!0,audio:!0}));n&&(this.log_.warn(\"current camera in use is lost, deviceId: \".concat(r)),this.localStream_.getVideo()&&this.localStream_.recoverCapture({video:!0,audio:!1})),i&&(this.log_.warn(\"current microphone in use is lost, deviceId: \".concat(a)),this.localStream_.getAudio()&&this.localStream_.recoverCapture({video:!1,audio:!0}))}}}]),e}();function zO(){return zO=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!bO()&&!SO()){e.next=2;break}return e.abrupt(\"return\",[]);case 2:return e.next=4,qO();case 4:return t=e.sent,e.abrupt(\"return\",t.filter((function(e){return e.kind===Hb})).map((function(e,t){var n=e.label;e.label||(n=\"camera_\"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),e.getCapabilities&&(i.getCapabilities=function(){return e.getCapabilities()}),i})));case 6:case\"end\":return e.stop()}}),e)}))),zO.apply(this,arguments)}var JO=new Set;function qO(){return KO.apply(this,arguments)}function KO(){return(KO=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!bO()&&!SO()){e.next=2;break}return e.abrupt(\"return\",[]);case 2:return e.next=4,navigator.mediaDevices.enumerateDevices();case 4:return(t=e.sent).forEach((function(e){JO.add(\"\".concat(e.deviceId,\"_\").concat(e.kind))})),e.abrupt(\"return\",t);case 7:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}function QO(){return XO.apply(this,arguments)}function XO(){return XO=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qO();case 2:return t=e.sent,e.abrupt(\"return\",t.filter((function(e){return e.kind!==Bb||e.deviceId!=eT})).map((function(e,t){var n=e.label;e.label||(n=e.kind+\"_\"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),e.getCapabilities&&(i.getCapabilities=function(){return e.getCapabilities()}),i})));case 4:case\"end\":return e.stop()}}),e)}))),XO.apply(this,arguments)}function YO(){return $O.apply(this,arguments)}function $O(){return $O=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qO();case 2:return t=e.sent,e.abrupt(\"return\",t.filter((function(e){return e.kind===Bb&&e.deviceId!==eT})).map((function(e,t){var n=e.label;e.label||(n=\"microphone_\"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),e.getCapabilities&&(i.getCapabilities=function(){return e.getCapabilities()}),i})));case 4:case\"end\":return e.stop()}}),e)}))),$O.apply(this,arguments)}function ZO(){return eM.apply(this,arguments)}function eM(){return eM=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qO();case 2:return t=e.sent,e.abrupt(\"return\",t.filter((function(e){return\"audiooutput\"===e.kind})).map((function(e,t){var n=e.label;e.label||(n=\"speaker_\"+t);var i={label:n,deviceId:e.deviceId,kind:e.kind};return e.groupId&&(i.groupId=e.groupId),i})));case 4:case\"end\":return e.stop()}}),e)}))),eM.apply(this,arguments)}function tM(e){var t;if(e instanceof CanvasCaptureMediaStreamTrack)return!1;if(!(e instanceof window.MediaStreamTrack))return!1;var n=e.label.toLocaleLowerCase();if(n.includes(\"camera\")||n.includes(\"webcam\"))return!0;var i=\"\".concat(null===(t=e.getSettings())||void 0===t?void 0:t.deviceId,\"_\").concat(Hb);return!!JO.has(i)}function nM(e,t){return iM.apply(this,arguments)}function iM(){return(iM=a(n().mark((function e(t,i){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,YO();case 2:if(r=e.sent,(null==(a=r.find((function(e){return e.deviceId===ZI})))?void 0:a.groupId)!==t||a.label!==i){e.next=6;break}return e.abrupt(\"return\",!0);case 6:return e.abrupt(\"return\",!1);case 7:case\"end\":return e.stop()}}),e)})))).apply(this,arguments)}var rM,aM=Tn.exports,oM=rn,sM=un,cM=Ys,uM=xs,dM=N,lM=lt,hM=function(e,t,n,i){try{return i?t(sM(n)[0],n[1]):t(n)}catch(qq){cM(e,\"throw\",qq)}},pM=Ms,fM=Id,mM=Li,_M=Jo,vM=qs,gM=Fs,yM=Array,SM=function(e){var t=lM(e),n=fM(this),i=arguments.length,r=i>1?arguments[1]:void 0,a=void 0!==r;a&&(r=uM(r,i>2?arguments[2]:void 0));var o,s,c,u,d,l,h=gM(t),p=0;if(!h||this===yM&&pM(h))for(o=mM(t),s=n?new this(o):yM(o);o>p;p++)l=a?r(t[p],p):t[p],_M(s,p,l);else for(d=(u=vM(t,h)).next,s=n?new this:[];!(c=dM(d,u)).done;p++)l=a?hM(u,r,[c.value,p],!0):c.value,_M(s,p,l);return s.length=p,s},bM=ee,kM=2147483647,IM=/[^\\0-\\u007E]/,TM=/[.\\u3002\\uFF0E\\uFF61]/g,wM=\"Overflow: input needs wider integers to process\",EM=RangeError,RM=bM(TM.exec),CM=Math.floor,AM=String.fromCharCode,xM=bM(\"\".charCodeAt),PM=bM([].join),DM=bM([].push),OM=bM(\"\".replace),MM=bM(\"\".split),NM=bM(\"\".toLowerCase),LM=function(e){return e+22+75*(e<26)},UM=function(e,t,n){var i=0;for(e=n?CM(e/700):e>>1,e+=CM(e/t);e>455;)e=CM(e/35),i+=36;return CM(i+36*e/(e+38))},VM=function(e){var t=[];e=function(e){for(var t=[],n=0,i=e.length;n<i;){var r=xM(e,n++);if(r>=55296&&r<=56319&&n<i){var a=xM(e,n++);56320==(64512&a)?DM(t,((1023&r)<<10)+(1023&a)+65536):(DM(t,r),n--)}else DM(t,r)}return t}(e);var n,i,r=e.length,a=128,o=0,s=72;for(n=0;n<e.length;n++)(i=e[n])<128&&DM(t,AM(i));var c=t.length,u=c;for(c&&DM(t,\"-\");u<r;){var d=kM;for(n=0;n<e.length;n++)(i=e[n])>=a&&i<d&&(d=i);var l=u+1;if(d-a>CM((kM-o)/l))throw EM(wM);for(o+=(d-a)*l,a=d,n=0;n<e.length;n++){if((i=e[n])<a&&++o>kM)throw EM(wM);if(i==a){for(var h=o,p=36;;){var f=p<=s?1:p>=s+26?26:p-s;if(h<f)break;var m=h-f,_=36-f;DM(t,AM(LM(f+m%_))),h=CM(m/_),p+=36}DM(t,AM(LM(h))),s=UM(o,l,u==c),o=0,u++}}o++,a++}return PM(t,\"\")},jM=Tr,FM=P,BM=pf,HM=C,WM=xs,GM=ee,zM=ki,JM=function(e,t,n){return n.get&&aM(n.get,t,{getter:!0}),n.set&&aM(n.set,t,{setter:!0}),oM.f(e,t,n)},qM=fc,KM=ft,QM=dx,XM=SM,YM=$o,$M=yu.codeAt,ZM=function(e){var t,n,i=[],r=MM(OM(NM(e),TM,\".\"),\".\");for(t=0;t<r.length;t++)n=r[t],DM(i,RM(IM,n)?\"xn--\"+VM(n):n);return PM(i,\".\")},eN=du,tN=Ma,nN=Xu,iN=Om,rN=ai,aN=rN.set,oN=rN.getterFor(\"URL\"),sN=iN.URLSearchParams,cN=iN.getState,uN=HM.URL,dN=HM.TypeError,lN=HM.parseInt,hN=Math.floor,pN=Math.pow,fN=GM(\"\".charAt),mN=GM(/./.exec),_N=GM([].join),vN=GM(1..toString),gN=GM([].pop),yN=GM([].push),SN=GM(\"\".replace),bN=GM([].shift),kN=GM(\"\".split),IN=GM(\"\".slice),TN=GM(\"\".toLowerCase),wN=GM([].unshift),EN=\"Invalid scheme\",RN=\"Invalid host\",CN=\"Invalid port\",AN=/[a-z]/i,xN=/[\\d+-.a-z]/i,PN=/\\d/,DN=/^0x/i,ON=/^[0-7]+$/,MN=/^\\d+$/,NN=/^[\\da-f]+$/i,LN=/[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/,UN=/[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/,VN=/^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g,jN=/[\\t\\n\\r]/g,FN=function(e){var t,n,i,r;if(\"number\"==typeof e){for(t=[],n=0;n<4;n++)wN(t,e%256),e=hN(e/256);return _N(t,\".\")}if(\"object\"==typeof e){for(t=\"\",i=function(e){for(var t=null,n=1,i=null,r=0,a=0;a<8;a++)0!==e[a]?(r>n&&(t=i,n=r),i=null,r=0):(null===i&&(i=a),++r);return r>n&&(t=i,n=r),t}(e),n=0;n<8;n++)r&&0===e[n]||(r&&(r=!1),i===n?(t+=n?\":\":\"::\",r=!0):(t+=vN(e[n],16),n<7&&(t+=\":\")));return\"[\"+t+\"]\"}return e},BN={},HN=QM({},BN,{\" \":1,'\"':1,\"<\":1,\">\":1,\"`\":1}),WN=QM({},HN,{\"#\":1,\"?\":1,\"{\":1,\"}\":1}),GN=QM({},WN,{\"/\":1,\":\":1,\";\":1,\"=\":1,\"@\":1,\"[\":1,\"\\\\\":1,\"]\":1,\"^\":1,\"|\":1}),zN=function(e,t){var n=$M(e,0);return n>32&&n<127&&!KM(t,e)?e:encodeURIComponent(e)},JN={ftp:21,file:null,http:80,https:443,ws:80,wss:443},qN=function(e,t){var n;return 2==e.length&&mN(AN,fN(e,0))&&(\":\"==(n=fN(e,1))||!t&&\"|\"==n)},KN=function(e){var t;return e.length>1&&qN(IN(e,0,2))&&(2==e.length||\"/\"===(t=fN(e,2))||\"\\\\\"===t||\"?\"===t||\"#\"===t)},QN=function(e){return\".\"===e||\"%2e\"===TN(e)},XN={},YN={},$N={},ZN={},eL={},tL={},nL={},iL={},rL={},aL={},oL={},sL={},cL={},uL={},dL={},lL={},hL={},pL={},fL={},mL={},_L={},vL=function(e,t,n){var i,r,a,o=eN(e);if(t){if(r=this.parse(o))throw dN(r);this.searchParams=null}else{if(void 0!==n&&(i=new vL(n,!0)),r=this.parse(o,null,i))throw dN(r);(a=cN(new sN)).bindURL(this),this.searchParams=a}};vL.prototype={type:\"URL\",parse:function(e,t,n){var i,r,a,o,s,c=this,u=t||XN,d=0,l=\"\",h=!1,p=!1,f=!1;for(e=eN(e),t||(c.scheme=\"\",c.username=\"\",c.password=\"\",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=SN(e,VN,\"\")),e=SN(e,jN,\"\"),i=XM(e);d<=i.length;){switch(r=i[d],u){case XN:if(!r||!mN(AN,r)){if(t)return EN;u=$N;continue}l+=TN(r),u=YN;break;case YN:if(r&&(mN(xN,r)||\"+\"==r||\"-\"==r||\".\"==r))l+=TN(r);else{if(\":\"!=r){if(t)return EN;l=\"\",u=$N,d=0;continue}if(t&&(c.isSpecial()!=KM(JN,l)||\"file\"==l&&(c.includesCredentials()||null!==c.port)||\"file\"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&JN[c.scheme]==c.port&&(c.port=null));l=\"\",\"file\"==c.scheme?u=uL:c.isSpecial()&&n&&n.scheme==c.scheme?u=ZN:c.isSpecial()?u=iL:\"/\"==i[d+1]?(u=eL,d++):(c.cannotBeABaseURL=!0,yN(c.path,\"\"),u=fL)}break;case $N:if(!n||n.cannotBeABaseURL&&\"#\"!=r)return EN;if(n.cannotBeABaseURL&&\"#\"==r){c.scheme=n.scheme,c.path=YM(n.path),c.query=n.query,c.fragment=\"\",c.cannotBeABaseURL=!0,u=_L;break}u=\"file\"==n.scheme?uL:tL;continue;case ZN:if(\"/\"!=r||\"/\"!=i[d+1]){u=tL;continue}u=rL,d++;break;case eL:if(\"/\"==r){u=aL;break}u=pL;continue;case tL:if(c.scheme=n.scheme,r==rM)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=YM(n.path),c.query=n.query;else if(\"/\"==r||\"\\\\\"==r&&c.isSpecial())u=nL;else if(\"?\"==r)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=YM(n.path),c.query=\"\",u=mL;else{if(\"#\"!=r){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=YM(n.path),c.path.length--,u=pL;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=YM(n.path),c.query=n.query,c.fragment=\"\",u=_L}break;case nL:if(!c.isSpecial()||\"/\"!=r&&\"\\\\\"!=r){if(\"/\"!=r){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,u=pL;continue}u=aL}else u=rL;break;case iL:if(u=rL,\"/\"!=r||\"/\"!=fN(l,d+1))continue;d++;break;case rL:if(\"/\"!=r&&\"\\\\\"!=r){u=aL;continue}break;case aL:if(\"@\"==r){h&&(l=\"%40\"+l),h=!0,a=XM(l);for(var m=0;m<a.length;m++){var _=a[m];if(\":\"!=_||f){var v=zN(_,GN);f?c.password+=v:c.username+=v}else f=!0}l=\"\"}else if(r==rM||\"/\"==r||\"?\"==r||\"#\"==r||\"\\\\\"==r&&c.isSpecial()){if(h&&\"\"==l)return\"Invalid authority\";d-=XM(l).length+1,l=\"\",u=oL}else l+=r;break;case oL:case sL:if(t&&\"file\"==c.scheme){u=lL;continue}if(\":\"!=r||p){if(r==rM||\"/\"==r||\"?\"==r||\"#\"==r||\"\\\\\"==r&&c.isSpecial()){if(c.isSpecial()&&\"\"==l)return RN;if(t&&\"\"==l&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(l))return o;if(l=\"\",u=hL,t)return;continue}\"[\"==r?p=!0:\"]\"==r&&(p=!1),l+=r}else{if(\"\"==l)return RN;if(o=c.parseHost(l))return o;if(l=\"\",u=cL,t==sL)return}break;case cL:if(!mN(PN,r)){if(r==rM||\"/\"==r||\"?\"==r||\"#\"==r||\"\\\\\"==r&&c.isSpecial()||t){if(\"\"!=l){var g=lN(l,10);if(g>65535)return CN;c.port=c.isSpecial()&&g===JN[c.scheme]?null:g,l=\"\"}if(t)return;u=hL;continue}return CN}l+=r;break;case uL:if(c.scheme=\"file\",\"/\"==r||\"\\\\\"==r)u=dL;else{if(!n||\"file\"!=n.scheme){u=pL;continue}if(r==rM)c.host=n.host,c.path=YM(n.path),c.query=n.query;else if(\"?\"==r)c.host=n.host,c.path=YM(n.path),c.query=\"\",u=mL;else{if(\"#\"!=r){KN(_N(YM(i,d),\"\"))||(c.host=n.host,c.path=YM(n.path),c.shortenPath()),u=pL;continue}c.host=n.host,c.path=YM(n.path),c.query=n.query,c.fragment=\"\",u=_L}}break;case dL:if(\"/\"==r||\"\\\\\"==r){u=lL;break}n&&\"file\"==n.scheme&&!KN(_N(YM(i,d),\"\"))&&(qN(n.path[0],!0)?yN(c.path,n.path[0]):c.host=n.host),u=pL;continue;case lL:if(r==rM||\"/\"==r||\"\\\\\"==r||\"?\"==r||\"#\"==r){if(!t&&qN(l))u=pL;else if(\"\"==l){if(c.host=\"\",t)return;u=hL}else{if(o=c.parseHost(l))return o;if(\"localhost\"==c.host&&(c.host=\"\"),t)return;l=\"\",u=hL}continue}l+=r;break;case hL:if(c.isSpecial()){if(u=pL,\"/\"!=r&&\"\\\\\"!=r)continue}else if(t||\"?\"!=r)if(t||\"#\"!=r){if(r!=rM&&(u=pL,\"/\"!=r))continue}else c.fragment=\"\",u=_L;else c.query=\"\",u=mL;break;case pL:if(r==rM||\"/\"==r||\"\\\\\"==r&&c.isSpecial()||!t&&(\"?\"==r||\"#\"==r)){if(\"..\"===(s=TN(s=l))||\"%2e.\"===s||\".%2e\"===s||\"%2e%2e\"===s?(c.shortenPath(),\"/\"==r||\"\\\\\"==r&&c.isSpecial()||yN(c.path,\"\")):QN(l)?\"/\"==r||\"\\\\\"==r&&c.isSpecial()||yN(c.path,\"\"):(\"file\"==c.scheme&&!c.path.length&&qN(l)&&(c.host&&(c.host=\"\"),l=fN(l,0)+\":\"),yN(c.path,l)),l=\"\",\"file\"==c.scheme&&(r==rM||\"?\"==r||\"#\"==r))for(;c.path.length>1&&\"\"===c.path[0];)bN(c.path);\"?\"==r?(c.query=\"\",u=mL):\"#\"==r&&(c.fragment=\"\",u=_L)}else l+=zN(r,WN);break;case fL:\"?\"==r?(c.query=\"\",u=mL):\"#\"==r?(c.fragment=\"\",u=_L):r!=rM&&(c.path[0]+=zN(r,BN));break;case mL:t||\"#\"!=r?r!=rM&&(\"'\"==r&&c.isSpecial()?c.query+=\"%27\":c.query+=\"#\"==r?\"%23\":zN(r,BN)):(c.fragment=\"\",u=_L);break;case _L:r!=rM&&(c.fragment+=zN(r,HN))}d++}},parseHost:function(e){var t,n,i;if(\"[\"==fN(e,0)){if(\"]\"!=fN(e,e.length-1))return RN;if(t=function(e){var t,n,i,r,a,o,s,c=[0,0,0,0,0,0,0,0],u=0,d=null,l=0,h=function(){return fN(e,l)};if(\":\"==h()){if(\":\"!=fN(e,1))return;l+=2,d=++u}for(;h();){if(8==u)return;if(\":\"!=h()){for(t=n=0;n<4&&mN(NN,h());)t=16*t+lN(h(),16),l++,n++;if(\".\"==h()){if(0==n)return;if(l-=n,u>6)return;for(i=0;h();){if(r=null,i>0){if(!(\".\"==h()&&i<4))return;l++}if(!mN(PN,h()))return;for(;mN(PN,h());){if(a=lN(h(),10),null===r)r=a;else{if(0==r)return;r=10*r+a}if(r>255)return;l++}c[u]=256*c[u]+r,2!=++i&&4!=i||u++}if(4!=i)return;break}if(\":\"==h()){if(l++,!h())return}else if(h())return;c[u++]=t}else{if(null!==d)return;l++,d=++u}}if(null!==d)for(o=u-d,u=7;0!=u&&o>0;)s=c[u],c[u--]=c[d+o-1],c[d+--o]=s;else if(8!=u)return;return c}(IN(e,1,-1)),!t)return RN;this.host=t}else if(this.isSpecial()){if(e=ZM(e),mN(LN,e))return RN;if(t=function(e){var t,n,i,r,a,o,s,c=kN(e,\".\");if(c.length&&\"\"==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],i=0;i<t;i++){if(\"\"==(r=c[i]))return e;if(a=10,r.length>1&&\"0\"==fN(r,0)&&(a=mN(DN,r)?16:8,r=IN(r,8==a?1:2)),\"\"===r)o=0;else{if(!mN(10==a?MN:8==a?ON:NN,r))return e;o=lN(r,a)}yN(n,o)}for(i=0;i<t;i++)if(o=n[i],i==t-1){if(o>=pN(256,5-t))return null}else if(o>255)return null;for(s=gN(n),i=0;i<n.length;i++)s+=n[i]*pN(256,3-i);return s}(e),null===t)return RN;this.host=t}else{if(mN(UN,e))return RN;for(t=\"\",n=XM(e),i=0;i<n.length;i++)t+=zN(n[i],BN);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||\"file\"==this.scheme},includesCredentials:function(){return\"\"!=this.username||\"\"!=this.password},isSpecial:function(){return KM(JN,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||\"file\"==this.scheme&&1==t&&qN(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,i=e.password,r=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,u=t+\":\";return null!==r?(u+=\"//\",e.includesCredentials()&&(u+=n+(i?\":\"+i:\"\")+\"@\"),u+=FN(r),null!==a&&(u+=\":\"+a)):\"file\"==t&&(u+=\"//\"),u+=e.cannotBeABaseURL?o[0]:o.length?\"/\"+_N(o,\"/\"):\"\",null!==s&&(u+=\"?\"+s),null!==c&&(u+=\"#\"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw dN(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(\"blob\"==e)try{return new gL(e.path[0]).origin}catch(qq){return\"null\"}return\"file\"!=e&&this.isSpecial()?e+\"://\"+FN(this.host)+(null!==t?\":\"+t:\"\"):\"null\"},getProtocol:function(){return this.scheme+\":\"},setProtocol:function(e){this.parse(eN(e)+\":\",XN)},getUsername:function(){return this.username},setUsername:function(e){var t=XM(eN(e));if(!this.cannotHaveUsernamePasswordPort()){this.username=\"\";for(var n=0;n<t.length;n++)this.username+=zN(t[n],GN)}},getPassword:function(){return this.password},setPassword:function(e){var t=XM(eN(e));if(!this.cannotHaveUsernamePasswordPort()){this.password=\"\";for(var n=0;n<t.length;n++)this.password+=zN(t[n],GN)}},getHost:function(){var e=this.host,t=this.port;return null===e?\"\":null===t?FN(e):FN(e)+\":\"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,oL)},getHostname:function(){var e=this.host;return null===e?\"\":FN(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,sL)},getPort:function(){var e=this.port;return null===e?\"\":eN(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(\"\"==(e=eN(e))?this.port=null:this.parse(e,cL))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?\"/\"+_N(e,\"/\"):\"\"},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,hL))},getSearch:function(){var e=this.query;return e?\"?\"+e:\"\"},setSearch:function(e){\"\"==(e=eN(e))?this.query=null:(\"?\"==fN(e,0)&&(e=IN(e,1)),this.query=\"\",this.parse(e,mL)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?\"#\"+e:\"\"},setHash:function(e){\"\"!=(e=eN(e))?(\"#\"==fN(e,0)&&(e=IN(e,1)),this.fragment=\"\",this.parse(e,_L)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var gL=function(e){var t=qM(this,yL),n=nN(arguments.length,1)>1?arguments[1]:void 0,i=aN(t,new vL(e,!1,n));FM||(t.href=i.serialize(),t.origin=i.getOrigin(),t.protocol=i.getProtocol(),t.username=i.getUsername(),t.password=i.getPassword(),t.host=i.getHost(),t.hostname=i.getHostname(),t.port=i.getPort(),t.pathname=i.getPathname(),t.search=i.getSearch(),t.searchParams=i.getSearchParams(),t.hash=i.getHash())},yL=gL.prototype,SL=function(e,t){return{get:function(){return oN(this)[e]()},set:t&&function(e){return oN(this)[t](e)},configurable:!0,enumerable:!0}};if(FM&&(JM(yL,\"href\",SL(\"serialize\",\"setHref\")),JM(yL,\"origin\",SL(\"getOrigin\")),JM(yL,\"protocol\",SL(\"getProtocol\",\"setProtocol\")),JM(yL,\"username\",SL(\"getUsername\",\"setUsername\")),JM(yL,\"password\",SL(\"getPassword\",\"setPassword\")),JM(yL,\"host\",SL(\"getHost\",\"setHost\")),JM(yL,\"hostname\",SL(\"getHostname\",\"setHostname\")),JM(yL,\"port\",SL(\"getPort\",\"setPort\")),JM(yL,\"pathname\",SL(\"getPathname\",\"setPathname\")),JM(yL,\"search\",SL(\"getSearch\",\"setSearch\")),JM(yL,\"searchParams\",SL(\"getSearchParams\")),JM(yL,\"hash\",SL(\"getHash\",\"setHash\"))),zM(yL,\"toJSON\",(function(){return oN(this).serialize()}),{enumerable:!0}),zM(yL,\"toString\",(function(){return oN(this).serialize()}),{enumerable:!0}),uN){var bL=uN.createObjectURL,kL=uN.revokeObjectURL;bL&&zM(gL,\"createObjectURL\",WM(bL,uN)),kL&&zM(gL,\"revokeObjectURL\",WM(kL,uN))}tN(gL,\"URL\"),jM({global:!0,constructor:!0,forced:!BM,sham:!FM},{URL:gL});var IL,TL,wL=new Blob([\"class VolumeMeter extends AudioWorkletProcessor{constructor(){super();this.volume=0;this.intervalTime=200;this.tick=this.intervalTime;this.isStop=false;this.port.onmessage=event=>{const{data}=event;switch(data.name){case'setIntervalTime':this.intervalTime=data.intervalTime;break;case'stop':this.isStop=true;break}}}process(inputs){const input=inputs[0];if(this.isStop){return false}if(input.length>0){const firstChannel=input[0];let sum=0;let rms;for(let i=0;i<firstChannel.length;++i){sum+=firstChannel[i]*firstChannel[i]}rms=Math.sqrt(sum/firstChannel.length);this.volume=Math.max(rms,this.volume*0.95);this.tick-=firstChannel.length;if(this.tick<0){this.tick+=(this.intervalTime/1000)*sampleRate;this.port.postMessage({volume:this.volume})}}return true}}registerProcessor('volume-meter',VolumeMeter);\"],{type:\"application/javascript\"}),EL=!1,RL=function(){function e(t){o(this,e),this.context_=t.context,this.addModuleToContext()}var t;return c(e,[{key:\"addModuleToContext\",value:(t=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.context_.audioWorklet.addModule(URL.createObjectURL(wL));case 3:MA.info(\"worklet addModule success\"),OC.emit(RA),EL=!0,e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),MA.info(\"worklet addModule catch error. \".concat(e.t0.message)),OC.emit(CA);case 12:case\"end\":return e.stop()}}),e,this,[[0,8]])}))),function(){return t.apply(this,arguments)})},{key:\"initWorkletSuccess\",get:function(){return EL}}]),e}(),CL=0,AL=function(){function e(t){o(this,e);var n=t.track,i=t.log,r=t.stream;this.volume_=0,this.log_=i,this.track_=n,this.stream_=r,CL+=1,IL||(IL=IC()),this.audioCtx_=IL,this.destination_=this.audioCtx_.destination;var a=new MediaStream;a.addTrack(this.track_),this.streamSource_=this.audioCtx_.createMediaStreamSource(a),this.audioWorkletNode_=null,this.scriptProcessorNode_=null,this.interval_=200,OC.on(EA,this.resume,this),OC.on(QC,this.handleAudioLevelInterval,this),wC?(OC.on(RA,this.initAudioWorklet,this),OC.on(CA,this.initScriptProcessor,this),this.preload()):this.initScriptProcessor()}return c(e,[{key:\"preload\",value:function(){TL?TL.initWorkletSuccess&&this.initAudioWorklet():TL=new RL({context:IL})}},{key:\"initAudioWorklet\",value:function(){var e=this;if(!this.audioWorkletNode_)try{this.audioWorkletNode_=new AudioWorkletNode(this.audioCtx_,\"volume-meter\"),this.audioWorkletNode_.port.onmessage=function(t){e.volume_=t.data.volume||0},this.streamSource_.connect(this.audioWorkletNode_).connect(this.destination_),this.handleAudioLevelInterval({interval:this.interval_})}catch(qq){this.log_.warn(\"load volume meter failed, load again. error: \"+qq),this.initScriptProcessor()}}},{key:\"initScriptProcessor\",value:function(){var e=this;if(!this.scriptProcessorNode_)try{this.scriptProcessorNode_=this.audioCtx_.createScriptProcessor(2048,1,1),this.scriptProcessorNode_.onaudioprocess=function(t){for(var n=t.inputBuffer.getChannelData(0),i=0,r=0;r<n.length;++r)i+=n[r]*n[r];e.volume_=Math.sqrt(i/n.length)||0},this.streamSource_.connect(this.scriptProcessorNode_),this.scriptProcessorNode_.connect(this.destination_)}catch(qq){this.log_.error(\"volumeMeter init script processor error: \"+qq),CL-=1}}},{key:\"destroy\",value:function(){var e;(this.streamSource_&&this.streamSource_.disconnect(),this.scriptProcessorNode_&&(this.scriptProcessorNode_.onaudioprocess=null,this.scriptProcessorNode_.disconnect()),this.audioWorkletNode_&&(this.audioWorkletNode_.port.postMessage({name:\"stop\"}),this.audioWorkletNode_.port.onmessage=null,this.audioWorkletNode_.disconnect()),this.audioWorkletNode_=null,this.scriptProcessorNode_=null,this.audioCtx_=null,OC.off(EA,this.resume,this),OC.off(QC,this.handleAudioLevelInterval,this),OC.off(RA,this.initAudioWorklet,this),OC.off(CA,this.initScriptProcessor,this),CL>0&&(CL-=1),0===CL)&&(null===(e=IL)||void 0===e||e.close(),IL=null,TL=null)}},{key:\"resume\",value:function(){var e;null===(e=IL)||void 0===e||e.resume()}},{key:\"getInternalAudioLevel\",value:function(){return this.volume_}},{key:\"getCalculatedVolume\",value:function(){return this.volume_.toFixed(2)}},{key:\"handleAudioLevelInterval\",value:function(e){var t,n=e.interval;this.interval_=n,null===(t=this.audioWorkletNode_)||void 0===t||t.port.postMessage({name:\"setIntervalTime\",intervalTime:n})}}]),e}(),xL=function(){function e(t){o(this,e),this.stream_=t.stream,this.userId_=t.stream.getUserId(),this.log_=this.stream_.getLogger(),this.track_=t.track,t.gainedTrack&&(this.gainedTrack_=t.gainedTrack),this.div_=t.div,this.muted_=t.muted,this.outputDeviceId_=t.outputDeviceId,this.volume_=t.volume,this.pausedRetryCount_=5,this.emitter_=new DC,this.initializeElement(),this.state_=\"NONE\",this.volumeMeter_=new AL({stream:this.stream_,track:this.gainedTrack_||this.track_,log:this.log_})}var t,i,r,s;return c(e,[{key:\"isPlaying\",get:function(){return this.state_===$b}},{key:\"initializeElement\",value:function(){if(this.isAudioElementInit()){var e=new MediaStream;e.addTrack(this.gainedTrack_||this.track_);var t=document.createElement(Tb);t.srcObject=e,t.muted=this.muted_,t.setAttribute(\"id\",\"audio_\".concat(this.stream_.getId())),t.setAttribute(\"autoplay\",\"autoplay\"),t.setAttribute(\"playsinline\",\"playsinline\"),this.div_.appendChild(t),this.element_=t}this.handleEvents()}},{key:\"setMuted\",value:function(e){this.element_&&(this.element_.muted=e,this.muted_=e)}},{key:\"play\",value:(s=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.outputDeviceId_||!this.element_){e.next=3;break}return e.next=3,this.element_.setSinkId(this.outputDeviceId_);case 3:if(this.setVolume(this.volume_),e.prev=4,!this.element_){e.next=8;break}return e.next=8,this.element_.play();case 8:e.next=16;break;case 10:if(e.prev=10,e.t0=e.catch(4),t=ZR({key:Yw,data:{media:\"Audio\",error:e.t0}}),this.log_.warn(t),!t.includes(\"NotAllowedError\")){e.next=16;break}throw new vP({code:_P.PLAY_NOT_ALLOWED,message:t});case 16:case\"end\":return e.stop()}}),e,this,[[4,10]])}))),function(){return s.apply(this,arguments)})},{key:\"handleEvents\",value:function(){this.handleElementEvent=this.handleElementEvent.bind(this),this.handleTrackEvent=this.handleTrackEvent.bind(this),this.element_&&(this.element_.addEventListener(Ub,this.handleElementEvent),this.element_.addEventListener(Lb,this.handleElementEvent),this.element_.addEventListener(Vb,this.handleElementEvent),this.element_.addEventListener(jb,this.handleElementEvent)),this.track_.addEventListener(Lb,this.handleTrackEvent),this.track_.addEventListener(Mb,this.handleTrackEvent),this.track_.addEventListener(Nb,this.handleTrackEvent),this.track_.readyState===Lb&&this.handleTrackEvent({type:Lb}),this.track_.muted&&this.handleTrackEvent({type:Mb})}},{key:\"handleElementEvent\",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c,u,d=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.type,e.t0=i,e.next=e.t0===Ub?4:e.t0===Lb?9:e.t0===Vb?12:e.t0===jb?21:32;break;case 4:return this.log_.info(\"audio player is playing\"),this.state_=$b,OC.emit(iA,{stream:this.stream_}),this.emitter_.emit(FO,{state:this.state_,reason:Ub}),e.abrupt(\"break\",32);case 9:return this.log_.info(\"audio player is ended\"),this.state_!==ek&&(this.state_=ek,this.emitter_.emit(FO,{state:this.state_,reason:Lb})),e.abrupt(\"break\",32);case 12:return this.log_.info(\"audio player is paused\"),this.state_=Zb,this.emitter_.emit(FO,{state:this.state_,reason:Vb}),(r=this.div_&&document.getElementById(this.div_.id))||this.log_.warn(\"audio player has been remove, element ID: \".concat(this.div_.id)),a=MR(),this.pausedRetryCount_>0&&(dC(a)&&a<=70||!r)&&(this.resume(),this.pausedRetryCount_--),GE&&(this.interval_=YD.run((function(){d.element_&&d.state_===Zb&&d.resume()}),{delay:3e3})),e.abrupt(\"break\",32);case 21:if(!this.element_||!this.element_.error){e.next=31;break}return o=\"\".concat(wO(),\"/\").concat(XR().name,\"/\").concat(XR().version),e.next=25,Jq.getSpeakers();case 25:s=e.sent,c=s[0].label,(u=s.find((function(e){return e.deviceId===d.outputDeviceId_})))&&(c=u.label),this.log_.error(\"audio player error observed. code: \".concat(this.element_.error.code,\" message: \").concat(this.element_.error.message,\" deviceInfo: \").concat(o,\" speaker: \").concat(c)),oD.uploadEvent({log:\"stat-\".concat(this.stream_.getType(),\"-audio-\").concat(pI,\"-\").concat(this.element_.error.code,\"-\").concat(o,\"-\").concat(c),userId:this.userId_,error:this.element_.error});case 31:return e.abrupt(\"break\",32);case 32:case\"end\":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:\"handleTrackEvent\",value:function(e){var t=e.type;switch(t){case Lb:this.log_.info(\"audio track is ended\"),this.state_!==ek&&(this.state_=ek,this.emitter_.emit(FO,{state:this.state_,reason:Lb})),OC.emit(kA,{stream:this.stream_,type:t});break;case Mb:this.log_.info(\"audio track is unable to provide media output\"),this.stream_.isRemote()||kC(),this.state_!==Zb&&(this.state_=Zb,this.emitter_.emit(FO,{state:this.state_,reason:Mb})),OC.emit(bA,{stream:this.stream_,type:t});break;case Nb:this.log_.info(\"audio track is able to provide media output\"),this.state_===Zb&&(this.state_=$b,this.emitter_.emit(FO,{state:this.state_,reason:Nb}))}}},{key:\"unbindEvents\",value:function(){this.element_&&(this.element_.removeEventListener(Ub,this.handleElementEvent),this.element_.removeEventListener(Lb,this.handleElementEvent),this.element_.removeEventListener(Vb,this.handleElementEvent),this.element_.removeEventListener(jb,this.handleElementEvent)),this.track_&&(this.track_.removeEventListener(Lb,this.handleTrackEvent),this.track_.removeEventListener(Mb,this.handleTrackEvent),this.track_.removeEventListener(Nb,this.handleTrackEvent))}},{key:\"setSinkId\",value:(i=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.outputDeviceId_===t){e.next=5;break}if(!this.element_){e.next=4;break}return e.next=4,this.element_.setSinkId(t);case 4:this.outputDeviceId_=t;case 5:case\"end\":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:\"setVolume\",value:function(e){this.element_&&(this.log_.info(\"audioElement setVolume to : \".concat(e)),this.element_.volume=e)}},{key:\"getAudioLevel\",value:function(){return this.volumeMeter_.getCalculatedVolume()}},{key:\"getInternalAudioLevel\",value:function(){return this.volumeMeter_.getInternalAudioLevel()}},{key:\"stop\",value:function(){this.unbindEvents(),this.element_&&(this.div_.removeChild(this.element_),this.element_.srcObject=null,this.element_=null),this.volumeMeter_&&(this.volumeMeter_.destroy(),this.volumeMeter_=null),this.interval_>0&&YD.clearTask(this.interval_)}},{key:\"resume\",value:(t=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.volumeMeter_&&this.volumeMeter_.resume(),!this.element_){e.next=5;break}return e.next=5,this.element_.play();case 5:e.next=13;break;case 7:if(e.prev=7,e.t0=e.catch(0),t=ZR({key:Yw,data:{media:\"Audio\",error:e.t0}}),this.log_.warn(t),!t.includes(\"NotAllowedError\")){e.next=13;break}throw new vP({code:_P.PLAY_NOT_ALLOWED,message:t});case 13:case\"end\":return e.stop()}}),e,this,[[0,7]])}))),function(){return t.apply(this,arguments)})},{key:\"on\",value:function(e,t){this.emitter_.on(e,t)}},{key:\"isAudioElementInit\",value:function(){return!(\"15.2\"===HR||\"15.3\"===HR||\"15.4\"===HR)||\"local\"!==this.stream_.getType()||!this.muted_||(this.log_.info(\"audioElement is muted.\"),!1)}}]),e}(),PL=xn.PROPER,DL=x,OL=J_,ML=ev.trim;Tr({target:\"String\",proto:!0,forced:function(e){return DL((function(){return!!OL[e]()||\"​᠎\"!==\"​᠎\"[e]()||PL&&OL[e].name!==e}))}(\"trim\")},{trim:function(){return ML(this)}});var NL=\"trtc_autoplay\",LL=\"\".concat(NL,\"_mask\"),UL=\"\".concat(NL,\"_wrapper\"),VL=\"\".concat(NL,\"_header\"),jL=\"\".concat(NL,\"_content\"),FL=\"\".concat(NL,\"_action_wrapper\"),BL=\"\".concat(NL,\"_question\"),HL=\"\".concat(NL,\"_collapse\"),WL=\"\".concat(NL,\"_action_confirm\"),GL=\"\".concat(NL,\"_detail\"),zL=\"#2473E8\",JL=\"dialog\",qL=\"\".concat(JL,\"-show\"),KL=\"\".concat(JL,\"-1\"),QL=\"\".concat(JL,\"-2\"),XL=!1,YL=function(){return!!document.querySelector(\".\".concat(UL))},$L=\"\".concat(XI,\"/\").concat(bC()?\"zh-cn\":\"en\",\"/tutorial-21-advanced-auto-play-policy.html\"),ZL=\"<br><a href='\".concat($L,\"' target='_blank'>\").concat(bC()?\"其他方案？\":\"Any other solution?\",\"</a>\"),eU=\"\".concat(bC()?\"浏览器自动播放策略：在用户与页面产生交互（点击、触摸）之前，浏览器禁止播放有声媒体。该弹窗用于帮助用户恢复音视频播放。\".concat(ZL):\"Autoplay Policy: Before user interacts with the web page (clicking, touching), page will not be allowed to play media with sound. This Dialog is used to help users resume playback. \".concat(ZL)),tU=function(){function e(){if(o(this,e),this.dialogNode_=null,this.bodyPosition_=\"\",this.content=\"音视频播放被浏览器拦截，请点击“恢复播放”。\",bC()||(this.content='Media playback failed. Click the \"Resume\" to resume playback.'),!XL){var t=document.createElement(\"style\");t.innerHTML=\".\".concat(LL,\"{position:fixed;top:0;left:0;right:0;bottom:0;width:100vw;height:100vh;display:flex;justify-content:center;align-items:center;background:rgba(0,0,0,0.5);z-index:1500;}.\").concat(LL,\" div:not(.\").concat(FL,\"){display:block !important;}.\").concat(UL,\"{padding:14px;background:#fff;border-radius:3px;box-shadow:0px 3px 15px #434343;border:1px solid #d1cfcf;max-width:500px;}.\").concat(UL,\" a{color:\").concat(zL,\";}.\").concat(VL,\"{overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:600;}.\").concat(jL,\"{margin:8px 0;}.\").concat(FL,\"{width:100%;display:flex !important;align-items:center;justify-content:right;float:right;}.\").concat(HL,\"{margin-right:auto;cursor:pointer}.\").concat(BL,\"{height:100%;line-height:16px;cursor:pointer;}.\").concat(WL,\"{margin-left:8px;color:#fff;background:\").concat(zL,\";padding:4px 12px;outline:none;border:1px solid;border-radius:3px;font-weight:bold;}.\").concat(WL,\":hover{opacity:0.9;}.\").concat(HL,\",.\").concat(WL,\",.\").concat(jL,\",.\").concat(BL,\"{font-size:14px;}@media screen and (max-width:750px){.\").concat(UL,\"{width:80vw;}}\"),document.head.appendChild(t),XL=!0}this.showDetail_=!1,this.isCollapseClicked_=!1,this.isQuestionClicked_=!1,this.addDiaLog()}return c(e,[{key:\"createDiaLog\",value:function(){var e=document.createElement(\"template\");e.innerHTML='<div class=\"'.concat(LL,\"\\\"><div class='\").concat(UL,\"'><div class='\").concat(VL,\"'>\").concat(location.host,\"</div><div class='\").concat(jL,\"'>\").concat(this.content,\"</div><div class='\").concat(GL,'\\' style=\"visibility:hidden;width:100%;height:0;font-size:12px;color:gray;\">').concat(eU,\"</div><div class='\").concat(FL,\"'></div></div></div>\").trim();var t=document.createElement(\"button\");t.className=WL,t.innerText=bC()?\"恢复播放\":\"Resume\",t.onclick=this.onConfirm.bind(this);var n=document.createElement(\"div\");n.className=BL,n.innerHTML='<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n    <svg class=\"icon\" width=\"18\" height=\"18\" p-id=\"2030\" t=\"1639646523624\" version=\"1.1\" viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\\n    <path d=\"m464 784.35c0 26.51 21.49 48 48 48s48-21.49 48-48-21.49-48-48-48-48 21.49-48 48z\" p-id=\"2031\"/>\\n    <path d=\"m512 960c-247.04 0-448-200.96-448-448s200.96-448 448-448 448 200.96 448 448-200.96 448-448 448zm0-831.71c-211.58 0-383.71 172.13-383.71 383.71 0 211.55 172.13 383.71 383.71 383.71 211.55 0 383.71-172.16 383.71-383.71 0-211.58-172.16-383.71-383.71-383.71z\" p-id=\"2032\"/>\\n    <path d=\"m512 673.7c-17.665 0-32.001-14.336-32.001-31.999v-54.112c0-52.353 40-92.352 75.328-127.65 25.887-25.92 52.672-52.672 52.672-74.017 0-53.343-43.072-96.735-95.999-96.735-53.823 0-95.999 41.536-95.999 94.559 0 17.665-14.336 31.999-32.001 31.999s-32.001-14.336-32.001-31.999c0-87.424 71.775-158.56 160-158.56s160 72.095 160 160.74c0 47.904-36.32 84.192-71.424 119.3-27.84 27.776-56.576 56.512-56.576 82.336v54.112c0 17.665-14.336 32.032-32.001 32.032z\" p-id=\"2033\"/>\\n    </svg>\\n    ',n.onclick=this.onQuestionClick.bind(this);var i=document.createElement(\"div\");i.className=HL,i.innerText=\"\".concat(bC()?\"详情 >\":\"Detail >\"),i.onclick=this.onCollapseClick.bind(this);var r=e.content.firstChild,a=r.querySelector(\".\".concat(FL));return a.appendChild(i),a.appendChild(n),a.appendChild(t),r}},{key:\"addDiaLog\",value:function(){YL()||(this.dialogNode_=this.createDiaLog(),document.body.appendChild(this.dialogNode_),this.dialogNode_.onclick=this.onConfirm.bind(this),this.dialogNode_.querySelector(\".\".concat(UL)).onclick=function(e){return e.stopPropagation()},this.bodyPosition_=document.body.style.position,document.body.style.position=\"fixed\",MA.info(\"show autoplay dialog\"),oD.uploadEvent({log:qL}))}},{key:\"deleteDiaLog\",value:function(){this.dialogNode_&&(document.body.removeChild(this.dialogNode_),document.body.style.position=this.bodyPosition_,this.dialogNode_=null)}},{key:\"onConfirm\",value:function(){MA.warn(\"confirm clicked, try resume stream\"),OC.emit(EA),this.deleteDiaLog()}},{key:\"onCollapseClick\",value:function(){var e=this.dialogNode_.querySelector(\".\".concat(GL));e.style.visibility=\"\".concat(this.showDetail_?\"hidden\":\"visible\"),e.style.height=\"\".concat(this.showDetail_?0:\"fit-content\"),this.showDetail_=!this.showDetail_,this.isCollapseClicked_||oD.uploadEvent({log:KL}),this.isCollapseClicked_=!0}},{key:\"onQuestionClick\",value:function(){window.open($L,\"_blank\"),this.isQuestionClicked_||oD.uploadEvent({log:QL}),this.isQuestionClicked_=!0}}]),e}(),nU=function(){function e(t){o(this,e),this.stream_=t.stream,this.userId_=t.stream.getUserId(),this.log_=this.stream_.getLogger(),this.track_=t.track,this.div_=t.div,this.muted_=t.muted,this.objectFit_=t.objectFit,this.mirror_=t.mirror,this.emitter_=new DC,this.initializeElement(),this.state_=\"NONE\",this.pausedRetryCount_=5}var t;return c(e,[{key:\"isPlaying\",get:function(){return this.state_===$b}},{key:\"initializeElement\",value:function(){var e=new MediaStream;e.addTrack(this.track_);var t=document.createElement(wb);t.srcObject=e,t.muted=!0;var n=\"width: 100%; height: 100%; object-fit: \".concat(this.objectFit_,\";\");this.mirror_&&(n+=\"transform: scaleX(-1);\"),t.setAttribute(\"id\",\"video_\".concat(this.stream_.getId())),t.setAttribute(\"style\",n),t.setAttribute(\"autoplay\",\"autoplay\"),t.setAttribute(\"playsinline\",\"playsinline\"),this.div_&&this.div_.appendChild(t),this.element_=t,this.handleEvents()}},{key:\"setRect\",value:function(e){var t=e.width,n=e.height;this.element_&&(this.element_.style.width=t+\"px\",this.element_.style.height=n+\"px\")}},{key:\"setMirror\",value:function(e){this.element_&&(this.element_.style.transform=e?\"scaleX(-1)\":\"\",this.mirror_=e)}},{key:\"setObjectFit\",value:function(e){this.element_&&(this.element_.style.objectFit=\"\".concat(e),this.objectFit_=e)}},{key:\"play\",value:(t=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.element_.play();case 3:e.next=11;break;case 5:if(e.prev=5,e.t0=e.catch(0),t=ZR({key:Yw,data:{media:\"Video\",error:e.t0}}),this.log_.warn(t),!t.includes(\"NotAllowedError\")){e.next=11;break}throw new vP({code:_P.PLAY_NOT_ALLOWED,message:t});case 11:case\"end\":return e.stop()}}),e,this,[[0,5]])}))),function(){return t.apply(this,arguments)})},{key:\"handleEvents\",value:function(){this.handleElementEvent=this.handleElementEvent.bind(this),this.handleTrackEvent=this.handleTrackEvent.bind(this),this.element_.addEventListener(Ub,this.handleElementEvent),this.element_.addEventListener(Lb,this.handleElementEvent),this.element_.addEventListener(Vb,this.handleElementEvent),this.element_.addEventListener(jb,this.handleElementEvent),this.element_.addEventListener(Fb,this.handleElementEvent),this.track_.addEventListener(Lb,this.handleTrackEvent),this.track_.addEventListener(Mb,this.handleTrackEvent),this.track_.addEventListener(Nb,this.handleTrackEvent),this.track_.readyState===Lb&&this.handleTrackEvent({type:Lb}),this.track_.muted&&this.handleTrackEvent({type:Mb})}},{key:\"handleElementEvent\",value:function(e){var t=this;switch(e.type){case Ub:this.log_.info(\"video player is playing\"),this.state_=$b,OC.emit(nA,{stream:this.stream_}),this.emitter_.emit(FO,{state:this.state_,reason:Ub}),this.interval_&&(YD.clearTask(this.interval_),this.interval_=null);break;case Lb:this.log_.info(\"video player is ended\"),this.state_!==ek&&(this.state_=ek,this.emitter_.emit(FO,{state:this.state_,reason:Lb}));break;case Vb:this.log_.info(\"video player is paused\"),this.div_&&!document.getElementById(this.div_.id)&&this.log_.warn(\"video player has been remove, element ID: \".concat(this.div_.id)),this.state_=Zb,this.emitter_.emit(FO,{state:this.state_,reason:Vb}),this.pausedRetryCount_>0&&!YL()&&(this.log_.info(\"video player auto resume when video paused\"),this.resume(),this.pausedRetryCount_--),GE&&(this.interval_=YD.run((function(){t.element_&&t.state_===Zb&&t.resume()}),{delay:3e3}));break;case jb:if(this.element_&&this.element_.error){var n=\"\".concat(wO(),\"/\").concat(XR().name,\"/\").concat(XR().version);this.log_.error(\"video player error observed. code: \".concat(this.element_.error.code,\" message: \").concat(this.element_.error.message,\" deviceInfo: \").concat(n)),oD.uploadEvent({log:\"stat-\".concat(this.stream_.getType(),\"-video-\").concat(pI,\"-\").concat(this.element_.error.code,\"-\").concat(n),userId:this.userId_,error:this.element_.error})}break;case Fb:OC.emit(gA,{stream:this.stream_})}}},{key:\"handleTrackEvent\",value:function(e){var t=e.type;switch(t){case Lb:this.log_.info(\"video track is ended\"),OC.emit(SA,{stream:this.stream_,type:t}),this.state_!==ek&&(this.state_=ek,this.emitter_.emit(FO,{state:this.state_,reason:Lb}));break;case Mb:this.log_.info(\"video track is unable to provide media output\"),this.stream_.isRemote()||kC(),OC.emit(mA,{stream:this.stream_,type:t}),this.state_!==Zb&&(this.state_=Zb,this.emitter_.emit(FO,{state:this.state_,reason:Mb}));break;case Nb:this.log_.info(\"video track is able to provide media output\"),OC.emit(_A,{stream:this.stream_}),this.state_===Zb&&(this.state_=$b,this.emitter_.emit(FO,{state:this.state_,reason:Nb}))}}},{key:\"unbindEvents\",value:function(){this.element_&&(this.element_.removeEventListener(Ub,this.handleElementEvent),this.element_.removeEventListener(Lb,this.handleElementEvent),this.element_.removeEventListener(Vb,this.handleElementEvent),this.element_.removeEventListener(jb,this.handleElementEvent),this.element_.removeEventListener(Fb,this.handleElementEvent)),this.track_&&(this.track_.removeEventListener(Lb,this.handleTrackEvent),this.track_.removeEventListener(Mb,this.handleTrackEvent),this.track_.removeEventListener(Nb,this.handleTrackEvent))}},{key:\"stop\",value:function(){this.unbindEvents(),this.div_&&this.div_.removeChild(this.element_),this.element_.srcObject=null,this.element_=null,this.interval_&&YD.clearTask(this.interval_)}},{key:\"resume\",value:function(){return this.play()}},{key:\"getVideoFrame\",value:function(){var e=document.createElement(\"canvas\");return e.width=this.element_.videoWidth,e.height=this.element_.videoHeight,e.getContext(\"2d\").drawImage(this.element_,0,0),e.toDataURL(\"image/png\")}},{key:\"on\",value:function(e,t){this.emitter_.on(e,t)}},{key:\"getElement\",value:function(){return this.element_?this.element_:null}}]),e}(),iU=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView,rU=Ri,aU=Mi,oU=RangeError,sU=function(e){if(void 0===e)return 0;var t=rU(e),n=aU(t);if(t!==n)throw oU(\"Wrong length or index\");return n},cU=Array,uU=Math.abs,dU=Math.pow,lU=Math.floor,hU=Math.log,pU=Math.LN2,fU={pack:function(e,t,n){var i,r,a,o=cU(n),s=8*n-t-1,c=(1<<s)-1,u=c>>1,d=23===t?dU(2,-24)-dU(2,-77):0,l=e<0||0===e&&1/e<0?1:0,h=0;for((e=uU(e))!=e||Infinity===e?(r=e!=e?1:0,i=c):(i=lU(hU(e)/pU),e*(a=dU(2,-i))<1&&(i--,a*=2),(e+=i+u>=1?d/a:d*dU(2,1-u))*a>=2&&(i++,a/=2),i+u>=c?(r=0,i=c):i+u>=1?(r=(e*a-1)*dU(2,t),i+=u):(r=e*dU(2,u-1)*dU(2,t),i=0));t>=8;)o[h++]=255&r,r/=256,t-=8;for(i=i<<t|r,s+=t;s>0;)o[h++]=255&i,i/=256,s-=8;return o[--h]|=128*l,o},unpack:function(e,t){var n,i=e.length,r=8*i-t-1,a=(1<<r)-1,o=a>>1,s=r-7,c=i-1,u=e[c--],d=127&u;for(u>>=7;s>0;)d=256*d+e[c--],s-=8;for(n=d&(1<<-s)-1,d>>=-s,s+=t;s>0;)n=256*n+e[c--],s-=8;if(0===d)d=1-o;else{if(d===a)return n?NaN:u?-Infinity:Infinity;n+=dU(2,t),d-=o}return(u?-1:1)*n*dU(2,d-t)}},mU=lt,_U=Pi,vU=Li,gU=function(e){for(var t=mU(this),n=vU(t),i=arguments.length,r=_U(i>1?arguments[1]:void 0,n),a=i>2?arguments[2]:void 0,o=void 0===a?n:_U(a,n);o>r;)t[r++]=e;return t},yU=C,SU=ee,bU=P,kU=iU,IU=xn,TU=In,wU=Bc,EU=x,RU=fc,CU=Ri,AU=Mi,xU=sU,PU=fU,DU=ba,OU=Ka,MU=Ii.f,NU=rn.f,LU=gU,UU=$o,VU=Ma,jU=IU.PROPER,FU=IU.CONFIGURABLE,BU=ai.get,HU=ai.set,WU=\"ArrayBuffer\",GU=\"DataView\",zU=\"Wrong index\",JU=yU.ArrayBuffer,qU=JU,KU=qU&&qU.prototype,QU=yU.DataView,XU=QU&&QU.prototype,YU=Object.prototype,$U=yU.Array,ZU=yU.RangeError,eV=SU(LU),tV=SU([].reverse),nV=PU.pack,iV=PU.unpack,rV=function(e){return[255&e]},aV=function(e){return[255&e,e>>8&255]},oV=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},sV=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},cV=function(e){return nV(e,23,4)},uV=function(e){return nV(e,52,8)},dV=function(e,t){NU(e.prototype,t,{get:function(){return BU(this)[t]}})},lV=function(e,t,n,i){var r=xU(n),a=BU(e);if(r+t>a.byteLength)throw ZU(zU);var o=BU(a.buffer).bytes,s=r+a.byteOffset,c=UU(o,s,s+t);return i?c:tV(c)},hV=function(e,t,n,i,r,a){var o=xU(n),s=BU(e);if(o+t>s.byteLength)throw ZU(zU);for(var c=BU(s.buffer).bytes,u=o+s.byteOffset,d=i(+r),l=0;l<t;l++)c[u+l]=d[a?l:t-l-1]};if(kU){var pV=jU&&JU.name!==WU;if(EU((function(){JU(1)}))&&EU((function(){new JU(-1)}))&&!EU((function(){return new JU,new JU(1.5),new JU(NaN),1!=JU.length||pV&&!FU})))pV&&FU&&TU(JU,\"name\",WU);else{(qU=function(e){return RU(this,KU),new JU(xU(e))}).prototype=KU;for(var fV,mV=MU(JU),_V=0;mV.length>_V;)(fV=mV[_V++])in qU||TU(qU,fV,JU[fV]);KU.constructor=qU}OU&&DU(XU)!==YU&&OU(XU,YU);var vV=new QU(new qU(2)),gV=SU(XU.setInt8);vV.setInt8(0,2147483648),vV.setInt8(1,2147483649),!vV.getInt8(0)&&vV.getInt8(1)||wU(XU,{setInt8:function(e,t){gV(this,e,t<<24>>24)},setUint8:function(e,t){gV(this,e,t<<24>>24)}},{unsafe:!0})}else KU=(qU=function(e){RU(this,KU);var t=xU(e);HU(this,{bytes:eV($U(t),0),byteLength:t}),bU||(this.byteLength=t)}).prototype,QU=function(e,t,n){RU(this,XU),RU(e,KU);var i=BU(e).byteLength,r=CU(t);if(r<0||r>i)throw ZU(\"Wrong offset\");if(r+(n=void 0===n?i-r:AU(n))>i)throw ZU(\"Wrong length\");HU(this,{buffer:e,byteLength:n,byteOffset:r}),bU||(this.buffer=e,this.byteLength=n,this.byteOffset=r)},XU=QU.prototype,bU&&(dV(qU,\"byteLength\"),dV(QU,\"buffer\"),dV(QU,\"byteLength\"),dV(QU,\"byteOffset\")),wU(XU,{getInt8:function(e){return lV(this,1,e)[0]<<24>>24},getUint8:function(e){return lV(this,1,e)[0]},getInt16:function(e){var t=lV(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=lV(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return sV(lV(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return sV(lV(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return iV(lV(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return iV(lV(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){hV(this,1,e,rV,t)},setUint8:function(e,t){hV(this,1,e,rV,t)},setInt16:function(e,t){hV(this,2,e,aV,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){hV(this,2,e,aV,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){hV(this,4,e,oV,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){hV(this,4,e,oV,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){hV(this,4,e,cV,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){hV(this,8,e,uV,t,arguments.length>2?arguments[2]:void 0)}});VU(qU,WU),VU(QU,GU);var yV={ArrayBuffer:qU,DataView:QU},SV=Tr,bV=ee,kV=x,IV=un,TV=Pi,wV=Mi,EV=Tg,RV=yV.ArrayBuffer,CV=yV.DataView,AV=CV.prototype,xV=bV(RV.prototype.slice),PV=bV(AV.getUint8),DV=bV(AV.setUint8);SV({target:\"ArrayBuffer\",proto:!0,unsafe:!0,forced:kV((function(){return!new RV(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(xV&&void 0===t)return xV(IV(this),e);for(var n=IV(this).byteLength,i=TV(e,n),r=TV(void 0===t?n:t,n),a=new(EV(this,RV))(wV(r-i)),o=new CV(this),s=new CV(a),c=0;i<r;)DV(s,c++,PV(o,i++));return a}}),Tr({global:!0,constructor:!0,forced:!iU},{DataView:yV.DataView});var OV=Tr,MV=ud,NV=ee([].reverse),LV=[1,2];OV({target:\"Array\",proto:!0,forced:String(LV)===String(LV.reverse())},{reverse:function(){return MV(this)&&(this.length=this.length),NV(this)}});var UV=qe,VV=lt,jV=ae,FV=Li,BV=TypeError,HV=function(e){return function(t,n,i,r){UV(n);var a=VV(t),o=jV(a),s=FV(a),c=e?s-1:0,u=e?-1:1;if(i<2)for(;;){if(c in o){r=o[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw BV(\"Reduce of empty array with no initial value\")}for(;e?c>=0:s>c;c+=u)c in o&&(r=n(r,o[c],c,a));return r}},WV={left:HV(!1),right:HV(!0)},GV=WV.left,zV=De,JV=mg;Tr({target:\"Array\",proto:!0,forced:!fl(\"reduce\")||!JV&&zV>79&&zV<83},{reduce:function(e){var t=arguments.length;return GV(this,e,t,t>1?arguments[1]:void 0)}});var qV=Jc,KV=\"ArrayBuffer\",QV=yV.ArrayBuffer;Tr({global:!0,constructor:!0,forced:C.ArrayBuffer!==QV},{ArrayBuffer:QV}),qV(KV);var XV=Tr,YV=ud,$V=Id,ZV=ye,ej=Pi,tj=Li,nj=he,ij=Jo,rj=xt,aj=Ku,oj=Hd(\"slice\"),sj=rj(\"species\"),cj=Array,uj=Math.max;XV({target:\"Array\",proto:!0,forced:!oj},{slice:function(e,t){var n,i,r,a=nj(this),o=tj(a),s=ej(e,o),c=ej(void 0===t?o:t,o);if(YV(a)&&(n=a.constructor,($V(n)&&(n===cj||YV(n.prototype))||ZV(n)&&null===(n=n[sj]))&&(n=void 0),n===cj||void 0===n))return aj(a,s,c);for(i=new(void 0===n?cj:n)(uj(c-s,0)),r=0;s<c;s++,r++)s in a&&ij(i,r,a[s]);return i.length=r,i}});var dj=C,lj=x,hj=ee,pj=du,fj=ev.trim,mj=J_,_j=dj.parseInt,vj=dj.Symbol,gj=vj&&vj.iterator,yj=/^[+-]?0x/i,Sj=hj(yj.exec),bj=8!==_j(mj+\"08\")||22!==_j(mj+\"0x16\")||gj&&!lj((function(){_j(Object(gj))}))?function(e,t){var n=fj(pj(e));return _j(n,t>>>0||(Sj(yj,n)?16:10))}:_j;Tr({global:!0,forced:parseInt!=bj},{parseInt:bj});var kj,Ij,Tj,wj={exports:{}},Ej=iU,Rj=P,Cj=C,Aj=_e,xj=ye,Pj=ft,Dj=Vo,Oj=We,Mj=In,Nj=ki,Lj=rn.f,Uj=Te,Vj=ba,jj=Ka,Fj=xt,Bj=yt,Hj=ai.enforce,Wj=ai.get,Gj=Cj.Int8Array,zj=Gj&&Gj.prototype,Jj=Cj.Uint8ClampedArray,qj=Jj&&Jj.prototype,Kj=Gj&&Vj(Gj),Qj=zj&&Vj(zj),Xj=Object.prototype,Yj=Cj.TypeError,$j=Fj(\"toStringTag\"),Zj=Bj(\"TYPED_ARRAY_TAG\"),eF=\"TypedArrayConstructor\",tF=Ej&&!!jj&&\"Opera\"!==Dj(Cj.opera),nF=!1,iF={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},rF={BigInt64Array:8,BigUint64Array:8},aF=function(e){var t=Vj(e);if(xj(t)){var n=Wj(t);return n&&Pj(n,eF)?n.TypedArrayConstructor:aF(t)}},oF=function(e){if(!xj(e))return!1;var t=Dj(e);return Pj(iF,t)||Pj(rF,t)};for(kj in iF)(Tj=(Ij=Cj[kj])&&Ij.prototype)?Hj(Tj).TypedArrayConstructor=Ij:tF=!1;for(kj in rF)(Tj=(Ij=Cj[kj])&&Ij.prototype)&&(Hj(Tj).TypedArrayConstructor=Ij);if((!tF||!Aj(Kj)||Kj===Function.prototype)&&(Kj=function(){throw Yj(\"Incorrect invocation\")},tF))for(kj in iF)Cj[kj]&&jj(Cj[kj],Kj);if((!tF||!Qj||Qj===Xj)&&(Qj=Kj.prototype,tF))for(kj in iF)Cj[kj]&&jj(Cj[kj].prototype,Qj);if(tF&&Vj(qj)!==Qj&&jj(qj,Qj),Rj&&!Pj(Qj,$j))for(kj in nF=!0,Lj(Qj,$j,{get:function(){return xj(this)?this[Zj]:void 0}}),iF)Cj[kj]&&Mj(Cj[kj],Zj,kj);var sF={NATIVE_ARRAY_BUFFER_VIEWS:tF,TYPED_ARRAY_TAG:nF&&Zj,aTypedArray:function(e){if(oF(e))return e;throw Yj(\"Target is not a typed array\")},aTypedArrayConstructor:function(e){if(Aj(e)&&(!jj||Uj(Kj,e)))return e;throw Yj(Oj(e)+\" is not a typed array constructor\")},exportTypedArrayMethod:function(e,t,n,i){if(Rj){if(n)for(var r in iF){var a=Cj[r];if(a&&Pj(a.prototype,e))try{delete a.prototype[e]}catch(qq){try{a.prototype[e]=t}catch(o){}}}Qj[e]&&!n||Nj(Qj,e,n?t:tF&&zj[e]||t,i)}},exportTypedArrayStaticMethod:function(e,t,n){var i,r;if(Rj){if(jj){if(n)for(i in iF)if((r=Cj[i])&&Pj(r,e))try{delete r[e]}catch(qq){}if(Kj[e]&&!n)return;try{return Nj(Kj,e,n?t:tF&&Kj[e]||t)}catch(qq){}}for(i in iF)!(r=Cj[i])||r[e]&&!n||Nj(r,e,t)}},getTypedArrayConstructor:aF,isView:function(e){if(!xj(e))return!1;var t=Dj(e);return\"DataView\"===t||Pj(iF,t)||Pj(rF,t)},isTypedArray:oF,TypedArray:Kj,TypedArrayPrototype:Qj},cF=C,uF=x,dF=yc,lF=sF.NATIVE_ARRAY_BUFFER_VIEWS,hF=cF.ArrayBuffer,pF=cF.Int8Array,fF=!lF||!uF((function(){pF(1)}))||!uF((function(){new pF(-1)}))||!dF((function(e){new pF,new pF(null),new pF(1.5),new pF(e)}),!0)||uF((function(){return 1!==new pF(new hF(2),1,void 0).length})),mF=Ri,_F=RangeError,vF=function(e){var t=mF(e);if(t<0)throw _F(\"The argument can't be less than 0\");return t},gF=RangeError,yF=function(e,t){var n=vF(e);if(n%t)throw gF(\"Wrong offset\");return n},SF=Vo,bF=ee(\"\".slice),kF=Vt,IF=TypeError,TF=function(e){var t=kF(e,\"number\");if(\"number\"==typeof t)throw IF(\"Can't convert number to bigint\");return BigInt(t)},wF=xs,EF=N,RF=yg,CF=lt,AF=Li,xF=qs,PF=Fs,DF=Ms,OF=function(e){return\"Big\"===bF(SF(e),0,3)},MF=sF.aTypedArrayConstructor,NF=TF,LF=Tr,UF=C,VF=N,jF=P,FF=fF,BF=sF,HF=yV,WF=fc,GF=H,zF=In,JF=VA,qF=Mi,KF=sU,QF=yF,XF=Bt,YF=ft,$F=Vo,ZF=ye,eB=Be,tB=na,nB=Te,iB=Ka,rB=Ii.f,aB=function(e){var t,n,i,r,a,o,s,c,u=RF(this),d=CF(e),l=arguments.length,h=l>1?arguments[1]:void 0,p=void 0!==h,f=PF(d);if(f&&!DF(f))for(c=(s=xF(d,f)).next,d=[];!(o=EF(c,s)).done;)d.push(o.value);for(p&&l>2&&(h=wF(h,arguments[2])),n=AF(d),i=new(MF(u))(n),r=OF(i),t=0;n>t;t++)a=p?h(d[t],t):d[t],i[t]=r?NF(a):+a;return i},oB=Vd.forEach,sB=Jc,cB=rn,uB=A,dB=Ic,lB=ai.get,hB=ai.set,pB=ai.enforce,fB=cB.f,mB=uB.f,_B=Math.round,vB=UF.RangeError,gB=HF.ArrayBuffer,yB=gB.prototype,SB=HF.DataView,bB=BF.NATIVE_ARRAY_BUFFER_VIEWS,kB=BF.TYPED_ARRAY_TAG,IB=BF.TypedArray,TB=BF.TypedArrayPrototype,wB=BF.aTypedArrayConstructor,EB=BF.isTypedArray,RB=\"BYTES_PER_ELEMENT\",CB=\"Wrong length\",AB=function(e,t){wB(e);for(var n=0,i=t.length,r=new e(i);i>n;)r[n]=t[n++];return r},xB=function(e,t){fB(e,t,{get:function(){return lB(this)[t]}})},PB=function(e){var t;return nB(yB,e)||\"ArrayBuffer\"==(t=$F(e))||\"SharedArrayBuffer\"==t},DB=function(e,t){return EB(e)&&!eB(t)&&t in e&&JF(+t)&&t>=0},OB=function(e,t){return t=XF(t),DB(e,t)?GF(2,e[t]):mB(e,t)},MB=function(e,t,n){return t=XF(t),!(DB(e,t)&&ZF(n)&&YF(n,\"value\"))||YF(n,\"get\")||YF(n,\"set\")||n.configurable||YF(n,\"writable\")&&!n.writable||YF(n,\"enumerable\")&&!n.enumerable?fB(e,t,n):(e[t]=n.value,e)};jF?(bB||(uB.f=OB,cB.f=MB,xB(TB,\"buffer\"),xB(TB,\"byteOffset\"),xB(TB,\"byteLength\"),xB(TB,\"length\")),LF({target:\"Object\",stat:!0,forced:!bB},{getOwnPropertyDescriptor:OB,defineProperty:MB}),wj.exports=function(e,t,n){var i=e.match(/\\d+$/)[0]/8,r=e+(n?\"Clamped\":\"\")+\"Array\",a=\"get\"+e,o=\"set\"+e,s=UF[r],c=s,u=c&&c.prototype,d={},l=function(e,t){fB(e,t,{get:function(){return function(e,t){var n=lB(e);return n.view[a](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=lB(e);n&&(r=(r=_B(r))<0?0:r>255?255:255&r),a.view[o](t*i+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};bB?FF&&(c=t((function(e,t,n,r){return WF(e,u),dB(ZF(t)?PB(t)?void 0!==r?new s(t,QF(n,i),r):void 0!==n?new s(t,QF(n,i)):new s(t):EB(t)?AB(c,t):VF(aB,c,t):new s(KF(t)),e,c)})),iB&&iB(c,IB),oB(rB(s),(function(e){e in c||zF(c,e,s[e])})),c.prototype=u):(c=t((function(e,t,n,r){WF(e,u);var a,o,s,d=0,h=0;if(ZF(t)){if(!PB(t))return EB(t)?AB(c,t):VF(aB,c,t);a=t,h=QF(n,i);var p=t.byteLength;if(void 0===r){if(p%i)throw vB(CB);if((o=p-h)<0)throw vB(CB)}else if((o=qF(r)*i)+h>p)throw vB(CB);s=o/i}else s=KF(t),a=new gB(o=s*i);for(hB(e,{buffer:a,byteOffset:h,byteLength:o,length:s,view:new SB(a)});d<s;)l(e,d++)})),iB&&iB(c,IB),u=c.prototype=tB(TB)),u.constructor!==c&&zF(u,\"constructor\",c),pB(u).TypedArrayConstructor=c,kB&&zF(u,kB,r);var h=c!=s;d[r]=c,LF({global:!0,constructor:!0,forced:h,sham:!bB},d),RB in c||zF(c,RB,i),RB in u||zF(u,RB,i),sB(r)}):wj.exports=function(){},(0,wj.exports)(\"Uint8\",(function(e){return function(t,n,i){return e(this,t,n,i)}}));var NB=lt,LB=Pi,UB=Li,VB=Zd,jB=Math.min,FB=[].copyWithin||function(e,t){var n=NB(this),i=UB(n),r=LB(e,i),a=LB(t,i),o=arguments.length>2?arguments[2]:void 0,s=jB((void 0===o?i:LB(o,i))-a,i-r),c=1;for(a<r&&r<a+s&&(c=-1,a+=s-1,r+=s-1);s-- >0;)a in n?n[r]=n[a]:VB(n,r),r+=c,a+=c;return n},BB=sF,HB=ee(FB),WB=BB.aTypedArray;(0,BB.exportTypedArrayMethod)(\"copyWithin\",(function(e,t){return HB(WB(this),e,t,arguments.length>2?arguments[2]:void 0)}));var GB=Vd.every,zB=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"every\",(function(e){return GB(zB(this),e,arguments.length>1?arguments[1]:void 0)}));var JB=gU,qB=TF,KB=Vo,QB=N,XB=x,YB=sF.aTypedArray,$B=sF.exportTypedArrayMethod,ZB=ee(\"\".slice);$B(\"fill\",(function(e){var t=arguments.length;YB(this);var n=\"Big\"===ZB(KB(this),0,3)?qB(e):+e;return QB(JB,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),XB((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var eH=Li,tH=Tg,nH=sF.aTypedArrayConstructor,iH=sF.getTypedArrayConstructor,rH=function(e){return nH(tH(e,iH(e)))},aH=function(e,t){for(var n=0,i=eH(t),r=new e(i);i>n;)r[n]=t[n++];return r},oH=rH,sH=Vd.filter,cH=function(e,t){return aH(oH(e),t)},uH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"filter\",(function(e){var t=sH(uH(this),e,arguments.length>1?arguments[1]:void 0);return cH(this,t)}));var dH=Vd.find,lH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"find\",(function(e){return dH(lH(this),e,arguments.length>1?arguments[1]:void 0)}));var hH=Vd.findIndex,pH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"findIndex\",(function(e){return hH(pH(this),e,arguments.length>1?arguments[1]:void 0)}));var fH=Vd.forEach,mH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"forEach\",(function(e){fH(mH(this),e,arguments.length>1?arguments[1]:void 0)}));var _H=Bi.includes,vH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"includes\",(function(e){return _H(vH(this),e,arguments.length>1?arguments[1]:void 0)}));var gH=Bi.indexOf,yH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"indexOf\",(function(e){return gH(yH(this),e,arguments.length>1?arguments[1]:void 0)}));var SH=C,bH=x,kH=ee,IH=sF,TH=Co,wH=xt(\"iterator\"),EH=SH.Uint8Array,RH=kH(TH.values),CH=kH(TH.keys),AH=kH(TH.entries),xH=IH.aTypedArray,PH=IH.exportTypedArrayMethod,DH=EH&&EH.prototype,OH=!bH((function(){DH[wH].call([1])})),MH=!!DH&&DH.values&&DH[wH]===DH.values&&\"values\"===DH.values.name,NH=function(){return RH(xH(this))};PH(\"entries\",(function(){return AH(xH(this))}),OH),PH(\"keys\",(function(){return CH(xH(this))}),OH),PH(\"values\",NH,OH||!MH,{name:\"values\"}),PH(wH,NH,OH||!MH,{name:\"values\"});var LH=sF.aTypedArray,UH=sF.exportTypedArrayMethod,VH=ee([].join);UH(\"join\",(function(e){return VH(LH(this),e)}));var jH=qu,FH=he,BH=Ri,HH=Li,WH=fl,GH=Math.min,zH=[].lastIndexOf,JH=!!zH&&1/[1].lastIndexOf(1,-0)<0,qH=WH(\"lastIndexOf\"),KH=JH||!qH?function(e){if(JH)return jH(zH,this,arguments)||0;var t=FH(this),n=HH(t),i=n-1;for(arguments.length>1&&(i=GH(i,BH(arguments[1]))),i<0&&(i=n+i);i>=0;i--)if(i in t&&t[i]===e)return i||0;return-1}:zH,QH=qu,XH=KH,YH=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"lastIndexOf\",(function(e){var t=arguments.length;return QH(XH,YH(this),t>1?[e,arguments[1]]:[e])}));var $H=Vd.map,ZH=rH,eW=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"map\",(function(e){return $H(eW(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(ZH(e))(t)}))}));var tW=WV.left,nW=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"reduce\",(function(e){var t=arguments.length;return tW(nW(this),e,t,t>1?arguments[1]:void 0)}));var iW=WV.right,rW=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"reduceRight\",(function(e){var t=arguments.length;return iW(rW(this),e,t,t>1?arguments[1]:void 0)}));var aW=sF.aTypedArray,oW=sF.exportTypedArrayMethod,sW=Math.floor;oW(\"reverse\",(function(){for(var e,t=this,n=aW(t).length,i=sW(n/2),r=0;r<i;)e=t[r],t[r++]=t[--n],t[n]=e;return t}));var cW=C,uW=N,dW=sF,lW=Li,hW=yF,pW=lt,fW=x,mW=cW.RangeError,_W=cW.Int8Array,vW=_W&&_W.prototype,gW=vW&&vW.set,yW=dW.aTypedArray,SW=dW.exportTypedArrayMethod,bW=!fW((function(){var e=new Uint8ClampedArray(2);return uW(gW,e,{length:1,0:3},1),3!==e[1]})),kW=bW&&dW.NATIVE_ARRAY_BUFFER_VIEWS&&fW((function(){var e=new _W(2);return e.set(1),e.set(\"2\",1),0!==e[0]||2!==e[1]}));SW(\"set\",(function(e){yW(this);var t=hW(arguments.length>1?arguments[1]:void 0,1),n=pW(e);if(bW)return uW(gW,this,n,t);var i=this.length,r=lW(n),a=0;if(r+t>i)throw mW(\"Wrong length\");for(;a<r;)this[t+a]=n[a++]}),!bW||kW);var IW=rH,TW=Ku,wW=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"slice\",(function(e,t){for(var n=TW(wW(this),e,t),i=IW(this),r=0,a=n.length,o=new i(a);a>r;)o[r]=n[r++];return o}),x((function(){new Int8Array(1).slice()})));var EW=Vd.some,RW=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"some\",(function(e){return EW(RW(this),e,arguments.length>1?arguments[1]:void 0)}));var CW=we.match(/firefox\\/(\\d+)/i),AW=!!CW&&+CW[1],xW=/MSIE|Trident/.test(we),PW=we.match(/AppleWebKit\\/(\\d+)\\./),DW=!!PW&&+PW[1],OW=ee,MW=x,NW=qe,LW=yf,UW=AW,VW=xW,jW=De,FW=DW,BW=sF.aTypedArray,HW=sF.exportTypedArrayMethod,WW=C.Uint16Array,GW=WW&&OW(WW.prototype.sort),zW=!(!GW||MW((function(){GW(new WW(2),null)}))&&MW((function(){GW(new WW(2),{})}))),JW=!!GW&&!MW((function(){if(jW)return jW<74;if(UW)return UW<67;if(VW)return!0;if(FW)return FW<602;var e,t,n=new WW(516),i=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,i[e]=e-2*t+3;for(GW(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==i[e])return!0}));HW(\"sort\",(function(e){return void 0!==e&&NW(e),JW?GW(this,e):LW(BW(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!JW||zW);var qW=Mi,KW=Pi,QW=rH,XW=sF.aTypedArray;(0,sF.exportTypedArrayMethod)(\"subarray\",(function(e,t){var n=XW(this),i=n.length,r=KW(e,i);return new(QW(n))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,qW((void 0===t?i:KW(t,i))-r))}));var YW=qu,$W=sF,ZW=x,eG=Ku,tG=C.Int8Array,nG=$W.aTypedArray,iG=$W.exportTypedArrayMethod,rG=[].toLocaleString,aG=!!tG&&ZW((function(){rG.call(new tG(1))}));iG(\"toLocaleString\",(function(){return YW(rG,aG?eG(nG(this)):nG(this),eG(arguments))}),ZW((function(){return[1,2].toLocaleString()!=new tG([1,2]).toLocaleString()}))||!ZW((function(){tG.prototype.toLocaleString.call([1,2])})));var oG=sF.exportTypedArrayMethod,sG=x,cG=ee,uG=C.Uint8Array,dG=uG&&uG.prototype||{},lG=[].toString,hG=cG([].join);sG((function(){lG.call({})}))&&(lG=function(){return hG(this)});var pG=dG.toString!=lG;oG(\"toString\",lG,pG);var fG=function(){function e(t,n,i){o(this,e),this.isUplink_=i,this.connection_=t,this.log_=n,this.seiMessageList_=[],this.smallVideoSeiMessageList_=[],this.seiPayloadType_=243,this.runningAbortMap_=new Map,this.abortMap_=new Map,this.onSEIMessage=null}return c(e,[{key:\"isRunning\",get:function(){return!!this.runningAbortMap_.size>0}},{key:\"start\",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.seiMessageList_,i=e.createEncodedStreams(),r=i.readable,a=i.writable,o=new TransformStream({transform:this.isUplink_?function(e,i){return t.encodeVideoFrame(e,i,n)}:function(n,i){var r,a;return t.decodeVideoFrame(n,i,e===(null===(r=t.connection_)||void 0===r||null===(a=r.getPeerConnection())||void 0===a?void 0:a.getReceivers()[aT]))}}),s=new AbortController;r.pipeThrough(o).pipeTo(a,{signal:s.signal}).catch((function(){})),this.runningAbortMap_.set(e,s)}},{key:\"restart\",value:function(e,t){this.stop(),this.start(e,t)}},{key:\"stop\",value:function(e){var t;null===(t=this.runningAbortMap_.get(e))||void 0===t||t.abort(),this.runningAbortMap_.delete(e)}},{key:\"destroy\",value:function(){this.stop(),this.runningAbortMap_.forEach((function(e){return e.abort()})),this.runningAbortMap_.clear(),this.abortMap_.forEach((function(e){return e.abort()})),this.abortMap_.clear(),this.log_=null,this.onSEIMessage=null,this.connection_=null}},{key:\"handleEncodedStreams\",value:function(){var e=this;try{var t=this.connection_.getPeerConnection();this.clearUnusedSenderOrReceiver(t),this.isUplink_?t.getSenders().forEach((function(t,n){if(!e.runningAbortMap_.has(t)&&!e.abortMap_.has(t))if(n===nT||n===iT){var i=n===iT?e.smallVideoSeiMessageList_:e.seiMessageList_;e.isRunning?e.restart(t,i):e.start(t,i)}else e.pipeSenderOrReceiver(t)})):t.getReceivers().forEach((function(t,n){var i;e.runningAbortMap_.has(t)||e.abortMap_.has(t)||(n!==rT&&n!==aT||(null===(i=t.track)||void 0===i?void 0:i.kind)!==wb?e.pipeSenderOrReceiver(t):e.isRunning?e.restart(t):e.start(t))}))}catch(qq){this.log_.warn(qq)}}},{key:\"pipeSenderOrReceiver\",value:function(e){var t=e.createEncodedStreams(),n=t.readable,i=t.writable,r=new AbortController;this.abortMap_.set(e,r),n.pipeTo(i,{signal:r.signal}).catch((function(){}))}},{key:\"clearUnusedSenderOrReceiver\",value:function(e){var t=this;this.abortMap_.forEach((function(n,i){(t.isUplink_?e.getSenders():e.getReceivers()).find((function(e){return e===i}))||(n.abort(),t.abortMap_.delete(i))}))}},{key:\"push\",value:function(e,t){t&&t.seiPayloadType&&(this.seiPayloadType_=t.seiPayloadType),this.seiMessageList_.push(e),this.smallVideoSeiMessageList_.push(e)}},{key:\"hasSEI\",value:function(e){var t=new DataView(e);return 1===t.getInt32(0)&&6===t.getInt8(4)}},{key:\"isEmptyFrame\",value:function(e){return\"empty\"===e.type||0===e.data.byteLength}},{key:\"getNaluCount\",value:function(e){for(var t=0,n=0,i=new DataView(e),r=0;r<e.byteLength;r++)switch(i.getUint8(r)){case 0:t++;break;case 1:2!==t&&3!==t||n++,t=0;break;default:t=0}return n}},{key:\"encodeVideoFrame\",value:function(e,t,n){try{if(this.connection_.isH264&&n.length>0&&!this.isEmptyFrame(e)){var i=9-this.getNaluCount(e.data);if(i<=0)return;for(var r=n.splice(0,i).reverse().map(this.encodeSEINalu.bind(this)),a=r.reduce((function(e,t){return e+t.dataView.byteLength}),0),o=new ArrayBuffer(a+e.data.byteLength),s=new DataView(o),c=new DataView(e.data),u=0,d=0;d<r.length;d++)for(var l=0;l<r[d].dataView.byteLength;l++)s.setInt8(u++,r[d].dataView.getInt8(l));for(var h=0;h<e.data.byteLength;h++)s.setInt8(u++,c.getInt8(h));e.data=o,this.log_.debug(\"\".concat(r.length,\" sei sent\"))}}catch(qq){this.log_.warn(qq)}t.enqueue(e)}},{key:\"decodeVideoFrame\",value:function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{if(this.connection_.isH264&&!this.isEmptyFrame(e)&&this.hasSEI(e.data)){for(var r=[],a=new DataView(e.data),o=0,s=-1,c=-1,u=0;u<e.data.byteLength;u++){var d=a.getUint8(u);if(0===d)o++;else if(1===d){if(2===o||3===o){var l=u-o;-1===s?s=l:-1===c&&(c=l,r.push(new mG(new DataView(a.buffer.slice(s,c)))),s=l,c=-1);var h=6===a.getUint8(u+1);if(!h){e.data=new DataView(a.buffer.slice(l)).buffer;break}}o=0}else o=0}this.log_.debug(\"\".concat(r.length,\" sei received\")),sC(this.onSEIMessage)&&r.reverse().forEach((function(e){n.onSEIMessage({seiPayloadType:e.seiPayloadType,data:e.seiPayload.buffer,isFromAuxiliary:i})}))}}catch(qq){this.log_.warn(qq)}t.enqueue(e)}},{key:\"encodeSEINalu\",value:function(e){var t=e.byteLength,n=parseInt(t/255),i=t%255,r=[];r.push(0,0,0,1,6,this.seiPayloadType_);for(var a=0;a<n;a++)r.push(255);r.push(i);var o=new DataView(e);return r.push.apply(r,b(new Uint8Array(o.buffer))),r.push(128),new mG(new DataView(new Uint8Array(r).buffer),!0)}}]),e}(),mG=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o(this,e),this.dataView=t,this.isSEI&&(n?this.addPreventionByte():this.removePreventionByte())}return c(e,[{key:\"addPreventionByte\",value:function(){for(var e=this.seiPayloadStartIndex,t=this.dataView.byteLength-2,n=[],i=0,r=e;r<=t;r++){var a=this.dataView.getInt8(r);switch(a){case 0:case 1:case 2:case 3:2===i&&(n.push(3),i=0),0==a?i++:i=0,n.push(a);break;default:i=0,n.push(a)}}n.push(this.dataView.getInt8(this.dataView.byteLength-1));var o=new DataView(new Uint8Array([].concat(b(new Uint8Array(this.dataView.buffer).slice(0,e)),n)).buffer);this.dataView=o}},{key:\"removePreventionByte\",value:function(){for(var e=this.seiPayloadStartIndex,t=this.dataView.byteLength-1,n=[],i=0,r=e;r<=t;r++)switch(this.dataView.getInt8(r)){case 0:i++,n.push(this.dataView.getInt8(r));break;case 3:2!==i&&n.push(this.dataView.getInt8(r)),i=0;break;default:n.push(this.dataView.getInt8(r)),i=0}var a=new DataView(new Uint8Array([].concat(b(new Uint8Array(this.dataView.buffer).slice(0,e)),n)).buffer);this.dataView=a}},{key:\"isSEI\",get:function(){return 6===this.dataView.getUint8(4)}},{key:\"seiPayloadStartIndex\",get:function(){for(var e=6,t=6;t<this.dataView.buffer.byteLength&&(e++,255===this.dataView.getUint8(t));t++);return e}},{key:\"seiPayloadType\",get:function(){return this.isSEI?this.dataView.getUint8(5):null}},{key:\"seiPayload\",get:function(){if(!this.isSEI)return null;for(var e=0,t=6,n=6;n<this.dataView.buffer.byteLength;n++){var i=this.dataView.getUint8(n);if(t++,255!==i){e+=i;break}e+=255}for(var r=new ArrayBuffer(e),a=new DataView(r),o=0;o<r.byteLength;o++,t++)a.setInt8(o,this.dataView.getInt8(t));return a}}]),e}(),_G=function(){function e(t){o(this,e),this.userId_=t.userId,this.tinyId_=t.tinyId,this.client_=t.client,this.sdpSemantics_=t.client.getSdpSemantics(),this.isUplink_=t.isUplink,this.log_=MA.createLogger({id:\"n|\"+this.userId_,userId:this.client_.getUserId(),sdkAppId:this.client_.getSDKAppId(),isLocal:this.isUplink_}),this.signalChannel_=t.signalChannel,this.peerConnection_=null,this.isErrorObserved_=!1,this.emitter_=new DC,this.currentState_=Pk,this.waitForPeerConnectionConnectedPromise_=null,this.isReconnecting_=!1,this.reconnectionCount_=0,this.reconnectionTimer_=-1,this.isFirstConnection_=!0,this.delay_={audioDelay:0,videoDelay:0},this.enableSEI_=t.enableSEI,this.enableSEI_&&kO&&(this.sei_=new fG(this,this.log_,this.isUplink_))}var t;return c(e,[{key:\"initialize\",value:function(){var e={encodedInsertableStreams:this.enableSEI_&&kO,iceServers:this.client_.getIceServers(),iceTransportPolicy:this.client_.getIceTransportPolicy(),sdpSemantics:this.sdpSemantics_,bundlePolicy:\"max-bundle\",rtcpMuxPolicy:\"require\",tcpCandidatePolicy:\"disable\",IceTransportsType:\"nohost\"};this.peerConnection_=new RTCPeerConnection(e),this.peerConnection_.onconnectionstatechange=this.onConnectionStateChange.bind(this)}},{key:\"close\",value:function(){this.log_.info(\"closing connection\"),this.closePeerConnection(),this.sei_&&(this.sei_.destroy(),this.sei_=null)}},{key:\"closePeerConnection\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.peerConnection_&&(this.peerConnection_.onconnectionstatechange=function(){},this.peerConnection_.close(),this.peerConnection_=null,e&&this.emitConnectionStateChangedEvent(Pk))}},{key:\"getDTLSTransportState\",value:function(){if(!this.peerConnection_)return xk;var e=null;if(this.isUplink_){if(!mO()||0===this.peerConnection_.getSenders().length)return xk;e=this.peerConnection_.getSenders()[0].transport}else{if(!fO()||0===this.peerConnection_.getReceivers().length)return xk;e=this.peerConnection_.getReceivers()[0].transport}return e?e.state:xk}},{key:\"onConnectionStateChange\",value:function(e){var t=this.peerConnection_.iceConnectionState,n=this.getDTLSTransportState();if(this.log_.info(\"onConnectionStateChange() connectionState: \"+e.target.connectionState),this.log_.info(\"ICE Transport state: \".concat(t,\", DTLS Transport state: \").concat(n)),e.target.connectionState===Lk&&this.emitConnectionStateChangedEvent(Dk),e.target.connectionState===Uk||e.target.connectionState===Vk){var i=\"\".concat(this.isUplink_?\"uplink\":\"downlink\",\" ICE/DTLS Transport connection \").concat(e.target.connectionState,\". ICE Transport state: \").concat(t,\", DTLS Transport state: \").concat(n),r=new vP({message:i,code:_P.ICE_TRANSPORT_ERROR});oD.logFailedEvent({userId:this.client_.getUserId(),eventType:aI,error:r}),this.emitConnectionStateChangedEvent(Pk),this.isErrorObserved_||this.emitter_.emit(OO.ERROR,r)}e.target.connectionState!==Fk&&e.target.connectionState!==Bk||(this.logSelectedCandidate(),oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:aI}),this.emitConnectionStateChangedEvent(Mk))}},{key:\"emitConnectionStateChangedEvent\",value:function(e){e!==this.currentState_&&(this.currentState_===Ok&&e===Dk||(OC.emit(IA,{client:this.client_,connection:this,prevState:this.currentState_,state:e}),this.emitter_.emit(OO.CONNECTION_STATE_CHANGED,{prevState:this.currentState_,state:e}),this.currentState_=e))}},{key:\"hitTest\",value:function(e){return(0===e||\"0\"===e)&&this.isUplink_||e===this.tinyId_}},{key:\"addEventInternal\",value:function(e,t){var n=this.client_.getUserId(),i={eventId:e,eventDesc:t,timestamp:Gm(),userId:n,tinyId:this.client_.getTinyId()};this.isUplink_||(i.remoteUserId=this.userId_,i.remoteTinyId=this.tinyId_),tD(n,i)}},{key:\"getPeerConnection\",value:function(){return this.peerConnection_}},{key:\"getClient\",value:function(){return this.client_}},{key:\"getUserId\",value:function(){return this.userId_}},{key:\"getTinyId\",value:function(){return this.tinyId_}},{key:\"logSelectedCandidate\",value:(t=a(n().mark((function e(){var t,i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerConnection_){e.next=2;break}return e.abrupt(\"return\");case 2:return e.next=4,this.peerConnection_.getStats();case 4:t=e.sent,i=T(t),e.prev=6,i.s();case 8:if((r=i.n()).done){e.next=18;break}if((a=S(r.value,2))[0],!IO(o=a[1])){e.next=16;break}return s=t.get(o.localCandidateId),c=t.get(o.remoteCandidateId),s&&this.log_.info(\"local candidate: \".concat(s.candidateType,\" \").concat(s.protocol,\":\").concat(s.ip||s.address,\":\").concat(s.port,\" \").concat(s.networkType||\"\",\" \").concat(\"relay\"===s.candidateType?\"relayProtocol:\"+s.relayProtocol:\"\")),c&&this.log_.info(\"remote candidate: \".concat(c.candidateType,\" \").concat(c.protocol,\":\").concat(c.ip||c.address,\":\").concat(c.port)),e.abrupt(\"break\",18);case 16:e.next=8;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(6),i.e(e.t0);case 23:return e.prev=23,i.f(),e.finish(23);case 26:case\"end\":return e.stop()}}),e,this,[[6,20,23,26]])}))),function(){return t.apply(this,arguments)})},{key:\"getCurrentState\",value:function(){return this.currentState_}},{key:\"waitForPeerConnectionConnected\",value:function(){var e=this;return this.waitForPeerConnectionConnectedPromise_||(this.waitForPeerConnectionConnectedPromise_=new Promise((function(t,n){if(e.currentState_===Mk)return t();var i=-1,r=function(e){e.state===Mk&&(clearTimeout(i),o(),t())},a=function(t){t.client===e.client_&&(clearTimeout(i),o(),n(new vP({code:_P.API_CALL_ABORTED,message:ZR({key:wE,data:\"leave room\"})})))},o=function(){OC.off(BC,a,e),e.emitter_.off(OO.CONNECTION_STATE_CHANGED,r,e)};i=setTimeout((function(){o();var e=new vP({code:_P.API_CALL_TIMEOUT,message:\"connection timeout\"});n(e)}),1e4),OC.on(BC,a,e),e.emitter_.on(OO.CONNECTION_STATE_CHANGED,r,e)})),this.waitForPeerConnectionConnectedPromise_=this.waitForPeerConnectionConnectedPromise_.then((function(t){return e.waitForPeerConnectionConnectedPromise_=null,t})).catch((function(t){throw e.waitForPeerConnectionConnectedPromise_=null,t}))),this.waitForPeerConnectionConnectedPromise_}},{key:\"getReconnectionCount\",value:function(){return this.reconnectionCount_}},{key:\"startReconnection\",value:function(){this.isReconnecting_=!0,this.emitConnectionStateChangedEvent(Ok),this.reconnect(),this.addEventInternal(this.isUplink_?JP:QP,\"\".concat(this.isUplink_?\"uplink\":\"downlink\",\"-connection is reconnecting\"))}},{key:\"stopReconnection\",value:function(){this.log_.info(\"stop reconnection\"),this.isReconnecting_=!1,this.reconnectionCount_=0,this.clearReconnectionTimer(),this.signalChannel_.off(Bx,this.reconnect,this)}},{key:\"on\",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:\"off\",value:function(e,t,n){this.emitter_.off(e,t,n)}},{key:\"setDelay\",value:function(e){var t=e.audioDelay,n=e.videoDelay;this.delay_={audioDelay:t,videoDelay:n}}},{key:\"getDelay\",value:function(){return this.delay_}},{key:\"isH264\",get:function(){var e,t;return!(null===(e=this.peerConnection_)||void 0===e||null===(t=e.remoteDescription)||void 0===t||!t.sdp.includes(\"H264\"))}}]),e}(),vG=function(){function ClientManager(){o(this,ClientManager),this.set_=new Set,OC.on(MC,this.add,this),OC.on(UC,this.add,this),OC.on(VC,this.delete,this),OC.on(BC,this.delete,this)}return c(ClientManager,[{key:\"add\",value:function(e){var t=e.client,n=e.roomId;if(\"rtc\"!==t.getMode()){var i=this.getKey(t.getUserId(),n||t.getRoomId(),t.getSDKAppId(),t.getUseStringRoomId());this.set_.add(i)}}},{key:\"delete\",value:function(e){var t=e.client;if(\"rtc\"!==t.getMode()){var n=this.getKey(t.getUserId(),t.getRoomId(),t.getSDKAppId(),t.getUseStringRoomId());this.set_.delete(n)}}},{key:\"getKey\",value:function(e,t,n,i){return\"\".concat(n,\"_\").concat(t,\"_\").concat(e,\"_\").concat(i)}},{key:\"isJoined\",value:function(e){var t=e.userId,n=e.roomId,i=e.sdkAppId,r=e.client;return\"rtc\"!==r.getMode()&&this.set_.has(this.getKey(t,n,i,r.getUseStringRoomId()))}}]),ClientManager}(),gG=new vG;function yG(e,t,n,i){if(this.useStringRoomId_){if(!(uC(e)&&/^[A-Za-z\\d\\s!#$%&()+\\-:;<=.>?@[\\]^_{}|~,]{1,64}$/.test(e)))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:GT,data:t,link:{className:i,fnName:n}})})}else if(!(dC(e)&&/^[1-9]\\d*$/.test(String(e))&&e<4294967295))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:zT,data:t,link:{className:i,fnName:n}})})}function SG(e,t,n,i){if(!/^[A-Za-z\\d_-]*$/.test(e))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:dw,data:t,link:{className:i,fnName:n}})})}var bG={createClient:{name:\"clientConfig\",required:!0,type:EI,properties:{sdkAppId:{required:!0,type:II,allowEmpty:!1},userId:{required:!0,type:kI,allowEmpty:!1},userSig:{required:!0,type:kI,allowEmpty:!1},mode:{required:!0,type:kI,values:[\"rtc\",Sk]},useStringRoomId:{type:TI},autoSubscribe:{type:TI},enableAutoPlayDialog:{type:TI},streamId:{type:kI},userDefineRecordId:{type:kI},pureAudioPushMode:{type:II,values:[1,2]},enableSEI:{type:TI}}},createStream:{name:\"streamConfig\",required:!0,type:EI,properties:{userId:{type:kI},audio:{type:TI},video:{type:TI},screen:{type:TI},screenAudio:{type:TI},microphoneId:{type:kI},cameraId:{type:kI},facingMode:{type:[kI,EI]},audioSource:{instanceOf:window.MediaStreamTrack},videoSource:{instanceOf:window.MediaStreamTrack}},validate:function(e){if(!cC(e.screen)&&e.screen&&cC(e.audio)&&(e.audio=!1),!(cC(e.audio)&&cC(e.video)||cC(e.audioSource)&&cC(e.videoSource)))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:$w})});if(!cC(e.screen)&&!0===e.screen&&!0===e.video)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Zw})});if(e.audio&&e.screenAudio)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:eE})});if(!0!==e.screen&&!0===e.screenAudio)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:tE})});if(!cC(e.screen)&&!0===e.screen&&!this.isScreenShareSupported())throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:uE})})}}},kG={join:{name:\"options\",required:!0,type:EI,properties:{roomId:{required:!0,type:[II,kI],allowEmpty:!1,validate:yG},role:{type:[kI],values:[Ik,Tk]},privateMapKey:{type:[kI]}},validate:function(e){if(this.isJoined_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:WT})});if(this.checkDestroy(),gG.isJoined({userId:this.userId_,roomId:e.roomId,sdkAppId:this.sdkAppId_,client:this}))throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Uw,data:this.userId_})})}},publish:[{name:\"stream\",required:!0,instanceOf:WI,validate:function(e){if(!this.isJoined_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:XT})});if(this.mode_===Sk&&this.role_===Tk)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:$T})});if(!e.getIsReadyToPublish())throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:ZT})});if(this.notPublishWithoutH264Supported_)throw new vP({code:_P.NOT_SUPPORTED_H264,message:ZR({key:aE})})}},{name:\"options\",type:EI,defaultValue:{isAuxiliary:!1},properties:{isAuxiliary:{type:TI,defaultValue:!1,validate:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e&&!vO())throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:dE})});if(this.uplinkConnection_&&(e&&this.uplinkConnection_.isAuxStreamPublished||!e&&this.uplinkConnection_.isMainStreamPublished))throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:ew,data:e?Ab:\"local\"})});var t=this.localScreenStream_||b(this.connections_.values()).findIndex((function(e){return e.getTrackState().auxiliary}))>=0;if(!this.enableMultiAuxStream_&&e&&t)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:RE})})}}}}],unpublish:{name:\"stream\",required:!0,instanceOf:WI,validate:function(e){if(e!==this.localStream_&&e!==this.localAuxStream_){if(this.localStream_||this.localAuxStream_)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:YT})});this.log_.warn(\"Client currently has no published stream, please call publish() first.\")}}},subscribe:[{name:\"stream\",required:!0,instanceOf:GI,validate:function(e){if(!e.getConnection())throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:tw})});if(this.notSubscribeWithoutH264Supported_)throw new vP({code:_P.NOT_SUPPORTED_H264,message:ZR({key:oE})})}},{name:\"options\",type:EI,properties:{audio:{type:TI},video:{type:TI},smallVideo:{type:TI}},validate:function(e){var t=e.audio,n=e.video,i=e.smallVideo;if(!1===t&&!1===n&&(cC(i)||!1===i))throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:vE})})}}],unsubscribe:{name:\"stream\",required:!0,instanceOf:GI,validate:function(e){if(!e.getConnection())throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:tw})})}},switchRole:{name:\"role\",required:!0,values:[Ik,Tk],validate:function(){if(this.mode_!==Sk)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:iw})});if(!this.isJoined_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:rw})})}},startPublishCDNStream:{name:\"options\",required:!1,properties:{streamId:{type:kI,validate:SG},streamType:{type:kI,values:[\"main\",\"auxiliary\"]},appId:{type:II,allowEmpty:!1},bizId:{type:II,allowEmpty:!1},url:{type:kI,allowEmpty:!1}},validate:function(){if(this.isDestroyed_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Vw,data:{funName:\"startPublishCDNStream\"}})})}},startMixTranscode:{name:\"config\",required:!0,type:EI,properties:{mode:{type:kI,values:[\"preset-layout\",\"manual\"]},streamId:{type:kI,validate:SG},videoWidth:{type:II,notLessThanZero:!0},videoHeight:{type:II,notLessThanZero:!0},videoBitrate:{type:II,notLessThanZero:!0,allowEmpty:!1},videoFramerate:{type:II,validate:function(e,t,n,i){if(e<=0||e>30)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Ww,link:{className:i,fnName:n}})})}},videoGOP:{type:II,validate:function(e,t,n,i){if(e<1||e>8)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Gw,link:{className:i,fnName:n}})})}},audioSampleRate:{type:II,notLessThanZero:!0},audioBitrate:{type:II,validate:function(e,t,n,i){if(e<32||e>192)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:zw,link:{className:i,fnName:n}})})}},audioChannels:{type:II,values:[1,2]},backgroundColor:{type:II},backgroundImage:{type:kI},mixUsers:{required:!0,type:wI,arrayItem:{require:!0,type:EI,properties:{userId:{required:!0,type:kI},roomId:{type:[kI,II],validate:yG},pureAudio:{type:TI},width:{type:II,notLessThanZero:!0},height:{type:II,notLessThanZero:!0},locationX:{type:II,notLessThanZero:!0},locationY:{type:II,notLessThanZero:!0},zOrder:{type:II},streamType:{type:kI,values:[\"main\",\"auxiliary\"]},renderMode:{type:II,values:[0,1,2,4]}}}}},validate:function(e,t,n,i,r){var a=0,o=0,s=e.mixUsers,c=[];if(s.forEach((function(e,t){if(c.push(e.userId),!e.pureAudio){if(!e.zOrder||e.zOrder<1||e.zOrder>15)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Jw,data:\"config.mixUsers[\".concat(t,\"].zOrder\"),link:{className:i,fnName:n}})});e.width+e.locationX>a&&(a=e.width+e.locationX),e.height+e.locationY>o&&(o=e.height+e.locationY)}})),c.indexOf(this.getUserId())<0)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:qw,link:{className:i,fnName:n}})});if(e.videoWidth<a||e.videoHeight<o)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Kw,link:{className:i,fnName:n}})})}},sendSEIMessage:[{name:\"buffer\",required:!0,instanceOf:ArrayBuffer,validate:function(e){if(!kO)throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:gE})});if(!this.enableSEI_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:yE})});if(e.byteLength>1e3)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:bE,data:e.byteLength})});if(0===e.byteLength)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:SE})});if(!this.uplinkConnection_||!this.localStream_)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:kE})});if(!this.localStream_.hasVideo())throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:IE})});var t=this.uplinkConnection_.isH264;if(!t)throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:gE,data:t})})}},{name:\"options\",type:EI,properties:{seiPayloadType:{type:II,values:[5,243]}}}]},IG={switchDevice:[{name:\"type\",required:!0,type:kI,values:[Tb,wb]},{name:\"deviceId\",required:!0,type:kI,validate:function(){if(this.screen_&&!this.audio_||this.audioSource_||this.videoSource_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:bw})});if(this.publishState_===xI)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:kw})});if(!gO())throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:cE})})}}],setAudioCaptureVolume:{name:\"volume\",type:II}},TG={play:[{name:\"elementId\",required:!0,type:[kI,\"HTMLDivElement\"],validate:function(e,t,n){if(uC(e)){var i=document.getElementById(e);if(!i)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Qw,data:{key:t,fnName:n}})});if(!(i instanceof HTMLDivElement))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Xw,data:{key:t,fnName:n,type:mC(i)}})})}}},{name:\"options\",type:EI,properties:{objectFit:{type:kI,values:[\"contain\",\"cover\",\"fill\"]},muted:{type:TI},mirror:{type:TI}}}],addTrack:{name:sk,instanceOf:window.MediaStreamTrack,validate:function(e){if(this.isAddingTrack_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:ww})});if(this.isRemovingTrack_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Ew})});if(this.publishState_===xI)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Rw})});var t=this.getMediaStream();if(!t)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Cw})});if(e.kind===Tb&&t.getAudioTracks().length>0||e.kind===wb&&t.getVideoTracks().length>0)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Aw})});if(!_O()&&!mO())throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:sE,data:rk})})}},removeTrack:{name:sk,instanceOf:window.MediaStreamTrack,validate:function(e){if(this.isAddingTrack_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Pw})});if(this.isRemovingTrack_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Dw})});if(this.publishState_===xI)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Ow})});var t=this.getMediaStream();if(!t)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Cw})});if(-1===t.getTracks().indexOf(e))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Mw})});if(!_O()){if(1===t.getTracks().length)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Nw})});if(e.kind===Tb)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:xw})});if(!mO())throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:sE,data:ak})})}}},replaceTrack:{name:sk,instanceOf:window.MediaStreamTrack,validate:function(e){var t=this.getMediaStream();if(!t)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Tw})});if(this.publishState_===xI)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Iw})});if(e.kind===Tb&&t.getAudioTracks().length<=0||e.kind===wb&&t.getVideoTracks().length<=0)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Lw,data:e})});if(!gO())throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:sE,data:ok})})}}},wG={TRTC:bG,CLIENT:kG,LOCAL_STREAM:IG,STREAM:TG};function EG(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n,i){var r=i.value;return i.value=function(){for(var e=arguments.length,i=new Array(e),a=0;a<e;a++)i[a]=arguments[a];return CG.call(this,t,i,n,this.name_),r.apply(this,i)},i}}function RG(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(e,i,r){var o=r.value;return r.value=a(n().mark((function e(){var r,a,s,c=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r=c.length,a=new Array(r),s=0;s<r;s++)a[s]=c[s];return CG.call(this,t,a,i,this.name_),e.abrupt(\"return\",o.apply(this,a));case 3:case\"end\":return e.stop()}}),e,this)}))),r}}function CG(e,t,n,i){try{for(var r=0;r<e.length;r++)AG.call(this,{rule:e[r],value:t[r],key:e[r].name,fnName:n,className:i})}catch(qq){throw MA.error(qq),qq}}function AG(e){var t=this,n=e.rule,i=e.value,r=e.key,a=e.fnName,o=e.className;if(cC(i)){if(n.required)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:wT,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(cC(n.defaultValue))return;i=n.defaultValue}if(Array.isArray(n.type)){if(!n.type.map((function(e){return e.toLowerCase()})).includes(mC(i)))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:ET,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})})}else if(!cC(n.type)&&mC(i)!==n.type)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:ET,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(!1===n.allowEmpty){var s=dC(i)&&(0===i||Number.isNaN(i)),c=uC(i)&&\"\"===i.trim();if(s||c)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:RT,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})})}if(n.notLessThanZero&&dC(i)&&i<0)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Hw,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(uC(n.instanceOf)){if(!i||i.name_!==n.instanceOf)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:CT,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})})}else if(sC(n.instanceOf)&&!(i instanceof n.instanceOf))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:CT,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});if(n.values&&!n.values.includes(i))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:AT,data:{key:r,rule:n,fnName:a,value:i},link:{className:o,fnName:a}})});var u=n.properties;rC(u)&&hC(i)&&Object.keys(u).forEach((function(e){AG.call(t,{rule:u[e],value:i&&i[e],key:\"\".concat(r,\".\").concat(e),fnName:a,className:o})}));var d=n.arrayItem;rC(d)&&pC(i)&&i.forEach((function(e,n){AG.call(t,{rule:d,value:e,key:\"\".concat(r,\"[\").concat(n,\"]\"),fnName:a,className:o})})),sC(n.validate)&&n.validate.call(this,i,r,a,o,this)}Tr({target:\"Number\",stat:!0},{isNaN:function(e){return e!=e}});var xG=Tr,PG=x,DG=Ho.f;xG({target:\"Object\",stat:!0,forced:PG((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:DG});var OG,MG,NG=SM;function LG(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{retries:5,timeout:2e3};return function(t,n,i){var r=AA({retryFunction:i.value,settings:e,onError:e.onError,onRetrying:e.onRetrying,onRetryFailed:e.onRetryFailed});return i.value=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)},i}}Tr({target:\"Array\",stat:!0,forced:!yc((function(e){Array.from(e)}))},{from:NG});var UG,VG,jG,FG,BG=5e3,HG={msg_user_info:0,uint32_video_avg_fps:0,uint32_video_width:0,uint32_video_height:0,uint32_video_avg_bitrate:0,uint32_video_block_time:0,uint32_video_play_time:0,uint32_audio_block_time:0,uint32_audio_play_time:0,uint32_audio_play_db:0,uint32_avg_down_loss:0,uint32_stream_type:0,uint32_video_render_first:0,uint32_video_block_count:0,uint32_audio_block_count:0,uint32_audio_bitrate:0,uint32_video_black_screen_subjective:0,uint32_audio_recv_bitrate:0,uint32_video_external_block_time:0},WG=c((function e(t){o(this,e),this.str_identifier=String(t.userId),this.uint64_tinyid=Number(t.tinyId),this.uint32_role=t.role})),GG=(OG=LG({timeout:500,retries:3}),MG=function(){function e(t){var i=this;o(this,e),this.frameWorkType_=t.frameWorkType||30,this.component_=t.component||0,this.client_=t.client,this.keyPrefix_=\"key_point\",this.storageKey_=\"\".concat(this.keyPrefix_,\"_\").concat(this.client_.getUserId()),this.log_=MA.createLogger({id:\"kpm|\"+this.client_.getUserId(),userId:this.client_.getUserId(),sdkAppId:this.client_.getSDKAppId()}),Object.getOwnPropertyNames(this.__proto__).forEach((function(e){e.startsWith(\"handle\")&&sC(i[e])&&(i[e]=function(e){var t=e.fn,i=e.context;return a(n().mark((function e(){var r,a,o,s=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(e.prev=0,r=s.length,a=new Array(r),o=0;o<r;o++)a[o]=s[o];return e.next=4,t.apply(i||this,a);case 4:return e.abrupt(\"return\",e.sent);case 7:e.prev=7,e.t0=e.catch(0),MA.error(\"\".concat(t.name,\"() error observed \")+e.t0);case 10:case\"end\":return e.stop()}}),e,this,[[0,7]])})))}({fn:i[e],context:i}))})),this.initData(),this.installEvents(),this.intervalId_=YD.run(uT,this.setStorage.bind(this),{delay:2e4})}var i,r,s;return c(e,[{key:\"initData\",value:function(){var e;this.firstPublishedUserList_=[],this.networkQuality_={totalUplinkRTT:0,totalUplinkLoss:0,count:0,totalDownlinkRTTAndLossMap:new Map},this.basicInfo={string_sdk_version:Dr,uint32_os_type:15,string_device_name:\"\",string_http_user_agent:navigator.userAgent,string_os_version:\"\",string_domain:location.host,uint32_avg_rtt:0,uint32_avg_up_loss:0,uint32_scene:\"live\"===(null===(e=this.client_)||void 0===e?void 0:e.getMode())?1:0,uint32_joining_duration:0,uint32_networkType:CI[iC()],uint32_framework:this.frameWorkType_,uint32_component:this.component_},this.pathJoinRoom_={uint64_start_time:0,uint64_init_audio_start_time:0,uint64_init_audio_end_time:0,uint64_init_camera_start_time:0,uint64_init_camera_end_time:0,uint64_send_request_acc_ip_cmd_start_time:0,uint64_send_request_acc_ip_cmd_end_time:0,uint64_send_request_enter_room_cmd_start_time:0,uint64_send_request_enter_room_cmd_end_time:0,uint64_send_first_video_frame_time:0,uint64_recv_userlist_time:0,uint64_end_time:0,int32_init_audio_ret:0,int32_init_camera_ret:0,int32_send_request_acc_ip_cmd_ret:0,int32_send_request_enter_room_cmd_ret:0,int32_end_ret:0},this.pathLeaveRoom_={uint64_start_time:0,uint64_send_request_exit_room_cmd_start_time:0,uint64_send_request_exit_room_cmd_end_time:0,uint64_end_time:0,int32_send_request_exit_room_cmd_ret:0,int32_end_ret:0},this.pathMainVideoMap_=new Map,this.pathMainAudioMap_=new Map,this.pathAuxiliaryMap_=new Map,this.localStreamStats_={totalVideoBitrate:0,totalVideoFPS:0,totalVideoHeight:0,totalVideoWidth:0,totalAudioLevel:0,videoCount:0,audioLevelCount:0,publishStartTime:0,statsToReport:{uint32_audio_capture_db:0,uint32_video_big_capture_fps:0,uint32_video_big_bitrate:0,uint32_video_big_resolution:0}},this.remoteStreamStatsMap_=new Map}},{key:\"installEvents\",value:function(){OC.on(MC,this.handleJoinStart,this),OC.on(zC,this.handleWSStart,this),OC.on(JC,this.handleWSEnd,this),OC.on(NC,this.handleJoinSendCMD,this),OC.on(LC,this.handleJoinReceivedCMDResponce,this),OC.on(UC,this.handleJoinSuccess,this),OC.on(VC,this.handleJoinFailed,this),OC.on(WC,this.handleReceivedPublishUserList,this),OC.on(IA,this.handleConnectionStateChanged,this),OC.on(jC,this.handleLeaveStart,this),OC.on(BC,this.handleLeaveSuccess,this),OC.on(FC,this.handleLeaveSendCMD,this),OC.on(TA,this.handleSendSubscribeCMD,this),OC.on(nA,this.handleVideoPlaying,this),OC.on(iA,this.handleAudioPlaying,this),OC.on(wA,this.handleNetworkQuality,this),OC.on(HC,this.handleHeartbeatStats,this),OC.on(aA,this.handleRemoteStreamAdded,this),OC.on(oA,this.handleRemoteStreamSubscribeStart,this),OC.on(sA,this.handleRemoteStreamSubscribed,this),OC.on(dA,this.handleRemoteStreamRemoved,this),OC.on(gA,this.handleVideoLoadedData,this),OC.on(vA,this.handlePlayStream,this),OC.on(GC,this.handlePublishStart,this),OC.on(hA,this.handleLocalStreamInitStart,this),OC.on(pA,this.handleLocalStreamInitEnd,this),OC.on(fA,this.handleLocalStreamInitFailed,this)}},{key:\"uninstallEvents\",value:function(){OC.off(MC,this.handleJoinStart,this),OC.off(zC,this.handleWSStart,this),OC.off(JC,this.handleWSEnd,this),OC.off(NC,this.handleJoinSendCMD,this),OC.off(LC,this.handleJoinReceivedCMDResponce,this),OC.off(WC,this.handleReceivedPublishUserList,this),OC.off(IA,this.handleConnectionStateChanged,this),OC.off(jC,this.handleLeaveStart,this),OC.off(BC,this.handleLeaveSuccess,this),OC.off(UC,this.handleJoinSuccess,this),OC.off(VC,this.handleJoinFailed,this),OC.off(FC,this.handleLeaveSendCMD,this),OC.off(TA,this.handleSendSubscribeCMD,this),OC.off(nA,this.handleVideoPlaying,this),OC.off(iA,this.handleAudioPlaying,this),OC.off(wA,this.handleNetworkQuality,this),OC.off(HC,this.handleHeartbeatStats,this),OC.off(aA,this.handleRemoteStreamAdded,this),OC.off(oA,this.handleRemoteStreamSubscribeStart,this),OC.off(sA,this.handleRemoteStreamSubscribed,this),OC.off(dA,this.handleRemoteStreamRemoved,this),OC.off(gA,this.handleVideoLoadedData,this),OC.off(vA,this.handlePlayStream,this),OC.off(GC,this.handlePublishStart,this),OC.off(hA,this.handleLocalStreamInitStart,this),OC.off(pA,this.handleLocalStreamInitEnd,this),OC.off(fA,this.handleLocalStreamInitFailed,this)}},{key:\"destroy\",value:function(){this.uninstallEvents(),YD.clearTask(this.intervalId_),this.client_=null}},{key:\"handleJoinStart\",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_start_time&&(this.pathJoinRoom_.uint64_start_time=Date.now(),this.checkStorage())}},{key:\"handleWSStart\",value:function(e){var t=e.client;this.hitTest(t)&&0===this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_start_time&&(this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_start_time=Date.now())}},{key:\"handleWSEnd\",value:function(e){var t=e.client,n=e.error;this.hitTest(t)&&0===this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_end_time&&(this.pathJoinRoom_.uint64_send_request_acc_ip_cmd_end_time=Date.now(),n&&(this.pathJoinRoom_.int32_send_request_acc_ip_cmd_ret=n instanceof vP?Number(n.getExtraCode()||n.getCode()):_P.UNKNOWN,this.pathJoinRoom_.int32_end_ret=2))}},{key:\"handleJoinSendCMD\",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_send_request_enter_room_cmd_start_time&&(this.pathJoinRoom_.uint64_send_request_enter_room_cmd_start_time=Date.now())}},{key:\"handleJoinReceivedCMDResponce\",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_send_request_enter_room_cmd_end_time&&(this.pathJoinRoom_.uint64_send_request_enter_room_cmd_end_time=Date.now(),this.pathJoinRoom_.int32_send_request_enter_room_cmd_ret=e.code,0!==e.code&&(this.pathJoinRoom_.int32_end_ret=3))}},{key:\"handleJoinSuccess\",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_end_time&&(this.pathJoinRoom_.uint64_end_time=Date.now(),this.pathJoinRoom_.int32_end_ret=0)}},{key:\"handleJoinFailed\",value:function(e){var t=e.client;this.hitTest(t)&&(this.pathJoinRoom_.uint64_end_time=Date.now(),0===this.pathJoinRoom_.int32_end_ret&&(this.pathJoinRoom_.int32_end_ret=3),this.prepareReport(),this.report())}},{key:\"handleReceivedPublishUserList\",value:function(e){this.hitTest(e.client)&&0===this.pathJoinRoom_.uint64_recv_userlist_time&&(this.pathJoinRoom_.uint64_recv_userlist_time=Date.now(),this.firstPublishedUserList_=e.data.data&&e.data.data.userList||[])}},{key:\"handleConnectionStateChanged\",value:function(e){var t=e.client,n=e.state,i=e.connection;if(this.hitTest(t)&&n===Mk){this.client_.getUplinkConnection()===i&&0===this.pathJoinRoom_.uint64_send_first_video_frame_time&&this.localStreamStats_.publishStartTime>this.pathJoinRoom_.uint64_end_time&&this.localStreamStats_.publishStartTime-this.pathJoinRoom_.uint64_end_time<=100&&(this.pathJoinRoom_.uint64_send_first_video_frame_time=Date.now());var r=this.pathMainVideoMap_.get(\"\".concat(i.getUserId(),\"_\").concat(Ck));r&&0===r.statsToReport.uint64_pc_connected_time&&(r.statsToReport.uint64_pc_connected_time=Date.now())}}},{key:\"handleLeaveStart\",value:function(e){this.hitTest(e.client)&&(this.pathLeaveRoom_.uint64_start_time=Date.now())}},{key:\"handleLeaveSuccess\",value:function(e){this.hitTest(e.client)&&0===this.pathLeaveRoom_.uint64_end_time&&(this.pathLeaveRoom_.uint64_end_time=Date.now(),0!==this.pathJoinRoom_.uint64_end_time?this.basicInfo.uint32_joining_duration=this.pathLeaveRoom_.uint64_end_time-this.pathJoinRoom_.uint64_end_time:this.log_.warn(\"pathJoinRoom endTime is 0\"),this.report())}},{key:\"handleLeaveSendCMD\",value:function(e){this.hitTest(e.client)&&(this.pathLeaveRoom_.uint64_send_request_exit_room_cmd_start_time=Date.now(),this.pathLeaveRoom_.uint64_send_request_exit_room_cmd_end_time=Date.now())}},{key:\"handleRemoteStreamAdded\",value:function(e){var n=e.client,i=e.stream;if(this.hitTest(n)){var r=i.getUserId(),a=i.getType(),o=\"\".concat(r,\"_\").concat(a),s=this.remoteStreamStatsMap_.get(o);if(s)s.stream=i;else{var c={userId:r,totalVideoFPS:0,totalVideoBitrate:0,totalAudioLevel:0,totalAudioBitrate:0,totalLoss:0,audioCount:0,audioLevelCount:0,videoCount:0,networkQualityCount:0,streamAddedTime:Date.now(),subscribeStartTime:0,subscribedTime:0,playStreamTime:0,statsToReport:t({},HG),stream:i};c.statsToReport.msg_user_info=new WG({userId:r,tinyId:i.getTinyId(),role:bk}),c.statsToReport.uint32_stream_type=a===Ck?2:7,this.remoteStreamStatsMap_.set(o,c)}}}},{key:\"handleRemoteStreamSubscribeStart\",value:function(e){var t=e.client,n=e.stream;if(this.hitTest(t)){var i=n.getUserId(),r=n.getType(),a=\"\".concat(i,\"_\").concat(r),o=this.remoteStreamStatsMap_.get(a);o&&0===o.subscribeStartTime&&(o.subscribeStartTime=Date.now())}}},{key:\"handleSendSubscribeCMD\",value:function(e){if(this.hitTest(e.client)){var t=new WG(e),n=Date.now(),i=\"\".concat(e.userId,\"_\").concat(Ck);e.trackState.video&&e.subscribeState.video&&!this.pathMainVideoMap_.has(i)&&this.pathMainVideoMap_.set(i,{statsToReport:{msg_user_info:t,uint64_start_enter_time:this.pathJoinRoom_.uint64_start_time,uint64_render_first_frame_time:0,uint64_combine_first_frame_time:0,uint64_pc_connected_time:0},userId:e.userId,sendSubscribeCMDTime:n}),e.trackState.audio&&e.subscribeState.audio&&!this.pathMainAudioMap_.has(i)&&this.pathMainAudioMap_.set(i,{statsToReport:{msg_user_info:t,uint64_start_enter_time:this.pathJoinRoom_.uint64_start_time,uint64_play_first_frame_time:0},userId:e.userId,sendSubscribeCMDTime:n});var r=\"\".concat(e.userId,\"_\").concat(Ak);e.trackState.auxiliary&&e.subscribeState.auxiliary&&!this.pathAuxiliaryMap_.has(r)&&this.pathAuxiliaryMap_.set(r,{sendSubscribeCMDTime:n})}}},{key:\"handleRemoteStreamSubscribed\",value:function(e){var t=e.client,n=e.stream;if(this.hitTest(t)){var i=n.getUserId(),r=n.getType(),a=\"\".concat(i,\"_\").concat(r),o=this.remoteStreamStatsMap_.get(a);o&&0===o.subscribedTime&&(o.subscribedTime=Date.now(),o.stream=n)}}},{key:\"handleRemoteStreamRemoved\",value:function(e){var t=e.client,n=e.stream;if(this.hitTest(t)){var i=n.getUserId(),r=n.getType(),a=this.remoteStreamStatsMap_.get(\"\".concat(i,\"_\").concat(r));a&&(a.stream=null)}}},{key:\"handlePlayStream\",value:function(e){var t=e.stream;if(t.isRemote()&&t.getConnection()&&this.hitTest(t.getConnection().getClient())){var n=t.getConnection().getUserId(),i=\"\".concat(n,\"_\").concat(t.getType());if(this.remoteStreamStatsMap_.has(i)){var r=this.remoteStreamStatsMap_.get(i);0===r.playStreamTime&&(r.playStreamTime=Date.now())}}}},{key:\"handleVideoLoadedData\",value:function(e){var t=e.stream;if(t.isRemote()&&t.getConnection()&&this.hitTest(t.getConnection().getClient())){var n=t.getConnection().getUserId(),i=\"\".concat(n,\"_\").concat(t.getType());if(this.pathMainVideoMap_.has(i)){var r=this.pathMainVideoMap_.get(i);0===r.statsToReport.uint64_combine_first_frame_time&&(r.statsToReport.uint64_combine_first_frame_time=Date.now())}}}},{key:\"handleVideoPlaying\",value:function(e){var t=e.stream;if(t.isRemote()&&t.getConnection()&&this.hitTest(t.getConnection().getClient())){var n=t.getConnection().getUserId(),i=\"\".concat(n,\"_\").concat(t.getType()),r=Date.now();if(this.pathMainVideoMap_.has(i)){var a=this.pathMainVideoMap_.get(i);if(0===a.statsToReport.uint64_render_first_frame_time&&(a.statsToReport.uint64_render_first_frame_time=r),this.remoteStreamStatsMap_.has(i)){var o=this.remoteStreamStatsMap_.get(i),s=o.statsToReport,c=o.playStreamTime,u=o.subscribedTime;0===s.uint32_video_render_first&&c-u<=100&&(s.uint32_video_render_first=r-a.sendSubscribeCMDTime)}}if(t.getType()===Ak&&this.pathAuxiliaryMap_.has(i)&&this.remoteStreamStatsMap_.has(i)){var d=this.remoteStreamStatsMap_.get(i),l=d.statsToReport,h=d.playStreamTime,p=d.subscribedTime;0===l.uint32_video_render_first&&h-p<=100&&(l.uint32_video_render_first=r-this.pathAuxiliaryMap_.get(i).sendSubscribeCMDTime)}}}},{key:\"handleAudioPlaying\",value:function(e){if(e.stream.isRemote()&&e.stream.getConnection()&&this.hitTest(e.stream.getConnection().getClient())){var t=e.stream.getConnection().getUserId(),n=\"\".concat(t,\"_\").concat(e.stream.getType());if(this.pathMainAudioMap_.has(n)){var i=this.pathMainAudioMap_.get(n);0===i.statsToReport.uint64_play_first_frame_time&&(i.statsToReport.uint64_play_first_frame_time=Date.now())}}}},{key:\"handleNetworkQuality\",value:function(e){var t=this;this.hitTest(e.client)&&(this.networkQuality_.totalUplinkLoss+=e.uplinkLoss,this.networkQuality_.totalUplinkRTT+=e.uplinkRTT,this.networkQuality_.count++,e.downlinkLossAndRTTMap.forEach((function(e){var n=e.rtt,i=e.loss,r=e.userId,a=t.networkQuality_.totalDownlinkRTTAndLossMap.get(r);a?(a.totalRTT+=n,a.totalLoss+=i,a.count++):t.networkQuality_.totalDownlinkRTTAndLossMap.set(r,{totalRTT:n,totalLoss:i,count:1})})))}},{key:\"handleHeartbeatStats\",value:function(e){var t=this;if(this.hitTest(e.client)){var n=e.stats,i=n.msg_up_stream_info,r=n.msg_down_stream_info;if(i.msg_video_status[0]){var a=i.msg_video_status[0],o=a.uint32_video_codec_bitrate,s=a.uint32_video_enc_fps,c=a.uint32_video_width,u=a.uint32_video_height;this.localStreamStats_.totalVideoBitrate+=o,this.localStreamStats_.totalVideoFPS+=s,this.localStreamStats_.totalVideoWidth+=c,this.localStreamStats_.totalVideoHeight+=u,this.localStreamStats_.videoCount++}if(i.msg_audio_status){var d=i.msg_audio_status.audioLevel;Math.floor(100*d)>0&&(this.localStreamStats_.totalAudioLevel+=d,this.localStreamStats_.audioLevelCount++)}r.forEach((function(e){var n=e.msg_user_info,i=e.msg_audio_status,r=e.msg_video_status,a=n.str_identifier;if(r.forEach((function(e){var n=2===e.uint32_video_stream_type,i=7===e.uint32_video_stream_type,r=\"\".concat(a,\"_\").concat(n?Ck:Ak);if(t.remoteStreamStatsMap_.has(r)){var o,s,c=t.remoteStreamStatsMap_.get(r);(n&&null!==(o=c.stream)&&void 0!==o&&o.isMainVideoSubscribed||i&&null!==(s=c.stream)&&void 0!==s&&s.isAuxVideoSubscribed)&&(c.totalVideoFPS+=e.uint32_video_receive_fps,c.totalVideoBitrate+=e.uint32_video_codec_bitrate,c.videoCount++,0===c.statsToReport.uint32_video_width&&(c.statsToReport.uint32_video_width=e.uint32_video_width),0===c.statsToReport.uint32_video_height&&(c.statsToReport.uint32_video_height=e.uint32_video_height))}})),i){var o=\"\".concat(a,\"_\").concat(Ck);if(t.remoteStreamStatsMap_.has(o)){var s,c=t.remoteStreamStatsMap_.get(o);null!==(s=c.stream)&&void 0!==s&&s.isMainAudioSubscribed&&(c.totalAudioBitrate+=i.uint32_audio_codec_bitrate,c.audioCount++,Math.floor(100*i.audioLevel)>0&&(c.totalAudioLevel+=i.audioLevel,c.audioLevelCount++))}}}))}}},{key:\"handlePublishStart\",value:function(e){var t=e.client;this.hitTest(t)&&0===this.localStreamStats_.publishStartTime&&(this.localStreamStats_.publishStartTime=Date.now())}},{key:\"handleLocalStreamInitStart\",value:function(e){var t=e.audio,n=e.video;t&&0===this.pathJoinRoom_.uint64_init_audio_start_time&&(this.pathJoinRoom_.uint64_init_audio_start_time=Date.now()),n&&0===this.pathJoinRoom_.uint64_init_camera_start_time&&(this.pathJoinRoom_.uint64_init_camera_start_time=Date.now())}},{key:\"handleLocalStreamInitEnd\",value:function(e){var t=e.audio,n=e.video;t&&0===this.pathJoinRoom_.uint64_init_audio_end_time&&(this.pathJoinRoom_.uint64_init_audio_end_time=Date.now()),n&&0===this.pathJoinRoom_.uint64_init_camera_end_time&&(this.pathJoinRoom_.uint64_init_camera_end_time=Date.now())}},{key:\"handleLocalStreamInitFailed\",value:function(e){var t=e.audio,n=e.video,i=e.error,r=i instanceof vP?i.getExtraCode()||i.getCode():{NotFoundError:1,NotAllowedError:2,NotReadableError:3,OverConstrainedError:4,AbortError:5}[i.name]||_P.UNKNOWN;t&&0===this.pathJoinRoom_.uint64_init_audio_end_time&&(this.pathJoinRoom_.int32_init_audio_ret=r,this.pathJoinRoom_.uint64_init_audio_end_time=Date.now()),n&&0===this.pathJoinRoom_.uint64_init_camera_end_time&&(this.pathJoinRoom_.int32_init_camera_ret=r,this.pathJoinRoom_.uint64_init_camera_end_time=Date.now())}},{key:\"hasVideoFlag\",value:function(e){return this.firstPublishedUserList_.findIndex((function(t){return t.userId===e&&1&t.flag}))>=0}},{key:\"hasAudioFlag\",value:function(e){return this.firstPublishedUserList_.findIndex((function(t){return t.userId===e&&8&t.flag}))>=0}},{key:\"hasAuxFlag\",value:function(e){return this.firstPublishedUserList_.findIndex((function(t){return t.userId===e&&4&t.flag}))>=0}},{key:\"hitTest\",value:function(e){return e===this.client_}},{key:\"checkStorage\",value:(s=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(t=ZD.getItem(this.storageKey_))){e.next=6;break}return e.next=5,this.upload(t);case 5:ZD.deleteItem(this.storageKey_);case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),this.log_.warn(e.t0);case 11:case\"end\":return e.stop()}}),e,this,[[0,8]])}))),function(){return s.apply(this,arguments)})},{key:\"setStorage\",value:function(){this.prepareReport();var e=this.getReportData();0!==e.msg_path_enter_room.uint64_start_time&&ZD.setItem(this.storageKey_,e)}},{key:\"prepareReport\",value:function(){var e=this;if(this.networkQuality_.count>0&&(this.basicInfo.uint32_avg_rtt=Math.floor(this.networkQuality_.totalUplinkRTT/this.networkQuality_.count),this.basicInfo.uint32_avg_up_loss=Math.floor(this.networkQuality_.totalUplinkLoss/this.networkQuality_.count)),this.localStreamStats_.videoCount>0){this.localStreamStats_.statsToReport.uint32_video_big_capture_fps=Math.floor(this.localStreamStats_.totalVideoFPS/this.localStreamStats_.videoCount),this.localStreamStats_.statsToReport.uint32_video_big_bitrate=Math.floor(this.localStreamStats_.totalVideoBitrate/this.localStreamStats_.videoCount);var t=Math.floor(this.localStreamStats_.totalVideoWidth/this.localStreamStats_.videoCount),n=Math.floor(this.localStreamStats_.totalVideoHeight/this.localStreamStats_.videoCount);this.localStreamStats_.statsToReport.uint32_video_big_resolution=t<<16|n}this.localStreamStats_.audioLevelCount>0&&(this.localStreamStats_.statsToReport.uint32_audio_capture_db=Math.floor(this.localStreamStats_.totalAudioLevel/this.localStreamStats_.audioLevelCount*100)),this.remoteStreamStatsMap_.forEach((function(t,n){var i=t.userId;if(e.networkQuality_.totalDownlinkRTTAndLossMap.has(i)){var r=e.networkQuality_.totalDownlinkRTTAndLossMap.get(i),a=r.totalLoss,o=r.count;t.statsToReport.uint32_avg_down_loss=Math.floor(a/o)}t.videoCount>0&&(t.statsToReport.uint32_video_avg_fps=Math.floor(t.totalVideoFPS/t.videoCount),t.statsToReport.uint32_video_avg_bitrate=Math.floor(t.totalVideoBitrate/t.videoCount)),t.audioCount>0&&(t.statsToReport.uint32_audio_recv_bitrate=t.statsToReport.uint32_audio_bitrate=Math.floor(t.totalAudioBitrate/t.audioCount)),t.audioLevelCount>0&&(t.statsToReport.uint32_audio_play_db=Math.floor(t.totalAudioLevel/t.audioLevelCount*100));var s=e.client_.getCallDurationCalculator();s&&(t.statsToReport.uint32_audio_play_time=s.getDuration(n,Tb),t.statsToReport.uint32_video_play_time=s.getDuration(n,wb)),t.statsToReport.uint32_video_render_first=Math.min(t.statsToReport.uint32_video_render_first,BG);var c=e.client_.getBadCaseDetector();if(c){var u=c.getDataFreezeDuration(n),d=u.dataFreeze,l=u.count,h=c.getRenderFreezeDuration(n).renderFreeze;t.statsToReport.uint32_video_block_count=l,t.statsToReport.uint32_video_block_time=Math.min(d,t.statsToReport.uint32_video_play_time),t.statsToReport.uint32_video_external_block_time=Math.min(h,t.statsToReport.uint32_video_play_time),c.isBlackStream(n)&&0===t.statsToReport.uint32_video_avg_fps?t.statsToReport.uint32_video_black_screen_subjective=1:t.statsToReport.uint32_video_black_screen_subjective=0}(0===t.subscribeStartTime||t.subscribeStartTime-t.streamAddedTime>100||0===t.playStreamTime)&&(e.pathMainAudioMap_.delete(n),e.pathMainVideoMap_.delete(n),t.statsToReport.uint32_video_render_first=0)})),this.pathMainAudioMap_.forEach((function(t,n){e.hasAudioFlag(t.userId)?t.statsToReport.uint64_play_first_frame_time-t.statsToReport.uint64_start_enter_time>BG&&(t.statsToReport.uint64_play_first_frame_time=t.statsToReport.uint64_start_enter_time+BG):e.pathMainAudioMap_.delete(n)})),this.pathMainVideoMap_.forEach((function(t,n){e.hasVideoFlag(t.userId)?t.statsToReport.uint64_render_first_frame_time-t.statsToReport.uint64_start_enter_time>BG&&(t.statsToReport.uint64_render_first_frame_time=t.statsToReport.uint64_start_enter_time+BG):e.pathMainVideoMap_.delete(n)})),this.pathJoinRoom_.uint64_end_time-this.pathJoinRoom_.uint64_start_time>BG&&(this.pathJoinRoom_.uint64_end_time=this.pathJoinRoom_.uint64_start_time+BG)}},{key:\"getReportData\",value:function(){var e=this.client_.getSignalInfo();return{uint32_sdk_app_id:Number(this.client_.getSDKAppId()),msg_user_info:new WG({userId:this.client_.getUserId(),tinyId:this.client_.getTinyId(),role:this.client_.getRole()===Ik?bk:kk}),msg_basic_info:this.basicInfo,uint32_acc_ip:gC(e.relayIp),uint32_client_ip:gC(e.clientIp,\"small\"),uint32_acc_port:0,uint64_timestamp:Date.now(),uint32_seq:Math.floor(Math.random()*Math.pow(2,31)),msg_path_enter_room:this.pathJoinRoom_,msg_path_exit_room:this.pathLeaveRoom_,msg_path_recv_video:b(this.pathMainVideoMap_.values()).map((function(e){return e.statsToReport})),msg_quality_statistics:b(this.remoteStreamStatsMap_.values()).map((function(e){return e.statsToReport})),str_room_name:String(this.client_.getRoomId()),msg_path_recv_audio:b(this.pathMainAudioMap_.values()).map((function(e){return e.statsToReport})),uint32_info_client_ip:gC(e.clientIp,\"small\"),error_code:[],msg_local_statistics:this.localStreamStats_.statsToReport,msg_function_state:zG.getStateArray()}}},{key:\"report\",value:(r=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=this.getReportData(),e.next=4,this.upload(t);case 4:ZD.deleteItem(this.storageKey_),zG.clearStateArray(),this.initData(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),this.log_.warn(e.t0);case 12:case\"end\":return e.stop()}}),e,this,[[0,9]])}))),function(){return r.apply(this,arguments)})},{key:\"upload\",value:(i=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(qR||0===t.msg_path_enter_room.uint64_start_time||[JI,qI,KI].findIndex((function(e){return e===location.host}))>=0)){e.next=2;break}return e.abrupt(\"return\");case 2:return i=Number(this.client_.getSDKAppId()),r=nC(i,_k),e.next=6,xC({url:r,body:JSON.stringify(t)});case 6:if(\"ok\"===(a=e.sent).data){e.next=9;break}throw\"key point upload failed: \".concat(a.data);case 9:case\"end\":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}]),e}(),w(MG.prototype,\"upload\",[OG],Object.getOwnPropertyDescriptor(MG.prototype,\"upload\"),MG.prototype),MG),zG=function(){function e(){o(this,e)}return c(e,null,[{key:\"handleFunctionState\",value:function(e){var t,n,i,r,a=e.className,o=e.fnName,s=e.params;if(!(qR||[JI,qI,KI].findIndex((function(e){return e===location.host}))>=0)){var c,u=[];if(a)switch(o){case\"createClient\":null!==(t=s[0])&&void 0!==t&&t.mode&&u.push(\"\".concat(a,\".\").concat(o,\".\").concat(s[0].mode)),null!==(n=s[0])&&void 0!==n&&n.useStringRoomId?u.push(\"\".concat(a,\".\").concat(o,\".stringRoomId\")):u.push(\"\".concat(a,\".\").concat(o,\".intRoomId\")),null!==(i=s[0])&&void 0!==i&&i.autoSubscribe?u.push(\"\".concat(a,\".\").concat(o,\".autoSubscribe\")):u.push(\"\".concat(a,\".\").concat(o,\".manualSubscribe\"));break;case\"publish\":null!==(r=s[1])&&void 0!==r&&r.isAuxiliary?u.push(\"\".concat(a,\".\").concat(o,\".isAuxiliary\")):u.push(\"\".concat(a,\".\").concat(o));break;case\"setAudioProfile\":case\"setVideoProfile\":case\"setScreenProfile\":case\"setVideoContentHint\":uC(s[0])&&u.push(\"\".concat(a,\".\").concat(o,\".\").concat(s[0]));break;default:u.push(\"\".concat(a,\".\").concat(o))}else u.push(o);for(var d=0;d<u.length;d++){if(!(c=fT[u[d]]))return;if(this.stateMap.has(c))this.stateMap.get(c).int32_call_times+=1;else this.stateMap.set(c,{int32_id:c,int32_call_times:1})}}}},{key:\"getStateArray\",value:function(){return Array.from(this.stateMap.values())}},{key:\"clearStateArray\",value:function(){this.stateMap.clear()}}]),e}();function JG(e){return function(t,n,i){var r=i.value;return i.value=function(){for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];try{e||(e=this.name_),zG.handleFunctionState({className:e,fnName:n,params:i}),e=void 0}catch(qq){this.log_.info(qq)}return r.apply(this,i)},i}}u(zG,\"stateMap\",new Map);var qG=(UG=RG.apply(void 0,b(wG.STREAM.play)),VG=JG(),jG=JG(),FG=function(){function e(t){o(this,e),this.name_=zI,this.userId_=t.userId,this.isRemote_=t.isRemote,this.type_=t.type,this.log_=MA.createLogger({id:\"s\".concat(t.seq?t.seq:\"\",\"|\").concat(this.userId_),userId:cC(t.client)?void 0:t.client.getUserId(),sdkAppId:cC(t.client)?void 0:t.client.getSDKAppId(),isLocal:!this.isRemote_,type:this.isRemote_?this.type_:\"\"}),this.client_=null,cC(t.client)||(this.client_=t.client),this.mediaStream_=null,this.div_=null,this.isPlaying_=!1,this.connection_=null,this.audioPlayer_=null,this.videoPlayer_=null,this.muted_=!1,this.objectFit_=\"cover\",this.mirror_=!1,this.id_=\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return(\"x\"==e?t:3&t|8).toString(16)})),this.audioOutputDeviceId_=0,this.audioVolume_=1,this.emitter_=EC(new DC,this.name_),this.connectionState_=Pk,this.installEvents(),cC(t.mirror)||this.log_.warn('TRTC.createStream \"mirror\" option was deprecated since v4.12.1，please use localStream.play to set up preview mirror. refer to '.concat(XI,\"/en/LocalStream.html#play. TRTC.createStream 接口的 mirror 选项从 v4.12.1 开始被废弃，请使用 localStream.play 设置本地流预览镜像，参考文档：\").concat(XI,\"/zh-cn/LocalStream.html#play。\"))}var i,r,s,u,d;return c(e,[{key:\"installEvents\",value:function(){OC.on(EA,this.restartPlayback,this)}},{key:\"uninstallEvents\",value:function(){OC.off(EA,this.restartPlayback,this)}},{key:\"getType\",value:function(){return this.type_}},{key:\"getLogger\",value:function(){return this.log_}},{key:\"isSubscribed\",get:function(){return this.type_===Ck&&this.connection_.isMainStreamSubscribed||this.type_===Ak&&this.connection_.isAuxStreamSubscribed}},{key:\"isMainVideoSubscribed\",get:function(){var e=this.getSubscribedState();return this.type_===Ck&&e&&e.video}},{key:\"isMainAudioSubscribed\",get:function(){var e=this.getSubscribedState();return this.type_===Ck&&e&&e.audio}},{key:\"isAuxVideoSubscribed\",get:function(){var e=this.getSubscribedState();return this.type_===Ak&&e&&e.auxiliary}},{key:\"isSmallVideoSubscribed\",get:function(){var e=this.getSubscribedState();return this.type_===Ck&&e&&e.smallVideo}},{key:\"emitConnectionStateChanged\",value:function(e){e.state!==this.connectionState_&&(e.state!==Pk&&this.isRemote_&&!this.isSubscribed||(this.emitter_.emit(UO,e),this.connectionState_=e.state))}},{key:\"setConnection\",value:function(e){this.connection_!==e&&(e instanceof _G?(null!==this.connection_&&this.connection_.off(OO.CONNECTION_STATE_CHANGED,this.emitConnectionStateChanged,this),e.on(OO.CONNECTION_STATE_CHANGED,this.emitConnectionStateChanged,this)):null===e&&this.connection_.off(OO.CONNECTION_STATE_CHANGED,this.emitConnectionStateChanged,this),this.connection_=e)}},{key:\"getConnection\",value:function(){return this.connection_}},{key:\"play\",value:(d=a(n().mark((function e(t,i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log_.info(\"stream \".concat(this.isPlaying_?\"update\":\"start to\",\" play with elementId: \").concat(t,\" and options: \").concat(JSON.stringify(i),\".\")),!this.isPlaying_){e.next=9;break}return i&&!cC(i.muted)&&(this.muted_=i.muted),i&&!cC(i.objectFit)&&(this.objectFit_=i.objectFit),this.isScreenShare()?this.mirror_=!1:i&&!cC(i.mirror)&&(this.mirror_=i.mirror),this.audioPlayer_&&this.audioPlayer_.setMuted(this.muted_),this.videoPlayer_&&(this.videoPlayer_.setObjectFit(this.objectFit_),this.videoPlayer_.setMirror(this.mirror_)),this.elementId_!==t&&(r=t,uC(t)&&(r=document.getElementById(t)),r.appendChild(this.div_),this.elementId_=t),e.abrupt(\"return\");case 9:return this.isPlaying_=!0,(a=document.createElement(\"div\")).setAttribute(\"id\",\"player_\".concat(this.id_)),a.setAttribute(\"style\",\"width: 100%; height: 100%; position: relative; background-color: black; overflow: hidden;\"),o=t,uC(t)&&(o=document.getElementById(t)),o.appendChild(a),this.elementId_=t,this.div_=a,this.isRemote_||(this.muted_=!0),i&&!cC(i.muted)&&(this.muted_=i.muted),this.isScreenShare()&&(this.objectFit_=\"contain\"),i&&!cC(i.objectFit)&&(this.objectFit_=i.objectFit),this.isScreenShare()?this.mirror_=!1:(this.isRemote_||(this.mirror_=!0),i&&!cC(i.mirror)&&(this.mirror_=i.mirror)),OC.emit(vA,{stream:this}),e.next=26,Promise.all([this.playAudio(),this.playVideo()]);case 26:OC.emit(eA,{stream:this});case 27:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:\"playAudio\",value:(u=a(n().mark((function e(){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasAudio()&&(!this.isRemote_||this.isMainAudioSubscribed)){e.next=2;break}return e.abrupt(\"return\");case 2:if(i=this.getAudioTrack(),this.audioPlayer_||!i){e.next=17;break}return this.log_.info(\"create AudioPlayer and play\"),this.audioPlayer_=new xL({stream:this,track:i,gainedTrack:null===(r=this.gain_)||void 0===r?void 0:r.audioTrack,div:this.div_,muted:this.muted_,outputDeviceId:this.audioOutputDeviceId_,volume:this.audioVolume_}),this.audioPlayer_.on(FO,(function(e){var n={type:Tb,state:e.state,reason:e.reason};OC.emit(tA,t({stream:a},n)),a.emitter_.emit(NO,n)})),e.prev=7,e.next=10,this.audioPlayer_.play();case 10:e.next=17;break;case 12:throw e.prev=12,e.t0=e.catch(7),this.client_&&this.client_.getEnableAutoPlayDialog()&&new tU,this.emitter_.emit(jO,e.t0),e.t0;case 17:case\"end\":return e.stop()}}),e,this,[[7,12]])}))),function(){return u.apply(this,arguments)})},{key:\"playVideo\",value:(s=a(n().mark((function e(){var i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.hasVideo()&&(!this.isRemote_||this.isMainVideoSubscribed||this.isAuxVideoSubscribed||this.isSmallVideoSubscribed)){e.next=2;break}return e.abrupt(\"return\");case 2:if(i=this.getVideoTrack(),this.videoPlayer_||!i){e.next=18;break}return OC.emit(yA,{stream:this}),this.log_.info(\"create VideoPlayer and play\"),this.videoPlayer_=new nU({stream:this,track:i,div:this.div_,muted:this.muted_,objectFit:this.objectFit_,mirror:this.mirror_}),this.videoPlayer_.on(FO,(function(e){var n={type:wb,state:e.state,reason:e.reason};OC.emit(tA,t({stream:r},n)),r.emitter_.emit(NO,n)})),e.prev=8,e.next=11,this.videoPlayer_.play();case 11:e.next=18;break;case 13:throw e.prev=13,e.t0=e.catch(8),this.client_&&this.client_.getEnableAutoPlayDialog()&&new tU,this.emitter_.emit(jO,e.t0),e.t0;case 18:case\"end\":return e.stop()}}),e,this,[[8,13]])}))),function(){return s.apply(this,arguments)})},{key:\"stopAudio\",value:function(){this.audioPlayer_&&(this.log_.info(\"stop AudioPlayer\"),this.audioPlayer_.stop(),this.audioPlayer_=null)}},{key:\"stopVideo\",value:function(){this.videoPlayer_&&(this.log_.info(\"stop VideoPlayer\"),this.videoPlayer_.stop(),this.videoPlayer_=null)}},{key:\"restartPlayback\",value:function(){this.audioPlayer_&&!this.audioPlayer_.isPlaying&&this.restartAudio(),this.videoPlayer_&&!this.videoPlayer_.isPlaying&&this.restartVideo()}},{key:\"restartAudio\",value:function(){this.isPlaying_&&(this.stopAudio(),this.playAudio().catch((function(e){})))}},{key:\"restartVideo\",value:function(){this.isPlaying_&&(this.stopVideo(),this.playVideo().catch((function(e){})))}},{key:\"stop\",value:function(){this.isPlaying_&&(this.isPlaying_=!1,this.stopAudio(),this.stopVideo(),this.div_.parentNode.removeChild(this.div_))}},{key:\"resume\",value:(r=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isPlaying_){e.next=2;break}return e.abrupt(\"return\");case 2:if(this.log_.info(\"resume\"),!this.audioPlayer_){e.next=6;break}return e.next=6,this.audioPlayer_.resume();case 6:if(!this.videoPlayer_){e.next=9;break}return e.next=9,this.videoPlayer_.resume();case 9:case\"end\":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:\"close\",value:function(){this.log_.info(\"close stream\"),this.isPlaying_&&this.stop(),this.isRemote_||(this.mediaStream_&&(this.mediaStream_.preventEvent=1,this.mediaStream_.getTracks().forEach((function(e){e.stop()})),this.mediaStream_=null),this.uninstallEvents())}},{key:\"muteAudio\",value:function(){return this.addRemoteEvent(!0,Tb),this.doEnableTrack(Tb,!1)}},{key:\"muteVideo\",value:function(){return this.addRemoteEvent(!0,wb),this.doEnableTrack(wb,!1)}},{key:\"unmuteAudio\",value:function(){return this.addRemoteEvent(!1,Tb),this.doEnableTrack(Tb,!0)}},{key:\"unmuteVideo\",value:function(){return this.addRemoteEvent(!1,wb),this.doEnableTrack(wb,!0)}},{key:\"addRemoteEvent\",value:function(e,t){if(this.isRemote_&&this.client_){var n=this.client_.getUserId(),i=\"\".concat(e?Mb:Nb,\" remote \").concat(t);tD(n,{eventId:t===Tb?e?MP:LP:e?OP:NP,eventDesc:i,timestamp:(new Date).getTime(),userId:n,tinyId:this.client_.getTinyId(),remoteUserId:this.userId_,remoteTinyId:this.connection_.getTinyId()})}}},{key:\"doEnableTrack\",value:function(e,t){var n=!1;return e===Tb?this.mediaStream_.getAudioTracks().forEach((function(e){n=!0,e.enabled=t})):this.mediaStream_.getVideoTracks().forEach((function(e){n=!0,e.enabled=t})),n}},{key:\"getId\",value:function(){return this.id_}},{key:\"getUserId\",value:function(){return this.userId_}},{key:\"getTinyId\",value:function(){return this.connection_?this.connection_.getTinyId():\"\"}},{key:\"isPlaying\",value:function(){return this.isPlaying_}},{key:\"setAudioOutput\",value:(i=a(n().mark((function e(t){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log_.info(\"setAudioOutput \".concat(t)),this.audioOutputDeviceId_=t,!this.audioPlayer_){e.next=5;break}return e.next=5,this.audioPlayer_.setSinkId(t);case 5:return e.next=7,ZO();case 7:i=e.sent,this.log_.info(\"speakers: \".concat(JSON.stringify(i)));case 9:case\"end\":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:\"setAudioVolume\",value:function(e){this.audioVolume_=e,this.log_.info(\"setAudioVolume to \".concat(e)),this.audioPlayer_&&this.audioPlayer_.setVolume(e)}},{key:\"getAudioLevel\",value:function(){var e=0;return this.audioPlayer_&&(e=this.audioPlayer_.getAudioLevel()),e}},{key:\"getInternalAudioLevel\",value:function(){var e=0;return this.audioPlayer_&&(e=this.audioPlayer_.getInternalAudioLevel()),e}},{key:\"hasAudio\",value:function(){if(this.isRemote_){if(!this.connection_)return!1;var e=this.connection_.getTrackState();return this.type_===Ck&&e.audio}return!!this.getAudioTrack()}},{key:\"hasVideo\",value:function(){if(this.isRemote_){if(!this.connection_)return!1;var e=this.connection_.getTrackState();return this.type_===Ak?e.auxiliary:e.video}return!!this.getVideoTrack()}},{key:\"getSubscribedState\",value:function(){return this.isRemote_&&this.connection_?this.connection_.getSubscribeState():null}},{key:\"getAudioTrack\",value:function(){var e=null;if(this.mediaStream_){var t=this.mediaStream_.getAudioTracks();t.length>0&&(e=t[0])}return e}},{key:\"getVideoTrack\",value:function(){var e=null;if(this.mediaStream_){var t=this.mediaStream_.getVideoTracks();t.length>0&&(e=t[0])}return e}},{key:\"getVideoFrame\",value:function(){return this.videoPlayer_?this.videoPlayer_.getVideoFrame():null}},{key:\"getMediaStream\",value:function(){return this.mediaStream_}},{key:\"setMediaStream\",value:function(e){e!==this.mediaStream_&&(this.mediaStream_&&this.mediaStream_.getTracks().forEach((function(e){return e.stop()})),this.mediaStream_=e)}},{key:\"updateVideoPlayingState\",value:function(e){this.isPlaying_&&(e?(this.log_.info(\"playing state updated, play video\"),this.playVideo().catch((function(e){}))):(this.log_.info(\"playing state updated, stop video\"),this.stopVideo()))}},{key:\"updateAudioPlayingState\",value:function(e){this.isPlaying_&&(e?(this.log_.info(\"playing state updated, play audio\"),this.playAudio().catch((function(e){}))):(this.log_.info(\"playing state updated, stop audio\"),this.stopAudio()))}},{key:\"on\",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:\"off\",value:function(e,t,n){\"*\"===e?this.emitter_.removeAllListeners():this.emitter_.off(e,t,n)}},{key:\"isRemote\",value:function(){return this.isRemote_}},{key:\"isScreenShare\",value:function(){return!this.isRemote_&&this.screen_||this.isRemote_&&this.getType()===Ab}},{key:\"getDiv\",value:function(){return this.div_}},{key:\"getObjectFit\",value:function(){return this.objectFit_}},{key:\"getMuted\",value:function(){return this.muted_}},{key:\"getClient\",value:function(){return this.client_}}]),e}(),w(FG.prototype,\"play\",[UG],Object.getOwnPropertyDescriptor(FG.prototype,\"play\"),FG.prototype),w(FG.prototype,\"setAudioOutput\",[VG],Object.getOwnPropertyDescriptor(FG.prototype,\"setAudioOutput\"),FG.prototype),w(FG.prototype,\"getVideoFrame\",[jG],Object.getOwnPropertyDescriptor(FG.prototype,\"getVideoFrame\"),FG.prototype),FG),KG=function(e){d(RemoteStream,e);var n=v(RemoteStream);function RemoteStream(e){var i;o(this,RemoteStream);var r={isRemote:!0,type:e.type},a=t(t({},e),r);return(i=n.call(this,a)).name_=GI,i.isStreamAddedEventEmitted_=!1,i.isAbleToCallSubscription_=!0,i}return c(RemoteStream,[{key:\"installEvents\",value:function(){y(l(RemoteStream.prototype),\"installEvents\",this).call(this),OC.on(sA,this.handleStreamSubscribed,this),OC.on(cA,this.handleStreamUnsubscribed,this)}},{key:\"uninstallEvents\",value:function(){y(l(RemoteStream.prototype),\"uninstallEvents\",this).call(this),OC.off(sA,this.handleStreamSubscribed,this),OC.off(cA,this.handleStreamUnsubscribed,this)}},{key:\"handleStreamSubscribed\",value:function(e){e.client===this.client_&&e.stream===this&&this.connection_.getCurrentState()===Mk&&this.emitConnectionStateChanged({prevState:Pk,state:Mk})}},{key:\"handleStreamUnsubscribed\",value:function(e){e.client===this.client_&&e.stream===this&&this.emitConnectionStateChanged({prevState:Mk,state:Pk})}},{key:\"getType\",value:function(){return y(l(RemoteStream.prototype),\"getType\",this).call(this)}},{key:\"getIsAbleToCallSubscription\",value:function(){return this.isAbleToCallSubscription_}},{key:\"setIsAbleToCallSubscription\",value:function(e){this.isAbleToCallSubscription_=e}},{key:\"setIsStreamAddedEventEmitted\",value:function(e){this.isStreamAddedEventEmitted_=e}},{key:\"getIsStreamAddedEventEmitted\",value:function(){return this.isStreamAddedEventEmitted_}},{key:\"getAudioTrack\",value:function(){return this.connection_&&this.connection_.getTrackState().audio?y(l(RemoteStream.prototype),\"getAudioTrack\",this).call(this):null}},{key:\"getVideoTrack\",value:function(){if(!this.connection_)return null;var e=this.connection_.getTrackState();return(this.type_!==Ck||e.video)&&(this.type_!==Ak||e.auxiliary)?y(l(RemoteStream.prototype),\"getVideoTrack\",this).call(this):null}},{key:\"close\",value:function(){y(l(RemoteStream.prototype),\"close\",this).call(this)}}]),RemoteStream}(qG),QG=function(){function e(t){o(this,e),this.client_=t.client,this.subscribedStreams_=new Map,this.unsubscribedStreams_=new Map,this.subscriptedOptions_=new Map,this.autoRecoveryFlags_=new Map}var t,i,r;return c(e,[{key:\"isEnabled\",get:function(){return\"webrtc\"!==this.client_.getEnv()}},{key:\"recover\",value:(r=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.getUserId(),r=t.getType(),this.hasAutoRecoveryFlag(i,r)){e.next=5;break}return e.abrupt(\"return\");case 5:if(a=this.getUnsubscribedStream(i,r)?\"unsubscribe\":\"subscribe\",e.prev=6,MA.warn(\"recover() try to recover subscription [\".concat(a,\"][\").concat(i,\"][\").concat(r,\"]\")),\"subscribe\"!==a){e.next=13;break}return e.next=11,this.recoverSubscription(i,t);case 11:e.next=15;break;case 13:return e.next=15,this.recoverUnsubscription(i,t);case 15:oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:dI}),MA.warn(\"recover() recover successfully [\".concat(a,\"][\").concat(i,\"][\").concat(r,\"]\")),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(6),MA.error(\"recover() recover failed [\".concat(a,\"][\").concat(i,\"][\").concat(r,\"]\"),e.t0),oD.logFailedEvent({userId:this.client_.getUserId(),eventType:dI,error:e.t0});case 23:this.deleteAutoRecoveryFlag(i,r);case 24:case\"end\":return e.stop()}}),e,this,[[6,19]])}))),function(e){return r.apply(this,arguments)})},{key:\"recoverSubscription\",value:(i=a(n().mark((function e(t,i){var r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.getOptions(t,i.getType()),a=this.getSubscribedStream(t,i.getType()),r&&a){e.next=4;break}return e.abrupt(\"return\");case 4:o=this.getStreamMuteState(a),s=o.isAudioMuted,c=o.isVideoMuted,this.mergeStream(a,i),this.recoverPlayingState(a),s&&a.doEnableTrack(Tb,!1),c&&a.doEnableTrack(wb,!1);case 9:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:\"recoverUnsubscription\",value:(t=a(n().mark((function e(t,i){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.getUnsubscribedStream(t,i.getType())){e.next=3;break}return e.abrupt(\"return\");case 3:this.mergeStream(r,i);case 4:case\"end\":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:\"getStreamMuteState\",value:function(e){var t={isAudioMuted:!1,isVideoMuted:!1},n=e.getMediaStream();return n&&(t.isAudioMuted=n.getAudioTracks().map((function(e){return e.enabled})).includes(!1),t.isVideoMuted=n.getVideoTracks().map((function(e){return e.enabled})).includes(!1)),t}},{key:\"recoverPlayingState\",value:function(e){var t=e.isPlaying(),n=e.getDiv();if(t&&n){var i=n.parentNode;e.stop(),e.play(i,{objectFit:e.getObjectFit(),muted:e.getMuted()})}}},{key:\"mergeStream\",value:function(e,t){var n=t.getConnection(),i=t.getMediaStream();e.setConnection(n),n.setRemoteStream(i.id,e),e.setMediaStream(i),e.updateAudioPlayingState(t.hasAudio()),e.updateVideoPlayingState(t.hasVideo())}},{key:\"addSubscriptionRecord\",value:function(e,t,n){var i=t.getType();if(this.subscribedStreams_.has(e))this.subscribedStreams_.get(e).set(i,t);else{var r=new Map;r.set(t.getType(),t),this.subscribedStreams_.set(e,r)}if(this.subscriptedOptions_.has(e))this.subscriptedOptions_.get(e).set(i,n);else{var a=new Map;a.set(t.getType(),n),this.subscriptedOptions_.set(e,a)}this.deleteUnsubscriptionRecord(e,i)}},{key:\"addUnsubscriptionRecord\",value:function(e,t){if(this.unsubscribedStreams_.has(e))this.unsubscribedStreams_.get(e).set(t.getType(),t);else{var n=new Map;n.set(t.getType(),t),this.unsubscribedStreams_.set(e,n)}this.deleteSubscriptionRecord(e,t.getType())}},{key:\"getSubscribedStream\",value:function(e,t){return this.subscribedStreams_.has(e)&&this.subscribedStreams_.get(e).has(t)?this.subscribedStreams_.get(e).get(t):null}},{key:\"getOptions\",value:function(e,t){return this.subscriptedOptions_.has(e)&&this.subscriptedOptions_.get(e).has(t)?this.subscriptedOptions_.get(e).get(t):null}},{key:\"getUnsubscribedStream\",value:function(e,t){return this.unsubscribedStreams_.has(e)&&this.unsubscribedStreams_.get(e).has(t)?this.unsubscribedStreams_.get(e).get(t):null}},{key:\"deleteSubscriptionRecord\",value:function(e,t){this.subscribedStreams_.has(e)&&this.subscribedStreams_.get(e).delete(t),this.subscriptedOptions_.has(e)&&this.subscriptedOptions_.get(e).delete(t)}},{key:\"deleteUnsubscriptionRecord\",value:function(e,t){this.unsubscribedStreams_.has(e)&&this.unsubscribedStreams_.get(e).delete(t)}},{key:\"markAllStream\",value:function(){for(var e=0,t=b(this.subscribedStreams_.entries());e<t.length;e++)for(var n=S(t[e],2),i=n[0],r=0,a=b(n[1].entries());r<a.length;r++){var o=S(a[r],1)[0];this.setAutoRecoveryFlag(i,o)}for(var s=0,c=b(this.unsubscribedStreams_.entries());s<c.length;s++)for(var u=S(c[s],2),d=u[0],l=0,h=b(u[1].entries());l<h.length;l++){var p=S(h[l],1)[0];this.setAutoRecoveryFlag(d,p)}}},{key:\"setAutoRecoveryFlag\",value:function(e,t){if(MA.info(\"setAutoRecoveryFlag() mark [\".concat(e,\"][\").concat(t,\"]\")),this.autoRecoveryFlags_.has(e))this.autoRecoveryFlags_.get(e).set(t);else{var n=new Map;n.set(t),this.autoRecoveryFlags_.set(e,n)}}},{key:\"hasAutoRecoveryFlag\",value:function(e,t){return!!this.isEnabled&&(this.autoRecoveryFlags_.has(e)&&this.autoRecoveryFlags_.get(e).has(t))}},{key:\"deleteAutoRecoveryFlag\",value:function(e,t){this.autoRecoveryFlags_.has(e)&&this.autoRecoveryFlags_.get(e).delete(t)}},{key:\"delete\",value:function(e){this.unsubscribedStreams_.delete(e),this.subscribedStreams_.delete(e),this.subscriptedOptions_.delete(e),this.autoRecoveryFlags_.delete(e)}}]),e}(),XG=function(){function e(t){o(this,e),this.player_=t,this.canvas_=document.createElement(Ib),this.canvasCtx_=this.canvas_.getContext(\"2d\")}return c(e,[{key:\"setCanvasRect\",value:function(e,t){this.canvas_.width=e,this.canvas_.height=t}},{key:\"drawVideoToCanvas\",value:function(){var e=this.player_.getElement(),t=e.videoHeight,n=e.videoWidth,i=n*this.canvas_.height/(t*this.canvas_.width);if(i>1.05||i<.95){var r=n*t/(this.canvas_.width*this.canvas_.height);this.setCanvasRect(n/Math.sqrt(r),t/Math.sqrt(r))}this.canvasCtx_.drawImage(e,0,0,this.canvas_.width,this.canvas_.height)}},{key:\"generateVideoTrackFromCanvasCapture\",value:function(e){return this.canvas_.captureStream(e).getVideoTracks()[0]}},{key:\"generateStreamFromTrack\",value:function(e){var t=new MediaStream;return t.addTrack(e),t}},{key:\"destroy\",value:function(){this.player_.stop(),this.canvas_.width=0,this.canvas_.height=0,this.canvas_=null,this.canvasCtx_=null}},{key:\"canvas\",get:function(){return this.canvas_}},{key:\"canvasCtx\",get:function(){return this.canvasCtx_}},{key:\"canDrawVideoToCanvas\",get:function(){if(this.player_){var e=this.player_.getElement();if(e)return e.readyState===e.HAVE_ENOUGH_DATA}return!1}}]),e}(),YG=new Blob(['let t,e,a,i;onmessage=function(n){const{action:h,data:s}=n.data;switch(h){case\"render\":a=s.canvas,t=a.width,e=a.height,i=a.getContext(\"2d\"),function(t,e){const n=new TransformStream({async transform(t,e){const n=t.displayWidth,h=t.displayHeight,s=n*a.height/(h*a.width);if(s>1.05||s<.95){const t=n*h/(a.width*a.height);a.width=n/Math.sqrt(t),a.height=h/Math.sqrt(t)}i.drawImage(t,0,0,a.width,a.height);const o=new VideoFrame(a,{timestamp:t.timestamp});t.close(),e.enqueue(o)}});t.pipeThrough(n).pipeTo(e)}(s.readable,s.writable)}}'],{type:\"application/javascript\"}),$G=function(){function e(t){o(this,e);var n=t.videoTrack;this.width=void 0,this.height=void 0,this.canvas=document.createElement(\"canvas\"),this.offscreen=null,this.smallGenerator=new MediaStreamTrackGenerator({kind:\"video\"}),this.smallWritable=this.smallGenerator.writable,this.bigProcessor=new MediaStreamTrackProcessor({track:n}),this.bigReadable=this.bigProcessor.readable,this.initWorker()}return c(e,[{key:\"initWorker\",value:function(){try{this.worker=new Worker(URL.createObjectURL(YG)),MA.info(\"init worker processor success\")}catch(e){MA.warn(\"init worker processor failed. \".concat(e.error))}}},{key:\"setCanvasRect\",value:function(e,t){this.width=e,this.height=t,this.canvas.width=e,this.canvas.height=t,this.offscreen=this.canvas.transferControlToOffscreen(),this.worker.postMessage({action:\"render\",data:{canvas:this.offscreen,readable:this.bigReadable,writable:this.smallWritable}},[this.offscreen,this.bigReadable,this.smallWritable])}},{key:\"generatorVideoTrack\",value:function(){var e=new MediaStream([this.smallGenerator]);return null==e?void 0:e.getTracks()[0]}},{key:\"destroy\",value:function(){this.worker.terminate()}}]),e}(),ZG=function(){function e(t){o(this,e),this.localStream_=t,this.player_=null,this.processor_=null,this.initOffscreenSuccess_=!1}var t;return c(e,[{key:\"initialize\",value:(t=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(DO()&&(null===(t=navigator)||void 0===t?void 0:t.hardwareConcurrency)>=6)){e.next=13;break}return e.prev=1,e.next=4,this.initOffscreen();case 4:this.initOffscreenSuccess_=!0,MA.info(\"Initialize VideoGenerator successfully!\"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this.initCanvas();case 11:e.next=14;break;case 13:this.initCanvas();case 14:case\"end\":return e.stop()}}),e,this,[[1,8]])}))),function(){return t.apply(this,arguments)})},{key:\"generateSmallVideoTrack\",value:function(e){var t,n=e.height,i=e.width,r=e.frameRate,a=this.getSmallVideoProfile(i,n);return this.initOffscreenSuccess_?(this.processor_.setCanvasRect(a.width,a.height),t=this.processor_.generatorVideoTrack()):(this.processor_.setCanvasRect(a.width,a.height),this.player_.setRect({width:a.width,height:a.height}),t=this.processor_.generateVideoTrackFromCanvasCapture(r),this.interval_=YD.run(dT,this.render.bind(this),{fps:r})),t}},{key:\"render\",value:function(){this.processor_.canDrawVideoToCanvas&&this.processor_.drawVideoToCanvas()}},{key:\"destroy\",value:function(){YD.clearTask(this.interval_),this.processor_&&this.processor_.destroy()}},{key:\"initOffscreen\",value:function(){this.processor_=new $G({videoTrack:this.localStream_.getVideoTrack()})}},{key:\"initCanvas\",value:function(){this.player_=new nU({stream:this.localStream_,track:this.localStream_.getVideoTrack(),muted:!0,objectFit:\"cover\",mirror:!1}),this.player_.play().then((function(){MA.info(\"VideoGenerator: play local video success\")})).catch((function(){MA.error(\"VideoGenerator: Failed to play local video\")})),this.processor_=new XG(this.player_)}},{key:\"getSmallVideoProfile\",value:function(e,t){var n,i=this.localStream_.getVideoTrack(),r=this.localStream_.getVideoProfile();if(xO){var a=i.getSettings();a&&a.width&&a.height&&(r.width=a.width,r.height=a.height)}var o=r.width*r.height,s=e*t;return MA.info(\"big stream resolution: \".concat(r.width,\"*\").concat(r.height,\" small stream resolution: \").concat(e,\"*\").concat(t,\" \")),n=o>s?o/s:o/19200,{width:parseInt(r.width/Math.sqrt(n)),height:parseInt(r.height/Math.sqrt(n))}}}]),e}(),ez=new Map;var tz=function(){var e=a(n().mark((function e(t){var i,r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!SO()){e.next=2;break}return e.abrupt(\"return\");case 2:return e.next=4,iz(t);case 4:if(i=e.sent,MA.info(\"getUserMedia with constraints: \"+JSON.stringify(i)),!i.audio){e.next=11;break}return e.next=9,Jq.getMicrophones();case 9:r=e.sent,MA.info(\"microphones: \".concat(AC(r,[\"deviceId\",\"label\"])));case 11:if(!i.video){e.next=16;break}return e.next=14,Jq.getCameras();case 14:a=e.sent,MA.info(\"cameras: \".concat(AC(a,[\"deviceId\",\"label\"])));case 16:return e.prev=16,e.next=19,navigator.mediaDevices.getUserMedia(i);case 19:return e.abrupt(\"return\",e.sent);case 22:if(e.prev=22,e.t0=e.catch(16),\"NotFoundError\"!==e.t0.name){e.next=29;break}if(!a||0!==a.length){e.next=27;break}throw new vP({code:_P.DEVICE_NOT_FOUND,message:ZR({key:hE})});case 27:if(!r||0!==r.length){e.next=29;break}throw new vP({code:_P.DEVICE_NOT_FOUND,message:ZR({key:lE})});case 29:throw i.audio&&(null===(o=r)||void 0===o?void 0:o.length)>0&&(c=r.find((function(e){return e.deviceId===t.microphoneId})))&&c.getCapabilities&&MA.warn(AC(c.getCapabilities(),mT)),i.video&&(null===(s=a)||void 0===s?void 0:s.length)>0&&(u=a.find((function(e){return e.deviceId===t.cameraId})))&&u.getCapabilities&&MA.warn(AC(u.getCapabilities(),mT)),new vP({code:_P.INITIALIZE_FAILED,name:e.t0.name,message:e.t0.message,constraint:e.t0.constraint});case 32:case\"end\":return e.stop()}}),e,null,[[16,22]])})));return function(t){return e.apply(this,arguments)}}(),nz=AA({retryFunction:tz,settings:{retries:3,timeout:500},onError:function(e,t,n,i){MA.warn(\"getUserMedia error: \".concat(e)),\"NotReadableError\"===e.name?(i[0].video&&(i[0].maxResoution=!1,i[0].frameRate=i[0].frameRate>10?10:5),t()):e.message.includes(\"deviceId\")&&i[0].retryWhenExactFailed?(i[0].useExact=!1,t()):n(e)},onRetrying:function(e){MA.warn(\"getUserMedia retrying [\".concat(e,\"/3]\"))}});function iz(e){return{audio:rz(e),video:az(e)}}function rz(e){if(!e.audio)return!1;var t={};return rD(e.microphoneId)||(t.deviceId=e.useExact?{exact:e.microphoneId}:e.microphoneId),dC(e.channelCount)&&e.channelCount>1&&(t.channelCount=e.channelCount),lC(e.echoCancellation)&&!e.echoCancellation&&(t.echoCancellation=!1),lC(e.noiseSuppression)&&!e.noiseSuppression&&(t.noiseSuppression=!1),lC(e.autoGainControl)&&!e.autoGainControl&&(t.autoGainControl=!1),!!rD(t)||t}function az(e){if(!e.video)return!1;var t=e.maxResoution,n=void 0===t||t,i={};return e.cameraId?i.deviceId=e.useExact?{exact:e.cameraId}:e.cameraId:e.facingMode&&(i.facingMode=e.facingMode),e.width&&(i.width={ideal:e.width},n&&(i.width.max=e.width)),e.height&&(i.height={ideal:e.height},n&&(i.height.max=e.height)),JE&&gR&&e.width&&e.height&&e.width*e.height<101376&&(i.width=e.width,i.height=e.height),e.frameRate&&(i.frameRate=e.frameRate),!!rD(i)||i}var oz=function(){var e=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!SO()){e.next=2;break}return e.abrupt(\"return\");case 2:if(i=null,!(LR&&UR<74||jR)){e.next=27;break}return r=cz(t),MA.info(\"getDisplayMedia with constraints: \"+JSON.stringify(r)),e.next=8,navigator.mediaDevices.getDisplayMedia(r);case 8:if(a=e.sent,!t.screenAudio){e.next=14;break}return MA.warn(\"Your browser not support capture system audio\"),e.abrupt(\"return\",a);case 14:if(!t.audio){e.next=24;break}return o=sz(t),MA.info(\"getUserMedia with constraints: \"+JSON.stringify(o)),e.next=19,navigator.mediaDevices.getUserMedia(o);case 19:return i=e.sent,a.addTrack(i.getAudioTracks()[0]),e.abrupt(\"return\",a);case 24:return e.abrupt(\"return\",a);case 25:e.next=53;break;case 27:if(!t.screenAudio){e.next=37;break}return t.audioConstraints={echoCancellation:t.echoCancellation,autoGainControl:t.autoGainControl,noiseSuppression:t.noiseSuppression,sampleRate:44100},s=cz(t),MA.info(\"getDisplayMedia with constraints: \"+JSON.stringify(s)),e.next=33,navigator.mediaDevices.getDisplayMedia(s);case 33:return c=e.sent,e.abrupt(\"return\",c);case 37:return u=cz(t),MA.info(\"getDisplayMedia with constraints: \"+JSON.stringify(u)),e.next=41,navigator.mediaDevices.getDisplayMedia(u);case 41:if(d=e.sent,!t.audio){e.next=52;break}return l=sz(t),MA.info(\"getUserMedia with constraints: \"+JSON.stringify(l)),e.next=47,navigator.mediaDevices.getUserMedia(l);case 47:return i=e.sent,d.addTrack(i.getAudioTracks()[0]),e.abrupt(\"return\",d);case 52:return e.abrupt(\"return\",d);case 53:case\"end\":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function sz(e){var t={echoCancellation:e.echoCancellation,autoGainControl:e.autoGainControl,noiseSuppression:e.noiseSuppression,sampleRate:e.sampleRate,channelCount:e.channelCount};return cC(e.microphoneId)||(t.deviceId=e.microphoneId),{audio:t,video:!1}}function cz(e){var t={systemAudio:\"include\",selfBrowserSurface:\"include\",surfaceSwitching:\"include\"},n={width:jR?{max:e.width}:{ideal:e.width,max:e.width},height:jR?{max:e.height}:{ideal:e.height,max:e.height},frameRate:e.frameRate,displaySurface:\"monitor\"};return t.video=n,cC(e.audioConstraints)||(t.audio=e.audioConstraints),t}var uz,dz,lz,hz,pz,fz,mz,_z,vz,gz,yz,Sz,bz,kz,Iz=new Map([[\"120p\",{width:160,height:120,frameRate:15,bitrate:200}],[\"120p_2\",{width:160,height:120,frameRate:15,bitrate:100}],[\"180p\",{width:320,height:180,frameRate:15,bitrate:350}],[\"180p_2\",{width:320,height:180,frameRate:15,bitrate:150}],[\"240p\",{width:320,height:240,frameRate:15,bitrate:400}],[\"240p_2\",{width:320,height:240,frameRate:15,bitrate:200}],[\"360p\",{width:640,height:360,frameRate:15,bitrate:800}],[\"360p_2\",{width:640,height:360,frameRate:15,bitrate:400}],[\"480p\",{width:640,height:480,frameRate:15,bitrate:900}],[\"480p_2\",{width:640,height:480,frameRate:15,bitrate:500}],[\"720p\",{width:1280,height:720,frameRate:15,bitrate:1500}],[\"1080p\",{width:1920,height:1080,frameRate:15,bitrate:2e3}],[\"1440p\",{width:2560,height:1440,frameRate:30,bitrate:4860}],[\"4K\",{width:3840,height:2160,frameRate:30,bitrate:9e3}]]),Tz=new Map([[\"480p\",{width:640,height:480,frameRate:5,bitrate:900}],[\"480p_2\",{width:640,height:480,frameRate:30,bitrate:1e3}],[\"720p\",{width:1280,height:720,frameRate:5,bitrate:1200}],[\"720p_2\",{width:1280,height:720,frameRate:30,bitrate:3e3}],[\"1080p\",{width:1920,height:1080,frameRate:5,bitrate:1600}],[\"1080p_2\",{width:1920,height:1080,frameRate:30,bitrate:4e3}]]),wz=new Map([[\"standard\",{sampleRate:48e3,channelCount:1,bitrate:40}],[\"standard-stereo\",{sampleRate:48e3,channelCount:2,bitrate:64}],[\"high\",{sampleRate:48e3,channelCount:1,bitrate:128}],[\"high-stereo\",{sampleRate:48e3,channelCount:2,bitrate:192}]]),Ez=new Map,Rz=(uz=JG(WI),dz=JG(WI),lz=JG(WI),hz=JG(WI),pz=RG.apply(void 0,b(wG.LOCAL_STREAM.switchDevice)),fz=RG(wG.STREAM.addTrack),mz=RG(wG.STREAM.removeTrack),_z=RG(wG.STREAM.replaceTrack),vz=LG({retries:10,timeout:3e3,onRetryFailed:function(e){oD.logFailedEvent({userId:this.client_?this.client_.getUserId():this.userId_,eventType:uI,error:e}),this.emitter_.emit(jO,new vP({code:_P.DEVICE_AUTO_RECOVER_FAILED,message:e.message}))}}),gz=EG(wG.LOCAL_STREAM.setAudioCaptureVolume),yz=JG(WI),Sz=function(e){d(LocalStream,e);var r,s,u,h,p,f,m,_,g,S,b,k,I,T=v(LocalStream);function LocalStream(e){var n;o(this,LocalStream);var i=t(t({},e),{isRemote:!1,type:\"local\"});return(n=T.call(this,i)).name_=WI,n.client_=null,n.video_=e.video,n.audio_=e.audio,n.cameraId_=e.cameraId,n.cameraGroupId_=\"\",n.facingMode_=e.facingMode,n.microphoneId_=e.microphoneId,n.microphoneGroupId_=\"\",n.microphoneLabel_=\"\",n.videoSource_=e.videoSource,n.audioSource_=e.audioSource,n.screen_=e.screen,n.screenAudio_=e.screenAudio,n.audioProfile_={echoCancellation:!0,autoGainControl:!0,noiseSuppression:!0,sampleRate:48e3,channelCount:1,bitrate:40},n.screenAudio_&&(n.audioProfile_.echoCancellation=!0,n.audioProfile_.autoGainControl=!1,n.audioProfile_.noiseSuppression=!1),lC(e.echoCancellation)&&(n.audioProfile_.echoCancellation=e.echoCancellation),lC(e.autoGainControl)&&(n.audioProfile_.autoGainControl=e.autoGainControl),lC(e.noiseSuppression)&&(n.audioProfile_.noiseSuppression=e.noiseSuppression),n.videoProfile_=Iz.get(\"480p_2\"),n.screenProfile_=Tz.get(\"1080p\"),n.videoSetting_=null,n.muteState_={video:!1,audio:!1,auxVideo:!1},n.beautyStatus_=!1,n.prevAudioRecoverTime_=0,n.prevVideoRecoverTime_=0,n.isAudioRecovering_=!1,n.isVideoRecovering_=!1,n.initState(),n.canvas_=null,n.canvasInterval_=null,n.canvasTrack_=null,n.gain_={audioTrack:null,source:null,gainNode:null},n.captureVolume_=100,n.enableAutoRecoverCapture_=!!cC(e.enableAutoRecoverCapture)||e.enableAutoRecoverCapture,n.enableAutoRecoverOther_=!lC(e.enableAutoRecoverOther)||e.enableAutoRecoverOther,n.log_.info(\"stream created: \".concat(n.id_,\" autoRecover: \").concat(n.enableAutoRecoverCapture_)),n.isAIDenoiser=!1,n}return c(LocalStream,[{key:\"initState\",value:function(){this.isAddingTrack_=!1,this.isRemovingTrack_=!1,this.setIsReadyToPublish(!1),this.setPublishState(AI)}},{key:\"installEvents\",value:function(){y(l(LocalStream.prototype),\"installEvents\",this).call(this),OC.on(SA,this.onVideoTrackStopped,this),OC.on(mA,this.onVideoTrackStopped,this),OC.on(kA,this.onAudioTrackStopped,this),OC.on(bA,this.onAudioTrackStopped,this)}},{key:\"uninstallEvents\",value:function(){y(l(LocalStream.prototype),\"uninstallEvents\",this).call(this),OC.off(SA,this.onVideoTrackStopped,this),OC.off(mA,this.onVideoTrackStopped,this),OC.off(kA,this.onAudioTrackStopped,this),OC.off(bA,this.onAudioTrackStopped,this)}},{key:\"initialize\",value:function(){var e=this;return new Promise((function(t,n){if(bO())n(new vP({code:_P.INVALID_OPERATION,message:ZR({key:nE})}));else{if(cC(e.audio_)){var i=new MediaStream;return cC(e.audioSource_)||(i.addTrack(e.audioSource_),e.updateAudioPlayingState(!0)),cC(e.videoSource_)||(i.addTrack(e.videoSource_),e.updateVideoPlayingState(!0)),e.setMediaStream(i),oD.logSuccessEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:oI,kind:\"custom\"}),e.setIsReadyToPublish(!0),t()}e.screen_?(e.log_.info(\"initialize stream audio: \"+e.audio_+\" screenAudio: \"+e.screenAudio_+\" screen: \"+e.screen_),oz({audio:e.audio_,screenAudio:e.screenAudio_,microphoneId:e.microphoneId_,width:e.screenProfile_.width,height:e.screenProfile_.height,frameRate:e.screenProfile_.frameRate,sampleRate:e.audioProfile_.sampleRate,channelCount:e.audioProfile_.channelCount,autoGainControl:e.audioProfile_.autoGainControl,noiseSuppression:e.audioProfile_.noiseSuppression,echoCancellation:e.audioProfile_.echoCancellation}).then((function(n){e.setMediaStream(n),e.updateAudioPlayingState(e.audio_||e.screenAudio_),e.updateVideoPlayingState(!0);var i=e.getVideoTrack();return i.applyConstraints&&i.applyConstraints({frameRate:{min:e.screenProfile_.frameRate,ideal:e.screenProfile_.frameRate},width:e.screenProfile_.width,height:e.screenProfile_.height}).catch((function(t){e.warn(\"screen applyConstraints failed: \".concat(t))})),e.listenForScreenSharingStopped(i),e.setVideoContentHint(Wb),e.updateDeviceIdInUse(),e.setIsReadyToPublish(!0),e.log_.info(JSON.stringify(i.getSettings())),oD.logSuccessEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:oI,kind:\"getDisplayMedia\"}),t()})).catch((function(t){oD.logFailedEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:oI,kind:\"getDisplayMedia\",error:t}),e.log_.error(\"getDisplayMedia error observed \"+t),n(t instanceof vP?t:new vP({code:_P.INITIALIZE_FAILED,name:t.name,message:t.message}))}))):(OC.emit(hA,{stream:e,audio:e.audio_,video:e.video_}),e.log_.info(\"initialize stream audio: \"+e.audio_+\" video: \"+e.video_),nz({audio:e.audio_,video:e.video_,facingMode:e.facingMode_,cameraId:e.cameraId_,microphoneId:e.microphoneId_,width:e.videoProfile_.width,height:e.videoProfile_.height,frameRate:e.videoProfile_.frameRate,sampleRate:e.audioProfile_.sampleRate,channelCount:e.audioProfile_.channelCount,autoGainControl:e.audioProfile_.autoGainControl,noiseSuppression:e.audioProfile_.noiseSuppression,echoCancellation:e.audioProfile_.echoCancellation,useExact:!0,retryWhenExactFailed:!0}).then((function(n){return OC.emit(pA,{stream:e,audio:e.audio_,video:e.video_}),e.setMediaStream(n),n.getTracks().forEach((function(t){if(xO){var n=t.getSettings();e.log_.debug(\"\".concat(t.kind,\" settings: \").concat(JSON.stringify(n))),t.kind===wb&&(e.videoSetting_=n)}PO&&e.log_.info(\"\".concat(t.kind,\" capabilities: \").concat(AC(t.getCapabilities(),mT)))})),e.updateAudioPlayingState(e.audio_),e.updateVideoPlayingState(e.video_),e.updateDeviceIdInUse(),e.log_.info(\"gotStream hasAudio: \"+e.hasAudio()+\" hasVideo: \"+e.hasVideo()),e.setIsReadyToPublish(!0),oD.logSuccessEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:oI,kind:\"getUserMedia\"}),t()})).catch((function(t){OC.emit(fA,{stream:e,audio:e.audio_,video:e.video_,error:t}),oD.logFailedEvent({userId:e.client_?e.client_.getUserId():e.userId_,eventType:oI,kind:\"getUserMedia\",error:t}),e.log_.error(\"getUserMedia error observed \"+t),n(t)})))}}))}},{key:\"listenForScreenSharingStopped\",value:function(e){var t=this;e.addEventListener(\"ended\",(function(e){t.log_.info(\"screen sharing was stopped because the video track is ended\"),t.emitter_.emit(LO)}))}},{key:\"muteAudio\",value:function(){var e=y(l(LocalStream.prototype),\"muteAudio\",this).call(this);return e&&(this.log_.info(\"localStream mute audio\"),this.sendMutedFlag(Tb,!0)),e}},{key:\"muteVideo\",value:function(){var e=y(l(LocalStream.prototype),\"muteVideo\",this).call(this);return e&&(this.log_.info(\"localStream mute video\"),this.sendMutedFlag(wb,!0)),e}},{key:\"unmuteAudio\",value:function(){var e=y(l(LocalStream.prototype),\"unmuteAudio\",this).call(this);return e&&(this.log_.info(\"localStream unmute audio\"),this.sendMutedFlag(Tb,!1)),e}},{key:\"unmuteVideo\",value:function(){var e=y(l(LocalStream.prototype),\"unmuteVideo\",this).call(this);return e&&(this.log_.info(\"localStream unmute video\"),this.sendMutedFlag(wb,!1)),e}},{key:\"sendMutedFlag\",value:function(e,t){this.setMuteState(e,t);var n=this.getConnection();if(n){n.sendMutedFlag(this.muteState_,this);var i=n.getUserId(),r=n.getTinyId(),a=\"\".concat(t?Mb:Nb,\" local \").concat(e,\" track\");tD(i,{eventId:e===Tb?t?kP:TP:t?IP:wP,eventDesc:a,timestamp:Gm(),userId:i,tinyId:r})}}},{key:\"setMuteState\",value:function(e,t){this.muteState_[e]=t,this.log_.info(\"set \".concat(e,\" muted state: [\").concat(t?\"mute\":\"unmute\",\"]\"))}},{key:\"setAudioProfile\",value:(I=a(n().mark((function e(r){var a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(\"object\"===i(r)?a=r:void 0===(a=wz.get(r))&&(a=wz.get(\"standard\")),this.log_.info(\"setAudioProfile: \"+JSON.stringify(a)),!(o=this.getAudioTrack())){e.next=6;break}return e.next=6,o.applyConstraints(a);case 6:if(s=this.audioProfile_.bitrate!==a.bitrate,this.audioProfile_=t(t({},this.audioProfile_),a),!s||!this.connection_){e.next=12;break}return e.next=11,this.connection_.setBandwidth({bandwidth:this.audioProfile_.bitrate,type:Tb});case 11:this.connection_.sendMediaSettings(this);case 12:case\"end\":return e.stop()}}),e,this)}))),function(e){return I.apply(this,arguments)})},{key:\"setVideoProfile\",value:(k=a(n().mark((function e(i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.connection_||yO()){e.next=2;break}throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:rE})});case 2:if(rC(i)?a=t(t({},this.videoProfile_),i):uC(i)&&(a=Iz.get(i),cC(a)&&(a=Iz.get(\"480p_2\"))),null!==(r=this.client_)&&void 0!==r&&r.get2k4kFlag()&&(1!==this.client_.get2k4kFlag()&&!this.screen_&&a.height*a.width>=3686400?(a.width=1920,a.height=1080,this.log_.warn(pT)):zG.handleFunctionState({fnName:\"2K_4K\"})),a&&a.width*a.height>921600&&JR&&(a.width=1280,a.height=720,this.log_.warn(\"reset to 1280 * 720 on iOS 13~14\")),this.log_.info(\"setVideoProfile \"+JSON.stringify(a)),!(o=this.getVideoTrack())){e.next=10;break}return e.next=10,o.applyConstraints(a);case 10:if(s=this.videoProfile_.bitrate!==a.bitrate,this.videoProfile_=a,!s||!this.connection_){e.next=16;break}return e.next=15,this.connection_.setBandwidth({bandwidth:a.bitrate,type:wb,videoType:Cb});case 15:this.connection_.sendMediaSettings(this);case 16:case\"end\":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:\"getVideoBitrate\",value:function(){return this.screen_?this.screenProfile_.bitrate:this.videoProfile_.bitrate}},{key:\"getAudioBitrate\",value:function(){return this.audioProfile_.bitrate}},{key:\"setScreenProfile\",value:function(e){var t=e;uC(e)&&(t=Tz.get(e)||Tz.get(\"1080p\")),this.log_.info(\"setScreenProfile \"+JSON.stringify(e)),this.screenProfile_=t}},{key:\"getVideoProfile\",value:function(){return this.screen_?this.screenProfile_:this.videoProfile_}},{key:\"getAudioProfile\",value:function(){return this.audioProfile_}},{key:\"setVideoContentHint\",value:function(e){var t=this.getVideoTrack();t&&\"contentHint\"in t&&(this.log_.info(\"set video track contentHint to: \"+e),t.contentHint=e,t.contentHint!==e&&this.log_.warn(\"Invalid video track contentHint: \"+e))}},{key:\"switchDevice\",value:(b=a(n().mark((function e(t,i){var r,a,o,s,c,u,d,l,h,p,f,m,_,v,g,y,S,b;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.mediaStream_&&this.cameraId_!==i&&this.facingMode_!==i){e.next=2;break}return e.abrupt(\"return\");case 2:if(a=t===wb,!(r=t===Tb)||i!==this.microphoneId_){e.next=11;break}if(i===ZI){e.next=7;break}return e.abrupt(\"return\");case 7:return e.next=9,nM(this.microphoneGroupId_,this.microphoneLabel_);case 9:if(!e.sent){e.next=11;break}return e.abrupt(\"return\");case 11:return this.setIsReadyToPublish(!1),this.log_.info(\"switchDevice \"+t+\" to: \"+i),r&&(o=this.getAudioTrack(),s=this.getMicrophoneTrackMixed(),o&&o.stop(),s&&s.stop()),a&&((c=this.getVideoTrack())&&c.stop(),ER&&(u=this.getAudioTrack())&&(this.log_.info(\"stop audio track first in huawei env\"),u.stop())),e.prev=15,e.next=18,nz({audio:r||ER,video:a,facingMode:i===Db||i===Ob?i:void 0,cameraId:a?i:this.cameraId_,microphoneId:r?i:this.microphoneId_,width:this.videoProfile_.width,height:this.videoProfile_.height,frameRate:this.videoProfile_.frameRate,sampleRate:this.audioProfile_.sampleRate,channelCount:this.audioProfile_.channelCount,useExact:!0,retryWhenExactFailed:!1});case 18:if(d=e.sent,l=null,!r){e.next=25;break}(h=d.getAudioTracks()[0])&&this.isAudioTrackMixed()?(p=this.getAudioTrack(),f=Jq.AudioMixerPlugin.getAudioTrackMap(),m=Jq.AudioMixerPlugin.mix({targetTrack:h,sourceList:f.get(p.id).sourceList,trackList:f.get(p.id).trackList}),l=m):l=h,e.next=34;break;case 25:if(!(l=d.getVideoTracks()[0])||!this.isVideoTrackBeautified()){e.next=30;break}return e.next=29,this.generateBeautyTrack(l);case 29:l=e.sent;case 30:if(!(_=d.getAudioTracks()[0])||!ER){e.next=34;break}return e.next=34,this.replaceTrack(_);case 34:return e.next=36,this.replaceTrack(l);case 36:this.updateDeviceIdInUse(),(v=this.getConnection())&&(g=v.getUserId(),y=v.getTinyId(),S=AP,b=\"switch camera\",r&&(S=xP,b=\"switch microphone\"),tD(g,{eventId:S,eventDesc:b,timestamp:Gm(),userId:g,tinyId:y})),this.log_.info(\"switch \".concat(r?\"microphone\":\"camera\",\" success \")),r&&(this.audio_=!0),a&&(this.video_=!0,i!==Ob&&i!==Db||(this.facingMode_=i)),this.setIsReadyToPublish(!0),e.next=50;break;case 45:throw e.prev=45,e.t0=e.catch(15),this.log_.error(e.t0),r?this.recoverCapture({audio:!0,video:!1,microphoneId:this.microphoneId_}):this.recoverCapture({audio:!1,video:!0,cameraId:this.cameraId_,facingMode:this.facingMode_}),e.t0;case 50:case\"end\":return e.stop()}}),e,this,[[15,45]])}))),function(e,t){return b.apply(this,arguments)})},{key:\"addTrack\",value:(S=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t.kind===wb&&xO&&(i=t.getSettings(),!this.videoSetting_||i.width===this.videoSetting_.width&&i.height===this.videoSetting_.height||this.log_.warn(\"video resolution of the track (\".concat(i.width,\" x \").concat(i.height,\") shall be kept the same as the previous: \").concat(this.videoSetting_.width,\" x \").concat(this.videoSetting_.height,\". It may cause abnormal Cloud Recording.\"))),this.isAddingTrack_=!0,this.keepMuteState(t),this.mediaStream_.addTrack(t),!(r=this.getConnection())){e.next=11;break}return a=null,t.kind===wb&&(zR||GR)&&fC(t)&&(a=this.getCanvasTrack()),e.next=11,r.addTrack(a||t,this);case 11:t.kind===Tb?(this.audio_=!0,this.updateAudioPlayingState(!0),100!==this.captureVolume_&&this.setAudioCaptureVolume(this.captureVolume_)):(this.video_=!0,this.updateVideoPlayingState(!0)),this.isAddingTrack_=!1,e.next=20;break;case 15:throw e.prev=15,e.t0=e.catch(0),this.mediaStream_.removeTrack(t),this.isAddingTrack_=!1,e.t0;case 20:case\"end\":return e.stop()}}),e,this,[[0,15]])}))),function(e){return S.apply(this,arguments)})},{key:\"removeTrack\",value:(g=a(n().mark((function e(t){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.isRemovingTrack_=!0,!(i=this.getConnection())){e.next=17;break}if(t.kind!==wb||!zR&&!GR||!this.canvasTrack_){e.next=10;break}return e.next=7,i.removeTrack(this.canvasTrack_,this);case 7:this.clearCanvas(),e.next=17;break;case 10:if(t.kind!==Tb||!this.gain_.audioTrack){e.next=15;break}return e.next=13,i.removeTrack(this.gain_.audioTrack,this);case 13:e.next=17;break;case 15:return e.next=17,i.removeTrack(t,this);case 17:this.mediaStream_.removeTrack(t),t.kind===Tb?(this.audio_=!1,this.updateAudioPlayingState(!1),this.stopGainNode()):(this.video_=!1,this.updateVideoPlayingState(!1)),this.isRemovingTrack_=!1,e.next=26;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.isRemovingTrack_=!1,e.t0;case 26:case\"end\":return e.stop()}}),e,this,[[0,22]])}))),function(e){return g.apply(this,arguments)})},{key:\"replaceTrack\",value:(_=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.kind===wb&&xO&&(i=t.getSettings(),!this.videoSetting_||i.width===this.videoSetting_.width&&i.height===this.videoSetting_.height||this.log_.warn(\"video resolution of the track (\".concat(i.width,\" x \").concat(i.height,\") shall be kept the same as the previous: \").concat(this.videoSetting_.width,\" x \").concat(this.videoSetting_.height,\". It may cause abnormal Cloud Recording.\"))),this.keepMuteState(t),r=this.mediaStream_,t.kind!==Tb){e.next=12;break}if(r.removeTrack(r.getAudioTracks()[0]),r.addTrack(t),y(l(LocalStream.prototype),\"restartAudio\",this).call(this),!this.gain_.gainNode){e.next=10;break}return this.reconnectGainNode(t),e.abrupt(\"return\");case 10:e.next=15;break;case 12:r.removeTrack(r.getVideoTracks()[0]),r.addTrack(t),y(l(LocalStream.prototype),\"restartVideo\",this).call(this);case 15:if(!(a=this.getConnection())){e.next=21;break}if(t.kind!==wb||!zR&&!GR||!this.canvasTrack_){e.next=19;break}return e.abrupt(\"return\");case 19:return e.next=21,a.replaceTrack(t,this);case 21:case\"end\":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:\"recoverCapture\",value:(m=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l,h,p,f,m,_,v,g,y;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(!this.mediaStream_||!this.enableAutoRecoverCapture_||t.audio&&!t.video&&this.isAudioRecovering_||t.video&&!t.audio&&this.isVideoRecovering_)){e.next=2;break}return e.abrupt(\"return\");case 2:return t.audio&&(this.isAudioRecovering_=!0),t.video&&(this.isVideoRecovering_=!0),this.log_.warn(\"recoverCapture() trying \"+JSON.stringify(t)),i=this.audio_&&t.audio,r=this.video_&&t.video,e.prev=7,e.next=10,Jq.getCameras();case 10:return a=e.sent,e.next=13,Jq.getMicrophones();case 13:if(o=e.sent,r&&0===a.length&&(r=!1,this.log_.warn(\"recoverCapture() video flag is true, but no camera detected, set video to false\")),i&&0===o.length&&(i=!1,this.log_.warn(\"recoverCapture() audio flag is true, but no microphone detected, set audio to false\")),i||r){e.next=21;break}return t.audio&&(this.isAudioRecovering_=!1),t.video&&(this.isVideoRecovering_=!1),this.log_.warn(\"recoverCapture() both audio and video are false, aborted\"),e.abrupt(\"return\");case 21:return s=t&&a.findIndex((function(e){return e.deviceId===t.cameraId}))>=0,c=t&&o.findIndex((function(e){return e.deviceId===t.microphoneId}))>=0,i&&(null===(u=this.getAudioTrack())||void 0===u||u.stop()),r&&(null===(d=this.getVideoTrack())||void 0===d||d.stop()),e.next=27,nz({audio:i,video:r,cameraId:s?t.cameraId:void 0,microphoneId:c?t.microphoneId:void 0,facingMode:this.facingMode_,width:this.videoProfile_.width,height:this.videoProfile_.height,frameRate:this.videoProfile_.frameRate,sampleRate:this.audioProfile_.sampleRate,channelCount:this.audioProfile_.channelCount});case 27:l=e.sent,h=l.getTracks(),p=0;case 30:if(!(p<h.length)){e.next=57;break}if((f=h[p]).kind!==Tb||!this.isAudioTrackMixed()){e.next=43;break}if(m=this.getAudioTrack(),_=Jq.AudioMixerPlugin.getAudioTrackMap(),(v=_.get(m.id)).hasMicrophone){e.next=39;break}return f.stop(),e.abrupt(\"continue\",54);case 39:return g=Jq.AudioMixerPlugin.mix({targetTrack:f,sourceList:v.sourceList,trackList:v.trackList}),e.next=42,this.replaceTrack(g);case 42:return e.abrupt(\"continue\",54);case 43:if(f.kind!==wb||!this.isVideoTrackBeautified()){e.next=50;break}return e.next=46,this.generateBeautyTrack(f);case 46:return y=e.sent,e.next=49,this.replaceTrack(y);case 49:return e.abrupt(\"continue\",54);case 50:return e.next=52,this.replaceTrack(f);case 52:if(\"ended\"!==f.readyState){e.next=54;break}throw new Error(\"new track is failed, muted \".concat(f.muted,\" readyState \").concat(f.readyState));case 54:p++,e.next=30;break;case 57:this.updateDeviceIdInUse(),oD.logSuccessEvent({userId:this.client_?this.client_.getUserId():this.userId_,eventType:uI}),t.audio&&(this.isAudioRecovering_=!1),t.video&&(this.isVideoRecovering_=!1),this.log_.warn(\"recoverCapture() successfully\"),this.emitter_.emit(VO,{isCamera:t.video,isMicrophone:t.audio,cameraId:this.cameraId_,microphoneId:this.microphoneId_}),e.next=71;break;case 65:throw e.prev=65,e.t0=e.catch(7),t.audio&&(this.isAudioRecovering_=!1),t.video&&(this.isVideoRecovering_=!1),this.log_.warn(\"recoverCapture() failed, \"+e.t0),e.t0;case 71:case\"end\":return e.stop()}}),e,this,[[7,65]])}))),function(e){return m.apply(this,arguments)})},{key:\"updateDeviceIdInUse\",value:function(){var e=this;if(!this.mediaStream_)return this.cameraId_=\"\",this.cameraGroupId_=\"\",this.microphoneId_=\"\",void(this.microphoneGroupId_=\"\");xO&&this.mediaStream_.getTracks().forEach((function(t){if(t.kind===Tb&&e.isAudioTrackMixed()){var n=e.getMicrophoneTrackMixed();if(n){var i=n.getSettings(),r=i.deviceId,a=i.groupId;r&&(e.microphoneId_=r,e.microphoneGroupId_=a,e.microphoneLabel_=n.label)}}else if(t.kind===wb&&e.isVideoTrackBeautified()){var o=e.getBeautyOriginTrack();if(o){var s=o.getSettings(),c=s.deviceId,u=s.groupId;c&&(e.cameraId_=c,e.cameraGroupId_=u)}}else{var d=t.getSettings(),l=d.deviceId,h=d.groupId;l&&(t.kind===Tb?(e.microphoneId_=l,e.microphoneGroupId_=h,e.microphoneLabel_=t.label):t.kind!==wb||e.screen_||(e.cameraId_=l,e.cameraGroupId_=h))}}));var t=this.mediaStream_.getAudioTracks(),n=this.mediaStream_.getVideoTracks();t&&0===t.length&&(this.microphoneId_=\"\",this.microphoneGroupId_=\"\"),n&&0===n.length&&(this.cameraId_=\"\",this.cameraGroupId_=\"\")}},{key:\"isAudioTrackMixed\",value:function(){if(Jq.AudioMixerPlugin){var e=Jq.AudioMixerPlugin.getAudioTrackMap(),t=this.getAudioTrack();if(e&&t&&e.has(t.id))return!0}return!1}},{key:\"getMicrophoneTrackMixed\",value:function(){if(Jq.AudioMixerPlugin){var e=Jq.AudioMixerPlugin.getAudioTrackMap(),t=this.getAudioTrack();if(e&&t&&e.has(t.id)){var n=e.get(t.id);return n.hasMicrophone?n.microphoneTrack:null}}return null}},{key:\"isVideoTrackBeautified\",value:function(){if(Jq.beautyTrackMap){var e=Jq.beautyTrackMap,t=this.getVideoTrack();if(t&&e.has(t.id))return!0}return!1}},{key:\"getBeautyOriginTrack\",value:function(){if(Jq.beautyTrackMap){var e=Jq.beautyTrackMap,t=this.getVideoTrack();if(t&&e.has(t.id)){var n=e.get(t.id);if(n.originTrack)return n.originTrack}}return null}},{key:\"generateBeautyTrack\",value:(f=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null,r=this.getVideoTrack(),a=Jq.beautyTrackMap.get(r.id),o=a.param,a.type){e.next=8;break}i=a.pluginInstance.generateBeautyTrack(t),e.next=22;break;case 8:e.t0=a.type,e.next=\"beauty\"===e.t0?11:\"virtual\"===e.t0?13:\"mixed\"===e.t0?17:21;break;case 11:return i=a.pluginInstance.generateBeautyTrack(t),e.abrupt(\"break\",22);case 13:return e.next=15,a.pluginInstance.generateVirtualTrack({videoTrack:t,type:o.type,img:o.img});case 15:case 19:return i=e.sent,e.abrupt(\"break\",22);case 17:return e.next=19,a.pluginInstance.generateMixedTrack({videoTrack:t,type:o.type,img:o.img});case 21:return e.abrupt(\"break\",22);case 22:return a.pluginInstance.deleteSource(r.id),this.log_.info(\"regenerate beauty track, track id = \".concat(t.id)),e.abrupt(\"return\",i);case 25:case\"end\":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:\"getScreen\",value:function(){return this.screen_}},{key:\"hasScreenTrack\",value:function(){if(this.screen_)return!0;var e=this.getVideoTrack();return!!e&&(e.contentHint===Wb||e.contentHint===Gb)}},{key:\"getVideo\",value:function(){return this.video_}},{key:\"getAudio\",value:function(){return this.audio_}},{key:\"getCameraId\",value:function(){return this.cameraId_}},{key:\"getMicrophoneId\",value:function(){return this.microphoneId_}},{key:\"getMicrophoneGroupId\",value:function(){return this.microphoneGroupId_}},{key:\"getIsReadyToPublish\",value:function(){return this.isReadyToPublish_}},{key:\"setIsReadyToPublish\",value:function(e){this.isReadyToPublish_=e}},{key:\"setPublishState\",value:function(e){this.publishState_=e}},{key:\"setBeautyStatus\",value:function(e){this.beautyStatus_=!!e}},{key:\"getBeautyStatus\",value:function(){return this.beautyStatus_}},{key:\"syncMuteState\",value:function(){var e=this.getAudioTrack(),t=this.getVideoTrack();if(e){var n=!e.enabled;this.setMuteState(Tb,n)}if(t){var i=!t.enabled;this.setMuteState(wb,i)}this.connection_&&this.connection_.sendMutedFlag(this.muteState_,this)}},{key:\"keepMuteState\",value:function(e){e instanceof window.MediaStreamTrack&&this.muteState_[e.kind]&&(e.enabled=!1,this.log_.warn(\"prev \".concat(e.kind,\" track is muted, keep mute state\")))}},{key:\"onVideoTrackStopped\",value:(p=a(n().mark((function e(t){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.stream,r=t.type,i===this&&this.video_&&this.cameraId_&&tM(this.getVideoTrack())&&!this.isVideoRecovering_&&(r!==Mb||!gR||!jR)){e.next=3;break}return e.abrupt(\"return\");case 3:if(!(Date.now()-this.prevVideoRecoverTime_<cT)){e.next=6;break}return setTimeout((function(){return a.onVideoTrackStopped({stream:i,type:r})}),cT),e.abrupt(\"return\");case 6:r===Mb?setTimeout((function(){var e=a.getVideoTrack();null!=e&&e.muted&&\"visible\"===document.visibilityState&&a.recoverVideoCapture(r)}),5e3):this.recoverVideoCapture(r);case 7:case\"end\":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:\"onAudioTrackStopped\",value:(h=a(n().mark((function e(t){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.stream,r=t.type,!(i!==this||!this.audio_||!this.microphoneId_||this.isAudioRecovering_||r===Mb&&gR&&jR)){e.next=3;break}return e.abrupt(\"return\");case 3:if(!(Date.now()-this.prevAudioRecoverTime_<cT)){e.next=6;break}return setTimeout((function(){return a.onAudioTrackStopped({stream:i,type:r})}),cT),e.abrupt(\"return\");case 6:r===Mb?setTimeout((function(){var e=a.getAudioTrack();null!=e&&e.muted&&\"visible\"===document.visibilityState&&a.recoverAudioCapture(r)}),5e3):this.recoverAudioCapture(r);case 7:case\"end\":return e.stop()}}),e,this)}))),function(e){return h.apply(this,arguments)})},{key:\"recoverAudioCapture\",value:(u=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.prevAudioRecoverTime_=Date.now(),oD.uploadEvent({log:\"stat-local-audio-\".concat(t),userId:this.userId_}),e.t0=this,e.next=5,this.getRecoverCaptureDeviceId(!1);case 5:e.t1=e.sent,e.t2={audio:!0,video:!1,microphoneId:e.t1},e.t0.recoverCapture.call(e.t0,e.t2);case 8:case\"end\":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:\"recoverVideoCapture\",value:(s=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.prevVideoRecoverTime_=Date.now(),oD.uploadEvent({log:\"stat-local-video-\".concat(t),userId:this.userId_}),e.t0=this,e.next=5,this.getRecoverCaptureDeviceId(!0);case 5:e.t1=e.sent,e.t2={audio:!1,video:!0,cameraId:e.t1},e.t0.recoverCapture.call(e.t0,e.t2);case 8:case\"end\":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:\"getRecoverCaptureDeviceId\",value:(r=a(n().mark((function e(){var t,i,r,a,o=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(o.length>0&&void 0!==o[0])||o[0],!(i=t?this.cameraId_:this.microphoneId_)||!this.enableAutoRecoverOther_){e.next=17;break}if(Ez.has(i)?Ez.set(i,Ez.get(i)+1):Ez.set(i,1),!((r=Ez.get(i))>=3)){e.next=17;break}if(!t){e.next=12;break}return e.next=9,Jq.getCameras();case 9:e.t0=e.sent.find((function(e){return!Ez.has(e.deviceId)})),e.next=15;break;case 12:return e.next=14,Jq.getMicrophones();case 14:e.t0=e.sent.find((function(e){return!Ez.has(e.deviceId)}));case 15:(a=e.t0)&&(this.log_.warn(\"\".concat(t?\"camera\":\"mic\",\" \").concat(i,\" capture fail \").concat(r,\" times, change new \").concat(a.deviceId)),i=a.deviceId);case 17:return e.abrupt(\"return\",i);case 18:case\"end\":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:\"setAudioVolume\",value:function(e){y(l(LocalStream.prototype),\"setAudioVolume\",this).call(this,e)}},{key:\"clearCanvas\",value:function(){this.canvasInterval_&&(YD.clearTask(this.canvasInterval_),this.canvasInterval_=null,this.canvas_=null,this.canvasTrack_=null)}},{key:\"getCanvasTrack\",value:function(){var e=this;if(this.canvasTrack_)return this.canvasTrack_;this.log_.info(\"gen canvas track\");var t=this.getVideoTrack().getSettings(),n=t.width,i=t.height,r=t.frameRate;this.canvas_=document.createElement(\"canvas\");var a=this.canvas_.getContext(\"2d\");this.canvas_.width=n,this.canvas_.height=i,this.canvasInterval_=YD.run(dT,(function(){if(e.hasVideo()){var t=e.getVideoTrack().getSettings();t.width===e.canvas_.width&&t.height===e.canvas_.height||(e.canvas_.width=t.width,e.canvas_.height=t.height)}e.videoPlayer_&&e.videoPlayer_.element_&&a.drawImage(e.videoPlayer_.element_,0,0,e.canvas_.width,e.canvas_.height)}),{fps:Math.max(15,r)});var o=this.canvas_.captureStream();return this.canvasTrack_=o.getVideoTracks()[0],this.canvasTrack_}},{key:\"setClient\",value:function(e,t){e&&(this.log_.setUserId(e.getUserId()),this.log_.setSdkAppId(e.getSDKAppId()),t||this.syncMuteState()),this.client_=e}},{key:\"setAudioCaptureVolume\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;if(!this.hasAudio()||t<0||!gO())return!1;if(this.captureVolume_===t)return!0;this.captureVolume_=t,this.log_.info(\"setCaptureVolume \"+t),t/=100;var n=TC();if(this.gain_.gainNode)this.gain_.gainNode.gain.value=t;else{var i,r=new MediaStream;r.addTrack(this.getAudioTrack());var a=n.createMediaStreamDestination(),o=n.createMediaStreamSource(r),s=n.createGain();s.gain.value=t,o.connect(s),s.connect(a);var c=a.stream.getAudioTracks()[0],u=function(t){return e.log_.info(\"gained audio track \".concat(t))};c.onmute=function(){return u(\"muted\")},c.onunmute=function(){return u(\"unmuted\")},c.onended=function(){return u(\"ended\")},this.gain_={source:o,audioTrack:c,gainNode:s},null===(i=this.connection_)||void 0===i||i.replaceTrack(c),y(l(LocalStream.prototype),\"restartAudio\",this).call(this)}return!0}},{key:\"getGainedTrack\",value:function(){return this.gain_.audioTrack}},{key:\"reconnectGainNode\",value:function(e){this.log_.warn(\"reconnect gain node\");var t=new MediaStream;t.addTrack(e);var n=TC().createMediaStreamSource(t);n.connect(this.gain_.gainNode),this.gain_.source.disconnect(),this.gain_.source=n}},{key:\"stopGainNode\",value:function(){var e=this.gain_,t=e.audioTrack,n=e.source,i=e.gainNode;i&&(n.disconnect(),i.disconnect(),t.onmute=null,t.onunmute=null,t.onended=null,t.stop(),this.gain_={source:null,gainNode:null,audioTrack:null}),this.captureVolume_=100}},{key:\"close\",value:function(){this.setIsReadyToPublish(!1),this.stopGainNode(),y(l(LocalStream.prototype),\"close\",this).call(this)}},{key:\"setIsAIDenoiser\",value:function(e){this.isAIDenoiser=e}}]),LocalStream}(qG),w(Sz.prototype,\"setAudioProfile\",[uz],Object.getOwnPropertyDescriptor(Sz.prototype,\"setAudioProfile\"),Sz.prototype),w(Sz.prototype,\"setVideoProfile\",[dz],Object.getOwnPropertyDescriptor(Sz.prototype,\"setVideoProfile\"),Sz.prototype),w(Sz.prototype,\"setScreenProfile\",[lz],Object.getOwnPropertyDescriptor(Sz.prototype,\"setScreenProfile\"),Sz.prototype),w(Sz.prototype,\"setVideoContentHint\",[hz],Object.getOwnPropertyDescriptor(Sz.prototype,\"setVideoContentHint\"),Sz.prototype),w(Sz.prototype,\"switchDevice\",[pz],Object.getOwnPropertyDescriptor(Sz.prototype,\"switchDevice\"),Sz.prototype),w(Sz.prototype,\"addTrack\",[fz],Object.getOwnPropertyDescriptor(Sz.prototype,\"addTrack\"),Sz.prototype),w(Sz.prototype,\"removeTrack\",[mz],Object.getOwnPropertyDescriptor(Sz.prototype,\"removeTrack\"),Sz.prototype),w(Sz.prototype,\"replaceTrack\",[_z],Object.getOwnPropertyDescriptor(Sz.prototype,\"replaceTrack\"),Sz.prototype),w(Sz.prototype,\"recoverCapture\",[vz],Object.getOwnPropertyDescriptor(Sz.prototype,\"recoverCapture\"),Sz.prototype),w(Sz.prototype,\"setAudioCaptureVolume\",[gz,yz],Object.getOwnPropertyDescriptor(Sz.prototype,\"setAudioCaptureVolume\"),Sz.prototype),Sz),Cz={voiceActivityDetection:!1},Az=(bz=LG({retries:1,timeout:0,onRetrying:function(e){this.log_.warn(\"connection timeout, retrying [\".concat(e,\"]\"))},onError:function(e,t,n){e.message.includes(\"timeout\")?(this.reset(),this.initialize(),t()):n(e)}}),kz=function(e){d(P,e);var i,r,s,u,h,p,f,m,_,g,S,b,k,I,T,w,E,R,C,A,x=v(P);function P(e){var t;return o(this,P),(t=x.call(this,e)).localStream_=null,t.exchangeSDPTimeout_=-1,t.localAuxStream_=null,t.publishingStream_=null,t.isPublishingAuxStream_=!1,t.smallGenerator_=null,t.isSDPExchanging_=!1,t.ssrc_={audio:0,video:0,small:0,auxiliary:0},t.mediaSettings_={videoCodec:\"\",videoWidth:0,videoHeight:0,videoBps:0,videoFps:0,audioCodec:\"opus\",audioFs:0,audioChannel:0,audioBps:0,smallVideoWidth:0,smallVideoHeight:0,smallVideoFps:0,smallVideoBps:0,auxVideoWidth:0,auxVideoHeight:0,auxVideoFps:0,auxVideoBps:0},t.mixedAudioTrack_=null,t}return c(P,[{key:\"isMainStreamPublished\",get:function(){return!!this.localStream_}},{key:\"isAuxStreamPublished\",get:function(){return!!this.localAuxStream_}},{key:\"publishState\",get:function(){var e=this,t={audio:!1,bigVideo:!1,smallVideo:!1,auxVideo:!1};if(this.peerConnection_){var n,i,r,a,o=this.peerConnection_.getSenders();if(o)if(_O())t.audio=!(null===(n=o[0])||void 0===n||!n.track),t.bigVideo=!(null===(i=o[1])||void 0===i||!i.track),t.smallVideo=!(null===(r=o[2])||void 0===r||!r.track),t.auxVideo=!(null===(a=o[3])||void 0===a||!a.track);else o.forEach((function(n){n.track&&(n.track.kind===Tb?t.audio=!0:(t.bigVideo=!0,e.smallGenerator_&&(t.smallVideo=!0)))}))}return t}},{key:\"initialize\",value:function(){y(l(P.prototype),\"initialize\",this).call(this),this.installEvents()}},{key:\"reset\",value:function(){this.isReconnecting_&&this.stopReconnection(),this.closePeerConnection(),this.uninstallEvents(),this.clearExchangeSDPTimeout(),this.localStream_&&this.localStream_.clearCanvas()}},{key:\"close\",value:function(){y(l(P.prototype),\"close\",this).call(this),this.reset(),this.emitConnectionStateChangedEvent(Pk),this.smallGenerator_&&(this.smallGenerator_.destroy(),this.smallGenerator_=null)}},{key:\"installEvents\",value:function(){this.emitter_.on(OO.ERROR,this.handleError,this),this.emitter_.on(OO.CONNECTION_STATE_CHANGED,this.handleConnectionStateChange,this)}},{key:\"uninstallEvents\",value:function(){this.emitter_.off(OO.ERROR,this.handleError,this),this.emitter_.off(OO.CONNECTION_STATE_CHANGED,this.handleConnectionStateChange,this)}},{key:\"publish\",value:(A=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.publishingStream_=t,this.isPublishingAuxStream_=i,a=t.getVideoTrack(),o=null,!a||i||!this.client_.getIsEnableSmallStream()){e.next=9;break}return this.smallGenerator_=new ZG(t),e.next=8,this.smallGenerator_.initialize();case 8:o=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_);case 9:if(s=t.getVideoProfile(),!this.client_.get2k4kFlag()){e.next=18;break}if(1===this.client_.get2k4kFlag()||t.getScreen()||!(s.height*s.width>=3686400)){e.next=18;break}return s.width=1920,s.height=1080,this.log_.warn(pT),e.next=18,t.setVideoProfile(s);case 18:if(!(zE&&115===MR()&&s.width*s.height<=230400)){e.next=22;break}return this.log_.warn(\"fallback video to 480p\"),e.next=22,t.setVideoProfile(\"480p_2\");case 22:if(this.updateMediaSettings(t,i),!vO()){e.next=33;break}if(!GE||11!==WR){e.next=29;break}return e.next=27,this.publishByAddTrack(t,o);case 27:e.next=31;break;case 29:return e.next=31,this.publishByTransceiver(t,o,i);case 31:e.next=35;break;case 33:return e.next=35,this.publishByAddTrack(t,o);case 35:return this.publishingStream_=null,this.isPublishingAuxStream_=!1,i?this.localAuxStream_=t:this.localStream_=t,null===(r=this.sei_)||void 0===r||r.handleEncodedStreams(),e.abrupt(\"return\",t);case 40:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:\"publishByTransceiver\",value:(C=a(n().mark((function e(t,i,r){var a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.log_.info(\"publish by transceiver\"),a=t.getMediaStream(),o=t.getAudioTrack(),s=t.getVideoTrack(),c=null,(zR||GR)&&fC(s)&&(c=t.getCanvasTrack()),0!==(u=this.peerConnection_.getTransceivers()).length){e.next=16;break}return this.peerConnection_.addTransceiver(o||Tb,{direction:nk,streams:[a]}),this.peerConnection_.addTransceiver(r?wb:c||s||wb,{direction:nk,streams:[a]}),this.peerConnection_.addTransceiver(i||wb,{direction:nk,streams:[a]}),this.peerConnection_.addTransceiver(r?c||s:wb,{direction:nk,streams:[a]}),e.next=14,this.connect();case 14:e.next=46;break;case 16:if(d=[],!o){e.next=29;break}if(!u[0].sender.track){e.next=24;break}return this.mixAudioTrack(u[0].sender.track,o),e.next=22,u[0].sender.replaceTrack(this.mixedAudioTrack_);case 22:e.next=27;break;case 24:return e.next=26,u[0].sender.replaceTrack(o);case 26:d.push(0);case 27:return e.next=29,this.setBandwidth({bandwidth:t.getAudioBitrate(),type:Tb});case 29:if(!s){e.next=42;break}return l=r?3:1,e.next=33,u[l].sender.replaceTrack(c||s);case 33:return e.next=35,this.setBandwidth({bandwidth:t.getVideoBitrate(),type:wb,videoType:r?Ab:Cb});case 35:if(d.push(l),!i){e.next=42;break}return e.next=39,u[2].sender.replaceTrack(i);case 39:return e.next=41,this.setBandwidth({bandwidth:this.client_.smallStreamConfig.bitrate,type:wb,videoType:Rb});case 41:d.push(2);case 42:return e.next=44,this.setTransceiverDirection(nk,d);case 44:return e.next=46,this.doPublishChange();case 46:case\"end\":return e.stop()}}),e,this)}))),function(e,t,n){return C.apply(this,arguments)})},{key:\"publishByAddTrack\",value:(R=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log_.info(\"publish by addtrack\"),r=t.getMediaStream(),a=t.getAudioTrack(),o=t.getVideoTrack(),a&&this.peerConnection_.addTrack(a,r),o&&(this.peerConnection_.addTrack(o,r),i&&((s=new MediaStream).addTrack(i),this.peerConnection_.addTrack(i,s))),e.next=8,this.connect();case 8:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:\"unpublish\",value:(E=a(n().mark((function e(i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(_O()){e.next=2;break}return e.abrupt(\"return\",this.doUnpublish());case 2:if(r=i.getAudioTrack(),a=i===this.localAuxStream_,o=[],!this.peerConnection_){e.next=33;break}if(s=this.peerConnection_.getSenders(),!r){e.next=18;break}if(!this.mixedAudioTrack_){e.next=15;break}return this.log_.info(\"has mixed audioTrack, use another audioTrack\"),e.next=12,s[0].replaceTrack(a?this.localStream_.getAudioTrack():this.localAuxStream_.getAudioTrack());case 12:this.destroyMixedAudioTrack(),e.next=18;break;case 15:return e.next=17,s[0].replaceTrack(null);case 17:o.push(0);case 18:if(!a){e.next=26;break}return e.next=21,s[3].replaceTrack(null);case 21:this.localAuxStream_=null,this.mediaSettings_=t(t({},this.mediaSettings_),{},{auxVideoBps:0,auxVideoFps:0,auxVideoWidth:0,auxVideoHeight:0}),o.push(3),e.next=33;break;case 26:return e.next=28,s[1].replaceTrack(null);case 28:return e.next=30,s[2].replaceTrack(null);case 30:this.localStream_=null,this.mediaSettings_=t(t({},this.mediaSettings_),{},{videoWidth:0,videoHeight:0,videoBps:0,videoFps:0,audioFs:0,audioChannel:0,audioBps:0,smallVideoWidth:0,smallVideoHeight:0,smallVideoFps:0,smallVideoBps:0}),o.push(1,2);case 33:if(!this.localStream_&&!this.localAuxStream_){e.next=40;break}return e.next=36,this.setTransceiverDirection(tk,o);case 36:return e.next=38,this.doPublishChange();case 38:e.next=42;break;case 40:return e.next=42,this.doUnpublish();case 42:case\"end\":return e.stop()}}),e,this)}))),function(e){return E.apply(this,arguments)})},{key:\"doPublishChange\",value:(w=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={state:this.publishState,constraintConfig:this.mediaSettings_},e.next=3,this.signalChannel_.sendWaitForResponse({command:Yx,data:t,responseCommand:Qx.PUBLISH_STATE_CHANGE_RESULT});case 3:i=e.sent,this.checkPublishResultCode(i.data.code,i.data.message);case 5:case\"end\":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:\"doUnpublish\",value:function(){var e=this;return this.signalChannel_.sendWaitForResponse({command:iP,commandDesc:\"unpublish\",responseCommand:Qx.UNPUBLISH_RESULT}).then((function(){e.close()})).catch((function(){e.close()}))}},{key:\"updateMediaSettings\",value:function(e,t){var n=this;this.localAuxStream_&&e===this.localAuxStream_&&(t=!0);var i=this.client_.getSystemResult().detail,r=i.isH264EncodeSupported,a=i.isVp8EncodeSupported;if(r?this.mediaSettings_.videoCodec=\"H264\":a&&(this.mediaSettings_.videoCodec=\"VP8\"),xO){var o=e.getMediaStream();null==o||o.getTracks().forEach((function(i){var r=i.getSettings();if(i.kind===Tb){var a=1;r.channelCount&&(a=r.channelCount),n.mediaSettings_.audioChannel=a,n.mediaSettings_.audioBps=1e3*e.getAudioBitrate(),n.mediaSettings_.audioFs=r.sampleRate}else if(i.kind===wb){if(t)return n.mediaSettings_.auxVideoWidth=r.width,n.mediaSettings_.auxVideoHeight=r.height,n.mediaSettings_.auxVideoFps=r.frameRate,void(n.mediaSettings_.auxVideoBps=1e3*e.getVideoBitrate());n.client_.getIsEnableSmallStream()&&(n.mediaSettings_.smallVideoWidth=n.client_.smallStreamConfig.width,n.mediaSettings_.smallVideoHeight=n.client_.smallStreamConfig.height,n.mediaSettings_.smallVideoFps=n.client_.smallStreamConfig.frameRate,n.mediaSettings_.smallVideoBps=1e3*n.client_.smallStreamConfig.bitrate),n.mediaSettings_.videoWidth=r.width,n.mediaSettings_.videoHeight=r.height,n.mediaSettings_.videoFps=r.frameRate,n.mediaSettings_.videoBps=1e3*e.getVideoBitrate()}}))}else this.updateMediaSettingsFromProfile(e);this.log_.info(\"updateMediaSettings: \"+JSON.stringify(this.mediaSettings_))}},{key:\"updateMediaSettingsFromProfile\",value:function(e){if(e){if(e.hasAudio()){var t=e.getAudioProfile();this.mediaSettings_.audioChannel=t.channelCount,this.mediaSettings_.audioBps=1e3*t.bitrate,this.mediaSettings_.audioFs=t.sampleRate}if(e.hasVideo()){var n=e.getVideoProfile();this.mediaSettings_.videoWidth=n.width,this.mediaSettings_.videoHeight=n.height,this.mediaSettings_.videoFps=n.frameRate,this.mediaSettings_.videoBps=1e3*n.bitrate}}}},{key:\"sendMediaSettings\",value:function(e){var t=this;this.updateMediaSettings(e),this.signalChannel_.sendWaitForResponse({command:mP,data:this.mediaSettings_,responseCommand:Qx.UPDATE_CONSTRAINT_CONFIG_RES}).then((function(e){0!==e.data.code&&t.log_.warn(e.data.message)})).catch(this.log_.warn)}},{key:\"addTrack\",value:(T=a(n().mark((function e(t,i){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerConnection_){e.next=2;break}return e.abrupt(\"return\");case 2:if(a=i===this.localAuxStream_,this.log_.info(\"is adding \".concat(t.kind,\" track to current published local \").concat(a?Ab:zb,\" stream\")),null===(r=this.sei_)||void 0===r||r.handleEncodedStreams(),!_O()){e.next=10;break}return e.next=8,this.addTrackByTransceiver(t,i);case 8:e.next=12;break;case 10:return e.next=12,this.addTrackBySender(t);case 12:tD(this.userId_,{eventId:t.kind===Tb?yP:gP,eventDesc:\"add \".concat(t.kind,\" track to current published stream\"),timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_});case 13:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:\"addTrackByTransceiver\",value:(I=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i===this.localAuxStream_,a=this.peerConnection_.getTransceivers(),t.kind!==Tb){e.next=13;break}if(!a[0].sender.track){e.next=9;break}return this.mixAudioTrack(a[0].sender.track,t),e.next=7,a[0].sender.replaceTrack(this.mixedAudioTrack_);case 7:e.next=11;break;case 9:return e.next=11,a[0].sender.replaceTrack(t);case 11:e.next=26;break;case 13:return o=r?3:1,e.next=16,a[o].sender.replaceTrack(t);case 16:if(1!==o||!this.client_.getIsEnableSmallStream()){e.next=23;break}return this.smallGenerator_=new ZG(this.localStream_),e.next=20,this.smallGenerator_.initialize();case 20:return s=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_),e.next=23,a[2].sender.replaceTrack(s);case 23:if(a[o].direction!==tk){e.next=26;break}return e.next=26,this.setTransceiverDirection(nk,[o]);case 26:return this.updateMediaSettings(i,r),e.next=29,this.doPublishChange();case 29:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:\"addTrackBySender\",value:(k=a(n().mark((function e(t){var i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(_O()&&this.peerConnection_.getTransceivers().findIndex((function(e){return\"stopped\"===e.direction}))>=0)){e.next=4;break}return this.log_.warn(\"transceiver is stopping, negotiate sdp first\"),e.next=4,this.updateOffer(RI.REMOVE,t);case 4:if(!(i=this.peerConnection_.getSenders().find((function(e){return e.track&&e.track.kind===t.kind})))){e.next=11;break}return this.log_.warn(\"sender already exists, remove sender first\"),r=i.track,this.removeSender(i),e.next=11,this.updateOffer(RI.REMOVE,r);case 11:if(a=this.localStream_.getMediaStream(),this.peerConnection_.addTrack(t,a),t.kind!==wb||!this.client_.getIsEnableSmallStream()){e.next=21;break}return this.smallGenerator_=new ZG(this.localStream_),e.next=17,this.smallGenerator_.initialize();case 17:o=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_),(s=new MediaStream).addTrack(o),this.peerConnection_.addTrack(o,s);case 21:return e.next=23,this.updateOffer(RI.ADD,t);case 23:case\"end\":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:\"isNeedToResetOfferOrder\",value:function(){if(this.sdpSemantics_===gI||!this.peerConnection_||!this.peerConnection_.localDescription)return!1;for(var e=this.peerConnection_.localDescription.sdp,t=wD(e),n=0;n<t.media.length;n++)if(0===t.media[n].mid&&t.media[n].type===wb)return!0;return!1}},{key:\"removeSender\",value:function(e){var t=null;_O()&&(t=this.peerConnection_.getTransceivers().find((function(t){return t.sender&&t.sender.track===e.track}))),this.peerConnection_.removeTrack(e),t&&sC(t.stop)&&(this.log_.info(\"stop transceiver\"),t.stop())}},{key:\"removeTrack\",value:(b=a(n().mark((function e(t,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.peerConnection_){e.next=2;break}return e.abrupt(\"return\");case 2:if(this.log_.info(\"is removing \".concat(t.kind,\" track from current published local \").concat(i===this.localAuxStream_?Ab:zb,\" stream\")),!_O()){e.next=8;break}return e.next=6,this.removeTrackByTransceiver(t,i);case 6:e.next=10;break;case 8:return e.next=10,this.removeTrackBySender(t);case 10:tD(this.userId_,{eventId:t.kind===Tb?bP:SP,eventDesc:\"remove \".concat(t.kind,\" track from current published stream\"),timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_});case 11:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:\"removeTrackByTransceiver\",value:(S=a(n().mark((function e(t,i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i===this.localAuxStream_,a=this.peerConnection_.getTransceivers(),t.kind!==Tb){e.next=13;break}if(!this.mixedAudioTrack_){e.next=9;break}return e.next=6,a[0].sender.replaceTrack(r?this.localStream_.getAudioTrack():this.localAuxStream_.getAudioTrack());case 6:this.destroyMixedAudioTrack(),e.next=11;break;case 9:return e.next=11,a[0].sender.replaceTrack(null);case 11:e.next=23;break;case 13:return o=r?3:1,e.next=16,a[o].sender.replaceTrack(null);case 16:if(1!==o||!this.smallGenerator_){e.next=21;break}return this.smallGenerator_.destroy(),this.smallGenerator_=null,e.next=21,a[2].sender.replaceTrack(null);case 21:return e.next=23,this.setTransceiverDirection(tk,[o]);case 23:return this.updateMediaSettings(i,r),e.next=26,this.doPublishChange();case 26:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:\"setTransceiverDirection\",value:(g=a(n().mark((function e(t,i){var r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(JE){e.next=2;break}return e.abrupt(\"return\");case 2:if(r=!1,a=!1,this.log_.info(\"setting transceiver \".concat(i.join(\",\"),\" direction to \").concat(t)),o=this.peerConnection_.getTransceivers(),i.forEach((function(e){o[e].direction!==t&&(o[e].direction=t,r=!0)})),!r){e.next=14;break}return this.log_.info(\"updating offer\"),e.next=11,this.peerConnection_.createOffer();case 11:return s=e.sent,e.next=14,this.peerConnection_.setLocalDescription(s);case 14:if(c=-1,u=this.peerConnection_.remoteDescription.sdp.split(\"\\r\\n\").map((function(e){if(e.match(new RegExp(\"a=(\".concat(tk,\"|\").concat(ik,\"|\").concat(nk,\")\")))&&c++,i.includes(c)){if(t===tk&&e.includes(\"a=\".concat(ik)))return a=!0,\"a=\".concat(t);if(t===nk&&e.includes(\"a=\".concat(tk)))return a=!0,\"a=\".concat(ik)}return e})).join(\"\\r\\n\"),!a){e.next=20;break}return this.log_.info(\"updating answer\"),e.next=20,this.peerConnection_.setRemoteDescription({type:\"answer\",sdp:u});case 20:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:\"removeTrackBySender\",value:(_=a(n().mark((function e(t){var i,r,a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.kind!==wb||!this.isNeedToResetOfferOrder()){e.next=7;break}return this.reset(),this.initialize(),null===(i=this.localStream_.getMediaStream())||void 0===i||i.removeTrack(t),e.next=6,this.publish(this.localStream_);case 6:return e.abrupt(\"return\");case 7:return(r=this.peerConnection_.getSenders().find((function(e){return e.track===t})))&&(this.removeSender(r),t.kind===wb&&this.smallGenerator_&&(this.smallGenerator_.destroy(),this.smallGenerator_=null,this.peerConnection_.getSenders().forEach((function(e){e.track&&e.track.kind===wb&&a.removeSender(e)})))),e.next=11,this.updateOffer(RI.REMOVE,t);case 11:case\"end\":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})},{key:\"replaceTrack\",value:(m=a(n().mark((function e(t,i){var r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a=null===(r=this.peerConnection_)||void 0===r?void 0:r.getSenders())&&0!==a.length){e.next=3;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Iw})});case 3:if(o=i===this.localAuxStream_,this.log_.info(\"is replacing \".concat(t.kind,\" track to current published local \").concat(o?Ab:zb,\" stream\")),t.kind!==Tb||!a[0]){e.next=16;break}if(!(this.mixedAudioTrack_&&null!==(s=this.localStream_)&&void 0!==s&&s.hasAudio()&&null!==(c=this.localAuxStream_)&&void 0!==c&&c.hasAudio())){e.next=14;break}return this.destroyMixedAudioTrack(),u=o?this.localStream_.getAudioTrack():this.localAuxStream_.getAudioTrack(),this.mixAudioTrack(t,u),e.next=12,a[0].replaceTrack(this.mixedAudioTrack_);case 12:e.next=16;break;case 14:return e.next=16,a[0].replaceTrack(t);case 16:if(t.kind!==wb){e.next=32;break}if(i!==this.localStream_||!a[1]){e.next=29;break}return e.next=20,a[1].replaceTrack(t);case 20:if(!this.smallGenerator_||!a[2]){e.next=29;break}return this.log_.info(\"replacing smallVideo\"),this.smallGenerator_.destroy(),this.smallGenerator_=new ZG(this.localStream_),e.next=26,this.smallGenerator_.initialize();case 26:return d=this.smallGenerator_.generateSmallVideoTrack(this.client_.smallStreamConfig_),e.next=29,a[2].replaceTrack(d);case 29:if(i!==this.localAuxStream_||!a[3]){e.next=32;break}return e.next=32,a[3].replaceTrack(t);case 32:tD(this.userId_,{eventId:t.kind===Tb?DP:PP,eventDesc:\"replace \".concat(t.kind,\" track from current published stream\"),timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_});case 33:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:\"updateOffer\",value:(f=a(n().mark((function e(t,i){var r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.peerConnection_.createOffer(Cz);case 3:return r=e.sent,JE&&(r.sdp=this.setSDPDirection(r.sdp,\"sendrecv\")),e.next=7,this.peerConnection_.setLocalDescription(r);case 7:return a=this.updateMediaSettings(this.localStream_||this.localAuxStream_),o={action:t,trackId:i.id,kind:i.kind===wb?\"bigVideo\":i.kind,type:\"offer\",sdp:this.peerConnection_.localDescription.sdp,constraintConfig:a,state:this.publishState},this.log_.info(\"createOffer success, sending updated offer to remote server\"),this.log_.debug(\"updatedOffer: \"+o.sdp),e.next=13,this.signalChannel_.sendWaitForResponse({command:Xx,data:o,responseCommand:Qx.UPDATE_OFFER_RESULT,timeout:1e4,commandDesc:\"update offer\"});case 13:return s=e.sent,c=s.data,u=c.code,d=c.message,0!==u&&this.checkPublishResultCode(u,d),e.next=18,this.acceptAnswer(s.data.data);case 18:this.updateSSRC(r.sdp),oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:iI,kind:\"offer\"}),e.next=27;break;case 22:throw e.prev=22,e.t0=e.catch(0),this.log_.error(e.t0),oD.logFailedEvent({userId:this.client_.getUserId(),eventType:iI,kind:\"offer\",error:e.t0}),e.t0;case 27:case\"end\":return e.stop()}}),e,this,[[0,22]])}))),function(e,t){return f.apply(this,arguments)})},{key:\"setBandwidth\",value:(p=a(n().mark((function e(t){var i,r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.bandwidth,r=t.type,a=t.videoType,o=void 0===a?\"\":a,s=t.sdp,yO()||!s){e.next=3;break}return e.abrupt(\"return\",r===wb?this.updateVideoBandwidthRestriction(s,i,o):this.updateAudioBandwidthRestriction(s,i));case 3:if(c=0,r===wb&&(c=o===Rb?2:o===Ab?3:1),!(u=this.peerConnection_.getSenders()[c])){e.next=22;break}return(d=u.getParameters()).encodings&&0!==d.encodings.length||(d.encodings=[{}]),\"unlimited\"===i?delete d.encodings[0].maxBitrate:d.encodings[0].maxBitrate=1e3*i,e.prev=10,e.next=13,u.setParameters(d);case 13:return this.log_.info(o+r+\" bandwidth was set to \"+i+\" kbps\"),e.abrupt(\"return\",s);case 17:if(e.prev=17,e.t0=e.catch(10),this.log_.info(\"failed to set bandwidth by setting maxBitrate: \"+e.t0),!s){e.next=22;break}return e.abrupt(\"return\",r===wb?this.updateVideoBandwidthRestriction(s,i,o):this.updateAudioBandwidthRestriction(s,i));case 22:return e.abrupt(\"return\",s);case 23:case\"end\":return e.stop()}}),e,this,[[10,17]])}))),function(e){return p.apply(this,arguments)})},{key:\"updateVideoBandwidthRestriction\",value:function(e,t,n){var i=\"AS\";JE&&(i=\"TIAS\",t*=1e3);var r=0,a=-1;return n===Rb?r=1:n===Ab&&(r=2),e=e.replace(/m=video (.*)\\r\\nc=IN (.*)\\r\\n/g,(function(e){return++a===r?\"\".concat(e,\"b=\").concat(i,\":\").concat(t,\"\\r\\n\"):e})),e}},{key:\"updateAudioBandwidthRestriction\",value:function(e,t){var n=\"AS\";return JE&&(n=\"TIAS\",t*=1e3),e=e.replace(/m=audio (.*)\\r\\nc=IN (.*)\\r\\n/,\"m=audio $1\\r\\nc=IN $2\\r\\nb=\"+n+\":\"+t+\"\\r\\n\")}},{key:\"removeBandwidthRestriction\",value:function(e){return e.replace(/b=AS:.*\\r\\n/,\"\").replace(/b=TIAS:.*\\r\\n/,\"\")}},{key:\"removeVideoOrientation\",value:function(e){return e.replace(/urn:3gpp:video-orientation/,\"\")}},{key:\"connect\",value:(h=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.exchangeSDP();case 3:return e.next=5,this.waitForPeerConnectionConnected();case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),this.closePeerConnection(!0),e.t0;case 11:case\"end\":return e.stop()}}),e,this,[[0,7]])}))),function(){return h.apply(this,arguments)})},{key:\"exchangeSDP\",value:(u=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.isSDPExchanging_=!0,e.next=4,this.createOffer();case 4:return this.log_.info(\"createOffer success, sending offer to remote server\"),e.next=7,this.doExchangeSDP();case 7:this.isSDPExchanging_=!1,e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(0),this.isSDPExchanging_=!1,e.t0;case 14:case\"end\":return e.stop()}}),e,this,[[0,10]])}))),function(){return u.apply(this,arguments)})},{key:\"createOffer\",value:(s=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.peerConnection_.createOffer(Cz);case 3:return t=e.sent,e.next=6,this.peerConnection_.setLocalDescription(t);case 6:this.updateSSRC(t.sdp),oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:iI,kind:\"offer\"}),e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(0),oD.logFailedEvent({userId:this.client_.getUserId(),eventType:iI,kind:\"offer\",error:e.t0}),e.t0;case 14:case\"end\":return e.stop()}}),e,this,[[0,10]])}))),function(){return s.apply(this,arguments)})},{key:\"doExchangeSDP\",value:function(){var e=this;return new Promise((function(t,i){e.exchangeSDPTimeout_=setTimeout((function(){e.signalChannel_.off(Qx.PUBLISH_RESULT,r),e.clearExchangeSDPTimeout();var t=new vP({code:_P.API_CALL_TIMEOUT,message:ZR({key:MT})});i(t)}),1e4);var r=function(){var r=a(n().mark((function r(a){var o,s,c;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,e.clearExchangeSDPTimeout(),o=a.data,s=o.code,c=o.message,0!==s){n.next=9;break}return n.next=6,e.acceptAnswer(a.data.data);case 6:t(),n.next=10;break;case 9:e.checkPublishResultCode(s,c);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(0),i(n.t0);case 15:case\"end\":return n.stop()}}),r,null,[[0,12]])})));return function(e){return r.apply(this,arguments)}}(),o={type:e.peerConnection_.localDescription.type,sdp:e.removeVideoOrientation(e.peerConnection_.localDescription.sdp),screen:(e.publishingStream_||e.localStream_).hasScreenTrack(),state:e.publishState,constraintConfig:e.mediaSettings_};e.signalChannel_.once(Qx.PUBLISH_RESULT,r),e.log_.debug(\"sending sdp offer: \"+o.sdp),e.signalChannel_.send(nP,o)}))}},{key:\"setSDPDirection\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:\"all\",i=wD(e);return i.media.forEach((function(e){\"all\"!==n&&e.type!==n||(e.direction=t)})),ED(i)}},{key:\"acceptAnswer\",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,i=this.removeVideoOrientation(t.sdp),!(r=this.publishingStream_||this.localStream_)){e.next=15;break}if(a=r.getVideoBitrate(),o=r.getAudioBitrate(),!a){e.next=11;break}return s=this.isPublishingAuxStream_?Ab:Cb,e.next=10,this.setBandwidth({bandwidth:a,type:wb,sdp:i,videoType:s});case 10:i=e.sent;case 11:if(!o){e.next=15;break}return e.next=14,this.setBandwidth({bandwidth:o,type:Tb,sdp:i});case 14:i=e.sent;case 15:if(!this.client_.getIsEnableSmallStream()){e.next=20;break}return c=this.client_.smallStreamConfig,e.next=19,this.setBandwidth({bandwidth:c.bitrate,type:wb,videoType:Rb,sdp:i});case 19:i=e.sent;case 20:return u={type:t.type,sdp:i},e.next=23,this.peerConnection_.setRemoteDescription(u);case 23:this.log_.debug(\"accepted answer: \"+i),oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:rI,kind:\"answer\"}),e.next=32;break;case 27:throw e.prev=27,e.t0=e.catch(0),oD.logFailedEvent({userId:this.client_.getUserId(),eventType:rI,kind:\"answer\",error:e.t0}),this.log_.error(\"failed to accept remote answer \"+e.t0),e.t0;case 32:case\"end\":return e.stop()}}),e,this,[[0,27]])}))),function(e){return r.apply(this,arguments)})},{key:\"sendMutedFlag\",value:function(e,t){if(t!==this.localAuxStream_){var n={audio:e.audio,bigVideo:e.video,auxVideo:e.auxVideo};this.log_.info(\"send muted state: \".concat(JSON.stringify(n))),this.signalChannel_.send(tP,n)}}},{key:\"getIsReconnecting\",value:function(){return this.isReconnecting_}},{key:\"reconnect\",value:(i=a(n().mark((function e(){var t,i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===this.reconnectionTimer_){e.next=3;break}return this.log_.warn(\"reconnect() uplink is reconnecting, ignore current reconnection\"),e.abrupt(\"return\");case 3:if(!(this.reconnectionCount_>=30)){e.next=12;break}return this.log_.warn(\"SDK has tried reconnect uplink for \".concat(30,\" times, but all failed, please check your network\")),this.stopReconnection(),t=new vP({code:_P.UPLINK_RECONNECTION_FAILED,message:ZR({key:UT})}),oD.logFailedEvent({userId:this.client_.getUserId(),eventType:eI,error:t}),this.addEventInternal(KP,\"uplink-connection reconnect fail\"),this.emitConnectionStateChangedEvent(Pk),this.emitter_.emit(OO.ERROR,t),e.abrupt(\"return\");case 12:if(this.signalChannel_.getCurrentState()===Jx){e.next=16;break}return this.log_.warn(\"reconnect() signal channel is not connected, suspend reconnection until signal is connected\"),this.signalChannel_.once(Bx,this.reconnect,this),e.abrupt(\"return\");case 16:if(this.reconnectionCount_++,e.prev=17,this.log_.warn(\"reconnect() try to reconnect uplink [\".concat(this.reconnectionCount_,\"/\").concat(30,\"]\")),i=oC(this.reconnectionCount_),this.reconnectionTimer_=setTimeout((function(){r.log_.warn(\"reconnect() uplink reconnect timeout(\".concat(i/1e3,\"s), try again\")),r.clearReconnectionTimer(),r.reconnect()}),i),!(this.isSDPExchanging_||this.peerConnection_&&this.peerConnection_.connectionState===Lk)){e.next=23;break}return e.abrupt(\"return\");case 23:return e.next=25,this.signalChannel_.sendWaitForResponse({command:iP,responseCommand:Qx.UNPUBLISH_RESULT,enableLog:!1});case 25:if(this.reset(),this.initialize(),!this.localStream_){e.next=30;break}return e.next=30,this.publish(this.localStream_);case 30:if(!this.localAuxStream_){e.next=33;break}return e.next=33,this.publish(this.localAuxStream_,!0);case 33:oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:eI}),this.log_.warn(\"reconnect() uplink reconnect successfully\"),this.addEventInternal(qP,\"uplink-connection reconnect success\"),this.stopReconnection(),this.localStream_.syncMuteState(),e.next=42;break;case 40:e.prev=40,e.t0=e.catch(17);case 42:case\"end\":return e.stop()}}),e,this,[[17,40]])}))),function(){return i.apply(this,arguments)})},{key:\"clearExchangeSDPTimeout\",value:function(){-1!==this.exchangeSDPTimeout_&&(clearTimeout(this.exchangeSDPTimeout_),this.exchangeSDPTimeout_=-1)}},{key:\"clearReconnectionTimer\",value:function(){-1!==this.reconnectionTimer_&&(clearTimeout(this.reconnectionTimer_),this.reconnectionTimer_=-1)}},{key:\"handleError\",value:function(e){e.getCode()===_P.ICE_TRANSPORT_ERROR&&(this.isFirstConnection_&&(this.isFirstConnection_=!1,oD.logFailedEvent({userId:this.client_.getUserId(),eventType:Zk,error:e})),this.isReconnecting_||this.startReconnection())}},{key:\"handleConnectionStateChange\",value:function(e){e.state===Mk&&this.isFirstConnection_&&(this.isFirstConnection_=!1,oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:Zk}),this.addEventInternal(BP,\"uplink-connection is connected\"))}},{key:\"updateSSRC\",value:function(e){var t=this;try{wD(e).media.forEach((function(e,n){if(e.type===Tb){var i=e.ssrcs[0];i&&(t.ssrc_.audio=i.id)}else{if(t.sdpSemantics_===gI)return void e.ssrcGroups.forEach((function(e,n){var i=Number(e.ssrcs.split(\" \")[0]);0===n?t.ssrc_.video=i:1===n&&(t.ssrc_.small=i)}));var r=e.ssrcs[0];if(!r)return;switch(n){case 1:t.ssrc_.video=r.id;break;case 2:t.ssrc_.small=r.id;break;case 3:t.ssrc_.auxiliary=r.id}}}))}catch(qq){}}},{key:\"getVideoTrackId\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wb;if(this.peerConnection_){var t=this.peerConnection_.getSenders();if(e===wb&&t[1]&&t[1].track)return t[1].track.id;if(e===Rb&&t[2]&&t[2].track)return t[2].track.id;if(e===Ab&&t[3]&&t[3].track)return t[3].track.id}if(this.localStream_&&e===wb){var n=this.localStream_.getVideoTrack();if(n)return n.id}if(this.localAuxStream_&&e===Ab){var i=this.localAuxStream_.getVideoTrack();if(i)return i.id}return\"\"}},{key:\"getSSRC\",value:function(){return this.ssrc_}},{key:\"checkPublishResultCode\",value:function(e,t){if(0!==e)throw 1028===e?(this.log_.error(CE.NOT_SUPPORTED_H264ENCODE),new vP({code:_P.NOT_SUPPORTED_H264,message:ZR({key:aE})})):new vP({code:_P.UNKNOWN,message:ZR({key:pE,data:{signalResponse:Qx.PUBLISH_RESULT,code:e,message:t}})})}},{key:\"getLocalStream\",value:function(){return this.localStream_}},{key:\"sendSEI\",value:function(e,t){this.sei_.push(e,t)}},{key:\"mixAudioTrack\",value:function(e,t){this.log_.info(\"mix audio track\"),this.mixedAudioTrack_=function(e){var t=IC(),n=t.createMediaStreamDestination(),i=[];e.forEach((function(e){var r=new MediaStream;r.addTrack(e);var a=t.createMediaStreamSource(r);a.connect(n),i.push(a)}));var r=n.stream.getAudioTracks()[0];return ez.set(r,{destination:n,track:r,mediaStreamSourceList:i}),r}([e,t])}},{key:\"destroyMixedAudioTrack\",value:function(){this.mixedAudioTrack_&&(this.log_.info(\"destroy audio track\"),function(e){if(ez.has(e)){var t=ez.get(e),n=t.destination,i=t.track,r=t.mediaStreamSourceList;i.stop(),n.disconnect(),r.forEach((function(e){e.disconnect()})),ez.delete(e)}}(this.mixedAudioTrack_),this.mixedAudioTrack_=null)}}]),P}(_G),w(kz.prototype,\"publish\",[bz],Object.getOwnPropertyDescriptor(kz.prototype,\"publish\"),kz.prototype),kz),xz=ee,Pz=Bc,Dz=Bo.exports.getWeakData,Oz=fc,Mz=un,Nz=oe,Lz=ye,Uz=lc,Vz=ft,jz=ai.set,Fz=ai.getterFor,Bz=Vd.find,Hz=Vd.findIndex,Wz=xz([].splice),Gz=0,zz=function(e){return e.frozen||(e.frozen=new Jz)},Jz=function(){this.entries=[]},qz=function(e,t){return Bz(e.entries,(function(e){return e[0]===t}))};Jz.prototype={get:function(e){var t=qz(this,e);if(t)return t[1]},has:function(e){return!!qz(this,e)},set:function(e,t){var n=qz(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=Hz(this.entries,(function(t){return t[0]===e}));return~t&&Wz(this.entries,t,1),!!~t}};var Kz,Qz={getConstructor:function(e,t,n,i){var r=e((function(e,r){Oz(e,a),jz(e,{type:t,id:Gz++,frozen:void 0}),Nz(r)||Uz(r,e[i],{that:e,AS_ENTRIES:n})})),a=r.prototype,o=Fz(t),s=function(e,t,n){var i=o(e),r=Dz(Mz(t),!0);return!0===r?zz(i).set(t,n):r[i.id]=n,e};return Pz(a,{delete:function(e){var t=o(this);if(!Lz(e))return!1;var n=Dz(e);return!0===n?zz(t).delete(e):n&&Vz(n,t.id)&&delete n[t.id]},has:function(e){var t=o(this);if(!Lz(e))return!1;var n=Dz(e);return!0===n?zz(t).has(e):n&&Vz(n,t.id)}}),Pz(a,n?{get:function(e){var t=o(this);if(Lz(e)){var n=Dz(e);return!0===n?zz(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),r}},Xz=C,Yz=ee,$z=Bc,Zz=Bo.exports,eJ=jc,tJ=Qz,nJ=ye,iJ=ds,rJ=ai.enforce,aJ=Fn,oJ=!Xz.ActiveXObject&&\"ActiveXObject\"in Xz,sJ=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},cJ=eJ(\"WeakMap\",sJ,tJ);if(aJ&&oJ){Kz=tJ.getConstructor(sJ,\"WeakMap\",!0),Zz.enable();var uJ=cJ.prototype,dJ=Yz(uJ.delete),lJ=Yz(uJ.has),hJ=Yz(uJ.get),pJ=Yz(uJ.set);$z(uJ,{delete:function(e){if(nJ(e)&&!iJ(e)){var t=rJ(this);return t.frozen||(t.frozen=new Kz),dJ(this,e)||t.frozen.delete(e)}return dJ(this,e)},has:function(e){if(nJ(e)&&!iJ(e)){var t=rJ(this);return t.frozen||(t.frozen=new Kz),lJ(this,e)||t.frozen.has(e)}return lJ(this,e)},get:function(e){if(nJ(e)&&!iJ(e)){var t=rJ(this);return t.frozen||(t.frozen=new Kz),lJ(this,e)?hJ(this,e):t.frozen.get(e)}return hJ(this,e)},set:function(e,t){if(nJ(e)&&!iJ(e)){var n=rJ(this);n.frozen||(n.frozen=new Kz),lJ(this,e)?pJ(this,e,t):n.frozen.set(e,t)}else pJ(this,e,t);return this}})}var fJ=Tr,mJ=Ay,_J=x,vJ=Ie,gJ=_e,yJ=Tg,SJ=vb,bJ=ki,kJ=mJ&&mJ.prototype;if(fJ({target:\"Promise\",proto:!0,real:!0,forced:!!mJ&&_J((function(){kJ.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=yJ(this,vJ(\"Promise\")),n=gJ(e);return this.then(n?function(n){return SJ(t,e()).then((function(){return n}))}:e,n?function(n){return SJ(t,e()).then((function(){throw n}))}:e)}}),gJ(mJ)){var IJ=vJ(\"Promise\").prototype.finally;kJ.finally!==IJ&&bJ(kJ,\"finally\",IJ,{unsafe:!0})}var TJ,wJ,EJ,RJ,CJ,AJ=new WeakMap;function xJ(){return function(e,n,i){var r=i.value,a=function e(n){var i=n.fn,r=n.args,a=n.context,o=n.resolve,s=n.reject;i.apply(a,r).then(o,s).finally((function(){var n=AJ.get(a);n&&(n.shift(),n[0]&&e(t({},n[0])))}))};return i.value=function(){for(var e=this,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return new Promise((function(t,o){if(AJ.has(e)){var s=AJ.get(e),c=s.length;s.push({fn:r,args:i,context:e,resolve:t,reject:o,name:n}),0===c&&a({fn:r,args:i,context:e,resolve:t,reject:o})}else AJ.set(e,[{fn:r,args:i,context:e,resolve:t,reject:o,name:n}]),a({fn:r,args:i,context:e,resolve:t,reject:o})}))},i}}var PJ=(TJ=xJ(),wJ=LG({retries:1,timeout:0,onRetrying:function(e){this.log_.warn(\"connection timeout, retrying [\".concat(e,\"]\"))},onError:function(e,t,n){e.message.includes(\"timeout\")?t():n(e)}}),EJ=xJ(),RJ=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return function(t,n,i){var r=i.value;return i.value=function(){for(var t=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return new Promise((function(i,o){var s=setTimeout((function(){return o(new Error(\"\".concat(n,\" timeout\")))}),e);r.apply(t,a).then(i,o).finally((function(){clearTimeout(s)}))}))},i}}(),CJ=function(e){d(g,e);var r,s,u,h,p,f,m,_=v(g);function g(e){var t;return o(this,g),(t=_.call(this,e)).remoteStreams_=new Map,t.autoSubscribe=e.autoSubscribe,t.trackState_={audio:e.trackState.audio,video:e.trackState.video,auxiliary:e.trackState.auxiliary,smallVideo:e.trackState.smallVideo},t.ssrc_={audio:0,video:0,auxiliary:0},t.subscribeState_={audio:e.autoSubscribe,video:e.autoSubscribe,auxiliary:e.autoSubscribe,smallVideo:!1},t.isSDPExchanging_=!1,t.installEvents(),t}return c(g,[{key:\"getMixUserList\",value:function(){return this.mixUserList_?this.mixUserList_.map((function(e){var t=e.userId,n=e.flag;return{userId:t,hasAudio:!!(8&n),hasVideo:!!(1&n),hasAuxiliary:!!(4&n)}})):void 0}},{key:\"setMixUserList\",value:function(e){(!this.mixUserList_||pC(this.mixUserList_)&&!function(e,t){if(t.length===e.length){var n,r=T(t);try{var a=function(){var t=n.value,i=e.find((function(e){return e.userId===t.userId}));if(!i||i.flag!==t.flag)return{v:!1}};for(r.s();!(n=r.n()).done;){var o=a();if(\"object\"===i(o))return o.v}}catch(s){r.e(s)}finally{r.f()}return!0}return!1}(this.mixUserList_,e))&&(this.mixUserList_=e,this.emitter_.emit(OO.STREAM_UPDATED,{stream:this.getMainStream()}))}},{key:\"isMainStreamSubscribed\",get:function(){return(this.subscribeState_.audio||this.subscribeState_.video||this.subscribeState_.smallVideo)&&(this.trackState_.audio||this.trackState_.video||this.trackState_.smallVideo)}},{key:\"isAuxStreamSubscribed\",get:function(){return this.subscribeState_.auxiliary&&this.trackState_.auxiliary}},{key:\"isSmallStreamSubscribed\",get:function(){return this.subscribeState_.smallVideo&&this.trackState_.smallVideo}},{key:\"isBigStreamSubscribed\",get:function(){return this.subscribeState_.video&&this.trackState_.video}},{key:\"isStreamUnpublished\",value:function(e){return e.getType()===zb?!this.trackState_.audio&&!this.trackState_.video:!this.trackState_.auxiliary}},{key:\"initialize\",value:function(){y(l(g.prototype),\"initialize\",this).call(this),this.peerConnection_.ontrack=this.onTrack.bind(this)}},{key:\"close\",value:function(){var e,t,n,i=this;y(l(g.prototype),\"close\",this).call(this),this.trackState_.audio=!1,this.trackState_.video=!1,this.trackState_.smallVideo=!1,this.trackState_.auxiliary=!1,this.emitConnectionStateChangedEvent(Pk),e=this,t=function(e){e.fn;var t=e.args,n=e.resolve,r=e.reject,a=e.name;if(\"subscribe\"===a){if(!i.client_.getIsJoined())return r(new vP({code:_P.API_CALL_ABORTED,message:ZR({key:EE,data:{message:\"leave room\",stream:t[0]}})}));if(i.isStreamUnpublished(t[0]))return r(new vP({code:_P.API_CALL_ABORTED,message:ZR({key:EE,data:{message:\"remote user \".concat(i.userId_,\" unpublished stream\"),stream:t[0]}})}))}else if(\"unsubscribe\"===a)return n();n()},null===(n=AJ.get(e))||void 0===n||n.forEach(t),AJ.delete(e),this.remoteStreams_.forEach((function(e){var t=e;t.setConnection(null),t.uninstallEvents(),t.getIsStreamAddedEventEmitted()&&i.emitter_.emit(OO.STREAM_REMOVED,{stream:t})})),this.remoteStreams_.clear(),this.uninstallEvents()}},{key:\"installEvents\",value:function(){var e=this;OC.on(rA,this.onRemoteStreamUpdate,this),this.emitter_.on(OO.ERROR,(function(t){t.getCode()===_P.ICE_TRANSPORT_ERROR&&(e.isFirstConnection_&&(e.isFirstConnection_=!1,oD.logFailedEvent({userId:e.client_.getUserId(),eventType:tI,error:t})),e.isReconnecting_||e.startReconnection())})),this.emitter_.on(OO.CONNECTION_STATE_CHANGED,(function(t){t.state===Mk&&e.isFirstConnection_&&(e.isFirstConnection_=!1,oD.logSuccessEvent({userId:e.client_.getUserId(),eventType:tI}),e.addEventInternal(HP,\"downlink-connection is connected\"))}))}},{key:\"uninstallEvents\",value:function(){OC.removeListener(rA,this.onRemoteStreamUpdate,this)}},{key:\"onRemoteStreamUpdate\",value:function(e){if(this.hitTest(e.tinyId)&&e.client===this.client_){this.updateTrackState(e.action,e.kind);var t=e.kind===Ab?Ek:wk,n=this.remoteStreams_.get(t);if(!n)return;e.action===RI.ADD?this.handleRemoteAddTrack(e.kind,n):this.handleRemoteRemoveTrack(e.kind,n)}}},{key:\"handleRemoteAddTrack\",value:function(e,t){this.log_.info(\"remote add \".concat(e,\" track\")),e===Tb?t.updateAudioPlayingState(this.subscribeState_.audio):t.updateVideoPlayingState(e===Ab?this.subscribeState_.auxiliary:this.subscribeState_.video||this.subscribeState_.smallVideo),t.getIsStreamAddedEventEmitted()?this.emitter_.emit(OO.STREAM_UPDATED,{stream:t}):(this.emitter_.emit(OO.STREAM_ADDED,{stream:t}),this.currentState_===Mk&&t.emitConnectionStateChanged({prevState:Pk,state:Mk}))}},{key:\"handleRemoteRemoveTrack\",value:function(e,t){t.getIsStreamAddedEventEmitted()&&(this.log_.info(\"remote remove \".concat(e,\" track\")),e===Ab||!this.trackState_.audio&&!this.trackState_.video?(this.log_.info(\"remote stream \".concat(t.getType(),\" removed\")),this.currentState_===Mk&&t.emitConnectionStateChanged({prevState:Mk,state:Pk}),this.emitter_.emit(OO.STREAM_REMOVED,{stream:t})):(e===Tb?t.updateAudioPlayingState(!1):(e!==Pb||this.isSmallStreamSubscribed)&&t.updateVideoPlayingState(!1),this.emitter_.emit(OO.STREAM_UPDATED,{stream:t})))}},{key:\"updateTrackState\",value:function(e,t){var n=e===RI.ADD;switch(t){case Tb:this.trackState_.audio=n;break;case wb:this.trackState_.video=n;break;case Ab:this.trackState_.auxiliary=n;break;case Pb:this.trackState_.smallVideo=n}this.log_.info(\"trackState updated: \".concat(JSON.stringify(this.trackState_)))}},{key:\"onTrack\",value:function(e){var t=e.streams[0],n=e.track;if(this.log_.info(\"ontrack() kind: \".concat(n.kind,\" id: \").concat(n.id,\" streamId: \").concat(t.id)),this.sdpSemantics_===vI){var i=function(e){var t=pD.parse(e),n={audio:[],video:[]};return t.media.forEach((function(e){if(e.ssrcs){var t=e.ssrcs[0].id>>16&255;if(e.type===Tb)n.audio.push(wk);else if(e.type==wb){var i=t===Rk?wk:Ek;n.video.push(i)}}})),n}(this.peerConnection_.remoteDescription.sdp);if(n.kind===Tb){if(0===i.audio.length||t.id!==wk)return void this.log_.debug(\"skip this invalid audio track\")}else if(-1===i.video.indexOf(t.id))return void this.log_.debug(\"skip this invalid video track: \".concat(n.id,\"  msid: \").concat(t.id))}oD.logEvent({eventType:\"ontrack\",kind:n.kind});var r=!1,a=this.remoteStreams_.get(t.id),o=t.id===wk?Ck:Ak;if(cC(a)&&((a=new KG({type:o,userId:this.userId_,client:this.client_})).setConnection(this),this.remoteStreams_.set(t.id,a),r=!0),a.setMediaStream(t),n.kind===Tb?a.updateAudioPlayingState(this.subscribeState_.audio):o===Ck?a.updateVideoPlayingState(this.subscribeState_.video||this.subscribeState_.smallVideo):a.updateVideoPlayingState(this.subscribeState_.auxiliary),(o!==Ak||this.trackState_.auxiliary)&&(o!==Ck||this.trackState_.audio||this.trackState_.video)){var s=this.client_.getSubscriptionManager();s&&s.hasAutoRecoveryFlag(this.userId_,o)||(r?this.emitter_.emit(OO.STREAM_ADDED,{stream:a}):this.emitter_.emit(OO.STREAM_UPDATED,{stream:a}))}}},{key:\"addRRTRLine\",value:function(e){var t=e.split(\"\\r\\n\"),n=new Map;t.forEach((function(e,i){/^a=rtcp-fb:/.test(e)&&t[i+1]&&!/^a=rtcp-fb:/.test(t[i+1])&&e.match(/^a=rtcp-fb:\\d+/)&&n.set(i+1,e.match(/^a=rtcp-fb:\\d+/)[0]+\" rrtr\")}));for(var i=b(n),r=0;r<i.length;r++){var a=S(i[r],2),o=a[0],s=a[1];t.splice(o+r,0,s)}return t.join(\"\\r\\n\")}},{key:\"addSPSDescription\",value:function(e){var t=wD(e);return t.media.forEach((function(e){e.type===wb&&e.fmtp.forEach((function(e){e.config+=\";sps-pps-idr-in-keyframe=1\"}))})),ED(t)}},{key:\"removeSDESDescription\",value:function(e){var t=[\"urn:ietf:params:rtp-hdrext:sdes:mid\",\"urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\",\"urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\"],n=wD(e);return n.media.forEach((function(e){e.ext=e.ext.filter((function(e){return!t.includes(e.uri)}))})),ED(n)}},{key:\"isSubscriptionStateNotChanged\",value:function(e,t){return e.getType()===Ck?(null==t?void 0:t.audio)===this.subscribeState_.audio&&(null==t?void 0:t.video)===this.subscribeState_.video&&this.isSubscribeSmall(t):e.getType()===Ak?!cC(t.video)&&this.subscribeState_.auxiliary===t.video:void 0}},{key:\"isSubscribeSmall\",value:function(e){return cC(e.smallVideo)&&!this.subscribeState_.smallVideo}},{key:\"subscribe\",value:(m=a(n().mark((function e(t,i){var r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,o=i.emitEvent,s=void 0===o||o,c=t.getType(),(null===(r=this.peerConnection_)||void 0===r?void 0:r.connectionState)!==Nk&&(null===(a=this.peerConnection_)||void 0===a?void 0:a.connectionState)!==Lk){e.next=6;break}return e.next=6,this.waitForPeerConnectionConnected();case 6:if(!this.isSubscriptionStateNotChanged(t,i)){e.next=13;break}if(this.peerConnection_){e.next=11;break}return this.initialize(),e.next=11,this.connect();case 11:return s&&cC(i.smallVideo)&&this.emitter_.emit(OO.STREAM_SUBSCRIBED,{stream:t,result:!0}),e.abrupt(\"return\",t);case 13:if(c===zb?(cC(i.audio)||(this.subscribeState_.audio=i.audio),cC(i.video)||(this.subscribeState_.video=i.video),this.subscribeState_.smallVideo=(null==i?void 0:i.smallVideo)||!1,this.addEventInternal(this.subscribeState_.audio?EP:CP,this.subscribeState_.audio?\"subscribe audio\":\"unsubscribe audio\"),this.addEventInternal(this.subscribeState_.video?EP:CP,this.subscribeState_.video?\"subscribe video\":\"unsubscribe video\"),this.addEventInternal(this.subscribeState_.smallVideo?$P:ZP,this.subscribeState_.smallVideo?\"subscribe smallVideo\":\"unsubscribe smallVideo\")):cC(i.video)||(this.subscribeState_.auxiliary=i.video),this.log_.info(\"subscribe \".concat(c,\" stream with options \").concat(JSON.stringify(i),\" current state: \").concat(JSON.stringify(this.subscribeState_))),!this.peerConnection_&&!this.isSDPExchanging_){e.next=23;break}return u=_I,this.isMainStreamSubscribed||this.isAuxStreamSubscribed||(u=mI),e.next=20,this.sendSubscription(u);case 20:c===zb?(t.updateAudioPlayingState(this.subscribeState_.audio),t.updateVideoPlayingState(this.subscribeState_.video||this.subscribeState_.smallVideo)):t.updateVideoPlayingState(this.subscribeState_.auxiliary),e.next=26;break;case 23:return this.initialize(),e.next=26,this.connect();case 26:return s&&this.emitter_.emit(OO.STREAM_SUBSCRIBED,{stream:t,result:!0}),e.abrupt(\"return\",t);case 30:if(e.prev=30,e.t0=e.catch(0),!this.client_.getIsJoined()||!this.isStreamUnpublished(t)){e.next=35;break}throw this.log_.warn(\"\".concat(e.t0.message,\" \").concat(JSON.stringify(this.trackState_))),new vP({code:_P.REMOTE_STREAM_NOT_EXIST,message:\"remote user \".concat(this.userId_,\" unpublished stream\")});case 35:throw e.t0;case 36:case\"end\":return e.stop()}}),e,this,[[0,30]])}))),function(e,t){return m.apply(this,arguments)})},{key:\"unsubscribe\",value:(f=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=t.getType())!==zb){e.next=10;break}if(this.isMainStreamSubscribed){e.next=5;break}return this.log_.info(\"main stream already unsubscribed\"),e.abrupt(\"return\",t);case 5:this.subscribeState_.audio=!1,this.subscribeState_.video=!1,this.subscribeState_.smallVideo=!1,e.next=14;break;case 10:if(this.isAuxStreamSubscribed){e.next=13;break}return this.log_.info(\"auxiliary stream already unsubscribed\"),e.abrupt(\"return\",t);case 13:this.subscribeState_.auxiliary=!1;case 14:return r=mI,(i===Ck&&this.isAuxStreamSubscribed||i===Ak&&this.isMainStreamSubscribed)&&(r=_I),this.log_.info(\"unsubscribe \".concat(i,\" stream with \").concat(JSON.stringify(this.subscribeState_))),e.next=19,this.sendSubscription(r);case 19:return t.updateVideoPlayingState(!1),t.updateAudioPlayingState(!1),r===mI&&((a=t.getMediaStream())&&a.getTracks().forEach((function(e){return a.removeTrack(e)})),this.closePeerConnection(),this.emitConnectionStateChangedEvent(Pk)),this.addEventInternal(CP,\"unsubscribe audio\"),this.addEventInternal(RP,\"unsubscribe video\"),e.abrupt(\"return\",t);case 25:case\"end\":return e.stop()}}),e,this)}))),function(e){return f.apply(this,arguments)})},{key:\"sendSubscription\",value:function(e){var t=this,n={srcTinyId:this.tinyId_,srcUserId:this.userId_},i=aP,r=Qx.UNSUBSCRIBE_RESULT;return e===_I&&(n={audio:this.subscribeState_.audio,bigVideo:this.subscribeState_.video,auxVideo:this.subscribeState_.auxiliary,smallVideo:this.subscribeState_.smallVideo,srcTinyId:this.tinyId_},i=oP,r=Qx.SUBSCRIBE_CHANGE_RESULT),this.signalChannel_.sendWaitForResponse({command:i,data:n,responseCommand:r,timeout:1e4}).then((function(n){var i=n.data;if(0!==i.code){var r=new vP({code:i.code,message:ZR({key:OT,data:{type:e,message:i.message}})});throw t.log_.error(r),r}}))}},{key:\"connect\",value:(p=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.exchangeSDP();case 3:return e.next=5,this.waitForPeerConnectionConnected();case 5:e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(0),this.closePeerConnection(!0),e.t0;case 11:case\"end\":return e.stop()}}),e,this,[[0,7]])}))),function(){return p.apply(this,arguments)})},{key:\"exchangeSDP\",value:(h=a(n().mark((function e(){var t,i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,this.isSDPExchanging_=!0,e.next=4,this.createOffer();case 4:return this.log_.info(\"createOffer success, sending offer to remote server\"),t=this.peerConnection_.localDescription,i=t.type,r=t.sdp,a={type:i,sdp:r,srcUserId:this.userId_,srcTinyId:this.tinyId_,audio:this.subscribeState_.audio,bigVideo:this.subscribeState_.video,auxVideo:this.subscribeState_.auxiliary,smallVideo:this.subscribeState_.smallVideo},OC.emit(TA,{client:this.client_,connection:this,userId:this.userId_,tinyId:this.tinyId_,role:bk,subscribeState:this.subscribeState_,trackState:this.trackState_}),e.next=10,this.signalChannel_.sendWaitForResponse({command:rP,commandDesc:\"exchange sdp\",data:a,responseCommand:Qx.SUBSCRIBE_RESULT,timeout:1e4});case 10:if(o=e.sent,this.peerConnection_){e.next=15;break}throw s=new vP({code:_P.INVALID_OPERATION,message:ZR({key:_E})}),this.log_.warn(s),s;case 15:return e.next=17,this.onSubscribeResult(o);case 17:this.isSDPExchanging_=!1,e.next=24;break;case 20:throw e.prev=20,e.t0=e.catch(0),this.isSDPExchanging_=!1,e.t0;case 24:case\"end\":return e.stop()}}),e,this,[[0,20]])}))),function(){return h.apply(this,arguments)})},{key:\"createOffer\",value:(u=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={voiceActivityDetection:!1},vO()&&this.sdpSemantics_===vI?(this.peerConnection_.addTransceiver(Tb,{direction:\"recvonly\"}),this.peerConnection_.addTransceiver(wb,{direction:\"recvonly\"}),this.peerConnection_.addTransceiver(wb,{direction:\"recvonly\"})):(t.offerToReceiveAudio=!0,t.offerToReceiveVideo=!0),e.next=4,this.peerConnection_.createOffer(t);case 4:return i=e.sent,e.next=7,cO();case 7:return e.sent.isH264DecodeSupported||(this.log_.warn(\"remove h264 desc from sdp\"),i.sdp=(n=i.sdp,r=void 0,(r=wD(n)).media.forEach((function(e){if(e.type===wb){var t=new Set;e.rtp.forEach((function(e){var n=e.payload;return\"H264\"===e.codec&&t.add(n)})),e.fmtp.forEach((function(e){var n=e.payload,i=e.config.match(/apt=(\\d+)/);i&&i[1]&&t.has(Number(i[1]))&&t.add(n)}));var n=function(e){var n=e.payload;return!t.has(n)};e.rtp=e.rtp.filter(n),e.rtcpFb=e.rtcpFb.filter(n),e.fmtp=e.fmtp.filter(n),e.payloads=e.payloads.split(\" \").filter((function(e){return!t.has(Number(e))})).join(\" \")}})),ED(r))),i.sdp=this.addRRTRLine(i.sdp),i.sdp=this.addSPSDescription(i.sdp),i.sdp=RD(i.sdp),this.sdpSemantics_===vI&&(i.sdp=this.removeSDESDescription(i.sdp)),e.next=16,this.peerConnection_.setLocalDescription(i);case 16:case\"end\":return e.stop()}var n,r}),e,this)}))),function(){return u.apply(this,arguments)})},{key:\"onSubscribeResult\",value:(s=a(n().mark((function e(i){var r,a,o,s,c,u,d,l=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=i&&i.data||{},a=r.code,o=r.message,s=void 0===o?\"\":o,c=i&&i.data&&i.data.data||{},u=c.type,d=c.sdp,77393!==a){e.next=5;break}throw this.log_.error(CE.NOT_SUPPORTED_H264DECODE),new vP({code:_P.NOT_SUPPORTED_H264,message:ZR({key:oE})});case 5:if(e.prev=5,0===a){e.next=8;break}throw new vP({code:a,message:ZR({key:LT,data:{errMsg:s}})});case 8:return this.log_.debug(\"accept remote answer: \"+d),e.next=11,this.peerConnection_.setRemoteDescription({type:u,sdp:d});case 11:this.sei_&&(this.sei_.handleEncodedStreams(),this.sei_.onSEIMessage=function(e){l.emitter_.emit(OO.SEI_MESSAGE,t(t({},e),{},{userId:l.userId_}))}),this.updateSSRC(d),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(5),this.log_.error(e.t0),e.t0;case 19:case\"end\":return e.stop()}}),e,this,[[5,15]])}))),function(e){return s.apply(this,arguments)})},{key:\"updateSSRC\",value:function(e){var t=this;try{wD(e).media.forEach((function(e){if(e.type===Tb){var n=e.ssrcs.find((function(e){return e.value.includes(wk)}));n&&(t.ssrc_.audio=n.id)}else{var i=e.ssrcs.find((function(e){return e.value.includes(wk)})),r=e.ssrcs.find((function(e){return e.value.includes(Ek)}));i&&(t.ssrc_.video=i.id),r&&(t.ssrc_.auxiliary=r.id)}}))}catch(qq){}}},{key:\"setRemoteStream\",value:function(e,t){this.remoteStreams_.set(e,t)}},{key:\"getSubscribeState\",value:function(){return this.subscribeState_}},{key:\"getTrackState\",value:function(){return this.trackState_}},{key:\"getSSRC\",value:function(){return this.ssrc_}},{key:\"getMainStream\",value:function(){return this.remoteStreams_.get(wk)}},{key:\"getAuxStream\",value:function(){return this.remoteStreams_.get(Ek)}},{key:\"getMainStreamVideoTrackId\",value:function(){var e=this.getMainStream();if(e){var t=e.getVideoTrack();if(t)return t.id}return\"\"}},{key:\"getAuxStreamVideoTrackId\",value:function(){var e=this.getAuxStream();if(e){var t=e.getVideoTrack();if(t)return t.id}return\"\"}},{key:\"reconnect\",value:(r=a(n().mark((function e(){var t,i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1===this.reconnectionTimer_){e.next=3;break}return this.log_.warn(\"reconnect() downlink is reconnecting, ignore current reconnection\"),e.abrupt(\"return\");case 3:if(!(this.reconnectionCount_>=30)){e.next=12;break}return this.log_.warn(\"SDK has tried reconnect downlink [\".concat(this.userId_,\"] for \").concat(30,\" times, but all failed, please check your network\")),this.stopReconnection(),t=new vP({code:_P.DOWNLINK_RECONNECTION_FAILED,message:ZR({key:NT})}),oD.logFailedEvent({userId:this.client_.getUserId(),eventType:nI,error:t}),this.addEventInternal(YP,\"downlink-connection reconnect fail\"),this.emitConnectionStateChangedEvent(Pk),this.emitter_.emit(OO.ERROR,t),e.abrupt(\"return\");case 12:if(this.signalChannel_.getCurrentState()===Jx){e.next=16;break}return this.log_.warn(\"reconnect() signal channel is not connected, suspend reconnection until signal is connected\"),this.signalChannel_.once(Bx,this.reconnect,this),e.abrupt(\"return\");case 16:if(this.reconnectionCount_++,this.log_.warn(\"reconnect() try to reconnect downlink [\".concat(this.reconnectionCount_,\"/\").concat(30,\"]\")),i=oC(this.reconnectionCount_),this.reconnectionTimer_=setTimeout((function(){r.log_.warn(\"reconnect() downlink [\".concat(r.userId_,\"] reconnect timeout(\").concat(i/1e3,\"s), try again\")),r.clearReconnectionTimer(),r.reconnect()}),i),!(this.isSDPExchanging_||this.peerConnection_&&this.peerConnection_.connectionState===Lk)){e.next=22;break}return e.abrupt(\"return\");case 22:return e.prev=22,this.closePeerConnection(),this.initialize(),e.next=27,this.connect();case 27:this.stopReconnection(),this.log_.warn(\"reconnect() downlink reconnect successfully\"),oD.logSuccessEvent({userId:this.client_.getUserId(),eventType:nI}),this.addEventInternal(XP,\"downlink-connection reconnect success\"),this.recoverSubscription(),e.next=36;break;case 34:e.prev=34,e.t0=e.catch(22);case 36:case\"end\":return e.stop()}}),e,this,[[22,34]])}))),function(){return r.apply(this,arguments)})},{key:\"recoverSubscription\",value:function(){var e=this,t=this.client_.getSubscriptionManager();t&&b(this.remoteStreams_.values()).forEach((function(n){t.hasAutoRecoveryFlag(e.userId_,n.getType())&&t.recover(n)}))}},{key:\"getIsReconnecting\",value:function(){return this.isReconnecting_}},{key:\"getSubscribedMainStream\",value:function(){var e=null;return this.isMainStreamSubscribed&&(e=this.remoteStreams_.get(wk)),e}},{key:\"clearReconnectionTimer\",value:function(){-1!==this.reconnectionTimer_&&(clearTimeout(this.reconnectionTimer_),this.reconnectionTimer_=-1)}},{key:\"startReconnection\",value:function(){var e=this.client_.getSubscriptionManager();if(e){var t,n=T(this.remoteStreams_.values());try{for(n.s();!(t=n.n()).done;){var i=t.value,r=i.getType();(r===Ck&&(this.trackState_.audio||this.trackState_.video)||r===Ak&&this.trackState_.auxiliary)&&e.setAutoRecoveryFlag(this.userId_,i.getType())}}catch(a){n.e(a)}finally{n.f()}}y(l(g.prototype),\"startReconnection\",this).call(this)}},{key:\"getCurrentState\",value:function(){return this.currentState_}},{key:\"hasMainStream\",value:function(){return this.trackState_.video||this.trackState_.audio||this.trackState_.smallVideo}},{key:\"hasAuxStream\",value:function(){return this.trackState_.auxiliary}}]),g}(_G),w(CJ.prototype,\"subscribe\",[TJ,wJ],Object.getOwnPropertyDescriptor(CJ.prototype,\"subscribe\"),CJ.prototype),w(CJ.prototype,\"unsubscribe\",[EJ],Object.getOwnPropertyDescriptor(CJ.prototype,\"unsubscribe\"),CJ.prototype),w(CJ.prototype,\"exchangeSDP\",[RJ],Object.getOwnPropertyDescriptor(CJ.prototype,\"exchangeSDP\"),CJ.prototype),CJ);var DJ=function(){function e(){o(this,e),this.startTime=0,this.endTime=0,this.start()}return c(e,[{key:\"start\",value:function(){0===this.startTime&&(this.startTime=vC())}},{key:\"stop\",value:function(){0===this.endTime&&(this.endTime=vC())}},{key:\"getDuration\",value:function(){return 0===this.endTime?vC()-this.startTime:this.endTime-this.startTime}}]),e}(),OJ=function(){function e(t){o(this,e),this.client_=t.client,this.intervalId_=-1,this.statsCalculator_=t.stats,this.prevStats_=null,this.renderFreezeMap_=new Map,this.remoteStreamMap_=new Map,this.dataFreezeMap_=new Map,this.monitorFreezeData_=new Map}var t,i,r;return c(e,[{key:\"installEvents\",value:function(){OC.on(yA,this.handlePlayVideoStart,this),OC.on(mA,this.onVideoTrackMuted,this),OC.on(_A,this.onVideoTrackUnmuted,this),OC.on(dA,this.handleStreamStopped,this),OC.on(cA,this.handleStreamStopped,this),OC.on(nA,this.handleVideoPlaying,this)}},{key:\"uninstallEvents\",value:function(){OC.off(yA,this.handlePlayVideoStart,this),OC.off(mA,this.onVideoTrackMuted,this),OC.off(_A,this.onVideoTrackUnmuted,this),OC.off(dA,this.handleStreamStopped,this),OC.off(cA,this.handleStreamStopped,this),OC.off(nA,this.handleVideoPlaying,this)}},{key:\"start\",value:function(){var e=this;-1===this.intervalId_&&(this.installEvents(),this.intervalId_=YD.run(a(n().mark((function t(){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.detectFPS();case 3:t.next=7;break;case 5:t.prev=5,t.t0=t.catch(0);case 7:case\"end\":return t.stop()}}),t,null,[[0,5]])}))),{delay:1e3}))}},{key:\"stop\",value:function(){-1!==this.intervalId_&&(this.uninstallEvents(),YD.clearTask(this.intervalId_),this.intervalId_=-1,this.renderFreezeMap_.clear(),this.dataFreezeMap_.clear(),this.remoteStreamMap_.clear())}},{key:\"onVideoTrackMuted\",value:function(e){var t=e.stream;if(t.getClient()===this.client_&&t.isRemote()){var n=t.userId_,i=t.type_,r=\"\".concat(n,\"_\").concat(i),a=this.dataFreezeMap_.get(r),o=new DJ;a?a.durationItemList.push(o):this.dataFreezeMap_.set(r,{userId:n,type:i,durationItemList:[o],isFreezing:function(){var e=this.durationItemList[this.durationItemList.length-1];return e&&0===e.endTime}})}}},{key:\"onVideoTrackUnmuted\",value:function(e){var t=e.stream;if(t.getClient()===this.client_&&t.isRemote()){var n=t.userId_,i=t.type_,r=\"\".concat(n,\"_\").concat(i);this.stopDataFreeze({key:r,userId:n,type:i})}}},{key:\"handleStreamStopped\",value:function(e){var t=e.client,n=e.stream;if(t===this.client_){var i=n.getUserId(),r=n.getType(),a=\"\".concat(i,\"_\").concat(r);this.stopDataFreeze({key:a,userId:i,type:r})}}},{key:\"stopDataFreeze\",value:function(e){var t=e.key,n=e.userId,i=e.type,r=this.dataFreezeMap_.get(t);if(r&&r.isFreezing()){var a=r.durationItemList[r.durationItemList.length-1];a.stop();var o=a.getDuration();o>500?(oD.logEvent({eventType:\"videoFrozenCount\",delta:o}),this.monitorFreezeData_.set(t,{userId:n,type:i,duration:o})):r.durationItemList.pop()}}},{key:\"getTotalDuration\",value:function(e){return e.reduce((function(e,t){var n=t.getDuration();return e+Math.min(n,5e3)}),0)}},{key:\"getStats\",value:(r=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.client_.getConnections(),i={},r=T(t),e.prev=3,r.s();case 5:if((a=r.n()).done){e.next=20;break}if(o=S(a.value,2),s=o[0],(c=o[1]).getPeerConnection()){e.next=9;break}return e.abrupt(\"continue\",18);case 9:return u=c.getSubscribeState(),d=c.getTrackState(),e.next=13,this.statsCalculator_.getReceiverStats(c);case 13:l=e.sent,(h={userId:l.userId,tinyId:s,hasVideo:d.video&&u.video,hasAuxiliary:d.auxiliary&&u.auxiliary,video:{framesDecoded:0},auxiliary:{framesDecoded:0}}).hasVideo&&(h.video.framesDecoded=l.video.framesDecoded),h.hasAuxiliary&&(h.auxiliary.framesDecoded=l.auxiliary.framesDecoded),i[l.userId]=h;case 18:e.next=5;break;case 20:e.next=25;break;case 22:e.prev=22,e.t0=e.catch(3),r.e(e.t0);case 25:return e.prev=25,r.f(),e.finish(25);case 28:return e.abrupt(\"return\",i);case 29:case\"end\":return e.stop()}}),e,this,[[3,22,25,28]])}))),function(){return r.apply(this,arguments)})},{key:\"detectFPS\",value:(i=a(n().mark((function e(){var t,i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getStats();case 2:if(t=e.sent,this.prevStats_){e.next=6;break}return this.prevStats_=t,e.abrupt(\"return\");case 6:e.t0=n().keys(t);case 7:if((e.t1=e.t0()).done){e.next=17;break}if(i=e.t1.value,this.prevStats_[i]){e.next=11;break}return e.abrupt(\"continue\",7);case 11:r=t[i].tinyId,a=this.client_.getMutedStates(),t[i].hasVideo&&this.prevStats_[i].hasVideo&&a.has(r)&&!a.get(r).videoMuted&&(o=t[i].video.framesDecoded-this.prevStats_[i].video.framesDecoded,this.handleRenderFreeze({userId:i,type:Ck,fps:o})),t[i].hasAuxiliary&&this.prevStats_[i].hasAuxiliary&&(s=t[i].auxiliary.framesDecoded-this.prevStats_[i].auxiliary.framesDecoded,this.handleRenderFreeze({userId:i,type:Ak,fps:s})),e.next=7;break;case 17:this.prevStats_=t;case 18:case\"end\":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:\"handleRenderFreeze\",value:(t=a(n().mark((function e(t){var i,r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=t.userId,r=t.fps,a=t.type,o=\"\".concat(i,\"_\").concat(a),s=this.renderFreezeMap_.get(o),r<=2?(c=vC(),s&&!s.isFreeze&&(s.freezeTimeline.push({startTime:c,endTime:void 0}),s.isFreeze=!0),s||this.renderFreezeMap_.set(o,{userId:i,type:a,isFreeze:!0,freezeTimeline:[{startTime:c,endTime:void 0}],renderFreezeTotal:0})):s&&s.isFreeze&&(s.isFreeze=!1,(u=s.freezeTimeline.pop()).endTime=vC(),d=u.endTime-u.startTime,s.freezeTimeline.push(u),s.renderFreezeTotal+=Math.min(5e3,d));case 4:case\"end\":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:\"handlePlayVideoStart\",value:function(e){var t=e.stream;if(t.getClient()===this.client_&&t.isRemote()&&t.hasVideo()){var n=\"\".concat(t.getUserId(),\"_\").concat(t.getType());this.remoteStreamMap_.has(n)||this.remoteStreamMap_.set(n,{isPlayingFired:!1})}}},{key:\"handleVideoPlaying\",value:function(e){var t=e.stream;if(t.isRemote()&&t.getClient()===this.client_){var n=\"\".concat(t.getUserId(),\"_\").concat(t.getType());if(this.remoteStreamMap_.has(n))this.remoteStreamMap_.get(n).isPlayingFired=!0}}},{key:\"getDataFreezeDuration\",value:function(e){var t={dataFreeze:0,count:0},n=this.dataFreezeMap_.get(e);if(n){if(n.isFreezing()){var i=n.durationItemList[n.durationItemList.length-1];i.stop(),i.getDuration()<500&&n.durationItemList.pop()}t.dataFreeze=this.getTotalDuration(n.durationItemList),t.count=n.durationItemList.length}return t}},{key:\"getRenderFreezeDuration\",value:function(e){var t=this.renderFreezeMap_.get(e),n=0,i=0;if(t)if(t.isFreeze){var r=vC()-t.freezeTimeline[t.freezeTimeline.length-1].startTime;n=t.renderFreezeTotal+Math.min(r,5e3),i=t.freezeTimeline.length}else n=t.renderFreezeTotal;return{renderFreeze:n,count:i}}},{key:\"getMonitorFreeze\",value:function(){return this.monitorFreezeData_}},{key:\"isBlackStream\",value:function(e){return!!this.remoteStreamMap_.has(e)&&!this.remoteStreamMap_.get(e).isPlayingFired}},{key:\"resetMonitor\",value:function(){this.monitorFreezeData_.clear()}}]),e}(),MJ=c((function e(t){o(this,e),this.userId=t.userId,this.tinyId=t.tinyId,this.role=t.role===bk?Ik:Tk})),NJ={exports:{}};!function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function i(e,t,i,r,a,o){return n((s=n(n(t,e),n(r,o)))<<(c=a)|s>>>32-c,i);var s,c}function r(e,t,n,r,a,o,s){return i(t&n|~t&r,e,t,a,o,s)}function a(e,t,n,r,a,o,s){return i(t&r|n&~r,e,t,a,o,s)}function o(e,t,n,r,a,o,s){return i(t^n^r,e,t,a,o,s)}function s(e,t,n,r,a,o,s){return i(n^(t|~r),e,t,a,o,s)}function c(e,t){var i,c,u,d,l;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var h=1732584193,p=-271733879,f=-1732584194,m=271733878;for(i=0;i<e.length;i+=16)c=h,u=p,d=f,l=m,h=r(h,p,f,m,e[i],7,-680876936),m=r(m,h,p,f,e[i+1],12,-389564586),f=r(f,m,h,p,e[i+2],17,606105819),p=r(p,f,m,h,e[i+3],22,-1044525330),h=r(h,p,f,m,e[i+4],7,-176418897),m=r(m,h,p,f,e[i+5],12,1200080426),f=r(f,m,h,p,e[i+6],17,-1473231341),p=r(p,f,m,h,e[i+7],22,-45705983),h=r(h,p,f,m,e[i+8],7,1770035416),m=r(m,h,p,f,e[i+9],12,-1958414417),f=r(f,m,h,p,e[i+10],17,-42063),p=r(p,f,m,h,e[i+11],22,-1990404162),h=r(h,p,f,m,e[i+12],7,1804603682),m=r(m,h,p,f,e[i+13],12,-40341101),f=r(f,m,h,p,e[i+14],17,-1502002290),h=a(h,p=r(p,f,m,h,e[i+15],22,1236535329),f,m,e[i+1],5,-165796510),m=a(m,h,p,f,e[i+6],9,-1069501632),f=a(f,m,h,p,e[i+11],14,643717713),p=a(p,f,m,h,e[i],20,-373897302),h=a(h,p,f,m,e[i+5],5,-701558691),m=a(m,h,p,f,e[i+10],9,38016083),f=a(f,m,h,p,e[i+15],14,-660478335),p=a(p,f,m,h,e[i+4],20,-405537848),h=a(h,p,f,m,e[i+9],5,568446438),m=a(m,h,p,f,e[i+14],9,-1019803690),f=a(f,m,h,p,e[i+3],14,-187363961),p=a(p,f,m,h,e[i+8],20,1163531501),h=a(h,p,f,m,e[i+13],5,-1444681467),m=a(m,h,p,f,e[i+2],9,-51403784),f=a(f,m,h,p,e[i+7],14,1735328473),h=o(h,p=a(p,f,m,h,e[i+12],20,-1926607734),f,m,e[i+5],4,-378558),m=o(m,h,p,f,e[i+8],11,-2022574463),f=o(f,m,h,p,e[i+11],16,1839030562),p=o(p,f,m,h,e[i+14],23,-35309556),h=o(h,p,f,m,e[i+1],4,-1530992060),m=o(m,h,p,f,e[i+4],11,1272893353),f=o(f,m,h,p,e[i+7],16,-155497632),p=o(p,f,m,h,e[i+10],23,-1094730640),h=o(h,p,f,m,e[i+13],4,681279174),m=o(m,h,p,f,e[i],11,-358537222),f=o(f,m,h,p,e[i+3],16,-722521979),p=o(p,f,m,h,e[i+6],23,76029189),h=o(h,p,f,m,e[i+9],4,-640364487),m=o(m,h,p,f,e[i+12],11,-421815835),f=o(f,m,h,p,e[i+15],16,530742520),h=s(h,p=o(p,f,m,h,e[i+2],23,-995338651),f,m,e[i],6,-198630844),m=s(m,h,p,f,e[i+7],10,1126891415),f=s(f,m,h,p,e[i+14],15,-1416354905),p=s(p,f,m,h,e[i+5],21,-57434055),h=s(h,p,f,m,e[i+12],6,1700485571),m=s(m,h,p,f,e[i+3],10,-1894986606),f=s(f,m,h,p,e[i+10],15,-1051523),p=s(p,f,m,h,e[i+1],21,-2054922799),h=s(h,p,f,m,e[i+8],6,1873313359),m=s(m,h,p,f,e[i+15],10,-30611744),f=s(f,m,h,p,e[i+6],15,-1560198380),p=s(p,f,m,h,e[i+13],21,1309151649),h=s(h,p,f,m,e[i+4],6,-145523070),m=s(m,h,p,f,e[i+11],10,-1120210379),f=s(f,m,h,p,e[i+2],15,718787259),p=s(p,f,m,h,e[i+9],21,-343485551),h=n(h,c),p=n(p,u),f=n(f,d),m=n(m,l);return[h,p,f,m]}function u(e){var t,n=\"\",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function d(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function l(e){var t,n,i=\"0123456789abcdef\",r=\"\";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),r+=i.charAt(t>>>4&15)+i.charAt(15&t);return r}function h(e){return unescape(encodeURIComponent(e))}function p(e){return function(e){return u(c(d(e),8*e.length))}(h(e))}function f(e,t){return function(e,t){var n,i,r=d(e),a=[],o=[];for(a[15]=o[15]=void 0,r.length>16&&(r=c(r,8*e.length)),n=0;n<16;n+=1)a[n]=909522486^r[n],o[n]=1549556828^r[n];return i=c(a.concat(d(t)),512+8*t.length),u(c(o.concat(i),640))}(h(e),h(t))}function m(e,t,n){return t?n?f(t,e):l(f(t,e)):n?p(e):l(p(e))}e.exports?e.exports=m:t.md5=m}(E)}(NJ);var LJ=NJ.exports,UJ=function(){function e(t){o(this,e),this.client_=t.client,this.signalChannel_=t.signalChannel,this.log_=MA.createLogger({id:\"mix|\"+this.client_.getUserId(),userId:t.client.getUserId(),sdkAppId:t.client.getSDKAppId()}),this.isMixing_=!1,this.config_=null,this.data_=null,this.remoteStreamMap_=new Map,this.installEvents()}var t,i,r,s;return c(e,[{key:\"isPresetLayoutMode\",get:function(){return this.config_&&this.config_.mode===yI.PRESET_LAYOUT}},{key:\"installEvents\",value:function(){OC.on(sA,this.onStreamSubscribed,this),OC.on(cA,this.onStreamUnsubscribed,this),this.client_.on(\"stream-removed\",this.onStreamRemoved,this)}},{key:\"uninstallEvents\",value:function(){OC.off(sA,this.onStreamSubscribed,this),OC.off(cA,this.onStreamUnsubscribed,this),this.client_.off(\"stream-removed\",this.onStreamRemoved,this)}},{key:\"reset\",value:function(){this.uninstallEvents(),this.isMixing_=!1,this.config_=null}},{key:\"onStreamSubscribed\",value:function(e){var t=e.client,n=e.stream;t===this.client_&&(this.remoteStreamMap_.set(n.getId(),{remoteStream:n,isUsed:!1}),this.isMixing_&&this.hasAvailablePlaceHolder()&&this.startMixTranscode(this.config_))}},{key:\"onStreamUnsubscribed\",value:function(e){var t=e.client,n=e.stream;t===this.client_&&this.onStreamRemoved({stream:n})}},{key:\"onStreamRemoved\",value:function(e){var t=e.stream;if(this.remoteStreamMap_.has(t.getId())){var n=this.remoteStreamMap_.get(t.getId()).isUsed;this.remoteStreamMap_.delete(t.getId()),this.isMixing_&&this.isPresetLayoutMode&&n&&this.startMixTranscode(this.config_)}}},{key:\"startMixTranscode\",value:(s=a(n().mark((function e(t){var i,r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,this.resetIsUsedFlag(),this.config_=t,i=this.getInputParam(t,this.remoteStreamMap_),r=this.getOutputParam(t),a=this.getOutputSessionId({config:t,roomId:this.client_.getRoomId(),userId:this.client_.getUserId()}),!this.isMixing_||!this.data_||a===this.data_.outputSessionId){e.next=10;break}return this.log_.info(\"startMixTranscode() streamId changed, stop mixing before start\"),e.next=10,this.doStopMixTranscode();case 10:return e.next=12,this.doStartMixTranscode({outputSessionId:a,inputParam:i,outputParam:r});case 12:e.next=18;break;case 14:throw e.prev=14,e.t0=e.catch(0),this.resetIsUsedFlag(),e.t0;case 18:case\"end\":return e.stop()}}),e,this,[[0,14]])}))),function(e){return s.apply(this,arguments)})},{key:\"doStartMixTranscode\",value:(r=a(n().mark((function e(t){var i,r,a,o,s,c,u,d;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.outputSessionId,r=t.inputParam,a=t.outputParam,o={roomId:String(this.client_.getRoomId()),mcuRequestTime:Date.now(),outputSessionId:i,inputParam:r,outputParam:a},this.data_=o,this.log_.info(\"startMixTranscode: \".concat(JSON.stringify(o))),this.isMixing_=!0,e.prev=5,e.next=8,this.signalChannel_.sendWaitForResponse({command:lP,data:o,timeout:5e3,responseCommand:Qx.START_MIX_TRANSCODE_RES,commandDesc:\"startMixTranscode\"});case 8:if(s=e.sent,c=s.data,u=c.code,d=c.message,0===u){e.next=15;break}throw-102083===u&&(d=\"Please enable relayed-push in \".concat(QI,\" and try later, refer to \").concat(YI,\"tutorial-26-advanced-publish-cdn-stream.html\")),this.log_.error(\"startMixTranscode failed, errCode: \".concat(u,\" errMsg: \").concat(d)),this.isMixing_=!1,new vP({code:_P.START_MIX_TRANSCODE_FAILED,message:ZR({key:jw,data:{message:d},link:{className:\"Client\",fnName:\"startMixTranscode\"}})});case 15:e.next=21;break;case 17:throw e.prev=17,e.t0=e.catch(5),this.isMixing_=!1,e.t0;case 21:case\"end\":return e.stop()}}),e,this,[[5,17]])}))),function(e){return r.apply(this,arguments)})},{key:\"reStartMixTranscode\",value:function(){this.isMixing_&&this.startMixTranscode(this.config_)}},{key:\"stopMixTranscode\",value:(i=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isMixing_){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Bw})});case 2:return e.next=4,this.doStopMixTranscode();case 4:this.resetIsUsedFlag();case 5:case\"end\":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:\"doStopMixTranscode\",value:(t=a(n().mark((function e(){var t,i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={mcuRequestTime:Date.now(),outputSessionId:this.data_.outputSessionId,streamType:this.data_.outputParam.streamType},this.log_.info(\"stopMixTranscode: \".concat(JSON.stringify(t))),e.next=4,this.signalChannel_.sendWaitForResponse({command:hP,data:t,timeout:5e3,responseCommand:Qx.STOP_MIX_TRANSCODE_RES,commandDesc:\"stopMixTranscode\"});case 4:if(i=e.sent,r=i.data,a=r.code,o=r.message,0!==a){e.next=10;break}this.isMixing_=!1,e.next=12;break;case 10:throw this.log_.error(\"stopMixTranscode failed, errCode: \".concat(a,\" errMsg: \").concat(o)),new vP({code:_P.STOP_MIX_TRANSCODE_FAILED,message:ZR({key:Fw,data:{message:o},link:{className:\"Client\",fnName:\"stopMixTranscode\"}})});case 12:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"getOutputSessionId\",value:function(e){var t=e.config,n=e.userId,i=e.roomId;return uC(t.streamId)&&t.streamId.length>0?t.streamId:LJ(\"\".concat(i,\"_\").concat(n,\"_main\"))}},{key:\"getInputParam\",value:function(e,t){var n=this,i=e.mixUsers.map((function(e){return{userId:e.userId,roomId:String(e.roomId||n.client_.getRoomId()),width:e.width||0,height:e.height||0,locationX:e.locationX||0,locationY:e.locationY||0,zOrder:e.zOrder,streamType:cC(e.streamType)||e.streamType!==Ak?0:1,inputType:e.pureAudio?bI.IT_PURE_AUDIO:bI.IT_AUDIO_VIDEO,renderMode:e.renderMode||0}}));return e.mode===yI.PRESET_LAYOUT&&(i.forEach((function(e){if(e.userId===SI.REMOTE){var n=b(t.values()).find((function(e){return!e.isUsed}));n&&(e.userId=n.remoteStream.getUserId(),e.streamType=n.remoteStream.getType()===Ak?1:0,n.isUsed=!0)}})),i=i.filter((function(e){return e.userId!==SI.REMOTE}))),i}},{key:\"getOutputParam\",value:function(e){var t=e.streamId||\"\";return{streamId:t,streamType:t.length>0?1:0,width:cC(e.videoWidth)?640:e.videoWidth,height:cC(e.videoHeight)?480:e.videoHeight,videoBps:e.videoBitrate||0,fps:e.videoFramerate||15,gop:e.videoGOP||2,audioSampleRate:e.audioSampleRate||48e3,audioBps:e.audioBitrate||64,audioChannels:e.audioChannels||1,backgroundColor:e.backgroundColor||0,backgroundImg:e.backgroundImage||\"\",extraInfo:\"\",videoCodec:2,audioCodec:0}}},{key:\"hasAvailablePlaceHolder\",value:function(){return!!this.isPresetLayoutMode&&this.data_.inputParam.length!==this.config_.mixUsers.length}},{key:\"resetIsUsedFlag\",value:function(){this.remoteStreamMap_.forEach((function(e){return e.isUsed=!1}))}}]),e}(),VJ=function(){function e(t){o(this,e),this.client_=t.client,this.signalChannel_=t.signalChannel,this.publishTencentMainStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1},this.publishTencentAuxStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1},this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1}var t,i,r,s,u,d;return c(e,[{key:\"setSignalChannel\",value:function(e){this.signalChannel_=e.signalChannel}},{key:\"getIsPublishingTencentCDN\",value:function(){return this.publishTencentMainStreamObj_.isPublishing_||this.publishTencentAuxStreamObj_.isPublishing_}},{key:\"getIsPublishingGivenCDN\",value:function(){return this.isPublishingGivenCDN_}},{key:\"generatePublishCDNStreamId\",value:function(e,t){if(!e){var n=\"\".concat(this.client_.getRoomId(),\"_\").concat(this.client_.getUserId(),\"_\").concat(t);return/^[A-Za-z\\d_-]*$/.test(n)||(n=LJ(n)),\"\".concat(this.client_.getSDKAppId(),\"_\").concat(n)}return e}},{key:\"generatePublishCDNSessionId\",value:function(e){return LJ(\"\".concat(this.client_.getRoomId(),\"_\").concat(this.client_.getUserId(),\"_\").concat(e))}},{key:\"startPublishTencentCDN\",value:(d=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.streamType===xb?(this.publishTencentAuxStreamObj_.params_=t,this.publishTencentAuxStreamObj_.isPublishing_=!0):(this.publishTencentMainStreamObj_.params_=t,this.publishTencentMainStreamObj_.isPublishing_=!0),this.client_.isJoined_){e.next=3;break}return e.abrupt(\"return\");case 3:return i=this.generatePublishCDNStreamId(t.streamId,t.streamType),r=this.generatePublishCDNSessionId(t.streamType),a=t.streamType===xb?1:0,o={requestTime:Date.now(),sessionId:r,streamId:i,streamType:a},e.next=9,this.doStartPublishTencentCDN(o,t.streamType);case 9:case\"end\":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:\"doStartPublishTencentCDN\",value:(u=a(n().mark((function e(t,i){var r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,MA.info(\"startPublishTencentCDN: \"+JSON.stringify(t)),e.next=4,this.signalChannel_.sendWaitForResponseWithRetry({command:sP,data:t,timeout:2e3,responseCommand:Qx.START_PUBLISH_TENCENT_CDN_RES,commandDesc:\"startPublishCDNStream\",retries:2});case 4:if(r=e.sent,a=r.data,o=a.code,s=a.message,0!==o){e.next=10;break}i===xb?this.publishTencentAuxStreamObj_.streamId_=t.streamId:this.publishTencentMainStreamObj_.streamId_=t.streamId,e.next=14;break;case 10:throw i===xb?this.publishTencentAuxStreamObj_.isPublishing_=!1:this.publishTencentMainStreamObj_.isPublishing_=!1,-102083===o&&(s=\"Please enable relayed-push in \".concat(QI,\" and try later, refer to \").concat(YI,\"tutorial-26-advanced-publish-cdn-stream.html\")),MA.error(\"startPublishTencentCDN failed, errCode: \".concat(o,\", errMsg: \").concat(s)),new vP({code:_P.START_PUBLISH_CDN_FAILED,message:ZR({key:lw,data:{message:s},link:{className:\"Client\",fnName:\"startPublishCDNStream\"}})});case 14:e.next=20;break;case 16:throw e.prev=16,e.t0=e.catch(0),i===xb?this.publishTencentAuxStreamObj_.isPublishing_=!1:this.publishTencentMainStreamObj_.isPublishing_=!1,e.t0;case 20:case\"end\":return e.stop()}}),e,this,[[0,16]])}))),function(e,t){return u.apply(this,arguments)})},{key:\"resetPublishTencentParam\",value:function(e){e===zb&&(this.publishTencentMainStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1}),e===xb&&(this.publishTencentAuxStreamObj_={params_:null,streamId_:void 0,isPublishing_:!1})}},{key:\"stopPublishTencentCDN\",value:(s=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.client_.isJoined_){e.next=4;break}return this.resetPublishTencentParam(zb),this.resetPublishTencentParam(xb),e.abrupt(\"return\");case 4:if(!this.publishTencentMainStreamObj_.isPublishing_){e.next=7;break}return e.next=7,this.doStopPublishTencentCDN(zb);case 7:if(!this.publishTencentAuxStreamObj_.isPublishing_){e.next=10;break}return e.next=10,this.doStopPublishTencentCDN(xb);case 10:case\"end\":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:\"doStopPublishTencentCDN\",value:(r=a(n().mark((function e(t){var i,r,a,o,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={requestTime:Date.now(),sessionId:LJ(\"\".concat(this.client_.getRoomId(),\"_\").concat(this.client_.getUserId(),\"_\").concat(t))},MA.info(\"stopPublishTencentCDN: \"+JSON.stringify(i)),e.next=4,this.signalChannel_.sendWaitForResponse({command:cP,data:i,timeout:5e3,responseCommand:Qx.STOP_PUBLISH_TENCENT_CDN_RES,commandDesc:\"stopPublishCDNStream\"});case 4:if(r=e.sent,a=r.data,o=a.code,s=a.message,0!==o){e.next=10;break}this.resetPublishTencentParam(t),e.next=17;break;case 10:if(-102069!==o){e.next=15;break}MA.warn(\"stopPublishTencentCDN failed, can not stopPublishTencentCDN in auto relayed-push mode\"),this.resetPublishTencentParam(t),e.next=17;break;case 15:throw MA.error(\"stopPublishTencentCDN failed, errCode: \".concat(o,\" errMsg: \").concat(s)),new vP({code:_P.STOP_PUBLISH_CDN_FAILED,message:ZR({key:hw,data:{message:s},link:{className:\"Client\",fnName:\"stopPublishCDNStream\"}})});case 17:case\"end\":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:\"startPublishGivenCDN\",value:(i=a(n().mark((function e(t){var i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.streamType===zb?this.publishTencentMainStreamObj_.streamId_:this.publishTencentAuxStreamObj_.streamId_,r={pushRequestTime:Date.now(),pushAppId:t.appId,pushBizId:t.bizId,pushCdnUrl:t.url,pushStreamType:t.streamType,pushStreamId:i},MA.info(\"startPublishGivenCDN: \"+JSON.stringify(r)),this.publishGivenCDNData_=r,this.isPublishingGivenCDN_=!0,this.client_.isJoined_){e.next=7;break}return e.abrupt(\"return\");case 7:return e.prev=7,e.next=10,this.signalChannel_.sendWaitForResponse({command:uP,data:r,timeout:5e3,responseCommand:Qx.START_PUBLISH_GIVEN_CDN_RES,commandDesc:\"startPublishCDNStream\"});case 10:if(a=e.sent,o=a.data,s=o.code,c=o.message,0===s){e.next=17;break}throw MA.error(\"startPublishGivenCDN failed, errCode: \".concat(s,\", errMsg: \").concat(c)),this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,new vP({code:_P.START_PUBLISH_CDN_FAILED,message:ZR({key:lw,data:{message:c},link:{className:\"Client\",fnName:\"startPublishCDNStream\"}})});case 17:e.next=24;break;case 19:throw e.prev=19,e.t0=e.catch(7),this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,e.t0;case 24:case\"end\":return e.stop()}}),e,this,[[7,19]])}))),function(e){return i.apply(this,arguments)})},{key:\"stopPublishGivenCDN\",value:(t=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.client_.isJoined_){e.next=4;break}return this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,e.abrupt(\"return\");case 4:return t=this.publishGivenCDNData_,i=t.pushAppId,r=t.pushBizId,a=t.pushCdnUrl,o=t.pushStreamType,s={pushRequestTime:Date.now(),pushAppId:i,pushBizId:r,pushCdnUrl:a,pushStreamType:o},MA.info(\"stopPublishGivenCDN: \"+JSON.stringify(s)),e.next=9,this.signalChannel_.sendWaitForResponse({command:dP,data:s,timeout:5e3,responseCommand:Qx.STOP_PUBLISH_GIVEN_CDN_RES,commandDesc:\"stopPublishCDNStream\"});case 9:if(c=e.sent,u=c.data,d=u.code,l=u.message,0!==d){e.next=16;break}this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1,e.next=18;break;case 16:throw MA.error(\"stopPublishGivenCDN failed, errCode: \".concat(d,\" errMsg: \").concat(l)),new vP({code:_P.STOP_PUBLISH_CDN_FAILED,message:ZR({key:hw,data:{message:l},link:{className:\"Client\",fnName:\"stopPublishCDNStream\"}})});case 18:case\"end\":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:\"handleCDNConfigForJoinData\",value:function(e){var t,n=e;if(this.publishTencentMainStreamObj_.isPublishing_||this.publishTencentAuxStreamObj_.isPublishing_){var i={};uC(n)&&(i=JSON.parse(n)),i.Str_uc_params||(i.Str_uc_params={}),this.publishTencentMainStreamObj_.isPublishing_&&(this.publishTencentMainStreamObj_.streamId_?i.Str_uc_params.userdefine_streamid_main=this.publishTencentMainStreamObj_.streamId_:this.publishTencentMainStreamObj_.params_&&(i.Str_uc_params.userdefine_streamid_main=this.generatePublishCDNStreamId(this.publishTencentMainStreamObj_.params_.streamId,zb))),this.publishTencentAuxStreamObj_.isPublishing_&&(this.publishTencentAuxStreamObj_.streamId_?i.Str_uc_params.userdefine_streamid_aux=this.publishTencentAuxStreamObj_.streamId_:this.publishTencentAuxStreamObj_.params_&&(i.Str_uc_params.userdefine_streamid_aux=this.generatePublishCDNStreamId(this.publishTencentAuxStreamObj_.params_.streamId,xb))),n=JSON.stringify(i)}if(this.isPublishingGivenCDN_){var r=this.publishGivenCDNData_,a=r.pushAppId,o=r.pushBizId,s=r.pushCdnUrl,c=r.pushStreamType,u=r.pushStreamId;t={pushRequestTime:Date.now(),pushAppId:a,pushBizId:o,pushCdnUrl:s,pushStreamType:c,pushStreamId:u}}return{bussinessInfo:n,pushUserCdnInfo:t}}},{key:\"reset\",value:function(){this.resetPublishTencentParam(zb),this.resetPublishTencentParam(xb),this.publishGivenCDNData_=null,this.isPublishingGivenCDN_=!1}}]),e}(),jJ=function(){function e(t){o(this,e),this.client_=t.client,this.durationMap_=new Map,this.installEvents()}return c(e,[{key:\"installEvents\",value:function(){OC.on(sA,this.handleSubscribed,this),OC.on(rA,this.handleStreamTrackUpdated,this),OC.on(cA,this.handleStreamStopped,this),OC.on(dA,this.handleStreamStopped,this)}},{key:\"uninstallEvents\",value:function(){OC.off(sA,this.handleSubscribed,this),OC.off(rA,this.handleStreamTrackUpdated,this),OC.off(cA,this.handleStreamStopped,this),OC.off(dA,this.handleStreamStopped,this)}},{key:\"handleSubscribed\",value:function(e){var t=e.client,n=e.stream;if(t===this.client_){var i=n.getUserId(),r=n.getType(),a=\"\".concat(i,\"_\").concat(r);if(n.hasAudio())if(n.isMainAudioSubscribed){var o=new DJ,s=this.durationMap_.get(a);s?this.isRecording(s.audio)||s.audio.push(o):this.durationMap_.set(a,{userId:i,type:r,audio:[o],video:[]})}else this.stopDurationItem(a,Tb);if(n.hasVideo())if(r===Ck&&n.isMainVideoSubscribed||r===Ak&&n.isAuxVideoSubscribed){var c=new DJ,u=this.durationMap_.get(a);u?this.isRecording(u.video)||u.video.push(c):this.durationMap_.set(a,{userId:i,type:r,audio:[],video:[c]})}else this.stopDurationItem(a,wb)}}},{key:\"handleStreamStopped\",value:function(e){var t=e.client,n=e.stream;if(this.clientHitTest(t)){var i=n.getUserId(),r=n.getType(),a=\"\".concat(i,\"_\").concat(r);this.stopDurationItem(a,Tb),this.stopDurationItem(a,wb)}}},{key:\"handleStreamTrackUpdated\",value:function(e){var t=e.client,n=e.userId,i=e.tinyId,r=e.kind,a=e.action;if(this.clientHitTest(t)&&this.client_.getConnections().has(i)){var o=r===Ab?r:Ck,s=\"\".concat(n,\"_\").concat(o);if(a===RI.ADD){var c=this.client_.getConnections().get(i).getSubscribeState();if(r===Tb&&!c.audio||r===wb&&!c.video||r===Ab&&!c.auxiliary)return;var u=new DJ,d=this.durationMap_.get(s);d?(r!==Tb||this.isRecording(d.audio)||d.audio.push(u),r===Tb||this.isRecording(d.video)||d.video.push(u)):this.durationMap_.set(s,{userId:n,type:o,audio:r===Tb?[u]:[],video:r===Tb?[]:[u]})}else this.stopDurationItem(s,r===Tb?Tb:wb)}}},{key:\"isRecording\",value:function(e){return e.findIndex((function(e){return 0===e.endTime}))>=0}},{key:\"stopDurationItem\",value:function(e,t){if(this.durationMap_.has(e)){var n=this.durationMap_.get(e)[t].find((function(e){return 0===e.endTime}));n&&n.stop()}}},{key:\"clientHitTest\",value:function(e){return this.client_===e}},{key:\"getDuration\",value:function(e,t){return this.durationMap_.has(e)?this.durationMap_.get(e)[t].reduce((function(e,t){return e+t.getDuration()}),0):0}},{key:\"getDurationMap\",value:function(){return this.durationMap_}},{key:\"reset\",value:function(){this.durationMap_.clear()}},{key:\"destroy\",value:function(){this.client_=null,this.uninstallEvents()}}]),e}();function FJ(){return function(e,t,i){var r=i.value,o=new Set;return i.value=a(n().mark((function e(){var i,a,s,c,u=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.has(this)){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:TT,data:{name:t}})});case 2:for(e.prev=2,o.add(this),i=u.length,a=new Array(i),s=0;s<i;s++)a[s]=u[s];return e.next=7,r.apply(this,a);case 7:return c=e.sent,o.delete(this),e.abrupt(\"return\",c);case 12:throw e.prev=12,e.t0=e.catch(2),o.delete(this),e.t0;case 16:case\"end\":return e.stop()}}),e,this,[[2,12]])}))),i}}var BJ=null,HJ=!0;function WJ(e){lC(e)&&e!==HJ&&(HJ=e,MA.info(\"setIsNeedToSchedule \"+e))}function GJ(e){return zJ.apply(this,arguments)}function zJ(){return zJ=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l,h,p,f,m;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.userId,r=t.sdkAppId,a=t.useStringRoomId,o=t.roomId,s=t.userSig,HJ||!BJ){e.next=3;break}return e.abrupt(\"return\",{isCached:!0,result:BJ});case 3:return c={delta:0,count:[1,1],msg:[]},e.prev=4,(u=new FormData).append(\"userId\",String(i)),u.append(\"sdkAppId\",String(r)),u.append(\"isStrGroupId\",a),u.append(\"groupId\",String(o)),u.append(\"sdkVersion\",Dr),u.append(\"userSig\",String(s)),jI&&u.append(\"oversea\",!0),d=vC(),e.next=16,XJ(u,c,r);case 16:return(l=e.sent).config&&(l.config.loggerDomain&&vk(l.config.loggerDomain),lC(l.config.scheduleCache)&&WJ(!l.config.scheduleCache)),c.delta=vC()-d,JJ({stat:c,userId:i}),BJ=l,e.abrupt(\"return\",{isCached:!1,result:l});case 24:throw e.prev=24,e.t0=e.catch(4),h=pC(e.t0)?e.t0[0]:e.t0,p=dC(h.code)?h.code:0,f=\"get websocket url failed: \".concat(h.message.includes(\"timeout\")?\"timeout\":h.message),m=new vP({code:_P.SCHEDULE_FAILED,extraCode:p,message:ZR({key:qT,data:{error:f,code:p}})}),MA.error(m),JJ({stat:c,userId:i,roomId:o,error:m}),m;case 33:case\"end\":return e.stop()}}),e,null,[[4,24]])}))),zJ.apply(this,arguments)}function JJ(e){var t=e.stat,n=e.userId,i=e.error;i?oD.logFailedEvent({eventType:fI,error:i,userId:n}):oD.logSuccessEvent({eventType:fI,delta:t.delta,userId:n}),oD.uploadEvent({log:\"stat-schedule:\"+JSON.stringify(t),userId:n})}function qJ(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zb;return t=jI||(tC(e)?n===zb?UI:VI:n===zb?NI:LI),\"https://\".concat(t,\"/api/v1/config\")}function KJ(e,t,n){return new Promise((function(i,r){xC({url:e,body:t,timeout:n.timeout}).then((function(e){0===e.data.code?i(e.data.data):r({code:e.data.code,message:e.data.msg})})).catch(r)}))}OC.on(VC,(function(){return WJ(!0)})),OC.on($C,(function(){return WJ(!0)})),OC.on(ZC,(function(){return WJ(!0)})),OC.on(YC,(function(){return WJ(!0)})),OC.on(IA,(function(e){e.state===Ok&&WJ(!0)}));var QJ=function(e,t){return AA({retryFunction:KJ,settings:{retries:3,timeout:0},onError:t,onRetrying:e})};function XJ(e,t,n){return new Promise((function(i,r){var a,o=null;(a=[QJ((function(e){return t.count[0]=e+1}),(function(e,n){t.msg[0]=e.message,o||n()}))(qJ(n,zb),e,{get timeout(){return 1e3*aC(2+t.count[0])}}),QJ((function(e){return t.count[1]=e+1}),(function(e,n){t.msg[1]=e.message,o||n()}))(qJ(n,Jb),e,{get timeout(){return 1e3*aC(2+t.count[1])}})],new Promise((function(e,t){var n=[];a.forEach((function(i){i.then(e).catch((function(e){n.push(e),n.length===a.length&&t(n)}))}))}))).then((function(e){i(o=e)})).catch(r)}))}var YJ,$J,ZJ,eq,tq,nq,iq,rq,aq,oq,sq,cq,uq,dq,lq,hq,pq,fq,mq,_q,vq,gq,yq,Sq,bq,kq,Iq,Tq,wq,Eq,Rq,Cq,Aq=function(){function e(){o(this,e)}return c(e,[{key:\"call\",value:function(e,t){return sC(this[e])?this[e](t):Promise.reject(new vP({code:_P.INVALID_PARAMETER,message:ZR({key:mE,data:{name:e}})}))}},{key:\"updatePrivateMapKey\",value:function(e){var t=e.privateMapKey;return e.client.setProperty(\"privateMapKey\",t),Promise.resolve()}}]),e}(),xq=new Aq;var Pq,Dq,Oq,Mq,Nq,Lq,Uq,Vq,jq,Fq,Bq,Hq=(YJ=FJ(),$J=RG(wG.CLIENT.join),ZJ=LG({retries:1,timeout:0,onError:function(e,t,n){this.isUsingCachedSchedule_?(this.log_.warn(\"is using cached schedule, retry join\"),WJ(!0),this.reset(),t()):(OC.emit(VC,{client:this,error:e}),oD.logFailedEvent({userId:this.userId_,eventType:Wk,error:e}),this.reset(),this.log_.error(e),n(e))}}),eq=FJ(),tq=LG({retries:3}),nq=FJ(),iq=RG.apply(void 0,b(wG.CLIENT.publish)),rq=JG(HI),aq=FJ(),oq=RG(wG.CLIENT.unpublish),sq=RG.apply(void 0,b(wG.CLIENT.subscribe)),cq=RG(wG.CLIENT.unsubscribe),uq=FJ(),dq=RG(wG.CLIENT.switchRole),lq=JG(HI),hq=RG(wG.CLIENT.startPublishCDNStream),pq=JG(HI),fq=JG(HI),mq=RG(wG.CLIENT.startMixTranscode),_q=JG(HI),vq=JG(HI),gq=JG(HI),yq=JG(HI),Sq=JG(HI),bq=JG(HI),kq=JG(HI),Iq=EG.apply(void 0,b(wG.CLIENT.sendSEIMessage)),Tq=JG(HI),Pq={timesInSecond:30,maxSizeInSecond:8e3,getSize:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t[0].byteLength}},Dq=Pq.timesInSecond,Oq=Pq.maxSizeInSecond,Mq=Pq.getSize,wq=function(e,t,n){var i=n.value,r=new Map;return OC.on(XC,(function(e){var t=e.client;return r.delete(t)})),n.value=function(){var e=r.get(this);e||(e={callCountInSecond:0,timestamp:0,totalSizeInSecond:0},r.set(this,e)),0===e.timestamp?e.timestamp=Date.now():Date.now()-e.timestamp>1e3&&(e.timestamp=Date.now(),e.callCountInSecond=0,e.totalSizeInSecond=0);for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];if(Mq&&(e.totalSizeInSecond+=Mq.apply(void 0,a)),0!==e.timestamp&&Date.now()-e.timestamp<1e3&&(e.callCountInSecond>=Dq||e.totalSizeInSecond>Oq))throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:TE,data:{isTimes:e.callCountInSecond>=Dq,isSize:e.totalSizeInSecond>Oq,name:t,timesInSecond:Dq,maxSizeInSecond:Oq}})});return e.callCountInSecond++,i.apply(this,a)},n},Eq=JG(HI),Rq=JG(HI),Cq=function(){function Client(e){var t,n;o(this,Client),this.name_=HI,this.mode_=e.mode,this.sdpSemantics_=gI,cC(e.sdpSemantics)?function(){var e;if(cC(window.RTCRtpTransceiver))return!1;if(!(\"currentDirection\"in RTCRtpTransceiver.prototype))return!1;var t=null,n=!1;try{(t=new RTCPeerConnection({sdpSemantics:vI})).addTransceiver(Tb),n=!0}catch(qq){}return null===(e=t)||void 0===e||e.close(),n}()&&(this.sdpSemantics_=vI):this.sdpSemantics_=e.sdpSemantics,this.sdkAppId_=e.sdkAppId,this.userId_=e.userId,this.log_=MA.createLogger({id:\"c\".concat(e.seq,\"|\").concat(this.userId_),userId:this.userId_,sdkAppId:this.sdkAppId_}),this.userSig_=e.userSig,this.roomId_=0,this.useStringRoomId_=e.useStringRoomId||!1,this.pureAudioPushMode_=null,this.version_=e.version,this.log_.info(\"using sdpSemantics: \"+this.sdpSemantics_),this.signalChannel_=null,this.role_=Ik,this.privateMapKey_=\"\",this.tinyId_=0,this.env_=\"\",this.proxy_=null,this.unifiedProxy_=null,this.connections_=new Map,this.mutedStates_=new Map,this.userMap_=new Map,this.syncUserListInterval_=-1,this.localStream_=null,this.localAuxStream_=null,this.uplinkConnection_=null,this.emitter_=EC(new DC,this.name_),this.isJoined_=!1,this.heartbeat_=-1,this.lastHeartBeatTime_=-1,this.stats_=new HO(this),this.joinTimeout_=-1,this.changeBigSmallRecords_=new Map,this.networkQuality_=null,this.badCaseDetector_=null,this.networkType_=iC(),this.autoSubscribe_=!!cC(e.autoSubscribe)||e.autoSubscribe,this.joinedTimestamp_=0,this.joinOptions_={},this.basis_=(n={browser:XR().name+\"/\"+XR().version,os:wO(),displayResolution:EO(),isScreenShareSupported:pO(),isWebRTCSupported:iO(),isGetUserMediaSupported:RO(),isWebAudioSupported:CO(),isWebSocketsSupported:\"WebSocket\"in window&&2===window.WebSocket.CLOSING,isWebCodecSupported:(t={AudioDecoder:!1,AudioEncoder:!1,VideoDecoder:!1,VideoEncoder:!1,ImageDecoder:!1},cC(window.AudioDecoder)||(t.AudioDecoder=!0),cC(window.AudioEncoder)||(t.AudioEncoder=!0),cC(window.VideoDecoder)||(t.VideoDecoder=!0),cC(window.VideoEncoder)||(t.VideoEncoder=!0),cC(window.ImageDecoder)||(t.ImageDecoder=!0),t),isMediaSessionSupported:\"mediaSession\"in navigator&&!cC(navigator.mediaSession.setActionHandler),isWebTransportSupported:!cC(window.WebTransport)},navigator.userAgent.includes(\"miniProgram\")&&(n.browser=\"mini/\".concat(n.browser)),n),this.initBussinessInfo_(e),this.publishedCDN_=!1,this.publishCDNData_=null,this.mixedMCU_=!1,this.mixTranscodeData_=null,this.checkSystemResult_=null,this.enableAudioVolumeEvaluation_=!1,this.audioVolumeIntervalId_=null,this.mixTranscodeManager_=null,this.publishCDNManager_=new VJ({client:this}),this.keyPointManager_=new GG({client:this,frameWorkType:e.frameWorkType,component:e.component}),this.isPublishing_=!1,this.isEnableSmallStream_=!1,this.smallStreamConfig_={bitrate:100,frameRate:15,height:120,width:160},this.turnServers_=[],this.iceTransportPolicy_=e.iceTransportPolicy,this.schedule_={domains:null,iceServers:null,iceTransportPolicy:null,trtcCapability:null},this.isUsingCachedSchedule_=!1,this.enableAutoPlayDialog_=!!cC(e.enableAutoPlayDialog)||e.enableAutoPlayDialog,this.enableMultiAuxStream_=!cC(e.enableMultiAuxStream)&&e.enableMultiAuxStream,this.signalInfo_={},this.enableSEI_=!cC(e.enableSEI)&&e.enableSEI,this.isDestroyed_=!1}var e,i,r,s,u,d,l,h,p,f,m,_,v,g,y,k,I,w,E,R,C,A,x,P,D,O,M;return c(Client,[{key:\"initBussinessInfo_\",value:function(e){this.bussinessInfo_=e.bussinessInfo;var t={};if(uC(e.bussinessInfo)&&(t=JSON.parse(e.bussinessInfo)),!cC(e.pureAudioPushMode)){if(!Number.isInteger(Number(e.pureAudioPushMode)))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:VT})});this.pureAudioPushMode_=e.pureAudioPushMode,t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.pure_audio_push_mod=this.pureAudioPushMode_}if(!cC(e.streamId)){if(!(uC(e.streamId)&&String(e.streamId)&&String(e.streamId).length<=64))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:jT})});t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.userdefine_streamid_main=e.streamId}if(!cC(e.userDefineRecordId)){if(null===e.userDefineRecordId.match(/^[A-Za-z0-9_-]{1,64}$/gi))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:FT})});t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.userdefine_record_id=e.userDefineRecordId}if(!cC(e.userDefinePushArgs)){if(!(uC(e.userDefinePushArgs)&&String(e.userDefinePushArgs)&&String(e.userDefinePushArgs).length<=256))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:BT})});t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.userdefine_push_args=e.userDefinePushArgs}e.enableServerAudioMix&&(t.Str_uc_params||(t.Str_uc_params={}),t.Str_uc_params.enable_server_audio_mix=1,t.Str_uc_params.uc_biz_type=1e3),rD(t)||(this.bussinessInfo_=JSON.stringify(t))}},{key:\"schedule\",value:(M=a(n().mark((function e(i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,GJ({userId:this.userId_,sdkAppId:this.sdkAppId_,roomId:i,useStringRoomId:this.useStringRoomId_,version:this.version_,userSig:this.userSig_});case 2:r=e.sent,a=r.result,o=r.isCached,this.isUsingCachedSchedule_=o,a&&(this.log_.info(\"schedule with cache:\".concat(o,\" : \").concat(JSON.stringify(a))),a.trtcCapability=null==a?void 0:a.trtcAutoConf,this.schedule_=t(t({},this.schedule_),a),OC.emit(KC,this.schedule_));case 7:case\"end\":return e.stop()}}),e,this)}))),function(e){return M.apply(this,arguments)})},{key:\"getSignalChannelUrl\",value:function(){var e={mainUrl:\"\",backupUrl:\"\"},t=eC();return t?e.mainUrl=e.backupUrl=\"wss://\".concat(t,\".rtc.qq.com\"):this.proxy_?e.mainUrl=e.backupUrl=this.proxy_:this.unifiedProxy_?e.mainUrl=e.backupUrl=\"wss://\".concat(this.unifiedProxy_):Array.isArray(this.schedule_.domains)&&this.schedule_.domains.length>0&&(e.mainUrl=e.backupUrl=\"wss://\".concat(this.schedule_.domains[0]),this.schedule_.domains[1]&&(e.backupUrl=\"wss://\".concat(this.schedule_.domains[1]))),e}},{key:\"getUserId\",value:function(){return this.userId_}},{key:\"getUserSig\",value:function(){return this.userSig_}},{key:\"getRole\",value:function(){return this.role_}},{key:\"getSignalInfo\",value:function(){return this.signalInfo_}},{key:\"getRoomId\",value:function(){return this.roomId_}},{key:\"getSDKAppId\",value:function(){return this.sdkAppId_}},{key:\"getTinyId\",value:function(){return this.tinyId_}},{key:\"getIceTransportPolicy\",value:function(){return this.iceTransportPolicy_||this.schedule_.iceTransportPolicy||\"all\"}},{key:\"initialize\",value:function(e){var t=this;this.log_.info(\"setup signal channel\");var n=this.getSignalChannelUrl(),i=n.mainUrl,r=n.backupUrl;return this.signalChannel_=new sD({sdkAppId:this.sdkAppId_,userId:this.userId_,userSig:this.userSig_,roomId:e.roomId,url:i,backupUrl:r,signalDomainWhenUnifiedProxy:this.unifiedProxy_?this.schedule_.domains[0]:void 0,client:this}),this.networkQuality_||(this.networkQuality_=new WO({connections:this.connections_,signalChannel:this.signalChannel_,userId:this.userId_,client:this}),this.networkQuality_.on(MO.NETWORK_QUALITY,(function(e){t.emitter_.emit(MO.NETWORK_QUALITY,e)}))),this.deviceDetector_||(this.deviceDetector_=new GO({client:this})),this.subscriptionManager_||(this.subscriptionManager_=new QG({client:this})),this.badCaseDetector_||(this.badCaseDetector_=new OJ({client:this,stats:this.stats_})),this.callDurationCalculator_||(this.callDurationCalculator_=new jJ({client:this})),this.mixTranscodeManager_||(this.mixTranscodeManager_=new UJ({client:this,signalChannel:this.signalChannel_})),this.publishCDNManager_&&this.publishCDNManager_.setSignalChannel({signalChannel:this.signalChannel_}),this.signalChannel_.on(Fx,(function(e){t.log_.info(\"SignalChannel state changed from \".concat(e.prevState,\" to \").concat(e.state)),t.emitter_.emit(MO.CONNECTION_STATE_CHANGED,e)})),this.signalChannel_.on(Hx,(function(e){t.reset(),t.emitter_.emit(MO.ERROR,e)})),this.signalChannel_.once(Vx,(function(e){t.tinyId_=e.signalInfo.tinyId,OC.emit(JC,{client:t})})),this.signalChannel_.on(Qx.PEER_JOIN,this.onPeerJoin,this),this.signalChannel_.on(Qx.PEER_LEAVE,this.onPeerLeave,this),this.signalChannel_.on(Qx.UPDATE_REMOTE_MUTE_STAT,(function(e){Date.now()-t.lastHeartBeatTime_>=1e4&&t.doHeartbeat(),OC.emit(WC,{client:t,data:e.data}),t.onPublishedUserList(e.data),t.onUpdateRemoteMuteStat(e.data)})),this.signalChannel_.on(Qx.CLIENT_BANNED,(function(e){var n,i=e.data.data.reason;if(oD.uploadEvent({log:\"stat-banned:\".concat(i),userId:t.userId_}),i===qb)n=\"you got banned by the admin\";else if(i===Kb)n=\"duplicated userId joining the room\";else if(i===Xb)n=\"the room has been disbanded by the admin\",i=i.replace(\"_\",\"-\");else if(i===Qb)return t.log_.warn(\"\".concat(i,\" last heart beat time: \").concat(t.lastHeartBeatTime_,\" interval: \").concat(Date.now()-t.lastHeartBeatTime_,\", visibility: \").concat(document.visibilityState)),void t.reJoin();t.log_[\"kick\"===i?\"error\":\"info\"](\"user was banned because of [\".concat(i,\"]\")),t.reset(),t.emitter_.emit(MO.CLIENT_BANNED,{reason:i,message:ZR({key:sw,data:{message:n,reason:i}})||i})})),OC.emit(zC,{client:this}),this.signalChannel_.connect()}},{key:\"preJoin\",value:(O=a(n().mark((function e(t){var i,r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.joinOptions_=t,e.next=3,dO();case 3:if(this.checkSystemResult_=e.sent,this.checkDestroy(),(i=eC())||(i=dk,this.proxy_&&(this.proxy_.startsWith(ck)?i=lk:this.proxy_.startsWith(uk)&&(i=hk))),this.env_=i,oD.setConfig({env:i,sdkAppId:this.sdkAppId_,userId:this.userId_,roomId:t.roomId}),this.uploadTrtcStats(),r=this.checkSystemResult_.detail,a=r.isH264EncodeSupported,o=r.isVp8EncodeSupported,iO()&&(a||o)){e.next=13;break}throw new vP({code:_P.NOT_SUPPORTED,message:ZR({key:iE})});case 13:case\"end\":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})},{key:\"join\",value:(D=a(n().mark((function e(t){var i,r=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.roomId_=t.roomId,cC(t.role)||(this.role_=t.role),cC(t.privateMapKey)||(this.privateMapKey_=t.privateMapKey),i=vC(),OC.emit(MC,{client:this}),tD(this.userId_,{eventId:UP,eventDesc:\"joining room\",timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_}),e.next=8,this.preJoin(t);case 8:return e.abrupt(\"return\",new Promise(function(){var e=a(n().mark((function e(a,o){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.joinReject_=o,e.prev=1,r.proxy_||r.schedule_.domains){e.next=5;break}return e.next=5,r.schedule(t.roomId);case 5:return r.checkDestroy(),e.next=8,r.initialize(t);case 8:return e.next=10,r.doJoin(t);case 10:r.signalInfo_=r.signalChannel_.getSignalInfo(),OC.emit(UC,{client:r}),r.joinedTimestamp_=vC(),oD.logSuccessEvent({userId:r.userId_,eventType:Gk,delta:r.joinedTimestamp_-i}),oD.logSuccessEvent({userId:r.userId_,eventType:Wk}),oD.uploadEvent({log:\"stat-autoplay-dialog:\".concat(r.enableAutoPlayDialog_),userId:r.userId_}),oD.uploadEvent({log:\"stat-conv-\".concat(qR,\"-\").concat(location.hostname),userId:r.userId_}),a(),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(1),o(e.t0);case 23:r.joinReject_=null;case 24:case\"end\":return e.stop()}}),e,null,[[1,20]])})));return function(t,n){return e.apply(this,arguments)}}()));case 9:case\"end\":return e.stop()}}),e,this)}))),function(e){return D.apply(this,arguments)})},{key:\"checkDestroy\",value:function(){if(this.isDestroyed_)throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:Vw,data:{funName:\"join\"}})})}},{key:\"uploadTrtcStats\",value:(P=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l,h,p,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Jq.getMicrophones();case 3:r=e.sent,t=r&&r.length,e.next=9;break;case 7:e.prev=7,e.t0=e.catch(0);case 9:return e.prev=9,e.next=12,Jq.getCameras();case 12:a=e.sent,i=a&&a.length,e.next=18;break;case 16:e.prev=16,e.t1=e.catch(9);case 18:o={microphone:t,camera:i},s=this.checkSystemResult_.detail,c=s.isH264EncodeSupported,u=s.isVp8EncodeSupported,d=s.isH264DecodeSupported,l=s.isVp8DecodeSupported,h={webRTC:this.basis_.isWebRTCSupported,getUserMedia:this.basis_.isGetUserMediaSupported,webSocket:this.basis_.isWebSocketsSupported,screenShare:this.basis_.isScreenShareSupported,webAudio:this.basis_.isWebAudioSupported,h264Encode:c,h264Decode:d,vp8Encode:u,vp8Decode:l},p={browser:this.basis_.browser,os:this.basis_.os,trtc:h,devices:o},f={isWebCodecSupported:this.basis_.isWebCodecSupported,isMediaSessionSupported:this.basis_.isMediaSessionSupported,isWebTransportSupported:this.basis_.isWebTransportSupported},oD.uploadEvent({log:\"trtcstats-\"+JSON.stringify(p),userId:this.userId_}),this.log_.info(\"TrtcStats-\"+JSON.stringify(p)),oD.uploadEvent({log:\"trtcadvancedstats-\"+JSON.stringify(f),userId:this.userId_});case 26:case\"end\":return e.stop()}}),e,this,[[0,7],[9,16]])}))),function(){return P.apply(this,arguments)})},{key:\"doJoin\",value:function(e){var t=this;return new Promise((function(e,n){t.log_.info(\"Join() => joining room: \".concat(t.roomId_,\" useStringRoomId: \").concat(t.useStringRoomId_,\" mode: \").concat(t.mode_,\" role: \").concat(t.role_));var i={roomId:String(t.roomId_),useStringRoomId:t.useStringRoomId_,privateMapKey:t.privateMapKey_,trtcRole:t.role_===Ik?bk:kk,trtcScene:t.mode_===Sk?yk:gk,sdpSemantics:t.sdpSemantics_,version:CC(t.version_),ua:navigator&&navigator.userAgent||\"\",autoSubscribe:t.autoSubscribe_,terminalType:zE?4:HE?2:FE?3:gR?12:vR?5:yR?13:1,netType:CI[iC()],bussinessInfo:t.bussinessInfo_,receiveMix:!0};if(t.publishCDNManager_){var r=t.publishCDNManager_.handleCDNConfigForJoinData(t.bussinessInfo_),a=r.bussinessInfo,o=r.pushUserCdnInfo;Object.assign(i,{bussinessInfo:a,pushUserCdnInfo:o})}t.log_.debug(\"join room signal data: \".concat(JSON.stringify(i))),t.joinTimeout_=setTimeout((function(){n(new vP({code:_P.JOIN_ROOM_FAILED,message:ZR({key:JT})}))}),5e3),OC.emit(NC,{client:t}),t.signalChannel_.once(jx,(function(e){t.clearJoinTimeout(),OC.emit(JC,{client:t,error:e}),n(e)})),t.signalChannel_.send($x,i),t.signalChannel_.once(Qx.JOIN_ROOM_RESULT,(function(i){t.clearJoinTimeout();var r=i.data,a=r.code,o=r.message,s=r.data;t.onPublishedUserList({data:{userList:s.publishers}}),OC.emit(LC,{client:t,code:a}),0===a?(t.isJoined_=!0,t.log_.info(\"Join room success, start heartbeat\"),t.startHeartbeat(),t.badCaseDetector_&&t.badCaseDetector_.start(),t.syncUserList(),t.startSyncUserListInterval(),e()):(t.log_.error(\"Join room failed result: \"+a+\" error: \"+o),n(new vP({code:_P.JOIN_ROOM_FAILED,extraCode:a,message:ZR({key:qT,data:{error:o,code:a}})})))}))}))}},{key:\"reJoin\",value:(x=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isJoined_){e.next=3;break}return this.log_.warn(\"reJoin abort\"),e.abrupt(\"return\");case 3:return this.isJoined_=!1,e.prev=4,this.log_.warn(\"reJoin pending: \".concat(this.joinOptions_.roomId)),this.subscriptionManager_&&this.subscriptionManager_.markAllStream(),this.signalChannel_.close(),e.next=10,this.signalChannel_.connect();case 10:return e.next=12,this.doJoin(t(t({},this.joinOptions_),{},{role:this.role_,privateMapKey:this.privateMapKey_}));case 12:this.log_.warn(\"reJoin success\"),oD.logSuccessEvent({userId:this.userId_,eventType:zk}),this.checkConnectionsToReconnect(),this.uplinkConnection_&&!this.uplinkConnection_.getIsReconnecting()&&this.uplinkConnection_.startReconnection(),this.mixTranscodeManager_&&this.mixTranscodeManager_.reStartMixTranscode(),e.next=25;break;case 19:e.prev=19,e.t0=e.catch(4),this.log_.warn(\"reJoin fail \"+e.t0),this.reset(),oD.logFailedEvent({userId:this.userId_,eventType:zk,error:e.t0}),this.emitter_.emit(MO.ERROR,new vP({code:_P.JOIN_ROOM_FAILED,message:ZR({key:KT,data:{roomId:this.joinOptions_.roomId}})}));case 25:case\"end\":return e.stop()}}),e,this,[[4,19]])}))),function(){return x.apply(this,arguments)})},{key:\"leave\",value:(A=a(n().mark((function e(){var t;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return OC.emit(jC,{client:this}),tD(this.userId_,{eventId:VP,eventDesc:\"leaving room\",timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_}),e.prev=2,e.next=5,this.doHeartbeat();case 5:e.next=9;break;case 7:e.prev=7,e.t0=e.catch(2);case 9:this.doLeave(),OC.emit(BC,{client:this}),oD.logSuccessEvent({userId:this.userId_,eventType:Jk}),t=Math.floor((vC()-this.joinedTimestamp_)/1e3),oD.logSuccessEvent({userId:this.userId_,eventType:qk,delta:t});case 14:case\"end\":return e.stop()}}),e,this,[[2,7]])}))),function(){return A.apply(this,arguments)})},{key:\"doLeave\",value:function(){this.isJoined_&&(OC.emit(FC,{client:this}),this.log_.info(\"leave() => leaving room\"),this.signalChannel_.send(Zx),this.reset())}},{key:\"clearNetworkQuality\",value:function(){this.networkQuality_&&(this.networkQuality_.stop(),this.networkQuality_=null)}},{key:\"closeConnections\",value:function(){var e=this;this.connections_.forEach((function(t){e.closeDownLink(t.getTinyId())}))}},{key:\"clearJoinTimeout\",value:function(){clearTimeout(this.joinTimeout_),this.joinTimeout_=-1}},{key:\"destroy\",value:function(){var e,t,n;if(this.isJoined_)throw this.log_.warn(CE.INVALID_DESTROY),new vP({code:_P.INVALID_OPERATION,message:ZR({key:QT})});this.isDestroyed_||(this.log_.info(\"destroy client\"),this.joinReject_&&(this.joinReject_(new vP({code:_P.INVALID_OPERATION,message:ZR({key:Vw,data:{funName:\"join\"}})})),this.clearJoinTimeout(),this.reset()),this.off(\"*\"),null===(e=this.callDurationCalculator_)||void 0===e||e.destroy(),null===(t=this.keyPointManager_)||void 0===t||t.destroy(),null===(n=this.deviceDetector_)||void 0===n||n.destroy(),this.callDurationCalculator_=null,this.keyPointManager_=null,this.deviceDetector_=null,this.badCaseDetector_=null,this.publishCDNManager_=null,this.isDestroyed_=!0,OC.emit(XC,{client:this}))}},{key:\"reset\",value:function(){this.isJoined_=!1,this.schedule_={domains:null,iceServers:null,iceTransportPolicy:null,trtcCapability:null},this.keyPointManager_&&this.keyPointManager_.prepareReport(),this.mixTranscodeManager_&&(this.mixTranscodeManager_.reset(),this.mixTranscodeManager_=null),this.publishCDNManager_&&this.publishCDNManager_.reset(),this.userMap_.clear(),this.stopSyncUserListInterval(),this.stopHeartbeat(),this.closeConnections(),this.mutedStates_.clear(),this.clearNetworkQuality(),this.badCaseDetector_&&this.callDurationCalculator_&&this.uploadAllCallStats(),this.closeUplink(),this.signalChannel_&&(this.log_.info(\"destroying SignalChannel\"),this.signalChannel_.close(),this.signalChannel_=null),this.stats_.reset()}},{key:\"startSyncUserListInterval\",value:function(){-1===this.syncUserListInterval_&&(this.syncUserListInterval_=YD.run(uT,this.syncUserList.bind(this)))}},{key:\"stopSyncUserListInterval\",value:function(){YD.clearTask(this.syncUserListInterval_),this.syncUserListInterval_=-1}},{key:\"syncUserList\",value:(C=a(n().mark((function e(){var t,i=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.getUserList();case 3:t=e.sent,0!==this.userMap_.size&&this.userMap_.forEach((function(e){t.findIndex((function(t){return t.userId===e.userId}))<0&&(i.log_.info(\"peer leave detected: \".concat(e.userId)),i.cleanUser({userId:e.userId,tinyId:e.tinyId}))})),t.forEach((function(e){var t=e.userId;i.userMap_.has(t)||t===i.userId_||(i.userMap_.set(t,e),i.emitter_.emit(MO.PEER_JOIN,{userId:t}))})),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),this.log_.warn(\"sync user list failed: \"+e.t0);case 11:case\"end\":return e.stop()}}),e,this,[[0,8]])}))),function(){return C.apply(this,arguments)})},{key:\"getUserList\",value:function(){return this.signalChannel_?this.signalChannel_.sendWaitForResponse({command:pP,responseCommand:Qx.USER_LIST_RES,enableLog:!1,timeout:2e3}).then((function(e){var t=e.data,n=t.code,i=t.message;if(0===n)return(t.data&&t.data.userList||[]).map((function(e){var t=e.userId,n=e.srcTinyId,i=e.role;return new MJ({userId:t,tinyId:n,role:i})}));throw ZR({key:pE,data:{signalResponse:Qx.USER_LIST_RES,code:n,message:i}})})):[]}},{key:\"publish\",value:(R=a(n().mark((function e(t){var i,r,a,o,s,c,u,d,l=this,h=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=h.length>1&&void 0!==h[1]?h[1]:{isAuxiliary:!1},t.setPublishState(xI),this.isPublishing_=!0,r=vC(),OC.emit(GC,{client:this,stream:t}),a=i.isAuxiliary,o=a?Ab:zb,s=t.getScreen(),this.log_.info(\"publish() => publishing \".concat(s?Eb+\" \":\"\").concat(o,\" stream \").concat(t.getId())),c=this.uplinkConnection_,e.prev=10,c||((c=new Az({userId:this.userId_,tinyId:this.tinyId_,client:this,isUplink:!0,signalChannel:this.signalChannel_,enableSEI:this.enableSEI_})).initialize(),c.on(OO.ERROR,(function(e){var t=e.getCode();t!==_P.ICE_TRANSPORT_ERROR&&(t===_P.UPLINK_RECONNECTION_FAILED&&l.closeUplink(),l.emitter_.emit(MO.ERROR,e))}))),t.setConnection(c),e.next=15,c.publish(t,a);case 15:this.log_.info(\"local \".concat(s?Eb+\" \":\"\").concat(o,\" stream is published\")),this.isPublishing_=!1,a?this.localAuxStream_=t:(this.localStream_=t,this.deviceDetector_&&this.deviceDetector_.setLocalStream(this.localStream_),this.localStream_.getBeautyStatus()&&this.log_.info(\"beauty stream is published successfully\")),t.setPublishState(PI),t.setClient(this,a),this.uplinkConnection_=c,u=vC(),d=u-r,oD.logSuccessEvent({userId:this.userId_,eventType:Kk}),oD.logSuccessEvent({userId:this.userId_,eventType:Qk,delta:d}),t.hasAudio()&&tD(this.userId_,{eventId:yP,eventDesc:\"publish audio track\",timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_}),t.hasVideo()&&tD(this.userId_,{eventId:gP,eventDesc:\"publish video track\",timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_}),this.networkQuality_&&this.networkQuality_.setUplinkConnection(this.uplinkConnection_),OC.emit(lA,{localStream:t,isAuxiliary:a,client:this}),this.notPublishWithoutH264Supported_=!1,t.isAIDenoiser&&zG.handleFunctionState({fnName:\"AI_DENOISER\"}),e.next=42;break;case 33:throw e.prev=33,e.t0=e.catch(10),e.t0 instanceof vP&&e.t0.getCode()===_P.NOT_SUPPORTED_H264&&(this.notPublishWithoutH264Supported_=!0),t.setPublishState(AI),c.close(),this.log_.error(\"failed to publish stream \"+e.t0),this.isPublishing_=!1,oD.logFailedEvent({userId:this.userId_,eventType:Kk,error:e.t0}),e.t0;case 42:case\"end\":return e.stop()}}),e,this,[[10,33]])}))),function(e){return R.apply(this,arguments)})},{key:\"unpublish\",value:(E=a(n().mark((function e(t){var i,r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.uplinkConnection_){e.next=2;break}return e.abrupt(\"return\");case 2:return i=t===this.localAuxStream_,r=t.getScreen(),this.log_.info(\"unpublish() => unpublishing local \".concat(r?Eb+\" \":\"\").concat(i?Ab:zb,\" stream\")),e.prev=5,e.next=8,this.uplinkConnection_.unpublish(t);case 8:t.setClient(null),t.setConnection(null),i?this.localAuxStream_=null:(this.localStream_=null,t.hasAudio()&&tD(this.userId_,{eventId:bP,eventDesc:\"unpublish audio track\",timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_}),t.hasVideo()&&tD(this.userId_,{eventId:SP,eventDesc:\"unpublish video track\",timestamp:Gm(),userId:this.userId_,tinyId:this.tinyId_})),this.localStream_||this.localAuxStream_||this.closeUplink(),oD.logSuccessEvent({userId:this.userId_,eventType:Xk}),e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(5),oD.logFailedEvent({userId:this.userId_,eventType:Xk,error:e.t0}),e.t0;case 19:case\"end\":return e.stop()}}),e,this,[[5,15]])}))),function(e){return E.apply(this,arguments)})},{key:\"closeUplink\",value:function(){this.uplinkConnection_&&(this.uplinkConnection_.close(),this.uplinkConnection_=null,this.networkQuality_&&this.networkQuality_.setUplinkConnection(null),this.localStream_&&(this.localStream_.setClient(null),this.localStream_.setConnection(null),this.localStream_=null),this.localAuxStream_&&(this.localAuxStream_.setClient(null),this.localAuxStream_.setConnection(null),this.localAuxStream_=null),this.deviceDetector_&&this.deviceDetector_.setLocalStream(null))}},{key:\"closeDownLink\",value:function(e){var t=this.connections_.get(e);t&&(t.getIsReconnecting()&&t.stopReconnection(),this.subscriptionManager_&&this.subscriptionManager_.delete(t.getUserId()),t.close(),this.connections_.delete(e),this.mutedStates_.delete(e))}},{key:\"subscribe\",value:(w=a(n().mark((function e(t,i){var r,a,o;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log_.info(\"subscribe() => subscribe to [\".concat(t.getUserId(),\"] \").concat(t.getType(),\" stream with options: \").concat(JSON.stringify(i))),cC(i)&&(i={audio:!0,video:!0}),cC(i.audio)&&(i.audio=!0),cC(i.smallVideo)?cC(i.video)&&(i.video=!0):i.smallVideo?cC(i.video)?(i.video=!1,i.smallVideo=!0):i.video&&(i.video=!0,delete i.smallVideo,this.log_.warn(\"options.video and options.smallVideo can't be both true\")):cC(i.video)&&(i.video=!0,delete i.smallVideo),i.video&&this.changeBigSmallRecords_.delete(t.getUserId()),r=t.getConnection(),i.smallVideo&&(r.getTrackState().smallVideo||(this.setRemoteVideoStreamType(t,\"small\"),i.video=!0,delete i.smallVideo)),e.prev=7,OC.emit(oA,{client:this,stream:t}),e.next=11,r.subscribe(t,i);case 11:this.subscriptionManager_&&this.subscriptionManager_.addSubscriptionRecord(t.getUserId(),t,i),this.notSubscribeWithoutH264Supported_=!1,oD.logSuccessEvent({userId:this.userId_,eventType:Yk}),e.next=24;break;case 16:throw e.prev=16,e.t0=e.catch(7),(a=e.t0 instanceof vP?e.t0.getCode():_P.UNKNOWN)===_P.NOT_SUPPORTED_H264&&(this.notSubscribeWithoutH264Supported_=!0),(o=new vP(a===_P.REMOTE_STREAM_NOT_EXIST?{code:_P.API_CALL_ABORTED,message:ZR({key:EE,data:{message:e.t0.message,stream:t}})}:{code:a,message:ZR({key:nw,data:{message:e.t0.message,stream:t}})})).getCode()===_P.API_CALL_ABORTED?this.log_.warn(o):this.log_.error(o),oD.logFailedEvent({userId:this.userId_,eventType:Yk,error:o}),o;case 24:case\"end\":return e.stop()}}),e,this,[[7,16]])}))),function(e,t){return w.apply(this,arguments)})},{key:\"unsubscribe\",value:(I=a(n().mark((function e(t){var i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.log_.info(\"unsubscribe() => unsubscribe to [\".concat(t.getUserId(),\"] \").concat(t.getType(),\" stream\")),e.prev=1,i=t.getConnection(),e.next=5,i.unsubscribe(t);case 5:this.subscriptionManager_&&this.subscriptionManager_.addUnsubscriptionRecord(t.getUserId(),t),OC.emit(cA,{client:this,stream:t}),oD.logSuccessEvent({userId:this.userId_,eventType:$k}),e.next=14;break;case 10:throw e.prev=10,e.t0=e.catch(1),oD.logFailedEvent({userId:this.userId_,eventType:$k,error:e.t0}),e.t0;case 14:case\"end\":return e.stop()}}),e,this,[[1,10]])}))),function(e){return I.apply(this,arguments)})},{key:\"switchRole\",value:(k=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.role_!==t){e.next=2;break}return e.abrupt(\"return\");case 2:return t===Tk&&this.uplinkConnection_&&this.closeUplink(),this.log_.info(\"switchRole() => switch role to: \"+t),e.next=6,this.doSwitchRole(t);case 6:case\"end\":return e.stop()}}),e,this)}))),function(e){return k.apply(this,arguments)})},{key:\"doSwitchRole\",value:function(e){var t,n,i=this,r={command:fP,data:{role:e===Ik?bk:kk,privateMapKey:this.privateMapKey_},responseCommand:Qx.SWITCH_ROLE_RES,retries:(null===(t=this.schedule_.config)||void 0===t||null===(n=t.retries)||void 0===n?void 0:n.switchRole)||1};return this.log_.info(\"switchRole signal data: \"+JSON.stringify(r.data)),this.signalChannel_.sendWaitForResponseWithRetry(r).then((function(t){var n=t.data,r=n.code,a=n.message;if(0!==r)throw new vP({code:_P.SWITCH_ROLE_FAILED,message:ZR({key:ow,data:{errMsg:a,errCode:r}})});i.role_=e})).catch((function(e){throw e instanceof vP&&e.getCode()===_P.API_CALL_TIMEOUT&&(e=new vP({code:_P.SWITCH_ROLE_FAILED,message:ZR({key:aw})})),i.log_.error(e),e}))}},{key:\"on\",value:function(e,t,n){this.emitter_.on(e,t,n)}},{key:\"off\",value:function(e,t,n){\"*\"===e?this.emitter_.removeAllListeners():this.emitter_.off(e,t,n)}},{key:\"getRemoteMutedState\",value:function(){var e=this,n=[];return this.mutedStates_.forEach((function(i,r,a){var o=e.connections_.get(r);o&&n.push(t({userId:o.getUserId()},i))})),n}},{key:\"getTransportStats\",value:(y=a(n().mark((function e(){var t,i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={rtt:0,downlinksRTT:{}},!this.uplinkConnection_){e.next=6;break}return e.next=4,this.stats_.getSenderStats(this.uplinkConnection_);case 4:i=e.sent,t.rtt=i.rtt;case 6:r=T(this.connections_),e.prev=7,r.s();case 9:if((a=r.n()).done){e.next=17;break}return(o=S(a.value,2))[0],s=o[1],e.next=13,this.stats_.getReceiverStats(s);case 13:c=e.sent,t.downlinksRTT[c.userId]=c.rtt;case 15:e.next=9;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(7),r.e(e.t0);case 22:return e.prev=22,r.f(),e.finish(22);case 25:return e.abrupt(\"return\",t);case 26:case\"end\":return e.stop()}}),e,this,[[7,19,22,25]])}))),function(){return y.apply(this,arguments)})},{key:\"getLocalAudioStats\",value:(g=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t={})[this.userId_]={bytesSent:0,packetsSent:0},!this.uplinkConnection_){e.next=7;break}return e.next=5,this.stats_.getSenderStats(this.uplinkConnection_);case 5:i=e.sent,t[this.userId_]={bytesSent:i.audio.bytesSent,packetsSent:i.audio.packetsSent};case 7:return e.abrupt(\"return\",t);case 8:case\"end\":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:\"getLocalVideoStats\",value:(v=a(n().mark((function e(){var t,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((t={})[this.userId_]={bytesSent:0,packetsSent:0,framesEncoded:0,framesSent:0,frameWidth:0,frameHeight:0},!this.uplinkConnection_){e.next=7;break}return e.next=5,this.stats_.getSenderStats(this.uplinkConnection_);case 5:i=e.sent,t[this.userId_]={bytesSent:i.video.bytesSent,packetsSent:i.video.packetsSent,framesEncoded:i.video.framesEncoded,framesSent:i.video.framesSent,frameWidth:i.video.frameWidth,frameHeight:i.video.frameHeight};case 7:return e.abrupt(\"return\",t);case 8:case\"end\":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:\"getRemoteAudioStats\",value:(_=a(n().mark((function e(){var t,i,r,a,o,s,c,u;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t={},i=T(this.connections_),e.prev=2,i.s();case 4:if((r=i.n()).done){e.next=13;break}return(a=S(r.value,2))[0],o=a[1],s=o.getDelay(),c=s.audioDelay,e.next=9,this.stats_.getReceiverStats(o);case 9:(u=e.sent).hasAudio&&(t[u.userId]={bytesReceived:u.audio.bytesReceived,packetsReceived:u.audio.packetsReceived,packetsLost:u.audio.packetsLost,end2EndDelay:c});case 11:e.next=4;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(2),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt(\"return\",t);case 22:case\"end\":return e.stop()}}),e,this,[[2,15,18,21]])}))),function(){return _.apply(this,arguments)})},{key:\"getRemoteVideoStats\",value:(m=a(n().mark((function e(){var t,i,r,a,o,s,c,u,d,l=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=l.length>0&&void 0!==l[0]?l[0]:Ck,i={},r=T(this.connections_),e.prev=3,r.s();case 5:if((a=r.n()).done){e.next=15;break}return(o=S(a.value,2))[0],s=o[1],e.next=9,this.stats_.getReceiverStats(s);case 9:c=e.sent,u=s.getDelay(),d=u.videoDelay,t===Ck&&c.hasVideo&&(i[c.userId]={bytesReceived:c.video.bytesReceived,packetsReceived:c.video.packetsReceived,packetsLost:c.video.packetsLost,framesDecoded:c.video.framesDecoded,frameWidth:c.video.frameWidth,frameHeight:c.video.frameHeight,end2EndDelay:d}),t===Ak&&c.hasAuxiliary&&(i[c.userId]={bytesReceived:c.auxiliary.bytesReceived,packetsReceived:c.auxiliary.packetsReceived,packetsLost:c.auxiliary.packetsLost,framesDecoded:c.auxiliary.framesDecoded,frameWidth:c.auxiliary.frameWidth,frameHeight:c.auxiliary.frameHeight,end2EndDelay:d});case 13:e.next=5;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),r.e(e.t0);case 20:return e.prev=20,r.f(),e.finish(20);case 23:return e.abrupt(\"return\",i);case 24:case\"end\":return e.stop()}}),e,this,[[3,17,20,23]])}))),function(){return m.apply(this,arguments)})},{key:\"getSdpSemantics\",value:function(){return this.sdpSemantics_}},{key:\"getIceServers\",value:function(){return 0===this.turnServers_.length&&this.schedule_.iceServers?this.schedule_.iceServers:this.turnServers_}},{key:\"getConnections\",value:function(){return this.connections_}},{key:\"getMutedStates\",value:function(){return this.mutedStates_}},{key:\"startHeartbeat\",value:function(){-1===this.heartbeat_&&(this.log_.info(\"startHeartbeat...\"),this.heartbeat_=YD.run(uT,this.doHeartbeat.bind(this),{delay:2e3}))}},{key:\"stopHeartbeat\",value:function(){-1!==this.heartbeat_&&(this.log_.info(\"stopHeartbeat\"),YD.clearTask(this.heartbeat_),this.heartbeat_=-1,this.lastHeartBeatTime_=-1)}},{key:\"doHeartbeat\",value:(f=a(n().mark((function e(){var i,r,a,o,s,c;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.badCaseDetector_.getMonitorFreeze(),e.next=3,this.stats_.getStatsReport({uplinkConnection:this.uplinkConnection_,downlinkConnections:this.connections_,freezeMap:r});case 3:if(a=e.sent,OC.emit(HC,{client:this,stats:a}),null===(i=this.badCaseDetector_)||void 0===i||i.resetMonitor(),this.signalChannel_){e.next=8;break}return e.abrupt(\"return\");case 8:o=this.signalChannel_.isConnected()?nD(this.userId_):[],s=t(t({str_sdk_version:this.version_,uint64_datetime:(new Date).getTime(),msg_user_info:{str_identifier:this.userId_,uint64_tinyid:this.tinyId_},msg_device_info:{uint32_terminal_type:15,str_device_name:navigator.platform,str_os_version:\"\",uint32_net_type:CI[this.networkType_]}},a),{},{msg_event_msg:o}),this.signalChannel_.send(eP,s),c=Date.now(),this.lastHeartBeatTime_>0&&c-this.lastHeartBeatTime_>1e4&&this.log_.warn(\"heartbeat took \".concat(c-this.lastHeartBeatTime_)),this.lastHeartBeatTime_=c,!this.isRelayChanged_&&this.isRelayMaybeFailed()&&(this.reJoin(),this.isRelayChanged_=!0);case 15:case\"end\":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:\"onRemoteStreamAdded\",value:function(e){var t=e.content,n=t.userId,i=t.tinyId,r=t.audio,a=t.bigVideo,o=t.auxVideo,s=t.smallVideo;if(null!==n){this.userMap_.has(n)||(this.userMap_.set(n,new MJ({userId:n,tinyId:i,role:Ik})),this.emitter_.emit(MO.PEER_JOIN,{userId:n}));var c=this.connections_.get(i);if(c){if(c.getIsReconnecting())return;this.log_.warn(\"duplicated stream-added observed, rebuild the connection\"),c.close(),this.connections_.delete(i)}var u={audio:r,video:a,auxiliary:o,smallVideo:s};this.log_.info(\"remote peer [\".concat(n,\"] published stream. trackState: \").concat(JSON.stringify(u))),this.createDownlinkConnection({userId:n,tinyId:i,trackState:u})}else this.log_.warn(\"received null userId on stream added\")}},{key:\"createDownlinkConnection\",value:function(e){var t=this,n=e.userId,i=e.tinyId,r=e.trackState,a=new PJ({userId:n,tinyId:i,client:this,isUplink:!1,signalChannel:this.signalChannel_,autoSubscribe:this.autoSubscribe_,trackState:r,enableSEI:this.enableSEI_});this.connections_.set(i,a),this.installDownlinkEvents(a,n,i),this.autoSubscribe_?(a.initialize(),a.connect().catch((function(){!a.getMainStream()&&a.hasMainStream()&&t.initRemoteStream({type:Ck,userId:n,downlinkConnection:a}),!a.getAuxStream()&&a.hasAuxStream()&&t.initRemoteStream({type:Ak,userId:n,downlinkConnection:a})}))):(a.hasMainStream()&&this.initRemoteStream({type:Ck,userId:n,downlinkConnection:a}),a.hasAuxStream()&&this.initRemoteStream({type:Ak,userId:n,downlinkConnection:a}))}},{key:\"initRemoteStream\",value:function(e){var t=e.type,n=e.userId,i=e.downlinkConnection,r=new KG({type:t,userId:n,client:this});r.setConnection(i),i.setRemoteStream(t===Ck?wk:Ek,r),r.setIsStreamAddedEventEmitted(!0),OC.emit(aA,{client:this,stream:r}),this.emitter_.emit(MO.STREAM_ADDED,{stream:r})}},{key:\"installDownlinkEvents\",value:function(e,t,n){var i=this;e.on(OO.SEI_MESSAGE,(function(e){i.emitter_.emit(MO.SEI_MESSAGE,e)})),e.on(OO.STREAM_ADDED,(function(e){e.stream.setIsStreamAddedEventEmitted(!0),OC.emit(aA,{client:i,stream:e.stream}),i.emitter_.emit(MO.STREAM_ADDED,{stream:e.stream})})),e.on(OO.STREAM_REMOVED,(function(e){i.changeBigSmallRecords_.delete(e.stream.getUserId()),e.stream.stop(),e.stream.setIsStreamAddedEventEmitted(!1),i.subscriptionManager_&&i.subscriptionManager_.deleteAutoRecoveryFlag(e.stream.getUserId(),e.stream.getType()),OC.emit(dA,{client:i,stream:e.stream}),i.emitter_.emit(MO.STREAM_REMOVED,{stream:e.stream})})),e.on(OO.STREAM_UPDATED,(function(t){OC.emit(uA,{client:i,stream:t.stream});var n=e.getMixUserList();n&&(t.mixUserList=n),i.emitter_.emit(MO.STREAM_UPDATED,t)})),e.on(OO.STREAM_SUBSCRIBED,(function(e){OC.emit(sA,{client:i,stream:e.stream}),i.emitter_.emit(MO.STREAM_SUBSCRIBED,{stream:e.stream})})),e.on(OO.ERROR,(function(e){var t=e.getCode();t!==_P.ICE_TRANSPORT_ERROR&&(t===_P.DOWNLINK_RECONNECTION_FAILED&&i.closeDownLink(n),i.emitter_.emit(MO.ERROR,e))}))}},{key:\"onPeerJoin\",value:function(e){var t=e.data.data,n=t.srcTinyId,i=t.userId,r=t.role;this.userMap_.has(i)||(this.userMap_.set(i,new MJ({userId:i,tinyId:n,role:r})),this.emitter_.emit(MO.PEER_JOIN,{userId:i}))}},{key:\"onPeerLeave\",value:function(e){var t=e.data.data,n=t.srcTinyId,i=t.userId,r=t.reason,a=void 0===r?0:r;this.log_.info(\"peer leave [\".concat(i,\"]: \").concat(sT[a])),this.cleanUser({userId:i,tinyId:n})}},{key:\"cleanUser\",value:function(e){var t=e.userId,n=e.tinyId;this.userMap_.delete(t),this.closeDownLink(n),this.emitter_.emit(MO.PEER_LEAVE,{userId:t})}},{key:\"onPublishedUserList\",value:function(e){var t=this;try{var n=b(e.data.userList);e.data.mixRobotList&&n.push.apply(n,b(e.data.mixRobotList)),e.data.fakeMixUser&&n.push(e.data.fakeMixUser);var i=n.map((function(e){return e.userId}));this.connections_.forEach((function(e){var n=e.getUserId(),r=e.getTinyId();i.findIndex((function(e){return e===n}))<0&&(t.log_.info(\"peer unpublished detected [\".concat(n,\"]\")),t.closeDownLink(r))})),n.forEach((function(e){var n=e.userId,i=e.srcTinyId,r=e.flag,a=e.mixUserList;if(n!==t.userId_){var o=!!(1&r),s=!!(8&r),c=!!(4&r),u=!!(2&r),d=t.connections_.get(i);if((u||o)&&t.checkSubscribeBigSmallVideo(d,u),d){var l=d.getTrackState(),h=l.audio,p=l.video,f=l.auxiliary,m=l.smallVideo;pC(a)&&d.setMixUserList(a),!p&&o&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.ADD,kind:wb}),!h&&s&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.ADD,kind:Tb}),!f&&c&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.ADD,kind:Ab}),!m&&u&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.ADD,kind:Pb}),p&&!o&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.REMOVE,kind:wb}),h&&!s&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.REMOVE,kind:Tb}),f&&!c&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.REMOVE,kind:Ab}),m&&!u&&OC.emit(rA,{client:t,tinyId:i,userId:n,action:RI.REMOVE,kind:Pb})}else t.log_.info(\"peer published detected [\".concat(n,\"]\")),t.onRemoteStreamAdded({content:{audio:s,bigVideo:o,auxVideo:c,smallVideo:u,userId:n,tinyId:i}})}}))}catch(qq){}}},{key:\"onUpdateRemoteMuteStat\",value:function(e){var t=this,n=e.data;(n&&n.userList||[]).forEach((function(e){var n=e.srcTinyId,i=e.userId;if(0!==n&&n!==t.tinyId_){var r=t.connections_.get(n);if(r){var a=r.getMainStream();if(a&&a.getIsStreamAddedEventEmitted()){var o=!!(1&e.flag),s=!!(8&e.flag),c=!!(2&e.flag),u=!!(64&e.flag),d=!!(16&e.flag),l=t.mutedStates_.get(n);if(void 0===l)return t.mutedStates_.set(n,{hasAudio:s,hasVideo:o,hasSmall:c,audioMuted:u,videoMuted:d}),o?d?t.emitter_.emit(MO.MUTE_VIDEO,{userId:i}):t.emitter_.emit(MO.UNMUTE_VIDEO,{userId:i}):t.emitter_.emit(MO.MUTE_VIDEO,{userId:i}),void(s?u?t.emitter_.emit(MO.MUTE_AUDIO,{userId:i}):t.emitter_.emit(MO.UNMUTE_AUDIO,{userId:i}):t.emitter_.emit(MO.MUTE_AUDIO,{userId:i}));var h=!l.audioMuted&&l.hasAudio,p=!u&&s,f=!l.videoMuted&&l.hasVideo,m=!d&&o;t.mutedStates_.set(n,{hasAudio:s,hasVideo:o,hasSmall:c,audioMuted:u,videoMuted:d}),h!==p&&(p?t.emitter_.emit(MO.UNMUTE_AUDIO,{userId:i}):t.emitter_.emit(MO.MUTE_AUDIO,{userId:i})),f!==m&&(m?t.emitter_.emit(MO.UNMUTE_VIDEO,{userId:i}):t.emitter_.emit(MO.MUTE_VIDEO,{userId:i}))}}else t.mutedStates_.delete(n)}}))}},{key:\"getEnv\",value:function(){return this.env_}},{key:\"getSubscriptionManager\",value:function(){return this.subscriptionManager_}},{key:\"startPublishCDNStream\",value:(p=a(n().mark((function e(){var t,i=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=i.length>0&&void 0!==i[0]?i[0]:{},this.log_.info(\"startPublishCDNStream with params: \".concat(JSON.stringify(t),\"; isJoined: \").concat(this.isJoined_,\"; hasMainStream: \").concat(!!this.localStream_,\"; hasAuxStream: \").concat(!!this.localAuxStream_,\";\")),t.streamType=t.streamType||zb,t.streamType===Ab&&(t.streamType=xb),t.streamId=t.streamId||\"\",!this.isJoined_){e.next=10;break}if(t.streamType!==zb||this.localStream_){e.next=8;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:cw})});case 8:if(t.streamType!==xb||this.localAuxStream_){e.next=10;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:cw})});case 10:return e.next=12,this.publishCDNManager_.startPublishTencentCDN(t);case 12:if(!(t.appId&&t.bizId&&t.url)){e.next=15;break}return e.next=15,this.publishCDNManager_.startPublishGivenCDN(t);case 15:case\"end\":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:\"stopPublishCDNStream\",value:(h=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.publishCDNManager_.getIsPublishingTencentCDN()){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:uw})});case 2:return this.log_.info(\"stopPublishCDNStream\"),e.next=5,this.publishCDNManager_.stopPublishTencentCDN();case 5:if(!this.publishCDNManager_.getIsPublishingGivenCDN()){e.next=8;break}return e.next=8,this.publishCDNManager_.stopPublishGivenCDN();case 8:case\"end\":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:\"startMixTranscode\",value:(l=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isJoined_&&this.mixTranscodeManager_){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:pw})});case 2:return cC(t.mode)&&(t.mode=yI.MANUAL),e.prev=3,this.log_.info(\"startMixTranscode with config \".concat(JSON.stringify(t))),oD.uploadEvent({log:\"mix-transcode-mode:\".concat(t.mode),userId:this.userId_}),e.next=8,this.mixTranscodeManager_.startMixTranscode(t);case 8:oD.logSuccessEvent({userId:this.userId_,eventType:lI}),e.next=15;break;case 11:throw e.prev=11,e.t0=e.catch(3),oD.logFailedEvent({userId:this.userId_,eventType:lI,error:e.t0}),e.t0;case 15:case\"end\":return e.stop()}}),e,this,[[3,11]])}))),function(e){return l.apply(this,arguments)})},{key:\"stopMixTranscode\",value:(d=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.isJoined_&&this.mixTranscodeManager_){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:fw})});case 2:return e.prev=2,e.next=5,this.mixTranscodeManager_.stopMixTranscode();case 5:oD.logSuccessEvent({userId:this.userId_,eventType:hI}),e.next=12;break;case 8:throw e.prev=8,e.t0=e.catch(2),oD.logFailedEvent({userId:this.userId_,eventType:hI,error:e.t0}),e.t0;case 12:case\"end\":return e.stop()}}),e,this,[[2,8]])}))),function(){return d.apply(this,arguments)})},{key:\"getSystemResult\",value:function(){return this.checkSystemResult_}},{key:\"enableAudioVolumeEvaluation\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!dC(t))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:mw})});if(this.log_.info(\"enableAudioVolumeEvaluation with interval: \"+t),t<=0)return this.enableAudioVolumeEvaluation_=!1,YD.clearTask(this.audioVolumeIntervalId_),void(this.audioVolumeIntervalId_=null);t=Math.floor(Math.max(t,16)),OC.emit(QC,{interval:t}),this.audioVolumeIntervalId_&&(YD.clearTask(this.audioVolumeIntervalId_),this.audioVolumeIntervalId_=null),this.enableAudioVolumeEvaluation_=!0,this.audioVolumeIntervalId_=YD.run(dT,(function(){var t=[];if(e.localStream_){var n=Math.floor(100*e.localStream_.getAudioLevel());t.push({userId:e.userId_,audioVolume:n,stream:e.localStream_})}e.connections_.forEach((function(e){var n=e.getSubscribedMainStream();if(n){var i=Math.floor(100*n.getAudioLevel());t.push({userId:e.getUserId(),audioVolume:i,stream:n})}})),e.emitter_.emit(MO.AUDIO_VOLUME,{result:t})}),{fps:1e3/t,backgroundTask:n})}},{key:\"callExperimentalAPI\",value:function(e,n){return xq.call(e,t({client:this},n))}},{key:\"setProperty\",value:function(e,t){var n=\"\".concat(e,\"_\");cC(this[n])||(this[n]=t)}},{key:\"uploadAllCallStats\",value:function(){var e=this;this.callDurationCalculator_.getDurationMap().forEach((function(t,n){var i={userId:t.userId,type:t.type,duration:e.callDurationCalculator_.getDuration(n,wb),dataFreeze:e.badCaseDetector_.getDataFreezeDuration(n).dataFreeze,renderFreeze:e.badCaseDetector_.getRenderFreezeDuration(n).renderFreeze};oD.uploadEvent({log:\"callStats-\"+JSON.stringify(i),userId:e.userId_})})),this.badCaseDetector_.stop(),this.callDurationCalculator_.reset()}},{key:\"enableSmallStream\",value:(u=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPublished()&&!this.isPublishing_){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:_w})});case 2:if(!AO()){e.next=7;break}this.setIsEnableSmallStream(!0),this.log_.info(\"SmallStream successfully enabled\"),e.next=8;break;case 7:throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:gw})});case 8:case\"end\":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:\"disableSmallStream\",value:(s=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isPublished()&&!this.isPublishing_){e.next=2;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:vw})});case 2:this.setIsEnableSmallStream(!1),this.log_.info(\"SmallStream successfully disabled\");case 4:case\"end\":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:\"setSmallStreamProfile\",value:function(e){var t=this;e&&e.framerate&&(e.frameRate=e.framerate),e.width*e.height>307200&&(e.width=320,e.height=240,this.log_.info(\"Small stream resolution is beyond limitation, which is invalid. Reset to 320 * 240\")),Object.keys(this.smallStreamConfig_).forEach((function(n){e[n]&&(t.smallStreamConfig_[n]=e[n])}));var n=this.smallStreamConfig_,i=n.width,r=n.height,a=n.bitrate,o=n.frameRate;if(this.log_.info(\"setSmallStreamProfile: bitrate=\".concat(a,\", frameRate=\").concat(o,\", height=\").concat(r,\", width=\").concat(i)),i<0||r<0||a<0||o<0)throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:yw})})}},{key:\"setRemoteVideoStreamType\",value:(r=a(n().mark((function e(t,i){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t instanceof KG){e.next=2;break}throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:Sw})});case 2:if(t.getConnection()){e.next=4;break}throw new vP({code:_P.INVALID_OPERATION,message:ZR({key:tw})});case 4:if(t.getType()!==Ak){e.next=6;break}return e.abrupt(\"return\");case 6:e.t0=i,e.next=e.t0===DI||e.t0===OI?9:12;break;case 9:return e.next=11,this.changeVideoType(t,i);case 11:case 12:return e.abrupt(\"break\",13);case 13:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:\"changeVideoType\",value:(i=a(n().mark((function e(t,i){var r,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.getUserId(),a={stream:t,options:{video:i===DI,smallVideo:i===OI},isSubscribing:!1,reSubscribeCount:10},this.changeBigSmallRecords_.set(r,a),this.log_.info(\"set [\".concat(r,\"] \").concat(t.getType(),\" stream video prefer type: \").concat(i));case 5:case\"end\":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:\"checkSubscribeBigSmallVideo\",value:(e=a(n().mark((function e(t,i){var r,a,o,s,c,u,d,l,h,p,f;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t&&t.isBigStreamSubscribed||null!=t&&t.isSmallStreamSubscribed){e.next=2;break}return e.abrupt(\"return\");case 2:if(r=t.getUserId(),this.changeBigSmallRecords_.has(r)){e.next=5;break}return e.abrupt(\"return\");case 5:if(a=this.changeBigSmallRecords_.get(r),o=t.getSubscribeState(),s=o.video,c=o.smallVideo,u=a.stream,d=a.options,l=a.isSubscribing,h=a.reSubscribeCount,!(d.video&&s||d.smallVideo&&c&&i)){e.next=10;break}return e.abrupt(\"return\");case 10:if(p={video:d.video,smallVideo:d.smallVideo},!(i&&t.isBigStreamSubscribed||t.isSmallStreamSubscribed)){e.next=31;break}if(e.prev=12,!(d&&u&&!l&&h>=1)){e.next=24;break}return a.isSubscribing=!0,a.reSubscribeCount=h-1,f=u.getConnection(),!i&&f.isSmallStreamSubscribed&&(p={video:!0,smallVideo:!1}),p.emitEvent=!1,e.next=21,null==f?void 0:f.subscribe(u,p);case 21:this.log_.info(\"change [\".concat(r,\"] to \").concat(p.smallVideo?\"small\":\"big\",\" video successfully. count \").concat(10-a.reSubscribeCount,\".\")),a.isSubscribing=!1,a.reSubscribeCount=10;case 24:e.next=31;break;case 26:e.prev=26,e.t0=e.catch(12),this.log_.info(\"change [\".concat(r,\"] to \").concat(p.smallVideo?\"small\":\"big\",\" video failed. count \").concat(10-a.reSubscribeCount,\".\")),a.isSubscribing=!1,0===h&&this.changeBigSmallRecords_.delete(r);case 31:case\"end\":return e.stop()}}),e,this,[[12,26]])}))),function(t,n){return e.apply(this,arguments)})},{key:\"setIsEnableSmallStream\",value:function(e){this.isEnableSmallStream_=e}},{key:\"getIsEnableSmallStream\",value:function(){return this.isEnableSmallStream_}},{key:\"smallStreamConfig\",get:function(){return this.smallStreamConfig_}},{key:\"isPublished\",value:function(){return!!this.localStream_}},{key:\"getUplinkConnection\",value:function(){return this.uplinkConnection_}},{key:\"getLocalStream\",value:function(){return this.localStream_}},{key:\"getMode\",value:function(){return this.mode_}},{key:\"getBadCaseDetector\",value:function(){return this.badCaseDetector_}},{key:\"getCallDurationCalculator\",value:function(){return this.callDurationCalculator_}},{key:\"getIsJoined\",value:function(){return this.isJoined_}},{key:\"getAllConnections\",value:function(){var e=b(this.connections_.values());return this.uplinkConnection_&&e.push(this.uplinkConnection_),e}},{key:\"isRelayMaybeFailed\",value:function(){if(!this.signalChannel_.isOnline)return!1;var e=this.getAllConnections();if(0===e.length)return!1;for(var t=0;t<e.length;t++)if(e[t].getReconnectionCount()<6)return!1;return!0}},{key:\"getUseStringRoomId\",value:function(){return this.useStringRoomId_}},{key:\"checkConnectionsToReconnect\",value:function(){var e=this;this.getAllConnections().forEach((function(t){if(!t.getIsReconnecting()){var n=t.getPeerConnection();n&&n.connectionState===Vk&&(e.log_.warn(\"[\".concat(t.getUserId(),\"] pc is closed but not reconnect\")),t.startReconnection())}}))}},{key:\"getEnableAutoPlayDialog\",value:function(){return this.enableAutoPlayDialog_}},{key:\"sendSEIMessage\",value:function(e,t){this.uplinkConnection_.sendSEI(e,t)}},{key:\"setProxyServer\",value:function(e){if(this.log_.info(\"set proxy server: \".concat(JSON.stringify(e))),uC(e)){if(!e.startsWith(\"wss://\"))throw new vP({code:_P.INVALID_PARAMETER,message:ZR({key:HT})});this.proxy_=e}else if(rC(e)){var t=e.websocketProxy,n=e.loggerProxy,i=e.scheduleProxy,r=e.unifiedProxy;t&&(this.proxy_=t),n&&vk(n),i&&FI(i),r&&(this.unifiedProxy_=r,vk(\"https://\".concat(r)),FI(r))}}},{key:\"setTurnServer\",value:function(e){this.log_.info(\"set turn server: \"+JSON.stringify(e));var t=[];Array.isArray(e)?e.forEach((function(e){return t.push(_C(e))})):rC(e)&&t.push(_C(e)),this.turnServers_=t}},{key:\"get2k4kFlag\",value:function(){var e,t;return(null===(e=this.schedule_)||void 0===e||null===(t=e.trtcCapability)||void 0===t?void 0:t[\"2k4k\"])||2}}]),Client}(),w(Cq.prototype,\"join\",[YJ,$J,ZJ],Object.getOwnPropertyDescriptor(Cq.prototype,\"join\"),Cq.prototype),w(Cq.prototype,\"leave\",[eq],Object.getOwnPropertyDescriptor(Cq.prototype,\"leave\"),Cq.prototype),w(Cq.prototype,\"getUserList\",[tq],Object.getOwnPropertyDescriptor(Cq.prototype,\"getUserList\"),Cq.prototype),w(Cq.prototype,\"publish\",[nq,iq,rq],Object.getOwnPropertyDescriptor(Cq.prototype,\"publish\"),Cq.prototype),w(Cq.prototype,\"unpublish\",[aq,oq],Object.getOwnPropertyDescriptor(Cq.prototype,\"unpublish\"),Cq.prototype),w(Cq.prototype,\"subscribe\",[sq],Object.getOwnPropertyDescriptor(Cq.prototype,\"subscribe\"),Cq.prototype),w(Cq.prototype,\"unsubscribe\",[cq],Object.getOwnPropertyDescriptor(Cq.prototype,\"unsubscribe\"),Cq.prototype),w(Cq.prototype,\"switchRole\",[uq,dq,lq],Object.getOwnPropertyDescriptor(Cq.prototype,\"switchRole\"),Cq.prototype),w(Cq.prototype,\"startPublishCDNStream\",[hq,pq],Object.getOwnPropertyDescriptor(Cq.prototype,\"startPublishCDNStream\"),Cq.prototype),w(Cq.prototype,\"stopPublishCDNStream\",[fq],Object.getOwnPropertyDescriptor(Cq.prototype,\"stopPublishCDNStream\"),Cq.prototype),w(Cq.prototype,\"startMixTranscode\",[mq,_q],Object.getOwnPropertyDescriptor(Cq.prototype,\"startMixTranscode\"),Cq.prototype),w(Cq.prototype,\"stopMixTranscode\",[vq],Object.getOwnPropertyDescriptor(Cq.prototype,\"stopMixTranscode\"),Cq.prototype),w(Cq.prototype,\"enableAudioVolumeEvaluation\",[gq],Object.getOwnPropertyDescriptor(Cq.prototype,\"enableAudioVolumeEvaluation\"),Cq.prototype),w(Cq.prototype,\"enableSmallStream\",[yq],Object.getOwnPropertyDescriptor(Cq.prototype,\"enableSmallStream\"),Cq.prototype),w(Cq.prototype,\"disableSmallStream\",[Sq],Object.getOwnPropertyDescriptor(Cq.prototype,\"disableSmallStream\"),Cq.prototype),w(Cq.prototype,\"setSmallStreamProfile\",[bq],Object.getOwnPropertyDescriptor(Cq.prototype,\"setSmallStreamProfile\"),Cq.prototype),w(Cq.prototype,\"setRemoteVideoStreamType\",[kq],Object.getOwnPropertyDescriptor(Cq.prototype,\"setRemoteVideoStreamType\"),Cq.prototype),w(Cq.prototype,\"sendSEIMessage\",[Iq,Tq,wq],Object.getOwnPropertyDescriptor(Cq.prototype,\"sendSEIMessage\"),Cq.prototype),w(Cq.prototype,\"setProxyServer\",[Eq],Object.getOwnPropertyDescriptor(Cq.prototype,\"setProxyServer\"),Cq.prototype),w(Cq.prototype,\"setTurnServer\",[Rq],Object.getOwnPropertyDescriptor(Cq.prototype,\"setTurnServer\"),Cq.prototype),Cq),Wq=0,Gq=0,zq=(Nq=JG(BI),Lq=JG(BI),Uq=JG(BI),Vq=EG(wG.TRTC.createClient),jq=JG(BI),Fq=EG(wG.TRTC.createStream),Bq=function(){function e(){o(this,e),this.name_=BI,this.VERSION=Dr,this.Logger={loggerManager:MA,LogLevel:tT,setLogLevel:function(e){MA.setLogLevel(e),e<=1&&$R()},enableUploadLog:function(){zG.handleFunctionState({fnName:\"TRTC.enableUploadLog\"}),MA.enableUploadLog()},disableUploadLog:function(){MA.warn(\"disableUploadLog\"),zG.handleFunctionState({fnName:\"TRTC.disableUploadLog\"}),MA.disableUploadLog()}}}var i;return c(e,[{key:\"checkSystemRequirements\",value:(i=a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,dO();case 2:return e.abrupt(\"return\",e.sent);case 3:case\"end\":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:\"isScreenShareSupported\",value:function(){return pO()}},{key:\"isSmallStreamSupported\",value:function(){return AO()}},{key:\"getDevices\",value:function(){return QO()}},{key:\"getCameras\",value:function(){return function(){return zO.apply(this,arguments)}()}},{key:\"getMicrophones\",value:function(){return YO()}},{key:\"getSpeakers\",value:function(){return ZO()}},{key:\"createClient\",value:function(e){!function(){if(NA&&(NA=!1,MA.getLogLevel()!=Jq.Logger.LogLevel.NONE&&(console.info(\"******************************************************************************\"),console.info(\"*   TRTC Web SDK\"),console.info(\"*   API Document: \"+\"\".concat(YI,\"index.html\")),console.info(\"*   Changelog: https://cloud.tencent.com/document/product/647/38958\"),console.info(\"*   Report issues: https://github.com/LiteAVSDK/TRTC_Web/issues\"),console.info(\"******************************************************************************\")),MA.info(\"TRTC Web SDK Version: 4.15.14\"),MA.info(\"UserAgent: \"+navigator.userAgent),MA.info(\"URL of current page: \"+location.href),navigator.userAgentData&&sC(navigator.userAgentData.getHighEntropyValues)))try{navigator.userAgentData.getHighEntropyValues([\"architecture\",\"bitness\",\"model\",\"platformVersion\",\"fullVersionList\"]).then((function(e){var t=\"UAData: \".concat(e.platform,\"/\").concat(e.platformVersion);e.architecture&&e.bitness&&(t+=\" \".concat(e.architecture,\"/\").concat(e.bitness)),e.mobile&&(t+=\" mobile\"),e.model&&(t+=\" model: \".concat(e.model)),e.fullVersionList&&(t+=\" \".concat(e.fullVersionList.filter((function(e){return\"Not/A)Brand\"!==e.brand})).map((function(e){return\"\".concat(e.brand,\"/\").concat(e.version)})).join(\",\"))),MA.info(t)})).catch((function(){}))}catch(qq){}}();var n={version:this.VERSION},i=new Hq(t(t(t({},n),e),{},{seq:++Wq}));return OC.emit(qC,{client:i}),i}},{key:\"createStream\",value:function(e){return new Rz(t(t({},e),{},{seq:++Gq}))}}]),e}(),w(Bq.prototype,\"checkSystemRequirements\",[Nq],Object.getOwnPropertyDescriptor(Bq.prototype,\"checkSystemRequirements\"),Bq.prototype),w(Bq.prototype,\"isScreenShareSupported\",[Lq],Object.getOwnPropertyDescriptor(Bq.prototype,\"isScreenShareSupported\"),Bq.prototype),w(Bq.prototype,\"isSmallStreamSupported\",[Uq],Object.getOwnPropertyDescriptor(Bq.prototype,\"isSmallStreamSupported\"),Bq.prototype),w(Bq.prototype,\"createClient\",[Vq,jq],Object.getOwnPropertyDescriptor(Bq.prototype,\"createClient\"),Bq.prototype),w(Bq.prototype,\"createStream\",[Fq],Object.getOwnPropertyDescriptor(Bq.prototype,\"createStream\"),Bq.prototype),Bq),Jq=new zq;return Jq}));\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/trtc-js-sdk/trtc.js?");

/***/ }),

/***/ "./node_modules/vant/es/action-sheet/index.js":
/*!****************************************************!*\
  !*** ./node_modules/vant/es/action-sheet/index.js ***!
  \****************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_functional__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/functional */ \"./node_modules/vant/es/utils/functional.js\");\n/* harmony import */ var _mixins_popup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../mixins/popup */ \"./node_modules/vant/es/mixins/popup/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../popup */ \"./node_modules/vant/es/popup/index.js\");\n/* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../loading */ \"./node_modules/vant/es/loading/index.js\");\n\n\n // Utils\n\n\n // Mixins\n\n // Components\n\n\n\n // Types\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_3__[\"createNamespace\"])('action-sheet'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\nfunction ActionSheet(h, props, slots, ctx) {\n  var title = props.title,\n      cancelText = props.cancelText,\n      closeable = props.closeable;\n\n  function onCancel() {\n    Object(_utils_functional__WEBPACK_IMPORTED_MODULE_4__[\"emit\"])(ctx, 'input', false);\n    Object(_utils_functional__WEBPACK_IMPORTED_MODULE_4__[\"emit\"])(ctx, 'cancel');\n  }\n\n  function Header() {\n    if (title) {\n      return h(\"div\", {\n        \"class\": bem('header')\n      }, [title, closeable && h(_icon__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n        \"attrs\": {\n          \"name\": props.closeIcon\n        },\n        \"class\": bem('close'),\n        \"on\": {\n          \"click\": onCancel\n        }\n      })]);\n    }\n  }\n\n  function Option(item, index) {\n    var disabled = item.disabled,\n        loading = item.loading,\n        callback = item.callback;\n\n    function onClickOption(event) {\n      event.stopPropagation();\n\n      if (disabled || loading) {\n        return;\n      }\n\n      if (callback) {\n        callback(item);\n      }\n\n      if (props.closeOnClickAction) {\n        Object(_utils_functional__WEBPACK_IMPORTED_MODULE_4__[\"emit\"])(ctx, 'input', false);\n      }\n\n      vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"].nextTick(function () {\n        Object(_utils_functional__WEBPACK_IMPORTED_MODULE_4__[\"emit\"])(ctx, 'select', item, index);\n      });\n    }\n\n    function OptionContent() {\n      if (loading) {\n        return h(_loading__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n          \"class\": bem('loading-icon')\n        });\n      }\n\n      return [h(\"span\", {\n        \"class\": bem('name')\n      }, [item.name]), item.subname && h(\"div\", {\n        \"class\": bem('subname')\n      }, [item.subname])];\n    }\n\n    return h(\"button\", {\n      \"attrs\": {\n        \"type\": \"button\"\n      },\n      \"class\": [bem('item', {\n        disabled: disabled,\n        loading: loading\n      }), item.className],\n      \"style\": {\n        color: item.color\n      },\n      \"on\": {\n        \"click\": onClickOption\n      }\n    }, [OptionContent()]);\n  }\n\n  function CancelText() {\n    if (cancelText) {\n      return [h(\"div\", {\n        \"class\": bem('gap')\n      }), h(\"button\", {\n        \"attrs\": {\n          \"type\": \"button\"\n        },\n        \"class\": bem('cancel'),\n        \"on\": {\n          \"click\": onCancel\n        }\n      }, [cancelText])];\n    }\n  }\n\n  function Description() {\n    var description = (slots.description == null ? void 0 : slots.description()) || props.description;\n\n    if (description) {\n      return h(\"div\", {\n        \"class\": bem('description')\n      }, [description]);\n    }\n  }\n\n  return h(_popup__WEBPACK_IMPORTED_MODULE_7__[\"default\"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n    \"class\": bem(),\n    \"attrs\": {\n      \"position\": \"bottom\",\n      \"round\": props.round,\n      \"value\": props.value,\n      \"overlay\": props.overlay,\n      \"duration\": props.duration,\n      \"lazyRender\": props.lazyRender,\n      \"lockScroll\": props.lockScroll,\n      \"getContainer\": props.getContainer,\n      \"closeOnPopstate\": props.closeOnPopstate,\n      \"closeOnClickOverlay\": props.closeOnClickOverlay,\n      \"safeAreaInsetBottom\": props.safeAreaInsetBottom\n    }\n  }, Object(_utils_functional__WEBPACK_IMPORTED_MODULE_4__[\"inherit\"])(ctx, true)]), [Header(), Description(), h(\"div\", {\n    \"class\": bem('content')\n  }, [props.actions && props.actions.map(Option), slots.default == null ? void 0 : slots.default()]), CancelText()]);\n}\n\nActionSheet.props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _mixins_popup__WEBPACK_IMPORTED_MODULE_5__[\"popupMixinProps\"], {\n  title: String,\n  actions: Array,\n  duration: [Number, String],\n  cancelText: String,\n  description: String,\n  getContainer: [String, Function],\n  closeOnPopstate: Boolean,\n  closeOnClickAction: Boolean,\n  round: {\n    type: Boolean,\n    default: true\n  },\n  closeable: {\n    type: Boolean,\n    default: true\n  },\n  closeIcon: {\n    type: String,\n    default: 'cross'\n  },\n  safeAreaInsetBottom: {\n    type: Boolean,\n    default: true\n  },\n  overlay: {\n    type: Boolean,\n    default: true\n  },\n  closeOnClickOverlay: {\n    type: Boolean,\n    default: true\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent(ActionSheet));\n\n//# sourceURL=webpack:///./node_modules/vant/es/action-sheet/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/action-sheet/index.less":
/*!******************************************************!*\
  !*** ./node_modules/vant/es/action-sheet/index.less ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/action-sheet/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"4ffdc268\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/action-sheet/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/action-sheet/style/less.js":
/*!*********************************************************!*\
  !*** ./node_modules/vant/es/action-sheet/style/less.js ***!
  \*********************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../overlay/index.less */ \"./node_modules/vant/es/overlay/index.less\");\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_overlay_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _popup_index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../popup/index.less */ \"./node_modules/vant/es/popup/index.less\");\n/* harmony import */ var _popup_index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_popup_index_less__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../loading/index.less */ \"./node_modules/vant/es/loading/index.less\");\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_loading_index_less__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/action-sheet/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/action-sheet/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/button/style/less.js":
/*!***************************************************!*\
  !*** ./node_modules/vant/es/button/style/less.js ***!
  \***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../loading/index.less */ \"./node_modules/vant/es/loading/index.less\");\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_loading_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/button/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/button/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/cascader/index.js":
/*!************************************************!*\
  !*** ./node_modules/vant/es/cascader/index.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _tab__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tab */ \"./node_modules/vant/es/tab/index.js\");\n/* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../tabs */ \"./node_modules/vant/es/tabs/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('cascader'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1],\n    t = _createNamespace[2];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: {\n    title: String,\n    value: [Number, String],\n    fieldNames: Object,\n    placeholder: String,\n    activeColor: String,\n    options: {\n      type: Array,\n      default: function _default() {\n        return [];\n      }\n    },\n    closeable: {\n      type: Boolean,\n      default: true\n    },\n    showHeader: {\n      type: Boolean,\n      default: true\n    }\n  },\n  data: function data() {\n    return {\n      tabs: [],\n      activeTab: 0\n    };\n  },\n  computed: {\n    textKey: function textKey() {\n      var _this$fieldNames;\n\n      return ((_this$fieldNames = this.fieldNames) == null ? void 0 : _this$fieldNames.text) || 'text';\n    },\n    valueKey: function valueKey() {\n      var _this$fieldNames2;\n\n      return ((_this$fieldNames2 = this.fieldNames) == null ? void 0 : _this$fieldNames2.value) || 'value';\n    },\n    childrenKey: function childrenKey() {\n      var _this$fieldNames3;\n\n      return ((_this$fieldNames3 = this.fieldNames) == null ? void 0 : _this$fieldNames3.children) || 'children';\n    }\n  },\n  watch: {\n    options: {\n      deep: true,\n      handler: 'updateTabs'\n    },\n    value: function value(_value) {\n      var _this = this;\n\n      if (_value || _value === 0) {\n        var values = this.tabs.map(function (tab) {\n          var _tab$selectedOption;\n\n          return (_tab$selectedOption = tab.selectedOption) == null ? void 0 : _tab$selectedOption[_this.valueKey];\n        });\n\n        if (values.indexOf(_value) !== -1) {\n          return;\n        }\n      }\n\n      this.updateTabs();\n    }\n  },\n  created: function created() {\n    this.updateTabs();\n  },\n  methods: {\n    getSelectedOptionsByValue: function getSelectedOptionsByValue(options, value) {\n      for (var i = 0; i < options.length; i++) {\n        var option = options[i];\n\n        if (option[this.valueKey] === value) {\n          return [option];\n        }\n\n        if (option[this.childrenKey]) {\n          var selectedOptions = this.getSelectedOptionsByValue(option[this.childrenKey], value);\n\n          if (selectedOptions) {\n            return [option].concat(selectedOptions);\n          }\n        }\n      }\n    },\n    updateTabs: function updateTabs() {\n      var _this2 = this;\n\n      if (this.value || this.value === 0) {\n        var selectedOptions = this.getSelectedOptionsByValue(this.options, this.value);\n\n        if (selectedOptions) {\n          var optionsCursor = this.options;\n          this.tabs = selectedOptions.map(function (option) {\n            var tab = {\n              options: optionsCursor,\n              selectedOption: option\n            };\n            var next = optionsCursor.filter(function (item) {\n              return item[_this2.valueKey] === option[_this2.valueKey];\n            });\n\n            if (next.length) {\n              optionsCursor = next[0][_this2.childrenKey];\n            }\n\n            return tab;\n          });\n\n          if (optionsCursor) {\n            this.tabs.push({\n              options: optionsCursor,\n              selectedOption: null\n            });\n          }\n\n          this.$nextTick(function () {\n            _this2.activeTab = _this2.tabs.length - 1;\n          });\n          return;\n        }\n      }\n\n      this.tabs = [{\n        options: this.options,\n        selectedOption: null\n      }];\n    },\n    onSelect: function onSelect(option, tabIndex) {\n      var _this3 = this;\n\n      this.tabs[tabIndex].selectedOption = option;\n\n      if (this.tabs.length > tabIndex + 1) {\n        this.tabs = this.tabs.slice(0, tabIndex + 1);\n      }\n\n      if (option[this.childrenKey]) {\n        var nextTab = {\n          options: option[this.childrenKey],\n          selectedOption: null\n        };\n\n        if (this.tabs[tabIndex + 1]) {\n          this.$set(this.tabs, tabIndex + 1, nextTab);\n        } else {\n          this.tabs.push(nextTab);\n        }\n\n        this.$nextTick(function () {\n          _this3.activeTab++;\n        });\n      }\n\n      var selectedOptions = this.tabs.map(function (tab) {\n        return tab.selectedOption;\n      }).filter(function (item) {\n        return !!item;\n      });\n      var eventParams = {\n        value: option[this.valueKey],\n        tabIndex: tabIndex,\n        selectedOptions: selectedOptions\n      };\n      this.$emit('input', option[this.valueKey]);\n      this.$emit('change', eventParams);\n\n      if (!option[this.childrenKey]) {\n        this.$emit('finish', eventParams);\n      }\n    },\n    onClose: function onClose() {\n      this.$emit('close');\n    },\n    renderHeader: function renderHeader() {\n      var h = this.$createElement;\n\n      if (this.showHeader) {\n        return h(\"div\", {\n          \"class\": bem('header')\n        }, [h(\"h2\", {\n          \"class\": bem('title')\n        }, [this.slots('title') || this.title]), this.closeable ? h(_icon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n          \"attrs\": {\n            \"name\": \"cross\"\n          },\n          \"class\": bem('close-icon'),\n          \"on\": {\n            \"click\": this.onClose\n          }\n        }) : null]);\n      }\n    },\n    renderOptions: function renderOptions(options, selectedOption, tabIndex) {\n      var _this4 = this;\n\n      var h = this.$createElement;\n\n      var renderOption = function renderOption(option) {\n        var isSelected = selectedOption && option[_this4.valueKey] === selectedOption[_this4.valueKey];\n        var Text = _this4.slots('option', {\n          option: option,\n          selected: isSelected\n        }) || h(\"span\", [option[_this4.textKey]]);\n        return h(\"li\", {\n          \"class\": bem('option', {\n            selected: isSelected\n          }),\n          \"style\": {\n            color: isSelected ? _this4.activeColor : null\n          },\n          \"on\": {\n            \"click\": function click() {\n              _this4.onSelect(option, tabIndex);\n            }\n          }\n        }, [Text, isSelected ? h(_icon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n          \"attrs\": {\n            \"name\": \"success\"\n          },\n          \"class\": bem('selected-icon')\n        }) : null]);\n      };\n\n      return h(\"ul\", {\n        \"class\": bem('options')\n      }, [options.map(renderOption)]);\n    },\n    renderTab: function renderTab(item, tabIndex) {\n      var h = this.$createElement;\n      var options = item.options,\n          selectedOption = item.selectedOption;\n      var title = selectedOption ? selectedOption[this.textKey] : this.placeholder || t('select');\n      return h(_tab__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n        \"attrs\": {\n          \"title\": title,\n          \"titleClass\": bem('tab', {\n            unselected: !selectedOption\n          })\n        }\n      }, [this.renderOptions(options, selectedOption, tabIndex)]);\n    },\n    renderTabs: function renderTabs() {\n      var _this5 = this;\n\n      var h = this.$createElement;\n      return h(_tabs__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n        \"attrs\": {\n          \"animated\": true,\n          \"swipeable\": true,\n          \"swipeThreshold\": 0,\n          \"color\": this.activeColor\n        },\n        \"class\": bem('tabs'),\n        \"model\": {\n          value: _this5.activeTab,\n          callback: function callback($$v) {\n            _this5.activeTab = $$v;\n          }\n        }\n      }, [this.tabs.map(this.renderTab)]);\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": bem()\n    }, [this.renderHeader(), this.renderTabs()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/cascader/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/cascader/index.less":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/cascader/index.less ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/cascader/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"1101e972\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/cascader/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/cascader/style/less.js":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/cascader/style/less.js ***!
  \*****************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _tab_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../tab/index.less */ \"./node_modules/vant/es/tab/index.less\");\n/* harmony import */ var _tab_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tab_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _sticky_index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../sticky/index.less */ \"./node_modules/vant/es/sticky/index.less\");\n/* harmony import */ var _sticky_index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_sticky_index_less__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _tabs_index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../tabs/index.less */ \"./node_modules/vant/es/tabs/index.less\");\n/* harmony import */ var _tabs_index_less__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_tabs_index_less__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/cascader/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/cascader/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/cell/index.js":
/*!********************************************!*\
  !*** ./node_modules/vant/es/cell/index.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_functional__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/functional */ \"./node_modules/vant/es/utils/functional.js\");\n/* harmony import */ var _utils_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/router */ \"./node_modules/vant/es/utils/router.js\");\n/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./shared */ \"./node_modules/vant/es/cell/shared.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n\n\n// Utils\n\n\n\n // Components\n\n // Types\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"createNamespace\"])('cell'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\nfunction Cell(h, props, slots, ctx) {\n  var _props$clickable;\n\n  var icon = props.icon,\n      size = props.size,\n      title = props.title,\n      label = props.label,\n      value = props.value,\n      isLink = props.isLink;\n  var showTitle = slots.title || Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"isDef\"])(title);\n\n  function Label() {\n    var showLabel = slots.label || Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"isDef\"])(label);\n\n    if (showLabel) {\n      return h(\"div\", {\n        \"class\": [bem('label'), props.labelClass]\n      }, [slots.label ? slots.label() : label]);\n    }\n  }\n\n  function Title() {\n    if (showTitle) {\n      return h(\"div\", {\n        \"class\": [bem('title'), props.titleClass],\n        \"style\": props.titleStyle\n      }, [slots.title ? slots.title() : h(\"span\", [title]), Label()]);\n    }\n  }\n\n  function Value() {\n    var showValue = slots.default || Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"isDef\"])(value);\n\n    if (showValue) {\n      return h(\"div\", {\n        \"class\": [bem('value', {\n          alone: !showTitle\n        }), props.valueClass]\n      }, [slots.default ? slots.default() : h(\"span\", [value])]);\n    }\n  }\n\n  function LeftIcon() {\n    if (slots.icon) {\n      return slots.icon();\n    }\n\n    if (icon) {\n      return h(_icon__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n        \"class\": bem('left-icon'),\n        \"attrs\": {\n          \"name\": icon,\n          \"classPrefix\": props.iconPrefix\n        }\n      });\n    }\n  }\n\n  function RightIcon() {\n    var rightIconSlot = slots['right-icon'];\n\n    if (rightIconSlot) {\n      return rightIconSlot();\n    }\n\n    if (isLink) {\n      var arrowDirection = props.arrowDirection;\n      return h(_icon__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n        \"class\": bem('right-icon'),\n        \"attrs\": {\n          \"name\": arrowDirection ? \"arrow-\" + arrowDirection : 'arrow'\n        }\n      });\n    }\n  }\n\n  function onClick(event) {\n    Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"emit\"])(ctx, 'click', event);\n    Object(_utils_router__WEBPACK_IMPORTED_MODULE_4__[\"functionalRoute\"])(ctx);\n  }\n\n  var clickable = (_props$clickable = props.clickable) != null ? _props$clickable : isLink;\n  var classes = {\n    clickable: clickable,\n    center: props.center,\n    required: props.required,\n    borderless: !props.border\n  };\n\n  if (size) {\n    classes[size] = size;\n  }\n\n  return h(\"div\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n    \"class\": bem(classes),\n    \"attrs\": {\n      \"role\": clickable ? 'button' : null,\n      \"tabindex\": clickable ? 0 : null\n    },\n    \"on\": {\n      \"click\": onClick\n    }\n  }, Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"inherit\"])(ctx)]), [LeftIcon(), Title(), Value(), RightIcon(), slots.extra == null ? void 0 : slots.extra()]);\n}\n\nCell.props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _shared__WEBPACK_IMPORTED_MODULE_5__[\"cellProps\"], _utils_router__WEBPACK_IMPORTED_MODULE_4__[\"routeProps\"]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent(Cell));\n\n//# sourceURL=webpack:///./node_modules/vant/es/cell/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/cell/index.less":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/cell/index.less ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/cell/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"f90ad064\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/cell/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/cell/shared.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/cell/shared.js ***!
  \*********************************************/
/*! exports provided: cellProps */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cellProps\", function() { return cellProps; });\nvar cellProps = {\n  icon: String,\n  size: String,\n  center: Boolean,\n  isLink: Boolean,\n  required: Boolean,\n  iconPrefix: String,\n  titleStyle: null,\n  titleClass: null,\n  valueClass: null,\n  labelClass: null,\n  title: [Number, String],\n  value: [Number, String],\n  label: [Number, String],\n  arrowDirection: String,\n  border: {\n    type: Boolean,\n    default: true\n  },\n  clickable: {\n    type: Boolean,\n    default: null\n  }\n};\n\n//# sourceURL=webpack:///./node_modules/vant/es/cell/shared.js?");

/***/ }),

/***/ "./node_modules/vant/es/cell/style/less.js":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/cell/style/less.js ***!
  \*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/cell/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/cell/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/checkbox-group/index.js":
/*!******************************************************!*\
  !*** ./node_modules/vant/es/checkbox-group/index.js ***!
  \******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/field */ \"./node_modules/vant/es/mixins/field.js\");\n/* harmony import */ var _mixins_relation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mixins/relation */ \"./node_modules/vant/es/mixins/relation.js\");\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('checkbox-group'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_relation__WEBPACK_IMPORTED_MODULE_2__[\"ParentMixin\"])('vanCheckbox'), _mixins_field__WEBPACK_IMPORTED_MODULE_1__[\"FieldMixin\"]],\n  props: {\n    max: [Number, String],\n    disabled: Boolean,\n    direction: String,\n    iconSize: [Number, String],\n    checkedColor: String,\n    value: {\n      type: Array,\n      default: function _default() {\n        return [];\n      }\n    }\n  },\n  watch: {\n    value: function value(val) {\n      this.$emit('change', val);\n    }\n  },\n  methods: {\n    // @exposed-api\n    toggleAll: function toggleAll(options) {\n      if (options === void 0) {\n        options = {};\n      }\n\n      if (typeof options === 'boolean') {\n        options = {\n          checked: options\n        };\n      }\n\n      var _options = options,\n          checked = _options.checked,\n          skipDisabled = _options.skipDisabled;\n      var children = this.children.filter(function (item) {\n        if (item.disabled && skipDisabled) {\n          return item.checked;\n        }\n\n        return checked != null ? checked : !item.checked;\n      });\n      var names = children.map(function (item) {\n        return item.name;\n      });\n      this.$emit('input', names);\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": bem([this.direction])\n    }, [this.slots()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox-group/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/checkbox-group/index.less":
/*!********************************************************!*\
  !*** ./node_modules/vant/es/checkbox-group/index.less ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/checkbox-group/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"17c7ff4a\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox-group/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/checkbox-group/style/less.js":
/*!***********************************************************!*\
  !*** ./node_modules/vant/es/checkbox-group/style/less.js ***!
  \***********************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/checkbox-group/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox-group/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/checkbox/index.js":
/*!************************************************!*\
  !*** ./node_modules/vant/es/checkbox/index.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_checkbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/checkbox */ \"./node_modules/vant/es/mixins/checkbox.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('checkbox'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_checkbox__WEBPACK_IMPORTED_MODULE_1__[\"CheckboxMixin\"])({\n    bem: bem,\n    role: 'checkbox',\n    parent: 'vanCheckbox'\n  })],\n  computed: {\n    checked: {\n      get: function get() {\n        if (this.parent) {\n          return this.parent.value.indexOf(this.name) !== -1;\n        }\n\n        return this.value;\n      },\n      set: function set(val) {\n        if (this.parent) {\n          this.setParentValue(val);\n        } else {\n          this.$emit('input', val);\n        }\n      }\n    }\n  },\n  watch: {\n    value: function value(val) {\n      this.$emit('change', val);\n    }\n  },\n  methods: {\n    // @exposed-api\n    toggle: function toggle(checked) {\n      var _this = this;\n\n      if (checked === void 0) {\n        checked = !this.checked;\n      }\n\n      // When toggle method is called multiple times at the same time,\n      // only the last call is valid.\n      // This is a hack for usage inside Cell.\n      clearTimeout(this.toggleTask);\n      this.toggleTask = setTimeout(function () {\n        _this.checked = checked;\n      });\n    },\n    setParentValue: function setParentValue(val) {\n      var parent = this.parent;\n      var value = parent.value.slice();\n\n      if (val) {\n        if (parent.max && value.length >= parent.max) {\n          return;\n        }\n        /* istanbul ignore else */\n\n\n        if (value.indexOf(this.name) === -1) {\n          value.push(this.name);\n          parent.$emit('input', value);\n        }\n      } else {\n        var index = value.indexOf(this.name);\n        /* istanbul ignore else */\n\n        if (index !== -1) {\n          value.splice(index, 1);\n          parent.$emit('input', value);\n        }\n      }\n    }\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/checkbox/index.less":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/checkbox/index.less ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/checkbox/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"45d3a8cd\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/checkbox/style/less.js":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/checkbox/style/less.js ***!
  \*****************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/checkbox/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/checkbox/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/col/index.js":
/*!*******************************************!*\
  !*** ./node_modules/vant/es/col/index.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_relation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/relation */ \"./node_modules/vant/es/mixins/relation.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('col'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_relation__WEBPACK_IMPORTED_MODULE_1__[\"ChildrenMixin\"])('vanRow')],\n  props: {\n    span: [Number, String],\n    offset: [Number, String],\n    tag: {\n      type: String,\n      default: 'div'\n    }\n  },\n  computed: {\n    style: function style() {\n      var index = this.index;\n\n      var _ref = this.parent || {},\n          spaces = _ref.spaces;\n\n      if (spaces && spaces[index]) {\n        var _spaces$index = spaces[index],\n            left = _spaces$index.left,\n            right = _spaces$index.right;\n        return {\n          paddingLeft: left ? left + \"px\" : null,\n          paddingRight: right ? right + \"px\" : null\n        };\n      }\n    }\n  },\n  methods: {\n    onClick: function onClick(event) {\n      this.$emit('click', event);\n    }\n  },\n  render: function render() {\n    var _bem;\n\n    var h = arguments[0];\n    var span = this.span,\n        offset = this.offset;\n    return h(this.tag, {\n      \"style\": this.style,\n      \"class\": bem((_bem = {}, _bem[span] = span, _bem[\"offset-\" + offset] = offset, _bem)),\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [this.slots()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/col/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/col/index.less":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/col/index.less ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/col/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"42a0dfd8\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/col/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/col/style/less.js":
/*!************************************************!*\
  !*** ./node_modules/vant/es/col/style/less.js ***!
  \************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/col/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/col/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/datetime-picker/DatePicker.js":
/*!************************************************************!*\
  !*** ./node_modules/vant/es/datetime-picker/DatePicker.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_construct__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/construct */ \"./node_modules/@babel/runtime/helpers/esm/construct.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_validate_date__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/validate/date */ \"./node_modules/vant/es/utils/validate/date.js\");\n/* harmony import */ var _utils_format_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/format/string */ \"./node_modules/vant/es/utils/format/string.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ \"./node_modules/vant/es/datetime-picker/utils.js\");\n/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shared */ \"./node_modules/vant/es/datetime-picker/shared.js\");\n\n\n\n\n\n\n\nvar currentYear = new Date().getFullYear();\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"createNamespace\"])('date-picker'),\n    createComponent = _createNamespace[0];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [_shared__WEBPACK_IMPORTED_MODULE_6__[\"TimePickerMixin\"]],\n  props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _shared__WEBPACK_IMPORTED_MODULE_6__[\"sharedProps\"], {\n    type: {\n      type: String,\n      default: 'datetime'\n    },\n    minDate: {\n      type: Date,\n      default: function _default() {\n        return new Date(currentYear - 10, 0, 1);\n      },\n      validator: _utils_validate_date__WEBPACK_IMPORTED_MODULE_3__[\"isDate\"]\n    },\n    maxDate: {\n      type: Date,\n      default: function _default() {\n        return new Date(currentYear + 10, 11, 31);\n      },\n      validator: _utils_validate_date__WEBPACK_IMPORTED_MODULE_3__[\"isDate\"]\n    }\n  }),\n  watch: {\n    filter: 'updateInnerValue',\n    minDate: function minDate() {\n      var _this = this;\n\n      this.$nextTick(function () {\n        _this.updateInnerValue();\n      });\n    },\n    maxDate: function maxDate(value) {\n      if (this.innerValue.valueOf() >= value.valueOf()) {\n        this.innerValue = value;\n      } else {\n        this.updateInnerValue();\n      }\n    },\n    value: function value(val) {\n      val = this.formatValue(val);\n\n      if (val && val.valueOf() !== this.innerValue.valueOf()) {\n        this.innerValue = val;\n      }\n    }\n  },\n  computed: {\n    ranges: function ranges() {\n      var _this$getBoundary = this.getBoundary('max', this.innerValue ? this.innerValue : this.minDate),\n          maxYear = _this$getBoundary.maxYear,\n          maxDate = _this$getBoundary.maxDate,\n          maxMonth = _this$getBoundary.maxMonth,\n          maxHour = _this$getBoundary.maxHour,\n          maxMinute = _this$getBoundary.maxMinute;\n\n      var _this$getBoundary2 = this.getBoundary('min', this.innerValue ? this.innerValue : this.minDate),\n          minYear = _this$getBoundary2.minYear,\n          minDate = _this$getBoundary2.minDate,\n          minMonth = _this$getBoundary2.minMonth,\n          minHour = _this$getBoundary2.minHour,\n          minMinute = _this$getBoundary2.minMinute;\n\n      var result = [{\n        type: 'year',\n        range: [minYear, maxYear]\n      }, {\n        type: 'month',\n        range: [minMonth, maxMonth]\n      }, {\n        type: 'day',\n        range: [minDate, maxDate]\n      }, {\n        type: 'hour',\n        range: [minHour, maxHour]\n      }, {\n        type: 'minute',\n        range: [minMinute, maxMinute]\n      }];\n\n      switch (this.type) {\n        case 'date':\n          result = result.slice(0, 3);\n          break;\n\n        case 'year-month':\n          result = result.slice(0, 2);\n          break;\n\n        case 'month-day':\n          result = result.slice(1, 3);\n          break;\n\n        case 'datehour':\n          result = result.slice(0, 4);\n          break;\n      }\n\n      if (this.columnsOrder) {\n        var columnsOrder = this.columnsOrder.concat(result.map(function (column) {\n          return column.type;\n        }));\n        result.sort(function (a, b) {\n          return columnsOrder.indexOf(a.type) - columnsOrder.indexOf(b.type);\n        });\n      }\n\n      return result;\n    }\n  },\n  methods: {\n    formatValue: function formatValue(value) {\n      var _this2 = this;\n\n      if (!Object(_utils_validate_date__WEBPACK_IMPORTED_MODULE_3__[\"isDate\"])(value)) {\n        return null;\n      }\n\n      var minDate = new Date(this.minDate);\n      var maxDate = new Date(this.maxDate);\n      var dateMethods = {\n        year: 'getFullYear',\n        month: 'getMonth',\n        day: 'getDate',\n        hour: 'getHours',\n        minute: 'getMinutes'\n      };\n\n      if (this.originColumns) {\n        var dateColumns = this.originColumns.map(function (_ref, index) {\n          var type = _ref.type,\n              values = _ref.values;\n          var range = _this2.ranges[index].range;\n          var minDateVal = minDate[dateMethods[type]]();\n          var maxDateVal = maxDate[dateMethods[type]]();\n          var min = type === 'month' ? +values[0] - 1 : +values[0];\n          var max = type === 'month' ? +values[values.length - 1] - 1 : +values[values.length - 1];\n          return {\n            type: type,\n            values: [minDateVal < range[0] ? Math.max(minDateVal, min) : min || minDateVal, maxDateVal > range[1] ? Math.min(maxDateVal, max) : max || maxDateVal]\n          };\n        });\n\n        if (this.type === 'month-day') {\n          var year = (this.innerValue || this.minDate).getFullYear();\n          dateColumns.unshift({\n            type: 'year',\n            values: [year, year]\n          });\n        }\n\n        var dates = Object.keys(dateMethods).map(function (type) {\n          var _dateColumns$filter$;\n\n          return (_dateColumns$filter$ = dateColumns.filter(function (item) {\n            return item.type === type;\n          })[0]) == null ? void 0 : _dateColumns$filter$.values;\n        }).filter(function (item) {\n          return item;\n        });\n        minDate = Object(_babel_runtime_helpers_esm_construct__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Date, dates.map(function (val) {\n          return Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"getTrueValue\"])(val[0]);\n        }));\n        maxDate = Object(_babel_runtime_helpers_esm_construct__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Date, dates.map(function (val) {\n          return Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"getTrueValue\"])(val[1]);\n        }));\n      }\n\n      value = Math.max(value, minDate.getTime());\n      value = Math.min(value, maxDate.getTime());\n      return new Date(value);\n    },\n    getBoundary: function getBoundary(type, value) {\n      var _ref2;\n\n      var boundary = this[type + \"Date\"];\n      var year = boundary.getFullYear();\n      var month = 1;\n      var date = 1;\n      var hour = 0;\n      var minute = 0;\n\n      if (type === 'max') {\n        month = 12;\n        date = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"getMonthEndDay\"])(value.getFullYear(), value.getMonth() + 1);\n        hour = 23;\n        minute = 59;\n      }\n\n      if (value.getFullYear() === year) {\n        month = boundary.getMonth() + 1;\n\n        if (value.getMonth() + 1 === month) {\n          date = boundary.getDate();\n\n          if (value.getDate() === date) {\n            hour = boundary.getHours();\n\n            if (value.getHours() === hour) {\n              minute = boundary.getMinutes();\n            }\n          }\n        }\n      }\n\n      return _ref2 = {}, _ref2[type + \"Year\"] = year, _ref2[type + \"Month\"] = month, _ref2[type + \"Date\"] = date, _ref2[type + \"Hour\"] = hour, _ref2[type + \"Minute\"] = minute, _ref2;\n    },\n    updateInnerValue: function updateInnerValue() {\n      var _this3 = this;\n\n      var type = this.type;\n      var indexes = this.getPicker().getIndexes();\n\n      var getValue = function getValue(type) {\n        var index = 0;\n\n        _this3.originColumns.forEach(function (column, columnIndex) {\n          if (type === column.type) {\n            index = columnIndex;\n          }\n        });\n\n        var values = _this3.originColumns[index].values;\n        return Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"getTrueValue\"])(values[indexes[index]]);\n      };\n\n      var year;\n      var month;\n      var day;\n\n      if (type === 'month-day') {\n        year = (this.innerValue || this.minDate).getFullYear();\n        month = getValue('month');\n        day = getValue('day');\n      } else {\n        year = getValue('year');\n        month = getValue('month');\n        day = type === 'year-month' ? 1 : getValue('day');\n      }\n\n      var maxDay = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[\"getMonthEndDay\"])(year, month);\n      day = day > maxDay ? maxDay : day;\n      var hour = 0;\n      var minute = 0;\n\n      if (type === 'datehour') {\n        hour = getValue('hour');\n      }\n\n      if (type === 'datetime') {\n        hour = getValue('hour');\n        minute = getValue('minute');\n      }\n\n      var value = new Date(year, month - 1, day, hour, minute);\n      this.innerValue = this.formatValue(value);\n    },\n    onChange: function onChange(picker) {\n      var _this4 = this;\n\n      this.updateInnerValue();\n      this.$nextTick(function () {\n        _this4.$nextTick(function () {\n          // https://github.com/vant-ui/vant/issues/9775\n          _this4.updateInnerValue();\n\n          _this4.$emit('change', picker);\n        });\n      });\n    },\n    updateColumnValue: function updateColumnValue() {\n      var _this5 = this;\n\n      var value = this.innerValue ? this.innerValue : this.minDate;\n      var formatter = this.formatter;\n      var values = this.originColumns.map(function (column) {\n        switch (column.type) {\n          case 'year':\n            return formatter('year', \"\" + value.getFullYear());\n\n          case 'month':\n            return formatter('month', Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_4__[\"padZero\"])(value.getMonth() + 1));\n\n          case 'day':\n            return formatter('day', Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_4__[\"padZero\"])(value.getDate()));\n\n          case 'hour':\n            return formatter('hour', Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_4__[\"padZero\"])(value.getHours()));\n\n          case 'minute':\n            return formatter('minute', Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_4__[\"padZero\"])(value.getMinutes()));\n\n          default:\n            // no default\n            return null;\n        }\n      });\n      this.$nextTick(function () {\n        _this5.getPicker().setValues(values);\n      });\n    }\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/datetime-picker/DatePicker.js?");

/***/ }),

/***/ "./node_modules/vant/es/datetime-picker/TimePicker.js":
/*!************************************************************!*\
  !*** ./node_modules/vant/es/datetime-picker/TimePicker.js ***!
  \************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_format_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/format/string */ \"./node_modules/vant/es/utils/format/string.js\");\n/* harmony import */ var _utils_format_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/format/number */ \"./node_modules/vant/es/utils/format/number.js\");\n/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shared */ \"./node_modules/vant/es/datetime-picker/shared.js\");\n\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"createNamespace\"])('time-picker'),\n    createComponent = _createNamespace[0];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [_shared__WEBPACK_IMPORTED_MODULE_4__[\"TimePickerMixin\"]],\n  props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _shared__WEBPACK_IMPORTED_MODULE_4__[\"sharedProps\"], {\n    minHour: {\n      type: [Number, String],\n      default: 0\n    },\n    maxHour: {\n      type: [Number, String],\n      default: 23\n    },\n    minMinute: {\n      type: [Number, String],\n      default: 0\n    },\n    maxMinute: {\n      type: [Number, String],\n      default: 59\n    }\n  }),\n  computed: {\n    ranges: function ranges() {\n      return [{\n        type: 'hour',\n        range: [+this.minHour, +this.maxHour]\n      }, {\n        type: 'minute',\n        range: [+this.minMinute, +this.maxMinute]\n      }];\n    }\n  },\n  watch: {\n    filter: 'updateInnerValue',\n    minHour: function minHour() {\n      var _this = this;\n\n      this.$nextTick(function () {\n        _this.updateInnerValue();\n      });\n    },\n    maxHour: function maxHour(value) {\n      var _this$innerValue$spli = this.innerValue.split(':'),\n          hour = _this$innerValue$spli[0],\n          minute = _this$innerValue$spli[1];\n\n      if (hour >= value) {\n        this.innerValue = this.formatValue(value + \":\" + minute);\n        this.updateColumnValue();\n      } else {\n        this.updateInnerValue();\n      }\n    },\n    minMinute: 'updateInnerValue',\n    maxMinute: function maxMinute(value) {\n      var _this$innerValue$spli2 = this.innerValue.split(':'),\n          hour = _this$innerValue$spli2[0],\n          minute = _this$innerValue$spli2[1];\n\n      if (minute >= value) {\n        this.innerValue = this.formatValue(hour + \":\" + value);\n        this.updateColumnValue();\n      } else {\n        this.updateInnerValue();\n      }\n    },\n    value: function value(val) {\n      val = this.formatValue(val);\n\n      if (val !== this.innerValue) {\n        this.innerValue = val;\n        this.updateColumnValue();\n      }\n    }\n  },\n  methods: {\n    formatValue: function formatValue(value) {\n      if (!value) {\n        value = Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_2__[\"padZero\"])(this.minHour) + \":\" + Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_2__[\"padZero\"])(this.minMinute);\n      }\n\n      var _value$split = value.split(':'),\n          hour = _value$split[0],\n          minute = _value$split[1];\n\n      hour = Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_2__[\"padZero\"])(Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(hour, this.minHour, this.maxHour));\n      minute = Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_2__[\"padZero\"])(Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(minute, this.minMinute, this.maxMinute));\n      return hour + \":\" + minute;\n    },\n    updateInnerValue: function updateInnerValue() {\n      var _this$getPicker$getIn = this.getPicker().getIndexes(),\n          hourIndex = _this$getPicker$getIn[0],\n          minuteIndex = _this$getPicker$getIn[1];\n\n      var _this$originColumns = this.originColumns,\n          hourColumn = _this$originColumns[0],\n          minuteColumn = _this$originColumns[1];\n      var hour = hourColumn.values[hourIndex] || hourColumn.values[0];\n      var minute = minuteColumn.values[minuteIndex] || minuteColumn.values[0];\n      this.innerValue = this.formatValue(hour + \":\" + minute);\n      this.updateColumnValue();\n    },\n    onChange: function onChange(picker) {\n      var _this2 = this;\n\n      this.updateInnerValue();\n      this.$nextTick(function () {\n        _this2.$nextTick(function () {\n          // https://github.com/vant-ui/vant/issues/9775\n          _this2.updateInnerValue();\n\n          _this2.$emit('change', picker);\n        });\n      });\n    },\n    updateColumnValue: function updateColumnValue() {\n      var _this3 = this;\n\n      var formatter = this.formatter;\n      var pair = this.innerValue.split(':');\n      var values = [formatter('hour', pair[0]), formatter('minute', pair[1])];\n      this.$nextTick(function () {\n        _this3.getPicker().setValues(values);\n      });\n    }\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/datetime-picker/TimePicker.js?");

/***/ }),

/***/ "./node_modules/vant/es/datetime-picker/index.js":
/*!*******************************************************!*\
  !*** ./node_modules/vant/es/datetime-picker/index.js ***!
  \*******************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _TimePicker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TimePicker */ \"./node_modules/vant/es/datetime-picker/TimePicker.js\");\n/* harmony import */ var _DatePicker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DatePicker */ \"./node_modules/vant/es/datetime-picker/DatePicker.js\");\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"createNamespace\"])('datetime-picker'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _TimePicker__WEBPACK_IMPORTED_MODULE_2__[\"default\"].props, _DatePicker__WEBPACK_IMPORTED_MODULE_3__[\"default\"].props),\n  methods: {\n    // @exposed-api\n    getPicker: function getPicker() {\n      return this.$refs.root.getProxiedPicker();\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var Component = this.type === 'time' ? _TimePicker__WEBPACK_IMPORTED_MODULE_2__[\"default\"] : _DatePicker__WEBPACK_IMPORTED_MODULE_3__[\"default\"];\n    return h(Component, {\n      \"ref\": \"root\",\n      \"class\": bem(),\n      \"scopedSlots\": this.$scopedSlots,\n      \"props\": Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.$props),\n      \"on\": Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.$listeners)\n    });\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/datetime-picker/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/datetime-picker/shared.js":
/*!********************************************************!*\
  !*** ./node_modules/vant/es/datetime-picker/shared.js ***!
  \********************************************************/
/*! exports provided: sharedProps, TimePickerMixin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sharedProps\", function() { return sharedProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"TimePickerMixin\", function() { return TimePickerMixin; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/vant/es/datetime-picker/utils.js\");\n/* harmony import */ var _utils_format_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/format/string */ \"./node_modules/vant/es/utils/format/string.js\");\n/* harmony import */ var _picker_shared__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../picker/shared */ \"./node_modules/vant/es/picker/shared.js\");\n/* harmony import */ var _picker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../picker */ \"./node_modules/vant/es/picker/index.js\");\n\n\n\n\n\nvar sharedProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _picker_shared__WEBPACK_IMPORTED_MODULE_3__[\"pickerProps\"], {\n  value: null,\n  filter: Function,\n  columnsOrder: Array,\n  showToolbar: {\n    type: Boolean,\n    default: true\n  },\n  formatter: {\n    type: Function,\n    default: function _default(type, value) {\n      return value;\n    }\n  }\n});\nvar TimePickerMixin = {\n  data: function data() {\n    return {\n      innerValue: this.formatValue(this.value)\n    };\n  },\n  computed: {\n    originColumns: function originColumns() {\n      var _this = this;\n\n      return this.ranges.map(function (_ref) {\n        var type = _ref.type,\n            rangeArr = _ref.range;\n        var values = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"times\"])(rangeArr[1] - rangeArr[0] + 1, function (index) {\n          var value = Object(_utils_format_string__WEBPACK_IMPORTED_MODULE_2__[\"padZero\"])(rangeArr[0] + index);\n          return value;\n        });\n\n        if (_this.filter) {\n          values = _this.filter(type, values);\n        }\n\n        return {\n          type: type,\n          values: values\n        };\n      });\n    },\n    columns: function columns() {\n      var _this2 = this;\n\n      return this.originColumns.map(function (column) {\n        return {\n          values: column.values.map(function (value) {\n            return _this2.formatter(column.type, value);\n          })\n        };\n      });\n    }\n  },\n  watch: {\n    columns: 'updateColumnValue',\n    innerValue: function innerValue(val, oldVal) {\n      if (!oldVal) {\n        this.$emit('input', null);\n      } else {\n        this.$emit('input', val);\n      }\n    }\n  },\n  mounted: function mounted() {\n    var _this3 = this;\n\n    this.updateColumnValue();\n    this.$nextTick(function () {\n      _this3.updateInnerValue();\n    });\n  },\n  methods: {\n    getPicker: function getPicker() {\n      return this.$refs.picker;\n    },\n    // https://github.com/vant-ui/vant/issues/10013\n    getProxiedPicker: function getProxiedPicker() {\n      var _this4 = this;\n\n      var picker = this.$refs.picker;\n\n      if (picker) {\n        var proxy = function proxy(fn) {\n          return function () {\n            picker[fn].apply(picker, arguments);\n\n            _this4.updateInnerValue();\n          };\n        };\n\n        return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, picker, {\n          setValues: proxy('setValues'),\n          setIndexes: proxy('setIndexes'),\n          setColumnIndex: proxy('setColumnIndex'),\n          setColumnValue: proxy('setColumnValue')\n        });\n      }\n    },\n    onConfirm: function onConfirm() {\n      this.$emit('input', this.innerValue);\n      this.$emit('confirm', this.innerValue);\n    },\n    onCancel: function onCancel() {\n      this.$emit('cancel');\n    }\n  },\n  render: function render() {\n    var _this5 = this;\n\n    var h = arguments[0];\n    var props = {};\n    Object.keys(_picker_shared__WEBPACK_IMPORTED_MODULE_3__[\"pickerProps\"]).forEach(function (key) {\n      props[key] = _this5[key];\n    });\n    return h(_picker__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n      \"ref\": \"picker\",\n      \"attrs\": {\n        \"columns\": this.columns,\n        \"readonly\": this.readonly\n      },\n      \"scopedSlots\": this.$scopedSlots,\n      \"on\": {\n        \"change\": this.onChange,\n        \"confirm\": this.onConfirm,\n        \"cancel\": this.onCancel\n      },\n      \"props\": Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props)\n    });\n  }\n};\n\n//# sourceURL=webpack:///./node_modules/vant/es/datetime-picker/shared.js?");

/***/ }),

/***/ "./node_modules/vant/es/datetime-picker/style/less.js":
/*!************************************************************!*\
  !*** ./node_modules/vant/es/datetime-picker/style/less.js ***!
  \************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../loading/index.less */ \"./node_modules/vant/es/loading/index.less\");\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_loading_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _picker_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../picker/index.less */ \"./node_modules/vant/es/picker/index.less\");\n/* harmony import */ var _picker_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_picker_index_less__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/datetime-picker/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/datetime-picker/utils.js":
/*!*******************************************************!*\
  !*** ./node_modules/vant/es/datetime-picker/utils.js ***!
  \*******************************************************/
/*! exports provided: times, getTrueValue, getMonthEndDay */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"times\", function() { return times; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTrueValue\", function() { return getTrueValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getMonthEndDay\", function() { return getMonthEndDay; });\n/* harmony import */ var _utils_validate_number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/validate/number */ \"./node_modules/vant/es/utils/validate/number.js\");\n\nfunction times(n, iteratee) {\n  if (n < 0) {\n    return [];\n  }\n\n  var index = -1;\n  var result = Array(n);\n\n  while (++index < n) {\n    result[index] = iteratee(index);\n  }\n\n  return result;\n}\nfunction getTrueValue(value) {\n  if (!value) {\n    return 0;\n  }\n\n  while (Object(_utils_validate_number__WEBPACK_IMPORTED_MODULE_0__[\"isNaN\"])(parseInt(value, 10))) {\n    if (value.length > 1) {\n      value = value.slice(1);\n    } else {\n      return 0;\n    }\n  }\n\n  return parseInt(value, 10);\n}\nfunction getMonthEndDay(year, month) {\n  return 32 - new Date(year, month - 1, 32).getDate();\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/datetime-picker/utils.js?");

/***/ }),

/***/ "./node_modules/vant/es/empty/Network.js":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/empty/Network.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar prefix = 'van-empty-network-';\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n  render: function render() {\n    var h = arguments[0];\n\n    var genStop = function genStop(color, offset, opacity) {\n      return h(\"stop\", {\n        \"attrs\": {\n          \"stop-color\": color,\n          \"offset\": offset + \"%\",\n          \"stop-opacity\": opacity\n        }\n      });\n    };\n\n    return h(\"svg\", {\n      \"attrs\": {\n        \"viewBox\": \"0 0 160 160\",\n        \"xmlns\": \"http://www.w3.org/2000/svg\"\n      }\n    }, [h(\"defs\", [h(\"linearGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"1\",\n        \"x1\": \"64.022%\",\n        \"y1\": \"100%\",\n        \"x2\": \"64.022%\",\n        \"y2\": \"0%\"\n      }\n    }, [genStop('#FFF', 0, 0.5), genStop('#F2F3F5', 100)]), h(\"linearGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"2\",\n        \"x1\": \"50%\",\n        \"y1\": \"0%\",\n        \"x2\": \"50%\",\n        \"y2\": \"84.459%\"\n      }\n    }, [genStop('#EBEDF0', 0), genStop('#DCDEE0', 100, 0)]), h(\"linearGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"3\",\n        \"x1\": \"100%\",\n        \"y1\": \"0%\",\n        \"x2\": \"100%\",\n        \"y2\": \"100%\"\n      }\n    }, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h(\"linearGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"4\",\n        \"x1\": \"100%\",\n        \"y1\": \"100%\",\n        \"x2\": \"100%\",\n        \"y2\": \"0%\"\n      }\n    }, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h(\"linearGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"5\",\n        \"x1\": \"0%\",\n        \"y1\": \"43.982%\",\n        \"x2\": \"100%\",\n        \"y2\": \"54.703%\"\n      }\n    }, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h(\"linearGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"6\",\n        \"x1\": \"94.535%\",\n        \"y1\": \"43.837%\",\n        \"x2\": \"5.465%\",\n        \"y2\": \"54.948%\"\n      }\n    }, [genStop('#EAEDF0', 0), genStop('#DCDEE0', 100)]), h(\"radialGradient\", {\n      \"attrs\": {\n        \"id\": prefix + \"7\",\n        \"cx\": \"50%\",\n        \"cy\": \"0%\",\n        \"fx\": \"50%\",\n        \"fy\": \"0%\",\n        \"r\": \"100%\",\n        \"gradientTransform\": \"matrix(0 1 -.54835 0 .5 -.5)\"\n      }\n    }, [genStop('#EBEDF0', 0), genStop('#FFF', 100, 0)])]), h(\"g\", {\n      \"attrs\": {\n        \"fill\": \"none\",\n        \"fill-rule\": \"evenodd\"\n      }\n    }, [h(\"g\", {\n      \"attrs\": {\n        \"opacity\": \".8\"\n      }\n    }, [h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M0 124V46h20v20h14v58H0z\",\n        \"fill\": \"url(#\" + prefix + \"1)\",\n        \"transform\": \"matrix(-1 0 0 1 36 7)\"\n      }\n    }), h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M121 8h22.231v14H152v77.37h-31V8z\",\n        \"fill\": \"url(#\" + prefix + \"1)\",\n        \"transform\": \"translate(2 7)\"\n      }\n    })]), h(\"path\", {\n      \"attrs\": {\n        \"fill\": \"url(#\" + prefix + \"7)\",\n        \"d\": \"M0 139h160v21H0z\"\n      }\n    }), h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M37 18a7 7 0 013 13.326v26.742c0 1.23-.997 2.227-2.227 2.227h-1.546A2.227 2.227 0 0134 58.068V31.326A7 7 0 0137 18z\",\n        \"fill\": \"url(#\" + prefix + \"2)\",\n        \"fill-rule\": \"nonzero\",\n        \"transform\": \"translate(43 36)\"\n      }\n    }), h(\"g\", {\n      \"attrs\": {\n        \"opacity\": \".6\",\n        \"stroke-linecap\": \"round\",\n        \"stroke-width\": \"7\"\n      }\n    }, [h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M20.875 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12\",\n        \"stroke\": \"url(#\" + prefix + \"3)\",\n        \"transform\": \"translate(43 36)\"\n      }\n    }), h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M9.849 0C3.756 6.225 0 14.747 0 24.146c0 9.398 3.756 17.92 9.849 24.145\",\n        \"stroke\": \"url(#\" + prefix + \"3)\",\n        \"transform\": \"translate(43 36)\"\n      }\n    }), h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M57.625 11.136a18.868 18.868 0 00-5.284 13.121c0 5.094 2.012 9.718 5.284 13.12\",\n        \"stroke\": \"url(#\" + prefix + \"4)\",\n        \"transform\": \"rotate(-180 76.483 42.257)\"\n      }\n    }), h(\"path\", {\n      \"attrs\": {\n        \"d\": \"M73.216 0c-6.093 6.225-9.849 14.747-9.849 24.146 0 9.398 3.756 17.92 9.849 24.145\",\n        \"stroke\": \"url(#\" + prefix + \"4)\",\n        \"transform\": \"rotate(-180 89.791 42.146)\"\n      }\n    })]), h(\"g\", {\n      \"attrs\": {\n        \"transform\": \"translate(31 105)\",\n        \"fill-rule\": \"nonzero\"\n      }\n    }, [h(\"rect\", {\n      \"attrs\": {\n        \"fill\": \"url(#\" + prefix + \"5)\",\n        \"width\": \"98\",\n        \"height\": \"34\",\n        \"rx\": \"2\"\n      }\n    }), h(\"rect\", {\n      \"attrs\": {\n        \"fill\": \"#FFF\",\n        \"x\": \"9\",\n        \"y\": \"8\",\n        \"width\": \"80\",\n        \"height\": \"18\",\n        \"rx\": \"1.114\"\n      }\n    }), h(\"rect\", {\n      \"attrs\": {\n        \"fill\": \"url(#\" + prefix + \"6)\",\n        \"x\": \"15\",\n        \"y\": \"12\",\n        \"width\": \"18\",\n        \"height\": \"6\",\n        \"rx\": \"1.114\"\n      }\n    })])])]);\n  }\n});\n\n//# sourceURL=webpack:///./node_modules/vant/es/empty/Network.js?");

/***/ }),

/***/ "./node_modules/vant/es/empty/index.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/empty/index.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _Network__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Network */ \"./node_modules/vant/es/empty/Network.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('empty'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\nvar PRESETS = ['error', 'search', 'default'];\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: {\n    imageSize: [Number, String],\n    description: String,\n    image: {\n      type: String,\n      default: 'default'\n    }\n  },\n  methods: {\n    genImageContent: function genImageContent() {\n      var h = this.$createElement;\n      var slots = this.slots('image');\n\n      if (slots) {\n        return slots;\n      }\n\n      if (this.image === 'network') {\n        return h(_Network__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n      }\n\n      var image = this.image;\n\n      if (PRESETS.indexOf(image) !== -1) {\n        image = \"https://img01.yzcdn.cn/vant/empty-image-\" + image + \".png\";\n      }\n\n      return h(\"img\", {\n        \"attrs\": {\n          \"src\": image\n        }\n      });\n    },\n    genImage: function genImage() {\n      var h = this.$createElement;\n      var imageStyle = {\n        width: Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"addUnit\"])(this.imageSize),\n        height: Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"addUnit\"])(this.imageSize)\n      };\n      return h(\"div\", {\n        \"class\": bem('image'),\n        \"style\": imageStyle\n      }, [this.genImageContent()]);\n    },\n    genDescription: function genDescription() {\n      var h = this.$createElement;\n      var description = this.slots('description') || this.description;\n\n      if (description) {\n        return h(\"p\", {\n          \"class\": bem('description')\n        }, [description]);\n      }\n    },\n    genBottom: function genBottom() {\n      var h = this.$createElement;\n      var slot = this.slots();\n\n      if (slot) {\n        return h(\"div\", {\n          \"class\": bem('bottom')\n        }, [slot]);\n      }\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": bem()\n    }, [this.genImage(), this.genDescription(), this.genBottom()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/empty/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/empty/index.less":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/empty/index.less ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/empty/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"22158ceb\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/empty/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/empty/style/less.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/empty/style/less.js ***!
  \**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/empty/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/empty/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/field/index.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/field/index.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils_dom_reset_scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/dom/reset-scroll */ \"./node_modules/vant/es/utils/dom/reset-scroll.js\");\n/* harmony import */ var _utils_format_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/format/number */ \"./node_modules/vant/es/utils/format/number.js\");\n/* harmony import */ var _utils_dom_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/dom/event */ \"./node_modules/vant/es/utils/dom/event.js\");\n/* harmony import */ var _utils_dom_scroll__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/dom/scroll */ \"./node_modules/vant/es/utils/dom/scroll.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n/* harmony import */ var _cell__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../cell */ \"./node_modules/vant/es/cell/index.js\");\n/* harmony import */ var _cell_shared__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../cell/shared */ \"./node_modules/vant/es/cell/shared.js\");\n\n\n\n// Utils\n\n\n\n\n // Components\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"createNamespace\"])('field'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  inheritAttrs: false,\n  provide: function provide() {\n    return {\n      vanField: this\n    };\n  },\n  inject: {\n    vanForm: {\n      default: null\n    }\n  },\n  props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, _cell_shared__WEBPACK_IMPORTED_MODULE_9__[\"cellProps\"], {\n    name: String,\n    rules: Array,\n    disabled: {\n      type: Boolean,\n      default: null\n    },\n    readonly: {\n      type: Boolean,\n      default: null\n    },\n    autosize: [Boolean, Object],\n    leftIcon: String,\n    rightIcon: String,\n    clearable: Boolean,\n    formatter: Function,\n    maxlength: [Number, String],\n    labelWidth: [Number, String],\n    labelClass: null,\n    labelAlign: String,\n    inputAlign: String,\n    placeholder: String,\n    errorMessage: String,\n    errorMessageAlign: String,\n    showWordLimit: Boolean,\n    value: {\n      type: [Number, String],\n      default: ''\n    },\n    type: {\n      type: String,\n      default: 'text'\n    },\n    error: {\n      type: Boolean,\n      default: null\n    },\n    colon: {\n      type: Boolean,\n      default: null\n    },\n    clearTrigger: {\n      type: String,\n      default: 'focus'\n    },\n    formatTrigger: {\n      type: String,\n      default: 'onChange'\n    }\n  }),\n  data: function data() {\n    return {\n      focused: false,\n      validateFailed: false,\n      validateMessage: ''\n    };\n  },\n  watch: {\n    value: function value() {\n      this.updateValue(this.value);\n      this.resetValidation();\n      this.validateWithTrigger('onChange');\n      this.$nextTick(this.adjustSize);\n    }\n  },\n  mounted: function mounted() {\n    this.updateValue(this.value, this.formatTrigger);\n    this.$nextTick(this.adjustSize);\n\n    if (this.vanForm) {\n      this.vanForm.addField(this);\n    }\n  },\n  beforeDestroy: function beforeDestroy() {\n    if (this.vanForm) {\n      this.vanForm.removeField(this);\n    }\n  },\n  computed: {\n    showClear: function showClear() {\n      var readonly = this.getProp('readonly');\n\n      if (this.clearable && !readonly) {\n        var hasValue = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isDef\"])(this.value) && this.value !== '';\n        var trigger = this.clearTrigger === 'always' || this.clearTrigger === 'focus' && this.focused;\n        return hasValue && trigger;\n      }\n    },\n    showError: function showError() {\n      if (this.error !== null) {\n        return this.error;\n      }\n\n      if (this.vanForm && this.vanForm.showError && this.validateFailed) {\n        return true;\n      }\n    },\n    listeners: function listeners() {\n      return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, this.$listeners, {\n        blur: this.onBlur,\n        focus: this.onFocus,\n        input: this.onInput,\n        click: this.onClickInput,\n        keypress: this.onKeypress\n      });\n    },\n    labelStyle: function labelStyle() {\n      var labelWidth = this.getProp('labelWidth');\n\n      if (labelWidth) {\n        return {\n          width: Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"addUnit\"])(labelWidth)\n        };\n      }\n    },\n    formValue: function formValue() {\n      if (this.children && (this.$scopedSlots.input || this.$slots.input)) {\n        return this.children.value;\n      }\n\n      return this.value;\n    }\n  },\n  methods: {\n    // @exposed-api\n    focus: function focus() {\n      if (this.$refs.input) {\n        this.$refs.input.focus();\n      }\n    },\n    // @exposed-api\n    blur: function blur() {\n      if (this.$refs.input) {\n        this.$refs.input.blur();\n      }\n    },\n    runValidator: function runValidator(value, rule) {\n      return new Promise(function (resolve) {\n        var returnVal = rule.validator(value, rule);\n\n        if (Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isPromise\"])(returnVal)) {\n          return returnVal.then(resolve);\n        }\n\n        resolve(returnVal);\n      });\n    },\n    isEmptyValue: function isEmptyValue(value) {\n      if (Array.isArray(value)) {\n        return !value.length;\n      }\n\n      if (value === 0) {\n        return false;\n      }\n\n      return !value;\n    },\n    runSyncRule: function runSyncRule(value, rule) {\n      if (rule.required && this.isEmptyValue(value)) {\n        return false;\n      }\n\n      if (rule.pattern && !rule.pattern.test(value)) {\n        return false;\n      }\n\n      return true;\n    },\n    getRuleMessage: function getRuleMessage(value, rule) {\n      var message = rule.message;\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isFunction\"])(message)) {\n        return message(value, rule);\n      }\n\n      return message;\n    },\n    runRules: function runRules(rules) {\n      var _this = this;\n\n      return rules.reduce(function (promise, rule) {\n        return promise.then(function () {\n          if (_this.validateFailed) {\n            return;\n          }\n\n          var value = _this.formValue;\n\n          if (rule.formatter) {\n            value = rule.formatter(value, rule);\n          }\n\n          if (!_this.runSyncRule(value, rule)) {\n            _this.validateFailed = true;\n            _this.validateMessage = _this.getRuleMessage(value, rule);\n            return;\n          }\n\n          if (rule.validator) {\n            return _this.runValidator(value, rule).then(function (result) {\n              if (result === false) {\n                _this.validateFailed = true;\n                _this.validateMessage = _this.getRuleMessage(value, rule);\n              }\n            });\n          }\n        });\n      }, Promise.resolve());\n    },\n    validate: function validate(rules) {\n      var _this2 = this;\n\n      if (rules === void 0) {\n        rules = this.rules;\n      }\n\n      return new Promise(function (resolve) {\n        if (!rules) {\n          resolve();\n        }\n\n        _this2.resetValidation();\n\n        _this2.runRules(rules).then(function () {\n          if (_this2.validateFailed) {\n            resolve({\n              name: _this2.name,\n              message: _this2.validateMessage\n            });\n          } else {\n            resolve();\n          }\n        });\n      });\n    },\n    validateWithTrigger: function validateWithTrigger(trigger) {\n      if (this.vanForm && this.rules) {\n        var defaultTrigger = this.vanForm.validateTrigger === trigger;\n        var rules = this.rules.filter(function (rule) {\n          if (rule.trigger) {\n            return rule.trigger === trigger;\n          }\n\n          return defaultTrigger;\n        });\n\n        if (rules.length) {\n          this.validate(rules);\n        }\n      }\n    },\n    resetValidation: function resetValidation() {\n      if (this.validateFailed) {\n        this.validateFailed = false;\n        this.validateMessage = '';\n      }\n    },\n    updateValue: function updateValue(value, trigger) {\n      if (trigger === void 0) {\n        trigger = 'onChange';\n      }\n\n      value = Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isDef\"])(value) ? String(value) : ''; // native maxlength have incorrect line-break counting\n      // see: https://github.com/vant-ui/vant/issues/5033\n\n      var maxlength = this.maxlength;\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isDef\"])(maxlength) && value.length > maxlength) {\n        if (this.value && this.value.length === +maxlength) {\n          value = this.value;\n        } else {\n          value = value.slice(0, maxlength);\n        }\n      }\n\n      if (this.type === 'number' || this.type === 'digit') {\n        var isNumber = this.type === 'number';\n        value = Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"formatNumber\"])(value, isNumber, isNumber);\n      }\n\n      if (this.formatter && trigger === this.formatTrigger) {\n        value = this.formatter(value);\n      }\n\n      var input = this.$refs.input;\n\n      if (input && value !== input.value) {\n        input.value = value;\n      }\n\n      if (value !== this.value) {\n        this.$emit('input', value);\n      }\n    },\n    onInput: function onInput(event) {\n      // not update v-model when composing\n      if (event.target.composing) {\n        return;\n      }\n\n      this.updateValue(event.target.value);\n    },\n    onFocus: function onFocus(event) {\n      this.focused = true;\n      this.$emit('focus', event); // https://github.com/vant-ui/vant/issues/9715\n\n      this.$nextTick(this.adjustSize); // readonly not work in legacy mobile safari\n\n      /* istanbul ignore if */\n\n      if (this.getProp('readonly')) {\n        this.blur();\n      }\n    },\n    onBlur: function onBlur(event) {\n      if (this.getProp('readonly')) {\n        return;\n      }\n\n      this.focused = false;\n      this.updateValue(this.value, 'onBlur');\n      this.$emit('blur', event);\n      this.validateWithTrigger('onBlur');\n      this.$nextTick(this.adjustSize);\n      Object(_utils_dom_reset_scroll__WEBPACK_IMPORTED_MODULE_2__[\"resetScroll\"])();\n    },\n    onClick: function onClick(event) {\n      this.$emit('click', event);\n    },\n    onClickInput: function onClickInput(event) {\n      this.$emit('click-input', event);\n    },\n    onClickLeftIcon: function onClickLeftIcon(event) {\n      this.$emit('click-left-icon', event);\n    },\n    onClickRightIcon: function onClickRightIcon(event) {\n      this.$emit('click-right-icon', event);\n    },\n    onClear: function onClear(event) {\n      Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"preventDefault\"])(event);\n      this.$emit('input', '');\n      this.$emit('clear', event);\n    },\n    onKeypress: function onKeypress(event) {\n      var ENTER_CODE = 13;\n\n      if (event.keyCode === ENTER_CODE) {\n        var submitOnEnter = this.getProp('submitOnEnter');\n\n        if (!submitOnEnter && this.type !== 'textarea') {\n          Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"preventDefault\"])(event);\n        } // trigger blur after click keyboard search button\n\n\n        if (this.type === 'search') {\n          this.blur();\n        }\n      }\n\n      this.$emit('keypress', event);\n    },\n    adjustSize: function adjustSize() {\n      var input = this.$refs.input;\n\n      if (!(this.type === 'textarea' && this.autosize) || !input) {\n        return;\n      }\n\n      var scrollTop = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_5__[\"getRootScrollTop\"])();\n      input.style.height = 'auto';\n      var height = input.scrollHeight;\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isObject\"])(this.autosize)) {\n        var _this$autosize = this.autosize,\n            maxHeight = _this$autosize.maxHeight,\n            minHeight = _this$autosize.minHeight;\n\n        if (maxHeight) {\n          height = Math.min(height, maxHeight);\n        }\n\n        if (minHeight) {\n          height = Math.max(height, minHeight);\n        }\n      }\n\n      if (height) {\n        input.style.height = height + 'px'; // https://github.com/vant-ui/vant/issues/9178\n\n        Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_5__[\"setRootScrollTop\"])(scrollTop);\n      }\n    },\n    genInput: function genInput() {\n      var h = this.$createElement;\n      var type = this.type;\n      var disabled = this.getProp('disabled');\n      var readonly = this.getProp('readonly');\n      var inputSlot = this.slots('input');\n      var inputAlign = this.getProp('inputAlign');\n\n      if (inputSlot) {\n        return h(\"div\", {\n          \"class\": bem('control', [inputAlign, 'custom']),\n          \"on\": {\n            \"click\": this.onClickInput\n          }\n        }, [inputSlot]);\n      }\n\n      var inputProps = {\n        ref: 'input',\n        class: bem('control', inputAlign),\n        domProps: {\n          value: this.value\n        },\n        attrs: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, this.$attrs, {\n          name: this.name,\n          disabled: disabled,\n          readonly: readonly,\n          placeholder: this.placeholder\n        }),\n        on: this.listeners,\n        // add model directive to skip IME composition\n        directives: [{\n          name: 'model',\n          value: this.value\n        }]\n      };\n\n      if (type === 'textarea') {\n        return h(\"textarea\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{}, inputProps]));\n      }\n\n      var inputType = type;\n      var inputMode; // type=\"number\" is weird in iOS, and can't prevent dot in Android\n      // so use inputmode to set keyboard in modern browsers\n\n      if (type === 'number') {\n        inputType = 'text';\n        inputMode = 'decimal';\n      }\n\n      if (type === 'digit') {\n        inputType = 'tel';\n        inputMode = 'numeric';\n      }\n\n      return h(\"input\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{\n        \"attrs\": {\n          \"type\": inputType,\n          \"inputmode\": inputMode\n        }\n      }, inputProps]));\n    },\n    genLeftIcon: function genLeftIcon() {\n      var h = this.$createElement;\n      var showLeftIcon = this.slots('left-icon') || this.leftIcon;\n\n      if (showLeftIcon) {\n        return h(\"div\", {\n          \"class\": bem('left-icon'),\n          \"on\": {\n            \"click\": this.onClickLeftIcon\n          }\n        }, [this.slots('left-icon') || h(_icon__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n          \"attrs\": {\n            \"name\": this.leftIcon,\n            \"classPrefix\": this.iconPrefix\n          }\n        })]);\n      }\n    },\n    genRightIcon: function genRightIcon() {\n      var h = this.$createElement;\n      var slots = this.slots;\n      var showRightIcon = slots('right-icon') || this.rightIcon;\n\n      if (showRightIcon) {\n        return h(\"div\", {\n          \"class\": bem('right-icon'),\n          \"on\": {\n            \"click\": this.onClickRightIcon\n          }\n        }, [slots('right-icon') || h(_icon__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n          \"attrs\": {\n            \"name\": this.rightIcon,\n            \"classPrefix\": this.iconPrefix\n          }\n        })]);\n      }\n    },\n    genWordLimit: function genWordLimit() {\n      var h = this.$createElement;\n\n      if (this.showWordLimit && this.maxlength) {\n        var count = (this.value || '').length;\n        return h(\"div\", {\n          \"class\": bem('word-limit')\n        }, [h(\"span\", {\n          \"class\": bem('word-num')\n        }, [count]), \"/\", this.maxlength]);\n      }\n    },\n    genMessage: function genMessage() {\n      var h = this.$createElement;\n\n      if (this.vanForm && this.vanForm.showErrorMessage === false) {\n        return;\n      }\n\n      var message = this.errorMessage || this.validateMessage;\n\n      if (message) {\n        var errorMessageAlign = this.getProp('errorMessageAlign');\n        return h(\"div\", {\n          \"class\": bem('error-message', errorMessageAlign)\n        }, [message]);\n      }\n    },\n    getProp: function getProp(key) {\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isDef\"])(this[key])) {\n        return this[key];\n      }\n\n      if (this.vanForm && Object(_utils__WEBPACK_IMPORTED_MODULE_6__[\"isDef\"])(this.vanForm[key])) {\n        return this.vanForm[key];\n      }\n    },\n    genLabel: function genLabel() {\n      var h = this.$createElement;\n      var colon = this.getProp('colon') ? ':' : '';\n\n      if (this.slots('label')) {\n        return [this.slots('label'), colon];\n      }\n\n      if (this.label) {\n        return h(\"span\", [this.label + colon]);\n      }\n    }\n  },\n  render: function render() {\n    var _bem;\n\n    var h = arguments[0];\n    var slots = this.slots;\n    var disabled = this.getProp('disabled');\n    var labelAlign = this.getProp('labelAlign');\n    var scopedSlots = {\n      icon: this.genLeftIcon\n    };\n    var Label = this.genLabel();\n\n    if (Label) {\n      scopedSlots.title = function () {\n        return Label;\n      };\n    }\n\n    var extra = this.slots('extra');\n\n    if (extra) {\n      scopedSlots.extra = function () {\n        return extra;\n      };\n    }\n\n    return h(_cell__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n      \"attrs\": {\n        \"icon\": this.leftIcon,\n        \"size\": this.size,\n        \"center\": this.center,\n        \"border\": this.border,\n        \"isLink\": this.isLink,\n        \"required\": this.required,\n        \"clickable\": this.clickable,\n        \"titleStyle\": this.labelStyle,\n        \"valueClass\": bem('value'),\n        \"titleClass\": [bem('label', labelAlign), this.labelClass],\n        \"arrowDirection\": this.arrowDirection\n      },\n      \"scopedSlots\": scopedSlots,\n      \"class\": bem((_bem = {\n        error: this.showError,\n        disabled: disabled\n      }, _bem[\"label-\" + labelAlign] = labelAlign, _bem['min-height'] = this.type === 'textarea' && !this.autosize, _bem)),\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [h(\"div\", {\n      \"class\": bem('body')\n    }, [this.genInput(), this.showClear && h(_icon__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n      \"attrs\": {\n        \"name\": \"clear\"\n      },\n      \"class\": bem('clear'),\n      \"on\": {\n        \"touchstart\": this.onClear\n      }\n    }), this.genRightIcon(), slots('button') && h(\"div\", {\n      \"class\": bem('button')\n    }, [slots('button')])]), this.genWordLimit(), this.genMessage()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/field/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/field/index.less":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/field/index.less ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/field/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"5bf159c4\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/field/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/field/style/less.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/field/style/less.js ***!
  \**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cell_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../cell/index.less */ \"./node_modules/vant/es/cell/index.less\");\n/* harmony import */ var _cell_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cell_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/field/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/field/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/icon/style/less.js":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/icon/style/less.js ***!
  \*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/icon/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/image/index.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/image/index.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"createNamespace\"])('image'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: {\n    src: String,\n    fit: String,\n    alt: String,\n    round: Boolean,\n    width: [Number, String],\n    height: [Number, String],\n    radius: [Number, String],\n    lazyLoad: Boolean,\n    iconPrefix: String,\n    showError: {\n      type: Boolean,\n      default: true\n    },\n    showLoading: {\n      type: Boolean,\n      default: true\n    },\n    errorIcon: {\n      type: String,\n      default: 'photo-fail'\n    },\n    loadingIcon: {\n      type: String,\n      default: 'photo'\n    }\n  },\n  data: function data() {\n    return {\n      loading: true,\n      error: false\n    };\n  },\n  watch: {\n    src: function src() {\n      this.loading = true;\n      this.error = false;\n    }\n  },\n  computed: {\n    style: function style() {\n      var style = {};\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"isDef\"])(this.width)) {\n        style.width = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addUnit\"])(this.width);\n      }\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"isDef\"])(this.height)) {\n        style.height = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addUnit\"])(this.height);\n      }\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"isDef\"])(this.radius)) {\n        style.overflow = 'hidden';\n        style.borderRadius = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"addUnit\"])(this.radius);\n      }\n\n      return style;\n    }\n  },\n  created: function created() {\n    var $Lazyload = this.$Lazyload;\n\n    if ($Lazyload && _utils__WEBPACK_IMPORTED_MODULE_1__[\"inBrowser\"]) {\n      $Lazyload.$on('loaded', this.onLazyLoaded);\n      $Lazyload.$on('error', this.onLazyLoadError);\n    }\n  },\n  beforeDestroy: function beforeDestroy() {\n    var $Lazyload = this.$Lazyload;\n\n    if ($Lazyload) {\n      $Lazyload.$off('loaded', this.onLazyLoaded);\n      $Lazyload.$off('error', this.onLazyLoadError);\n    }\n  },\n  methods: {\n    onLoad: function onLoad(event) {\n      this.loading = false;\n      this.$emit('load', event);\n    },\n    onLazyLoaded: function onLazyLoaded(_ref) {\n      var el = _ref.el;\n\n      if (el === this.$refs.image && this.loading) {\n        this.onLoad();\n      }\n    },\n    onLazyLoadError: function onLazyLoadError(_ref2) {\n      var el = _ref2.el;\n\n      if (el === this.$refs.image && !this.error) {\n        this.onError();\n      }\n    },\n    onError: function onError(event) {\n      this.error = true;\n      this.loading = false;\n      this.$emit('error', event);\n    },\n    onClick: function onClick(event) {\n      this.$emit('click', event);\n    },\n    genPlaceholder: function genPlaceholder() {\n      var h = this.$createElement;\n\n      if (this.loading && this.showLoading) {\n        return h(\"div\", {\n          \"class\": bem('loading')\n        }, [this.slots('loading') || h(_icon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n          \"attrs\": {\n            \"name\": this.loadingIcon,\n            \"classPrefix\": this.iconPrefix\n          },\n          \"class\": bem('loading-icon')\n        })]);\n      }\n\n      if (this.error && this.showError) {\n        return h(\"div\", {\n          \"class\": bem('error')\n        }, [this.slots('error') || h(_icon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n          \"attrs\": {\n            \"name\": this.errorIcon,\n            \"classPrefix\": this.iconPrefix\n          },\n          \"class\": bem('error-icon')\n        })]);\n      }\n    },\n    genImage: function genImage() {\n      var h = this.$createElement;\n      var imgData = {\n        class: bem('img'),\n        attrs: {\n          alt: this.alt\n        },\n        style: {\n          objectFit: this.fit\n        }\n      };\n\n      if (this.error) {\n        return;\n      }\n\n      if (this.lazyLoad) {\n        return h(\"img\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{\n          \"ref\": \"image\",\n          \"directives\": [{\n            name: \"lazy\",\n            value: this.src\n          }]\n        }, imgData]));\n      }\n\n      return h(\"img\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{\n        \"attrs\": {\n          \"src\": this.src\n        },\n        \"on\": {\n          \"load\": this.onLoad,\n          \"error\": this.onError\n        }\n      }, imgData]));\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": bem({\n        round: this.round\n      }),\n      \"style\": this.style,\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [this.genImage(), this.genPlaceholder(), this.slots()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/image/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/image/index.less":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/image/index.less ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/image/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"945417c6\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/image/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/image/style/less.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/image/style/less.js ***!
  \**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/image/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/image/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/list/index.js":
/*!********************************************!*\
  !*** ./node_modules/vant/es/list/index.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_dom_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/dom/style */ \"./node_modules/vant/es/utils/dom/style.js\");\n/* harmony import */ var _utils_dom_scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/dom/scroll */ \"./node_modules/vant/es/utils/dom/scroll.js\");\n/* harmony import */ var _mixins_bind_event__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../mixins/bind-event */ \"./node_modules/vant/es/mixins/bind-event.js\");\n/* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../loading */ \"./node_modules/vant/es/loading/index.js\");\n// Utils\n\n\n // Mixins\n\n // Components\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('list'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1],\n    t = _createNamespace[2];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_bind_event__WEBPACK_IMPORTED_MODULE_3__[\"BindEventMixin\"])(function (bind) {\n    if (!this.scroller) {\n      this.scroller = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_2__[\"getScroller\"])(this.$el);\n    }\n\n    bind(this.scroller, 'scroll', this.check);\n  })],\n  model: {\n    prop: 'loading'\n  },\n  props: {\n    error: Boolean,\n    loading: Boolean,\n    finished: Boolean,\n    errorText: String,\n    loadingText: String,\n    finishedText: String,\n    immediateCheck: {\n      type: Boolean,\n      default: true\n    },\n    offset: {\n      type: [Number, String],\n      default: 300\n    },\n    direction: {\n      type: String,\n      default: 'down'\n    }\n  },\n  data: function data() {\n    return {\n      // use sync innerLoading state to avoid repeated loading in some edge cases\n      innerLoading: this.loading\n    };\n  },\n  updated: function updated() {\n    this.innerLoading = this.loading;\n  },\n  mounted: function mounted() {\n    if (this.immediateCheck) {\n      this.check();\n    }\n  },\n  watch: {\n    loading: 'check',\n    finished: 'check'\n  },\n  methods: {\n    // @exposed-api\n    check: function check() {\n      var _this = this;\n\n      this.$nextTick(function () {\n        if (_this.innerLoading || _this.finished || _this.error) {\n          return;\n        }\n\n        var el = _this.$el,\n            scroller = _this.scroller,\n            offset = _this.offset,\n            direction = _this.direction;\n        var scrollerRect;\n\n        if (scroller.getBoundingClientRect) {\n          scrollerRect = scroller.getBoundingClientRect();\n        } else {\n          scrollerRect = {\n            top: 0,\n            bottom: scroller.innerHeight\n          };\n        }\n\n        var scrollerHeight = scrollerRect.bottom - scrollerRect.top;\n        /* istanbul ignore next */\n\n        if (!scrollerHeight || Object(_utils_dom_style__WEBPACK_IMPORTED_MODULE_1__[\"isHidden\"])(el)) {\n          return false;\n        }\n\n        var isReachEdge = false;\n\n        var placeholderRect = _this.$refs.placeholder.getBoundingClientRect();\n\n        if (direction === 'up') {\n          isReachEdge = scrollerRect.top - placeholderRect.top <= offset;\n        } else {\n          isReachEdge = placeholderRect.bottom - scrollerRect.bottom <= offset;\n        }\n\n        if (isReachEdge) {\n          _this.innerLoading = true;\n\n          _this.$emit('input', true);\n\n          _this.$emit('load');\n        }\n      });\n    },\n    clickErrorText: function clickErrorText() {\n      this.$emit('update:error', false);\n      this.check();\n    },\n    genLoading: function genLoading() {\n      var h = this.$createElement;\n\n      if (this.innerLoading && !this.finished) {\n        return h(\"div\", {\n          \"key\": \"loading\",\n          \"class\": bem('loading')\n        }, [this.slots('loading') || h(_loading__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n          \"attrs\": {\n            \"size\": \"16\"\n          }\n        }, [this.loadingText || t('loading')])]);\n      }\n    },\n    genFinishedText: function genFinishedText() {\n      var h = this.$createElement;\n\n      if (this.finished) {\n        var text = this.slots('finished') || this.finishedText;\n\n        if (text) {\n          return h(\"div\", {\n            \"class\": bem('finished-text')\n          }, [text]);\n        }\n      }\n    },\n    genErrorText: function genErrorText() {\n      var h = this.$createElement;\n\n      if (this.error) {\n        var text = this.slots('error') || this.errorText;\n\n        if (text) {\n          return h(\"div\", {\n            \"on\": {\n              \"click\": this.clickErrorText\n            },\n            \"class\": bem('error-text')\n          }, [text]);\n        }\n      }\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var Placeholder = h(\"div\", {\n      \"ref\": \"placeholder\",\n      \"key\": \"placeholder\",\n      \"class\": bem('placeholder')\n    });\n    return h(\"div\", {\n      \"class\": bem(),\n      \"attrs\": {\n        \"role\": \"feed\",\n        \"aria-busy\": this.innerLoading\n      }\n    }, [this.direction === 'down' ? this.slots() : Placeholder, this.genLoading(), this.genFinishedText(), this.genErrorText(), this.direction === 'up' ? this.slots() : Placeholder]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/list/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/list/index.less":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/list/index.less ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/list/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"126a59dc\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/list/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/list/style/less.js":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/list/style/less.js ***!
  \*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../loading/index.less */ \"./node_modules/vant/es/loading/index.less\");\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_loading_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/list/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/list/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/mixins/checkbox.js":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/mixins/checkbox.js ***!
  \*************************************************/
/*! exports provided: CheckboxMixin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"CheckboxMixin\", function() { return CheckboxMixin; });\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./field */ \"./node_modules/vant/es/mixins/field.js\");\n/* harmony import */ var _relation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./relation */ \"./node_modules/vant/es/mixins/relation.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/**\n * Common part of Checkbox & Radio\n */\n\n\n\n\nvar CheckboxMixin = function CheckboxMixin(_ref) {\n  var parent = _ref.parent,\n      bem = _ref.bem,\n      role = _ref.role;\n  return {\n    mixins: [Object(_relation__WEBPACK_IMPORTED_MODULE_2__[\"ChildrenMixin\"])(parent), _field__WEBPACK_IMPORTED_MODULE_1__[\"FieldMixin\"]],\n    props: {\n      name: null,\n      value: null,\n      disabled: Boolean,\n      iconSize: [Number, String],\n      checkedColor: String,\n      labelPosition: String,\n      labelDisabled: Boolean,\n      shape: {\n        type: String,\n        default: 'round'\n      },\n      bindGroup: {\n        type: Boolean,\n        default: true\n      }\n    },\n    computed: {\n      disableBindRelation: function disableBindRelation() {\n        return !this.bindGroup;\n      },\n      isDisabled: function isDisabled() {\n        return this.parent && this.parent.disabled || this.disabled;\n      },\n      direction: function direction() {\n        return this.parent && this.parent.direction || null;\n      },\n      iconStyle: function iconStyle() {\n        var checkedColor = this.checkedColor || this.parent && this.parent.checkedColor;\n\n        if (checkedColor && this.checked && !this.isDisabled) {\n          return {\n            borderColor: checkedColor,\n            backgroundColor: checkedColor\n          };\n        }\n      },\n      tabindex: function tabindex() {\n        if (this.isDisabled || role === 'radio' && !this.checked) {\n          return -1;\n        }\n\n        return 0;\n      }\n    },\n    methods: {\n      onClick: function onClick(event) {\n        var _this = this;\n\n        var target = event.target;\n        var icon = this.$refs.icon;\n        var iconClicked = icon === target || (icon == null ? void 0 : icon.contains(target));\n\n        if (!this.isDisabled && (iconClicked || !this.labelDisabled)) {\n          this.toggle(); // wait for toggle method to complete\n          // so we can get the changed value in the click event listener\n\n          setTimeout(function () {\n            _this.$emit('click', event);\n          });\n        } else {\n          this.$emit('click', event);\n        }\n      },\n      genIcon: function genIcon() {\n        var h = this.$createElement;\n        var checked = this.checked;\n        var iconSize = this.iconSize || this.parent && this.parent.iconSize;\n        return h(\"div\", {\n          \"ref\": \"icon\",\n          \"class\": bem('icon', [this.shape, {\n            disabled: this.isDisabled,\n            checked: checked\n          }]),\n          \"style\": {\n            fontSize: Object(_utils__WEBPACK_IMPORTED_MODULE_3__[\"addUnit\"])(iconSize)\n          }\n        }, [this.slots('icon', {\n          checked: checked\n        }) || h(_icon__WEBPACK_IMPORTED_MODULE_0__[\"default\"], {\n          \"attrs\": {\n            \"name\": \"success\"\n          },\n          \"style\": this.iconStyle\n        })]);\n      },\n      genLabel: function genLabel() {\n        var h = this.$createElement;\n        var slot = this.slots();\n\n        if (slot) {\n          return h(\"span\", {\n            \"class\": bem('label', [this.labelPosition, {\n              disabled: this.isDisabled\n            }])\n          }, [slot]);\n        }\n      }\n    },\n    render: function render() {\n      var h = arguments[0];\n      var Children = [this.genIcon()];\n\n      if (this.labelPosition === 'left') {\n        Children.unshift(this.genLabel());\n      } else {\n        Children.push(this.genLabel());\n      }\n\n      return h(\"div\", {\n        \"attrs\": {\n          \"role\": role,\n          \"tabindex\": this.tabindex,\n          \"aria-checked\": String(this.checked)\n        },\n        \"class\": bem([{\n          disabled: this.isDisabled,\n          'label-disabled': this.labelDisabled\n        }, this.direction]),\n        \"on\": {\n          \"click\": this.onClick\n        }\n      }, [Children]);\n    }\n  };\n};\n\n//# sourceURL=webpack:///./node_modules/vant/es/mixins/checkbox.js?");

/***/ }),

/***/ "./node_modules/vant/es/mixins/field.js":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/mixins/field.js ***!
  \**********************************************/
/*! exports provided: FieldMixin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"FieldMixin\", function() { return FieldMixin; });\nvar FieldMixin = {\n  inject: {\n    vanField: {\n      default: null\n    }\n  },\n  watch: {\n    value: function value() {\n      var field = this.vanField;\n\n      if (field) {\n        field.resetValidation();\n        field.validateWithTrigger('onChange');\n      }\n    }\n  },\n  created: function created() {\n    var field = this.vanField;\n\n    if (field && !field.children) {\n      field.children = this;\n    }\n  }\n};\n\n//# sourceURL=webpack:///./node_modules/vant/es/mixins/field.js?");

/***/ }),

/***/ "./node_modules/vant/es/nav-bar/index.js":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/nav-bar/index.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/constant */ \"./node_modules/vant/es/utils/constant.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n// Utils\n\n // Components\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('nav-bar'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: {\n    title: String,\n    fixed: Boolean,\n    zIndex: [Number, String],\n    leftText: String,\n    rightText: String,\n    leftArrow: Boolean,\n    placeholder: Boolean,\n    safeAreaInsetTop: Boolean,\n    border: {\n      type: Boolean,\n      default: true\n    }\n  },\n  data: function data() {\n    return {\n      height: null\n    };\n  },\n  mounted: function mounted() {\n    var _this = this;\n\n    if (this.placeholder && this.fixed) {\n      var setHeight = function setHeight() {\n        _this.height = _this.$refs.navBar.getBoundingClientRect().height;\n      };\n\n      setHeight(); // https://github.com/vant-ui/vant/issues/10131\n\n      setTimeout(setHeight, 100);\n    }\n  },\n  methods: {\n    genLeft: function genLeft() {\n      var h = this.$createElement;\n      var leftSlot = this.slots('left');\n\n      if (leftSlot) {\n        return leftSlot;\n      }\n\n      return [this.leftArrow && h(_icon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n        \"class\": bem('arrow'),\n        \"attrs\": {\n          \"name\": \"arrow-left\"\n        }\n      }), this.leftText && h(\"span\", {\n        \"class\": bem('text')\n      }, [this.leftText])];\n    },\n    genRight: function genRight() {\n      var h = this.$createElement;\n      var rightSlot = this.slots('right');\n\n      if (rightSlot) {\n        return rightSlot;\n      }\n\n      if (this.rightText) {\n        return h(\"span\", {\n          \"class\": bem('text')\n        }, [this.rightText]);\n      }\n    },\n    genNavBar: function genNavBar() {\n      var _ref;\n\n      var h = this.$createElement;\n      return h(\"div\", {\n        \"ref\": \"navBar\",\n        \"style\": {\n          zIndex: this.zIndex\n        },\n        \"class\": [bem({\n          fixed: this.fixed,\n          'safe-area-inset-top': this.safeAreaInsetTop\n        }), (_ref = {}, _ref[_utils_constant__WEBPACK_IMPORTED_MODULE_1__[\"BORDER_BOTTOM\"]] = this.border, _ref)]\n      }, [h(\"div\", {\n        \"class\": bem('content')\n      }, [this.hasLeft() && h(\"div\", {\n        \"class\": bem('left'),\n        \"on\": {\n          \"click\": this.onClickLeft\n        }\n      }, [this.genLeft()]), h(\"div\", {\n        \"class\": [bem('title'), 'van-ellipsis']\n      }, [this.slots('title') || this.title]), this.hasRight() && h(\"div\", {\n        \"class\": bem('right'),\n        \"on\": {\n          \"click\": this.onClickRight\n        }\n      }, [this.genRight()])])]);\n    },\n    hasLeft: function hasLeft() {\n      return this.leftArrow || this.leftText || this.slots('left');\n    },\n    hasRight: function hasRight() {\n      return this.rightText || this.slots('right');\n    },\n    onClickLeft: function onClickLeft(event) {\n      this.$emit('click-left', event);\n    },\n    onClickRight: function onClickRight(event) {\n      this.$emit('click-right', event);\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n\n    if (this.placeholder && this.fixed) {\n      return h(\"div\", {\n        \"class\": bem('placeholder'),\n        \"style\": {\n          height: this.height + \"px\"\n        }\n      }, [this.genNavBar()]);\n    }\n\n    return this.genNavBar();\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/nav-bar/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/nav-bar/index.less":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/nav-bar/index.less ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/nav-bar/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"ab2f4962\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/nav-bar/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/nav-bar/style/less.js":
/*!****************************************************!*\
  !*** ./node_modules/vant/es/nav-bar/style/less.js ***!
  \****************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/nav-bar/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/nav-bar/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/notify/Notify.js":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/notify/Notify.js ***!
  \***********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_functional__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/functional */ \"./node_modules/vant/es/utils/functional.js\");\n/* harmony import */ var _mixins_popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins/popup */ \"./node_modules/vant/es/mixins/popup/index.js\");\n/* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../popup */ \"./node_modules/vant/es/popup/index.js\");\n\n\n// Utils\n\n // Mixins\n\n // Components\n\n // Types\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"createNamespace\"])('notify'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\nfunction Notify(h, props, slots, ctx) {\n  var style = {\n    color: props.color,\n    background: props.background\n  };\n  return h(_popup__WEBPACK_IMPORTED_MODULE_5__[\"default\"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_1___default()([{\n    \"attrs\": {\n      \"value\": props.value,\n      \"position\": \"top\",\n      \"overlay\": false,\n      \"duration\": 0.2,\n      \"lockScroll\": false\n    },\n    \"style\": style,\n    \"class\": [bem([props.type]), props.className]\n  }, Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"inherit\"])(ctx, true)]), [(slots.default == null ? void 0 : slots.default()) || props.message]);\n}\n\nNotify.props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _mixins_popup__WEBPACK_IMPORTED_MODULE_4__[\"popupMixinProps\"], {\n  color: String,\n  message: [Number, String],\n  duration: [Number, String],\n  className: null,\n  background: String,\n  getContainer: [String, Function],\n  type: {\n    type: String,\n    default: 'danger'\n  }\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent(Notify));\n\n//# sourceURL=webpack:///./node_modules/vant/es/notify/Notify.js?");

/***/ }),

/***/ "./node_modules/vant/es/notify/index.js":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/notify/index.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var _Notify__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Notify */ \"./node_modules/vant/es/notify/Notify.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_functional__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/functional */ \"./node_modules/vant/es/utils/functional.js\");\n\n\n\n\n\nvar timer;\nvar instance;\n\nfunction parseOptions(message) {\n  return Object(_utils__WEBPACK_IMPORTED_MODULE_3__[\"isObject\"])(message) ? message : {\n    message: message\n  };\n}\n\nfunction Notify(options) {\n  /* istanbul ignore if */\n  if (_utils__WEBPACK_IMPORTED_MODULE_3__[\"isServer\"]) {\n    return;\n  }\n\n  if (!instance) {\n    instance = Object(_utils_functional__WEBPACK_IMPORTED_MODULE_4__[\"mount\"])(_Notify__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n      on: {\n        click: function click(event) {\n          if (instance.onClick) {\n            instance.onClick(event);\n          }\n        },\n        close: function close() {\n          if (instance.onClose) {\n            instance.onClose();\n          }\n        },\n        opened: function opened() {\n          if (instance.onOpened) {\n            instance.onOpened();\n          }\n        }\n      }\n    });\n  }\n\n  options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Notify.currentOptions, parseOptions(options));\n\n  Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(instance, options);\n\n  clearTimeout(timer);\n\n  if (options.duration && options.duration > 0) {\n    timer = setTimeout(Notify.clear, options.duration);\n  }\n\n  return instance;\n}\n\nfunction defaultOptions() {\n  return {\n    type: 'danger',\n    value: true,\n    message: '',\n    color: undefined,\n    background: undefined,\n    duration: 3000,\n    className: '',\n    onClose: null,\n    onClick: null,\n    onOpened: null\n  };\n}\n\nNotify.clear = function () {\n  if (instance) {\n    instance.value = false;\n  }\n};\n\nNotify.currentOptions = defaultOptions();\n\nNotify.setDefaultOptions = function (options) {\n  Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Notify.currentOptions, options);\n};\n\nNotify.resetDefaultOptions = function () {\n  Notify.currentOptions = defaultOptions();\n};\n\nNotify.install = function () {\n  vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(_Notify__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n};\n\nNotify.Component = _Notify__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype.$notify = Notify;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Notify);\n\n//# sourceURL=webpack:///./node_modules/vant/es/notify/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/notify/index.less":
/*!************************************************!*\
  !*** ./node_modules/vant/es/notify/index.less ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/notify/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"6193e087\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/notify/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/notify/style/less.js":
/*!***************************************************!*\
  !*** ./node_modules/vant/es/notify/style/less.js ***!
  \***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../overlay/index.less */ \"./node_modules/vant/es/overlay/index.less\");\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_overlay_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _popup_index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../popup/index.less */ \"./node_modules/vant/es/popup/index.less\");\n/* harmony import */ var _popup_index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_popup_index_less__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/notify/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/notify/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/picker/PickerColumn.js":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/picker/PickerColumn.js ***!
  \*****************************************************/
/*! exports provided: MOMENTUM_LIMIT_TIME, MOMENTUM_LIMIT_DISTANCE, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MOMENTUM_LIMIT_TIME\", function() { return MOMENTUM_LIMIT_TIME; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"MOMENTUM_LIMIT_DISTANCE\", function() { return MOMENTUM_LIMIT_DISTANCE; });\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_deep_clone__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/deep-clone */ \"./node_modules/vant/es/utils/deep-clone.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_format_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/format/number */ \"./node_modules/vant/es/utils/format/number.js\");\n/* harmony import */ var _utils_dom_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/dom/event */ \"./node_modules/vant/es/utils/dom/event.js\");\n/* harmony import */ var _mixins_touch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../mixins/touch */ \"./node_modules/vant/es/mixins/touch.js\");\n\n\n\n\n\n\n\nvar DEFAULT_DURATION = 200; // 惯性滑动思路:\n// 在手指离开屏幕时，如果和上一次 move 时的间隔小于 `MOMENTUM_LIMIT_TIME` 且 move\n// 距离大于 `MOMENTUM_LIMIT_DISTANCE` 时，执行惯性滑动\n\nvar MOMENTUM_LIMIT_TIME = 300;\nvar MOMENTUM_LIMIT_DISTANCE = 15;\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"createNamespace\"])('picker-column'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\nfunction getElementTranslateY(element) {\n  var style = window.getComputedStyle(element);\n  var transform = style.transform || style.webkitTransform;\n  var translateY = transform.slice(7, transform.length - 1).split(', ')[5];\n  return Number(translateY);\n}\n\nfunction isOptionDisabled(option) {\n  return Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"isObject\"])(option) && option.disabled;\n} // use standard WheelEvent:\n// https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent\n\n\nvar supportMousewheel = _utils__WEBPACK_IMPORTED_MODULE_2__[\"inBrowser\"] && 'onwheel' in window;\nvar mousewheelTimer = null;\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [_mixins_touch__WEBPACK_IMPORTED_MODULE_5__[\"TouchMixin\"]],\n  props: {\n    valueKey: String,\n    readonly: Boolean,\n    allowHtml: Boolean,\n    className: String,\n    itemHeight: Number,\n    defaultIndex: Number,\n    swipeDuration: [Number, String],\n    visibleItemCount: [Number, String],\n    initialOptions: {\n      type: Array,\n      default: function _default() {\n        return [];\n      }\n    }\n  },\n  data: function data() {\n    return {\n      offset: 0,\n      duration: 0,\n      options: Object(_utils_deep_clone__WEBPACK_IMPORTED_MODULE_1__[\"deepClone\"])(this.initialOptions),\n      currentIndex: this.defaultIndex\n    };\n  },\n  created: function created() {\n    if (this.$parent.children) {\n      this.$parent.children.push(this);\n    }\n\n    this.setIndex(this.currentIndex);\n  },\n  mounted: function mounted() {\n    this.bindTouchEvent(this.$el);\n\n    if (supportMousewheel) {\n      Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"on\"])(this.$el, 'wheel', this.onMouseWheel, false);\n    }\n  },\n  destroyed: function destroyed() {\n    var children = this.$parent.children;\n\n    if (children) {\n      children.splice(children.indexOf(this), 1);\n    }\n\n    if (supportMousewheel) {\n      Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"off\"])(this.$el, 'wheel');\n    }\n  },\n  watch: {\n    initialOptions: 'setOptions',\n    defaultIndex: function defaultIndex(val) {\n      this.setIndex(val);\n    }\n  },\n  computed: {\n    count: function count() {\n      return this.options.length;\n    },\n    baseOffset: function baseOffset() {\n      return this.itemHeight * (this.visibleItemCount - 1) / 2;\n    }\n  },\n  methods: {\n    setOptions: function setOptions(options) {\n      if (JSON.stringify(options) !== JSON.stringify(this.options)) {\n        this.options = Object(_utils_deep_clone__WEBPACK_IMPORTED_MODULE_1__[\"deepClone\"])(options);\n        this.setIndex(this.defaultIndex);\n      }\n    },\n    onTouchStart: function onTouchStart(event) {\n      if (this.readonly) {\n        return;\n      }\n\n      this.touchStart(event);\n\n      if (this.moving) {\n        var translateY = getElementTranslateY(this.$refs.wrapper);\n        this.offset = Math.min(0, translateY - this.baseOffset);\n        this.startOffset = this.offset;\n      } else {\n        this.startOffset = this.offset;\n      }\n\n      this.duration = 0;\n      this.transitionEndTrigger = null;\n      this.touchStartTime = Date.now();\n      this.momentumOffset = this.startOffset;\n    },\n    onTouchMove: function onTouchMove(event) {\n      if (this.readonly) {\n        return;\n      }\n\n      this.touchMove(event);\n\n      if (this.direction === 'vertical') {\n        this.moving = true;\n        Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"preventDefault\"])(event, true);\n      }\n\n      this.offset = Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(this.startOffset + this.deltaY, -(this.count * this.itemHeight), this.itemHeight);\n      var now = Date.now();\n\n      if (now - this.touchStartTime > MOMENTUM_LIMIT_TIME) {\n        this.touchStartTime = now;\n        this.momentumOffset = this.offset;\n      }\n    },\n    onTouchEnd: function onTouchEnd() {\n      var _this = this;\n\n      if (this.readonly) {\n        return;\n      }\n\n      var distance = this.offset - this.momentumOffset;\n      var duration = Date.now() - this.touchStartTime;\n      var allowMomentum = duration < MOMENTUM_LIMIT_TIME && Math.abs(distance) > MOMENTUM_LIMIT_DISTANCE;\n\n      if (allowMomentum) {\n        this.momentum(distance, duration);\n        return;\n      }\n\n      var index = this.getIndexByOffset(this.offset);\n      this.duration = DEFAULT_DURATION;\n      this.setIndex(index, true); // compatible with desktop scenario\n      // use setTimeout to skip the click event Emitted after touchstart\n\n      setTimeout(function () {\n        _this.moving = false;\n      }, 0);\n    },\n    onMouseWheel: function onMouseWheel(event) {\n      var _this2 = this;\n\n      if (this.readonly) {\n        return;\n      }\n\n      Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"preventDefault\"])(event, true); // simply combine touchstart and touchmove\n\n      var translateY = getElementTranslateY(this.$refs.wrapper);\n      this.startOffset = Math.min(0, translateY - this.baseOffset);\n      this.momentumOffset = this.startOffset;\n      this.transitionEndTrigger = null; // directly use deltaY, see https://caniuse.com/?search=deltaY\n      // use deltaY to detect direction for not special setting device\n      // https://developer.mozilla.org/en-US/docs/Web/API/Element/wheel_event\n\n      var deltaY = event.deltaY;\n\n      if (this.startOffset === 0 && deltaY < 0) {\n        return;\n      } // get offset\n      // if necessary, can adjust distance value to make scrolling smoother\n\n\n      var distance = -deltaY;\n      this.offset = Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(this.startOffset + distance, -(this.count * this.itemHeight), this.itemHeight);\n\n      if (mousewheelTimer) {\n        clearTimeout(mousewheelTimer);\n      }\n\n      mousewheelTimer = setTimeout(function () {\n        _this2.onTouchEnd();\n\n        _this2.touchStartTime = 0;\n      }, MOMENTUM_LIMIT_TIME);\n    },\n    onTransitionEnd: function onTransitionEnd() {\n      this.stopMomentum();\n    },\n    onClickItem: function onClickItem(index) {\n      if (this.moving || this.readonly) {\n        return;\n      }\n\n      this.transitionEndTrigger = null;\n      this.duration = DEFAULT_DURATION;\n      this.setIndex(index, true);\n    },\n    adjustIndex: function adjustIndex(index) {\n      index = Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(index, 0, this.count);\n\n      for (var i = index; i < this.count; i++) {\n        if (!isOptionDisabled(this.options[i])) return i;\n      }\n\n      for (var _i = index - 1; _i >= 0; _i--) {\n        if (!isOptionDisabled(this.options[_i])) return _i;\n      }\n    },\n    getOptionText: function getOptionText(option) {\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"isObject\"])(option) && this.valueKey in option) {\n        return option[this.valueKey];\n      }\n\n      return option;\n    },\n    setIndex: function setIndex(index, emitChange) {\n      var _this3 = this;\n\n      index = this.adjustIndex(index) || 0;\n      var offset = -index * this.itemHeight;\n\n      var trigger = function trigger() {\n        if (index !== _this3.currentIndex) {\n          _this3.currentIndex = index;\n\n          if (emitChange) {\n            _this3.$emit('change', index);\n          }\n        }\n      }; // trigger the change event after transitionend when moving\n\n\n      if (this.moving && offset !== this.offset) {\n        this.transitionEndTrigger = trigger;\n      } else {\n        trigger();\n      }\n\n      this.offset = offset;\n    },\n    setValue: function setValue(value) {\n      var options = this.options;\n\n      for (var i = 0; i < options.length; i++) {\n        if (this.getOptionText(options[i]) === value) {\n          return this.setIndex(i);\n        }\n      }\n    },\n    getValue: function getValue() {\n      return this.options[this.currentIndex];\n    },\n    getIndexByOffset: function getIndexByOffset(offset) {\n      return Object(_utils_format_number__WEBPACK_IMPORTED_MODULE_3__[\"range\"])(Math.round(-offset / this.itemHeight), 0, this.count - 1);\n    },\n    momentum: function momentum(distance, duration) {\n      var speed = Math.abs(distance / duration);\n      distance = this.offset + speed / 0.003 * (distance < 0 ? -1 : 1);\n      var index = this.getIndexByOffset(distance);\n      this.duration = +this.swipeDuration;\n      this.setIndex(index, true);\n    },\n    stopMomentum: function stopMomentum() {\n      this.moving = false;\n      this.duration = 0;\n\n      if (this.transitionEndTrigger) {\n        this.transitionEndTrigger();\n        this.transitionEndTrigger = null;\n      }\n    },\n    genOptions: function genOptions() {\n      var _this4 = this;\n\n      var h = this.$createElement;\n      var optionStyle = {\n        height: this.itemHeight + \"px\"\n      };\n      return this.options.map(function (option, index) {\n        var _domProps;\n\n        var text = _this4.getOptionText(option);\n\n        var disabled = isOptionDisabled(option);\n        var data = {\n          style: optionStyle,\n          attrs: {\n            role: 'button',\n            tabindex: disabled ? -1 : 0\n          },\n          class: [bem('item', {\n            disabled: disabled,\n            selected: index === _this4.currentIndex\n          })],\n          on: {\n            click: function click() {\n              _this4.onClickItem(index);\n            }\n          }\n        };\n        var childData = {\n          class: 'van-ellipsis',\n          domProps: (_domProps = {}, _domProps[_this4.allowHtml ? 'innerHTML' : 'textContent'] = text, _domProps)\n        };\n        return h(\"li\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{}, data]), [_this4.slots('option', option) || h(\"div\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{}, childData]))]);\n      });\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var wrapperStyle = {\n      transform: \"translate3d(0, \" + (this.offset + this.baseOffset) + \"px, 0)\",\n      transitionDuration: this.duration + \"ms\",\n      transitionProperty: this.duration ? 'all' : 'none'\n    };\n    return h(\"div\", {\n      \"class\": [bem(), this.className]\n    }, [h(\"ul\", {\n      \"ref\": \"wrapper\",\n      \"style\": wrapperStyle,\n      \"class\": bem('wrapper'),\n      \"on\": {\n        \"transitionend\": this.onTransitionEnd\n      }\n    }, [this.genOptions()])]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/picker/PickerColumn.js?");

/***/ }),

/***/ "./node_modules/vant/es/picker/index.js":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/picker/index.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_dom_event__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/dom/event */ \"./node_modules/vant/es/utils/dom/event.js\");\n/* harmony import */ var _utils_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/constant */ \"./node_modules/vant/es/utils/constant.js\");\n/* harmony import */ var _shared__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./shared */ \"./node_modules/vant/es/picker/shared.js\");\n/* harmony import */ var _utils_format_unit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/format/unit */ \"./node_modules/vant/es/utils/format/unit.js\");\n/* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../loading */ \"./node_modules/vant/es/loading/index.js\");\n/* harmony import */ var _PickerColumn__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PickerColumn */ \"./node_modules/vant/es/picker/PickerColumn.js\");\n\n// Utils\n\n\n\n\n // Components\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"createNamespace\"])('picker'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1],\n    t = _createNamespace[2];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _shared__WEBPACK_IMPORTED_MODULE_4__[\"pickerProps\"], {\n    defaultIndex: {\n      type: [Number, String],\n      default: 0\n    },\n    columns: {\n      type: Array,\n      default: function _default() {\n        return [];\n      }\n    },\n    toolbarPosition: {\n      type: String,\n      default: 'top'\n    },\n    valueKey: {\n      type: String,\n      default: 'text'\n    }\n  }),\n  data: function data() {\n    return {\n      children: [],\n      formattedColumns: []\n    };\n  },\n  computed: {\n    itemPxHeight: function itemPxHeight() {\n      return this.itemHeight ? Object(_utils_format_unit__WEBPACK_IMPORTED_MODULE_5__[\"unitToPx\"])(this.itemHeight) : _shared__WEBPACK_IMPORTED_MODULE_4__[\"DEFAULT_ITEM_HEIGHT\"];\n    },\n    dataType: function dataType() {\n      var columns = this.columns;\n      var firstColumn = columns[0] || {};\n\n      if (firstColumn.children) {\n        return 'cascade';\n      }\n\n      if (firstColumn.values) {\n        return 'object';\n      }\n\n      return 'text';\n    }\n  },\n  watch: {\n    columns: {\n      handler: 'format',\n      immediate: true\n    }\n  },\n  methods: {\n    format: function format() {\n      var columns = this.columns,\n          dataType = this.dataType;\n\n      if (dataType === 'text') {\n        this.formattedColumns = [{\n          values: columns\n        }];\n      } else if (dataType === 'cascade') {\n        this.formatCascade();\n      } else {\n        this.formattedColumns = columns;\n      }\n    },\n    formatCascade: function formatCascade() {\n      var formatted = [];\n      var cursor = {\n        children: this.columns\n      };\n\n      while (cursor && cursor.children) {\n        var _cursor$defaultIndex;\n\n        var _cursor = cursor,\n            children = _cursor.children;\n        var defaultIndex = (_cursor$defaultIndex = cursor.defaultIndex) != null ? _cursor$defaultIndex : +this.defaultIndex;\n\n        while (children[defaultIndex] && children[defaultIndex].disabled) {\n          if (defaultIndex < children.length - 1) {\n            defaultIndex++;\n          } else {\n            defaultIndex = 0;\n            break;\n          }\n        }\n\n        formatted.push({\n          values: cursor.children,\n          className: cursor.className,\n          defaultIndex: defaultIndex\n        });\n        cursor = children[defaultIndex];\n      }\n\n      this.formattedColumns = formatted;\n    },\n    emit: function emit(event) {\n      var _this = this;\n\n      if (this.dataType === 'text') {\n        this.$emit(event, this.getColumnValue(0), this.getColumnIndex(0));\n      } else {\n        var values = this.getValues(); // compatible with old version of wrong parameters\n        // should be removed in next major version\n        // see: https://github.com/vant-ui/vant/issues/5905\n\n        if (this.dataType === 'cascade') {\n          values = values.map(function (item) {\n            return item[_this.valueKey];\n          });\n        }\n\n        this.$emit(event, values, this.getIndexes());\n      }\n    },\n    onCascadeChange: function onCascadeChange(columnIndex) {\n      var cursor = {\n        children: this.columns\n      };\n      var indexes = this.getIndexes();\n\n      for (var i = 0; i <= columnIndex; i++) {\n        cursor = cursor.children[indexes[i]];\n      }\n\n      while (cursor && cursor.children) {\n        columnIndex++;\n        this.setColumnValues(columnIndex, cursor.children);\n        cursor = cursor.children[cursor.defaultIndex || 0];\n      }\n    },\n    onChange: function onChange(columnIndex) {\n      var _this2 = this;\n\n      if (this.dataType === 'cascade') {\n        this.onCascadeChange(columnIndex);\n      }\n\n      if (this.dataType === 'text') {\n        this.$emit('change', this, this.getColumnValue(0), this.getColumnIndex(0));\n      } else {\n        var values = this.getValues(); // compatible with old version of wrong parameters\n        // should be removed in next major version\n        // see: https://github.com/vant-ui/vant/issues/5905\n\n        if (this.dataType === 'cascade') {\n          values = values.map(function (item) {\n            return item[_this2.valueKey];\n          });\n        }\n\n        this.$emit('change', this, values, columnIndex);\n      }\n    },\n    // get column instance by index\n    getColumn: function getColumn(index) {\n      return this.children[index];\n    },\n    // @exposed-api\n    // get column value by index\n    getColumnValue: function getColumnValue(index) {\n      var column = this.getColumn(index);\n      return column && column.getValue();\n    },\n    // @exposed-api\n    // set column value by index\n    setColumnValue: function setColumnValue(index, value) {\n      var column = this.getColumn(index);\n\n      if (column) {\n        column.setValue(value);\n\n        if (this.dataType === 'cascade') {\n          this.onCascadeChange(index);\n        }\n      }\n    },\n    // @exposed-api\n    // get column option index by column index\n    getColumnIndex: function getColumnIndex(columnIndex) {\n      return (this.getColumn(columnIndex) || {}).currentIndex;\n    },\n    // @exposed-api\n    // set column option index by column index\n    setColumnIndex: function setColumnIndex(columnIndex, optionIndex) {\n      var column = this.getColumn(columnIndex);\n\n      if (column) {\n        column.setIndex(optionIndex);\n\n        if (this.dataType === 'cascade') {\n          this.onCascadeChange(columnIndex);\n        }\n      }\n    },\n    // @exposed-api\n    // get options of column by index\n    getColumnValues: function getColumnValues(index) {\n      return (this.children[index] || {}).options;\n    },\n    // @exposed-api\n    // set options of column by index\n    setColumnValues: function setColumnValues(index, options) {\n      var column = this.children[index];\n\n      if (column) {\n        column.setOptions(options);\n      }\n    },\n    // @exposed-api\n    // get values of all columns\n    getValues: function getValues() {\n      return this.children.map(function (child) {\n        return child.getValue();\n      });\n    },\n    // @exposed-api\n    // set values of all columns\n    setValues: function setValues(values) {\n      var _this3 = this;\n\n      values.forEach(function (value, index) {\n        _this3.setColumnValue(index, value);\n      });\n    },\n    // @exposed-api\n    // get indexes of all columns\n    getIndexes: function getIndexes() {\n      return this.children.map(function (child) {\n        return child.currentIndex;\n      });\n    },\n    // @exposed-api\n    // set indexes of all columns\n    setIndexes: function setIndexes(indexes) {\n      var _this4 = this;\n\n      indexes.forEach(function (optionIndex, columnIndex) {\n        _this4.setColumnIndex(columnIndex, optionIndex);\n      });\n    },\n    // @exposed-api\n    confirm: function confirm() {\n      this.children.forEach(function (child) {\n        return child.stopMomentum();\n      });\n      this.emit('confirm');\n    },\n    cancel: function cancel() {\n      this.emit('cancel');\n    },\n    genTitle: function genTitle() {\n      var h = this.$createElement;\n      var titleSlot = this.slots('title');\n\n      if (titleSlot) {\n        return titleSlot;\n      }\n\n      if (this.title) {\n        return h(\"div\", {\n          \"class\": ['van-ellipsis', bem('title')]\n        }, [this.title]);\n      }\n    },\n    genCancel: function genCancel() {\n      var h = this.$createElement;\n      return h(\"button\", {\n        \"attrs\": {\n          \"type\": \"button\"\n        },\n        \"class\": bem('cancel'),\n        \"on\": {\n          \"click\": this.cancel\n        }\n      }, [this.slots('cancel') || this.cancelButtonText || t('cancel')]);\n    },\n    genConfirm: function genConfirm() {\n      var h = this.$createElement;\n      return h(\"button\", {\n        \"attrs\": {\n          \"type\": \"button\"\n        },\n        \"class\": bem('confirm'),\n        \"on\": {\n          \"click\": this.confirm\n        }\n      }, [this.slots('confirm') || this.confirmButtonText || t('confirm')]);\n    },\n    genToolbar: function genToolbar() {\n      var h = this.$createElement;\n\n      if (this.showToolbar) {\n        return h(\"div\", {\n          \"class\": bem('toolbar')\n        }, [this.slots() || [this.genCancel(), this.genTitle(), this.genConfirm()]]);\n      }\n    },\n    genColumns: function genColumns() {\n      var h = this.$createElement;\n      var itemPxHeight = this.itemPxHeight;\n      var wrapHeight = itemPxHeight * this.visibleItemCount;\n      var frameStyle = {\n        height: itemPxHeight + \"px\"\n      };\n      var columnsStyle = {\n        height: wrapHeight + \"px\"\n      };\n      var maskStyle = {\n        backgroundSize: \"100% \" + (wrapHeight - itemPxHeight) / 2 + \"px\"\n      };\n      return h(\"div\", {\n        \"class\": bem('columns'),\n        \"style\": columnsStyle,\n        \"on\": {\n          \"touchmove\": _utils_dom_event__WEBPACK_IMPORTED_MODULE_2__[\"preventDefault\"]\n        }\n      }, [this.genColumnItems(), h(\"div\", {\n        \"class\": bem('mask'),\n        \"style\": maskStyle\n      }), h(\"div\", {\n        \"class\": [_utils_constant__WEBPACK_IMPORTED_MODULE_3__[\"BORDER_UNSET_TOP_BOTTOM\"], bem('frame')],\n        \"style\": frameStyle\n      })]);\n    },\n    genColumnItems: function genColumnItems() {\n      var _this5 = this;\n\n      var h = this.$createElement;\n      return this.formattedColumns.map(function (item, columnIndex) {\n        var _item$defaultIndex;\n\n        return h(_PickerColumn__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n          \"attrs\": {\n            \"readonly\": _this5.readonly,\n            \"valueKey\": _this5.valueKey,\n            \"allowHtml\": _this5.allowHtml,\n            \"className\": item.className,\n            \"itemHeight\": _this5.itemPxHeight,\n            \"defaultIndex\": (_item$defaultIndex = item.defaultIndex) != null ? _item$defaultIndex : +_this5.defaultIndex,\n            \"swipeDuration\": _this5.swipeDuration,\n            \"visibleItemCount\": _this5.visibleItemCount,\n            \"initialOptions\": item.values\n          },\n          \"scopedSlots\": {\n            option: _this5.$scopedSlots.option\n          },\n          \"on\": {\n            \"change\": function change() {\n              _this5.onChange(columnIndex);\n            }\n          }\n        });\n      });\n    }\n  },\n  render: function render(h) {\n    return h(\"div\", {\n      \"class\": bem()\n    }, [this.toolbarPosition === 'top' ? this.genToolbar() : h(), this.loading ? h(_loading__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n      \"class\": bem('loading')\n    }) : h(), this.slots('columns-top'), this.genColumns(), this.slots('columns-bottom'), this.toolbarPosition === 'bottom' ? this.genToolbar() : h()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/picker/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/picker/index.less":
/*!************************************************!*\
  !*** ./node_modules/vant/es/picker/index.less ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/picker/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"61476222\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/picker/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/picker/shared.js":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/picker/shared.js ***!
  \***********************************************/
/*! exports provided: DEFAULT_ITEM_HEIGHT, pickerProps */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DEFAULT_ITEM_HEIGHT\", function() { return DEFAULT_ITEM_HEIGHT; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"pickerProps\", function() { return pickerProps; });\nvar DEFAULT_ITEM_HEIGHT = 44;\nvar pickerProps = {\n  title: String,\n  loading: Boolean,\n  readonly: Boolean,\n  itemHeight: [Number, String],\n  showToolbar: Boolean,\n  cancelButtonText: String,\n  confirmButtonText: String,\n  allowHtml: {\n    type: Boolean,\n    default: true\n  },\n  visibleItemCount: {\n    type: [Number, String],\n    default: 6\n  },\n  swipeDuration: {\n    type: [Number, String],\n    default: 1000\n  }\n};\n\n//# sourceURL=webpack:///./node_modules/vant/es/picker/shared.js?");

/***/ }),

/***/ "./node_modules/vant/es/popup/index.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/popup/index.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/popup */ \"./node_modules/vant/es/mixins/popup/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('popup'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_popup__WEBPACK_IMPORTED_MODULE_1__[\"PopupMixin\"])()],\n  props: {\n    round: Boolean,\n    duration: [Number, String],\n    closeable: Boolean,\n    transition: String,\n    safeAreaInsetBottom: Boolean,\n    closeIcon: {\n      type: String,\n      default: 'cross'\n    },\n    closeIconPosition: {\n      type: String,\n      default: 'top-right'\n    },\n    position: {\n      type: String,\n      default: 'center'\n    },\n    overlay: {\n      type: Boolean,\n      default: true\n    },\n    closeOnClickOverlay: {\n      type: Boolean,\n      default: true\n    }\n  },\n  beforeCreate: function beforeCreate() {\n    var _this = this;\n\n    var createEmitter = function createEmitter(eventName) {\n      return function (event) {\n        return _this.$emit(eventName, event);\n      };\n    };\n\n    this.onClick = createEmitter('click');\n    this.onOpened = createEmitter('opened');\n    this.onClosed = createEmitter('closed');\n  },\n  methods: {\n    onClickCloseIcon: function onClickCloseIcon(event) {\n      this.$emit('click-close-icon', event);\n      this.close();\n    }\n  },\n  render: function render() {\n    var _bem;\n\n    var h = arguments[0];\n\n    if (!this.shouldRender) {\n      return;\n    }\n\n    var round = this.round,\n        position = this.position,\n        duration = this.duration;\n    var isCenter = position === 'center';\n    var transitionName = this.transition || (isCenter ? 'van-fade' : \"van-popup-slide-\" + position);\n    var style = {};\n\n    if (Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"isDef\"])(duration)) {\n      var key = isCenter ? 'animationDuration' : 'transitionDuration';\n      style[key] = duration + \"s\";\n    }\n\n    return h(\"transition\", {\n      \"attrs\": {\n        \"appear\": this.transitionAppear,\n        \"name\": transitionName\n      },\n      \"on\": {\n        \"afterEnter\": this.onOpened,\n        \"afterLeave\": this.onClosed\n      }\n    }, [h(\"div\", {\n      \"directives\": [{\n        name: \"show\",\n        value: this.value\n      }],\n      \"style\": style,\n      \"class\": bem((_bem = {\n        round: round\n      }, _bem[position] = position, _bem['safe-area-inset-bottom'] = this.safeAreaInsetBottom, _bem)),\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [this.slots(), this.closeable && h(_icon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], {\n      \"attrs\": {\n        \"role\": \"button\",\n        \"tabindex\": \"0\",\n        \"name\": this.closeIcon\n      },\n      \"class\": bem('close-icon', this.closeIconPosition),\n      \"on\": {\n        \"click\": this.onClickCloseIcon\n      }\n    })])]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/popup/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/popup/style/less.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/popup/style/less.js ***!
  \**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../overlay/index.less */ \"./node_modules/vant/es/overlay/index.less\");\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_overlay_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/popup/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/popup/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/progress/index.js":
/*!************************************************!*\
  !*** ./node_modules/vant/es/progress/index.js ***!
  \************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_bind_event__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/bind-event */ \"./node_modules/vant/es/mixins/bind-event.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('progress'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_bind_event__WEBPACK_IMPORTED_MODULE_1__[\"BindEventMixin\"])(function (bind) {\n    bind(window, 'resize', this.resize, true);\n    bind(window, 'orientationchange', this.resize, true);\n  })],\n  props: {\n    color: String,\n    inactive: Boolean,\n    pivotText: String,\n    textColor: String,\n    pivotColor: String,\n    trackColor: String,\n    strokeWidth: [Number, String],\n    percentage: {\n      type: [Number, String],\n      required: true,\n      validator: function validator(value) {\n        return value >= 0 && value <= 100;\n      }\n    },\n    showPivot: {\n      type: Boolean,\n      default: true\n    }\n  },\n  data: function data() {\n    return {\n      pivotWidth: 0,\n      progressWidth: 0\n    };\n  },\n  mounted: function mounted() {\n    this.resize();\n  },\n  watch: {\n    showPivot: 'resize',\n    pivotText: 'resize'\n  },\n  methods: {\n    // @exposed-api\n    resize: function resize() {\n      var _this = this;\n\n      this.$nextTick(function () {\n        _this.progressWidth = _this.$el.offsetWidth;\n        _this.pivotWidth = _this.$refs.pivot ? _this.$refs.pivot.offsetWidth : 0;\n      });\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var pivotText = this.pivotText,\n        percentage = this.percentage;\n    var text = pivotText != null ? pivotText : percentage + '%';\n    var showPivot = this.showPivot && text;\n    var background = this.inactive ? '#cacaca' : this.color;\n    var pivotStyle = {\n      color: this.textColor,\n      left: (this.progressWidth - this.pivotWidth) * percentage / 100 + \"px\",\n      background: this.pivotColor || background\n    };\n    var portionStyle = {\n      background: background,\n      width: this.progressWidth * percentage / 100 + 'px'\n    };\n    var wrapperStyle = {\n      background: this.trackColor,\n      height: Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"addUnit\"])(this.strokeWidth)\n    };\n    return h(\"div\", {\n      \"class\": bem(),\n      \"style\": wrapperStyle\n    }, [h(\"span\", {\n      \"class\": bem('portion'),\n      \"style\": portionStyle\n    }, [showPivot && h(\"span\", {\n      \"ref\": \"pivot\",\n      \"style\": pivotStyle,\n      \"class\": bem('pivot')\n    }, [text])])]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/progress/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/progress/index.less":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/progress/index.less ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/progress/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"7f7687ba\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/progress/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/progress/style/less.js":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/progress/style/less.js ***!
  \*****************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/progress/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/progress/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/radio-group/index.js":
/*!***************************************************!*\
  !*** ./node_modules/vant/es/radio-group/index.js ***!
  \***************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_field__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/field */ \"./node_modules/vant/es/mixins/field.js\");\n/* harmony import */ var _mixins_relation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mixins/relation */ \"./node_modules/vant/es/mixins/relation.js\");\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('radio-group'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_relation__WEBPACK_IMPORTED_MODULE_2__[\"ParentMixin\"])('vanRadio'), _mixins_field__WEBPACK_IMPORTED_MODULE_1__[\"FieldMixin\"]],\n  props: {\n    value: null,\n    disabled: Boolean,\n    direction: String,\n    checkedColor: String,\n    iconSize: [Number, String]\n  },\n  watch: {\n    value: function value(_value) {\n      this.$emit('change', _value);\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": bem([this.direction]),\n      \"attrs\": {\n        \"role\": \"radiogroup\"\n      }\n    }, [this.slots()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio-group/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/radio-group/index.less":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/radio-group/index.less ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/radio-group/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"0d3c8dea\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio-group/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/radio-group/style/less.js":
/*!********************************************************!*\
  !*** ./node_modules/vant/es/radio-group/style/less.js ***!
  \********************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/radio-group/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio-group/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/radio/index.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/radio/index.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_checkbox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/checkbox */ \"./node_modules/vant/es/mixins/checkbox.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('radio'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_checkbox__WEBPACK_IMPORTED_MODULE_1__[\"CheckboxMixin\"])({\n    bem: bem,\n    role: 'radio',\n    parent: 'vanRadio'\n  })],\n  computed: {\n    currentValue: {\n      get: function get() {\n        return this.parent ? this.parent.value : this.value;\n      },\n      set: function set(val) {\n        (this.parent || this).$emit('input', val);\n      }\n    },\n    checked: function checked() {\n      return this.currentValue === this.name;\n    }\n  },\n  methods: {\n    toggle: function toggle() {\n      this.currentValue = this.name;\n    }\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/radio/index.less":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/radio/index.less ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/radio/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"3d3da57d\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/radio/style/less.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/radio/style/less.js ***!
  \**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/radio/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/radio/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/row/index.js":
/*!*******************************************!*\
  !*** ./node_modules/vant/es/row/index.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_relation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mixins/relation */ \"./node_modules/vant/es/mixins/relation.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('row'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_relation__WEBPACK_IMPORTED_MODULE_1__[\"ParentMixin\"])('vanRow')],\n  props: {\n    type: String,\n    align: String,\n    justify: String,\n    tag: {\n      type: String,\n      default: 'div'\n    },\n    gutter: {\n      type: [Number, String],\n      default: 0\n    }\n  },\n  computed: {\n    spaces: function spaces() {\n      var gutter = Number(this.gutter);\n\n      if (!gutter) {\n        return;\n      }\n\n      var spaces = [];\n      var groups = [[]];\n      var totalSpan = 0;\n      this.children.forEach(function (item, index) {\n        totalSpan += Number(item.span);\n\n        if (totalSpan > 24) {\n          groups.push([index]);\n          totalSpan -= 24;\n        } else {\n          groups[groups.length - 1].push(index);\n        }\n      });\n      groups.forEach(function (group) {\n        var averagePadding = gutter * (group.length - 1) / group.length;\n        group.forEach(function (item, index) {\n          if (index === 0) {\n            spaces.push({\n              right: averagePadding\n            });\n          } else {\n            var left = gutter - spaces[item - 1].right;\n            var right = averagePadding - left;\n            spaces.push({\n              left: left,\n              right: right\n            });\n          }\n        });\n      });\n      return spaces;\n    }\n  },\n  methods: {\n    onClick: function onClick(event) {\n      this.$emit('click', event);\n    }\n  },\n  render: function render() {\n    var _bem;\n\n    var h = arguments[0];\n    var align = this.align,\n        justify = this.justify;\n    var flex = this.type === 'flex';\n    return h(this.tag, {\n      \"class\": bem((_bem = {\n        flex: flex\n      }, _bem[\"align-\" + align] = flex && align, _bem[\"justify-\" + justify] = flex && justify, _bem)),\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [this.slots()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/row/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/row/index.less":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/row/index.less ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/row/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"597c6984\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/row/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/row/style/less.js":
/*!************************************************!*\
  !*** ./node_modules/vant/es/row/style/less.js ***!
  \************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/row/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/row/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/search/index.js":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/search/index.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/babel-helper-vue-jsx-merge-props */ \"./node_modules/@vue/babel-helper-vue-jsx-merge-props/dist/helper.js\");\n/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_functional__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/functional */ \"./node_modules/vant/es/utils/functional.js\");\n/* harmony import */ var _utils_dom_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/dom/event */ \"./node_modules/vant/es/utils/dom/event.js\");\n/* harmony import */ var _field__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../field */ \"./node_modules/vant/es/field/index.js\");\n\n\n\n// Utils\n\n\n // Components\n\n // Types\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"createNamespace\"])('search'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1],\n    t = _createNamespace[2];\n\nfunction Search(h, props, slots, ctx) {\n  function Label() {\n    if (slots.label || props.label) {\n      return h(\"div\", {\n        \"class\": bem('label')\n      }, [slots.label ? slots.label() : props.label]);\n    }\n  }\n\n  function Action() {\n    if (!props.showAction) {\n      return;\n    }\n\n    function onCancel() {\n      if (slots.action) {\n        return;\n      }\n\n      Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"emit\"])(ctx, 'input', '');\n      Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"emit\"])(ctx, 'cancel');\n    }\n\n    return h(\"div\", {\n      \"class\": bem('action'),\n      \"attrs\": {\n        \"role\": \"button\",\n        \"tabindex\": \"0\"\n      },\n      \"on\": {\n        \"click\": onCancel\n      }\n    }, [slots.action ? slots.action() : props.actionText || t('cancel')]);\n  }\n\n  var fieldData = {\n    attrs: ctx.data.attrs,\n    on: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, ctx.listeners, {\n      keypress: function keypress(event) {\n        // press enter\n        if (event.keyCode === 13) {\n          Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"preventDefault\"])(event);\n          Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"emit\"])(ctx, 'search', props.value);\n        }\n\n        Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"emit\"])(ctx, 'keypress', event);\n      }\n    })\n  };\n  var inheritData = Object(_utils_functional__WEBPACK_IMPORTED_MODULE_3__[\"inherit\"])(ctx);\n  inheritData.attrs = undefined;\n  return h(\"div\", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{\n    \"class\": bem({\n      'show-action': props.showAction\n    }),\n    \"style\": {\n      background: props.background\n    }\n  }, inheritData]), [slots.left == null ? void 0 : slots.left(), h(\"div\", {\n    \"class\": bem('content', props.shape)\n  }, [Label(), h(_field__WEBPACK_IMPORTED_MODULE_5__[\"default\"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{\n    \"attrs\": {\n      \"type\": \"search\",\n      \"border\": false,\n      \"value\": props.value,\n      \"leftIcon\": props.leftIcon,\n      \"rightIcon\": props.rightIcon,\n      \"clearable\": props.clearable,\n      \"clearTrigger\": props.clearTrigger\n    },\n    \"scopedSlots\": {\n      'left-icon': slots['left-icon'],\n      'right-icon': slots['right-icon']\n    }\n  }, fieldData]))]), Action()]);\n}\n\nSearch.props = {\n  value: String,\n  label: String,\n  rightIcon: String,\n  actionText: String,\n  background: String,\n  showAction: Boolean,\n  clearTrigger: String,\n  shape: {\n    type: String,\n    default: 'square'\n  },\n  clearable: {\n    type: Boolean,\n    default: true\n  },\n  leftIcon: {\n    type: String,\n    default: 'search'\n  }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent(Search));\n\n//# sourceURL=webpack:///./node_modules/vant/es/search/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/search/index.less":
/*!************************************************!*\
  !*** ./node_modules/vant/es/search/index.less ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/search/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"1c60b0c8\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/search/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/search/style/less.js":
/*!***************************************************!*\
  !*** ./node_modules/vant/es/search/style/less.js ***!
  \***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _cell_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../cell/index.less */ \"./node_modules/vant/es/cell/index.less\");\n/* harmony import */ var _cell_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_cell_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _field_index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../field/index.less */ \"./node_modules/vant/es/field/index.less\");\n/* harmony import */ var _field_index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_field_index_less__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/search/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_5__);\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/search/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/sticky/index.js":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/sticky/index.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_dom_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/dom/style */ \"./node_modules/vant/es/utils/dom/style.js\");\n/* harmony import */ var _utils_format_unit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/format/unit */ \"./node_modules/vant/es/utils/format/unit.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_dom_scroll__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/dom/scroll */ \"./node_modules/vant/es/utils/dom/scroll.js\");\n/* harmony import */ var _mixins_bind_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mixins/bind-event */ \"./node_modules/vant/es/mixins/bind-event.js\");\n\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"createNamespace\"])('sticky'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_bind_event__WEBPACK_IMPORTED_MODULE_4__[\"BindEventMixin\"])(function (bind, isBind) {\n    if (!this.scroller) {\n      this.scroller = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_3__[\"getScroller\"])(this.$el);\n    }\n\n    if (this.observer) {\n      var method = isBind ? 'observe' : 'unobserve';\n      this.observer[method](this.$el);\n    }\n\n    bind(this.scroller, 'scroll', this.onScroll, true);\n    this.onScroll();\n  })],\n  props: {\n    zIndex: [Number, String],\n    container: null,\n    offsetTop: {\n      type: [Number, String],\n      default: 0\n    }\n  },\n  data: function data() {\n    return {\n      fixed: false,\n      height: 0,\n      transform: 0\n    };\n  },\n  computed: {\n    offsetTopPx: function offsetTopPx() {\n      return Object(_utils_format_unit__WEBPACK_IMPORTED_MODULE_1__[\"unitToPx\"])(this.offsetTop);\n    },\n    style: function style() {\n      if (!this.fixed) {\n        return;\n      }\n\n      var style = {};\n\n      if (Object(_utils__WEBPACK_IMPORTED_MODULE_2__[\"isDef\"])(this.zIndex)) {\n        style.zIndex = this.zIndex;\n      }\n\n      if (this.offsetTopPx && this.fixed) {\n        style.top = this.offsetTopPx + \"px\";\n      }\n\n      if (this.transform) {\n        style.transform = \"translate3d(0, \" + this.transform + \"px, 0)\";\n      }\n\n      return style;\n    }\n  },\n  watch: {\n    fixed: function fixed(isFixed) {\n      this.$emit('change', isFixed);\n    }\n  },\n  created: function created() {\n    var _this = this;\n\n    // compatibility: https://caniuse.com/#feat=intersectionobserver\n    if (!_utils__WEBPACK_IMPORTED_MODULE_2__[\"isServer\"] && window.IntersectionObserver) {\n      this.observer = new IntersectionObserver(function (entries) {\n        // trigger scroll when visibility changed\n        if (entries[0].intersectionRatio > 0) {\n          _this.onScroll();\n        }\n      }, {\n        root: document.body\n      });\n    }\n  },\n  methods: {\n    onScroll: function onScroll() {\n      var _this2 = this;\n\n      if (Object(_utils_dom_style__WEBPACK_IMPORTED_MODULE_0__[\"isHidden\"])(this.$el)) {\n        return;\n      }\n\n      this.height = this.$el.offsetHeight;\n      var container = this.container,\n          offsetTopPx = this.offsetTopPx;\n      var scrollTop = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_3__[\"getScrollTop\"])(window);\n      var topToPageTop = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_3__[\"getElementTop\"])(this.$el);\n\n      var emitScrollEvent = function emitScrollEvent() {\n        _this2.$emit('scroll', {\n          scrollTop: scrollTop,\n          isFixed: _this2.fixed\n        });\n      }; // The sticky component should be kept inside the container element\n\n\n      if (container) {\n        var bottomToPageTop = topToPageTop + container.offsetHeight;\n\n        if (scrollTop + offsetTopPx + this.height > bottomToPageTop) {\n          var distanceToBottom = this.height + scrollTop - bottomToPageTop;\n\n          if (distanceToBottom < this.height) {\n            this.fixed = true;\n            this.transform = -(distanceToBottom + offsetTopPx);\n          } else {\n            this.fixed = false;\n          }\n\n          emitScrollEvent();\n          return;\n        }\n      }\n\n      if (scrollTop + offsetTopPx > topToPageTop) {\n        this.fixed = true;\n        this.transform = 0;\n      } else {\n        this.fixed = false;\n      }\n\n      emitScrollEvent();\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    var fixed = this.fixed;\n    var style = {\n      height: fixed ? this.height + \"px\" : null\n    };\n    return h(\"div\", {\n      \"style\": style\n    }, [h(\"div\", {\n      \"class\": bem({\n        fixed: fixed\n      }),\n      \"style\": this.style\n    }, [this.slots()])]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/sticky/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/sticky/index.less":
/*!************************************************!*\
  !*** ./node_modules/vant/es/sticky/index.less ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/sticky/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"44a53c32\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/sticky/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/tab/index.js":
/*!*******************************************!*\
  !*** ./node_modules/vant/es/tab/index.js ***!
  \*******************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_relation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mixins/relation */ \"./node_modules/vant/es/mixins/relation.js\");\n/* harmony import */ var _utils_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/router */ \"./node_modules/vant/es/utils/router.js\");\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"createNamespace\"])('tab'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_relation__WEBPACK_IMPORTED_MODULE_2__[\"ChildrenMixin\"])('vanTabs')],\n  props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, _utils_router__WEBPACK_IMPORTED_MODULE_3__[\"routeProps\"], {\n    dot: Boolean,\n    name: [Number, String],\n    // @deprecated\n    info: [Number, String],\n    badge: [Number, String],\n    title: String,\n    titleStyle: null,\n    titleClass: null,\n    disabled: Boolean\n  }),\n  data: function data() {\n    return {\n      inited: false\n    };\n  },\n  computed: {\n    computedName: function computedName() {\n      var _this$name;\n\n      return (_this$name = this.name) != null ? _this$name : this.index;\n    },\n    isActive: function isActive() {\n      var active = this.computedName === this.parent.currentName;\n\n      if (active) {\n        this.inited = true;\n      }\n\n      return active;\n    }\n  },\n  watch: {\n    title: function title() {\n      this.parent.setLine();\n      this.parent.scrollIntoView();\n    },\n    inited: function inited(val) {\n      var _this = this;\n\n      if (this.parent.lazyRender && val) {\n        this.$nextTick(function () {\n          _this.parent.$emit('rendered', _this.computedName, _this.title);\n        });\n      }\n    }\n  },\n  render: function render(h) {\n    var slots = this.slots,\n        parent = this.parent,\n        isActive = this.isActive;\n    var slotContent = slots();\n\n    if (false) {}\n\n    if (!slotContent && !parent.animated) {\n      return;\n    }\n\n    var show = parent.scrollspy || isActive;\n    var shouldRender = this.inited || parent.scrollspy || !parent.lazyRender;\n    var Content = shouldRender ? slotContent : h();\n\n    if (parent.animated) {\n      return h(\"div\", {\n        \"attrs\": {\n          \"role\": \"tabpanel\",\n          \"aria-hidden\": !isActive\n        },\n        \"class\": bem('pane-wrapper', {\n          inactive: !isActive\n        })\n      }, [h(\"div\", {\n        \"class\": bem('pane')\n      }, [Content])]);\n    }\n\n    return h(\"div\", {\n      \"directives\": [{\n        name: \"show\",\n        value: show\n      }],\n      \"attrs\": {\n        \"role\": \"tabpanel\"\n      },\n      \"class\": bem('pane')\n    }, [Content]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/tab/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/tab/index.less":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/tab/index.less ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/tab/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"2b7f1aba\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/tab/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/tab/style/less.js":
/*!************************************************!*\
  !*** ./node_modules/vant/es/tab/style/less.js ***!
  \************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/tab/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/tab/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/tabs/Content.js":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/tabs/Content.js ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _mixins_touch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mixins/touch */ \"./node_modules/vant/es/mixins/touch.js\");\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"createNamespace\"])('tabs'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\nvar MIN_SWIPE_DISTANCE = 50;\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [_mixins_touch__WEBPACK_IMPORTED_MODULE_2__[\"TouchMixin\"]],\n  props: {\n    count: Number,\n    duration: [Number, String],\n    animated: Boolean,\n    swipeable: Boolean,\n    currentIndex: Number\n  },\n  computed: {\n    style: function style() {\n      if (this.animated) {\n        return {\n          transform: \"translate3d(\" + -1 * this.currentIndex * 100 + \"%, 0, 0)\",\n          transitionDuration: this.duration + \"s\"\n        };\n      }\n    },\n    listeners: function listeners() {\n      if (this.swipeable) {\n        return {\n          touchstart: this.touchStart,\n          touchmove: this.touchMove,\n          touchend: this.onTouchEnd,\n          touchcancel: this.onTouchEnd\n        };\n      }\n    }\n  },\n  methods: {\n    // watch swipe touch end\n    onTouchEnd: function onTouchEnd() {\n      var direction = this.direction,\n          deltaX = this.deltaX,\n          currentIndex = this.currentIndex;\n      /* istanbul ignore else */\n\n      if (direction === 'horizontal' && this.offsetX >= MIN_SWIPE_DISTANCE) {\n        /* istanbul ignore else */\n        if (deltaX > 0 && currentIndex !== 0) {\n          this.$emit('change', currentIndex - 1);\n        } else if (deltaX < 0 && currentIndex !== this.count - 1) {\n          this.$emit('change', currentIndex + 1);\n        }\n      }\n    },\n    genChildren: function genChildren() {\n      var h = this.$createElement;\n\n      if (this.animated) {\n        return h(\"div\", {\n          \"class\": bem('track'),\n          \"style\": this.style\n        }, [this.slots()]);\n      }\n\n      return this.slots();\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"class\": bem('content', {\n        animated: this.animated\n      }),\n      \"on\": Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.listeners)\n    }, [this.genChildren()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/Content.js?");

/***/ }),

/***/ "./node_modules/vant/es/tabs/Title.js":
/*!********************************************!*\
  !*** ./node_modules/vant/es/tabs/Title.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _info__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../info */ \"./node_modules/vant/es/info/index.js\");\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('tab'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  props: {\n    dot: Boolean,\n    type: String,\n    info: [Number, String],\n    color: String,\n    title: String,\n    isActive: Boolean,\n    disabled: Boolean,\n    scrollable: Boolean,\n    activeColor: String,\n    inactiveColor: String\n  },\n  computed: {\n    style: function style() {\n      var style = {};\n      var color = this.color,\n          isActive = this.isActive;\n      var isCard = this.type === 'card'; // card theme color\n\n      if (color && isCard) {\n        style.borderColor = color;\n\n        if (!this.disabled) {\n          if (isActive) {\n            style.backgroundColor = color;\n          } else {\n            style.color = color;\n          }\n        }\n      }\n\n      var titleColor = isActive ? this.activeColor : this.inactiveColor;\n\n      if (titleColor) {\n        style.color = titleColor;\n      }\n\n      return style;\n    }\n  },\n  methods: {\n    onClick: function onClick() {\n      this.$emit('click');\n    },\n    genText: function genText() {\n      var h = this.$createElement;\n      var Text = h(\"span\", {\n        \"class\": bem('text', {\n          ellipsis: !this.scrollable\n        })\n      }, [this.slots() || this.title]);\n\n      if (this.dot || Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"isDef\"])(this.info) && this.info !== '') {\n        return h(\"span\", {\n          \"class\": bem('text-wrapper')\n        }, [Text, h(_info__WEBPACK_IMPORTED_MODULE_1__[\"default\"], {\n          \"attrs\": {\n            \"dot\": this.dot,\n            \"info\": this.info\n          }\n        })]);\n      }\n\n      return Text;\n    }\n  },\n  render: function render() {\n    var h = arguments[0];\n    return h(\"div\", {\n      \"attrs\": {\n        \"role\": \"tab\",\n        \"aria-selected\": this.isActive\n      },\n      \"class\": [bem({\n        active: this.isActive,\n        disabled: this.disabled\n      })],\n      \"style\": this.style,\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [this.genText()]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/Title.js?");

/***/ }),

/***/ "./node_modules/vant/es/tabs/index.js":
/*!********************************************!*\
  !*** ./node_modules/vant/es/tabs/index.js ***!
  \********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./node_modules/vant/es/tabs/utils.js\");\n/* harmony import */ var _utils_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/router */ \"./node_modules/vant/es/utils/router.js\");\n/* harmony import */ var _utils_dom_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/dom/style */ \"./node_modules/vant/es/utils/dom/style.js\");\n/* harmony import */ var _utils_dom_event__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/dom/event */ \"./node_modules/vant/es/utils/dom/event.js\");\n/* harmony import */ var _utils_format_unit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/format/unit */ \"./node_modules/vant/es/utils/format/unit.js\");\n/* harmony import */ var _utils_constant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/constant */ \"./node_modules/vant/es/utils/constant.js\");\n/* harmony import */ var _utils_interceptor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/interceptor */ \"./node_modules/vant/es/utils/interceptor.js\");\n/* harmony import */ var _utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/dom/scroll */ \"./node_modules/vant/es/utils/dom/scroll.js\");\n/* harmony import */ var _mixins_relation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../mixins/relation */ \"./node_modules/vant/es/mixins/relation.js\");\n/* harmony import */ var _mixins_bind_event__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../mixins/bind-event */ \"./node_modules/vant/es/mixins/bind-event.js\");\n/* harmony import */ var _Title__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Title */ \"./node_modules/vant/es/tabs/Title.js\");\n/* harmony import */ var _sticky__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../sticky */ \"./node_modules/vant/es/sticky/index.js\");\n/* harmony import */ var _Content__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Content */ \"./node_modules/vant/es/tabs/Content.js\");\n// Utils\n\n\n\n\n\n\n\n\n // Mixins\n\n\n // Components\n\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('tabs'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_relation__WEBPACK_IMPORTED_MODULE_9__[\"ParentMixin\"])('vanTabs'), Object(_mixins_bind_event__WEBPACK_IMPORTED_MODULE_10__[\"BindEventMixin\"])(function (bind) {\n    if (!this.scroller) {\n      this.scroller = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__[\"getScroller\"])(this.$el);\n    }\n\n    bind(window, 'resize', this.resize, true);\n\n    if (this.scrollspy) {\n      bind(this.scroller, 'scroll', this.onScroll, true);\n    }\n  })],\n  inject: {\n    vanPopup: {\n      default: null\n    }\n  },\n  model: {\n    prop: 'active'\n  },\n  props: {\n    color: String,\n    border: Boolean,\n    sticky: Boolean,\n    animated: Boolean,\n    swipeable: Boolean,\n    scrollspy: Boolean,\n    background: String,\n    lineWidth: [Number, String],\n    lineHeight: [Number, String],\n    beforeChange: Function,\n    titleActiveColor: String,\n    titleInactiveColor: String,\n    type: {\n      type: String,\n      default: 'line'\n    },\n    active: {\n      type: [Number, String],\n      default: 0\n    },\n    ellipsis: {\n      type: Boolean,\n      default: true\n    },\n    duration: {\n      type: [Number, String],\n      default: 0.3\n    },\n    offsetTop: {\n      type: [Number, String],\n      default: 0\n    },\n    lazyRender: {\n      type: Boolean,\n      default: true\n    },\n    swipeThreshold: {\n      type: [Number, String],\n      default: 5\n    }\n  },\n  data: function data() {\n    return {\n      position: '',\n      currentIndex: null,\n      lineStyle: {\n        backgroundColor: this.color\n      }\n    };\n  },\n  computed: {\n    // whether the nav is scrollable\n    scrollable: function scrollable() {\n      return this.children.length > this.swipeThreshold || !this.ellipsis;\n    },\n    navStyle: function navStyle() {\n      return {\n        borderColor: this.color,\n        background: this.background\n      };\n    },\n    currentName: function currentName() {\n      var activeTab = this.children[this.currentIndex];\n\n      if (activeTab) {\n        return activeTab.computedName;\n      }\n    },\n    offsetTopPx: function offsetTopPx() {\n      return Object(_utils_format_unit__WEBPACK_IMPORTED_MODULE_5__[\"unitToPx\"])(this.offsetTop);\n    },\n    scrollOffset: function scrollOffset() {\n      if (this.sticky) {\n        return this.offsetTopPx + this.tabHeight;\n      }\n\n      return 0;\n    }\n  },\n  watch: {\n    color: 'setLine',\n    active: function active(name) {\n      if (name !== this.currentName) {\n        this.setCurrentIndexByName(name);\n      }\n    },\n    children: function children() {\n      var _this = this;\n\n      this.setCurrentIndexByName(this.active);\n      this.setLine();\n      this.$nextTick(function () {\n        _this.scrollIntoView(true);\n      });\n    },\n    currentIndex: function currentIndex() {\n      this.scrollIntoView();\n      this.setLine(); // scroll to correct position\n\n      if (this.stickyFixed && !this.scrollspy) {\n        Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__[\"setRootScrollTop\"])(Math.ceil(Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__[\"getElementTop\"])(this.$el) - this.offsetTopPx));\n      }\n    },\n    scrollspy: function scrollspy(val) {\n      if (val) {\n        Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"on\"])(this.scroller, 'scroll', this.onScroll, true);\n      } else {\n        Object(_utils_dom_event__WEBPACK_IMPORTED_MODULE_4__[\"off\"])(this.scroller, 'scroll', this.onScroll);\n      }\n    }\n  },\n  mounted: function mounted() {\n    var _this2 = this;\n\n    this.init(); // https://github.com/vant-ui/vant/issues/7959\n\n    if (this.vanPopup) {\n      this.vanPopup.onReopen(function () {\n        _this2.setLine();\n      });\n    }\n  },\n  activated: function activated() {\n    this.init();\n    this.setLine();\n  },\n  methods: {\n    // @exposed-api\n    resize: function resize() {\n      this.setLine();\n    },\n    init: function init() {\n      var _this3 = this;\n\n      this.$nextTick(function () {\n        _this3.inited = true;\n        _this3.tabHeight = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__[\"getVisibleHeight\"])(_this3.$refs.wrap);\n\n        _this3.scrollIntoView(true);\n      });\n    },\n    // update nav bar style\n    setLine: function setLine() {\n      var _this4 = this;\n\n      var shouldAnimate = this.inited;\n      this.$nextTick(function () {\n        var titles = _this4.$refs.titles;\n\n        if (!titles || !titles[_this4.currentIndex] || _this4.type !== 'line' || Object(_utils_dom_style__WEBPACK_IMPORTED_MODULE_3__[\"isHidden\"])(_this4.$el)) {\n          return;\n        }\n\n        var title = titles[_this4.currentIndex].$el;\n        var lineWidth = _this4.lineWidth,\n            lineHeight = _this4.lineHeight;\n        var left = title.offsetLeft + title.offsetWidth / 2;\n        var lineStyle = {\n          width: Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"addUnit\"])(lineWidth),\n          backgroundColor: _this4.color,\n          transform: \"translateX(\" + left + \"px) translateX(-50%)\"\n        };\n\n        if (shouldAnimate) {\n          lineStyle.transitionDuration = _this4.duration + \"s\";\n        }\n\n        if (Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"isDef\"])(lineHeight)) {\n          var height = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"addUnit\"])(lineHeight);\n          lineStyle.height = height;\n          lineStyle.borderRadius = height;\n        }\n\n        _this4.lineStyle = lineStyle;\n      });\n    },\n    // correct the index of active tab\n    setCurrentIndexByName: function setCurrentIndexByName(name) {\n      var matched = this.children.filter(function (tab) {\n        return tab.computedName === name;\n      });\n      var defaultIndex = (this.children[0] || {}).index || 0;\n      this.setCurrentIndex(matched.length ? matched[0].index : defaultIndex);\n    },\n    setCurrentIndex: function setCurrentIndex(currentIndex) {\n      var newIndex = this.findAvailableTab(currentIndex);\n\n      if (!Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"isDef\"])(newIndex)) {\n        return;\n      }\n\n      var newTab = this.children[newIndex];\n      var newName = newTab.computedName;\n      var shouldEmitChange = this.currentIndex !== null;\n      this.currentIndex = newIndex;\n\n      if (newName !== this.active) {\n        this.$emit('input', newName);\n\n        if (shouldEmitChange) {\n          this.$emit('change', newName, newTab.title);\n        }\n      }\n    },\n    findAvailableTab: function findAvailableTab(index) {\n      var diff = index < this.currentIndex ? -1 : 1;\n\n      while (index >= 0 && index < this.children.length) {\n        if (!this.children[index].disabled) {\n          return index;\n        }\n\n        index += diff;\n      }\n    },\n    // emit event when clicked\n    onClick: function onClick(item, index) {\n      var _this5 = this;\n\n      var _this$children$index = this.children[index],\n          title = _this$children$index.title,\n          disabled = _this$children$index.disabled,\n          computedName = _this$children$index.computedName;\n\n      if (disabled) {\n        this.$emit('disabled', computedName, title);\n      } else {\n        Object(_utils_interceptor__WEBPACK_IMPORTED_MODULE_7__[\"callInterceptor\"])({\n          interceptor: this.beforeChange,\n          args: [computedName],\n          done: function done() {\n            _this5.setCurrentIndex(index);\n\n            _this5.scrollToCurrentContent();\n          }\n        });\n        this.$emit('click', computedName, title);\n        Object(_utils_router__WEBPACK_IMPORTED_MODULE_2__[\"route\"])(item.$router, item);\n      }\n    },\n    // scroll active tab into view\n    scrollIntoView: function scrollIntoView(immediate) {\n      var titles = this.$refs.titles;\n\n      if (!this.scrollable || !titles || !titles[this.currentIndex]) {\n        return;\n      }\n\n      var nav = this.$refs.nav;\n      var title = titles[this.currentIndex].$el;\n      var to = title.offsetLeft - (nav.offsetWidth - title.offsetWidth) / 2;\n      Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"scrollLeftTo\"])(nav, to, immediate ? 0 : +this.duration);\n    },\n    onSticktScroll: function onSticktScroll(params) {\n      this.stickyFixed = params.isFixed;\n      this.$emit('scroll', params);\n    },\n    // @exposed-api\n    scrollTo: function scrollTo(name) {\n      var _this6 = this;\n\n      this.$nextTick(function () {\n        _this6.setCurrentIndexByName(name);\n\n        _this6.scrollToCurrentContent(true);\n      });\n    },\n    scrollToCurrentContent: function scrollToCurrentContent(immediate) {\n      var _this7 = this;\n\n      if (immediate === void 0) {\n        immediate = false;\n      }\n\n      if (this.scrollspy) {\n        var target = this.children[this.currentIndex];\n        var el = target == null ? void 0 : target.$el;\n\n        if (el) {\n          var to = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__[\"getElementTop\"])(el, this.scroller) - this.scrollOffset;\n          this.lockScroll = true;\n          Object(_utils__WEBPACK_IMPORTED_MODULE_1__[\"scrollTopTo\"])(this.scroller, to, immediate ? 0 : +this.duration, function () {\n            _this7.lockScroll = false;\n          });\n        }\n      }\n    },\n    onScroll: function onScroll() {\n      if (this.scrollspy && !this.lockScroll) {\n        var index = this.getCurrentIndexOnScroll();\n        this.setCurrentIndex(index);\n      }\n    },\n    getCurrentIndexOnScroll: function getCurrentIndexOnScroll() {\n      var children = this.children;\n\n      for (var index = 0; index < children.length; index++) {\n        var top = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_8__[\"getVisibleTop\"])(children[index].$el);\n\n        if (top > this.scrollOffset) {\n          return index === 0 ? 0 : index - 1;\n        }\n      }\n\n      return children.length - 1;\n    }\n  },\n  render: function render() {\n    var _this8 = this,\n        _ref;\n\n    var h = arguments[0];\n    var type = this.type,\n        animated = this.animated,\n        scrollable = this.scrollable;\n    var Nav = this.children.map(function (item, index) {\n      var _item$badge;\n\n      return h(_Title__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n        \"ref\": \"titles\",\n        \"refInFor\": true,\n        \"attrs\": {\n          \"type\": type,\n          \"dot\": item.dot,\n          \"info\": (_item$badge = item.badge) != null ? _item$badge : item.info,\n          \"title\": item.title,\n          \"color\": _this8.color,\n          \"isActive\": index === _this8.currentIndex,\n          \"disabled\": item.disabled,\n          \"scrollable\": scrollable,\n          \"activeColor\": _this8.titleActiveColor,\n          \"inactiveColor\": _this8.titleInactiveColor\n        },\n        \"style\": item.titleStyle,\n        \"class\": item.titleClass,\n        \"scopedSlots\": {\n          default: function _default() {\n            return item.slots('title');\n          }\n        },\n        \"on\": {\n          \"click\": function click() {\n            _this8.onClick(item, index);\n          }\n        }\n      });\n    });\n    var Wrap = h(\"div\", {\n      \"ref\": \"wrap\",\n      \"class\": [bem('wrap', {\n        scrollable: scrollable\n      }), (_ref = {}, _ref[_utils_constant__WEBPACK_IMPORTED_MODULE_6__[\"BORDER_TOP_BOTTOM\"]] = type === 'line' && this.border, _ref)]\n    }, [h(\"div\", {\n      \"ref\": \"nav\",\n      \"attrs\": {\n        \"role\": \"tablist\"\n      },\n      \"class\": bem('nav', [type, {\n        complete: this.scrollable\n      }]),\n      \"style\": this.navStyle\n    }, [this.slots('nav-left'), Nav, type === 'line' && h(\"div\", {\n      \"class\": bem('line'),\n      \"style\": this.lineStyle\n    }), this.slots('nav-right')])]);\n    return h(\"div\", {\n      \"class\": bem([type])\n    }, [this.sticky ? h(_sticky__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n      \"attrs\": {\n        \"container\": this.$el,\n        \"offsetTop\": this.offsetTop\n      },\n      \"on\": {\n        \"scroll\": this.onSticktScroll\n      }\n    }, [Wrap]) : Wrap, h(_Content__WEBPACK_IMPORTED_MODULE_13__[\"default\"], {\n      \"attrs\": {\n        \"count\": this.children.length,\n        \"animated\": animated,\n        \"duration\": this.duration,\n        \"swipeable\": this.swipeable,\n        \"currentIndex\": this.currentIndex\n      },\n      \"on\": {\n        \"change\": this.setCurrentIndex\n      }\n    }, [this.slots()])]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/tabs/index.less":
/*!**********************************************!*\
  !*** ./node_modules/vant/es/tabs/index.less ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/tabs/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"4f5a779c\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/tabs/style/less.js":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/tabs/style/less.js ***!
  \*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _sticky_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sticky/index.less */ \"./node_modules/vant/es/sticky/index.less\");\n/* harmony import */ var _sticky_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_sticky_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/tabs/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/tabs/utils.js":
/*!********************************************!*\
  !*** ./node_modules/vant/es/tabs/utils.js ***!
  \********************************************/
/*! exports provided: scrollLeftTo, scrollTopTo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scrollLeftTo\", function() { return scrollLeftTo; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"scrollTopTo\", function() { return scrollTopTo; });\n/* harmony import */ var _utils_dom_raf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/dom/raf */ \"./node_modules/vant/es/utils/dom/raf.js\");\n/* harmony import */ var _utils_dom_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/dom/scroll */ \"./node_modules/vant/es/utils/dom/scroll.js\");\n\n\nfunction scrollLeftTo(scroller, to, duration) {\n  var count = 0;\n  var from = scroller.scrollLeft;\n  var frames = duration === 0 ? 1 : Math.round(duration * 1000 / 16);\n\n  function animate() {\n    scroller.scrollLeft += (to - from) / frames;\n\n    if (++count < frames) {\n      Object(_utils_dom_raf__WEBPACK_IMPORTED_MODULE_0__[\"raf\"])(animate);\n    }\n  }\n\n  animate();\n}\nfunction scrollTopTo(scroller, to, duration, callback) {\n  var current = Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_1__[\"getScrollTop\"])(scroller);\n  var isDown = current < to;\n  var frames = duration === 0 ? 1 : Math.round(duration * 1000 / 16);\n  var step = (to - current) / frames;\n\n  function animate() {\n    current += step;\n\n    if (isDown && current > to || !isDown && current < to) {\n      current = to;\n    }\n\n    Object(_utils_dom_scroll__WEBPACK_IMPORTED_MODULE_1__[\"setScrollTop\"])(scroller, current);\n\n    if (isDown && current < to || !isDown && current > to) {\n      Object(_utils_dom_raf__WEBPACK_IMPORTED_MODULE_0__[\"raf\"])(animate);\n    } else if (callback) {\n      Object(_utils_dom_raf__WEBPACK_IMPORTED_MODULE_0__[\"raf\"])(callback);\n    }\n  }\n\n  animate();\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/tabs/utils.js?");

/***/ }),

/***/ "./node_modules/vant/es/toast/Toast.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/toast/Toast.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _lock_click__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lock-click */ \"./node_modules/vant/es/toast/lock-click.js\");\n/* harmony import */ var _mixins_popup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../mixins/popup */ \"./node_modules/vant/es/mixins/popup/index.js\");\n/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon */ \"./node_modules/vant/es/icon/index.js\");\n/* harmony import */ var _loading__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../loading */ \"./node_modules/vant/es/loading/index.js\");\n// Utils\n\n // Mixins\n\n // Components\n\n\n\n\nvar _createNamespace = Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"createNamespace\"])('toast'),\n    createComponent = _createNamespace[0],\n    bem = _createNamespace[1];\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createComponent({\n  mixins: [Object(_mixins_popup__WEBPACK_IMPORTED_MODULE_2__[\"PopupMixin\"])()],\n  props: {\n    icon: String,\n    className: null,\n    iconPrefix: String,\n    loadingType: String,\n    forbidClick: Boolean,\n    closeOnClick: Boolean,\n    message: [Number, String],\n    type: {\n      type: String,\n      default: 'text'\n    },\n    position: {\n      type: String,\n      default: 'middle'\n    },\n    transition: {\n      type: String,\n      default: 'van-fade'\n    },\n    lockScroll: {\n      type: Boolean,\n      default: false\n    }\n  },\n  data: function data() {\n    return {\n      clickable: false\n    };\n  },\n  mounted: function mounted() {\n    this.toggleClickable();\n  },\n  destroyed: function destroyed() {\n    this.toggleClickable();\n  },\n  watch: {\n    value: 'toggleClickable',\n    forbidClick: 'toggleClickable'\n  },\n  methods: {\n    onClick: function onClick() {\n      if (this.closeOnClick) {\n        this.close();\n      }\n    },\n    toggleClickable: function toggleClickable() {\n      var clickable = this.value && this.forbidClick;\n\n      if (this.clickable !== clickable) {\n        this.clickable = clickable;\n        Object(_lock_click__WEBPACK_IMPORTED_MODULE_1__[\"lockClick\"])(clickable);\n      }\n    },\n\n    /* istanbul ignore next */\n    onAfterEnter: function onAfterEnter() {\n      this.$emit('opened');\n\n      if (this.onOpened) {\n        this.onOpened();\n      }\n    },\n    onAfterLeave: function onAfterLeave() {\n      this.$emit('closed');\n    },\n    genIcon: function genIcon() {\n      var h = this.$createElement;\n      var icon = this.icon,\n          type = this.type,\n          iconPrefix = this.iconPrefix,\n          loadingType = this.loadingType;\n      var hasIcon = icon || type === 'success' || type === 'fail';\n\n      if (hasIcon) {\n        return h(_icon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n          \"class\": bem('icon'),\n          \"attrs\": {\n            \"classPrefix\": iconPrefix,\n            \"name\": icon || type\n          }\n        });\n      }\n\n      if (type === 'loading') {\n        return h(_loading__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n          \"class\": bem('loading'),\n          \"attrs\": {\n            \"type\": loadingType\n          }\n        });\n      }\n    },\n    genMessage: function genMessage() {\n      var h = this.$createElement;\n      var type = this.type,\n          message = this.message;\n\n      if (!Object(_utils__WEBPACK_IMPORTED_MODULE_0__[\"isDef\"])(message) || message === '') {\n        return;\n      }\n\n      if (type === 'html') {\n        return h(\"div\", {\n          \"class\": bem('text'),\n          \"domProps\": {\n            \"innerHTML\": message\n          }\n        });\n      }\n\n      return h(\"div\", {\n        \"class\": bem('text')\n      }, [message]);\n    }\n  },\n  render: function render() {\n    var _ref;\n\n    var h = arguments[0];\n    return h(\"transition\", {\n      \"attrs\": {\n        \"name\": this.transition\n      },\n      \"on\": {\n        \"afterEnter\": this.onAfterEnter,\n        \"afterLeave\": this.onAfterLeave\n      }\n    }, [h(\"div\", {\n      \"directives\": [{\n        name: \"show\",\n        value: this.value\n      }],\n      \"class\": [bem([this.position, (_ref = {}, _ref[this.type] = !this.icon, _ref)]), this.className],\n      \"on\": {\n        \"click\": this.onClick\n      }\n    }, [this.genIcon(), this.genMessage()])]);\n  }\n}));\n\n//# sourceURL=webpack:///./node_modules/vant/es/toast/Toast.js?");

/***/ }),

/***/ "./node_modules/vant/es/toast/index.js":
/*!*********************************************!*\
  !*** ./node_modules/vant/es/toast/index.js ***!
  \*********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var _Toast__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Toast */ \"./node_modules/vant/es/toast/Toast.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils */ \"./node_modules/vant/es/utils/index.js\");\n/* harmony import */ var _utils_dom_node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/dom/node */ \"./node_modules/vant/es/utils/dom/node.js\");\n\n\n\n\n\nvar defaultOptions = {\n  icon: '',\n  type: 'text',\n  // @deprecated\n  mask: false,\n  value: true,\n  message: '',\n  className: '',\n  overlay: false,\n  onClose: null,\n  onOpened: null,\n  duration: 2000,\n  iconPrefix: undefined,\n  position: 'middle',\n  transition: 'van-fade',\n  forbidClick: false,\n  loadingType: undefined,\n  getContainer: 'body',\n  overlayStyle: null,\n  closeOnClick: false,\n  closeOnClickOverlay: false\n}; // default options of specific type\n\nvar defaultOptionsMap = {};\nvar queue = [];\nvar multiple = false;\n\nvar currentOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, defaultOptions);\n\nfunction parseOptions(message) {\n  if (Object(_utils__WEBPACK_IMPORTED_MODULE_3__[\"isObject\"])(message)) {\n    return message;\n  }\n\n  return {\n    message: message\n  };\n}\n\nfunction isInDocument(element) {\n  return document.body.contains(element);\n}\n\nfunction createInstance() {\n  /* istanbul ignore if */\n  if (_utils__WEBPACK_IMPORTED_MODULE_3__[\"isServer\"]) {\n    return {};\n  }\n\n  queue = queue.filter(function (item) {\n    return !item.$el.parentNode || isInDocument(item.$el);\n  });\n\n  if (!queue.length || multiple) {\n    var toast = new (vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].extend(_Toast__WEBPACK_IMPORTED_MODULE_2__[\"default\"]))({\n      el: document.createElement('div')\n    });\n    toast.$on('input', function (value) {\n      toast.value = value;\n    });\n    queue.push(toast);\n  }\n\n  return queue[queue.length - 1];\n} // transform toast options to popup props\n\n\nfunction transformOptions(options) {\n  return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n    overlay: options.mask || options.overlay,\n    mask: undefined,\n    duration: undefined\n  });\n}\n\nfunction Toast(options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  var toast = createInstance(); // should add z-index if previous toast has not disappeared\n\n  if (toast.value) {\n    toast.updateZIndex();\n  }\n\n  options = parseOptions(options);\n  options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, currentOptions, defaultOptionsMap[options.type || currentOptions.type], options);\n\n  if (false) {}\n\n  options.clear = function () {\n    toast.value = false;\n\n    if (options.onClose) {\n      options.onClose();\n      options.onClose = null;\n    }\n\n    if (multiple && !_utils__WEBPACK_IMPORTED_MODULE_3__[\"isServer\"]) {\n      toast.$on('closed', function () {\n        clearTimeout(toast.timer);\n        queue = queue.filter(function (item) {\n          return item !== toast;\n        });\n        Object(_utils_dom_node__WEBPACK_IMPORTED_MODULE_4__[\"removeNode\"])(toast.$el);\n        toast.$destroy();\n      });\n    }\n  };\n\n  Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(toast, transformOptions(options));\n\n  clearTimeout(toast.timer);\n\n  if (options.duration > 0) {\n    toast.timer = setTimeout(function () {\n      toast.clear();\n    }, options.duration);\n  }\n\n  return toast;\n}\n\nvar createMethod = function createMethod(type) {\n  return function (options) {\n    return Toast(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n      type: type\n    }, parseOptions(options)));\n  };\n};\n\n['loading', 'success', 'fail'].forEach(function (method) {\n  Toast[method] = createMethod(method);\n});\n\nToast.clear = function (all) {\n  if (queue.length) {\n    if (all) {\n      queue.forEach(function (toast) {\n        toast.clear();\n      });\n      queue = [];\n    } else if (!multiple) {\n      queue[0].clear();\n    } else {\n      queue.shift().clear();\n    }\n  }\n};\n\nToast.setDefaultOptions = function (type, options) {\n  if (typeof type === 'string') {\n    defaultOptionsMap[type] = options;\n  } else {\n    Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(currentOptions, type);\n  }\n};\n\nToast.resetDefaultOptions = function (type) {\n  if (typeof type === 'string') {\n    defaultOptionsMap[type] = null;\n  } else {\n    currentOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, defaultOptions);\n    defaultOptionsMap = {};\n  }\n};\n\nToast.allowMultiple = function (value) {\n  if (value === void 0) {\n    value = true;\n  }\n\n  multiple = value;\n};\n\nToast.install = function () {\n  vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].use(_Toast__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n};\n\nvue__WEBPACK_IMPORTED_MODULE_1__[\"default\"].prototype.$toast = Toast;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Toast);\n\n//# sourceURL=webpack:///./node_modules/vant/es/toast/index.js?");

/***/ }),

/***/ "./node_modules/vant/es/toast/index.less":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/toast/index.less ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(/*! !../../../css-loader/dist/cjs.js??ref--11-oneOf-3-1!../../../postcss-loader/src??ref--11-oneOf-3-2!../../../less-loader/dist/cjs.js??ref--11-oneOf-3-3!./index.less */ \"./node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/src/index.js?!./node_modules/less-loader/dist/cjs.js?!./node_modules/vant/es/toast/index.less\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = __webpack_require__(/*! ../../../vue-style-loader/lib/addStylesClient.js */ \"./node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"8743605e\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(false) {}\n\n//# sourceURL=webpack:///./node_modules/vant/es/toast/index.less?");

/***/ }),

/***/ "./node_modules/vant/es/toast/lock-click.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/toast/lock-click.js ***!
  \**************************************************/
/*! exports provided: lockClick */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lockClick\", function() { return lockClick; });\nvar lockCount = 0;\nfunction lockClick(lock) {\n  if (lock) {\n    if (!lockCount) {\n      document.body.classList.add('van-toast--unclickable');\n    }\n\n    lockCount++;\n  } else {\n    lockCount--;\n\n    if (!lockCount) {\n      document.body.classList.remove('van-toast--unclickable');\n    }\n  }\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/toast/lock-click.js?");

/***/ }),

/***/ "./node_modules/vant/es/toast/style/less.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/toast/style/less.js ***!
  \**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/base.less */ \"./node_modules/vant/es/style/base.less\");\n/* harmony import */ var _style_base_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_base_less__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../overlay/index.less */ \"./node_modules/vant/es/overlay/index.less\");\n/* harmony import */ var _overlay_index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_overlay_index_less__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../info/index.less */ \"./node_modules/vant/es/info/index.less\");\n/* harmony import */ var _info_index_less__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_info_index_less__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../icon/index.less */ \"./node_modules/vant/es/icon/index.less\");\n/* harmony import */ var _icon_index_less__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_icon_index_less__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _popup_index_less__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../popup/index.less */ \"./node_modules/vant/es/popup/index.less\");\n/* harmony import */ var _popup_index_less__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_popup_index_less__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../loading/index.less */ \"./node_modules/vant/es/loading/index.less\");\n/* harmony import */ var _loading_index_less__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_loading_index_less__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../index.less */ \"./node_modules/vant/es/toast/index.less\");\n/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_6__);\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/vant/es/toast/style/less.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/deep-clone.js":
/*!**************************************************!*\
  !*** ./node_modules/vant/es/utils/deep-clone.js ***!
  \**************************************************/
/*! exports provided: deepClone */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"deepClone\", function() { return deepClone; });\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ \"./node_modules/vant/es/utils/index.js\");\n\nfunction deepClone(obj) {\n  if (!Object(_index__WEBPACK_IMPORTED_MODULE_0__[\"isDef\"])(obj)) {\n    return obj;\n  }\n\n  if (Array.isArray(obj)) {\n    return obj.map(function (item) {\n      return deepClone(item);\n    });\n  }\n\n  if (typeof obj === 'object') {\n    var to = {};\n    Object.keys(obj).forEach(function (key) {\n      to[key] = deepClone(obj[key]);\n    });\n    return to;\n  }\n\n  return obj;\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/deep-clone.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/dom/raf.js":
/*!***********************************************!*\
  !*** ./node_modules/vant/es/utils/dom/raf.js ***!
  \***********************************************/
/*! exports provided: raf, doubleRaf, cancelRaf */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"raf\", function() { return raf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"doubleRaf\", function() { return doubleRaf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cancelRaf\", function() { return cancelRaf; });\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! .. */ \"./node_modules/vant/es/utils/index.js\");\n/**\n * requestAnimationFrame polyfill\n */\n\nvar prev = Date.now();\n/* istanbul ignore next */\n\nfunction fallback(fn) {\n  var curr = Date.now();\n  var ms = Math.max(0, 16 - (curr - prev));\n  var id = setTimeout(fn, ms);\n  prev = curr + ms;\n  return id;\n}\n/* istanbul ignore next */\n\n\nvar root = ___WEBPACK_IMPORTED_MODULE_0__[\"isServer\"] ? global : window;\n/* istanbul ignore next */\n\nvar iRaf = root.requestAnimationFrame || fallback;\n/* istanbul ignore next */\n\nvar iCancel = root.cancelAnimationFrame || root.clearTimeout;\nfunction raf(fn) {\n  return iRaf.call(root, fn);\n} // double raf for animation\n\nfunction doubleRaf(fn) {\n  raf(function () {\n    raf(fn);\n  });\n}\nfunction cancelRaf(id) {\n  iCancel.call(root, id);\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/dom/raf.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/dom/reset-scroll.js":
/*!********************************************************!*\
  !*** ./node_modules/vant/es/utils/dom/reset-scroll.js ***!
  \********************************************************/
/*! exports provided: resetScroll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetScroll\", function() { return resetScroll; });\n/* harmony import */ var _validate_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../validate/system */ \"./node_modules/vant/es/utils/validate/system.js\");\n/* harmony import */ var _scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./scroll */ \"./node_modules/vant/es/utils/dom/scroll.js\");\n/**\n * Hack for iOS12 page scroll\n * https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800\n */\n\n\nvar isIOS = Object(_validate_system__WEBPACK_IMPORTED_MODULE_0__[\"isIOS\"])();\n/* istanbul ignore next */\n\nfunction resetScroll() {\n  if (isIOS) {\n    Object(_scroll__WEBPACK_IMPORTED_MODULE_1__[\"setRootScrollTop\"])(Object(_scroll__WEBPACK_IMPORTED_MODULE_1__[\"getRootScrollTop\"])());\n  }\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/dom/reset-scroll.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/dom/style.js":
/*!*************************************************!*\
  !*** ./node_modules/vant/es/utils/dom/style.js ***!
  \*************************************************/
/*! exports provided: isHidden */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isHidden\", function() { return isHidden; });\nfunction isHidden(el) {\n  var style = window.getComputedStyle(el);\n  var hidden = style.display === 'none'; // offsetParent returns null in the following situations:\n  // 1. The element or its parent element has the display property set to none.\n  // 2. The element has the position property set to fixed\n\n  var parentHidden = el.offsetParent === null && style.position !== 'fixed';\n  return hidden || parentHidden;\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/dom/style.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/format/number.js":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/utils/format/number.js ***!
  \*****************************************************/
/*! exports provided: range, formatNumber, addNumber */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"range\", function() { return range; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"formatNumber\", function() { return formatNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"addNumber\", function() { return addNumber; });\nfunction range(num, min, max) {\n  return Math.min(Math.max(num, min), max);\n}\n\nfunction trimExtraChar(value, _char, regExp) {\n  var index = value.indexOf(_char);\n  var prefix = '';\n\n  if (index === -1) {\n    return value;\n  }\n\n  if (_char === '-' && index !== 0) {\n    return value.slice(0, index);\n  }\n\n  if (_char === '.' && value.match(/^(\\.|-\\.)/)) {\n    prefix = index ? '-0' : '0';\n  }\n\n  return prefix + value.slice(0, index + 1) + value.slice(index).replace(regExp, '');\n}\n\nfunction formatNumber(value, allowDot, allowMinus) {\n  if (allowDot === void 0) {\n    allowDot = true;\n  }\n\n  if (allowMinus === void 0) {\n    allowMinus = true;\n  }\n\n  if (allowDot) {\n    value = trimExtraChar(value, '.', /\\./g);\n  } else {\n    value = value.split('.')[0];\n  }\n\n  if (allowMinus) {\n    value = trimExtraChar(value, '-', /-/g);\n  } else {\n    value = value.replace(/-/, '');\n  }\n\n  var regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;\n  return value.replace(regExp, '');\n} // add num and avoid float number\n\nfunction addNumber(num1, num2) {\n  var cardinal = Math.pow(10, 10);\n  return Math.round((num1 + num2) * cardinal) / cardinal;\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/format/number.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/interceptor.js":
/*!***************************************************!*\
  !*** ./node_modules/vant/es/utils/interceptor.js ***!
  \***************************************************/
/*! exports provided: callInterceptor */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"callInterceptor\", function() { return callInterceptor; });\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! . */ \"./node_modules/vant/es/utils/index.js\");\n\nfunction callInterceptor(options) {\n  var interceptor = options.interceptor,\n      args = options.args,\n      done = options.done;\n\n  if (interceptor) {\n    var returnVal = interceptor.apply(void 0, args);\n\n    if (Object(___WEBPACK_IMPORTED_MODULE_0__[\"isPromise\"])(returnVal)) {\n      returnVal.then(function (value) {\n        if (value) {\n          done();\n        }\n      }).catch(___WEBPACK_IMPORTED_MODULE_0__[\"noop\"]);\n    } else if (returnVal) {\n      done();\n    }\n  } else {\n    done();\n  }\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/interceptor.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/validate/date.js":
/*!*****************************************************!*\
  !*** ./node_modules/vant/es/utils/validate/date.js ***!
  \*****************************************************/
/*! exports provided: isDate */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isDate\", function() { return isDate; });\n/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ \"./node_modules/vant/es/utils/validate/number.js\");\n\nfunction isDate(val) {\n  return Object.prototype.toString.call(val) === '[object Date]' && !Object(_number__WEBPACK_IMPORTED_MODULE_0__[\"isNaN\"])(val.getTime());\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/validate/date.js?");

/***/ }),

/***/ "./node_modules/vant/es/utils/validate/system.js":
/*!*******************************************************!*\
  !*** ./node_modules/vant/es/utils/validate/system.js ***!
  \*******************************************************/
/*! exports provided: isAndroid, isIOS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAndroid\", function() { return isAndroid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isIOS\", function() { return isIOS; });\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! .. */ \"./node_modules/vant/es/utils/index.js\");\n\nfunction isAndroid() {\n  /* istanbul ignore next */\n  return ___WEBPACK_IMPORTED_MODULE_0__[\"isServer\"] ? false : /android/.test(navigator.userAgent.toLowerCase());\n}\nfunction isIOS() {\n  /* istanbul ignore next */\n  return ___WEBPACK_IMPORTED_MODULE_0__[\"isServer\"] ? false : /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase());\n}\n\n//# sourceURL=webpack:///./node_modules/vant/es/utils/validate/system.js?");

/***/ }),

/***/ "./node_modules/watch-size/index.es.mjs":
/*!**********************************************!*\
  !*** ./node_modules/watch-size/index.es.mjs ***!
  \**********************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\nvar index = (function (element, listener) {\n\tvar expand = document.createElement('_');\n\tvar shrink = expand.appendChild(document.createElement('_'));\n\tvar expandChild = expand.appendChild(document.createElement('_'));\n\tvar shrinkChild = shrink.appendChild(document.createElement('_'));\n\n\tvar lastWidth = void 0,\n\t    lastHeight = void 0;\n\n\tshrink.style.cssText = expand.style.cssText = 'height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1';\n\tshrinkChild.style.cssText = expandChild.style.cssText = 'display:block;height:100%;transition:0s;width:100%';\n\tshrinkChild.style.width = shrinkChild.style.height = '200%';\n\n\telement.appendChild(expand);\n\n\ttest();\n\n\treturn stop;\n\n\tfunction test() {\n\t\tunbind();\n\n\t\tvar width = element.offsetWidth;\n\t\tvar height = element.offsetHeight;\n\n\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\tlastWidth = width;\n\t\t\tlastHeight = height;\n\n\t\t\texpandChild.style.width = width * 2 + 'px';\n\t\t\texpandChild.style.height = height * 2 + 'px';\n\n\t\t\texpand.scrollLeft = expand.scrollWidth;\n\t\t\texpand.scrollTop = expand.scrollHeight;\n\t\t\tshrink.scrollLeft = shrink.scrollWidth;\n\t\t\tshrink.scrollTop = shrink.scrollHeight;\n\n\t\t\tlistener({ width: width, height: height });\n\t\t}\n\n\t\tshrink.addEventListener('scroll', test);\n\t\texpand.addEventListener('scroll', test);\n\t}\n\n\tfunction unbind() {\n\t\tshrink.removeEventListener('scroll', test);\n\t\texpand.removeEventListener('scroll', test);\n\t}\n\n\tfunction stop() {\n\t\tunbind();\n\n\t\telement.removeChild(expand);\n\t}\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index);\n\n\n//# sourceURL=webpack:///./node_modules/watch-size/index.es.mjs?");

/***/ }),

/***/ "./node_modules/webpack/buildin/module.js":
/*!***********************************!*\
  !*** (webpack)/buildin/module.js ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports) {

eval("module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n\n//# sourceURL=webpack:///(webpack)/buildin/module.js?");

/***/ })

}]);